@surgeui/ds-vue 2.1.0 → 2.2.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/dist/components/atoms/Toggle.vue.d.ts +19 -0
- package/dist/components/atoms/Toggle.vue.d.ts.map +1 -0
- package/dist/components/molecules/ToggleGroup.vue.d.ts +24 -0
- package/dist/components/molecules/ToggleGroup.vue.d.ts.map +1 -0
- package/dist/composables/index.d.ts +2 -1
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/composables/useBreakpoint.d.ts +83 -0
- package/dist/composables/useBreakpoint.d.ts.map +1 -0
- package/dist/{index-qVwCNMxx.js → index-B3HEnZbh.js} +2358 -2156
- package/dist/{index-DK5ikXj4.js → index-B5DNZRyd.js} +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +25 -22
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +28 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ToggleProps } from '../../types';
|
|
2
|
+
type __VLS_Props = ToggleProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
modelValue?: boolean;
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
change: (value: boolean) => any;
|
|
8
|
+
"update:modelValue": (value: boolean) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
10
|
+
onChange?: ((value: boolean) => any) | undefined;
|
|
11
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
size: import('../../types').Size;
|
|
14
|
+
variant: import('../../types').ToggleVariant;
|
|
15
|
+
radius: import('../../types').Radius;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
18
|
+
export default _default;
|
|
19
|
+
//# sourceMappingURL=Toggle.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/Toggle.vue"],"names":[],"mappings":"AAiOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,KAAK,WAAW,GAAG,WAAW,CAAC;AAoE/B,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;;;;;;;;;;;;;AAiFhB,wBASG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ToggleGroupProps } from '../../types';
|
|
2
|
+
type __VLS_Props = ToggleGroupProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
modelValue?: (string | number)[];
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
select: (item: string | number, active: boolean) => any;
|
|
8
|
+
change: (value: (string | number)[]) => any;
|
|
9
|
+
"update:modelValue": (value: (string | number)[]) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
|
+
onSelect?: ((item: string | number, active: boolean) => any) | undefined;
|
|
12
|
+
onChange?: ((value: (string | number)[]) => any) | undefined;
|
|
13
|
+
"onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
size: import('../../types').Size;
|
|
16
|
+
variant: import('../../types').ToggleVariant;
|
|
17
|
+
radius: import('../../types').Radius;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
orientation: import('../../types').Orientation;
|
|
20
|
+
gap: import('../../types').Gap;
|
|
21
|
+
mode: import('../../types').ToggleGroupMode;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=ToggleGroup.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/molecules/ToggleGroup.vue"],"names":[],"mappings":"AAiKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,KAAK,WAAW,GAAG,gBAAgB,CAAC;AA6EpC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAChC,GAAG,WAAW,CAAC;;;;;;;;;;;;;;;;;;AAgGhB,wBASG"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
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
6
|
//# 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;
|
|
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"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export type BreakpointKey = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
2
|
+
export interface BreakpointConfig {
|
|
3
|
+
sm?: number;
|
|
4
|
+
md?: number;
|
|
5
|
+
lg?: number;
|
|
6
|
+
xl?: number;
|
|
7
|
+
'2xl'?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface UseBreakpointOptions {
|
|
10
|
+
/** Surcharge des breakpoints par défaut */
|
|
11
|
+
breakpoints?: BreakpointConfig;
|
|
12
|
+
}
|
|
13
|
+
export interface BreakpointMatches {
|
|
14
|
+
sm: boolean;
|
|
15
|
+
md: boolean;
|
|
16
|
+
lg: boolean;
|
|
17
|
+
xl: boolean;
|
|
18
|
+
'2xl': boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Composable pour la détection réactive des breakpoints.
|
|
22
|
+
*
|
|
23
|
+
* Utilise `window.matchMedia` pour une détection performante
|
|
24
|
+
* sans écouter l'événement `resize`. Compatible SSR (valeurs
|
|
25
|
+
* neutres côté serveur).
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const { current, isUp, isDown, isBetween, matches } = useBreakpoint()
|
|
30
|
+
*
|
|
31
|
+
* // Breakpoint actif
|
|
32
|
+
* current.value // 'md'
|
|
33
|
+
*
|
|
34
|
+
* // Vérifications
|
|
35
|
+
* isUp('md') // true si largeur >= 768px
|
|
36
|
+
* isDown('lg') // true si largeur < 1024px
|
|
37
|
+
* isBetween('sm', 'lg') // true si >= 640px et < 1024px
|
|
38
|
+
*
|
|
39
|
+
* // Objet réactif complet
|
|
40
|
+
* matches.value // { sm: true, md: true, lg: false, xl: false, '2xl': false }
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function useBreakpoint(options?: UseBreakpointOptions): {
|
|
44
|
+
/** Breakpoint actif le plus large ('xs' si aucun) */
|
|
45
|
+
current: import('vue').ComputedRef<"xs" | BreakpointKey>;
|
|
46
|
+
/** Largeur du viewport en pixels (réactif) */
|
|
47
|
+
width: Readonly<import('vue').Ref<number, number>>;
|
|
48
|
+
/** Objet réactif { sm: bool, md: bool, lg: bool, xl: bool, '2xl': bool } */
|
|
49
|
+
matches: Readonly<import('vue').Ref<{
|
|
50
|
+
readonly sm: boolean;
|
|
51
|
+
readonly md: boolean;
|
|
52
|
+
readonly lg: boolean;
|
|
53
|
+
readonly xl: boolean;
|
|
54
|
+
readonly '2xl': boolean;
|
|
55
|
+
}, {
|
|
56
|
+
readonly sm: boolean;
|
|
57
|
+
readonly md: boolean;
|
|
58
|
+
readonly lg: boolean;
|
|
59
|
+
readonly xl: boolean;
|
|
60
|
+
readonly '2xl': boolean;
|
|
61
|
+
}>>;
|
|
62
|
+
/** true si largeur >= breakpoint */
|
|
63
|
+
isUp: (breakpoint: BreakpointKey) => boolean;
|
|
64
|
+
/** true si largeur < breakpoint */
|
|
65
|
+
isDown: (breakpoint: BreakpointKey) => boolean;
|
|
66
|
+
/** true si largeur >= min et < max */
|
|
67
|
+
isBetween: (min: BreakpointKey, max: BreakpointKey) => boolean;
|
|
68
|
+
/** Configuration des breakpoints utilisée */
|
|
69
|
+
breakpoints: Readonly<import('vue').Ref<{
|
|
70
|
+
readonly sm: number;
|
|
71
|
+
readonly md: number;
|
|
72
|
+
readonly lg: number;
|
|
73
|
+
readonly xl: number;
|
|
74
|
+
readonly '2xl': number;
|
|
75
|
+
}, {
|
|
76
|
+
readonly sm: number;
|
|
77
|
+
readonly md: number;
|
|
78
|
+
readonly lg: number;
|
|
79
|
+
readonly xl: number;
|
|
80
|
+
readonly '2xl': number;
|
|
81
|
+
}>>;
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=useBreakpoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/composables/useBreakpoint.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAA;AAE7D,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,2CAA2C;IAC3C,WAAW,CAAC,EAAE,gBAAgB,CAAA;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,OAAO,CAAA;IACX,EAAE,EAAE,OAAO,CAAA;IACX,EAAE,EAAE,OAAO,CAAA;IACX,EAAE,EAAE,OAAO,CAAA;IACX,KAAK,EAAE,OAAO,CAAA;CACf;AA2BD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB;IAkJ5D,qDAAqD;;IAGrD,8CAA8C;;IAG9C,4EAA4E;;qBA/M1E,OAAO;qBACP,OAAO;qBACP,OAAO;qBACP,OAAO;wBACJ,OAAO;;qBAJV,OAAO;qBACP,OAAO;qBACP,OAAO;qBACP,OAAO;wBACJ,OAAO;;IA8MZ,oCAAoC;uBAhFZ,aAAa,KAAG,OAAO;IAmF/C,mCAAmC;yBA5ET,aAAa,KAAG,OAAO;IA+EjD,sCAAsC;qBAxEhB,aAAa,OAAO,aAAa,KAAG,OAAO;IA2EjE,6CAA6C;;qBAxO1C,MAAM;qBACN,MAAM;qBACN,MAAM;qBACN,MAAM;wBACH,MAAM;;qBAJT,MAAM;qBACN,MAAM;qBACN,MAAM;qBACN,MAAM;wBACH,MAAM;;EAuOf"}
|