diff --git a/.claude/skills/contributing/references/best-practices.md b/.claude/skills/contributing/references/best-practices.md index 6f7345f61..5bffc3adc 100644 --- a/.claude/skills/contributing/references/best-practices.md +++ b/.claude/skills/contributing/references/best-practices.md @@ -77,7 +77,7 @@ Two patterns exist for this — pick by need: ### Pattern A: Per-input `BreakpointInput` (preferred when one or two inputs need to be responsive) -Use this when a single input (e.g., a flag, count, or variant) should vary by breakpoint without restating sibling inputs. Reference: `tedi/components/content/carousel/carousel-content/carousel-content.component.ts:46-55`, `tedi/components/form/time-field/time-field.component.ts` (`useNativePicker`). +Use this when a single input (e.g., a flag, count, or variant) should vary by breakpoint without restating sibling inputs. Reference: `src/tedi/components/content/carousel/carousel-content/carousel-content.component.ts:46-55`, `src/tedi/components/form/time-field/time-field.component.ts` (`useNativePicker`). ```typescript import { @@ -118,7 +118,7 @@ Notes: ### Pattern B: Per-component breakpoint inputs (preferred when many inputs need to be responsive together) -Use this when several inputs commonly change together at a given breakpoint and consumers benefit from grouping them. Reference: `tedi/components/navigation/link/link.component.ts:55-105`. +Use this when several inputs commonly change together at a given breakpoint and consumers benefit from grouping them. Reference: `src/tedi/components/navigation/link/link.component.ts:55-105`. ```typescript export type LinkInputs = { @@ -429,27 +429,27 @@ export { ComponentNameType } from './component-name.types'; // if applicable ``` ### Register in Category `index.ts` -Add the new component export to the parent category barrel file (e.g., `tedi/components/form/index.ts`). +Add the new component export to the parent category barrel file (e.g., `src/tedi/components/form/index.ts`). ## Key File Locations ### Services -- Translation: `tedi/services/translation/translation.service.ts` (root-provided) -- Theme: `tedi/services/theme/theme.service.ts` (root-provided) -- Toast: `tedi/services/toast/toast.service.ts` (root-provided, has static state) -- Breakpoint: `tedi/services/breakpoint/breakpoint.service.ts` +- Translation: `src/tedi/services/translation/translation.service.ts` (root-provided) +- Theme: `src/tedi/services/theme/theme.service.ts` (root-provided) +- Toast: `src/tedi/services/toast/toast.service.ts` (root-provided, has static state) +- Breakpoint: `src/tedi/services/breakpoint/breakpoint.service.ts` ### Configuration -- App-level provider: `tedi/providers/tedi.provider.ts` → `provideTedi(config)` -- Translation token: `tedi/tokens/translation.token.ts` -- Theme token: `tedi/tokens/theme.token.ts` -- Translations map: `tedi/services/translation/translations.ts` (et, en, ru) +- App-level provider: `src/tedi/providers/tedi.provider.ts` → `provideTedi(config)` +- Translation token: `src/tedi/tokens/translation.token.ts` +- Theme token: `src/tedi/tokens/theme.token.ts` +- Translations map: `src/tedi/services/translation/translations.ts` (et, en, ru) ### Utilities -- Date formatting: `tedi/utils/date.util.ts` -- Cookie signal: `tedi/utils/cookies.util.ts` -- DOM helpers: `tedi/utils/elements.util.ts` -- UUID generation: `tedi/helpers/generate-uuid.ts` +- Date formatting: `src/tedi/utils/date.util.ts` +- Cookie signal: `src/tedi/utils/cookies.util.ts` +- DOM helpers: `src/tedi/utils/elements.util.ts` +- UUID generation: `src/tedi/helpers/generate-uuid.ts` ## Known Quirks - `toggle.component.ts` still uses old `@ViewChild` decorator — should be migrated to `viewChild()` signal diff --git a/.claude/skills/contributing/references/new-component.md b/.claude/skills/contributing/references/new-component.md index 9af1ba95f..f620115df 100644 --- a/.claude/skills/contributing/references/new-component.md +++ b/.claude/skills/contributing/references/new-component.md @@ -17,7 +17,7 @@ If no Figma link was provided, stop immediately and ask the user for one. Do not Enter plan mode and create a detailed plan covering: - **Component name** and selector (`tedi-` prefix) -- **Category** — which folder under `tedi/components/` it belongs to +- **Category** — which folder under `src/tedi/components/` it belongs to - **API design** — all inputs (with types and defaults), outputs, content projection slots - **Responsive inputs** — for each input, check if the React equivalent uses `BreakpointSupport` or `BreakpointInput`. If yes, plan the Angular equivalent (see "Responsive Inputs (Breakpoint Support)" in best-practices.md for pattern A vs B). Even without a React reference, ask: would consumers reasonably need to vary this input per breakpoint? If so, add breakpoint support up front — retrofitting later is a breaking change. - **Accessibility** — ARIA roles, keyboard interactions, screen reader behavior, focus management @@ -30,7 +30,7 @@ If a new dependency is needed, stop and ask the user for permission. ## Step 3: Scaffold Files -Create the following files in `tedi/components///`: +Create the following files in `src/tedi/components///`: ```text component-name.component.ts @@ -53,7 +53,7 @@ Follow all patterns from best-practices: ## Step 5: Export 1. Create barrel export in `index.ts` -2. Add export to the parent category `index.ts` (e.g., `tedi/components/form/index.ts`) +2. Add export to the parent category `index.ts` (e.g., `src/tedi/components/form/index.ts`) ## Step 6: Code Review @@ -63,7 +63,7 @@ A finding is **valid** when it is confirmed against the current code (not stale ## Step 7: Verify -1. Run tests: `npx jest tedi/components///` +1. Run tests: `npx jest src/tedi/components///` 2. Fix any failures. 3. Run lint: `npm run lint` 4. Fix any lint errors. diff --git a/.claude/skills/contributing/references/stories.md b/.claude/skills/contributing/references/stories.md index 0e5c5ea89..9dce430b3 100644 --- a/.claude/skills/contributing/references/stories.md +++ b/.claude/skills/contributing/references/stories.md @@ -90,17 +90,17 @@ Rules: ### 3. Determine the Story Category -Find where the component lives under `tedi/components/` and map to the Storybook title: +Find where the component lives under `src/tedi/components/` and map to the Storybook title: | Component path | Story title prefix | |---|---| -| `tedi/components/form/` | `TEDI-Ready/Components/Form/` | -| `tedi/components/buttons/` | `TEDI-Ready/Components/Buttons/` | -| `tedi/components/overlay/` | `TEDI-Ready/Components/Overlay/` | -| `tedi/components/navigation/` | `TEDI-Ready/Components/Navigation/` | -| `tedi/components/content/` | `TEDI-Ready/Content/` (no `Components/` segment) | -| `tedi/components/layout/` | `TEDI-Ready/Layout/` (no `Components/` segment) | -| `tedi/components/base/` | `TEDI-Ready/Base/` (no `Components/` segment) | +| `src/tedi/components/form/` | `TEDI-Ready/Components/Form/` | +| `src/tedi/components/buttons/` | `TEDI-Ready/Components/Buttons/` | +| `src/tedi/components/overlay/` | `TEDI-Ready/Components/Overlay/` | +| `src/tedi/components/navigation/` | `TEDI-Ready/Components/Navigation/` | +| `src/tedi/components/content/` | `TEDI-Ready/Content/` (no `Components/` segment) | +| `src/tedi/components/layout/` | `TEDI-Ready/Layout/` (no `Components/` segment) | +| `src/tedi/components/base/` | `TEDI-Ready/Base/` (no `Components/` segment) | | Other category | `TEDI-Ready/Components//` | **Note:** the `Content`, `Layout`, and `Base` groups sit directly under `TEDI-Ready/` — they skip the `Components/` segment. Check sibling stories in the same folder before picking a title. @@ -150,17 +150,73 @@ If the component also has a Zeroheight page, add it on the next line with `
` Applies equally to new components and retrofits — if an existing story lacks the link, add it. -### 5. Story Checklist +### 5. Make the `Default` Story's Controls Functional + +**The `Default` story's controls must actually drive the rendered component — always, including when the component is nested or composed of sub-components.** Changing a control in the panel must visibly change the rendered output. A `Default` story whose template ignores `args` (so the controls do nothing) is wrong, even if it looks correct at a glance. + +**Bind args directly as template props in `render` — never build a host-wrapper component.** Storybook passes args into the `props` object and re-renders on every control change; template expressions reference the arg names directly. + +```typescript +export const Default: StoryObj = { + args: { variant: 'primary', size: 'medium', disabled: false }, + render: (args) => ({ + props: { ...args }, + template: ``, + }), +}; +``` + +Prefer `argsToTemplate(args)` to forward every arg as a binding without restating each one — this keeps the story functional as inputs are added: + +```typescript +import { argsToTemplate } from '@storybook/angular'; + +render: (args) => ({ + props: { ...args }, + template: ``, +}), +``` + +**Nested / composed components.** The args belong to the **outer component under test** (`component:` in the default export). Bind them to that component's element and let it pass them down to its sub-components internally — do **not** redirect the controls to a child. + +- If the rendered example wraps the component or projects content, still bind the args to the component being documented, and bind any arg-dependent projected content too: + + ```typescript + // Component under test is , which composes header/body sub-components. + render: (args) => ({ + props: { ...args }, + template: ` + + +

{{ label }}

