@momo-webplatform/mobase 0.0.33 → 0.0.34
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/package.json +2 -2
- package/publish/cjs/lib/utils.js +9 -0
- package/publish/cjs/src/components/Combobox/Combobox.js +19 -0
- package/publish/cjs/src/components/Combobox/index.js +7 -0
- package/publish/cjs/src/components/Command/Command.js +74 -0
- package/publish/cjs/src/components/Command/index.js +13 -0
- package/publish/cjs/{components → src/components}/Select/Select.js +2 -3
- package/publish/cjs/src/components/Stepper/Stepper.js +100 -0
- package/publish/cjs/src/components/Stepper/index.js +5 -0
- package/publish/cjs/{index.js → src/index.js} +3 -0
- package/publish/cjs/tsconfig.lib.tsbuildinfo +1 -1
- package/publish/esm/lib/utils.d.ts +2 -0
- package/publish/esm/lib/utils.js +5 -0
- package/publish/esm/src/components/Combobox/Combobox.d.ts +19 -0
- package/publish/esm/src/components/Combobox/Combobox.js +13 -0
- package/publish/esm/src/components/Combobox/index.d.ts +1 -0
- package/publish/esm/src/components/Combobox/index.js +1 -0
- package/publish/esm/src/components/Command/Command.d.ts +57 -0
- package/publish/esm/src/components/Command/Command.js +40 -0
- package/publish/esm/src/components/Command/index.d.ts +1 -0
- package/publish/esm/src/components/Command/index.js +1 -0
- package/publish/esm/{components → src/components}/Select/Select.js +2 -3
- package/publish/esm/src/components/Stepper/Stepper.d.ts +15 -0
- package/publish/esm/src/components/Stepper/Stepper.js +97 -0
- package/publish/esm/src/components/Stepper/index.d.ts +1 -0
- package/publish/esm/src/components/Stepper/index.js +1 -0
- package/publish/esm/{index.d.ts → src/index.d.ts} +3 -0
- package/publish/esm/{index.js → src/index.js} +3 -0
- package/publish/esm/tsconfig.lib.tsbuildinfo +1 -1
- /package/publish/cjs/{components → src/components}/Accordion/Accordion.js +0 -0
- /package/publish/cjs/{components → src/components}/Accordion/index.js +0 -0
- /package/publish/cjs/{components → src/components}/AlertDialog/AlertDialog.js +0 -0
- /package/publish/cjs/{components → src/components}/AlertDialog/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Badge/Badge.js +0 -0
- /package/publish/cjs/{components → src/components}/Badge/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Breadcrumb/Breadcrumb.js +0 -0
- /package/publish/cjs/{components → src/components}/Breadcrumb/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Button/Button.js +0 -0
- /package/publish/cjs/{components → src/components}/Button/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Card/Card.js +0 -0
- /package/publish/cjs/{components → src/components}/Card/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Checkbox/Checkbox.js +0 -0
- /package/publish/cjs/{components → src/components}/Checkbox/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Dialog/Dialog.js +0 -0
- /package/publish/cjs/{components → src/components}/Dialog/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Footer/Footer.js +0 -0
- /package/publish/cjs/{components → src/components}/Footer/FooterContent.js +0 -0
- /package/publish/cjs/{components → src/components}/Footer/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Header/Header.js +0 -0
- /package/publish/cjs/{components → src/components}/Header/ListItem.js +0 -0
- /package/publish/cjs/{components → src/components}/Header/ListItemMobile.js +0 -0
- /package/publish/cjs/{components → src/components}/Header/MobileMenu.js +0 -0
- /package/publish/cjs/{components → src/components}/Header/NavItems.js +0 -0
- /package/publish/cjs/{components → src/components}/Header/NavItemsMobile.js +0 -0
- /package/publish/cjs/{components → src/components}/Header/index.js +0 -0
- /package/publish/cjs/{components → src/components}/IconButton/IconButton.js +0 -0
- /package/publish/cjs/{components → src/components}/IconButton/index.js +0 -0
- /package/publish/cjs/{components → src/components}/NavigationMenu/NavigationMenu.js +0 -0
- /package/publish/cjs/{components → src/components}/NavigationMenu/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Pagination/Pagination.js +0 -0
- /package/publish/cjs/{components → src/components}/Pagination/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Popover/Popover.js +0 -0
- /package/publish/cjs/{components → src/components}/Popover/index.js +0 -0
- /package/publish/cjs/{components → src/components}/RadioGroup/RadioGroup.js +0 -0
- /package/publish/cjs/{components → src/components}/RadioGroup/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Select/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Switch/Switch.js +0 -0
- /package/publish/cjs/{components → src/components}/Switch/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Tabs/Tabs.js +0 -0
- /package/publish/cjs/{components → src/components}/Tabs/index.js +0 -0
- /package/publish/cjs/{components → src/components}/TextArea/TextArea.js +0 -0
- /package/publish/cjs/{components → src/components}/TextArea/index.js +0 -0
- /package/publish/cjs/{components → src/components}/TextInput/TextInput.js +0 -0
- /package/publish/cjs/{components → src/components}/TextInput/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Toast/Toast.js +0 -0
- /package/publish/cjs/{components → src/components}/Toast/index.js +0 -0
- /package/publish/cjs/{components → src/components}/Toast/toaster.js +0 -0
- /package/publish/cjs/{components → src/components}/Toast/use-toast.js +0 -0
- /package/publish/cjs/{components → src/components}/Tooltip/Tooltip.js +0 -0
- /package/publish/cjs/{components → src/components}/Tooltip/index.js +0 -0
- /package/publish/cjs/{foundation → src/foundation}/SpinerIcon.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/SpinerIcon.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/animations.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/clone-deep.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/clone-deep.spec.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/constants.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/generic-forward-ref.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/http.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/is-client.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/is-object.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/is-object.spec.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/merge-deep.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/merge-deep.spec.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/omit.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/omit.spec.js +0 -0
- /package/publish/cjs/{helpers → src/helpers}/utils.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/animations/index.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/blue.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/common.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/gray.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/green.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/index.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/orange.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/pink.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/purple.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/red.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/yellow.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/font-sizes.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/index.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/layout.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/plugin.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/radius.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/types.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/utilities/custom.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/utilities/index.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/utilities/scrollbar-hide.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/utilities/transition.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/utils/index.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/utils/object.js +0 -0
- /package/publish/cjs/{mobase-tw-plugin → src/mobase-tw-plugin}/utils/theme.js +0 -0
- /package/publish/cjs/{site → src/site}/index.js +0 -0
- /package/publish/cjs/{site → src/site}/meta.js +0 -0
- /package/publish/cjs/{types → src/types}/index.js +0 -0
- /package/publish/esm/{components → src/components}/Accordion/Accordion.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Accordion/Accordion.js +0 -0
- /package/publish/esm/{components → src/components}/Accordion/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Accordion/index.js +0 -0
- /package/publish/esm/{components → src/components}/AlertDialog/AlertDialog.d.ts +0 -0
- /package/publish/esm/{components → src/components}/AlertDialog/AlertDialog.js +0 -0
- /package/publish/esm/{components → src/components}/AlertDialog/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/AlertDialog/index.js +0 -0
- /package/publish/esm/{components → src/components}/Badge/Badge.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Badge/Badge.js +0 -0
- /package/publish/esm/{components → src/components}/Badge/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Badge/index.js +0 -0
- /package/publish/esm/{components → src/components}/Breadcrumb/Breadcrumb.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Breadcrumb/Breadcrumb.js +0 -0
- /package/publish/esm/{components → src/components}/Breadcrumb/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Breadcrumb/index.js +0 -0
- /package/publish/esm/{components → src/components}/Button/Button.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Button/Button.js +0 -0
- /package/publish/esm/{components → src/components}/Button/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Button/index.js +0 -0
- /package/publish/esm/{components → src/components}/Card/Card.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Card/Card.js +0 -0
- /package/publish/esm/{components → src/components}/Card/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Card/index.js +0 -0
- /package/publish/esm/{components → src/components}/Checkbox/Checkbox.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Checkbox/Checkbox.js +0 -0
- /package/publish/esm/{components → src/components}/Checkbox/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Checkbox/index.js +0 -0
- /package/publish/esm/{components → src/components}/Dialog/Dialog.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Dialog/Dialog.js +0 -0
- /package/publish/esm/{components → src/components}/Dialog/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Dialog/index.js +0 -0
- /package/publish/esm/{components → src/components}/Footer/Footer.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Footer/Footer.js +0 -0
- /package/publish/esm/{components → src/components}/Footer/FooterContent.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Footer/FooterContent.js +0 -0
- /package/publish/esm/{components → src/components}/Footer/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Footer/index.js +0 -0
- /package/publish/esm/{components → src/components}/Header/Header.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Header/Header.js +0 -0
- /package/publish/esm/{components → src/components}/Header/ListItem.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Header/ListItem.js +0 -0
- /package/publish/esm/{components → src/components}/Header/ListItemMobile.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Header/ListItemMobile.js +0 -0
- /package/publish/esm/{components → src/components}/Header/MobileMenu.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Header/MobileMenu.js +0 -0
- /package/publish/esm/{components → src/components}/Header/NavItems.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Header/NavItems.js +0 -0
- /package/publish/esm/{components → src/components}/Header/NavItemsMobile.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Header/NavItemsMobile.js +0 -0
- /package/publish/esm/{components → src/components}/Header/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Header/index.js +0 -0
- /package/publish/esm/{components → src/components}/IconButton/IconButton.d.ts +0 -0
- /package/publish/esm/{components → src/components}/IconButton/IconButton.js +0 -0
- /package/publish/esm/{components → src/components}/IconButton/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/IconButton/index.js +0 -0
- /package/publish/esm/{components → src/components}/NavigationMenu/NavigationMenu.d.ts +0 -0
- /package/publish/esm/{components → src/components}/NavigationMenu/NavigationMenu.js +0 -0
- /package/publish/esm/{components → src/components}/NavigationMenu/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/NavigationMenu/index.js +0 -0
- /package/publish/esm/{components → src/components}/Pagination/Pagination.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Pagination/Pagination.js +0 -0
- /package/publish/esm/{components → src/components}/Pagination/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Pagination/index.js +0 -0
- /package/publish/esm/{components → src/components}/Popover/Popover.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Popover/Popover.js +0 -0
- /package/publish/esm/{components → src/components}/Popover/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Popover/index.js +0 -0
- /package/publish/esm/{components → src/components}/RadioGroup/RadioGroup.d.ts +0 -0
- /package/publish/esm/{components → src/components}/RadioGroup/RadioGroup.js +0 -0
- /package/publish/esm/{components → src/components}/RadioGroup/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/RadioGroup/index.js +0 -0
- /package/publish/esm/{components → src/components}/Select/Select.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Select/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Select/index.js +0 -0
- /package/publish/esm/{components → src/components}/Switch/Switch.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Switch/Switch.js +0 -0
- /package/publish/esm/{components → src/components}/Switch/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Switch/index.js +0 -0
- /package/publish/esm/{components → src/components}/Tabs/Tabs.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Tabs/Tabs.js +0 -0
- /package/publish/esm/{components → src/components}/Tabs/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Tabs/index.js +0 -0
- /package/publish/esm/{components → src/components}/TextArea/TextArea.d.ts +0 -0
- /package/publish/esm/{components → src/components}/TextArea/TextArea.js +0 -0
- /package/publish/esm/{components → src/components}/TextArea/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/TextArea/index.js +0 -0
- /package/publish/esm/{components → src/components}/TextInput/TextInput.d.ts +0 -0
- /package/publish/esm/{components → src/components}/TextInput/TextInput.js +0 -0
- /package/publish/esm/{components → src/components}/TextInput/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/TextInput/index.js +0 -0
- /package/publish/esm/{components → src/components}/Toast/Toast.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Toast/Toast.js +0 -0
- /package/publish/esm/{components → src/components}/Toast/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Toast/index.js +0 -0
- /package/publish/esm/{components → src/components}/Toast/toaster.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Toast/toaster.js +0 -0
- /package/publish/esm/{components → src/components}/Toast/use-toast.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Toast/use-toast.js +0 -0
- /package/publish/esm/{components → src/components}/Tooltip/Tooltip.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Tooltip/Tooltip.js +0 -0
- /package/publish/esm/{components → src/components}/Tooltip/index.d.ts +0 -0
- /package/publish/esm/{components → src/components}/Tooltip/index.js +0 -0
- /package/publish/esm/{foundation → src/foundation}/SpinerIcon.d.ts +0 -0
- /package/publish/esm/{foundation → src/foundation}/SpinerIcon.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/SpinerIcon.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/SpinerIcon.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/animations.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/animations.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/clone-deep.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/clone-deep.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/clone-deep.spec.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/clone-deep.spec.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/constants.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/constants.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/generic-forward-ref.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/generic-forward-ref.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/http.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/http.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/is-client.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/is-client.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/is-object.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/is-object.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/is-object.spec.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/is-object.spec.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/merge-deep.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/merge-deep.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/merge-deep.spec.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/merge-deep.spec.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/omit.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/omit.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/omit.spec.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/omit.spec.js +0 -0
- /package/publish/esm/{helpers → src/helpers}/utils.d.ts +0 -0
- /package/publish/esm/{helpers → src/helpers}/utils.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/animations/index.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/animations/index.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/blue.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/blue.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/common.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/common.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/gray.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/gray.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/green.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/green.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/index.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/index.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/orange.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/orange.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/pink.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/pink.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/purple.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/purple.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/red.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/red.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/yellow.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/colors/yellow.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/font-sizes.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/font-sizes.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/index.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/index.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/layout.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/layout.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/plugin.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/plugin.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/radius.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/radius.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/types.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/types.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utilities/custom.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utilities/custom.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utilities/index.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utilities/index.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utilities/scrollbar-hide.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utilities/scrollbar-hide.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utilities/transition.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utilities/transition.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utils/index.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utils/index.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utils/object.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utils/object.js +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utils/theme.d.ts +0 -0
- /package/publish/esm/{mobase-tw-plugin → src/mobase-tw-plugin}/utils/theme.js +0 -0
- /package/publish/esm/{site → src/site}/index.d.ts +0 -0
- /package/publish/esm/{site → src/site}/index.js +0 -0
- /package/publish/esm/{site → src/site}/meta.d.ts +0 -0
- /package/publish/esm/{site → src/site}/meta.js +0 -0
- /package/publish/esm/{types → src/types}/index.d.ts +0 -0
- /package/publish/esm/{types → src/types}/index.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momo-webplatform/mobase",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.34",
|
|
4
4
|
"description": "Mobase is the UI framework upon we build product experiences at MoMo.vn, base on Radix primitives, and Tailwind CSS.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "next dev",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"axios": "^1.6.7",
|
|
65
65
|
"class-variance-authority": "^0.7.0",
|
|
66
66
|
"clsx": "^2.1.0",
|
|
67
|
-
"cmdk": "^0.2.
|
|
67
|
+
"cmdk": "^0.2.1",
|
|
68
68
|
"color": "^4.2.3",
|
|
69
69
|
"date-fns": "^3.2.0",
|
|
70
70
|
"deepmerge": "^4.3.1",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cn = void 0;
|
|
4
|
+
const clsx_1 = require("clsx");
|
|
5
|
+
const tailwind_merge_1 = require("tailwind-merge");
|
|
6
|
+
function cn(...inputs) {
|
|
7
|
+
return (0, tailwind_merge_1.twMerge)((0, clsx_1.clsx)(inputs));
|
|
8
|
+
}
|
|
9
|
+
exports.cn = cn;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Combobox = exports.ComboboxContent = exports.ComboboxTrigger = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const utils_1 = require("../../helpers/utils");
|
|
6
|
+
const solid_1 = require("@heroicons/react/16/solid");
|
|
7
|
+
const Popover_1 = require("../Popover");
|
|
8
|
+
const ComboboxTrigger = ({ className, value, label, children, placeholder, }) => {
|
|
9
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsxs)(Popover_1.PopoverTrigger, { className: (0, utils_1.cn)("focus-visible:outline-none w-72 focus-visible:ring-0 focus-visible:ring-offset-0 focus:ring-0 select-mobase-button bg-white ring-0 transition-all rounded-md border border-gray-400 data-[placeholder]:text-gray-500 p-3 disabled:bg-gray-50 disabled:border-gray-300 disabled:pointer-events-none flex items-center justify-between data-[state=open]:border-pink-500 data-[state=open]:ring-1 hover:ring-1 hover:ring-gray-400 data-[state=open]:ring-pink-500 text-gray-900 h-11 ring-inset text-sm", className), children: [value || children || placeholder, (0, jsx_runtime_1.jsx)(solid_1.ChevronDownIcon, { className: "h-4 w-4 text-gray-700 flex-none" })] }), label && ((0, jsx_runtime_1.jsx)("span", { className: "absolute bg-white -top-2 px-1.5 left-2 text-xs text-gray-500 z-[1]", children: label }))] }));
|
|
10
|
+
};
|
|
11
|
+
exports.ComboboxTrigger = ComboboxTrigger;
|
|
12
|
+
const ComboboxContent = ({ children, className, }) => {
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(Popover_1.PopoverContent, { className: (0, utils_1.cn)("!p-0 border-none", className), children: children }));
|
|
14
|
+
};
|
|
15
|
+
exports.ComboboxContent = ComboboxContent;
|
|
16
|
+
const Combobox = ({ open, onOpenChange, children }) => {
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(Popover_1.Popover, { open: open, onOpenChange: onOpenChange, children: children }));
|
|
18
|
+
};
|
|
19
|
+
exports.Combobox = Combobox;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Combobox = exports.ComboboxContent = exports.ComboboxTrigger = void 0;
|
|
4
|
+
var Combobox_1 = require("./Combobox");
|
|
5
|
+
Object.defineProperty(exports, "ComboboxTrigger", { enumerable: true, get: function () { return Combobox_1.ComboboxTrigger; } });
|
|
6
|
+
Object.defineProperty(exports, "ComboboxContent", { enumerable: true, get: function () { return Combobox_1.ComboboxContent; } });
|
|
7
|
+
Object.defineProperty(exports, "Combobox", { enumerable: true, get: function () { return Combobox_1.Combobox; } });
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.CommandSeparator = exports.CommandShortcut = exports.CommandItem = exports.CommandGroup = exports.CommandEmpty = exports.CommandList = exports.CommandInput = exports.CommandDialog = exports.Command = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const React = __importStar(require("react"));
|
|
29
|
+
const cmdk_1 = require("cmdk");
|
|
30
|
+
const utils_1 = require("../../helpers/utils");
|
|
31
|
+
const Dialog_1 = require("../Dialog");
|
|
32
|
+
const solid_1 = require("@heroicons/react/16/solid");
|
|
33
|
+
const Command = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(cmdk_1.Command, { ref: ref, className: (0, utils_1.cn)("flex text-gray-900 border border-gray-300 shadow-lg bg-white h-full w-full flex-col overflow-hidden rounded-md", className), ...props })));
|
|
34
|
+
exports.Command = Command;
|
|
35
|
+
Command.displayName = cmdk_1.Command.displayName;
|
|
36
|
+
const CommandDialog = ({ children, ...props }) => {
|
|
37
|
+
return ((0, jsx_runtime_1.jsx)(Dialog_1.Dialog, { ...props, children: (0, jsx_runtime_1.jsx)(Dialog_1.DialogContent, { className: "overflow-hidden p-0 shadow-lg", children: (0, jsx_runtime_1.jsx)(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) }) }));
|
|
38
|
+
};
|
|
39
|
+
exports.CommandDialog = CommandDialog;
|
|
40
|
+
const CommandInput = React.forwardRef(({ className, onClickClear, ...props }, ref) => {
|
|
41
|
+
const divRef = React.useRef(null);
|
|
42
|
+
const [search, setSearch] = React.useState("");
|
|
43
|
+
const handleClearInput = () => {
|
|
44
|
+
if (!search || search?.length <= 0)
|
|
45
|
+
return;
|
|
46
|
+
setSearch("");
|
|
47
|
+
onClickClear?.(search);
|
|
48
|
+
};
|
|
49
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: divRef, className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [(0, jsx_runtime_1.jsx)(solid_1.MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 text-gray-500" }), (0, jsx_runtime_1.jsx)(cmdk_1.Command.Input, { ref: ref, className: (0, utils_1.cn)("flex h-10 text-gray-900 w-full rounded-md focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 focus:ring-0 bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className), value: search, onValueChange: setSearch, ...props }), (0, jsx_runtime_1.jsx)(solid_1.XCircleIcon, { onClick: handleClearInput, className: (0, utils_1.cn)("ml-2 transition-all cursor-pointer h-4 w-4 duration-75 shrink-0 text-gray-500", search?.length > 0 ? "opacity-100" : "opacity-0") })] }));
|
|
50
|
+
});
|
|
51
|
+
exports.CommandInput = CommandInput;
|
|
52
|
+
CommandInput.displayName = cmdk_1.Command.Input.displayName;
|
|
53
|
+
const CommandList = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(cmdk_1.Command.List, { ref: ref, className: (0, utils_1.cn)("max-h-[300px] text-gray-900 overflow-y-auto overflow-x-hidden", className), ...props })));
|
|
54
|
+
exports.CommandList = CommandList;
|
|
55
|
+
CommandList.displayName = cmdk_1.Command.List.displayName;
|
|
56
|
+
const CommandEmpty = React.forwardRef((props, ref) => ((0, jsx_runtime_1.jsx)(cmdk_1.Command.Empty, { ref: ref, className: "py-6 text-gray-900 text-center text-sm", ...props })));
|
|
57
|
+
exports.CommandEmpty = CommandEmpty;
|
|
58
|
+
CommandEmpty.displayName = cmdk_1.Command.Empty.displayName;
|
|
59
|
+
const CommandGroup = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(cmdk_1.Command.Group, { ref: ref, className: (0, utils_1.cn)("overflow-hidden text-gray-900 p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className), ...props })));
|
|
60
|
+
exports.CommandGroup = CommandGroup;
|
|
61
|
+
CommandGroup.displayName = cmdk_1.Command.Group.displayName;
|
|
62
|
+
const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(cmdk_1.Command.Separator, { ref: ref, className: (0, utils_1.cn)("-mx-1 text-gray-900 h-px bg-border", className), ...props })));
|
|
63
|
+
exports.CommandSeparator = CommandSeparator;
|
|
64
|
+
CommandSeparator.displayName = cmdk_1.Command.Separator.displayName;
|
|
65
|
+
const CommandItem = React.forwardRef(({ className, children, isActive, ...props }, ref) => {
|
|
66
|
+
return ((0, jsx_runtime_1.jsxs)(cmdk_1.Command.Item, { ref: ref, className: (0, utils_1.cn)("relative cursor-pointer text-gray-900 flex rounded-md select-none hover:bg-gray-100 aria-selected:bg-gray-100 aria-selected:text-gray-900 items-center px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50", isActive ? "bg-gray-100" : "", className), ...props, children: [(0, jsx_runtime_1.jsx)(solid_1.CheckIcon, { className: (0, utils_1.cn)("h-4 w-4 mr-2", isActive ? "opacity-100" : "opacity-0") }), children] }));
|
|
67
|
+
});
|
|
68
|
+
exports.CommandItem = CommandItem;
|
|
69
|
+
CommandItem.displayName = cmdk_1.Command.Item.displayName;
|
|
70
|
+
const CommandShortcut = ({ className, ...props }) => {
|
|
71
|
+
return ((0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)("ml-auto text-xs text-gray-900 tracking-widest text-muted-foreground", className), ...props }));
|
|
72
|
+
};
|
|
73
|
+
exports.CommandShortcut = CommandShortcut;
|
|
74
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommandSeparator = exports.CommandShortcut = exports.CommandItem = exports.CommandGroup = exports.CommandEmpty = exports.CommandList = exports.CommandInput = exports.CommandDialog = exports.Command = void 0;
|
|
4
|
+
var Command_1 = require("./Command");
|
|
5
|
+
Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return Command_1.Command; } });
|
|
6
|
+
Object.defineProperty(exports, "CommandDialog", { enumerable: true, get: function () { return Command_1.CommandDialog; } });
|
|
7
|
+
Object.defineProperty(exports, "CommandInput", { enumerable: true, get: function () { return Command_1.CommandInput; } });
|
|
8
|
+
Object.defineProperty(exports, "CommandList", { enumerable: true, get: function () { return Command_1.CommandList; } });
|
|
9
|
+
Object.defineProperty(exports, "CommandEmpty", { enumerable: true, get: function () { return Command_1.CommandEmpty; } });
|
|
10
|
+
Object.defineProperty(exports, "CommandGroup", { enumerable: true, get: function () { return Command_1.CommandGroup; } });
|
|
11
|
+
Object.defineProperty(exports, "CommandItem", { enumerable: true, get: function () { return Command_1.CommandItem; } });
|
|
12
|
+
Object.defineProperty(exports, "CommandShortcut", { enumerable: true, get: function () { return Command_1.CommandShortcut; } });
|
|
13
|
+
Object.defineProperty(exports, "CommandSeparator", { enumerable: true, get: function () { return Command_1.CommandSeparator; } });
|
|
@@ -28,18 +28,17 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
28
28
|
const React = __importStar(require("react"));
|
|
29
29
|
const solid_1 = require("@heroicons/react/16/solid");
|
|
30
30
|
const outline_1 = require("@heroicons/react/24/outline");
|
|
31
|
-
const solid_2 = require("@heroicons/react/24/solid");
|
|
32
31
|
const SelectPrimitive = __importStar(require("@radix-ui/react-select"));
|
|
33
32
|
const utils_1 = require("../../helpers/utils");
|
|
34
33
|
const Select = React.forwardRef(({ className, children, label, message, size, isError, disabled, ...props }) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("select-mobase relative", className, disabled ? "disabled" : "", isError
|
|
35
34
|
? "[&>.select-mobase-button]:border-red-500 [&>.select-mobase-button]:ring-red-500 [&>.select-mobase-button]:ring-1"
|
|
36
35
|
: "", size === 2
|
|
37
36
|
? "[&>.select-mobase-button]:text-base [&>.select-mobase-button]:h-12"
|
|
38
|
-
: ""), children: [label && ((0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)("mobase-select-label absolute bg-white -top-2 px-1.5 left-2 text-xs text-gray-500 z-[1]", size === 2 && "text-sm -top-2.5", isError && "text-red-500"), children: label })), (0, jsx_runtime_1.jsx)(SelectPrimitive.Root, { disabled: disabled, ...props, children: children }), message && ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("mobase-select-message flex space-x-1 items-center mt-1 text-gray-500", isError && "text-red-500"), children: [isError ? ((0, jsx_runtime_1.jsx)(
|
|
37
|
+
: ""), children: [label && ((0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)("mobase-select-label absolute bg-white -top-2 px-1.5 left-2 text-xs text-gray-500 z-[1]", size === 2 && "text-sm -top-2.5", isError && "text-red-500"), children: label })), (0, jsx_runtime_1.jsx)(SelectPrimitive.Root, { disabled: disabled, ...props, children: children }), message && ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("mobase-select-message flex space-x-1 items-center mt-1 text-gray-500", isError && "text-red-500"), children: [isError ? ((0, jsx_runtime_1.jsx)(solid_1.XCircleIcon, { width: 16, height: 16 })) : ((0, jsx_runtime_1.jsx)(outline_1.QuestionMarkCircleIcon, { width: 16, height: 16 })), (0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)(size === 2 ? "text-sm" : "text-xs"), children: message })] }))] })));
|
|
39
38
|
exports.Select = Select;
|
|
40
39
|
const SelectValue = SelectPrimitive.Value;
|
|
41
40
|
exports.SelectValue = SelectValue;
|
|
42
|
-
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, className: (0, utils_1.cn)("select-mobase-button bg-white w-full ring-0 transition-all focus-visible:border-pink-500 focus-visible:ring-offset-0 focus-visible:ring-offset-transparent focus-visible:ring-1 focus-visible:!ring-pink-500 rounded-md border border-gray-400 data-[placeholder]:text-gray-500 p-3 disabled:bg-gray-50 disabled:border-gray-300 disabled:pointer-events-none flex items-center justify-between data-[state=open]:border-pink-500 data-[state=open]:ring-1 hover:ring-1 hover:ring-gray-400 data-[state=open]:ring-pink-500 text-gray-900 h-11 ring-inset text-sm", className), ...props, children: [(0, jsx_runtime_1.jsx)("div", { className: "line-clamp-1 text-left", children: children }), (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(solid_1.ChevronDownIcon, { className: "h-4 w-4 text-gray-
|
|
41
|
+
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, className: (0, utils_1.cn)("select-mobase-button bg-white w-full ring-0 transition-all focus-visible:border-pink-500 focus-visible:ring-offset-0 focus-visible:ring-offset-transparent focus-visible:ring-1 focus-visible:!ring-pink-500 rounded-md border border-gray-400 data-[placeholder]:text-gray-500 p-3 disabled:bg-gray-50 disabled:border-gray-300 disabled:pointer-events-none flex items-center justify-between data-[state=open]:border-pink-500 data-[state=open]:ring-1 hover:ring-1 hover:ring-gray-400 data-[state=open]:ring-pink-500 text-gray-900 h-11 ring-inset text-sm", className), ...props, children: [(0, jsx_runtime_1.jsx)("div", { className: "line-clamp-1 text-left", children: children }), (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(solid_1.ChevronDownIcon, { className: "h-4 w-4 text-gray-500 flex-none" }) })] })));
|
|
43
42
|
exports.SelectTrigger = SelectTrigger;
|
|
44
43
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
45
44
|
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.ScrollUpButton, { ref: ref, className: (0, utils_1.cn)("flex cursor-default items-center justify-center py-1", className), ...props, children: (0, jsx_runtime_1.jsx)(solid_1.ChevronUpIcon, { className: "h-5 w-5" }) })));
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Stepper = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const outline_1 = require("@heroicons/react/24/outline");
|
|
6
|
+
const IconButton_1 = require("../IconButton");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const utils_1 = require("~/lib/utils");
|
|
9
|
+
exports.Stepper = (0, react_1.forwardRef)(({ value = 0, min = 0, max = 999, disabled = false, disabledInput = false, step = 1, inputClassName = "", stepperClassName = "", className = "", onChange = () => { }, onChangeInputStepper, onDecrement, onIncrement, ...restProps }, ref) => {
|
|
10
|
+
const rootRef = (0, react_1.useRef)(null);
|
|
11
|
+
const [isDisablePlus, setIsDisablePlus] = (0, react_1.useState)(false);
|
|
12
|
+
const [isDisableMinus, setIsDisableMinus] = (0, react_1.useState)(false);
|
|
13
|
+
const [inputValue, setInputValue] = (0, react_1.useState)("");
|
|
14
|
+
const spanRef = (0, react_1.useRef)(null);
|
|
15
|
+
const handleDisable = (inputValue) => {
|
|
16
|
+
if (Number(inputValue) >= max) {
|
|
17
|
+
setIsDisablePlus(true);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
setIsDisablePlus(false);
|
|
21
|
+
}
|
|
22
|
+
if (Number(inputValue) > min) {
|
|
23
|
+
setIsDisableMinus(false);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
setIsDisableMinus(true);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const onIncrementChange = () => {
|
|
30
|
+
if (disabled || isDisablePlus)
|
|
31
|
+
return;
|
|
32
|
+
const inputTarget = rootRef?.current?.querySelector("input");
|
|
33
|
+
if (!inputTarget)
|
|
34
|
+
return;
|
|
35
|
+
let newValue = 0;
|
|
36
|
+
newValue = Math.min(Number(inputTarget.value) + step, max);
|
|
37
|
+
handleDisable(newValue);
|
|
38
|
+
inputTarget.value = String(newValue);
|
|
39
|
+
setInputValue(inputTarget.value || "");
|
|
40
|
+
onChangeInputStepper?.(inputTarget.value);
|
|
41
|
+
onIncrement?.(inputTarget.value);
|
|
42
|
+
};
|
|
43
|
+
const onDecrementChange = () => {
|
|
44
|
+
if (disabled || isDisableMinus)
|
|
45
|
+
return;
|
|
46
|
+
const inputTarget = rootRef?.current?.querySelector("input");
|
|
47
|
+
if (!inputTarget)
|
|
48
|
+
return;
|
|
49
|
+
let newValue = 0;
|
|
50
|
+
newValue = Math.max(Number(inputTarget.value) - step, 0);
|
|
51
|
+
handleDisable(newValue);
|
|
52
|
+
inputTarget.value = String(newValue);
|
|
53
|
+
setInputValue(inputTarget.value || "");
|
|
54
|
+
onChangeInputStepper?.(inputTarget.value);
|
|
55
|
+
onDecrement?.(inputTarget.value);
|
|
56
|
+
};
|
|
57
|
+
const onStepperInputChange = (e) => {
|
|
58
|
+
if (!e)
|
|
59
|
+
return;
|
|
60
|
+
let inputValue = e?.target?.value;
|
|
61
|
+
if (!inputValue?.match(/^[0-9]*$/)) {
|
|
62
|
+
inputValue = inputValue.replace(/[^0-9]/g, "");
|
|
63
|
+
}
|
|
64
|
+
handleDisable(inputValue);
|
|
65
|
+
const numericValue = parseInt(inputValue, 10);
|
|
66
|
+
if (Number.isNaN(numericValue) || numericValue < min) {
|
|
67
|
+
e.target.value = String(min);
|
|
68
|
+
}
|
|
69
|
+
else if (numericValue >= max) {
|
|
70
|
+
e.target.value = String(max);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
e.target.value = String(numericValue);
|
|
74
|
+
}
|
|
75
|
+
setInputValue(e?.target?.value || "");
|
|
76
|
+
onChangeInputStepper?.(e.target.value);
|
|
77
|
+
onChange?.(e);
|
|
78
|
+
};
|
|
79
|
+
(0, react_1.useEffect)(() => {
|
|
80
|
+
const inputTarget = rootRef?.current?.querySelector("input");
|
|
81
|
+
if (!inputTarget)
|
|
82
|
+
return;
|
|
83
|
+
handleDisable(inputTarget?.value);
|
|
84
|
+
}, []);
|
|
85
|
+
(0, react_1.useEffect)(() => {
|
|
86
|
+
const inputTarget = rootRef?.current?.querySelector("input");
|
|
87
|
+
if (inputTarget && spanRef?.current) {
|
|
88
|
+
inputTarget.style.width = `${spanRef.current.offsetWidth + 10}px`;
|
|
89
|
+
}
|
|
90
|
+
}, [inputValue]);
|
|
91
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: rootRef, className: "flex items-center space-x-1", children: [(0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { id: "btn-minus", className: (0, utils_1.cn)(!isDisableMinus && !disabled
|
|
92
|
+
? "cursor-pointer text-pink-500"
|
|
93
|
+
: "text-gray-400 cursor-default", stepperClassName), variant: "transparent", onClick: onDecrementChange, children: (0, jsx_runtime_1.jsx)(outline_1.MinusCircleIcon, { className: "w-8 h-8 " }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("input", { pattern: "[0-9]*", inputMode: "numeric", defaultValue: value, ref: ref, min: min, max: max, onChange: (e) => onStepperInputChange(e), id: "numberInput", disabled: disabled || disabledInput, autoComplete: "off", ...restProps, className: (0, utils_1.cn)("text-gray-800 min-w-7 border-gray-400 border transition-width duration-100 focus-visible:outline-none focus-visible:ring-0 focus:ring-0 shadow-none focus-visible:ring-offset-0 w-7 h-7 rounded-md text-center bg-white", inputClassName) }), (0, jsx_runtime_1.jsx)("span", { ref: spanRef, style: {
|
|
94
|
+
visibility: "hidden",
|
|
95
|
+
position: "absolute",
|
|
96
|
+
whiteSpace: "pre",
|
|
97
|
+
}, children: inputValue || " " })] }), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { id: "btn-plus", className: (0, utils_1.cn)(!isDisablePlus && !disabled
|
|
98
|
+
? "cursor-pointer text-pink-500"
|
|
99
|
+
: "text-gray-400 cursor-default", stepperClassName), variant: "transparent", onClick: onIncrementChange, children: (0, jsx_runtime_1.jsx)(outline_1.PlusCircleIcon, { className: "w-8 h-8 " }) })] }));
|
|
100
|
+
});
|
|
@@ -27,6 +27,7 @@ __exportStar(require("./components/Tabs"), exports);
|
|
|
27
27
|
__exportStar(require("./components/TextArea"), exports);
|
|
28
28
|
__exportStar(require("./components/Tooltip"), exports);
|
|
29
29
|
__exportStar(require("./components/TextInput"), exports);
|
|
30
|
+
__exportStar(require("./components/Stepper"), exports);
|
|
30
31
|
__exportStar(require("./components/Select"), exports);
|
|
31
32
|
__exportStar(require("./components/NavigationMenu"), exports);
|
|
32
33
|
__exportStar(require("./components/Switch"), exports);
|
|
@@ -34,5 +35,7 @@ __exportStar(require("./components/RadioGroup"), exports);
|
|
|
34
35
|
__exportStar(require("./components/Header"), exports);
|
|
35
36
|
__exportStar(require("./components/Footer"), exports);
|
|
36
37
|
__exportStar(require("./components/Card"), exports);
|
|
38
|
+
__exportStar(require("./components/Command"), exports);
|
|
39
|
+
__exportStar(require("./components/Combobox"), exports);
|
|
37
40
|
__exportStar(require("./mobase-tw-plugin"), exports);
|
|
38
41
|
__exportStar(require("./site"), exports);
|