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,343 @@
|
|
|
1
|
+
import '../../theme.css'
|
|
2
|
+
import '../../icon.css'
|
|
3
|
+
import '../../dropzone.css'
|
|
4
|
+
import { a as e } from "../chunks/icon-gQAtsERy.js";
|
|
5
|
+
import { t } from "../chunks/register-element-BFYmIynH.js";
|
|
6
|
+
import "../chunks/icon-C0OLmjDY.js";
|
|
7
|
+
import "../chunks/close-Dg6U0IjZ.js";
|
|
8
|
+
e({
|
|
9
|
+
name: "upload",
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
path: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12",
|
|
12
|
+
strokeLinecap: "round",
|
|
13
|
+
strokeLinejoin: "round"
|
|
14
|
+
}), e({
|
|
15
|
+
name: "attach",
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
path: "M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13",
|
|
18
|
+
strokeLinecap: "round",
|
|
19
|
+
strokeLinejoin: "round"
|
|
20
|
+
});
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/dropzone/Dropzone.ts
|
|
23
|
+
var n = class extends HTMLElement {
|
|
24
|
+
static get observedAttributes() {
|
|
25
|
+
return [
|
|
26
|
+
"label",
|
|
27
|
+
"accept",
|
|
28
|
+
"multiple",
|
|
29
|
+
"width",
|
|
30
|
+
"height",
|
|
31
|
+
"disabled",
|
|
32
|
+
"name",
|
|
33
|
+
"error",
|
|
34
|
+
"error-message",
|
|
35
|
+
"loading",
|
|
36
|
+
"aria-label",
|
|
37
|
+
"aria-describedby"
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
constructor() {
|
|
41
|
+
super(), this._dropzone = null, this._fileInput = null, this._previewContainer = null, this._isDragging = !1, this._wasDragging = !1, this._isUpdatingFiles = !1, this._listenersInitialized = !1, this._selectedFiles = [], this._previewUrls = [], this._resetHandler = null, this._a11yId = `mint-dropzone-${Math.random().toString(36).slice(2, 10)}`;
|
|
42
|
+
}
|
|
43
|
+
connectedCallback() {
|
|
44
|
+
this.classList.add("mint-dropzone"), this.render(), this._attachFormResetListener();
|
|
45
|
+
}
|
|
46
|
+
disconnectedCallback() {
|
|
47
|
+
if (this.removeEventListeners(), this._cleanupPreviewUrls(), this._resetHandler) {
|
|
48
|
+
let e = this.closest("form");
|
|
49
|
+
e && e.removeEventListener("reset", this._resetHandler), this._resetHandler = null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
attributeChangedCallback(e, t, n) {
|
|
53
|
+
if (t !== n) {
|
|
54
|
+
if (e === "error" || e === "error-message") {
|
|
55
|
+
this._updateDragStateClass(), this._renderErrorState(this.hasError(), this.getErrorMessage());
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (e === "loading") {
|
|
59
|
+
this.render();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
this.render();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
getLabel() {
|
|
66
|
+
return this.getAttribute("label") || "";
|
|
67
|
+
}
|
|
68
|
+
getAccept() {
|
|
69
|
+
return this.getAttribute("accept") || "";
|
|
70
|
+
}
|
|
71
|
+
isMultiple() {
|
|
72
|
+
return this.getAttribute("multiple") === "true";
|
|
73
|
+
}
|
|
74
|
+
getWidth() {
|
|
75
|
+
return this.getAttribute("width") || "200px";
|
|
76
|
+
}
|
|
77
|
+
getHeight() {
|
|
78
|
+
return this.getAttribute("height") || "200px";
|
|
79
|
+
}
|
|
80
|
+
_renderSkeleton(e) {
|
|
81
|
+
let t = this.querySelector(".mint-dropzone-skeleton-container"), n = this._dropzone;
|
|
82
|
+
if (e) {
|
|
83
|
+
this.classList.add("is-loading"), t || (t = document.createElement("div"), t.className = "mint-dropzone-skeleton-container", n ? (n.classList.add("is-positioned"), n.appendChild(t)) : this.appendChild(t));
|
|
84
|
+
let e = t.querySelector(".mint-dropzone-skeleton");
|
|
85
|
+
e || (e = document.createElement("div"), e.className = "mint-dropzone-skeleton", t.appendChild(e)), t.classList.add("is-visible"), n?.classList.add("is-loading");
|
|
86
|
+
} else this.classList.remove("is-loading"), t && t.classList.remove("is-visible"), n?.classList.remove("is-loading");
|
|
87
|
+
}
|
|
88
|
+
getName() {
|
|
89
|
+
return this.getAttribute("name") || "";
|
|
90
|
+
}
|
|
91
|
+
hasError() {
|
|
92
|
+
return this.getAttribute("error") === "true";
|
|
93
|
+
}
|
|
94
|
+
getErrorMessage() {
|
|
95
|
+
return this.getAttribute("error-message") || "";
|
|
96
|
+
}
|
|
97
|
+
isDisabled() {
|
|
98
|
+
return this.getAttribute("disabled") === "true";
|
|
99
|
+
}
|
|
100
|
+
isLoading() {
|
|
101
|
+
return this.getAttribute("loading") === "true";
|
|
102
|
+
}
|
|
103
|
+
render() {
|
|
104
|
+
let e = this.isLoading(), t = this.getLabel(), n = this.getAccept(), r = this.isMultiple(), i = this.isDisabled(), a = this.getWidth(), o = this.getHeight(), s = this.getName(), c = this.hasError(), l = this.getErrorMessage();
|
|
105
|
+
if (this._dropzone || (this._dropzone = document.createElement("div"), this.appendChild(this._dropzone)), this._updateDragStateClass(), this._dropzone.setAttribute("aria-invalid", c ? "true" : "false"), i) this._dropzone.setAttribute("tabindex", "-1"), this._dropzone.removeAttribute("role");
|
|
106
|
+
else {
|
|
107
|
+
this._dropzone.setAttribute("tabindex", "0"), this._dropzone.setAttribute("role", "button"), this._dropzone.setAttribute("aria-label", this.getAttribute("aria-label") || t || "File upload dropzone");
|
|
108
|
+
let e = (this.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean), n = this.querySelector(".mint-dropzone-error");
|
|
109
|
+
n && (n.id = `${this.id || this._a11yId}-error`, e.push(n.id)), e.length ? this._dropzone.setAttribute("aria-describedby", Array.from(new Set(e)).join(" ")) : this._dropzone.removeAttribute("aria-describedby");
|
|
110
|
+
}
|
|
111
|
+
this._dropzone.style.width = a, this._dropzone.style.height = o, this._dropzone.style.minWidth = a, this._dropzone.style.minHeight = o, this._fileInput || (this._fileInput = document.createElement("input"), this._fileInput.type = "file", this._fileInput.className = "mint-dropzone-file-input", this._fileInput.setAttribute("tabindex", "-1"), this._fileInput.setAttribute("aria-hidden", "true"), this._dropzone.appendChild(this._fileInput)), this._fileInput.accept = n, this._fileInput.multiple = r, this._fileInput.disabled = i, s ? this._fileInput.name = s : this._fileInput.removeAttribute("name"), this._fileInput.setAttribute("aria-invalid", c ? "true" : "false");
|
|
112
|
+
let u = this._dropzone.querySelector(".mint-dropzone-icon"), d = this._dropzone.querySelector(".mint-dropzone-label");
|
|
113
|
+
u && u.remove(), d && d.remove();
|
|
114
|
+
let f = document.createElement("div");
|
|
115
|
+
f.className = "mint-dropzone-icon";
|
|
116
|
+
let p = document.createElement("mint-icon");
|
|
117
|
+
if (p.setAttribute("name", "upload"), p.className = "mint-dropzone-upload-icon", f.appendChild(p), this._dropzone.appendChild(f), t) {
|
|
118
|
+
let e = document.createElement("div");
|
|
119
|
+
e.className = "mint-dropzone-label", e.textContent = t, this._dropzone.appendChild(e);
|
|
120
|
+
}
|
|
121
|
+
this.setupEventListeners(), this._renderErrorState(c, l), this._renderPreviews(), this._renderSkeleton(e);
|
|
122
|
+
}
|
|
123
|
+
_updateDragState() {
|
|
124
|
+
this._dropzone && this._updateDragStateClass();
|
|
125
|
+
}
|
|
126
|
+
_renderErrorState(e, t) {
|
|
127
|
+
let n = this.querySelector(".mint-dropzone-error");
|
|
128
|
+
if (e && t ? (n || (n = document.createElement("div"), n.className = "mint-dropzone-error", this.appendChild(n)), n.textContent = t) : n && n.remove(), this._dropzone) {
|
|
129
|
+
this._dropzone.setAttribute("aria-invalid", String(e)), n && (n.id = `${this.id || this._a11yId}-error`);
|
|
130
|
+
let t = (this.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean);
|
|
131
|
+
n && t.push(n.id), t.length ? this._dropzone.setAttribute("aria-describedby", Array.from(new Set(t)).join(" ")) : this._dropzone.removeAttribute("aria-describedby");
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
_updateDragStateClass() {
|
|
135
|
+
if (!this._dropzone) return;
|
|
136
|
+
let e = this.isDisabled(), t = this.hasError();
|
|
137
|
+
this._dropzone.className = "mint-dropzone-target", this._dropzone.classList.toggle("has-files", this._selectedFiles.length > 0), this._dropzone.classList.toggle("is-dragging", this._isDragging), this._dropzone.classList.toggle("has-error", t), this._dropzone.classList.toggle("is-disabled", e);
|
|
138
|
+
}
|
|
139
|
+
setupEventListeners() {
|
|
140
|
+
this._listenersInitialized || (this._listenersInitialized = !0, this.removeEventListeners(), !(!this._dropzone || !this._fileInput || this.isDisabled()) && (this._onDropzoneClick ||= (e) => {
|
|
141
|
+
if (!(this.isDisabled() || !this._fileInput) && e.target !== this._fileInput && (e.stopPropagation(), e.preventDefault(), e.isTrusted)) try {
|
|
142
|
+
this._fileInput.click();
|
|
143
|
+
} catch (e) {
|
|
144
|
+
console.debug("File chooser blocked:", e);
|
|
145
|
+
}
|
|
146
|
+
}, this._onDragOver ||= (e) => {
|
|
147
|
+
e.preventDefault(), e.stopPropagation(), this.isDisabled() || this._isDragging || (this._isDragging = !0, this._wasDragging = !0, this._updateDragState());
|
|
148
|
+
}, this._onDragLeave ||= (e) => {
|
|
149
|
+
e.preventDefault(), e.stopPropagation();
|
|
150
|
+
let t = this._dropzone?.getBoundingClientRect();
|
|
151
|
+
t && (e.clientX < t.left || e.clientX > t.right || e.clientY < t.top || e.clientY > t.bottom) && this._isDragging && (this._isDragging = !1, this._wasDragging = !1, this._updateDragState());
|
|
152
|
+
}, this._onDrop ||= (e) => {
|
|
153
|
+
if (e.preventDefault(), e.stopPropagation(), this._isDragging && (this._isDragging = !1, this._wasDragging = !1, this._updateDragState()), this.isDisabled()) return;
|
|
154
|
+
let t = e.dataTransfer?.files;
|
|
155
|
+
t && t.length > 0 && this._handleFiles(t);
|
|
156
|
+
}, this._onFileInputInput ||= (e) => {
|
|
157
|
+
e.stopImmediatePropagation(), e.stopPropagation();
|
|
158
|
+
}, this._onKeyDown ||= (e) => {
|
|
159
|
+
if (!(this.isDisabled() || !this._fileInput) && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), e.isTrusted)) try {
|
|
160
|
+
this._fileInput.click();
|
|
161
|
+
} catch (e) {
|
|
162
|
+
console.debug("File chooser blocked:", e);
|
|
163
|
+
}
|
|
164
|
+
}, this._onFocus ||= (e) => {
|
|
165
|
+
this._dropzone && !this.isDisabled() && this._dropzone.classList.add("is-focused");
|
|
166
|
+
}, this._onBlur ||= (e) => {
|
|
167
|
+
this._dropzone;
|
|
168
|
+
}, this._onFileInputChange ||= (e) => {
|
|
169
|
+
if (e.stopImmediatePropagation(), e.stopPropagation(), this._isUpdatingFiles) return;
|
|
170
|
+
let t = e.target.files;
|
|
171
|
+
if (t && t.length > 0) {
|
|
172
|
+
let e = this.getAccept(), n = this.isMultiple(), r = [], i = [];
|
|
173
|
+
for (let n = 0; n < t.length; n++) {
|
|
174
|
+
let a = t[n];
|
|
175
|
+
this._isFileAccepted(a, e) ? r.push(a) : i.push(a);
|
|
176
|
+
}
|
|
177
|
+
if (!n && r.length > 1 && (i.push(...r.slice(1)), r.splice(1)), i.length > 0) {
|
|
178
|
+
let e = new CustomEvent("dropRejected", {
|
|
179
|
+
detail: {
|
|
180
|
+
files: i,
|
|
181
|
+
reason: "File type not accepted or multiple files not allowed"
|
|
182
|
+
},
|
|
183
|
+
bubbles: !0,
|
|
184
|
+
cancelable: !0
|
|
185
|
+
});
|
|
186
|
+
this.dispatchEvent(e);
|
|
187
|
+
}
|
|
188
|
+
r.length > 0 && this._applyValidFiles(r);
|
|
189
|
+
}
|
|
190
|
+
}, this._dropzone.addEventListener("click", this._onDropzoneClick), this._dropzone.addEventListener("dragover", this._onDragOver), this._dropzone.addEventListener("dragleave", this._onDragLeave), this._dropzone.addEventListener("drop", this._onDrop), this._dropzone.addEventListener("keydown", this._onKeyDown), this._dropzone.addEventListener("focus", this._onFocus), this._dropzone.addEventListener("blur", this._onBlur), this._fileInput.addEventListener("change", this._onFileInputChange), this._fileInput.addEventListener("input", this._onFileInputInput, !0)));
|
|
191
|
+
}
|
|
192
|
+
removeEventListeners() {
|
|
193
|
+
this._dropzone && (this._onDropzoneClick && this._dropzone.removeEventListener("click", this._onDropzoneClick), this._onDragOver && this._dropzone.removeEventListener("dragover", this._onDragOver), this._onDragLeave && this._dropzone.removeEventListener("dragleave", this._onDragLeave), this._onDrop && this._dropzone.removeEventListener("drop", this._onDrop), this._onKeyDown && this._dropzone.removeEventListener("keydown", this._onKeyDown), this._onFocus && this._dropzone.removeEventListener("focus", this._onFocus), this._onBlur && this._dropzone.removeEventListener("blur", this._onBlur)), this._fileInput && (this._onFileInputChange && this._fileInput.removeEventListener("change", this._onFileInputChange), this._onFileInputInput && this._fileInput.removeEventListener("input", this._onFileInputInput, !0)), this._isDragging = !1, this._listenersInitialized = !1;
|
|
194
|
+
}
|
|
195
|
+
_handleFiles(e) {
|
|
196
|
+
let t = this.getAccept(), n = this.isMultiple(), r = [], i = [];
|
|
197
|
+
for (let n = 0; n < e.length; n++) {
|
|
198
|
+
let a = e[n];
|
|
199
|
+
this._isFileAccepted(a, t) ? r.push(a) : i.push(a);
|
|
200
|
+
}
|
|
201
|
+
if (!n && r.length > 1 && (i.push(...r.slice(1)), r.splice(1)), i.length > 0) {
|
|
202
|
+
let e = new CustomEvent("dropRejected", {
|
|
203
|
+
detail: {
|
|
204
|
+
files: i,
|
|
205
|
+
reason: "File type not accepted or multiple files not allowed"
|
|
206
|
+
},
|
|
207
|
+
bubbles: !0,
|
|
208
|
+
cancelable: !0
|
|
209
|
+
});
|
|
210
|
+
this.dispatchEvent(e);
|
|
211
|
+
}
|
|
212
|
+
r.length > 0 && this._applyValidFiles(r);
|
|
213
|
+
}
|
|
214
|
+
_isFileAccepted(e, t) {
|
|
215
|
+
if (!t) return !0;
|
|
216
|
+
let n = t.split(",").map((e) => e.trim().toLowerCase());
|
|
217
|
+
for (let t of n) if (t.startsWith(".")) {
|
|
218
|
+
if ("." + e.name.split(".").pop()?.toLowerCase() === t) return !0;
|
|
219
|
+
} else if (t.includes("/*")) {
|
|
220
|
+
if (t.split("/")[0] === e.type.split("/")[0]) return !0;
|
|
221
|
+
} else if (e.type === t) return !0;
|
|
222
|
+
return !1;
|
|
223
|
+
}
|
|
224
|
+
_dispatchEvent(e, t) {
|
|
225
|
+
let n = t.target, r = new CustomEvent(e, {
|
|
226
|
+
detail: {
|
|
227
|
+
files: n.files ? Array.from(n.files) : [],
|
|
228
|
+
value: n.value || ""
|
|
229
|
+
},
|
|
230
|
+
bubbles: !0,
|
|
231
|
+
cancelable: !0
|
|
232
|
+
});
|
|
233
|
+
this.dispatchEvent(r);
|
|
234
|
+
}
|
|
235
|
+
_dispatchSelectionEvents() {
|
|
236
|
+
let e = {
|
|
237
|
+
files: [...this._selectedFiles],
|
|
238
|
+
value: ""
|
|
239
|
+
};
|
|
240
|
+
this.dispatchEvent(new CustomEvent("input", {
|
|
241
|
+
detail: e,
|
|
242
|
+
bubbles: !0,
|
|
243
|
+
cancelable: !0,
|
|
244
|
+
composed: !0
|
|
245
|
+
})), this.dispatchEvent(new CustomEvent("change", {
|
|
246
|
+
detail: e,
|
|
247
|
+
bubbles: !0,
|
|
248
|
+
cancelable: !0,
|
|
249
|
+
composed: !0
|
|
250
|
+
}));
|
|
251
|
+
}
|
|
252
|
+
_syncFileInputFromSelected() {
|
|
253
|
+
if (!this._fileInput) return;
|
|
254
|
+
let e = new DataTransfer();
|
|
255
|
+
this._selectedFiles.forEach((t) => {
|
|
256
|
+
try {
|
|
257
|
+
e.items.add(t);
|
|
258
|
+
} catch (e) {
|
|
259
|
+
console.warn("Failed to add file to DataTransfer:", e);
|
|
260
|
+
}
|
|
261
|
+
}), this._isUpdatingFiles = !0;
|
|
262
|
+
try {
|
|
263
|
+
this._fileInput.files = e.files;
|
|
264
|
+
} catch (e) {
|
|
265
|
+
console.warn("Failed to set files on input:", e);
|
|
266
|
+
}
|
|
267
|
+
setTimeout(() => {
|
|
268
|
+
this._isUpdatingFiles = !1;
|
|
269
|
+
}, 0);
|
|
270
|
+
}
|
|
271
|
+
get files() {
|
|
272
|
+
return this._syncFileInputFromSelected(), this._fileInput?.files || null;
|
|
273
|
+
}
|
|
274
|
+
syncFiles() {
|
|
275
|
+
this._syncFileInputFromSelected();
|
|
276
|
+
}
|
|
277
|
+
_renderPreviews() {
|
|
278
|
+
if (!this._dropzone) return;
|
|
279
|
+
if (this._previewContainer && (this._cleanupPreviewUrls(), this._previewContainer.remove()), this._selectedFiles.length === 0) {
|
|
280
|
+
this._previewContainer = null, this._updateDragStateClass();
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
let e = document.createElement("div");
|
|
284
|
+
e.className = "mint-dropzone-previews-wrapper", e.classList.toggle("has-error", this.hasError()), e.classList.toggle("is-dragging", this._isDragging);
|
|
285
|
+
let t = document.createElement("div");
|
|
286
|
+
t.className = "mint-dropzone-previews", this._selectedFiles.forEach((e, n) => {
|
|
287
|
+
let r = document.createElement("div");
|
|
288
|
+
if (r.className = "mint-dropzone-file", e.type.startsWith("image/")) {
|
|
289
|
+
let t = document.createElement("img");
|
|
290
|
+
t.className = "mint-dropzone-file-image";
|
|
291
|
+
let n = URL.createObjectURL(e);
|
|
292
|
+
this._previewUrls.push(n), t.src = n, r.appendChild(t);
|
|
293
|
+
} else {
|
|
294
|
+
let e = document.createElement("mint-icon");
|
|
295
|
+
e.setAttribute("name", "attach"), e.className = "mint-dropzone-file-icon", r.appendChild(e);
|
|
296
|
+
}
|
|
297
|
+
let i = document.createElement("div");
|
|
298
|
+
i.className = "mint-dropzone-file-name", i.textContent = e.name, r.appendChild(i);
|
|
299
|
+
let a = document.createElement("button");
|
|
300
|
+
a.type = "button", a.className = "mint-dropzone-file-remove";
|
|
301
|
+
let o = document.createElement("mint-icon");
|
|
302
|
+
o.setAttribute("name", "close"), o.className = "mint-dropzone-file-remove-icon", a.appendChild(o), a.addEventListener("click", (e) => {
|
|
303
|
+
e.preventDefault(), e.stopPropagation(), this._removeFileAt(n);
|
|
304
|
+
}), r.appendChild(a), t.appendChild(r);
|
|
305
|
+
});
|
|
306
|
+
let n = document.createElement("div");
|
|
307
|
+
n.className = "mint-dropzone-preview-fade is-top", e.appendChild(n);
|
|
308
|
+
let r = document.createElement("div");
|
|
309
|
+
r.className = "mint-dropzone-preview-fade is-bottom is-visible", e.appendChild(r);
|
|
310
|
+
let i = () => {
|
|
311
|
+
let e = t.scrollTop, i = t.scrollHeight, a = t.clientHeight;
|
|
312
|
+
e > 0 ? n.classList.add("is-visible") : n.classList.remove("is-visible"), e + a < i - 1 ? r.classList.add("is-visible") : r.classList.remove("is-visible");
|
|
313
|
+
};
|
|
314
|
+
i(), t.addEventListener("scroll", i), e.appendChild(t), this._previewContainer = e, this._dropzone.appendChild(e), this._updateDragStateClass();
|
|
315
|
+
}
|
|
316
|
+
_removeFileAt(e) {
|
|
317
|
+
if (e < 0 || e >= this._selectedFiles.length) return;
|
|
318
|
+
let [t] = this._selectedFiles.splice(e, 1);
|
|
319
|
+
t && this._cleanupPreviewUrls(), this._syncFileInputFromSelected(), this._renderPreviews(), this._dispatchSelectionEvents();
|
|
320
|
+
}
|
|
321
|
+
_cleanupPreviewUrls() {
|
|
322
|
+
this._previewUrls.forEach((e) => URL.revokeObjectURL(e)), this._previewUrls = [];
|
|
323
|
+
}
|
|
324
|
+
_attachFormResetListener() {
|
|
325
|
+
let e = this.closest("form");
|
|
326
|
+
!e || this._resetHandler || (this._resetHandler = () => {
|
|
327
|
+
this._selectedFiles = [], this._syncFileInputFromSelected(), this._renderPreviews(), this._cleanupPreviewUrls();
|
|
328
|
+
}, e.addEventListener("reset", this._resetHandler));
|
|
329
|
+
}
|
|
330
|
+
_applyValidFiles(e) {
|
|
331
|
+
if (this.isMultiple()) {
|
|
332
|
+
let t = e.filter((e) => !this._isDuplicateFile(e));
|
|
333
|
+
this._selectedFiles.push(...t);
|
|
334
|
+
} else this._selectedFiles = [e[0]];
|
|
335
|
+
this._syncFileInputFromSelected(), this._selectedFiles.length > 0 && (this.removeAttribute("error"), this.removeAttribute("error-message"), this._fileInput && this._fileInput.removeAttribute("aria-invalid")), this._renderPreviews(), this._dispatchSelectionEvents();
|
|
336
|
+
}
|
|
337
|
+
_isDuplicateFile(e) {
|
|
338
|
+
return this._selectedFiles.some((t) => t.name === e.name && t.size === e.size && t.lastModified === e.lastModified);
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
customElements.get("mint-dropzone") || t("mint-dropzone", n);
|
|
342
|
+
//#endregion
|
|
343
|
+
export { n as default };
|
|
@@ -1,133 +1 @@
|
|
|
1
|
-
|
|
2
|
-
static get observedAttributes(): string[];
|
|
3
|
-
private _form;
|
|
4
|
-
private _submitHandler;
|
|
5
|
-
private _hostSubmitHandler;
|
|
6
|
-
private _errors;
|
|
7
|
-
private _fieldBlurHandlers;
|
|
8
|
-
private _fieldChangeHandlers;
|
|
9
|
-
private _observer;
|
|
10
|
-
private _formData;
|
|
11
|
-
private _headers;
|
|
12
|
-
private _buttonStates;
|
|
13
|
-
/** Snapshot for `submitting` attribute (separate from built-in fetch button state). */
|
|
14
|
-
private _attrSubmittingMintFields;
|
|
15
|
-
private _attrSubmittingNativeFields;
|
|
16
|
-
private _attrSubmittingMintButtons;
|
|
17
|
-
private _attrSubmittingNativeButtons;
|
|
18
|
-
private _reactiveDataProxy;
|
|
19
|
-
private _reactiveDataObserver;
|
|
20
|
-
private _lastDataSnapshot;
|
|
21
|
-
private _lastAppliedDataSnapshot;
|
|
22
|
-
constructor();
|
|
23
|
-
connectedCallback(): void;
|
|
24
|
-
disconnectedCallback(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Public reset helper to restore all fields to their original values from the data property.
|
|
27
|
-
* This clears errors and re-applies the form data.
|
|
28
|
-
*/
|
|
29
|
-
reset(): void;
|
|
30
|
-
/**
|
|
31
|
-
* Public clear helper to completely clear all form values and errors.
|
|
32
|
-
* This resets all fields to empty/default values.
|
|
33
|
-
*/
|
|
34
|
-
clear(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Public submit helper to programmatically submit like an internal submit button.
|
|
37
|
-
* Triggers the same validation + submit event flow handled by this component.
|
|
38
|
-
*/
|
|
39
|
-
submit(): void;
|
|
40
|
-
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
41
|
-
get data(): Record<string, any> | null;
|
|
42
|
-
set data(value: Record<string, any> | null);
|
|
43
|
-
get headers(): Record<string, string> | null;
|
|
44
|
-
set headers(value: Record<string, string> | null);
|
|
45
|
-
private _render;
|
|
46
|
-
private _ensureSubmitHandler;
|
|
47
|
-
private _applyFormAttributes;
|
|
48
|
-
private _handleSubmit;
|
|
49
|
-
private _submitData;
|
|
50
|
-
private _applySuccessInterceptors;
|
|
51
|
-
private _applyErrorInterceptors;
|
|
52
|
-
private _formDataToValues;
|
|
53
|
-
/** Whether this element (or an ancestor within the form) is disabled for submission semantics. */
|
|
54
|
-
private _isControlDisabledForSubmit;
|
|
55
|
-
/**
|
|
56
|
-
* Snapshot current values from named fields using the same extraction logic as validation.
|
|
57
|
-
* Wins over reactive / FormData merges so submit payloads match what the user sees.
|
|
58
|
-
*/
|
|
59
|
-
private _collectLiveControlValues;
|
|
60
|
-
private _collectValidationRules;
|
|
61
|
-
private _parseRules;
|
|
62
|
-
private _validate;
|
|
63
|
-
private _validateField;
|
|
64
|
-
private _validateRules;
|
|
65
|
-
private _getFieldElements;
|
|
66
|
-
private _extractFieldValue;
|
|
67
|
-
private _flagFieldError;
|
|
68
|
-
private _clearFieldError;
|
|
69
|
-
private _clearErrors;
|
|
70
|
-
/**
|
|
71
|
-
* Public method to set form errors programmatically
|
|
72
|
-
* Can be called from event handlers to set validation errors
|
|
73
|
-
*/
|
|
74
|
-
setFormErrors(errors: Record<string, string | string[]>): void;
|
|
75
|
-
private _applyServerErrors;
|
|
76
|
-
private _parseFormData;
|
|
77
|
-
private _parseHeaders;
|
|
78
|
-
private _applyFormData;
|
|
79
|
-
private _applyValueToField;
|
|
80
|
-
private _resetCustomFields;
|
|
81
|
-
private _resolveHost;
|
|
82
|
-
private _setupBlurValidation;
|
|
83
|
-
private _findFieldElement;
|
|
84
|
-
private _getFieldName;
|
|
85
|
-
private _syncFieldToReactiveData;
|
|
86
|
-
private _normalizeReactiveValue;
|
|
87
|
-
private _cleanupBlurValidation;
|
|
88
|
-
private _syncDropzoneFiles;
|
|
89
|
-
private _isSubmittingAttrActive;
|
|
90
|
-
/**
|
|
91
|
-
* When `submitting` is set on mint-form: disable all fields and non-submit controls,
|
|
92
|
-
* set mint-button type=submit to loading (spinner) while preserving button dimensions.
|
|
93
|
-
*/
|
|
94
|
-
private _applySubmittingAttributeState;
|
|
95
|
-
private _restoreSubmittingAttributeState;
|
|
96
|
-
private _propagateLoadingState;
|
|
97
|
-
private _setButtonsSubmitting;
|
|
98
|
-
private _restoreButtonsState;
|
|
99
|
-
/**
|
|
100
|
-
* Check if an object might be reactive (from Vue, React, or other frameworks)
|
|
101
|
-
* Framework-agnostic detection based on common patterns
|
|
102
|
-
*/
|
|
103
|
-
private _isReactiveObject;
|
|
104
|
-
/**
|
|
105
|
-
* Create a deep snapshot of the data object for comparison
|
|
106
|
-
* Handles reactive objects by extracting their actual values
|
|
107
|
-
*/
|
|
108
|
-
private _createDataSnapshot;
|
|
109
|
-
/**
|
|
110
|
-
* Extract actual values from reactive objects recursively
|
|
111
|
-
*/
|
|
112
|
-
private _extractReactiveData;
|
|
113
|
-
/**
|
|
114
|
-
* Check if data has changed by comparing current state with snapshot
|
|
115
|
-
*/
|
|
116
|
-
private _hasDataChanged;
|
|
117
|
-
/**
|
|
118
|
-
* Get the actual value from a potentially reactive object
|
|
119
|
-
* Handles Vue 3 refs, reactive, Vue 2, React state, and other reactivity systems
|
|
120
|
-
*/
|
|
121
|
-
private _getReactiveValue;
|
|
122
|
-
/**
|
|
123
|
-
* Set up observer for reactive data changes
|
|
124
|
-
* Works with Vue 3 (ref, reactive), Vue 2, React, and other reactivity systems
|
|
125
|
-
*/
|
|
126
|
-
private _setupReactiveDataObserver;
|
|
127
|
-
/**
|
|
128
|
-
* Stop observing reactive data changes
|
|
129
|
-
*/
|
|
130
|
-
private _stopReactiveDataObserver;
|
|
131
|
-
}
|
|
132
|
-
export default MintForm;
|
|
133
|
-
//# sourceMappingURL=Form.d.ts.map
|
|
1
|
+
export { MintForm as default, MintForm } from '../../mintui-elements'
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"file": "Form.d.ts",
|
|
4
|
+
"sourceRoot": "",
|
|
5
|
+
"sources": [
|
|
6
|
+
"Form.d.ts"
|
|
7
|
+
],
|
|
8
|
+
"names": [],
|
|
9
|
+
"mappings": "AAAA"
|
|
10
|
+
}
|