@4sh/ui-kit 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/README.fr.md +64 -58
  2. package/README.md +63 -57
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +4 -4
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +7 -6
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +4 -4
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +7 -7
  10. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +11 -8
  12. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  13. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +32 -12
  14. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  15. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +3 -3
  16. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +51 -15
  17. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  18. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +3 -3
  19. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  20. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +13 -9
  21. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  22. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +6 -6
  23. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +5 -5
  24. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  25. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +6 -6
  26. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  27. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +8 -4
  28. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +24 -9
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  31. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +4 -4
  32. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  33. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +3 -3
  34. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +4 -4
  35. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  36. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +4 -8
  37. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  38. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +4 -8
  39. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  40. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +11 -6
  41. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  42. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +29 -15
  43. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  44. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +8 -9
  45. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  46. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +13 -6
  47. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  48. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +6 -4
  49. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  50. package/fesm2022/4sh-ui-kit-forms.mjs +16 -16
  51. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  52. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +12 -12
  53. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  54. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +3 -3
  55. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +3 -3
  56. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +3 -3
  57. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +3 -3
  58. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +3 -3
  59. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  60. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +9 -9
  61. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +3 -3
  62. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +4 -4
  63. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  64. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +5 -4
  65. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  66. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +3 -3
  67. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +3 -3
  68. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +4 -4
  69. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  70. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +3 -3
  71. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  72. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +10 -10
  73. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  74. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +30 -14
  75. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  76. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +15 -15
  77. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +4 -4
  78. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +4 -4
  80. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +23 -7
  82. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-motion.mjs +3 -3
  84. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +10 -5
  86. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +3 -3
  88. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  89. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +79 -14
  90. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  91. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +15 -13
  92. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  93. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +29 -21
  94. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  95. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +15 -15
  96. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  97. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +4 -4
  98. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  99. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +55 -42
  100. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  101. package/fesm2022/4sh-ui-kit-theming.mjs +7 -7
  102. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  103. package/mcp/LICENSE +201 -0
  104. package/mcp/data/text-search-docs.json +7016 -0
  105. package/mcp/data/ui-config.json +16960 -0
  106. package/mcp/index.js +33018 -0
  107. package/mcp/package.json +19 -0
  108. package/package.json +1 -1
  109. package/schematics/index.cjs +28 -18
package/README.fr.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @4sh/ui-kit
2
2
 
3
- *[English](./README.md) · **Français***
3
+ _[English](./README.md) · **Français**_
4
4
 
5
- Composants Angular *headless* du Design System 4SH : logique et accessibilité en
5
+ Composants Angular _headless_ du Design System 4SH : logique et accessibilité en
6
6
  natif (signals + Angular CDK), style piloté par les design tokens.
7
7
 
8
8
  **Documentation complète (Storybook)** :
@@ -14,15 +14,15 @@ natif (signals + Angular CDK), style piloté par les design tokens.
14
14
 
15
15
  À choisir **avant** d'installer : la décision conditionne toute la suite.
16
16
 
17
- | | **dépendance** | **starter** |
18
- |---|---|---|
19
- | Installation | `npm install @4sh/ui-kit` | `ng add @4sh/ui-kit-schematics` |
20
- | Ce qui arrive dans votre dépôt | rien — les composants compilés restent dans `node_modules` | les *sources* des composants, dans `src/app/shared/` |
21
- | Imports | `@4sh/ui-kit/actions/ui-button` | votre propre chemin (`./shared/components/ui/actions/ui-button`) |
22
- | Styles | `node_modules/@4sh/ui-kit/styles.css`, chargée globalement | copiés dans `src/styles/`, avec la chaîne de génération des tokens (`npm run tokens:build`) |
23
- | Documentation | le Storybook lié ci-dessus | la vôtre, sur vos copies (posée par `ng add`) |
24
- | Personnalisation | inputs + variables CSS | modifier le code lui-même |
25
- | Mise à jour | bump de version | `ng generate @4sh/ui-kit-schematics:update` — diff par composant, appliquer ou ignorer |
17
+ | | **dépendance** | **starter** |
18
+ | ------------------------------ | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
19
+ | Installation | `npm install @4sh/ui-kit` | `ng add @4sh/ui-kit-schematics` |
20
+ | Ce qui arrive dans votre dépôt | rien — les composants compilés restent dans `node_modules` | les _sources_ des composants, dans `src/app/shared/` |
21
+ | Imports | `@4sh/ui-kit/actions/ui-button` | votre propre chemin (`./shared/components/ui/actions/ui-button`) |
22
+ | Styles | `node_modules/@4sh/ui-kit/styles.css`, chargée globalement | copiés dans `src/styles/`, avec la chaîne de génération des tokens (`npm run tokens:build`) |
23
+ | Documentation | le Storybook lié ci-dessus | la vôtre, sur vos copies (posée par `ng add`) |
24
+ | Personnalisation | inputs + variables CSS | modifier le code lui-même |
25
+ | Mise à jour | bump de version | `ng generate @4sh/ui-kit-schematics:update` — diff par composant, appliquer ou ignorer |
26
26
 
27
27
  **dépendance** est le mode par défaut : rien à maintenir, une seule version à
28
28
  suivre, et la garantie que tous les projets affichent le même kit. **starter** —
@@ -45,10 +45,10 @@ npm install @4sh/ui-kit
45
45
  Publié sur le **registre npm public**, organisation **`4sh`** :
