@4sh/ui-kit 0.4.0 → 0.6.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 (111) hide show
  1. package/README.fr.md +73 -60
  2. package/README.md +72 -59
  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 +43 -17
  77. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  78. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +4 -4
  79. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  80. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +4 -4
  81. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  82. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +23 -7
  83. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  84. package/fesm2022/4sh-ui-kit-motion.mjs +3 -3
  85. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  86. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +10 -5
  87. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  88. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +3 -3
  89. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  90. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +79 -14
  91. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  92. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +15 -13
  93. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  94. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +29 -21
  95. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  96. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +15 -15
  97. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  98. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +4 -4
  99. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  100. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +55 -42
  101. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  102. package/fesm2022/4sh-ui-kit-theming.mjs +7 -7
  103. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  104. package/mcp/LICENSE +201 -0
  105. package/mcp/data/text-search-docs.json +7046 -0
  106. package/mcp/data/ui-config.json +16960 -0
  107. package/mcp/index.js +33018 -0
  108. package/mcp/package.json +18 -0
  109. package/package.json +10 -4
  110. package/schematics/index.cjs +28 -18
  111. package/types/4sh-ui-kit-layout-ui-card.d.ts +13 -1
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
@@ -87,13 +87,20 @@ voie n'a pas de hook à l'installation — ajoutez-le vous-même, une fois, dans
87
87
  {
88
88
  "mcpServers": {
89
89
  "ui-kit": {
90
- "command": "node",
91
- "args": ["node_modules/@4sh/ui-kit/mcp/index.js"]
90
+ "command": "npx",
91
+ "args": ["--no-install", "ui-kit-mcp"]
92
92
  }
93
93
  }
94
94
  }
95
95
  ```
96
96
 
97
+ `npm install` pose `ui-kit-mcp` dans le `node_modules/.bin/` du projet : cette forme
98
+ se résout donc quel que soit le dossier depuis lequel votre client MCP lance le
99
+ serveur — un `node node_modules/@4sh/ui-kit/mcp/index.js` en dur est relatif au
100
+ répertoire courant et casse dès que ce n'est pas la racine du projet. Gardez
101
+ `--no-install` : npx échoue franchement si le binaire manque, au lieu d'aller
102
+ chercher sur le registre un paquet homonyme sans rapport.
103
+
97
104
  Rien à installer au-delà de `@4sh/ui-kit` lui-même, et rien à aller chercher sur le
98
105
  registre npm à l'usage — le fichier est déjà sur le disque une fois `npm install`
99
106
  passé. Tools : `list_components`, `get_component_doc`, `search_docs`,
@@ -124,7 +131,7 @@ couche de base, les classes typographiques et les presets d'animation de la dire
124
131
  `UiMotion`. **Sans elle, les composants s'affichent sans style** — rien ne plante, tout
125
132
  est simplement faux visuellement.
126
133
 
127
- Les `@font-face` ne sont **pas** inclus : les tokens se contentent de *nommer* les
134
+ Les `@font-face` ne sont **pas** inclus : les tokens se contentent de _nommer_ les
128
135
  familles (`--fontfamily-base`), et chacune se termine par une pile système, une
129
136
  application qui n'embarque aucun fichier de police s'affiche donc dans le sans-serif de
130
137
  l'OS (San Francisco, Segoe UI, Roboto), jamais dans le serif par défaut du navigateur.
@@ -143,7 +150,9 @@ import { UiDatepicker } from '@4sh/ui-kit/forms/ui-datepicker';
143
150
  imports: [UiDatepicker],
144
151
  template: `<ui-datepicker label="Date" valueType="date" [(ngModel)]="date" />`,
145
152
  })
146
- export class Booking { date = signal<Date | null>(null); }
153
+ export class Booking {
154
+ date = signal<Date | null>(null);
155
+ }
147
156
  ```
148
157
 
149
158
  C'est toute l'installation. Deux composants demandent un provider chacun — voir
@@ -153,7 +162,7 @@ C'est toute l'installation. Deux composants demandent un provider chacun — voi
153
162
 
154
163
  ## Import à la carte (secondary entry points)
155
164
 
