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,241 @@
|
|
|
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('back-button', '../../back-button.css')
|
|
18
|
+
import { a as e } from "../chunks/icon-gQAtsERy.js";
|
|
19
|
+
import { t } from "../chunks/register-element-BFYmIynH.js";
|
|
20
|
+
import "../chunks/icon-C0OLmjDY.js";
|
|
21
|
+
/* empty css */
|
|
22
|
+
import "../chunks/spinner-BsaFHuS6.js";
|
|
23
|
+
e({
|
|
24
|
+
name: "arrow-left",
|
|
25
|
+
viewBox: "0 0 24 24",
|
|
26
|
+
path: "M19 12H5m7-7l-7 7 7 7",
|
|
27
|
+
strokeLinecap: "round",
|
|
28
|
+
strokeLinejoin: "round"
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/components/button/Button.js
|
|
32
|
+
var n = class extends HTMLElement {
|
|
33
|
+
static get observedAttributes() {
|
|
34
|
+
return [
|
|
35
|
+
"variant",
|
|
36
|
+
"tone",
|
|
37
|
+
"disabled",
|
|
38
|
+
"loading",
|
|
39
|
+
"button-type",
|
|
40
|
+
"type",
|
|
41
|
+
"full-width",
|
|
42
|
+
"icon-position",
|
|
43
|
+
"icon"
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
constructor() {
|
|
47
|
+
super(), this._button = null, this._clickHandler = null, this._isHandlingClick = !1;
|
|
48
|
+
}
|
|
49
|
+
connectedCallback() {
|
|
50
|
+
this.render(), this._button && this.setupEventListeners();
|
|
51
|
+
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
this.removeEventListeners();
|
|
54
|
+
}
|
|
55
|
+
attributeChangedCallback(e, t, n) {
|
|
56
|
+
t !== n && this.render();
|
|
57
|
+
}
|
|
58
|
+
getVariant() {
|
|
59
|
+
return this.getAttribute("variant") || "solid";
|
|
60
|
+
}
|
|
61
|
+
getTone() {
|
|
62
|
+
return this.getAttribute("tone") || "neutral";
|
|
63
|
+
}
|
|
64
|
+
isDisabled() {
|
|
65
|
+
return this.hasAttribute("disabled");
|
|
66
|
+
}
|
|
67
|
+
isLoading() {
|
|
68
|
+
return this.hasAttribute("loading");
|
|
69
|
+
}
|
|
70
|
+
getType() {
|
|
71
|
+
return (this.getAttribute("type") || this.getAttribute("button-type") || "default") === "submit" ? "submit" : "button";
|
|
72
|
+
}
|
|
73
|
+
isFullWidth() {
|
|
74
|
+
return this.hasAttribute("full-width");
|
|
75
|
+
}
|
|
76
|
+
getIconPosition() {
|
|
77
|
+
return this.getAttribute("icon-position") || "left";
|
|
78
|
+
}
|
|
79
|
+
getIcon() {
|
|
80
|
+
return this.getAttribute("icon") || "";
|
|
81
|
+
}
|
|
82
|
+
isIconOnly() {
|
|
83
|
+
if (!(this.getIcon() || this._button?.querySelector("[slot=\"icon\"], .mint-button-icon, mint-icon"))) return !1;
|
|
84
|
+
let e = this._button?.querySelector(".mint-button-content");
|
|
85
|
+
if (e && e.textContent.trim()) return !1;
|
|
86
|
+
if (this._button) {
|
|
87
|
+
for (let e = this._button.firstChild; e; e = e.nextSibling) if (e.nodeType === Node.TEXT_NODE && e.textContent.trim() || e.nodeType === Node.ELEMENT_NODE && e.tagName !== "MINT-ICON" && e.tagName !== "MINT-SPINNER" && !e.querySelector?.("mint-spinner") && !e.hasAttribute?.("slot") && e.className !== "mint-button-icon" && !(e.className === "mr-2" && e.querySelector("mint-spinner")) && e.textContent.trim()) return !1;
|
|
88
|
+
}
|
|
89
|
+
return !0;
|
|
90
|
+
}
|
|
91
|
+
getButtonClasses() {
|
|
92
|
+
return [
|
|
93
|
+
"mint-button-core",
|
|
94
|
+
"mint-button-" + this.getVariant(),
|
|
95
|
+
"mint-button-tone-" + this.getTone(),
|
|
96
|
+
this.isIconOnly() ? "mint-button-icon-only" : "",
|
|
97
|
+
this.isFullWidth() ? "mint-button-full-width" : ""
|
|
98
|
+
].filter(Boolean).join(" ");
|
|
99
|
+
}
|
|
100
|
+
render() {
|
|
101
|
+
let e = this.isDisabled() || this.isLoading(), t = this.getType();
|
|
102
|
+
if (!this._button) {
|
|
103
|
+
for (this._button = document.createElement("button"); this.firstChild;) this._button.appendChild(this.firstChild);
|
|
104
|
+
this.appendChild(this._button), this.setupEventListeners();
|
|
105
|
+
}
|
|
106
|
+
this._button.type = t, this._button.disabled = e;
|
|
107
|
+
let n = this._button.querySelector("mint-spinner");
|
|
108
|
+
if (this.isLoading()) if (n) n.setAttribute("data-button-variant", this.getVariant()), n.setAttribute("data-button-tone", this.getTone()), n.render();
|
|
109
|
+
else {
|
|
110
|
+
let e = document.createElement("span");
|
|
111
|
+
e.className = "mint-spinner-wrap";
|
|
112
|
+
let t = document.createElement("mint-spinner");
|
|
113
|
+
t.setAttribute("size", "default"), t.setAttribute("data-button-variant", this.getVariant()), t.setAttribute("data-button-tone", this.getTone()), t.style.width = "0.875rem", t.style.height = "0.875rem", e.appendChild(t), this._button.insertBefore(e, this._button.firstChild);
|
|
114
|
+
}
|
|
115
|
+
else n && n.parentElement?.remove();
|
|
116
|
+
for (; this.firstChild && this.firstChild !== this._button;) this._button.appendChild(this.firstChild);
|
|
117
|
+
let r = this.getIcon(), i = this._button.querySelector("[slot=\"icon\"], .mint-button-icon, mint-icon");
|
|
118
|
+
r ? (i && i.tagName !== "MINT-ICON" && (i.remove(), i = null), !i || i.tagName !== "MINT-ICON" ? (i = document.createElement("mint-icon"), i.setAttribute("name", r), i.className = "mint-button-icon") : i.setAttribute("name", r)) : i && i.tagName === "MINT-ICON" && (i.remove(), i = null), i ||= this._button.querySelector("[slot=\"icon\"], .mint-button-icon");
|
|
119
|
+
let a = this.getIconPosition(), o = this._button.querySelector(".mint-button-content");
|
|
120
|
+
if (o) {
|
|
121
|
+
let e = i && i.tagName === "MINT-ICON";
|
|
122
|
+
if (i && !i.parentElement) {
|
|
123
|
+
let t = this._button.querySelector("mint-spinner")?.parentElement;
|
|
124
|
+
e || a === "left" ? t ? t.insertAdjacentElement("afterend", i) : this._button.insertBefore(i, o) : o.insertAdjacentElement("afterend", i);
|
|
125
|
+
} else if (i && (e || a === "left") && i.nextSibling !== o) {
|
|
126
|
+
i.remove();
|
|
127
|
+
let e = this._button.querySelector("mint-spinner")?.parentElement;
|
|
128
|
+
e ? e.insertAdjacentElement("afterend", i) : this._button.insertBefore(i, o);
|
|
129
|
+
} else i && !e && a === "right" && i.previousSibling !== o && (i.remove(), o.insertAdjacentElement("afterend", i));
|
|
130
|
+
} else {
|
|
131
|
+
let e = [];
|
|
132
|
+
for (let t = this._button.firstChild; t; t = t.nextSibling) t.tagName !== "MINT-SPINNER" && !t.querySelector?.("mint-spinner") && t !== i && !t.hasAttribute?.("slot") && !(t.className === "mr-2" && t.querySelector("mint-spinner")) && e.push(t);
|
|
133
|
+
if (e.length > 0) {
|
|
134
|
+
o = document.createElement("span"), o.className = "mint-button-content", e.forEach((e) => {
|
|
135
|
+
o.appendChild(e);
|
|
136
|
+
});
|
|
137
|
+
let t = this._button.querySelector("mint-spinner")?.parentElement;
|
|
138
|
+
i && a === "left" ? t ? (t.insertAdjacentElement("afterend", i), i.insertAdjacentElement("afterend", o)) : (this._button.insertBefore(i, this._button.firstChild), i.insertAdjacentElement("afterend", o)) : i && a === "right" ? t ? (t.insertAdjacentElement("afterend", o), o.insertAdjacentElement("afterend", i)) : (this._button.insertBefore(o, this._button.firstChild), o.insertAdjacentElement("afterend", i)) : t ? t.insertAdjacentElement("afterend", o) : this._button.insertBefore(o, this._button.firstChild);
|
|
139
|
+
} else if (i && i.tagName === "MINT-ICON" && !i.parentElement) {
|
|
140
|
+
let e = this._button.querySelector("mint-spinner")?.parentElement;
|
|
141
|
+
e ? e.insertAdjacentElement("afterend", i) : this._button.insertBefore(i, this._button.firstChild);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
let s = this.isIconOnly();
|
|
145
|
+
i && (i.classList.contains("mint-button-icon") || i.classList.add("mint-button-icon"), i.classList.remove("mint-icon-leading", "mint-icon-trailing"), s ? i.tagName === "MINT-ICON" ? (i.style.width = "1rem", i.style.height = "1rem", i.style.maxWidth = "1rem", i.style.maxHeight = "1rem", i.style.flexShrink = "0") : (i.style.maxWidth = "1rem", i.style.maxHeight = "1rem", i.style.flexShrink = "0", i.tagName === "svg" && (i.style.width = "1rem", i.style.height = "1rem")) : a === "left" ? i.classList.add("mint-icon-leading") : i.classList.add("mint-icon-trailing"));
|
|
146
|
+
let c = this.getButtonClasses();
|
|
147
|
+
this._button.className = c;
|
|
148
|
+
}
|
|
149
|
+
setupEventListeners() {
|
|
150
|
+
this._button && !this._clickHandler && (this._clickHandler = this.handleClick.bind(this), this._button.addEventListener("click", this._clickHandler, !0), this._button.addEventListener("mousedown", this._handleMouseDown), this._button.addEventListener("mouseup", this._handleMouseUp), this._button.addEventListener("mouseleave", this._handleMouseLeave), this._button.addEventListener("touchstart", this._handleTouchStart), this._button.addEventListener("touchend", this._handleTouchEnd), this._button.addEventListener("touchcancel", this._handleTouchCancel));
|
|
151
|
+
}
|
|
152
|
+
removeEventListeners() {
|
|
153
|
+
this._button && (this._clickHandler &&= (this._button.removeEventListener("click", this._clickHandler, !0), null), this._button.removeEventListener("mousedown", this._handleMouseDown), this._button.removeEventListener("mouseup", this._handleMouseUp), this._button.removeEventListener("mouseleave", this._handleMouseLeave), this._button.removeEventListener("touchstart", this._handleTouchStart), this._button.removeEventListener("touchend", this._handleTouchEnd), this._button.removeEventListener("touchcancel", this._handleTouchCancel));
|
|
154
|
+
}
|
|
155
|
+
_handleMouseDown = () => {
|
|
156
|
+
this._button && !this.isDisabled() && !this.isLoading() && this._button.classList.add("mint-button-active");
|
|
157
|
+
};
|
|
158
|
+
_handleMouseUp = () => {
|
|
159
|
+
this._button && this._button.classList.remove("mint-button-active");
|
|
160
|
+
};
|
|
161
|
+
_handleMouseLeave = () => {
|
|
162
|
+
this._button && this._button.classList.remove("mint-button-active");
|
|
163
|
+
};
|
|
164
|
+
_handleTouchStart = () => {
|
|
165
|
+
this._button && !this.isDisabled() && !this.isLoading() && this._button.classList.add("mint-button-active");
|
|
166
|
+
};
|
|
167
|
+
_handleTouchEnd = () => {
|
|
168
|
+
this._button && this._button.classList.remove("mint-button-active");
|
|
169
|
+
};
|
|
170
|
+
_handleTouchCancel = () => {
|
|
171
|
+
this._button && this._button.classList.remove("mint-button-active");
|
|
172
|
+
};
|
|
173
|
+
handleClick(e) {
|
|
174
|
+
if (this.isDisabled() || this.isLoading()) {
|
|
175
|
+
e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation();
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (e.stopPropagation(), e.stopImmediatePropagation(), this._isHandlingClick) {
|
|
179
|
+
e.preventDefault();
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
this._isHandlingClick = !0, e.preventDefault(), this.dispatchEvent(new CustomEvent("click", {
|
|
183
|
+
detail: { originalEvent: e },
|
|
184
|
+
bubbles: !0,
|
|
185
|
+
cancelable: !0,
|
|
186
|
+
composed: !0
|
|
187
|
+
})), requestAnimationFrame(() => {
|
|
188
|
+
this._isHandlingClick = !1;
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
typeof customElements < "u" && !customElements.get("mint-button") && t("mint-button", n);
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region src/components/back-button/BackButton.js
|
|
195
|
+
var r = class extends HTMLElement {
|
|
196
|
+
static get observedAttributes() {
|
|
197
|
+
return ["href", "fallback-href"];
|
|
198
|
+
}
|
|
199
|
+
constructor() {
|
|
200
|
+
super(), this._historyDepth = 0, this._maxBackAttempts = 10, this._backAttempts = 0;
|
|
201
|
+
}
|
|
202
|
+
connectedCallback() {
|
|
203
|
+
this.render(), this._setupHistoryTracking();
|
|
204
|
+
}
|
|
205
|
+
attributeChangedCallback(e, t, n) {
|
|
206
|
+
t !== n && this.render();
|
|
207
|
+
}
|
|
208
|
+
_setupHistoryTracking() {
|
|
209
|
+
window.addEventListener("popstate", () => {
|
|
210
|
+
this._backAttempts = 0;
|
|
211
|
+
}), this._historyDepth = window.history.length;
|
|
212
|
+
}
|
|
213
|
+
getFallbackHref() {
|
|
214
|
+
return this.getAttribute("fallback-href") || this.getAttribute("href") || "/";
|
|
215
|
+
}
|
|
216
|
+
handleClick(e) {
|
|
217
|
+
if (e.preventDefault(), e.stopPropagation(), window.history.length > 1 && this._backAttempts < this._maxBackAttempts && this._backAttempts === 0) {
|
|
218
|
+
this._backAttempts++;
|
|
219
|
+
let e = window.location.href, t = Date.now();
|
|
220
|
+
window.history.back(), setTimeout(() => {
|
|
221
|
+
Date.now() - t, window.location.href === e ? this._navigateToFallback() : setTimeout(() => {
|
|
222
|
+
this._backAttempts = 0;
|
|
223
|
+
}, 500);
|
|
224
|
+
}, 200);
|
|
225
|
+
} else this._navigateToFallback();
|
|
226
|
+
}
|
|
227
|
+
_navigateToFallback() {
|
|
228
|
+
let e = this.getFallbackHref();
|
|
229
|
+
if (this._backAttempts = 0, e.startsWith("/") && !e.startsWith("//")) try {
|
|
230
|
+
window.history.pushState({}, "", e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
231
|
+
return;
|
|
232
|
+
} catch {}
|
|
233
|
+
window.location.href = e;
|
|
234
|
+
}
|
|
235
|
+
render() {
|
|
236
|
+
this._button || (this._button = document.createElement("mint-button"), this._button.setAttribute("variant", "neutral"), this._button.setAttribute("icon", "arrow-left"), this._button.addEventListener("click", (e) => this.handleClick(e)), this.appendChild(this._button));
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
typeof customElements < "u" && !customElements.get("mint-back-button") && t("mint-back-button", r);
|
|
240
|
+
//#endregion
|
|
241
|
+
export { r as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../chunks/icon-dG8sLTBn.js`),t=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/icon-CyzR9aVl.js`),/* empty css */require(`../chunks/spinner-DbTohC6i.js`),e.a({name:`arrow-left`,viewBox:`0 0 24 24`,path:`M19 12H5m7-7l-7 7 7 7`,strokeLinecap:`round`,strokeLinejoin:`round`});var n=class extends HTMLElement{static get observedAttributes(){return[`variant`,`tone`,`disabled`,`loading`,`button-type`,`type`,`full-width`,`icon-position`,`icon`]}constructor(){super(),this._button=null,this._clickHandler=null,this._isHandlingClick=!1}connectedCallback(){this.render(),this._button&&this.setupEventListeners()}disconnectedCallback(){this.removeEventListeners()}attributeChangedCallback(e,t,n){t!==n&&this.render()}getVariant(){return this.getAttribute(`variant`)||`solid`}getTone(){return this.getAttribute(`tone`)||`neutral`}isDisabled(){return this.hasAttribute(`disabled`)}isLoading(){return this.hasAttribute(`loading`)}getType(){return(this.getAttribute(`type`)||this.getAttribute(`button-type`)||`default`)===`submit`?`submit`:`button`}isFullWidth(){return this.hasAttribute(`full-width`)}getIconPosition(){return this.getAttribute(`icon-position`)||`left`}getIcon(){return this.getAttribute(`icon`)||``}isIconOnly(){if(!(this.getIcon()||this._button?.querySelector(`[slot="icon"], .mint-button-icon, mint-icon`)))return!1;let e=this._button?.querySelector(`.mint-button-content`);if(e&&e.textContent.trim())return!1;if(this._button){for(let e=this._button.firstChild;e;e=e.nextSibling)if(e.nodeType===Node.TEXT_NODE&&e.textContent.trim()||e.nodeType===Node.ELEMENT_NODE&&e.tagName!==`MINT-ICON`&&e.tagName!==`MINT-SPINNER`&&!e.querySelector?.(`mint-spinner`)&&!e.hasAttribute?.(`slot`)&&e.className!==`mint-button-icon`&&!(e.className===`mr-2`&&e.querySelector(`mint-spinner`))&&e.textContent.trim())return!1}return!0}getButtonClasses(){return[`mint-button-core`,`mint-button-`+this.getVariant(),`mint-button-tone-`+this.getTone(),this.isIconOnly()?`mint-button-icon-only`:``,this.isFullWidth()?`mint-button-full-width`:``].filter(Boolean).join(` `)}render(){let e=this.isDisabled()||this.isLoading(),t=this.getType();if(!this._button){for(this._button=document.createElement(`button`);this.firstChild;)this._button.appendChild(this.firstChild);this.appendChild(this._button),this.setupEventListeners()}this._button.type=t,this._button.disabled=e;let n=this._button.querySelector(`mint-spinner`);if(this.isLoading())if(n)n.setAttribute(`data-button-variant`,this.getVariant()),n.setAttribute(`data-button-tone`,this.getTone()),n.render();else{let e=document.createElement(`span`);e.className=`mint-spinner-wrap`;let t=document.createElement(`mint-spinner`);t.setAttribute(`size`,`default`),t.setAttribute(`data-button-variant`,this.getVariant()),t.setAttribute(`data-button-tone`,this.getTone()),t.style.width=`0.875rem`,t.style.height=`0.875rem`,e.appendChild(t),this._button.insertBefore(e,this._button.firstChild)}else n&&n.parentElement?.remove();for(;this.firstChild&&this.firstChild!==this._button;)this._button.appendChild(this.firstChild);let r=this.getIcon(),i=this._button.querySelector(`[slot="icon"], .mint-button-icon, mint-icon`);r?(i&&i.tagName!==`MINT-ICON`&&(i.remove(),i=null),!i||i.tagName!==`MINT-ICON`?(i=document.createElement(`mint-icon`),i.setAttribute(`name`,r),i.className=`mint-button-icon`):i.setAttribute(`name`,r)):i&&i.tagName===`MINT-ICON`&&(i.remove(),i=null),i||=this._button.querySelector(`[slot="icon"], .mint-button-icon`);let a=this.getIconPosition(),o=this._button.querySelector(`.mint-button-content`);if(o){let e=i&&i.tagName===`MINT-ICON`;if(i&&!i.parentElement){let t=this._button.querySelector(`mint-spinner`)?.parentElement;e||a===`left`?t?t.insertAdjacentElement(`afterend`,i):this._button.insertBefore(i,o):o.insertAdjacentElement(`afterend`,i)}else if(i&&(e||a===`left`)&&i.nextSibling!==o){i.remove();let e=this._button.querySelector(`mint-spinner`)?.parentElement;e?e.insertAdjacentElement(`afterend`,i):this._button.insertBefore(i,o)}else i&&!e&&a===`right`&&i.previousSibling!==o&&(i.remove(),o.insertAdjacentElement(`afterend`,i))}else{let e=[];for(let t=this._button.firstChild;t;t=t.nextSibling)t.tagName!==`MINT-SPINNER`&&!t.querySelector?.(`mint-spinner`)&&t!==i&&!t.hasAttribute?.(`slot`)&&!(t.className===`mr-2`&&t.querySelector(`mint-spinner`))&&e.push(t);if(e.length>0){o=document.createElement(`span`),o.className=`mint-button-content`,e.forEach(e=>{o.appendChild(e)});let t=this._button.querySelector(`mint-spinner`)?.parentElement;i&&a===`left`?t?(t.insertAdjacentElement(`afterend`,i),i.insertAdjacentElement(`afterend`,o)):(this._button.insertBefore(i,this._button.firstChild),i.insertAdjacentElement(`afterend`,o)):i&&a===`right`?t?(t.insertAdjacentElement(`afterend`,o),o.insertAdjacentElement(`afterend`,i)):(this._button.insertBefore(o,this._button.firstChild),o.insertAdjacentElement(`afterend`,i)):t?t.insertAdjacentElement(`afterend`,o):this._button.insertBefore(o,this._button.firstChild)}else if(i&&i.tagName===`MINT-ICON`&&!i.parentElement){let e=this._button.querySelector(`mint-spinner`)?.parentElement;e?e.insertAdjacentElement(`afterend`,i):this._button.insertBefore(i,this._button.firstChild)}}let s=this.isIconOnly();i&&(i.classList.contains(`mint-button-icon`)||i.classList.add(`mint-button-icon`),i.classList.remove(`mint-icon-leading`,`mint-icon-trailing`),s?i.tagName===`MINT-ICON`?(i.style.width=`1rem`,i.style.height=`1rem`,i.style.maxWidth=`1rem`,i.style.maxHeight=`1rem`,i.style.flexShrink=`0`):(i.style.maxWidth=`1rem`,i.style.maxHeight=`1rem`,i.style.flexShrink=`0`,i.tagName===`svg`&&(i.style.width=`1rem`,i.style.height=`1rem`)):a===`left`?i.classList.add(`mint-icon-leading`):i.classList.add(`mint-icon-trailing`));let c=this.getButtonClasses();this._button.className=c}setupEventListeners(){this._button&&!this._clickHandler&&(this._clickHandler=this.handleClick.bind(this),this._button.addEventListener(`click`,this._clickHandler,!0),this._button.addEventListener(`mousedown`,this._handleMouseDown),this._button.addEventListener(`mouseup`,this._handleMouseUp),this._button.addEventListener(`mouseleave`,this._handleMouseLeave),this._button.addEventListener(`touchstart`,this._handleTouchStart),this._button.addEventListener(`touchend`,this._handleTouchEnd),this._button.addEventListener(`touchcancel`,this._handleTouchCancel))}removeEventListeners(){this._button&&(this._clickHandler&&=(this._button.removeEventListener(`click`,this._clickHandler,!0),null),this._button.removeEventListener(`mousedown`,this._handleMouseDown),this._button.removeEventListener(`mouseup`,this._handleMouseUp),this._button.removeEventListener(`mouseleave`,this._handleMouseLeave),this._button.removeEventListener(`touchstart`,this._handleTouchStart),this._button.removeEventListener(`touchend`,this._handleTouchEnd),this._button.removeEventListener(`touchcancel`,this._handleTouchCancel))}_handleMouseDown=()=>{this._button&&!this.isDisabled()&&!this.isLoading()&&this._button.classList.add(`mint-button-active`)};_handleMouseUp=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};_handleMouseLeave=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};_handleTouchStart=()=>{this._button&&!this.isDisabled()&&!this.isLoading()&&this._button.classList.add(`mint-button-active`)};_handleTouchEnd=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};_handleTouchCancel=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};handleClick(e){if(this.isDisabled()||this.isLoading()){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();return}if(e.stopPropagation(),e.stopImmediatePropagation(),this._isHandlingClick){e.preventDefault();return}this._isHandlingClick=!0,e.preventDefault(),this.dispatchEvent(new CustomEvent(`click`,{detail:{originalEvent:e},bubbles:!0,cancelable:!0,composed:!0})),requestAnimationFrame(()=>{this._isHandlingClick=!1})}};typeof customElements<`u`&&!customElements.get(`mint-button`)&&t.t(`mint-button`,n);var r=class extends HTMLElement{static get observedAttributes(){return[`href`,`fallback-href`]}constructor(){super(),this._historyDepth=0,this._maxBackAttempts=10,this._backAttempts=0}connectedCallback(){this.render(),this._setupHistoryTracking()}attributeChangedCallback(e,t,n){t!==n&&this.render()}_setupHistoryTracking(){window.addEventListener(`popstate`,()=>{this._backAttempts=0}),this._historyDepth=window.history.length}getFallbackHref(){return this.getAttribute(`fallback-href`)||this.getAttribute(`href`)||`/`}handleClick(e){if(e.preventDefault(),e.stopPropagation(),window.history.length>1&&this._backAttempts<this._maxBackAttempts&&this._backAttempts===0){this._backAttempts++;let e=window.location.href,t=Date.now();window.history.back(),setTimeout(()=>{Date.now()-t,window.location.href===e?this._navigateToFallback():setTimeout(()=>{this._backAttempts=0},500)},200)}else this._navigateToFallback()}_navigateToFallback(){let e=this.getFallbackHref();if(this._backAttempts=0,e.startsWith(`/`)&&!e.startsWith(`//`))try{window.history.pushState({},``,e),window.dispatchEvent(new PopStateEvent(`popstate`));return}catch{}window.location.href=e}render(){this._button||(this._button=document.createElement(`mint-button`),this._button.setAttribute(`variant`,`neutral`),this._button.setAttribute(`icon`,`arrow-left`),this._button.addEventListener(`click`,e=>this.handleClick(e)),this.appendChild(this._button))}};typeof customElements<`u`&&!customElements.get(`mint-back-button`)&&t.t(`mint-back-button`,r),module.exports=r;
|
|
@@ -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,229 @@
|
|
|
1
|
+
import '../../theme.css'
|
|
2
|
+
import '../../button.css'
|
|
3
|
+
import '../../spinner.css'
|
|
4
|
+
import '../../icon.css'
|
|
5
|
+
import '../../back-button.css'
|
|
6
|
+
import { a as e } from "../chunks/icon-gQAtsERy.js";
|
|
7
|
+
import { t } from "../chunks/register-element-BFYmIynH.js";
|
|
8
|
+
import "../chunks/icon-C0OLmjDY.js";
|
|
9
|
+
/* empty css */
|
|
10
|
+
import "../chunks/spinner-BsaFHuS6.js";
|
|
11
|
+
e({
|
|
12
|
+
name: "arrow-left",
|
|
13
|
+
viewBox: "0 0 24 24",
|
|
14
|
+
path: "M19 12H5m7-7l-7 7 7 7",
|
|
15
|
+
strokeLinecap: "round",
|
|
16
|
+
strokeLinejoin: "round"
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/components/button/Button.js
|
|
20
|
+
var n = class extends HTMLElement {
|
|
21
|
+
static get observedAttributes() {
|
|
22
|
+
return [
|
|
23
|
+
"variant",
|
|
24
|
+
"tone",
|
|
25
|
+
"disabled",
|
|
26
|
+
"loading",
|
|
27
|
+
"button-type",
|
|
28
|
+
"type",
|
|
29
|
+
"full-width",
|
|
30
|
+
"icon-position",
|
|
31
|
+
"icon"
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
constructor() {
|
|
35
|
+
super(), this._button = null, this._clickHandler = null, this._isHandlingClick = !1;
|
|
36
|
+
}
|
|
37
|
+
connectedCallback() {
|
|
38
|
+
this.render(), this._button && this.setupEventListeners();
|
|
39
|
+
}
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
this.removeEventListeners();
|
|
42
|
+
}
|
|
43
|
+
attributeChangedCallback(e, t, n) {
|
|
44
|
+
t !== n && this.render();
|
|
45
|
+
}
|
|
46
|
+
getVariant() {
|
|
47
|
+
return this.getAttribute("variant") || "solid";
|
|
48
|
+
}
|
|
49
|
+
getTone() {
|
|
50
|
+
return this.getAttribute("tone") || "neutral";
|
|
51
|
+
}
|
|
52
|
+
isDisabled() {
|
|
53
|
+
return this.hasAttribute("disabled");
|
|
54
|
+
}
|
|
55
|
+
isLoading() {
|
|
56
|
+
return this.hasAttribute("loading");
|
|
57
|
+
}
|
|
58
|
+
getType() {
|
|
59
|
+
return (this.getAttribute("type") || this.getAttribute("button-type") || "default") === "submit" ? "submit" : "button";
|
|
60
|
+
}
|
|
61
|
+
isFullWidth() {
|
|
62
|
+
return this.hasAttribute("full-width");
|
|
63
|
+
}
|
|
64
|
+
getIconPosition() {
|
|
65
|
+
return this.getAttribute("icon-position") || "left";
|
|
66
|
+
}
|
|
67
|
+
getIcon() {
|
|
68
|
+
return this.getAttribute("icon") || "";
|
|
69
|
+
}
|
|
70
|
+
isIconOnly() {
|
|
71
|
+
if (!(this.getIcon() || this._button?.querySelector("[slot=\"icon\"], .mint-button-icon, mint-icon"))) return !1;
|
|
72
|
+
let e = this._button?.querySelector(".mint-button-content");
|
|
73
|
+
if (e && e.textContent.trim()) return !1;
|
|
74
|
+
if (this._button) {
|
|
75
|
+
for (let e = this._button.firstChild; e; e = e.nextSibling) if (e.nodeType === Node.TEXT_NODE && e.textContent.trim() || e.nodeType === Node.ELEMENT_NODE && e.tagName !== "MINT-ICON" && e.tagName !== "MINT-SPINNER" && !e.querySelector?.("mint-spinner") && !e.hasAttribute?.("slot") && e.className !== "mint-button-icon" && !(e.className === "mr-2" && e.querySelector("mint-spinner")) && e.textContent.trim()) return !1;
|
|
76
|
+
}
|
|
77
|
+
return !0;
|
|
78
|
+
}
|
|
79
|
+
getButtonClasses() {
|
|
80
|
+
return [
|
|
81
|
+
"mint-button-core",
|
|
82
|
+
"mint-button-" + this.getVariant(),
|
|
83
|
+
"mint-button-tone-" + this.getTone(),
|
|
84
|
+
this.isIconOnly() ? "mint-button-icon-only" : "",
|
|
85
|
+
this.isFullWidth() ? "mint-button-full-width" : ""
|
|
86
|
+
].filter(Boolean).join(" ");
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
let e = this.isDisabled() || this.isLoading(), t = this.getType();
|
|
90
|
+
if (!this._button) {
|
|
91
|
+
for (this._button = document.createElement("button"); this.firstChild;) this._button.appendChild(this.firstChild);
|
|
92
|
+
this.appendChild(this._button), this.setupEventListeners();
|
|
93
|
+
}
|
|
94
|
+
this._button.type = t, this._button.disabled = e;
|
|
95
|
+
let n = this._button.querySelector("mint-spinner");
|
|
96
|
+
if (this.isLoading()) if (n) n.setAttribute("data-button-variant", this.getVariant()), n.setAttribute("data-button-tone", this.getTone()), n.render();
|
|
97
|
+
else {
|
|
98
|
+
let e = document.createElement("span");
|
|
99
|
+
e.className = "mint-spinner-wrap";
|
|
100
|
+
let t = document.createElement("mint-spinner");
|
|
101
|
+
t.setAttribute("size", "default"), t.setAttribute("data-button-variant", this.getVariant()), t.setAttribute("data-button-tone", this.getTone()), t.style.width = "0.875rem", t.style.height = "0.875rem", e.appendChild(t), this._button.insertBefore(e, this._button.firstChild);
|
|
102
|
+
}
|
|
103
|
+
else n && n.parentElement?.remove();
|
|
104
|
+
for (; this.firstChild && this.firstChild !== this._button;) this._button.appendChild(this.firstChild);
|
|
105
|
+
let r = this.getIcon(), i = this._button.querySelector("[slot=\"icon\"], .mint-button-icon, mint-icon");
|
|
106
|
+
r ? (i && i.tagName !== "MINT-ICON" && (i.remove(), i = null), !i || i.tagName !== "MINT-ICON" ? (i = document.createElement("mint-icon"), i.setAttribute("name", r), i.className = "mint-button-icon") : i.setAttribute("name", r)) : i && i.tagName === "MINT-ICON" && (i.remove(), i = null), i ||= this._button.querySelector("[slot=\"icon\"], .mint-button-icon");
|
|
107
|
+
let a = this.getIconPosition(), o = this._button.querySelector(".mint-button-content");
|
|
108
|
+
if (o) {
|
|
109
|
+
let e = i && i.tagName === "MINT-ICON";
|
|
110
|
+
if (i && !i.parentElement) {
|
|
111
|
+
let t = this._button.querySelector("mint-spinner")?.parentElement;
|
|
112
|
+
e || a === "left" ? t ? t.insertAdjacentElement("afterend", i) : this._button.insertBefore(i, o) : o.insertAdjacentElement("afterend", i);
|
|
113
|
+
} else if (i && (e || a === "left") && i.nextSibling !== o) {
|
|
114
|
+
i.remove();
|
|
115
|
+
let e = this._button.querySelector("mint-spinner")?.parentElement;
|
|
116
|
+
e ? e.insertAdjacentElement("afterend", i) : this._button.insertBefore(i, o);
|
|
117
|
+
} else i && !e && a === "right" && i.previousSibling !== o && (i.remove(), o.insertAdjacentElement("afterend", i));
|
|
118
|
+
} else {
|
|
119
|
+
let e = [];
|
|
120
|
+
for (let t = this._button.firstChild; t; t = t.nextSibling) t.tagName !== "MINT-SPINNER" && !t.querySelector?.("mint-spinner") && t !== i && !t.hasAttribute?.("slot") && !(t.className === "mr-2" && t.querySelector("mint-spinner")) && e.push(t);
|
|
121
|
+
if (e.length > 0) {
|
|
122
|
+
o = document.createElement("span"), o.className = "mint-button-content", e.forEach((e) => {
|
|
123
|
+
o.appendChild(e);
|
|
124
|
+
});
|
|
125
|
+
let t = this._button.querySelector("mint-spinner")?.parentElement;
|
|
126
|
+
i && a === "left" ? t ? (t.insertAdjacentElement("afterend", i), i.insertAdjacentElement("afterend", o)) : (this._button.insertBefore(i, this._button.firstChild), i.insertAdjacentElement("afterend", o)) : i && a === "right" ? t ? (t.insertAdjacentElement("afterend", o), o.insertAdjacentElement("afterend", i)) : (this._button.insertBefore(o, this._button.firstChild), o.insertAdjacentElement("afterend", i)) : t ? t.insertAdjacentElement("afterend", o) : this._button.insertBefore(o, this._button.firstChild);
|
|
127
|
+
} else if (i && i.tagName === "MINT-ICON" && !i.parentElement) {
|
|
128
|
+
let e = this._button.querySelector("mint-spinner")?.parentElement;
|
|
129
|
+
e ? e.insertAdjacentElement("afterend", i) : this._button.insertBefore(i, this._button.firstChild);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
let s = this.isIconOnly();
|
|
133
|
+
i && (i.classList.contains("mint-button-icon") || i.classList.add("mint-button-icon"), i.classList.remove("mint-icon-leading", "mint-icon-trailing"), s ? i.tagName === "MINT-ICON" ? (i.style.width = "1rem", i.style.height = "1rem", i.style.maxWidth = "1rem", i.style.maxHeight = "1rem", i.style.flexShrink = "0") : (i.style.maxWidth = "1rem", i.style.maxHeight = "1rem", i.style.flexShrink = "0", i.tagName === "svg" && (i.style.width = "1rem", i.style.height = "1rem")) : a === "left" ? i.classList.add("mint-icon-leading") : i.classList.add("mint-icon-trailing"));
|
|
134
|
+
let c = this.getButtonClasses();
|
|
135
|
+
this._button.className = c;
|
|
136
|
+
}
|
|
137
|
+
setupEventListeners() {
|
|
138
|
+
this._button && !this._clickHandler && (this._clickHandler = this.handleClick.bind(this), this._button.addEventListener("click", this._clickHandler, !0), this._button.addEventListener("mousedown", this._handleMouseDown), this._button.addEventListener("mouseup", this._handleMouseUp), this._button.addEventListener("mouseleave", this._handleMouseLeave), this._button.addEventListener("touchstart", this._handleTouchStart), this._button.addEventListener("touchend", this._handleTouchEnd), this._button.addEventListener("touchcancel", this._handleTouchCancel));
|
|
139
|
+
}
|
|
140
|
+
removeEventListeners() {
|
|
141
|
+
this._button && (this._clickHandler &&= (this._button.removeEventListener("click", this._clickHandler, !0), null), this._button.removeEventListener("mousedown", this._handleMouseDown), this._button.removeEventListener("mouseup", this._handleMouseUp), this._button.removeEventListener("mouseleave", this._handleMouseLeave), this._button.removeEventListener("touchstart", this._handleTouchStart), this._button.removeEventListener("touchend", this._handleTouchEnd), this._button.removeEventListener("touchcancel", this._handleTouchCancel));
|
|
142
|
+
}
|
|
143
|
+
_handleMouseDown = () => {
|
|
144
|
+
this._button && !this.isDisabled() && !this.isLoading() && this._button.classList.add("mint-button-active");
|
|
145
|
+
};
|
|
146
|
+
_handleMouseUp = () => {
|
|
147
|
+
this._button && this._button.classList.remove("mint-button-active");
|
|
148
|
+
};
|
|
149
|
+
_handleMouseLeave = () => {
|
|
150
|
+
this._button && this._button.classList.remove("mint-button-active");
|
|
151
|
+
};
|
|
152
|
+
_handleTouchStart = () => {
|
|
153
|
+
this._button && !this.isDisabled() && !this.isLoading() && this._button.classList.add("mint-button-active");
|
|
154
|
+
};
|
|
155
|
+
_handleTouchEnd = () => {
|
|
156
|
+
this._button && this._button.classList.remove("mint-button-active");
|
|
157
|
+
};
|
|
158
|
+
_handleTouchCancel = () => {
|
|
159
|
+
this._button && this._button.classList.remove("mint-button-active");
|
|
160
|
+
};
|
|
161
|
+
handleClick(e) {
|
|
162
|
+
if (this.isDisabled() || this.isLoading()) {
|
|
163
|
+
e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation();
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (e.stopPropagation(), e.stopImmediatePropagation(), this._isHandlingClick) {
|
|
167
|
+
e.preventDefault();
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
this._isHandlingClick = !0, e.preventDefault(), this.dispatchEvent(new CustomEvent("click", {
|
|
171
|
+
detail: { originalEvent: e },
|
|
172
|
+
bubbles: !0,
|
|
173
|
+
cancelable: !0,
|
|
174
|
+
composed: !0
|
|
175
|
+
})), requestAnimationFrame(() => {
|
|
176
|
+
this._isHandlingClick = !1;
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
typeof customElements < "u" && !customElements.get("mint-button") && t("mint-button", n);
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region src/components/back-button/BackButton.js
|
|
183
|
+
var r = class extends HTMLElement {
|
|
184
|
+
static get observedAttributes() {
|
|
185
|
+
return ["href", "fallback-href"];
|
|
186
|
+
}
|
|
187
|
+
constructor() {
|
|
188
|
+
super(), this._historyDepth = 0, this._maxBackAttempts = 10, this._backAttempts = 0;
|
|
189
|
+
}
|
|
190
|
+
connectedCallback() {
|
|
191
|
+
this.render(), this._setupHistoryTracking();
|
|
192
|
+
}
|
|
193
|
+
attributeChangedCallback(e, t, n) {
|
|
194
|
+
t !== n && this.render();
|
|
195
|
+
}
|
|
196
|
+
_setupHistoryTracking() {
|
|
197
|
+
window.addEventListener("popstate", () => {
|
|
198
|
+
this._backAttempts = 0;
|
|
199
|
+
}), this._historyDepth = window.history.length;
|
|
200
|
+
}
|
|
201
|
+
getFallbackHref() {
|
|
202
|
+
return this.getAttribute("fallback-href") || this.getAttribute("href") || "/";
|
|
203
|
+
}
|
|
204
|
+
handleClick(e) {
|
|
205
|
+
if (e.preventDefault(), e.stopPropagation(), window.history.length > 1 && this._backAttempts < this._maxBackAttempts && this._backAttempts === 0) {
|
|
206
|
+
this._backAttempts++;
|
|
207
|
+
let e = window.location.href, t = Date.now();
|
|
208
|
+
window.history.back(), setTimeout(() => {
|
|
209
|
+
Date.now() - t, window.location.href === e ? this._navigateToFallback() : setTimeout(() => {
|
|
210
|
+
this._backAttempts = 0;
|
|
211
|
+
}, 500);
|
|
212
|
+
}, 200);
|
|
213
|
+
} else this._navigateToFallback();
|
|
214
|
+
}
|
|
215
|
+
_navigateToFallback() {
|
|
216
|
+
let e = this.getFallbackHref();
|
|
217
|
+
if (this._backAttempts = 0, e.startsWith("/") && !e.startsWith("//")) try {
|
|
218
|
+
window.history.pushState({}, "", e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
219
|
+
return;
|
|
220
|
+
} catch {}
|
|
221
|
+
window.location.href = e;
|
|
222
|
+
}
|
|
223
|
+
render() {
|
|
224
|
+
this._button || (this._button = document.createElement("mint-button"), this._button.setAttribute("variant", "neutral"), this._button.setAttribute("icon", "arrow-left"), this._button.addEventListener("click", (e) => this.handleClick(e)), this.appendChild(this._button));
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
typeof customElements < "u" && !customElements.get("mint-back-button") && t("mint-back-button", r);
|
|
228
|
+
//#endregion
|
|
229
|
+
export { r as default };
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
private _lastScrollY;
|
|
3
|
-
private _scrollHandler;
|
|
4
|
-
connectedCallback(): void;
|
|
5
|
-
disconnectedCallback(): void;
|
|
6
|
-
private _attachScrollListener;
|
|
7
|
-
private _detachScrollListener;
|
|
8
|
-
}
|
|
9
|
-
export default MintBottomNavigation;
|
|
10
|
-
//# sourceMappingURL=BottomNavigation.d.ts.map
|
|
1
|
+
export { MintBottomNavigation as default, MintBottomNavigation } from '../../mintui-elements'
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"file": "BottomNavigation.d.ts",
|
|
4
|
+
"sourceRoot": "",
|
|
5
|
+
"sources": [
|
|
6
|
+
"BottomNavigation.d.ts"
|
|
7
|
+
],
|
|
8
|
+
"names": [],
|
|
9
|
+
"mappings": "AAAA"
|
|
10
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
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('icon', '../../icon.css')
|
|
15
|
+
__mintLoadStyle('bottom-navigation', '../../bottom-navigation.css')
|
|
16
|
+
import "../chunks/icon-gQAtsERy.js";
|
|
17
|
+
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
18
|
+
import "../chunks/icon-C0OLmjDY.js";
|
|
19
|
+
//#region src/components/bottom-navigation/BottomNavigation.ts
|
|
20
|
+
var t = class extends HTMLElement {
|
|
21
|
+
constructor(...e) {
|
|
22
|
+
super(...e), this._lastScrollY = 0, this._scrollHandler = null;
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
this.classList.add("mint-bottom-navigation"), this.setAttribute("role", "navigation"), this.hasAttribute("aria-label") || this.setAttribute("aria-label", "Primary"), this._lastScrollY = window.scrollY, this.hasAttribute("data-preview") || this._attachScrollListener();
|
|
26
|
+
}
|
|
27
|
+
disconnectedCallback() {
|
|
28
|
+
this._detachScrollListener();
|
|
29
|
+
}
|
|
30
|
+
_attachScrollListener() {
|
|
31
|
+
this._scrollHandler || (this._scrollHandler = () => {
|
|
32
|
+
let e = window.scrollY;
|
|
33
|
+
if (e <= 8) {
|
|
34
|
+
this.classList.remove("is-hidden"), this._lastScrollY = e;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
let t = e - this._lastScrollY;
|
|
38
|
+
Math.abs(t) < 4 || (t > 0 ? this.classList.add("is-hidden") : this.classList.remove("is-hidden"), this._lastScrollY = e);
|
|
39
|
+
}, window.addEventListener("scroll", this._scrollHandler, { passive: !0 }));
|
|
40
|
+
}
|
|
41
|
+
_detachScrollListener() {
|
|
42
|
+
this._scrollHandler &&= (window.removeEventListener("scroll", this._scrollHandler), null);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
customElements.get("mint-bottom-navigation") || e("mint-bottom-navigation", t);
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/components/bottom-navigation/BottomNavItem.ts
|
|
48
|
+
var n = class extends HTMLElement {
|
|
49
|
+
constructor(...e) {
|
|
50
|
+
super(...e), this._root = null;
|
|
51
|
+
}
|
|
52
|
+
static get observedAttributes() {
|
|
53
|
+
return [
|
|
54
|
+
"icon",
|
|
55
|
+
"label",
|
|
56
|
+
"href",
|
|
57
|
+
"active"
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
connectedCallback() {
|
|
61
|
+
this.classList.add("mint-bottom-nav-item"), this.render();
|
|
62
|
+
}
|
|
63
|
+
attributeChangedCallback(e, t, n) {
|
|
64
|
+
t !== n && this.render();
|
|
65
|
+
}
|
|
66
|
+
_isActive() {
|
|
67
|
+
return this.hasAttribute("active") && this.getAttribute("active") !== "false";
|
|
68
|
+
}
|
|
69
|
+
_getLabel() {
|
|
70
|
+
return this.getAttribute("label") || "";
|
|
71
|
+
}
|
|
72
|
+
_getIcon() {
|
|
73
|
+
return this.getAttribute("icon") || "";
|
|
74
|
+
}
|
|
75
|
+
_getHref() {
|
|
76
|
+
return this.getAttribute("href");
|
|
77
|
+
}
|
|
78
|
+
render() {
|
|
79
|
+
let e = this._getHref(), t = this._getLabel(), n = this._getIcon(), r = this._isActive(), i;
|
|
80
|
+
e ? (i = document.createElement("a"), i.href = e) : (i = document.createElement("button"), i.type = "button"), i.className = "mint-bottom-nav-link", i.setAttribute("aria-current", r ? "page" : "false");
|
|
81
|
+
let a = n.split("-").filter(Boolean).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(" ");
|
|
82
|
+
i.setAttribute("aria-label", t || a || "Navigation item");
|
|
83
|
+
let o = document.createElement("span");
|
|
84
|
+
if (o.className = "mint-bottom-nav-icon", n) {
|
|
85
|
+
let e = document.createElement("mint-icon");
|
|
86
|
+
e.setAttribute("name", n), e.className = "mint-bottom-nav-icon-glyph", o.appendChild(e);
|
|
87
|
+
}
|
|
88
|
+
let s = document.createElement("span");
|
|
89
|
+
s.className = "mint-bottom-nav-label", s.textContent = t, i.appendChild(o), i.appendChild(s), this.replaceChildren(i), this._root = i;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
customElements.get("mint-bottom-nav-item") || e("mint-bottom-nav-item", n);
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/components/bottom-navigation/index.ts
|
|
95
|
+
var r = t;
|
|
96
|
+
//#endregion
|
|
97
|
+
export { n as MintBottomNavItem, t as MintBottomNavigation, r as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../chunks/icon-dG8sLTBn.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/icon-CyzR9aVl.js`);var t=class extends HTMLElement{constructor(...e){super(...e),this._lastScrollY=0,this._scrollHandler=null}connectedCallback(){this.classList.add(`mint-bottom-navigation`),this.setAttribute(`role`,`navigation`),this.hasAttribute(`aria-label`)||this.setAttribute(`aria-label`,`Primary`),this._lastScrollY=window.scrollY,this.hasAttribute(`data-preview`)||this._attachScrollListener()}disconnectedCallback(){this._detachScrollListener()}_attachScrollListener(){this._scrollHandler||(this._scrollHandler=()=>{let e=window.scrollY;if(e<=8){this.classList.remove(`is-hidden`),this._lastScrollY=e;return}let t=e-this._lastScrollY;Math.abs(t)<4||(t>0?this.classList.add(`is-hidden`):this.classList.remove(`is-hidden`),this._lastScrollY=e)},window.addEventListener(`scroll`,this._scrollHandler,{passive:!0}))}_detachScrollListener(){this._scrollHandler&&=(window.removeEventListener(`scroll`,this._scrollHandler),null)}};customElements.get(`mint-bottom-navigation`)||e.t(`mint-bottom-navigation`,t);var n=class extends HTMLElement{constructor(...e){super(...e),this._root=null}static get observedAttributes(){return[`icon`,`label`,`href`,`active`]}connectedCallback(){this.classList.add(`mint-bottom-nav-item`),this.render()}attributeChangedCallback(e,t,n){t!==n&&this.render()}_isActive(){return this.hasAttribute(`active`)&&this.getAttribute(`active`)!==`false`}_getLabel(){return this.getAttribute(`label`)||``}_getIcon(){return this.getAttribute(`icon`)||``}_getHref(){return this.getAttribute(`href`)}render(){let e=this._getHref(),t=this._getLabel(),n=this._getIcon(),r=this._isActive(),i;e?(i=document.createElement(`a`),i.href=e):(i=document.createElement(`button`),i.type=`button`),i.className=`mint-bottom-nav-link`,i.setAttribute(`aria-current`,r?`page`:`false`);let a=n.split(`-`).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `);i.setAttribute(`aria-label`,t||a||`Navigation item`);let o=document.createElement(`span`);if(o.className=`mint-bottom-nav-icon`,n){let e=document.createElement(`mint-icon`);e.setAttribute(`name`,n),e.className=`mint-bottom-nav-icon-glyph`,o.appendChild(e)}let s=document.createElement(`span`);s.className=`mint-bottom-nav-label`,s.textContent=t,i.appendChild(o),i.appendChild(s),this.replaceChildren(i),this._root=i}};customElements.get(`mint-bottom-nav-item`)||e.t(`mint-bottom-nav-item`,n);var r=t;exports.MintBottomNavItem=n,exports.MintBottomNavigation=t,exports.default=r;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default MintBottomNavigation;
|
|
4
|
-
export { MintBottomNavigation, MintBottomNavItem };
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { default, MintBottomNavigation } from './BottomNavigation'
|
|
2
|
+
export { MintBottomNavItem } from '../../mintui-elements'
|