@surgeui/ds-vue 2.2.0 → 2.3.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.
@@ -13,9 +13,9 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
13
  declare const __VLS_component: import('vue').DefineComponent<PanelProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PanelProps> & Readonly<{}>, {
14
14
  variant: "default" | "subtle" | "highlight";
15
15
  radius: import('../../types').Radius;
16
+ elevated: boolean;
16
17
  tag: "div" | "section" | "article" | "aside" | "header" | "footer";
17
18
  bordered: boolean;
18
- elevated: boolean;
19
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
21
  export default _default;
@@ -0,0 +1,47 @@
1
+ import { PriceProps } from '../../types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: Readonly<{
5
+ /** Contenu avant le prix (ex: "À partir de", "Dès") */
6
+ prefix?(): any;
7
+ /** Rendu personnalisé du prix barré original */
8
+ original?(props: {
9
+ formatted: string;
10
+ amount: number;
11
+ }): any;
12
+ /** Contenu après le prix (ex: "/mois", "TTC", Badge) */
13
+ suffix?(): any;
14
+ }> & {
15
+ /** Contenu avant le prix (ex: "À partir de", "Dès") */
16
+ prefix?(): any;
17
+ /** Rendu personnalisé du prix barré original */
18
+ original?(props: {
19
+ formatted: string;
20
+ amount: number;
21
+ }): any;
22
+ /** Contenu après le prix (ex: "/mois", "TTC", Badge) */
23
+ suffix?(): any;
24
+ };
25
+ refs: {};
26
+ rootEl: HTMLSpanElement;
27
+ };
28
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
29
+ declare const __VLS_component: import('vue').DefineComponent<PriceProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PriceProps> & Readonly<{}>, {
30
+ size: import('../../types').PriceSize;
31
+ variant: import('../../types').PriceVariant;
32
+ currency: string;
33
+ locale: string;
34
+ integerOnly: boolean;
35
+ showOriginal: boolean;
36
+ currencyDisplay: import('../../types').CurrencyDisplay;
37
+ currencyPosition: import('../../types').CurrencyPosition;
38
+ superscriptDecimals: boolean;
39
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
40
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
41
+ export default _default;
42
+ type __VLS_WithTemplateSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
47
+ //# sourceMappingURL=Price.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Price.vue.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/Price.vue"],"names":[],"mappings":"AA8WA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AA+HzC,iBAAS,cAAc;WAqFT,OAAO,IAA6B;;QAnMhD,uDAAuD;mBAC5C,GAAG;QACd,gDAAgD;yBAC/B;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,GAAG,GAAG;QAC5D,wDAAwD;mBAC7C,GAAG;;QALd,uDAAuD;mBAC5C,GAAG;QACd,gDAAgD;yBAC/B;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,GAAG,GAAG;QAC5D,wDAAwD;mBAC7C,GAAG;;;;EAmMf;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;yFAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { OtpInputProps } from '../../types';
2
+ type __VLS_Props = OtpInputProps;
3
+ type __VLS_PublicProps = {
4
+ modelValue?: string;
5
+ } & __VLS_Props;
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: Readonly<{
9
+ /** Contenu personnalisé du séparateur entre groupes */
10
+ separator?(): any;
11
+ }> & {
12
+ /** Contenu personnalisé du séparateur entre groupes */
13
+ separator?(): any;
14
+ };
15
+ refs: {};
16
+ rootEl: any;
17
+ };
18
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
20
+ focus: () => void;
21
+ clear: () => void;
22
+ inputRefs: import('vue').ShallowRef<(HTMLInputElement | null)[], (HTMLInputElement | null)[]>;
23
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
24
+ focus: (event: FocusEvent, index: number) => any;
25
+ blur: (event: FocusEvent, index: number) => any;
26
+ change: (value: string) => any;
27
+ "update:modelValue": (value: string) => any;
28
+ complete: (value: string) => any;
29
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
30
+ onFocus?: ((event: FocusEvent, index: number) => any) | undefined;
31
+ onBlur?: ((event: FocusEvent, index: number) => any) | undefined;
32
+ onChange?: ((value: string) => any) | undefined;
33
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
34
+ onComplete?: ((value: string) => any) | undefined;
35
+ }>, {
36
+ size: import('../../types').Size;
37
+ variant: import('../../types').OtpVariant;
38
+ disabled: boolean;
39
+ state: import('../../types').State;
40
+ required: boolean;
41
+ readonly: boolean;
42
+ placeholder: string;
43
+ separator: string;
44
+ length: number;
45
+ inputType: import('../../types').OtpInputType;
46
+ masked: boolean;
47
+ autoSubmit: boolean;
48
+ autoFocus: boolean;
49
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
50
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
51
+ export default _default;
52
+ type __VLS_WithTemplateSlots<T, S> = T & {
53
+ new (): {
54
+ $slots: S;
55
+ };
56
+ };
57
+ //# sourceMappingURL=OtpInput.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtpInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/molecules/OtpInput.vue"],"names":[],"mappings":"AAkvBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAI5C,KAAK,WAAW,GAAG,aAAa,CAAC;AAuYjC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAwFT,OAAO,IAA6B;;QA1chD,uDAAuD;sBACzC,GAAG;;QADjB,uDAAuD;sBACzC,GAAG;;;;EA8clB;AAuBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,173 @@
1
+ import { OtpInputFieldProps } from '../../types';
2
+ type __VLS_Props = OtpInputFieldProps;
3
+ type __VLS_PublicProps = {
4
+ modelValue?: string;
5
+ } & __VLS_Props;
6
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
7
+ focus: () => void | undefined;
8
+ clear: () => void | undefined;
9
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
+ focus: (event: FocusEvent, index: number) => any;
11
+ blur: (event: FocusEvent, index: number) => any;
12
+ change: (value: string) => any;
13
+ "update:modelValue": (value: string) => any;
14
+ complete: (value: string) => any;
15
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
16
+ onFocus?: ((event: FocusEvent, index: number) => any) | undefined;
17
+ onBlur?: ((event: FocusEvent, index: number) => any) | undefined;
18
+ onChange?: ((value: string) => any) | undefined;
19
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
20
+ onComplete?: ((value: string) => any) | undefined;
21
+ }>, {
22
+ size: import('../../types').Size;
23
+ variant: import('../../types').OtpVariant;
24
+ disabled: boolean;
25
+ state: import('../../types').State;
26
+ required: boolean;
27
+ readonly: boolean;
28
+ placeholder: string;
29
+ separator: string;
30
+ length: number;
31
+ inputType: import('../../types').OtpInputType;
32
+ masked: boolean;
33
+ autoSubmit: boolean;
34
+ autoFocus: boolean;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
36
+ otpInputRef: ({
37
+ $: import('vue').ComponentInternalInstance;
38
+ $data: {};
39
+ $props: {
40
+ readonly modelValue?: string | undefined;
41
+ readonly length?: number | undefined;
42
+ readonly variant?: import('../../types').OtpVariant | undefined;
43
+ readonly inputType?: import('../../types').OtpInputType | undefined;
44
+ readonly pattern?: string | undefined;
45
+ readonly validate?: ((char: string, index: number) => boolean) | undefined;
46
+ readonly size?: import('../../types').Size | undefined;
47
+ readonly state?: import('../../types').State | undefined;
48
+ readonly disabled?: boolean | undefined;
49
+ readonly readonly?: boolean | undefined;
50
+ readonly required?: boolean | undefined;
51
+ readonly masked?: boolean | undefined;
52
+ readonly grouping?: number[] | undefined;
53
+ readonly separator?: string | undefined;
54
+ readonly autoSubmit?: boolean | undefined;
55
+ readonly placeholder?: string | undefined;
56
+ readonly autoFocus?: boolean | undefined;
57
+ readonly ariaLabel?: string | undefined;
58
+ readonly ariaLabelledBy?: string | undefined;
59
+ readonly ariaDescribedBy?: string | undefined;
60
+ readonly ariaHidden?: boolean | undefined;
61
+ readonly ariaInvalid?: boolean | undefined;
62
+ readonly ariaRequired?: boolean | undefined;
63
+ readonly ariaValueText?: string | undefined;
64
+ readonly role?: string | undefined;
65
+ readonly tabIndex?: number | undefined;
66
+ readonly onFocus?: ((event: FocusEvent, index: number) => any) | undefined;
67
+ readonly onBlur?: ((event: FocusEvent, index: number) => any) | undefined;
68
+ readonly onChange?: ((value: string) => any) | undefined;
69
+ readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
70
+ readonly onComplete?: ((value: string) => any) | undefined;
71
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
72
+ $attrs: {
73
+ [x: string]: unknown;
74
+ };
75
+ $refs: {
76
+ [x: string]: unknown;
77
+ };
78
+ $slots: Readonly<{
79
+ [name: string]: import('vue').Slot<any> | undefined;
80
+ }>;
81
+ $root: import('vue').ComponentPublicInstance | null;
82
+ $parent: import('vue').ComponentPublicInstance | null;
83
+ $host: Element | null;
84
+ $emit: ((event: "focus", event: FocusEvent, index: number) => void) & ((event: "blur", event: FocusEvent, index: number) => void) & ((event: "change", value: string) => void) & ((event: "update:modelValue", value: string) => void) & ((event: "complete", value: string) => void);
85
+ $el: any;
86
+ $options: import('vue').ComponentOptionsBase<Readonly<{
87
+ modelValue?: string;
88
+ } & import('../../types').OtpInputProps> & Readonly<{
89
+ onFocus?: ((event: FocusEvent, index: number) => any) | undefined;
90
+ onBlur?: ((event: FocusEvent, index: number) => any) | undefined;
91
+ onChange?: ((value: string) => any) | undefined;
92
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
93
+ onComplete?: ((value: string) => any) | undefined;
94
+ }>, {
95
+ focus: () => void;
96
+ clear: () => void;
97
+ inputRefs: import('vue').ShallowRef<(HTMLInputElement | null)[], (HTMLInputElement | null)[]>;
98
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
99
+ focus: (event: FocusEvent, index: number) => any;
100
+ blur: (event: FocusEvent, index: number) => any;
101
+ change: (value: string) => any;
102
+ "update:modelValue": (value: string) => any;
103
+ complete: (value: string) => any;
104
+ }, string, {
105
+ size: import('../../types').Size;
106
+ variant: import('../../types').OtpVariant;
107
+ disabled: boolean;
108
+ state: import('../../types').State;
109
+ required: boolean;
110
+ readonly: boolean;
111
+ placeholder: string;
112
+ separator: string;
113
+ length: number;
114
+ inputType: import('../../types').OtpInputType;
115
+ masked: boolean;
116
+ autoSubmit: boolean;
117
+ autoFocus: boolean;
118
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
119
+ beforeCreate?: (() => void) | (() => void)[];
120
+ created?: (() => void) | (() => void)[];
121
+ beforeMount?: (() => void) | (() => void)[];
122
+ mounted?: (() => void) | (() => void)[];
123
+ beforeUpdate?: (() => void) | (() => void)[];
124
+ updated?: (() => void) | (() => void)[];
125
+ activated?: (() => void) | (() => void)[];
126
+ deactivated?: (() => void) | (() => void)[];
127
+ beforeDestroy?: (() => void) | (() => void)[];
128
+ beforeUnmount?: (() => void) | (() => void)[];
129
+ destroyed?: (() => void) | (() => void)[];
130
+ unmounted?: (() => void) | (() => void)[];
131
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
132
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
133
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
134
+ };
135
+ $forceUpdate: () => void;
136
+ $nextTick: typeof import('vue').nextTick;
137
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
138
+ } & Readonly<{
139
+ size: import('../../types').Size;
140
+ variant: import('../../types').OtpVariant;
141
+ disabled: boolean;
142
+ state: import('../../types').State;
143
+ required: boolean;
144
+ readonly: boolean;
145
+ placeholder: string;
146
+ separator: string;
147
+ length: number;
148
+ inputType: import('../../types').OtpInputType;
149
+ masked: boolean;
150
+ autoSubmit: boolean;
151
+ autoFocus: boolean;
152
+ }> & Omit<Readonly<{
153
+ modelValue?: string;
154
+ } & import('../../types').OtpInputProps> & Readonly<{
155
+ onFocus?: ((event: FocusEvent, index: number) => any) | undefined;
156
+ onBlur?: ((event: FocusEvent, index: number) => any) | undefined;
157
+ onChange?: ((value: string) => any) | undefined;
158
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
159
+ onComplete?: ((value: string) => any) | undefined;
160
+ }>, "focus" | "clear" | "inputRefs" | ("size" | "variant" | "disabled" | "state" | "required" | "readonly" | "placeholder" | "separator" | "length" | "inputType" | "masked" | "autoSubmit" | "autoFocus")> & import('vue').ShallowUnwrapRef<{
161
+ focus: () => void;
162
+ clear: () => void;
163
+ inputRefs: import('vue').ShallowRef<(HTMLInputElement | null)[], (HTMLInputElement | null)[]>;
164
+ }> & {} & import('vue').ComponentCustomProperties & {} & {
165
+ $slots: Readonly<{
166
+ separator?(): any;
167
+ }> & {
168
+ separator?(): any;
169
+ };
170
+ }) | null;
171
+ }, HTMLDivElement>;
172
+ export default _default;
173
+ //# sourceMappingURL=OtpInputField.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtpInputField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/molecules/OtpInputField.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAEjD,KAAK,WAAW,GAAG,kBAAkB,CAAC;AAuEtC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAgJsohB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAzB5whB,wBAWG"}
@@ -0,0 +1,28 @@
1
+ import { CardProps } from '../../types';
2
+ declare function __VLS_template(): any;
3
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
4
+ declare const __VLS_component: import('vue').DefineComponent<CardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
+ click: (event: MouseEvent) => any;
6
+ }, string, import('vue').PublicProps, Readonly<CardProps> & Readonly<{
7
+ onClick?: ((event: MouseEvent) => any) | undefined;
8
+ }>, {
9
+ size: import('../../types').CardSize;
10
+ variant: import('../../types').CardVariant;
11
+ clickable: boolean;
12
+ radius: import('../../types').Radius;
13
+ disabled: boolean;
14
+ direction: import('../../types').CardDirection;
15
+ imageRatio: "16/9" | "4/3" | "1/1" | "21/9" | "auto";
16
+ imageFit: "cover" | "contain" | "fill";
17
+ imagePosition: "top" | "bottom";
18
+ titleLevel: 1 | 2 | 3 | 4 | 5 | 6;
19
+ fullWidth: boolean;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
+ export default _default;
23
+ type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
28
+ //# sourceMappingURL=Card.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.vue.d.ts","sourceRoot":"","sources":["../../../src/components/organisms/Card.vue"],"names":[],"mappings":"AA4jBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAsJxC,iBAAS,cAAc,QAwItB;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;6EASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,5 +2,6 @@ import { useTheme } from './useTheme';
2
2
  import { useCustomTheme } from './useCustomTheme';
3
3
  import { useUniqueId } from './useUniqueId';
4
4
  import { useBreakpoint } from './useBreakpoint';
5
- export { useTheme, useCustomTheme, useUniqueId, useBreakpoint, };
5
+ import { usePrice } from './usePrice';
6
+ export { useTheme, useCustomTheme, useUniqueId, useBreakpoint, usePrice, };
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,EACL,QAAQ,EACR,cAAc,EACd,WAAW,EACX,aAAa,GACd,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,EACL,QAAQ,EACR,cAAc,EACd,WAAW,EACX,aAAa,EACb,QAAQ,GACT,CAAA"}
@@ -0,0 +1,85 @@
1
+ import { Ref } from 'vue';
2
+ import { CurrencyDisplay } from '../types';
3
+ export interface UsePriceOptions {
4
+ /** Montant numérique. Accepte un ref, un getter, ou un nombre statique. */
5
+ amount: number | Ref<number> | (() => number);
6
+ /** Code devise ISO 4217 (ex: 'EUR', 'USD', 'GBP'). Défaut: 'EUR' */
7
+ currency?: string;
8
+ /** Locale BCP 47 (ex: 'fr-FR', 'en-US'). Défaut: 'fr-FR' */
9
+ locale?: string;
10
+ /** Affichage de la devise. Défaut: 'symbol' */
11
+ currencyDisplay?: CurrencyDisplay;
12
+ /** Nombre minimum de chiffres décimaux. Défaut: 2 */
13
+ minimumFractionDigits?: number;
14
+ /** Nombre maximum de chiffres décimaux. Défaut: 2 */
15
+ maximumFractionDigits?: number;
16
+ /**
17
+ * Formatter personnalisé. Quand fourni, remplace Intl.NumberFormat.
18
+ * Utile pour des formats spéciaux ("Gratuit", "Sur devis", etc.)
19
+ */
20
+ formatValue?: (amount: number, currency: string, locale: string) => string;
21
+ }
22
+ export interface UsePriceReturn {
23
+ /** Prix formaté complet (ex: "1 299,99 €") */
24
+ formatted: Readonly<Ref<string>>;
25
+ /** Partie entière uniquement (ex: "1 299") */
26
+ integerPart: Readonly<Ref<string>>;
27
+ /** Partie décimale sans séparateur (ex: "99") */
28
+ decimalPart: Readonly<Ref<string>>;
29
+ /** Séparateur décimal de la locale (ex: "," pour fr-FR) */
30
+ decimalSeparator: Readonly<Ref<string>>;
31
+ /** Symbole de la devise (ex: "€", "$", "£") */
32
+ currencySymbol: Readonly<Ref<string>>;
33
+ /** true si le symbole est positionné avant le montant */
34
+ isSymbolPrefix: Readonly<Ref<boolean>>;
35
+ /** Texte accessible pour les lecteurs d'écran (ex: "1 299,99 euros") */
36
+ ariaLabel: Readonly<Ref<string>>;
37
+ /** Montant numérique brut résolu */
38
+ rawAmount: Readonly<Ref<number>>;
39
+ }
40
+ /**
41
+ * Composable pour le formatage réactif des prix.
42
+ *
43
+ * Utilise `Intl.NumberFormat` pour un formatage correct selon
44
+ * la locale et la devise. Expose les différentes parties du prix
45
+ * pour un rendu flexible dans les composants.
46
+ *
47
+ * Compatible SSR — `Intl.NumberFormat` est disponible dans Node.js.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const { formatted, integerPart, decimalPart, currencySymbol } = usePrice({
52
+ * amount: 1299.99,
53
+ * currency: 'EUR',
54
+ * locale: 'fr-FR',
55
+ * })
56
+ *
57
+ * formatted.value // "1 299,99 €"
58
+ * integerPart.value // "1 299"
59
+ * decimalPart.value // "99"
60
+ * currencySymbol.value // "€"
61
+ * ```
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * // Avec un ref réactif
66
+ * const amount = ref(49.99)
67
+ * const { formatted } = usePrice({ amount })
68
+ *
69
+ * amount.value = 29.99
70
+ * formatted.value // "29,99 €"
71
+ * ```
72
+ *
73
+ * @example
74
+ * ```ts
75
+ * // Avec formatter personnalisé
76
+ * const { formatted } = usePrice({
77
+ * amount: 0,
78
+ * formatValue: (amt) => amt === 0 ? 'Gratuit' : `${amt} €`,
79
+ * })
80
+ *
81
+ * formatted.value // "Gratuit"
82
+ * ```
83
+ */
84
+ export declare function usePrice(options: UsePriceOptions): UsePriceReturn;
85
+ //# sourceMappingURL=usePrice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePrice.d.ts","sourceRoot":"","sources":["../../src/composables/usePrice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM9C,MAAM,WAAW,eAAe;IAC9B,2EAA2E;IAC3E,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,CAAA;IAC7C,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+CAA+C;IAC/C,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,qDAAqD;IACrD,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,qDAAqD;IACrD,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;CAC3E;AAED,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAChC,8CAA8C;IAC9C,WAAW,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAClC,iDAAiD;IACjD,WAAW,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAClC,2DAA2D;IAC3D,gBAAgB,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IACvC,+CAA+C;IAC/C,cAAc,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IACrC,yDAAyD;IACzD,cAAc,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IACtC,wEAAwE;IACxE,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAChC,oCAAoC;IACpC,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;CACjC;AAmKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,cAAc,CA4GjE"}