156
- Chaque composant est exposé par son propre *entry point*. Vous importez ce dont
165
+ Chaque composant est exposé par son propre _entry point_. Vous importez ce dont
157
166
  vous avez besoin, et le tree-shaking élimine le reste de votre bundle final :
158
167
 
159
168
  ```ts
@@ -175,25 +184,25 @@ famille ci-dessous est littéralement le segment de chemin, en minuscules :
175
184
  (54 composants au total — `ui-file-upload-list` est livré dans
176
185
  `ui-file-upload`, dont il consomme le modèle.)
177
186
 
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` |
187
+ | Famille | Entry points |
188
+ | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
189
+ | Actions | `ui-button` · `ui-button-split` · `ui-link` |
190
+ | 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` |
191
+ | 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` |
192
+ | Mise en page | `ui-card` · `ui-modal` · `ui-drawer` · `ui-popover` |
193
+ | Navigation | `ui-menu` · `ui-context-menu` · `ui-tabs` · `ui-stepper` · `ui-sidebar` · `ui-breadcrumb` |
194
+ | Tableau | `ui-table` · `ui-paginator` |
195
+ | Base | `ui-icon` · `ui-image` |
187
196
 
188
197
  Plus les entry points transverses :
189
198
 
190
- | Entry point | Contenu |
191
- |---|---|
192
- | `@4sh/ui-kit/forms` | Socle des champs de formulaire — voir ci-dessous |
199
+ | Entry point | Contenu |
200
+ | --------------------- | ------------------------------------------------------------------------------------------------------- |
201
+ | `@4sh/ui-kit/forms` | Socle des champs de formulaire — voir ci-dessous |
193
202
  | `@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`) |
203
+ | `@4sh/ui-kit/motion` | Directive `UiMotion` + presets d'animation |
204
+ | `@4sh/ui-kit/overlay` | Utilitaires des composants à overlay CDK (`closeOnNavigation`) |
205
+ | `@4sh/ui-kit/types` | Types transverses (`UiLevel`, `UiSubLevel`, `UiFeedbackLevel`) |
197
206
 
198
207
  ---
199
208
 
@@ -213,7 +222,7 @@ providers: [
213
222
  provideUiKitBrand(brandFromSubdomain(subdomain)),
214
223
  // carte des assets locaux de VOTRE projet, consommée par `ui-image` (input `name`)
215
224
  provideUiImageAssets(assetsMap),
216
- ]
225
+ ];
217
226
  ```
218
227
 
219
228
  Les deux sont **optionnels** : sans eux, la marque vaut `brand1` et `ui-image`
@@ -254,13 +263,13 @@ mixins et constantes partagées.
254
263
  Le clair/sombre et la marque sont des **attributs sur `<html>`** — rien à importer,
255
264
  `styles.css` porte déjà tous les modes :
256
265
 
257
- | Attribut | Valeurs | Absent signifie |
258
- |---|---|---|
259
- | `data-theme` | `dark` | clair |
260
- | `data-brand` | `brand2`, `brand3` | marque 1 |
266
+ | Attribut | Valeurs | Absent signifie |
267
+ | ------------ | ------------------ | --------------- |
268
+ | `data-theme` | `dark` | clair |
269
+ | `data-brand` | `brand2`, `brand3` | marque 1 |
261
270
 
262
271
  ```html
263
- <html data-theme="dark" data-brand="brand2">
272
+ <html data-theme="dark" data-brand="brand2"></html>
264
273
  ```
265
274
 
266
275
  À poser comme vous voulez (un service, du SSR, un flag de build) : le kit ne fait que
@@ -270,12 +279,18 @@ Pour changer une valeur, trois niveaux, du plus large au plus étroit :
270
279
 
271
280
  ```scss
272
281
  // src/styles/main.scss — chargé après styles.css
273
- @use 'presets/component-vars'; // 2. les valeurs d'un composant
282
+ @use 'presets/component-vars'; // 2. les valeurs d'un composant
274
283
 