+
+
+ `, + }), + ``` + +- For two-way / local state (e.g. selection, open/close), keep a local `signal` in `props` and bind it via `[value]`/`(valueChange)` — leave the rest of the args spread in: + + ```typescript + render: (args) => ({ + props: { ...args, value: signal('2') }, + template: ``, + }), + ``` + +**Showcase stories are the exception.** Stories that render several fixed configurations at once (all variants/sizes/states) should **disable** the panel rather than fake controls: `parameters: { controls: { disable: true } }`. Only the `Default` (single-instance) story must have working controls. + +### 6. Story Checklist - [ ] Every Figma section has a corresponding story export, in the same order - [ ] Example content (labels, data, item count) matches Figma exactly - [ ] Every public input/model has a corresponding `argTypes` entry with description, control, type summary, and default value -- [ ] `Default` story has all controls wired up via `args` +- [ ] `Default` story has all controls wired up via `args` and they **functionally drive the rendered component** — verified by changing a control and seeing the output update, including for nested/composed components (see section 5) - [ ] States story covers all visual states shown in Figma (default, hover, active, focus, disabled) - [ ] Reactive forms example included if the component implements ControlValueAccessor - [ ] Figma link is in the JSDoc comment above `export default` (format: `Figma ↗`) -### 6. argTypes Convention +### 7. argTypes Convention **Every public input/model must have an argTypes entry.** Do not skip any — all props must appear in the Storybook controls panel with correct typing and descriptions. @@ -187,7 +243,7 @@ argTypes: { } ``` -### 7. Verify +### 8. Verify Run Storybook to visually confirm stories render correctly: ```bash @@ -198,5 +254,5 @@ Check that: - All stories appear in the correct category - Story order matches Figma section order - Example content matches Figma -- Controls work interactively +- Controls work interactively — change a control in the `Default` story and confirm the rendered component updates (including nested/composed components) - No console errors diff --git a/.storybook/main.ts b/.storybook/main.ts index 203d007ca..acf08bf1f 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -10,9 +10,9 @@ const config: StorybookConfig = { "../src/docs/css-utilities.mdx", "../src/docs/colors/colors.mdx", "../src/docs/**/*.stories.@(js|jsx|mjs|ts|tsx)", - "../tedi/**/*.stories.@(js|jsx|mjs|ts|tsx)", - "../tedi/**/*.mdx", - "../community/**/*.stories.@(js|jsx|mjs|ts|tsx)", + "../src/tedi/**/*.stories.@(js|jsx|mjs|ts|tsx)", + "../src/tedi/**/*.mdx", + "../src/community/**/*.stories.@(js|jsx|mjs|ts|tsx)", ], addons: [ "@storybook/addon-docs", diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 59b28f5df..fa37add1b 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -1,6 +1,6 @@ import { applicationConfig, Preview, StoryContext } from "@storybook/angular"; import { provideRouter, withDisabledInitialNavigation } from "@angular/router"; -import { Theme } from "../tedi/services/theme/theme.service"; +import { Theme } from "../src/tedi/services/theme/theme.service"; import { Controls, Description, @@ -9,9 +9,9 @@ import { Subtitle, Title, } from "@storybook/addon-docs/blocks"; -import { TEDI_TRANSLATION_DEFAULT_TOKEN } from "../tedi/tokens/translation.token"; -import { TEDI_THEME_DEFAULT_TOKEN } from "../tedi/tokens/theme.token"; -import { THEME_FALLBACK_VALUE } from "../tedi/services/theme/theme.service"; +import { TEDI_TRANSLATION_DEFAULT_TOKEN } from "../src/tedi/tokens/translation.token"; +import { TEDI_THEME_DEFAULT_TOKEN } from "../src/tedi/tokens/theme.token"; +import { THEME_FALLBACK_VALUE } from "../src/tedi/services/theme/theme.service"; export const globalTypes = { theme: { diff --git a/CLAUDE.md b/CLAUDE.md index 432f3e2f7..a4a34f3ec 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -21,13 +21,15 @@ npm run build # Build library to dist/ ### Directory Layout -- `tedi/components/` — All UI components, organized by category (form, buttons, overlay, etc.) -- `tedi/directives/` — Attribute/structural directives -- `tedi/services/` — Services (translation, theme, breakpoint, toast) -- `tedi/utils/` — Utility functions (date, cookies, elements) -- `tedi/tokens/` — Injection tokens (theme, translation) -- `tedi/providers/` — Angular providers -- `community/` — Community-contributed components (separate entry point, NOT a reference for TEDI patterns) +- `src/tedi/components/` — All UI components, organized by category (form, buttons, overlay, etc.) +- `src/tedi/directives/` — Attribute/structural directives +- `src/tedi/services/` — Services (translation, theme, breakpoint, toast) +- `src/tedi/utils/` — Utility functions (date, cookies, elements) +- `src/tedi/tokens/` — Injection tokens (theme, translation) +- `src/tedi/providers/` — Angular providers +- `src/community/` — Community-contributed components (separate entry point, NOT a reference for TEDI patterns) + +> The library lives under `src/` (`src/tedi`, `src/community`), with `src/package.json` + `src/ng-package.json` as the ng-packagr primary entry point. The root `package.json` is the workspace/tooling manifest. This mirrors the React repo's `src/` layout — see issue #166. ### Component File Convention @@ -54,11 +56,11 @@ Form controls implement `ControlValueAccessor` with `NG_VALUE_ACCESSOR` provider ### Export Chain -`public-api.ts` → `tedi/index.ts` → category `index.ts` → component `index.ts` +`src/public-api.ts` → `src/tedi/index.ts` → category `index.ts` → component `index.ts` Path aliases: -- `@tedi-design-system/angular/tedi` → `./tedi/index.ts` -- `@tedi-design-system/angular/community` → `./community/index.ts` +- `@tedi-design-system/angular/tedi` → `./src/tedi/index.ts` +- `@tedi-design-system/angular/community` → `./src/community/index.ts` ## Styling @@ -79,7 +81,7 @@ Path aliases: ## Storybook -- Stories at `tedi/**/*.stories.ts` +- Stories at `src/tedi/**/*.stories.ts` - Title format: `"TEDI-Ready/Components//"` (e.g. `Buttons`, `Form`, `Navigation`). Top-level groups `Content`, `Layout`, and `Base` skip the `Components` segment — `"TEDI-Ready/Content/"`, etc. Check sibling stories in the same folder to confirm the prefix. - Uses `moduleMetadata` decorator for imports - Status parameters: `partiallyTediReady`, `existsInTediReady`, `devComponent`, etc. @@ -117,7 +119,7 @@ Path aliases: - Use regular methods for event handlers that need cleanup — use `handleX = (e: Event) => {}` property syntax - Forget to provide `TediTranslationService` mock and `TEDI_TRANSLATION_DEFAULT_TOKEN` in tests - Use `fakeAsync`/`tick` without cleaning up in `afterEach` -- Use `community/` components as reference for coding patterns or style — they are community-contributed and not always reviewed +- Use `src/community/` components as reference for coding patterns or style — they are community-contributed and not always reviewed - Forget to add `.parent__button:hover .tedi-icon { color: inherit; }` (and similar for selected/active states) in components that contain icons and change text color on state — without this, the icon's color modifier class wins over the parent's color. Use `color="inherit"` for component-owned icons; for projected icons, the CSS override ensures the consumer's color applies in default state but inherits on hover/selected - Style Angular element selectors directly (e.g., `tedi-modal-header { ... }`) — add a CSS class to the host and style the class instead. Exception: third-party elements you can't add classes to (e.g., `cdk-dialog-container`) diff --git a/angular.json b/angular.json index 2a0d8f265..dd628104e 100644 --- a/angular.json +++ b/angular.json @@ -11,7 +11,7 @@ "build": { "builder": "@angular/build:ng-packagr", "options": { - "project": "ng-package.json", + "project": "src/ng-package.json", "tsConfig": "tsconfig.json" }, "configurations": { @@ -63,10 +63,10 @@ "lintFilePatterns": [ "./src/docs/**/*.ts", "./src/docs/**/*.html", - "./tedi/**/*.ts", - "./tedi/**/*.html", - "./community/**/*.ts", - "./community/**/*.html" + "./src/tedi/**/*.ts", + "./src/tedi/**/*.html", + "./src/community/**/*.ts", + "./src/community/**/*.html" ] } } diff --git a/community/ng-package.json b/community/ng-package.json deleted file mode 100644 index cff8cfa13..000000000 --- a/community/ng-package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "../node_modules/ng-packagr/ng-package.schema.json", - "lib": { - "entryFile": "index.ts" - } -} diff --git a/jest.config.ts b/jest.config.ts index 2eea1ad7b..52c7139d6 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -17,7 +17,7 @@ export default { // in jest 29 workers on recent Node versions workerIdleMemoryLimit: "1GB", collectCoverage: true, - collectCoverageFrom: ["./tedi/components/**/*.{js,ts,tsx}"], + collectCoverageFrom: ["./src/tedi/components/**/*.{js,ts,tsx}"], coveragePathIgnorePatterns: ["\\.stories\\.ts$"], coverageThreshold: { global: { diff --git a/package.json b/package.json index a302e4424..63dee2537 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "build": "ng build angular-components --configuration production && sass --load-path=node_modules src/styles/index.scss dist/index.css --style=compressed --no-source-map && replace-in-file //fonts//g \"./fonts/\" dist/index.css --isRegex && mkdir -p dist/fonts && cp -a node_modules/@tedi-design-system/core/fonts/* dist/fonts/", "build:sb": "ng run angular-components:build-storybook && replace-in-file //fonts//g \"./fonts/\" \"dist/storybook-static/*.css\" --isRegex", "build:sb:chromatic": "ng run angular-components:build-storybook", - "lint": "stylelint \"tedi/**/*.scss\" --fix && ng lint angular-components --fix", + "lint": "stylelint \"src/tedi/**/*.scss\" --fix && ng lint angular-components --fix", "test": "jest --passWithNoTests", "test:watch": "jest --watch", "test:coverage": "jest --config ./jest.config.ts --coverage", @@ -117,10 +117,10 @@ } }, "lint-staged": { - "{src,tedi}/**/*.{css,scss}": [ + "src/!(community)/**/*.{css,scss}": [ "stylelint --fix" ], - "src/**/*.{ts,html}": [ + "src/!(community)/**/*.{ts,html}": [ "prettier --write" ] }, diff --git a/community/components/buttons/floating-button/floating-button.component.scss b/src/community/components/buttons/floating-button/floating-button.component.scss similarity index 100% rename from community/components/buttons/floating-button/floating-button.component.scss rename to src/community/components/buttons/floating-button/floating-button.component.scss diff --git a/community/components/buttons/floating-button/floating-button.component.ts b/src/community/components/buttons/floating-button/floating-button.component.ts similarity index 100% rename from community/components/buttons/floating-button/floating-button.component.ts rename to src/community/components/buttons/floating-button/floating-button.component.ts diff --git a/community/components/buttons/floating-button/floating-button.stories.ts b/src/community/components/buttons/floating-button/floating-button.stories.ts similarity index 98% rename from community/components/buttons/floating-button/floating-button.stories.ts rename to src/community/components/buttons/floating-button/floating-button.stories.ts index 64b089780..13e234a82 100644 --- a/community/components/buttons/floating-button/floating-button.stories.ts +++ b/src/community/components/buttons/floating-button/floating-button.stories.ts @@ -5,7 +5,7 @@ import { StoryObj, } from "@storybook/angular"; import { FloatingButtonComponent } from "./floating-button.component"; -import { IconComponent } from "tedi/components"; +import { IconComponent } from "../../../../tedi/components"; const buttonSizeArray = ["default", "large"]; const buttonStateArray = ["Default", "Hover", "Active", "Focus"]; diff --git a/community/components/buttons/floating-button/index.ts b/src/community/components/buttons/floating-button/index.ts similarity index 100% rename from community/components/buttons/floating-button/index.ts rename to src/community/components/buttons/floating-button/index.ts diff --git a/community/components/buttons/index.ts b/src/community/components/buttons/index.ts similarity index 100% rename from community/components/buttons/index.ts rename to src/community/components/buttons/index.ts diff --git a/community/components/cards/accordion/accordion-icon/accordion-icon.component.html b/src/community/components/cards/accordion/accordion-icon/accordion-icon.component.html similarity index 100% rename from community/components/cards/accordion/accordion-icon/accordion-icon.component.html rename to src/community/components/cards/accordion/accordion-icon/accordion-icon.component.html diff --git a/community/components/cards/accordion/accordion-icon/accordion-icon.component.scss b/src/community/components/cards/accordion/accordion-icon/accordion-icon.component.scss similarity index 100% rename from community/components/cards/accordion/accordion-icon/accordion-icon.component.scss rename to src/community/components/cards/accordion/accordion-icon/accordion-icon.component.scss diff --git a/community/components/cards/accordion/accordion-icon/accordion-icon.component.ts b/src/community/components/cards/accordion/accordion-icon/accordion-icon.component.ts similarity index 100% rename from community/components/cards/accordion/accordion-icon/accordion-icon.component.ts rename to src/community/components/cards/accordion/accordion-icon/accordion-icon.component.ts diff --git a/community/components/cards/accordion/accordion-item-content/accordion-item-content.component.html b/src/community/components/cards/accordion/accordion-item-content/accordion-item-content.component.html similarity index 100% rename from community/components/cards/accordion/accordion-item-content/accordion-item-content.component.html rename to src/community/components/cards/accordion/accordion-item-content/accordion-item-content.component.html diff --git a/community/components/cards/accordion/accordion-item-content/accordion-item-content.component.scss b/src/community/components/cards/accordion/accordion-item-content/accordion-item-content.component.scss similarity index 100% rename from community/components/cards/accordion/accordion-item-content/accordion-item-content.component.scss rename to src/community/components/cards/accordion/accordion-item-content/accordion-item-content.component.scss diff --git a/community/components/cards/accordion/accordion-item-content/accordion-item-content.component.ts b/src/community/components/cards/accordion/accordion-item-content/accordion-item-content.component.ts similarity index 100% rename from community/components/cards/accordion/accordion-item-content/accordion-item-content.component.ts rename to src/community/components/cards/accordion/accordion-item-content/accordion-item-content.component.ts diff --git a/community/components/cards/accordion/accordion-item-header/accordion-item-header.component.html b/src/community/components/cards/accordion/accordion-item-header/accordion-item-header.component.html similarity index 100% rename from community/components/cards/accordion/accordion-item-header/accordion-item-header.component.html rename to src/community/components/cards/accordion/accordion-item-header/accordion-item-header.component.html diff --git a/community/components/cards/accordion/accordion-item-header/accordion-item-header.component.scss b/src/community/components/cards/accordion/accordion-item-header/accordion-item-header.component.scss similarity index 100% rename from community/components/cards/accordion/accordion-item-header/accordion-item-header.component.scss rename to src/community/components/cards/accordion/accordion-item-header/accordion-item-header.component.scss diff --git a/community/components/cards/accordion/accordion-item-header/accordion-item-header.component.ts b/src/community/components/cards/accordion/accordion-item-header/accordion-item-header.component.ts similarity index 100% rename from community/components/cards/accordion/accordion-item-header/accordion-item-header.component.ts rename to src/community/components/cards/accordion/accordion-item-header/accordion-item-header.component.ts diff --git a/community/components/cards/accordion/accordion-item/accordion-item.component.html b/src/community/components/cards/accordion/accordion-item/accordion-item.component.html similarity index 100% rename from community/components/cards/accordion/accordion-item/accordion-item.component.html rename to src/community/components/cards/accordion/accordion-item/accordion-item.component.html diff --git a/community/components/cards/accordion/accordion-item/accordion-item.component.scss b/src/community/components/cards/accordion/accordion-item/accordion-item.component.scss similarity index 100% rename from community/components/cards/accordion/accordion-item/accordion-item.component.scss rename to src/community/components/cards/accordion/accordion-item/accordion-item.component.scss diff --git a/community/components/cards/accordion/accordion-item/accordion-item.component.ts b/src/community/components/cards/accordion/accordion-item/accordion-item.component.ts similarity index 100% rename from community/components/cards/accordion/accordion-item/accordion-item.component.ts rename to src/community/components/cards/accordion/accordion-item/accordion-item.component.ts diff --git a/community/components/cards/accordion/accordion.stories.ts b/src/community/components/cards/accordion/accordion.stories.ts similarity index 100% rename from community/components/cards/accordion/accordion.stories.ts rename to src/community/components/cards/accordion/accordion.stories.ts diff --git a/community/components/cards/accordion/accordion/accordion.component.html b/src/community/components/cards/accordion/accordion/accordion.component.html similarity index 100% rename from community/components/cards/accordion/accordion/accordion.component.html rename to src/community/components/cards/accordion/accordion/accordion.component.html diff --git a/community/components/cards/accordion/accordion/accordion.component.scss b/src/community/components/cards/accordion/accordion/accordion.component.scss similarity index 100% rename from community/components/cards/accordion/accordion/accordion.component.scss rename to src/community/components/cards/accordion/accordion/accordion.component.scss diff --git a/community/components/cards/accordion/accordion/accordion.component.ts b/src/community/components/cards/accordion/accordion/accordion.component.ts similarity index 100% rename from community/components/cards/accordion/accordion/accordion.component.ts rename to src/community/components/cards/accordion/accordion/accordion.component.ts diff --git a/community/components/cards/accordion/index.ts b/src/community/components/cards/accordion/index.ts similarity index 100% rename from community/components/cards/accordion/index.ts rename to src/community/components/cards/accordion/index.ts diff --git a/community/components/cards/card/_card-mixins.scss b/src/community/components/cards/card/_card-mixins.scss similarity index 100% rename from community/components/cards/card/_card-mixins.scss rename to src/community/components/cards/card/_card-mixins.scss diff --git a/community/components/cards/card/card-colors.directive.ts b/src/community/components/cards/card/card-colors.directive.ts similarity index 100% rename from community/components/cards/card/card-colors.directive.ts rename to src/community/components/cards/card/card-colors.directive.ts diff --git a/community/components/cards/card/card-content/card-content.component.html b/src/community/components/cards/card/card-content/card-content.component.html similarity index 100% rename from community/components/cards/card/card-content/card-content.component.html rename to src/community/components/cards/card/card-content/card-content.component.html diff --git a/community/components/cards/card/card-content/card-content.component.scss b/src/community/components/cards/card/card-content/card-content.component.scss similarity index 100% rename from community/components/cards/card/card-content/card-content.component.scss rename to src/community/components/cards/card/card-content/card-content.component.scss diff --git a/community/components/cards/card/card-content/card-content.component.ts b/src/community/components/cards/card/card-content/card-content.component.ts similarity index 100% rename from community/components/cards/card/card-content/card-content.component.ts rename to src/community/components/cards/card/card-content/card-content.component.ts diff --git a/community/components/cards/card/card-header/card-header.component.html b/src/community/components/cards/card/card-header/card-header.component.html similarity index 100% rename from community/components/cards/card/card-header/card-header.component.html rename to src/community/components/cards/card/card-header/card-header.component.html diff --git a/community/components/cards/card/card-header/card-header.component.scss b/src/community/components/cards/card/card-header/card-header.component.scss similarity index 100% rename from community/components/cards/card/card-header/card-header.component.scss rename to src/community/components/cards/card/card-header/card-header.component.scss diff --git a/community/components/cards/card/card-header/card-header.component.ts b/src/community/components/cards/card/card-header/card-header.component.ts similarity index 100% rename from community/components/cards/card/card-header/card-header.component.ts rename to src/community/components/cards/card/card-header/card-header.component.ts diff --git a/community/components/cards/card/card-padding.directive.ts b/src/community/components/cards/card/card-padding.directive.ts similarity index 100% rename from community/components/cards/card/card-padding.directive.ts rename to src/community/components/cards/card/card-padding.directive.ts diff --git a/community/components/cards/card/card-row/card-row.component.html b/src/community/components/cards/card/card-row/card-row.component.html similarity index 100% rename from community/components/cards/card/card-row/card-row.component.html rename to src/community/components/cards/card/card-row/card-row.component.html diff --git a/community/components/cards/card/card-row/card-row.component.scss b/src/community/components/cards/card/card-row/card-row.component.scss similarity index 100% rename from community/components/cards/card/card-row/card-row.component.scss rename to src/community/components/cards/card/card-row/card-row.component.scss diff --git a/community/components/cards/card/card-row/card-row.component.ts b/src/community/components/cards/card/card-row/card-row.component.ts similarity index 100% rename from community/components/cards/card/card-row/card-row.component.ts rename to src/community/components/cards/card/card-row/card-row.component.ts diff --git a/community/components/cards/card/card.component.html b/src/community/components/cards/card/card.component.html similarity index 100% rename from community/components/cards/card/card.component.html rename to src/community/components/cards/card/card.component.html diff --git a/community/components/cards/card/card.component.scss b/src/community/components/cards/card/card.component.scss similarity index 100% rename from community/components/cards/card/card.component.scss rename to src/community/components/cards/card/card.component.scss diff --git a/community/components/cards/card/card.component.ts b/src/community/components/cards/card/card.component.ts similarity index 100% rename from community/components/cards/card/card.component.ts rename to src/community/components/cards/card/card.component.ts diff --git a/community/components/cards/card/index.ts b/src/community/components/cards/card/index.ts similarity index 100% rename from community/components/cards/card/index.ts rename to src/community/components/cards/card/index.ts diff --git a/community/components/cards/card/stories/card-story-templates.ts b/src/community/components/cards/card/stories/card-story-templates.ts similarity index 100% rename from community/components/cards/card/stories/card-story-templates.ts rename to src/community/components/cards/card/stories/card-story-templates.ts diff --git a/community/components/cards/card/stories/card.stories.ts b/src/community/components/cards/card/stories/card.stories.ts similarity index 100% rename from community/components/cards/card/stories/card.stories.ts rename to src/community/components/cards/card/stories/card.stories.ts diff --git a/community/components/cards/index.ts b/src/community/components/cards/index.ts similarity index 100% rename from community/components/cards/index.ts rename to src/community/components/cards/index.ts diff --git a/community/components/form/checkbox/checkbox-card-group/checkbox-card-group.component.ts b/src/community/components/form/checkbox/checkbox-card-group/checkbox-card-group.component.ts similarity index 100% rename from community/components/form/checkbox/checkbox-card-group/checkbox-card-group.component.ts rename to src/community/components/form/checkbox/checkbox-card-group/checkbox-card-group.component.ts diff --git a/community/components/form/checkbox/checkbox-group/checkbox-group.component.html b/src/community/components/form/checkbox/checkbox-group/checkbox-group.component.html similarity index 100% rename from community/components/form/checkbox/checkbox-group/checkbox-group.component.html rename to src/community/components/form/checkbox/checkbox-group/checkbox-group.component.html diff --git a/community/components/form/checkbox/checkbox-group/checkbox-group.component.scss b/src/community/components/form/checkbox/checkbox-group/checkbox-group.component.scss similarity index 100% rename from community/components/form/checkbox/checkbox-group/checkbox-group.component.scss rename to src/community/components/form/checkbox/checkbox-group/checkbox-group.component.scss diff --git a/community/components/form/checkbox/checkbox-group/checkbox-group.component.ts b/src/community/components/form/checkbox/checkbox-group/checkbox-group.component.ts similarity index 100% rename from community/components/form/checkbox/checkbox-group/checkbox-group.component.ts rename to src/community/components/form/checkbox/checkbox-group/checkbox-group.component.ts diff --git a/community/components/form/checkbox/checkbox.stories.ts b/src/community/components/form/checkbox/checkbox.stories.ts similarity index 100% rename from community/components/form/checkbox/checkbox.stories.ts rename to src/community/components/form/checkbox/checkbox.stories.ts diff --git a/community/components/form/checkbox/checkbox/checkbox.component.html b/src/community/components/form/checkbox/checkbox/checkbox.component.html similarity index 100% rename from community/components/form/checkbox/checkbox/checkbox.component.html rename to src/community/components/form/checkbox/checkbox/checkbox.component.html diff --git a/community/components/form/checkbox/checkbox/checkbox.component.scss b/src/community/components/form/checkbox/checkbox/checkbox.component.scss similarity index 100% rename from community/components/form/checkbox/checkbox/checkbox.component.scss rename to src/community/components/form/checkbox/checkbox/checkbox.component.scss diff --git a/community/components/form/checkbox/checkbox/checkbox.component.ts b/src/community/components/form/checkbox/checkbox/checkbox.component.ts similarity index 100% rename from community/components/form/checkbox/checkbox/checkbox.component.ts rename to src/community/components/form/checkbox/checkbox/checkbox.component.ts diff --git a/community/components/form/checkbox/index.ts b/src/community/components/form/checkbox/index.ts similarity index 100% rename from community/components/form/checkbox/index.ts rename to src/community/components/form/checkbox/index.ts diff --git a/community/components/form/choicegroup/_choicegroup-card-mixins.scss b/src/community/components/form/choicegroup/_choicegroup-card-mixins.scss similarity index 100% rename from community/components/form/choicegroup/_choicegroup-card-mixins.scss rename to src/community/components/form/choicegroup/_choicegroup-card-mixins.scss diff --git a/community/components/form/choicegroup/choicegroup.directive.ts b/src/community/components/form/choicegroup/choicegroup.directive.ts similarity index 100% rename from community/components/form/choicegroup/choicegroup.directive.ts rename to src/community/components/form/choicegroup/choicegroup.directive.ts diff --git a/community/components/form/choicegroup/choicegroup.styles.scss b/src/community/components/form/choicegroup/choicegroup.styles.scss similarity index 100% rename from community/components/form/choicegroup/choicegroup.styles.scss rename to src/community/components/form/choicegroup/choicegroup.styles.scss diff --git a/community/components/form/file-dropzone/constants.ts b/src/community/components/form/file-dropzone/constants.ts similarity index 100% rename from community/components/form/file-dropzone/constants.ts rename to src/community/components/form/file-dropzone/constants.ts diff --git a/community/components/form/file-dropzone/file-dropzone.component.html b/src/community/components/form/file-dropzone/file-dropzone.component.html similarity index 100% rename from community/components/form/file-dropzone/file-dropzone.component.html rename to src/community/components/form/file-dropzone/file-dropzone.component.html diff --git a/community/components/form/file-dropzone/file-dropzone.component.scss b/src/community/components/form/file-dropzone/file-dropzone.component.scss similarity index 100% rename from community/components/form/file-dropzone/file-dropzone.component.scss rename to src/community/components/form/file-dropzone/file-dropzone.component.scss diff --git a/community/components/form/file-dropzone/file-dropzone.component.ts b/src/community/components/form/file-dropzone/file-dropzone.component.ts similarity index 100% rename from community/components/form/file-dropzone/file-dropzone.component.ts rename to src/community/components/form/file-dropzone/file-dropzone.component.ts diff --git a/community/components/form/file-dropzone/file-dropzone.react.scss b/src/community/components/form/file-dropzone/file-dropzone.react.scss similarity index 100% rename from community/components/form/file-dropzone/file-dropzone.react.scss rename to src/community/components/form/file-dropzone/file-dropzone.react.scss diff --git a/community/components/form/file-dropzone/file-dropzone.stories.ts b/src/community/components/form/file-dropzone/file-dropzone.stories.ts similarity index 98% rename from community/components/form/file-dropzone/file-dropzone.stories.ts rename to src/community/components/form/file-dropzone/file-dropzone.stories.ts index d88c94ad4..4251c1e7d 100644 --- a/community/components/form/file-dropzone/file-dropzone.stories.ts +++ b/src/community/components/form/file-dropzone/file-dropzone.stories.ts @@ -1,4 +1,4 @@ -import { ComponentInputs } from "tedi/types"; +import { ComponentInputs } from "../../../../tedi/types"; import { FileDropzoneComponent } from "./file-dropzone.component"; import { argsToTemplate, @@ -8,7 +8,7 @@ import { } from "@storybook/angular"; import { validateFileSize, validateFileType } from "./utils"; import { FormControl, FormGroup, ReactiveFormsModule } from "@angular/forms"; -import { ButtonComponent } from "tedi/components"; +import { ButtonComponent } from "../../../../tedi/components"; /** * FileDropzoneComponent is a component that allows users to drag and drop files or select them through a file input. diff --git a/community/components/form/file-dropzone/file.service.ts b/src/community/components/form/file-dropzone/file.service.ts similarity index 100% rename from community/components/form/file-dropzone/file.service.ts rename to src/community/components/form/file-dropzone/file.service.ts diff --git a/community/components/form/file-dropzone/index.ts b/src/community/components/form/file-dropzone/index.ts similarity index 100% rename from community/components/form/file-dropzone/index.ts rename to src/community/components/form/file-dropzone/index.ts diff --git a/community/components/form/file-dropzone/types.ts b/src/community/components/form/file-dropzone/types.ts similarity index 100% rename from community/components/form/file-dropzone/types.ts rename to src/community/components/form/file-dropzone/types.ts diff --git a/community/components/form/file-dropzone/utils.ts b/src/community/components/form/file-dropzone/utils.ts similarity index 100% rename from community/components/form/file-dropzone/utils.ts rename to src/community/components/form/file-dropzone/utils.ts diff --git a/community/components/form/form-field/form-field.component.scss b/src/community/components/form/form-field/form-field.component.scss similarity index 100% rename from community/components/form/form-field/form-field.component.scss rename to src/community/components/form/form-field/form-field.component.scss diff --git a/community/components/form/form-field/form-field.component.ts b/src/community/components/form/form-field/form-field.component.ts similarity index 100% rename from community/components/form/form-field/form-field.component.ts rename to src/community/components/form/form-field/form-field.component.ts diff --git a/community/components/form/form-field/form-field.stories.ts b/src/community/components/form/form-field/form-field.stories.ts similarity index 100% rename from community/components/form/form-field/form-field.stories.ts rename to src/community/components/form/form-field/form-field.stories.ts diff --git a/community/components/form/index.ts b/src/community/components/form/index.ts similarity index 100% rename from community/components/form/index.ts rename to src/community/components/form/index.ts diff --git a/community/components/form/input-group/input-group.component.html b/src/community/components/form/input-group/input-group.component.html similarity index 100% rename from community/components/form/input-group/input-group.component.html rename to src/community/components/form/input-group/input-group.component.html diff --git a/community/components/form/input-group/input-group.component.scss b/src/community/components/form/input-group/input-group.component.scss similarity index 100% rename from community/components/form/input-group/input-group.component.scss rename to src/community/components/form/input-group/input-group.component.scss diff --git a/community/components/form/input-group/input-group.component.ts b/src/community/components/form/input-group/input-group.component.ts similarity index 100% rename from community/components/form/input-group/input-group.component.ts rename to src/community/components/form/input-group/input-group.component.ts diff --git a/community/components/form/input-group/input-group.stories.ts b/src/community/components/form/input-group/input-group.stories.ts similarity index 99% rename from community/components/form/input-group/input-group.stories.ts rename to src/community/components/form/input-group/input-group.stories.ts index 9c1a1c7fe..788383939 100644 --- a/community/components/form/input-group/input-group.stories.ts +++ b/src/community/components/form/input-group/input-group.stories.ts @@ -10,7 +10,7 @@ import { FormsModule, ReactiveFormsModule, } from "@angular/forms"; -import { indexId } from "community/helpers/unique-id"; +import { indexId } from "../../../helpers/unique-id"; interface StoryArgs { disabled: boolean; diff --git a/community/components/form/input/input.component.scss b/src/community/components/form/input/input.component.scss similarity index 100% rename from community/components/form/input/input.component.scss rename to src/community/components/form/input/input.component.scss diff --git a/community/components/form/input/input.component.ts b/src/community/components/form/input/input.component.ts similarity index 100% rename from community/components/form/input/input.component.ts rename to src/community/components/form/input/input.component.ts diff --git a/community/components/form/input/textfield.stories.ts b/src/community/components/form/input/textfield.stories.ts similarity index 100% rename from community/components/form/input/textfield.stories.ts rename to src/community/components/form/input/textfield.stories.ts diff --git a/community/components/form/radio/index.ts b/src/community/components/form/radio/index.ts similarity index 100% rename from community/components/form/radio/index.ts rename to src/community/components/form/radio/index.ts diff --git a/community/components/form/radio/radio-card-group/radio-card-group.component.ts b/src/community/components/form/radio/radio-card-group/radio-card-group.component.ts similarity index 100% rename from community/components/form/radio/radio-card-group/radio-card-group.component.ts rename to src/community/components/form/radio/radio-card-group/radio-card-group.component.ts diff --git a/community/components/form/radio/radio-group/radio-group.component.html b/src/community/components/form/radio/radio-group/radio-group.component.html similarity index 100% rename from community/components/form/radio/radio-group/radio-group.component.html rename to src/community/components/form/radio/radio-group/radio-group.component.html diff --git a/community/components/form/radio/radio-group/radio-group.component.scss b/src/community/components/form/radio/radio-group/radio-group.component.scss similarity index 100% rename from community/components/form/radio/radio-group/radio-group.component.scss rename to src/community/components/form/radio/radio-group/radio-group.component.scss diff --git a/community/components/form/radio/radio-group/radio-group.component.ts b/src/community/components/form/radio/radio-group/radio-group.component.ts similarity index 100% rename from community/components/form/radio/radio-group/radio-group.component.ts rename to src/community/components/form/radio/radio-group/radio-group.component.ts diff --git a/community/components/form/radio/radio.stories.ts b/src/community/components/form/radio/radio.stories.ts similarity index 100% rename from community/components/form/radio/radio.stories.ts rename to src/community/components/form/radio/radio.stories.ts diff --git a/community/components/form/radio/radio/radio.component.html b/src/community/components/form/radio/radio/radio.component.html similarity index 100% rename from community/components/form/radio/radio/radio.component.html rename to src/community/components/form/radio/radio/radio.component.html diff --git a/community/components/form/radio/radio/radio.component.scss b/src/community/components/form/radio/radio/radio.component.scss similarity index 100% rename from community/components/form/radio/radio/radio.component.scss rename to src/community/components/form/radio/radio/radio.component.scss diff --git a/community/components/form/radio/radio/radio.component.ts b/src/community/components/form/radio/radio/radio.component.ts similarity index 100% rename from community/components/form/radio/radio/radio.component.ts rename to src/community/components/form/radio/radio/radio.component.ts diff --git a/community/components/form/search/search.component.html b/src/community/components/form/search/search.component.html similarity index 100% rename from community/components/form/search/search.component.html rename to src/community/components/form/search/search.component.html diff --git a/community/components/form/search/search.component.scss b/src/community/components/form/search/search.component.scss similarity index 100% rename from community/components/form/search/search.component.scss rename to src/community/components/form/search/search.component.scss diff --git a/community/components/form/search/search.component.ts b/src/community/components/form/search/search.component.ts similarity index 100% rename from community/components/form/search/search.component.ts rename to src/community/components/form/search/search.component.ts diff --git a/community/components/form/search/search.stories.ts b/src/community/components/form/search/search.stories.ts similarity index 100% rename from community/components/form/search/search.stories.ts rename to src/community/components/form/search/search.stories.ts diff --git a/community/components/form/select/index.ts b/src/community/components/form/select/index.ts similarity index 100% rename from community/components/form/select/index.ts rename to src/community/components/form/select/index.ts diff --git a/community/components/form/select/multiselect.component.html b/src/community/components/form/select/multiselect.component.html similarity index 100% rename from community/components/form/select/multiselect.component.html rename to src/community/components/form/select/multiselect.component.html diff --git a/community/components/form/select/multiselect.component.ts b/src/community/components/form/select/multiselect.component.ts similarity index 100% rename from community/components/form/select/multiselect.component.ts rename to src/community/components/form/select/multiselect.component.ts diff --git a/community/components/form/select/multiselect.stories.ts b/src/community/components/form/select/multiselect.stories.ts similarity index 100% rename from community/components/form/select/multiselect.stories.ts rename to src/community/components/form/select/multiselect.stories.ts diff --git a/community/components/form/select/select-option.component.ts b/src/community/components/form/select/select-option.component.ts similarity index 100% rename from community/components/form/select/select-option.component.ts rename to src/community/components/form/select/select-option.component.ts diff --git a/community/components/form/select/select.component.html b/src/community/components/form/select/select.component.html similarity index 100% rename from community/components/form/select/select.component.html rename to src/community/components/form/select/select.component.html diff --git a/community/components/form/select/select.component.scss b/src/community/components/form/select/select.component.scss similarity index 100% rename from community/components/form/select/select.component.scss rename to src/community/components/form/select/select.component.scss diff --git a/community/components/form/select/select.component.ts b/src/community/components/form/select/select.component.ts similarity index 100% rename from community/components/form/select/select.component.ts rename to src/community/components/form/select/select.component.ts diff --git a/community/components/form/select/select.stories.ts b/src/community/components/form/select/select.stories.ts similarity index 100% rename from community/components/form/select/select.stories.ts rename to src/community/components/form/select/select.stories.ts diff --git a/community/components/form/textarea/textarea.component.scss b/src/community/components/form/textarea/textarea.component.scss similarity index 100% rename from community/components/form/textarea/textarea.component.scss rename to src/community/components/form/textarea/textarea.component.scss diff --git a/community/components/form/textarea/textarea.component.ts b/src/community/components/form/textarea/textarea.component.ts similarity index 100% rename from community/components/form/textarea/textarea.component.ts rename to src/community/components/form/textarea/textarea.component.ts diff --git a/community/components/form/textarea/textarea.stories.ts b/src/community/components/form/textarea/textarea.stories.ts similarity index 100% rename from community/components/form/textarea/textarea.stories.ts rename to src/community/components/form/textarea/textarea.stories.ts diff --git a/community/components/helpers/index.ts b/src/community/components/helpers/index.ts similarity index 100% rename from community/components/helpers/index.ts rename to src/community/components/helpers/index.ts diff --git a/community/components/helpers/progress-bar/index.ts b/src/community/components/helpers/progress-bar/index.ts similarity index 100% rename from community/components/helpers/progress-bar/index.ts rename to src/community/components/helpers/progress-bar/index.ts diff --git a/community/components/helpers/progress-bar/progress-bar.component.html b/src/community/components/helpers/progress-bar/progress-bar.component.html similarity index 100% rename from community/components/helpers/progress-bar/progress-bar.component.html rename to src/community/components/helpers/progress-bar/progress-bar.component.html diff --git a/community/components/helpers/progress-bar/progress-bar.component.scss b/src/community/components/helpers/progress-bar/progress-bar.component.scss similarity index 100% rename from community/components/helpers/progress-bar/progress-bar.component.scss rename to src/community/components/helpers/progress-bar/progress-bar.component.scss diff --git a/community/components/helpers/progress-bar/progress-bar.component.ts b/src/community/components/helpers/progress-bar/progress-bar.component.ts similarity index 100% rename from community/components/helpers/progress-bar/progress-bar.component.ts rename to src/community/components/helpers/progress-bar/progress-bar.component.ts diff --git a/community/components/helpers/progress-bar/progress-bar.stories.ts b/src/community/components/helpers/progress-bar/progress-bar.stories.ts similarity index 100% rename from community/components/helpers/progress-bar/progress-bar.stories.ts rename to src/community/components/helpers/progress-bar/progress-bar.stories.ts diff --git a/community/components/navigation/breadcrumbs/breadcrumbs.component.html b/src/community/components/navigation/breadcrumbs/breadcrumbs.component.html similarity index 100% rename from community/components/navigation/breadcrumbs/breadcrumbs.component.html rename to src/community/components/navigation/breadcrumbs/breadcrumbs.component.html diff --git a/community/components/navigation/breadcrumbs/breadcrumbs.component.scss b/src/community/components/navigation/breadcrumbs/breadcrumbs.component.scss similarity index 100% rename from community/components/navigation/breadcrumbs/breadcrumbs.component.scss rename to src/community/components/navigation/breadcrumbs/breadcrumbs.component.scss diff --git a/community/components/navigation/breadcrumbs/breadcrumbs.component.spec.ts b/src/community/components/navigation/breadcrumbs/breadcrumbs.component.spec.ts similarity index 100% rename from community/components/navigation/breadcrumbs/breadcrumbs.component.spec.ts rename to src/community/components/navigation/breadcrumbs/breadcrumbs.component.spec.ts diff --git a/community/components/navigation/breadcrumbs/breadcrumbs.component.ts b/src/community/components/navigation/breadcrumbs/breadcrumbs.component.ts similarity index 100% rename from community/components/navigation/breadcrumbs/breadcrumbs.component.ts rename to src/community/components/navigation/breadcrumbs/breadcrumbs.component.ts diff --git a/community/components/navigation/breadcrumbs/breadcrumbs.stories.ts b/src/community/components/navigation/breadcrumbs/breadcrumbs.stories.ts similarity index 96% rename from community/components/navigation/breadcrumbs/breadcrumbs.stories.ts rename to src/community/components/navigation/breadcrumbs/breadcrumbs.stories.ts index 76324e312..70c988761 100644 --- a/community/components/navigation/breadcrumbs/breadcrumbs.stories.ts +++ b/src/community/components/navigation/breadcrumbs/breadcrumbs.stories.ts @@ -1,7 +1,7 @@ import { argsToTemplate, type Meta, type StoryObj } from "@storybook/angular"; import { BreadcrumbsComponent } from "./breadcrumbs.component"; -import { createBreakpointArgTypes } from "../../../../src/dev-tools/createBreakpointArgTypes"; +import { createBreakpointArgTypes } from "../../../../dev-tools/createBreakpointArgTypes"; /** * Figma ↗
* Breadcrumbs provide users with a clear path of where they are within the application. diff --git a/community/components/navigation/index.ts b/src/community/components/navigation/index.ts similarity index 100% rename from community/components/navigation/index.ts rename to src/community/components/navigation/index.ts diff --git a/community/components/navigation/pagination/pagination-page/pagination-page.component.html b/src/community/components/navigation/pagination/pagination-page/pagination-page.component.html similarity index 100% rename from community/components/navigation/pagination/pagination-page/pagination-page.component.html rename to src/community/components/navigation/pagination/pagination-page/pagination-page.component.html diff --git a/community/components/navigation/pagination/pagination-page/pagination-page.component.scss b/src/community/components/navigation/pagination/pagination-page/pagination-page.component.scss similarity index 100% rename from community/components/navigation/pagination/pagination-page/pagination-page.component.scss rename to src/community/components/navigation/pagination/pagination-page/pagination-page.component.scss diff --git a/community/components/navigation/pagination/pagination-page/pagination-page.component.ts b/src/community/components/navigation/pagination/pagination-page/pagination-page.component.ts similarity index 100% rename from community/components/navigation/pagination/pagination-page/pagination-page.component.ts rename to src/community/components/navigation/pagination/pagination-page/pagination-page.component.ts diff --git a/community/components/navigation/pagination/pagination.component.html b/src/community/components/navigation/pagination/pagination.component.html similarity index 100% rename from community/components/navigation/pagination/pagination.component.html rename to src/community/components/navigation/pagination/pagination.component.html diff --git a/community/components/navigation/pagination/pagination.component.scss b/src/community/components/navigation/pagination/pagination.component.scss similarity index 100% rename from community/components/navigation/pagination/pagination.component.scss rename to src/community/components/navigation/pagination/pagination.component.scss diff --git a/community/components/navigation/pagination/pagination.component.ts b/src/community/components/navigation/pagination/pagination.component.ts similarity index 100% rename from community/components/navigation/pagination/pagination.component.ts rename to src/community/components/navigation/pagination/pagination.component.ts diff --git a/community/components/navigation/pagination/pagination.stories.ts b/src/community/components/navigation/pagination/pagination.stories.ts similarity index 100% rename from community/components/navigation/pagination/pagination.stories.ts rename to src/community/components/navigation/pagination/pagination.stories.ts diff --git a/community/components/navigation/pagination/pagination.utils.ts b/src/community/components/navigation/pagination/pagination.utils.ts similarity index 100% rename from community/components/navigation/pagination/pagination.utils.ts rename to src/community/components/navigation/pagination/pagination.utils.ts diff --git a/community/components/navigation/table-of-contents/index.ts b/src/community/components/navigation/table-of-contents/index.ts similarity index 100% rename from community/components/navigation/table-of-contents/index.ts rename to src/community/components/navigation/table-of-contents/index.ts diff --git a/community/components/navigation/table-of-contents/table-of-contents-item/table-of-contents-item.component.html b/src/community/components/navigation/table-of-contents/table-of-contents-item/table-of-contents-item.component.html similarity index 100% rename from community/components/navigation/table-of-contents/table-of-contents-item/table-of-contents-item.component.html rename to src/community/components/navigation/table-of-contents/table-of-contents-item/table-of-contents-item.component.html diff --git a/community/components/navigation/table-of-contents/table-of-contents-item/table-of-contents-item.component.scss b/src/community/components/navigation/table-of-contents/table-of-contents-item/table-of-contents-item.component.scss similarity index 100% rename from community/components/navigation/table-of-contents/table-of-contents-item/table-of-contents-item.component.scss rename to src/community/components/navigation/table-of-contents/table-of-contents-item/table-of-contents-item.component.scss diff --git a/community/components/navigation/table-of-contents/table-of-contents-item/table-of-contents-item.component.ts b/src/community/components/navigation/table-of-contents/table-of-contents-item/table-of-contents-item.component.ts similarity index 100% rename from community/components/navigation/table-of-contents/table-of-contents-item/table-of-contents-item.component.ts rename to src/community/components/navigation/table-of-contents/table-of-contents-item/table-of-contents-item.component.ts diff --git a/community/components/navigation/table-of-contents/table-of-contents-nested-wrapper.component.ts b/src/community/components/navigation/table-of-contents/table-of-contents-nested-wrapper.component.ts similarity index 100% rename from community/components/navigation/table-of-contents/table-of-contents-nested-wrapper.component.ts rename to src/community/components/navigation/table-of-contents/table-of-contents-nested-wrapper.component.ts diff --git a/community/components/navigation/table-of-contents/table-of-contents.component.html b/src/community/components/navigation/table-of-contents/table-of-contents.component.html similarity index 100% rename from community/components/navigation/table-of-contents/table-of-contents.component.html rename to src/community/components/navigation/table-of-contents/table-of-contents.component.html diff --git a/community/components/navigation/table-of-contents/table-of-contents.component.scss b/src/community/components/navigation/table-of-contents/table-of-contents.component.scss similarity index 100% rename from community/components/navigation/table-of-contents/table-of-contents.component.scss rename to src/community/components/navigation/table-of-contents/table-of-contents.component.scss diff --git a/community/components/navigation/table-of-contents/table-of-contents.component.ts b/src/community/components/navigation/table-of-contents/table-of-contents.component.ts similarity index 100% rename from community/components/navigation/table-of-contents/table-of-contents.component.ts rename to src/community/components/navigation/table-of-contents/table-of-contents.component.ts diff --git a/community/components/navigation/table-of-contents/table-of-contents.stories.ts b/src/community/components/navigation/table-of-contents/table-of-contents.stories.ts similarity index 100% rename from community/components/navigation/table-of-contents/table-of-contents.stories.ts rename to src/community/components/navigation/table-of-contents/table-of-contents.stories.ts diff --git a/community/components/navigation/tabs/index.ts b/src/community/components/navigation/tabs/index.ts similarity index 100% rename from community/components/navigation/tabs/index.ts rename to src/community/components/navigation/tabs/index.ts diff --git a/community/components/navigation/tabs/tab-content/tab-content.component.html b/src/community/components/navigation/tabs/tab-content/tab-content.component.html similarity index 100% rename from community/components/navigation/tabs/tab-content/tab-content.component.html rename to src/community/components/navigation/tabs/tab-content/tab-content.component.html diff --git a/community/components/navigation/tabs/tab-content/tab-content.component.ts b/src/community/components/navigation/tabs/tab-content/tab-content.component.ts similarity index 100% rename from community/components/navigation/tabs/tab-content/tab-content.component.ts rename to src/community/components/navigation/tabs/tab-content/tab-content.component.ts diff --git a/community/components/navigation/tabs/tab/tab.component.html b/src/community/components/navigation/tabs/tab/tab.component.html similarity index 100% rename from community/components/navigation/tabs/tab/tab.component.html rename to src/community/components/navigation/tabs/tab/tab.component.html diff --git a/community/components/navigation/tabs/tab/tab.component.scss b/src/community/components/navigation/tabs/tab/tab.component.scss similarity index 100% rename from community/components/navigation/tabs/tab/tab.component.scss rename to src/community/components/navigation/tabs/tab/tab.component.scss diff --git a/community/components/navigation/tabs/tab/tab.component.ts b/src/community/components/navigation/tabs/tab/tab.component.ts similarity index 100% rename from community/components/navigation/tabs/tab/tab.component.ts rename to src/community/components/navigation/tabs/tab/tab.component.ts diff --git a/community/components/navigation/tabs/tabs.component.html b/src/community/components/navigation/tabs/tabs.component.html similarity index 100% rename from community/components/navigation/tabs/tabs.component.html rename to src/community/components/navigation/tabs/tabs.component.html diff --git a/community/components/navigation/tabs/tabs.component.scss b/src/community/components/navigation/tabs/tabs.component.scss similarity index 100% rename from community/components/navigation/tabs/tabs.component.scss rename to src/community/components/navigation/tabs/tabs.component.scss diff --git a/community/components/navigation/tabs/tabs.component.ts b/src/community/components/navigation/tabs/tabs.component.ts similarity index 100% rename from community/components/navigation/tabs/tabs.component.ts rename to src/community/components/navigation/tabs/tabs.component.ts diff --git a/community/components/navigation/tabs/tabs.stories.ts b/src/community/components/navigation/tabs/tabs.stories.ts similarity index 100% rename from community/components/navigation/tabs/tabs.stories.ts rename to src/community/components/navigation/tabs/tabs.stories.ts diff --git a/community/components/navigation/vertical-stepper/index.ts b/src/community/components/navigation/vertical-stepper/index.ts similarity index 100% rename from community/components/navigation/vertical-stepper/index.ts rename to src/community/components/navigation/vertical-stepper/index.ts diff --git a/community/components/navigation/vertical-stepper/vertical-stepper-item/vertical-stepper-item.component.html b/src/community/components/navigation/vertical-stepper/vertical-stepper-item/vertical-stepper-item.component.html similarity index 100% rename from community/components/navigation/vertical-stepper/vertical-stepper-item/vertical-stepper-item.component.html rename to src/community/components/navigation/vertical-stepper/vertical-stepper-item/vertical-stepper-item.component.html diff --git a/community/components/navigation/vertical-stepper/vertical-stepper-item/vertical-stepper-item.component.scss b/src/community/components/navigation/vertical-stepper/vertical-stepper-item/vertical-stepper-item.component.scss similarity index 100% rename from community/components/navigation/vertical-stepper/vertical-stepper-item/vertical-stepper-item.component.scss rename to src/community/components/navigation/vertical-stepper/vertical-stepper-item/vertical-stepper-item.component.scss diff --git a/community/components/navigation/vertical-stepper/vertical-stepper-item/vertical-stepper-item.component.ts b/src/community/components/navigation/vertical-stepper/vertical-stepper-item/vertical-stepper-item.component.ts similarity index 100% rename from community/components/navigation/vertical-stepper/vertical-stepper-item/vertical-stepper-item.component.ts rename to src/community/components/navigation/vertical-stepper/vertical-stepper-item/vertical-stepper-item.component.ts diff --git a/community/components/navigation/vertical-stepper/vertical-stepper.component.html b/src/community/components/navigation/vertical-stepper/vertical-stepper.component.html similarity index 100% rename from community/components/navigation/vertical-stepper/vertical-stepper.component.html rename to src/community/components/navigation/vertical-stepper/vertical-stepper.component.html diff --git a/community/components/navigation/vertical-stepper/vertical-stepper.component.scss b/src/community/components/navigation/vertical-stepper/vertical-stepper.component.scss similarity index 100% rename from community/components/navigation/vertical-stepper/vertical-stepper.component.scss rename to src/community/components/navigation/vertical-stepper/vertical-stepper.component.scss diff --git a/community/components/navigation/vertical-stepper/vertical-stepper.component.ts b/src/community/components/navigation/vertical-stepper/vertical-stepper.component.ts similarity index 100% rename from community/components/navigation/vertical-stepper/vertical-stepper.component.ts rename to src/community/components/navigation/vertical-stepper/vertical-stepper.component.ts diff --git a/community/components/navigation/vertical-stepper/vertical-stepper.stories.ts b/src/community/components/navigation/vertical-stepper/vertical-stepper.stories.ts similarity index 100% rename from community/components/navigation/vertical-stepper/vertical-stepper.stories.ts rename to src/community/components/navigation/vertical-stepper/vertical-stepper.stories.ts diff --git a/community/components/overlay/dropdown-item/dropdown-item.component.scss b/src/community/components/overlay/dropdown-item/dropdown-item.component.scss similarity index 100% rename from community/components/overlay/dropdown-item/dropdown-item.component.scss rename to src/community/components/overlay/dropdown-item/dropdown-item.component.scss diff --git a/community/components/overlay/dropdown-item/dropdown-item.component.ts b/src/community/components/overlay/dropdown-item/dropdown-item.component.ts similarity index 100% rename from community/components/overlay/dropdown-item/dropdown-item.component.ts rename to src/community/components/overlay/dropdown-item/dropdown-item.component.ts diff --git a/community/components/overlay/dropdown-item/dropdown-item.stories.ts b/src/community/components/overlay/dropdown-item/dropdown-item.stories.ts similarity index 100% rename from community/components/overlay/dropdown-item/dropdown-item.stories.ts rename to src/community/components/overlay/dropdown-item/dropdown-item.stories.ts diff --git a/community/components/overlay/dropdown/dropdown-trigger/dropdown-trigger.directive.ts b/src/community/components/overlay/dropdown/dropdown-trigger/dropdown-trigger.directive.ts similarity index 100% rename from community/components/overlay/dropdown/dropdown-trigger/dropdown-trigger.directive.ts rename to src/community/components/overlay/dropdown/dropdown-trigger/dropdown-trigger.directive.ts diff --git a/community/components/overlay/dropdown/dropdown.component.html b/src/community/components/overlay/dropdown/dropdown.component.html similarity index 100% rename from community/components/overlay/dropdown/dropdown.component.html rename to src/community/components/overlay/dropdown/dropdown.component.html diff --git a/community/components/overlay/dropdown/dropdown.component.scss b/src/community/components/overlay/dropdown/dropdown.component.scss similarity index 100% rename from community/components/overlay/dropdown/dropdown.component.scss rename to src/community/components/overlay/dropdown/dropdown.component.scss diff --git a/community/components/overlay/dropdown/dropdown.component.ts b/src/community/components/overlay/dropdown/dropdown.component.ts similarity index 100% rename from community/components/overlay/dropdown/dropdown.component.ts rename to src/community/components/overlay/dropdown/dropdown.component.ts diff --git a/community/components/overlay/dropdown/dropdown.stories.ts b/src/community/components/overlay/dropdown/dropdown.stories.ts similarity index 100% rename from community/components/overlay/dropdown/dropdown.stories.ts rename to src/community/components/overlay/dropdown/dropdown.stories.ts diff --git a/community/components/overlay/index.ts b/src/community/components/overlay/index.ts similarity index 100% rename from community/components/overlay/index.ts rename to src/community/components/overlay/index.ts diff --git a/community/components/overlay/modal/footer/modal-footer.component.html b/src/community/components/overlay/modal/footer/modal-footer.component.html similarity index 100% rename from community/components/overlay/modal/footer/modal-footer.component.html rename to src/community/components/overlay/modal/footer/modal-footer.component.html diff --git a/community/components/overlay/modal/footer/modal-footer.component.scss b/src/community/components/overlay/modal/footer/modal-footer.component.scss similarity index 100% rename from community/components/overlay/modal/footer/modal-footer.component.scss rename to src/community/components/overlay/modal/footer/modal-footer.component.scss diff --git a/community/components/overlay/modal/footer/modal-footer.component.ts b/src/community/components/overlay/modal/footer/modal-footer.component.ts similarity index 100% rename from community/components/overlay/modal/footer/modal-footer.component.ts rename to src/community/components/overlay/modal/footer/modal-footer.component.ts diff --git a/community/components/overlay/modal/header/modal-header.component.html b/src/community/components/overlay/modal/header/modal-header.component.html similarity index 100% rename from community/components/overlay/modal/header/modal-header.component.html rename to src/community/components/overlay/modal/header/modal-header.component.html diff --git a/community/components/overlay/modal/header/modal-header.component.scss b/src/community/components/overlay/modal/header/modal-header.component.scss similarity index 100% rename from community/components/overlay/modal/header/modal-header.component.scss rename to src/community/components/overlay/modal/header/modal-header.component.scss diff --git a/community/components/overlay/modal/header/modal-header.component.ts b/src/community/components/overlay/modal/header/modal-header.component.ts similarity index 100% rename from community/components/overlay/modal/header/modal-header.component.ts rename to src/community/components/overlay/modal/header/modal-header.component.ts diff --git a/community/components/overlay/modal/index.ts b/src/community/components/overlay/modal/index.ts similarity index 100% rename from community/components/overlay/modal/index.ts rename to src/community/components/overlay/modal/index.ts diff --git a/community/components/overlay/modal/modal.component.html b/src/community/components/overlay/modal/modal.component.html similarity index 100% rename from community/components/overlay/modal/modal.component.html rename to src/community/components/overlay/modal/modal.component.html diff --git a/community/components/overlay/modal/modal.component.scss b/src/community/components/overlay/modal/modal.component.scss similarity index 100% rename from community/components/overlay/modal/modal.component.scss rename to src/community/components/overlay/modal/modal.component.scss diff --git a/community/components/overlay/modal/modal.component.ts b/src/community/components/overlay/modal/modal.component.ts similarity index 100% rename from community/components/overlay/modal/modal.component.ts rename to src/community/components/overlay/modal/modal.component.ts diff --git a/community/components/overlay/modal/modal.stories.ts b/src/community/components/overlay/modal/modal.stories.ts similarity index 99% rename from community/components/overlay/modal/modal.stories.ts rename to src/community/components/overlay/modal/modal.stories.ts index d5b97a5bd..d7d180cba 100644 --- a/community/components/overlay/modal/modal.stories.ts +++ b/src/community/components/overlay/modal/modal.stories.ts @@ -4,7 +4,7 @@ import { ButtonComponent, FeedbackTextComponent, LabelComponent, -} from "tedi/components"; +} from "../../../../tedi/components"; import { Dialog } from "@angular/cdk/dialog"; import { DialogData, diff --git a/community/components/table/index.ts b/src/community/components/table/index.ts similarity index 100% rename from community/components/table/index.ts rename to src/community/components/table/index.ts diff --git a/community/components/table/table-styles.stories.ts b/src/community/components/table/table-styles.stories.ts similarity index 100% rename from community/components/table/table-styles.stories.ts rename to src/community/components/table/table-styles.stories.ts diff --git a/community/components/table/table-styles/table-styles.component.html b/src/community/components/table/table-styles/table-styles.component.html similarity index 100% rename from community/components/table/table-styles/table-styles.component.html rename to src/community/components/table/table-styles/table-styles.component.html diff --git a/community/components/table/table-styles/table-styles.component.scss b/src/community/components/table/table-styles/table-styles.component.scss similarity index 100% rename from community/components/table/table-styles/table-styles.component.scss rename to src/community/components/table/table-styles/table-styles.component.scss diff --git a/community/components/table/table-styles/table-styles.component.ts b/src/community/components/table/table-styles/table-styles.component.ts similarity index 100% rename from community/components/table/table-styles/table-styles.component.ts rename to src/community/components/table/table-styles/table-styles.component.ts diff --git a/community/components/tags/index.ts b/src/community/components/tags/index.ts similarity index 100% rename from community/components/tags/index.ts rename to src/community/components/tags/index.ts diff --git a/community/components/tags/status-badge/status-badge.component.html b/src/community/components/tags/status-badge/status-badge.component.html similarity index 100% rename from community/components/tags/status-badge/status-badge.component.html rename to src/community/components/tags/status-badge/status-badge.component.html diff --git a/community/components/tags/status-badge/status-badge.component.scss b/src/community/components/tags/status-badge/status-badge.component.scss similarity index 100% rename from community/components/tags/status-badge/status-badge.component.scss rename to src/community/components/tags/status-badge/status-badge.component.scss diff --git a/community/components/tags/status-badge/status-badge.component.ts b/src/community/components/tags/status-badge/status-badge.component.ts similarity index 100% rename from community/components/tags/status-badge/status-badge.component.ts rename to src/community/components/tags/status-badge/status-badge.component.ts diff --git a/community/components/tags/status-badge/status-badge.stories.ts b/src/community/components/tags/status-badge/status-badge.stories.ts similarity index 100% rename from community/components/tags/status-badge/status-badge.stories.ts rename to src/community/components/tags/status-badge/status-badge.stories.ts diff --git a/community/components/tags/tag/tag.component.html b/src/community/components/tags/tag/tag.component.html similarity index 100% rename from community/components/tags/tag/tag.component.html rename to src/community/components/tags/tag/tag.component.html diff --git a/community/components/tags/tag/tag.component.scss b/src/community/components/tags/tag/tag.component.scss similarity index 100% rename from community/components/tags/tag/tag.component.scss rename to src/community/components/tags/tag/tag.component.scss diff --git a/community/components/tags/tag/tag.component.ts b/src/community/components/tags/tag/tag.component.ts similarity index 100% rename from community/components/tags/tag/tag.component.ts rename to src/community/components/tags/tag/tag.component.ts diff --git a/community/components/tags/tag/tag.stories.ts b/src/community/components/tags/tag/tag.stories.ts similarity index 100% rename from community/components/tags/tag/tag.stories.ts rename to src/community/components/tags/tag/tag.stories.ts diff --git a/community/helpers/unique-id.ts b/src/community/helpers/unique-id.ts similarity index 100% rename from community/helpers/unique-id.ts rename to src/community/helpers/unique-id.ts diff --git a/community/index.ts b/src/community/index.ts similarity index 100% rename from community/index.ts rename to src/community/index.ts diff --git a/src/community/ng-package.json b/src/community/ng-package.json new file mode 100644 index 000000000..7e82164ba --- /dev/null +++ b/src/community/ng-package.json @@ -0,0 +1,6 @@ +{ + "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "index.ts" + } +} diff --git a/ng-package.json b/src/ng-package.json similarity index 61% rename from ng-package.json rename to src/ng-package.json index 558888fcc..bfc94cd91 100644 --- a/ng-package.json +++ b/src/ng-package.json @@ -1,6 +1,6 @@ { - "$schema": "./node_modules/ng-packagr/ng-package.schema.json", - "dest": "./dist", + "$schema": "../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../dist", "lib": { "entryFile": "public-api.ts" }, diff --git a/src/package.json b/src/package.json new file mode 100644 index 000000000..a940b3611 --- /dev/null +++ b/src/package.json @@ -0,0 +1,30 @@ +{ + "name": "@tedi-design-system/angular", + "version": "0.0.0-semantic-version", + "type": "module", + "main": "community.mjs", + "module": "community.mjs", + "exports": { + "./index.css": { + "default": "./index.css" + } + }, + "peerDependencies": { + "@angular/cdk": "^20.0.0 || ^21.0.0 || ^22.0.0", + "@angular/common": "^20.0.0 || ^21.0.0 || ^22.0.0", + "@angular/core": "^20.0.0 || ^21.0.0 || ^22.0.0", + "@angular/forms": "^20.0.0 || ^21.0.0 || ^22.0.0", + "@angular/platform-browser": "^20.0.0 || ^21.0.0 || ^22.0.0" + }, + "dependencies": { + "@tanstack/angular-table": "^8.21.4", + "@tedi-design-system/core": "^6.2.1" + }, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/TEDI-Design-System/angular.git" + } +} diff --git a/public-api.ts b/src/public-api.ts similarity index 100% rename from public-api.ts rename to src/public-api.ts diff --git a/src/tedi/components/base/icon/icon.component.html b/src/tedi/components/base/icon/icon.component.html new file mode 100644 index 000000000..39fa47b05 --- /dev/null +++ b/src/tedi/components/base/icon/icon.component.html @@ -0,0 +1 @@ +{{ name() }} diff --git a/tedi/components/base/icon/icon.component.scss b/src/tedi/components/base/icon/icon.component.scss similarity index 100% rename from tedi/components/base/icon/icon.component.scss rename to src/tedi/components/base/icon/icon.component.scss diff --git a/tedi/components/base/icon/icon.component.spec.ts b/src/tedi/components/base/icon/icon.component.spec.ts similarity index 99% rename from tedi/components/base/icon/icon.component.spec.ts rename to src/tedi/components/base/icon/icon.component.spec.ts index e368f6ae7..0f9fd59c2 100644 --- a/tedi/components/base/icon/icon.component.spec.ts +++ b/src/tedi/components/base/icon/icon.component.spec.ts @@ -86,7 +86,7 @@ describe("IconComponent", () => { "warning-dark", "danger", "white", - "inherit" + "inherit", ]; for (const color of colors) { diff --git a/tedi/components/base/icon/icon.component.ts b/src/tedi/components/base/icon/icon.component.ts similarity index 93% rename from tedi/components/base/icon/icon.component.ts rename to src/tedi/components/base/icon/icon.component.ts index 57ab46fb4..551c3d5e4 100644 --- a/tedi/components/base/icon/icon.component.ts +++ b/src/tedi/components/base/icon/icon.component.ts @@ -51,10 +51,10 @@ export type IconBackgroundColor = "[class]": "classes()", "[style.--_tedi-icon-size]": "iconSizeVar()", "[style.--_tedi-icon-bg-padding]": "iconBgPadding()", - "role": "img", + role: "img", "[attr.aria-label]": "label()", - "[attr.aria-hidden]": "!label()" - } + "[attr.aria-hidden]": "!label()", + }, }) export class IconComponent { /** @@ -101,8 +101,8 @@ export class IconComponent { if (this.background()) { const bgSize = size !== undefined && - size !== "inherit" && - ICON_WITH_BACKGROUND.includes(size) + size !== "inherit" && + ICON_WITH_BACKGROUND.includes(size) ? size : 24; return `var(--${ICON_SIZE_TOKENS[bgSize]})`; @@ -122,7 +122,9 @@ export class IconComponent { const size = this.size(); const bgSize = - size !== undefined && size !== "inherit" && ICON_WITH_BACKGROUND.includes(size) + size !== undefined && + size !== "inherit" && + ICON_WITH_BACKGROUND.includes(size) ? size : 24; diff --git a/tedi/components/base/icon/icon.stories.ts b/src/tedi/components/base/icon/icon.stories.ts similarity index 99% rename from tedi/components/base/icon/icon.stories.ts rename to src/tedi/components/base/icon/icon.stories.ts index 8edd2782c..034e23a9f 100644 --- a/tedi/components/base/icon/icon.stories.ts +++ b/src/tedi/components/base/icon/icon.stories.ts @@ -20,7 +20,7 @@ const COLORS = [ "warning-dark", "danger", "white", - "inherit" + "inherit", ]; const BACKGROUNDS = [ "primary", diff --git a/tedi/components/base/index.ts b/src/tedi/components/base/index.ts similarity index 50% rename from tedi/components/base/index.ts rename to src/tedi/components/base/index.ts index 8064bb9ac..85042f047 100644 --- a/tedi/components/base/index.ts +++ b/src/tedi/components/base/index.ts @@ -1,2 +1,2 @@ export * from "./icon/icon.component"; -export * from "./text/text.component"; \ No newline at end of file +export * from "./text/text.component"; diff --git a/tedi/components/content/card/card-content/card-content.component.html b/src/tedi/components/base/text/text.component.html similarity index 100% rename from tedi/components/content/card/card-content/card-content.component.html rename to src/tedi/components/base/text/text.component.html diff --git a/tedi/components/base/text/text.component.spec.ts b/src/tedi/components/base/text/text.component.spec.ts similarity index 95% rename from tedi/components/base/text/text.component.spec.ts rename to src/tedi/components/base/text/text.component.spec.ts index 2dc103655..2a1a98fb9 100644 --- a/tedi/components/base/text/text.component.spec.ts +++ b/src/tedi/components/base/text/text.component.spec.ts @@ -8,7 +8,7 @@ describe("TextComponent", () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [TextComponent], - }) + }); fixture = TestBed.createComponent(TextComponent); textElement = fixture.nativeElement; @@ -58,8 +58,15 @@ describe("TextComponent", () => { }); it("should apply heading modifiers correctly", () => { - const headingModifiers: TextModifiers[] = ["h1", "h2", "h3", "h4", "h5", "h6"]; - + const headingModifiers: TextModifiers[] = [ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + ]; + for (const heading of headingModifiers) { fixture.componentRef.setInput("modifiers", heading); fixture.detectChanges(); diff --git a/tedi/components/base/text/text.component.ts b/src/tedi/components/base/text/text.component.ts similarity index 100% rename from tedi/components/base/text/text.component.ts rename to src/tedi/components/base/text/text.component.ts diff --git a/tedi/components/base/text/text.stories.ts b/src/tedi/components/base/text/text.stories.ts similarity index 100% rename from tedi/components/base/text/text.stories.ts rename to src/tedi/components/base/text/text.stories.ts diff --git a/tedi/components/buttons/button-group/button-group-button/button-group-button.directive.ts b/src/tedi/components/buttons/button-group/button-group-button/button-group-button.directive.ts similarity index 98% rename from tedi/components/buttons/button-group/button-group-button/button-group-button.directive.ts rename to src/tedi/components/buttons/button-group/button-group-button/button-group-button.directive.ts index a1b6ea6b0..71f18fae4 100644 --- a/tedi/components/buttons/button-group/button-group-button/button-group-button.directive.ts +++ b/src/tedi/components/buttons/button-group/button-group-button/button-group-button.directive.ts @@ -15,10 +15,7 @@ import { } from "@angular/core"; import { IconComponent } from "../../../base/icon/icon.component"; import { BaseButtonDirective } from "../../button/base-button.directive"; -import { - ButtonSize, - ButtonVariant, -} from "../../button/button.component"; +import { ButtonSize, ButtonVariant } from "../../button/button.component"; import { ButtonGroupComponent } from "../button-group.component"; type IconSlot = "left" | "right" | "only"; diff --git a/tedi/components/buttons/button-group/button-group-button/index.ts b/src/tedi/components/buttons/button-group/button-group-button/index.ts similarity index 100% rename from tedi/components/buttons/button-group/button-group-button/index.ts rename to src/tedi/components/buttons/button-group/button-group-button/index.ts diff --git a/tedi/components/buttons/button-group/button-group.component.html b/src/tedi/components/buttons/button-group/button-group.component.html similarity index 67% rename from tedi/components/buttons/button-group/button-group.component.html rename to src/tedi/components/buttons/button-group/button-group.component.html index d9a743b70..43d28706c 100644 --- a/tedi/components/buttons/button-group/button-group.component.html +++ b/src/tedi/components/buttons/button-group/button-group.component.html @@ -1,7 +1,11 @@ @if (isDropdownMode()) { - + +
-
{{ ctx.row.original.name }}
+
+ {{ ctx.row.original.name }} +
- {{ ctx.row.original.specialty }} · {{ ctx.row.original.location }} + {{ ctx.row.original.specialty }} · + {{ ctx.row.original.location }}
- - @@ -3667,7 +3720,12 @@ class WithFooterStoryHostComponent extends TableStoryHostBase { salaryFooterTpl = viewChild>("salaryFooter"); columns = computed[]>(() => [ - { id: "name", header: "Name", accessorKey: "name", footer: `${people.length} people` }, + { + id: "name", + header: "Name", + accessorKey: "name", + footer: `${people.length} people`, + }, { id: "role", header: "Role", accessorKey: "role" }, { id: "location", header: "Location", accessorKey: "location" }, { @@ -3774,11 +3832,13 @@ export const WithColumnsMenu: Story = { selector: "tedi-reorderable-rows-story", imports: [TediTableComponent], template: ` -
+ " + >

Reorder rows two ways — both emit (rowDrop); this story applies it with CDK's moveItemInArray and pipes the new @@ -3790,8 +3850,8 @@ export const WithColumnsMenu: Story = { Keyboard: Tab to a row's handle, Space/Enter to pick it up, / to move (within the page), - Space/Enter to drop, - Escape to cancel. + Space/Enter to drop, Escape to + cancel.

@@ -3868,11 +3928,13 @@ export const ReorderableRows: Story = { selector: "tedi-reorderable-columns-story", imports: [TediTableComponent], template: ` -
+ " + >

Reorder columns two ways — both update the table's own columnOrder state internally: @@ -3882,9 +3944,10 @@ export const ReorderableRows: Story = {

  • Keyboard: Tab to a header, Space/Enter to pick it up, - / to move, - Space/Enter to drop, - Escape to cancel. + / to move, Space/Enter + to drop, Escape to cancel.
  • Persist the order across reloads by adding 'columnOrder' to @@ -3927,7 +3990,7 @@ export const ReorderableColumns: Story = { "a header, `Space`/`Enter` to pick up, Left/Right to move, " + "`Space`/`Enter` to drop, `Escape` to cancel. Both update the table's " + "own `columnOrder` state internally. The picked-up cell gets " + - "`aria-pressed=\"true\"` and a primary highlight, and a live region " + + '`aria-pressed="true"` and a primary highlight, and a live region ' + "announces pickup, drop, and cancel for screen readers.", }, source: { @@ -3969,13 +4032,16 @@ export const ReorderableColumns: Story = {

    Wiring it up in your app -
    {{ snippet }}
    + " + >{{ snippet }}
    ` inside " + "``. The table captures the template and routes it to " + "whichever paginator slot is currently displaying results.", @@ -4326,9 +4392,9 @@ export const PaginationFullyConfigured: Story = { ], template: `

    - Resize the viewport across the md breakpoint to - see the email / role / location columns collapse into an expandable - sub-row. The expand column itself only appears below the breakpoint. + Resize the viewport across the md breakpoint to see the email + / role / location columns collapse into an expandable sub-row. The expand + column itself only appears below the breakpoint.

    { * spanning via the `rowSpan` callback and a one-flag opt-in to the built-in * sort affordance via `sortable`. */ -export type TediColumnDef = ColumnDef & { +export type TediColumnDef = ColumnDef< + TData, + TValue +> & { /** * Body-level row spanning. Return `>1` to emit `rowspan="N"` and skip the * next `N-1` rows in this column; return `0` to skip rendering the cell diff --git a/tedi/components/content/text-group/index.ts b/src/tedi/components/content/text-group/index.ts similarity index 100% rename from tedi/components/content/text-group/index.ts rename to src/tedi/components/content/text-group/index.ts diff --git a/tedi/components/content/text-group/text-group-label.component.ts b/src/tedi/components/content/text-group/text-group-label.component.ts similarity index 100% rename from tedi/components/content/text-group/text-group-label.component.ts rename to src/tedi/components/content/text-group/text-group-label.component.ts diff --git a/tedi/components/content/text-group/text-group-value.component.ts b/src/tedi/components/content/text-group/text-group-value.component.ts similarity index 100% rename from tedi/components/content/text-group/text-group-value.component.ts rename to src/tedi/components/content/text-group/text-group-value.component.ts diff --git a/tedi/components/content/text-group/text-group.component.html b/src/tedi/components/content/text-group/text-group.component.html similarity index 100% rename from tedi/components/content/text-group/text-group.component.html rename to src/tedi/components/content/text-group/text-group.component.html diff --git a/tedi/components/content/text-group/text-group.component.scss b/src/tedi/components/content/text-group/text-group.component.scss similarity index 100% rename from tedi/components/content/text-group/text-group.component.scss rename to src/tedi/components/content/text-group/text-group.component.scss diff --git a/tedi/components/content/text-group/text-group.component.spec.ts b/src/tedi/components/content/text-group/text-group.component.spec.ts similarity index 100% rename from tedi/components/content/text-group/text-group.component.spec.ts rename to src/tedi/components/content/text-group/text-group.component.spec.ts diff --git a/tedi/components/content/text-group/text-group.component.ts b/src/tedi/components/content/text-group/text-group.component.ts similarity index 88% rename from tedi/components/content/text-group/text-group.component.ts rename to src/tedi/components/content/text-group/text-group.component.ts index 748f0443c..97144d1cb 100644 --- a/tedi/components/content/text-group/text-group.component.ts +++ b/src/tedi/components/content/text-group/text-group.component.ts @@ -35,18 +35,20 @@ export type TextGroupInputs = { selector: "tedi-text-group", templateUrl: "./text-group.component.html", styleUrl: "./text-group.component.scss", - imports: [ - LabelComponent - ], + imports: [LabelComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) -export class TextGroupComponent implements BreakpointInputs, AfterContentChecked { +export class TextGroupComponent + implements BreakpointInputs, AfterContentChecked +{ type = input("horizontal"); labelWidth = input(); breakpointService = inject(BreakpointService); - readonly textGroupLabel = contentChild(TextGroupLabelComponent, { read: ElementRef }); + readonly textGroupLabel = contentChild(TextGroupLabelComponent, { + read: ElementRef, + }); readonly labelText = signal(null); xs = input(); @@ -72,9 +74,9 @@ export class TextGroupComponent implements BreakpointInputs, Af classes = computed(() => { const { type, labelWidth } = this.breakpointInputs(); - const classList = ['tedi-text-group', `tedi-text-group--${type}`]; + const classList = ["tedi-text-group", `tedi-text-group--${type}`]; if (labelWidth) { - classList.push('tedi-text-group--fixed-label'); + classList.push("tedi-text-group--fixed-label"); } return classList.join(" "); }); diff --git a/tedi/components/content/text-group/text-group.stories.ts b/src/tedi/components/content/text-group/text-group.stories.ts similarity index 97% rename from tedi/components/content/text-group/text-group.stories.ts rename to src/tedi/components/content/text-group/text-group.stories.ts index b199721cb..bd772226e 100644 --- a/tedi/components/content/text-group/text-group.stories.ts +++ b/src/tedi/components/content/text-group/text-group.stories.ts @@ -11,7 +11,7 @@ import { TextGroupComponent } from "./text-group.component"; import { IconComponent } from "../../base/icon/icon.component"; import { RowComponent } from "../../helpers/grid/row/row.component"; import { VerticalSpacingDirective } from "../../../directives/vertical-spacing/vertical-spacing.directive"; -import { createBreakpointArgTypes } from "../../../../src/dev-tools/createBreakpointArgTypes"; +import { createBreakpointArgTypes } from "../../../../dev-tools/createBreakpointArgTypes"; import { StatusBadgeComponent } from "@tedi-design-system/angular/community"; /** @@ -39,7 +39,7 @@ export default { TextGroupValueComponent, IconComponent, RowComponent, - StatusBadgeComponent + StatusBadgeComponent, ], }), ], @@ -92,7 +92,7 @@ export const Types: Story = { type: "vertical", label: "Nähtavus", value: "Nähtav arstile ja esindajale", - statusBadge: 'Esitatud' + statusBadge: "Esitatud", }, { type: "vertical", @@ -284,7 +284,10 @@ export const Responsive: Story = { { label: "Aadress", value: "Tulbi tn 4, Tallinn, 23562, Eesti" }, { label: "Vaktsiin", value: "Mari Maasikas" }, { label: "Järgmine vaktsineerimine", value: "Immuniseerimine lõpetatud" }, - { label: "Tervishoiuteenuse osutaja", value: "SA Põhja-Eesti Regionaalhaigla" }, + { + label: "Tervishoiuteenuse osutaja", + value: "SA Põhja-Eesti Regionaalhaigla", + }, { label: "Tervishoiutöötaja", value: "Mart Mets" }, { label: "Dokumendi loomise aeg", value: "16.08.2023 14:51:48" }, ]; diff --git a/tedi/components/filter/filter-content.directive.ts b/src/tedi/components/filter/filter-content.directive.ts similarity index 100% rename from tedi/components/filter/filter-content.directive.ts rename to src/tedi/components/filter/filter-content.directive.ts diff --git a/tedi/components/filter/filter-group.component.scss b/src/tedi/components/filter/filter-group.component.scss similarity index 100% rename from tedi/components/filter/filter-group.component.scss rename to src/tedi/components/filter/filter-group.component.scss diff --git a/tedi/components/filter/filter-group.component.spec.ts b/src/tedi/components/filter/filter-group.component.spec.ts similarity index 97% rename from tedi/components/filter/filter-group.component.spec.ts rename to src/tedi/components/filter/filter-group.component.spec.ts index 43ae51556..4e87e1d05 100644 --- a/tedi/components/filter/filter-group.component.spec.ts +++ b/src/tedi/components/filter/filter-group.component.spec.ts @@ -60,7 +60,9 @@ describe("FilterGroupComponent", () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [SingleSelectGroupHostComponent], - providers: [{ provide: TEDI_TRANSLATION_DEFAULT_TOKEN, useValue: "et" }], + providers: [ + { provide: TEDI_TRANSLATION_DEFAULT_TOKEN, useValue: "et" }, + ], }); fixture = TestBed.createComponent(SingleSelectGroupHostComponent); host = fixture.componentInstance; @@ -262,7 +264,9 @@ describe("FilterGroupComponent", () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [MultiSelectGroupHostComponent], - providers: [{ provide: TEDI_TRANSLATION_DEFAULT_TOKEN, useValue: "et" }], + providers: [ + { provide: TEDI_TRANSLATION_DEFAULT_TOKEN, useValue: "et" }, + ], }); fixture = TestBed.createComponent(MultiSelectGroupHostComponent); host = fixture.componentInstance; @@ -400,7 +404,9 @@ describe("FilterGroupComponent", () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [UnmanagedGroupHostComponent], - providers: [{ provide: TEDI_TRANSLATION_DEFAULT_TOKEN, useValue: "et" }], + providers: [ + { provide: TEDI_TRANSLATION_DEFAULT_TOKEN, useValue: "et" }, + ], }); fixture = TestBed.createComponent(UnmanagedGroupHostComponent); fixture.detectChanges(); diff --git a/tedi/components/filter/filter-group.component.ts b/src/tedi/components/filter/filter-group.component.ts similarity index 100% rename from tedi/components/filter/filter-group.component.ts rename to src/tedi/components/filter/filter-group.component.ts diff --git a/tedi/components/filter/filter-prepend.directive.ts b/src/tedi/components/filter/filter-prepend.directive.ts similarity index 100% rename from tedi/components/filter/filter-prepend.directive.ts rename to src/tedi/components/filter/filter-prepend.directive.ts diff --git a/tedi/components/filter/filter.component.html b/src/tedi/components/filter/filter.component.html similarity index 79% rename from tedi/components/filter/filter.component.html rename to src/tedi/components/filter/filter.component.html index cc17a5ff5..32331cd97 100644 --- a/tedi/components/filter/filter.component.html +++ b/src/tedi/components/filter/filter.component.html @@ -58,12 +58,20 @@ (mousedown)="onOptionsMousedown()" (keydown)="onOptionsKeydown($event)" > - @for (option of filteredOptions(); track option.value; let i = $index) { + @for ( + option of filteredOptions(); + track option.value; + let i = $index + ) {
    - {{ option.label }} + {{ + option.label + }}
    } @@ -104,7 +114,13 @@ @@ -134,11 +152,17 @@ (mousedown)="onOptionsMousedown()" (keydown)="onOptionsKeydown($event)" > - @for (option of filteredOptions(); track option.value; let i = $index) { + @for ( + option of filteredOptions(); + track option.value; + let i = $index + ) {
    - {{ option.label }} + {{ + option.label + }}
    } @@ -191,10 +217,18 @@ @if (!hasDropdown() && isSelected()) { - + } -
    +
    @@ -205,11 +239,21 @@
    @if (isMultiSelect() && isSelected() && selectedCount() > 0) { - + } @if (hasDropdown()) { - + }
    diff --git a/tedi/components/filter/filter.component.scss b/src/tedi/components/filter/filter.component.scss similarity index 100% rename from tedi/components/filter/filter.component.scss rename to src/tedi/components/filter/filter.component.scss diff --git a/tedi/components/filter/filter.component.spec.ts b/src/tedi/components/filter/filter.component.spec.ts similarity index 94% rename from tedi/components/filter/filter.component.spec.ts rename to src/tedi/components/filter/filter.component.spec.ts index a764b16a9..5a0fa648e 100644 --- a/tedi/components/filter/filter.component.spec.ts +++ b/src/tedi/components/filter/filter.component.spec.ts @@ -69,11 +69,7 @@ class FilterWithCustomContentHostComponent { standalone: true, imports: [FilterComponent, ReactiveFormsModule], template: ` - + `, }) class SingleSelectHost2Component { @@ -87,11 +83,7 @@ class SingleSelectHost2Component { @Component({ standalone: true, - imports: [ - FilterComponent, - FilterPrependDirective, - StatusBadgeComponent, - ], + imports: [FilterComponent, FilterPrependDirective, StatusBadgeComponent], template: ` @@ -104,14 +96,15 @@ class PrependDefaultHostComponent { @Component({ standalone: true, - imports: [ - FilterComponent, - FilterPrependDirective, - StatusBadgeComponent, - ], + imports: [FilterComponent, FilterPrependDirective, StatusBadgeComponent], template: ` - + `, }) @@ -211,9 +204,7 @@ describe("FilterComponent", () => { describe("single-select mode", () => { it("should toggle selected state on click", () => { - const button = fixture.debugElement.query( - By.css(".tedi-filter__button"), - ); + const button = fixture.debugElement.query(By.css(".tedi-filter__button")); expect(component.selected()).toBe(false); @@ -240,9 +231,7 @@ describe("FilterComponent", () => { }); it("should set aria-pressed attribute", () => { - const button = fixture.debugElement.query( - By.css(".tedi-filter__button"), - ); + const button = fixture.debugElement.query(By.css(".tedi-filter__button")); expect(button.nativeElement.getAttribute("aria-pressed")).toBe("false"); @@ -270,9 +259,7 @@ describe("FilterComponent", () => { }); it("should not have aria-expanded in single-select mode", () => { - const button = fixture.debugElement.query( - By.css(".tedi-filter__button"), - ); + const button = fixture.debugElement.query(By.css(".tedi-filter__button")); expect(button.nativeElement.getAttribute("aria-expanded")).toBeNull(); }); }); @@ -313,19 +300,13 @@ describe("FilterComponent", () => { }); it("should set aria-expanded on button", () => { - const button = fixture.debugElement.query( - By.css(".tedi-filter__button"), - ); + const button = fixture.debugElement.query(By.css(".tedi-filter__button")); expect(button.nativeElement.getAttribute("aria-expanded")).toBe("false"); }); it("should set aria-haspopup on button", () => { - const button = fixture.debugElement.query( - By.css(".tedi-filter__button"), - ); - expect(button.nativeElement.getAttribute("aria-haspopup")).toBe( - "dialog", - ); + const button = fixture.debugElement.query(By.css(".tedi-filter__button")); + expect(button.nativeElement.getAttribute("aria-haspopup")).toBe("dialog"); }); it("should show selected class when values are present", () => { @@ -460,9 +441,7 @@ describe("FilterComponent", () => { it("should render dropdown-item-value-label for each option", () => { const labels = fixture.debugElement.queryAll( - By.css( - ".tedi-filter-dropdown__options tedi-dropdown-item-value-label", - ), + By.css(".tedi-filter-dropdown__options tedi-dropdown-item-value-label"), ); expect(labels.length).toBe(TEST_OPTIONS.length); expect(labels[0].nativeElement.textContent.trim()).toBe("Option A"); @@ -489,7 +468,9 @@ describe("FilterComponent", () => { it("should render select-all with dropdown-item-value checkbox type", () => { const selectAll = fixture.debugElement.query( - By.css(".tedi-filter-dropdown__item--select-all tedi-dropdown-item-value"), + By.css( + ".tedi-filter-dropdown__item--select-all tedi-dropdown-item-value", + ), ); expect(selectAll).toBeTruthy(); expect(selectAll.componentInstance.type()).toBe("checkbox"); @@ -500,7 +481,9 @@ describe("FilterComponent", () => { fixture.detectChanges(); const selectAll = fixture.debugElement.query( - By.css(".tedi-filter-dropdown__item--select-all tedi-dropdown-item-value"), + By.css( + ".tedi-filter-dropdown__item--select-all tedi-dropdown-item-value", + ), ); expect(selectAll.componentInstance.indeterminate()).toBe(true); expect(selectAll.componentInstance.selected()).toBe(false); @@ -511,7 +494,9 @@ describe("FilterComponent", () => { fixture.detectChanges(); const selectAll = fixture.debugElement.query( - By.css(".tedi-filter-dropdown__item--select-all tedi-dropdown-item-value"), + By.css( + ".tedi-filter-dropdown__item--select-all tedi-dropdown-item-value", + ), ); expect(selectAll.componentInstance.selected()).toBe(true); expect(selectAll.componentInstance.indeterminate()).toBe(false); @@ -690,19 +675,13 @@ describe("FilterComponent", () => { }); it("should have role=dialog on dropdown panel", () => { - const panel = fixture.debugElement.query( - By.css(".tedi-filter-dropdown"), - ); + const panel = fixture.debugElement.query(By.css(".tedi-filter-dropdown")); expect(panel.nativeElement.getAttribute("role")).toBe("dialog"); }); it("should have aria-label on dropdown panel matching text", () => { - const panel = fixture.debugElement.query( - By.css(".tedi-filter-dropdown"), - ); - expect(panel.nativeElement.getAttribute("aria-label")).toBe( - "Raviasutus", - ); + const panel = fixture.debugElement.query(By.css(".tedi-filter-dropdown")); + expect(panel.nativeElement.getAttribute("aria-label")).toBe("Raviasutus"); }); it("should have role=listbox on options container", () => { @@ -746,9 +725,7 @@ describe("FilterComponent", () => { const items = fixture.debugElement.queryAll( By.css(".tedi-filter-dropdown__options [role='option']"), ); - expect(items[0].nativeElement.getAttribute("aria-selected")).toBe( - "true", - ); + expect(items[0].nativeElement.getAttribute("aria-selected")).toBe("true"); expect(items[1].nativeElement.getAttribute("aria-selected")).toBe( "false", ); @@ -758,9 +735,7 @@ describe("FilterComponent", () => { const items = fixture.debugElement.queryAll( By.css(".tedi-filter-dropdown__options [role='option']"), ); - expect(items[3].nativeElement.getAttribute("aria-disabled")).toBe( - "true", - ); + expect(items[3].nativeElement.getAttribute("aria-disabled")).toBe("true"); expect(items[0].nativeElement.getAttribute("aria-disabled")).toBeNull(); }); @@ -809,9 +784,7 @@ describe("FilterComponent", () => { const selectAll = fixture.debugElement.query( By.css(".tedi-filter-dropdown__item--select-all"), ); - expect(selectAll.nativeElement.getAttribute("aria-checked")).toBe( - "true", - ); + expect(selectAll.nativeElement.getAttribute("aria-checked")).toBe("true"); }); it("should have role=searchbox on search input", () => { @@ -847,9 +820,9 @@ describe("FilterComponent", () => { By.css(".tedi-filter-dropdown__options"), ); const firstOptionId = component.getOptionId(0); - expect( - options.nativeElement.getAttribute("aria-activedescendant"), - ).toBe(firstOptionId); + expect(options.nativeElement.getAttribute("aria-activedescendant")).toBe( + firstOptionId, + ); }); it("should clear aria-activedescendant on options blur", () => { @@ -882,9 +855,7 @@ describe("FilterComponent", () => { it("should not have tabbable checkbox inputs inside dropdown-item-value", () => { const checkboxes = fixture.debugElement.queryAll( - By.css( - ".tedi-filter-dropdown__options input[type='checkbox']", - ), + By.css(".tedi-filter-dropdown__options input[type='checkbox']"), ); checkboxes.forEach((cb) => { expect(cb.nativeElement.getAttribute("tabindex")).toBe("-1"); @@ -976,18 +947,14 @@ describe("FilterComponent", () => { ); expect(component.activeOptionIndex()).toBe(2); - component.onOptionsKeydown( - new KeyboardEvent("keydown", { key: "Home" }), - ); + component.onOptionsKeydown(new KeyboardEvent("keydown", { key: "Home" })); expect(component.activeOptionIndex()).toBe(0); }); it("should move to last enabled option on End", () => { component.onOptionsFocus(); - component.onOptionsKeydown( - new KeyboardEvent("keydown", { key: "End" }), - ); + component.onOptionsKeydown(new KeyboardEvent("keydown", { key: "End" })); expect(component.activeOptionIndex()).toBe(2); }); @@ -1004,14 +971,10 @@ describe("FilterComponent", () => { it("should toggle focused option on Space", () => { component.onOptionsFocus(); - component.onOptionsKeydown( - new KeyboardEvent("keydown", { key: " " }), - ); + component.onOptionsKeydown(new KeyboardEvent("keydown", { key: " " })); expect(component.multiValues()).toEqual(["a"]); - component.onOptionsKeydown( - new KeyboardEvent("keydown", { key: " " }), - ); + component.onOptionsKeydown(new KeyboardEvent("keydown", { key: " " })); expect(component.multiValues()).toEqual([]); }); @@ -1135,7 +1098,6 @@ describe("FilterComponent", () => { }); }); - it("should project content via tediFilterPrepend slot", () => { const hostFixture = TestBed.createComponent(FilterWithIconHostComponent); hostFixture.detectChanges(); @@ -1356,12 +1318,8 @@ describe("FilterComponent", () => { fixture.componentRef.setInput("value", "a"); fixture.detectChanges(); - const items = fixture.debugElement.queryAll( - By.css("[role='option']"), - ); - expect(items[0].nativeElement.getAttribute("aria-selected")).toBe( - "true", - ); + const items = fixture.debugElement.queryAll(By.css("[role='option']")); + expect(items[0].nativeElement.getAttribute("aria-selected")).toBe("true"); expect(items[1].nativeElement.getAttribute("aria-selected")).toBe( "false", ); @@ -1405,9 +1363,7 @@ describe("FilterComponent", () => { it("should select option on Space keydown", () => { component.onOptionsFocus(); - component.onOptionsKeydown( - new KeyboardEvent("keydown", { key: " " }), - ); + component.onOptionsKeydown(new KeyboardEvent("keydown", { key: " " })); expect(component.value()).toBe("a"); }); @@ -1543,9 +1499,7 @@ describe("FilterComponent", () => { }); it("should not show count badge", () => { - const badge = hostFixture.debugElement.query( - By.css("tedi-status-badge"), - ); + const badge = hostFixture.debugElement.query(By.css("tedi-status-badge")); expect(badge).toBeNull(); }); @@ -1572,17 +1526,13 @@ describe("FilterComponent", () => { const button = hostFixture.debugElement.query( By.css(".tedi-filter__button"), ); - expect( - button.nativeElement.hasAttribute("aria-haspopup"), - ).toBe(true); + expect(button.nativeElement.hasAttribute("aria-haspopup")).toBe(true); }); }); describe("prepend directive", () => { it("should hide prepend when selected by default", () => { - const hostFixture = TestBed.createComponent( - PrependDefaultHostComponent, - ); + const hostFixture = TestBed.createComponent(PrependDefaultHostComponent); hostFixture.detectChanges(); const prepend = hostFixture.debugElement.query( @@ -1605,9 +1555,7 @@ describe("FilterComponent", () => { }); it("should keep prepend visible when hideWhenSelected is false", () => { - const hostFixture = TestBed.createComponent( - PrependVisibleHostComponent, - ); + const hostFixture = TestBed.createComponent(PrependVisibleHostComponent); hostFixture.detectChanges(); hostFixture.componentInstance.selected = true; @@ -1624,9 +1572,7 @@ describe("FilterComponent", () => { }); it("should show check icon alongside visible prepend when selected", () => { - const hostFixture = TestBed.createComponent( - PrependVisibleHostComponent, - ); + const hostFixture = TestBed.createComponent(PrependVisibleHostComponent); hostFixture.componentInstance.selected = true; hostFixture.detectChanges(); @@ -1645,9 +1591,7 @@ describe("FilterComponent", () => { }); it("should render check icon before prepend in DOM order", () => { - const hostFixture = TestBed.createComponent( - PrependVisibleHostComponent, - ); + const hostFixture = TestBed.createComponent(PrependVisibleHostComponent); hostFixture.componentInstance.selected = true; hostFixture.detectChanges(); @@ -1667,9 +1611,7 @@ describe("FilterComponent", () => { }); it("should hide prepend when no directive is used (backward compat)", () => { - const hostFixture = TestBed.createComponent( - FilterWithIconHostComponent, - ); + const hostFixture = TestBed.createComponent(FilterWithIconHostComponent); hostFixture.detectChanges(); const filter = hostFixture.debugElement.query( @@ -1731,11 +1673,8 @@ describe("FilterComponent", () => { By.css(".tedi-filter__append"), ); expect( - append.nativeElement.classList.contains( - "tedi-filter__append--hidden", - ), + append.nativeElement.classList.contains("tedi-filter__append--hidden"), ).toBe(false); }); - }); }); diff --git a/tedi/components/filter/filter.component.ts b/src/tedi/components/filter/filter.component.ts similarity index 95% rename from tedi/components/filter/filter.component.ts rename to src/tedi/components/filter/filter.component.ts index ac95157cd..c1bf2939f 100644 --- a/tedi/components/filter/filter.component.ts +++ b/src/tedi/components/filter/filter.component.ts @@ -202,9 +202,8 @@ export class FilterComponent implements ControlValueAccessor { return Array.isArray(v) ? v : []; }); - private readonly defaultSelectAllLabel = this.translationService.track( - "select.select-all", - ); + private readonly defaultSelectAllLabel = + this.translationService.track("select.select-all"); private readonly defaultClearLabel = this.translationService.track( "filter.clear-selection", ); @@ -221,9 +220,7 @@ export class FilterComponent implements ControlValueAccessor { private readonly formDisabled = signal(false); readonly isDisabled = computed( () => - this.disabled() || - this.formDisabled() || - !!this.filterGroup?.disabled(), + this.disabled() || this.formDisabled() || !!this.filterGroup?.disabled(), ); readonly searchTerm = signal(""); readonly activeOptionIndex = signal(-1); @@ -232,9 +229,7 @@ export class FilterComponent implements ControlValueAccessor { readonly activeDescendantId = computed(() => { const idx = this.activeOptionIndex(); if (idx === -1) return null; - return idx < this.filteredOptions().length - ? this.getOptionId(idx) - : null; + return idx < this.filteredOptions().length ? this.getOptionId(idx) : null; }); readonly iconSize = computed(() => (this.size() === "large" ? 24 : 18)); @@ -249,8 +244,7 @@ export class FilterComponent implements ControlValueAccessor { readonly hidePrepend = computed( () => - this.isSelected() && - (this.filterPrepend()?.hideWhenSelected() ?? true), + this.isSelected() && (this.filterPrepend()?.hideWhenSelected() ?? true), ); readonly isSelected = computed(() => { @@ -309,8 +303,8 @@ export class FilterComponent implements ControlValueAccessor { return selectedCount > 0 && selectedCount < filtered.length; }); - private onChange: (value: boolean | string | string[]) => void = () => { }; - private onTouched: () => void = () => { }; + private onChange: (value: boolean | string | string[]) => void = () => {}; + private onTouched: () => void = () => {}; writeValue(value: boolean | string | string[]): void { if (this.isMultiSelect()) { @@ -473,20 +467,14 @@ export class FilterComponent implements ControlValueAccessor { switch (event.key) { case "ArrowDown": { event.preventDefault(); - const next = this.findNextEnabledIndex( - this.activeOptionIndex(), - 1, - ); + const next = this.findNextEnabledIndex(this.activeOptionIndex(), 1); if (next !== -1) this.setActiveOption(next); break; } case "ArrowUp": { event.preventDefault(); - const prev = this.findNextEnabledIndex( - this.activeOptionIndex(), - -1, - ); + const prev = this.findNextEnabledIndex(this.activeOptionIndex(), -1); if (prev !== -1) this.setActiveOption(prev); break; } @@ -498,9 +486,7 @@ export class FilterComponent implements ControlValueAccessor { case "End": event.preventDefault(); - this.setActiveOption( - this.findNextEnabledIndex(options.length, -1), - ); + this.setActiveOption(this.findNextEnabledIndex(options.length, -1)); break; case "Enter": diff --git a/tedi/components/filter/filter.stories.ts b/src/tedi/components/filter/filter.stories.ts similarity index 94% rename from tedi/components/filter/filter.stories.ts rename to src/tedi/components/filter/filter.stories.ts index 7605279ce..54e39da23 100644 --- a/tedi/components/filter/filter.stories.ts +++ b/src/tedi/components/filter/filter.stories.ts @@ -79,7 +79,8 @@ export default { }, }, selected: { - description: "Whether the filter is selected (boolean toggle mode, used when no options are provided)", + description: + "Whether the filter is selected (boolean toggle mode, used when no options are provided)", control: { type: "boolean" }, table: { category: "inputs", @@ -108,7 +109,8 @@ export default { }, }, options: { - description: "Options for the dropdown. Enables single-select mode, or multiselect when combined with multiselect input", + description: + "Options for the dropdown. Enables single-select mode, or multiselect when combined with multiselect input", control: { type: "object" }, table: { category: "inputs", @@ -164,7 +166,8 @@ export default { }, }, selectAllLabel: { - description: 'Override for the "Select all" option label. Defaults to the translated string', + description: + 'Override for the "Select all" option label. Defaults to the translated string', control: { type: "text" }, table: { category: "inputs", @@ -173,7 +176,8 @@ export default { }, }, clearLabel: { - description: 'Override for the "Clear selection" action label. Defaults to the translated string', + description: + 'Override for the "Clear selection" action label. Defaults to the translated string', control: { type: "text" }, table: { category: "inputs", @@ -540,7 +544,10 @@ export const CustomDropdownContent: StoryObj = { { value: "month", label: "Kuu" }, { value: "year", label: "Aasta" }, ], - getLabel(periods: { value: string; label: string }[], value: string): string { + getLabel( + periods: { value: string; label: string }[], + value: string, + ): string { return periods.find((p) => p.value === value)?.label ?? "Periood"; }, }, @@ -586,15 +593,15 @@ export const Examples: StoryObj = { const analuusidControl = new FormControl(true); const uuringudControl = new FormControl(false); const uuringControl = new FormControl(""); - const raviasutusControl = new FormControl([ - "ltk", - "perh", - ]); + const raviasutusControl = new FormControl(["ltk", "perh"]); const teenusControl = new FormControl(""); const aegAlatesControl = new FormControl(""); const typeControl = new FormControl("all"); const teenusControl2 = new FormControl(""); - const categoryControl = new FormControl(["vastuvotud", "analuusid"]); + const categoryControl = new FormControl([ + "vastuvotud", + "analuusid", + ]); const typeControl2 = new FormControl("all"); const uuringOptions = [ @@ -652,39 +659,53 @@ export const Examples: StoryObj = { ], radioFilters: [ { - label: "Tüüp", control: typeControl, options: [ + label: "Tüüp", + control: typeControl, + options: [ { label: "Kõik", value: "all" }, { label: "Aktiivsed", value: "active" }, { label: "Lõpetatud", value: "done" }, - ] + ], }, { label: "Teenus", control: teenusControl, options: teenusOptions }, - { label: "Raviasutus", control: raviasutusControl, options: raviasutusOptions }, + { + label: "Raviasutus", + control: raviasutusControl, + options: raviasutusOptions, + }, ], checkboxFilters: [ { - label: "Kategooria", control: categoryControl, options: [ + label: "Kategooria", + control: categoryControl, + options: [ { label: "Vastuvõtud", value: "vastuvotud" }, { label: "Analüüsid", value: "analuusid" }, { label: "Uuringud", value: "uuringud" }, { label: "Vaktsineerimised", value: "vaktsineerimised" }, - ] + ], }, { label: "Teenus", control: teenusControl2, options: teenusOptions }, ], primaryFilters: [ { - label: "Tüüp", control: typeControl2, options: [ + label: "Tüüp", + control: typeControl2, + options: [ { label: "Kõik", value: "all" }, { label: "Aktiivsed", value: "active" }, { label: "Lõpetatud", value: "done" }, - ] + ], }, { label: "Uuring", control: uuringControl, options: uuringOptions }, ], clearAll() { - [vastuvotudControl, analuusidControl, uuringudControl].forEach((c) => c.setValue(false)); - [uuringControl, teenusControl, aegAlatesControl].forEach((c) => c.setValue("")); + [vastuvotudControl, analuusidControl, uuringudControl].forEach((c) => + c.setValue(false), + ); + [uuringControl, teenusControl, aegAlatesControl].forEach((c) => + c.setValue(""), + ); raviasutusControl.setValue([]); }, filters: [ @@ -692,26 +713,46 @@ export const Examples: StoryObj = { { label: "Analüüsid", control: analuusidControl }, { label: "Uuringud", control: uuringudControl }, { label: "Uuring", control: uuringControl, options: uuringOptions }, - { label: "Raviasutus", control: raviasutusControl, options: raviasutusOptions }, + { + label: "Raviasutus", + control: raviasutusControl, + options: raviasutusOptions, + }, { label: "Teenus", control: teenusControl, options: teenusOptions }, - { label: "Aeg alates", control: aegAlatesControl, options: aegAlatesOptions }, + { + label: "Aeg alates", + control: aegAlatesControl, + options: aegAlatesOptions, + }, ], - getTags(filters: { label: string; control: FormControl; options?: { label: string; value: string }[] }[]) { + getTags( + filters: { + label: string; + control: FormControl; + options?: { label: string; value: string }[]; + }[], + ) { const tags: { text: string; remove: () => void }[] = []; for (const f of filters) { const val = f.control.value; if (Array.isArray(val)) { for (const v of val) { - const optLabel = f.options?.find((o) => o.value === v)?.label ?? v; + const optLabel = + f.options?.find((o) => o.value === v)?.label ?? v; tags.push({ text: `${f.label}: ${optLabel}`, - remove: () => f.control.setValue(val.filter((x: string) => x !== v)), + remove: () => + f.control.setValue(val.filter((x: string) => x !== v)), }); } } else if (typeof val === "boolean" && val) { - tags.push({ text: f.label, remove: () => f.control.setValue(false) }); + tags.push({ + text: f.label, + remove: () => f.control.setValue(false), + }); } else if (typeof val === "string" && val) { - const optLabel = f.options?.find((o) => o.value === val)?.label ?? val; + const optLabel = + f.options?.find((o) => o.value === val)?.label ?? val; tags.push({ text: `${f.label}: ${optLabel}`, remove: () => f.control.setValue(""), diff --git a/tedi/components/filter/index.ts b/src/tedi/components/filter/index.ts similarity index 100% rename from tedi/components/filter/index.ts rename to src/tedi/components/filter/index.ts diff --git a/tedi/components/form/checkbox-card-group/checkbox-card-group.component.scss b/src/tedi/components/form/checkbox-card-group/checkbox-card-group.component.scss similarity index 100% rename from tedi/components/form/checkbox-card-group/checkbox-card-group.component.scss rename to src/tedi/components/form/checkbox-card-group/checkbox-card-group.component.scss diff --git a/tedi/components/form/checkbox-card-group/checkbox-card-group.component.spec.ts b/src/tedi/components/form/checkbox-card-group/checkbox-card-group.component.spec.ts similarity index 91% rename from tedi/components/form/checkbox-card-group/checkbox-card-group.component.spec.ts rename to src/tedi/components/form/checkbox-card-group/checkbox-card-group.component.spec.ts index 63f8b6996..54aaa2e49 100644 --- a/tedi/components/form/checkbox-card-group/checkbox-card-group.component.spec.ts +++ b/src/tedi/components/form/checkbox-card-group/checkbox-card-group.component.spec.ts @@ -6,7 +6,11 @@ import { CheckboxComponent } from "../checkbox/checkbox.component"; @Component({ standalone: true, - imports: [CheckboxCardGroupComponent, CheckboxCardComponent, CheckboxComponent], + imports: [ + CheckboxCardGroupComponent, + CheckboxCardComponent, + CheckboxComponent, + ], template: `
    @if (hiddenTagsCount() > 0) { - +{{ hiddenTagsCount() }} + +{{ hiddenTagsCount() }} } } { it("emits tagRemove with the tag id when the tag's close button is clicked", () => { fixture.componentRef.setInput("mode", "multiple"); - fixture.componentRef.setInput("tags", [{ id: "tag-1", label: "01.01.2026" }]); + fixture.componentRef.setInput("tags", [ + { id: "tag-1", label: "01.01.2026" }, + ]); fixture.detectChanges(); const removeBtn = el.querySelector( @@ -122,7 +124,9 @@ describe("DateInputComponent", () => { it("does not render a tag close button when disabled", () => { fixture.componentRef.setInput("mode", "multiple"); - fixture.componentRef.setInput("tags", [{ id: "tag-1", label: "01.01.2026" }]); + fixture.componentRef.setInput("tags", [ + { id: "tag-1", label: "01.01.2026" }, + ]); fixture.componentRef.setInput("disabled", true); fixture.detectChanges(); @@ -132,7 +136,9 @@ describe("DateInputComponent", () => { it("does not render a tag close button when readOnly", () => { fixture.componentRef.setInput("mode", "multiple"); - fixture.componentRef.setInput("tags", [{ id: "tag-1", label: "01.01.2026" }]); + fixture.componentRef.setInput("tags", [ + { id: "tag-1", label: "01.01.2026" }, + ]); fixture.componentRef.setInput("readOnly", true); fixture.detectChanges(); @@ -142,7 +148,9 @@ describe("DateInputComponent", () => { it("does not render a tag close button when removable is false", () => { fixture.componentRef.setInput("mode", "multiple"); - fixture.componentRef.setInput("tags", [{ id: "tag-1", label: "01.01.2026" }]); + fixture.componentRef.setInput("tags", [ + { id: "tag-1", label: "01.01.2026" }, + ]); fixture.componentRef.setInput("removable", false); fixture.detectChanges(); @@ -152,7 +160,9 @@ describe("DateInputComponent", () => { it("forwards the ellipsis input to the rendered tags", () => { fixture.componentRef.setInput("mode", "multiple"); - fixture.componentRef.setInput("tags", [{ id: "tag-1", label: "01.01.2026" }]); + fixture.componentRef.setInput("tags", [ + { id: "tag-1", label: "01.01.2026" }, + ]); fixture.detectChanges(); // default: no ellipsis expect(el.querySelector("tedi-tag.tedi-tag--ellipsis")).toBeNull(); @@ -269,7 +279,9 @@ describe("DateInputComponent", () => { it("sets aria-expanded=false and no active modifier when iconActive is false", () => { const icon = getIconButton(); expect(icon.getAttribute("aria-expanded")).toBe("false"); - expect(icon.classList.contains("tedi-date-input__icon--active")).toBe(false); + expect(icon.classList.contains("tedi-date-input__icon--active")).toBe( + false, + ); }); it("exposes an aria-label on the icon button", () => { diff --git a/tedi/components/form/date-field/date-input/date-input.component.ts b/src/tedi/components/form/date-field/date-input/date-input.component.ts similarity index 97% rename from tedi/components/form/date-field/date-input/date-input.component.ts rename to src/tedi/components/form/date-field/date-input/date-input.component.ts index 436fd7fa7..02d7c5a0d 100644 --- a/tedi/components/form/date-field/date-input/date-input.component.ts +++ b/src/tedi/components/form/date-field/date-input/date-input.component.ts @@ -90,9 +90,8 @@ export class DateInputComponent implements AfterViewChecked { private readonly inputElement = viewChild("inputElement", { read: ElementRef, }); - private readonly fieldElement = viewChild>( - "fieldElement", - ); + private readonly fieldElement = + viewChild>("fieldElement"); private readonly tagElements = viewChildren("tagElement", { read: ElementRef, }); @@ -150,7 +149,9 @@ export class DateInputComponent implements AfterViewChecked { return total - visible; }); - readonly inputType = computed(() => (this.useNativePicker() ? "date" : "text")); + readonly inputType = computed(() => + this.useNativePicker() ? "date" : "text", + ); readonly inputValue = computed(() => this.useNativePicker() ? this.nativeIsoValue() : this.value(), diff --git a/tedi/components/form/date-field/date-input/index.ts b/src/tedi/components/form/date-field/date-input/index.ts similarity index 100% rename from tedi/components/form/date-field/date-input/index.ts rename to src/tedi/components/form/date-field/date-input/index.ts diff --git a/tedi/components/form/date-field/index.ts b/src/tedi/components/form/date-field/index.ts similarity index 100% rename from tedi/components/form/date-field/index.ts rename to src/tedi/components/form/date-field/index.ts diff --git a/tedi/components/form/date-picker/date-picker-calendar-grid/date-picker-calendar-grid.component.html b/src/tedi/components/form/date-picker/date-picker-calendar-grid/date-picker-calendar-grid.component.html similarity index 100% rename from tedi/components/form/date-picker/date-picker-calendar-grid/date-picker-calendar-grid.component.html rename to src/tedi/components/form/date-picker/date-picker-calendar-grid/date-picker-calendar-grid.component.html diff --git a/tedi/components/form/date-picker/date-picker-calendar-grid/date-picker-calendar-grid.component.spec.ts b/src/tedi/components/form/date-picker/date-picker-calendar-grid/date-picker-calendar-grid.component.spec.ts similarity index 100% rename from tedi/components/form/date-picker/date-picker-calendar-grid/date-picker-calendar-grid.component.spec.ts rename to src/tedi/components/form/date-picker/date-picker-calendar-grid/date-picker-calendar-grid.component.spec.ts diff --git a/tedi/components/form/date-picker/date-picker-calendar-grid/date-picker-calendar-grid.component.ts b/src/tedi/components/form/date-picker/date-picker-calendar-grid/date-picker-calendar-grid.component.ts similarity index 100% rename from tedi/components/form/date-picker/date-picker-calendar-grid/date-picker-calendar-grid.component.ts rename to src/tedi/components/form/date-picker/date-picker-calendar-grid/date-picker-calendar-grid.component.ts diff --git a/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.html b/src/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.html similarity index 86% rename from tedi/components/form/date-picker/date-picker-header/date-picker-header.component.html rename to src/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.html index d8a0b7907..bb126561a 100644 --- a/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.html +++ b/src/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.html @@ -6,7 +6,9 @@ variant="neutral" size="small" class="tedi-date-picker__nav" - [attr.aria-label]="translationService.track('date-picker.go-prev-month')()" + [attr.aria-label]=" + translationService.track('date-picker.go-prev-month')() + " [attr.aria-controls]="uniqueId()" (click)="onPrevMonth()" [disabled]="!canGoPrev()" @@ -25,7 +27,9 @@ tedi-dropdown-trigger ariaHaspopup="listbox" class="tedi-date-picker__dropdown-trigger" - [attr.aria-label]="translationService.track('date-picker.select-month')()" + [attr.aria-label]=" + translationService.track('date-picker.select-month')() + " > {{ monthNames[month().getMonth()]() }} {{ monthNames[month().getMonth()]() }} @@ -78,7 +84,9 @@ tedi-dropdown-trigger ariaHaspopup="listbox" class="tedi-date-picker__dropdown-trigger" - [attr.aria-label]="translationService.track('date-picker.select-year')()" + [attr.aria-label]=" + translationService.track('date-picker.select-year')() + " > {{ selectedYear() }} {{ selectedYear() }} @@ -128,7 +138,9 @@ variant="neutral" size="small" class="tedi-date-picker__nav" - [attr.aria-label]="translationService.track('date-picker.go-next-month')()" + [attr.aria-label]=" + translationService.track('date-picker.go-next-month')() + " [attr.aria-controls]="uniqueId()" (click)="onNextMonth()" [disabled]="!canGoNext()" @@ -146,7 +158,9 @@ variant="neutral" size="small" class="tedi-date-picker__nav" - [attr.aria-label]="translationService.track('date-picker.previous-years')()" + [attr.aria-label]=" + translationService.track('date-picker.previous-years')() + " (click)="onPrevYearPage()" [disabled]="!hasPrevYearPage()" > diff --git a/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.spec.ts b/src/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.spec.ts similarity index 95% rename from tedi/components/form/date-picker/date-picker-header/date-picker-header.component.spec.ts rename to src/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.spec.ts index 0ecb4a1a9..491895342 100644 --- a/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.spec.ts +++ b/src/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.spec.ts @@ -27,8 +27,14 @@ describe("DatePickerHeaderComponent", () => { fixture.componentRef.setInput("currentView", "calendar-grid"); fixture.componentRef.setInput("month", new Date(2024, 4, 1)); fixture.componentRef.setInput("selectedYear", 2024); - fixture.componentRef.setInput("years", [2020, 2021, 2022, 2023, 2024, 2025]); - fixture.componentRef.setInput("pagedYears", [2020, 2021, 2022, 2023, 2024, 2025]); + fixture.componentRef.setInput( + "years", + [2020, 2021, 2022, 2023, 2024, 2025], + ); + fixture.componentRef.setInput( + "pagedYears", + [2020, 2021, 2022, 2023, 2024, 2025], + ); fixture.detectChanges(); }); diff --git a/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.ts b/src/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.ts similarity index 97% rename from tedi/components/form/date-picker/date-picker-header/date-picker-header.component.ts rename to src/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.ts index 034d3ce0f..60e9ae12d 100644 --- a/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.ts +++ b/src/tedi/components/form/date-picker/date-picker-header/date-picker-header.component.ts @@ -13,7 +13,10 @@ import { DropdownTriggerDirective } from "../../../overlay/dropdown/dropdown-tri import { DropdownContentComponent } from "../../../overlay/dropdown/dropdown-content/dropdown-content.component"; import { DropdownItemComponent } from "../../../overlay/dropdown/dropdown-item/dropdown-item.component"; import { TediTranslationService } from "../../../../services/translation/translation.service"; -import { DatePickerSelectorMode, DatePickerView } from "../date-picker.component"; +import { + DatePickerSelectorMode, + DatePickerView, +} from "../date-picker.component"; @Component({ standalone: true, diff --git a/tedi/components/form/date-picker/date-picker-month-grid/date-picker-month-grid.component.html b/src/tedi/components/form/date-picker/date-picker-month-grid/date-picker-month-grid.component.html similarity index 100% rename from tedi/components/form/date-picker/date-picker-month-grid/date-picker-month-grid.component.html rename to src/tedi/components/form/date-picker/date-picker-month-grid/date-picker-month-grid.component.html diff --git a/tedi/components/form/date-picker/date-picker-month-grid/date-picker-month-grid.component.spec.ts b/src/tedi/components/form/date-picker/date-picker-month-grid/date-picker-month-grid.component.spec.ts similarity index 100% rename from tedi/components/form/date-picker/date-picker-month-grid/date-picker-month-grid.component.spec.ts rename to src/tedi/components/form/date-picker/date-picker-month-grid/date-picker-month-grid.component.spec.ts diff --git a/tedi/components/form/date-picker/date-picker-month-grid/date-picker-month-grid.component.ts b/src/tedi/components/form/date-picker/date-picker-month-grid/date-picker-month-grid.component.ts similarity index 100% rename from tedi/components/form/date-picker/date-picker-month-grid/date-picker-month-grid.component.ts rename to src/tedi/components/form/date-picker/date-picker-month-grid/date-picker-month-grid.component.ts diff --git a/tedi/components/form/date-picker/date-picker-year-grid/date-picker-year-grid.component.html b/src/tedi/components/form/date-picker/date-picker-year-grid/date-picker-year-grid.component.html similarity index 72% rename from tedi/components/form/date-picker/date-picker-year-grid/date-picker-year-grid.component.html rename to src/tedi/components/form/date-picker/date-picker-year-grid/date-picker-year-grid.component.html index 954d35413..7f16084b2 100644 --- a/tedi/components/form/date-picker/date-picker-year-grid/date-picker-year-grid.component.html +++ b/src/tedi/components/form/date-picker/date-picker-year-grid/date-picker-year-grid.component.html @@ -3,7 +3,9 @@ + `, }) @@ -940,8 +972,16 @@ class SelectReactiveFormsDemoComponent { accessOptions = [ { id: 1, title: "Health data", description: "Access to health records" }, - { id: 2, title: "Medications", description: "Access to medication history" }, - { id: 3, title: "Lab results", description: "Access to laboratory results" }, + { + id: 2, + title: "Medications", + description: "Access to medication history", + }, + { + id: 3, + title: "Lab results", + description: "Access to laboratory results", + }, ]; permissionOptions = [ @@ -1001,9 +1041,17 @@ interface PermissionOption { [searchFn]="searchFn" > - - {{ item.title }} - {{ item.description }} + + {{ + item.title + }} + {{ + item.description + }} @@ -1011,14 +1059,33 @@ interface PermissionOption { }) class SelectCustomSearchDemoComponent { options: PermissionOption[] = [ - { id: 1, title: "Read permissions", description: "Can view documents and files" }, - { id: 2, title: "Write permissions", description: "Can create and edit documents" }, - { id: 3, title: "Admin permissions", description: "Full access to all features" }, - { id: 4, title: "Delete permissions", description: "Can remove documents and data" }, + { + id: 1, + title: "Read permissions", + description: "Can view documents and files", + }, + { + id: 2, + title: "Write permissions", + description: "Can create and edit documents", + }, + { + id: 3, + title: "Admin permissions", + description: "Full access to all features", + }, + { + id: 4, + title: "Delete permissions", + description: "Can remove documents and data", + }, ]; searchFn = (term: string, item: PermissionOption): boolean => { - return item.title.toLowerCase().includes(term) || item.description.toLowerCase().includes(term); + return ( + item.title.toLowerCase().includes(term) || + item.description.toLowerCase().includes(term) + ); }; } @@ -1050,8 +1117,13 @@ export const CustomSearchFunction: Story = { standalone: true, imports: [SelectComponent, ButtonComponent, VerticalSpacingDirective], template: ` -
    -
    +
    +
    - +
    @if (events().length === 0) { - Interact with the select to see events. + Interact with the select to see events. } @else { @for (event of events(); track $index) {
    @@ -1113,8 +1189,11 @@ class SelectOutputsDemoComponent { events = signal<{ name: string; payload?: string }[]>([]); logEvent(name: string, payload?: unknown): void { - const formatted = payload === undefined ? undefined : JSON.stringify(payload); - this.events.update((list) => [{ name, payload: formatted }, ...list].slice(0, 50)); + const formatted = + payload === undefined ? undefined : JSON.stringify(payload); + this.events.update((list) => + [{ name, payload: formatted }, ...list].slice(0, 50), + ); } clearLog(): void { diff --git a/tedi/components/form/slider/index.ts b/src/tedi/components/form/slider/index.ts similarity index 100% rename from tedi/components/form/slider/index.ts rename to src/tedi/components/form/slider/index.ts diff --git a/tedi/components/form/slider/slider.component.html b/src/tedi/components/form/slider/slider.component.html similarity index 97% rename from tedi/components/form/slider/slider.component.html rename to src/tedi/components/form/slider/slider.component.html index 6be86b3e2..f26d69810 100644 --- a/tedi/components/form/slider/slider.component.html +++ b/src/tedi/components/form/slider/slider.component.html @@ -5,12 +5,15 @@ [required]="required()" [class.sr-only]="hideLabel() === true" [class.tedi-slider__label--reserve-space]="hideLabel() === 'keep-space'" - >{{ label() }} + >{{ label() }} }
    @if (minLabel() != null) { - + }
    { const formatter = this.valueFormatter(); - return formatter ? formatter(this.clampedValue()) : `${this.clampedValue()}`; + return formatter + ? formatter(this.clampedValue()) + : `${this.clampedValue()}`; }); readonly rightLabel = computed(() => @@ -180,7 +182,9 @@ export class SliderComponent implements ControlValueAccessor, OnDestroy { this.feedbackText() ? `${this.inputId()}-feedback` : null, ); - readonly canShowTooltip = computed(() => this.tooltip() && !this.isDisabled()); + readonly canShowTooltip = computed( + () => this.tooltip() && !this.isDisabled(), + ); readonly tooltipOpen = computed( () => diff --git a/tedi/components/form/slider/slider.stories.ts b/src/tedi/components/form/slider/slider.stories.ts similarity index 97% rename from tedi/components/form/slider/slider.stories.ts rename to src/tedi/components/form/slider/slider.stories.ts index 3e8dd0f9c..6e55d5306 100644 --- a/tedi/components/form/slider/slider.stories.ts +++ b/src/tedi/components/form/slider/slider.stories.ts @@ -19,7 +19,12 @@ export default { component: SliderComponent, decorators: [ moduleMetadata({ - imports: [NumberFieldComponent, RowComponent, ColComponent, TextComponent], + imports: [ + NumberFieldComponent, + RowComponent, + ColComponent, + TextComponent, + ], }), ], args: { @@ -107,7 +112,8 @@ export default { }, }, value: { - description: "Current value. Supports two-way binding and reactive forms.", + description: + "Current value. Supports two-way binding and reactive forms.", control: "number", table: { category: "inputs", @@ -134,7 +140,8 @@ export default { }, }, minLabel: { - description: "Text rendered to the left of the track (e.g. the minimum value).", + description: + "Text rendered to the left of the track (e.g. the minimum value).", control: "text", table: { category: "inputs", type: { summary: "string" } }, }, diff --git a/tedi/components/form/text-field/text-field.component.scss b/src/tedi/components/form/text-field/text-field.component.scss similarity index 100% rename from tedi/components/form/text-field/text-field.component.scss rename to src/tedi/components/form/text-field/text-field.component.scss diff --git a/tedi/components/form/text-field/text-field.component.spec.ts b/src/tedi/components/form/text-field/text-field.component.spec.ts similarity index 100% rename from tedi/components/form/text-field/text-field.component.spec.ts rename to src/tedi/components/form/text-field/text-field.component.spec.ts diff --git a/tedi/components/form/text-field/text-field.component.ts b/src/tedi/components/form/text-field/text-field.component.ts similarity index 94% rename from tedi/components/form/text-field/text-field.component.ts rename to src/tedi/components/form/text-field/text-field.component.ts index f2f2e5e25..966aa48ba 100644 --- a/tedi/components/form/text-field/text-field.component.ts +++ b/src/tedi/components/form/text-field/text-field.component.ts @@ -45,7 +45,8 @@ import { }, }) export class TextFieldComponent - implements ControlValueAccessor, FormFieldControl { + implements ControlValueAccessor, FormFieldControl +{ private el = inject>(ElementRef); /** @@ -71,8 +72,8 @@ export class TextFieldComponent } private formDisabled = signal(false); - private onChange: (value: string) => void = () => { }; - private onTouched: () => void = () => { }; + private onChange: (value: string) => void = () => {}; + private onTouched: () => void = () => {}; constructor() { effect(() => { diff --git a/tedi/components/form/text-field/text-field.stories.ts b/src/tedi/components/form/text-field/text-field.stories.ts similarity index 100% rename from tedi/components/form/text-field/text-field.stories.ts rename to src/tedi/components/form/text-field/text-field.stories.ts diff --git a/tedi/components/form/time-field/index.ts b/src/tedi/components/form/time-field/index.ts similarity index 100% rename from tedi/components/form/time-field/index.ts rename to src/tedi/components/form/time-field/index.ts diff --git a/tedi/components/form/time-field/time-field.component.html b/src/tedi/components/form/time-field/time-field.component.html similarity index 94% rename from tedi/components/form/time-field/time-field.component.html rename to src/tedi/components/form/time-field/time-field.component.html index 1f0155838..368a72713 100644 --- a/tedi/components/form/time-field/time-field.component.html +++ b/src/tedi/components/form/time-field/time-field.component.html @@ -40,7 +40,10 @@
    - + @@ -77,7 +80,10 @@ } @else { -