46
46
  [npmjs.com/package/@4sh/ui-kit](https://www.npmjs.com/package/@4sh/ui-kit)
47
47
 
48
- | Requiert | |
49
- |---|---|
50
- | Angular | `^22.0.0` — `core`, `common`, `forms`, `router`, `platform-browser`, `cdk` |
51
- | RxJS | `^7.8.0` |
48
+ | Requiert | |
49
+ | -------- | -------------------------------------------------------------------------- |
50
+ | Angular | `^22.0.0` — `core`, `common`, `forms`, `router`, `platform-browser`, `cdk` |
51
+ | RxJS | `^7.8.0` |
52
52
 
53
53
  Déclarées en `peerDependencies` : c'est la version déjà présente dans votre
54
54
  application qui est utilisée, jamais un second exemplaire d'Angular.
@@ -56,8 +56,8 @@ application qui est utilisée, jamais un second exemplaire d'Angular.
56
56
  ### Ou copier les sources à la place
57
57
 
58
58
  Ce package vous donne les composants **compilés** : vous les importez et vous
59
- suivez les releases du kit. Si vous préférez avoir les sources *dans votre propre
60
- dépôt*, pour les lire et les modifier — l'approche shadcn/spartan-ng — c'est
59
+ suivez les releases du kit. Si vous préférez avoir les sources _dans votre propre
60
+ dépôt_, pour les lire et les modifier — l'approche shadcn/spartan-ng — c'est
61
61
  l'autre mode, et il passe par le package compagnon :
62
62
 
63
63
  ```bash
@@ -124,7 +124,7 @@ couche de base, les classes typographiques et les presets d'animation de la dire
124
124
  `UiMotion`. **Sans elle, les composants s'affichent sans style** — rien ne plante, tout
125
125
  est simplement faux visuellement.
126
126
 
127
- Les `@font-face` ne sont **pas** inclus : les tokens se contentent de *nommer* les
127
+ Les `@font-face` ne sont **pas** inclus : les tokens se contentent de _nommer_ les
128
128
  familles (`--fontfamily-base`), et chacune se termine par une pile système, une
129
129
  application qui n'embarque aucun fichier de police s'affiche donc dans le sans-serif de
130
130
  l'OS (San Francisco, Segoe UI, Roboto), jamais dans le serif par défaut du navigateur.
@@ -143,7 +143,9 @@ import { UiDatepicker } from '@4sh/ui-kit/forms/ui-datepicker';
143
143
  imports: [UiDatepicker],
144
144
  template: `<ui-datepicker label="Date" valueType="date" [(ngModel)]="date" />`,
145
145
  })
146
- export class Booking { date = signal<Date | null>(null); }
146
+ export class Booking {
147
+ date = signal<Date | null>(null);
148
+ }
147
149
  ```
148
150
 
149
151
  C'est toute l'installation. Deux composants demandent un provider chacun — voir
@@ -153,7 +155,7 @@ C'est toute l'installation. Deux composants demandent un provider chacun — voi
153
155
 
154
156
  ## Import à la carte (secondary entry points)
155
157
 
156
- Chaque composant est exposé par son propre *entry point*. Vous importez ce dont
158
+ Chaque composant est exposé par son propre _entry point_. Vous importez ce dont
157
159
  vous avez besoin, et le tree-shaking élimine le reste de votre bundle final :
158
160
 
159
161
  ```ts
@@ -175,25 +177,25 @@ famille ci-dessous est littéralement le segment de chemin, en minuscules :
175
177
  (54 composants au total — `ui-file-upload-list` est livré dans
176
178
  `ui-file-upload`, dont il consomme le modèle.)
177
179
 
178
- | Famille | Entry points |
179
- |---|---|
180
- | Actions | `ui-button` · `ui-button-split` · `ui-link` |
181
- | Formulaires | `ui-input` · `ui-textarea` · `ui-select` · `ui-autocomplete` · `ui-datepicker` · `ui-checkbox` · `ui-radio` · `ui-toggle` · `ui-slider` · `ui-nudger` · `ui-rating` · `ui-segment-control` · `ui-input-number` · `ui-input-mask` · `ui-input-otp` · `ui-input-tags` · `ui-input-group` · `ui-file-upload` · `ui-field` · `ui-label` |
182
- | Informatif | `ui-alert` · `ui-toast` · `ui-badge` · `ui-chip` · `ui-tag` · `ui-avatar` · `ui-avatar-group` · `ui-accordion` · `ui-tooltip` · `ui-spinner` · `ui-skeleton` · `ui-progress-bar` · `ui-empty-state` · `ui-read-only` · `ui-separator` · `ui-helper` |
183
- | Mise en page | `ui-card` · `ui-modal` · `ui-drawer` · `ui-popover` |
184
- | Navigation | `ui-menu` · `ui-context-menu` · `ui-tabs` · `ui-stepper` · `ui-sidebar` · `ui-breadcrumb` |
185
- | Tableau | `ui-table` · `ui-paginator` |
186
- | Base | `ui-icon` · `ui-image` |
180
+ | Famille | Entry points |
181
+ | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
182
+ | Actions | `ui-button` · `ui-button-split` · `ui-link` |
183
+ | Formulaires | `ui-input` · `ui-textarea` · `ui-select` · `ui-autocomplete` · `ui-datepicker` · `ui-checkbox` · `ui-radio` · `ui-toggle` · `ui-slider` · `ui-nudger` · `ui-rating` · `ui-segment-control` · `ui-input-number` · `ui-input-mask` · `ui-input-otp` · `ui-input-tags` · `ui-input-group` · `ui-file-upload` · `ui-field` · `ui-label` |
184
+ | Informatif | `ui-alert` · `ui-toast` · `ui-badge` · `ui-chip` · `ui-tag` · `ui-avatar` · `ui-avatar-group` · `ui-accordion` · `ui-tooltip` · `ui-spinner` · `ui-skeleton` · `ui-progress-bar` · `ui-empty-state` · `ui-read-only` · `ui-separator` · `ui-helper` |
185
+ | Mise en page | `ui-card` · `ui-modal` · `ui-drawer` · `ui-popover` |
186
+ | Navigation | `ui-menu` · `ui-context-menu` · `ui-tabs` · `ui-stepper` · `ui-sidebar` · `ui-breadcrumb` |
187
+ | Tableau | `ui-table` · `ui-paginator` |
188
+ | Base | `ui-icon` · `ui-image` |
187
189
 
188
190
  Plus les entry points transverses :
189
191
 
190
- | Entry point | Contenu |
191
- |---|---|
192
- | `@4sh/ui-kit/forms` | Socle des champs de formulaire — voir ci-dessous |
192
+ | Entry point | Contenu |
193
+ | --------------------- | ------------------------------------------------------------------------------------------------------- |
194
+ | `@4sh/ui-kit/forms` | Socle des champs de formulaire — voir ci-dessous |
193
195
  | `@4sh/ui-kit/theming` | `ThemeService` (clair/sombre, `[data-theme]`) · `BrandService` (`[data-brand]`) · `provideUiKitBrand()` |
194
- | `@4sh/ui-kit/motion` | Directive `UiMotion` + presets d'animation |
195
- | `@4sh/ui-kit/overlay` | Utilitaires des composants à overlay CDK (`closeOnNavigation`) |
196
- | `@4sh/ui-kit/types` | Types transverses (`UiLevel`, `UiSubLevel`, `UiFeedbackLevel`) |
196
+ | `@4sh/ui-kit/motion` | Directive `UiMotion` + presets d'animation |
197
+ | `@4sh/ui-kit/overlay` | Utilitaires des composants à overlay CDK (`closeOnNavigation`) |
198
+ | `@4sh/ui-kit/types` | Types transverses (`UiLevel`, `UiSubLevel`, `UiFeedbackLevel`) |
197
199
 
198
200
  ---
199
201
 
@@ -213,7 +215,7 @@ providers: [
213
215
  provideUiKitBrand(brandFromSubdomain(subdomain)),
214
216
  // carte des assets locaux de VOTRE projet, consommée par `ui-image` (input `name`)
215
217
  provideUiImageAssets(assetsMap),
216
- ]
218
+ ];
217
219
  ```
218
220
 
219
221
  Les deux sont **optionnels** : sans eux, la marque vaut `brand1` et `ui-image`
@@ -254,13 +256,13 @@ mixins et constantes partagées.
254
256
  Le clair/sombre et la marque sont des **attributs sur `<html>`** — rien à importer,
255
257
  `styles.css` porte déjà tous les modes :
256
258
 
257
- | Attribut | Valeurs | Absent signifie |
258
- |---|---|---|
259
- | `data-theme` | `dark` | clair |
260
- | `data-brand` | `brand2`, `brand3` | marque 1 |
259
+ | Attribut | Valeurs | Absent signifie |
260
+ | ------------ | ------------------ | --------------- |
261
+ | `data-theme` | `dark` | clair |
262
+ | `data-brand` | `brand2`, `brand3` | marque 1 |
261
263
 
262
264
  ```html
263
- <html data-theme="dark" data-brand="brand2">
265
+ <html data-theme="dark" data-brand="brand2"></html>
264
266
  ```
265
267
 
266
268
  À poser comme vous voulez (un service, du SSR, un flag de build) : le kit ne fait que
@@ -270,12 +272,18 @@ Pour changer une valeur, trois niveaux, du plus large au plus étroit :
270
272
 
271
273
  ```scss
272
274
  // src/styles/main.scss — chargé après styles.css
273
- @use 'presets/component-vars'; // 2. les valeurs d'un composant
275
+ @use 'presets/component-vars'; // 2. les valeurs d'un composant
274
276
 
275
- :root { --units-lg: 20px; } // 1. un token : tout le kit suit
276
- :root[data-theme='dark'] { --global-background-default: #101014; }
277
+ :root {
278
+ --units-lg: 20px;
279
+ } // 1. un token : tout le kit suit
280
+ :root[data-theme='dark'] {
281
+ --global-background-default: #101014;
282
+ }
277
283
 
278
- .toolbar ui-button { --ui-button-height-small: 24px; } // 3. une zone de l'écran
284
+ .toolbar ui-button {
285
+ --ui-button-height-small: 24px;
286
+ } // 3. une zone de l'écran
279
287
  ```
280
288
 
281
289
  1. **Un token** (`--units-*`, `--radius-*`, `--actions-*`…) — doit venir **après**
@@ -284,14 +292,14 @@ Pour changer une valeur, trois niveaux, du plus large au plus étroit :
284
292
  2. **Les valeurs d'un composant** — copier `@4sh/ui-kit/styles/component-vars.scss`
285
293
  dans votre `styles/presets/` : toutes les variables `--ui-*` à leur valeur livrée,
286
294
  prêtes à retoucher. L'ordre de chargement n'importe pas ici, le kit ne fait que
287
- *lire* ces noms.
295
+ _lire_ ces noms.
288
296
  Les valeurs partagées par toute une famille sont dans le même fichier, en
289
297
  `--ui-form-*` / `--ui-control-*` / `--ui-overlay-panel-*` : une seule déclaration
290
298
  déplace tous les consommateurs, et une variable de composant reste prioritaire.
291
299
  3. **Une zone** — la même variable `--ui-*` sur n'importe quel sélecteur ou élément.
292
300
 
293
301
  Référence complète (chaque variable, son rôle, sa valeur mesurée) : Storybook →
294
- *Spécifications → Thème & Système de Tokens*.
302
+ _Spécifications → Thème & Système de Tokens_.
295
303
 
296
304
  ---
297
305
 
@@ -302,14 +310,14 @@ Cet entry point regroupe l'infrastructure partagée par tous les champs du kit.
302
310
  `UiSelect`, `UiDatepicker`… le tirent déjà). Il devient utile quand vous
