monobill-mintui 0.6.612 → 0.6.613
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -302
- package/bin/component-dependencies.json +131 -0
- package/bin/mint-ui.js +446 -0
- package/dist/alert.css +3 -0
- package/dist/back-button.css +3 -0
- package/dist/bottom-navigation.css +3 -0
- package/dist/button.css +3 -0
- package/dist/card.css +3 -0
- package/dist/chart.css +3 -0
- package/dist/checkbox.css +3 -0
- package/dist/chip.css +3 -0
- package/dist/choice.css +3 -0
- package/dist/clickable.css +3 -0
- package/dist/collapsible.css +3 -0
- package/dist/components/alert/Alert.d.ts +1 -32
- package/dist/components/alert/Alert.d.ts.map +10 -1
- package/dist/components/alert/browser.js +167 -0
- package/dist/components/alert/index.cjs +1 -0
- package/dist/components/alert/index.d.ts +1 -3
- package/dist/components/alert/index.d.ts.map +10 -1
- package/dist/components/alert/index.js +155 -0
- package/dist/components/back-button/BackButton.d.ts +1 -18
- package/dist/components/back-button/BackButton.d.ts.map +10 -1
- package/dist/components/back-button/browser.js +241 -0
- package/dist/components/back-button/index.cjs +1 -0
- package/dist/components/back-button/index.d.ts +1 -3
- package/dist/components/back-button/index.d.ts.map +10 -1
- package/dist/components/back-button/index.js +229 -0
- package/dist/components/bottom-navigation/BottomNavigation.d.ts +1 -10
- package/dist/components/bottom-navigation/BottomNavigation.d.ts.map +10 -1
- package/dist/components/bottom-navigation/browser.js +97 -0
- package/dist/components/bottom-navigation/index.cjs +1 -0
- package/dist/components/bottom-navigation/index.d.ts +2 -5
- package/dist/components/bottom-navigation/index.d.ts.map +10 -1
- package/dist/components/bottom-navigation/index.js +85 -0
- package/dist/components/button/Button.d.ts +1 -57
- package/dist/components/button/Button.d.ts.map +10 -1
- package/dist/components/button/browser.js +18 -0
- package/dist/components/button/index.cjs +1 -0
- package/dist/components/button/index.d.ts +1 -3
- package/dist/components/button/index.d.ts.map +10 -1
- package/dist/components/button/index.js +6 -0
- package/dist/components/card/Card.d.ts +1 -17
- package/dist/components/card/Card.d.ts.map +10 -1
- package/dist/components/card/browser.js +25 -0
- package/dist/components/card/index.cjs +1 -0
- package/dist/components/card/index.d.ts +1 -3
- package/dist/components/card/index.d.ts.map +10 -1
- package/dist/components/card/index.js +13 -0
- package/dist/components/chart/Chart.d.ts +1 -291
- package/dist/components/chart/Chart.d.ts.map +10 -1
- package/dist/components/chart/browser.js +1331 -0
- package/dist/components/chart/index.cjs +37 -0
- package/dist/components/chart/index.d.ts +1 -3
- package/dist/components/chart/index.d.ts.map +10 -1
- package/dist/components/chart/index.js +1319 -0
- package/dist/components/checkbox/Checkbox.d.ts +1 -41
- package/dist/components/checkbox/Checkbox.d.ts.map +10 -1
- package/dist/components/checkbox/browser.js +162 -0
- package/dist/components/checkbox/index.cjs +1 -0
- package/dist/components/checkbox/index.d.ts +1 -3
- package/dist/components/checkbox/index.d.ts.map +10 -1
- package/dist/components/checkbox/index.js +150 -0
- package/dist/components/chip/Chip.d.ts +1 -16
- package/dist/components/chip/Chip.d.ts.map +10 -1
- package/dist/components/chip/browser.js +17 -0
- package/dist/components/chip/index.cjs +1 -0
- package/dist/components/chip/index.d.ts +1 -3
- package/dist/components/chip/index.d.ts.map +10 -1
- package/dist/components/chip/index.js +5 -0
- package/dist/components/choice/Choice.d.ts +1 -27
- package/dist/components/choice/Choice.d.ts.map +10 -1
- package/dist/components/choice/browser.js +272 -0
- package/dist/components/choice/index.cjs +1 -0
- package/dist/components/choice/index.d.ts +1 -5
- package/dist/components/choice/index.d.ts.map +10 -1
- package/dist/components/choice/index.js +260 -0
- package/dist/components/chunks/button-B0Yt0MX1.js +380 -0
- package/dist/components/chunks/button-BlbLHMts.js +1 -0
- package/dist/components/chunks/caret-down-BN9cl4o4.js +1 -0
- package/dist/components/chunks/caret-down-Ch6IfR7r.js +9 -0
- package/dist/components/chunks/caret-right-CDUwqoen.js +1 -0
- package/dist/components/chunks/caret-right-CVOgr4nk.js +9 -0
- package/dist/components/chunks/caret-up-3XCuTXSE.js +1 -0
- package/dist/components/chunks/caret-up-D_6oa7o1.js +9 -0
- package/dist/components/chunks/chip-B04bJM4r.js +1 -0
- package/dist/components/chunks/chip-B9whjEvW.js +54 -0
- package/dist/components/chunks/close-5tYlQdkk.js +1 -0
- package/dist/components/chunks/close-Dg6U0IjZ.js +10 -0
- package/dist/components/chunks/icon-C0OLmjDY.js +1 -0
- package/dist/components/chunks/icon-CyzR9aVl.js +1 -0
- package/dist/components/chunks/icon-dG8sLTBn.js +27 -0
- package/dist/components/chunks/icon-gQAtsERy.js +1324 -0
- package/dist/components/chunks/input-8bbXzpa5.js +334 -0
- package/dist/components/chunks/input-BoiREc6Y.js +1 -0
- package/dist/components/chunks/link-BxhPnVaz.js +1 -0
- package/dist/components/chunks/link-DKgtBYK6.js +38 -0
- package/dist/components/chunks/modal-B8gNdwEl.js +153 -0
- package/dist/components/chunks/modal-WYWvk2lZ.js +1 -0
- package/dist/components/chunks/popover-BeaGf_JC.js +1 -0
- package/dist/components/chunks/popover-gviDCspV.js +188 -0
- package/dist/components/chunks/register-element-BFYmIynH.js +53 -0
- package/dist/components/chunks/register-element-tCL_F1YI.js +1 -0
- package/dist/components/chunks/search-ANUKQi0r.js +9 -0
- package/dist/components/chunks/search-B3egXuw4.js +1 -0
- package/dist/components/chunks/spinner-BsaFHuS6.js +108 -0
- package/dist/components/chunks/spinner-DbTohC6i.js +63 -0
- package/dist/components/chunks/stack-D1uh4L79.js +1 -0
- package/dist/components/chunks/stack-DyQfjPDh.js +53 -0
- package/dist/components/chunks/table-BgboosRK.js +65 -0
- package/dist/components/chunks/table-DDUNUwGd.js +1 -0
- package/dist/components/chunks/text-BHkEs8U5.js +67 -0
- package/dist/components/chunks/text-BmHZbBMo.js +1 -0
- package/dist/components/clickable/Clickable.d.ts +1 -14
- package/dist/components/clickable/Clickable.d.ts.map +10 -1
- package/dist/components/clickable/browser.js +78 -0
- package/dist/components/clickable/index.cjs +1 -0
- package/dist/components/clickable/index.d.ts +1 -3
- package/dist/components/clickable/index.d.ts.map +10 -1
- package/dist/components/clickable/index.js +66 -0
- package/dist/components/collapsible/Collapsible.d.ts +1 -28
- package/dist/components/collapsible/Collapsible.d.ts.map +10 -1
- package/dist/components/collapsible/browser.js +170 -0
- package/dist/components/collapsible/index.cjs +1 -0
- package/dist/components/collapsible/index.d.ts +1 -3
- package/dist/components/collapsible/index.d.ts.map +10 -1
- package/dist/components/collapsible/index.js +158 -0
- package/dist/components/confirm-action/ConfirmAction.d.ts +1 -27
- package/dist/components/confirm-action/ConfirmAction.d.ts.map +10 -1
- package/dist/components/confirm-action/browser.js +130 -0
- package/dist/components/confirm-action/index.cjs +1 -0
- package/dist/components/confirm-action/index.d.ts +2 -3
- package/dist/components/confirm-action/index.d.ts.map +10 -1
- package/dist/components/confirm-action/index.js +118 -0
- package/dist/components/date-picker/DatePicker.d.ts +1 -130
- package/dist/components/date-picker/DatePicker.d.ts.map +10 -1
- package/dist/components/date-picker/browser.js +1288 -0
- package/dist/components/date-picker/index.cjs +1 -0
- package/dist/components/date-picker/index.d.ts +1 -3
- package/dist/components/date-picker/index.d.ts.map +10 -1
- package/dist/components/date-picker/index.js +1276 -0
- package/dist/components/dropzone/Dropzone.d.ts +1 -59
- package/dist/components/dropzone/Dropzone.d.ts.map +10 -1
- package/dist/components/dropzone/browser.js +355 -0
- package/dist/components/dropzone/index.cjs +1 -0
- package/dist/components/dropzone/index.d.ts +1 -3
- package/dist/components/dropzone/index.d.ts.map +10 -1
- package/dist/components/dropzone/index.js +343 -0
- package/dist/components/form/Form.d.ts +1 -133
- package/dist/components/form/Form.d.ts.map +10 -1
- package/dist/components/form/browser.js +1002 -0
- package/dist/components/form/index.cjs +1 -0
- package/dist/components/form/index.d.ts +1 -3
- package/dist/components/form/index.d.ts.map +10 -1
- package/dist/components/form/index.js +990 -0
- package/dist/components/grid/Grid.d.ts +1 -16
- package/dist/components/grid/Grid.d.ts.map +10 -1
- package/dist/components/grid/browser.js +24 -0
- package/dist/components/grid/index.cjs +1 -0
- package/dist/components/grid/index.d.ts +1 -3
- package/dist/components/grid/index.d.ts.map +10 -1
- package/dist/components/grid/index.js +12 -0
- package/dist/components/icon/Icon.d.ts +1 -16
- package/dist/components/icon/Icon.d.ts.map +10 -1
- package/dist/components/icon/browser.js +16 -0
- package/dist/components/icon/index.cjs +1 -0
- package/dist/components/icon/index.d.ts +2 -3
- package/dist/components/icon/index.d.ts.map +10 -1
- package/dist/components/icon/index.js +4 -0
- package/dist/components/input/Input.d.ts +1 -68
- package/dist/components/input/Input.d.ts.map +10 -1
- package/dist/components/input/browser.js +17 -0
- package/dist/components/input/index.cjs +1 -0
- package/dist/components/input/index.d.ts +1 -3
- package/dist/components/input/index.d.ts.map +10 -1
- package/dist/components/input/index.js +5 -0
- package/dist/components/link/Link.d.ts +1 -16
- package/dist/components/link/Link.d.ts.map +10 -1
- package/dist/components/link/browser.js +16 -0
- package/dist/components/link/index.cjs +1 -0
- package/dist/components/link/index.d.ts +1 -3
- package/dist/components/link/index.d.ts.map +10 -1
- package/dist/components/link/index.js +4 -0
- package/dist/components/modal/Modal.d.ts +1 -38
- package/dist/components/modal/Modal.d.ts.map +10 -1
- package/dist/components/modal/browser.js +21 -0
- package/dist/components/modal/index.cjs +1 -0
- package/dist/components/modal/index.d.ts +1 -3
- package/dist/components/modal/index.d.ts.map +10 -1
- package/dist/components/modal/index.js +9 -0
- package/dist/components/navigation/Navigation.d.ts +1 -0
- package/dist/components/navigation/Navigation.d.ts.map +10 -0
- package/dist/components/navigation/browser.js +198 -0
- package/dist/components/navigation/index.cjs +1 -0
- package/dist/components/navigation/index.d.ts +1 -0
- package/dist/components/navigation/index.d.ts.map +10 -0
- package/dist/components/navigation/index.js +186 -0
- package/dist/components/off-canvas/OffCanvas.d.ts +1 -46
- package/dist/components/off-canvas/OffCanvas.d.ts.map +10 -1
- package/dist/components/off-canvas/browser.js +192 -0
- package/dist/components/off-canvas/index.cjs +1 -0
- package/dist/components/off-canvas/index.d.ts +1 -3
- package/dist/components/off-canvas/index.d.ts.map +10 -1
- package/dist/components/off-canvas/index.js +180 -0
- package/dist/components/page/Page.d.ts +1 -37
- package/dist/components/page/Page.d.ts.map +10 -1
- package/dist/components/page/browser.js +74 -0
- package/dist/components/page/index.cjs +16 -0
- package/dist/components/page/index.d.ts +1 -3
- package/dist/components/page/index.d.ts.map +10 -1
- package/dist/components/page/index.js +62 -0
- package/dist/components/popover/Popover.d.ts +1 -64
- package/dist/components/popover/Popover.d.ts.map +10 -1
- package/dist/components/popover/browser.js +17 -0
- package/dist/components/popover/index.cjs +1 -0
- package/dist/components/popover/index.d.ts +1 -3
- package/dist/components/popover/index.d.ts.map +10 -1
- package/dist/components/popover/index.js +5 -0
- package/dist/components/resource-table/ResourceTable.d.ts +1 -327
- package/dist/components/resource-table/ResourceTable.d.ts.map +10 -1
- package/dist/components/resource-table/browser.js +1457 -0
- package/dist/components/resource-table/index.cjs +2 -0
- package/dist/components/resource-table/index.d.ts +1 -4
- package/dist/components/resource-table/index.d.ts.map +10 -1
- package/dist/components/resource-table/index.js +1445 -0
- package/dist/components/search/Search.d.ts +1 -151
- package/dist/components/search/Search.d.ts.map +10 -1
- package/dist/components/search/browser.js +681 -0
- package/dist/components/search/index.cjs +1 -0
- package/dist/components/search/index.d.ts +1 -3
- package/dist/components/search/index.d.ts.map +10 -1
- package/dist/components/search/index.js +669 -0
- package/dist/components/select/Select.d.ts +1 -37
- package/dist/components/select/Select.d.ts.map +10 -1
- package/dist/components/select/browser.js +285 -0
- package/dist/components/select/index.cjs +1 -0
- package/dist/components/select/index.d.ts +1 -3
- package/dist/components/select/index.d.ts.map +10 -1
- package/dist/components/select/index.js +273 -0
- package/dist/components/side-navigation/SideNavigation.d.ts +1 -52
- package/dist/components/side-navigation/SideNavigation.d.ts.map +10 -1
- package/dist/components/side-navigation/browser.js +466 -0
- package/dist/components/side-navigation/index.cjs +1 -0
- package/dist/components/side-navigation/index.d.ts +5 -8
- package/dist/components/side-navigation/index.d.ts.map +10 -1
- package/dist/components/side-navigation/index.js +454 -0
- package/dist/components/sortable/Sortable.d.ts +1 -62
- package/dist/components/sortable/Sortable.d.ts.map +10 -1
- package/dist/components/sortable/browser.js +340 -0
- package/dist/components/sortable/index.cjs +1 -0
- package/dist/components/sortable/index.d.ts +1 -3
- package/dist/components/sortable/index.d.ts.map +10 -1
- package/dist/components/sortable/index.js +328 -0
- package/dist/components/spinner/Spinner.d.ts +1 -13
- package/dist/components/spinner/Spinner.d.ts.map +10 -1
- package/dist/components/spinner/browser.js +16 -0
- package/dist/components/spinner/index.cjs +1 -0
- package/dist/components/spinner/index.d.ts +1 -3
- package/dist/components/spinner/index.d.ts.map +10 -1
- package/dist/components/spinner/index.js +4 -0
- package/dist/components/stack/Stack.d.ts +1 -23
- package/dist/components/stack/Stack.d.ts.map +10 -1
- package/dist/components/stack/browser.js +16 -0
- package/dist/components/stack/index.cjs +1 -0
- package/dist/components/stack/index.d.ts +1 -3
- package/dist/components/stack/index.d.ts.map +10 -1
- package/dist/components/stack/index.js +4 -0
- package/dist/components/switch/Switch.d.ts +1 -33
- package/dist/components/switch/Switch.d.ts.map +10 -1
- package/dist/components/switch/browser.js +203 -0
- package/dist/components/switch/index.cjs +1 -0
- package/dist/components/switch/index.d.ts +1 -3
- package/dist/components/switch/index.d.ts.map +10 -1
- package/dist/components/switch/index.js +191 -0
- package/dist/components/table/Table.d.ts +1 -11
- package/dist/components/table/Table.d.ts.map +10 -1
- package/dist/components/table/browser.js +16 -0
- package/dist/components/table/index.cjs +1 -0
- package/dist/components/table/index.d.ts +1 -3
- package/dist/components/table/index.d.ts.map +10 -1
- package/dist/components/table/index.js +4 -0
- package/dist/components/tabs/Tabs.d.ts +1 -20
- package/dist/components/tabs/Tabs.d.ts.map +10 -1
- package/dist/components/tabs/browser.js +251 -0
- package/dist/components/tabs/index.cjs +1 -0
- package/dist/components/tabs/index.d.ts +4 -9
- package/dist/components/tabs/index.d.ts.map +10 -1
- package/dist/components/tabs/index.js +239 -0
- package/dist/components/tags/Tags.d.ts +1 -82
- package/dist/components/tags/Tags.d.ts.map +10 -1
- package/dist/components/tags/browser.js +416 -0
- package/dist/components/tags/index.cjs +1 -0
- package/dist/components/tags/index.d.ts +1 -3
- package/dist/components/tags/index.d.ts.map +10 -1
- package/dist/components/tags/index.js +404 -0
- package/dist/components/text/Text.d.ts +1 -25
- package/dist/components/text/Text.d.ts.map +10 -1
- package/dist/components/text/browser.js +16 -0
- package/dist/components/text/index.cjs +1 -0
- package/dist/components/text/index.d.ts +1 -3
- package/dist/components/text/index.d.ts.map +10 -1
- package/dist/components/text/index.js +4 -0
- package/dist/components/time-picker/TimePicker.d.ts +1 -61
- package/dist/components/time-picker/TimePicker.d.ts.map +10 -1
- package/dist/components/time-picker/browser.js +366 -0
- package/dist/components/time-picker/index.cjs +1 -0
- package/dist/components/time-picker/index.d.ts +1 -3
- package/dist/components/time-picker/index.d.ts.map +10 -1
- package/dist/components/time-picker/index.js +354 -0
- package/dist/components/toast/Toast.d.ts +1 -21
- package/dist/components/toast/Toast.d.ts.map +10 -1
- package/dist/components/toast/browser.js +147 -0
- package/dist/components/toast/index.cjs +3 -0
- package/dist/components/toast/index.d.ts +3 -3
- package/dist/components/toast/index.d.ts.map +10 -1
- package/dist/components/toast/index.js +135 -0
- package/dist/confirm-action.css +3 -0
- package/dist/date-picker.css +3 -0
- package/dist/dropzone.css +3 -0
- package/dist/form.css +3 -0
- package/dist/grid.css +3 -0
- package/dist/icon.css +3 -0
- package/dist/icons/ai.svg +5 -6
- package/dist/icons/bank.svg +1 -1
- package/dist/icons/barcode.svg +1 -1
- package/dist/icons/basket.svg +1 -1
- package/dist/icons/building.svg +1 -1
- package/dist/icons/buildings.svg +1 -1
- package/dist/icons/calendar.svg +1 -1
- package/dist/icons/cash.svg +3 -0
- package/dist/icons/check.svg +1 -1
- package/dist/icons/close.svg +1 -1
- package/dist/icons/coupon.svg +3 -0
- package/dist/icons/delivery-location.svg +3 -0
- package/dist/icons/desktop.svg +3 -0
- package/dist/icons/dollar-sign.svg +1 -1
- package/dist/icons/edit.svg +1 -1
- package/dist/icons/gift.svg +3 -0
- package/dist/icons/grip-lines.svg +2 -2
- package/dist/icons/heart.svg +3 -0
- package/dist/icons/installments.svg +3 -0
- package/dist/icons/inventory.svg +3 -0
- package/dist/icons/invoice.svg +3 -0
- package/dist/icons/loyalty-points.svg +3 -0
- package/dist/icons/membership.svg +3 -0
- package/dist/icons/mobile.svg +3 -0
- package/dist/icons/order-tracking.svg +7 -0
- package/dist/icons/out-of-stock.svg +3 -0
- package/dist/icons/package.svg +3 -0
- package/dist/icons/percent-discount.svg +3 -0
- package/dist/icons/pickup.svg +3 -0
- package/dist/icons/plus.svg +1 -1
- package/dist/icons/price-label.svg +3 -0
- package/dist/icons/product-review.svg +3 -0
- package/dist/icons/receipt.svg +3 -0
- package/dist/icons/refund.svg +3 -0
- package/dist/icons/remove.svg +1 -1
- package/dist/icons/return.svg +3 -0
- package/dist/icons/sale-burst.svg +3 -0
- package/dist/icons/secure-checkout.svg +3 -0
- package/dist/icons/shopping-bag.svg +3 -0
- package/dist/icons/shopping-cart.svg +3 -0
- package/dist/icons/storefront.svg +3 -0
- package/dist/icons/support.svg +3 -0
- package/dist/icons/tablet.svg +3 -0
- package/dist/icons/wallet.svg +3 -0
- package/dist/icons/warehouse.svg +3 -0
- package/dist/index.cjs +83 -79
- package/dist/index.css +253 -0
- package/dist/index.d.ts +94 -91
- package/dist/index.d.ts.map +10 -1
- package/dist/index.js +10695 -10239
- package/dist/input.css +3 -0
- package/dist/link.css +3 -0
- package/dist/mintui-elements.d.ts +156 -0
- package/dist/mintui-elements.d.ts.map +10 -0
- package/dist/modal.css +3 -0
- package/dist/navigation.css +3 -0
- package/dist/off-canvas.css +3 -0
- package/dist/page.css +3 -0
- package/dist/popover.css +3 -0
- package/dist/resource-table.css +3 -0
- package/dist/search.css +3 -0
- package/dist/select.css +3 -0
- package/dist/side-navigation.css +3 -0
- package/dist/sortable.css +3 -0
- package/dist/spinner.css +3 -0
- package/dist/stack.css +3 -0
- package/dist/switch.css +3 -0
- package/dist/table.css +3 -0
- package/dist/tabs.css +3 -0
- package/dist/tags.css +3 -0
- package/dist/text.css +3 -0
- package/dist/theme.css +101 -0
- package/dist/time-picker.css +3 -0
- package/dist/toast.css +3 -0
- package/package.json +379 -30
- package/dist/components/bottom-navigation/BottomNavItem.d.ts +0 -14
- package/dist/components/bottom-navigation/BottomNavItem.d.ts.map +0 -1
- package/dist/components/choice/ChoiceOption.d.ts +0 -30
- package/dist/components/choice/ChoiceOption.d.ts.map +0 -1
- package/dist/components/confirm-action/ConfirmActionApi.d.ts +0 -17
- package/dist/components/confirm-action/ConfirmActionApi.d.ts.map +0 -1
- package/dist/components/icon/build-icons.d.ts +0 -2
- package/dist/components/icon/build-icons.d.ts.map +0 -1
- package/dist/components/icon/icons/ai.d.ts +0 -3
- package/dist/components/icon/icons/ai.d.ts.map +0 -1
- package/dist/components/icon/icons/archive.d.ts +0 -3
- package/dist/components/icon/icons/archive.d.ts.map +0 -1
- package/dist/components/icon/icons/arrow-down.d.ts +0 -3
- package/dist/components/icon/icons/arrow-down.d.ts.map +0 -1
- package/dist/components/icon/icons/arrow-left.d.ts +0 -3
- package/dist/components/icon/icons/arrow-left.d.ts.map +0 -1
- package/dist/components/icon/icons/arrow-right.d.ts +0 -3
- package/dist/components/icon/icons/arrow-right.d.ts.map +0 -1
- package/dist/components/icon/icons/arrow-up.d.ts +0 -3
- package/dist/components/icon/icons/arrow-up.d.ts.map +0 -1
- package/dist/components/icon/icons/attach.d.ts +0 -3
- package/dist/components/icon/icons/attach.d.ts.map +0 -1
- package/dist/components/icon/icons/bank.d.ts +0 -3
- package/dist/components/icon/icons/bank.d.ts.map +0 -1
- package/dist/components/icon/icons/barcode.d.ts +0 -3
- package/dist/components/icon/icons/barcode.d.ts.map +0 -1
- package/dist/components/icon/icons/basket.d.ts +0 -3
- package/dist/components/icon/icons/basket.d.ts.map +0 -1
- package/dist/components/icon/icons/bookmark.d.ts +0 -3
- package/dist/components/icon/icons/bookmark.d.ts.map +0 -1
- package/dist/components/icon/icons/building.d.ts +0 -3
- package/dist/components/icon/icons/building.d.ts.map +0 -1
- package/dist/components/icon/icons/buildings.d.ts +0 -3
- package/dist/components/icon/icons/buildings.d.ts.map +0 -1
- package/dist/components/icon/icons/bullhorn.d.ts +0 -3
- package/dist/components/icon/icons/bullhorn.d.ts.map +0 -1
- package/dist/components/icon/icons/calendar-day.d.ts +0 -3
- package/dist/components/icon/icons/calendar-day.d.ts.map +0 -1
- package/dist/components/icon/icons/calendar-empty.d.ts +0 -3
- package/dist/components/icon/icons/calendar-empty.d.ts.map +0 -1
- package/dist/components/icon/icons/calendar-week.d.ts +0 -3
- package/dist/components/icon/icons/calendar-week.d.ts.map +0 -1
- package/dist/components/icon/icons/calendar.d.ts +0 -3
- package/dist/components/icon/icons/calendar.d.ts.map +0 -1
- package/dist/components/icon/icons/caret-down.d.ts +0 -3
- package/dist/components/icon/icons/caret-down.d.ts.map +0 -1
- package/dist/components/icon/icons/caret-left.d.ts +0 -3
- package/dist/components/icon/icons/caret-left.d.ts.map +0 -1
- package/dist/components/icon/icons/caret-right.d.ts +0 -3
- package/dist/components/icon/icons/caret-right.d.ts.map +0 -1
- package/dist/components/icon/icons/caret-up.d.ts +0 -3
- package/dist/components/icon/icons/caret-up.d.ts.map +0 -1
- package/dist/components/icon/icons/chart-bar.d.ts +0 -3
- package/dist/components/icon/icons/chart-bar.d.ts.map +0 -1
- package/dist/components/icon/icons/chart-line.d.ts +0 -3
- package/dist/components/icon/icons/chart-line.d.ts.map +0 -1
- package/dist/components/icon/icons/chat.d.ts +0 -3
- package/dist/components/icon/icons/chat.d.ts.map +0 -1
- package/dist/components/icon/icons/check.d.ts +0 -3
- package/dist/components/icon/icons/check.d.ts.map +0 -1
- package/dist/components/icon/icons/clock.d.ts +0 -3
- package/dist/components/icon/icons/clock.d.ts.map +0 -1
- package/dist/components/icon/icons/close.d.ts +0 -3
- package/dist/components/icon/icons/close.d.ts.map +0 -1
- package/dist/components/icon/icons/copy.d.ts +0 -3
- package/dist/components/icon/icons/copy.d.ts.map +0 -1
- package/dist/components/icon/icons/credit-card.d.ts +0 -3
- package/dist/components/icon/icons/credit-card.d.ts.map +0 -1
- package/dist/components/icon/icons/delete.d.ts +0 -3
- package/dist/components/icon/icons/delete.d.ts.map +0 -1
- package/dist/components/icon/icons/desktop-screen.d.ts +0 -3
- package/dist/components/icon/icons/desktop-screen.d.ts.map +0 -1
- package/dist/components/icon/icons/documentation.d.ts +0 -3
- package/dist/components/icon/icons/documentation.d.ts.map +0 -1
- package/dist/components/icon/icons/dollar-sign.d.ts +0 -3
- package/dist/components/icon/icons/dollar-sign.d.ts.map +0 -1
- package/dist/components/icon/icons/download.d.ts +0 -3
- package/dist/components/icon/icons/download.d.ts.map +0 -1
- package/dist/components/icon/icons/duplicate.d.ts +0 -3
- package/dist/components/icon/icons/duplicate.d.ts.map +0 -1
- package/dist/components/icon/icons/edit.d.ts +0 -3
- package/dist/components/icon/icons/edit.d.ts.map +0 -1
- package/dist/components/icon/icons/ellipsis.d.ts +0 -3
- package/dist/components/icon/icons/ellipsis.d.ts.map +0 -1
- package/dist/components/icon/icons/error.d.ts +0 -3
- package/dist/components/icon/icons/error.d.ts.map +0 -1
- package/dist/components/icon/icons/external-link.d.ts +0 -3
- package/dist/components/icon/icons/external-link.d.ts.map +0 -1
- package/dist/components/icon/icons/eye.d.ts +0 -3
- package/dist/components/icon/icons/eye.d.ts.map +0 -1
- package/dist/components/icon/icons/file.d.ts +0 -3
- package/dist/components/icon/icons/file.d.ts.map +0 -1
- package/dist/components/icon/icons/filter.d.ts +0 -3
- package/dist/components/icon/icons/filter.d.ts.map +0 -1
- package/dist/components/icon/icons/folder.d.ts +0 -3
- package/dist/components/icon/icons/folder.d.ts.map +0 -1
- package/dist/components/icon/icons/gavel.d.ts +0 -3
- package/dist/components/icon/icons/gavel.d.ts.map +0 -1
- package/dist/components/icon/icons/globe.d.ts +0 -3
- package/dist/components/icon/icons/globe.d.ts.map +0 -1
- package/dist/components/icon/icons/grid.d.ts +0 -3
- package/dist/components/icon/icons/grid.d.ts.map +0 -1
- package/dist/components/icon/icons/grip-lines.d.ts +0 -3
- package/dist/components/icon/icons/grip-lines.d.ts.map +0 -1
- package/dist/components/icon/icons/help.d.ts +0 -3
- package/dist/components/icon/icons/help.d.ts.map +0 -1
- package/dist/components/icon/icons/home.d.ts +0 -3
- package/dist/components/icon/icons/home.d.ts.map +0 -1
- package/dist/components/icon/icons/image.d.ts +0 -3
- package/dist/components/icon/icons/image.d.ts.map +0 -1
- package/dist/components/icon/icons/index.cjs +0 -34
- package/dist/components/icon/icons/index.d.ts +0 -92
- package/dist/components/icon/icons/index.d.ts.map +0 -1
- package/dist/components/icon/icons/index.js +0 -752
- package/dist/components/icon/icons/info.d.ts +0 -3
- package/dist/components/icon/icons/info.d.ts.map +0 -1
- package/dist/components/icon/icons/language.d.ts +0 -3
- package/dist/components/icon/icons/language.d.ts.map +0 -1
- package/dist/components/icon/icons/line-chart.d.ts +0 -3
- package/dist/components/icon/icons/line-chart.d.ts.map +0 -1
- package/dist/components/icon/icons/link.d.ts +0 -3
- package/dist/components/icon/icons/link.d.ts.map +0 -1
- package/dist/components/icon/icons/list.d.ts +0 -3
- package/dist/components/icon/icons/list.d.ts.map +0 -1
- package/dist/components/icon/icons/location.d.ts +0 -3
- package/dist/components/icon/icons/location.d.ts.map +0 -1
- package/dist/components/icon/icons/lock.d.ts +0 -3
- package/dist/components/icon/icons/lock.d.ts.map +0 -1
- package/dist/components/icon/icons/login.d.ts +0 -3
- package/dist/components/icon/icons/login.d.ts.map +0 -1
- package/dist/components/icon/icons/logout.d.ts +0 -3
- package/dist/components/icon/icons/logout.d.ts.map +0 -1
- package/dist/components/icon/icons/mail.d.ts +0 -3
- package/dist/components/icon/icons/mail.d.ts.map +0 -1
- package/dist/components/icon/icons/map.d.ts +0 -3
- package/dist/components/icon/icons/map.d.ts.map +0 -1
- package/dist/components/icon/icons/menu.d.ts +0 -3
- package/dist/components/icon/icons/menu.d.ts.map +0 -1
- package/dist/components/icon/icons/moon.d.ts +0 -3
- package/dist/components/icon/icons/moon.d.ts.map +0 -1
- package/dist/components/icon/icons/notifications.d.ts +0 -3
- package/dist/components/icon/icons/notifications.d.ts.map +0 -1
- package/dist/components/icon/icons/paste.d.ts +0 -3
- package/dist/components/icon/icons/paste.d.ts.map +0 -1
- package/dist/components/icon/icons/pin.d.ts +0 -3
- package/dist/components/icon/icons/pin.d.ts.map +0 -1
- package/dist/components/icon/icons/plus.d.ts +0 -3
- package/dist/components/icon/icons/plus.d.ts.map +0 -1
- package/dist/components/icon/icons/print.d.ts +0 -3
- package/dist/components/icon/icons/print.d.ts.map +0 -1
- package/dist/components/icon/icons/refresh.d.ts +0 -3
- package/dist/components/icon/icons/refresh.d.ts.map +0 -1
- package/dist/components/icon/icons/remove.d.ts +0 -3
- package/dist/components/icon/icons/remove.d.ts.map +0 -1
- package/dist/components/icon/icons/save.d.ts +0 -3
- package/dist/components/icon/icons/save.d.ts.map +0 -1
- package/dist/components/icon/icons/search.d.ts +0 -3
- package/dist/components/icon/icons/search.d.ts.map +0 -1
- package/dist/components/icon/icons/settings.d.ts +0 -3
- package/dist/components/icon/icons/settings.d.ts.map +0 -1
- package/dist/components/icon/icons/share.d.ts +0 -3
- package/dist/components/icon/icons/share.d.ts.map +0 -1
- package/dist/components/icon/icons/sort-arrows.d.ts +0 -3
- package/dist/components/icon/icons/sort-arrows.d.ts.map +0 -1
- package/dist/components/icon/icons/sort.d.ts +0 -3
- package/dist/components/icon/icons/sort.d.ts.map +0 -1
- package/dist/components/icon/icons/star.d.ts +0 -3
- package/dist/components/icon/icons/star.d.ts.map +0 -1
- package/dist/components/icon/icons/success.d.ts +0 -3
- package/dist/components/icon/icons/success.d.ts.map +0 -1
- package/dist/components/icon/icons/sun.d.ts +0 -3
- package/dist/components/icon/icons/sun.d.ts.map +0 -1
- package/dist/components/icon/icons/table.d.ts +0 -3
- package/dist/components/icon/icons/table.d.ts.map +0 -1
- package/dist/components/icon/icons/tag.d.ts +0 -3
- package/dist/components/icon/icons/tag.d.ts.map +0 -1
- package/dist/components/icon/icons/trash.d.ts +0 -3
- package/dist/components/icon/icons/trash.d.ts.map +0 -1
- package/dist/components/icon/icons/truck.d.ts +0 -3
- package/dist/components/icon/icons/truck.d.ts.map +0 -1
- package/dist/components/icon/icons/unlock.d.ts +0 -3
- package/dist/components/icon/icons/unlock.d.ts.map +0 -1
- package/dist/components/icon/icons/upload.d.ts +0 -3
- package/dist/components/icon/icons/upload.d.ts.map +0 -1
- package/dist/components/icon/icons/user-add.d.ts +0 -3
- package/dist/components/icon/icons/user-add.d.ts.map +0 -1
- package/dist/components/icon/icons/user.d.ts +0 -3
- package/dist/components/icon/icons/user.d.ts.map +0 -1
- package/dist/components/icon/icons/users.d.ts +0 -3
- package/dist/components/icon/icons/users.d.ts.map +0 -1
- package/dist/components/icon/icons/video.d.ts +0 -3
- package/dist/components/icon/icons/video.d.ts.map +0 -1
- package/dist/components/icon/icons/warning.d.ts +0 -3
- package/dist/components/icon/icons/warning.d.ts.map +0 -1
- package/dist/components/icon/registry.d.ts +0 -15
- package/dist/components/icon/registry.d.ts.map +0 -1
- package/dist/components/resource-table/ResourceTableContextMenu.d.ts +0 -40
- package/dist/components/resource-table/ResourceTableContextMenu.d.ts.map +0 -1
- package/dist/components/side-navigation/SideNavigationActionHeader.d.ts +0 -2
- package/dist/components/side-navigation/SideNavigationActionHeader.d.ts.map +0 -1
- package/dist/components/side-navigation/SideNavigationActionLinks.d.ts +0 -9
- package/dist/components/side-navigation/SideNavigationActionLinks.d.ts.map +0 -1
- package/dist/components/side-navigation/SideNavigationActionMenu.d.ts +0 -26
- package/dist/components/side-navigation/SideNavigationActionMenu.d.ts.map +0 -1
- package/dist/components/side-navigation/SideNavigationLink.d.ts +0 -38
- package/dist/components/side-navigation/SideNavigationLink.d.ts.map +0 -1
- package/dist/components/side-navigation/SideNavigationLinks.d.ts +0 -38
- package/dist/components/side-navigation/SideNavigationLinks.d.ts.map +0 -1
- package/dist/components/tabs/Tab.d.ts +0 -19
- package/dist/components/tabs/Tab.d.ts.map +0 -1
- package/dist/components/tabs/TabContent.d.ts +0 -13
- package/dist/components/tabs/TabContent.d.ts.map +0 -1
- package/dist/components/tabs/TabList.d.ts +0 -12
- package/dist/components/tabs/TabList.d.ts.map +0 -1
- package/dist/components/toast/ToastApi.d.ts +0 -21
- package/dist/components/toast/ToastApi.d.ts.map +0 -1
- package/dist/components/top-navigation/TopNavigation.d.ts +0 -65
- package/dist/components/top-navigation/TopNavigation.d.ts.map +0 -1
- package/dist/components/top-navigation/index.d.ts +0 -4
- package/dist/components/top-navigation/index.d.ts.map +0 -1
- package/dist/icons/truck.svg +0 -13
- package/dist/search-CM-OgatF.js +0 -179
- package/dist/search-C_vLUsm7.cjs +0 -1
- package/dist/styles.css +0 -3
- package/tailwind.preset.cjs +0 -75
- package/tailwind.preset.js +0 -97
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
|
|
2
|
+
const __mintLoadStyle = (key, url) => {
|
|
3
|
+
if (typeof document === 'undefined') return
|
|
4
|
+
const href = new URL(url, import.meta.url).href
|
|
5
|
+
if ([...document.querySelectorAll('link[rel="stylesheet"]')].some(link => link.href === href)) return
|
|
6
|
+
if (document.querySelector('style[data-mint-ui-style="' + key + '"]') || document.querySelector('link[data-mint-ui-style="' + key + '"]')) return
|
|
7
|
+
const link = document.createElement('link')
|
|
8
|
+
link.rel = 'stylesheet'
|
|
9
|
+
link.href = href
|
|
10
|
+
link.dataset.mintUiStyle = key
|
|
11
|
+
document.head.append(link)
|
|
12
|
+
}
|
|
13
|
+
__mintLoadStyle('theme', '../../theme.css')
|
|
14
|
+
__mintLoadStyle('tabs', '../../tabs.css')
|
|
15
|
+
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
16
|
+
//#region src/components/tabs/Tab.ts
|
|
17
|
+
var t = class extends HTMLElement {
|
|
18
|
+
static get observedAttributes() {
|
|
19
|
+
return [
|
|
20
|
+
"active",
|
|
21
|
+
"disabled",
|
|
22
|
+
"target"
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
constructor() {
|
|
26
|
+
super(), this._clickHandler = null;
|
|
27
|
+
}
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
this.render(), this.setupEventListeners();
|
|
30
|
+
}
|
|
31
|
+
disconnectedCallback() {
|
|
32
|
+
this.removeEventListeners();
|
|
33
|
+
}
|
|
34
|
+
attributeChangedCallback(e, t, n) {
|
|
35
|
+
t !== n && this.render();
|
|
36
|
+
}
|
|
37
|
+
getTarget() {
|
|
38
|
+
return this.getAttribute("target") || "";
|
|
39
|
+
}
|
|
40
|
+
isActive() {
|
|
41
|
+
let e = this.getAttribute("active");
|
|
42
|
+
return e !== null && e !== "false";
|
|
43
|
+
}
|
|
44
|
+
isDisabled() {
|
|
45
|
+
return this.getAttribute("disabled") === "true";
|
|
46
|
+
}
|
|
47
|
+
get active() {
|
|
48
|
+
return this.isActive();
|
|
49
|
+
}
|
|
50
|
+
set active(e) {
|
|
51
|
+
e ? this.setAttribute("active", "true") : this.setAttribute("active", "false");
|
|
52
|
+
}
|
|
53
|
+
render() {}
|
|
54
|
+
setupEventListeners() {
|
|
55
|
+
this.isDisabled() || this._clickHandler || (this._clickHandler = this.handleClick.bind(this), this.addEventListener("click", this._clickHandler));
|
|
56
|
+
}
|
|
57
|
+
removeEventListeners() {
|
|
58
|
+
this._clickHandler &&= (this.removeEventListener("click", this._clickHandler), null);
|
|
59
|
+
}
|
|
60
|
+
handleClick(e) {
|
|
61
|
+
if (this.isDisabled()) {
|
|
62
|
+
e.preventDefault(), e.stopPropagation();
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
e.__mintTabsSynthetic || (e.stopPropagation(), this.dispatchEvent(new CustomEvent("tab-click", {
|
|
66
|
+
detail: {
|
|
67
|
+
tab: this,
|
|
68
|
+
target: this.getTarget()
|
|
69
|
+
},
|
|
70
|
+
bubbles: !0,
|
|
71
|
+
cancelable: !0,
|
|
72
|
+
composed: !0
|
|
73
|
+
})));
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
customElements.get("mint-tab") || e("mint-tab", t);
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/components/tabs/TabList.ts
|
|
79
|
+
var n = class extends HTMLElement {
|
|
80
|
+
static get observedAttributes() {
|
|
81
|
+
return ["position"];
|
|
82
|
+
}
|
|
83
|
+
constructor() {
|
|
84
|
+
super();
|
|
85
|
+
}
|
|
86
|
+
connectedCallback() {
|
|
87
|
+
this.render();
|
|
88
|
+
}
|
|
89
|
+
attributeChangedCallback(e, t, n) {
|
|
90
|
+
t !== n && this.render();
|
|
91
|
+
}
|
|
92
|
+
getPosition() {
|
|
93
|
+
return this.getAttribute("position") || "top";
|
|
94
|
+
}
|
|
95
|
+
render() {
|
|
96
|
+
this.setAttribute("role", "tablist"), !this.hasAttribute("aria-label") && !this.hasAttribute("aria-labelledby") && this.setAttribute("aria-label", "Tabs"), this.setAttribute("aria-orientation", this.getPosition() === "top" ? "horizontal" : "vertical");
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
customElements.get("mint-tab-list") || e("mint-tab-list", n);
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/components/tabs/TabContent.ts
|
|
102
|
+
var r = class extends HTMLElement {
|
|
103
|
+
static get observedAttributes() {
|
|
104
|
+
return ["id"];
|
|
105
|
+
}
|
|
106
|
+
constructor() {
|
|
107
|
+
super();
|
|
108
|
+
}
|
|
109
|
+
connectedCallback() {
|
|
110
|
+
this.render(), this.checkInitialVisibility();
|
|
111
|
+
}
|
|
112
|
+
attributeChangedCallback(e, t, n) {
|
|
113
|
+
t !== n && e === "id" && (this.render(), this.checkInitialVisibility());
|
|
114
|
+
}
|
|
115
|
+
getId() {
|
|
116
|
+
return this.getAttribute("id") || "";
|
|
117
|
+
}
|
|
118
|
+
show() {
|
|
119
|
+
this.removeAttribute("hidden");
|
|
120
|
+
}
|
|
121
|
+
hide() {
|
|
122
|
+
this.setAttribute("hidden", "");
|
|
123
|
+
}
|
|
124
|
+
checkInitialVisibility() {
|
|
125
|
+
let e = this.closest("mint-tabs");
|
|
126
|
+
if (!e) {
|
|
127
|
+
this.hide();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
let t = e.querySelectorAll("mint-tab"), n = !1;
|
|
131
|
+
t.forEach((e) => {
|
|
132
|
+
let t = e.getAttribute("active"), r = e.getAttribute("target"), i = this.getId();
|
|
133
|
+
t === "true" && r === i && (n = !0);
|
|
134
|
+
}), !n && t.length > 0 && t[0].getAttribute("target") === this.getId() && !e.querySelector("mint-tab[active=\"true\"]") && (n = !0), n ? this.show() : this.hide();
|
|
135
|
+
}
|
|
136
|
+
render() {
|
|
137
|
+
this.setAttribute("role", "tabpanel"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0");
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
customElements.get("mint-tab-content") || e("mint-tab-content", r);
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/components/tabs/Tabs.ts
|
|
143
|
+
var i = class e extends HTMLElement {
|
|
144
|
+
static {
|
|
145
|
+
this._id = 0;
|
|
146
|
+
}
|
|
147
|
+
constructor() {
|
|
148
|
+
super(), this._tabClickHandler = null, this._tabKeydownHandler = null, this._mutationObserver = null;
|
|
149
|
+
}
|
|
150
|
+
connectedCallback() {
|
|
151
|
+
this.render(), this.setupEventListeners(), this.setupMutationObserver(), this.initializeActiveTab();
|
|
152
|
+
}
|
|
153
|
+
disconnectedCallback() {
|
|
154
|
+
this.removeEventListeners(), this._mutationObserver &&= (this._mutationObserver.disconnect(), null);
|
|
155
|
+
}
|
|
156
|
+
render() {
|
|
157
|
+
let e = this.querySelector("mint-tab-list");
|
|
158
|
+
if (this.querySelectorAll("mint-tab-content"), !e) {
|
|
159
|
+
console.warn("mint-tabs: mint-tab-list is required");
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
this.syncAccessibility();
|
|
163
|
+
}
|
|
164
|
+
initializeActiveTab() {
|
|
165
|
+
requestAnimationFrame(() => {
|
|
166
|
+
let e = this.querySelectorAll("mint-tab"), t = null;
|
|
167
|
+
if (e.forEach((e) => {
|
|
168
|
+
e.getAttribute("active") === "true" && (t = e);
|
|
169
|
+
}), !t && e.length > 0 && (t = e[0], t.setAttribute("active", "true")), t) {
|
|
170
|
+
let e = t.getAttribute("target");
|
|
171
|
+
e ? this.showContent(e) : this.hideAllContent();
|
|
172
|
+
} else this.hideAllContent();
|
|
173
|
+
this.syncAccessibility(), this.querySelectorAll("mint-tab-content").forEach((e) => {
|
|
174
|
+
let t = e;
|
|
175
|
+
t.checkInitialVisibility && t.checkInitialVisibility();
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
hideAllContent() {
|
|
180
|
+
this.querySelectorAll("mint-tab-content").forEach((e) => {
|
|
181
|
+
let t = e;
|
|
182
|
+
t.hide ? t.hide() : e.style.display = "none";
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
showContent(e) {
|
|
186
|
+
this.querySelectorAll("mint-tab-content").forEach((e) => {
|
|
187
|
+
let t = e;
|
|
188
|
+
t.hide ? t.hide() : e.style.display = "none";
|
|
189
|
+
});
|
|
190
|
+
let t = this.querySelector(`mint-tab-content[id="${e}"]`);
|
|
191
|
+
t && (t.show ? t.show() : t.style.display = "block");
|
|
192
|
+
}
|
|
193
|
+
setupEventListeners() {
|
|
194
|
+
this._tabClickHandler || (this._tabClickHandler = this.handleTabClick.bind(this), this.addEventListener("tab-click", this._tabClickHandler)), this._tabKeydownHandler || (this._tabKeydownHandler = (e) => {
|
|
195
|
+
let t = e.target?.closest("mint-tab"), n = t?.closest("mint-tab-list");
|
|
196
|
+
if (!t || !n) return;
|
|
197
|
+
let r = Array.from(n.querySelectorAll("mint-tab:not([disabled=\"true\"])")), i = r.indexOf(t);
|
|
198
|
+
if (i < 0 || r.length === 0) return;
|
|
199
|
+
let a = n.getAttribute("position") === "left" || n.getAttribute("position") === "right", o = i;
|
|
200
|
+
if (e.key === (a ? "ArrowDown" : "ArrowRight")) o = (i + 1) % r.length;
|
|
201
|
+
else if (e.key === (a ? "ArrowUp" : "ArrowLeft")) o = (i - 1 + r.length) % r.length;
|
|
202
|
+
else if (e.key === "Home") o = 0;
|
|
203
|
+
else if (e.key === "End") o = r.length - 1;
|
|
204
|
+
else return;
|
|
205
|
+
e.preventDefault();
|
|
206
|
+
let s = r[o];
|
|
207
|
+
s.focus(), this.activateTab(s);
|
|
208
|
+
}, this.addEventListener("keydown", this._tabKeydownHandler));
|
|
209
|
+
}
|
|
210
|
+
removeEventListeners() {
|
|
211
|
+
this._tabClickHandler &&= (this.removeEventListener("tab-click", this._tabClickHandler), null), this._tabKeydownHandler &&= (this.removeEventListener("keydown", this._tabKeydownHandler), null);
|
|
212
|
+
}
|
|
213
|
+
setupMutationObserver() {
|
|
214
|
+
this._mutationObserver = new MutationObserver(() => {
|
|
215
|
+
this.render();
|
|
216
|
+
});
|
|
217
|
+
let e = this.querySelector("mint-tab-list");
|
|
218
|
+
e && this._mutationObserver.observe(e, {
|
|
219
|
+
attributes: !0,
|
|
220
|
+
attributeFilter: ["position"]
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
handleTabClick(e) {
|
|
224
|
+
let t = e.detail?.tab;
|
|
225
|
+
t && this.activateTab(t);
|
|
226
|
+
}
|
|
227
|
+
activateTab(e) {
|
|
228
|
+
let t = e.getAttribute("target"), n = e.closest("mint-tab-list");
|
|
229
|
+
n && (n.querySelectorAll("mint-tab").forEach((t) => {
|
|
230
|
+
let n = t;
|
|
231
|
+
t === e ? n.active = !0 : n.active = !1;
|
|
232
|
+
}), t && this.showContent(t), this.syncAccessibility());
|
|
233
|
+
}
|
|
234
|
+
syncAccessibility() {
|
|
235
|
+
this.id ||= (e._id += 1, `mint-tabs-${e._id}`), Array.from(this.querySelectorAll("mint-tab-list")).forEach((e, t) => {
|
|
236
|
+
e.setAttribute("role", "tablist"), e.setAttribute("aria-orientation", e.getAttribute("position") === "left" || e.getAttribute("position") === "right" ? "vertical" : "horizontal"), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && e.setAttribute("aria-label", "Tabs"), Array.from(e.querySelectorAll("mint-tab")).forEach((e, n) => {
|
|
237
|
+
let r = e.id || `${this.id}-tab-${t + 1}-${n + 1}`;
|
|
238
|
+
e.id = r, e.setAttribute("role", "tab");
|
|
239
|
+
let i = e.getAttribute("active") === "true";
|
|
240
|
+
e.setAttribute("aria-selected", String(i)), e.setAttribute("aria-disabled", String(e.getAttribute("disabled") === "true")), e.tabIndex = i ? 0 : -1;
|
|
241
|
+
let a = e.getAttribute("target");
|
|
242
|
+
a ? e.setAttribute("aria-controls", a) : e.removeAttribute("aria-controls");
|
|
243
|
+
let o = a ? Array.from(this.querySelectorAll("mint-tab-content")).find((e) => e.id === a) ?? null : null;
|
|
244
|
+
o && (o.setAttribute("role", "tabpanel"), o.setAttribute("aria-labelledby", r), o.hasAttribute("tabindex") || (o.tabIndex = 0));
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
customElements.get("mint-tabs") || e("mint-tabs", i);
|
|
250
|
+
//#endregion
|
|
251
|
+
export { t as Tab, r as TabContent, n as TabList, i as Tabs };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../chunks/register-element-tCL_F1YI.js`);var t=class extends HTMLElement{static get observedAttributes(){return[`active`,`disabled`,`target`]}constructor(){super(),this._clickHandler=null}connectedCallback(){this.render(),this.setupEventListeners()}disconnectedCallback(){this.removeEventListeners()}attributeChangedCallback(e,t,n){t!==n&&this.render()}getTarget(){return this.getAttribute(`target`)||``}isActive(){let e=this.getAttribute(`active`);return e!==null&&e!==`false`}isDisabled(){return this.getAttribute(`disabled`)===`true`}get active(){return this.isActive()}set active(e){e?this.setAttribute(`active`,`true`):this.setAttribute(`active`,`false`)}render(){}setupEventListeners(){this.isDisabled()||this._clickHandler||(this._clickHandler=this.handleClick.bind(this),this.addEventListener(`click`,this._clickHandler))}removeEventListeners(){this._clickHandler&&=(this.removeEventListener(`click`,this._clickHandler),null)}handleClick(e){if(this.isDisabled()){e.preventDefault(),e.stopPropagation();return}e.__mintTabsSynthetic||(e.stopPropagation(),this.dispatchEvent(new CustomEvent(`tab-click`,{detail:{tab:this,target:this.getTarget()},bubbles:!0,cancelable:!0,composed:!0})))}};customElements.get(`mint-tab`)||e.t(`mint-tab`,t);var n=class extends HTMLElement{static get observedAttributes(){return[`position`]}constructor(){super()}connectedCallback(){this.render()}attributeChangedCallback(e,t,n){t!==n&&this.render()}getPosition(){return this.getAttribute(`position`)||`top`}render(){this.setAttribute(`role`,`tablist`),!this.hasAttribute(`aria-label`)&&!this.hasAttribute(`aria-labelledby`)&&this.setAttribute(`aria-label`,`Tabs`),this.setAttribute(`aria-orientation`,this.getPosition()===`top`?`horizontal`:`vertical`)}};customElements.get(`mint-tab-list`)||e.t(`mint-tab-list`,n);var r=class extends HTMLElement{static get observedAttributes(){return[`id`]}constructor(){super()}connectedCallback(){this.render(),this.checkInitialVisibility()}attributeChangedCallback(e,t,n){t!==n&&e===`id`&&(this.render(),this.checkInitialVisibility())}getId(){return this.getAttribute(`id`)||``}show(){this.removeAttribute(`hidden`)}hide(){this.setAttribute(`hidden`,``)}checkInitialVisibility(){let e=this.closest(`mint-tabs`);if(!e){this.hide();return}let t=e.querySelectorAll(`mint-tab`),n=!1;t.forEach(e=>{let t=e.getAttribute(`active`),r=e.getAttribute(`target`),i=this.getId();t===`true`&&r===i&&(n=!0)}),!n&&t.length>0&&t[0].getAttribute(`target`)===this.getId()&&!e.querySelector(`mint-tab[active="true"]`)&&(n=!0),n?this.show():this.hide()}render(){this.setAttribute(`role`,`tabpanel`),this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,`0`)}};customElements.get(`mint-tab-content`)||e.t(`mint-tab-content`,r);var i=class e extends HTMLElement{static{this._id=0}constructor(){super(),this._tabClickHandler=null,this._tabKeydownHandler=null,this._mutationObserver=null}connectedCallback(){this.render(),this.setupEventListeners(),this.setupMutationObserver(),this.initializeActiveTab()}disconnectedCallback(){this.removeEventListeners(),this._mutationObserver&&=(this._mutationObserver.disconnect(),null)}render(){let e=this.querySelector(`mint-tab-list`);if(this.querySelectorAll(`mint-tab-content`),!e){console.warn(`mint-tabs: mint-tab-list is required`);return}this.syncAccessibility()}initializeActiveTab(){requestAnimationFrame(()=>{let e=this.querySelectorAll(`mint-tab`),t=null;if(e.forEach(e=>{e.getAttribute(`active`)===`true`&&(t=e)}),!t&&e.length>0&&(t=e[0],t.setAttribute(`active`,`true`)),t){let e=t.getAttribute(`target`);e?this.showContent(e):this.hideAllContent()}else this.hideAllContent();this.syncAccessibility(),this.querySelectorAll(`mint-tab-content`).forEach(e=>{let t=e;t.checkInitialVisibility&&t.checkInitialVisibility()})})}hideAllContent(){this.querySelectorAll(`mint-tab-content`).forEach(e=>{let t=e;t.hide?t.hide():e.style.display=`none`})}showContent(e){this.querySelectorAll(`mint-tab-content`).forEach(e=>{let t=e;t.hide?t.hide():e.style.display=`none`});let t=this.querySelector(`mint-tab-content[id="${e}"]`);t&&(t.show?t.show():t.style.display=`block`)}setupEventListeners(){this._tabClickHandler||(this._tabClickHandler=this.handleTabClick.bind(this),this.addEventListener(`tab-click`,this._tabClickHandler)),this._tabKeydownHandler||(this._tabKeydownHandler=e=>{let t=e.target?.closest(`mint-tab`),n=t?.closest(`mint-tab-list`);if(!t||!n)return;let r=Array.from(n.querySelectorAll(`mint-tab:not([disabled="true"])`)),i=r.indexOf(t);if(i<0||r.length===0)return;let a=n.getAttribute(`position`)===`left`||n.getAttribute(`position`)===`right`,o=i;if(e.key===(a?`ArrowDown`:`ArrowRight`))o=(i+1)%r.length;else if(e.key===(a?`ArrowUp`:`ArrowLeft`))o=(i-1+r.length)%r.length;else if(e.key===`Home`)o=0;else if(e.key===`End`)o=r.length-1;else return;e.preventDefault();let s=r[o];s.focus(),this.activateTab(s)},this.addEventListener(`keydown`,this._tabKeydownHandler))}removeEventListeners(){this._tabClickHandler&&=(this.removeEventListener(`tab-click`,this._tabClickHandler),null),this._tabKeydownHandler&&=(this.removeEventListener(`keydown`,this._tabKeydownHandler),null)}setupMutationObserver(){this._mutationObserver=new MutationObserver(()=>{this.render()});let e=this.querySelector(`mint-tab-list`);e&&this._mutationObserver.observe(e,{attributes:!0,attributeFilter:[`position`]})}handleTabClick(e){let t=e.detail?.tab;t&&this.activateTab(t)}activateTab(e){let t=e.getAttribute(`target`),n=e.closest(`mint-tab-list`);n&&(n.querySelectorAll(`mint-tab`).forEach(t=>{let n=t;t===e?n.active=!0:n.active=!1}),t&&this.showContent(t),this.syncAccessibility())}syncAccessibility(){this.id||=(e._id+=1,`mint-tabs-${e._id}`),Array.from(this.querySelectorAll(`mint-tab-list`)).forEach((e,t)=>{e.setAttribute(`role`,`tablist`),e.setAttribute(`aria-orientation`,e.getAttribute(`position`)===`left`||e.getAttribute(`position`)===`right`?`vertical`:`horizontal`),!e.hasAttribute(`aria-label`)&&!e.hasAttribute(`aria-labelledby`)&&e.setAttribute(`aria-label`,`Tabs`),Array.from(e.querySelectorAll(`mint-tab`)).forEach((e,n)=>{let r=e.id||`${this.id}-tab-${t+1}-${n+1}`;e.id=r,e.setAttribute(`role`,`tab`);let i=e.getAttribute(`active`)===`true`;e.setAttribute(`aria-selected`,String(i)),e.setAttribute(`aria-disabled`,String(e.getAttribute(`disabled`)===`true`)),e.tabIndex=i?0:-1;let a=e.getAttribute(`target`);a?e.setAttribute(`aria-controls`,a):e.removeAttribute(`aria-controls`);let o=a?Array.from(this.querySelectorAll(`mint-tab-content`)).find(e=>e.id===a)??null:null;o&&(o.setAttribute(`role`,`tabpanel`),o.setAttribute(`aria-labelledby`,r),o.hasAttribute(`tabindex`)||(o.tabIndex=0))})})}};customElements.get(`mint-tabs`)||e.t(`mint-tabs`,i),exports.Tab=t,exports.TabContent=r,exports.TabList=n,exports.Tabs=i;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { default as Tabs } from './Tabs';
|
|
6
|
-
export { default as TabList } from './TabList';
|
|
7
|
-
export { default as Tab } from './Tab';
|
|
8
|
-
export { default as TabContent } from './TabContent';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { default, MintTabs } from './Tabs'
|
|
2
|
+
export { MintTabList } from '../../mintui-elements'
|
|
3
|
+
export { MintTab } from '../../mintui-elements'
|
|
4
|
+
export { MintTabContent } from '../../mintui-elements'
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"file": "index.d.ts",
|
|
4
|
+
"sourceRoot": "",
|
|
5
|
+
"sources": [
|
|
6
|
+
"index.d.ts"
|
|
7
|
+
],
|
|
8
|
+
"names": [],
|
|
9
|
+
"mappings": "AAAA"
|
|
10
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import '../../theme.css'
|
|
2
|
+
import '../../tabs.css'
|
|
3
|
+
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
4
|
+
//#region src/components/tabs/Tab.ts
|
|
5
|
+
var t = class extends HTMLElement {
|
|
6
|
+
static get observedAttributes() {
|
|
7
|
+
return [
|
|
8
|
+
"active",
|
|
9
|
+
"disabled",
|
|
10
|
+
"target"
|
|
11
|
+
];
|
|
12
|
+
}
|
|
13
|
+
constructor() {
|
|
14
|
+
super(), this._clickHandler = null;
|
|
15
|
+
}
|
|
16
|
+
connectedCallback() {
|
|
17
|
+
this.render(), this.setupEventListeners();
|
|
18
|
+
}
|
|
19
|
+
disconnectedCallback() {
|
|
20
|
+
this.removeEventListeners();
|
|
21
|
+
}
|
|
22
|
+
attributeChangedCallback(e, t, n) {
|
|
23
|
+
t !== n && this.render();
|
|
24
|
+
}
|
|
25
|
+
getTarget() {
|
|
26
|
+
return this.getAttribute("target") || "";
|
|
27
|
+
}
|
|
28
|
+
isActive() {
|
|
29
|
+
let e = this.getAttribute("active");
|
|
30
|
+
return e !== null && e !== "false";
|
|
31
|
+
}
|
|
32
|
+
isDisabled() {
|
|
33
|
+
return this.getAttribute("disabled") === "true";
|
|
34
|
+
}
|
|
35
|
+
get active() {
|
|
36
|
+
return this.isActive();
|
|
37
|
+
}
|
|
38
|
+
set active(e) {
|
|
39
|
+
e ? this.setAttribute("active", "true") : this.setAttribute("active", "false");
|
|
40
|
+
}
|
|
41
|
+
render() {}
|
|
42
|
+
setupEventListeners() {
|
|
43
|
+
this.isDisabled() || this._clickHandler || (this._clickHandler = this.handleClick.bind(this), this.addEventListener("click", this._clickHandler));
|
|
44
|
+
}
|
|
45
|
+
removeEventListeners() {
|
|
46
|
+
this._clickHandler &&= (this.removeEventListener("click", this._clickHandler), null);
|
|
47
|
+
}
|
|
48
|
+
handleClick(e) {
|
|
49
|
+
if (this.isDisabled()) {
|
|
50
|
+
e.preventDefault(), e.stopPropagation();
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
e.__mintTabsSynthetic || (e.stopPropagation(), this.dispatchEvent(new CustomEvent("tab-click", {
|
|
54
|
+
detail: {
|
|
55
|
+
tab: this,
|
|
56
|
+
target: this.getTarget()
|
|
57
|
+
},
|
|
58
|
+
bubbles: !0,
|
|
59
|
+
cancelable: !0,
|
|
60
|
+
composed: !0
|
|
61
|
+
})));
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
customElements.get("mint-tab") || e("mint-tab", t);
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/tabs/TabList.ts
|
|
67
|
+
var n = class extends HTMLElement {
|
|
68
|
+
static get observedAttributes() {
|
|
69
|
+
return ["position"];
|
|
70
|
+
}
|
|
71
|
+
constructor() {
|
|
72
|
+
super();
|
|
73
|
+
}
|
|
74
|
+
connectedCallback() {
|
|
75
|
+
this.render();
|
|
76
|
+
}
|
|
77
|
+
attributeChangedCallback(e, t, n) {
|
|
78
|
+
t !== n && this.render();
|
|
79
|
+
}
|
|
80
|
+
getPosition() {
|
|
81
|
+
return this.getAttribute("position") || "top";
|
|
82
|
+
}
|
|
83
|
+
render() {
|
|
84
|
+
this.setAttribute("role", "tablist"), !this.hasAttribute("aria-label") && !this.hasAttribute("aria-labelledby") && this.setAttribute("aria-label", "Tabs"), this.setAttribute("aria-orientation", this.getPosition() === "top" ? "horizontal" : "vertical");
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
customElements.get("mint-tab-list") || e("mint-tab-list", n);
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/components/tabs/TabContent.ts
|
|
90
|
+
var r = class extends HTMLElement {
|
|
91
|
+
static get observedAttributes() {
|
|
92
|
+
return ["id"];
|
|
93
|
+
}
|
|
94
|
+
constructor() {
|
|
95
|
+
super();
|
|
96
|
+
}
|
|
97
|
+
connectedCallback() {
|
|
98
|
+
this.render(), this.checkInitialVisibility();
|
|
99
|
+
}
|
|
100
|
+
attributeChangedCallback(e, t, n) {
|
|
101
|
+
t !== n && e === "id" && (this.render(), this.checkInitialVisibility());
|
|
102
|
+
}
|
|
103
|
+
getId() {
|
|
104
|
+
return this.getAttribute("id") || "";
|
|
105
|
+
}
|
|
106
|
+
show() {
|
|
107
|
+
this.removeAttribute("hidden");
|
|
108
|
+
}
|
|
109
|
+
hide() {
|
|
110
|
+
this.setAttribute("hidden", "");
|
|
111
|
+
}
|
|
112
|
+
checkInitialVisibility() {
|
|
113
|
+
let e = this.closest("mint-tabs");
|
|
114
|
+
if (!e) {
|
|
115
|
+
this.hide();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
let t = e.querySelectorAll("mint-tab"), n = !1;
|
|
119
|
+
t.forEach((e) => {
|
|
120
|
+
let t = e.getAttribute("active"), r = e.getAttribute("target"), i = this.getId();
|
|
121
|
+
t === "true" && r === i && (n = !0);
|
|
122
|
+
}), !n && t.length > 0 && t[0].getAttribute("target") === this.getId() && !e.querySelector("mint-tab[active=\"true\"]") && (n = !0), n ? this.show() : this.hide();
|
|
123
|
+
}
|
|
124
|
+
render() {
|
|
125
|
+
this.setAttribute("role", "tabpanel"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0");
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
customElements.get("mint-tab-content") || e("mint-tab-content", r);
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/components/tabs/Tabs.ts
|
|
131
|
+
var i = class e extends HTMLElement {
|
|
132
|
+
static {
|
|
133
|
+
this._id = 0;
|
|
134
|
+
}
|
|
135
|
+
constructor() {
|
|
136
|
+
super(), this._tabClickHandler = null, this._tabKeydownHandler = null, this._mutationObserver = null;
|
|
137
|
+
}
|
|
138
|
+
connectedCallback() {
|
|
139
|
+
this.render(), this.setupEventListeners(), this.setupMutationObserver(), this.initializeActiveTab();
|
|
140
|
+
}
|
|
141
|
+
disconnectedCallback() {
|
|
142
|
+
this.removeEventListeners(), this._mutationObserver &&= (this._mutationObserver.disconnect(), null);
|
|
143
|
+
}
|
|
144
|
+
render() {
|
|
145
|
+
let e = this.querySelector("mint-tab-list");
|
|
146
|
+
if (this.querySelectorAll("mint-tab-content"), !e) {
|
|
147
|
+
console.warn("mint-tabs: mint-tab-list is required");
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
this.syncAccessibility();
|
|
151
|
+
}
|
|
152
|
+
initializeActiveTab() {
|
|
153
|
+
requestAnimationFrame(() => {
|
|
154
|
+
let e = this.querySelectorAll("mint-tab"), t = null;
|
|
155
|
+
if (e.forEach((e) => {
|
|
156
|
+
e.getAttribute("active") === "true" && (t = e);
|
|
157
|
+
}), !t && e.length > 0 && (t = e[0], t.setAttribute("active", "true")), t) {
|
|
158
|
+
let e = t.getAttribute("target");
|
|
159
|
+
e ? this.showContent(e) : this.hideAllContent();
|
|
160
|
+
} else this.hideAllContent();
|
|
161
|
+
this.syncAccessibility(), this.querySelectorAll("mint-tab-content").forEach((e) => {
|
|
162
|
+
let t = e;
|
|
163
|
+
t.checkInitialVisibility && t.checkInitialVisibility();
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
hideAllContent() {
|
|
168
|
+
this.querySelectorAll("mint-tab-content").forEach((e) => {
|
|
169
|
+
let t = e;
|
|
170
|
+
t.hide ? t.hide() : e.style.display = "none";
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
showContent(e) {
|
|
174
|
+
this.querySelectorAll("mint-tab-content").forEach((e) => {
|
|
175
|
+
let t = e;
|
|
176
|
+
t.hide ? t.hide() : e.style.display = "none";
|
|
177
|
+
});
|
|
178
|
+
let t = this.querySelector(`mint-tab-content[id="${e}"]`);
|
|
179
|
+
t && (t.show ? t.show() : t.style.display = "block");
|
|
180
|
+
}
|
|
181
|
+
setupEventListeners() {
|
|
182
|
+
this._tabClickHandler || (this._tabClickHandler = this.handleTabClick.bind(this), this.addEventListener("tab-click", this._tabClickHandler)), this._tabKeydownHandler || (this._tabKeydownHandler = (e) => {
|
|
183
|
+
let t = e.target?.closest("mint-tab"), n = t?.closest("mint-tab-list");
|
|
184
|
+
if (!t || !n) return;
|
|
185
|
+
let r = Array.from(n.querySelectorAll("mint-tab:not([disabled=\"true\"])")), i = r.indexOf(t);
|
|
186
|
+
if (i < 0 || r.length === 0) return;
|
|
187
|
+
let a = n.getAttribute("position") === "left" || n.getAttribute("position") === "right", o = i;
|
|
188
|
+
if (e.key === (a ? "ArrowDown" : "ArrowRight")) o = (i + 1) % r.length;
|
|
189
|
+
else if (e.key === (a ? "ArrowUp" : "ArrowLeft")) o = (i - 1 + r.length) % r.length;
|
|
190
|
+
else if (e.key === "Home") o = 0;
|
|
191
|
+
else if (e.key === "End") o = r.length - 1;
|
|
192
|
+
else return;
|
|
193
|
+
e.preventDefault();
|
|
194
|
+
let s = r[o];
|
|
195
|
+
s.focus(), this.activateTab(s);
|
|
196
|
+
}, this.addEventListener("keydown", this._tabKeydownHandler));
|
|
197
|
+
}
|
|
198
|
+
removeEventListeners() {
|
|
199
|
+
this._tabClickHandler &&= (this.removeEventListener("tab-click", this._tabClickHandler), null), this._tabKeydownHandler &&= (this.removeEventListener("keydown", this._tabKeydownHandler), null);
|
|
200
|
+
}
|
|
201
|
+
setupMutationObserver() {
|
|
202
|
+
this._mutationObserver = new MutationObserver(() => {
|
|
203
|
+
this.render();
|
|
204
|
+
});
|
|
205
|
+
let e = this.querySelector("mint-tab-list");
|
|
206
|
+
e && this._mutationObserver.observe(e, {
|
|
207
|
+
attributes: !0,
|
|
208
|
+
attributeFilter: ["position"]
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
handleTabClick(e) {
|
|
212
|
+
let t = e.detail?.tab;
|
|
213
|
+
t && this.activateTab(t);
|
|
214
|
+
}
|
|
215
|
+
activateTab(e) {
|
|
216
|
+
let t = e.getAttribute("target"), n = e.closest("mint-tab-list");
|
|
217
|
+
n && (n.querySelectorAll("mint-tab").forEach((t) => {
|
|
218
|
+
let n = t;
|
|
219
|
+
t === e ? n.active = !0 : n.active = !1;
|
|
220
|
+
}), t && this.showContent(t), this.syncAccessibility());
|
|
221
|
+
}
|
|
222
|
+
syncAccessibility() {
|
|
223
|
+
this.id ||= (e._id += 1, `mint-tabs-${e._id}`), Array.from(this.querySelectorAll("mint-tab-list")).forEach((e, t) => {
|
|
224
|
+
e.setAttribute("role", "tablist"), e.setAttribute("aria-orientation", e.getAttribute("position") === "left" || e.getAttribute("position") === "right" ? "vertical" : "horizontal"), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && e.setAttribute("aria-label", "Tabs"), Array.from(e.querySelectorAll("mint-tab")).forEach((e, n) => {
|
|
225
|
+
let r = e.id || `${this.id}-tab-${t + 1}-${n + 1}`;
|
|
226
|
+
e.id = r, e.setAttribute("role", "tab");
|
|
227
|
+
let i = e.getAttribute("active") === "true";
|
|
228
|
+
e.setAttribute("aria-selected", String(i)), e.setAttribute("aria-disabled", String(e.getAttribute("disabled") === "true")), e.tabIndex = i ? 0 : -1;
|
|
229
|
+
let a = e.getAttribute("target");
|
|
230
|
+
a ? e.setAttribute("aria-controls", a) : e.removeAttribute("aria-controls");
|
|
231
|
+
let o = a ? Array.from(this.querySelectorAll("mint-tab-content")).find((e) => e.id === a) ?? null : null;
|
|
232
|
+
o && (o.setAttribute("role", "tabpanel"), o.setAttribute("aria-labelledby", r), o.hasAttribute("tabindex") || (o.tabIndex = 0));
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
customElements.get("mint-tabs") || e("mint-tabs", i);
|
|
238
|
+
//#endregion
|
|
239
|
+
export { t as Tab, r as TabContent, n as TabList, i as Tabs };
|
|
@@ -1,82 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import '../icon/index';
|
|
3
|
-
import '../button/index';
|
|
4
|
-
import '../popover/index';
|
|
5
|
-
interface TagItem {
|
|
6
|
-
value: string;
|
|
7
|
-
label: string;
|
|
8
|
-
dismissable?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare class MintTags extends HTMLElement {
|
|
11
|
-
static get observedAttributes(): string[];
|
|
12
|
-
private _container;
|
|
13
|
-
private _chipsWrap;
|
|
14
|
-
private _input;
|
|
15
|
-
private _tags;
|
|
16
|
-
private _predefinedTags;
|
|
17
|
-
private _placeholder;
|
|
18
|
-
private _predefinedPopoverOpenListenersAttached;
|
|
19
|
-
private _predefinedBlurCloseTimer;
|
|
20
|
-
private _suppressNextPredefinedBlurClose;
|
|
21
|
-
private _dragIndex;
|
|
22
|
-
private _dragChip;
|
|
23
|
-
private _isPointerDragging;
|
|
24
|
-
private _pointerMoveHandler;
|
|
25
|
-
private _pointerUpHandler;
|
|
26
|
-
private _containerFocusRingListeners;
|
|
27
|
-
private _predefinedFieldResizeObserver;
|
|
28
|
-
private _predefinedPopoverBodyEl;
|
|
29
|
-
connectedCallback(): void;
|
|
30
|
-
disconnectedCallback(): void;
|
|
31
|
-
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
32
|
-
set tags(tags: TagItem[]);
|
|
33
|
-
get tags(): TagItem[];
|
|
34
|
-
private _parseAttrs;
|
|
35
|
-
private _parseTagItems;
|
|
36
|
-
private _syncAttr;
|
|
37
|
-
private getLabel;
|
|
38
|
-
private getInfo;
|
|
39
|
-
private hasError;
|
|
40
|
-
/** Focus ring: match focus-within when data-mint-tags-active is set (stable across inner control focus changes). */
|
|
41
|
-
private _containerRingClasses;
|
|
42
|
-
private _attachContainerFocusRingListeners;
|
|
43
|
-
private getErrorMessage;
|
|
44
|
-
private getName;
|
|
45
|
-
private getId;
|
|
46
|
-
private isRequired;
|
|
47
|
-
private isLoading;
|
|
48
|
-
private isPredefinedOnly;
|
|
49
|
-
private _render;
|
|
50
|
-
private _getAvailablePredefinedTags;
|
|
51
|
-
private _shouldShowInput;
|
|
52
|
-
private _disconnectPredefinedFieldResizeObserver;
|
|
53
|
-
private _syncPredefinedPopoverBodyMinWidth;
|
|
54
|
-
private _attachPredefinedFieldResizeObserver;
|
|
55
|
-
private _renderPredefinedPopover;
|
|
56
|
-
private _getPredefinedPopoverEl;
|
|
57
|
-
private _attachPredefinedPopoverOpenOnInputFocus;
|
|
58
|
-
private _renderSkeleton;
|
|
59
|
-
private _renderErrorState;
|
|
60
|
-
private _renderChips;
|
|
61
|
-
private _addFromInput;
|
|
62
|
-
private _addTag;
|
|
63
|
-
private _removeTag;
|
|
64
|
-
private _emitChange;
|
|
65
|
-
private _focusLastChip;
|
|
66
|
-
private _focusInput;
|
|
67
|
-
private _wireInputBackspace;
|
|
68
|
-
private _setupChipEvents;
|
|
69
|
-
private _onContainerPointerDown;
|
|
70
|
-
private _onDragStart;
|
|
71
|
-
private _reorderTags;
|
|
72
|
-
private _onDragOverInput;
|
|
73
|
-
private _onDragOverChip;
|
|
74
|
-
private _onDrop;
|
|
75
|
-
private _onDragEnd;
|
|
76
|
-
private _syncOrderFromDom;
|
|
77
|
-
private _onPointerDown;
|
|
78
|
-
private _onPointerMove;
|
|
79
|
-
private _onPointerUp;
|
|
80
|
-
}
|
|
81
|
-
export default MintTags;
|
|
82
|
-
//# sourceMappingURL=Tags.d.ts.map
|
|
1
|
+
export { MintTags as default, MintTags } from '../../mintui-elements'
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"file": "Tags.d.ts",
|
|
4
|
+
"sourceRoot": "",
|
|
5
|
+
"sources": [
|
|
6
|
+
"Tags.d.ts"
|
|
7
|
+
],
|
|
8
|
+
"names": [],
|
|
9
|
+
"mappings": "AAAA"
|
|
10
|
+
}
|