@leaflink/stash 49.5.0 → 50.0.1
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/assets/icons/circle-empty.svg +1 -0
- package/assets/spritesheet.svg +1 -1
- package/dist/Accordion.js +25 -28
- package/dist/Accordion.js.map +1 -1
- package/dist/Accordion.vue.d.ts +16 -16
- package/dist/ActionsDropdown.js +14 -26
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/ActionsDropdown.vue.d.ts +12 -12
- package/dist/AddressSelect.js +22 -47
- package/dist/AddressSelect.js.map +1 -1
- package/dist/AddressSelect.vue.d.ts +45 -45
- package/dist/Alert.js +4 -6
- package/dist/Alert.js.map +1 -1
- package/dist/Alert.vue.d.ts +18 -18
- package/dist/AppNavigationItem.js +16 -19
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/AppNavigationItem.vue.d.ts +4 -4
- package/dist/AppSidebar.js +27 -28
- package/dist/AppSidebar.js.map +1 -1
- package/dist/AppSidebar.vue.d.ts +7 -7
- package/dist/AppTopbar.js +12 -17
- package/dist/AppTopbar.js.map +1 -1
- package/dist/AppTopbar.vue.d.ts +8 -8
- package/dist/Avatar.js +1 -1
- package/dist/Avatar.vue.d.ts +22 -22
- package/dist/Backdrop.js +1 -1
- package/dist/Backdrop.vue.d.ts +1 -1
- package/dist/Badge.js +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Badge.vue.d.ts +36 -36
- package/dist/Box.js +2 -3
- package/dist/Box.js.map +1 -1
- package/dist/Box.vue.d.ts +12 -12
- package/dist/{Box.vue_vue_type_script_setup_true_lang-69e5176b.js → Box.vue_vue_type_script_setup_true_lang-DgJHq-09.js} +1 -1
- package/dist/{Box.vue_vue_type_script_setup_true_lang-69e5176b.js.map → Box.vue_vue_type_script_setup_true_lang-DgJHq-09.js.map} +1 -1
- package/dist/Button.js +40 -27
- package/dist/Button.js.map +1 -1
- package/dist/Button.vue.d.ts +34 -27
- package/dist/ButtonGroup.js +1 -1
- package/dist/ButtonGroup.vue.d.ts +14 -14
- package/dist/Card.vue.d.ts +3 -3
- package/dist/CardContent.js +1 -1
- package/dist/CardContent.vue.d.ts +1 -1
- package/dist/CardFooter.js +1 -1
- package/dist/CardFooter.vue.d.ts +1 -1
- package/dist/CardMedia.js +11 -14
- package/dist/CardMedia.js.map +1 -1
- package/dist/Carousel.js +179 -180
- package/dist/Carousel.js.map +1 -1
- package/dist/Carousel.vue.d.ts +33 -11
- package/dist/Checkbox.js +38 -35
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.vue.d.ts +31 -31
- package/dist/ChevronToggle.js +2 -10
- package/dist/ChevronToggle.js.map +1 -1
- package/dist/ChevronToggle.vue.d.ts +5 -5
- package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js → ChevronToggle.vue_vue_type_script_setup_true_lang-DuvluoTi.js} +1 -1
- package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js.map → ChevronToggle.vue_vue_type_script_setup_true_lang-DuvluoTi.js.map} +1 -1
- package/dist/Chip.js +17 -20
- package/dist/Chip.js.map +1 -1
- package/dist/Chip.vue.d.ts +32 -32
- package/dist/ConfirmationCodeInput.js +1 -1
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ConfirmationCodeInput.vue.d.ts +29 -29
- package/dist/ContextSwitcher.js +8 -14
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/ContextSwitcher.vue.d.ts +32 -32
- package/dist/Copy.js +23 -34
- package/dist/Copy.js.map +1 -1
- package/dist/Copy.vue.d.ts +9 -9
- package/dist/CurrencyInput.js +117 -128
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +26 -21
- package/dist/CustomRender.vue.d.ts +12 -1
- package/dist/DataView.js +70 -73
- package/dist/DataView.js.map +1 -1
- package/dist/{DataView.vue_used_vue_type_style_index_0_lang.module-5c180dba.js → DataView.keys-C7eaZg2G.js} +5 -8
- package/dist/DataView.keys-C7eaZg2G.js.map +1 -0
- package/dist/DataView.vue.d.ts +51 -51
- package/dist/DataViewFilters.js +76 -90
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/{DataViewFilters.keys-c80ffabe.js → DataViewFilters.keys-BLu07FiP.js} +1 -1
- package/dist/{DataViewFilters.keys-c80ffabe.js.map → DataViewFilters.keys-BLu07FiP.js.map} +1 -1
- package/dist/DataViewFilters.vue.d.ts +39 -39
- package/dist/DataViewSortButton.js +30 -43
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewSortButton.vue.d.ts +3 -3
- package/dist/DataViewToolbar.js +27 -36
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DataViewToolbar.vue.d.ts +17 -17
- package/dist/DatePicker.js +649 -662
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatePicker.vue.d.ts +73 -73
- package/dist/DescriptionList.js +1 -1
- package/dist/{DescriptionList.keys-c906ce05.js → DescriptionList.keys-BHlHYV6b.js} +1 -1
- package/dist/{DescriptionList.keys-c906ce05.js.map → DescriptionList.keys-BHlHYV6b.js.map} +1 -1
- package/dist/DescriptionList.vue.d.ts +6 -6
- package/dist/DescriptionListDetail.js +1 -1
- package/dist/DescriptionListDetail.vue.d.ts +1 -1
- package/dist/DescriptionListGroup.js +1 -1
- package/dist/DescriptionListGroup.vue.d.ts +1 -1
- package/dist/DescriptionListTerm.js +1 -1
- package/dist/DescriptionListTerm.vue.d.ts +1 -1
- package/dist/Dialog.js +26 -30
- package/dist/Dialog.js.map +1 -1
- package/dist/Dialog.vue.d.ts +34 -34
- package/dist/Divider.js +1 -1
- package/dist/Divider.js.map +1 -1
- package/dist/Divider.vue.d.ts +1 -1
- package/dist/Dropdown.js +21 -28
- package/dist/Dropdown.js.map +1 -1
- package/dist/Dropdown.vue.d.ts +28 -28
- package/dist/EmptyState.js +32 -33
- package/dist/EmptyState.js.map +1 -1
- package/dist/EmptyState.vue.d.ts +36 -36
- package/dist/Expand.js +2 -3
- package/dist/Expand.js.map +1 -1
- package/dist/Expand.vue.d.ts +14 -14
- package/dist/{Expand.vue_vue_type_script_setup_true_lang-0f236267.js → Expand.vue_vue_type_script_setup_true_lang-D0fSAtHr.js} +1 -1
- package/dist/{Expand.vue_vue_type_script_setup_true_lang-0f236267.js.map → Expand.vue_vue_type_script_setup_true_lang-D0fSAtHr.js.map} +1 -1
- package/dist/Field.js +2 -7
- package/dist/Field.js.map +1 -1
- package/dist/Field.vue.d.ts +30 -30
- package/dist/{Field.vue_vue_type_script_setup_true_lang-fded4f75.js → Field.vue_vue_type_script_setup_true_lang-DjxUvSRF.js} +2 -2
- package/dist/{Field.vue_vue_type_script_setup_true_lang-fded4f75.js.map → Field.vue_vue_type_script_setup_true_lang-DjxUvSRF.js.map} +1 -1
- package/dist/FileUpload.js +58 -57
- package/dist/FileUpload.js.map +1 -1
- package/dist/FileUpload.vue.d.ts +28 -28
- package/dist/FilterChip.js +12 -17
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterChip.vue.d.ts +19 -19
- package/dist/FilterDrawerItem.js +24 -30
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDrawerItem.vue.d.ts +2 -2
- package/dist/FilterDropdown.js +41 -57
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterDropdown.vue.d.ts +9 -9
- package/dist/FilterSelect.js +36 -45
- package/dist/FilterSelect.js.map +1 -1
- package/dist/FilterSelect.vue.d.ts +5 -5
- package/dist/Filters.js +60 -96
- package/dist/Filters.js.map +1 -1
- package/dist/Filters.vue.d.ts +2005 -2294
- package/dist/HttpError.js +16 -23
- package/dist/HttpError.js.map +1 -1
- package/dist/HttpError.vue.d.ts +18 -18
- package/dist/Icon.js +28 -22
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.vue.d.ts +13 -13
- package/dist/IconLabel.js +9 -12
- package/dist/IconLabel.js.map +1 -1
- package/dist/IconLabel.vue.d.ts +17 -17
- package/dist/Illustration.js +8 -11
- package/dist/Illustration.js.map +1 -1
- package/dist/Illustration.vue.d.ts +21 -21
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js → Illustration.vue_vue_type_script_setup_true_lang-C3qG3Ty6.js} +2 -2
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js.map → Illustration.vue_vue_type_script_setup_true_lang-C3qG3Ty6.js.map} +1 -1
- package/dist/Image.js.map +1 -1
- package/dist/Image.vue.d.ts +18 -18
- package/dist/InlineEdit.js +19 -30
- package/dist/InlineEdit.js.map +1 -1
- package/dist/InlineEdit.vue.d.ts +26 -26
- package/dist/Input.js +58 -64
- package/dist/Input.js.map +1 -1
- package/dist/Input.vue.d.ts +44 -36
- package/dist/InputOptions.js +66 -93
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +66 -58
- package/dist/IntegrationIcon.js +2 -2
- package/dist/IntegrationIcon.js.map +1 -1
- package/dist/IntegrationIcon.vue.d.ts +12 -12
- package/dist/Label.js +2 -5
- package/dist/Label.js.map +1 -1
- package/dist/Label.vue.d.ts +17 -17
- package/dist/{Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js → Label.vue_vue_type_script_setup_true_lang-C4JKdqvC.js} +1 -1
- package/dist/{Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js.map → Label.vue_vue_type_script_setup_true_lang-C4JKdqvC.js.map} +1 -1
- package/dist/LicenseChip.js +10 -16
- package/dist/LicenseChip.js.map +1 -1
- package/dist/LicenseChip.vue.d.ts +3 -3
- package/dist/ListItem.js +5 -8
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItem.vue.d.ts +275 -225
- package/dist/ListItemCell.js +1 -1
- package/dist/ListItemCell.js.map +1 -1
- package/dist/ListItemCell.vue.d.ts +13 -2
- package/dist/ListView.js +57 -101
- package/dist/ListView.js.map +1 -1
- package/dist/ListView.vue.d.ts +5185 -5430
- package/dist/Loading.js +12 -10
- package/dist/Loading.js.map +1 -1
- package/dist/Loading.vue.d.ts +1 -1
- package/dist/Logo.js +2 -4
- package/dist/Logo.js.map +1 -1
- package/dist/Logo.vue.d.ts +17 -17
- package/dist/{Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js → Logo.vue_vue_type_script_setup_true_lang-BfUU9J9O.js} +1 -1
- package/dist/{Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js.map → Logo.vue_vue_type_script_setup_true_lang-BfUU9J9O.js.map} +1 -1
- package/dist/Menu.js +1 -1
- package/dist/Menu.vue.d.ts +1 -1
- package/dist/MenuItem.js +1 -1
- package/dist/MenuItem.vue.d.ts +1 -1
- package/dist/{MenusPlugin-9288029a.js → MenusPlugin-Bk6UW6o9.js} +1 -1
- package/dist/{MenusPlugin-9288029a.js.map → MenusPlugin-Bk6UW6o9.js.map} +1 -1
- package/dist/Metric.vue.d.ts +10 -10
- package/dist/Modal.js +27 -32
- package/dist/Modal.js.map +1 -1
- package/dist/Modal.vue.d.ts +42 -42
- package/dist/Modals.js +14 -16
- package/dist/Modals.js.map +1 -1
- package/dist/Modals.vue.d.ts +1 -1
- package/dist/ModalsPlugin.js +9 -12
- package/dist/ModalsPlugin.js.map +1 -1
- package/dist/Module.js +3 -3
- package/dist/{Module.keys-2cc7d830.js → Module.keys-CEsrW2f0.js} +1 -1
- package/dist/{Module.keys-2cc7d830.js.map → Module.keys-CEsrW2f0.js.map} +1 -1
- package/dist/{Module.types-3f78f2a0.js → Module.types-B1FfGGac.js} +1 -1
- package/dist/{Module.types-3f78f2a0.js.map → Module.types-B1FfGGac.js.map} +1 -1
- package/dist/Module.vue.d.ts +3 -3
- package/dist/ModuleContent.js +2 -2
- package/dist/ModuleContent.vue.d.ts +1 -1
- package/dist/ModuleFooter.js +2 -2
- package/dist/ModuleFooter.vue.d.ts +1 -1
- package/dist/ModuleHeader.js +3 -3
- package/dist/ModuleHeader.vue.d.ts +15 -15
- package/dist/ObfuscateText.js +8 -13
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/ObfuscateText.vue.d.ts +18 -18
- package/dist/PageContent.js +1 -1
- package/dist/PageContent.vue.d.ts +1 -1
- package/dist/PageHeader.js +26 -23
- package/dist/PageHeader.js.map +1 -1
- package/dist/PageHeader.vue.d.ts +7 -4
- package/dist/PageNavigation.js +41 -64
- package/dist/PageNavigation.js.map +1 -1
- package/dist/PageNavigation.vue.d.ts +10 -10
- package/dist/Paginate.js +36 -34
- package/dist/Paginate.js.map +1 -1
- package/dist/Paginate.vue.d.ts +11 -11
- package/dist/PlaidLink.js +3 -5
- package/dist/PlaidLink.js.map +1 -1
- package/dist/PlaidLink.vue.d.ts +29 -29
- package/dist/QuickAction.js +12 -15
- package/dist/QuickAction.js.map +1 -1
- package/dist/QuickAction.vue.d.ts +1 -1
- package/dist/Radio.js +1 -1
- package/dist/Radio.js.map +1 -1
- package/dist/Radio.vue.d.ts +83 -12
- package/dist/RadioGroup.js +41 -45
- package/dist/RadioGroup.js.map +1 -1
- package/dist/{RadioGroup.keys-974818d6.js → RadioGroup.keys-CqfiKkNz.js} +1 -1
- package/dist/{RadioGroup.keys-974818d6.js.map → RadioGroup.keys-CqfiKkNz.js.map} +1 -1
- package/dist/RadioGroup.vue.d.ts +30 -30
- package/dist/RadioNew.js +2 -2
- package/dist/RadioNew.js.map +1 -1
- package/dist/RadioNew.vue.d.ts +26 -26
- package/dist/RangeInput.js +10 -14
- package/dist/RangeInput.js.map +1 -1
- package/dist/RangeInput.vue.d.ts +1 -1
- package/dist/SearchBar.js +31 -41
- package/dist/SearchBar.js.map +1 -1
- package/dist/SearchBar.vue.d.ts +22 -22
- package/dist/Select.js +66 -78
- package/dist/Select.js.map +1 -1
- package/dist/Select.vue.d.ts +123 -123
- package/dist/SelectStatus.js +47 -69
- package/dist/SelectStatus.js.map +1 -1
- package/dist/SelectStatus.vue.d.ts +33 -26
- package/dist/Skeleton.js +1 -1
- package/dist/Skeleton.js.map +1 -1
- package/dist/Skeleton.vue.d.ts +9 -9
- package/dist/Step.js +10 -14
- package/dist/Step.js.map +1 -1
- package/dist/Step.vue.d.ts +21 -21
- package/dist/Stepper.js +37 -40
- package/dist/Stepper.js.map +1 -1
- package/dist/Stepper.vue.d.ts +34 -29
- package/dist/Switch.js +1 -1
- package/dist/Switch.vue.d.ts +23 -23
- package/dist/Tab.js +21 -36
- package/dist/Tab.js.map +1 -1
- package/dist/Table.js +38 -55
- package/dist/Table.js.map +1 -1
- package/dist/Table.keys-LHQf6FEH.js +7 -0
- package/dist/{Table.keys-83e4f09b.js.map → Table.keys-LHQf6FEH.js.map} +1 -1
- package/dist/Table.vue.d.ts +36 -36
- package/dist/TableCell.js +26 -26
- package/dist/TableCell.js.map +1 -1
- package/dist/TableCell.vue.d.ts +6 -6
- package/dist/TableHeaderCell.js +6 -13
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderCell.vue.d.ts +3 -3
- package/dist/TableHeaderRow.js +22 -32
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableHeaderRow.vue.d.ts +8 -8
- package/dist/TableRow.js +59 -59
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRow.vue.d.ts +26 -26
- package/dist/Tabs.js +10 -24
- package/dist/Tabs.js.map +1 -1
- package/dist/Tabs.vue.d.ts +5 -5
- package/dist/{Tabs.vue_used_vue_type_style_index_0_lang.module-d7530989.js → Tabs.vue_vue_type_script_setup_true_lang-l41hWkV4.js} +31 -34
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-l41hWkV4.js.map +1 -0
- package/dist/TextEditor.js +1269 -1364
- package/dist/TextEditor.js.map +1 -1
- package/dist/TextEditor.vue.d.ts +46 -46
- package/dist/Textarea.js +30 -31
- package/dist/Textarea.js.map +1 -1
- package/dist/Textarea.vue.d.ts +34 -26
- package/dist/Timeline.js +9 -10
- package/dist/Timeline.js.map +1 -1
- package/dist/Timeline.vue.d.ts +6 -6
- package/dist/TimelineItem.js +1 -1
- package/dist/TimelineItem.vue.d.ts +1 -1
- package/dist/Toast.js +5 -9
- package/dist/Toast.js.map +1 -1
- package/dist/Toast.vue.d.ts +3 -3
- package/dist/Toasts.js +15 -25
- package/dist/Toasts.js.map +1 -1
- package/dist/Toasts.vue.d.ts +1 -1
- package/dist/ToastsPlugin.js +11 -23
- package/dist/ToastsPlugin.js.map +1 -1
- package/dist/Tooltip.js +1 -1
- package/dist/Tooltip.js.map +1 -1
- package/dist/Tooltip.vue.d.ts +15 -15
- package/dist/{_commonjsHelpers-10dfc225.js → _commonjsHelpers-DaMA6jEr.js} +1 -1
- package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
- package/dist/{_plugin-vue_export-helper-dad06003.js → _plugin-vue_export-helper-CHgC5LLL.js} +1 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js.map +1 -0
- package/dist/{colors-8d9b9429.js → colors-DDDVvqfQ.js} +1 -1
- package/dist/{colors-8d9b9429.js.map → colors-DDDVvqfQ.js.map} +1 -1
- package/dist/components.css +2 -2
- package/dist/directives/observe.js.map +1 -1
- package/dist/directives/sticky.js.map +1 -1
- package/dist/directives/tooltip.js +21 -27
- package/dist/directives/tooltip.js.map +1 -1
- package/dist/directives/viewable.js +1 -1
- package/dist/directives/viewable.js.map +1 -1
- package/dist/{floating-ui.vue-8d7f7932.js → floating-ui.vue-BmfQDqE-.js} +2 -3
- package/dist/{floating-ui.vue-8d7f7932.js.map → floating-ui.vue-BmfQDqE-.js.map} +1 -1
- package/dist/{formatDateTime-a5e70901.js → formatDateTime-C8CYECpd.js} +8 -12
- package/dist/{formatDateTime-a5e70901.js.map → formatDateTime-C8CYECpd.js.map} +1 -1
- package/dist/{index-9e1095ef.js → index-D6bxWkZ1.js} +2 -3
- package/dist/{index-9e1095ef.js.map → index-D6bxWkZ1.js.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +90 -112
- package/dist/index.js.map +1 -1
- package/dist/{isDefined-2ce6cde4.js → isDefined-DzVx0B6k.js} +1 -1
- package/dist/{isDefined-2ce6cde4.js.map → isDefined-DzVx0B6k.js.map} +1 -1
- package/dist/{isValid-4b2b7a54.js → isValid-DN-HkCoi.js} +1 -1
- package/dist/{isValid-4b2b7a54.js.map → isValid-DN-HkCoi.js.map} +1 -1
- package/dist/{keys-241d03b7.js → keys-BEdEsanp.js} +1 -1
- package/dist/{keys-241d03b7.js.map → keys-BEdEsanp.js.map} +1 -1
- package/dist/{keys-7ecef029.js → keys-C8Zfr_By.js} +1 -1
- package/dist/{keys-7ecef029.js.map → keys-C8Zfr_By.js.map} +1 -1
- package/dist/{misc-76697f61.js → misc-CHQs-G03.js} +1 -1
- package/dist/{misc-76697f61.js.map → misc-CHQs-G03.js.map} +1 -1
- package/dist/{parseISO-ed4094c1.js → parseISO-wlfIB_QJ.js} +12 -18
- package/dist/{parseISO-ed4094c1.js.map → parseISO-wlfIB_QJ.js.map} +1 -1
- package/dist/{searchFuzzy-9b74ec4e.js → searchFuzzy-DKooyZM8.js} +110 -149
- package/dist/{searchFuzzy-9b74ec4e.js.map → searchFuzzy-DKooyZM8.js.map} +1 -1
- package/dist/{statusLevels-a8b041f4.js → statusLevels-D8EgtE_L.js} +1 -1
- package/dist/{statusLevels-a8b041f4.js.map → statusLevels-D8EgtE_L.js.map} +1 -1
- package/dist/storage.js +8 -15
- package/dist/storage.js.map +1 -1
- package/dist/tailwind-base.js.map +1 -1
- package/dist/{toTimeZone-a2ed6470.js → toTimeZone-CVE1ZmsS.js} +1 -1
- package/dist/{toTimeZone-a2ed6470.js.map → toTimeZone-CVE1ZmsS.js.map} +1 -1
- package/dist/useDialog.js +7 -7
- package/dist/useGoogleMaps.js +18 -28
- package/dist/useGoogleMaps.js.map +1 -1
- package/dist/useModals.js +1 -2
- package/dist/useModals.js.map +1 -1
- package/dist/useScriptTag.js.map +1 -1
- package/dist/useSearch.js +14 -19
- package/dist/useSearch.js.map +1 -1
- package/dist/useStepper.js.map +1 -1
- package/dist/useValidation.js +1 -1
- package/dist/useValidation.js.map +1 -1
- package/dist/utils/calculateElementOverflow.js +9 -13
- package/dist/utils/calculateElementOverflow.js.map +1 -1
- package/dist/utils/colorScheme.js.map +1 -1
- package/dist/utils/createQueryString.js +4 -5
- package/dist/utils/createQueryString.js.map +1 -1
- package/dist/utils/createValidDate.js +2 -2
- package/dist/utils/formatDateTime.js +4 -5
- package/dist/utils/formatDateTime.js.map +1 -1
- package/dist/utils/getContrastingTextColor.js +1 -1
- package/dist/utils/getContrastingTextColor.js.map +1 -1
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/i18n.js +25 -26
- package/dist/utils/i18n.js.map +1 -1
- package/dist/utils/normalizeDate.js +1 -1
- package/dist/utils/searchFuzzy.js +3 -10
- package/dist/utils/searchFuzzy.js.map +1 -1
- package/dist/utils/storage.js +6 -11
- package/dist/utils/storage.js.map +1 -1
- package/dist/utils/toTimeZone.js +2 -3
- package/dist/utils/toTimeZone.js.map +1 -1
- package/package.json +13 -14
- package/dist/Button.vue_used_vue_type_style_index_0_lang.module-4dabc2a9.js +0 -17
- package/dist/Button.vue_used_vue_type_style_index_0_lang.module-4dabc2a9.js.map +0 -1
- package/dist/Carousel.types.d.ts +0 -33
- package/dist/Carousel.types.js +0 -2
- package/dist/Carousel.types.js.map +0 -1
- package/dist/Checkbox.vue_used_vue_type_style_index_0_lang.module-fa8d9c06.js +0 -9
- package/dist/Checkbox.vue_used_vue_type_style_index_0_lang.module-fa8d9c06.js.map +0 -1
- package/dist/DataView.vue_used_vue_type_style_index_0_lang.module-5c180dba.js.map +0 -1
- package/dist/EmptyState.vue_used_vue_type_style_index_0_lang.module-f5d89366.js +0 -8
- package/dist/EmptyState.vue_used_vue_type_style_index_0_lang.module-f5d89366.js.map +0 -1
- package/dist/Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js +0 -11
- package/dist/Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js.map +0 -1
- package/dist/Loading.vue_used_vue_type_style_index_0_lang.module-ef5a3bc6.js +0 -8
- package/dist/Loading.vue_used_vue_type_style_index_0_lang.module-ef5a3bc6.js.map +0 -1
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js +0 -11
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js.map +0 -1
- package/dist/Table.keys-83e4f09b.js +0 -27
- package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-d7530989.js.map +0 -1
- package/dist/_commonjsHelpers-10dfc225.js.map +0 -1
- package/dist/_plugin-vue_export-helper-dad06003.js.map +0 -1
package/dist/Stepper.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { defineComponent as I, ref as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { S as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import "lodash-es/uniqueId";
|
|
10
|
-
import "./index-9e1095ef.js";
|
|
11
|
-
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
12
|
-
const L = { class: "tw-relative" }, G = /* @__PURE__ */ I({
|
|
1
|
+
import { defineComponent as I, ref as N, computed as i, watch as o, watchEffect as g, provide as y, nextTick as E, openBlock as n, createElementBlock as R, createElementVNode as T, normalizeClass as p, renderSlot as z, createBlock as d, unref as v, withCtx as f, createVNode as m, createCommentVNode as h } from "vue";
|
|
2
|
+
import A from "./useMediaQuery.js";
|
|
3
|
+
import B from "./useStepper.js";
|
|
4
|
+
import w from "./Button.js";
|
|
5
|
+
import x from "./Icon.js";
|
|
6
|
+
import { S as L } from "./keys-C8Zfr_By.js";
|
|
7
|
+
var V = /* @__PURE__ */ ((r) => (r.VERTICAL = "vertical", r.HORIZONTAL = "horizontal", r))(V || {});
|
|
8
|
+
const P = { class: "tw-relative" }, Y = /* @__PURE__ */ I({
|
|
13
9
|
__name: "Stepper",
|
|
14
10
|
props: {
|
|
15
11
|
step: { default: -1 },
|
|
@@ -20,15 +16,15 @@ const L = { class: "tw-relative" }, G = /* @__PURE__ */ I({
|
|
|
20
16
|
theme: { default: "dark" }
|
|
21
17
|
},
|
|
22
18
|
emits: ["update:step", "update:substep"],
|
|
23
|
-
setup(
|
|
24
|
-
const t =
|
|
19
|
+
setup(r, { expose: S, emit: b }) {
|
|
20
|
+
const t = r, l = b, c = N(), e = B({
|
|
25
21
|
linear: t.linear,
|
|
26
22
|
activeStep: t.step,
|
|
27
23
|
activeSubstep: t.substep,
|
|
28
|
-
ref:
|
|
29
|
-
}),
|
|
30
|
-
() => t.orientation === "horizontal" && (!
|
|
31
|
-
), k =
|
|
24
|
+
ref: c
|
|
25
|
+
}), _ = A("screen and (min-width: 961px)"), a = i(
|
|
26
|
+
() => t.orientation === "horizontal" && (!_.value || t.useResponsiveNav)
|
|
27
|
+
), k = i(() => e.activeStepIndex.value <= 0), C = i(
|
|
32
28
|
() => !e.isStepCompleted(e.activeStepIndex.value) || e.activeStepIndex.value === e.steps.value.length - 1
|
|
33
29
|
);
|
|
34
30
|
o(
|
|
@@ -40,37 +36,37 @@ const L = { class: "tw-relative" }, G = /* @__PURE__ */ I({
|
|
|
40
36
|
), o(
|
|
41
37
|
() => e.activeStepIndex.value,
|
|
42
38
|
(s) => {
|
|
43
|
-
|
|
39
|
+
l("update:step", s), u();
|
|
44
40
|
}
|
|
45
41
|
), o(
|
|
46
42
|
() => e.activeSubstepIndex.value,
|
|
47
|
-
(s) =>
|
|
48
|
-
),
|
|
49
|
-
a.value &&
|
|
50
|
-
}),
|
|
43
|
+
(s) => l("update:substep", s)
|
|
44
|
+
), g(() => {
|
|
45
|
+
a.value && u();
|
|
46
|
+
}), y(L, {
|
|
51
47
|
registerStep: e.registerStep,
|
|
52
48
|
orientation: t.orientation,
|
|
53
49
|
stepCount: e.stepCount,
|
|
54
50
|
theme: t.theme,
|
|
55
51
|
showResponsiveNav: a
|
|
56
|
-
}),
|
|
52
|
+
}), S({
|
|
57
53
|
back: e.back,
|
|
58
54
|
next: e.next,
|
|
59
55
|
goTo: e.goTo,
|
|
60
56
|
isStepCompleted: e.isStepCompleted,
|
|
61
57
|
isStepActive: e.isStepActive
|
|
62
58
|
});
|
|
63
|
-
async function
|
|
59
|
+
async function u() {
|
|
64
60
|
if (!a.value)
|
|
65
61
|
return;
|
|
66
62
|
await E();
|
|
67
63
|
const s = e.activeStepElement.value;
|
|
68
64
|
s && s.scrollIntoView({ behavior: "instant", inline: "start", block: "nearest" });
|
|
69
65
|
}
|
|
70
|
-
return (s,
|
|
71
|
-
|
|
66
|
+
return (s, D) => (n(), R("div", P, [
|
|
67
|
+
T("ul", {
|
|
72
68
|
ref_key: "stepperListRef",
|
|
73
|
-
ref:
|
|
69
|
+
ref: c,
|
|
74
70
|
class: p(["stash-stepper tw-flex", {
|
|
75
71
|
"tw-flex-col": t.orientation === "vertical",
|
|
76
72
|
"stash-stepper--vertical": t.orientation === "vertical",
|
|
@@ -79,44 +75,45 @@ const L = { class: "tw-relative" }, G = /* @__PURE__ */ I({
|
|
|
79
75
|
}]),
|
|
80
76
|
"data-test": "stash-stepper"
|
|
81
77
|
}, [
|
|
82
|
-
|
|
78
|
+
z(s.$slots, "default")
|
|
83
79
|
], 2),
|
|
84
|
-
a.value ? (
|
|
80
|
+
a.value ? (n(), d(w, {
|
|
85
81
|
key: 0,
|
|
86
82
|
class: p(["stash-stepper__arrow stash-stepper__arrow--prev", t.theme === "light" ? "tw-text-blue-500" : "tw-text-white"]),
|
|
87
83
|
"data-test": "stash-stepper|prev-arrow",
|
|
88
84
|
disabled: k.value,
|
|
89
85
|
icon: "",
|
|
90
|
-
onClick:
|
|
86
|
+
onClick: v(e).back
|
|
91
87
|
}, {
|
|
92
|
-
default:
|
|
93
|
-
m(
|
|
88
|
+
default: f(() => [
|
|
89
|
+
m(x, {
|
|
94
90
|
name: "chevron-left",
|
|
95
91
|
size: "dense"
|
|
96
92
|
})
|
|
97
93
|
]),
|
|
98
94
|
_: 1
|
|
99
|
-
}, 8, ["class", "disabled", "onClick"])) :
|
|
100
|
-
a.value ? (
|
|
95
|
+
}, 8, ["class", "disabled", "onClick"])) : h("", !0),
|
|
96
|
+
a.value ? (n(), d(w, {
|
|
101
97
|
key: 1,
|
|
102
98
|
class: p(["stash-stepper__arrow stash-stepper__arrow--next", t.theme === "light" ? "tw-text-blue-500" : "tw-text-white"]),
|
|
103
99
|
"data-test": "stash-stepper|next-arrow",
|
|
104
100
|
disabled: C.value,
|
|
105
101
|
icon: "",
|
|
106
|
-
onClick:
|
|
102
|
+
onClick: v(e).next
|
|
107
103
|
}, {
|
|
108
|
-
default:
|
|
109
|
-
m(
|
|
104
|
+
default: f(() => [
|
|
105
|
+
m(x, {
|
|
110
106
|
name: "chevron-right",
|
|
111
107
|
size: "dense"
|
|
112
108
|
})
|
|
113
109
|
]),
|
|
114
110
|
_: 1
|
|
115
|
-
}, 8, ["class", "disabled", "onClick"])) :
|
|
111
|
+
}, 8, ["class", "disabled", "onClick"])) : h("", !0)
|
|
116
112
|
]));
|
|
117
113
|
}
|
|
118
114
|
});
|
|
119
115
|
export {
|
|
120
|
-
|
|
116
|
+
V as StepperOrientationEnum,
|
|
117
|
+
Y as default
|
|
121
118
|
};
|
|
122
119
|
//# sourceMappingURL=Stepper.js.map
|
package/dist/Stepper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.js","sources":["../src/components/Stepper/Stepper.vue"],"sourcesContent":["<script lang=\"ts\">\n import { StepperOrientation, StepperTheme } from './Stepper.types';\n export * from './Stepper.types';\n\n export interface StepperProps {\n /**\n * The current step index\n */\n step?: number;\n /**\n * The current substep index\n */\n substep?: number;\n /**\n * A linear stepper prevents navigation to steps that are ahead of the completed ones\n */\n linear?: boolean;\n /**\n * Determines whether the stepper is horizontal or vertical\n */\n orientation?: StepperOrientation;\n /**\n * Force responsive view on horizontal orientation\n */\n useResponsiveNav?: boolean;\n /**\n * Determines the theme of the stepper\n */\n theme?: StepperTheme;\n }\n</script>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, watch, watchEffect } from 'vue';\n\n import useMediaQuery from '../../composables/useMediaQuery/useMediaQuery';\n import useStepper from '../../composables/useStepper/useStepper';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n import { STEPPER_INJECTION_KEY } from './keys';\n\n const props = withDefaults(defineProps<StepperProps>(), {\n step: -1,\n substep: -1,\n linear: false,\n orientation: 'vertical',\n theme: 'dark',\n useResponsiveNav: false,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the step changes\n */\n (e: 'update:step', step: number): void;\n /**\n * Emitted when the substep changes\n */\n (e: 'update:substep', substep: number): void;\n }>();\n\n const stepperListRef = ref();\n const stepper = useStepper({\n linear: props.linear,\n activeStep: props.step,\n activeSubstep: props.substep,\n ref: stepperListRef,\n });\n\n const isLargeScreen = useMediaQuery('screen and (min-width: 961px)');\n const showResponsiveNav = computed(\n () => props.orientation === 'horizontal' && (!isLargeScreen.value || props.useResponsiveNav),\n );\n const isPrevArrowDisabled = computed(() => stepper.activeStepIndex.value <= 0);\n const isNextArrowDisabled = computed(\n () =>\n !stepper.isStepCompleted(stepper.activeStepIndex.value) ||\n stepper.activeStepIndex.value === stepper.steps.value.length - 1,\n );\n\n watch(\n () => props.step,\n (value) => (stepper.activeStepIndex.value = value),\n );\n\n watch(\n () => props.substep,\n (value) => (stepper.activeSubstepIndex.value = value),\n );\n\n watch(\n () => stepper.activeStepIndex.value,\n (value) => {\n emit('update:step', value);\n scrollToStep();\n },\n );\n\n watch(\n () => stepper.activeSubstepIndex.value,\n (value) => emit('update:substep', value),\n );\n\n /**\n * Watches for media query changes to determine if the mobile horizontal stepper is active.\n * This is done to ensure the mobile stepper remains in sync with any step changes at the desktop view.\n */\n watchEffect(() => {\n if (showResponsiveNav.value) {\n scrollToStep();\n }\n });\n\n provide(STEPPER_INJECTION_KEY, {\n registerStep: stepper.registerStep,\n orientation: props.orientation,\n stepCount: stepper.stepCount,\n theme: props.theme,\n showResponsiveNav,\n });\n\n defineExpose({\n back: stepper.back,\n next: stepper.next,\n goTo: stepper.goTo,\n isStepCompleted: stepper.isStepCompleted,\n isStepActive: stepper.isStepActive,\n });\n\n /**\n * Scrolls to the active step when the horizontal stepper is active.\n * This limited to top-level steps only.\n */\n async function scrollToStep() {\n if (!showResponsiveNav.value) {\n return;\n }\n\n // allows the DOM to update before scrolling to the active step.\n await nextTick();\n\n const step = stepper.activeStepElement.value;\n\n if (step) {\n step.scrollIntoView({ behavior: 'instant', inline: 'start', block: 'nearest' });\n }\n }\n</script>\n\n<template>\n <div class=\"tw-relative\">\n <ul\n ref=\"stepperListRef\"\n class=\"stash-stepper tw-flex\"\n :class=\"{\n 'tw-flex-col': props.orientation === 'vertical',\n 'stash-stepper--vertical': props.orientation === 'vertical',\n 'stash-stepper--horizontal': props.orientation === 'horizontal',\n 'tw-mx-9 tw-snap-x tw-snap-mandatory tw-overflow-x-hidden': showResponsiveNav,\n }\"\n data-test=\"stash-stepper\"\n >\n <!-- @slot Default slot to compose multiple steps -->\n <slot></slot>\n </ul>\n <Button\n v-if=\"showResponsiveNav\"\n class=\"stash-stepper__arrow stash-stepper__arrow--prev\"\n :class=\"props.theme === 'light' ? 'tw-text-blue-500' : 'tw-text-white'\"\n data-test=\"stash-stepper|prev-arrow\"\n :disabled=\"isPrevArrowDisabled\"\n icon\n @click=\"stepper.back\"\n >\n <Icon name=\"chevron-left\" size=\"dense\" />\n </Button>\n <Button\n v-if=\"showResponsiveNav\"\n class=\"stash-stepper__arrow stash-stepper__arrow--next\"\n :class=\"props.theme === 'light' ? 'tw-text-blue-500' : 'tw-text-white'\"\n data-test=\"stash-stepper|next-arrow\"\n :disabled=\"isNextArrowDisabled\"\n icon\n @click=\"stepper.next\"\n >\n <Icon name=\"chevron-right\" size=\"dense\" />\n </Button>\n </div>\n</template>\n\n<style>\n .stash-stepper--vertical .stash-step:last-child .stash-step--nested-steps {\n @apply tw-hidden;\n }\n\n .stash-stepper__arrow {\n @apply tw-absolute\n tw-top-0\n tw-flex\n tw-h-6\n tw-w-6\n tw-min-w-auto\n tw-items-center\n tw-justify-center\n tw-rounded-full\n tw-border\n tw-border-solid\n tw-border-ice-500\n tw-text-center\n disabled:tw-text-ice-500 disabled:tw-opacity-50;\n }\n\n .stash-stepper__arrow--prev {\n @apply tw-left-0;\n }\n\n .stash-stepper__arrow--next {\n @apply tw-right-0;\n }\n</style>\n"],"names":["props","__props","emit","__emit","stepperListRef","ref","stepper","useStepper","isLargeScreen","useMediaQuery","showResponsiveNav","computed","isPrevArrowDisabled","isNextArrowDisabled","watch","value","scrollToStep","watchEffect","provide","STEPPER_INJECTION_KEY","__expose","nextTick","step"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Stepper.js","sources":["../src/components/Stepper/Stepper.types.ts","../src/components/Stepper/Stepper.vue"],"sourcesContent":["import type { Ref } from 'vue';\n\nimport Stepper from './Stepper.vue';\n\n/**\n * Helper type for the template ref (the \"ref\" attribute) on a Stepper instance\n * @see: https://vuejs.org/guide/typescript/composition-api.html#typing-component-template-refs\n */\nexport type StepperRef = Ref<InstanceType<typeof Stepper> | null>;\n\nexport enum StepperOrientationEnum {\n VERTICAL = 'vertical',\n HORIZONTAL = 'horizontal',\n}\nexport type StepperOrientation = `${StepperOrientationEnum}`;\n\nexport type StepperTheme = 'dark' | 'light';\n","<script lang=\"ts\">\n import { StepperOrientation, StepperTheme } from './Stepper.types';\n export * from './Stepper.types';\n\n export interface StepperProps {\n /**\n * The current step index\n */\n step?: number;\n /**\n * The current substep index\n */\n substep?: number;\n /**\n * A linear stepper prevents navigation to steps that are ahead of the completed ones\n */\n linear?: boolean;\n /**\n * Determines whether the stepper is horizontal or vertical\n */\n orientation?: StepperOrientation;\n /**\n * Force responsive view on horizontal orientation\n */\n useResponsiveNav?: boolean;\n /**\n * Determines the theme of the stepper\n */\n theme?: StepperTheme;\n }\n</script>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, watch, watchEffect } from 'vue';\n\n import useMediaQuery from '../../composables/useMediaQuery/useMediaQuery';\n import useStepper from '../../composables/useStepper/useStepper';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n import { STEPPER_INJECTION_KEY } from './keys';\n\n const props = withDefaults(defineProps<StepperProps>(), {\n step: -1,\n substep: -1,\n linear: false,\n orientation: 'vertical',\n theme: 'dark',\n useResponsiveNav: false,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the step changes\n */\n (e: 'update:step', step: number): void;\n /**\n * Emitted when the substep changes\n */\n (e: 'update:substep', substep: number): void;\n }>();\n\n const stepperListRef = ref();\n const stepper = useStepper({\n linear: props.linear,\n activeStep: props.step,\n activeSubstep: props.substep,\n ref: stepperListRef,\n });\n\n const isLargeScreen = useMediaQuery('screen and (min-width: 961px)');\n const showResponsiveNav = computed(\n () => props.orientation === 'horizontal' && (!isLargeScreen.value || props.useResponsiveNav),\n );\n const isPrevArrowDisabled = computed(() => stepper.activeStepIndex.value <= 0);\n const isNextArrowDisabled = computed(\n () =>\n !stepper.isStepCompleted(stepper.activeStepIndex.value) ||\n stepper.activeStepIndex.value === stepper.steps.value.length - 1,\n );\n\n watch(\n () => props.step,\n (value) => (stepper.activeStepIndex.value = value),\n );\n\n watch(\n () => props.substep,\n (value) => (stepper.activeSubstepIndex.value = value),\n );\n\n watch(\n () => stepper.activeStepIndex.value,\n (value) => {\n emit('update:step', value);\n scrollToStep();\n },\n );\n\n watch(\n () => stepper.activeSubstepIndex.value,\n (value) => emit('update:substep', value),\n );\n\n /**\n * Watches for media query changes to determine if the mobile horizontal stepper is active.\n * This is done to ensure the mobile stepper remains in sync with any step changes at the desktop view.\n */\n watchEffect(() => {\n if (showResponsiveNav.value) {\n scrollToStep();\n }\n });\n\n provide(STEPPER_INJECTION_KEY, {\n registerStep: stepper.registerStep,\n orientation: props.orientation,\n stepCount: stepper.stepCount,\n theme: props.theme,\n showResponsiveNav,\n });\n\n defineExpose({\n back: stepper.back,\n next: stepper.next,\n goTo: stepper.goTo,\n isStepCompleted: stepper.isStepCompleted,\n isStepActive: stepper.isStepActive,\n });\n\n /**\n * Scrolls to the active step when the horizontal stepper is active.\n * This limited to top-level steps only.\n */\n async function scrollToStep() {\n if (!showResponsiveNav.value) {\n return;\n }\n\n // allows the DOM to update before scrolling to the active step.\n await nextTick();\n\n const step = stepper.activeStepElement.value;\n\n if (step) {\n step.scrollIntoView({ behavior: 'instant', inline: 'start', block: 'nearest' });\n }\n }\n</script>\n\n<template>\n <div class=\"tw-relative\">\n <ul\n ref=\"stepperListRef\"\n class=\"stash-stepper tw-flex\"\n :class=\"{\n 'tw-flex-col': props.orientation === 'vertical',\n 'stash-stepper--vertical': props.orientation === 'vertical',\n 'stash-stepper--horizontal': props.orientation === 'horizontal',\n 'tw-mx-9 tw-snap-x tw-snap-mandatory tw-overflow-x-hidden': showResponsiveNav,\n }\"\n data-test=\"stash-stepper\"\n >\n <!-- @slot Default slot to compose multiple steps -->\n <slot></slot>\n </ul>\n <Button\n v-if=\"showResponsiveNav\"\n class=\"stash-stepper__arrow stash-stepper__arrow--prev\"\n :class=\"props.theme === 'light' ? 'tw-text-blue-500' : 'tw-text-white'\"\n data-test=\"stash-stepper|prev-arrow\"\n :disabled=\"isPrevArrowDisabled\"\n icon\n @click=\"stepper.back\"\n >\n <Icon name=\"chevron-left\" size=\"dense\" />\n </Button>\n <Button\n v-if=\"showResponsiveNav\"\n class=\"stash-stepper__arrow stash-stepper__arrow--next\"\n :class=\"props.theme === 'light' ? 'tw-text-blue-500' : 'tw-text-white'\"\n data-test=\"stash-stepper|next-arrow\"\n :disabled=\"isNextArrowDisabled\"\n icon\n @click=\"stepper.next\"\n >\n <Icon name=\"chevron-right\" size=\"dense\" />\n </Button>\n </div>\n</template>\n\n<style>\n .stash-stepper--vertical .stash-step:last-child .stash-step--nested-steps {\n @apply tw-hidden;\n }\n\n .stash-stepper__arrow {\n @apply tw-absolute\n tw-top-0\n tw-flex\n tw-h-6\n tw-w-6\n tw-min-w-auto\n tw-items-center\n tw-justify-center\n tw-rounded-full\n tw-border\n tw-border-solid\n tw-border-ice-500\n tw-text-center\n disabled:tw-text-ice-500 disabled:tw-opacity-50;\n }\n\n .stash-stepper__arrow--prev {\n @apply tw-left-0;\n }\n\n .stash-stepper__arrow--next {\n @apply tw-right-0;\n }\n</style>\n"],"names":["StepperOrientationEnum","props","__props","emit","__emit","stepperListRef","ref","stepper","useStepper","isLargeScreen","useMediaQuery","showResponsiveNav","computed","isPrevArrowDisabled","isNextArrowDisabled","watch","value","scrollToStep","watchEffect","provide","STEPPER_INJECTION_KEY","__expose","nextTick","step"],"mappings":";;;;;;AAUY,IAAAA,sBAAAA,OACVA,EAAA,WAAW,YACXA,EAAA,aAAa,cAFHA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;AC+BV,UAAMC,IAAQC,GASRC,IAAOC,GAWPC,IAAiBC,KACjBC,IAAUC,EAAW;AAAA,MACzB,QAAQP,EAAM;AAAA,MACd,YAAYA,EAAM;AAAA,MAClB,eAAeA,EAAM;AAAA,MACrB,KAAKI;AAAA,IAAA,CACN,GAEKI,IAAgBC,EAAc,+BAA+B,GAC7DC,IAAoBC;AAAA,MACxB,MAAMX,EAAM,gBAAgB,iBAAiB,CAACQ,EAAc,SAASR,EAAM;AAAA,IAAA,GAEvEY,IAAsBD,EAAS,MAAML,EAAQ,gBAAgB,SAAS,CAAC,GACvEO,IAAsBF;AAAA,MAC1B,MACE,CAACL,EAAQ,gBAAgBA,EAAQ,gBAAgB,KAAK,KACtDA,EAAQ,gBAAgB,UAAUA,EAAQ,MAAM,MAAM,SAAS;AAAA,IAAA;AAGnE,IAAAQ;AAAA,MACE,MAAMd,EAAM;AAAA,MACZ,CAACe,MAAWT,EAAQ,gBAAgB,QAAQS;AAAA,IAAA,GAG9CD;AAAA,MACE,MAAMd,EAAM;AAAA,MACZ,CAACe,MAAWT,EAAQ,mBAAmB,QAAQS;AAAA,IAAA,GAGjDD;AAAA,MACE,MAAMR,EAAQ,gBAAgB;AAAA,MAC9B,CAACS,MAAU;AACT,QAAAb,EAAK,eAAea,CAAK,GACZC;MACf;AAAA,IAAA,GAGFF;AAAA,MACE,MAAMR,EAAQ,mBAAmB;AAAA,MACjC,CAACS,MAAUb,EAAK,kBAAkBa,CAAK;AAAA,IAAA,GAOzCE,EAAY,MAAM;AAChB,MAAIP,EAAkB,SACPM;IACf,CACD,GAEDE,EAAQC,GAAuB;AAAA,MAC7B,cAAcb,EAAQ;AAAA,MACtB,aAAaN,EAAM;AAAA,MACnB,WAAWM,EAAQ;AAAA,MACnB,OAAON,EAAM;AAAA,MACb,mBAAAU;AAAA,IAAA,CACD,GAEYU,EAAA;AAAA,MACX,MAAMd,EAAQ;AAAA,MACd,MAAMA,EAAQ;AAAA,MACd,MAAMA,EAAQ;AAAA,MACd,iBAAiBA,EAAQ;AAAA,MACzB,cAAcA,EAAQ;AAAA,IAAA,CACvB;AAMD,mBAAeU,IAAe;AACxB,UAAA,CAACN,EAAkB;AACrB;AAIF,YAAMW,EAAS;AAET,YAAAC,IAAOhB,EAAQ,kBAAkB;AAEvC,MAAIgB,KACGA,EAAA,eAAe,EAAE,UAAU,WAAW,QAAQ,SAAS,OAAO,WAAW;AAAA,IAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Stepper.vue.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { DefineComponent } from 'vue';
|
|
|
4
4
|
import { ExtractPropTypes } from 'vue';
|
|
5
5
|
import { PropType } from 'vue';
|
|
6
6
|
import { PublicProps } from 'vue';
|
|
7
|
-
import
|
|
7
|
+
import { Ref } from 'vue';
|
|
8
8
|
|
|
9
9
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
10
|
|
|
@@ -34,44 +34,49 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<StepperProps>, {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
step: number;
|
|
38
|
+
substep: number;
|
|
39
|
+
linear: boolean;
|
|
40
|
+
orientation: string;
|
|
41
|
+
theme: string;
|
|
42
|
+
useResponsiveNav: boolean;
|
|
43
43
|
}>>, {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
back: () => void;
|
|
45
|
+
next: () => void;
|
|
46
|
+
goTo: (stepIndex: number, substepIndex?: number) => void;
|
|
47
|
+
isStepCompleted: (stepIndex: number, substepIndex?: number) => boolean;
|
|
48
|
+
isStepActive: (stepIndex: number, substepIndex?: number) => boolean;
|
|
49
49
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
"update:step": (step: number) => void;
|
|
51
|
+
"update:substep": (substep: number) => void;
|
|
52
52
|
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<StepperProps>, {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
step: number;
|
|
54
|
+
substep: number;
|
|
55
|
+
linear: boolean;
|
|
56
|
+
orientation: string;
|
|
57
|
+
theme: string;
|
|
58
|
+
useResponsiveNav: boolean;
|
|
59
59
|
}>>> & Readonly<{
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
"onUpdate:step"?: ((step: number) => any) | undefined;
|
|
61
|
+
"onUpdate:substep"?: ((substep: number) => any) | undefined;
|
|
62
62
|
}>, {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
step: number;
|
|
64
|
+
theme: StepperTheme;
|
|
65
|
+
substep: number;
|
|
66
|
+
linear: boolean;
|
|
67
|
+
orientation: "vertical" | "horizontal";
|
|
68
|
+
useResponsiveNav: boolean;
|
|
69
69
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
70
70
|
default?(_: {}): any;
|
|
71
71
|
}>;
|
|
72
72
|
export default _default;
|
|
73
73
|
|
|
74
|
-
export declare type StepperOrientation =
|
|
74
|
+
export declare type StepperOrientation = `${StepperOrientationEnum}`;
|
|
75
|
+
|
|
76
|
+
export declare enum StepperOrientationEnum {
|
|
77
|
+
VERTICAL = "vertical",
|
|
78
|
+
HORIZONTAL = "horizontal"
|
|
79
|
+
}
|
|
75
80
|
|
|
76
81
|
export declare interface StepperProps {
|
|
77
82
|
/**
|
package/dist/Switch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as v, useAttrs as g, useSlots as y, useCssModule as C, computed as o, openBlock as i, createElementBlock as d, normalizeClass as s, unref as a, createElementVNode as c, mergeProps as S, withDirectives as A, vModelCheckbox as V, toDisplayString as u, createCommentVNode as _, renderSlot as B, createTextVNode as M } from "vue";
|
|
2
2
|
import T from "@leaflink/snitch";
|
|
3
3
|
import E from "lodash-es/uniqueId";
|
|
4
|
-
import { _ as N } from "./_plugin-vue_export-helper-
|
|
4
|
+
import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const D = ["data-test"], I = ["for"], $ = ["id", "disabled", "name", "value"], q = /* @__PURE__ */ v({
|
|
6
6
|
name: "ll-switch",
|
|
7
7
|
inheritAttrs: !1,
|
package/dist/Switch.vue.d.ts
CHANGED
|
@@ -33,33 +33,33 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SwitchProps>, {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
checked: boolean;
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
hintText: string;
|
|
39
|
+
id: undefined;
|
|
40
|
+
label: string;
|
|
41
|
+
name: string;
|
|
42
|
+
value: string;
|
|
43
43
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
44
|
-
|
|
44
|
+
"update:checked": (value: boolean | (string | number)[] | undefined) => void;
|
|
45
45
|
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SwitchProps>, {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
checked: boolean;
|
|
47
|
+
disabled: boolean;
|
|
48
|
+
hintText: string;
|
|
49
|
+
id: undefined;
|
|
50
|
+
label: string;
|
|
51
|
+
name: string;
|
|
52
|
+
value: string;
|
|
53
53
|
}>>> & Readonly<{
|
|
54
|
-
|
|
54
|
+
"onUpdate:checked"?: ((value: boolean | (string | number)[] | undefined) => any) | undefined;
|
|
55
55
|
}>, {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
name: string;
|
|
57
|
+
disabled: boolean;
|
|
58
|
+
label: string;
|
|
59
|
+
id: string;
|
|
60
|
+
hintText: string;
|
|
61
|
+
value: string | number;
|
|
62
|
+
checked: boolean | (string | number)[];
|
|
63
63
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
64
64
|
hint?(_: {}): any;
|
|
65
65
|
}>;
|
package/dist/Tab.js
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
import { defineComponent as x, useCssModule as T, inject as y, computed as
|
|
1
|
+
import { defineComponent as x, useCssModule as T, inject as y, computed as r, onMounted as k, nextTick as g, toRefs as c, openBlock as u, createElementBlock as C, normalizeClass as P, unref as a, withKeys as $, createBlock as B, resolveDynamicComponent as E, mergeProps as N, withCtx as b, createElementVNode as A, createVNode as I, renderSlot as j } from "vue";
|
|
2
2
|
import M from "@leaflink/snitch";
|
|
3
3
|
import D from "./Badge.js";
|
|
4
|
-
import { T as L } from "./Tabs.
|
|
5
|
-
import { _ as V } from "./_plugin-vue_export-helper-
|
|
6
|
-
import "lodash-es/debounce";
|
|
7
|
-
import "lodash-es/uniqueId";
|
|
8
|
-
import "./constants.js";
|
|
9
|
-
import "./locale.js";
|
|
10
|
-
import "lodash-es/get";
|
|
11
|
-
import "./Dropdown.js";
|
|
12
|
-
import "./directives/clickoutside.js";
|
|
13
|
-
import "./utils/calculateElementOverflow.js";
|
|
14
|
-
import "./utils/helpers.js";
|
|
15
|
-
import "lodash-es/camelCase";
|
|
16
|
-
import "lodash-es/isFinite";
|
|
17
|
-
import "lodash-es/isPlainObject";
|
|
18
|
-
import "./Icon.js";
|
|
19
|
-
import "./index-9e1095ef.js";
|
|
20
|
-
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
4
|
+
import { T as L } from "./Tabs.vue_vue_type_script_setup_true_lang-l41hWkV4.js";
|
|
5
|
+
import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
21
6
|
const K = ["id", "aria-selected", "aria-controls", "aria-disabled"], O = { class: "tw-mt-0.5" }, S = /* @__PURE__ */ x({
|
|
22
7
|
__name: "Tab",
|
|
23
8
|
props: {
|
|
@@ -30,21 +15,21 @@ const K = ["id", "aria-selected", "aria-controls", "aria-disabled"], O = { class
|
|
|
30
15
|
routerLinkProps: {}
|
|
31
16
|
},
|
|
32
17
|
setup(p) {
|
|
33
|
-
const e = p,
|
|
18
|
+
const e = p, v = T(), l = y(L.key);
|
|
34
19
|
if (!l)
|
|
35
20
|
throw Error("The Tab component must be a child of the Tabs component.");
|
|
36
|
-
const { setActiveTab:
|
|
21
|
+
const { setActiveTab: w, activeTab: f, variant: o } = l, t = r(() => e.value === f.value), m = r(() => e.to ? "router-link" : e.href ? "a" : "button");
|
|
37
22
|
function d(i) {
|
|
38
|
-
e.disabled ||
|
|
23
|
+
e.disabled || w(i);
|
|
39
24
|
}
|
|
40
|
-
const n =
|
|
25
|
+
const n = r(() => `tabpanel-${e.value}`);
|
|
41
26
|
k(async () => {
|
|
42
27
|
await g(), process.env.NODE_ENV !== "test" && t.value && !document.getElementById(n.value) && M.warn(
|
|
43
28
|
`The <Tab> with value "${e.value}" is active, but its corresponding tab panel cannot be found. Please ensure that the corresponding tab panel has an "id" attribute with value "${n.value}" and a "role" attribute with value "tabpanel".`
|
|
44
29
|
);
|
|
45
30
|
});
|
|
46
|
-
const h =
|
|
47
|
-
return (i,
|
|
31
|
+
const h = r(() => e.to && e.routerLinkProps ? c(e.routerLinkProps) : e.href && e.anchorProps ? c(e.anchorProps) : {});
|
|
32
|
+
return (i, s) => (u(), C("li", {
|
|
48
33
|
id: `tab-${e.value}`,
|
|
49
34
|
role: "tab",
|
|
50
35
|
"aria-selected": t.value,
|
|
@@ -54,22 +39,22 @@ const K = ["id", "aria-selected", "aria-controls", "aria-disabled"], O = { class
|
|
|
54
39
|
{
|
|
55
40
|
"stash-tab--active is-active": t.value,
|
|
56
41
|
"stash-tab--disabled": e.disabled,
|
|
57
|
-
"stash-tab--variant-line": o
|
|
58
|
-
"stash-tab--variant-enclosed": o
|
|
42
|
+
"stash-tab--variant-line": a(o) === "line",
|
|
43
|
+
"stash-tab--variant-enclosed": a(o) === "enclosed"
|
|
59
44
|
}
|
|
60
45
|
]]),
|
|
61
|
-
onClick:
|
|
62
|
-
onKeypress:
|
|
46
|
+
onClick: s[0] || (s[0] = (_) => d(e.value)),
|
|
47
|
+
onKeypress: s[1] || (s[1] = $((_) => d(e.value), ["enter"]))
|
|
63
48
|
}, [
|
|
64
|
-
(u(), B(E(
|
|
49
|
+
(u(), B(E(m.value), N(h.value, {
|
|
65
50
|
to: e.to,
|
|
66
51
|
href: e.href,
|
|
67
52
|
class: ["tw-relative tw-flex tw-cursor-pointer tw-items-center tw-justify-center tw-whitespace-nowrap tw-border-solid tw-py-1.5 tw-text-sm tw-font-medium hover:tw-no-underline", [
|
|
68
53
|
{
|
|
69
|
-
"tw-border-b-2": o
|
|
70
|
-
"tw-border-t-4 tw-px-6": o
|
|
71
|
-
"tw-rounded-t tw-border-b tw-border-b-ice-200 tw-bg-white": t.value && o
|
|
72
|
-
[
|
|
54
|
+
"tw-border-b-2": a(o) === "line",
|
|
55
|
+
"tw-border-t-4 tw-px-6": a(o) === "enclosed",
|
|
56
|
+
"tw-rounded-t tw-border-b tw-border-b-ice-200 tw-bg-white": t.value && a(o) === "enclosed",
|
|
57
|
+
[a(v)["custom-shadow"]]: t.value && a(o) === "enclosed",
|
|
73
58
|
"focus:tw-no-underline": e.href,
|
|
74
59
|
"tw-pointer-events-none tw-text-ice-500": e.disabled,
|
|
75
60
|
"tw-text-ice-700": !e.disabled && !t.value
|
|
@@ -92,7 +77,7 @@ const K = ["id", "aria-selected", "aria-controls", "aria-disabled"], O = { class
|
|
|
92
77
|
j(i.$slots, "default", {
|
|
93
78
|
isActive: t.value,
|
|
94
79
|
isDisabled: e.disabled,
|
|
95
|
-
variant: o
|
|
80
|
+
variant: a(o)
|
|
96
81
|
})
|
|
97
82
|
]),
|
|
98
83
|
_: 3
|
|
@@ -107,8 +92,8 @@ const K = ["id", "aria-selected", "aria-controls", "aria-disabled"], O = { class
|
|
|
107
92
|
"custom-shadow": "_custom-shadow_j326c_3"
|
|
108
93
|
}, J = {
|
|
109
94
|
$style: z
|
|
110
|
-
},
|
|
95
|
+
}, Q = /* @__PURE__ */ V(S, [["__cssModules", J]]);
|
|
111
96
|
export {
|
|
112
|
-
|
|
97
|
+
Q as default
|
|
113
98
|
};
|
|
114
99
|
//# sourceMappingURL=Tab.js.map
|
package/dist/Tab.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.js","sources":["../src/components/Tab/Tab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import { computed, inject, nextTick, onMounted, toRefs, useCssModule } from 'vue';\n import { type RouteLocationRaw, type RouterLinkProps } from 'vue-router';\n\n import Badge from '../Badge/Badge.vue';\n import { TABS_INJECTION } from '../Tabs/Tabs.vue';\n\n /**\n * Allowed attributes for the `<a>` element when the `href` prop is used.\n */\n type AnchorAttrs =\n | HTMLAnchorElement['download']\n | HTMLAnchorElement['hreflang']\n | HTMLAnchorElement['ping']\n | HTMLAnchorElement['referrerPolicy']\n | HTMLAnchorElement['rel']\n | HTMLAnchorElement['target']\n | HTMLAnchorElement['type'];\n\n export interface TabProps {\n /**\n * The tab identifier\n */\n value: string;\n\n /**\n * Router link `to` prop\n */\n to?: RouteLocationRaw;\n\n /**\n * Anchor tag href. Used for navigating to non-vue pages, such as Django pages in marketplace.\n */\n href?: string;\n\n /**\n * The badge's content\n */\n badge?: string | number;\n\n /**\n * Will render a plain text item if true.\n */\n disabled?: boolean;\n\n /**\n * Props for the `<a>` element when the `href` prop is used\n */\n anchorProps?: Record<AnchorAttrs, string>;\n\n /**\n * Props for the `<RouterLink>` element when the `to` prop is used\n */\n routerLinkProps?: Omit<RouterLinkProps, 'to'>;\n }\n\n const props = defineProps<TabProps>();\n\n const classes = useCssModule();\n\n const tabsInjection = inject(TABS_INJECTION.key);\n\n if (!tabsInjection) {\n throw Error('The Tab component must be a child of the Tabs component.');\n }\n\n const { setActiveTab, activeTab, variant } = tabsInjection;\n\n const isTabActive = computed(() => {\n return props.value === activeTab.value;\n });\n\n const is = computed(() => {\n if (props.to) {\n return 'router-link';\n }\n\n if (props.href) {\n return 'a';\n }\n\n return 'button';\n });\n\n /**\n * Note: this click handler gets ignored when the `href` prop is used; `preventDefault()` is intentionally omitted in order to enable the `href` prop to work correctly. The `href` prop is used for navigation to non-vue pages, such as Django pages in marketplace.\n */\n function onClick(tabValue: string) {\n if (props.disabled) {\n return;\n }\n\n setActiveTab(tabValue);\n }\n\n const panelId = computed(() => `tabpanel-${props.value}`);\n\n onMounted(async () => {\n await nextTick();\n\n if (process.env.NODE_ENV !== 'test' && isTabActive.value && !document.getElementById(panelId.value)) {\n // The following warning ensures optimal accessibility is maintained when using the Tabs component. See: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tab_role#example\n logger.warn(\n `The <Tab> with value \"${props.value}\" is active, but its corresponding tab panel cannot be found. Please ensure that the corresponding tab panel has an \"id\" attribute with value \"${panelId.value}\" and a \"role\" attribute with value \"tabpanel\".`,\n );\n }\n });\n\n const dynamicComponentAttrs = computed(() => {\n if (props.to && props.routerLinkProps) {\n return toRefs(props.routerLinkProps);\n }\n\n if (props.href && props.anchorProps) {\n return toRefs(props.anchorProps);\n }\n\n return {};\n });\n</script>\n\n<template>\n <li\n :id=\"`tab-${props.value}`\"\n role=\"tab\"\n :aria-selected=\"isTabActive\"\n :aria-controls=\"panelId\"\n :aria-disabled=\"props.disabled\"\n class=\"stash-tab\"\n :class=\"[\n {\n 'stash-tab--active is-active': isTabActive,\n 'stash-tab--disabled': props.disabled,\n 'stash-tab--variant-line': variant === 'line',\n 'stash-tab--variant-enclosed': variant === 'enclosed',\n },\n ]\"\n @click=\"onClick(props.value)\"\n @keypress.enter=\"onClick(props.value)\"\n >\n <component\n v-bind=\"dynamicComponentAttrs\"\n :is=\"is\"\n :to=\"props.to\"\n :href=\"props.href\"\n class=\"tw-relative tw-flex tw-cursor-pointer tw-items-center tw-justify-center tw-whitespace-nowrap tw-border-solid tw-py-1.5 tw-text-sm tw-font-medium hover:tw-no-underline\"\n :class=\"[\n {\n 'tw-border-b-2': variant === 'line',\n 'tw-border-t-4 tw-px-6': variant === 'enclosed',\n 'tw-rounded-t tw-border-b tw-border-b-ice-200 tw-bg-white': isTabActive && variant === 'enclosed',\n [classes['custom-shadow']]: isTabActive && variant === 'enclosed',\n 'focus:tw-no-underline': props.href,\n 'tw-pointer-events-none tw-text-ice-500': props.disabled,\n 'tw-text-ice-700': !props.disabled && !isTabActive,\n },\n [\n isTabActive\n ? 'tw-border-blue-500 tw-text-blue-500'\n : 'tw-border-transparent hover:tw-text-blue-500 focus:tw-text-blue-500',\n ],\n ]\"\n :tabindex=\"props.disabled ? -1 : 0\"\n >\n <!-- The margin-top on the <div> below is necessary to fix the vertical alignment of text in the default slot since our Sofia font has extra space under the baseline -->\n <div class=\"tw-mt-0.5\">\n <Badge :content=\"props.badge\" position=\"inline\" color=\"red\" :is-disabled=\"props.disabled\">\n <slot :is-active=\"isTabActive\" :is-disabled=\"props.disabled\" :variant=\"variant\"></slot>\n </Badge>\n </div>\n </component>\n </li>\n</template>\n\n<style module>\n /* this removes the bottom shadow from the active tab */\n .custom-shadow {\n box-shadow: 0 -4px 4px rgba(0 0 0 / 10%);\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","tabsInjection","inject","TABS_INJECTION","setActiveTab","activeTab","variant","isTabActive","computed","is","onClick","tabValue","panelId","onMounted","nextTick","logger","dynamicComponentAttrs","toRefs"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tab.js","sources":["../src/components/Tab/Tab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import { computed, inject, nextTick, onMounted, toRefs, useCssModule } from 'vue';\n import { type RouteLocationRaw, type RouterLinkProps } from 'vue-router';\n\n import Badge from '../Badge/Badge.vue';\n import { TABS_INJECTION } from '../Tabs/Tabs.vue';\n\n /**\n * Allowed attributes for the `<a>` element when the `href` prop is used.\n */\n type AnchorAttrs =\n | HTMLAnchorElement['download']\n | HTMLAnchorElement['hreflang']\n | HTMLAnchorElement['ping']\n | HTMLAnchorElement['referrerPolicy']\n | HTMLAnchorElement['rel']\n | HTMLAnchorElement['target']\n | HTMLAnchorElement['type'];\n\n export interface TabProps {\n /**\n * The tab identifier\n */\n value: string;\n\n /**\n * Router link `to` prop\n */\n to?: RouteLocationRaw;\n\n /**\n * Anchor tag href. Used for navigating to non-vue pages, such as Django pages in marketplace.\n */\n href?: string;\n\n /**\n * The badge's content\n */\n badge?: string | number;\n\n /**\n * Will render a plain text item if true.\n */\n disabled?: boolean;\n\n /**\n * Props for the `<a>` element when the `href` prop is used\n */\n anchorProps?: Record<AnchorAttrs, string>;\n\n /**\n * Props for the `<RouterLink>` element when the `to` prop is used\n */\n routerLinkProps?: Omit<RouterLinkProps, 'to'>;\n }\n\n const props = defineProps<TabProps>();\n\n const classes = useCssModule();\n\n const tabsInjection = inject(TABS_INJECTION.key);\n\n if (!tabsInjection) {\n throw Error('The Tab component must be a child of the Tabs component.');\n }\n\n const { setActiveTab, activeTab, variant } = tabsInjection;\n\n const isTabActive = computed(() => {\n return props.value === activeTab.value;\n });\n\n const is = computed(() => {\n if (props.to) {\n return 'router-link';\n }\n\n if (props.href) {\n return 'a';\n }\n\n return 'button';\n });\n\n /**\n * Note: this click handler gets ignored when the `href` prop is used; `preventDefault()` is intentionally omitted in order to enable the `href` prop to work correctly. The `href` prop is used for navigation to non-vue pages, such as Django pages in marketplace.\n */\n function onClick(tabValue: string) {\n if (props.disabled) {\n return;\n }\n\n setActiveTab(tabValue);\n }\n\n const panelId = computed(() => `tabpanel-${props.value}`);\n\n onMounted(async () => {\n await nextTick();\n\n if (process.env.NODE_ENV !== 'test' && isTabActive.value && !document.getElementById(panelId.value)) {\n // The following warning ensures optimal accessibility is maintained when using the Tabs component. See: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tab_role#example\n logger.warn(\n `The <Tab> with value \"${props.value}\" is active, but its corresponding tab panel cannot be found. Please ensure that the corresponding tab panel has an \"id\" attribute with value \"${panelId.value}\" and a \"role\" attribute with value \"tabpanel\".`,\n );\n }\n });\n\n const dynamicComponentAttrs = computed(() => {\n if (props.to && props.routerLinkProps) {\n return toRefs(props.routerLinkProps);\n }\n\n if (props.href && props.anchorProps) {\n return toRefs(props.anchorProps);\n }\n\n return {};\n });\n</script>\n\n<template>\n <li\n :id=\"`tab-${props.value}`\"\n role=\"tab\"\n :aria-selected=\"isTabActive\"\n :aria-controls=\"panelId\"\n :aria-disabled=\"props.disabled\"\n class=\"stash-tab\"\n :class=\"[\n {\n 'stash-tab--active is-active': isTabActive,\n 'stash-tab--disabled': props.disabled,\n 'stash-tab--variant-line': variant === 'line',\n 'stash-tab--variant-enclosed': variant === 'enclosed',\n },\n ]\"\n @click=\"onClick(props.value)\"\n @keypress.enter=\"onClick(props.value)\"\n >\n <component\n v-bind=\"dynamicComponentAttrs\"\n :is=\"is\"\n :to=\"props.to\"\n :href=\"props.href\"\n class=\"tw-relative tw-flex tw-cursor-pointer tw-items-center tw-justify-center tw-whitespace-nowrap tw-border-solid tw-py-1.5 tw-text-sm tw-font-medium hover:tw-no-underline\"\n :class=\"[\n {\n 'tw-border-b-2': variant === 'line',\n 'tw-border-t-4 tw-px-6': variant === 'enclosed',\n 'tw-rounded-t tw-border-b tw-border-b-ice-200 tw-bg-white': isTabActive && variant === 'enclosed',\n [classes['custom-shadow']]: isTabActive && variant === 'enclosed',\n 'focus:tw-no-underline': props.href,\n 'tw-pointer-events-none tw-text-ice-500': props.disabled,\n 'tw-text-ice-700': !props.disabled && !isTabActive,\n },\n [\n isTabActive\n ? 'tw-border-blue-500 tw-text-blue-500'\n : 'tw-border-transparent hover:tw-text-blue-500 focus:tw-text-blue-500',\n ],\n ]\"\n :tabindex=\"props.disabled ? -1 : 0\"\n >\n <!-- The margin-top on the <div> below is necessary to fix the vertical alignment of text in the default slot since our Sofia font has extra space under the baseline -->\n <div class=\"tw-mt-0.5\">\n <Badge :content=\"props.badge\" position=\"inline\" color=\"red\" :is-disabled=\"props.disabled\">\n <slot :is-active=\"isTabActive\" :is-disabled=\"props.disabled\" :variant=\"variant\"></slot>\n </Badge>\n </div>\n </component>\n </li>\n</template>\n\n<style module>\n /* this removes the bottom shadow from the active tab */\n .custom-shadow {\n box-shadow: 0 -4px 4px rgba(0 0 0 / 10%);\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","tabsInjection","inject","TABS_INJECTION","setActiveTab","activeTab","variant","isTabActive","computed","is","onClick","tabValue","panelId","onMounted","nextTick","logger","dynamicComponentAttrs","toRefs"],"mappings":";;;;;;;;;;;;;;;;;AAyDE,UAAMA,IAAQC,GAERC,IAAUC,KAEVC,IAAgBC,EAAOC,EAAe,GAAG;AAE/C,QAAI,CAACF;AACH,YAAM,MAAM,0DAA0D;AAGxE,UAAM,EAAE,cAAAG,GAAc,WAAAC,GAAW,SAAAC,EAAA,IAAYL,GAEvCM,IAAcC,EAAS,MACpBX,EAAM,UAAUQ,EAAU,KAClC,GAEKI,IAAKD,EAAS,MACdX,EAAM,KACD,gBAGLA,EAAM,OACD,MAGF,QACR;AAKD,aAASa,EAAQC,GAAkB;AACjC,MAAId,EAAM,YAIVO,EAAaO,CAAQ;AAAA,IACvB;AAEA,UAAMC,IAAUJ,EAAS,MAAM,YAAYX,EAAM,KAAK,EAAE;AAExD,IAAAgB,EAAU,YAAY;AACpB,YAAMC,EAAS,GAEX,QAAQ,IAAI,aAAa,UAAUP,EAAY,SAAS,CAAC,SAAS,eAAeK,EAAQ,KAAK,KAEzFG,EAAA;AAAA,QACL,yBAAyBlB,EAAM,KAAK,kJAAkJe,EAAQ,KAAK;AAAA,MAAA;AAAA,IAEvM,CACD;AAEK,UAAAI,IAAwBR,EAAS,MACjCX,EAAM,MAAMA,EAAM,kBACboB,EAAOpB,EAAM,eAAe,IAGjCA,EAAM,QAAQA,EAAM,cACfoB,EAAOpB,EAAM,WAAW,IAG1B,EACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|