@club-employes/utopia 4.301.0 → 4.303.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.
@@ -11,7 +11,7 @@ declare function __VLS_template(): {
11
11
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
12
  declare const __VLS_component: DefineComponent<FormRowProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<FormRowProps> & Readonly<{}>, {
13
13
  gap: "small" | "normal" | "large";
14
- columns: 1 | 2 | 3;
14
+ columns: number;
15
15
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
16
16
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
17
  export default _default;
@@ -1,4 +1,4 @@
1
1
  export interface FormRowProps {
2
- columns?: 1 | 2 | 3;
2
+ columns?: number;
3
3
  gap?: 'small' | 'normal' | 'large';
4
4
  }
@@ -28,6 +28,7 @@ declare const _default: DefineComponent<PostalCodeInputProps, {}, {}, {}, {}, Co
28
28
  countryCode: string | null;
29
29
  countryPlaceholder: string;
30
30
  invalidPostalCodeMessage: string;
31
+ hideCountryDropdown: boolean;
31
32
  validateOnBlurOnly: boolean;
32
33
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
33
34
  export default _default;
@@ -4,6 +4,7 @@ export interface PostalCodeInputProps extends CountryDropDownPassthroughProps {
4
4
  modelValue?: string | null;
5
5
  countryCode?: string | null;
6
6
  countryName?: string;
7
+ countryLabel?: string;
7
8
  language?: string;
8
9
  placeholder?: string;
9
10
  /** Placeholder du sélecteur de pays (si non fourni, on laisse le `CountryDropDown` décider). */
@@ -24,5 +25,7 @@ export interface PostalCodeInputProps extends CountryDropDownPassthroughProps {
24
25
  countries?: Country[];
25
26
  /** Affiche uniquement le drapeau dans la valeur sélectionnée (trigger). */
26
27
  selectedFlagOnly?: boolean;
28
+ /** Masque le sélecteur de pays. La validation se basera alors sur la prop `countryCode`. */
29
+ hideCountryDropdown?: boolean;
27
30
  validateOnBlurOnly?: boolean;
28
31
  }
@@ -0,0 +1,34 @@
1
+ import { AddressFormProps, AddressFormFieldConfig } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Props = AddressFormProps;
4
+ type __VLS_PublicProps = {
5
+ modelValue: Record<string, any>;
6
+ } & __VLS_Props;
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ default?(_: {}): any;
11
+ };
12
+ refs: {};
13
+ rootEl: HTMLDivElement;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {
17
+ validate: () => boolean;
18
+ validateField: (field: AddressFormFieldConfig) => boolean;
19
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
20
+ "update:modelValue": (value: Record<string, any>) => any;
21
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
+ "onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
23
+ }>, {
24
+ size: "small" | "extra-small" | "medium" | "large";
25
+ disabled: boolean;
26
+ readonly: boolean;
27
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
28
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
29
+ export default _default;
30
+ type __VLS_WithTemplateSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,2 @@
1
+ export { default as AddressForm } from './AddressForm';
2
+ export * from './types';
@@ -0,0 +1,54 @@
1
+ import { InputTextProps } from '../../atoms/InputText/types';
2
+ export type AddressFormFieldType = 'text' | 'postalCode' | 'country' | 'number' | 'email' | 'phone' | 'textarea';
3
+ export interface AddressFormFieldConfig {
4
+ /** Identifiant unique du champ (clé dans le model) */
5
+ id: string;
6
+ /** Type de composant à afficher */
7
+ type: AddressFormFieldType;
8
+ /** Libellé du champ */
9
+ label?: string;
10
+ /** Placeholder du champ */
11
+ placeholder?: string;
12
+ /** Champ obligatoire */
13
+ required?: boolean;
14
+ /** Message d'erreur spécifique */
15
+ error?: string;
16
+ /**
17
+ * État du champ ('default' | 'error' | 'valid' | 'incomplete' | 'completed') */
18
+ state?: InputTextProps['state'];
19
+ /** Motif de validation (Regex) */
20
+ pattern?: string | RegExp;
21
+ /** Messages d'erreur personnalisés */
22
+ validationMessages?: {
23
+ required?: string;
24
+ pattern?: string;
25
+ };
26
+ /** Props supplémentaires pour le composant atom/molecule.
27
+ * On utilise any pour permettre la flexibilité totale lors du v-bind dynamique.
28
+ */
29
+ componentProps?: any;
30
+ /** Largeur flexible (flex-grow) */
31
+ flex?: number;
32
+ }
33
+ /** Une ligne peut contenir un ou plusieurs champs */
34
+ export type AddressFormRow = AddressFormFieldConfig[];
35
+ /** Le schéma est une liste de lignes */
36
+ export type AddressFormSchema = AddressFormRow[];
37
+ export interface AddressFormProps {
38
+ /** Schéma du formulaire (tableau de lignes/tableaux d'objets) */
39
+ schema?: AddressFormSchema;
40
+ /** Modèle de données (Source de vérité unique) */
41
+ modelValue: Record<string, any>;
42
+ /** Taille globale des composants */
43
+ size?: InputTextProps['size'];
44
+ /** Titre du groupe */
45
+ legend?: string;
46
+ /** Description du groupe */
47
+ description?: string;
48
+ /** Icône du titre */
49
+ icon?: string;
50
+ /** Désactivé */
51
+ disabled?: boolean;
52
+ /** Lecture seule */
53
+ readonly?: boolean;
54
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Traduction française pour tui-image-editor
3
+ * Passer dans les options : includeUI.locale = tuiImageEditorLocaleFr
4
+ */
5
+ export declare const tuiImageEditorLocaleFr: Record<string, string>;
@@ -13,6 +13,7 @@ export interface ImageEditorIncludeUI {
13
13
  initMenu?: ImageEditorMenuType;
14
14
  uiSize?: ImageEditorUISize;
15
15
  menuBarPosition?: ImageEditorMenuBarPosition;
16
+ locale?: Record<string, string>;
16
17
  }
17
18
  export type ImageEditorSelectionStyle = Record<string, unknown>;
18
19
  export type ImageEditorFreeDrawing = Record<string, unknown>;
@@ -72,5 +72,8 @@ export interface EditorLabels {
72
72
  imageModalTitle: string;
73
73
  errorImageTooLarge: string;
74
74
  errorVideoTooLarge: string;
75
+ imageEditorTitle: string;
76
+ imageEditorCancel: string;
77
+ imageEditorSave: string;
75
78
  }
76
79
  export declare const defaultEditorLabels: EditorLabels;
@@ -26,3 +26,5 @@ export { Caroussel } from './Caroussel';
26
26
  export type { CarousselProps } from './Caroussel';
27
27
  export { CartPreview } from './CartPreview';
28
28
  export type { CartPreviewProps, CartPreviewItemProps, CartPreviewPrice, CartPreviewPriceLine } from './CartPreview';
29
+ export { AddressForm } from './AddressForm';
30
+ export type { AddressFormProps, AddressFormSchema, AddressFormRow, AddressFormFieldConfig, AddressFormFieldType } from './AddressForm';
package/dist/index.d.ts CHANGED
@@ -88,6 +88,7 @@ export type { TransactionProps } from './components/organisms/Transaction/types'
88
88
  export type { CarousselProps } from './components/organisms/Caroussel/types';
89
89
  export type { MetricCardProps, MetricCardGroupProps } from './components/organisms';
90
90
  export type { InputSearchProps } from './components/organisms/InputSearch/types';
91
+ export type { AddressFormProps, AddressFormSchema } from './components/organisms/AddressForm/types';
91
92
  export type { CartPreviewProps, CartPreviewItemProps, CartPreviewPrice, CartPreviewPriceLine } from './components/organisms/CartPreview/types';
92
93
  export { clubEmployesDark, clubEmployesLight } from './themes/club-employes';
93
94
  export { gifteoDark, gifteoLight } from './themes/gifteo';