cisse-vue-ui 0.7.2 → 0.7.3
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/{PageHero.vue_vue_type_script_setup_true_lang-C-YXGDTY.js → PageHero.vue_vue_type_script_setup_true_lang-BYx595-2.js} +87 -47
- package/dist/{PageHero.vue_vue_type_script_setup_true_lang-C-YXGDTY.js.map → PageHero.vue_vue_type_script_setup_true_lang-BYx595-2.js.map} +1 -1
- package/dist/{TagsInput-D0O6z6le.js → TagsInput-DtoJKN3L.js} +17 -5
- package/dist/TagsInput-DtoJKN3L.js.map +1 -0
- package/dist/components/form/index.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/layout/index.js +1 -1
- package/dist/{index-D9_zMCpN.js → index-F9yanU6_.js} +3 -3
- package/dist/index-F9yanU6_.js.map +1 -0
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/dist/BadgeType.vue_vue_type_script_setup_true_lang-zs0NXN4g.cjs +0 -145
- package/dist/BadgeType.vue_vue_type_script_setup_true_lang-zs0NXN4g.cjs.map +0 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-CXRj7LEP.cjs +0 -98
- package/dist/Button.vue_vue_type_script_setup_true_lang-CXRj7LEP.cjs.map +0 -1
- package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-Bine-xfp.cjs +0 -928
- package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-Bine-xfp.cjs.map +0 -1
- package/dist/Dropdown.vue_vue_type_script_setup_true_lang-BNOHbbm5.cjs +0 -228
- package/dist/Dropdown.vue_vue_type_script_setup_true_lang-BNOHbbm5.cjs.map +0 -1
- package/dist/FilterTabs.vue_vue_type_script_setup_true_lang-HwjuvIJX.cjs +0 -2242
- package/dist/FilterTabs.vue_vue_type_script_setup_true_lang-HwjuvIJX.cjs.map +0 -1
- package/dist/ListSkeleton.vue_vue_type_script_setup_true_lang-DtwwmfWr.cjs +0 -149
- package/dist/ListSkeleton.vue_vue_type_script_setup_true_lang-DtwwmfWr.cjs.map +0 -1
- package/dist/PageHero.vue_vue_type_script_setup_true_lang-CKCmOxOa.cjs +0 -724
- package/dist/PageHero.vue_vue_type_script_setup_true_lang-CKCmOxOa.cjs.map +0 -1
- package/dist/TagsInput-BF3zRMcU.cjs +0 -3682
- package/dist/TagsInput-BF3zRMcU.cjs.map +0 -1
- package/dist/TagsInput-D0O6z6le.js.map +0 -1
- package/dist/_plugin-vue_export-helper-DM9IkUGy.cjs +0 -10
- package/dist/_plugin-vue_export-helper-DM9IkUGy.cjs.map +0 -1
- package/dist/components/core/Accordion.stories.d.ts +0 -11
- package/dist/components/core/Accordion.test.d.ts +0 -1
- package/dist/components/core/Accordion.vue.d.ts +0 -27
- package/dist/components/core/AccordionItem.stories.d.ts +0 -10
- package/dist/components/core/AccordionItem.vue.d.ts +0 -29
- package/dist/components/core/AutocompleteComponent.stories.d.ts +0 -14
- package/dist/components/core/AutocompleteComponent.test.d.ts +0 -1
- package/dist/components/core/AutocompleteComponent.vue.d.ts +0 -25
- package/dist/components/core/Avatar.stories.d.ts +0 -12
- package/dist/components/core/Avatar.test.d.ts +0 -1
- package/dist/components/core/Avatar.vue.d.ts +0 -20
- package/dist/components/core/Breadcrumb.stories.d.ts +0 -11
- package/dist/components/core/Breadcrumb.test.d.ts +0 -1
- package/dist/components/core/Breadcrumb.vue.d.ts +0 -26
- package/dist/components/core/Button.stories.d.ts +0 -18
- package/dist/components/core/Button.test.d.ts +0 -1
- package/dist/components/core/Button.vue.d.ts +0 -49
- package/dist/components/core/CardComponent.stories.d.ts +0 -13
- package/dist/components/core/CardComponent.test.d.ts +0 -1
- package/dist/components/core/CardComponent.vue.d.ts +0 -40
- package/dist/components/core/CollapsibleCard.stories.d.ts +0 -10
- package/dist/components/core/CollapsibleCard.test.d.ts +0 -1
- package/dist/components/core/CollapsibleCard.vue.d.ts +0 -38
- package/dist/components/core/DarkModeToggle.stories.d.ts +0 -15
- package/dist/components/core/DarkModeToggle.test.d.ts +0 -1
- package/dist/components/core/DarkModeToggle.vue.d.ts +0 -21
- package/dist/components/core/Drawer.stories.d.ts +0 -12
- package/dist/components/core/Drawer.test.d.ts +0 -1
- package/dist/components/core/Drawer.vue.d.ts +0 -50
- package/dist/components/core/Dropdown.stories.d.ts +0 -11
- package/dist/components/core/Dropdown.test.d.ts +0 -1
- package/dist/components/core/Dropdown.vue.d.ts +0 -56
- package/dist/components/core/FilterTabs.stories.d.ts +0 -14
- package/dist/components/core/FilterTabs.test.d.ts +0 -1
- package/dist/components/core/FilterTabs.vue.d.ts +0 -29
- package/dist/components/core/MenuItem.stories.d.ts +0 -13
- package/dist/components/core/MenuItem.test.d.ts +0 -1
- package/dist/components/core/MenuItem.vue.d.ts +0 -16
- package/dist/components/core/MobileList.stories.d.ts +0 -13
- package/dist/components/core/MobileList.test.d.ts +0 -1
- package/dist/components/core/MobileList.vue.d.ts +0 -86
- package/dist/components/core/Popover.stories.d.ts +0 -10
- package/dist/components/core/Popover.test.d.ts +0 -1
- package/dist/components/core/Popover.vue.d.ts +0 -44
- package/dist/components/core/ResponsiveList.stories.d.ts +0 -15
- package/dist/components/core/ResponsiveList.test.d.ts +0 -1
- package/dist/components/core/ResponsiveList.vue.d.ts +0 -128
- package/dist/components/core/StatsCard.stories.d.ts +0 -15
- package/dist/components/core/StatsCard.test.d.ts +0 -1
- package/dist/components/core/StatsCard.vue.d.ts +0 -44
- package/dist/components/core/StatsGrid.stories.d.ts +0 -12
- package/dist/components/core/StatsGrid.test.d.ts +0 -1
- package/dist/components/core/StatsGrid.vue.d.ts +0 -16
- package/dist/components/core/StatusBadge.stories.d.ts +0 -13
- package/dist/components/core/StatusBadge.test.d.ts +0 -1
- package/dist/components/core/StatusBadge.vue.d.ts +0 -21
- package/dist/components/core/Stepper.stories.d.ts +0 -12
- package/dist/components/core/Stepper.test.d.ts +0 -1
- package/dist/components/core/Stepper.vue.d.ts +0 -22
- package/dist/components/core/TabPanel.stories.d.ts +0 -8
- package/dist/components/core/TabPanel.test.d.ts +0 -1
- package/dist/components/core/TabPanel.vue.d.ts +0 -21
- package/dist/components/core/TableAction.stories.d.ts +0 -14
- package/dist/components/core/TableAction.test.d.ts +0 -1
- package/dist/components/core/TableAction.vue.d.ts +0 -8
- package/dist/components/core/TableComponent.stories.d.ts +0 -16
- package/dist/components/core/TableComponent.test.d.ts +0 -1
- package/dist/components/core/TableComponent.vue.d.ts +0 -67
- package/dist/components/core/Tabs.stories.d.ts +0 -10
- package/dist/components/core/Tabs.test.d.ts +0 -1
- package/dist/components/core/Tabs.vue.d.ts +0 -39
- package/dist/components/core/Timeline.stories.d.ts +0 -11
- package/dist/components/core/Timeline.test.d.ts +0 -1
- package/dist/components/core/Timeline.vue.d.ts +0 -34
- package/dist/components/core/Tooltip.stories.d.ts +0 -10
- package/dist/components/core/Tooltip.test.d.ts +0 -1
- package/dist/components/core/Tooltip.vue.d.ts +0 -34
- package/dist/components/core/index.cjs +0 -33
- package/dist/components/core/index.cjs.map +0 -1
- package/dist/components/core/index.test.d.ts +0 -1
- package/dist/components/feedback/Alert.stories.d.ts +0 -13
- package/dist/components/feedback/Alert.test.d.ts +0 -1
- package/dist/components/feedback/Alert.vue.d.ts +0 -34
- package/dist/components/feedback/CardSkeleton.stories.d.ts +0 -11
- package/dist/components/feedback/CardSkeleton.test.d.ts +0 -1
- package/dist/components/feedback/CardSkeleton.vue.d.ts +0 -14
- package/dist/components/feedback/ConfirmDialog.stories.d.ts +0 -12
- package/dist/components/feedback/ConfirmDialog.test.d.ts +0 -1
- package/dist/components/feedback/ConfirmDialog.vue.d.ts +0 -53
- package/dist/components/feedback/EmptyState.stories.d.ts +0 -13
- package/dist/components/feedback/EmptyState.test.d.ts +0 -1
- package/dist/components/feedback/EmptyState.vue.d.ts +0 -29
- package/dist/components/feedback/ListSkeleton.stories.d.ts +0 -12
- package/dist/components/feedback/ListSkeleton.test.d.ts +0 -1
- package/dist/components/feedback/ListSkeleton.vue.d.ts +0 -17
- package/dist/components/feedback/LoadingSpinner.stories.d.ts +0 -11
- package/dist/components/feedback/LoadingSpinner.test.d.ts +0 -1
- package/dist/components/feedback/LoadingSpinner.vue.d.ts +0 -12
- package/dist/components/feedback/Modal.stories.d.ts +0 -11
- package/dist/components/feedback/Modal.test.d.ts +0 -1
- package/dist/components/feedback/Modal.vue.d.ts +0 -47
- package/dist/components/feedback/NotificationComponent.stories.d.ts +0 -14
- package/dist/components/feedback/NotificationComponent.test.d.ts +0 -1
- package/dist/components/feedback/NotificationComponent.vue.d.ts +0 -12
- package/dist/components/feedback/NotificationList.stories.d.ts +0 -11
- package/dist/components/feedback/NotificationList.test.d.ts +0 -1
- package/dist/components/feedback/NotificationList.vue.d.ts +0 -18
- package/dist/components/feedback/PaginationControls.stories.d.ts +0 -12
- package/dist/components/feedback/PaginationControls.test.d.ts +0 -1
- package/dist/components/feedback/PaginationControls.vue.d.ts +0 -21
- package/dist/components/feedback/Progress.stories.d.ts +0 -14
- package/dist/components/feedback/Progress.test.d.ts +0 -1
- package/dist/components/feedback/Progress.vue.d.ts +0 -30
- package/dist/components/feedback/Skeleton.stories.d.ts +0 -15
- package/dist/components/feedback/Skeleton.test.d.ts +0 -1
- package/dist/components/feedback/Skeleton.vue.d.ts +0 -19
- package/dist/components/feedback/TableSkeleton.stories.d.ts +0 -12
- package/dist/components/feedback/TableSkeleton.test.d.ts +0 -1
- package/dist/components/feedback/TableSkeleton.vue.d.ts +0 -14
- package/dist/components/feedback/Toast.stories.d.ts +0 -12
- package/dist/components/feedback/Toast.test.d.ts +0 -1
- package/dist/components/feedback/Toast.vue.d.ts +0 -23
- package/dist/components/feedback/ToastContainer.stories.d.ts +0 -15
- package/dist/components/feedback/ToastContainer.test.d.ts +0 -1
- package/dist/components/feedback/ToastContainer.vue.d.ts +0 -24
- package/dist/components/feedback/index.cjs +0 -20
- package/dist/components/feedback/index.cjs.map +0 -1
- package/dist/components/feedback/index.test.d.ts +0 -1
- package/dist/components/form/Checkbox.stories.d.ts +0 -13
- package/dist/components/form/Checkbox.test.d.ts +0 -1
- package/dist/components/form/Checkbox.vue.d.ts +0 -22
- package/dist/components/form/ColorPicker.stories.d.ts +0 -12
- package/dist/components/form/ColorPicker.test.d.ts +0 -1
- package/dist/components/form/ColorPicker.vue.d.ts +0 -26
- package/dist/components/form/Combobox.stories.d.ts +0 -15
- package/dist/components/form/Combobox.test.d.ts +0 -1
- package/dist/components/form/Combobox.vue.d.ts +0 -46
- package/dist/components/form/DatePicker.stories.d.ts +0 -15
- package/dist/components/form/DatePicker.test.d.ts +0 -1
- package/dist/components/form/DatePicker.vue.d.ts +0 -36
- package/dist/components/form/EmailInput.stories.d.ts +0 -13
- package/dist/components/form/EmailInput.test.d.ts +0 -1
- package/dist/components/form/EmailInput.vue.d.ts +0 -32
- package/dist/components/form/FileUpload.stories.d.ts +0 -12
- package/dist/components/form/FileUpload.test.d.ts +0 -1
- package/dist/components/form/FileUpload.vue.d.ts +0 -40
- package/dist/components/form/FormActions.stories.d.ts +0 -18
- package/dist/components/form/FormActions.test.d.ts +0 -1
- package/dist/components/form/FormActions.vue.d.ts +0 -56
- package/dist/components/form/FormGroup.stories.d.ts +0 -10
- package/dist/components/form/FormGroup.test.d.ts +0 -1
- package/dist/components/form/FormGroup.vue.d.ts +0 -30
- package/dist/components/form/FormHelp.stories.d.ts +0 -11
- package/dist/components/form/FormHelp.test.d.ts +0 -1
- package/dist/components/form/FormHelp.vue.d.ts +0 -23
- package/dist/components/form/FormInput.stories.d.ts +0 -12
- package/dist/components/form/FormInput.test.d.ts +0 -1
- package/dist/components/form/FormInput.vue.d.ts +0 -13
- package/dist/components/form/FormLabel.stories.d.ts +0 -12
- package/dist/components/form/FormLabel.test.d.ts +0 -1
- package/dist/components/form/FormLabel.vue.d.ts +0 -21
- package/dist/components/form/FormSection.stories.d.ts +0 -13
- package/dist/components/form/FormSection.test.d.ts +0 -1
- package/dist/components/form/FormSection.vue.d.ts +0 -49
- package/dist/components/form/FormSelect.stories.d.ts +0 -13
- package/dist/components/form/FormSelect.test.d.ts +0 -1
- package/dist/components/form/FormSelect.vue.d.ts +0 -55
- package/dist/components/form/IconPicker.vue.d.ts +0 -33
- package/dist/components/form/InputWrapper.stories.d.ts +0 -16
- package/dist/components/form/InputWrapper.test.d.ts +0 -1
- package/dist/components/form/InputWrapper.vue.d.ts +0 -40
- package/dist/components/form/MoneyInput.stories.d.ts +0 -16
- package/dist/components/form/MoneyInput.test.d.ts +0 -1
- package/dist/components/form/MoneyInput.vue.d.ts +0 -40
- package/dist/components/form/NumberInput.stories.d.ts +0 -14
- package/dist/components/form/NumberInput.test.d.ts +0 -1
- package/dist/components/form/NumberInput.vue.d.ts +0 -39
- package/dist/components/form/OTPInput.stories.d.ts +0 -13
- package/dist/components/form/OTPInput.test.d.ts +0 -1
- package/dist/components/form/OTPInput.vue.d.ts +0 -33
- package/dist/components/form/PasswordInput.stories.d.ts +0 -15
- package/dist/components/form/PasswordInput.test.d.ts +0 -1
- package/dist/components/form/PasswordInput.vue.d.ts +0 -36
- package/dist/components/form/PercentInput.stories.d.ts +0 -12
- package/dist/components/form/PercentInput.test.d.ts +0 -1
- package/dist/components/form/PercentInput.vue.d.ts +0 -38
- package/dist/components/form/PhoneInput.stories.d.ts +0 -13
- package/dist/components/form/PhoneInput.test.d.ts +0 -1
- package/dist/components/form/PhoneInput.vue.d.ts +0 -89
- package/dist/components/form/QuantityInput.stories.d.ts +0 -12
- package/dist/components/form/QuantityInput.test.d.ts +0 -1
- package/dist/components/form/QuantityInput.vue.d.ts +0 -32
- package/dist/components/form/RangeSlider.stories.d.ts +0 -13
- package/dist/components/form/RangeSlider.test.d.ts +0 -1
- package/dist/components/form/RangeSlider.vue.d.ts +0 -35
- package/dist/components/form/Rating.stories.d.ts +0 -16
- package/dist/components/form/Rating.test.d.ts +0 -1
- package/dist/components/form/Rating.vue.d.ts +0 -43
- package/dist/components/form/SearchInput.stories.d.ts +0 -13
- package/dist/components/form/SearchInput.test.d.ts +0 -1
- package/dist/components/form/SearchInput.vue.d.ts +0 -26
- package/dist/components/form/Slider.stories.d.ts +0 -13
- package/dist/components/form/Slider.test.d.ts +0 -1
- package/dist/components/form/Slider.vue.d.ts +0 -29
- package/dist/components/form/Switch.stories.d.ts +0 -11
- package/dist/components/form/Switch.test.d.ts +0 -1
- package/dist/components/form/Switch.vue.d.ts +0 -23
- package/dist/components/form/TagsInput.stories.d.ts +0 -13
- package/dist/components/form/TagsInput.test.d.ts +0 -1
- package/dist/components/form/TagsInput.vue.d.ts +0 -37
- package/dist/components/form/URLInput.stories.d.ts +0 -11
- package/dist/components/form/URLInput.test.d.ts +0 -1
- package/dist/components/form/URLInput.vue.d.ts +0 -32
- package/dist/components/form/index.cjs +0 -34
- package/dist/components/form/index.cjs.map +0 -1
- package/dist/components/form/index.test.d.ts +0 -1
- package/dist/components/index.cjs +0 -91
- package/dist/components/index.cjs.map +0 -1
- package/dist/components/index.d.ts +0 -5
- package/dist/components/index.test.d.ts +0 -1
- package/dist/components/layout/AuthLayout.stories.d.ts +0 -10
- package/dist/components/layout/AuthLayout.test.d.ts +0 -1
- package/dist/components/layout/AuthLayout.vue.d.ts +0 -88
- package/dist/components/layout/BaseLayout.stories.d.ts +0 -11
- package/dist/components/layout/BaseLayout.test.d.ts +0 -1
- package/dist/components/layout/BaseLayout.vue.d.ts +0 -77
- package/dist/components/layout/PageHero.stories.d.ts +0 -11
- package/dist/components/layout/PageHero.test.d.ts +0 -1
- package/dist/components/layout/PageHero.vue.d.ts +0 -51
- package/dist/components/layout/PageLayout.stories.d.ts +0 -10
- package/dist/components/layout/PageLayout.test.d.ts +0 -1
- package/dist/components/layout/PageLayout.vue.d.ts +0 -37
- package/dist/components/layout/index.cjs +0 -8
- package/dist/components/layout/index.cjs.map +0 -1
- package/dist/components/layout/index.test.d.ts +0 -1
- package/dist/components/type/BadgeType.stories.d.ts +0 -13
- package/dist/components/type/BadgeType.test.d.ts +0 -1
- package/dist/components/type/BooleanType.stories.d.ts +0 -12
- package/dist/components/type/BooleanType.test.d.ts +0 -1
- package/dist/components/type/DateType.stories.d.ts +0 -12
- package/dist/components/type/DateType.test.d.ts +0 -1
- package/dist/components/type/NumberType.stories.d.ts +0 -11
- package/dist/components/type/NumberType.test.d.ts +0 -1
- package/dist/components/type/TextType.stories.d.ts +0 -10
- package/dist/components/type/TextType.test.d.ts +0 -1
- package/dist/components/type/index.cjs +0 -9
- package/dist/components/type/index.cjs.map +0 -1
- package/dist/components/type/index.test.d.ts +0 -1
- package/dist/composables/index.cjs +0 -19
- package/dist/composables/index.cjs.map +0 -1
- package/dist/composables/index.d.ts +0 -8
- package/dist/composables/index.test.d.ts +0 -1
- package/dist/composables/useDarkMode.d.ts +0 -14
- package/dist/composables/useDarkMode.test.d.ts +0 -1
- package/dist/composables/useDropdown.d.ts +0 -51
- package/dist/composables/useDropdown.test.d.ts +0 -1
- package/dist/composables/useExportCSV.d.ts +0 -10
- package/dist/composables/useExportCSV.test.d.ts +0 -1
- package/dist/composables/useFocusTrap.d.ts +0 -41
- package/dist/composables/useFocusTrap.test.d.ts +0 -1
- package/dist/composables/useId.d.ts +0 -42
- package/dist/composables/useId.test.d.ts +0 -1
- package/dist/composables/useModal.d.ts +0 -60
- package/dist/composables/useModal.test.d.ts +0 -1
- package/dist/composables/useNotifications.d.ts +0 -27
- package/dist/composables/useNotifications.test.d.ts +0 -1
- package/dist/composables/useToast.d.ts +0 -30
- package/dist/composables/useToast.test.d.ts +0 -1
- package/dist/index-D1x3TH9k.cjs +0 -401
- package/dist/index-D1x3TH9k.cjs.map +0 -1
- package/dist/index-D9_zMCpN.js.map +0 -1
- package/dist/index-PehFvNFG.cjs +0 -94
- package/dist/index-PehFvNFG.cjs.map +0 -1
- package/dist/index.cjs +0 -123
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.test.d.ts +0 -1
- package/dist/plugin.d.ts +0 -24
- package/dist/style.css +0 -2
- package/dist/types/components.d.ts +0 -27
- package/dist/types/form.d.ts +0 -37
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/types/index.test.d.ts +0 -1
- package/dist/types/notification.d.ts +0 -12
- package/dist/types/property.d.ts +0 -34
- package/dist/useDarkMode-DLZcJEUQ.cjs +0 -52
- package/dist/useDarkMode-DLZcJEUQ.cjs.map +0 -1
- package/dist/useDropdown-DHFnd259.cjs +0 -130
- package/dist/useDropdown-DHFnd259.cjs.map +0 -1
- package/dist/useFocusTrap-kcxO8AeU.cjs +0 -119
- package/dist/useFocusTrap-kcxO8AeU.cjs.map +0 -1
- package/dist/useId-nxrBaIC9.cjs +0 -25
- package/dist/useId-nxrBaIC9.cjs.map +0 -1
- package/dist/useToast-Bk60GArg.cjs +0 -176
- package/dist/useToast-Bk60GArg.cjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Composable for exporting data to CSV format
|
|
3
|
-
*/
|
|
4
|
-
export declare function useExportCSV(): {
|
|
5
|
-
exportToCSV: <T extends Record<string, unknown>>(data: T[], columns: {
|
|
6
|
-
key: keyof T;
|
|
7
|
-
label: string;
|
|
8
|
-
}[], filename?: string) => void;
|
|
9
|
-
escapeCSV: (value: unknown) => string;
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
export interface UseFocusTrapOptions {
|
|
3
|
-
/** Whether the focus trap is active */
|
|
4
|
-
active?: Ref<boolean> | boolean;
|
|
5
|
-
/** Focus the first focusable element when trap activates */
|
|
6
|
-
focusFirst?: boolean;
|
|
7
|
-
/** Restore focus to the previously focused element when trap deactivates */
|
|
8
|
-
restoreFocus?: boolean;
|
|
9
|
-
/** Initial element to focus (selector or element) */
|
|
10
|
-
initialFocus?: string | HTMLElement | null;
|
|
11
|
-
}
|
|
12
|
-
export interface UseFocusTrapReturn {
|
|
13
|
-
/** Ref to attach to the container element */
|
|
14
|
-
containerRef: Ref<HTMLElement | null>;
|
|
15
|
-
/** Activate the focus trap manually */
|
|
16
|
-
activate: () => void;
|
|
17
|
-
/** Deactivate the focus trap manually */
|
|
18
|
-
deactivate: () => void;
|
|
19
|
-
/** Whether the focus trap is currently active */
|
|
20
|
-
isActive: Ref<boolean>;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Composable for trapping focus within a container element (for modals, dialogs, etc.)
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```vue
|
|
27
|
-
* <script setup>
|
|
28
|
-
* const isOpen = ref(false)
|
|
29
|
-
* const { containerRef } = useFocusTrap({ active: isOpen })
|
|
30
|
-
* </script>
|
|
31
|
-
*
|
|
32
|
-
* <template>
|
|
33
|
-
* <div v-if="isOpen" ref="containerRef" role="dialog">
|
|
34
|
-
* <button>First focusable</button>
|
|
35
|
-
* <input type="text" />
|
|
36
|
-
* <button @click="isOpen = false">Close</button>
|
|
37
|
-
* </div>
|
|
38
|
-
* </template>
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
export declare function useFocusTrap(options?: UseFocusTrapOptions): UseFocusTrapReturn;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
/**
|
|
3
|
-
* Generates a unique ID for accessibility relationships (aria-labelledby, aria-describedby, etc.)
|
|
4
|
-
* Pattern: cisse-{prefix}-{counter}
|
|
5
|
-
*/
|
|
6
|
-
export declare function generateId(prefix?: string): string;
|
|
7
|
-
/**
|
|
8
|
-
* Resets the ID counter (useful for testing)
|
|
9
|
-
*/
|
|
10
|
-
export declare function resetIdCounter(): void;
|
|
11
|
-
export interface UseIdOptions {
|
|
12
|
-
/** Prefix for the generated ID */
|
|
13
|
-
prefix?: string;
|
|
14
|
-
/** Custom ID to use instead of generating one */
|
|
15
|
-
id?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface UseIdReturn {
|
|
18
|
-
/** The unique ID (reactive) */
|
|
19
|
-
id: Ref<string>;
|
|
20
|
-
/** Generate a related ID with a suffix (e.g., id-label, id-description) */
|
|
21
|
-
related: (suffix: string) => string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Composable for generating unique IDs for accessibility relationships
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```vue
|
|
28
|
-
* <script setup>
|
|
29
|
-
* const { id, related } = useId({ prefix: 'modal' })
|
|
30
|
-
* // id.value = 'cisse-modal-1'
|
|
31
|
-
* // related('title') = 'cisse-modal-1-title'
|
|
32
|
-
* // related('description') = 'cisse-modal-1-description'
|
|
33
|
-
* </script>
|
|
34
|
-
*
|
|
35
|
-
* <template>
|
|
36
|
-
* <div :id="id" role="dialog" :aria-labelledby="related('title')">
|
|
37
|
-
* <h2 :id="related('title')">Modal Title</h2>
|
|
38
|
-
* </div>
|
|
39
|
-
* </template>
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
export declare function useId(options?: UseIdOptions): UseIdReturn;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
export interface UseModalReturn<T = unknown> {
|
|
3
|
-
/** Whether the modal is currently open */
|
|
4
|
-
isOpen: Ref<boolean>;
|
|
5
|
-
/** Data associated with the modal (e.g., item being edited) */
|
|
6
|
-
data: Ref<T | null>;
|
|
7
|
-
/** Open the modal, optionally with data */
|
|
8
|
-
open: (newData?: T) => void;
|
|
9
|
-
/** Close the modal and clear data */
|
|
10
|
-
close: () => void;
|
|
11
|
-
/** Toggle the modal state */
|
|
12
|
-
toggle: () => void;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Composable for managing modal state
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* // Simple modal
|
|
20
|
-
* const createModal = useModal()
|
|
21
|
-
* createModal.open()
|
|
22
|
-
* createModal.close()
|
|
23
|
-
*
|
|
24
|
-
* // Modal with data (e.g., for editing)
|
|
25
|
-
* const editModal = useModal<User>()
|
|
26
|
-
* editModal.open(selectedUser)
|
|
27
|
-
* // Access editModal.data.value in modal
|
|
28
|
-
*
|
|
29
|
-
* // With onClose callback
|
|
30
|
-
* const deleteModal = useModal<Item>({ onClose: () => refetch() })
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export declare function useModal<T = unknown>(options?: {
|
|
34
|
-
/** Initial open state */
|
|
35
|
-
initialOpen?: boolean;
|
|
36
|
-
/** Initial data */
|
|
37
|
-
initialData?: T | null;
|
|
38
|
-
/** Callback when modal opens */
|
|
39
|
-
onOpen?: (data: T | null) => void;
|
|
40
|
-
/** Callback when modal closes */
|
|
41
|
-
onClose?: () => void;
|
|
42
|
-
}): UseModalReturn<T>;
|
|
43
|
-
/**
|
|
44
|
-
* Create multiple related modals at once
|
|
45
|
-
* Useful when a page has several modals (create, edit, delete, etc.)
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```ts
|
|
49
|
-
* const modals = useModals({
|
|
50
|
-
* create: useModal(),
|
|
51
|
-
* edit: useModal<User>(),
|
|
52
|
-
* delete: useModal<User>(),
|
|
53
|
-
* })
|
|
54
|
-
*
|
|
55
|
-
* modals.create.open()
|
|
56
|
-
* modals.edit.open(user)
|
|
57
|
-
* modals.delete.close()
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
export declare function useModals<T extends Record<string, UseModalReturn<any>>>(modals: T): T;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { NotificationType, NotificationOptions } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Composable for managing notifications/toasts
|
|
4
|
-
* Uses singleton pattern - all components share the same notifications state
|
|
5
|
-
*/
|
|
6
|
-
export declare function useNotifications(): {
|
|
7
|
-
notifications: Readonly<import('vue').Ref<readonly {
|
|
8
|
-
readonly id: string;
|
|
9
|
-
readonly type: NotificationType;
|
|
10
|
-
readonly message: string;
|
|
11
|
-
readonly title?: string | null | undefined;
|
|
12
|
-
readonly duration?: number | undefined;
|
|
13
|
-
}[], readonly {
|
|
14
|
-
readonly id: string;
|
|
15
|
-
readonly type: NotificationType;
|
|
16
|
-
readonly message: string;
|
|
17
|
-
readonly title?: string | null | undefined;
|
|
18
|
-
readonly duration?: number | undefined;
|
|
19
|
-
}[]>>;
|
|
20
|
-
notify: (type: NotificationType, message: string, options?: NotificationOptions) => string;
|
|
21
|
-
success: (message: string, options?: NotificationOptions) => string;
|
|
22
|
-
warning: (message: string, options?: NotificationOptions) => string;
|
|
23
|
-
error: (message: string, options?: NotificationOptions) => string;
|
|
24
|
-
info: (message: string, options?: NotificationOptions) => string;
|
|
25
|
-
remove: (id: string) => void;
|
|
26
|
-
clear: () => void;
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ToastType } from '../components/feedback/Toast.vue';
|
|
2
|
-
import { ToastItem } from '../components/feedback/ToastContainer.vue';
|
|
3
|
-
export interface ToastOptions {
|
|
4
|
-
message: string;
|
|
5
|
-
type?: ToastType;
|
|
6
|
-
title?: string;
|
|
7
|
-
duration?: number;
|
|
8
|
-
}
|
|
9
|
-
export declare function useToast(): {
|
|
10
|
-
toasts: import('vue').Ref<{
|
|
11
|
-
id: string;
|
|
12
|
-
message: string;
|
|
13
|
-
type?: ToastType | undefined;
|
|
14
|
-
title?: string | undefined;
|
|
15
|
-
duration?: number | undefined;
|
|
16
|
-
}[], ToastItem[] | {
|
|
17
|
-
id: string;
|
|
18
|
-
message: string;
|
|
19
|
-
type?: ToastType | undefined;
|
|
20
|
-
title?: string | undefined;
|
|
21
|
-
duration?: number | undefined;
|
|
22
|
-
}[]>;
|
|
23
|
-
add: (options: ToastOptions) => string;
|
|
24
|
-
remove: (id: string) => void;
|
|
25
|
-
clear: () => void;
|
|
26
|
-
success: (message: string, title?: string) => string;
|
|
27
|
-
error: (message: string, title?: string) => string;
|
|
28
|
-
warning: (message: string, title?: string) => string;
|
|
29
|
-
info: (message: string, title?: string) => string;
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/index-D1x3TH9k.cjs
DELETED
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const vue = require("vue");
|
|
3
|
-
const useId = require("./useId-nxrBaIC9.cjs");
|
|
4
|
-
const _hoisted_1 = ["id", "checked", "disabled", "indeterminate", "aria-describedby"];
|
|
5
|
-
const _hoisted_2 = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "flex flex-col"
|
|
8
|
-
};
|
|
9
|
-
const _hoisted_3 = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "text-sm font-medium text-gray-900 dark:text-white"
|
|
12
|
-
};
|
|
13
|
-
const _hoisted_4 = ["id"];
|
|
14
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
15
|
-
__name: "Checkbox",
|
|
16
|
-
props: {
|
|
17
|
-
modelValue: { type: Boolean, default: false },
|
|
18
|
-
label: {},
|
|
19
|
-
description: {},
|
|
20
|
-
disabled: { type: Boolean },
|
|
21
|
-
indeterminate: { type: Boolean },
|
|
22
|
-
id: {}
|
|
23
|
-
},
|
|
24
|
-
emits: ["update:modelValue"],
|
|
25
|
-
setup(__props, { emit: __emit }) {
|
|
26
|
-
const props = __props;
|
|
27
|
-
const emit = __emit;
|
|
28
|
-
const { id: generatedId, related } = useId.useId({ prefix: "checkbox", id: props.id });
|
|
29
|
-
const inputId = vue.computed(() => props.id ?? generatedId.value);
|
|
30
|
-
const descriptionId = vue.computed(() => related("description"));
|
|
31
|
-
const toggle = (event) => {
|
|
32
|
-
const target = event.target;
|
|
33
|
-
emit("update:modelValue", target.checked);
|
|
34
|
-
};
|
|
35
|
-
return (_ctx, _cache) => {
|
|
36
|
-
return vue.openBlock(), vue.createElementBlock("label", {
|
|
37
|
-
class: vue.normalizeClass(["inline-flex items-start gap-3", __props.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"])
|
|
38
|
-
}, [
|
|
39
|
-
vue.createElementVNode("input", {
|
|
40
|
-
id: inputId.value,
|
|
41
|
-
type: "checkbox",
|
|
42
|
-
checked: __props.modelValue,
|
|
43
|
-
disabled: __props.disabled,
|
|
44
|
-
indeterminate: __props.indeterminate,
|
|
45
|
-
"aria-describedby": __props.description ? descriptionId.value : void 0,
|
|
46
|
-
class: "mt-0.5 size-4 rounded border-gray-300 text-primary/90 focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:cursor-not-allowed dark:border-gray-600 dark:bg-gray-800 dark:focus:ring-offset-gray-900",
|
|
47
|
-
onChange: toggle
|
|
48
|
-
}, null, 40, _hoisted_1),
|
|
49
|
-
__props.label || __props.description ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
50
|
-
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3, vue.toDisplayString(__props.label), 1)) : vue.createCommentVNode("", true),
|
|
51
|
-
__props.description ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
52
|
-
key: 1,
|
|
53
|
-
id: descriptionId.value,
|
|
54
|
-
class: "text-sm text-gray-500 dark:text-gray-400"
|
|
55
|
-
}, vue.toDisplayString(__props.description), 9, _hoisted_4)) : vue.createCommentVNode("", true)
|
|
56
|
-
])) : vue.createCommentVNode("", true)
|
|
57
|
-
], 2);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
|
|
62
|
-
const injectLocal = /* @__NO_SIDE_EFFECTS__ */ (...args) => {
|
|
63
|
-
var _getCurrentInstance;
|
|
64
|
-
const key = args[0];
|
|
65
|
-
const instance = (_getCurrentInstance = vue.getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;
|
|
66
|
-
const owner = instance !== null && instance !== void 0 ? instance : vue.getCurrentScope();
|
|
67
|
-
if (owner == null && !vue.hasInjectionContext()) throw new Error("injectLocal must be called in setup");
|
|
68
|
-
if (owner && localProvidedStateMap.has(owner) && key in localProvidedStateMap.get(owner)) return localProvidedStateMap.get(owner)[key];
|
|
69
|
-
return vue.inject(...args);
|
|
70
|
-
};
|
|
71
|
-
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
72
|
-
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
73
|
-
const toString = Object.prototype.toString;
|
|
74
|
-
const isObject = (val) => toString.call(val) === "[object Object]";
|
|
75
|
-
const noop = () => {
|
|
76
|
-
};
|
|
77
|
-
function createFilterWrapper(filter, fn) {
|
|
78
|
-
function wrapper(...args) {
|
|
79
|
-
return new Promise((resolve, reject) => {
|
|
80
|
-
Promise.resolve(filter(() => fn.apply(this, args), {
|
|
81
|
-
fn,
|
|
82
|
-
thisArg: this,
|
|
83
|
-
args
|
|
84
|
-
})).then(resolve).catch(reject);
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
return wrapper;
|
|
88
|
-
}
|
|
89
|
-
function debounceFilter(ms, options = {}) {
|
|
90
|
-
let timer;
|
|
91
|
-
let maxTimer;
|
|
92
|
-
let lastRejector = noop;
|
|
93
|
-
const _clearTimeout = (timer$1) => {
|
|
94
|
-
clearTimeout(timer$1);
|
|
95
|
-
lastRejector();
|
|
96
|
-
lastRejector = noop;
|
|
97
|
-
};
|
|
98
|
-
let lastInvoker;
|
|
99
|
-
const filter = (invoke$1) => {
|
|
100
|
-
const duration = vue.toValue(ms);
|
|
101
|
-
const maxDuration = vue.toValue(options.maxWait);
|
|
102
|
-
if (timer) _clearTimeout(timer);
|
|
103
|
-
if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
|
|
104
|
-
if (maxTimer) {
|
|
105
|
-
_clearTimeout(maxTimer);
|
|
106
|
-
maxTimer = void 0;
|
|
107
|
-
}
|
|
108
|
-
return Promise.resolve(invoke$1());
|
|
109
|
-
}
|
|
110
|
-
return new Promise((resolve, reject) => {
|
|
111
|
-
lastRejector = options.rejectOnCancel ? reject : resolve;
|
|
112
|
-
lastInvoker = invoke$1;
|
|
113
|
-
if (maxDuration && !maxTimer) maxTimer = setTimeout(() => {
|
|
114
|
-
if (timer) _clearTimeout(timer);
|
|
115
|
-
maxTimer = void 0;
|
|
116
|
-
resolve(lastInvoker());
|
|
117
|
-
}, maxDuration);
|
|
118
|
-
timer = setTimeout(() => {
|
|
119
|
-
if (maxTimer) _clearTimeout(maxTimer);
|
|
120
|
-
maxTimer = void 0;
|
|
121
|
-
resolve(invoke$1());
|
|
122
|
-
}, duration);
|
|
123
|
-
});
|
|
124
|
-
};
|
|
125
|
-
return filter;
|
|
126
|
-
}
|
|
127
|
-
function increaseWithUnit(target, delta) {
|
|
128
|
-
var _target$match;
|
|
129
|
-
if (typeof target === "number") return target + delta;
|
|
130
|
-
const value = ((_target$match = target.match(/^-?\d+\.?\d*/)) === null || _target$match === void 0 ? void 0 : _target$match[0]) || "";
|
|
131
|
-
const unit = target.slice(value.length);
|
|
132
|
-
const result = Number.parseFloat(value) + delta;
|
|
133
|
-
if (Number.isNaN(result)) return target;
|
|
134
|
-
return result + unit;
|
|
135
|
-
}
|
|
136
|
-
function pxValue(px) {
|
|
137
|
-
return px.endsWith("rem") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);
|
|
138
|
-
}
|
|
139
|
-
function toArray(value) {
|
|
140
|
-
return Array.isArray(value) ? value : [value];
|
|
141
|
-
}
|
|
142
|
-
function getLifeCycleTarget(target) {
|
|
143
|
-
return vue.getCurrentInstance();
|
|
144
|
-
}
|
|
145
|
-
// @__NO_SIDE_EFFECTS__
|
|
146
|
-
function useDebounceFn(fn, ms = 200, options = {}) {
|
|
147
|
-
return createFilterWrapper(debounceFilter(ms, options), fn);
|
|
148
|
-
}
|
|
149
|
-
function tryOnMounted(fn, sync = true, target) {
|
|
150
|
-
if (getLifeCycleTarget()) vue.onMounted(fn, target);
|
|
151
|
-
else if (sync) fn();
|
|
152
|
-
else vue.nextTick(fn);
|
|
153
|
-
}
|
|
154
|
-
function watchImmediate(source, cb, options) {
|
|
155
|
-
return vue.watch(source, cb, {
|
|
156
|
-
...options,
|
|
157
|
-
immediate: true
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
const defaultWindow = isClient ? window : void 0;
|
|
161
|
-
function unrefElement(elRef) {
|
|
162
|
-
var _$el;
|
|
163
|
-
const plain = vue.toValue(elRef);
|
|
164
|
-
return (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;
|
|
165
|
-
}
|
|
166
|
-
function useEventListener(...args) {
|
|
167
|
-
const register = (el, event, listener, options) => {
|
|
168
|
-
el.addEventListener(event, listener, options);
|
|
169
|
-
return () => el.removeEventListener(event, listener, options);
|
|
170
|
-
};
|
|
171
|
-
const firstParamTargets = vue.computed(() => {
|
|
172
|
-
const test = toArray(vue.toValue(args[0])).filter((e) => e != null);
|
|
173
|
-
return test.every((e) => typeof e !== "string") ? test : void 0;
|
|
174
|
-
});
|
|
175
|
-
return watchImmediate(() => {
|
|
176
|
-
var _firstParamTargets$va, _firstParamTargets$va2;
|
|
177
|
-
return [
|
|
178
|
-
(_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),
|
|
179
|
-
toArray(vue.toValue(firstParamTargets.value ? args[1] : args[0])),
|
|
180
|
-
toArray(vue.unref(firstParamTargets.value ? args[2] : args[1])),
|
|
181
|
-
vue.toValue(firstParamTargets.value ? args[3] : args[2])
|
|
182
|
-
];
|
|
183
|
-
}, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {
|
|
184
|
-
if (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;
|
|
185
|
-
const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
|
|
186
|
-
const cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));
|
|
187
|
-
onCleanup(() => {
|
|
188
|
-
cleanups.forEach((fn) => fn());
|
|
189
|
-
});
|
|
190
|
-
}, { flush: "post" });
|
|
191
|
-
}
|
|
192
|
-
function onClickOutside(target, handler, options = {}) {
|
|
193
|
-
const { window: window$1 = defaultWindow, ignore = [], capture = true, detectIframe = false, controls = false } = options;
|
|
194
|
-
if (!window$1) return controls ? {
|
|
195
|
-
stop: noop,
|
|
196
|
-
cancel: noop,
|
|
197
|
-
trigger: noop
|
|
198
|
-
} : noop;
|
|
199
|
-
let shouldListen = true;
|
|
200
|
-
const shouldIgnore = (event) => {
|
|
201
|
-
return vue.toValue(ignore).some((target$1) => {
|
|
202
|
-
if (typeof target$1 === "string") return Array.from(window$1.document.querySelectorAll(target$1)).some((el) => el === event.target || event.composedPath().includes(el));
|
|
203
|
-
else {
|
|
204
|
-
const el = unrefElement(target$1);
|
|
205
|
-
return el && (event.target === el || event.composedPath().includes(el));
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
};
|
|
209
|
-
function hasMultipleRoots(target$1) {
|
|
210
|
-
const vm = vue.toValue(target$1);
|
|
211
|
-
return vm && vm.$.subTree.shapeFlag === 16;
|
|
212
|
-
}
|
|
213
|
-
function checkMultipleRoots(target$1, event) {
|
|
214
|
-
const vm = vue.toValue(target$1);
|
|
215
|
-
const children = vm.$.subTree && vm.$.subTree.children;
|
|
216
|
-
if (children == null || !Array.isArray(children)) return false;
|
|
217
|
-
return children.some((child) => child.el === event.target || event.composedPath().includes(child.el));
|
|
218
|
-
}
|
|
219
|
-
const listener = (event) => {
|
|
220
|
-
const el = unrefElement(target);
|
|
221
|
-
if (event.target == null) return;
|
|
222
|
-
if (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return;
|
|
223
|
-
if (!el || el === event.target || event.composedPath().includes(el)) return;
|
|
224
|
-
if ("detail" in event && event.detail === 0) shouldListen = !shouldIgnore(event);
|
|
225
|
-
if (!shouldListen) {
|
|
226
|
-
shouldListen = true;
|
|
227
|
-
return;
|
|
228
|
-
}
|
|
229
|
-
handler(event);
|
|
230
|
-
};
|
|
231
|
-
let isProcessingClick = false;
|
|
232
|
-
const cleanup = [
|
|
233
|
-
useEventListener(window$1, "click", (event) => {
|
|
234
|
-
if (!isProcessingClick) {
|
|
235
|
-
isProcessingClick = true;
|
|
236
|
-
setTimeout(() => {
|
|
237
|
-
isProcessingClick = false;
|
|
238
|
-
}, 0);
|
|
239
|
-
listener(event);
|
|
240
|
-
}
|
|
241
|
-
}, {
|
|
242
|
-
passive: true,
|
|
243
|
-
capture
|
|
244
|
-
}),
|
|
245
|
-
useEventListener(window$1, "pointerdown", (e) => {
|
|
246
|
-
const el = unrefElement(target);
|
|
247
|
-
shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));
|
|
248
|
-
}, { passive: true }),
|
|
249
|
-
detectIframe && useEventListener(window$1, "blur", (event) => {
|
|
250
|
-
setTimeout(() => {
|
|
251
|
-
var _window$document$acti;
|
|
252
|
-
const el = unrefElement(target);
|
|
253
|
-
if (((_window$document$acti = window$1.document.activeElement) === null || _window$document$acti === void 0 ? void 0 : _window$document$acti.tagName) === "IFRAME" && !(el === null || el === void 0 ? void 0 : el.contains(window$1.document.activeElement))) handler(event);
|
|
254
|
-
}, 0);
|
|
255
|
-
}, { passive: true })
|
|
256
|
-
].filter(Boolean);
|
|
257
|
-
const stop = () => cleanup.forEach((fn) => fn());
|
|
258
|
-
if (controls) return {
|
|
259
|
-
stop,
|
|
260
|
-
cancel: () => {
|
|
261
|
-
shouldListen = false;
|
|
262
|
-
},
|
|
263
|
-
trigger: (event) => {
|
|
264
|
-
shouldListen = true;
|
|
265
|
-
listener(event);
|
|
266
|
-
shouldListen = false;
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
return stop;
|
|
270
|
-
}
|
|
271
|
-
// @__NO_SIDE_EFFECTS__
|
|
272
|
-
function useMounted() {
|
|
273
|
-
const isMounted = vue.shallowRef(false);
|
|
274
|
-
const instance = vue.getCurrentInstance();
|
|
275
|
-
if (instance) vue.onMounted(() => {
|
|
276
|
-
isMounted.value = true;
|
|
277
|
-
}, instance);
|
|
278
|
-
return isMounted;
|
|
279
|
-
}
|
|
280
|
-
// @__NO_SIDE_EFFECTS__
|
|
281
|
-
function useSupported(callback) {
|
|
282
|
-
const isMounted = /* @__PURE__ */ useMounted();
|
|
283
|
-
return vue.computed(() => {
|
|
284
|
-
isMounted.value;
|
|
285
|
-
return Boolean(callback());
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
const ssrWidthSymbol = Symbol("vueuse-ssr-width");
|
|
289
|
-
// @__NO_SIDE_EFFECTS__
|
|
290
|
-
function useSSRWidth() {
|
|
291
|
-
const ssrWidth = vue.hasInjectionContext() ? /* @__PURE__ */ injectLocal(ssrWidthSymbol, null) : null;
|
|
292
|
-
return typeof ssrWidth === "number" ? ssrWidth : void 0;
|
|
293
|
-
}
|
|
294
|
-
function useMediaQuery(query, options = {}) {
|
|
295
|
-
const { window: window$1 = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;
|
|
296
|
-
const isSupported = /* @__PURE__ */ useSupported(() => window$1 && "matchMedia" in window$1 && typeof window$1.matchMedia === "function");
|
|
297
|
-
const ssrSupport = vue.shallowRef(typeof ssrWidth === "number");
|
|
298
|
-
const mediaQuery = vue.shallowRef();
|
|
299
|
-
const matches = vue.shallowRef(false);
|
|
300
|
-
const handler = (event) => {
|
|
301
|
-
matches.value = event.matches;
|
|
302
|
-
};
|
|
303
|
-
vue.watchEffect(() => {
|
|
304
|
-
if (ssrSupport.value) {
|
|
305
|
-
ssrSupport.value = !isSupported.value;
|
|
306
|
-
matches.value = vue.toValue(query).split(",").some((queryString) => {
|
|
307
|
-
const not = queryString.includes("not all");
|
|
308
|
-
const minWidth = queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
309
|
-
const maxWidth = queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
310
|
-
let res = Boolean(minWidth || maxWidth);
|
|
311
|
-
if (minWidth && res) res = ssrWidth >= pxValue(minWidth[1]);
|
|
312
|
-
if (maxWidth && res) res = ssrWidth <= pxValue(maxWidth[1]);
|
|
313
|
-
return not ? !res : res;
|
|
314
|
-
});
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
317
|
-
if (!isSupported.value) return;
|
|
318
|
-
mediaQuery.value = window$1.matchMedia(vue.toValue(query));
|
|
319
|
-
matches.value = mediaQuery.value.matches;
|
|
320
|
-
});
|
|
321
|
-
useEventListener(mediaQuery, "change", handler, { passive: true });
|
|
322
|
-
return vue.computed(() => matches.value);
|
|
323
|
-
}
|
|
324
|
-
// @__NO_SIDE_EFFECTS__
|
|
325
|
-
function useBreakpoints(breakpoints, options = {}) {
|
|
326
|
-
function getValue$1(k, delta) {
|
|
327
|
-
let v = vue.toValue(breakpoints[vue.toValue(k)]);
|
|
328
|
-
if (delta != null) v = increaseWithUnit(v, delta);
|
|
329
|
-
if (typeof v === "number") v = `${v}px`;
|
|
330
|
-
return v;
|
|
331
|
-
}
|
|
332
|
-
const { window: window$1 = defaultWindow, strategy = "min-width", ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;
|
|
333
|
-
const ssrSupport = typeof ssrWidth === "number";
|
|
334
|
-
const mounted = ssrSupport ? vue.shallowRef(false) : { value: true };
|
|
335
|
-
if (ssrSupport) tryOnMounted(() => mounted.value = !!window$1);
|
|
336
|
-
function match(query, size) {
|
|
337
|
-
if (!mounted.value && ssrSupport) return query === "min" ? ssrWidth >= pxValue(size) : ssrWidth <= pxValue(size);
|
|
338
|
-
if (!window$1) return false;
|
|
339
|
-
return window$1.matchMedia(`(${query}-width: ${size})`).matches;
|
|
340
|
-
}
|
|
341
|
-
const greaterOrEqual = (k) => {
|
|
342
|
-
return useMediaQuery(() => `(min-width: ${getValue$1(k)})`, options);
|
|
343
|
-
};
|
|
344
|
-
const smallerOrEqual = (k) => {
|
|
345
|
-
return useMediaQuery(() => `(max-width: ${getValue$1(k)})`, options);
|
|
346
|
-
};
|
|
347
|
-
const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {
|
|
348
|
-
Object.defineProperty(shortcuts, k, {
|
|
349
|
-
get: () => strategy === "min-width" ? greaterOrEqual(k) : smallerOrEqual(k),
|
|
350
|
-
enumerable: true,
|
|
351
|
-
configurable: true
|
|
352
|
-
});
|
|
353
|
-
return shortcuts;
|
|
354
|
-
}, {});
|
|
355
|
-
function current() {
|
|
356
|
-
const points = Object.keys(breakpoints).map((k) => [
|
|
357
|
-
k,
|
|
358
|
-
shortcutMethods[k],
|
|
359
|
-
pxValue(getValue$1(k))
|
|
360
|
-
]).sort((a, b) => a[2] - b[2]);
|
|
361
|
-
return vue.computed(() => points.filter(([, v]) => v.value).map(([k]) => k));
|
|
362
|
-
}
|
|
363
|
-
return Object.assign(shortcutMethods, {
|
|
364
|
-
greaterOrEqual,
|
|
365
|
-
smallerOrEqual,
|
|
366
|
-
greater(k) {
|
|
367
|
-
return useMediaQuery(() => `(min-width: ${getValue$1(k, 0.1)})`, options);
|
|
368
|
-
},
|
|
369
|
-
smaller(k) {
|
|
370
|
-
return useMediaQuery(() => `(max-width: ${getValue$1(k, -0.1)})`, options);
|
|
371
|
-
},
|
|
372
|
-
between(a, b) {
|
|
373
|
-
return useMediaQuery(() => `(min-width: ${getValue$1(a)}) and (max-width: ${getValue$1(b, -0.1)})`, options);
|
|
374
|
-
},
|
|
375
|
-
isGreater(k) {
|
|
376
|
-
return match("min", getValue$1(k, 0.1));
|
|
377
|
-
},
|
|
378
|
-
isGreaterOrEqual(k) {
|
|
379
|
-
return match("min", getValue$1(k));
|
|
380
|
-
},
|
|
381
|
-
isSmaller(k) {
|
|
382
|
-
return match("max", getValue$1(k, -0.1));
|
|
383
|
-
},
|
|
384
|
-
isSmallerOrEqual(k) {
|
|
385
|
-
return match("max", getValue$1(k));
|
|
386
|
-
},
|
|
387
|
-
isInBetween(a, b) {
|
|
388
|
-
return match("min", getValue$1(a)) && match("max", getValue$1(b, -0.1));
|
|
389
|
-
},
|
|
390
|
-
current,
|
|
391
|
-
active() {
|
|
392
|
-
const bps = current();
|
|
393
|
-
return vue.computed(() => bps.value.length === 0 ? "" : bps.value.at(strategy === "min-width" ? -1 : 0));
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
exports._sfc_main = _sfc_main;
|
|
398
|
-
exports.onClickOutside = onClickOutside;
|
|
399
|
-
exports.useBreakpoints = useBreakpoints;
|
|
400
|
-
exports.useDebounceFn = useDebounceFn;
|
|
401
|
-
//# sourceMappingURL=index-D1x3TH9k.cjs.map
|