303
311
  construisez **votre propre champ** en réutilisant les conventions du kit.
304
312
 
305
- | Export | Rôle |
306
- |---|---|
307
- | `BaseControlValueAccessor<T>` | Implémente `ControlValueAccessor` et miroite l'état du `NgControl` attaché dans des signals (`touched`, `dirty`, `controlInvalid`, `controlErrors`, `showError`). C'est ce qui rend un champ compatible d'un coup avec `[(ngModel)]`, les Reactive Forms **et** les Signal Forms. |
308
- | `BaseFieldControl<T>` | Contrôle « nu », sans habillage : inputs communs (`ariaLabel`, `inputId`, `name`, `required`, `disabled`, `readonly`, `invalid`, `tabindex`), génération d'`id` accessibles, `modelValue`, états dérivés `isDisabled`/`isInvalid`. Base de `ui-checkbox`, `ui-toggle`, `ui-slider`, `ui-radio`, `ui-nudger`. |
309
- | `BaseFormField<T>` | Étend le précédent avec le chrome « boîte » : `label`, `helperText`, `errorText`, `size`, `level`, plus `effectiveLevel` / `displayMessage` / `displayValue`. Base de `ui-input`, `ui-select`, `ui-datepicker`, `ui-textarea`… |
310
- | `dropdownOverlayPositions()` | Ancrage CDK standard d'un panneau déroulant (sous le champ, retourné au-dessus si besoin). |
311
- | `maskEngine` | Moteur de masque de saisie partagé (`ui-input-mask`, `ui-datepicker`). |
312
- | `option-resolver`, `format-label`, `warn-missing-accessible-name` | Utilitaires de résolution d'options, de formatage de libellé et garde-fou d'accessibilité. |
313
+ | Export | Rôle |
314
+ | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
315
+ | `BaseControlValueAccessor<T>` | Implémente `ControlValueAccessor` et miroite l'état du `NgControl` attaché dans des signals (`touched`, `dirty`, `controlInvalid`, `controlErrors`, `showError`). C'est ce qui rend un champ compatible d'un coup avec `[(ngModel)]`, les Reactive Forms **et** les Signal Forms. |
316
+ | `BaseFieldControl<T>` | Contrôle « nu », sans habillage : inputs communs (`ariaLabel`, `inputId`, `name`, `required`, `disabled`, `readonly`, `invalid`, `tabindex`), génération d'`id` accessibles, `modelValue`, états dérivés `isDisabled`/`isInvalid`. Base de `ui-checkbox`, `ui-toggle`, `ui-slider`, `ui-radio`, `ui-nudger`. |
317
+ | `BaseFormField<T>` | Étend le précédent avec le chrome « boîte » : `label`, `helperText`, `errorText`, `size`, `level`, plus `effectiveLevel` / `displayMessage` / `displayValue`. Base de `ui-input`, `ui-select`, `ui-datepicker`, `ui-textarea`… |
318
+ | `dropdownOverlayPositions()` | Ancrage CDK standard d'un panneau déroulant (sous le champ, retourné au-dessus si besoin). |
319
+ | `maskEngine` | Moteur de masque de saisie partagé (`ui-input-mask`, `ui-datepicker`). |
320
+ | `option-resolver`, `format-label`, `warn-missing-accessible-name` | Utilitaires de résolution d'options, de formatage de libellé et garde-fou d'accessibilité. |
313
321
 
