@club-employes/utopia 4.299.0 → 4.300.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.
@@ -45,6 +45,7 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
45
45
  pinSelectionFirst: boolean;
46
46
  preferredCountries: string[];
47
47
  showDialCode: boolean;
48
+ selectedFlagOnly: boolean;
48
49
  countries: Country[];
49
50
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
50
51
  export default _default;
@@ -7,8 +7,8 @@ export declare function countryDisplayName(country: Country, locale: string): st
7
7
  * Utilise `source` si fourni (ex. même liste que la prop `countries` du dropdown), sinon `findCountryByCode`.
8
8
  */
9
9
  export declare function countryLabelForCode(code: string | undefined | null, locale: string, source?: Country[]): string;
10
- export declare function countryToDropDownOption(country: Country, locale: string, showDialCode?: boolean): DropDownOption;
11
- export declare function countriesToDropDownOptions(countries: Country[], locale: string, showDialCode?: boolean): DropDownOption[];
10
+ export declare function countryToDropDownOption(country: Country, locale: string, showDialCode?: boolean, selectedFlagOnly?: boolean): DropDownOption;
11
+ export declare function countriesToDropDownOptions(countries: Country[], locale: string, showDialCode?: boolean, selectedFlagOnly?: boolean): DropDownOption[];
12
12
  export interface OrderedCountriesParams {
13
13
  /** Liste complète (défaut : `COUNTRIES`) */
14
14
  allCountries?: Country[];
@@ -14,6 +14,11 @@ export interface CountryDropDownBaseProps extends CountryDropDownPassthroughProp
14
14
  * Affiche le code pays (ex: +33)
15
15
  */
16
16
  showDialCode?: boolean;
17
+ /**
18
+ * Affiche uniquement le drapeau dans la valeur sélectionnée (trigger),
19
+ * tout en conservant le libellé complet dans la liste.
20
+ */
21
+ selectedFlagOnly?: boolean;
17
22
  /**
18
23
  * Limite l’affichage à ces codes ISO ; l’ordre suit la liste source (`countries` ou `COUNTRIES`).
19
24
  * Ignoré si `preferredCountries` est non vide.
@@ -1,6 +1,7 @@
1
1
  export interface DropDownOption {
2
2
  value: string | number | boolean | null;
3
3
  label: string;
4
+ triggerLabel?: string;
4
5
  secondaryLabel?: string;
5
6
  disabled?: boolean;
6
7
  children?: DropDownOption[];
@@ -0,0 +1,33 @@
1
+ import { PostalCodeInputProps } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<PostalCodeInputProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
4
+ change: (value: string | null) => any;
5
+ "update:modelValue": (value: string | null) => any;
6
+ "validity-change": (isValid: boolean) => any;
7
+ "update:countryName": (value: string) => any;
8
+ "update:countryCode": (value: string) => any;
9
+ }, string, PublicProps, Readonly<PostalCodeInputProps> & Readonly<{
10
+ onChange?: ((value: string | null) => any) | undefined;
11
+ "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
12
+ "onValidity-change"?: ((isValid: boolean) => any) | undefined;
13
+ "onUpdate:countryName"?: ((value: string) => any) | undefined;
14
+ "onUpdate:countryCode"?: ((value: string) => any) | undefined;
15
+ }>, {
16
+ label: string;
17
+ error: string | boolean;
18
+ size: "small" | "medium" | "large";
19
+ required: boolean;
20
+ success: boolean;
21
+ disabled: boolean;
22
+ modelValue: string | null;
23
+ placeholder: string;
24
+ language: string;
25
+ helperText: string;
26
+ selectedFlagOnly: boolean;
27
+ countryName: string;
28
+ countryCode: string | null;
29
+ countryPlaceholder: string;
30
+ invalidPostalCodeMessage: string;
31
+ validateOnBlurOnly: boolean;
32
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
33
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as PostalCodeInput } from './PostalCodeInput';
2
+ export type { PostalCodeInputProps } from './types';
@@ -0,0 +1,28 @@
1
+ import { CountryDropDownPassthroughProps } from '../CountryDropDown/types';
2
+ import { Country } from '../InputPhone/countries';
3
+ export interface PostalCodeInputProps extends CountryDropDownPassthroughProps {
4
+ modelValue?: string | null;
5
+ countryCode?: string | null;
6
+ countryName?: string;
7
+ language?: string;
8
+ placeholder?: string;
9
+ /** Placeholder du sélecteur de pays (si non fourni, on laisse le `CountryDropDown` décider). */
10
+ countryPlaceholder?: string;
11
+ helperText?: string;
12
+ /** Message d'erreur quand le code postal est invalide (si non fourni, fallback via `language`). */
13
+ invalidPostalCodeMessage?: string;
14
+ error?: string | boolean;
15
+ success?: boolean;
16
+ required?: boolean;
17
+ label?: string;
18
+ id?: string;
19
+ name?: string;
20
+ disabled?: boolean;
21
+ size?: 'small' | 'medium' | 'large';
22
+ preferredCountries?: string[];
23
+ allowedCountryCodes?: string[];
24
+ countries?: Country[];
25
+ /** Affiche uniquement le drapeau dans la valeur sélectionnée (trigger). */
26
+ selectedFlagOnly?: boolean;
27
+ validateOnBlurOnly?: boolean;
28
+ }
@@ -14,6 +14,8 @@ export type { InputCodeProps } from './InputCode';
14
14
  export { InputPhone } from './InputPhone';
15
15
  export type { InputPhoneProps } from './InputPhone/types';
16
16
  export { type Country, COUNTRIES } from './InputPhone/countries';
17
+ export { PostalCodeInput } from './PostalCodeInput';
18
+ export type { PostalCodeInputProps } from './PostalCodeInput/types';
17
19
  export { Modal } from './Modal';
18
20
  export type { ModalChangeReason, ModalProps } from './Modal/types';
19
21
  export { PriceTag } from './PriceTag';
package/dist/index.d.ts CHANGED
@@ -44,6 +44,7 @@ export type { GrantUsersSelectionProps } from './components/molecules/GrantUsers
44
44
  export type { IconPickerProps } from './components/molecules/IconPicker/types';
45
45
  export type { InputCodeProps } from './components/molecules/InputCode/types';
46
46
  export type { InputPhoneProps } from './components/molecules/InputPhone/types';
47
+ export type { PostalCodeInputProps } from './components/molecules/PostalCodeInput/types';
47
48
  export type { ModalChangeReason, ModalProps } from './components/molecules/Modal/types';
48
49
  export type { MultiSelectProps } from './components/molecules/MultiSelect/types';
49
50
  export type { OptionSelectProps } from './components/molecules/OptionSelect/types';