@cityway/basic-ui 1.1.0-beta004 → 1.1.0-beta005

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.
Binary file
@@ -20,9 +20,9 @@ Installer `bo-ui` tire transitivement `basic-ui` et `design-tokens`. Installer `
20
20
 
21
21
  **Versions de référence (à la rédaction) :**
22
22
 
23
- - `@cityway/design-tokens` : `1.1.0-beta004`
24
- - `@cityway/basic-ui` : `1.1.0-beta004`
25
- - `@cityway/bo-ui` : `1.1.0-beta004`
23
+ - `@cityway/design-tokens` : `1.1.0-beta005`
24
+ - `@cityway/basic-ui` : `1.1.0-beta005`
25
+ - `@cityway/bo-ui` : `1.1.0-beta005`
26
26
 
27
27
  > Les `peerDependencies` Angular sont en `^20.3.0` (Angular 20). `@angular/cdk` en `^20.2.2`.
28
28
 
@@ -0,0 +1,151 @@
1
+ # `cw-empty-state` — Empty state (état vide)
2
+
3
+ > Lib : `@cityway/basic-ui` · Sélecteur : `cw-empty-state` · Standalone : oui
4
+ > Import : `import { EmptyStateComponent } from '@cityway/basic-ui';`
5
+
6
+ ---
7
+
8
+ ## 1. Rôle & quand l'utiliser
9
+
10
+ Bloc d'**état vide** paramétrable : illustration + titre + description + (jusqu'à) deux boutons d'action. Basé sur le DS (BOU) `Empty State / *`.
11
+
12
+ Couvre :
13
+
14
+ - **3 illustrations DS intégrées** (fichiers SVG livrés dans les assets de la lib : `no-data.svg`, `no-result.svg`, `no-upload.svg`) : `noData`, `noResult`, `noFile` ;
15
+ - une **image custom** (`imageSource`) qui prime sur l'illustration ;
16
+ - un **titre** et une **description** (clés i18n) ;
17
+ - **deux boutons optionnels** (`secondaryButton` + `primaryButton`) avec label, icône et action.
18
+
19
+ Cas d'usage : table/liste sans données, résultat de recherche vide, dropzone sans fichier, page « rien à afficher ». Intégré directement dans `cw-table` (voir §5).
20
+
21
+ À ne PAS utiliser pour : un message d'erreur bloquant (préférer `cw-alert`) ou un chargement (préférer `cw-loader`).
22
+
23
+ ---
24
+
25
+ ## 2. API
26
+
27
+ ### Inputs
28
+
29
+ | Input | Type | Défaut | Description |
30
+ |-------|------|--------|-------------|
31
+ | `illustration` | `EmptyStateIllustrationEnum` | `noData` | Illustration intégrée (`noData` / `noResult` / `noFile` / `none`). Ignorée si `imageSource` est fourni. |
32
+ | `illustrationBasePath` | `string` | `/assets/images/empty-states` | Dossier des SVG d'illustration. À surcharger si l'app sert les assets ailleurs. |
33
+ | `imageSource` | `string` | `undefined` | Image custom (URL / data URI) ; **prime** sur `illustration`. |
34
+ | `imageAlt` | `string` | `''` | Texte alternatif de l'image custom (les illustrations intégrées sont décoratives, `aria-hidden`). |
35
+ | `title` | `string` | — (**requis**) | Titre — **clé i18n** (traduite en interne). |
36
+ | `description` | `string` | `undefined` | Description — clé i18n. |
37
+ | `primaryButton` | `EmptyStateButton` | `undefined` | Bouton principal (style primaire). Rendu seulement si fourni. |
38
+ | `secondaryButton` | `EmptyStateButton` | `undefined` | Bouton secondaire. Rendu seulement si fourni. Affiché **avant** le primaire (ordre DS). |
39
+ | `dataTest` | `string` | `undefined` | Pose l'attribut `data-test-ctw`. |
40
+
41
+ ### Outputs
42
+
43
+ | Output | Payload | Description |
44
+ |--------|---------|-------------|
45
+ | `primaryClick` | `void` | Clic sur le bouton principal. |
46
+ | `secondaryClick` | `void` | Clic sur le bouton secondaire. |
47
+
48
+ ---
49
+
50
+ ## 3. Types
51
+
52
+ ```ts
53
+ enum EmptyStateIllustrationEnum {
54
+ noData = 'no-data', // carte + badge « + »
55
+ noResult = 'no-result', // carte + badge « x »
56
+ noFile = 'no-file', // carte image + badge upload
57
+ none = 'none', // pas d'illustration
58
+ }
59
+
60
+ interface EmptyStateButton {
61
+ label: string; // clé i18n (traduite par cw-button)
62
+ icon?: SpriteIconEnum;
63
+ disabled?: boolean;
64
+ }
65
+ ```
66
+
67
+ ---
68
+
69
+ ## 4. Exemples
70
+
71
+ ### Aucune donnée (avec actions)
72
+
73
+ ```html
74
+ <cw-empty-state
75
+ illustration="no-data"
76
+ title="_USERS._EMPTY.TITLE"
77
+ description="_USERS._EMPTY.DESCRIPTION"
78
+ [secondaryButton]="{ label: '_COMMON._ACTION.IMPORT', icon: spriteIcon.toolbarUpload }"
79
+ [primaryButton]="{ label: '_COMMON._ACTION.ADD', icon: spriteIcon.add }"
80
+ (secondaryClick)="onImport()"
81
+ (primaryClick)="onAdd()">
82
+ </cw-empty-state>
83
+ ```
84
+
85
+ ### Aucun résultat (après filtrage)
86
+
87
+ ```html
88
+ <cw-empty-state
89
+ illustration="no-result"
90
+ title="_COMMON._TABLE.NO_RESULT_TITLE"
91
+ description="_COMMON._TABLE.NO_RESULT_HINT"
92
+ [secondaryButton]="{ label: '_COMMON._ACTION.RESET' }"
93
+ (secondaryClick)="resetFilters()">
94
+ </cw-empty-state>
95
+ ```
96
+
97
+ ### Image custom, sans boutons
98
+
99
+ ```html
100
+ <cw-empty-state
101
+ [imageSource]="'/assets/img/all-done.svg'"
102
+ imageAlt=""
103
+ title="_DASHBOARD._ALL_DONE">
104
+ </cw-empty-state>
105
+ ```
106
+
107
+ ---
108
+
109
+ ## 5. Notes d'intégration
110
+
111
+ - **i18n** : `title` / `description` et les `label` de boutons sont des **clés** (traduits en interne — `cw-button` traduit son label).
112
+ - **Boutons optionnels** : n'apparaissent que si la config est fournie. Ordre : secondaire puis primaire (CTA à droite, conforme DS).
113
+ - **Illustration vs image** : `imageSource` l'emporte toujours. Pour aucune illustration, utiliser `illustration="none"`.
114
+ - **Accessibilité** : les illustrations intégrées sont `aria-hidden` (décoratives) ; pour une image custom porteuse de sens, renseigner `imageAlt`.
115
+ - **Assets** : les SVG sont servis depuis `/assets/images/empty-states/` (les assets de basic-ui y sont copiés via `angular.json`, comme le sprite d'icônes). Une **build basic-ui** est nécessaire pour que les SVG arrivent dans `dist` (Storybook les sert depuis `dist/basic-ui/lib/assets`). Surcharger `illustrationBasePath` si besoin.
116
+ - **Dark mode** : couleurs de texte issues des tokens DS globaux (dark-aware) ; les illustrations utilisent la palette `illustration/*` du DS.
117
+ - **Intégration `cw-table`** : la table accepte `emptyStateNoData` et `emptyStateNoResult` (type `TableEmptyStateConfig`) + un flag `isFiltered`. Quand `data` est vide, la table affiche le `cw-empty-state` correspondant (noResult si `isFiltered`, sinon noData) ; sans config, elle retombe sur le texte `NO_RESULT`. Les boutons de la config portent un `click` direct.
118
+
119
+ ```html
120
+ <cw-table
121
+ [columns]="columns"
122
+ [data]="rows()"
123
+ [isFiltered]="hasActiveFilters()"
124
+ [emptyStateNoData]="{
125
+ illustration: illustrationEnum.noData,
126
+ title: '_USERS._EMPTY.TITLE',
127
+ description: '_USERS._EMPTY.DESCRIPTION',
128
+ primaryButton: { label: '_COMMON._ACTION.ADD', icon: spriteIcon.add, click: () => add() }
129
+ }"
130
+ [emptyStateNoResult]="{
131
+ title: '_COMMON._TABLE.NO_RESULT',
132
+ secondaryButton: { label: '_COMMON._ACTION.RESET', click: () => resetFilters() }
133
+ }">
134
+ </cw-table>
135
+ ```
136
+
137
+ ---
138
+
139
+ ## 6. Prompts-types (génération assistée)
140
+
141
+ > Exemples de formulation pour demander à Claude de générer du code consommant ce composant.
142
+
143
+ - « Ajoute un `cw-empty-state` `noData` avec titre + description et un bouton primaire Ajouter (icône add). »
144
+ - « Sur ma `cw-table`, configure `emptyStateNoData` (Ajouter / Importer) et `emptyStateNoResult` (Réinitialiser) et branche `isFiltered` sur l'état de mes filtres. »
145
+ - « Affiche un état vide avec une image custom et sans bouton quand la liste est vide. »
146
+
147
+ **Rappels pour Claude :**
148
+ - Importer `EmptyStateComponent` (standalone). `title` est **requis** et c'est une **clé i18n**.
149
+ - Les boutons sont optionnels (`primaryButton` / `secondaryButton`) ; brancher `primaryClick` / `secondaryClick`.
150
+ - Dans `cw-table`, passer par `emptyStateNoData` / `emptyStateNoResult` + `isFiltered` (les boutons y portent un `click`).
151
+ - `imageSource` prime sur `illustration` ; pour aucune illustration, `illustration="none"`.
@@ -4660,6 +4660,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImpo
4660
4660
  ], template: "<input\n #fileInput\n type=\"file\"\n hidden\n [accept]=\"effectiveAccept()\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n (change)=\"onInputChange($event)\" />\n\n@if (errorMessage()) {\n <!-- Etat erreur global (DS : Dropzone / Connexion Error) -->\n <div class=\"file-drop file-drop-error\" [attr.data-test-ctw]=\"dataTest() || null\">\n <cw-icon class=\"file-drop-icon file-drop-icon-danger\" [icon]=\"spriteIcon.error\" [iconSize]=\"iconSize.xl\"></cw-icon>\n <p class=\"file-drop-title\">{{ errorMessage() }}</p>\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"'_COMMON._FILE_DROP.RETRY' | translate\"\n [withIcon]=\"spriteIcon.toolbarUpload\"\n (click)=\"onRetry()\"></cw-button>\n </div>\n} @else {\n <!-- Zone de depot -->\n <div\n class=\"file-drop\"\n [class.file-drop-dragging]=\"isDragging()\"\n [class.file-drop-disabled]=\"disabled()\"\n [class.file-drop-picture]=\"isPicture()\"\n role=\"button\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-label]=\"label() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.data-test-ctw]=\"dataTest() || null\"\n (click)=\"openPicker()\"\n (keydown)=\"onKeydown($event)\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\">\n\n @if (isPicture()) {\n <span class=\"file-drop-illustration\" aria-hidden=\"true\">\n <svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <clipPath id=\"cw-file-drop-illu\"><rect width=\"64\" height=\"64\" rx=\"8\" /></clipPath>\n </defs>\n <g clip-path=\"url(#cw-file-drop-illu)\">\n <rect width=\"64\" height=\"64\" fill=\"#dde8f5\" />\n <circle cx=\"45\" cy=\"19\" r=\"7\" fill=\"#ffd166\" />\n <path d=\"M0 64 L22 36 L38 58 L50 28 L64 50 L64 64 Z\" fill=\"#8bbd5a\" />\n <path d=\"M0 64 L16 44 L32 64 Z\" fill=\"#a8c97a\" />\n </g>\n <rect x=\"0.5\" y=\"0.5\" width=\"63\" height=\"63\" rx=\"7.5\" fill=\"none\" stroke=\"#c8d6df\" />\n </svg>\n </span>\n } @else {\n <cw-icon class=\"file-drop-icon\" [icon]=\"spriteIcon.toolbarUpload\" [iconSize]=\"iconSize.xl\"></cw-icon>\n }\n\n <p class=\"file-drop-title\">\n {{ (isPicture() ? '_COMMON._FILE_DROP.DROP_PICTURE' : '_COMMON._FILE_DROP.DROP_FILE') | translate }}\n </p>\n <span class=\"file-drop-or\">{{ '_COMMON._FILE_DROP.OR' | translate }}</span>\n <cw-button\n class=\"file-drop-browse\"\n [type]=\"buttonType.secondary\"\n [label]=\"(isPicture() ? '_COMMON._FILE_DROP.BROWSE_PICTURE' : '_COMMON._FILE_DROP.BROWSE') | translate\"\n [withIcon]=\"spriteIcon.toolbarUpload\"\n [isDisabled]=\"disabled()\"\n (click)=\"onBrowse($event)\"></cw-button>\n </div>\n\n <!-- Textes d'aide -->\n @if (acceptLabel() || maxSizeMb() != null || (isPicture() && recommendedDimensions())) {\n <ul class=\"file-drop-hints\">\n @if (acceptLabel()) {\n <li>{{ '_COMMON._FILE_DROP.ACCEPTED_FORMATS' | translate: { formats: acceptLabel() } }}</li>\n }\n @if (maxSizeMb() != null) {\n <li>{{ '_COMMON._FILE_DROP.MAX_SIZE' | translate: { size: maxSizeMb() + ' Mo' } }}</li>\n }\n @if (isPicture() && recommendedDimensions()) {\n <li>{{ '_COMMON._FILE_DROP.RECOMMENDED_DIMENSIONS' | translate: { dimensions: recommendedDimensions() } }}</li>\n }\n </ul>\n }\n\n <!-- Liste des fichiers / miniatures -->\n @if (items().length) {\n @if (isPicture()) {\n <ul class=\"file-drop-previews\">\n @for (item of items(); track item.file) {\n <li class=\"file-drop-preview\" [class.file-drop-preview-error]=\"item.status === statusEnum.error\">\n @if (item.previewUrl) {\n <img class=\"file-drop-preview-img\" [src]=\"item.previewUrl\" [alt]=\"item.file.name\" />\n } @else {\n <cw-icon [icon]=\"spriteIcon.poiPhoto\" [iconSize]=\"iconSize.lg\"></cw-icon>\n }\n <button\n type=\"button\"\n class=\"file-drop-remove\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'_COMMON._FILE_DROP.REMOVE' | translate: { name: item.file.name }\"\n (click)=\"remove(item)\">\n <cw-icon [icon]=\"spriteIcon.close\" [iconSize]=\"iconSize.xs\"></cw-icon>\n </button>\n @if (item.status === statusEnum.error) {\n <span class=\"file-drop-preview-reason\">{{ reasonKey(item) | translate }}</span>\n }\n </li>\n }\n </ul>\n } @else {\n <ul class=\"file-drop-list\">\n @for (item of items(); track item.file) {\n <li\n class=\"file-drop-file\"\n [class.file-drop-file-success]=\"item.status === statusEnum.success\"\n [class.file-drop-file-error]=\"item.status === statusEnum.error\">\n <cw-icon\n class=\"file-drop-file-icon\"\n [icon]=\"item.status === statusEnum.error ? spriteIcon.error : spriteIcon.file\"\n [iconSize]=\"iconSize.sm\"></cw-icon>\n <span class=\"file-drop-file-name\">{{ item.file.name }}</span>\n @if (item.status === statusEnum.error) {\n <span class=\"file-drop-file-reason\">{{ reasonKey(item) | translate }}</span>\n } @else {\n <span class=\"file-drop-file-size\">{{ humanSize(item.file.size) }}</span>\n }\n <button\n type=\"button\"\n class=\"file-drop-remove\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"'_COMMON._FILE_DROP.REMOVE' | translate: { name: item.file.name }\"\n (click)=\"remove(item)\">\n <cw-icon [icon]=\"spriteIcon.trash\" [iconSize]=\"iconSize.sm\"></cw-icon>\n </button>\n </li>\n }\n </ul>\n }\n }\n}\n" }]
4661
4661
  }], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], acceptLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "acceptLabel", required: false }] }], maxSizeMb: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSizeMb", required: false }] }], recommendedDimensions: [{ type: i0.Input, args: [{ isSignal: true, alias: "recommendedDimensions", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], dataTest: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTest", required: false }] }], filesChange: [{ type: i0.Output, args: ["filesChange"] }], rejected: [{ type: i0.Output, args: ["rejected"] }], retry: [{ type: i0.Output, args: ["retry"] }], fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }] } });
4662
4662
 
4663
+ // Types du composant `cw-empty-state` — alignes sur le DS (BOU) `Empty State / *`.
4664
+ /** Illustration integree (SVG maison cale sur les tokens DS `illustration/*`). */
4665
+ var EmptyStateIllustrationEnum;
4666
+ (function (EmptyStateIllustrationEnum) {
4667
+ /** Carte + badge « + » : aucune donnee, inviter a creer/importer. */
4668
+ EmptyStateIllustrationEnum["noData"] = "no-data";
4669
+ /** Carte + badge « x » : aucun resultat apres filtrage. */
4670
+ EmptyStateIllustrationEnum["noResult"] = "no-result";
4671
+ /** Carte image + badge upload : aucun fichier. */
4672
+ EmptyStateIllustrationEnum["noFile"] = "no-file";
4673
+ /** Pas d'illustration. */
4674
+ EmptyStateIllustrationEnum["none"] = "none";
4675
+ })(EmptyStateIllustrationEnum || (EmptyStateIllustrationEnum = {}));
4676
+
4677
+ /**
4678
+ * Etat vide parametrable (illustration + titre + description + 2 boutons), base sur le DS
4679
+ * (BOU) `Empty State / *`. Utilisable seul ou via `cw-table` (configs noData / noResult).
4680
+ *
4681
+ * - `illustration` : 3 visuels SVG integres (noData / noResult / noFile) ou `none`.
4682
+ * - `imageSource` : image custom qui PRIME sur l'illustration integree.
4683
+ * - `primaryButton` (CTA, style primaire) et `secondaryButton` (style secondaire) sont
4684
+ * optionnels ; ils n'apparaissent que si fournis et emettent `primaryClick` / `secondaryClick`.
4685
+ */
4686
+ class EmptyStateComponent {
4687
+ constructor() {
4688
+ /** Illustration integree. Defaut `noData`. Ignoree si `imageSource` est fourni. */
4689
+ this.illustration = input(EmptyStateIllustrationEnum.noData, ...(ngDevMode ? [{ debugName: "illustration" }] : []));
4690
+ /**
4691
+ * Dossier des SVG d'illustration integres. Defaut `/assets/images/empty-states`
4692
+ * (les assets de basic-ui y sont copies, cf. angular.json / staticDirs Storybook).
4693
+ * A surcharger si l'app sert les assets ailleurs.
4694
+ */
4695
+ this.illustrationBasePath = input('/assets/images/empty-states', ...(ngDevMode ? [{ debugName: "illustrationBasePath" }] : []));
4696
+ /** Image custom (URL) ; prime sur `illustration`. */
4697
+ this.imageSource = input(...(ngDevMode ? [undefined, { debugName: "imageSource" }] : []));
4698
+ /** Texte alternatif de l'image custom (les illustrations integrees sont decoratives). */
4699
+ this.imageAlt = input('', ...(ngDevMode ? [{ debugName: "imageAlt" }] : []));
4700
+ /** Titre (cle i18n). */
4701
+ this.title = input.required(...(ngDevMode ? [{ debugName: "title" }] : []));
4702
+ /** Description (cle i18n). */
4703
+ this.description = input(...(ngDevMode ? [undefined, { debugName: "description" }] : []));
4704
+ /** Bouton principal (CTA primaire). */
4705
+ this.primaryButton = input(...(ngDevMode ? [undefined, { debugName: "primaryButton" }] : []));
4706
+ /** Bouton secondaire. */
4707
+ this.secondaryButton = input(...(ngDevMode ? [undefined, { debugName: "secondaryButton" }] : []));
4708
+ /** Attribut `data-test-ctw`. */
4709
+ this.dataTest = input(...(ngDevMode ? [undefined, { debugName: "dataTest" }] : []));
4710
+ /** Clic sur le bouton principal. */
4711
+ this.primaryClick = output();
4712
+ /** Clic sur le bouton secondaire. */
4713
+ this.secondaryClick = output();
4714
+ this.illustrationEnum = EmptyStateIllustrationEnum;
4715
+ this.buttonType = BoButtonTypeEnum;
4716
+ /** Nom de fichier SVG par illustration (dossier `assets/images/empty-states`). */
4717
+ this.illustrationFiles = {
4718
+ [EmptyStateIllustrationEnum.noData]: 'no-data',
4719
+ [EmptyStateIllustrationEnum.noResult]: 'no-result',
4720
+ [EmptyStateIllustrationEnum.noFile]: 'no-upload',
4721
+ [EmptyStateIllustrationEnum.none]: '',
4722
+ };
4723
+ /** Affiche une illustration integree (ni image custom, ni `none`). */
4724
+ this.showIllustration = computed(() => !this.imageSource() && this.illustration() !== EmptyStateIllustrationEnum.none, ...(ngDevMode ? [{ debugName: "showIllustration" }] : []));
4725
+ /** URL du SVG d'illustration integre. */
4726
+ this.illustrationSrc = computed(() => {
4727
+ const file = this.illustrationFiles[this.illustration()];
4728
+ return file ? `${this.illustrationBasePath()}/${file}.svg` : '';
4729
+ }, ...(ngDevMode ? [{ debugName: "illustrationSrc" }] : []));
4730
+ }
4731
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: EmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4732
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.20", type: EmptyStateComponent, isStandalone: true, selector: "cw-empty-state", inputs: { illustration: { classPropertyName: "illustration", publicName: "illustration", isSignal: true, isRequired: false, transformFunction: null }, illustrationBasePath: { classPropertyName: "illustrationBasePath", publicName: "illustrationBasePath", isSignal: true, isRequired: false, transformFunction: null }, imageSource: { classPropertyName: "imageSource", publicName: "imageSource", isSignal: true, isRequired: false, transformFunction: null }, imageAlt: { classPropertyName: "imageAlt", publicName: "imageAlt", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, primaryButton: { classPropertyName: "primaryButton", publicName: "primaryButton", isSignal: true, isRequired: false, transformFunction: null }, secondaryButton: { classPropertyName: "secondaryButton", publicName: "secondaryButton", isSignal: true, isRequired: false, transformFunction: null }, dataTest: { classPropertyName: "dataTest", publicName: "dataTest", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { primaryClick: "primaryClick", secondaryClick: "secondaryClick" }, ngImport: i0, template: "<div class=\"empty-state\" [attr.data-test-ctw]=\"dataTest() || null\">\n @if (imageSource()) {\n <img\n class=\"empty-state-illustration\"\n [src]=\"imageSource()!\"\n [alt]=\"imageAlt()\"\n [attr.aria-hidden]=\"imageAlt() ? null : 'true'\" />\n } @else if (showIllustration()) {\n <img class=\"empty-state-illustration\" [src]=\"illustrationSrc()\" alt=\"\" aria-hidden=\"true\" />\n }\n\n <p class=\"empty-state-title\">{{ title() | translate }}</p>\n @if (description()) {\n <p class=\"empty-state-description\">{{ description()! | translate }}</p>\n }\n\n @if (secondaryButton() || primaryButton()) {\n <div class=\"empty-state-actions\">\n @if (secondaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"secondaryClick.emit()\"></cw-button>\n }\n @if (primaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.primary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"primaryClick.emit()\"></cw-button>\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "cw-button", inputs: ["type", "label", "id", "link", "isDropdown", "hideCaret", "withIcon", "withOnlyIcon", "iconSize", "iconPosition", "dropdownPosition", "isMinWidth", "isDisabled", "isLoading", "cssClass", "dataTest", "skeletonMode", "withTooltip", "tooltipText", "tooltipTitle", "tooltipTrigger", "tooltipPosition", "tooltipType"], outputs: ["btnAction", "dropDownClicked"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
4733
+ }
4734
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.20", ngImport: i0, type: EmptyStateComponent, decorators: [{
4735
+ type: Component,
4736
+ args: [{ selector: 'cw-empty-state', standalone: true, imports: [TranslatePipe, ButtonComponent], template: "<div class=\"empty-state\" [attr.data-test-ctw]=\"dataTest() || null\">\n @if (imageSource()) {\n <img\n class=\"empty-state-illustration\"\n [src]=\"imageSource()!\"\n [alt]=\"imageAlt()\"\n [attr.aria-hidden]=\"imageAlt() ? null : 'true'\" />\n } @else if (showIllustration()) {\n <img class=\"empty-state-illustration\" [src]=\"illustrationSrc()\" alt=\"\" aria-hidden=\"true\" />\n }\n\n <p class=\"empty-state-title\">{{ title() | translate }}</p>\n @if (description()) {\n <p class=\"empty-state-description\">{{ description()! | translate }}</p>\n }\n\n @if (secondaryButton() || primaryButton()) {\n <div class=\"empty-state-actions\">\n @if (secondaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.secondary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"secondaryClick.emit()\"></cw-button>\n }\n @if (primaryButton(); as btn) {\n <cw-button\n [type]=\"buttonType.primary\"\n [label]=\"btn.label\"\n [withIcon]=\"btn.icon\"\n [isDisabled]=\"btn.disabled ?? false\"\n (btnAction)=\"primaryClick.emit()\"></cw-button>\n }\n </div>\n }\n</div>\n" }]
4737
+ }], propDecorators: { illustration: [{ type: i0.Input, args: [{ isSignal: true, alias: "illustration", required: false }] }], illustrationBasePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "illustrationBasePath", required: false }] }], imageSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageSource", required: false }] }], imageAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageAlt", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], primaryButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryButton", required: false }] }], secondaryButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryButton", required: false }] }], dataTest: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTest", required: false }] }], primaryClick: [{ type: i0.Output, args: ["primaryClick"] }], secondaryClick: [{ type: i0.Output, args: ["secondaryClick"] }] } });
4738
+
4663
4739
  /**
4664
4740
  * Sélecteur de langue présentational.
4665
4741
  *
@@ -4920,5 +4996,5 @@ const CW_DEFAULT_THEME_OPTIONS = [
4920
4996
  * Generated bundle index. Do not edit.
4921
4997
  */
