@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.
- package/cityway-basic-ui-1.1.0-beta004.tgz +0 -0
- package/cityway-basic-ui-1.1.0-beta005.tgz +0 -0
- package/docs/00-overview.md +3 -3
- package/docs/components/empty-state.md +151 -0
- package/fesm2022/cityway-basic-ui.mjs +77 -1
- package/fesm2022/cityway-basic-ui.mjs.map +1 -1
- package/index.d.ts +71 -2
- package/lib/assets/i18n/common.en.json +1 -0
- package/lib/assets/i18n/common.fr.json +1 -0
- package/lib/assets/images/empty-states/no-data.svg +1 -0
- package/lib/assets/images/empty-states/no-result.svg +1 -0
- package/lib/assets/images/empty-states/no-upload.svg +1 -0
- package/package.json +2 -2
- package/styles/basic-ui.styles.bo.min.css +1 -1
- package/styles/basic-ui.styles.bo.min.css.map +1 -1
package/index.d.ts
CHANGED
|
@@ -2034,6 +2034,75 @@ declare class FileDropComponent implements ControlValueAccessor {
|
|
|
2034
2034
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FileDropComponent, "cw-file-drop", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "acceptLabel": { "alias": "acceptLabel"; "required": false; "isSignal": true; }; "maxSizeMb": { "alias": "maxSizeMb"; "required": false; "isSignal": true; }; "recommendedDimensions": { "alias": "recommendedDimensions"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "dataTest": { "alias": "dataTest"; "required": false; "isSignal": true; }; }, { "filesChange": "filesChange"; "rejected": "rejected"; "retry": "retry"; }, never, never, true, never>;
|
|
2035
2035
|
}
|
|
2036
2036
|
|
|
2037
|
+
/** Illustration integree (SVG maison cale sur les tokens DS `illustration/*`). */
|
|
2038
|
+
declare enum EmptyStateIllustrationEnum {
|
|
2039
|
+
/** Carte + badge « + » : aucune donnee, inviter a creer/importer. */
|
|
2040
|
+
noData = "no-data",
|
|
2041
|
+
/** Carte + badge « x » : aucun resultat apres filtrage. */
|
|
2042
|
+
noResult = "no-result",
|
|
2043
|
+
/** Carte image + badge upload : aucun fichier. */
|
|
2044
|
+
noFile = "no-file",
|
|
2045
|
+
/** Pas d'illustration. */
|
|
2046
|
+
none = "none"
|
|
2047
|
+
}
|
|
2048
|
+
/** Bouton parametrable de l'empty-state (label = cle i18n, traduite par `cw-button`). */
|
|
2049
|
+
interface EmptyStateButton {
|
|
2050
|
+
/** Cle i18n du libelle. */
|
|
2051
|
+
label: string;
|
|
2052
|
+
/** Icone optionnelle (sprite). */
|
|
2053
|
+
icon?: SpriteIconEnum;
|
|
2054
|
+
/** Desactive le bouton. */
|
|
2055
|
+
disabled?: boolean;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
/**
|
|
2059
|
+
* Etat vide parametrable (illustration + titre + description + 2 boutons), base sur le DS
|
|
2060
|
+
* (BOU) `Empty State / *`. Utilisable seul ou via `cw-table` (configs noData / noResult).
|
|
2061
|
+
*
|
|
2062
|
+
* - `illustration` : 3 visuels SVG integres (noData / noResult / noFile) ou `none`.
|
|
2063
|
+
* - `imageSource` : image custom qui PRIME sur l'illustration integree.
|
|
2064
|
+
* - `primaryButton` (CTA, style primaire) et `secondaryButton` (style secondaire) sont
|
|
2065
|
+
* optionnels ; ils n'apparaissent que si fournis et emettent `primaryClick` / `secondaryClick`.
|
|
2066
|
+
*/
|
|
2067
|
+
declare class EmptyStateComponent {
|
|
2068
|
+
/** Illustration integree. Defaut `noData`. Ignoree si `imageSource` est fourni. */
|
|
2069
|
+
readonly illustration: _angular_core.InputSignal<EmptyStateIllustrationEnum>;
|
|
2070
|
+
/**
|
|
2071
|
+
* Dossier des SVG d'illustration integres. Defaut `/assets/images/empty-states`
|
|
2072
|
+
* (les assets de basic-ui y sont copies, cf. angular.json / staticDirs Storybook).
|
|
2073
|
+
* A surcharger si l'app sert les assets ailleurs.
|
|
2074
|
+
*/
|
|
2075
|
+
readonly illustrationBasePath: _angular_core.InputSignal<string>;
|
|
2076
|
+
/** Image custom (URL) ; prime sur `illustration`. */
|
|
2077
|
+
readonly imageSource: _angular_core.InputSignal<string>;
|
|
2078
|
+
/** Texte alternatif de l'image custom (les illustrations integrees sont decoratives). */
|
|
2079
|
+
readonly imageAlt: _angular_core.InputSignal<string>;
|
|
2080
|
+
/** Titre (cle i18n). */
|
|
2081
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
2082
|
+
/** Description (cle i18n). */
|
|
2083
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
2084
|
+
/** Bouton principal (CTA primaire). */
|
|
2085
|
+
readonly primaryButton: _angular_core.InputSignal<EmptyStateButton>;
|
|
2086
|
+
/** Bouton secondaire. */
|
|
2087
|
+
readonly secondaryButton: _angular_core.InputSignal<EmptyStateButton>;
|
|
2088
|
+
/** Attribut `data-test-ctw`. */
|
|
2089
|
+
readonly dataTest: _angular_core.InputSignal<string>;
|
|
2090
|
+
/** Clic sur le bouton principal. */
|
|
2091
|
+
readonly primaryClick: _angular_core.OutputEmitterRef<void>;
|
|
2092
|
+
/** Clic sur le bouton secondaire. */
|
|
2093
|
+
readonly secondaryClick: _angular_core.OutputEmitterRef<void>;
|
|
2094
|
+
protected readonly illustrationEnum: typeof EmptyStateIllustrationEnum;
|
|
2095
|
+
protected readonly buttonType: typeof BoButtonTypeEnum;
|
|
2096
|
+
/** Nom de fichier SVG par illustration (dossier `assets/images/empty-states`). */
|
|
2097
|
+
private readonly illustrationFiles;
|
|
2098
|
+
/** Affiche une illustration integree (ni image custom, ni `none`). */
|
|
2099
|
+
protected readonly showIllustration: _angular_core.Signal<boolean>;
|
|
2100
|
+
/** URL du SVG d'illustration integre. */
|
|
2101
|
+
protected readonly illustrationSrc: _angular_core.Signal<string>;
|
|
2102
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmptyStateComponent, never>;
|
|
2103
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EmptyStateComponent, "cw-empty-state", never, { "illustration": { "alias": "illustration"; "required": false; "isSignal": true; }; "illustrationBasePath": { "alias": "illustrationBasePath"; "required": false; "isSignal": true; }; "imageSource": { "alias": "imageSource"; "required": false; "isSignal": true; }; "imageAlt": { "alias": "imageAlt"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "primaryButton": { "alias": "primaryButton"; "required": false; "isSignal": true; }; "secondaryButton": { "alias": "secondaryButton"; "required": false; "isSignal": true; }; "dataTest": { "alias": "dataTest"; "required": false; "isSignal": true; }; }, { "primaryClick": "primaryClick"; "secondaryClick": "secondaryClick"; }, never, never, true, never>;
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2037
2106
|
/**
|
|
2038
2107
|
* Sélecteur de langue présentational.
|
|
2039
2108
|
*
|
|
@@ -2322,5 +2391,5 @@ interface DataCustomListGroup {
|
|
|
2322
2391
|
fields: DataCustomList[];
|
|
2323
2392
|
}
|
|
2324
2393
|
|
|
2325
|
-
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 };
|
|
2326
|
-
export type { Attachment, CwAutocompleteColumn, CwAutocompleteFetcher, CwAutocompleteItem, CwAutocompleteOptions, CwAutocompleteResolver, CwBreadcrumbItem, CwFileDropItem, CwFileDropRejection, CwThemeOption, DataCustomList, DataCustomListGroup, DataLegend, FormFieldOption, FormFieldRangeOption, FormFieldValidationOption, Legend, ModalConfig, ModalRef, ShowToastOptions, SkipLink, ThemeServiceConfig, Toast, ToastAction };
|
|
2394
|
+
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 };
|
|
2395
|
+
export type { Attachment, CwAutocompleteColumn, CwAutocompleteFetcher, CwAutocompleteItem, CwAutocompleteOptions, CwAutocompleteResolver, CwBreadcrumbItem, CwFileDropItem, CwFileDropRejection, CwThemeOption, DataCustomList, DataCustomListGroup, DataLegend, EmptyStateButton, FormFieldOption, FormFieldRangeOption, FormFieldValidationOption, Legend, ModalConfig, ModalRef, ShowToastOptions, SkipLink, ThemeServiceConfig, Toast, ToastAction };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="220" height="130" fill="none" viewBox="0 0 220 130"><path fill="#f5f8fa" d="M20 10c0-5.523 4.477-10 10-10h160c5.523 0 10 4.477 10 10v88c0 5.523-4.477 10-10 10H30c-5.523 0-10-4.477-10-10z"/><path fill="#c8d6df" fill-opacity=".4" d="M36 46a6 6 0 0 1 6-6h68a6 6 0 1 1 0 12H42a6 6 0 0 1-6-6"/><path fill="#c8d6df" fill-opacity=".25" d="M36 66a6 6 0 0 1 6-6h48a6 6 0 0 1 0 12H42a6 6 0 0 1-6-6"/><path fill="#c8d6df" fill-opacity=".15" d="M36 86a6 6 0 0 1 6-6h88a6 6 0 1 1 0 12H42a6 6 0 0 1-6-6"/><path fill="#c8d6df" d="M20 10c0-5.523 4.477-10 10-10h160c5.523 0 10 4.477 10 10v14H20z"/><path fill="#c8d6df" fill-opacity=".5" d="M188 130c17.673 0 32-14.327 32-32s-14.327-32-32-32-32 14.327-32 32 14.327 32 32 32"/><path stroke="#fff" stroke-linecap="round" stroke-width="8" d="M174.286 98h27.429M188 84.286v27.428"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="229" height="139" fill="none" viewBox="0 0 229 139"><path fill="#f5f8fa" d="M20 10c0-5.523 4.477-10 10-10h160c5.523 0 10 4.477 10 10v88c0 5.523-4.477 10-10 10H30c-5.523 0-10-4.477-10-10z"/><path fill="#c8d6df" fill-opacity=".4" d="M36 46a6 6 0 0 1 6-6h68a6 6 0 1 1 0 12H42a6 6 0 0 1-6-6"/><path fill="#c8d6df" fill-opacity=".25" d="M36 66a6 6 0 0 1 6-6h48a6 6 0 0 1 0 12H42a6 6 0 0 1-6-6"/><path fill="#c8d6df" fill-opacity=".15" d="M36 86a6 6 0 0 1 6-6h88a6 6 0 1 1 0 12H42a6 6 0 0 1-6-6"/><path fill="#c8d6df" d="M20 10c0-5.523 4.477-10 10-10h160c5.523 0 10 4.477 10 10v14H20z"/><path fill="#c8d6df" fill-opacity=".5" d="M188 130c17.673 0 32-14.327 32-32s-14.327-32-32-32-32 14.327-32 32 14.327 32 32 32"/><path fill="#c8d6df" fill-opacity=".5" d="m207.5 123.157 5.657-5.657 14.142 14.142a4 4 0 0 1-5.657 5.657z"/><path fill="#fff" d="M193.8 86.829a3.999 3.999 0 1 1 5.656 5.656l-5.657 5.656 5.657 5.658a4 4 0 0 1-5.657 5.657l-5.657-5.657-5.657 5.657a4 4 0 1 1-5.656-5.657l5.656-5.657-5.657-5.657a4 4 0 1 1 5.657-5.656l5.658 5.656z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="220" height="130" fill="none" viewBox="0 0 220 130"><path fill="#f5f8fa" d="M20 10c0-5.523 4.477-10 10-10h160c5.523 0 10 4.477 10 10v88c0 5.523-4.477 10-10 10H30c-5.523 0-10-4.477-10-10z"/><path fill="#c8d6df" fill-opacity=".25" d="M106 40H42a6 6 0 0 0-6 6v40a6 6 0 0 0 6 6h64a6 6 0 0 0 6-6V46a6 6 0 0 0-6-6"/><mask id="a" width="76" height="52" x="36" y="40" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M106 40H42a6 6 0 0 0-6 6v40a6 6 0 0 0 6 6h64a6 6 0 0 0 6-6V46a6 6 0 0 0-6-6"/></mask><g mask="url(#a)"><path fill="#c8d6df" fill-opacity=".5" d="M94 60a6 6 0 1 0 0-12 6 6 0 0 0 0 12"/><path fill="#fff" d="M62 65H49a5 5 0 0 1-.395-9.986c.4-2.845 2.847-5.014 5.805-5.014a5.79 5.79 0 0 1 5.335 3.5q.615-.15 1.26-.15a5.49 5.49 0 0 1 5.495 5.495c0 3.038-2.457 6.155-5.495 6.155z"/><path fill="#c8d6df" fill-opacity=".5" d="m40 92 18-22 18 22z"/><path fill="#c8d6df" d="m64 92 20-26 20 26z"/></g><path fill="#c8d6df" fill-opacity=".4" d="M171 46h-46a5 5 0 0 0 0 10h46a5 5 0 0 0 0-10"/><path fill="#c8d6df" fill-opacity=".25" d="M155 62h-30a5 5 0 0 0 0 10h30a5 5 0 0 0 0-10"/><path fill="#c8d6df" fill-opacity=".15" d="M148 78h-24c-2.209 0-4 2.239-4 5s1.791 5 4 5h24c2.209 0 4-2.239 4-5s-1.791-5-4-5"/><path fill="#c8d6df" d="M20 10c0-5.523 4.477-10 10-10h160c5.523 0 10 4.477 10 10v14H20z"/><path fill="#c8d6df" fill-opacity=".5" d="M188 130c17.673 0 32-14.327 32-32s-14.327-32-32-32-32 14.327-32 32 14.327 32 32 32"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" d="M188 111.714V84.286m10.286 10.285L188 84.287 177.714 94.57"/></svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cityway/basic-ui",
|
|
3
|
-
"version": "1.1.0-
|
|
3
|
+
"version": "1.1.0-beta005",
|
|
4
4
|
"schematics": "./schematics/collection.json",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.3.0",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@angular/animations": "^20.3.0",
|
|
10
10
|
"@angular/cdk": "^20.2.2",
|
|
11
11
|
"@angular/platform-browser": "^20.3.0",
|
|
12
|
-
"@cityway/design-tokens": "1.1.0-
|
|
12
|
+
"@cityway/design-tokens": "1.1.0-beta005",
|
|
13
13
|
"intl-tel-input": "^28.0.7"
|
|
14
14
|
},
|
|
15
15
|
"peerDependenciesMeta": {
|