@surgeui/ds-vue 2.3.0 → 3.0.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/README.md +372 -372
- package/dist/components/atoms/Avatar.vue.d.ts +0 -1
- package/dist/components/atoms/Avatar.vue.d.ts.map +1 -1
- package/dist/components/atoms/Badge.vue.d.ts.map +1 -1
- package/dist/components/atoms/Button.vue.d.ts +1 -2
- package/dist/components/atoms/Button.vue.d.ts.map +1 -1
- package/dist/components/atoms/CheckboxGroup.vue.d.ts +2 -2
- package/dist/components/atoms/CheckboxGroup.vue.d.ts.map +1 -1
- package/dist/components/atoms/FileUpload.vue.d.ts +4 -9
- package/dist/components/atoms/FileUpload.vue.d.ts.map +1 -1
- package/dist/components/atoms/FormField.vue.d.ts +4 -3
- package/dist/components/atoms/FormField.vue.d.ts.map +1 -1
- package/dist/components/atoms/Heading.vue.d.ts.map +1 -1
- package/dist/components/atoms/Image.vue.d.ts +0 -3
- package/dist/components/atoms/Image.vue.d.ts.map +1 -1
- package/dist/components/atoms/Input.vue.d.ts +3 -3
- package/dist/components/atoms/Input.vue.d.ts.map +1 -1
- package/dist/components/atoms/Link.vue.d.ts.map +1 -1
- package/dist/components/atoms/Panel.vue.d.ts.map +1 -1
- package/dist/components/atoms/Price.vue.d.ts.map +1 -1
- package/dist/components/atoms/Progress.vue.d.ts +1 -4
- package/dist/components/atoms/Progress.vue.d.ts.map +1 -1
- package/dist/components/atoms/RadioGroup.vue.d.ts +2 -2
- package/dist/components/atoms/RadioGroup.vue.d.ts.map +1 -1
- package/dist/components/atoms/SelectBox.vue.d.ts +5 -9
- package/dist/components/atoms/SelectBox.vue.d.ts.map +1 -1
- package/dist/components/atoms/Slider.vue.d.ts +2 -2
- package/dist/components/atoms/Slider.vue.d.ts.map +1 -1
- package/dist/components/atoms/Spinner.vue.d.ts +1 -2
- package/dist/components/atoms/Spinner.vue.d.ts.map +1 -1
- package/dist/components/atoms/Switch.vue.d.ts +5 -4
- package/dist/components/atoms/Switch.vue.d.ts.map +1 -1
- package/dist/components/atoms/Textarea.vue.d.ts +2 -2
- package/dist/components/atoms/Textarea.vue.d.ts.map +1 -1
- package/dist/components/atoms/Toggle.vue.d.ts +2 -3
- package/dist/components/atoms/Toggle.vue.d.ts.map +1 -1
- package/dist/components/molecules/AccordionItem.vue.d.ts +2 -6
- package/dist/components/molecules/AccordionItem.vue.d.ts.map +1 -1
- package/dist/components/molecules/AvatarGroup.vue.d.ts.map +1 -1
- package/dist/components/molecules/CheckboxGroupField.vue.d.ts +3 -3
- package/dist/components/molecules/CheckboxGroupField.vue.d.ts.map +1 -1
- package/dist/components/molecules/Dropdown.vue.d.ts +2 -3
- package/dist/components/molecules/Dropdown.vue.d.ts.map +1 -1
- package/dist/components/molecules/FileUploadField.vue.d.ts +5 -10
- package/dist/components/molecules/FileUploadField.vue.d.ts.map +1 -1
- package/dist/components/molecules/FloatButton.vue.d.ts +10 -10
- package/dist/components/molecules/FloatButton.vue.d.ts.map +1 -1
- package/dist/components/molecules/InputField.vue.d.ts +12 -12
- package/dist/components/molecules/InputField.vue.d.ts.map +1 -1
- package/dist/components/molecules/LinkGroup.vue.d.ts.map +1 -1
- package/dist/components/molecules/OtpInput.vue.d.ts +2 -2
- package/dist/components/molecules/OtpInput.vue.d.ts.map +1 -1
- package/dist/components/molecules/OtpInputField.vue.d.ts +8 -8
- package/dist/components/molecules/OtpInputField.vue.d.ts.map +1 -1
- package/dist/components/molecules/Password.vue.d.ts +2 -2
- package/dist/components/molecules/Password.vue.d.ts.map +1 -1
- package/dist/components/molecules/PasswordField.vue.d.ts +4 -4
- package/dist/components/molecules/PasswordField.vue.d.ts.map +1 -1
- package/dist/components/molecules/RadioGroupField.vue.d.ts +3 -3
- package/dist/components/molecules/RadioGroupField.vue.d.ts.map +1 -1
- package/dist/components/molecules/SelectBoxField.vue.d.ts +14 -26
- package/dist/components/molecules/SelectBoxField.vue.d.ts.map +1 -1
- package/dist/components/molecules/SliderField.vue.d.ts +4 -4
- package/dist/components/molecules/SliderField.vue.d.ts.map +1 -1
- package/dist/components/molecules/SwitchField.vue.d.ts +3 -3
- package/dist/components/molecules/SwitchField.vue.d.ts.map +1 -1
- package/dist/components/molecules/TextareaField.vue.d.ts +6 -6
- package/dist/components/molecules/TextareaField.vue.d.ts.map +1 -1
- package/dist/components/molecules/ToggleGroup.vue.d.ts +2 -2
- package/dist/components/organisms/Accordion.vue.d.ts +1 -0
- package/dist/components/organisms/Accordion.vue.d.ts.map +1 -1
- package/dist/components/organisms/Alert.vue.d.ts +2 -3
- package/dist/components/organisms/Alert.vue.d.ts.map +1 -1
- package/dist/components/organisms/Card.vue.d.ts +0 -1
- package/dist/components/organisms/Card.vue.d.ts.map +1 -1
- package/dist/components/organisms/Dialog.vue.d.ts +3 -3
- package/dist/components/organisms/Dialog.vue.d.ts.map +1 -1
- package/dist/components/organisms/Tabs.vue.d.ts +6 -2
- package/dist/components/organisms/Tabs.vue.d.ts.map +1 -1
- package/dist/components/templates/FullScreenLayout.vue.d.ts +27 -0
- package/dist/components/templates/FullScreenLayout.vue.d.ts.map +1 -0
- package/dist/components/templates/GridLayout.vue.d.ts +46 -0
- package/dist/components/templates/GridLayout.vue.d.ts.map +1 -0
- package/dist/components/templates/HeroLayout.vue.d.ts +49 -0
- package/dist/components/templates/HeroLayout.vue.d.ts.map +1 -0
- package/dist/components/templates/HolyGrailLayout.vue.d.ts +51 -0
- package/dist/components/templates/HolyGrailLayout.vue.d.ts.map +1 -0
- package/dist/components/templates/MagazineLayout.vue.d.ts +38 -0
- package/dist/components/templates/MagazineLayout.vue.d.ts.map +1 -0
- package/dist/components/templates/MasonryLayout.vue.d.ts +27 -0
- package/dist/components/templates/MasonryLayout.vue.d.ts.map +1 -0
- package/dist/components/templates/SidebarLayout.vue.d.ts +36 -0
- package/dist/components/templates/SidebarLayout.vue.d.ts.map +1 -0
- package/dist/components/templates/SingleColumnLayout.vue.d.ts +36 -0
- package/dist/components/templates/SingleColumnLayout.vue.d.ts.map +1 -0
- package/dist/components/templates/SplitLayout.vue.d.ts +34 -0
- package/dist/components/templates/SplitLayout.vue.d.ts.map +1 -0
- package/dist/components/templates/_stories/layoutDemo.d.ts +43 -0
- package/dist/components/templates/_stories/layoutDemo.d.ts.map +1 -0
- package/dist/composables/index.d.ts +16 -1
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/composables/useAnnouncer.d.ts +32 -0
- package/dist/composables/useAnnouncer.d.ts.map +1 -0
- package/dist/composables/useDismiss.d.ts +32 -0
- package/dist/composables/useDismiss.d.ts.map +1 -0
- package/dist/composables/useFloatingPosition.d.ts +32 -0
- package/dist/composables/useFloatingPosition.d.ts.map +1 -0
- package/dist/composables/useFocusTrap.d.ts +42 -0
- package/dist/composables/useFocusTrap.d.ts.map +1 -0
- package/dist/composables/useFormField.d.ts +76 -0
- package/dist/composables/useFormField.d.ts.map +1 -0
- package/dist/composables/useListNavigation.d.ts +40 -0
- package/dist/composables/useListNavigation.d.ts.map +1 -0
- package/dist/composables/useLocale.d.ts +33 -0
- package/dist/composables/useLocale.d.ts.map +1 -0
- package/dist/composables/useTheme.d.ts +2 -2
- package/dist/composables/useTypeahead.d.ts +17 -0
- package/dist/composables/useTypeahead.d.ts.map +1 -0
- package/dist/composables/useUniqueId.d.ts +4 -0
- package/dist/composables/useUniqueId.d.ts.map +1 -1
- package/dist/{index-BAchYb_D.js → index-DxsqHbLv.js} +1 -1
- package/dist/index-n-LN9d8r.js +9062 -0
- package/dist/index.d.ts +18 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +84 -52
- package/dist/index.umd.js +1 -1
- package/dist/locales/en.d.ts +4 -0
- package/dist/locales/en.d.ts.map +1 -0
- package/dist/locales/fr.d.ts +4 -0
- package/dist/locales/fr.d.ts.map +1 -0
- package/dist/locales/index.d.ts +10 -0
- package/dist/locales/index.d.ts.map +1 -0
- package/dist/locales/types.d.ts +155 -0
- package/dist/locales/types.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +140 -15
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/accessibility.d.ts +4 -3
- package/dist/utils/accessibility.d.ts.map +1 -1
- package/dist/utils/layout.d.ts +9 -0
- package/dist/utils/layout.d.ts.map +1 -0
- package/package.json +81 -74
- package/dist/index-B8fo_rCP.js +0 -6835
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SplitLayoutProps } from '../../types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
/** Première zone (gauche en colonnes, ou droite avec `reverse`) */
|
|
6
|
+
start?(): any;
|
|
7
|
+
/** Seconde zone */
|
|
8
|
+
end?(): any;
|
|
9
|
+
}> & {
|
|
10
|
+
/** Première zone (gauche en colonnes, ou droite avec `reverse`) */
|
|
11
|
+
start?(): any;
|
|
12
|
+
/** Seconde zone */
|
|
13
|
+
end?(): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: HTMLDivElement;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<SplitLayoutProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SplitLayoutProps> & Readonly<{}>, {
|
|
20
|
+
ratio: "1:1" | "2:1" | "1:2" | "3:2" | "2:3";
|
|
21
|
+
gap: import('../../types').LayoutGap;
|
|
22
|
+
reverse: boolean;
|
|
23
|
+
breakpoint: import('../../types').LayoutBreakpoint;
|
|
24
|
+
align: "start" | "center" | "end" | "stretch";
|
|
25
|
+
fullHeight: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=SplitLayout.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SplitLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/templates/SplitLayout.vue"],"names":[],"mappings":"AAiIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAuD/C,iBAAS,cAAc;WAmCT,OAAO,IAA6B;;QAxEhD,mEAAmE;kBACzD,GAAG;QACb,mBAAmB;gBACX,GAAG;;QAHX,mEAAmE;kBACzD,GAAG;QACb,mBAAmB;gBACX,GAAG;;;;EA0EZ;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;wFAQnB,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,43 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export declare const DemoBox: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
label: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
/** Hauteur minimale (longueur CSS) */
|
|
8
|
+
height: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
/** `accent` : zone mise en avant (contenu principal, à la une…) */
|
|
13
|
+
tone: {
|
|
14
|
+
type: PropType<"muted" | "accent">;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
20
|
+
label: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
/** Hauteur minimale (longueur CSS) */
|
|
25
|
+
height: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
/** `accent` : zone mise en avant (contenu principal, à la une…) */
|
|
30
|
+
tone: {
|
|
31
|
+
type: PropType<"muted" | "accent">;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
}>> & Readonly<{}>, {
|
|
35
|
+
label: string;
|
|
36
|
+
height: string;
|
|
37
|
+
tone: "muted" | "accent";
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
39
|
+
/** Paragraphes de remplissage */
|
|
40
|
+
export declare const paragraphs: (count: number) => string[];
|
|
41
|
+
/** Hauteurs variées pour le mur (masonry) */
|
|
42
|
+
export declare const tileHeights: string[];
|
|
43
|
+
//# sourceMappingURL=layoutDemo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layoutDemo.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/_stories/layoutDemo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAA;AAKvD,eAAO,MAAM,OAAO;;;;;IAIhB,sCAAsC;;;;;IAEtC,mEAAmE;;cAC3C,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC;;;;;;;;;;IAHpD,sCAAsC;;;;;IAEtC,mEAAmE;;cAC3C,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC;;;;;;;4EA2BtD,CAAA;AAEF,iCAAiC;AACjC,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,aAIvC,CAAA;AAED,6CAA6C;AAC7C,eAAO,MAAM,WAAW,UAA+G,CAAA"}
|
|
@@ -3,5 +3,20 @@ import { useCustomTheme } from './useCustomTheme';
|
|
|
3
3
|
import { useUniqueId } from './useUniqueId';
|
|
4
4
|
import { useBreakpoint } from './useBreakpoint';
|
|
5
5
|
import { usePrice } from './usePrice';
|
|
6
|
-
|
|
6
|
+
import { useFloatingPosition } from './useFloatingPosition';
|
|
7
|
+
import { useAnnouncer, announce, clearAnnouncements } from './useAnnouncer';
|
|
8
|
+
import { useLocale, provideLocale, defineLocale, formatMessage, LocaleKey } from './useLocale';
|
|
9
|
+
import { useFormField, provideFormField, mergeIds, FormFieldKey } from './useFormField';
|
|
10
|
+
import { useFocusTrap, createFocusTrap, getTabbableElements } from './useFocusTrap';
|
|
11
|
+
import { useDismiss } from './useDismiss';
|
|
12
|
+
import { useListNavigation } from './useListNavigation';
|
|
13
|
+
import { useTypeahead } from './useTypeahead';
|
|
14
|
+
export { useTheme, useCustomTheme, useUniqueId, useBreakpoint, usePrice, useFloatingPosition, useAnnouncer, announce, clearAnnouncements, useLocale, provideLocale, defineLocale, formatMessage, LocaleKey, useFormField, provideFormField, mergeIds, FormFieldKey, useFocusTrap, createFocusTrap, getTabbableElements, useDismiss, useListNavigation, useTypeahead, };
|
|
15
|
+
export type { FloatingPositionOptions } from './useFloatingPosition';
|
|
16
|
+
export type { AnnounceOptions, AnnouncePriority } from './useAnnouncer';
|
|
17
|
+
export type { FormFieldContext, FormFieldControl, FormFieldControlProps, UseFormFieldOptions, UseFormFieldReturn } from './useFormField';
|
|
18
|
+
export type { FocusTrapOptions } from './useFocusTrap';
|
|
19
|
+
export type { DismissOptions, DismissReason } from './useDismiss';
|
|
20
|
+
export type { ListNavigationOptions, ListOrientation } from './useListNavigation';
|
|
21
|
+
export type { TypeaheadOptions } from './useTypeahead';
|
|
7
22
|
//# 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;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,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;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAC3E,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC9F,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACvF,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,EACL,QAAQ,EACR,cAAc,EACd,WAAW,EACX,aAAa,EACb,QAAQ,EACR,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,SAAS,EACT,aAAa,EACb,YAAY,EACZ,aAAa,EACb,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,iBAAiB,EACjB,YAAY,GACb,CAAA;AAED,YAAY,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AACpE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACvE,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACjE,YAAY,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACjF,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type AnnouncePriority = 'polite' | 'assertive';
|
|
2
|
+
export interface AnnounceOptions {
|
|
3
|
+
/** `assertive` interrompt la lecture en cours : à réserver aux erreurs */
|
|
4
|
+
priority?: AnnouncePriority;
|
|
5
|
+
/** Délai avant d'effacer le message (ms) : un texte resté en place serait relu au curseur virtuel */
|
|
6
|
+
clearAfter?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Crée les régions live du document s'il n'en a pas encore.
|
|
10
|
+
* Appelé au montage par `useAnnouncer` pour qu'elles précèdent la première annonce.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ensureAnnouncerRegions(): void;
|
|
13
|
+
/**
|
|
14
|
+
* Annonce un message aux lecteurs d'écran, sans le rendre visible.
|
|
15
|
+
* Utilisable hors composant (aucun effet côté serveur).
|
|
16
|
+
*/
|
|
17
|
+
export declare function announce(message: string, options?: AnnounceOptions): void;
|
|
18
|
+
/** Efface les messages en attente ou affichés */
|
|
19
|
+
export declare function clearAnnouncements(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Annonces accessibles depuis un composant.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* const { announce } = useAnnouncer()
|
|
25
|
+
* announce('3 résultats')
|
|
26
|
+
* announce('Le fichier dépasse 5 Mo', { priority: 'assertive' })
|
|
27
|
+
*/
|
|
28
|
+
export declare function useAnnouncer(): {
|
|
29
|
+
announce: typeof announce;
|
|
30
|
+
clear: typeof clearAnnouncements;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=useAnnouncer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnnouncer.d.ts","sourceRoot":"","sources":["../../src/composables/useAnnouncer.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,WAAW,CAAA;AAErD,MAAM,WAAW,eAAe;IAC9B,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B,qGAAqG;IACrG,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AA2DD;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAI7C;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,IAAI,CAsB7E;AAED,iDAAiD;AACjD,wBAAgB,kBAAkB,IAAI,IAAI,CAMzC;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY;;;EAO3B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
type ElementTarget = MaybeRefOrGetter<HTMLElement | null | undefined>;
|
|
3
|
+
export type DismissReason = 'escape' | 'outside' | 'focus-outside';
|
|
4
|
+
export interface DismissOptions {
|
|
5
|
+
/** La couche est active (élément ouvert) */
|
|
6
|
+
enabled: MaybeRefOrGetter<boolean>;
|
|
7
|
+
/** Appelé quand la couche doit se fermer */
|
|
8
|
+
onDismiss: (reason: DismissReason, event: Event) => void;
|
|
9
|
+
/** Fermeture avec Échap (défaut : true) */
|
|
10
|
+
escape?: MaybeRefOrGetter<boolean>;
|
|
11
|
+
/** Fermeture à l'appui (pointerdown) hors des éléments (défaut : true) */
|
|
12
|
+
outside?: MaybeRefOrGetter<boolean>;
|
|
13
|
+
/** Fermeture quand le focus quitte les éléments (défaut : false) */
|
|
14
|
+
focusOutside?: MaybeRefOrGetter<boolean>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Ferme un élément superposé avec Échap, un appui à l'extérieur ou la
|
|
18
|
+
* perte du focus. Les éléments listés (déclencheur, panneau…) forment
|
|
19
|
+
* « l'intérieur ».
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* useDismiss([triggerRef, panelRef], {
|
|
23
|
+
* enabled: isOpen,
|
|
24
|
+
* onDismiss: (reason) => close({ returnFocus: reason === 'escape' })
|
|
25
|
+
* })
|
|
26
|
+
*/
|
|
27
|
+
export declare function useDismiss(targets: ElementTarget | ElementTarget[], options: DismissOptions): {
|
|
28
|
+
/** La couche est celle du dessus (seule à réagir à Échap) */
|
|
29
|
+
isTopLayer: () => boolean;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=useDismiss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDismiss.d.ts","sourceRoot":"","sources":["../../src/composables/useDismiss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAc5E,KAAK,aAAa,GAAG,gBAAgB,CAAC,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,CAAA;AAErE,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,GAAG,eAAe,CAAA;AAElE,MAAM,WAAW,cAAc;IAC7B,4CAA4C;IAC5C,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAClC,4CAA4C;IAC5C,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IACxD,2CAA2C;IAC3C,MAAM,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAClC,0EAA0E;IAC1E,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACnC,oEAAoE;IACpE,YAAY,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;CACzC;AAoED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,EAAE,EAAE,OAAO,EAAE,cAAc;IA6BxF,6DAA6D;;EAGhE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
+
import { Placement } from '@floating-ui/dom';
|
|
3
|
+
export interface FloatingPositionOptions {
|
|
4
|
+
/** Placement souhaité ; il est retourné automatiquement s'il manque de place */
|
|
5
|
+
placement: MaybeRefOrGetter<Placement>;
|
|
6
|
+
/** Élément flottant affiché ou non */
|
|
7
|
+
open: MaybeRefOrGetter<boolean>;
|
|
8
|
+
/** Distance entre la référence et l'élément flottant (px) */
|
|
9
|
+
offset?: number;
|
|
10
|
+
/** Élément « flèche » à aligner sur la référence */
|
|
11
|
+
arrow?: Ref<HTMLElement | undefined | null>;
|
|
12
|
+
/** Largeur minimale = largeur de la référence (listes déroulantes) */
|
|
13
|
+
matchReferenceWidth?: boolean;
|
|
14
|
+
/** Marge minimale avec les bords de l'écran (px) */
|
|
15
|
+
padding?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Positionne un élément flottant (popover, menu, liste) contre sa référence.
|
|
19
|
+
*
|
|
20
|
+
* - Position `fixed` : l'élément n'est plus coupé par un parent en
|
|
21
|
+
* `overflow: hidden`.
|
|
22
|
+
* - Retournement (flip) et décalage (shift) quand il manque de place.
|
|
23
|
+
* - Suivi du défilement et du redimensionnement tant qu'il est ouvert.
|
|
24
|
+
*
|
|
25
|
+
* Renvoie le placement réellement appliqué, à utiliser pour orienter
|
|
26
|
+
* la flèche et l'animation (`transform-origin`).
|
|
27
|
+
*/
|
|
28
|
+
export declare function useFloatingPosition(reference: Ref<HTMLElement | undefined | null>, floating: Ref<HTMLElement | undefined | null>, options: FloatingPositionOptions): {
|
|
29
|
+
placement: Ref<Placement, Placement>;
|
|
30
|
+
update: () => Promise<void>;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=useFloatingPosition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFloatingPosition.d.ts","sourceRoot":"","sources":["../../src/composables/useFloatingPosition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AACrG,OAAO,EASL,KAAK,SAAS,EACf,MAAM,kBAAkB,CAAA;AAEzB,MAAM,WAAW,uBAAuB;IACtC,gFAAgF;IAChF,SAAS,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAA;IACtC,sCAAsC;IACtC,IAAI,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAC/B,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oDAAoD;IACpD,KAAK,CAAC,EAAE,GAAG,CAAC,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC,CAAA;IAC3C,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,GAAG,CAAC,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC,EAC9C,QAAQ,EAAE,GAAG,CAAC,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC,EAC7C,OAAO,EAAE,uBAAuB;;;EAkFjC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
type ElementTarget = MaybeRefOrGetter<HTMLElement | null | undefined>;
|
|
3
|
+
export interface FocusTrapOptions {
|
|
4
|
+
/** Active le piège tant que la valeur est vraie (sinon : activate() / deactivate()) */
|
|
5
|
+
active?: MaybeRefOrGetter<boolean>;
|
|
6
|
+
/**
|
|
7
|
+
* Élément qui reçoit le focus à l'activation (par défaut : le premier
|
|
8
|
+
* élément focalisable, sinon le conteneur). `false` : le focus ne bouge pas.
|
|
9
|
+
*/
|
|
10
|
+
initialFocus?: (() => HTMLElement | null | undefined) | false;
|
|
11
|
+
/**
|
|
12
|
+
* Rend le focus à la désactivation : `true` (élément focalisé avant
|
|
13
|
+
* l'activation), ou un élément précis. Le focus n'est rendu que s'il est
|
|
14
|
+
* encore dans le conteneur (l'utilisateur n'a pas cliqué ailleurs).
|
|
15
|
+
*/
|
|
16
|
+
returnFocus?: boolean | (() => HTMLElement | null | undefined);
|
|
17
|
+
}
|
|
18
|
+
/** Éléments atteignables par Tab dans un conteneur, dans l'ordre du DOM */
|
|
19
|
+
export declare function getTabbableElements(container: HTMLElement): HTMLElement[];
|
|
20
|
+
/**
|
|
21
|
+
* Piège à focus sans cycle de vie Vue (utilisable hors composant).
|
|
22
|
+
* @returns activate / deactivate / isActive
|
|
23
|
+
*/
|
|
24
|
+
export declare function createFocusTrap(target: ElementTarget, options?: Omit<FocusTrapOptions, 'active'>): {
|
|
25
|
+
activate: () => void;
|
|
26
|
+
deactivate: () => void;
|
|
27
|
+
isActive: () => boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Piège à focus lié au cycle de vie du composant.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* const panelRef = ref<HTMLElement>()
|
|
34
|
+
* useFocusTrap(panelRef, { active: isOpen })
|
|
35
|
+
*/
|
|
36
|
+
export declare function useFocusTrap(target: ElementTarget, options?: FocusTrapOptions): {
|
|
37
|
+
active: Readonly<import('vue').Ref<boolean, boolean>>;
|
|
38
|
+
activate: () => void;
|
|
39
|
+
deactivate: () => void;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=useFocusTrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/composables/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,gBAAgB,EACtB,MAAM,KAAK,CAAA;AAcZ,KAAK,aAAa,GAAG,gBAAgB,CAAC,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,CAAA;AAErE,MAAM,WAAW,gBAAgB;IAC/B,uFAAuF;IACvF,MAAM,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAClC;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,KAAK,CAAA;IAC7D;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,CAAA;CAC/D;AAiBD,2EAA2E;AAC3E,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,WAAW,GAAG,WAAW,EAAE,CAUzE;AA+DD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,GAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAM;;;;EA8CpG;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,GAAE,gBAAqB;;;;EAkCjF"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { ComputedRef, InjectionKey, Ref } from 'vue';
|
|
2
|
+
import { Size, State } from '../types';
|
|
3
|
+
/** Contrôle enregistré auprès du champ */
|
|
4
|
+
export interface FormFieldControl {
|
|
5
|
+
/**
|
|
6
|
+
* `false` pour un contrôle qu'un <label for> ne sait pas cibler
|
|
7
|
+
* (combobox en div, groupe de cases) : le clic sur le label lui donne
|
|
8
|
+
* alors le focus, et il est nommé par aria-labelledby.
|
|
9
|
+
*/
|
|
10
|
+
labelable: boolean;
|
|
11
|
+
focus?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export interface FormFieldContext {
|
|
14
|
+
/** Id du contrôle (cible du label) */
|
|
15
|
+
id: Readonly<Ref<string>>;
|
|
16
|
+
/** Id du label, s'il y en a un */
|
|
17
|
+
labelId: Readonly<Ref<string | undefined>>;
|
|
18
|
+
/** Id du message, s'il y en a un */
|
|
19
|
+
messageId: Readonly<Ref<string | undefined>>;
|
|
20
|
+
state: Readonly<Ref<State>>;
|
|
21
|
+
size: Readonly<Ref<Size>>;
|
|
22
|
+
required: Readonly<Ref<boolean>>;
|
|
23
|
+
disabled: Readonly<Ref<boolean>>;
|
|
24
|
+
/** Enregistre le contrôle ; renvoie la fonction de désenregistrement */
|
|
25
|
+
registerControl: (control: FormFieldControl) => () => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const FormFieldKey: InjectionKey<FormFieldContext>;
|
|
28
|
+
/** Fournit le contexte aux descendants (utilisé par SuFormField) */
|
|
29
|
+
export declare function provideFormField(context: FormFieldContext): FormFieldContext;
|
|
30
|
+
/** Joint des listes d'ids (aria-describedby…) sans doublons ni vides */
|
|
31
|
+
export declare function mergeIds(...ids: (string | undefined | null | false)[]): string | undefined;
|
|
32
|
+
/** Props d'un contrôle que le champ peut compléter */
|
|
33
|
+
export interface FormFieldControlProps {
|
|
34
|
+
state?: State;
|
|
35
|
+
size?: Size;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
required?: boolean;
|
|
38
|
+
ariaLabelledBy?: string;
|
|
39
|
+
ariaDescribedBy?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface UseFormFieldOptions {
|
|
42
|
+
/** Le contrôle est-il ciblable par <label for> ? (défaut : true) */
|
|
43
|
+
labelable?: boolean;
|
|
44
|
+
/** Donne le focus au contrôle (clic sur le label d'un contrôle non ciblable) */
|
|
45
|
+
focus?: () => void;
|
|
46
|
+
/** Préfixe de l'id généré hors champ ; sans préfixe, pas d'id généré */
|
|
47
|
+
idPrefix?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface UseFormFieldReturn {
|
|
50
|
+
/** Contexte du champ parent, ou null hors SuFormField */
|
|
51
|
+
field: FormFieldContext | null;
|
|
52
|
+
/** Id du contrôle : attribut id, sinon celui du champ, sinon généré (avec idPrefix) */
|
|
53
|
+
id: ComputedRef<string | undefined>;
|
|
54
|
+
state: ComputedRef<State>;
|
|
55
|
+
size: ComputedRef<Size>;
|
|
56
|
+
disabled: ComputedRef<boolean>;
|
|
57
|
+
required: ComputedRef<boolean>;
|
|
58
|
+
/** aria-describedby : celui du contrôle + message du champ */
|
|
59
|
+
describedBy: ComputedRef<string | undefined>;
|
|
60
|
+
/** aria-labelledby : celui du contrôle, sinon le label du champ (contrôle non ciblable) */
|
|
61
|
+
labelledBy: ComputedRef<string | undefined>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Relie un contrôle au SuFormField qui l'entoure.
|
|
65
|
+
*
|
|
66
|
+
* Priorité : valeur explicite du contrôle > valeur du champ > défaut.
|
|
67
|
+
* `state` et `size` du contrôle comptent comme explicites quand ils
|
|
68
|
+
* diffèrent de leur défaut (`default`, `md`) ; `disabled` et `required`
|
|
69
|
+
* s'additionnent (un champ désactivé désactive son contrôle).
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* const props = withDefaults(defineProps<MyControlProps>(), { state: 'default', size: 'md' })
|
|
73
|
+
* const { id, state, describedBy } = useFormField(props, { idPrefix: 'my-control' })
|
|
74
|
+
*/
|
|
75
|
+
export declare function useFormField(props: FormFieldControlProps, options?: UseFormFieldOptions): UseFormFieldReturn;
|
|
76
|
+
//# sourceMappingURL=useFormField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormField.d.ts","sourceRoot":"","sources":["../../src/composables/useFormField.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,GAAG,EACT,MAAM,KAAK,CAAA;AACZ,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAU1C,0CAA0C;AAC1C,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,sCAAsC;IACtC,EAAE,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IACzB,kCAAkC;IAClC,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC1C,oCAAoC;IACpC,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC5C,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;IAC3B,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAA;IACzB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IAChC,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IAChC,wEAAwE;IACxE,eAAe,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,MAAM,IAAI,CAAA;CAC3D;AAED,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,gBAAgB,CAA4B,CAAA;AAEpF,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,CAG5E;AAED,wEAAwE;AACxE,wBAAgB,QAAQ,CAAC,GAAG,GAAG,EAAE,CAAC,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,KAAK,CAAC,EAAE,GAAG,MAAM,GAAG,SAAS,CAG1F;AAED,sDAAsD;AACtD,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;IAClB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,yDAAyD;IACzD,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAC9B,uFAAuF;IACvF,EAAE,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACnC,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,CAAA;IACzB,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;IACvB,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC9B,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC9B,8DAA8D;IAC9D,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5C,2FAA2F;IAC3F,UAAU,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CAC5C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,qBAAqB,EAC5B,OAAO,GAAE,mBAAwB,GAChC,kBAAkB,CA+BpB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
export type ListOrientation = 'vertical' | 'horizontal' | 'both';
|
|
3
|
+
export interface ListNavigationOptions<T> {
|
|
4
|
+
items: MaybeRefOrGetter<readonly T[]>;
|
|
5
|
+
/** Éléments sautés par la navigation */
|
|
6
|
+
isDisabled?: (item: T, index: number) => boolean;
|
|
7
|
+
/** Flèches actives : haut/bas, gauche/droite, ou les quatre (défaut : vertical) */
|
|
8
|
+
orientation?: ListOrientation;
|
|
9
|
+
/** Boucle de la fin au début (défaut : false) */
|
|
10
|
+
loop?: boolean;
|
|
11
|
+
/** Début / Fin vont au premier / dernier élément (défaut : true) */
|
|
12
|
+
homeEnd?: boolean;
|
|
13
|
+
/** `roving` déplace le focus DOM ; `virtual` le laisse en place (défaut) */
|
|
14
|
+
mode?: 'roving' | 'virtual';
|
|
15
|
+
/** Élément DOM d'un index (mode roving) */
|
|
16
|
+
getElement?: (index: number) => HTMLElement | null | undefined;
|
|
17
|
+
/** Saisie rapide : texte de chaque élément */
|
|
18
|
+
typeahead?: {
|
|
19
|
+
getLabel: (item: T) => string;
|
|
20
|
+
timeout?: number;
|
|
21
|
+
} | false;
|
|
22
|
+
/** Appelé quand l'élément actif change (activation automatique des onglets…) */
|
|
23
|
+
onActiveChange?: (index: number) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function useListNavigation<T>(options: ListNavigationOptions<T>): {
|
|
26
|
+
activeIndex: import('vue').Ref<number, number>;
|
|
27
|
+
setActiveIndex: (index: number, { focus }?: {
|
|
28
|
+
focus?: boolean | undefined;
|
|
29
|
+
}) => void;
|
|
30
|
+
first: () => number;
|
|
31
|
+
last: () => number;
|
|
32
|
+
next: () => number;
|
|
33
|
+
previous: () => number;
|
|
34
|
+
findEnabled: (start: number, step: 1 | -1) => number;
|
|
35
|
+
handleKeydown: (event: KeyboardEvent) => boolean;
|
|
36
|
+
searchTypeahead: (char: string) => number;
|
|
37
|
+
isTyping: () => boolean;
|
|
38
|
+
reset: () => void;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=useListNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useListNavigation.d.ts","sourceRoot":"","sources":["../../src/composables/useListNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAenE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAA;AAEhE,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,KAAK,EAAE,gBAAgB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;IACrC,wCAAwC;IACxC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAA;IAChD,mFAAmF;IACnF,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,iDAAiD;IACjD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC3B,2CAA2C;IAC3C,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,WAAW,GAAG,IAAI,GAAG,SAAS,CAAA;IAC9D,8CAA8C;IAC9C,SAAS,CAAC,EAAE;QAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,KAAK,CAAA;IACvE,gFAAgF;IAChF,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACzC;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC;;4BA+BrC,MAAM;;;;;;;yBART,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC;2BAgElB,aAAa,KAAG,OAAO;4BAwDtB,MAAM;;;EAyBtC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComputedRef, InjectionKey, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { LocaleMessage, MessageKey, MessageParams, SurgeLocale, SurgeLocaleInput } from '../locales/types';
|
|
3
|
+
export declare const LocaleKey: InjectionKey<ComputedRef<SurgeLocale>>;
|
|
4
|
+
/**
|
|
5
|
+
* Complète une locale de base avec des messages partiels.
|
|
6
|
+
* @example defineLocale(en, { messages: { selectBox: { placeholder: 'Pick one…' } } })
|
|
7
|
+
*/
|
|
8
|
+
export declare function defineLocale(base: SurgeLocale, overrides?: SurgeLocaleInput | SurgeLocale): SurgeLocale;
|
|
9
|
+
/** Met en forme un message : forme plurielle selon `count`, puis paramètres `{nom}` */
|
|
10
|
+
export declare function formatMessage(message: LocaleMessage, params?: MessageParams, code?: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Fournit une locale à un sous-arbre de composants. Les messages partiels
|
|
13
|
+
* complètent la locale du parent (ou le français).
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // Dans le composant racine : la langue suit l'état de l'application
|
|
17
|
+
* provideLocale(() => (lang.value === 'en' ? en : fr))
|
|
18
|
+
*/
|
|
19
|
+
export declare function provideLocale(locale: MaybeRefOrGetter<SurgeLocale | SurgeLocaleInput>): ComputedRef<SurgeLocale>;
|
|
20
|
+
/**
|
|
21
|
+
* Accès aux textes de la locale courante.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* const { t } = useLocale()
|
|
25
|
+
* const label = computed(() => props.clearLabel ?? t('selectBox.clear'))
|
|
26
|
+
* t('fileUpload.selectedCount', { count: 3 }) // « 3 fichiers sélectionnés »
|
|
27
|
+
*/
|
|
28
|
+
export declare function useLocale(): {
|
|
29
|
+
locale: ComputedRef<SurgeLocale>;
|
|
30
|
+
t: (key: MessageKey, params?: MessageParams) => string;
|
|
31
|
+
formatBytes: (bytes: number) => string;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=useLocale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../src/composables/useLocale.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACtB,MAAM,KAAK,CAAA;AAEZ,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,EACX,gBAAgB,EAEjB,MAAM,iBAAiB,CAAA;AAUxB,eAAO,MAAM,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC,WAAW,CAAC,CAAyB,CAAA;AAEtF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,gBAAgB,GAAG,WAAW,GAAG,WAAW,CAUvG;AAiBD,uFAAuF;AACvF,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,GAAE,aAAkB,EAAE,IAAI,SAAO,GAAG,MAAM,CAcrG;AAOD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,gBAAgB,CAAC,WAAW,GAAG,gBAAgB,CAAC,4BAKrF;AAID;;;;;;;GAOG;AACH,wBAAgB,SAAS;;aAKP,UAAU,WAAW,aAAa,KAAG,MAAM;yBAM/B,MAAM,KAAG,MAAM;EAoB5C"}
|
|
@@ -5,10 +5,10 @@ export declare function useTheme(options?: UseThemeOptions): {
|
|
|
5
5
|
contrastMode: import('vue').Ref<ContrastMode, ContrastMode>;
|
|
6
6
|
motionMode: import('vue').Ref<MotionMode, MotionMode>;
|
|
7
7
|
effectiveTheme: import('vue').ComputedRef<ThemeName>;
|
|
8
|
-
effectiveThemeMode: import('vue').ComputedRef<"
|
|
8
|
+
effectiveThemeMode: import('vue').ComputedRef<"light" | "dark">;
|
|
9
9
|
effectiveContrast: import('vue').ComputedRef<"normal" | "high">;
|
|
10
10
|
effectiveMotion: import('vue').ComputedRef<"reduce" | "normal">;
|
|
11
|
-
systemTheme: import('vue').ComputedRef<"
|
|
11
|
+
systemTheme: import('vue').ComputedRef<"light" | "dark">;
|
|
12
12
|
systemContrast: import('vue').ComputedRef<"normal" | "high">;
|
|
13
13
|
systemMotion: import('vue').ComputedRef<"reduce" | "normal">;
|
|
14
14
|
currentThemeMetadata: import('vue').ComputedRef<ThemeMetadata>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
export interface TypeaheadOptions<T> {
|
|
3
|
+
items: MaybeRefOrGetter<readonly T[]>;
|
|
4
|
+
/** Texte comparé au préfixe saisi */
|
|
5
|
+
getLabel: (item: T) => string;
|
|
6
|
+
/** Éléments ignorés */
|
|
7
|
+
isDisabled?: (item: T, index: number) => boolean;
|
|
8
|
+
/** Délai d'inactivité qui remet le préfixe à zéro (ms) */
|
|
9
|
+
timeout?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function useTypeahead<T>(options: TypeaheadOptions<T>): {
|
|
12
|
+
search: (char: string, fromIndex: number) => number;
|
|
13
|
+
reset: () => void;
|
|
14
|
+
/** Une saisie est en cours (Espace complète alors le préfixe) */
|
|
15
|
+
isTyping: () => boolean;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=useTypeahead.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTypeahead.d.ts","sourceRoot":"","sources":["../../src/composables/useTypeahead.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAUzF,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,KAAK,EAAE,gBAAgB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;IACrC,qCAAqC;IACrC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAA;IAC7B,uBAAuB;IACvB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAA;IAChD,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC;mBAepC,MAAM,aAAa,MAAM,KAAG,MAAM;;IA6BtD,iEAAiE;;EAGpE"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Composable pour générer des IDs uniques
|
|
3
|
+
*
|
|
4
|
+
* Dans un composant, préférer `useId()` de Vue (3.5+) : il produit le même ID
|
|
5
|
+
* côté serveur et côté client. Ce compteur reste disponible hors composant ;
|
|
6
|
+
* il est déterministe (pas d'horodatage) pour limiter les écarts d'hydratation.
|
|
3
7
|
*/
|
|
4
8
|
export declare function useUniqueId(prefix?: string): string;
|
|
5
9
|
//# sourceMappingURL=useUniqueId.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUniqueId.d.ts","sourceRoot":"","sources":["../../src/composables/useUniqueId.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"useUniqueId.d.ts","sourceRoot":"","sources":["../../src/composables/useUniqueId.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,wBAAgB,WAAW,CAAC,MAAM,GAAE,MAAa,GAAG,MAAM,CAEzD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElementBlock as o, openBlock as n, createElementVNode as r } from "vue";
|
|
2
|
-
import { r as Wr, a as Xr, b as Qr, c as Kr, d as Yr, e as Jr, f as ro, g as oo, i as no, h as eo, j as to, k as ao, l as io, m as co } from "./index-
|
|
2
|
+
import { r as Wr, a as Xr, b as Qr, c as Kr, d as Yr, e as Jr, f as ro, g as oo, i as no, h as eo, j as to, k as ao, l as io, m as co } from "./index-n-LN9d8r.js";
|
|
3
3
|
function i(e, t) {
|
|
4
4
|
return n(), o("svg", {
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|