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,130 @@
|
|
|
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('modal', '../../modal.css')
|
|
15
|
+
__mintLoadStyle('button', '../../button.css')
|
|
16
|
+
__mintLoadStyle('spinner', '../../spinner.css')
|
|
17
|
+
__mintLoadStyle('icon', '../../icon.css')
|
|
18
|
+
__mintLoadStyle('text', '../../text.css')
|
|
19
|
+
__mintLoadStyle('stack', '../../stack.css')
|
|
20
|
+
__mintLoadStyle('confirm-action', '../../confirm-action.css')
|
|
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/modal-B8gNdwEl.js";
|
|
25
|
+
//#region src/components/confirm-action/ConfirmAction.ts
|
|
26
|
+
var t = class extends HTMLElement {
|
|
27
|
+
constructor(...e) {
|
|
28
|
+
super(...e), this._modal = null, this._actionsFooter = null, this._confirmButton = null, this._cancelButton = null, this._pendingResolve = null, this._modalObserver = null, this._lastAction = null, this._onConfirmClick = null, this._onCancelClick = null;
|
|
29
|
+
}
|
|
30
|
+
connectedCallback() {
|
|
31
|
+
this._ensureModal(), this._observeModalOpenState();
|
|
32
|
+
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
this._modalObserver &&= (this._modalObserver.disconnect(), null), this._pendingResolve = null;
|
|
35
|
+
}
|
|
36
|
+
async showConfirm(e) {
|
|
37
|
+
if (this._ensureModal(), !this._modal || !this._confirmButton || !this._cancelButton) return !1;
|
|
38
|
+
let t = e.question?.trim() || "Are you sure?", n = e.tone || "action", r = e.confirmLabel?.trim() || "Confirm", i = e.cancelLabel?.trim() || "Cancel";
|
|
39
|
+
this._lastAction = null, this._modal.setAttribute("heading", t), this._cancelButton.className = "mint-button-core mint-button-ghost mint-button-tone-neutral mint-confirm-action-cancel", this._confirmButton.className = `mint-button-core mint-button-solid mint-button-tone-${n} mint-confirm-action-confirm`, this._confirmButton.textContent = r, this._cancelButton.textContent = i;
|
|
40
|
+
let a = new Promise((e) => {
|
|
41
|
+
this._pendingResolve = e;
|
|
42
|
+
});
|
|
43
|
+
return requestAnimationFrame(() => {
|
|
44
|
+
this._modal.open?.(), this._mountActionsFooter();
|
|
45
|
+
}), a;
|
|
46
|
+
}
|
|
47
|
+
_ensureModal() {
|
|
48
|
+
this._modal || (this._modal = document.createElement("mint-modal"), this._modal.setAttribute("heading", "Are you sure?"), this._modal.setAttribute("size", "small"), this._cancelButton = document.createElement("button"), this._cancelButton.type = "button", this._cancelButton.className = "mint-button-core mint-button-ghost mint-button-tone-neutral mint-confirm-action-cancel", this._cancelButton.textContent = "Cancel", this._confirmButton = document.createElement("button"), this._confirmButton.type = "button", this._confirmButton.className = "mint-button-core mint-button-solid mint-button-tone-action mint-confirm-action-confirm", this._confirmButton.textContent = "Confirm", this._actionsFooter = document.createElement("div"), this._actionsFooter.className = "mint-confirm-action-footer", this._actionsFooter.append(this._cancelButton, this._confirmButton), this._onCancelClick = () => {
|
|
49
|
+
this._lastAction = "cancel", this._modal?.close?.();
|
|
50
|
+
}, this._onConfirmClick = () => {
|
|
51
|
+
this._lastAction = "confirm", this._modal?.close?.();
|
|
52
|
+
}, this._cancelButton.addEventListener("click", this._onCancelClick), this._confirmButton.addEventListener("click", this._onConfirmClick), this.appendChild(this._modal));
|
|
53
|
+
}
|
|
54
|
+
_mountActionsFooter() {
|
|
55
|
+
let e = this._modal?.querySelector(".modal-content");
|
|
56
|
+
!e || !this._actionsFooter || (e.querySelectorAll(":scope > [slot=\"body\"], :scope > [slot=\"actions\"]").forEach((e) => {
|
|
57
|
+
!e.textContent?.trim() && !e.querySelector("button, mint-button, a, input, select, textarea") && e.remove();
|
|
58
|
+
}), this._actionsFooter.parentElement !== e && e.appendChild(this._actionsFooter));
|
|
59
|
+
}
|
|
60
|
+
_observeModalOpenState() {
|
|
61
|
+
!this._modal || this._modalObserver || (this._modalObserver = new MutationObserver(() => {
|
|
62
|
+
if ((this._modal?.hasAttribute("open") ?? !1) || !this._pendingResolve) return;
|
|
63
|
+
let e = this._pendingResolve;
|
|
64
|
+
this._pendingResolve = null;
|
|
65
|
+
let t = this._lastAction === "confirm";
|
|
66
|
+
this._lastAction = null, e(t);
|
|
67
|
+
}), this._modalObserver.observe(this._modal, {
|
|
68
|
+
attributes: !0,
|
|
69
|
+
attributeFilter: ["open"]
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
customElements.get("mint-confirm-action") || e("mint-confirm-action", t);
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/components/confirm-action/ConfirmActionApi.ts
|
|
76
|
+
var n = [], r = !1;
|
|
77
|
+
function i() {
|
|
78
|
+
return typeof document > "u" || document.body ? Promise.resolve() : new Promise((e) => {
|
|
79
|
+
if (typeof window > "u") {
|
|
80
|
+
e();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
window.addEventListener("DOMContentLoaded", () => e(), { once: !0 });
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
async function a() {
|
|
87
|
+
if (await i(), typeof document > "u") throw Error("mintui.confirm is only available in browser environments.");
|
|
88
|
+
let e = document.querySelector("mint-confirm-action[data-mint-confirm-action-root=\"true\"]");
|
|
89
|
+
if (e) return e;
|
|
90
|
+
let t = document.createElement("mint-confirm-action");
|
|
91
|
+
return t.setAttribute("data-mint-confirm-action-root", "true"), document.body.appendChild(t), t;
|
|
92
|
+
}
|
|
93
|
+
function o(e) {
|
|
94
|
+
let t = (e || "action").toString().trim().toLowerCase().replace(/^tone:\s*/, "");
|
|
95
|
+
return t === "action" || t === "info" || t === "warning" || t === "danger" ? t : "action";
|
|
96
|
+
}
|
|
97
|
+
async function s() {
|
|
98
|
+
if (!r) {
|
|
99
|
+
r = !0;
|
|
100
|
+
try {
|
|
101
|
+
for (; n.length > 0;) {
|
|
102
|
+
let e = n.shift();
|
|
103
|
+
e && (await (await a()).showConfirm({
|
|
104
|
+
question: e.question,
|
|
105
|
+
tone: o(e.tone),
|
|
106
|
+
confirmLabel: e.confirmLabel || "Confirm",
|
|
107
|
+
cancelLabel: e.cancelLabel || "Cancel"
|
|
108
|
+
}) ? e.confirmed?.() : e.cancelled?.());
|
|
109
|
+
}
|
|
110
|
+
} finally {
|
|
111
|
+
r = !1;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function c(e, t, r, i = "action", a = "Confirm", o = "Cancel") {
|
|
116
|
+
typeof window > "u" || (n.push({
|
|
117
|
+
question: e,
|
|
118
|
+
confirmed: t,
|
|
119
|
+
cancelled: r,
|
|
120
|
+
tone: i,
|
|
121
|
+
confirmLabel: a,
|
|
122
|
+
cancelLabel: o
|
|
123
|
+
}), s());
|
|
124
|
+
}
|
|
125
|
+
if (typeof window < "u") {
|
|
126
|
+
let e = window.mintui || {};
|
|
127
|
+
e.confirm = c, window.mintui = e;
|
|
128
|
+
}
|
|
129
|
+
//#endregion
|
|
130
|
+
export { c as confirm, t as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/text-BmHZbBMo.js`),require(`../chunks/button-BlbLHMts.js`),require(`../chunks/modal-WYWvk2lZ.js`);var t=class extends HTMLElement{constructor(...e){super(...e),this._modal=null,this._actionsFooter=null,this._confirmButton=null,this._cancelButton=null,this._pendingResolve=null,this._modalObserver=null,this._lastAction=null,this._onConfirmClick=null,this._onCancelClick=null}connectedCallback(){this._ensureModal(),this._observeModalOpenState()}disconnectedCallback(){this._modalObserver&&=(this._modalObserver.disconnect(),null),this._pendingResolve=null}async showConfirm(e){if(this._ensureModal(),!this._modal||!this._confirmButton||!this._cancelButton)return!1;let t=e.question?.trim()||`Are you sure?`,n=e.tone||`action`,r=e.confirmLabel?.trim()||`Confirm`,i=e.cancelLabel?.trim()||`Cancel`;this._lastAction=null,this._modal.setAttribute(`heading`,t),this._cancelButton.className=`mint-button-core mint-button-ghost mint-button-tone-neutral mint-confirm-action-cancel`,this._confirmButton.className=`mint-button-core mint-button-solid mint-button-tone-${n} mint-confirm-action-confirm`,this._confirmButton.textContent=r,this._cancelButton.textContent=i;let a=new Promise(e=>{this._pendingResolve=e});return requestAnimationFrame(()=>{this._modal.open?.(),this._mountActionsFooter()}),a}_ensureModal(){this._modal||(this._modal=document.createElement(`mint-modal`),this._modal.setAttribute(`heading`,`Are you sure?`),this._modal.setAttribute(`size`,`small`),this._cancelButton=document.createElement(`button`),this._cancelButton.type=`button`,this._cancelButton.className=`mint-button-core mint-button-ghost mint-button-tone-neutral mint-confirm-action-cancel`,this._cancelButton.textContent=`Cancel`,this._confirmButton=document.createElement(`button`),this._confirmButton.type=`button`,this._confirmButton.className=`mint-button-core mint-button-solid mint-button-tone-action mint-confirm-action-confirm`,this._confirmButton.textContent=`Confirm`,this._actionsFooter=document.createElement(`div`),this._actionsFooter.className=`mint-confirm-action-footer`,this._actionsFooter.append(this._cancelButton,this._confirmButton),this._onCancelClick=()=>{this._lastAction=`cancel`,this._modal?.close?.()},this._onConfirmClick=()=>{this._lastAction=`confirm`,this._modal?.close?.()},this._cancelButton.addEventListener(`click`,this._onCancelClick),this._confirmButton.addEventListener(`click`,this._onConfirmClick),this.appendChild(this._modal))}_mountActionsFooter(){let e=this._modal?.querySelector(`.modal-content`);!e||!this._actionsFooter||(e.querySelectorAll(`:scope > [slot="body"], :scope > [slot="actions"]`).forEach(e=>{!e.textContent?.trim()&&!e.querySelector(`button, mint-button, a, input, select, textarea`)&&e.remove()}),this._actionsFooter.parentElement!==e&&e.appendChild(this._actionsFooter))}_observeModalOpenState(){!this._modal||this._modalObserver||(this._modalObserver=new MutationObserver(()=>{if((this._modal?.hasAttribute(`open`)??!1)||!this._pendingResolve)return;let e=this._pendingResolve;this._pendingResolve=null;let t=this._lastAction===`confirm`;this._lastAction=null,e(t)}),this._modalObserver.observe(this._modal,{attributes:!0,attributeFilter:[`open`]}))}};customElements.get(`mint-confirm-action`)||e.t(`mint-confirm-action`,t);var n=[],r=!1;function i(){return typeof document>`u`||document.body?Promise.resolve():new Promise(e=>{if(typeof window>`u`){e();return}window.addEventListener(`DOMContentLoaded`,()=>e(),{once:!0})})}async function a(){if(await i(),typeof document>`u`)throw Error(`mintui.confirm is only available in browser environments.`);let e=document.querySelector(`mint-confirm-action[data-mint-confirm-action-root="true"]`);if(e)return e;let t=document.createElement(`mint-confirm-action`);return t.setAttribute(`data-mint-confirm-action-root`,`true`),document.body.appendChild(t),t}function o(e){let t=(e||`action`).toString().trim().toLowerCase().replace(/^tone:\s*/,``);return t===`action`||t===`info`||t===`warning`||t===`danger`?t:`action`}async function s(){if(!r){r=!0;try{for(;n.length>0;){let e=n.shift();e&&(await(await a()).showConfirm({question:e.question,tone:o(e.tone),confirmLabel:e.confirmLabel||`Confirm`,cancelLabel:e.cancelLabel||`Cancel`})?e.confirmed?.():e.cancelled?.())}}finally{r=!1}}}function c(e,t,r,i=`action`,a=`Confirm`,o=`Cancel`){typeof window>`u`||(n.push({question:e,confirmed:t,cancelled:r,tone:i,confirmLabel:a,cancelLabel:o}),s())}if(typeof window<`u`){let e=window.mintui||{};e.confirm=c,window.mintui=e}exports.confirm=c,exports.default=t;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { default, MintConfirmAction } from './ConfirmAction'
|
|
2
|
+
export { confirm } from '../../mintui-elements'
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"file": "index.d.ts",
|
|
4
|
+
"sourceRoot": "",
|
|
5
|
+
"sources": [
|
|
6
|
+
"index.d.ts"
|
|
7
|
+
],
|
|
8
|
+
"names": [],
|
|
9
|
+
"mappings": "AAAA"
|
|
10
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import '../../theme.css'
|
|
2
|
+
import '../../modal.css'
|
|
3
|
+
import '../../button.css'
|
|
4
|
+
import '../../spinner.css'
|
|
5
|
+
import '../../icon.css'
|
|
6
|
+
import '../../text.css'
|
|
7
|
+
import '../../stack.css'
|
|
8
|
+
import '../../confirm-action.css'
|
|
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/modal-B8gNdwEl.js";
|
|
13
|
+
//#region src/components/confirm-action/ConfirmAction.ts
|
|
14
|
+
var t = class extends HTMLElement {
|
|
15
|
+
constructor(...e) {
|
|
16
|
+
super(...e), this._modal = null, this._actionsFooter = null, this._confirmButton = null, this._cancelButton = null, this._pendingResolve = null, this._modalObserver = null, this._lastAction = null, this._onConfirmClick = null, this._onCancelClick = null;
|
|
17
|
+
}
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
this._ensureModal(), this._observeModalOpenState();
|
|
20
|
+
}
|
|
21
|
+
disconnectedCallback() {
|
|
22
|
+
this._modalObserver &&= (this._modalObserver.disconnect(), null), this._pendingResolve = null;
|
|
23
|
+
}
|
|
24
|
+
async showConfirm(e) {
|
|
25
|
+
if (this._ensureModal(), !this._modal || !this._confirmButton || !this._cancelButton) return !1;
|
|
26
|
+
let t = e.question?.trim() || "Are you sure?", n = e.tone || "action", r = e.confirmLabel?.trim() || "Confirm", i = e.cancelLabel?.trim() || "Cancel";
|
|
27
|
+
this._lastAction = null, this._modal.setAttribute("heading", t), this._cancelButton.className = "mint-button-core mint-button-ghost mint-button-tone-neutral mint-confirm-action-cancel", this._confirmButton.className = `mint-button-core mint-button-solid mint-button-tone-${n} mint-confirm-action-confirm`, this._confirmButton.textContent = r, this._cancelButton.textContent = i;
|
|
28
|
+
let a = new Promise((e) => {
|
|
29
|
+
this._pendingResolve = e;
|
|
30
|
+
});
|
|
31
|
+
return requestAnimationFrame(() => {
|
|
32
|
+
this._modal.open?.(), this._mountActionsFooter();
|
|
33
|
+
}), a;
|
|
34
|
+
}
|
|
35
|
+
_ensureModal() {
|
|
36
|
+
this._modal || (this._modal = document.createElement("mint-modal"), this._modal.setAttribute("heading", "Are you sure?"), this._modal.setAttribute("size", "small"), this._cancelButton = document.createElement("button"), this._cancelButton.type = "button", this._cancelButton.className = "mint-button-core mint-button-ghost mint-button-tone-neutral mint-confirm-action-cancel", this._cancelButton.textContent = "Cancel", this._confirmButton = document.createElement("button"), this._confirmButton.type = "button", this._confirmButton.className = "mint-button-core mint-button-solid mint-button-tone-action mint-confirm-action-confirm", this._confirmButton.textContent = "Confirm", this._actionsFooter = document.createElement("div"), this._actionsFooter.className = "mint-confirm-action-footer", this._actionsFooter.append(this._cancelButton, this._confirmButton), this._onCancelClick = () => {
|
|
37
|
+
this._lastAction = "cancel", this._modal?.close?.();
|
|
38
|
+
}, this._onConfirmClick = () => {
|
|
39
|
+
this._lastAction = "confirm", this._modal?.close?.();
|
|
40
|
+
}, this._cancelButton.addEventListener("click", this._onCancelClick), this._confirmButton.addEventListener("click", this._onConfirmClick), this.appendChild(this._modal));
|
|
41
|
+
}
|
|
42
|
+
_mountActionsFooter() {
|
|
43
|
+
let e = this._modal?.querySelector(".modal-content");
|
|
44
|
+
!e || !this._actionsFooter || (e.querySelectorAll(":scope > [slot=\"body\"], :scope > [slot=\"actions\"]").forEach((e) => {
|
|
45
|
+
!e.textContent?.trim() && !e.querySelector("button, mint-button, a, input, select, textarea") && e.remove();
|
|
46
|
+
}), this._actionsFooter.parentElement !== e && e.appendChild(this._actionsFooter));
|
|
47
|
+
}
|
|
48
|
+
_observeModalOpenState() {
|
|
49
|
+
!this._modal || this._modalObserver || (this._modalObserver = new MutationObserver(() => {
|
|
50
|
+
if ((this._modal?.hasAttribute("open") ?? !1) || !this._pendingResolve) return;
|
|
51
|
+
let e = this._pendingResolve;
|
|
52
|
+
this._pendingResolve = null;
|
|
53
|
+
let t = this._lastAction === "confirm";
|
|
54
|
+
this._lastAction = null, e(t);
|
|
55
|
+
}), this._modalObserver.observe(this._modal, {
|
|
56
|
+
attributes: !0,
|
|
57
|
+
attributeFilter: ["open"]
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
customElements.get("mint-confirm-action") || e("mint-confirm-action", t);
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/components/confirm-action/ConfirmActionApi.ts
|
|
64
|
+
var n = [], r = !1;
|
|
65
|
+
function i() {
|
|
66
|
+
return typeof document > "u" || document.body ? Promise.resolve() : new Promise((e) => {
|
|
67
|
+
if (typeof window > "u") {
|
|
68
|
+
e();
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
window.addEventListener("DOMContentLoaded", () => e(), { once: !0 });
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
async function a() {
|
|
75
|
+
if (await i(), typeof document > "u") throw Error("mintui.confirm is only available in browser environments.");
|
|
76
|
+
let e = document.querySelector("mint-confirm-action[data-mint-confirm-action-root=\"true\"]");
|
|
77
|
+
if (e) return e;
|
|
78
|
+
let t = document.createElement("mint-confirm-action");
|
|
79
|
+
return t.setAttribute("data-mint-confirm-action-root", "true"), document.body.appendChild(t), t;
|
|
80
|
+
}
|
|
81
|
+
function o(e) {
|
|
82
|
+
let t = (e || "action").toString().trim().toLowerCase().replace(/^tone:\s*/, "");
|
|
83
|
+
return t === "action" || t === "info" || t === "warning" || t === "danger" ? t : "action";
|
|
84
|
+
}
|
|
85
|
+
async function s() {
|
|
86
|
+
if (!r) {
|
|
87
|
+
r = !0;
|
|
88
|
+
try {
|
|
89
|
+
for (; n.length > 0;) {
|
|
90
|
+
let e = n.shift();
|
|
91
|
+
e && (await (await a()).showConfirm({
|
|
92
|
+
question: e.question,
|
|
93
|
+
tone: o(e.tone),
|
|
94
|
+
confirmLabel: e.confirmLabel || "Confirm",
|
|
95
|
+
cancelLabel: e.cancelLabel || "Cancel"
|
|
96
|
+
}) ? e.confirmed?.() : e.cancelled?.());
|
|
97
|
+
}
|
|
98
|
+
} finally {
|
|
99
|
+
r = !1;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function c(e, t, r, i = "action", a = "Confirm", o = "Cancel") {
|
|
104
|
+
typeof window > "u" || (n.push({
|
|
105
|
+
question: e,
|
|
106
|
+
confirmed: t,
|
|
107
|
+
cancelled: r,
|
|
108
|
+
tone: i,
|
|
109
|
+
confirmLabel: a,
|
|
110
|
+
cancelLabel: o
|
|
111
|
+
}), s());
|
|
112
|
+
}
|
|
113
|
+
if (typeof window < "u") {
|
|
114
|
+
let e = window.mintui || {};
|
|
115
|
+
e.confirm = c, window.mintui = e;
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
export { c as confirm, t as default };
|
|
@@ -1,130 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import '../popover/index';
|
|
3
|
-
import '../icon/index';
|
|
4
|
-
interface DateShortcut {
|
|
5
|
-
label: string;
|
|
6
|
-
action: () => Date | {
|
|
7
|
-
start: Date;
|
|
8
|
-
end: Date;
|
|
9
|
-
} | null;
|
|
10
|
-
}
|
|
11
|
-
declare class MintDatePicker extends HTMLElement {
|
|
12
|
-
static get observedAttributes(): string[];
|
|
13
|
-
private _input;
|
|
14
|
-
private _textInput;
|
|
15
|
-
private _popover;
|
|
16
|
-
private _calendarContainer;
|
|
17
|
-
private _iconButton;
|
|
18
|
-
private _hiddenInput;
|
|
19
|
-
private _startPartInputs;
|
|
20
|
-
private _endPartInputs;
|
|
21
|
-
private _displayEl;
|
|
22
|
-
private _inputsWrapperEl;
|
|
23
|
-
private _fieldsContainer;
|
|
24
|
-
private _resetHandler;
|
|
25
|
-
private _isInputMode;
|
|
26
|
-
private _currentMonth;
|
|
27
|
-
private _currentYear;
|
|
28
|
-
private _viewMode;
|
|
29
|
-
private _selectedStartDate;
|
|
30
|
-
private _selectedEndDate;
|
|
31
|
-
private _isRange;
|
|
32
|
-
private _hoveredDate;
|
|
33
|
-
private _isHandlingClick;
|
|
34
|
-
private _touchStartDate;
|
|
35
|
-
private _touchStartElement;
|
|
36
|
-
private _isTouchActive;
|
|
37
|
-
private _resizeObserver;
|
|
38
|
-
private _popoverObserver;
|
|
39
|
-
private _focusTrapHandler;
|
|
40
|
-
private _escapeHandler;
|
|
41
|
-
constructor();
|
|
42
|
-
connectedCallback(): void;
|
|
43
|
-
disconnectedCallback(): void;
|
|
44
|
-
isLoading(): boolean;
|
|
45
|
-
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
46
|
-
getValue(): string;
|
|
47
|
-
setValue(value: string): void;
|
|
48
|
-
get value(): string;
|
|
49
|
-
set value(newValue: string);
|
|
50
|
-
getFormat(): string;
|
|
51
|
-
getLabel(): string;
|
|
52
|
-
getInfo(): string;
|
|
53
|
-
isDisabled(): boolean;
|
|
54
|
-
isReadonly(): boolean;
|
|
55
|
-
isRequired(): boolean;
|
|
56
|
-
hasError(): boolean;
|
|
57
|
-
getErrorMessage(): string;
|
|
58
|
-
isRange(): boolean;
|
|
59
|
-
getId(): string;
|
|
60
|
-
getName(): string;
|
|
61
|
-
getMin(): string;
|
|
62
|
-
getMax(): string;
|
|
63
|
-
getDisabledDates(): Date[];
|
|
64
|
-
getDisabledDateStrings(): string[];
|
|
65
|
-
disableDate(dates: string | string[]): void;
|
|
66
|
-
enableDate(dates: string | string[]): void;
|
|
67
|
-
getSelectionMode(): 'day' | 'week' | 'month';
|
|
68
|
-
getMode(): 'default' | 'month' | 'year';
|
|
69
|
-
getWeekStartDay(): number;
|
|
70
|
-
getDisplayFormat(): string;
|
|
71
|
-
getShortcuts(): DateShortcut[];
|
|
72
|
-
private _createShortcutAction;
|
|
73
|
-
private _getDefaultShortcuts;
|
|
74
|
-
private _getFormatTokens;
|
|
75
|
-
private _createPartInput;
|
|
76
|
-
private _buildValueFromParts;
|
|
77
|
-
private _applyDateToParts;
|
|
78
|
-
private _syncHiddenInput;
|
|
79
|
-
private _focusNext;
|
|
80
|
-
private _focusPrev;
|
|
81
|
-
private _attachPartInputHandlers;
|
|
82
|
-
private _splitRangeInput;
|
|
83
|
-
private _parseValue;
|
|
84
|
-
private _parseDateString;
|
|
85
|
-
private _formatDate;
|
|
86
|
-
private _formatDatePhp;
|
|
87
|
-
private _validateDateString;
|
|
88
|
-
render(): void;
|
|
89
|
-
private _renderErrorState;
|
|
90
|
-
private _applyErrorVisuals;
|
|
91
|
-
private _attachFormResetListener;
|
|
92
|
-
private _clearPartInputs;
|
|
93
|
-
private _getFieldContainerClass;
|
|
94
|
-
private _handleInputChange;
|
|
95
|
-
private _cleanInputValue;
|
|
96
|
-
private _handleBlur;
|
|
97
|
-
private _setupPopoverWithRetry;
|
|
98
|
-
private _createPopover;
|
|
99
|
-
private _buildCalendar;
|
|
100
|
-
private _buildCalendarView;
|
|
101
|
-
private _buildMonthView;
|
|
102
|
-
private _buildYearView;
|
|
103
|
-
private _getDaysInMonth;
|
|
104
|
-
private _getFirstDayOfMonth;
|
|
105
|
-
private _isToday;
|
|
106
|
-
private _isDateSelected;
|
|
107
|
-
private _isDateInRange;
|
|
108
|
-
private _rangeIncludesDisabledDates;
|
|
109
|
-
private _findFirstDisabledDateInRange;
|
|
110
|
-
private _hasIncompleteRange;
|
|
111
|
-
private _isSameDate;
|
|
112
|
-
private _isDateDisabled;
|
|
113
|
-
private _dispatchMonthChangeEvent;
|
|
114
|
-
private _dispatchDateChangeEvent;
|
|
115
|
-
private _setupContainerObserver;
|
|
116
|
-
private _getWeekStart;
|
|
117
|
-
private _getWeekEnd;
|
|
118
|
-
private _getMonthStart;
|
|
119
|
-
private _getMonthEnd;
|
|
120
|
-
private _handleDateClick;
|
|
121
|
-
private _updateDisplayText;
|
|
122
|
-
private _enterInputMode;
|
|
123
|
-
private _exitInputMode;
|
|
124
|
-
private _renderSkeleton;
|
|
125
|
-
private _getFocusableElements;
|
|
126
|
-
private _setupFocusTrap;
|
|
127
|
-
private _removeFocusTrap;
|
|
128
|
-
}
|
|
129
|
-
export default MintDatePicker;
|
|
130
|
-
//# sourceMappingURL=DatePicker.d.ts.map
|
|
1
|
+
export { MintDatePicker as default, MintDatePicker } from '../../mintui-elements'
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"file": "DatePicker.d.ts",
|
|
4
|
+
"sourceRoot": "",
|
|
5
|
+
"sources": [
|
|
6
|
+
"DatePicker.d.ts"
|
|
7
|
+
],
|
|
8
|
+
"names": [],
|
|
9
|
+
"mappings": "AAAA"
|
|
10
|
+
}
|