@momo-webplatform/mobase 0.0.42 → 0.0.44
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/dist/cjs/index.cjs +5790 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/cjs/index.d.cts +661 -0
- package/dist/esm/index.d.ts +661 -0
- package/dist/esm/index.js +5260 -0
- package/dist/esm/index.js.map +1 -0
- package/package.json +63 -114
- package/LICENSE +0 -21
- package/publish/cjs/components/Accordion/Accordion.js +0 -44
- package/publish/cjs/components/Accordion/index.js +0 -8
- package/publish/cjs/components/AlertDialog/AlertDialog.js +0 -62
- package/publish/cjs/components/AlertDialog/index.js +0 -16
- package/publish/cjs/components/Badge/Badge.js +0 -24
- package/publish/cjs/components/Badge/index.js +0 -6
- package/publish/cjs/components/Breadcrumb/Breadcrumb.js +0 -55
- package/publish/cjs/components/Breadcrumb/index.js +0 -11
- package/publish/cjs/components/Button/Button.js +0 -74
- package/publish/cjs/components/Button/index.js +0 -6
- package/publish/cjs/components/Callout/Callout.js +0 -46
- package/publish/cjs/components/Callout/index.js +0 -5
- package/publish/cjs/components/Card/Card.js +0 -47
- package/publish/cjs/components/Card/index.js +0 -10
- package/publish/cjs/components/Checkbox/Checkbox.js +0 -67
- package/publish/cjs/components/Checkbox/index.js +0 -9
- package/publish/cjs/components/Choicebox/Choicebox.js +0 -90
- package/publish/cjs/components/Choicebox/index.js +0 -6
- package/publish/cjs/components/Combobox/Combobox.js +0 -19
- package/publish/cjs/components/Combobox/index.js +0 -7
- package/publish/cjs/components/Command/Command.js +0 -74
- package/publish/cjs/components/Command/index.js +0 -13
- package/publish/cjs/components/Dialog/Dialog.js +0 -90
- package/publish/cjs/components/Dialog/index.js +0 -15
- package/publish/cjs/components/DialogQr/DialogQr.js +0 -98
- package/publish/cjs/components/DialogQr/index.js +0 -5
- package/publish/cjs/components/Footer/Footer.js +0 -15
- package/publish/cjs/components/Footer/FooterContent.js +0 -27
- package/publish/cjs/components/Footer/index.js +0 -5
- package/publish/cjs/components/Header/Header.js +0 -19
- package/publish/cjs/components/Header/ListItem.js +0 -12
- package/publish/cjs/components/Header/ListItemMobile.js +0 -15
- package/publish/cjs/components/Header/MobileMenu.js +0 -61
- package/publish/cjs/components/Header/NavItems.js +0 -26
- package/publish/cjs/components/Header/NavItemsMobile.js +0 -35
- package/publish/cjs/components/Header/index.js +0 -5
- package/publish/cjs/components/IconButton/IconButton.js +0 -67
- package/publish/cjs/components/IconButton/index.js +0 -5
- package/publish/cjs/components/LightboxGallery/LightboxGallery.js +0 -203
- package/publish/cjs/components/LightboxGallery/index.js +0 -7
- package/publish/cjs/components/NavigationMenu/NavigationMenu.js +0 -62
- package/publish/cjs/components/NavigationMenu/index.js +0 -13
- package/publish/cjs/components/Pagination/Pagination.js +0 -31
- package/publish/cjs/components/Pagination/index.js +0 -8
- package/publish/cjs/components/Popover/Popover.js +0 -37
- package/publish/cjs/components/Popover/index.js +0 -7
- package/publish/cjs/components/RadioGroup/RadioGroup.js +0 -53
- package/publish/cjs/components/RadioGroup/index.js +0 -6
- package/publish/cjs/components/SearchBar/SearchBar.js +0 -48
- package/publish/cjs/components/SearchBar/index.js +0 -5
- package/publish/cjs/components/Select/Select.js +0 -67
- package/publish/cjs/components/Select/index.js +0 -14
- package/publish/cjs/components/Stepper/Stepper.js +0 -100
- package/publish/cjs/components/Stepper/index.js +0 -5
- package/publish/cjs/components/Switch/Switch.js +0 -33
- package/publish/cjs/components/Switch/index.js +0 -5
- package/publish/cjs/components/Tabs/Tabs.js +0 -41
- package/publish/cjs/components/Tabs/index.js +0 -8
- package/publish/cjs/components/TextArea/TextArea.js +0 -38
- package/publish/cjs/components/TextArea/index.js +0 -5
- package/publish/cjs/components/TextButton/TextButton.js +0 -63
- package/publish/cjs/components/TextButton/index.js +0 -6
- package/publish/cjs/components/TextInput/TextInput.js +0 -65
- package/publish/cjs/components/TextInput/index.js +0 -5
- package/publish/cjs/components/Toast/Toast.js +0 -66
- package/publish/cjs/components/Toast/index.js +0 -8
- package/publish/cjs/components/Toast/toaster.js +0 -14
- package/publish/cjs/components/Toast/useToast.js +0 -157
- package/publish/cjs/components/Tooltip/Tooltip.js +0 -44
- package/publish/cjs/components/Tooltip/index.js +0 -9
- package/publish/cjs/foundation/SpinerIcon.js +0 -7
- package/publish/cjs/helpers/SpinerIcon.js +0 -7
- package/publish/cjs/helpers/animations.js +0 -18
- package/publish/cjs/helpers/clone-deep.js +0 -15
- package/publish/cjs/helpers/clone-deep.spec.js +0 -22
- package/publish/cjs/helpers/constants.js +0 -204
- package/publish/cjs/helpers/generic-forward-ref.js +0 -5
- package/publish/cjs/helpers/http.js +0 -10
- package/publish/cjs/helpers/is-client.js +0 -7
- package/publish/cjs/helpers/is-object.js +0 -12
- package/publish/cjs/helpers/is-object.spec.js +0 -24
- package/publish/cjs/helpers/merge-deep.js +0 -29
- package/publish/cjs/helpers/merge-deep.spec.js +0 -56
- package/publish/cjs/helpers/omit.js +0 -16
- package/publish/cjs/helpers/omit.spec.js +0 -9
- package/publish/cjs/helpers/utils.js +0 -23
- package/publish/cjs/index.js +0 -48
- package/publish/cjs/mobase-tw-plugin/animations/index.js +0 -25
- package/publish/cjs/mobase-tw-plugin/colors/blue.js +0 -16
- package/publish/cjs/mobase-tw-plugin/colors/common.js +0 -23
- package/publish/cjs/mobase-tw-plugin/colors/gray.js +0 -16
- package/publish/cjs/mobase-tw-plugin/colors/green.js +0 -16
- package/publish/cjs/mobase-tw-plugin/colors/index.js +0 -9
- package/publish/cjs/mobase-tw-plugin/colors/orange.js +0 -16
- package/publish/cjs/mobase-tw-plugin/colors/pink.js +0 -16
- package/publish/cjs/mobase-tw-plugin/colors/purple.js +0 -16
- package/publish/cjs/mobase-tw-plugin/colors/red.js +0 -16
- package/publish/cjs/mobase-tw-plugin/colors/yellow.js +0 -16
- package/publish/cjs/mobase-tw-plugin/font-sizes.js +0 -98
- package/publish/cjs/mobase-tw-plugin/index.js +0 -5
- package/publish/cjs/mobase-tw-plugin/layout.js +0 -48
- package/publish/cjs/mobase-tw-plugin/plugin.js +0 -201
- package/publish/cjs/mobase-tw-plugin/radius.js +0 -16
- package/publish/cjs/mobase-tw-plugin/types.js +0 -54
- package/publish/cjs/mobase-tw-plugin/utilities/custom.js +0 -25
- package/publish/cjs/mobase-tw-plugin/utilities/index.js +0 -14
- package/publish/cjs/mobase-tw-plugin/utilities/scrollbar-hide.js +0 -30
- package/publish/cjs/mobase-tw-plugin/utilities/transition.js +0 -88
- package/publish/cjs/mobase-tw-plugin/utils/index.js +0 -17
- package/publish/cjs/mobase-tw-plugin/utils/object.js +0 -53
- package/publish/cjs/mobase-tw-plugin/utils/theme.js +0 -70
- package/publish/cjs/site/index.js +0 -5
- package/publish/cjs/site/meta.js +0 -57
- package/publish/cjs/tsconfig.lib.tsbuildinfo +0 -1
- package/publish/cjs/types/index.js +0 -2
- package/publish/esm/components/Accordion/Accordion.d.ts +0 -20
- package/publish/esm/components/Accordion/Accordion.js +0 -15
- package/publish/esm/components/Accordion/index.d.ts +0 -2
- package/publish/esm/components/Accordion/index.js +0 -1
- package/publish/esm/components/AlertDialog/AlertDialog.d.ts +0 -49
- package/publish/esm/components/AlertDialog/AlertDialog.js +0 -26
- package/publish/esm/components/AlertDialog/index.d.ts +0 -2
- package/publish/esm/components/AlertDialog/index.js +0 -5
- package/publish/esm/components/Badge/Badge.d.ts +0 -10
- package/publish/esm/components/Badge/Badge.js +0 -20
- package/publish/esm/components/Badge/index.d.ts +0 -1
- package/publish/esm/components/Badge/index.js +0 -1
- package/publish/esm/components/Breadcrumb/Breadcrumb.d.ts +0 -20
- package/publish/esm/components/Breadcrumb/Breadcrumb.js +0 -23
- package/publish/esm/components/Breadcrumb/index.d.ts +0 -2
- package/publish/esm/components/Breadcrumb/index.js +0 -2
- package/publish/esm/components/Button/Button.d.ts +0 -26
- package/publish/esm/components/Button/Button.js +0 -44
- package/publish/esm/components/Button/index.d.ts +0 -2
- package/publish/esm/components/Button/index.js +0 -1
- package/publish/esm/components/Callout/Callout.d.ts +0 -19
- package/publish/esm/components/Callout/Callout.js +0 -43
- package/publish/esm/components/Callout/index.d.ts +0 -1
- package/publish/esm/components/Callout/index.js +0 -1
- package/publish/esm/components/Card/Card.d.ts +0 -9
- package/publish/esm/components/Card/Card.js +0 -16
- package/publish/esm/components/Card/index.d.ts +0 -1
- package/publish/esm/components/Card/index.js +0 -1
- package/publish/esm/components/Checkbox/Checkbox.d.ts +0 -40
- package/publish/esm/components/Checkbox/Checkbox.js +0 -36
- package/publish/esm/components/Checkbox/index.d.ts +0 -2
- package/publish/esm/components/Checkbox/index.js +0 -1
- package/publish/esm/components/Choicebox/Choicebox.d.ts +0 -31
- package/publish/esm/components/Choicebox/Choicebox.js +0 -62
- package/publish/esm/components/Choicebox/index.d.ts +0 -1
- package/publish/esm/components/Choicebox/index.js +0 -1
- package/publish/esm/components/Combobox/Combobox.d.ts +0 -19
- package/publish/esm/components/Combobox/Combobox.js +0 -13
- package/publish/esm/components/Combobox/index.d.ts +0 -1
- package/publish/esm/components/Combobox/index.js +0 -1
- package/publish/esm/components/Command/Command.d.ts +0 -57
- package/publish/esm/components/Command/Command.js +0 -40
- package/publish/esm/components/Command/index.d.ts +0 -1
- package/publish/esm/components/Command/index.js +0 -1
- package/publish/esm/components/Dialog/Dialog.d.ts +0 -51
- package/publish/esm/components/Dialog/Dialog.js +0 -54
- package/publish/esm/components/Dialog/index.d.ts +0 -1
- package/publish/esm/components/Dialog/index.js +0 -1
- package/publish/esm/components/DialogQr/DialogQr.d.ts +0 -33
- package/publish/esm/components/DialogQr/DialogQr.js +0 -91
- package/publish/esm/components/DialogQr/index.d.ts +0 -1
- package/publish/esm/components/DialogQr/index.js +0 -1
- package/publish/esm/components/Footer/Footer.d.ts +0 -22
- package/publish/esm/components/Footer/Footer.js +0 -9
- package/publish/esm/components/Footer/FooterContent.d.ts +0 -4
- package/publish/esm/components/Footer/FooterContent.js +0 -27
- package/publish/esm/components/Footer/index.d.ts +0 -1
- package/publish/esm/components/Footer/index.js +0 -1
- package/publish/esm/components/Header/Header.d.ts +0 -44
- package/publish/esm/components/Header/Header.js +0 -13
- package/publish/esm/components/Header/ListItem.d.ts +0 -9
- package/publish/esm/components/Header/ListItem.js +0 -10
- package/publish/esm/components/Header/ListItemMobile.d.ts +0 -9
- package/publish/esm/components/Header/ListItemMobile.js +0 -10
- package/publish/esm/components/Header/MobileMenu.d.ts +0 -6
- package/publish/esm/components/Header/MobileMenu.js +0 -56
- package/publish/esm/components/Header/NavItems.d.ts +0 -2
- package/publish/esm/components/Header/NavItems.js +0 -21
- package/publish/esm/components/Header/NavItemsMobile.d.ts +0 -2
- package/publish/esm/components/Header/NavItemsMobile.js +0 -30
- package/publish/esm/components/Header/index.d.ts +0 -1
- package/publish/esm/components/Header/index.js +0 -1
- package/publish/esm/components/IconButton/IconButton.d.ts +0 -22
- package/publish/esm/components/IconButton/IconButton.js +0 -40
- package/publish/esm/components/IconButton/index.d.ts +0 -2
- package/publish/esm/components/IconButton/index.js +0 -1
- package/publish/esm/components/LightboxGallery/LightboxGallery.d.ts +0 -37
- package/publish/esm/components/LightboxGallery/LightboxGallery.js +0 -171
- package/publish/esm/components/LightboxGallery/index.d.ts +0 -1
- package/publish/esm/components/LightboxGallery/index.js +0 -1
- package/publish/esm/components/NavigationMenu/NavigationMenu.d.ts +0 -12
- package/publish/esm/components/NavigationMenu/NavigationMenu.js +0 -28
- package/publish/esm/components/NavigationMenu/index.d.ts +0 -1
- package/publish/esm/components/NavigationMenu/index.js +0 -1
- package/publish/esm/components/Pagination/Pagination.d.ts +0 -16
- package/publish/esm/components/Pagination/Pagination.js +0 -28
- package/publish/esm/components/Pagination/index.d.ts +0 -1
- package/publish/esm/components/Pagination/index.js +0 -1
- package/publish/esm/components/Popover/Popover.d.ts +0 -6
- package/publish/esm/components/Popover/Popover.js +0 -9
- package/publish/esm/components/Popover/index.d.ts +0 -1
- package/publish/esm/components/Popover/index.js +0 -1
- package/publish/esm/components/RadioGroup/RadioGroup.d.ts +0 -13
- package/publish/esm/components/RadioGroup/RadioGroup.js +0 -26
- package/publish/esm/components/RadioGroup/index.d.ts +0 -1
- package/publish/esm/components/RadioGroup/index.js +0 -1
- package/publish/esm/components/SearchBar/SearchBar.d.ts +0 -7
- package/publish/esm/components/SearchBar/SearchBar.js +0 -45
- package/publish/esm/components/SearchBar/index.d.ts +0 -1
- package/publish/esm/components/SearchBar/index.js +0 -1
- package/publish/esm/components/Select/Select.d.ts +0 -19
- package/publish/esm/components/Select/Select.js +0 -32
- package/publish/esm/components/Select/index.d.ts +0 -1
- package/publish/esm/components/Select/index.js +0 -1
- package/publish/esm/components/Stepper/Stepper.d.ts +0 -15
- package/publish/esm/components/Stepper/Stepper.js +0 -97
- package/publish/esm/components/Stepper/index.d.ts +0 -1
- package/publish/esm/components/Stepper/index.js +0 -1
- package/publish/esm/components/Switch/Switch.d.ts +0 -4
- package/publish/esm/components/Switch/Switch.js +0 -7
- package/publish/esm/components/Switch/index.d.ts +0 -1
- package/publish/esm/components/Switch/index.js +0 -1
- package/publish/esm/components/Tabs/Tabs.d.ts +0 -16
- package/publish/esm/components/Tabs/Tabs.js +0 -12
- package/publish/esm/components/Tabs/index.d.ts +0 -1
- package/publish/esm/components/Tabs/index.js +0 -1
- package/publish/esm/components/TextArea/TextArea.d.ts +0 -9
- package/publish/esm/components/TextArea/TextArea.js +0 -35
- package/publish/esm/components/TextArea/index.d.ts +0 -2
- package/publish/esm/components/TextArea/index.js +0 -1
- package/publish/esm/components/TextButton/TextButton.d.ts +0 -22
- package/publish/esm/components/TextButton/TextButton.js +0 -36
- package/publish/esm/components/TextButton/index.d.ts +0 -2
- package/publish/esm/components/TextButton/index.js +0 -1
- package/publish/esm/components/TextInput/TextInput.d.ts +0 -11
- package/publish/esm/components/TextInput/TextInput.js +0 -62
- package/publish/esm/components/TextInput/index.d.ts +0 -2
- package/publish/esm/components/TextInput/index.js +0 -1
- package/publish/esm/components/Toast/Toast.d.ts +0 -15
- package/publish/esm/components/Toast/Toast.js +0 -34
- package/publish/esm/components/Toast/index.d.ts +0 -2
- package/publish/esm/components/Toast/index.js +0 -2
- package/publish/esm/components/Toast/toaster.d.ts +0 -1
- package/publish/esm/components/Toast/toaster.js +0 -10
- package/publish/esm/components/Toast/useToast.d.ts +0 -44
- package/publish/esm/components/Toast/useToast.js +0 -129
- package/publish/esm/components/Tooltip/Tooltip.d.ts +0 -12
- package/publish/esm/components/Tooltip/Tooltip.js +0 -14
- package/publish/esm/components/Tooltip/index.d.ts +0 -1
- package/publish/esm/components/Tooltip/index.js +0 -1
- package/publish/esm/foundation/SpinerIcon.d.ts +0 -6
- package/publish/esm/foundation/SpinerIcon.js +0 -5
- package/publish/esm/helpers/SpinerIcon.d.ts +0 -6
- package/publish/esm/helpers/SpinerIcon.js +0 -5
- package/publish/esm/helpers/animations.d.ts +0 -26
- package/publish/esm/helpers/animations.js +0 -14
- package/publish/esm/helpers/clone-deep.d.ts +0 -1
- package/publish/esm/helpers/clone-deep.js +0 -11
- package/publish/esm/helpers/clone-deep.spec.d.ts +0 -1
- package/publish/esm/helpers/clone-deep.spec.js +0 -20
- package/publish/esm/helpers/constants.d.ts +0 -69
- package/publish/esm/helpers/constants.js +0 -201
- package/publish/esm/helpers/generic-forward-ref.d.ts +0 -5
- package/publish/esm/helpers/generic-forward-ref.js +0 -3
- package/publish/esm/helpers/http.d.ts +0 -1
- package/publish/esm/helpers/http.js +0 -6
- package/publish/esm/helpers/is-client.d.ts +0 -1
- package/publish/esm/helpers/is-client.js +0 -3
- package/publish/esm/helpers/is-object.d.ts +0 -6
- package/publish/esm/helpers/is-object.js +0 -8
- package/publish/esm/helpers/is-object.spec.d.ts +0 -1
- package/publish/esm/helpers/is-object.spec.js +0 -22
- package/publish/esm/helpers/merge-deep.d.ts +0 -7
- package/publish/esm/helpers/merge-deep.js +0 -25
- package/publish/esm/helpers/merge-deep.spec.d.ts +0 -1
- package/publish/esm/helpers/merge-deep.spec.js +0 -54
- package/publish/esm/helpers/omit.d.ts +0 -1
- package/publish/esm/helpers/omit.js +0 -12
- package/publish/esm/helpers/omit.spec.d.ts +0 -1
- package/publish/esm/helpers/omit.spec.js +0 -7
- package/publish/esm/helpers/utils.d.ts +0 -8
- package/publish/esm/helpers/utils.js +0 -18
- package/publish/esm/index.d.ts +0 -32
- package/publish/esm/index.js +0 -32
- package/publish/esm/mobase-tw-plugin/animations/index.d.ts +0 -34
- package/publish/esm/mobase-tw-plugin/animations/index.js +0 -22
- package/publish/esm/mobase-tw-plugin/colors/blue.d.ts +0 -13
- package/publish/esm/mobase-tw-plugin/colors/blue.js +0 -13
- package/publish/esm/mobase-tw-plugin/colors/common.d.ts +0 -109
- package/publish/esm/mobase-tw-plugin/colors/common.js +0 -20
- package/publish/esm/mobase-tw-plugin/colors/gray.d.ts +0 -13
- package/publish/esm/mobase-tw-plugin/colors/gray.js +0 -13
- package/publish/esm/mobase-tw-plugin/colors/green.d.ts +0 -13
- package/publish/esm/mobase-tw-plugin/colors/green.js +0 -13
- package/publish/esm/mobase-tw-plugin/colors/index.d.ts +0 -110
- package/publish/esm/mobase-tw-plugin/colors/index.js +0 -5
- package/publish/esm/mobase-tw-plugin/colors/orange.d.ts +0 -13
- package/publish/esm/mobase-tw-plugin/colors/orange.js +0 -13
- package/publish/esm/mobase-tw-plugin/colors/pink.d.ts +0 -13
- package/publish/esm/mobase-tw-plugin/colors/pink.js +0 -13
- package/publish/esm/mobase-tw-plugin/colors/purple.d.ts +0 -13
- package/publish/esm/mobase-tw-plugin/colors/purple.js +0 -13
- package/publish/esm/mobase-tw-plugin/colors/red.d.ts +0 -13
- package/publish/esm/mobase-tw-plugin/colors/red.js +0 -13
- package/publish/esm/mobase-tw-plugin/colors/yellow.d.ts +0 -13
- package/publish/esm/mobase-tw-plugin/colors/yellow.js +0 -13
- package/publish/esm/mobase-tw-plugin/font-sizes.d.ts +0 -59
- package/publish/esm/mobase-tw-plugin/font-sizes.js +0 -94
- package/publish/esm/mobase-tw-plugin/index.d.ts +0 -1
- package/publish/esm/mobase-tw-plugin/index.js +0 -1
- package/publish/esm/mobase-tw-plugin/layout.d.ts +0 -45
- package/publish/esm/mobase-tw-plugin/layout.js +0 -45
- package/publish/esm/mobase-tw-plugin/plugin.d.ts +0 -10
- package/publish/esm/mobase-tw-plugin/plugin.js +0 -194
- package/publish/esm/mobase-tw-plugin/radius.d.ts +0 -9
- package/publish/esm/mobase-tw-plugin/radius.js +0 -12
- package/publish/esm/mobase-tw-plugin/types.d.ts +0 -103
- package/publish/esm/mobase-tw-plugin/types.js +0 -51
- package/publish/esm/mobase-tw-plugin/utilities/custom.d.ts +0 -24
- package/publish/esm/mobase-tw-plugin/utilities/custom.js +0 -23
- package/publish/esm/mobase-tw-plugin/utilities/index.d.ts +0 -114
- package/publish/esm/mobase-tw-plugin/utilities/index.js +0 -8
- package/publish/esm/mobase-tw-plugin/utilities/scrollbar-hide.d.ts +0 -23
- package/publish/esm/mobase-tw-plugin/utilities/scrollbar-hide.js +0 -28
- package/publish/esm/mobase-tw-plugin/utilities/transition.d.ts +0 -86
- package/publish/esm/mobase-tw-plugin/utilities/transition.js +0 -86
- package/publish/esm/mobase-tw-plugin/utils/index.d.ts +0 -1
- package/publish/esm/mobase-tw-plugin/utils/index.js +0 -1
- package/publish/esm/mobase-tw-plugin/utils/object.d.ts +0 -10
- package/publish/esm/mobase-tw-plugin/utils/object.js +0 -44
- package/publish/esm/mobase-tw-plugin/utils/theme.d.ts +0 -2
- package/publish/esm/mobase-tw-plugin/utils/theme.js +0 -65
- package/publish/esm/site/index.d.ts +0 -2
- package/publish/esm/site/index.js +0 -2
- package/publish/esm/site/meta.d.ts +0 -1
- package/publish/esm/site/meta.js +0 -53
- package/publish/esm/tsconfig.lib.tsbuildinfo +0 -1
- package/publish/esm/types/index.d.ts +0 -3
- package/publish/esm/types/index.js +0 -1
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare const ListItemMobile: ({ className, icon, title, children, href, newTab, }: {
|
|
2
|
-
className?: string | undefined;
|
|
3
|
-
icon?: string | undefined;
|
|
4
|
-
title: any;
|
|
5
|
-
children?: string | undefined;
|
|
6
|
-
href?: string | undefined;
|
|
7
|
-
newTab?: boolean | undefined;
|
|
8
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default ListItemMobile;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../helpers/utils";
|
|
3
|
-
import Link from "next/link";
|
|
4
|
-
const ListItemMobile = ({ className = "", icon = "", title, children = "", href = "", newTab = false, }) => {
|
|
5
|
-
const linkProps = newTab
|
|
6
|
-
? { target: "_blank", rel: "noopener noreferrer" }
|
|
7
|
-
: {};
|
|
8
|
-
return (_jsx("li", { className: "", children: _jsxs(Link, { className: cn(" select-none py-2 flex flex-nowrap space-x-2 items-center", className), href: href, ...linkProps, children: [icon && (_jsx("div", { className: "w-7 h-7 shrink-0", children: _jsx("img", { src: icon, loading: "lazy", className: "w-7 h-7 object-cover", alt: title }) })), _jsxs("div", { className: " ", children: [_jsx("div", { className: "text-sm text-gray-800 leading-none", children: title }), children && (_jsx("p", { className: "line-clamp-1 text-xs mt-1 text-gray-500", children: children }))] })] }) }));
|
|
9
|
-
};
|
|
10
|
-
export default ListItemMobile;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
3
|
-
import { DEFAULT_EASE } from "../../helpers/animations";
|
|
4
|
-
import { cn } from "../../helpers/utils";
|
|
5
|
-
import { useKey } from "react-use";
|
|
6
|
-
import Router from "next/router";
|
|
7
|
-
import NavItemsMobile from "./NavItemsMobile";
|
|
8
|
-
import Link from "next/link";
|
|
9
|
-
import { motion, AnimatePresence, LazyMotion, domAnimation, } from "framer-motion";
|
|
10
|
-
import { MoMoText } from "../../helpers/constants";
|
|
11
|
-
const computeInsetTop = () => typeof window !== "undefined" && window.pageYOffset !== undefined
|
|
12
|
-
? window.pageYOffset
|
|
13
|
-
: 0;
|
|
14
|
-
const MobileMenu = ({ data, className }) => {
|
|
15
|
-
// useKey("Escape", () => setOpen(false));
|
|
16
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
17
|
-
useKey("Escape", () => setIsOpen(false));
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
if (!isOpen)
|
|
20
|
-
return;
|
|
21
|
-
const memoizedInsetTop = computeInsetTop();
|
|
22
|
-
function handleRouteChange() {
|
|
23
|
-
setIsOpen(false);
|
|
24
|
-
}
|
|
25
|
-
document.body.style.position = "fixed";
|
|
26
|
-
document.body.style.width = "100%";
|
|
27
|
-
Router.events.on("routeChangeComplete", handleRouteChange);
|
|
28
|
-
return () => {
|
|
29
|
-
document.body.style.position = '';
|
|
30
|
-
document.body.style.width = '';
|
|
31
|
-
window.scrollTo({
|
|
32
|
-
top: memoizedInsetTop || 0,
|
|
33
|
-
behavior: "instant",
|
|
34
|
-
});
|
|
35
|
-
Router.events.off("routeChangeComplete", handleRouteChange);
|
|
36
|
-
};
|
|
37
|
-
}, [isOpen]);
|
|
38
|
-
const variants = {
|
|
39
|
-
visible: { opacity: 1, transition: { duration: 0.2 } },
|
|
40
|
-
hidden: { opacity: 0, transition: { duration: 0.2 } },
|
|
41
|
-
};
|
|
42
|
-
const containerVariants = {
|
|
43
|
-
hidden: { opacity: 0 },
|
|
44
|
-
show: {
|
|
45
|
-
opacity: 1,
|
|
46
|
-
transition: {
|
|
47
|
-
duration: 0.15,
|
|
48
|
-
staggerChildren: 0.05,
|
|
49
|
-
ease: DEFAULT_EASE,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
exit: { opacity: 0, transition: { duration: 0.15 } },
|
|
53
|
-
};
|
|
54
|
-
return (_jsxs("div", { className: cn(className), children: [_jsxs("button", { type: "button", className: "text-gray-800 w-10 h-10 flex items-center justify-center hover:text-gray-700 ", onClick: () => setIsOpen(!isOpen), children: [_jsx("span", { className: "sr-only", children: "Navigation" }), _jsx(motion.div, { animate: isOpen ? "hidden" : "visible", variants: variants, children: _jsx("svg", { className: cn("block w-7 h-7", isOpen && "hidden"), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M4 6h16M4 12h16M4 18h16" }) }) }), _jsx(motion.div, { animate: isOpen ? "visible" : "hidden", variants: variants, children: _jsx("svg", { className: cn("block w-7 h-7", !isOpen && "hidden"), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) }) })] }), _jsx(LazyMotion, { features: domAnimation, children: _jsx(AnimatePresence, { mode: "wait", children: isOpen && (_jsxs(motion.nav, { variants: containerVariants, initial: "hidden", animate: "show", exit: "exit", className: cn(className, "fixed block w-full max-w-full z-50 px-5 bg-white left-0 right-0 bottom-0 overflow-y-auto top-[calc(var(--header-height)+1px)] "), children: [_jsx(NavItemsMobile, { data: data }), _jsxs("div", { className: "py-4 text-sm animate-fade-in duration-500 delay-300", children: [_jsx("h4", { className: "mb-2 mt-5 text-sm font-semibold text-gray-700 ", children: "T\u1EA2I V\u00C0 \u0110\u0102NG K\u00DD" }), _jsxs("div", { className: "flex flex-nowrap", children: [_jsx("div", { className: "flex-initial", children: _jsx(Link, { href: "https://itunes.apple.com/vn/app/id918751511?utm_source=website-momo&utm_medium=download&utm_campaign=momo-1dong", legacyBehavior: true, children: _jsx("a", { className: "link-white", target: "_blank", children: _jsx("img", { src: "https://homepage.momocdn.net/img/momo-upload-api-210724113855-637627235353131497.jpg", width: 130, loading: "lazy", className: "img-fluid", alt: "" }) }) }) }), _jsx("div", { className: "ml-3 flex-initial", children: _jsx(Link, { href: "https://play.google.com/store/apps/details?id=com.mservice.momotransfer&utm_source=website-momo&utm_medium=download&utm_campaign=momo-1dong", legacyBehavior: true, children: _jsx("a", { className: "link-white", target: "_blank", children: _jsx("img", { src: "https://homepage.momocdn.net/img/momo-upload-api-210724113959-637627235994410679.jpg", width: 130, loading: "lazy", className: "img-fluid", alt: "" }) }) }) })] }), _jsx("h4", { className: "mb-2 mt-5 text-tiny font-semibold text-gray-700", children: "H\u1ED6 TR\u1EE2 KH\u00C1CH H\u00C0NG" }), _jsxs("ul", { className: "mb-2 text-tiny text-gray-500", children: [_jsxs("li", { className: "mb-1", children: ["Hotline :", _jsx(Link, { href: `tel:${MoMoText.Support.Hotline}`, legacyBehavior: true, children: _jsx("a", { className: "text-gray-600", children: MoMoText.Support.Hotline_Format }) })] }), _jsxs("li", { className: "mb-1", children: ["Email:", _jsx(Link, { href: `mailto:${MoMoText.Support.Email}`, legacyBehavior: true, children: _jsx("a", { className: "text-gray-600", children: MoMoText.Support.Email }) })] })] }), _jsx("a", { href: "https://momo.vn/huong-dan/huong-dan-gui-yeu-cau-ho-tro-bang-tinh-nang-tro-giup", rel: "noreferrer", target: "_blank", children: _jsxs("div", { className: "relative inline-block overflow-hidden rounded border border-gray-300 bg-white py-1 pl-10 pr-2 hover:bg-gray-100", children: [_jsx("div", { className: "absolute left-1 top-1 ", style: { paddingTop: "3px" }, children: _jsx("svg", { className: "h-7 w-7 text-pink-700 ", fill: "currentColor", stroke: "currentColor", viewBox: "0 0 345.1 512", children: _jsxs("g", { children: [_jsx("title", { children: "Asset 1" }), _jsx("path", { d: "M279.4,23.7H30.8C14.5,23.7,0,38.2,0,56.3v401.8c0,16.3,14.5,30.8,30.8,30.8H76h23.8L76,449.4H34.5V96.2h243.1v152l34.5,22\n V56.3C312,38.2,297.5,23.7,279.4,23.7z M226.8,77.1H86.1c-8.1,0-13.5-5.4-13.5-13.5c0-8.1,5.4-13.5,13.5-13.5h140.8\n c5.4,0,10.8,5.4,10.8,13.5C237.7,71.7,232.3,77.1,226.8,77.1z" }), _jsx("path", { d: "M189.4,200.7c-14.4,0-25.9,11.6-25.9,25.9v155.7l-17.3-34.6c-14.2-26.3-28.1-23.6-38.9-17.3c-12.5,8.3-17.2,17-8.6,38.9\n c19.6,48.2,49.8,105.6,82.2,142.7h116.7c41-30.4,74-175,17.3-181.6c-5.2,0-13.5,0.8-17.3,4.3c0-17.3-15.1-21.7-21.6-21.6\n c-7.5,0.1-13,4.3-17.3,13c0-17.3-14.1-21.6-21.6-21.6c-8.3,0-17.9,5.2-21.6,13v-90.8C215.4,212.3,203.8,200.7,189.4,200.7z" })] }) }) }), _jsx("div", { className: "text-xs text-gray-500 ", children: "H\u01B0\u1EDBng d\u1EABn tr\u1EE3 gi\u00FAp tr\u00EAn" }), _jsx("div", { className: "text-tiny font-semibold text-gray-800", children: "\u1EE8ng d\u1EE5ng V\u00ED MoMo" })] }) }), _jsx("h4", { className: "mb-2 mt-5 text-tiny font-semibold text-gray-700", children: "H\u1EE2P T\u00C1C DOANH NGHI\u1EC6P" }), _jsxs("ul", { className: "mb-2 text-tiny text-gray-500", children: [_jsxs("li", { className: "mb-1", children: ["Hotline :", _jsx(Link, { href: `tel:${MoMoText.Business.Phome}`, legacyBehavior: true, children: _jsx("a", { className: "text-gray-600", children: MoMoText.Business.Phome_Format }) })] }), _jsxs("li", { className: "mb-1", children: ["Email :", _jsx(Link, { href: `mailto:${MoMoText.Business.Email}`, legacyBehavior: true, children: _jsxs("a", { className: "text-gray-600", children: [" ", MoMoText.Business.Email] }) })] })] }), _jsx("a", { href: "https://business.momo.vn/#menutop", rel: "noreferrer", target: "_blank", children: _jsxs("div", { className: "relative inline-block overflow-hidden rounded border border-gray-300 bg-white py-1 pl-12 pr-2 hover:bg-gray-100", children: [_jsx("div", { className: "absolute left-1 top-1 ", children: _jsx("img", { src: "https://homepage.momocdn.net/fileuploads/svg/momo-file-210724114053.svg", className: "w-10", loading: "lazy", alt: "" }) }), _jsx("div", { className: "text-xs text-gray-500 ", children: "H\u1EE3p t\u00E1c doanh nghi\u1EC7p" }), _jsx("div", { className: "text-tiny font-semibold text-gray-800", children: "\u0110\u0103ng k\u00FD h\u1EE3p t\u00E1c" })] }) })] })] })) }) })] }));
|
|
55
|
-
};
|
|
56
|
-
export default MobileMenu;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../helpers/utils";
|
|
3
|
-
import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuIndicator, navigationMenuTriggerStyle, } from "../NavigationMenu/index";
|
|
4
|
-
import ListItem from "./ListItem";
|
|
5
|
-
import Link from "next/link";
|
|
6
|
-
const NavItems = ({ data }) => {
|
|
7
|
-
return (_jsx(NavigationMenu, { children: _jsxs(NavigationMenuList, { children: [_jsx(NavigationMenuIndicator, {}), data.map((menuItem) => {
|
|
8
|
-
const linkProps = menuItem.newTab
|
|
9
|
-
? { target: "_blank", rel: "noopener noreferrer" }
|
|
10
|
-
: {};
|
|
11
|
-
return menuItem.hasDropdown ? (_jsxs(NavigationMenuItem, { children: [_jsx(NavigationMenuTrigger, { children: menuItem.title }), _jsx(NavigationMenuContent, { children: _jsx("ul", { className: cn(menuItem.dropDownCompact === true
|
|
12
|
-
? "grid gap-1 p-2.5 w-[540px] md:grid-cols-2 "
|
|
13
|
-
: "grid w-[250px] gap-1 p-2.5 grid-cols-1"), children: menuItem.subMenu &&
|
|
14
|
-
menuItem.subMenu.map((component) => (_jsx(ListItem, { title: component.title, href: component.url, newTab: component.newTab, icon: menuItem.dropDownCompact === true
|
|
15
|
-
? component.icon
|
|
16
|
-
: "", children: menuItem.dropDownCompact === true
|
|
17
|
-
? component.description
|
|
18
|
-
: "" }, component.title))) }) })] }, menuItem.id)) : (_jsx(NavigationMenuItem, { children: _jsx(Link, { href: menuItem.url, legacyBehavior: true, passHref: true, children: _jsx(NavigationMenuLink, { className: navigationMenuTriggerStyle(), ...linkProps, children: menuItem.title }) }) }, menuItem.id));
|
|
19
|
-
})] }) }));
|
|
20
|
-
};
|
|
21
|
-
export default NavItems;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../helpers/utils";
|
|
3
|
-
import { DEFAULT_EASE } from "../../helpers/animations";
|
|
4
|
-
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from "../Accordion/index";
|
|
5
|
-
import ListItemMobile from "./ListItemMobile";
|
|
6
|
-
import Link from "next/link";
|
|
7
|
-
import { motion } from "framer-motion";
|
|
8
|
-
const listItem = {
|
|
9
|
-
hidden: { opacity: 0, y: 10 },
|
|
10
|
-
show: {
|
|
11
|
-
opacity: 1,
|
|
12
|
-
y: 0,
|
|
13
|
-
transition: { duration: 0.25, ease: DEFAULT_EASE },
|
|
14
|
-
},
|
|
15
|
-
exit: { opacity: 0, transition: { duration: 0.05 } },
|
|
16
|
-
};
|
|
17
|
-
const NavItemsMobile = ({ data }) => {
|
|
18
|
-
return (_jsx(Accordion, { type: "single", collapsible: true, children: data.map((menuItem) => {
|
|
19
|
-
const linkProps = menuItem.newTab
|
|
20
|
-
? { target: "_blank", rel: "noopener noreferrer" }
|
|
21
|
-
: {};
|
|
22
|
-
return (_jsx(motion.div, { variants: listItem, children: menuItem.hasDropdown ? (_jsxs(AccordionItem, { value: menuItem.id, children: [_jsx(AccordionTrigger, { className: "py-3", children: menuItem.title }), _jsx(AccordionContent, { children: _jsx("ul", { className: cn("grid gap-1 grid-cols-1"), children: menuItem.subMenu &&
|
|
23
|
-
menuItem.subMenu.map((component) => (_jsx(ListItemMobile, { title: component.title, href: component.url, newTab: component.newTab, icon: menuItem.dropDownCompact === true
|
|
24
|
-
? component.icon
|
|
25
|
-
: "", children: menuItem.dropDownCompact === true
|
|
26
|
-
? component.description
|
|
27
|
-
: "" }, component.title))) }) })] })) : (_jsx(Link, { className: "py-3 flex flex-1 items-center text-left justify-between font-medium transition-all hover:underline text-gray-900 border-b border-gray-200", href: menuItem.url, ...linkProps, children: menuItem.title })) }, menuItem.id));
|
|
28
|
-
}) }));
|
|
29
|
-
};
|
|
30
|
-
export default NavItemsMobile;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Header } from "./Header";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Header } from "./Header";
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type VariantProps } from "class-variance-authority";
|
|
3
|
-
declare const iconButtonVariants: (props?: ({
|
|
4
|
-
variant?: "primary" | "secondary" | "outline" | "tonal" | "danger" | "transparent" | null | undefined;
|
|
5
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof iconButtonVariants> {
|
|
8
|
-
/**
|
|
9
|
-
* CSS class to be appended to the root element.
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
14
|
-
*/
|
|
15
|
-
asChild?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Disabled interaction and applies disabled styles
|
|
18
|
-
*/
|
|
19
|
-
isDisabled?: boolean;
|
|
20
|
-
}
|
|
21
|
-
declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
22
|
-
export { IconButton, iconButtonVariants };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
-
import { cva } from "class-variance-authority";
|
|
5
|
-
import { cn } from "../../helpers/utils";
|
|
6
|
-
// /dwd
|
|
7
|
-
const iconButtonVariants = cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent", {
|
|
8
|
-
variants: {
|
|
9
|
-
/**
|
|
10
|
-
* Determines style variation of Button component.
|
|
11
|
-
*/
|
|
12
|
-
variant: {
|
|
13
|
-
primary: "bg-pink-500 text-white hover:bg-pink-600 disabled:bg-pink-300",
|
|
14
|
-
secondary: "bg-white text-gray-900 hover:bg-gray-100 disabled:text-gray-400 disabled:bg-white border-gray-300",
|
|
15
|
-
outline: "border-pink-500 text-pink-500 bg-white hover:bg-pink-50 disabled:bg-white disabled:border-pink-300 disabled:text-pink-300",
|
|
16
|
-
tonal: "bg-pink-100 text-pink-500 hover:bg-pink-200 disabled:bg-gray-200 disabled:text-gray-400",
|
|
17
|
-
danger: "bg-red-500 text-white hover:bg-red-600 disabled:bg-red-300",
|
|
18
|
-
transparent: "text-gray-900 bg-transparent hover:bg-gray-100 disabled:text-gray-400 disabled:bg-transparent",
|
|
19
|
-
},
|
|
20
|
-
/**
|
|
21
|
-
* Determines size variation of Button component.
|
|
22
|
-
*/
|
|
23
|
-
size: {
|
|
24
|
-
default: "text-sm h-10 w-10",
|
|
25
|
-
sm: "h-8 w-8 text-sm",
|
|
26
|
-
lg: "h-12 w-12 text-base",
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
defaultVariants: {
|
|
30
|
-
variant: "primary",
|
|
31
|
-
size: "default",
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
const IconButton = React.forwardRef(({ className, variant = "primary", size = "default", asChild = false, isDisabled = false, ...props }, ref) => {
|
|
35
|
-
const Comp = asChild ? Slot : "button";
|
|
36
|
-
const buttonClassName = cn(iconButtonVariants({ variant, size, className }));
|
|
37
|
-
return (_jsx(Comp, { className: buttonClassName, disabled: isDisabled, ref: ref, ...props, children: props.children }));
|
|
38
|
-
});
|
|
39
|
-
IconButton.displayName = "IconButton";
|
|
40
|
-
export { IconButton, iconButtonVariants };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { IconButton } from "./IconButton";
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
|
-
import React, { ReactNode } from "react";
|
|
3
|
-
import "swiper/css";
|
|
4
|
-
import "swiper/css/navigation";
|
|
5
|
-
import "swiper/css/pagination";
|
|
6
|
-
export declare const LightboxGalleryDialog: React.FC<DialogPrimitive.DialogProps>;
|
|
7
|
-
interface LightboxThumbnailProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger> {
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
onClick?: () => void;
|
|
10
|
-
src?: string;
|
|
11
|
-
alt?: string;
|
|
12
|
-
className?: string;
|
|
13
|
-
classNameImage?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const LightboxThumbnail: ({ children, src, alt, className, classNameImage, onClick, }: LightboxThumbnailProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
interface LightBoxContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
18
|
-
images: {
|
|
19
|
-
url: string;
|
|
20
|
-
titleImage?: string;
|
|
21
|
-
idx?: number;
|
|
22
|
-
}[];
|
|
23
|
-
activeSlideIndex?: number;
|
|
24
|
-
withSideBar?: boolean;
|
|
25
|
-
subHtmlSideBar?: ReactNode;
|
|
26
|
-
classNameSubHtmSideBar?: string;
|
|
27
|
-
}
|
|
28
|
-
export declare const LightBoxContent: ({ images, activeSlideIndex, withSideBar, subHtmlSideBar, classNameSubHtmSideBar, className, }: LightBoxContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
interface LightboxGalleryProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Dialog> {
|
|
30
|
-
className?: string;
|
|
31
|
-
open?: boolean;
|
|
32
|
-
onOpenChange?: (open: boolean) => void;
|
|
33
|
-
}
|
|
34
|
-
export declare const LightboxGallery: ({ children, className, open, onOpenChange, }: LightboxGalleryProps & {
|
|
35
|
-
children: ReactNode;
|
|
36
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
-
export {};
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Swiper, SwiperSlide } from "swiper/react";
|
|
3
|
-
import { Navigation, Lazy, Pagination } from "swiper";
|
|
4
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
5
|
-
import React, { useEffect, useState } from "react";
|
|
6
|
-
import "swiper/css";
|
|
7
|
-
import "swiper/css/navigation";
|
|
8
|
-
import "swiper/css/pagination";
|
|
9
|
-
import { IconButton } from "../IconButton";
|
|
10
|
-
import { cn } from "../../helpers/utils";
|
|
11
|
-
import { X } from "lucide-react";
|
|
12
|
-
import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/24/outline";
|
|
13
|
-
import _ from "lodash";
|
|
14
|
-
export const LightboxGalleryDialog = DialogPrimitive.Root;
|
|
15
|
-
const DialogPortal = DialogPrimitive.Portal;
|
|
16
|
-
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props })));
|
|
17
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
18
|
-
const CloseDialog = ({ clearActiveIndex }) => {
|
|
19
|
-
return (_jsxs(DialogPrimitive.Close, { onClick: () => clearActiveIndex?.(), className: "flex transition-all z-10 text-sm items-center space-x-1 absolute left-3 top-6 md:left-6 hover:bg-white/20 text-white rounded-md px-4 py-2", children: [_jsx(X, { className: "h-4 w-4 mt-0.5" }), _jsx("div", { className: "", children: "\u0110\u00F3ng c\u1EEDa s\u1ED5" })] }));
|
|
20
|
-
};
|
|
21
|
-
export const LightboxThumbnail = ({ children, src, alt, className, classNameImage, onClick, }) => {
|
|
22
|
-
const handleOnClickThumbnail = () => {
|
|
23
|
-
onClick?.();
|
|
24
|
-
};
|
|
25
|
-
return (_jsxs(DialogPrimitive.Trigger, { className: cn("aspect-[2/3] relative overflow-hidden rounded-lg", className), onClick: handleOnClickThumbnail, children: [children, _jsx("img", { src: src, alt: alt, className: cn("w-full h-full object-cover rounded-lg", classNameImage) })] }));
|
|
26
|
-
};
|
|
27
|
-
export const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, { className: "bg-black" }), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn("h-full min-w-full border-none rounded-none fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] ", className), ...props, children: [children, _jsx(CloseDialog, {})] })] })));
|
|
28
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
29
|
-
const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props }));
|
|
30
|
-
DialogHeader.displayName = "DialogHeader";
|
|
31
|
-
const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
|
|
32
|
-
DialogFooter.displayName = "DialogFooter";
|
|
33
|
-
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props })));
|
|
34
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
35
|
-
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
|
|
36
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
37
|
-
export const LightBoxContent = ({ images, activeSlideIndex = 0, withSideBar, subHtmlSideBar, classNameSubHtmSideBar, className, }) => {
|
|
38
|
-
const [activeSlide, setActiveSlide] = useState(activeSlideIndex);
|
|
39
|
-
const [titleImage, setTitleImg] = useState("");
|
|
40
|
-
const onGetTitleImage = () => {
|
|
41
|
-
const result = _.filter(images, (_, idx) => idx === activeSlideIndex);
|
|
42
|
-
const titleImgDraf = result.length > 0 ? result[0]?.titleImage : "";
|
|
43
|
-
setTitleImg(titleImgDraf);
|
|
44
|
-
};
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
setActiveSlide(activeSlideIndex);
|
|
47
|
-
onGetTitleImage();
|
|
48
|
-
}, [activeSlideIndex]);
|
|
49
|
-
const pagination = {
|
|
50
|
-
clickable: true,
|
|
51
|
-
renderBullet(index, className) {
|
|
52
|
-
const classNameParent = cn("aspect-[1/1] min-w-[96px] mt-40 min-h-[76px] !rounded-lg overflow-hidden", className);
|
|
53
|
-
const classNameImage = cn("w-full h-full object-cover rounded-lg");
|
|
54
|
-
if (!images[index]?.url) {
|
|
55
|
-
return "<div></div>";
|
|
56
|
-
}
|
|
57
|
-
return `
|
|
58
|
-
<div class="${classNameParent} ">
|
|
59
|
-
<img class="${classNameImage} " src="${images[index]?.url}" alt="Slide ${index + 1}" />
|
|
60
|
-
</div>
|
|
61
|
-
`;
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
return (_jsxs(DialogContent, { className: cn("flex py-0", className), children: [_jsxs("div", { className: "lightbox flex-1 py-6", children: [_jsx("div", { className: "flex items-center justify-end md:justify-center mt-2 w-full", children: _jsxs("div", { children: [activeSlide ? activeSlide + 1 : 1, " / ", images?.length] }) }), _jsxs(Swiper, { initialSlide: activeSlideIndex, onSlideChange: ({ realIndex }) => {
|
|
65
|
-
setActiveSlide(realIndex);
|
|
66
|
-
onGetTitleImage();
|
|
67
|
-
const activeBullet = document.querySelector(".swiper-pagination-bullet-active");
|
|
68
|
-
if (activeBullet) {
|
|
69
|
-
activeBullet.scrollIntoView({
|
|
70
|
-
behavior: "smooth",
|
|
71
|
-
block: "nearest",
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}, onDestroy: () => {
|
|
75
|
-
setActiveSlide(activeSlideIndex);
|
|
76
|
-
onGetTitleImage();
|
|
77
|
-
}, slidesPerView: "auto", className: "swiper lightboxSwiper", navigation: {
|
|
78
|
-
nextEl: ".lightbox .next-lightbox",
|
|
79
|
-
prevEl: ".lightbox .prev-lightbox",
|
|
80
|
-
}, pagination: pagination, modules: [Navigation, Lazy, Pagination], lazy: {
|
|
81
|
-
loadPrevNext: true,
|
|
82
|
-
}, children: [images.map((img, index) => (_jsxs(SwiperSlide, { children: [_jsx("div", { className: "absolute top-28 bottom-28 left-0 right-0 min-h-0 sm:left-20 sm:right-20", children: _jsx("img", { src: img.url, alt: "", className: "absolute h-full w-full object-contain", loading: "lazy" }) }), _jsx("div", { className: "swiper-lazy-preloader swiper-lazy-preloader-white" }), _jsx("div", { className: "text-sm px-20 text-center text-white/80 absolute bottom-10 my-4 flex items-center justify-center w-full z-[999]", children: titleImage })] }, index))), _jsx(IconButton, { className: "disabled:bg-white/60 prev-lightbox button-swiper translate swiper-cate-merchant absolute inset-y-1/2 left-6 z-10 hidden h-12 w-12 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full border border-gray-300 bg-white text-white shadow-md duration-200 ease-in-out hover:bg-white/80 hover:shadow-md md:flex", children: _jsx(ChevronLeftIcon, { className: "w-7 text-slate-900" }) }), _jsx(IconButton, { className: "disabled:bg-white/60 next-lightbox translate swiper-cate-merchant button-swiper absolute inset-y-1/2 right-6 z-10 hidden h-12 w-12 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full border border-gray-300 bg-white text-white shadow-md duration-300 ease-in-out hover:bg-white/80 hover:shadow-md md:flex", children: _jsx(ChevronRightIcon, { className: "w-7 text-slate-900" }) })] }), _jsx("style", { children: `
|
|
83
|
-
.lightbox {
|
|
84
|
-
--lightbox-topnav: 112px;
|
|
85
|
-
--lightbox-botnav: 80px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@media (max-width: 639px) {
|
|
89
|
-
.lightbox {
|
|
90
|
-
--lightbox-topnav: 60px;
|
|
91
|
-
--lightbox-botnav: 80px;
|
|
92
|
-
}
|
|
93
|
-
.lightbox .swiper-button-prev {
|
|
94
|
-
display: none;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.lightbox .swiper-button-next {
|
|
98
|
-
display: none;
|
|
99
|
-
}
|
|
100
|
-
.swiper-pagination{
|
|
101
|
-
justify-content: start !important;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.lightbox-content {
|
|
106
|
-
top: var(--lightbox-topnav) !important;
|
|
107
|
-
height: calc(100% - var(--lightbox-topnav)) !important;
|
|
108
|
-
width: 100% !important;
|
|
109
|
-
}
|
|
110
|
-
.lightboxSwiper {
|
|
111
|
-
width: 100%;
|
|
112
|
-
height: 95%;
|
|
113
|
-
padding: 0;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.lightboxSwiper .swiper-slide {
|
|
117
|
-
text-align: center;
|
|
118
|
-
display: -webkit-box;
|
|
119
|
-
display: -ms-flexbox;
|
|
120
|
-
display: -webkit-flex;
|
|
121
|
-
display: flex;
|
|
122
|
-
-webkit-box-pack: center;
|
|
123
|
-
-ms-flex-pack: center;
|
|
124
|
-
-webkit-justify-content: center;
|
|
125
|
-
justify-content: center;
|
|
126
|
-
-webkit-box-align: center;
|
|
127
|
-
-ms-flex-align: center;
|
|
128
|
-
-webkit-align-items: center;
|
|
129
|
-
align-items: center;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.lightboxSwiper.swiper-slide img {
|
|
133
|
-
display: block;
|
|
134
|
-
width: 100%;
|
|
135
|
-
height: 100%;
|
|
136
|
-
}
|
|
137
|
-
.swiper-wrapper{
|
|
138
|
-
bottom: 90px;
|
|
139
|
-
}
|
|
140
|
-
.swiper-pagination{
|
|
141
|
-
max-width: 100%;
|
|
142
|
-
width: 100%;
|
|
143
|
-
overflow-x: auto;
|
|
144
|
-
display: flex;
|
|
145
|
-
justify-content: center;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.swiper-pagination-bullet{
|
|
149
|
-
background: unset;
|
|
150
|
-
opacity: 1;
|
|
151
|
-
}
|
|
152
|
-
.swiper-pagination-bullet-active{
|
|
153
|
-
border: 2px solid white;
|
|
154
|
-
}
|
|
155
|
-
` })] }), withSideBar && (_jsx("div", { className: cn("hidden md:flex overflow-y-auto bg-white text-gray-900 px-6 pb-4 pt-2 w-full max-w-sm lg:max-w-md", classNameSubHtmSideBar), children: subHtmlSideBar }))] }));
|
|
156
|
-
};
|
|
157
|
-
export const LightboxGallery = ({ children, className, open, onOpenChange, }) => {
|
|
158
|
-
return (_jsx("div", { className: cn("lightbox-gallery ", className), children: _jsx(LightboxGalleryDialog, { open: open, onOpenChange: onOpenChange, children: React.Children?.map(children, (child) => {
|
|
159
|
-
if (React.isValidElement(child)) {
|
|
160
|
-
const updatedProps = {};
|
|
161
|
-
const knownProps = Object.keys(updatedProps).reduce((acc, key) => {
|
|
162
|
-
if (updatedProps[key] !== undefined) {
|
|
163
|
-
acc[key] = updatedProps[key];
|
|
164
|
-
}
|
|
165
|
-
return acc;
|
|
166
|
-
}, {});
|
|
167
|
-
return React.cloneElement(child, knownProps);
|
|
168
|
-
}
|
|
169
|
-
return null;
|
|
170
|
-
}) }) }));
|
|
171
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { LightboxGallery, LightboxThumbnail, LightBoxContent, } from "./LightboxGallery";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { LightboxGallery, LightboxThumbnail, LightBoxContent, } from "./LightboxGallery";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
3
|
-
declare const NavigationMenu: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
4
|
-
declare const NavigationMenuList: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuListProps & React.RefAttributes<HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
5
|
-
declare const NavigationMenuItem: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
6
|
-
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
7
|
-
declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
-
declare const NavigationMenuContent: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
declare const NavigationMenuLink: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
|
-
declare const NavigationMenuViewport: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
declare const NavigationMenuIndicator: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
export { navigationMenuTriggerStyle, NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { ChevronDownIcon } from "@heroicons/react/16/solid";
|
|
4
|
-
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
5
|
-
import { cva } from "class-variance-authority";
|
|
6
|
-
import { buttonVariants } from "../Button/Button";
|
|
7
|
-
import { cn } from "../../helpers/utils";
|
|
8
|
-
const NavigationMenu = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(NavigationMenuPrimitive.Root, { ref: ref, className: cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className), ...props, children: [children, _jsx(NavigationMenuViewport, {})] })));
|
|
9
|
-
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
10
|
-
const NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => (_jsx(NavigationMenuPrimitive.List, { ref: ref, className: cn("group flex flex-1 list-none items-center justify-center ", className), ...props })));
|
|
11
|
-
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
12
|
-
const NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
13
|
-
const navigationMenuTriggerStyle = cva(buttonVariants({
|
|
14
|
-
variant: "transparent",
|
|
15
|
-
size: "sm",
|
|
16
|
-
}));
|
|
17
|
-
const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(NavigationMenuPrimitive.Trigger, { ref: ref, className: cn(navigationMenuTriggerStyle(), "group", className), ...props, children: [children, _jsx(ChevronDownIcon, { className: "relative ml-1 h-4 w-4 transition duration-300 group-data-[state=open]:rotate-180", "aria-hidden": "true" })] })));
|
|
18
|
-
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
19
|
-
const NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(NavigationMenuPrimitive.Content, { ref: ref, className: cn("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ", className), ...props })));
|
|
20
|
-
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
21
|
-
const NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
22
|
-
const NavigationMenuViewport = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: _jsx(NavigationMenuPrimitive.Viewport, { className: cn("origin-top-center relative mt-3.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border border-gray-200 bg-white text-gray-900 shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]", className), ref: ref, ...props }) })));
|
|
23
|
-
NavigationMenuViewport.displayName =
|
|
24
|
-
NavigationMenuPrimitive.Viewport.displayName;
|
|
25
|
-
const NavigationMenuIndicator = React.forwardRef(({ className, ...props }, ref) => (_jsx(NavigationMenuPrimitive.Indicator, { ref: ref, className: cn("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in", className), ...props, children: _jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" }) })));
|
|
26
|
-
NavigationMenuIndicator.displayName =
|
|
27
|
-
NavigationMenuPrimitive.Indicator.displayName;
|
|
28
|
-
export { navigationMenuTriggerStyle, NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, navigationMenuTriggerStyle, } from "./NavigationMenu";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, navigationMenuTriggerStyle, } from "./NavigationMenu";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
interface PaginationProps {
|
|
2
|
-
/**
|
|
3
|
-
* Current page.
|
|
4
|
-
*/
|
|
5
|
-
current: number;
|
|
6
|
-
/**
|
|
7
|
-
* Items total count.
|
|
8
|
-
*/
|
|
9
|
-
total: number;
|
|
10
|
-
/**
|
|
11
|
-
* Page change callback
|
|
12
|
-
*/
|
|
13
|
-
onChange: (page: number) => void;
|
|
14
|
-
}
|
|
15
|
-
export default function Pagination({ current, total, onChange, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
3
|
-
import { iconButtonVariants } from "../IconButton/IconButton";
|
|
4
|
-
import { cn } from "../../helpers/utils";
|
|
5
|
-
export default function Pagination({ current, total, onChange, }) {
|
|
6
|
-
const getButton = (index) => (_jsx("li", { children: _jsx("button", { className: cn(iconButtonVariants({
|
|
7
|
-
variant: current === index ? "outline" : "secondary",
|
|
8
|
-
size: "sm",
|
|
9
|
-
})), onClick: () => onChange(index), children: index }) }, index));
|
|
10
|
-
return (_jsx("nav", { role: "navigation", "aria-label": "pagination", className: cn("mx-auto flex w-full justify-center"), children: _jsxs("ul", { className: cn("flex flex-row flex-wrap items-center gap-2"), children: [total > 1 && (_jsx("li", { children: _jsx("button", { className: cn(iconButtonVariants({
|
|
11
|
-
variant: "secondary",
|
|
12
|
-
size: "sm",
|
|
13
|
-
})), disabled: current === 1, onClick: () => current > 1 && onChange(current - 1), children: _jsx(ChevronLeft, { className: "h-4 w-4" }) }) })), total <= 6 ? (Array(total)
|
|
14
|
-
.fill(0)
|
|
15
|
-
.map((_, index) => getButton(index + 1))) : (_jsxs(_Fragment, { children: [getButton(1), current === 1 && [getButton(2), getButton(3)], current > 3 && (_jsx("li", { children: _jsx("button", { className: cn(iconButtonVariants({
|
|
16
|
-
variant: "secondary",
|
|
17
|
-
size: "sm",
|
|
18
|
-
})), disabled: current === 1, onClick: () => onChange(current - 3), children: "..." }) })), current > 2 &&
|
|
19
|
-
current !== 1 &&
|
|
20
|
-
current !== total &&
|
|
21
|
-
getButton(current - 1), current > 1 && current < total && getButton(current), current < total - 1 && current !== 1 && getButton(current + 1), current === total && [getButton(total - 2), getButton(total - 1)], current < total - 2 && current !== total && (_jsx("button", { className: cn(iconButtonVariants({
|
|
22
|
-
variant: "secondary",
|
|
23
|
-
size: "sm",
|
|
24
|
-
})), disabled: current === 1, onClick: () => onChange(current + 3), children: "..." })), getButton(total)] })), total > 1 && (_jsx("li", { children: _jsx("button", { className: cn(iconButtonVariants({
|
|
25
|
-
variant: "secondary",
|
|
26
|
-
size: "sm",
|
|
27
|
-
})), disabled: current === total, onClick: () => current < total && onChange(current + 1), children: _jsx(ChevronRight, { className: "h-4 w-4" }) }) }))] }) }));
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Pagination } from "./Pagination";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Pagination } from "./Pagination";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
-
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
-
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
export { Popover, PopoverTrigger, PopoverContent };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4
|
-
import { cn } from "../../helpers/utils";
|
|
5
|
-
const Popover = PopoverPrimitive.Root;
|
|
6
|
-
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
7
|
-
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 w-72 rounded-md border border-gray-200 bg-white p-4 sm:p-5 text-gray-900 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props }) })));
|
|
8
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
9
|
-
export { Popover, PopoverTrigger, PopoverContent };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Popover, PopoverTrigger, PopoverContent } from "./Popover";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Popover, PopoverTrigger, PopoverContent } from "./Popover";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
|
-
import { type VariantProps } from "class-variance-authority";
|
|
4
|
-
declare const radioGroupVariants: (props?: ({
|
|
5
|
-
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
export interface RadioGroupProps extends VariantProps<typeof radioGroupVariants> {
|
|
8
|
-
className?: string;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
}
|
|
11
|
-
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
-
export { RadioGroup, RadioGroupItem };
|