275
- :root { --units-lg: 20px; } // 1. un token : tout le kit suit
276
- :root[data-theme='dark'] { --global-background-default: #101014; }
284
+ :root {
285
+ --units-lg: 20px;
286
+ } // 1. un token : tout le kit suit
287
+ :root[data-theme='dark'] {
288
+ --global-background-default: #101014;
289
+ }
277
290
 
278
- .toolbar ui-button { --ui-button-height-small: 24px; } // 3. une zone de l'écran
291
+ .toolbar ui-button {
292
+ --ui-button-height-small: 24px;
293
+ } // 3. une zone de l'écran
279
294
  ```
280
295
 
281
296
  1. **Un token** (`--units-*`, `--radius-*`, `--actions-*`…) — doit venir **après**
@@ -284,14 +299,14 @@ Pour changer une valeur, trois niveaux, du plus large au plus étroit :
284
299
  2. **Les valeurs d'un composant** — copier `@4sh/ui-kit/styles/component-vars.scss`
285
300
  dans votre `styles/presets/` : toutes les variables `--ui-*` à leur valeur livrée,
286
301
  prêtes à retoucher. L'ordre de chargement n'importe pas ici, le kit ne fait que
287
- *lire* ces noms.
302
+ _lire_ ces noms.
288
303
  Les valeurs partagées par toute une famille sont dans le même fichier, en
289
304
  `--ui-form-*` / `--ui-control-*` / `--ui-overlay-panel-*` : une seule déclaration
290
305
  déplace tous les consommateurs, et une variable de composant reste prioritaire.
291
306
  3. **Une zone** — la même variable `--ui-*` sur n'importe quel sélecteur ou élément.
292
307
 
293
308
  Référence complète (chaque variable, son rôle, sa valeur mesurée) : Storybook →
294
- *Spécifications → Thème & Système de Tokens*.
309
+ _Spécifications → Thème & Système de Tokens_.
295
310
 
296
311
  ---
297
312
 
@@ -302,14 +317,14 @@ Cet entry point regroupe l'infrastructure partagée par tous les champs du kit.
302
317
  `UiSelect`, `UiDatepicker`… le tirent déjà). Il devient utile quand vous
303
318
  construisez **votre propre champ** en réutilisant les conventions du kit.
304
319
 
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é. |
320
+ | Export | Rôle |
321
+ | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
322
+ | `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. |
323
+ | `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`. |
324
+ | `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`… |
325
+ | `dropdownOverlayPositions()` | Ancrage CDK standard d'un panneau déroulant (sous le champ, retourné au-dessus si besoin). |
326
+ | `maskEngine` | Moteur de masque de saisie partagé (`ui-input-mask`, `ui-datepicker`). |
327
+ | `option-resolver`, `format-label`, `warn-missing-accessible-name` | Utilitaires de résolution d'options, de formatage de libellé et garde-fou d'accessibilité. |
313
328
 
314
329
  ### Créer son propre champ
315
330
 
@@ -321,9 +336,7 @@ import { BaseFormField } from '@4sh/ui-kit/forms';
321
336
  @Component({
322
337
  selector: 'app-my-field',
323
338
  templateUrl: './my-field.html',
324
- providers: [
325
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyField), multi: true },
326
- ],
339
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyField), multi: true }],
327
340
  })