314
322
  ### Créer son propre champ
315
323
 
@@ -321,9 +329,7 @@ import { BaseFormField } from '@4sh/ui-kit/forms';
321
329
  @Component({
322
330
  selector: 'app-my-field',
323
331
  templateUrl: './my-field.html',
324
- providers: [
325
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyField), multi: true },
326
- ],
332
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyField), multi: true }],
327
333
  })
328
334
  export class MyField extends BaseFormField<string> {
329
335
  // `writeValue` est fourni par défaut (écrit dans `modelValue`).
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @4sh/ui-kit
2
2
 
3
- ***English** · [Français](./README.fr.md)*
3
+ _**English** · [Français](./README.fr.md)_
4
4
 
5
- *Headless* Angular components from the 4SH Design System: logic and accessibility
5
+ _Headless_ Angular components from the 4SH Design System: logic and accessibility
6
6
  built in natively (signals + Angular CDK), styling driven by design tokens.
7
7
 
8
8
  **Full documentation (Storybook)**:
@@ -14,15 +14,15 @@ built in natively (signals + Angular CDK), styling driven by design tokens.
14
14
 
15
15
  Choose **before** installing: the decision shapes everything that follows.
16
16
 
17
- | | **dependency** | **starter** |
18
- |---|---|---|
19
- | Install | `npm install @4sh/ui-kit` | `ng add @4sh/ui-kit-schematics` |
20
- | What lands in your repo | nothing — compiled components stay in `node_modules` | the component *sources*, in `src/app/shared/` |
21
- | Imports | `@4sh/ui-kit/actions/ui-button` | your own path (`./shared/components/ui/actions/ui-button`) |
22
- | Styles | `node_modules/@4sh/ui-kit/styles.css`, loaded globally | copied into `src/styles/`, with the token generation chain (`npm run tokens:build`) |
23
- | Documentation | the Storybook linked above | yours, on your own copies (set up by `ng add`) |
24
- | Customization | inputs + CSS variables | edit the code itself |
25
- | Updating | bump the version | `ng generate @4sh/ui-kit-schematics:update` — per-component diff, accept or skip |
17
+ | | **dependency** | **starter** |
18
+ | ----------------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------- |
19
+ | Install | `npm install @4sh/ui-kit` | `ng add @4sh/ui-kit-schematics` |
20
+ | What lands in your repo | nothing — compiled components stay in `node_modules` | the component _sources_, in `src/app/shared/` |
21
+ | Imports | `@4sh/ui-kit/actions/ui-button` | your own path (`./shared/components/ui/actions/ui-button`) |
22
+ | Styles | `node_modules/@4sh/ui-kit/styles.css`, loaded globally | copied into `src/styles/`, with the token generation chain (`npm run tokens:build`) |
23
+ | Documentation | the Storybook linked above | yours, on your own copies (set up by `ng add`) |
24
+ | Customization | inputs + CSS variables | edit the code itself |
25
+ | Updating | bump the version | `ng generate @4sh/ui-kit-schematics:update` — per-component diff, accept or skip |
26
26
 
27
27
  **dependency** is the default: nothing to maintain, one version to follow, and a
28
28
  guarantee that every project renders the same kit. **starter** — the shadcn/ui or
@@ -45,10 +45,10 @@ npm install @4sh/ui-kit
45
45
  Published on the **public npm registry**, under the **`4sh`** organization:
46
46
  [npmjs.com/package/@4sh/ui-kit](https://www.npmjs.com/package/@4sh/ui-kit)
47
47
 
48
- | Requires | |
49
- |---|---|
50
- | Angular | `^22.0.0` — `core`, `common`, `forms`, `router`, `platform-browser`, `cdk` |
51
- | RxJS | `^7.8.0` |
48
+ | Requires | |
49
+ | -------- | -------------------------------------------------------------------------- |
50
+ | Angular | `^22.0.0` — `core`, `common`, `forms`, `router`, `platform-browser`, `cdk` |
51
+ | RxJS | `^7.8.0` |
52
52
 
53
53
  These are declared as `peerDependencies`: the version already present in your
54
54
  application is the one used, never a second copy of Angular.
@@ -56,7 +56,7 @@ application is the one used, never a second copy of Angular.
56
56
  ### Or copy the sources instead
57
57
 
58
58
  This package gives you **compiled** components: you import them and follow the
59
- kit's releases. If you would rather have the sources *in your own repository*, to
59
+ kit's releases. If you would rather have the sources _in your own repository_, to
60
60
  read and edit them — the shadcn/spartan-ng approach — that is the other mode, and
61
61
  it goes through the companion package:
62
62
 
@@ -121,7 +121,7 @@ package ships them.
121
121
  layer, the typography classes and the animation presets of the `UiMotion` directive.
122
122
  **Without it, components render unstyled** — nothing errors, everything just looks wrong.
123
123
 
124
- `@font-face` rules are **not** included: the tokens merely *name* the families
124
+ `@font-face` rules are **not** included: the tokens merely _name_ the families
125
125
  (`--fontfamily-base`), and every one of them ends with a system fallback stack, so an app
126
126
  that ships no font file renders in the OS sans (San Francisco, Segoe UI, Roboto), never in
127
127
  the browser's serif default. To use your own: declare the `@font-face` rules in a global
@@ -139,7 +139,9 @@ import { UiDatepicker } from '@4sh/ui-kit/forms/ui-datepicker';
139
139
  imports: [UiDatepicker],
140
140
  template: `<ui-datepicker label="Date" valueType="date" [(ngModel)]="date" />`,
141
141
  })
142
- export class Booking { date = signal<Date | null>(null); }
142
+ export class Booking {
143
+ date = signal<Date | null>(null);
144
+ }
143
145
  ```
144
146
 
145
147
  That is the whole setup. Two components need one provider each — see
@@ -149,7 +151,7 @@ That is the whole setup. Two components need one provider each — see
149
151
 
150
152
  ## À la carte imports (secondary entry points)
151
153
 
152
- Every component is exposed through its own *entry point*. You import what you
154
+ Every component is exposed through its own _entry point_. You import what you
153
155
  need, and tree-shaking drops the rest from your final bundle:
154
156
 
155
157
  ```ts
@@ -171,25 +173,25 @@ below is literally the path segment, lowercased:
171
173
  (54 components in total — `ui-file-upload-list` ships inside `ui-file-upload`,
172
174
  whose model it consumes.)
173
175
 
