@egen-civitas/esm-styleguide 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/selections/autocomplete/autocomplete.component.d.ts +82 -0
- package/dist/selections/autocomplete/autocomplete.component.d.ts.map +1 -0
- package/dist/selections/autocomplete/autocomplete.component.js +1114 -0
- package/dist/selections/autocomplete/index.d.ts +2 -0
- package/dist/selections/autocomplete/index.d.ts.map +1 -0
- package/dist/selections/autocomplete/index.js +1 -0
- package/dist/selections/combobox/combobox.component.d.ts +87 -0
- package/dist/selections/combobox/combobox.component.d.ts.map +1 -0
- package/dist/selections/combobox/combobox.component.js +392 -0
- package/dist/selections/combobox/index.d.ts +2 -0
- package/dist/selections/combobox/index.d.ts.map +1 -0
- package/dist/selections/combobox/index.js +1 -0
- package/dist/selections/index.d.ts +3 -0
- package/dist/selections/index.d.ts.map +1 -1
- package/dist/selections/index.js +8 -0
- package/dist/selections/morph-select/index.d.ts +2 -0
- package/dist/selections/morph-select/index.d.ts.map +1 -0
- package/dist/selections/morph-select/index.js +1 -0
- package/dist/selections/morph-select/morph-select.component.d.ts +69 -0
- package/dist/selections/morph-select/morph-select.component.d.ts.map +1 -0
- package/dist/selections/morph-select/morph-select.component.js +336 -0
- package/dist/selections/shared/selection-icons.d.ts +17 -0
- package/dist/selections/shared/selection-icons.d.ts.map +1 -0
- package/dist/selections/shared/selection-icons.js +52 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @egen-civitas/esm-styleguide
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- bfe6b03: Catégorie `selections` (Tailwind) : ajoute `MorphSelect` (trigger qui se morphe en panneau — `MorphSelectTrigger/Value/Content/Item`), `Autocomplete` (capsule Material 3 : simple/multi-sélection, création, ripple, chips) et `Combobox` (déclencheur + recherche, design shadcn reproduit sans Radix/cmdk). Design copié à l'identique des sources, entièrement configurable par le consommateur (`classNames` par zone, textes, rendus personnalisés, transitions, placement…). Icônes en SVG inline : aucune nouvelle dépendance.
|
|
8
|
+
|
|
9
|
+
`@egen-civitas/tailwind-preset` : ajoute les tokens sémantiques (`background`, `foreground`, `card`, `popover`, `muted`, `accent`, `secondary`, `primary`, `border`, `input`, `ring`, `destructive`) reliés à `colors.surface.*` / `colors.border.*` du thème EGEN (light/dark et surcharges tenant inclus), pour que `bg-card`, `text-foreground`, `border-border`… s'affichent réellement dans les composants Tailwind du styleguide.
|
|
10
|
+
|
|
3
11
|
## 1.4.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface AutocompleteItemData {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
tag?: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
/** État passé à `renderItem` pour adapter le rendu d'une option. */
|
|
10
|
+
export interface AutocompleteItemState {
|
|
11
|
+
isActive: boolean;
|
|
12
|
+
isSelected: boolean;
|
|
13
|
+
isDisabled: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** Classes additionnelles par zone du composant (fusionnées avec les classes par défaut). */
|
|
16
|
+
export interface AutocompleteClassNames {
|
|
17
|
+
/** Conteneur externe (réserve la hauteur en flux). */
|
|
18
|
+
root?: string;
|
|
19
|
+
/** Capsule (surface qui s'étend à l'ouverture). */
|
|
20
|
+
container?: string;
|
|
21
|
+
/** Ligne de saisie (input + bouton). */
|
|
22
|
+
inputRow?: string;
|
|
23
|
+
input?: string;
|
|
24
|
+
toggleButton?: string;
|
|
25
|
+
/** Ligne des chips (multi-sélection). */
|
|
26
|
+
chipsRow?: string;
|
|
27
|
+
chip?: string;
|
|
28
|
+
clearButton?: string;
|
|
29
|
+
/** `<ul>` de la liste d'options. */
|
|
30
|
+
list?: string;
|
|
31
|
+
item?: string;
|
|
32
|
+
emptyState?: string;
|
|
33
|
+
loadingState?: string;
|
|
34
|
+
}
|
|
35
|
+
/** Textes affichés par le composant (i18n). */
|
|
36
|
+
export interface AutocompleteLabels {
|
|
37
|
+
/** Message quand aucune option ne correspond. Défaut : prop `emptyMessage`. */
|
|
38
|
+
empty?: string;
|
|
39
|
+
loading?: string;
|
|
40
|
+
/** Libellé du bouton « tout effacer » (multi). */
|
|
41
|
+
clear?: string;
|
|
42
|
+
/** Libellé de l'option de création. Défaut : `Create "<saisie>"`. */
|
|
43
|
+
create?: (inputValue: string) => string;
|
|
44
|
+
/** aria-label du bouton d'ouverture. */
|
|
45
|
+
toggle?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface AutocompleteProps {
|
|
48
|
+
items: AutocompleteItemData[];
|
|
49
|
+
placeholder?: string;
|
|
50
|
+
emptyMessage?: string;
|
|
51
|
+
value?: string | string[];
|
|
52
|
+
onValueChange?: (value: any) => void;
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
isCreatable?: boolean;
|
|
55
|
+
onCreate?: (value: string) => void;
|
|
56
|
+
className?: string;
|
|
57
|
+
onInputChange?: (value: string) => void;
|
|
58
|
+
loading?: boolean;
|
|
59
|
+
filterFn?: ((item: AutocompleteItemData, query: string) => boolean) | false | null;
|
|
60
|
+
debounceInterval?: number;
|
|
61
|
+
name?: string;
|
|
62
|
+
id?: string;
|
|
63
|
+
required?: boolean;
|
|
64
|
+
"aria-label"?: string;
|
|
65
|
+
"aria-labelledby"?: string;
|
|
66
|
+
maxOptions?: number;
|
|
67
|
+
minOptions?: number;
|
|
68
|
+
/** Classes additionnelles par zone. */
|
|
69
|
+
classNames?: AutocompleteClassNames;
|
|
70
|
+
/** Textes (i18n). */
|
|
71
|
+
labels?: AutocompleteLabels;
|
|
72
|
+
/** Rendu personnalisé du contenu d'une option (remplace label/description/tag). */
|
|
73
|
+
renderItem?: (item: AutocompleteItemData, state: AutocompleteItemState) => React.ReactNode;
|
|
74
|
+
/** Hauteur maximale de la liste en px. Défaut : 260. */
|
|
75
|
+
maxListHeight?: number;
|
|
76
|
+
/** Largeur maximale (px) du libellé d'un chip. Défaut : 120. */
|
|
77
|
+
chipMaxWidth?: number;
|
|
78
|
+
/** Style inline appliqué au conteneur externe. */
|
|
79
|
+
style?: React.CSSProperties;
|
|
80
|
+
}
|
|
81
|
+
export declare function Autocomplete({ items, placeholder, emptyMessage, value, onValueChange, disabled, isCreatable, onCreate, className, onInputChange, loading, filterFn, debounceInterval, name, id, required, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, maxOptions, minOptions, classNames, labels, renderItem, maxListHeight, chipMaxWidth, style, }: AutocompleteProps): React.JSX.Element;
|
|
82
|
+
//# sourceMappingURL=autocomplete.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocomplete.component.d.ts","sourceRoot":"","sources":["../../../src/selections/autocomplete/autocomplete.component.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,oEAAoE;AACpE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,6FAA6F;AAC7F,MAAM,WAAW,sBAAsB;IACrC,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,QAAQ,CAAC,E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