328
341
  export class MyField extends BaseFormField<string> {
329
342
  // `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
 
@@ -86,13 +86,20 @@ install-time hook — add it yourself, once, to your `.mcp.json`:
86
86
  {
87
87
  "mcpServers": {
88
88
  "ui-kit": {
89
- "command": "node",
90
- "args": ["node_modules/@4sh/ui-kit/mcp/index.js"]
89
+ "command": "npx",
90
+ "args": ["--no-install", "ui-kit-mcp"]
91
91
  }
92
92
  }
93
93
  }
94
94
  ```
95
95
 
96
+ `npm install` links `ui-kit-mcp` into your project's `node_modules/.bin/`, so this
97
+ form resolves no matter which directory your MCP client starts the server from — a
98
+ hardcoded `node node_modules/@4sh/ui-kit/mcp/index.js` is relative to the working
99
+ directory and breaks as soon as that isn't the project root. Keep `--no-install`: it
100
+ makes npx fail loudly when the bin is missing, rather than fetching an unrelated
101
+ package of that name from the registry.
102
+
96
103
  Nothing to install beyond `@4sh/ui-kit` itself, and nothing to reach on the npm
97
104
  registry at run time — the file is already on disk once `npm install` has run. Tools:
98
105
  `list_components`, `get_component_doc`, `search_docs`, `get_shared_config` — same
@@ -121,7 +128,7 @@ package ships them.
121
128
  layer, the typography classes and the animation presets of the `UiMotion` directive.
122
129
  **Without it, components render unstyled** — nothing errors, everything just looks wrong.
123
130
 
124
- `@font-face` rules are **not** included: the tokens merely *name* the families
131
+ `@font-face` rules are **not** included: the tokens merely _name_ the families
125
132
  (`--fontfamily-base`), and every one of them ends with a system fallback stack, so an app
126
133
  that ships no font file renders in the OS sans (San Francisco, Segoe UI, Roboto), never in
127
134
  the browser's serif default. To use your own: declare the `@font-face` rules in a global
@@ -139,7 +146,9 @@ import { UiDatepicker } from '@4sh/ui-kit/forms/ui-datepicker';
139
146
  imports: [UiDatepicker],
140
147
  template: `<ui-datepicker label="Date" valueType="date" [(ngModel)]="date" />`,
141
148
  })
142
- export class Booking { date = signal<Date | null>(null); }
149
+ export class Booking {
150
+ date = signal<Date | null>(null);
151
+ }
143
152
  ```
144
153
 
145
154
  That is the whole setup. Two components need one provider each — see
@@ -149,7 +158,7 @@ That is the whole setup. Two components need one provider each — see
149
158
 
150
159
  ## À la carte imports (secondary entry points)
151
160
 
152
- Every component is exposed through its own *entry point*. You import what you
161
+ Every component is exposed through its own _entry point_. You import what you
153
162
  need, and tree-shaking drops the rest from your final bundle:
154
163
 
155
164
  ```ts
@@ -171,25 +180,25 @@ below is literally the path segment, lowercased:
171
180
  (54 components in total — `ui-file-upload-list` ships inside `ui-file-upload`,
172
181
  whose model it consumes.)
173
182
 
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` |
183
+ | Family | Entry points |
184
+ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
185
+ | Actions | `ui-button` · `ui-button-split` · `ui-link` |
186
+ | 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` |
187
+ | 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` |
188
+ | Layout | `ui-card` · `ui-modal` · `ui-drawer` · `ui-popover` |
189
+ | Navigation | `ui-menu` · `ui-context-menu` · `ui-tabs` · `ui-stepper` · `ui-sidebar` · `ui-breadcrumb` |
190
+ | Table | `ui-table` · `ui-paginator` |
191
+ | Base | `ui-icon` · `ui-image` |
183
192
 
184
193
  Plus the cross-cutting entry points:
185
194
 
186
- | Entry point | Contents |
187
- |---|---|
188
- | `@4sh/ui-kit/forms` | Form field foundation — see below |
195
+ | Entry point | Contents |
196
+ | --------------------- | ----------------------------------------------------------------------------------------------------- |
197
+ | `@4sh/ui-kit/forms` | Form field foundation — see below |
189
198
  | `@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`) |
199
+ | `@4sh/ui-kit/motion` | `UiMotion` directive + animation presets |
200
+ | `@4sh/ui-kit/overlay` | Helpers for CDK overlay components (`closeOnNavigation`) |
201
+ | `@4sh/ui-kit/types` | Cross-cutting types (`UiLevel`, `UiSubLevel`, `UiFeedbackLevel`) |
193
202
 
194
203
  ---
195
204
 
@@ -209,7 +218,7 @@ providers: [
209
218
  provideUiKitBrand(brandFromSubdomain(subdomain)),
210
219
  // map of YOUR project's local assets, consumed by `ui-image` (`name` input)
211
220
  provideUiImageAssets(assetsMap),
212
- ]
221
+ ];
213
222
  ```
214
223
 
215
224
  Both are **optional**: without them the brand defaults to `brand1`, and
@@ -250,13 +259,13 @@ shared functions, mixins and constants.
250
259
  Light/dark and brand are **attributes on `<html>`** — nothing to import, `styles.css`
251
260
  already carries every mode:
252
261
 
253
- | Attribute | Values | Absent means |
254
- |---|---|---|
255
- | `data-theme` | `dark` | light |
256
- | `data-brand` | `brand2`, `brand3` | brand 1 |
262
+ | Attribute | Values | Absent means |
263
+ | ------------ | ------------------ | ------------ |
264
+ | `data-theme` | `dark` | light |
265
+ | `data-brand` | `brand2`, `brand3` | brand 1 |
257
266
 
258
267
  ```html
