monobill-mintui 0.4.4 → 0.4.6
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 +207 -175
- package/dist/components/alert/Alert.d.ts +32 -0
- package/dist/components/alert/Alert.d.ts.map +1 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/alert/index.d.ts.map +1 -0
- package/dist/components/back-button/BackButton.d.ts +18 -0
- package/dist/components/back-button/BackButton.d.ts.map +1 -0
- package/dist/components/back-button/index.d.ts +3 -0
- package/dist/components/back-button/index.d.ts.map +1 -0
- package/dist/components/button/Button.d.ts +46 -1
- package/dist/components/button/Button.d.ts.map +1 -10
- package/dist/components/button/index.d.ts +3 -1
- package/dist/components/button/index.d.ts.map +1 -10
- package/dist/components/card/Card.d.ts +17 -1
- package/dist/components/card/Card.d.ts.map +1 -10
- package/dist/components/card/index.d.ts +3 -1
- package/dist/components/card/index.d.ts.map +1 -10
- package/dist/components/chart/Chart.d.ts +277 -0
- package/dist/components/chart/Chart.d.ts.map +1 -0
- package/dist/components/chart/index.d.ts +3 -0
- package/dist/components/chart/index.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +41 -1
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -10
- package/dist/components/checkbox/index.d.ts +3 -1
- package/dist/components/checkbox/index.d.ts.map +1 -10
- package/dist/components/chip/Chip.d.ts +15 -0
- package/dist/components/chip/Chip.d.ts.map +1 -0
- package/dist/components/chip/index.d.ts +3 -0
- package/dist/components/chip/index.d.ts.map +1 -0
- package/dist/components/choice/Choice.d.ts +27 -1
- package/dist/components/choice/Choice.d.ts.map +1 -10
- package/dist/components/choice/ChoiceOption.d.ts +30 -0
- package/dist/components/choice/ChoiceOption.d.ts.map +1 -0
- package/dist/components/choice/index.d.ts +5 -1
- package/dist/components/choice/index.d.ts.map +1 -10
- package/dist/components/clickable/Clickable.d.ts +14 -0
- package/dist/components/clickable/Clickable.d.ts.map +1 -0
- package/dist/components/clickable/index.d.ts +3 -0
- package/dist/components/clickable/index.d.ts.map +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +130 -0
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -0
- package/dist/components/date-picker/index.d.ts +3 -0
- package/dist/components/date-picker/index.d.ts.map +1 -0
- package/dist/components/dropzone/Dropzone.d.ts +59 -0
- package/dist/components/dropzone/Dropzone.d.ts.map +1 -0
- package/dist/components/dropzone/index.d.ts +3 -0
- package/dist/components/dropzone/index.d.ts.map +1 -0
- package/dist/components/form/Form.d.ts +106 -0
- package/dist/components/form/Form.d.ts.map +1 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/form/index.d.ts.map +1 -0
- package/dist/components/grid/Grid.d.ts +16 -1
- package/dist/components/grid/Grid.d.ts.map +1 -10
- package/dist/components/grid/index.d.ts +3 -1
- package/dist/components/grid/index.d.ts.map +1 -10
- package/dist/components/icon/Icon.d.ts +15 -1
- package/dist/components/icon/Icon.d.ts.map +1 -10
- package/dist/components/icon/build-icons.d.ts +2 -0
- package/dist/components/icon/build-icons.d.ts.map +1 -0
- package/dist/components/icon/icons/archive.d.ts +3 -0
- package/dist/components/icon/icons/archive.d.ts.map +1 -0
- package/dist/components/icon/icons/arrow-down.d.ts +3 -0
- package/dist/components/icon/icons/arrow-down.d.ts.map +1 -0
- package/dist/components/icon/icons/arrow-left.d.ts +3 -0
- package/dist/components/icon/icons/arrow-left.d.ts.map +1 -0
- package/dist/components/icon/icons/arrow-right.d.ts +3 -0
- package/dist/components/icon/icons/arrow-right.d.ts.map +1 -0
- package/dist/components/icon/icons/arrow-up.d.ts +3 -0
- package/dist/components/icon/icons/arrow-up.d.ts.map +1 -0
- package/dist/components/icon/icons/attach.d.ts +3 -0
- package/dist/components/icon/icons/attach.d.ts.map +1 -0
- package/dist/components/icon/icons/barcode.d.ts +3 -0
- package/dist/components/icon/icons/barcode.d.ts.map +1 -0
- package/dist/components/icon/icons/bookmark.d.ts +3 -0
- package/dist/components/icon/icons/bookmark.d.ts.map +1 -0
- package/dist/components/icon/icons/building.d.ts +3 -0
- package/dist/components/icon/icons/building.d.ts.map +1 -0
- package/dist/components/icon/icons/buildings.d.ts +3 -0
- package/dist/components/icon/icons/buildings.d.ts.map +1 -0
- package/dist/components/icon/icons/calendar-day.d.ts +3 -0
- package/dist/components/icon/icons/calendar-day.d.ts.map +1 -0
- package/dist/components/icon/icons/calendar-empty.d.ts +3 -0
- package/dist/components/icon/icons/calendar-empty.d.ts.map +1 -0
- package/dist/components/icon/icons/calendar-week.d.ts +3 -0
- package/dist/components/icon/icons/calendar-week.d.ts.map +1 -0
- package/dist/components/icon/icons/calendar.d.ts +3 -0
- package/dist/components/icon/icons/calendar.d.ts.map +1 -0
- package/dist/components/icon/icons/caret-down.d.ts +3 -0
- package/dist/components/icon/icons/caret-down.d.ts.map +1 -0
- package/dist/components/icon/icons/caret-left.d.ts +3 -0
- package/dist/components/icon/icons/caret-left.d.ts.map +1 -0
- package/dist/components/icon/icons/caret-right.d.ts +3 -0
- package/dist/components/icon/icons/caret-right.d.ts.map +1 -0
- package/dist/components/icon/icons/caret-up.d.ts +3 -0
- package/dist/components/icon/icons/caret-up.d.ts.map +1 -0
- package/dist/components/icon/icons/chat.d.ts +3 -0
- package/dist/components/icon/icons/chat.d.ts.map +1 -0
- package/dist/components/icon/icons/check.d.ts +3 -0
- package/dist/components/icon/icons/check.d.ts.map +1 -0
- package/dist/components/icon/icons/clock.d.ts +3 -0
- package/dist/components/icon/icons/clock.d.ts.map +1 -0
- package/dist/components/icon/icons/close.d.ts +3 -0
- package/dist/components/icon/icons/close.d.ts.map +1 -0
- package/dist/components/icon/icons/copy.d.ts +3 -0
- package/dist/components/icon/icons/copy.d.ts.map +1 -0
- package/dist/components/icon/icons/credit-card.d.ts +3 -0
- package/dist/components/icon/icons/credit-card.d.ts.map +1 -0
- package/dist/components/icon/icons/delete.d.ts +3 -0
- package/dist/components/icon/icons/delete.d.ts.map +1 -0
- package/dist/components/icon/icons/documentation.d.ts +3 -0
- package/dist/components/icon/icons/documentation.d.ts.map +1 -0
- package/dist/components/icon/icons/dollar-sign.d.ts +3 -0
- package/dist/components/icon/icons/dollar-sign.d.ts.map +1 -0
- package/dist/components/icon/icons/download.d.ts +3 -0
- package/dist/components/icon/icons/download.d.ts.map +1 -0
- package/dist/components/icon/icons/duplicate.d.ts +3 -0
- package/dist/components/icon/icons/duplicate.d.ts.map +1 -0
- package/dist/components/icon/icons/edit.d.ts +3 -0
- package/dist/components/icon/icons/edit.d.ts.map +1 -0
- package/dist/components/icon/icons/ellipsis.d.ts +3 -0
- package/dist/components/icon/icons/ellipsis.d.ts.map +1 -0
- package/dist/components/icon/icons/error.d.ts +3 -0
- package/dist/components/icon/icons/error.d.ts.map +1 -0
- package/dist/components/icon/icons/external-link.d.ts +3 -0
- package/dist/components/icon/icons/external-link.d.ts.map +1 -0
- package/dist/components/icon/icons/file.d.ts +3 -0
- package/dist/components/icon/icons/file.d.ts.map +1 -0
- package/dist/components/icon/icons/filter.d.ts +3 -0
- package/dist/components/icon/icons/filter.d.ts.map +1 -0
- package/dist/components/icon/icons/folder.d.ts +3 -0
- package/dist/components/icon/icons/folder.d.ts.map +1 -0
- package/dist/components/icon/icons/grid.d.ts +3 -0
- package/dist/components/icon/icons/grid.d.ts.map +1 -0
- package/dist/components/icon/icons/help.d.ts +3 -0
- package/dist/components/icon/icons/help.d.ts.map +1 -0
- package/dist/components/icon/icons/home.d.ts +3 -0
- package/dist/components/icon/icons/home.d.ts.map +1 -0
- package/dist/components/icon/icons/image.d.ts +3 -0
- package/dist/components/icon/icons/image.d.ts.map +1 -0
- package/dist/components/icon/icons/index.cjs +4 -0
- package/dist/components/icon/icons/index.d.ts +79 -0
- package/dist/components/icon/icons/index.d.ts.map +1 -0
- package/dist/components/{chunks/icon-a2ABTJf-.js → icon/icons/index.js} +215 -260
- package/dist/components/icon/icons/info.d.ts +3 -0
- package/dist/components/icon/icons/info.d.ts.map +1 -0
- package/dist/components/icon/icons/language.d.ts +3 -0
- package/dist/components/icon/icons/language.d.ts.map +1 -0
- package/dist/components/icon/icons/link.d.ts +3 -0
- package/dist/components/icon/icons/link.d.ts.map +1 -0
- package/dist/components/icon/icons/list.d.ts +3 -0
- package/dist/components/icon/icons/list.d.ts.map +1 -0
- package/dist/components/icon/icons/location.d.ts +3 -0
- package/dist/components/icon/icons/location.d.ts.map +1 -0
- package/dist/components/icon/icons/lock.d.ts +3 -0
- package/dist/components/icon/icons/lock.d.ts.map +1 -0
- package/dist/components/icon/icons/login.d.ts +3 -0
- package/dist/components/icon/icons/login.d.ts.map +1 -0
- package/dist/components/icon/icons/logout.d.ts +3 -0
- package/dist/components/icon/icons/logout.d.ts.map +1 -0
- package/dist/components/icon/icons/mail.d.ts +3 -0
- package/dist/components/icon/icons/mail.d.ts.map +1 -0
- package/dist/components/icon/icons/map.d.ts +3 -0
- package/dist/components/icon/icons/map.d.ts.map +1 -0
- package/dist/components/icon/icons/menu.d.ts +3 -0
- package/dist/components/icon/icons/menu.d.ts.map +1 -0
- package/dist/components/icon/icons/moon.d.ts +3 -0
- package/dist/components/icon/icons/moon.d.ts.map +1 -0
- package/dist/components/icon/icons/notifications.d.ts +3 -0
- package/dist/components/icon/icons/notifications.d.ts.map +1 -0
- package/dist/components/icon/icons/paste.d.ts +3 -0
- package/dist/components/icon/icons/paste.d.ts.map +1 -0
- package/dist/components/icon/icons/pin.d.ts +3 -0
- package/dist/components/icon/icons/pin.d.ts.map +1 -0
- package/dist/components/icon/icons/plus.d.ts +3 -0
- package/dist/components/icon/icons/plus.d.ts.map +1 -0
- package/dist/components/icon/icons/print.d.ts +3 -0
- package/dist/components/icon/icons/print.d.ts.map +1 -0
- package/dist/components/icon/icons/refresh.d.ts +3 -0
- package/dist/components/icon/icons/refresh.d.ts.map +1 -0
- package/dist/components/icon/icons/remove.d.ts +3 -0
- package/dist/components/icon/icons/remove.d.ts.map +1 -0
- package/dist/components/icon/icons/save.d.ts +3 -0
- package/dist/components/icon/icons/save.d.ts.map +1 -0
- package/dist/components/icon/icons/search.d.ts +3 -0
- package/dist/components/icon/icons/search.d.ts.map +1 -0
- package/dist/components/icon/icons/settings.d.ts +3 -0
- package/dist/components/icon/icons/settings.d.ts.map +1 -0
- package/dist/components/icon/icons/share.d.ts +3 -0
- package/dist/components/icon/icons/share.d.ts.map +1 -0
- package/dist/components/icon/icons/sort-arrows.d.ts +3 -0
- package/dist/components/icon/icons/sort-arrows.d.ts.map +1 -0
- package/dist/components/icon/icons/sort.d.ts +3 -0
- package/dist/components/icon/icons/sort.d.ts.map +1 -0
- package/dist/components/icon/icons/star.d.ts +3 -0
- package/dist/components/icon/icons/star.d.ts.map +1 -0
- package/dist/components/icon/icons/success.d.ts +3 -0
- package/dist/components/icon/icons/success.d.ts.map +1 -0
- package/dist/components/icon/icons/sun.d.ts +3 -0
- package/dist/components/icon/icons/sun.d.ts.map +1 -0
- package/dist/components/icon/icons/table.d.ts +3 -0
- package/dist/components/icon/icons/table.d.ts.map +1 -0
- package/dist/components/icon/icons/tag.d.ts +3 -0
- package/dist/components/icon/icons/tag.d.ts.map +1 -0
- package/dist/components/icon/icons/trash.d.ts +3 -0
- package/dist/components/icon/icons/trash.d.ts.map +1 -0
- package/dist/components/icon/icons/unlock.d.ts +3 -0
- package/dist/components/icon/icons/unlock.d.ts.map +1 -0
- package/dist/components/icon/icons/upload.d.ts +3 -0
- package/dist/components/icon/icons/upload.d.ts.map +1 -0
- package/dist/components/icon/icons/user-add.d.ts +3 -0
- package/dist/components/icon/icons/user-add.d.ts.map +1 -0
- package/dist/components/icon/icons/user.d.ts +3 -0
- package/dist/components/icon/icons/user.d.ts.map +1 -0
- package/dist/components/icon/icons/users.d.ts +3 -0
- package/dist/components/icon/icons/users.d.ts.map +1 -0
- package/dist/components/icon/icons/video.d.ts +3 -0
- package/dist/components/icon/icons/video.d.ts.map +1 -0
- package/dist/components/icon/icons/warning.d.ts +3 -0
- package/dist/components/icon/icons/warning.d.ts.map +1 -0
- package/dist/components/icon/index.d.ts +3 -2
- package/dist/components/icon/index.d.ts.map +1 -10
- package/dist/components/icon/registry.d.ts +15 -0
- package/dist/components/icon/registry.d.ts.map +1 -0
- package/dist/components/input/Input.d.ts +56 -0
- package/dist/components/input/Input.d.ts.map +1 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/link/Link.d.ts +16 -1
- package/dist/components/link/Link.d.ts.map +1 -10
- package/dist/components/link/index.d.ts +3 -1
- package/dist/components/link/index.d.ts.map +1 -10
- package/dist/components/modal/Modal.d.ts +32 -1
- package/dist/components/modal/Modal.d.ts.map +1 -10
- package/dist/components/modal/index.d.ts +3 -1
- package/dist/components/modal/index.d.ts.map +1 -10
- package/dist/components/off-canvas/OffCanvas.d.ts +42 -0
- package/dist/components/off-canvas/OffCanvas.d.ts.map +1 -0
- package/dist/components/off-canvas/index.d.ts +3 -0
- package/dist/components/off-canvas/index.d.ts.map +1 -0
- package/dist/components/page/Page.d.ts +29 -1
- package/dist/components/page/Page.d.ts.map +1 -10
- package/dist/components/page/index.d.ts +3 -1
- package/dist/components/page/index.d.ts.map +1 -10
- package/dist/components/popover/Popover.d.ts +48 -1
- package/dist/components/popover/Popover.d.ts.map +1 -10
- package/dist/components/popover/index.d.ts +3 -1
- package/dist/components/popover/index.d.ts.map +1 -10
- package/dist/components/resource-table/ResourceTable.d.ts +159 -0
- package/dist/components/resource-table/ResourceTable.d.ts.map +1 -0
- package/dist/components/resource-table/index.d.ts +3 -0
- package/dist/components/resource-table/index.d.ts.map +1 -0
- package/dist/components/select/Select.d.ts +34 -0
- package/dist/components/select/Select.d.ts.map +1 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/side-navigation/SideNavigation.d.ts +22 -0
- package/dist/components/side-navigation/SideNavigation.d.ts.map +1 -0
- package/dist/components/side-navigation/SideNavigationActionHeader.d.ts +2 -0
- package/dist/components/side-navigation/SideNavigationActionHeader.d.ts.map +1 -0
- package/dist/components/side-navigation/SideNavigationActionLinks.d.ts +9 -0
- package/dist/components/side-navigation/SideNavigationActionLinks.d.ts.map +1 -0
- package/dist/components/side-navigation/SideNavigationActionMenu.d.ts +23 -0
- package/dist/components/side-navigation/SideNavigationActionMenu.d.ts.map +1 -0
- package/dist/components/side-navigation/SideNavigationLink.d.ts +28 -0
- package/dist/components/side-navigation/SideNavigationLink.d.ts.map +1 -0
- package/dist/components/side-navigation/SideNavigationLinks.d.ts +14 -0
- package/dist/components/side-navigation/SideNavigationLinks.d.ts.map +1 -0
- package/dist/components/side-navigation/index.d.ts +8 -0
- package/dist/components/side-navigation/index.d.ts.map +1 -0
- package/dist/components/spinner/Spinner.d.ts +13 -1
- package/dist/components/spinner/Spinner.d.ts.map +1 -10
- package/dist/components/spinner/index.d.ts +3 -1
- package/dist/components/spinner/index.d.ts.map +1 -10
- package/dist/components/stack/Stack.d.ts +20 -1
- package/dist/components/stack/Stack.d.ts.map +1 -10
- package/dist/components/stack/index.d.ts +3 -1
- package/dist/components/stack/index.d.ts.map +1 -10
- package/dist/components/switch/Switch.d.ts +32 -1
- package/dist/components/switch/Switch.d.ts.map +1 -10
- package/dist/components/switch/index.d.ts +3 -1
- package/dist/components/switch/index.d.ts.map +1 -10
- package/dist/components/table/Table.d.ts +15 -0
- package/dist/components/table/Table.d.ts.map +1 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/tabs/Tab.d.ts +19 -0
- package/dist/components/tabs/Tab.d.ts.map +1 -0
- package/dist/components/tabs/TabContent.d.ts +13 -0
- package/dist/components/tabs/TabContent.d.ts.map +1 -0
- package/dist/components/tabs/TabList.d.ts +12 -0
- package/dist/components/tabs/TabList.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +20 -0
- package/dist/components/tabs/Tabs.d.ts.map +1 -0
- package/dist/components/tabs/index.d.ts +9 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tags/Tags.d.ts +57 -0
- package/dist/components/tags/Tags.d.ts.map +1 -0
- package/dist/components/tags/index.d.ts +3 -0
- package/dist/components/tags/index.d.ts.map +1 -0
- package/dist/components/text/Text.d.ts +25 -1
- package/dist/components/text/Text.d.ts.map +1 -10
- package/dist/components/text/index.d.ts +3 -1
- package/dist/components/text/index.d.ts.map +1 -10
- package/dist/icons/calendar-day.svg +3 -0
- package/dist/icons/calendar-empty.svg +3 -0
- package/dist/icons/calendar-week.svg +3 -0
- package/dist/icons/calendar.svg +1 -1
- package/dist/icons/credit-card.svg +3 -0
- package/dist/icons/dollar-sign.svg +3 -0
- package/dist/icons/edit.svg +1 -1
- package/dist/icons/sort-arrows.svg +3 -0
- package/dist/icons/table.svg +3 -0
- package/dist/index.cjs +209 -1
- package/dist/index.d.ts +69 -35
- package/dist/index.d.ts.map +1 -10
- package/dist/index.js +8697 -16
- package/dist/plus-C2ciGlkq.cjs +1 -0
- package/dist/plus-csC2ambK.js +136 -0
- package/package.json +37 -87
- package/tailwind.preset.cjs +24 -0
- package/tailwind.preset.js +24 -0
- package/dist/components/button/index.cjs +0 -1
- package/dist/components/button/index.js +0 -2
- package/dist/components/card/index.cjs +0 -1
- package/dist/components/card/index.js +0 -2
- package/dist/components/checkbox/index.cjs +0 -1
- package/dist/components/checkbox/index.js +0 -1
- package/dist/components/choice/index.cjs +0 -1
- package/dist/components/choice/index.js +0 -1
- package/dist/components/chunks/Icon-BTlX8dXa.js +0 -1
- package/dist/components/chunks/Icon-xNhleOos.js +0 -77
- package/dist/components/chunks/button-4_r-rdhN.js +0 -1
- package/dist/components/chunks/button-DFs4DmfC.js +0 -575
- package/dist/components/chunks/card-D8FpQZBD.js +0 -1
- package/dist/components/chunks/card-DhRHTSkL.js +0 -58
- package/dist/components/chunks/checkbox-Bakjptcp.js +0 -1
- package/dist/components/chunks/checkbox-D95xYxXV.js +0 -169
- package/dist/components/chunks/choice-BlAkXCQN.js +0 -204
- package/dist/components/chunks/choice-C0EYGPxa.js +0 -1
- package/dist/components/chunks/grid-DVHtippr.js +0 -1
- package/dist/components/chunks/grid-DqlQrFkp.js +0 -62
- package/dist/components/chunks/icon-BZolpoyx.js +0 -1
- package/dist/components/chunks/link-C49HKGxh.js +0 -75
- package/dist/components/chunks/link-S0yBi9n7.js +0 -1
- package/dist/components/chunks/modal-B2sNSV2Q.js +0 -1
- package/dist/components/chunks/modal-BQlup2Mw.js +0 -98
- package/dist/components/chunks/page-BiSPS1-l.js +0 -1
- package/dist/components/chunks/page-DFKYJekL.js +0 -112
- package/dist/components/chunks/popover-BkTNH5gb.js +0 -181
- package/dist/components/chunks/popover-DFCs6KnJ.js +0 -1
- package/dist/components/chunks/spinner-Ch8momJm.js +0 -63
- package/dist/components/chunks/spinner-zGnecx3W.js +0 -111
- package/dist/components/chunks/stack-BvgkqvMX.js +0 -1
- package/dist/components/chunks/stack-DzZy3iH1.js +0 -114
- package/dist/components/chunks/switch-C5FOAA64.js +0 -1
- package/dist/components/chunks/switch-CCyMw1-M.js +0 -138
- package/dist/components/chunks/text-B-qq-sZ2.js +0 -111
- package/dist/components/chunks/text-nTrVku3e.js +0 -1
- package/dist/components/grid/index.cjs +0 -1
- package/dist/components/grid/index.js +0 -2
- package/dist/components/icon/index.cjs +0 -1
- package/dist/components/icon/index.js +0 -3
- package/dist/components/link/index.cjs +0 -1
- package/dist/components/link/index.js +0 -2
- package/dist/components/modal/index.cjs +0 -1
- package/dist/components/modal/index.js +0 -1
- package/dist/components/page/index.cjs +0 -1
- package/dist/components/page/index.js +0 -2
- package/dist/components/popover/index.cjs +0 -1
- package/dist/components/popover/index.js +0 -1
- package/dist/components/spinner/index.cjs +0 -1
- package/dist/components/spinner/index.js +0 -2
- package/dist/components/stack/index.cjs +0 -1
- package/dist/components/stack/index.js +0 -2
- package/dist/components/switch/index.cjs +0 -1
- package/dist/components/switch/index.js +0 -2
- package/dist/components/text/index.cjs +0 -1
- package/dist/components/text/index.js +0 -2
- package/dist/mintui-elements.d.ts +0 -78
- package/dist/mintui-elements.d.ts.map +0 -10
- package/dist/styles.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=new Map;function t(t){e.set(t.name,t)}function n(t){return e.get(t)}var r={name:`close`,viewBox:`0 0 24 24`,path:`M6 18L18 6M6 6l12 12`,strokeLinecap:`round`,strokeLinejoin:`round`};t(r);var i={name:`check`,viewBox:`0 0 24 24`,path:`M5 13l4 4L19 7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(i);var a={name:`info`,viewBox:`0 0 24 24`,path:`M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(a);var o={name:`success`,viewBox:`0 0 24 24`,path:`M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(o);var s={name:`warning`,viewBox:`0 0 24 24`,path:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(s);var c={name:`error`,viewBox:`0 0 24 24`,path:`M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(c);var l={name:`sort-arrows`,viewBox:`0 0 24 24`,path:`M1 5l5-4m0 0l5 4m-5-4v22 M13 19l5 4m0 0l5-4m-5 4V1`,strokeLinecap:`round`,strokeLinejoin:`round`},u={name:`caret-left`,viewBox:`0 0 24 24`,path:`M15 19l-7-7 7-7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(u);var d={name:`caret-right`,viewBox:`0 0 24 24`,path:`M9 5l7 7-7 7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(d);var f={name:`caret-down`,viewBox:`0 0 24 24`,path:`M19 9l-7 7-7-7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(f);var p={name:`caret-up`,viewBox:`0 0 24 24`,path:`M5 15l7-7 7 7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(p);var m={name:`user`,viewBox:`0 0 24 24`,path:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(m);var h={name:`plus`,viewBox:`0 0 24 24`,path:`M12 4v16m8-8H4`,strokeLinecap:`round`,strokeLinejoin:`round`};t(h),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return o}});
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
//#region src/components/icon/registry.ts
|
|
2
|
+
var e = /* @__PURE__ */ new Map();
|
|
3
|
+
function t(t) {
|
|
4
|
+
e.set(t.name, t);
|
|
5
|
+
}
|
|
6
|
+
function n(t) {
|
|
7
|
+
return e.get(t);
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/components/icon/icons/close.ts
|
|
11
|
+
var r = {
|
|
12
|
+
name: "close",
|
|
13
|
+
viewBox: "0 0 24 24",
|
|
14
|
+
path: "M6 18L18 6M6 6l12 12",
|
|
15
|
+
strokeLinecap: "round",
|
|
16
|
+
strokeLinejoin: "round"
|
|
17
|
+
};
|
|
18
|
+
t(r);
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/components/icon/icons/check.ts
|
|
21
|
+
var i = {
|
|
22
|
+
name: "check",
|
|
23
|
+
viewBox: "0 0 24 24",
|
|
24
|
+
path: "M5 13l4 4L19 7",
|
|
25
|
+
strokeLinecap: "round",
|
|
26
|
+
strokeLinejoin: "round"
|
|
27
|
+
};
|
|
28
|
+
t(i);
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/components/icon/icons/info.ts
|
|
31
|
+
var a = {
|
|
32
|
+
name: "info",
|
|
33
|
+
viewBox: "0 0 24 24",
|
|
34
|
+
path: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
35
|
+
strokeLinecap: "round",
|
|
36
|
+
strokeLinejoin: "round"
|
|
37
|
+
};
|
|
38
|
+
t(a);
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/components/icon/icons/success.ts
|
|
41
|
+
var o = {
|
|
42
|
+
name: "success",
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
path: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
45
|
+
strokeLinecap: "round",
|
|
46
|
+
strokeLinejoin: "round"
|
|
47
|
+
};
|
|
48
|
+
t(o);
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/components/icon/icons/warning.ts
|
|
51
|
+
var s = {
|
|
52
|
+
name: "warning",
|
|
53
|
+
viewBox: "0 0 24 24",
|
|
54
|
+
path: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",
|
|
55
|
+
strokeLinecap: "round",
|
|
56
|
+
strokeLinejoin: "round"
|
|
57
|
+
};
|
|
58
|
+
t(s);
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/icon/icons/error.ts
|
|
61
|
+
var c = {
|
|
62
|
+
name: "error",
|
|
63
|
+
viewBox: "0 0 24 24",
|
|
64
|
+
path: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
65
|
+
strokeLinecap: "round",
|
|
66
|
+
strokeLinejoin: "round"
|
|
67
|
+
};
|
|
68
|
+
t(c);
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/components/icon/icons/sort-arrows.ts
|
|
71
|
+
var l = {
|
|
72
|
+
name: "sort-arrows",
|
|
73
|
+
viewBox: "0 0 24 24",
|
|
74
|
+
path: "M1 5l5-4m0 0l5 4m-5-4v22 M13 19l5 4m0 0l5-4m-5 4V1",
|
|
75
|
+
strokeLinecap: "round",
|
|
76
|
+
strokeLinejoin: "round"
|
|
77
|
+
}, u = {
|
|
78
|
+
name: "caret-left",
|
|
79
|
+
viewBox: "0 0 24 24",
|
|
80
|
+
path: "M15 19l-7-7 7-7",
|
|
81
|
+
strokeLinecap: "round",
|
|
82
|
+
strokeLinejoin: "round"
|
|
83
|
+
};
|
|
84
|
+
t(u);
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/components/icon/icons/caret-right.ts
|
|
87
|
+
var d = {
|
|
88
|
+
name: "caret-right",
|
|
89
|
+
viewBox: "0 0 24 24",
|
|
90
|
+
path: "M9 5l7 7-7 7",
|
|
91
|
+
strokeLinecap: "round",
|
|
92
|
+
strokeLinejoin: "round"
|
|
93
|
+
};
|
|
94
|
+
t(d);
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/components/icon/icons/caret-down.ts
|
|
97
|
+
var f = {
|
|
98
|
+
name: "caret-down",
|
|
99
|
+
viewBox: "0 0 24 24",
|
|
100
|
+
path: "M19 9l-7 7-7-7",
|
|
101
|
+
strokeLinecap: "round",
|
|
102
|
+
strokeLinejoin: "round"
|
|
103
|
+
};
|
|
104
|
+
t(f);
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/components/icon/icons/caret-up.ts
|
|
107
|
+
var p = {
|
|
108
|
+
name: "caret-up",
|
|
109
|
+
viewBox: "0 0 24 24",
|
|
110
|
+
path: "M5 15l7-7 7 7",
|
|
111
|
+
strokeLinecap: "round",
|
|
112
|
+
strokeLinejoin: "round"
|
|
113
|
+
};
|
|
114
|
+
t(p);
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/components/icon/icons/user.ts
|
|
117
|
+
var m = {
|
|
118
|
+
name: "user",
|
|
119
|
+
viewBox: "0 0 24 24",
|
|
120
|
+
path: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",
|
|
121
|
+
strokeLinecap: "round",
|
|
122
|
+
strokeLinejoin: "round"
|
|
123
|
+
};
|
|
124
|
+
t(m);
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/components/icon/icons/plus.ts
|
|
127
|
+
var h = {
|
|
128
|
+
name: "plus",
|
|
129
|
+
viewBox: "0 0 24 24",
|
|
130
|
+
path: "M12 4v16m8-8H4",
|
|
131
|
+
strokeLinecap: "round",
|
|
132
|
+
strokeLinejoin: "round"
|
|
133
|
+
};
|
|
134
|
+
t(h);
|
|
135
|
+
//#endregion
|
|
136
|
+
export { d as a, c, a as d, i as f, t as h, f as i, s as l, n as m, m as n, u as o, r as p, p as r, l as s, h as t, o as u };
|
package/package.json
CHANGED
|
@@ -1,101 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monobill-mintui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "A modern framework-agnostic UI kit built as Web Components. Requires Tailwind CSS.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./dist/index.
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
11
|
"import": "./dist/index.js",
|
|
13
|
-
"require": "./dist/index.cjs"
|
|
12
|
+
"require": "./dist/index.cjs",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
14
|
},
|
|
15
15
|
"./styles": "./dist/styles.css",
|
|
16
|
-
"./
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"require": "./dist/components/button/index.cjs"
|
|
16
|
+
"./tailwind-preset": {
|
|
17
|
+
"import": "./tailwind.preset.js",
|
|
18
|
+
"require": "./tailwind.preset.cjs"
|
|
20
19
|
},
|
|
21
|
-
"./
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
},
|
|
26
|
-
"./spinner": {
|
|
27
|
-
"types": "./dist/components/spinner/index.d.ts",
|
|
28
|
-
"import": "./dist/components/spinner/index.js",
|
|
29
|
-
"require": "./dist/components/spinner/index.cjs"
|
|
30
|
-
},
|
|
31
|
-
"./icon": {
|
|
32
|
-
"types": "./dist/components/icon/index.d.ts",
|
|
33
|
-
"import": "./dist/components/icon/index.js",
|
|
34
|
-
"require": "./dist/components/icon/index.cjs"
|
|
35
|
-
},
|
|
36
|
-
"./text": {
|
|
37
|
-
"types": "./dist/components/text/index.d.ts",
|
|
38
|
-
"import": "./dist/components/text/index.js",
|
|
39
|
-
"require": "./dist/components/text/index.cjs"
|
|
40
|
-
},
|
|
41
|
-
"./stack": {
|
|
42
|
-
"types": "./dist/components/stack/index.d.ts",
|
|
43
|
-
"import": "./dist/components/stack/index.js",
|
|
44
|
-
"require": "./dist/components/stack/index.cjs"
|
|
45
|
-
},
|
|
46
|
-
"./card": {
|
|
47
|
-
"types": "./dist/components/card/index.d.ts",
|
|
48
|
-
"import": "./dist/components/card/index.js",
|
|
49
|
-
"require": "./dist/components/card/index.cjs"
|
|
50
|
-
},
|
|
51
|
-
"./link": {
|
|
52
|
-
"types": "./dist/components/link/index.d.ts",
|
|
53
|
-
"import": "./dist/components/link/index.js",
|
|
54
|
-
"require": "./dist/components/link/index.cjs"
|
|
55
|
-
},
|
|
56
|
-
"./page": {
|
|
57
|
-
"types": "./dist/components/page/index.d.ts",
|
|
58
|
-
"import": "./dist/components/page/index.js",
|
|
59
|
-
"require": "./dist/components/page/index.cjs"
|
|
60
|
-
},
|
|
61
|
-
"./grid": {
|
|
62
|
-
"types": "./dist/components/grid/index.d.ts",
|
|
63
|
-
"import": "./dist/components/grid/index.js",
|
|
64
|
-
"require": "./dist/components/grid/index.cjs"
|
|
65
|
-
},
|
|
66
|
-
"./modal": {
|
|
67
|
-
"types": "./dist/components/modal/index.d.ts",
|
|
68
|
-
"import": "./dist/components/modal/index.js",
|
|
69
|
-
"require": "./dist/components/modal/index.cjs"
|
|
70
|
-
},
|
|
71
|
-
"./popover": {
|
|
72
|
-
"types": "./dist/components/popover/index.d.ts",
|
|
73
|
-
"import": "./dist/components/popover/index.js",
|
|
74
|
-
"require": "./dist/components/popover/index.cjs"
|
|
75
|
-
},
|
|
76
|
-
"./checkbox": {
|
|
77
|
-
"types": "./dist/components/checkbox/index.d.ts",
|
|
78
|
-
"import": "./dist/components/checkbox/index.js",
|
|
79
|
-
"require": "./dist/components/checkbox/index.cjs"
|
|
80
|
-
},
|
|
81
|
-
"./choice": {
|
|
82
|
-
"types": "./dist/components/choice/index.d.ts",
|
|
83
|
-
"import": "./dist/components/choice/index.js",
|
|
84
|
-
"require": "./dist/components/choice/index.cjs"
|
|
20
|
+
"./icons": {
|
|
21
|
+
"import": "./dist/components/icon/icons/index.js",
|
|
22
|
+
"require": "./dist/components/icon/icons/index.cjs",
|
|
23
|
+
"types": "./dist/components/icon/icons/index.d.ts"
|
|
85
24
|
}
|
|
86
25
|
},
|
|
87
26
|
"files": [
|
|
88
|
-
"dist"
|
|
27
|
+
"dist",
|
|
28
|
+
"tailwind.preset.js",
|
|
29
|
+
"tailwind.preset.cjs"
|
|
89
30
|
],
|
|
90
31
|
"scripts": {
|
|
91
|
-
"build:icons": "
|
|
92
|
-
"build": "
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"preview": "vite preview",
|
|
97
|
-
"version": "npm run sync:versions && git add -A",
|
|
98
|
-
"postversion": "npm run prepare:publish"
|
|
32
|
+
"build:icons": "tsx src/components/icon/build-icons.ts",
|
|
33
|
+
"build:types": "tsc --emitDeclarationOnly --declaration --skipLibCheck || true",
|
|
34
|
+
"build": "vite build && npm run build:types",
|
|
35
|
+
"dev": "vite --host",
|
|
36
|
+
"preview": "vite preview"
|
|
99
37
|
},
|
|
100
38
|
"keywords": [
|
|
101
39
|
"web-components",
|
|
@@ -109,16 +47,28 @@
|
|
|
109
47
|
"tailwind",
|
|
110
48
|
"components"
|
|
111
49
|
],
|
|
112
|
-
"author": "",
|
|
50
|
+
"author": "ron-vnox",
|
|
113
51
|
"license": "MIT",
|
|
114
52
|
"devDependencies": {
|
|
115
|
-
"@tailwindcss/vite": "^4.
|
|
53
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
54
|
+
"@types/node": "^24.10.1",
|
|
116
55
|
"@vitejs/plugin-vue": "^6.0.5",
|
|
117
56
|
"tailwindcss": "^4.0.0",
|
|
57
|
+
"tsx": "^4.21.0",
|
|
58
|
+
"typescript": "^5.9.3",
|
|
118
59
|
"vite": "^8.0.2",
|
|
119
|
-
"vue": "^3.4.0"
|
|
60
|
+
"vue": "^3.4.0",
|
|
61
|
+
"vue-router": "^4.6.4"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"tailwindcss": "^4.0.0"
|
|
65
|
+
},
|
|
66
|
+
"repository": {
|
|
67
|
+
"type": "git",
|
|
68
|
+
"url": "https://github.com/vnoxco/mintui.git"
|
|
69
|
+
},
|
|
70
|
+
"bugs": {
|
|
71
|
+
"url": "https://github.com/vnoxco/mintui/issues"
|
|
120
72
|
},
|
|
121
|
-
"
|
|
122
|
-
"vue-router": "^4.6.3"
|
|
123
|
-
}
|
|
73
|
+
"homepage": "https://github.com/vnoxco/mintui#readme"
|
|
124
74
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
theme: {
|
|
4
|
+
extend: {
|
|
5
|
+
colors: {
|
|
6
|
+
gray: {
|
|
7
|
+
50: '#f9fafb',
|
|
8
|
+
100: '#f3f4f6',
|
|
9
|
+
200: '#e5e7eb',
|
|
10
|
+
300: '#d1d5db',
|
|
11
|
+
400: '#9ca3af',
|
|
12
|
+
500: '#6b7280',
|
|
13
|
+
600: '#4b5563',
|
|
14
|
+
700: '#374151',
|
|
15
|
+
800: '#1f2937',
|
|
16
|
+
900: '#0a0a0a', // Base dark mode color - enforced by mintui
|
|
17
|
+
950: '#030712',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
export default {
|
|
3
|
+
theme: {
|
|
4
|
+
extend: {
|
|
5
|
+
colors: {
|
|
6
|
+
gray: {
|
|
7
|
+
50: '#f9fafb',
|
|
8
|
+
100: '#f3f4f6',
|
|
9
|
+
200: '#e5e7eb',
|
|
10
|
+
300: '#d1d5db',
|
|
11
|
+
400: '#9ca3af',
|
|
12
|
+
500: '#6b7280',
|
|
13
|
+
600: '#4b5563',
|
|
14
|
+
700: '#374151',
|
|
15
|
+
800: '#1f2937',
|
|
16
|
+
900: '#0a0a0a', // Base dark mode color - enforced by mintui
|
|
17
|
+
950: '#030712',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`../chunks/button-4_r-rdhN.js`);module.exports=e.t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`../chunks/card-D8FpQZBD.js`);module.exports=e.t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`../chunks/checkbox-Bakjptcp.js`);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "../chunks/checkbox-D95xYxXV.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`../chunks/choice-C0EYGPxa.js`);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "../chunks/choice-BlAkXCQN.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=new Map;function t(t){e.set(t.name,t)}function n(t){return e.get(t)}function r(t){return e.has(t)}function i(){return Array.from(e.values())}var a=class extends HTMLElement{static get observedAttributes(){return[`name`]}constructor(){super(),this._darkModeObserver=null}connectedCallback(){this.classList.add(`box-border`,`m-0`,`p-0`,`border-0`,`inline-flex`,`items-center`,`leading-none`),this.render(),this._observeDarkMode()}attributeChangedCallback(e,t,n){t!==n&&this.render()}disconnectedCallback(){this._darkModeObserver&&=(this._darkModeObserver.disconnect(),null)}_observeDarkMode(){this._darkModeObserver||(this._darkModeObserver=new MutationObserver(e=>{for(let t of e)if(t.type===`attributes`&&t.attributeName===`class`){this.render();break}}),this._darkModeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]}))}getName(){return this.getAttribute(`name`)||``}getIconUrl(){let e=document.documentElement.getAttribute(`data-icon-base-url`)||document.querySelector(`meta[name="icon-base-url"]`)?.getAttribute(`content`);return e?`${e}/${this.getName()}.svg`:`/icons/${this.getName()}.svg`}render(){let e=this.getName();if(!e){this.innerHTML=``,this.style.maskImage=``,this.style.webkitMaskImage=``;return}if(!n(e)){console.warn(`Icon "${e}" not found. Make sure you've imported the icon: import '@monobill-mintui/icon/icons/${e}'`),this.innerHTML=``,this.style.maskImage=``,this.style.webkitMaskImage=``;return}let t=this.closest(`mint-button`)||this.parentElement?.closest(`mint-button`),r=this.closest(`mint-switch`)||this.parentElement?.closest(`mint-switch`),i;i=r?`w-3 h-3`:t?`w-5 h-5`:`w-[1.3em] h-[1.3em]`,this.classList.remove(`w-4`,`h-4`,`w-5`,`h-5`,`w-[1em]`,`h-[1em]`),i.split(` `).forEach(e=>{e&&this.classList.add(e)});let a=this.getIconUrl();if(this.style.maskImage=`url(${a})`,this.style.webkitMaskImage=`url(${a})`,this.style.maskSize=`contain`,this.style.webkitMaskSize=`contain`,this.style.maskRepeat=`no-repeat`,this.style.webkitMaskRepeat=`no-repeat`,this.style.maskPosition=`center`,this.style.webkitMaskPosition=`center`,this.style.aspectRatio=`1 / 1`,this.style.backgroundColor=`currentColor`,r)this.classList.remove(`text-gray-100`,`text-gray-900`),this.classList.add(`text-gray-900`);else if(t)this.classList.remove(`text-gray-100`,`text-gray-900`);else{let e=document.documentElement.classList.contains(`dark`)?`text-gray-100`:`text-gray-900`;this.classList.remove(`text-gray-100`,`text-gray-900`),this.classList.add(e)}this.innerHTML=``}};customElements.get(`mint-icon`)||customElements.define(`mint-icon`,a),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
//#region src/components/icon/registry.js
|
|
2
|
-
var e = /* @__PURE__ */ new Map();
|
|
3
|
-
function t(t) {
|
|
4
|
-
e.set(t.name, t);
|
|
5
|
-
}
|
|
6
|
-
function n(t) {
|
|
7
|
-
return e.get(t);
|
|
8
|
-
}
|
|
9
|
-
function r(t) {
|
|
10
|
-
return e.has(t);
|
|
11
|
-
}
|
|
12
|
-
function i() {
|
|
13
|
-
return Array.from(e.values());
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/components/icon/Icon.js
|
|
17
|
-
var a = class extends HTMLElement {
|
|
18
|
-
static get observedAttributes() {
|
|
19
|
-
return ["name"];
|
|
20
|
-
}
|
|
21
|
-
constructor() {
|
|
22
|
-
super(), this._darkModeObserver = null;
|
|
23
|
-
}
|
|
24
|
-
connectedCallback() {
|
|
25
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "inline-flex", "items-center", "leading-none"), this.render(), this._observeDarkMode();
|
|
26
|
-
}
|
|
27
|
-
attributeChangedCallback(e, t, n) {
|
|
28
|
-
t !== n && this.render();
|
|
29
|
-
}
|
|
30
|
-
disconnectedCallback() {
|
|
31
|
-
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
|
|
32
|
-
}
|
|
33
|
-
_observeDarkMode() {
|
|
34
|
-
this._darkModeObserver || (this._darkModeObserver = new MutationObserver((e) => {
|
|
35
|
-
for (let t of e) if (t.type === "attributes" && t.attributeName === "class") {
|
|
36
|
-
this.render();
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
}), this._darkModeObserver.observe(document.documentElement, {
|
|
40
|
-
attributes: !0,
|
|
41
|
-
attributeFilter: ["class"]
|
|
42
|
-
}));
|
|
43
|
-
}
|
|
44
|
-
getName() {
|
|
45
|
-
return this.getAttribute("name") || "";
|
|
46
|
-
}
|
|
47
|
-
getIconUrl() {
|
|
48
|
-
let e = document.documentElement.getAttribute("data-icon-base-url") || document.querySelector("meta[name=\"icon-base-url\"]")?.getAttribute("content");
|
|
49
|
-
return e ? `${e}/${this.getName()}.svg` : `/icons/${this.getName()}.svg`;
|
|
50
|
-
}
|
|
51
|
-
render() {
|
|
52
|
-
let e = this.getName();
|
|
53
|
-
if (!e) {
|
|
54
|
-
this.innerHTML = "", this.style.maskImage = "", this.style.webkitMaskImage = "";
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
if (!n(e)) {
|
|
58
|
-
console.warn(`Icon "${e}" not found. Make sure you've imported the icon: import '@monobill-mintui/icon/icons/${e}'`), this.innerHTML = "", this.style.maskImage = "", this.style.webkitMaskImage = "";
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
let t = this.closest("mint-button") || this.parentElement?.closest("mint-button"), r = this.closest("mint-switch") || this.parentElement?.closest("mint-switch"), i;
|
|
62
|
-
i = r ? "w-3 h-3" : t ? "w-5 h-5" : "w-[1.3em] h-[1.3em]", this.classList.remove("w-4", "h-4", "w-5", "h-5", "w-[1em]", "h-[1em]"), i.split(" ").forEach((e) => {
|
|
63
|
-
e && this.classList.add(e);
|
|
64
|
-
});
|
|
65
|
-
let a = this.getIconUrl();
|
|
66
|
-
if (this.style.maskImage = `url(${a})`, this.style.webkitMaskImage = `url(${a})`, this.style.maskSize = "contain", this.style.webkitMaskSize = "contain", this.style.maskRepeat = "no-repeat", this.style.webkitMaskRepeat = "no-repeat", this.style.maskPosition = "center", this.style.webkitMaskPosition = "center", this.style.aspectRatio = "1 / 1", this.style.backgroundColor = "currentColor", r) this.classList.remove("text-gray-100", "text-gray-900"), this.classList.add("text-gray-900");
|
|
67
|
-
else if (t) this.classList.remove("text-gray-100", "text-gray-900");
|
|
68
|
-
else {
|
|
69
|
-
let e = document.documentElement.classList.contains("dark") ? "text-gray-100" : "text-gray-900";
|
|
70
|
-
this.classList.remove("text-gray-100", "text-gray-900"), this.classList.add(e);
|
|
71
|
-
}
|
|
72
|
-
this.innerHTML = "";
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
customElements.get("mint-icon") || customElements.define("mint-icon", a);
|
|
76
|
-
//#endregion
|
|
77
|
-
export { t as a, r as i, i as n, n as r, a as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./spinner-Ch8momJm.js`),require(`./icon-BZolpoyx.js`);var e=class extends HTMLElement{static get observedAttributes(){return[`variant`,`tone`,`disabled`,`loading`,`button-type`,`full-width`,`icon-position`,`icon`]}constructor(){super(),this._button=null,this._clickHandler=null,this._isHandlingClick=!1}connectedCallback(){this.classList.add(`box-border`,`m-0`,`p-0`,`border-0`,`align-baseline`,`inline-block`),this.render(),this._button&&this.setupEventListeners(),this.isFullWidth()&&this.classList.add(`w-full`)}disconnectedCallback(){this.removeEventListeners()}attributeChangedCallback(e,t,n){t!==n&&this.render()}getVariant(){return this.getAttribute(`variant`)||`solid`}getTone(){return this.getAttribute(`tone`)||`neutral`}isDisabled(){return this.hasAttribute(`disabled`)}isLoading(){return this.hasAttribute(`loading`)}getType(){return(this.getAttribute(`button-type`)||`default`)===`submit`?`submit`:`button`}isFullWidth(){return this.hasAttribute(`full-width`)}getIconPosition(){return this.getAttribute(`icon-position`)||`left`}getIcon(){return this.getAttribute(`icon`)||``}isIconOnly(){if(!(this.getIcon()||this._button?.querySelector(`[slot="icon"], .mint-button-icon, mint-icon`)))return!1;let e=this._button?.querySelector(`.mint-button-content`);if(e&&e.textContent.trim())return!1;if(this._button){for(let e=this._button.firstChild;e;e=e.nextSibling)if(e.nodeType===Node.TEXT_NODE&&e.textContent.trim()||e.nodeType===Node.ELEMENT_NODE&&e.tagName!==`MINT-ICON`&&e.tagName!==`MINT-SPINNER`&&!e.querySelector?.(`mint-spinner`)&&!e.hasAttribute?.(`slot`)&&e.className!==`mint-button-icon`&&!(e.className===`mr-2`&&e.querySelector(`mint-spinner`))&&e.textContent.trim())return!1}return!0}getButtonClasses(){let e=this.isIconOnly(),t=this.getVariant(),n=[`inline-flex`,`items-center`,`justify-center`,`font-medium`,`rounded-lg`,`box-border`,...e?[`p-1.5`,`aspect-square`,`w-[2rem]`,`h-[2rem]`]:[`px-3.5`,`py-1.5`,`min-h-[2rem]`],`text-sm`,`transition-all`,`duration-200`,`outline-none`,`focus:outline-none`,`focus-visible:ring-2`,`focus-visible:ring-offset-2`,`[&.mint-button-active>*]:scale-95`,`[&>*]:transition-transform`,`[&>*]:duration-100`,`disabled:opacity-50`,`disabled:cursor-not-allowed`],r=this.getTone(),i={"solid-action":[`bg-slate-800`,`dark:bg-slate-600`,`text-white`,`hover:bg-slate-950`,`dark:hover:bg-slate-700`,`active:bg-slate-900`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]`,`dark:active:bg-slate-700`,`disabled:active:bg-slate-800`,`dark:disabled:active:bg-slate-600`,`disabled:active:shadow-none`,`focus-visible:ring-slate-500`,`dark:focus-visible:ring-slate-400`,`shadow-sm`,`hover:shadow`,`dark:shadow-gray-900/50`,`border-2`,`border-transparent`],"solid-neutral":[`bg-white`,`dark:bg-gray-700`,`text-gray-900`,`dark:text-white`,`hover:bg-gray-50`,`dark:hover:bg-gray-600`,`active:bg-gray-100`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]`,`dark:active:bg-gray-800`,`disabled:active:bg-white`,`dark:disabled:active:bg-gray-700`,`disabled:active:shadow-none`,`focus-visible:ring-gray-400`,`dark:focus-visible:ring-gray-500`,`shadow-sm`,`hover:shadow`,`dark:shadow-gray-900/50`,`border-2`,`border-gray-200`,`dark:border-gray-600`],"solid-info":[`bg-blue-800`,`dark:bg-blue-600`,`text-white`,`hover:bg-blue-950`,`dark:hover:bg-blue-700`,`active:bg-blue-900`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]`,`dark:active:bg-blue-700`,`disabled:active:bg-blue-800`,`dark:disabled:active:bg-blue-600`,`disabled:active:shadow-none`,`focus-visible:ring-blue-500`,`dark:focus-visible:ring-blue-400`,`shadow-sm`,`hover:shadow`,`dark:shadow-gray-900/50`,`border-2`,`border-transparent`],"solid-warning":[`bg-amber-800`,`dark:bg-amber-600`,`text-white`,`hover:bg-amber-950`,`dark:hover:bg-amber-700`,`active:bg-amber-900`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]`,`dark:active:bg-amber-700`,`disabled:active:bg-amber-800`,`dark:disabled:active:bg-amber-600`,`disabled:active:shadow-none`,`focus-visible:ring-amber-500`,`dark:focus-visible:ring-amber-400`,`shadow-sm`,`hover:shadow`,`dark:shadow-gray-900/50`,`border-2`,`border-transparent`],"solid-danger":[`bg-red-800`,`dark:bg-red-600`,`text-white`,`hover:bg-red-950`,`dark:hover:bg-red-700`,`active:bg-red-900`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]`,`dark:active:bg-red-700`,`disabled:active:bg-red-800`,`dark:disabled:active:bg-red-600`,`disabled:active:shadow-none`,`focus-visible:ring-red-500`,`dark:focus-visible:ring-red-400`,`shadow-sm`,`hover:shadow`,`dark:shadow-gray-900/50`,`border-2`,`border-transparent`],"outline-action":[`bg-transparent`,`border-2`,`border-slate-700`,`dark:border-slate-500`,`text-slate-800`,`dark:text-slate-600`,`hover:bg-slate-800`,`dark:hover:bg-slate-600`,`hover:text-white`,`active:bg-slate-900`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]`,`dark:active:bg-slate-700`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-slate-500`,`dark:focus-visible:ring-slate-400`,`shadow-none`,`hover:shadow-sm`],"outline-neutral":[`bg-transparent`,`border-2`,`border-gray-300`,`dark:border-gray-500`,`text-gray-700`,`dark:text-gray-200`,`hover:bg-white`,`dark:hover:bg-gray-700`,`hover:text-gray-900`,`dark:hover:text-white`,`active:bg-gray-50`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]`,`dark:active:bg-gray-800`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-gray-400`,`dark:focus-visible:ring-gray-500`,`shadow-none`,`hover:shadow-sm`],"outline-info":[`bg-transparent`,`border-2`,`border-blue-700`,`dark:border-blue-500`,`text-blue-800`,`dark:text-blue-600`,`hover:bg-blue-800`,`dark:hover:bg-blue-600`,`hover:text-white`,`active:bg-blue-900`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]`,`dark:active:bg-blue-700`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-blue-500`,`dark:focus-visible:ring-blue-400`,`shadow-none`,`hover:shadow-sm`],"outline-warning":[`bg-transparent`,`border-2`,`border-amber-700`,`dark:border-amber-500`,`text-amber-800`,`dark:text-amber-600`,`hover:bg-amber-800`,`dark:hover:bg-amber-600`,`hover:text-white`,`active:bg-amber-900`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]`,`dark:active:bg-amber-700`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-amber-500`,`dark:focus-visible:ring-amber-400`,`shadow-none`,`hover:shadow-sm`],"outline-danger":[`bg-transparent`,`border-2`,`border-red-700`,`dark:border-red-500`,`text-red-800`,`dark:text-red-600`,`hover:bg-red-800`,`dark:hover:bg-red-600`,`hover:text-white`,`active:bg-red-900`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.3)]`,`dark:active:bg-red-700`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-red-500`,`dark:focus-visible:ring-red-400`,`shadow-none`,`hover:shadow-sm`],"ghost-action":[`bg-transparent`,`text-slate-800`,`dark:text-slate-400`,`active:bg-gray-100`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]`,`dark:active:bg-gray-800`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-gray-400`,`dark:focus-visible:ring-gray-500`,`shadow-none`,`hover:shadow-none`,`border-2`,`border-transparent`],"ghost-neutral":[`bg-transparent`,`text-gray-700`,`dark:text-gray-200`,`active:bg-gray-50`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]`,`dark:active:bg-gray-800`,`active:text-gray-900`,`dark:active:text-white`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-gray-400`,`dark:focus-visible:ring-gray-500`,`shadow-none`,`hover:shadow-none`,`border-2`,`border-transparent`],"ghost-info":[`bg-transparent`,`text-blue-800`,`dark:text-blue-400`,`active:bg-gray-100`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]`,`dark:active:bg-gray-800`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-gray-400`,`dark:focus-visible:ring-gray-500`,`shadow-none`,`hover:shadow-none`,`border-2`,`border-transparent`],"ghost-warning":[`bg-transparent`,`text-amber-800`,`dark:text-amber-400`,`active:bg-gray-100`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]`,`dark:active:bg-gray-800`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-gray-400`,`dark:focus-visible:ring-gray-500`,`shadow-none`,`hover:shadow-none`,`border-2`,`border-transparent`],"ghost-danger":[`bg-transparent`,`text-red-800`,`dark:text-red-400`,`active:bg-gray-100`,`active:shadow-[inset_0_2px_4px_rgba(0,0,0,0.1)]`,`dark:active:bg-gray-800`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-gray-400`,`dark:focus-visible:ring-gray-500`,`shadow-none`,`hover:shadow-none`,`border-2`,`border-transparent`],"link-action":[`bg-transparent`,`text-slate-800`,`dark:text-slate-400`,`hover:text-slate-950`,`dark:hover:text-slate-200`,`active:text-slate-900`,`dark:active:text-slate-300`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-slate-500`,`dark:focus-visible:ring-slate-400`,`shadow-none`,`hover:shadow-none`,`border-2`,`border-transparent`],"link-neutral":[`bg-transparent`,`text-gray-700`,`dark:text-gray-300`,`hover:text-gray-900`,`dark:hover:text-gray-100`,`active:text-gray-950`,`dark:active:text-gray-200`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-gray-400`,`dark:focus-visible:ring-gray-500`,`shadow-none`,`hover:shadow-none`,`border-2`,`border-transparent`],"link-info":[`bg-transparent`,`text-blue-800`,`dark:text-blue-400`,`hover:text-blue-950`,`dark:hover:text-blue-300`,`active:text-blue-900`,`dark:active:text-blue-200`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-blue-500`,`dark:focus-visible:ring-blue-400`,`shadow-none`,`hover:shadow-none`,`border-2`,`border-transparent`],"link-warning":[`bg-transparent`,`text-amber-800`,`dark:text-amber-400`,`hover:text-amber-950`,`dark:hover:text-amber-300`,`active:text-amber-900`,`dark:active:text-amber-200`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-amber-500`,`dark:focus-visible:ring-amber-400`,`shadow-none`,`hover:shadow-none`,`border-2`,`border-transparent`],"link-danger":[`bg-transparent`,`text-red-800`,`dark:text-red-400`,`hover:text-red-950`,`dark:hover:text-red-300`,`active:text-red-900`,`dark:active:text-red-200`,`disabled:active:bg-transparent`,`dark:disabled:active:bg-transparent`,`disabled:active:shadow-none`,`focus-visible:ring-red-500`,`dark:focus-visible:ring-red-400`,`shadow-none`,`hover:shadow-none`,`border-2`,`border-transparent`]},a=i[`${t}-${r}`]||i[`solid-neutral`],o=[...n,...a];return this.isFullWidth()&&o.push(`w-full`),o.join(` `)}render(){let e=this.isDisabled()||this.isLoading(),t=this.getType();if(!this._button){for(this._button=document.createElement(`button`);this.firstChild;)this._button.appendChild(this.firstChild);this.appendChild(this._button),this.setupEventListeners()}this._button.type=t,this._button.disabled=e;let n=this._button.querySelector(`mint-spinner`);if(this.isLoading())if(n)n.setAttribute(`data-button-variant`,this.getVariant()),n.setAttribute(`data-button-tone`,this.getTone()),n.render();else{let e=document.createElement(`span`);e.className=`mr-2 inline-flex items-center`;let t=document.createElement(`mint-spinner`);t.setAttribute(`size`,`default`),t.setAttribute(`data-button-variant`,this.getVariant()),t.setAttribute(`data-button-tone`,this.getTone()),t.style.width=`0.875rem`,t.style.height=`0.875rem`,e.appendChild(t),this._button.insertBefore(e,this._button.firstChild)}else n&&n.parentElement?.remove();for(;this.firstChild&&this.firstChild!==this._button;)this._button.appendChild(this.firstChild);let r=this.getIcon(),i=this._button.querySelector(`[slot="icon"], .mint-button-icon, mint-icon`);r?(i&&i.tagName!==`MINT-ICON`&&(i.remove(),i=null),!i||i.tagName!==`MINT-ICON`?(i=document.createElement(`mint-icon`),i.setAttribute(`name`,r),i.className=`mint-button-icon`):i.setAttribute(`name`,r)):i&&i.tagName===`MINT-ICON`&&(i.remove(),i=null),i||=this._button.querySelector(`[slot="icon"], .mint-button-icon`);let a=this.getIconPosition(),o=this._button.querySelector(`.mint-button-content`);if(o){let e=i&&i.tagName===`MINT-ICON`;if(i&&!i.parentElement){let t=this._button.querySelector(`mint-spinner`)?.parentElement;e||a===`left`?t?t.insertAdjacentElement(`afterend`,i):this._button.insertBefore(i,o):o.insertAdjacentElement(`afterend`,i)}else if(i&&(e||a===`left`)&&i.nextSibling!==o){i.remove();let e=this._button.querySelector(`mint-spinner`)?.parentElement;e?e.insertAdjacentElement(`afterend`,i):this._button.insertBefore(i,o)}else i&&!e&&a===`right`&&i.previousSibling!==o&&(i.remove(),o.insertAdjacentElement(`afterend`,i))}else{let e=[];for(let t=this._button.firstChild;t;t=t.nextSibling)t.tagName!==`MINT-SPINNER`&&!t.querySelector?.(`mint-spinner`)&&t!==i&&!t.hasAttribute?.(`slot`)&&!(t.className===`mr-2`&&t.querySelector(`mint-spinner`))&&e.push(t);if(e.length>0){o=document.createElement(`span`),o.className=`mint-button-content inline-flex items-center`,e.forEach(e=>{o.appendChild(e)});let t=this._button.querySelector(`mint-spinner`)?.parentElement;i&&a===`left`?t?(t.insertAdjacentElement(`afterend`,i),i.insertAdjacentElement(`afterend`,o)):(this._button.insertBefore(i,this._button.firstChild),i.insertAdjacentElement(`afterend`,o)):i&&a===`right`?t?(t.insertAdjacentElement(`afterend`,o),o.insertAdjacentElement(`afterend`,i)):(this._button.insertBefore(o,this._button.firstChild),o.insertAdjacentElement(`afterend`,i)):t?t.insertAdjacentElement(`afterend`,o):this._button.insertBefore(o,this._button.firstChild)}else if(i&&i.tagName===`MINT-ICON`&&!i.parentElement){let e=this._button.querySelector(`mint-spinner`)?.parentElement;e?e.insertAdjacentElement(`afterend`,i):this._button.insertBefore(i,this._button.firstChild)}}let s=this.isIconOnly();i&&(i.classList.contains(`mint-button-icon`)||i.classList.add(`mint-button-icon`),i.classList.remove(`mr-1.5`,`ml-1.5`),s?i.tagName===`MINT-ICON`?(i.style.width=`1rem`,i.style.height=`1rem`,i.style.maxWidth=`1rem`,i.style.maxHeight=`1rem`,i.style.flexShrink=`0`):(i.style.maxWidth=`1rem`,i.style.maxHeight=`1rem`,i.style.flexShrink=`0`,i.tagName===`svg`&&(i.style.width=`1rem`,i.style.height=`1rem`)):a===`left`?i.classList.add(`mr-1.5`):i.classList.add(`ml-1.5`));let c=this.getButtonClasses();this._button.className=c}setupEventListeners(){this._button&&!this._clickHandler&&(this._clickHandler=this.handleClick.bind(this),this._button.addEventListener(`click`,this._clickHandler,!0),this._button.addEventListener(`mousedown`,this._handleMouseDown),this._button.addEventListener(`mouseup`,this._handleMouseUp),this._button.addEventListener(`mouseleave`,this._handleMouseLeave),this._button.addEventListener(`touchstart`,this._handleTouchStart),this._button.addEventListener(`touchend`,this._handleTouchEnd),this._button.addEventListener(`touchcancel`,this._handleTouchCancel))}removeEventListeners(){this._button&&(this._clickHandler&&=(this._button.removeEventListener(`click`,this._clickHandler,!0),null),this._button.removeEventListener(`mousedown`,this._handleMouseDown),this._button.removeEventListener(`mouseup`,this._handleMouseUp),this._button.removeEventListener(`mouseleave`,this._handleMouseLeave),this._button.removeEventListener(`touchstart`,this._handleTouchStart),this._button.removeEventListener(`touchend`,this._handleTouchEnd),this._button.removeEventListener(`touchcancel`,this._handleTouchCancel))}_handleMouseDown=()=>{this._button&&!this.isDisabled()&&!this.isLoading()&&this._button.classList.add(`mint-button-active`)};_handleMouseUp=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};_handleMouseLeave=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};_handleTouchStart=()=>{this._button&&!this.isDisabled()&&!this.isLoading()&&this._button.classList.add(`mint-button-active`)};_handleTouchEnd=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};_handleTouchCancel=()=>{this._button&&this._button.classList.remove(`mint-button-active`)};handleClick(e){if(this.isDisabled()||this.isLoading()){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();return}if(e.stopPropagation(),e.stopImmediatePropagation(),this._isHandlingClick){e.preventDefault();return}this._isHandlingClick=!0,e.preventDefault(),this.dispatchEvent(new CustomEvent(`click`,{detail:{originalEvent:e},bubbles:!0,cancelable:!0,composed:!0})),requestAnimationFrame(()=>{this._isHandlingClick=!1})}};customElements.get(`mint-button`)||customElements.define(`mint-button`,e),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|