174
- | Family | Entry points |
175
- |---|---|
176
- | Actions | `ui-button` · `ui-button-split` · `ui-link` |
177
- | Forms | `ui-input` · `ui-textarea` · `ui-select` · `ui-autocomplete` · `ui-datepicker` · `ui-checkbox` · `ui-radio` · `ui-toggle` · `ui-slider` · `ui-nudger` · `ui-rating` · `ui-segment-control` · `ui-input-number` · `ui-input-mask` · `ui-input-otp` · `ui-input-tags` · `ui-input-group` · `ui-file-upload` · `ui-field` · `ui-label` |
178
- | Informative | `ui-alert` · `ui-toast` · `ui-badge` · `ui-chip` · `ui-tag` · `ui-avatar` · `ui-avatar-group` · `ui-accordion` · `ui-tooltip` · `ui-spinner` · `ui-skeleton` · `ui-progress-bar` · `ui-empty-state` · `ui-read-only` · `ui-separator` · `ui-helper` |
179
- | Layout | `ui-card` · `ui-modal` · `ui-drawer` · `ui-popover` |
180
- | Navigation | `ui-menu` · `ui-context-menu` · `ui-tabs` · `ui-stepper` · `ui-sidebar` · `ui-breadcrumb` |
181
- | Table | `ui-table` · `ui-paginator` |
182
- | Base | `ui-icon` · `ui-image` |
176
+ | Family | Entry points |
177
+ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
178
+ | Actions | `ui-button` · `ui-button-split` · `ui-link` |
179
+ | Forms | `ui-input` · `ui-textarea` · `ui-select` · `ui-autocomplete` · `ui-datepicker` · `ui-checkbox` · `ui-radio` · `ui-toggle` · `ui-slider` · `ui-nudger` · `ui-rating` · `ui-segment-control` · `ui-input-number` · `ui-input-mask` · `ui-input-otp` · `ui-input-tags` · `ui-input-group` · `ui-file-upload` · `ui-field` · `ui-label` |
180
+ | Informative | `ui-alert` · `ui-toast` · `ui-badge` · `ui-chip` · `ui-tag` · `ui-avatar` · `ui-avatar-group` · `ui-accordion` · `ui-tooltip` · `ui-spinner` · `ui-skeleton` · `ui-progress-bar` · `ui-empty-state` · `ui-read-only` · `ui-separator` · `ui-helper` |
181
+ | Layout | `ui-card` · `ui-modal` · `ui-drawer` · `ui-popover` |
182
+ | Navigation | `ui-menu` · `ui-context-menu` · `ui-tabs` · `ui-stepper` · `ui-sidebar` · `ui-breadcrumb` |
183
+ | Table | `ui-table` · `ui-paginator` |
184
+ | Base | `ui-icon` · `ui-image` |
183
185
 
184
186
  Plus the cross-cutting entry points:
185
187
 
186
- | Entry point | Contents |
187
- |---|---|
188
- | `@4sh/ui-kit/forms` | Form field foundation — see below |
188
+ | Entry point | Contents |
189
+ | --------------------- | ----------------------------------------------------------------------------------------------------- |
190
+ | `@4sh/ui-kit/forms` | Form field foundation — see below |
189
191
  | `@4sh/ui-kit/theming` | `ThemeService` (light/dark, `[data-theme]`) · `BrandService` (`[data-brand]`) · `provideUiKitBrand()` |
190
- | `@4sh/ui-kit/motion` | `UiMotion` directive + animation presets |
191
- | `@4sh/ui-kit/overlay` | Helpers for CDK overlay components (`closeOnNavigation`) |
192
- | `@4sh/ui-kit/types` | Cross-cutting types (`UiLevel`, `UiSubLevel`, `UiFeedbackLevel`) |
192
+ | `@4sh/ui-kit/motion` | `UiMotion` directive + animation presets |
193
+ | `@4sh/ui-kit/overlay` | Helpers for CDK overlay components (`closeOnNavigation`) |
194
+ | `@4sh/ui-kit/types` | Cross-cutting types (`UiLevel`, `UiSubLevel`, `UiFeedbackLevel`) |
193
195
 
194
196
  ---
195
197
 
@@ -209,7 +211,7 @@ providers: [
209
211
  provideUiKitBrand(brandFromSubdomain(subdomain)),
210
212
  // map of YOUR project's local assets, consumed by `ui-image` (`name` input)
211
213
  provideUiImageAssets(assetsMap),
212
- ]
214
+ ];
213
215
  ```
214
216
 
215
217
  Both are **optional**: without them the brand defaults to `brand1`, and
@@ -250,13 +252,13 @@ shared functions, mixins and constants.
250
252
  Light/dark and brand are **attributes on `<html>`** — nothing to import, `styles.css`
251
253
  already carries every mode:
252
254
 
253
- | Attribute | Values | Absent means |
254
- |---|---|---|
255
- | `data-theme` | `dark` | light |
256
- | `data-brand` | `brand2`, `brand3` | brand 1 |
255
+ | Attribute | Values | Absent means |
256
+ | ------------ | ------------------ | ------------ |
257
+ | `data-theme` | `dark` | light |
258
+ | `data-brand` | `brand2`, `brand3` | brand 1 |
257
259
 
258
260
  ```html
259
- <html data-theme="dark" data-brand="brand2">
261
+ <html data-theme="dark" data-brand="brand2"></html>
260
262
  ```
261
263
 
262
264
  Set them however suits you (a service, SSR, a build flag): the kit only reads them.
@@ -265,12 +267,18 @@ To change a value, three levels, from the broadest to the narrowest:
265
267
 
266
268
  ```scss
267
269
  // src/styles/main.scss — loaded after styles.css
268
- @use 'presets/component-vars'; // 2. one component's values
270
+ @use 'presets/component-vars'; // 2. one component's values
269
271
 