259
- <html data-theme="dark" data-brand="brand2">
268
+ <html data-theme="dark" data-brand="brand2"></html>
260
269
  ```
261
270
 
262
271
  Set them however suits you (a service, SSR, a build flag): the kit only reads them.
@@ -265,12 +274,18 @@ To change a value, three levels, from the broadest to the narrowest:
265
274
 
266
275
  ```scss
267
276
  // src/styles/main.scss — loaded after styles.css
268
- @use 'presets/component-vars'; // 2. one component's values
277
+ @use 'presets/component-vars'; // 2. one component's values
269
278
 
270
- :root { --units-lg: 20px; } // 1. a token: the whole kit follows
271
- :root[data-theme='dark'] { --global-background-default: #101014; }
279
+ :root {
280
+ --units-lg: 20px;
281
+ } // 1. a token: the whole kit follows
282
+ :root[data-theme='dark'] {
283
+ --global-background-default: #101014;
284
+ }
272
285
 
273
- .toolbar ui-button { --ui-button-height-small: 24px; } // 3. one area of the screen
286
+ .toolbar ui-button {
287
+ --ui-button-height-small: 24px;
288
+ } // 3. one area of the screen
274
289
  ```
275
290
 
276
291
  1. **A token** (`--units-*`, `--radius-*`, `--actions-*`…) — must come **after**
@@ -278,14 +293,14 @@ To change a value, three levels, from the broadest to the narrowest:
278
293
  selector (`:root[data-theme='dark']`).
279
294
  2. **A component's values** — copy `@4sh/ui-kit/styles/component-vars.scss` into your
280
295
  `styles/presets/`: every `--ui-*` variable at its shipped value, ready to retune.
281
- Load order is irrelevant here, the kit only *reads* these names.
296
+ Load order is irrelevant here, the kit only _reads_ these names.
282
297
  Values shared by a whole family live in the same file under `--ui-form-*` /
283
298
  `--ui-control-*` / `--ui-overlay-panel-*`: one declaration moves every consumer,
284
299
  and a component-level variable still wins over it.
285
300
  3. **One area** — the same `--ui-*` on any selector or element.
286
301
 
287
302
  Full reference (every variable, its role and its measured value): Storybook →
288
- *Spécifications → Thème & Système de Tokens*.
303
+ _Spécifications → Thème & Système de Tokens_.
289
304
 
290
305
  ---
291
306
 
@@ -296,14 +311,14 @@ This entry point gathers the infrastructure shared by every field in the kit.
296
311
  `UiSelect`, `UiDatepicker`… already pull it in). It becomes useful when you
297
312
  build **your own field** while reusing the kit's conventions.
298
313
 
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. |
314
+ | Export | Role |
315
+ | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
316
+ | `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. |
317
+ | `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`. |
318
+ | `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`… |
319
+ | `dropdownOverlayPositions()` | Standard CDK anchoring for a dropdown panel (below the field, flipped above when needed). |
320
+ | `maskEngine` | Shared input mask engine (`ui-input-mask`, `ui-datepicker`). |
321
+ | `option-resolver`, `format-label`, `warn-missing-accessible-name` | Option resolution, label formatting and accessibility guardrail helpers. |
307
322
 
308
323
  ### Building your own field
309
324
 
@@ -315,9 +330,7 @@ import { BaseFormField } from '@4sh/ui-kit/forms';
315
330
  @Component({
316
331
  selector: 'app-my-field',
317
332
  templateUrl: './my-field.html',
318
- providers: [
319
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyField), multi: true },
320
- ],
333
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyField), multi: true }],
321
334
  })
322
335
  export class MyField extends BaseFormField<string> {
323
336
  // `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
  /*