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,192 @@
|
|
|
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('button', '../../button.css')
|
|
15
|
+
__mintLoadStyle('spinner', '../../spinner.css')
|
|
16
|
+
__mintLoadStyle('icon', '../../icon.css')
|
|
17
|
+
__mintLoadStyle('text', '../../text.css')
|
|
18
|
+
__mintLoadStyle('stack', '../../stack.css')
|
|
19
|
+
__mintLoadStyle('off-canvas', '../../off-canvas.css')
|
|
20
|
+
import "../chunks/icon-gQAtsERy.js";
|
|
21
|
+
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
22
|
+
import "../chunks/text-BHkEs8U5.js";
|
|
23
|
+
import "../chunks/button-B0Yt0MX1.js";
|
|
24
|
+
import "../chunks/stack-DyQfjPDh.js";
|
|
25
|
+
//#region src/components/off-canvas/OffCanvas.ts
|
|
26
|
+
var t = class extends HTMLElement {
|
|
27
|
+
static get observedAttributes() {
|
|
28
|
+
return [
|
|
29
|
+
"id",
|
|
30
|
+
"heading",
|
|
31
|
+
"open",
|
|
32
|
+
"position",
|
|
33
|
+
"full-page",
|
|
34
|
+
"width",
|
|
35
|
+
"height"
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
constructor() {
|
|
39
|
+
super(), this._overlay = null, this._offCanvas = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._contentObserver = null, this._renderFrame = null, this._exitTimer = null, this._previousFocus = null, this._dialogWasOpen = !1, this._dialogKeydownHandler = null;
|
|
40
|
+
}
|
|
41
|
+
connectedCallback() {
|
|
42
|
+
this.classList.add("mint-off-canvas-host"), this.isOpen() || this.classList.add("mint-off-canvas-hidden"), this.render(), this._observeContentMutations(), this._dialogKeydownHandler = (e) => {
|
|
43
|
+
if (!this.isOpen()) return;
|
|
44
|
+
if (e.key === "Escape") {
|
|
45
|
+
e.preventDefault(), e.stopPropagation(), this.close();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (e.key !== "Tab") return;
|
|
49
|
+
let t = this._offCanvas?.querySelector(".mint-off-canvas-panel");
|
|
50
|
+
if (!t) return;
|
|
51
|
+
let n = this._getDialogFocusableElements(t);
|
|
52
|
+
if (!n.length) {
|
|
53
|
+
e.preventDefault(), t.focus();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
let r = n[0], i = n[n.length - 1], a = document.activeElement;
|
|
57
|
+
e.shiftKey && (a === r || !t.contains(a)) ? (e.preventDefault(), i.focus()) : !e.shiftKey && (a === i || !t.contains(a)) && (e.preventDefault(), r.focus());
|
|
58
|
+
}, document.addEventListener("keydown", this._dialogKeydownHandler, !0);
|
|
59
|
+
}
|
|
60
|
+
disconnectedCallback() {
|
|
61
|
+
this._dialogKeydownHandler &&= (document.removeEventListener("keydown", this._dialogKeydownHandler, !0), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null), this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null);
|
|
62
|
+
}
|
|
63
|
+
attributeChangedCallback(e, t, n) {
|
|
64
|
+
t !== n && this.isConnected && this.render();
|
|
65
|
+
}
|
|
66
|
+
_scheduleRender() {
|
|
67
|
+
this._renderFrame === null && (this._renderFrame = requestAnimationFrame(() => {
|
|
68
|
+
this._renderFrame = null, this.render();
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
getId() {
|
|
72
|
+
return this.getAttribute("id") || "";
|
|
73
|
+
}
|
|
74
|
+
getHeading() {
|
|
75
|
+
return this.getAttribute("heading") || "";
|
|
76
|
+
}
|
|
77
|
+
getPosition() {
|
|
78
|
+
let e = this.getAttribute("position")?.toLowerCase();
|
|
79
|
+
return e === "top" || e === "bottom" || e === "left" || e === "right" ? e : "right";
|
|
80
|
+
}
|
|
81
|
+
isFullPage() {
|
|
82
|
+
return this.getAttribute("full-page") === "true";
|
|
83
|
+
}
|
|
84
|
+
getWidth() {
|
|
85
|
+
return this.getAttribute("width") || "320px";
|
|
86
|
+
}
|
|
87
|
+
getHeight() {
|
|
88
|
+
return this.getAttribute("height") || "";
|
|
89
|
+
}
|
|
90
|
+
_normalizeCssValue(e) {
|
|
91
|
+
return /^\d+(\.\d+)?$/.test(e.trim()) ? `${e.trim()}px` : e.trim();
|
|
92
|
+
}
|
|
93
|
+
isOpen() {
|
|
94
|
+
return this.getAttribute("open") === "true";
|
|
95
|
+
}
|
|
96
|
+
open() {
|
|
97
|
+
this.setAttribute("open", "true");
|
|
98
|
+
}
|
|
99
|
+
close() {
|
|
100
|
+
this.removeAttribute("open");
|
|
101
|
+
}
|
|
102
|
+
render() {
|
|
103
|
+
let e = this.getId(), t = this.getHeading(), n = this.isOpen(), r = this.getPosition(), i = this.isFullPage(), a = this.getHeight();
|
|
104
|
+
e && (this.id = e), this._overlay || (this._overlay = document.createElement("div"), this._overlay.className = "mint-off-canvas-overlay", this._overlay.setAttribute("aria-hidden", "true"), this._overlay.addEventListener("click", () => this.close()), this.appendChild(this._overlay)), this._offCanvas || (this._offCanvas = document.createElement("div"), this.appendChild(this._offCanvas)), this._offCanvas.className = "mint-off-canvas-shell", this._offCanvas.dataset.position = r, this._offCanvas.dataset.fullPage = String(i);
|
|
105
|
+
let o = this._offCanvas.querySelector(".mint-off-canvas-panel");
|
|
106
|
+
o || (o = document.createElement("div"), o.className = "mint-off-canvas-panel", o.style.transform = this._getTransformValue(r, !1), this._offCanvas.appendChild(o)), o.setAttribute("role", "dialog"), o.setAttribute("aria-modal", "true"), o.hasAttribute("tabindex") || (o.tabIndex = -1), n ? this._animateEnter() : this._animateExit(), o.style.removeProperty("--off-canvas-width"), o.style.removeProperty("--off-canvas-height"), r === "top" || r === "bottom" ? a && o.style.setProperty("--off-canvas-height", this._normalizeCssValue(a)) : o.style.setProperty("--off-canvas-width", this._normalizeCssValue(this.getWidth())), this._header || (this._header = document.createElement("div"), this._header.className = "mint-off-canvas-header", o.appendChild(this._header)), this._headingSlot || (this._headingSlot = document.createElement("div"), this._headingSlot.className = "mint-off-canvas-heading", this._headingSlot.setAttribute("slot", "heading"), this._header.appendChild(this._headingSlot));
|
|
107
|
+
let s = this._headingSlot.querySelector("mint-text");
|
|
108
|
+
if (t ? (s || (s = document.createElement("mint-text"), s.setAttribute("size", "sub-heading"), s.setAttribute("bold", "true"), this._headingSlot.appendChild(s)), s.textContent = t, s.id = `${e || "mint-off-canvas"}-heading`, o.setAttribute("aria-labelledby", s.id), o.removeAttribute("aria-label")) : s && s.remove(), !t) {
|
|
109
|
+
let e = this.getAttribute("aria-label")?.trim();
|
|
110
|
+
e ? o.setAttribute("aria-label", e) : o.hasAttribute("aria-label") || o.setAttribute("aria-label", "Dialog");
|
|
111
|
+
}
|
|
112
|
+
Array.from(this.children).filter((e) => e !== this._overlay && e !== this._offCanvas && e !== this._headingSlot && e.getAttribute("slot") === "heading").forEach((e) => {
|
|
113
|
+
this._headingSlot && e.parentElement !== this._headingSlot && this._headingSlot.appendChild(e);
|
|
114
|
+
}), this._closeButton || (this._closeButton = document.createElement("mint-button"), this._closeButton.setAttribute("variant", "ghost"), this._closeButton.setAttribute("icon", "close"), this._closeButton.setAttribute("aria-label", "Close panel"), this._closeButton.addEventListener("click", () => this.close()), this._header.appendChild(this._closeButton)), this._bodySlot || (this._bodySlot = document.createElement("div"), this._bodySlot.className = "mint-off-canvas-body", this._bodySlot.setAttribute("slot", "body"), o.appendChild(this._bodySlot)), Array.from(this.children).filter((e) => e !== this._overlay && e !== this._offCanvas && e !== this._bodySlot && e.getAttribute("slot") === "body").forEach((e) => {
|
|
115
|
+
this._bodySlot && e.parentElement !== this._bodySlot && this._bodySlot.appendChild(e);
|
|
116
|
+
}), this._actionsSlot || (this._actionsSlot = document.createElement("div"), this._actionsSlot.className = "mint-off-canvas-actions", this._actionsSlot.setAttribute("slot", "actions"), o.appendChild(this._actionsSlot));
|
|
117
|
+
let c = this._actionsSlot.querySelector("mint-stack");
|
|
118
|
+
c || (c = document.createElement("mint-stack"), c.setAttribute("direction", "horizontal"), c.className = "mint-off-canvas-actions-stack", this._actionsSlot.appendChild(c)), Array.from(this.children).filter((e) => e !== this._overlay && e !== this._offCanvas && e !== this._actionsSlot && e.getAttribute("slot") === "actions").forEach((e) => {
|
|
119
|
+
Array.from(e.children).forEach((e) => {
|
|
120
|
+
e.parentElement !== c && c.appendChild(e);
|
|
121
|
+
}), e.parentElement && e.remove();
|
|
122
|
+
}), Array.from(this.children).forEach((e) => {
|
|
123
|
+
e !== this._overlay && e !== this._offCanvas && e.getAttribute("slot") !== "heading" && e.getAttribute("slot") !== "body" && e.getAttribute("slot") !== "actions" && e !== this._headingSlot && e !== this._bodySlot && e !== this._actionsSlot && e.parentElement !== this._bodySlot && this._bodySlot.appendChild(e);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
_getTransformValue(e, t) {
|
|
127
|
+
if (t) switch (e) {
|
|
128
|
+
case "top": return "translateY(0)";
|
|
129
|
+
case "bottom": return "translateY(0)";
|
|
130
|
+
case "left": return "translateX(0)";
|
|
131
|
+
case "right": return "translateX(0)";
|
|
132
|
+
default: return "translateX(0)";
|
|
133
|
+
}
|
|
134
|
+
else switch (e) {
|
|
135
|
+
case "top": return "translateY(-100%)";
|
|
136
|
+
case "bottom": return "translateY(100%)";
|
|
137
|
+
case "left": return "translateX(-100%)";
|
|
138
|
+
case "right": return "translateX(100%)";
|
|
139
|
+
default: return "translateX(100%)";
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
_observeContentMutations() {
|
|
143
|
+
this._contentObserver ||= new MutationObserver(() => {
|
|
144
|
+
this._scheduleRender();
|
|
145
|
+
}), this._contentObserver.disconnect(), this._contentObserver.observe(this, {
|
|
146
|
+
childList: !0,
|
|
147
|
+
attributes: !0,
|
|
148
|
+
attributeFilter: ["slot"]
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
_getDialogFocusableElements(e) {
|
|
152
|
+
return Array.from(e.querySelectorAll("button:not([disabled]), [href], input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])")).filter((e) => {
|
|
153
|
+
if (e.closest("[hidden], [aria-hidden=\"true\"]")) return !1;
|
|
154
|
+
let t = window.getComputedStyle(e);
|
|
155
|
+
return t.display !== "none" && t.visibility !== "hidden";
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
_animateEnter() {
|
|
159
|
+
let e = this._offCanvas?.querySelector(".mint-off-canvas-panel");
|
|
160
|
+
if (!e) return;
|
|
161
|
+
this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null);
|
|
162
|
+
let t = this.getPosition(), n = !this._dialogWasOpen;
|
|
163
|
+
if (n) {
|
|
164
|
+
this._dialogWasOpen = !0;
|
|
165
|
+
let e = document.activeElement;
|
|
166
|
+
this._previousFocus = e instanceof HTMLElement && e !== document.body ? e : null;
|
|
167
|
+
}
|
|
168
|
+
e.style.transform = this._getTransformValue(t, !1), e.style.transition = "transform 300ms ease-out", this.classList.remove("mint-off-canvas-hidden"), requestAnimationFrame(() => {
|
|
169
|
+
requestAnimationFrame(() => {
|
|
170
|
+
this.isOpen() && (this.classList.add("mint-off-canvas-open"), e.style.transform = this._getTransformValue(t, !0), n && (this._getDialogFocusableElements(e)[0] ?? e).focus());
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
_animateExit() {
|
|
175
|
+
this.classList.remove("mint-off-canvas-open");
|
|
176
|
+
let e = this._offCanvas?.querySelector(".mint-off-canvas-panel");
|
|
177
|
+
if (!e) {
|
|
178
|
+
this.classList.add("mint-off-canvas-hidden"), this._dialogWasOpen = !1;
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
let t = this.getPosition();
|
|
182
|
+
e.style.transition = "transform 300ms ease-in", e.style.transform = this._getTransformValue(t, !1), this._exitTimer !== null && clearTimeout(this._exitTimer), this._exitTimer = window.setTimeout(() => {
|
|
183
|
+
if (this._exitTimer = null, this.isOpen()) return;
|
|
184
|
+
this.classList.add("mint-off-canvas-hidden"), e.style.transform = "", e.style.transition = "";
|
|
185
|
+
let t = this._previousFocus;
|
|
186
|
+
this._previousFocus = null, t?.isConnected && t.focus();
|
|
187
|
+
}, 300);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
customElements.get("mint-off-canvas") || e("mint-off-canvas", t);
|
|
191
|
+
//#endregion
|
|
192
|
+
export { t as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../chunks/icon-dG8sLTBn.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/text-BmHZbBMo.js`),require(`../chunks/button-BlbLHMts.js`),require(`../chunks/stack-D1uh4L79.js`);var t=class extends HTMLElement{static get observedAttributes(){return[`id`,`heading`,`open`,`position`,`full-page`,`width`,`height`]}constructor(){super(),this._overlay=null,this._offCanvas=null,this._header=null,this._headingSlot=null,this._bodySlot=null,this._actionsSlot=null,this._closeButton=null,this._contentObserver=null,this._renderFrame=null,this._exitTimer=null,this._previousFocus=null,this._dialogWasOpen=!1,this._dialogKeydownHandler=null}connectedCallback(){this.classList.add(`mint-off-canvas-host`),this.isOpen()||this.classList.add(`mint-off-canvas-hidden`),this.render(),this._observeContentMutations(),this._dialogKeydownHandler=e=>{if(!this.isOpen())return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this.close();return}if(e.key!==`Tab`)return;let t=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!t)return;let n=this._getDialogFocusableElements(t);if(!n.length){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1],a=document.activeElement;e.shiftKey&&(a===r||!t.contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&(a===i||!t.contains(a))&&(e.preventDefault(),r.focus())},document.addEventListener(`keydown`,this._dialogKeydownHandler,!0)}disconnectedCallback(){this._dialogKeydownHandler&&=(document.removeEventListener(`keydown`,this._dialogKeydownHandler,!0),null),this._contentObserver&&=(this._contentObserver.disconnect(),null),this._renderFrame!==null&&(cancelAnimationFrame(this._renderFrame),this._renderFrame=null),this._exitTimer!==null&&(clearTimeout(this._exitTimer),this._exitTimer=null)}attributeChangedCallback(e,t,n){t!==n&&this.isConnected&&this.render()}_scheduleRender(){this._renderFrame===null&&(this._renderFrame=requestAnimationFrame(()=>{this._renderFrame=null,this.render()}))}getId(){return this.getAttribute(`id`)||``}getHeading(){return this.getAttribute(`heading`)||``}getPosition(){let e=this.getAttribute(`position`)?.toLowerCase();return e===`top`||e===`bottom`||e===`left`||e===`right`?e:`right`}isFullPage(){return this.getAttribute(`full-page`)===`true`}getWidth(){return this.getAttribute(`width`)||`320px`}getHeight(){return this.getAttribute(`height`)||``}_normalizeCssValue(e){return/^\d+(\.\d+)?$/.test(e.trim())?`${e.trim()}px`:e.trim()}isOpen(){return this.getAttribute(`open`)===`true`}open(){this.setAttribute(`open`,`true`)}close(){this.removeAttribute(`open`)}render(){let e=this.getId(),t=this.getHeading(),n=this.isOpen(),r=this.getPosition(),i=this.isFullPage(),a=this.getHeight();e&&(this.id=e),this._overlay||(this._overlay=document.createElement(`div`),this._overlay.className=`mint-off-canvas-overlay`,this._overlay.setAttribute(`aria-hidden`,`true`),this._overlay.addEventListener(`click`,()=>this.close()),this.appendChild(this._overlay)),this._offCanvas||(this._offCanvas=document.createElement(`div`),this.appendChild(this._offCanvas)),this._offCanvas.className=`mint-off-canvas-shell`,this._offCanvas.dataset.position=r,this._offCanvas.dataset.fullPage=String(i);let o=this._offCanvas.querySelector(`.mint-off-canvas-panel`);o||(o=document.createElement(`div`),o.className=`mint-off-canvas-panel`,o.style.transform=this._getTransformValue(r,!1),this._offCanvas.appendChild(o)),o.setAttribute(`role`,`dialog`),o.setAttribute(`aria-modal`,`true`),o.hasAttribute(`tabindex`)||(o.tabIndex=-1),n?this._animateEnter():this._animateExit(),o.style.removeProperty(`--off-canvas-width`),o.style.removeProperty(`--off-canvas-height`),r===`top`||r===`bottom`?a&&o.style.setProperty(`--off-canvas-height`,this._normalizeCssValue(a)):o.style.setProperty(`--off-canvas-width`,this._normalizeCssValue(this.getWidth())),this._header||(this._header=document.createElement(`div`),this._header.className=`mint-off-canvas-header`,o.appendChild(this._header)),this._headingSlot||(this._headingSlot=document.createElement(`div`),this._headingSlot.className=`mint-off-canvas-heading`,this._headingSlot.setAttribute(`slot`,`heading`),this._header.appendChild(this._headingSlot));let s=this._headingSlot.querySelector(`mint-text`);if(t?(s||(s=document.createElement(`mint-text`),s.setAttribute(`size`,`sub-heading`),s.setAttribute(`bold`,`true`),this._headingSlot.appendChild(s)),s.textContent=t,s.id=`${e||`mint-off-canvas`}-heading`,o.setAttribute(`aria-labelledby`,s.id),o.removeAttribute(`aria-label`)):s&&s.remove(),!t){let e=this.getAttribute(`aria-label`)?.trim();e?o.setAttribute(`aria-label`,e):o.hasAttribute(`aria-label`)||o.setAttribute(`aria-label`,`Dialog`)}Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._headingSlot&&e.getAttribute(`slot`)===`heading`).forEach(e=>{this._headingSlot&&e.parentElement!==this._headingSlot&&this._headingSlot.appendChild(e)}),this._closeButton||(this._closeButton=document.createElement(`mint-button`),this._closeButton.setAttribute(`variant`,`ghost`),this._closeButton.setAttribute(`icon`,`close`),this._closeButton.setAttribute(`aria-label`,`Close panel`),this._closeButton.addEventListener(`click`,()=>this.close()),this._header.appendChild(this._closeButton)),this._bodySlot||(this._bodySlot=document.createElement(`div`),this._bodySlot.className=`mint-off-canvas-body`,this._bodySlot.setAttribute(`slot`,`body`),o.appendChild(this._bodySlot)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._bodySlot&&e.getAttribute(`slot`)===`body`).forEach(e=>{this._bodySlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)}),this._actionsSlot||(this._actionsSlot=document.createElement(`div`),this._actionsSlot.className=`mint-off-canvas-actions`,this._actionsSlot.setAttribute(`slot`,`actions`),o.appendChild(this._actionsSlot));let c=this._actionsSlot.querySelector(`mint-stack`);c||(c=document.createElement(`mint-stack`),c.setAttribute(`direction`,`horizontal`),c.className=`mint-off-canvas-actions-stack`,this._actionsSlot.appendChild(c)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._actionsSlot&&e.getAttribute(`slot`)===`actions`).forEach(e=>{Array.from(e.children).forEach(e=>{e.parentElement!==c&&c.appendChild(e)}),e.parentElement&&e.remove()}),Array.from(this.children).forEach(e=>{e!==this._overlay&&e!==this._offCanvas&&e.getAttribute(`slot`)!==`heading`&&e.getAttribute(`slot`)!==`body`&&e.getAttribute(`slot`)!==`actions`&&e!==this._headingSlot&&e!==this._bodySlot&&e!==this._actionsSlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)})}_getTransformValue(e,t){if(t)switch(e){case`top`:return`translateY(0)`;case`bottom`:return`translateY(0)`;case`left`:return`translateX(0)`;case`right`:return`translateX(0)`;default:return`translateX(0)`}else switch(e){case`top`:return`translateY(-100%)`;case`bottom`:return`translateY(100%)`;case`left`:return`translateX(-100%)`;case`right`:return`translateX(100%)`;default:return`translateX(100%)`}}_observeContentMutations(){this._contentObserver||=new MutationObserver(()=>{this._scheduleRender()}),this._contentObserver.disconnect(),this._contentObserver.observe(this,{childList:!0,attributes:!0,attributeFilter:[`slot`]})}_getDialogFocusableElements(e){return Array.from(e.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>{if(e.closest(`[hidden], [aria-hidden="true"]`))return!1;let t=window.getComputedStyle(e);return t.display!==`none`&&t.visibility!==`hidden`})}_animateEnter(){let e=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!e)return;this._exitTimer!==null&&(clearTimeout(this._exitTimer),this._exitTimer=null);let t=this.getPosition(),n=!this._dialogWasOpen;if(n){this._dialogWasOpen=!0;let e=document.activeElement;this._previousFocus=e instanceof HTMLElement&&e!==document.body?e:null}e.style.transform=this._getTransformValue(t,!1),e.style.transition=`transform 300ms ease-out`,this.classList.remove(`mint-off-canvas-hidden`),requestAnimationFrame(()=>{requestAnimationFrame(()=>{this.isOpen()&&(this.classList.add(`mint-off-canvas-open`),e.style.transform=this._getTransformValue(t,!0),n&&(this._getDialogFocusableElements(e)[0]??e).focus())})})}_animateExit(){this.classList.remove(`mint-off-canvas-open`);let e=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!e){this.classList.add(`mint-off-canvas-hidden`),this._dialogWasOpen=!1;return}let t=this.getPosition();e.style.transition=`transform 300ms ease-in`,e.style.transform=this._getTransformValue(t,!1),this._exitTimer!==null&&clearTimeout(this._exitTimer),this._exitTimer=window.setTimeout(()=>{if(this._exitTimer=null,this.isOpen())return;this.classList.add(`mint-off-canvas-hidden`),e.style.transform=``,e.style.transition=``;let t=this._previousFocus;this._previousFocus=null,t?.isConnected&&t.focus()},300)}};customElements.get(`mint-off-canvas`)||e.t(`mint-off-canvas`,t),module.exports=t;
|
|
@@ -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,180 @@
|
|
|
1
|
+
import '../../theme.css'
|
|
2
|
+
import '../../button.css'
|
|
3
|
+
import '../../spinner.css'
|
|
4
|
+
import '../../icon.css'
|
|
5
|
+
import '../../text.css'
|
|
6
|
+
import '../../stack.css'
|
|
7
|
+
import '../../off-canvas.css'
|
|
8
|
+
import "../chunks/icon-gQAtsERy.js";
|
|
9
|
+
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
10
|
+
import "../chunks/text-BHkEs8U5.js";
|
|
11
|
+
import "../chunks/button-B0Yt0MX1.js";
|
|
12
|
+
import "../chunks/stack-DyQfjPDh.js";
|
|
13
|
+
//#region src/components/off-canvas/OffCanvas.ts
|
|
14
|
+
var t = class extends HTMLElement {
|
|
15
|
+
static get observedAttributes() {
|
|
16
|
+
return [
|
|
17
|
+
"id",
|
|
18
|
+
"heading",
|
|
19
|
+
"open",
|
|
20
|
+
"position",
|
|
21
|
+
"full-page",
|
|
22
|
+
"width",
|
|
23
|
+
"height"
|
|
24
|
+
];
|
|
25
|
+
}
|
|
26
|
+
constructor() {
|
|
27
|
+
super(), this._overlay = null, this._offCanvas = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._contentObserver = null, this._renderFrame = null, this._exitTimer = null, this._previousFocus = null, this._dialogWasOpen = !1, this._dialogKeydownHandler = null;
|
|
28
|
+
}
|
|
29
|
+
connectedCallback() {
|
|
30
|
+
this.classList.add("mint-off-canvas-host"), this.isOpen() || this.classList.add("mint-off-canvas-hidden"), this.render(), this._observeContentMutations(), this._dialogKeydownHandler = (e) => {
|
|
31
|
+
if (!this.isOpen()) return;
|
|
32
|
+
if (e.key === "Escape") {
|
|
33
|
+
e.preventDefault(), e.stopPropagation(), this.close();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (e.key !== "Tab") return;
|
|
37
|
+
let t = this._offCanvas?.querySelector(".mint-off-canvas-panel");
|
|
38
|
+
if (!t) return;
|
|
39
|
+
let n = this._getDialogFocusableElements(t);
|
|
40
|
+
if (!n.length) {
|
|
41
|
+
e.preventDefault(), t.focus();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
let r = n[0], i = n[n.length - 1], a = document.activeElement;
|
|
45
|
+
e.shiftKey && (a === r || !t.contains(a)) ? (e.preventDefault(), i.focus()) : !e.shiftKey && (a === i || !t.contains(a)) && (e.preventDefault(), r.focus());
|
|
46
|
+
}, document.addEventListener("keydown", this._dialogKeydownHandler, !0);
|
|
47
|
+
}
|
|
48
|
+
disconnectedCallback() {
|
|
49
|
+
this._dialogKeydownHandler &&= (document.removeEventListener("keydown", this._dialogKeydownHandler, !0), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null), this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null);
|
|
50
|
+
}
|
|
51
|
+
attributeChangedCallback(e, t, n) {
|
|
52
|
+
t !== n && this.isConnected && this.render();
|
|
53
|
+
}
|
|
54
|
+
_scheduleRender() {
|
|
55
|
+
this._renderFrame === null && (this._renderFrame = requestAnimationFrame(() => {
|
|
56
|
+
this._renderFrame = null, this.render();
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
getId() {
|
|
60
|
+
return this.getAttribute("id") || "";
|
|
61
|
+
}
|
|
62
|
+
getHeading() {
|
|
63
|
+
return this.getAttribute("heading") || "";
|
|
64
|
+
}
|
|
65
|
+
getPosition() {
|
|
66
|
+
let e = this.getAttribute("position")?.toLowerCase();
|
|
67
|
+
return e === "top" || e === "bottom" || e === "left" || e === "right" ? e : "right";
|
|
68
|
+
}
|
|
69
|
+
isFullPage() {
|
|
70
|
+
return this.getAttribute("full-page") === "true";
|
|
71
|
+
}
|
|
72
|
+
getWidth() {
|
|
73
|
+
return this.getAttribute("width") || "320px";
|
|
74
|
+
}
|
|
75
|
+
getHeight() {
|
|
76
|
+
return this.getAttribute("height") || "";
|
|
77
|
+
}
|
|
78
|
+
_normalizeCssValue(e) {
|
|
79
|
+
return /^\d+(\.\d+)?$/.test(e.trim()) ? `${e.trim()}px` : e.trim();
|
|
80
|
+
}
|
|
81
|
+
isOpen() {
|
|
82
|
+
return this.getAttribute("open") === "true";
|
|
83
|
+
}
|
|
84
|
+
open() {
|
|
85
|
+
this.setAttribute("open", "true");
|
|
86
|
+
}
|
|
87
|
+
close() {
|
|
88
|
+
this.removeAttribute("open");
|
|
89
|
+
}
|
|
90
|
+
render() {
|
|
91
|
+
let e = this.getId(), t = this.getHeading(), n = this.isOpen(), r = this.getPosition(), i = this.isFullPage(), a = this.getHeight();
|
|
92
|
+
e && (this.id = e), this._overlay || (this._overlay = document.createElement("div"), this._overlay.className = "mint-off-canvas-overlay", this._overlay.setAttribute("aria-hidden", "true"), this._overlay.addEventListener("click", () => this.close()), this.appendChild(this._overlay)), this._offCanvas || (this._offCanvas = document.createElement("div"), this.appendChild(this._offCanvas)), this._offCanvas.className = "mint-off-canvas-shell", this._offCanvas.dataset.position = r, this._offCanvas.dataset.fullPage = String(i);
|
|
93
|
+
let o = this._offCanvas.querySelector(".mint-off-canvas-panel");
|
|
94
|
+
o || (o = document.createElement("div"), o.className = "mint-off-canvas-panel", o.style.transform = this._getTransformValue(r, !1), this._offCanvas.appendChild(o)), o.setAttribute("role", "dialog"), o.setAttribute("aria-modal", "true"), o.hasAttribute("tabindex") || (o.tabIndex = -1), n ? this._animateEnter() : this._animateExit(), o.style.removeProperty("--off-canvas-width"), o.style.removeProperty("--off-canvas-height"), r === "top" || r === "bottom" ? a && o.style.setProperty("--off-canvas-height", this._normalizeCssValue(a)) : o.style.setProperty("--off-canvas-width", this._normalizeCssValue(this.getWidth())), this._header || (this._header = document.createElement("div"), this._header.className = "mint-off-canvas-header", o.appendChild(this._header)), this._headingSlot || (this._headingSlot = document.createElement("div"), this._headingSlot.className = "mint-off-canvas-heading", this._headingSlot.setAttribute("slot", "heading"), this._header.appendChild(this._headingSlot));
|
|
95
|
+
let s = this._headingSlot.querySelector("mint-text");
|
|
96
|
+
if (t ? (s || (s = document.createElement("mint-text"), s.setAttribute("size", "sub-heading"), s.setAttribute("bold", "true"), this._headingSlot.appendChild(s)), s.textContent = t, s.id = `${e || "mint-off-canvas"}-heading`, o.setAttribute("aria-labelledby", s.id), o.removeAttribute("aria-label")) : s && s.remove(), !t) {
|
|
97
|
+
let e = this.getAttribute("aria-label")?.trim();
|
|
98
|
+
e ? o.setAttribute("aria-label", e) : o.hasAttribute("aria-label") || o.setAttribute("aria-label", "Dialog");
|
|
99
|
+
}
|
|
100
|
+
Array.from(this.children).filter((e) => e !== this._overlay && e !== this._offCanvas && e !== this._headingSlot && e.getAttribute("slot") === "heading").forEach((e) => {
|
|
101
|
+
this._headingSlot && e.parentElement !== this._headingSlot && this._headingSlot.appendChild(e);
|
|
102
|
+
}), this._closeButton || (this._closeButton = document.createElement("mint-button"), this._closeButton.setAttribute("variant", "ghost"), this._closeButton.setAttribute("icon", "close"), this._closeButton.setAttribute("aria-label", "Close panel"), this._closeButton.addEventListener("click", () => this.close()), this._header.appendChild(this._closeButton)), this._bodySlot || (this._bodySlot = document.createElement("div"), this._bodySlot.className = "mint-off-canvas-body", this._bodySlot.setAttribute("slot", "body"), o.appendChild(this._bodySlot)), Array.from(this.children).filter((e) => e !== this._overlay && e !== this._offCanvas && e !== this._bodySlot && e.getAttribute("slot") === "body").forEach((e) => {
|
|
103
|
+
this._bodySlot && e.parentElement !== this._bodySlot && this._bodySlot.appendChild(e);
|
|
104
|
+
}), this._actionsSlot || (this._actionsSlot = document.createElement("div"), this._actionsSlot.className = "mint-off-canvas-actions", this._actionsSlot.setAttribute("slot", "actions"), o.appendChild(this._actionsSlot));
|
|
105
|
+
let c = this._actionsSlot.querySelector("mint-stack");
|
|
106
|
+
c || (c = document.createElement("mint-stack"), c.setAttribute("direction", "horizontal"), c.className = "mint-off-canvas-actions-stack", this._actionsSlot.appendChild(c)), Array.from(this.children).filter((e) => e !== this._overlay && e !== this._offCanvas && e !== this._actionsSlot && e.getAttribute("slot") === "actions").forEach((e) => {
|
|
107
|
+
Array.from(e.children).forEach((e) => {
|
|
108
|
+
e.parentElement !== c && c.appendChild(e);
|
|
109
|
+
}), e.parentElement && e.remove();
|
|
110
|
+
}), Array.from(this.children).forEach((e) => {
|
|
111
|
+
e !== this._overlay && e !== this._offCanvas && e.getAttribute("slot") !== "heading" && e.getAttribute("slot") !== "body" && e.getAttribute("slot") !== "actions" && e !== this._headingSlot && e !== this._bodySlot && e !== this._actionsSlot && e.parentElement !== this._bodySlot && this._bodySlot.appendChild(e);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
_getTransformValue(e, t) {
|
|
115
|
+
if (t) switch (e) {
|
|
116
|
+
case "top": return "translateY(0)";
|
|
117
|
+
case "bottom": return "translateY(0)";
|
|
118
|
+
case "left": return "translateX(0)";
|
|
119
|
+
case "right": return "translateX(0)";
|
|
120
|
+
default: return "translateX(0)";
|
|
121
|
+
}
|
|
122
|
+
else switch (e) {
|
|
123
|
+
case "top": return "translateY(-100%)";
|
|
124
|
+
case "bottom": return "translateY(100%)";
|
|
125
|
+
case "left": return "translateX(-100%)";
|
|
126
|
+
case "right": return "translateX(100%)";
|
|
127
|
+
default: return "translateX(100%)";
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
_observeContentMutations() {
|
|
131
|
+
this._contentObserver ||= new MutationObserver(() => {
|
|
132
|
+
this._scheduleRender();
|
|
133
|
+
}), this._contentObserver.disconnect(), this._contentObserver.observe(this, {
|
|
134
|
+
childList: !0,
|
|
135
|
+
attributes: !0,
|
|
136
|
+
attributeFilter: ["slot"]
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
_getDialogFocusableElements(e) {
|
|
140
|
+
return Array.from(e.querySelectorAll("button:not([disabled]), [href], input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])")).filter((e) => {
|
|
141
|
+
if (e.closest("[hidden], [aria-hidden=\"true\"]")) return !1;
|
|
142
|
+
let t = window.getComputedStyle(e);
|
|
143
|
+
return t.display !== "none" && t.visibility !== "hidden";
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
_animateEnter() {
|
|
147
|
+
let e = this._offCanvas?.querySelector(".mint-off-canvas-panel");
|
|
148
|
+
if (!e) return;
|
|
149
|
+
this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null);
|
|
150
|
+
let t = this.getPosition(), n = !this._dialogWasOpen;
|
|
151
|
+
if (n) {
|
|
152
|
+
this._dialogWasOpen = !0;
|
|
153
|
+
let e = document.activeElement;
|
|
154
|
+
this._previousFocus = e instanceof HTMLElement && e !== document.body ? e : null;
|
|
155
|
+
}
|
|
156
|
+
e.style.transform = this._getTransformValue(t, !1), e.style.transition = "transform 300ms ease-out", this.classList.remove("mint-off-canvas-hidden"), requestAnimationFrame(() => {
|
|
157
|
+
requestAnimationFrame(() => {
|
|
158
|
+
this.isOpen() && (this.classList.add("mint-off-canvas-open"), e.style.transform = this._getTransformValue(t, !0), n && (this._getDialogFocusableElements(e)[0] ?? e).focus());
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
_animateExit() {
|
|
163
|
+
this.classList.remove("mint-off-canvas-open");
|
|
164
|
+
let e = this._offCanvas?.querySelector(".mint-off-canvas-panel");
|
|
165
|
+
if (!e) {
|
|
166
|
+
this.classList.add("mint-off-canvas-hidden"), this._dialogWasOpen = !1;
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
let t = this.getPosition();
|
|
170
|
+
e.style.transition = "transform 300ms ease-in", e.style.transform = this._getTransformValue(t, !1), this._exitTimer !== null && clearTimeout(this._exitTimer), this._exitTimer = window.setTimeout(() => {
|
|
171
|
+
if (this._exitTimer = null, this.isOpen()) return;
|
|
172
|
+
this.classList.add("mint-off-canvas-hidden"), e.style.transform = "", e.style.transition = "";
|
|
173
|
+
let t = this._previousFocus;
|
|
174
|
+
this._previousFocus = null, t?.isConnected && t.focus();
|
|
175
|
+
}, 300);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
customElements.get("mint-off-canvas") || e("mint-off-canvas", t);
|
|
179
|
+
//#endregion
|
|
180
|
+
export { t as default };
|
|
@@ -1,37 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import '../back-button/index';
|
|
3
|
-
declare class MintPage extends HTMLElement {
|
|
4
|
-
static get observedAttributes(): string[];
|
|
5
|
-
private _pageContainer;
|
|
6
|
-
private _header;
|
|
7
|
-
private _titleElement;
|
|
8
|
-
private _headingText;
|
|
9
|
-
private _actionsSlot;
|
|
10
|
-
private _bodySlot;
|
|
11
|
-
private _darkModeObserver;
|
|
12
|
-
private _contentObserver;
|
|
13
|
-
private _backButton;
|
|
14
|
-
private _backButtonHandler;
|
|
15
|
-
private _renderFrame;
|
|
16
|
-
constructor();
|
|
17
|
-
connectedCallback(): void;
|
|
18
|
-
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
19
|
-
disconnectedCallback(): void;
|
|
20
|
-
private _scheduleRender;
|
|
21
|
-
getHeading(): string;
|
|
22
|
-
getFallbackHref(): string;
|
|
23
|
-
shouldShowBackButton(): boolean;
|
|
24
|
-
render(): void;
|
|
25
|
-
private _applyContainerClasses;
|
|
26
|
-
private _updateBackgroundColor;
|
|
27
|
-
private _observeDarkMode;
|
|
28
|
-
/**
|
|
29
|
-
* Re-project dynamic children (e.g. Vue <template v-if>) when direct children change.
|
|
30
|
-
* Without this, newly mounted nodes can remain outside the internal body container.
|
|
31
|
-
*/
|
|
32
|
-
private _observeContentMutations;
|
|
33
|
-
private _setupBackButtonListener;
|
|
34
|
-
private _removeBackButtonListener;
|
|
35
|
-
}
|
|
36
|
-
export default MintPage;
|
|
37
|
-
//# sourceMappingURL=Page.d.ts.map
|
|
1
|
+
export { MintPage as default, MintPage } from '../../mintui-elements'
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"file": "Page.d.ts",
|
|
4
|
+
"sourceRoot": "",
|
|
5
|
+
"sources": [
|
|
6
|
+
"Page.d.ts"
|
|
7
|
+
],
|
|
8
|
+
"names": [],
|
|
9
|
+
"mappings": "AAAA"
|
|
10
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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('page', '../../page.css')
|
|
15
|
+
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
16
|
+
//#region src/components/page/Page.js
|
|
17
|
+
var t = class extends HTMLElement {
|
|
18
|
+
static get observedAttributes() {
|
|
19
|
+
return [
|
|
20
|
+
"heading",
|
|
21
|
+
"fallback-href",
|
|
22
|
+
"show-back-button",
|
|
23
|
+
"containered"
|
|
24
|
+
];
|
|
25
|
+
}
|
|
26
|
+
constructor() {
|
|
27
|
+
super(), this._root = this.attachShadow({ mode: "open" }), this._root.innerHTML = "\n <div part=\"container\" class=\"mint-page-container\">\n <header part=\"header\" class=\"mint-page-header\">\n <div part=\"title\" class=\"mint-page-title\">\n <button part=\"back-button\" class=\"mint-page-back\" type=\"button\" aria-label=\"Go back\" hidden>\n <svg part=\"back-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M19 12H5m7 7-7-7 7-7\" />\n </svg>\n </button>\n <h1 part=\"heading\" class=\"mint-page-heading\"></h1>\n </div>\n <div part=\"actions\" class=\"mint-page-actions\"><slot name=\"actions\"></slot></div>\n </header>\n <main part=\"body\" class=\"mint-page-body\"><slot></slot></main>\n </div>\n ", this._headingElement = this._root.querySelector(".mint-page-heading"), this._backButton = this._root.querySelector(".mint-page-back"), this._backButton.addEventListener("click", (e) => this._handleBack(e));
|
|
28
|
+
}
|
|
29
|
+
connectedCallback() {
|
|
30
|
+
this.render();
|
|
31
|
+
}
|
|
32
|
+
attributeChangedCallback(e, t, n) {
|
|
33
|
+
t !== n && this.isConnected && this.render();
|
|
34
|
+
}
|
|
35
|
+
getHeading() {
|
|
36
|
+
return this.getAttribute("heading") || "";
|
|
37
|
+
}
|
|
38
|
+
getFallbackHref() {
|
|
39
|
+
return this.getAttribute("fallback-href") || "/";
|
|
40
|
+
}
|
|
41
|
+
shouldShowBackButton() {
|
|
42
|
+
return this.getAttribute("show-back-button") === "true";
|
|
43
|
+
}
|
|
44
|
+
isContainered() {
|
|
45
|
+
return this.hasAttribute("containered") && this.getAttribute("containered") !== "false";
|
|
46
|
+
}
|
|
47
|
+
render() {
|
|
48
|
+
this._headingElement.textContent = this.getHeading(), this._backButton.hidden = !this.shouldShowBackButton();
|
|
49
|
+
}
|
|
50
|
+
_handleBack(e) {
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
let t = document.referrer, n = !!(t && (() => {
|
|
53
|
+
try {
|
|
54
|
+
return new URL(t).origin === window.location.origin;
|
|
55
|
+
} catch {
|
|
56
|
+
return !1;
|
|
57
|
+
}
|
|
58
|
+
})()), r = {
|
|
59
|
+
url: n ? t : this.getFallbackHref(),
|
|
60
|
+
isFromReferrer: n,
|
|
61
|
+
referrer: t || null,
|
|
62
|
+
fallbackHref: this.getFallbackHref()
|
|
63
|
+
}, i = new CustomEvent("back", {
|
|
64
|
+
detail: r,
|
|
65
|
+
bubbles: !0,
|
|
66
|
+
cancelable: !0,
|
|
67
|
+
composed: !0
|
|
68
|
+
});
|
|
69
|
+
this.dispatchEvent(i) && (n && window.history.length > 1 ? window.history.back() : window.location.href = this.getFallbackHref());
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
typeof customElements < "u" && !customElements.get("mint-page") && e("mint-page", t);
|
|
73
|
+
//#endregion
|
|
74
|
+
export { t as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const e=require(`../chunks/register-element-tCL_F1YI.js`);var t=class extends HTMLElement{static get observedAttributes(){return[`heading`,`fallback-href`,`show-back-button`,`containered`]}constructor(){super(),this._root=this.attachShadow({mode:`open`}),this._root.innerHTML=`
|
|
2
|
+
<div part="container" class="mint-page-container">
|
|
3
|
+
<header part="header" class="mint-page-header">
|
|
4
|
+
<div part="title" class="mint-page-title">
|
|
5
|
+
<button part="back-button" class="mint-page-back" type="button" aria-label="Go back" hidden>
|
|
6
|
+
<svg part="back-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
|
7
|
+
<path d="M19 12H5m7 7-7-7 7-7" />
|
|
8
|
+
</svg>
|
|
9
|
+
</button>
|
|
10
|
+
<h1 part="heading" class="mint-page-heading"></h1>
|
|
11
|
+
</div>
|
|
12
|
+
<div part="actions" class="mint-page-actions"><slot name="actions"></slot></div>
|
|
13
|
+
</header>
|
|
14
|
+
<main part="body" class="mint-page-body"><slot></slot></main>
|
|
15
|
+
</div>
|
|
16
|
+
`,this._headingElement=this._root.querySelector(`.mint-page-heading`),this._backButton=this._root.querySelector(`.mint-page-back`),this._backButton.addEventListener(`click`,e=>this._handleBack(e))}connectedCallback(){this.render()}attributeChangedCallback(e,t,n){t!==n&&this.isConnected&&this.render()}getHeading(){return this.getAttribute(`heading`)||``}getFallbackHref(){return this.getAttribute(`fallback-href`)||`/`}shouldShowBackButton(){return this.getAttribute(`show-back-button`)===`true`}isContainered(){return this.hasAttribute(`containered`)&&this.getAttribute(`containered`)!==`false`}render(){this._headingElement.textContent=this.getHeading(),this._backButton.hidden=!this.shouldShowBackButton()}_handleBack(e){e.preventDefault();let t=document.referrer,n=!!(t&&(()=>{try{return new URL(t).origin===window.location.origin}catch{return!1}})()),r={url:n?t:this.getFallbackHref(),isFromReferrer:n,referrer:t||null,fallbackHref:this.getFallbackHref()},i=new CustomEvent(`back`,{detail:r,bubbles:!0,cancelable:!0,composed:!0});this.dispatchEvent(i)&&(n&&window.history.length>1?window.history.back():window.location.href=this.getFallbackHref())}};typeof customElements<`u`&&!customElements.get(`mint-page`)&&e.t(`mint-page`,t),module.exports=t;
|
|
@@ -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
|
+
}
|