4922
4998
 
4923
- export { AccordionComponent, AlertComponent, AlertTypeEnum, BadgeComponent, BadgePositionEnum, BadgeTypeEnum, BoButtonTypeEnum, BoTabTypeEnum, BreadcrumbComponent, ButtonComponent, ButtonIconSizeEnum, ButtonPositionEnum, CW_DEFAULT_THEME_OPTIONS, CardComponent, CardTitleRankEnum, CardTypeEnum, ClickOutsideDirective, CollapseDirective, CwThemeKeyEnum, CwTooltipDirective, DropdownComponent, DropdownItemDirective, DropdownPositionEnum, FileDropComponent, FileDropFileStatusEnum, FileDropModeEnum, FileDropRejectReasonEnum, FileToDownloadComponent, FoButtonTypeEnum, FoTabTypeEnum, FocusTrackerService, FormFieldComponent, FormFieldTypeEnum, IconComponent, IconNotifSizeEnum, IconNotifTypeEnum, IconNotificationComponent, IconSizeEnum, IconTypeEnum, IconUiTypeEnum, ImageComponent, LanguageSelectorComponent, LegendComponent, LegendTypeEnum, LoaderComponent, LoaderSizeEnum, ModalsComponent, ModalsService, ModalsSize, ModalsState, ModalsTextType, ModalsType, NumericalRangeComponent, NumericalRangeLabelPositionEnum, NumericalRangeTypeEnum, PlacementEnum, RequiredInfoComponent, ResponsiveService, SkipLinksComponent, SpriteIconEnum, StepperComponent, TOAST_AUTOHIDE_DELAY_MS, TabComponent, TabContentComponent, ThemeSelectorComponent, ThemeService, TitleComponent, TitleContextEnum, TitleTagEnum, ToastComponent, ToastItemComponent, ToastService, TooltipPositionEnum, TriggerTooltipEnum, TypeTooltipEnum, rangeValidator, resolveArrowPos };
4999
+ export { AccordionComponent, AlertComponent, AlertTypeEnum, BadgeComponent, BadgePositionEnum, BadgeTypeEnum, BoButtonTypeEnum, BoTabTypeEnum, BreadcrumbComponent, ButtonComponent, ButtonIconSizeEnum, ButtonPositionEnum, CW_DEFAULT_THEME_OPTIONS, CardComponent, CardTitleRankEnum, CardTypeEnum, ClickOutsideDirective, CollapseDirective, CwThemeKeyEnum, CwTooltipDirective, DropdownComponent, DropdownItemDirective, DropdownPositionEnum, EmptyStateComponent, EmptyStateIllustrationEnum, FileDropComponent, FileDropFileStatusEnum, FileDropModeEnum, FileDropRejectReasonEnum, FileToDownloadComponent, FoButtonTypeEnum, FoTabTypeEnum, FocusTrackerService, FormFieldComponent, FormFieldTypeEnum, IconComponent, IconNotifSizeEnum, IconNotifTypeEnum, IconNotificationComponent, IconSizeEnum, IconTypeEnum, IconUiTypeEnum, ImageComponent, LanguageSelectorComponent, LegendComponent, LegendTypeEnum, LoaderComponent, LoaderSizeEnum, ModalsComponent, ModalsService, ModalsSize, ModalsState, ModalsTextType, ModalsType, NumericalRangeComponent, NumericalRangeLabelPositionEnum, NumericalRangeTypeEnum, PlacementEnum, RequiredInfoComponent, ResponsiveService, SkipLinksComponent, SpriteIconEnum, StepperComponent, TOAST_AUTOHIDE_DELAY_MS, TabComponent, TabContentComponent, ThemeSelectorComponent, ThemeService, TitleComponent, TitleContextEnum, TitleTagEnum, ToastComponent, ToastItemComponent, ToastService, TooltipPositionEnum, TriggerTooltipEnum, TypeTooltipEnum, rangeValidator, resolveArrowPos };
4924
5000
  //# sourceMappingURL=cityway-basic-ui.mjs.map