270
- :root { --units-lg: 20px; } // 1. a token: the whole kit follows
271
- :root[data-theme='dark'] { --global-background-default: #101014; }
272
+ :root {
273
+ --units-lg: 20px;
274
+ } // 1. a token: the whole kit follows
275
+ :root[data-theme='dark'] {
276
+ --global-background-default: #101014;
277
+ }
272
278
 
273
- .toolbar ui-button { --ui-button-height-small: 24px; } // 3. one area of the screen
279
+ .toolbar ui-button {
280
+ --ui-button-height-small: 24px;
281
+ } // 3. one area of the screen
274
282
  ```
275
283
 
276
284
  1. **A token** (`--units-*`, `--radius-*`, `--actions-*`…) — must come **after**
@@ -278,14 +286,14 @@ To change a value, three levels, from the broadest to the narrowest:
278
286
  selector (`:root[data-theme='dark']`).
279
287
  2. **A component's values** — copy `@4sh/ui-kit/styles/component-vars.scss` into your
280
288
  `styles/presets/`: every `--ui-*` variable at its shipped value, ready to retune.
281
- Load order is irrelevant here, the kit only *reads* these names.
289
+ Load order is irrelevant here, the kit only _reads_ these names.
282
290
  Values shared by a whole family live in the same file under `--ui-form-*` /
283
291
  `--ui-control-*` / `--ui-overlay-panel-*`: one declaration moves every consumer,
284
292
  and a component-level variable still wins over it.
285
293
  3. **One area** — the same `--ui-*` on any selector or element.
286
294
 
287
295
  Full reference (every variable, its role and its measured value): Storybook →
288
- *Spécifications → Thème & Système de Tokens*.
296
+ _Spécifications → Thème & Système de Tokens_.
289
297
 
290
298
  ---
291
299
 
@@ -296,14 +304,14 @@ This entry point gathers the infrastructure shared by every field in the kit.
296
304
  `UiSelect`, `UiDatepicker`… already pull it in). It becomes useful when you
297
305
  build **your own field** while reusing the kit's conventions.
298
306
 
299
- | Export | Role |
300
- |---|---|
301
- | `BaseControlValueAccessor<T>` | Implements `ControlValueAccessor` and mirrors the state of the attached `NgControl` into signals (`touched`, `dirty`, `controlInvalid`, `controlErrors`, `showError`). This is what makes a field compatible in one go with `[(ngModel)]`, Reactive Forms **and** Signal Forms. |
302
- | `BaseFieldControl<T>` | A "bare" control, with no chrome: common inputs (`ariaLabel`, `inputId`, `name`, `required`, `disabled`, `readonly`, `invalid`, `tabindex`), accessible `id` generation, `modelValue`, derived `isDisabled`/`isInvalid` states. Base of `ui-checkbox`, `ui-toggle`, `ui-slider`, `ui-radio`, `ui-nudger`. |
303
- | `BaseFormField<T>` | Extends the previous one with the "box" chrome: `label`, `helperText`, `errorText`, `size`, `level`, plus `effectiveLevel` / `displayMessage` / `displayValue`. Base of `ui-input`, `ui-select`, `ui-datepicker`, `ui-textarea`… |
304
- | `dropdownOverlayPositions()` | Standard CDK anchoring for a dropdown panel (below the field, flipped above when needed). |
305
- | `maskEngine` | Shared input mask engine (`ui-input-mask`, `ui-datepicker`). |
306
- | `option-resolver`, `format-label`, `warn-missing-accessible-name` | Option resolution, label formatting and accessibility guardrail helpers. |
307
+ | Export | Role |
308
+ | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
309
+ | `BaseControlValueAccessor<T>` | Implements `ControlValueAccessor` and mirrors the state of the attached `NgControl` into signals (`touched`, `dirty`, `controlInvalid`, `controlErrors`, `showError`). This is what makes a field compatible in one go with `[(ngModel)]`, Reactive Forms **and** Signal Forms. |
310
+ | `BaseFieldControl<T>` | A "bare" control, with no chrome: common inputs (`ariaLabel`, `inputId`, `name`, `required`, `disabled`, `readonly`, `invalid`, `tabindex`), accessible `id` generation, `modelValue`, derived `isDisabled`/`isInvalid` states. Base of `ui-checkbox`, `ui-toggle`, `ui-slider`, `ui-radio`, `ui-nudger`. |
311
+ | `BaseFormField<T>` | Extends the previous one with the "box" chrome: `label`, `helperText`, `errorText`, `size`, `level`, plus `effectiveLevel` / `displayMessage` / `displayValue`. Base of `ui-input`, `ui-select`, `ui-datepicker`, `ui-textarea`… |
312
+ | `dropdownOverlayPositions()` | Standard CDK anchoring for a dropdown panel (below the field, flipped above when needed). |
313
+ | `maskEngine` | Shared input mask engine (`ui-input-mask`, `ui-datepicker`). |
314
+ | `option-resolver`, `format-label`, `warn-missing-accessible-name` | Option resolution, label formatting and accessibility guardrail helpers. |
307
315
 
308
316
  ### Building your own field
309
317
 
@@ -315,9 +323,7 @@ import { BaseFormField } from '@4sh/ui-kit/forms';
315
323
  @Component({
316
324
  selector: 'app-my-field',
317
325
  templateUrl: './my-field.html',
318
- providers: [
319
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyField), multi: true },
320
- ],
326
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyField), multi: true }],
321
327
  })
322
328
  export class MyField extends BaseFormField<string> {
323
329
  // `writeValue` is provided by default (writes into `modelValue`).
@@ -131,12 +131,12 @@ class UiButtonSplit {
131
131
  this.dropdownClick.emit(event);
132
132
  this.menu()?.toggle(event);
133
133
  }
134
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: UiButtonSplit, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
135
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.1", type: UiButtonSplit, isStandalone: true, selector: "ui-button-split", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: true, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, onColor: { classPropertyName: "onColor", publicName: "onColor", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, buttonDisabled: { classPropertyName: "buttonDisabled", publicName: "buttonDisabled", isSignal: true, isRequired: false, transformFunction: null }, menuButtonDisabled: { classPropertyName: "menuButtonDisabled", publicName: "menuButtonDisabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, menuButtonAriaLabel: { classPropertyName: "menuButtonAriaLabel", publicName: "menuButtonAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, menuAriaLabel: { classPropertyName: "menuAriaLabel", publicName: "menuAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, menuLevel: { classPropertyName: "menuLevel", publicName: "menuLevel", isSignal: true, isRequired: false, transformFunction: null }, menuStyleClass: { classPropertyName: "menuStyleClass", publicName: "menuStyleClass", isSignal: true, isRequired: false, transformFunction: null }, autoFlip: { classPropertyName: "autoFlip", publicName: "autoFlip", isSignal: true, isRequired: false, transformFunction: null }, motion: { classPropertyName: "motion", publicName: "motion", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, buttonProps: { classPropertyName: "buttonProps", publicName: "buttonProps", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick", dropdownClick: "dropdownClick", menuShow: "menuShow", menuHide: "menuHide", itemClick: "itemClick" }, viewQueries: [{ propertyName: "actionButton", first: true, predicate: ["action"], descendants: true, isSignal: true }, { propertyName: "menu", first: true, predicate: ["menu"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"classes()\">\n <!-- Default action -->\n <ui-button\n #action\n class=\"ui-button-split-action\"\n [label]=\"label()\"\n [ariaLabel]=\"ariaLabel()\"\n [icon]=\"icon()\"\n [iconPos]=\"iconPos()\"\n [level]=\"level()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [onColor]=\"onColor()\"\n [disabled]=\"actionDisabled()\"\n [tabindex]=\"tabindex()\"\n [buttonProps]=\"buttonProps()\"\n (buttonClick)=\"onButtonClick($event)\"\n >\n <ng-content />\n </ui-button>\n\n <!-- Dropdown trigger -->\n <ui-button\n class=\"ui-button-split-trigger\"\n [icon]=\"dropdownIcon()\"\n [ariaLabel]=\"menuButtonAriaLabel()\"\n [level]=\"level()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [onColor]=\"onColor()\"\n [disabled]=\"triggerDisabled()\"\n iconOnly\n [buttonProps]=\"{ 'aria-haspopup': 'menu', 'aria-expanded': menuOpen() ? 'true' : 'false', 'aria-controls': menu.uid }\"\n (buttonClick)=\"onDropdownClick($event)\"\n />\n\n <!-- Options popup (anchored to the trigger) -->\n <ui-menu\n #menu\n popup\n [items]=\"model()\"\n [level]=\"menuLevel()\"\n [size]=\"menuSize()\"\n [motion]=\"motion()\"\n [autoFlip]=\"autoFlip()\"\n [ariaLabel]=\"menuAriaLabel()\"\n [styleClass]=\"menuStyleClass()\"\n (opened)=\"menuOpen.set(true); menuShow.emit()\"\n (closed)=\"menuOpen.set(false); menuHide.emit()\"\n (itemClick)=\"itemClick.emit($event)\"\n />\n</div>\n", styles: [".ui-button-split{display:inline-flex;align-items:stretch}.ui-button-split-action,.ui-button-split-trigger{position:relative}.ui-button-split-action:hover,.ui-button-split-action:focus-within,.ui-button-split-trigger:hover,.ui-button-split-trigger:focus-within{z-index:1}.ui-button-split-action{--ui-button-radius: var(--radius-sm) 0 0 var(--radius-sm)}.ui-button-split-trigger{--ui-button-radius: 0 var(--radius-sm) var(--radius-sm) 0;margin-left:calc(-1 * var(--ui-button-split-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))))}\n"], dependencies: [{ kind: "component", type: UiButton, selector: "ui-button", inputs: ["label", "ariaLabel", "type", "level", "variant", "onColor", "size", "icon", "iconPos", "iconOnly", "loading", "loadingIcon", "expanded", "rounded", "disabled", "tabindex", "buttonProps", "iconTemplate", "loadingIconTemplate", "href", "routerLink", "target", "rel"], outputs: ["buttonClick", "buttonFocus", "buttonBlur"] }, { kind: "component", type: UiMenu, selector: "ui-menu", inputs: ["items", "popup", "expandedKeys", "ariaLabel", "ariaLabelledBy", "styleClass", "level", "size", "submenus", "motion", "autoFlip", "tabindex", "itemTemplate", "submenuHeaderTemplate"], outputs: ["expandedKeysChange", "opened", "closed", "itemClick"] }] }); }
134
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiButtonSplit, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
135
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: UiButtonSplit, isStandalone: true, selector: "ui-button-split", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: true, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, onColor: { classPropertyName: "onColor", publicName: "onColor", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, buttonDisabled: { classPropertyName: "buttonDisabled", publicName: "buttonDisabled", isSignal: true, isRequired: false, transformFunction: null }, menuButtonDisabled: { classPropertyName: "menuButtonDisabled", publicName: "menuButtonDisabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, menuButtonAriaLabel: { classPropertyName: "menuButtonAriaLabel", publicName: "menuButtonAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, menuAriaLabel: { classPropertyName: "menuAriaLabel", publicName: "menuAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, menuLevel: { classPropertyName: "menuLevel", publicName: "menuLevel", isSignal: true, isRequired: false, transformFunction: null }, menuStyleClass: { classPropertyName: "menuStyleClass", publicName: "menuStyleClass", isSignal: true, isRequired: false, transformFunction: null }, autoFlip: { classPropertyName: "autoFlip", publicName: "autoFlip", isSignal: true, isRequired: false, transformFunction: null }, motion: { classPropertyName: "motion", publicName: "motion", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, buttonProps: { classPropertyName: "buttonProps", publicName: "buttonProps", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick", dropdownClick: "dropdownClick", menuShow: "menuShow", menuHide: "menuHide", itemClick: "itemClick" }, viewQueries: [{ propertyName: "actionButton", first: true, predicate: ["action"], descendants: true, isSignal: true }, { propertyName: "menu", first: true, predicate: ["menu"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"classes()\">\n <!-- Default action -->\n <ui-button\n #action\n class=\"ui-button-split-action\"\n [label]=\"label()\"\n [ariaLabel]=\"ariaLabel()\"\n [icon]=\"icon()\"\n [iconPos]=\"iconPos()\"\n [level]=\"level()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [onColor]=\"onColor()\"\n [disabled]=\"actionDisabled()\"\n [tabindex]=\"tabindex()\"\n [buttonProps]=\"buttonProps()\"\n (buttonClick)=\"onButtonClick($event)\"\n >\n <ng-content />\n </ui-button>\n\n <!-- Dropdown trigger -->\n <ui-button\n class=\"ui-button-split-trigger\"\n [icon]=\"dropdownIcon()\"\n [ariaLabel]=\"menuButtonAriaLabel()\"\n [level]=\"level()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [onColor]=\"onColor()\"\n [disabled]=\"triggerDisabled()\"\n iconOnly\n [buttonProps]=\"{\n 'aria-haspopup': 'menu',\n 'aria-expanded': menuOpen() ? 'true' : 'false',\n 'aria-controls': menu.uid,\n }\"\n (buttonClick)=\"onDropdownClick($event)\"\n />\n\n <!-- Options popup (anchored to the trigger) -->\n <ui-menu\n #menu\n popup\n [items]=\"model()\"\n [level]=\"menuLevel()\"\n [size]=\"menuSize()\"\n [motion]=\"motion()\"\n [autoFlip]=\"autoFlip()\"\n [ariaLabel]=\"menuAriaLabel()\"\n [styleClass]=\"menuStyleClass()\"\n (opened)=\"menuOpen.set(true); menuShow.emit()\"\n (closed)=\"menuOpen.set(false); menuHide.emit()\"\n (itemClick)=\"itemClick.emit($event)\"\n />\n</div>\n", styles: [".ui-button-split{display:inline-flex;align-items:stretch}.ui-button-split-action,.ui-button-split-trigger{position:relative}.ui-button-split-action:hover,.ui-button-split-action:focus-within,.ui-button-split-trigger:hover,.ui-button-split-trigger:focus-within{z-index:1}.ui-button-split-action{--ui-button-radius: var(--radius-sm) 0 0 var(--radius-sm)}.ui-button-split-trigger{--ui-button-radius: 0 var(--radius-sm) var(--radius-sm) 0;margin-left:calc(-1 * var(--ui-button-split-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))))}\n"], dependencies: [{ kind: "component", type: UiButton, selector: "ui-button", inputs: ["label", "ariaLabel", "type", "level", "variant", "onColor", "size", "icon", "iconPos", "iconOnly", "loading", "loadingIcon", "expanded", "rounded", "disabled", "tabindex", "buttonProps", "iconTemplate", "loadingIconTemplate", "href", "routerLink", "target", "rel"], outputs: ["buttonClick", "buttonFocus", "buttonBlur"] }, { kind: "component", type: UiMenu, selector: "ui-menu", inputs: ["items", "popup", "expandedKeys", "ariaLabel", "ariaLabelledBy", "styleClass", "level", "size", "submenus", "motion", "autoFlip", "tabindex", "itemTemplate", "submenuHeaderTemplate"], outputs: ["expandedKeysChange", "opened", "closed", "itemClick"] }] }); }
136
136
  }
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: UiButtonSplit, decorators: [{
137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiButtonSplit, decorators: [{
138
138
  type: Component,
139
- args: [{ selector: 'ui-button-split', imports: [UiButton, UiMenu], template: "<div [class]=\"classes()\">\n <!-- Default action -->\n <ui-button\n #action\n class=\"ui-button-split-action\"\n [label]=\"label()\"\n [ariaLabel]=\"ariaLabel()\"\n [icon]=\"icon()\"\n [iconPos]=\"iconPos()\"\n [level]=\"level()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [onColor]=\"onColor()\"\n [disabled]=\"actionDisabled()\"\n [tabindex]=\"tabindex()\"\n [buttonProps]=\"buttonProps()\"\n (buttonClick)=\"onButtonClick($event)\"\n >\n <ng-content />\n </ui-button>\n\n <!-- Dropdown trigger -->\n <ui-button\n class=\"ui-button-split-trigger\"\n [icon]=\"dropdownIcon()\"\n [ariaLabel]=\"menuButtonAriaLabel()\"\n [level]=\"level()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [onColor]=\"onColor()\"\n [disabled]=\"triggerDisabled()\"\n iconOnly\n [buttonProps]=\"{ 'aria-haspopup': 'menu', 'aria-expanded': menuOpen() ? 'true' : 'false', 'aria-controls': menu.uid }\"\n (buttonClick)=\"onDropdownClick($event)\"\n />\n\n <!-- Options popup (anchored to the trigger) -->\n <ui-menu\n #menu\n popup\n [items]=\"model()\"\n [level]=\"menuLevel()\"\n [size]=\"menuSize()\"\n [motion]=\"motion()\"\n [autoFlip]=\"autoFlip()\"\n [ariaLabel]=\"menuAriaLabel()\"\n [styleClass]=\"menuStyleClass()\"\n (opened)=\"menuOpen.set(true); menuShow.emit()\"\n (closed)=\"menuOpen.set(false); menuHide.emit()\"\n (itemClick)=\"itemClick.emit($event)\"\n />\n</div>\n", styles: [".ui-button-split{display:inline-flex;align-items:stretch}.ui-button-split-action,.ui-button-split-trigger{position:relative}.ui-button-split-action:hover,.ui-button-split-action:focus-within,.ui-button-split-trigger:hover,.ui-button-split-trigger:focus-within{z-index:1}.ui-button-split-action{--ui-button-radius: var(--radius-sm) 0 0 var(--radius-sm)}.ui-button-split-trigger{--ui-button-radius: 0 var(--radius-sm) var(--radius-sm) 0;margin-left:calc(-1 * var(--ui-button-split-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))))}\n"] }]
139
+ args: [{ selector: 'ui-button-split', imports: [UiButton, UiMenu], template: "<div [class]=\"classes()\">\n <!-- Default action -->\n <ui-button\n #action\n class=\"ui-button-split-action\"\n [label]=\"label()\"\n [ariaLabel]=\"ariaLabel()\"\n [icon]=\"icon()\"\n [iconPos]=\"iconPos()\"\n [level]=\"level()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [onColor]=\"onColor()\"\n [disabled]=\"actionDisabled()\"\n [tabindex]=\"tabindex()\"\n [buttonProps]=\"buttonProps()\"\n (buttonClick)=\"onButtonClick($event)\"\n >\n <ng-content />\n </ui-button>\n\n <!-- Dropdown trigger -->\n <ui-button\n class=\"ui-button-split-trigger\"\n [icon]=\"dropdownIcon()\"\n [ariaLabel]=\"menuButtonAriaLabel()\"\n [level]=\"level()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [onColor]=\"onColor()\"\n [disabled]=\"triggerDisabled()\"\n iconOnly\n [buttonProps]=\"{\n 'aria-haspopup': 'menu',\n 'aria-expanded': menuOpen() ? 'true' : 'false',\n 'aria-controls': menu.uid,\n }\"\n (buttonClick)=\"onDropdownClick($event)\"\n />\n\n <!-- Options popup (anchored to the trigger) -->\n <ui-menu\n #menu\n popup\n [items]=\"model()\"\n [level]=\"menuLevel()\"\n [size]=\"menuSize()\"\n [motion]=\"motion()\"\n [autoFlip]=\"autoFlip()\"\n [ariaLabel]=\"menuAriaLabel()\"\n [styleClass]=\"menuStyleClass()\"\n (opened)=\"menuOpen.set(true); menuShow.emit()\"\n (closed)=\"menuOpen.set(false); menuHide.emit()\"\n (itemClick)=\"itemClick.emit($event)\"\n />\n</div>\n", styles: [".ui-button-split{display:inline-flex;align-items:stretch}.ui-button-split-action,.ui-button-split-trigger{position:relative}.ui-button-split-action:hover,.ui-button-split-action:focus-within,.ui-button-split-trigger:hover,.ui-button-split-trigger:focus-within{z-index:1}.ui-button-split-action{--ui-button-radius: var(--radius-sm) 0 0 var(--radius-sm)}.ui-button-split-trigger{--ui-button-radius: 0 var(--radius-sm) var(--radius-sm) 0;margin-left:calc(-1 * var(--ui-button-split-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))))}\n"] }]
140
140
  }], propDecorators: { model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPos", required: false }] }], dropdownIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownIcon", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], onColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "onColor", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], buttonDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonDisabled", required: false }] }], menuButtonDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuButtonDisabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], menuButtonAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuButtonAriaLabel", required: false }] }], menuAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuAriaLabel", required: false }] }], menuLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuLevel", required: false }] }], menuStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuStyleClass", required: false }] }], autoFlip: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFlip", required: false }] }], motion: [{ type: i0.Input, args: [{ isSignal: true, alias: "motion", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], buttonProps: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonProps", required: false }] }], buttonClick: [{ type: i0.Output, args: ["buttonClick"] }], dropdownClick: [{ type: i0.Output, args: ["dropdownClick"] }], menuShow: [{ type: i0.Output, args: ["menuShow"] }], menuHide: [{ type: i0.Output, args: ["menuHide"] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], actionButton: [{ type: i0.ViewChild, args: ['action', { isSignal: true }] }], menu: [{ type: i0.ViewChild, args: ['menu', { isSignal: true }] }] } });
141
141
 
142
142
  /*