@nextui-org/react 1.0.1-alpha.7 → 1.0.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -45
- package/avatar/package.json +6 -0
- package/backdrop/package.json +6 -0
- package/button/package.json +6 -0
- package/card/package.json +6 -0
- package/checkbox/package.json +6 -0
- package/cjs/avatar/avatar-group.d.ts +13 -0
- package/cjs/avatar/avatar-group.js +35 -0
- package/cjs/avatar/avatar-group.styles.d.ts +1785 -0
- package/cjs/avatar/avatar-group.styles.js +52 -0
- package/cjs/avatar/avatar.d.ts +21 -0
- package/cjs/avatar/avatar.js +75 -0
- package/cjs/avatar/avatar.styles.d.ts +904 -0
- package/cjs/avatar/avatar.styles.js +334 -0
- package/cjs/avatar/index.d.ts +7 -0
- package/cjs/avatar/index.js +22 -0
- package/cjs/backdrop/backdrop.d.ts +37 -0
- package/cjs/backdrop/backdrop.js +137 -0
- package/cjs/backdrop/backdrop.styles.d.ts +2677 -0
- package/cjs/backdrop/backdrop.styles.js +119 -0
- package/cjs/backdrop/index.d.ts +5 -0
- package/cjs/backdrop/index.js +16 -0
- package/{dist/components → cjs}/button/button-group-context.d.ts +3 -2
- package/cjs/button/button-group-context.js +21 -0
- package/cjs/button/button-group.d.ts +34 -0
- package/cjs/button/button-group.js +81 -0
- package/cjs/button/button-group.styles.d.ts +899 -0
- package/cjs/button/button-group.styles.js +136 -0
- package/cjs/button/button-icon.d.ts +909 -0
- package/cjs/button/button-icon.js +68 -0
- package/cjs/button/button.d.ts +30 -0
- package/cjs/button/button.js +145 -0
- package/cjs/button/button.styles.d.ts +907 -0
- package/cjs/button/button.styles.js +695 -0
- package/cjs/button/index.d.ts +10 -0
- package/cjs/button/index.js +25 -0
- package/{dist/components → cjs}/button/utils.d.ts +2 -2
- package/cjs/button/utils.js +27 -0
- package/cjs/card/card.d.ts +23 -0
- package/cjs/card/card.js +117 -0
- package/cjs/card/card.styles.d.ts +3575 -0
- package/cjs/card/card.styles.js +267 -0
- package/cjs/card/index.d.ts +5 -0
- package/cjs/card/index.js +24 -0
- package/{dist/components → cjs}/checkbox/checkbox-context.d.ts +3 -2
- package/cjs/checkbox/checkbox-context.js +25 -0
- package/cjs/checkbox/checkbox-group.d.ts +29 -0
- package/cjs/checkbox/checkbox-group.js +89 -0
- package/{dist/components → cjs}/checkbox/checkbox.d.ts +21 -10
- package/cjs/checkbox/checkbox.js +192 -0
- package/cjs/checkbox/checkbox.styles.d.ts +8054 -0
- package/cjs/checkbox/checkbox.styles.js +563 -0
- package/cjs/checkbox/index.d.ts +6 -0
- package/cjs/checkbox/index.js +26 -0
- package/cjs/code/code.d.ts +15 -0
- package/cjs/code/code.js +42 -0
- package/cjs/code/code.styles.d.ts +1782 -0
- package/cjs/code/code.styles.js +14 -0
- package/cjs/code/index.d.ts +5 -0
- package/cjs/code/index.js +15 -0
- package/{dist/components → cjs}/col/col.d.ts +5 -7
- package/cjs/col/col.js +46 -0
- package/cjs/col/col.styles.d.ts +893 -0
- package/cjs/col/col.styles.js +16 -0
- package/cjs/col/index.d.ts +5 -0
- package/cjs/col/index.js +14 -0
- package/cjs/collapse/collapse-context.d.ts +9 -0
- package/cjs/collapse/collapse-context.js +20 -0
- package/cjs/collapse/collapse-group.d.ts +18 -0
- package/cjs/collapse/collapse-group.js +90 -0
- package/cjs/collapse/collapse-icon.d.ts +19 -0
- package/cjs/collapse/collapse-icon.js +41 -0
- package/cjs/collapse/collapse.d.ts +41 -0
- package/cjs/collapse/collapse.js +190 -0
- package/cjs/collapse/collapse.styles.d.ts +4472 -0
- package/cjs/collapse/collapse.styles.js +254 -0
- package/cjs/collapse/index.d.ts +6 -0
- package/cjs/collapse/index.js +22 -0
- package/cjs/container/container.d.ts +40 -0
- package/cjs/container/container.js +91 -0
- package/cjs/container/container.styles.d.ts +896 -0
- package/cjs/container/container.styles.js +45 -0
- package/cjs/container/index.d.ts +5 -0
- package/cjs/container/index.js +14 -0
- package/{dist/components → cjs}/css-baseline/css-baseline.d.ts +2 -2
- package/cjs/css-baseline/css-baseline.js +247 -0
- package/{dist/components → cjs}/css-baseline/index.d.ts +0 -0
- package/cjs/css-baseline/index.js +11 -0
- package/cjs/divider/divider.d.ts +22 -0
- package/cjs/divider/divider.js +82 -0
- package/cjs/divider/divider.styles.d.ts +1787 -0
- package/cjs/divider/divider.styles.js +77 -0
- package/cjs/divider/index.d.ts +5 -0
- package/cjs/divider/index.js +15 -0
- package/cjs/grid/grid-container.d.ts +22 -0
- package/cjs/grid/grid-container.js +60 -0
- package/{dist/components/grid/basic-item.d.ts → cjs/grid/grid-item.d.ts} +14 -5
- package/cjs/grid/grid-item.js +123 -0
- package/cjs/grid/grid.d.ts +9 -0
- package/cjs/grid/grid.js +29 -0
- package/cjs/grid/grid.styles.d.ts +1783 -0
- package/cjs/grid/grid.styles.js +15 -0
- package/cjs/grid/index.d.ts +7 -0
- package/cjs/grid/index.js +18 -0
- package/{dist/components → cjs}/image/image.d.ts +17 -15
- package/cjs/image/image.js +150 -0
- package/cjs/image/image.skeleton.d.ts +19 -0
- package/cjs/image/image.skeleton.js +50 -0
- package/cjs/image/image.styles.d.ts +2676 -0
- package/cjs/image/image.styles.js +57 -0
- package/cjs/image/index.d.ts +5 -0
- package/cjs/image/index.js +16 -0
- package/cjs/index.d.ts +79 -0
- package/cjs/index.js +435 -0
- package/cjs/input/index.d.ts +7 -0
- package/cjs/input/index.js +30 -0
- package/cjs/input/input-password.d.ts +98 -0
- package/cjs/input/input-password.js +80 -0
- package/cjs/input/input-props.d.ts +66 -0
- package/cjs/input/input-props.js +30 -0
- package/cjs/input/input.d.ts +18 -0
- package/cjs/input/input.js +317 -0
- package/cjs/input/input.styles.d.ts +9854 -0
- package/cjs/input/input.styles.js +878 -0
- package/cjs/input/password-icon.d.ts +6 -0
- package/cjs/input/password-icon.js +51 -0
- package/{dist/components → cjs}/link/icon.d.ts +0 -0
- package/cjs/link/icon.js +42 -0
- package/cjs/link/index.d.ts +5 -0
- package/cjs/link/index.js +15 -0
- package/cjs/link/link.d.ts +43 -0
- package/cjs/link/link.js +42 -0
- package/cjs/link/link.styles.d.ts +1788 -0
- package/cjs/link/link.styles.js +135 -0
- package/cjs/loading/index.d.ts +7 -0
- package/cjs/loading/index.js +24 -0
- package/{dist/components → cjs}/loading/loading.d.ts +11 -9
- package/cjs/loading/loading.js +80 -0
- package/cjs/loading/loading.styles.d.ts +5356 -0
- package/cjs/loading/loading.styles.js +438 -0
- package/cjs/loading/spinner.d.ts +17 -0
- package/cjs/loading/spinner.js +47 -0
- package/cjs/modal/index.d.ts +8 -0
- package/cjs/modal/index.js +28 -0
- package/cjs/modal/modal-body.d.ts +45 -0
- package/cjs/modal/modal-body.js +62 -0
- package/cjs/modal/modal-close-button.d.ts +13 -0
- package/cjs/modal/modal-close-button.js +49 -0
- package/cjs/modal/modal-context.d.ts +8 -0
- package/cjs/modal/modal-context.js +18 -0
- package/cjs/modal/modal-footer.d.ts +24 -0
- package/cjs/modal/modal-footer.js +69 -0
- package/cjs/modal/modal-header.d.ts +24 -0
- package/cjs/modal/modal-header.js +69 -0
- package/cjs/modal/modal-wrapper.d.ts +24 -0
- package/cjs/modal/modal-wrapper.js +153 -0
- package/cjs/modal/modal.d.ts +42 -0
- package/cjs/modal/modal.js +159 -0
- package/cjs/modal/modal.styles.d.ts +5362 -0
- package/cjs/modal/modal.styles.js +243 -0
- package/cjs/modal/use-modal.d.ts +11 -0
- package/cjs/modal/use-modal.js +25 -0
- package/cjs/pagination/index.d.ts +7 -0
- package/cjs/pagination/index.js +19 -0
- package/cjs/pagination/pagination-ellipsis.d.ts +11 -0
- package/cjs/pagination/pagination-ellipsis.js +86 -0
- package/cjs/pagination/pagination-highlight.d.ts +14 -0
- package/cjs/pagination/pagination-highlight.js +52 -0
- package/cjs/pagination/pagination-icon.d.ts +16 -0
- package/cjs/pagination/pagination-icon.js +59 -0
- package/cjs/pagination/pagination-item.d.ts +22 -0
- package/cjs/pagination/pagination-item.js +104 -0
- package/cjs/pagination/pagination.d.ts +46 -0
- package/cjs/pagination/pagination.js +169 -0
- package/cjs/pagination/pagination.styles.d.ts +5369 -0
- package/cjs/pagination/pagination.styles.js +361 -0
- package/cjs/progress/index.d.ts +5 -0
- package/cjs/progress/index.js +15 -0
- package/cjs/progress/progress.d.ts +65 -0
- package/cjs/progress/progress.js +101 -0
- package/cjs/progress/progress.styles.d.ts +1793 -0
- package/cjs/progress/progress.styles.js +165 -0
- package/cjs/radio/index.d.ts +4 -0
- package/cjs/radio/index.js +24 -0
- package/{dist/components → cjs}/radio/radio-context.d.ts +3 -2
- package/cjs/radio/radio-context.js +24 -0
- package/cjs/radio/radio-group.d.ts +30 -0
- package/cjs/radio/radio-group.js +78 -0
- package/{dist/components → cjs}/radio/radio.d.ts +19 -16
- package/cjs/radio/radio.js +156 -0
- package/cjs/radio/radio.styles.d.ts +5357 -0
- package/cjs/radio/radio.styles.js +240 -0
- package/cjs/row/index.d.ts +5 -0
- package/cjs/row/index.js +14 -0
- package/cjs/row/row.d.ts +21 -0
- package/cjs/row/row.js +54 -0
- package/cjs/row/row.styles.d.ts +895 -0
- package/cjs/row/row.styles.js +25 -0
- package/cjs/snippet/index.d.ts +5 -0
- package/cjs/snippet/index.js +16 -0
- package/{dist/components → cjs}/snippet/snippet-icon.d.ts +5 -2
- package/cjs/snippet/snippet-icon.js +52 -0
- package/cjs/snippet/snippet.d.ts +35 -0
- package/cjs/snippet/snippet.js +137 -0
- package/cjs/snippet/snippet.styles.d.ts +3570 -0
- package/cjs/snippet/snippet.styles.js +141 -0
- package/cjs/spacer/index.d.ts +5 -0
- package/cjs/spacer/index.js +14 -0
- package/cjs/spacer/spacer.d.ts +41 -0
- package/cjs/spacer/spacer.js +49 -0
- package/cjs/spacer/spacer.styles.d.ts +894 -0
- package/cjs/spacer/spacer.styles.js +24 -0
- package/cjs/switch/index.d.ts +5 -0
- package/cjs/switch/index.js +17 -0
- package/cjs/switch/switch.d.ts +82 -0
- package/cjs/switch/switch.js +142 -0
- package/cjs/switch/switch.styles.d.ts +3576 -0
- package/cjs/switch/switch.styles.js +283 -0
- package/cjs/text/child.d.ts +21 -0
- package/cjs/text/child.js +83 -0
- package/cjs/text/index.d.ts +4 -0
- package/cjs/text/index.js +14 -0
- package/{dist/components → cjs}/text/text.d.ts +13 -17
- package/cjs/text/text.js +124 -0
- package/cjs/text/text.styles.d.ts +894 -0
- package/cjs/text/text.styles.js +41 -0
- package/cjs/textarea/index.d.ts +3 -0
- package/cjs/textarea/index.js +12 -0
- package/cjs/textarea/textarea.d.ts +42 -0
- package/cjs/textarea/textarea.js +126 -0
- package/cjs/textarea/utils.d.ts +13 -0
- package/cjs/textarea/utils.js +126 -0
- package/cjs/theme/common.d.ts +1584 -0
- package/cjs/theme/common.js +490 -0
- package/cjs/theme/dark-theme.d.ts +33 -0
- package/cjs/theme/dark-theme.js +38 -0
- package/cjs/theme/index.js +31 -0
- package/cjs/theme/light-theme.d.ts +28 -0
- package/cjs/theme/light-theme.js +33 -0
- package/cjs/theme/ssr-provider.d.ts +7 -0
- package/cjs/theme/ssr-provider.js +51 -0
- package/cjs/theme/stitches.config.d.ts +8700 -0
- package/cjs/theme/stitches.config.js +88 -0
- package/cjs/theme/theme-context.d.ts +5 -0
- package/cjs/theme/theme-context.js +22 -0
- package/cjs/theme/theme-provider.d.ts +14 -0
- package/cjs/theme/theme-provider.js +115 -0
- package/cjs/theme/types.d.ts +75 -0
- package/cjs/theme/types.js +3 -0
- package/cjs/theme/utils.d.ts +16 -0
- package/cjs/theme/utils.js +113 -0
- package/cjs/tooltip/index.d.ts +6 -0
- package/cjs/tooltip/index.js +17 -0
- package/cjs/tooltip/placement.d.ts +39 -0
- package/cjs/tooltip/placement.js +193 -0
- package/cjs/tooltip/tooltip-content.d.ts +27 -0
- package/cjs/tooltip/tooltip-content.js +135 -0
- package/cjs/tooltip/tooltip.d.ts +56 -0
- package/cjs/tooltip/tooltip.js +141 -0
- package/cjs/tooltip/tooltip.styles.d.ts +3571 -0
- package/cjs/tooltip/tooltip.styles.js +159 -0
- package/cjs/use-body-scroll/index.d.ts +3 -0
- package/cjs/use-body-scroll/index.js +12 -0
- package/cjs/use-body-scroll/use-body-scroll.d.ts +9 -0
- package/cjs/use-body-scroll/use-body-scroll.js +77 -0
- package/cjs/use-click-anywhere/index.d.ts +2 -0
- package/cjs/use-click-anywhere/index.js +12 -0
- package/cjs/use-click-anywhere/use-click-anywhere.d.ts +2 -0
- package/cjs/use-click-anywhere/use-click-anywhere.js +19 -0
- package/cjs/use-click-away/index.d.ts +2 -0
- package/cjs/use-click-away/index.js +12 -0
- package/cjs/use-click-away/use-click-away.d.ts +3 -0
- package/cjs/use-click-away/use-click-away.js +23 -0
- package/cjs/use-clipboard/index.d.ts +3 -0
- package/cjs/use-clipboard/index.js +12 -0
- package/{dist/hooks → cjs/use-clipboard}/use-clipboard.d.ts +0 -0
- package/cjs/use-clipboard/use-clipboard.js +57 -0
- package/cjs/use-current-state/index.d.ts +2 -0
- package/cjs/use-current-state/index.js +12 -0
- package/{dist/hooks → cjs/use-current-state}/use-current-state.d.ts +0 -0
- package/cjs/use-current-state/use-current-state.js +28 -0
- package/cjs/use-drip/index.d.ts +2 -0
- package/cjs/use-drip/index.js +12 -0
- package/cjs/use-drip/use-drip.d.ts +9 -0
- package/cjs/use-drip/use-drip.js +38 -0
- package/cjs/use-input/index.d.ts +2 -0
- package/cjs/use-input/index.js +12 -0
- package/cjs/use-input/use-input.d.ts +13 -0
- package/cjs/use-input/use-input.js +32 -0
- package/cjs/use-keyboard/codes.d.ts +92 -0
- package/cjs/use-keyboard/codes.js +104 -0
- package/cjs/use-keyboard/helper.d.ts +3 -0
- package/cjs/use-keyboard/helper.js +35 -0
- package/cjs/use-keyboard/index.d.ts +5 -0
- package/cjs/use-keyboard/index.js +15 -0
- package/cjs/use-keyboard/use-keyboard.d.ts +22 -0
- package/cjs/use-keyboard/use-keyboard.js +76 -0
- package/cjs/use-pagination/index.d.ts +20 -0
- package/cjs/use-pagination/index.js +88 -0
- package/cjs/use-portal/index.d.ts +2 -0
- package/cjs/use-portal/index.js +12 -0
- package/{dist/hooks → cjs/use-portal}/use-portal.d.ts +0 -0
- package/cjs/use-portal/use-portal.js +43 -0
- package/cjs/use-real-shape/index.d.ts +2 -0
- package/cjs/use-real-shape/index.js +12 -0
- package/{dist/hooks → cjs/use-real-shape}/use-real-shape.d.ts +0 -0
- package/cjs/use-real-shape/use-real-shape.js +55 -0
- package/cjs/use-resize/index.d.ts +2 -0
- package/cjs/use-resize/index.js +12 -0
- package/{dist/hooks → cjs/use-resize}/use-resize.d.ts +0 -0
- package/cjs/use-resize/use-resize.js +23 -0
- package/cjs/use-ssr/index.d.ts +2 -0
- package/cjs/use-ssr/index.js +12 -0
- package/{dist/hooks → cjs/use-ssr}/use-ssr.d.ts +0 -0
- package/cjs/use-ssr/use-ssr.js +25 -0
- package/cjs/use-theme/index.d.ts +2 -0
- package/cjs/use-theme/index.js +12 -0
- package/cjs/use-theme/use-theme.d.ts +3 -0
- package/cjs/use-theme/use-theme.js +16 -0
- package/cjs/use-warning/index.d.ts +2 -0
- package/cjs/use-warning/index.js +12 -0
- package/{dist/hooks → cjs/use-warning}/use-warning.d.ts +0 -0
- package/cjs/use-warning/use-warning.js +23 -0
- package/cjs/user/index.d.ts +6 -0
- package/cjs/user/index.js +21 -0
- package/cjs/user/user-link.d.ts +32 -0
- package/cjs/user/user-link.js +46 -0
- package/{dist/components → cjs}/user/user.d.ts +12 -7
- package/cjs/user/user.js +63 -0
- package/cjs/user/user.styles.d.ts +4456 -0
- package/cjs/user/user.styles.js +56 -0
- package/cjs/utils/assertion.d.ts +8 -0
- package/cjs/utils/assertion.js +42 -0
- package/cjs/utils/clear-icon.d.ts +16 -0
- package/cjs/utils/clear-icon.js +70 -0
- package/cjs/utils/clsx.d.ts +1 -0
- package/cjs/utils/clsx.js +57 -0
- package/cjs/utils/collections.d.ts +12 -0
- package/cjs/utils/collections.js +110 -0
- package/{dist → cjs}/utils/color.d.ts +6 -6
- package/cjs/utils/color.js +187 -0
- package/cjs/utils/css-transition.d.ts +27 -0
- package/cjs/utils/css-transition.js +76 -0
- package/cjs/utils/deep-merge.d.ts +1 -0
- package/cjs/utils/deep-merge.js +33 -0
- package/{dist → cjs}/utils/dimensions.d.ts +0 -0
- package/cjs/utils/dimensions.js +10 -0
- package/cjs/utils/dom.js +110 -0
- package/cjs/utils/drip.d.ts +936 -0
- package/cjs/utils/drip.js +116 -0
- package/cjs/utils/expand.d.ts +20 -0
- package/cjs/utils/expand.js +109 -0
- package/cjs/utils/icons.js +481 -0
- package/cjs/utils/numbers.d.ts +9 -0
- package/cjs/utils/numbers.js +23 -0
- package/cjs/utils/object.d.ts +11 -0
- package/cjs/utils/object.js +40 -0
- package/cjs/utils/prop-types.d.ts +54 -0
- package/cjs/utils/prop-types.js +56 -0
- package/cjs/utils/react.js +24 -0
- package/cjs/utils/strings.js +18 -0
- package/cjs/utils/types.d.js +3 -0
- package/{dist → cjs}/utils/with-defaults.d.ts +0 -0
- package/cjs/utils/with-defaults.js +13 -0
- package/code/package.json +6 -0
- package/col/package.json +6 -0
- package/collapse/package.json +6 -0
- package/container/package.json +6 -0
- package/css-baseline/package.json +6 -0
- package/divider/package.json +6 -0
- package/esm/avatar/avatar-group.d.ts +13 -0
- package/esm/avatar/avatar-group.js +35 -0
- package/esm/avatar/avatar-group.styles.d.ts +1785 -0
- package/esm/avatar/avatar-group.styles.js +52 -0
- package/esm/avatar/avatar.d.ts +21 -0
- package/esm/avatar/avatar.js +75 -0
- package/esm/avatar/avatar.styles.d.ts +904 -0
- package/esm/avatar/avatar.styles.js +334 -0
- package/esm/avatar/index.d.ts +7 -0
- package/esm/avatar/index.js +22 -0
- package/esm/backdrop/backdrop.d.ts +37 -0
- package/esm/backdrop/backdrop.js +137 -0
- package/esm/backdrop/backdrop.styles.d.ts +2677 -0
- package/esm/backdrop/backdrop.styles.js +119 -0
- package/esm/backdrop/index.d.ts +5 -0
- package/esm/backdrop/index.js +16 -0
- package/esm/button/button-group-context.d.ts +20 -0
- package/esm/button/button-group-context.js +21 -0
- package/esm/button/button-group.d.ts +34 -0
- package/esm/button/button-group.js +81 -0
- package/esm/button/button-group.styles.d.ts +899 -0
- package/esm/button/button-group.styles.js +136 -0
- package/esm/button/button-icon.d.ts +909 -0
- package/esm/button/button-icon.js +68 -0
- package/esm/button/button.d.ts +30 -0
- package/esm/button/button.js +145 -0
- package/esm/button/button.styles.d.ts +907 -0
- package/esm/button/button.styles.js +695 -0
- package/esm/button/index.d.ts +10 -0
- package/esm/button/index.js +25 -0
- package/esm/button/utils.d.ts +4 -0
- package/esm/button/utils.js +27 -0
- package/esm/card/card.d.ts +23 -0
- package/esm/card/card.js +117 -0
- package/esm/card/card.styles.d.ts +3575 -0
- package/esm/card/card.styles.js +267 -0
- package/esm/card/index.d.ts +5 -0
- package/esm/card/index.js +24 -0
- package/esm/checkbox/checkbox-context.d.ts +13 -0
- package/esm/checkbox/checkbox-context.js +25 -0
- package/esm/checkbox/checkbox-group.d.ts +29 -0
- package/esm/checkbox/checkbox-group.js +89 -0
- package/esm/checkbox/checkbox.d.ts +58 -0
- package/esm/checkbox/checkbox.js +192 -0
- package/esm/checkbox/checkbox.styles.d.ts +8054 -0
- package/esm/checkbox/checkbox.styles.js +563 -0
- package/esm/checkbox/index.d.ts +6 -0
- package/esm/checkbox/index.js +26 -0
- package/esm/code/code.d.ts +15 -0
- package/esm/code/code.js +42 -0
- package/esm/code/code.styles.d.ts +1782 -0
- package/esm/code/code.styles.js +14 -0
- package/esm/code/index.d.ts +5 -0
- package/esm/code/index.js +15 -0
- package/esm/col/col.d.ts +20 -0
- package/esm/col/col.js +46 -0
- package/esm/col/col.styles.d.ts +893 -0
- package/esm/col/col.styles.js +16 -0
- package/esm/col/index.d.ts +5 -0
- package/esm/col/index.js +14 -0
- package/esm/collapse/collapse-context.d.ts +9 -0
- package/esm/collapse/collapse-context.js +20 -0
- package/esm/collapse/collapse-group.d.ts +18 -0
- package/esm/collapse/collapse-group.js +90 -0
- package/esm/collapse/collapse-icon.d.ts +19 -0
- package/esm/collapse/collapse-icon.js +41 -0
- package/esm/collapse/collapse.d.ts +41 -0
- package/esm/collapse/collapse.js +190 -0
- package/esm/collapse/collapse.styles.d.ts +4472 -0
- package/esm/collapse/collapse.styles.js +254 -0
- package/esm/collapse/index.d.ts +6 -0
- package/esm/collapse/index.js +22 -0
- package/esm/container/container.d.ts +40 -0
- package/esm/container/container.js +91 -0
- package/esm/container/container.styles.d.ts +896 -0
- package/esm/container/container.styles.js +45 -0
- package/esm/container/index.d.ts +5 -0
- package/esm/container/index.js +14 -0
- package/esm/css-baseline/css-baseline.d.ts +9 -0
- package/esm/css-baseline/css-baseline.js +247 -0
- package/esm/css-baseline/index.d.ts +1 -0
- package/esm/css-baseline/index.js +11 -0
- package/esm/divider/divider.d.ts +22 -0
- package/esm/divider/divider.js +82 -0
- package/esm/divider/divider.styles.d.ts +1787 -0
- package/esm/divider/divider.styles.js +77 -0
- package/esm/divider/index.d.ts +5 -0
- package/esm/divider/index.js +15 -0
- package/esm/grid/grid-container.d.ts +22 -0
- package/esm/grid/grid-container.js +60 -0
- package/esm/grid/grid-item.d.ts +37 -0
- package/esm/grid/grid-item.js +123 -0
- package/esm/grid/grid.d.ts +9 -0
- package/esm/grid/grid.js +29 -0
- package/esm/grid/grid.styles.d.ts +1783 -0
- package/esm/grid/grid.styles.js +15 -0
- package/esm/grid/index.d.ts +7 -0
- package/esm/grid/index.js +18 -0
- package/esm/image/image.d.ts +29 -0
- package/esm/image/image.js +150 -0
- package/esm/image/image.skeleton.d.ts +19 -0
- package/esm/image/image.skeleton.js +50 -0
- package/esm/image/image.styles.d.ts +2676 -0
- package/esm/image/image.styles.js +57 -0
- package/esm/image/index.d.ts +5 -0
- package/esm/image/index.js +16 -0
- package/esm/index.d.ts +79 -0
- package/esm/index.js +435 -0
- package/esm/input/index.d.ts +7 -0
- package/esm/input/index.js +30 -0
- package/esm/input/input-password.d.ts +98 -0
- package/esm/input/input-password.js +80 -0
- package/esm/input/input-props.d.ts +66 -0
- package/esm/input/input-props.js +30 -0
- package/esm/input/input.d.ts +18 -0
- package/esm/input/input.js +317 -0
- package/esm/input/input.styles.d.ts +9854 -0
- package/esm/input/input.styles.js +878 -0
- package/esm/input/password-icon.d.ts +6 -0
- package/esm/input/password-icon.js +51 -0
- package/esm/link/icon.d.ts +4 -0
- package/esm/link/icon.js +42 -0
- package/esm/link/index.d.ts +5 -0
- package/esm/link/index.js +15 -0
- package/esm/link/link.d.ts +43 -0
- package/esm/link/link.js +42 -0
- package/esm/link/link.styles.d.ts +1788 -0
- package/esm/link/link.styles.js +135 -0
- package/esm/loading/index.d.ts +7 -0
- package/esm/loading/index.js +24 -0
- package/esm/loading/loading.d.ts +24 -0
- package/esm/loading/loading.js +80 -0
- package/esm/loading/loading.styles.d.ts +5356 -0
- package/esm/loading/loading.styles.js +438 -0
- package/esm/loading/spinner.d.ts +17 -0
- package/esm/loading/spinner.js +47 -0
- package/esm/modal/index.d.ts +8 -0
- package/esm/modal/index.js +28 -0
- package/esm/modal/modal-body.d.ts +45 -0
- package/esm/modal/modal-body.js +62 -0
- package/esm/modal/modal-close-button.d.ts +13 -0
- package/esm/modal/modal-close-button.js +49 -0
- package/esm/modal/modal-context.d.ts +8 -0
- package/esm/modal/modal-context.js +18 -0
- package/esm/modal/modal-footer.d.ts +24 -0
- package/esm/modal/modal-footer.js +69 -0
- package/esm/modal/modal-header.d.ts +24 -0
- package/esm/modal/modal-header.js +69 -0
- package/esm/modal/modal-wrapper.d.ts +24 -0
- package/esm/modal/modal-wrapper.js +153 -0
- package/esm/modal/modal.d.ts +42 -0
- package/esm/modal/modal.js +159 -0
- package/esm/modal/modal.styles.d.ts +5362 -0
- package/esm/modal/modal.styles.js +243 -0
- package/esm/modal/use-modal.d.ts +11 -0
- package/esm/modal/use-modal.js +25 -0
- package/esm/pagination/index.d.ts +7 -0
- package/esm/pagination/index.js +19 -0
- package/esm/pagination/pagination-ellipsis.d.ts +11 -0
- package/esm/pagination/pagination-ellipsis.js +86 -0
- package/esm/pagination/pagination-highlight.d.ts +14 -0
- package/esm/pagination/pagination-highlight.js +52 -0
- package/esm/pagination/pagination-icon.d.ts +16 -0
- package/esm/pagination/pagination-icon.js +59 -0
- package/esm/pagination/pagination-item.d.ts +22 -0
- package/esm/pagination/pagination-item.js +104 -0
- package/esm/pagination/pagination.d.ts +46 -0
- package/esm/pagination/pagination.js +169 -0
- package/esm/pagination/pagination.styles.d.ts +5369 -0
- package/esm/pagination/pagination.styles.js +361 -0
- package/esm/progress/index.d.ts +5 -0
- package/esm/progress/index.js +15 -0
- package/esm/progress/progress.d.ts +65 -0
- package/esm/progress/progress.js +101 -0
- package/esm/progress/progress.styles.d.ts +1793 -0
- package/esm/progress/progress.styles.js +165 -0
- package/esm/radio/index.d.ts +4 -0
- package/esm/radio/index.js +24 -0
- package/esm/radio/radio-context.d.ts +13 -0
- package/esm/radio/radio-context.js +24 -0
- package/esm/radio/radio-group.d.ts +30 -0
- package/esm/radio/radio-group.js +78 -0
- package/esm/radio/radio.d.ts +45 -0
- package/esm/radio/radio.js +156 -0
- package/esm/radio/radio.styles.d.ts +5357 -0
- package/esm/radio/radio.styles.js +240 -0
- package/esm/row/index.d.ts +5 -0
- package/esm/row/index.js +14 -0
- package/esm/row/row.d.ts +21 -0
- package/esm/row/row.js +54 -0
- package/esm/row/row.styles.d.ts +895 -0
- package/esm/row/row.styles.js +25 -0
- package/esm/snippet/index.d.ts +5 -0
- package/esm/snippet/index.js +16 -0
- package/esm/snippet/snippet-icon.d.ts +21 -0
- package/esm/snippet/snippet-icon.js +52 -0
- package/esm/snippet/snippet.d.ts +35 -0
- package/esm/snippet/snippet.js +137 -0
- package/esm/snippet/snippet.styles.d.ts +3570 -0
- package/esm/snippet/snippet.styles.js +141 -0
- package/esm/spacer/index.d.ts +5 -0
- package/esm/spacer/index.js +14 -0
- package/esm/spacer/spacer.d.ts +41 -0
- package/esm/spacer/spacer.js +49 -0
- package/esm/spacer/spacer.styles.d.ts +894 -0
- package/esm/spacer/spacer.styles.js +24 -0
- package/esm/switch/index.d.ts +5 -0
- package/esm/switch/index.js +17 -0
- package/esm/switch/switch.d.ts +82 -0
- package/esm/switch/switch.js +142 -0
- package/esm/switch/switch.styles.d.ts +3576 -0
- package/esm/switch/switch.styles.js +283 -0
- package/esm/text/child.d.ts +21 -0
- package/esm/text/child.js +83 -0
- package/esm/text/index.d.ts +4 -0
- package/esm/text/index.js +14 -0
- package/esm/text/text.d.ts +59 -0
- package/esm/text/text.js +124 -0
- package/esm/text/text.styles.d.ts +894 -0
- package/esm/text/text.styles.js +41 -0
- package/esm/textarea/index.d.ts +3 -0
- package/esm/textarea/index.js +12 -0
- package/esm/textarea/textarea.d.ts +42 -0
- package/esm/textarea/textarea.js +126 -0
- package/esm/textarea/utils.d.ts +13 -0
- package/esm/textarea/utils.js +126 -0
- package/esm/theme/common.d.ts +1584 -0
- package/esm/theme/common.js +490 -0
- package/esm/theme/dark-theme.d.ts +33 -0
- package/esm/theme/dark-theme.js +38 -0
- package/esm/theme/index.js +31 -0
- package/esm/theme/light-theme.d.ts +28 -0
- package/esm/theme/light-theme.js +33 -0
- package/esm/theme/ssr-provider.d.ts +7 -0
- package/esm/theme/ssr-provider.js +51 -0
- package/esm/theme/stitches.config.d.ts +8700 -0
- package/esm/theme/stitches.config.js +88 -0
- package/esm/theme/theme-context.d.ts +5 -0
- package/esm/theme/theme-context.js +22 -0
- package/esm/theme/theme-provider.d.ts +14 -0
- package/esm/theme/theme-provider.js +115 -0
- package/esm/theme/types.d.ts +75 -0
- package/esm/theme/types.js +3 -0
- package/esm/theme/utils.d.ts +16 -0
- package/esm/theme/utils.js +113 -0
- package/esm/tooltip/index.d.ts +6 -0
- package/esm/tooltip/index.js +17 -0
- package/esm/tooltip/placement.d.ts +39 -0
- package/esm/tooltip/placement.js +193 -0
- package/esm/tooltip/tooltip-content.d.ts +27 -0
- package/esm/tooltip/tooltip-content.js +135 -0
- package/esm/tooltip/tooltip.d.ts +56 -0
- package/esm/tooltip/tooltip.js +141 -0
- package/esm/tooltip/tooltip.styles.d.ts +3571 -0
- package/esm/tooltip/tooltip.styles.js +159 -0
- package/esm/use-body-scroll/index.d.ts +3 -0
- package/esm/use-body-scroll/index.js +12 -0
- package/esm/use-body-scroll/use-body-scroll.d.ts +9 -0
- package/esm/use-body-scroll/use-body-scroll.js +77 -0
- package/esm/use-click-anywhere/index.d.ts +2 -0
- package/esm/use-click-anywhere/index.js +12 -0
- package/esm/use-click-anywhere/use-click-anywhere.d.ts +2 -0
- package/esm/use-click-anywhere/use-click-anywhere.js +19 -0
- package/esm/use-click-away/index.d.ts +2 -0
- package/esm/use-click-away/index.js +12 -0
- package/esm/use-click-away/use-click-away.d.ts +3 -0
- package/esm/use-click-away/use-click-away.js +23 -0
- package/esm/use-clipboard/index.d.ts +3 -0
- package/esm/use-clipboard/index.js +12 -0
- package/esm/use-clipboard/use-clipboard.d.ts +8 -0
- package/esm/use-clipboard/use-clipboard.js +57 -0
- package/esm/use-current-state/index.d.ts +2 -0
- package/esm/use-current-state/index.js +12 -0
- package/esm/use-current-state/use-current-state.d.ts +8 -0
- package/esm/use-current-state/use-current-state.js +28 -0
- package/esm/use-drip/index.d.ts +2 -0
- package/esm/use-drip/index.js +12 -0
- package/esm/use-drip/use-drip.d.ts +9 -0
- package/esm/use-drip/use-drip.js +38 -0
- package/esm/use-input/index.d.ts +2 -0
- package/esm/use-input/index.js +12 -0
- package/esm/use-input/use-input.d.ts +13 -0
- package/esm/use-input/use-input.js +32 -0
- package/esm/use-keyboard/codes.d.ts +92 -0
- package/esm/use-keyboard/codes.js +104 -0
- package/esm/use-keyboard/helper.d.ts +3 -0
- package/esm/use-keyboard/helper.js +35 -0
- package/esm/use-keyboard/index.d.ts +5 -0
- package/esm/use-keyboard/index.js +15 -0
- package/esm/use-keyboard/use-keyboard.d.ts +22 -0
- package/esm/use-keyboard/use-keyboard.js +76 -0
- package/esm/use-pagination/index.d.ts +20 -0
- package/esm/use-pagination/index.js +88 -0
- package/esm/use-portal/index.d.ts +2 -0
- package/esm/use-portal/index.js +12 -0
- package/esm/use-portal/use-portal.d.ts +2 -0
- package/esm/use-portal/use-portal.js +43 -0
- package/esm/use-real-shape/index.d.ts +2 -0
- package/esm/use-real-shape/index.js +12 -0
- package/esm/use-real-shape/use-real-shape.d.ts +9 -0
- package/esm/use-real-shape/use-real-shape.js +55 -0
- package/esm/use-resize/index.d.ts +2 -0
- package/esm/use-resize/index.js +12 -0
- package/esm/use-resize/use-resize.d.ts +2 -0
- package/esm/use-resize/use-resize.js +23 -0
- package/esm/use-ssr/index.d.ts +2 -0
- package/esm/use-ssr/index.js +12 -0
- package/esm/use-ssr/use-ssr.d.ts +6 -0
- package/esm/use-ssr/use-ssr.js +25 -0
- package/esm/use-theme/index.d.ts +2 -0
- package/esm/use-theme/index.js +12 -0
- package/esm/use-theme/use-theme.d.ts +3 -0
- package/esm/use-theme/use-theme.js +16 -0
- package/esm/use-warning/index.d.ts +2 -0
- package/esm/use-warning/index.js +12 -0
- package/esm/use-warning/use-warning.d.ts +2 -0
- package/esm/use-warning/use-warning.js +23 -0
- package/esm/user/index.d.ts +6 -0
- package/esm/user/index.js +21 -0
- package/esm/user/user-link.d.ts +32 -0
- package/esm/user/user-link.js +46 -0
- package/esm/user/user.d.ts +35 -0
- package/esm/user/user.js +63 -0
- package/esm/user/user.styles.d.ts +4456 -0
- package/esm/user/user.styles.js +56 -0
- package/esm/utils/assertion.d.ts +8 -0
- package/esm/utils/assertion.js +42 -0
- package/esm/utils/clear-icon.d.ts +16 -0
- package/esm/utils/clear-icon.js +70 -0
- package/esm/utils/clsx.d.ts +1 -0
- package/esm/utils/clsx.js +57 -0
- package/esm/utils/collections.d.ts +12 -0
- package/esm/utils/collections.js +110 -0
- package/esm/utils/color.d.ts +28 -0
- package/esm/utils/color.js +187 -0
- package/esm/utils/css-transition.d.ts +27 -0
- package/esm/utils/css-transition.js +76 -0
- package/esm/utils/deep-merge.d.ts +1 -0
- package/esm/utils/deep-merge.js +33 -0
- package/esm/utils/dimensions.d.ts +1 -0
- package/esm/utils/dimensions.js +10 -0
- package/esm/utils/dom.js +110 -0
- package/esm/utils/drip.d.ts +936 -0
- package/esm/utils/drip.js +116 -0
- package/esm/utils/expand.d.ts +20 -0
- package/esm/utils/expand.js +109 -0
- package/esm/utils/icons.js +481 -0
- package/esm/utils/numbers.d.ts +9 -0
- package/esm/utils/numbers.js +23 -0
- package/esm/utils/object.d.ts +11 -0
- package/esm/utils/object.js +40 -0
- package/esm/utils/prop-types.d.ts +54 -0
- package/esm/utils/prop-types.js +56 -0
- package/esm/utils/react.js +24 -0
- package/esm/utils/strings.js +18 -0
- package/esm/utils/types.d.js +3 -0
- package/esm/utils/with-defaults.d.ts +3 -0
- package/esm/utils/with-defaults.js +13 -0
- package/grid/package.json +6 -0
- package/image/package.json +6 -0
- package/input/package.json +6 -0
- package/link/package.json +6 -0
- package/loading/package.json +6 -0
- package/modal/package.json +6 -0
- package/package.json +16 -76
- package/pagination/package.json +6 -0
- package/progress/package.json +6 -0
- package/radio/package.json +6 -0
- package/row/package.json +6 -0
- package/snippet/package.json +6 -0
- package/spacer/package.json +6 -0
- package/switch/package.json +6 -0
- package/text/package.json +6 -0
- package/textarea/package.json +6 -0
- package/tooltip/package.json +6 -0
- package/umd/nextui.js +14059 -0
- package/umd/nextui.min.js +2 -0
- package/umd/nextui.min.js.LICENSE.txt +14 -0
- package/use-body-scroll/package.json +6 -0
- package/use-click-anywhere/package.json +6 -0
- package/use-click-away/package.json +6 -0
- package/use-clipboard/package.json +6 -0
- package/use-current-state/package.json +6 -0
- package/use-drip/package.json +6 -0
- package/use-input/package.json +6 -0
- package/use-keyboard/package.json +6 -0
- package/use-portal/package.json +6 -0
- package/use-real-shape/package.json +6 -0
- package/use-resize/package.json +6 -0
- package/use-ssr/package.json +6 -0
- package/use-theme/package.json +6 -0
- package/use-warning/package.json +6 -0
- package/user/package.json +6 -0
- package/utils/package.json +6 -0
- package/dist/components/avatar/avatar-group.d.ts +0 -17
- package/dist/components/avatar/avatar.d.ts +0 -33
- package/dist/components/avatar/index.d.ts +0 -2
- package/dist/components/button/button-group.d.ts +0 -56
- package/dist/components/button/button-icon.d.ts +0 -17
- package/dist/components/button/button-loading.d.ts +0 -18
- package/dist/components/button/button.d.ts +0 -51
- package/dist/components/button/button.drip.d.ts +0 -20
- package/dist/components/button/index.d.ts +0 -2
- package/dist/components/button/styles.d.ts +0 -40
- package/dist/components/card/card-content.d.ts +0 -13
- package/dist/components/card/card-footer.d.ts +0 -16
- package/dist/components/card/card.d.ts +0 -33
- package/dist/components/card/index.d.ts +0 -2
- package/dist/components/card/styles.d.ts +0 -12
- package/dist/components/checkbox/checkbox-group.d.ts +0 -31
- package/dist/components/checkbox/index.d.ts +0 -5
- package/dist/components/checkbox/styles.d.ts +0 -4
- package/dist/components/code/code.d.ts +0 -17
- package/dist/components/code/index.d.ts +0 -4
- package/dist/components/col/index.d.ts +0 -4
- package/dist/components/container/container.d.ts +0 -39
- package/dist/components/container/index.d.ts +0 -2
- package/dist/components/divider/divider.d.ts +0 -30
- package/dist/components/divider/index.d.ts +0 -2
- package/dist/components/grid/grid-container.d.ts +0 -18
- package/dist/components/grid/grid.d.ts +0 -16
- package/dist/components/grid/index.d.ts +0 -2
- package/dist/components/image/image-browser-https-icon.d.ts +0 -3
- package/dist/components/image/image-browser.d.ts +0 -31
- package/dist/components/image/image.skeleton.d.ts +0 -12
- package/dist/components/image/index.d.ts +0 -2
- package/dist/components/image/styles.d.ts +0 -9
- package/dist/components/index.d.ts +0 -20
- package/dist/components/link/index.d.ts +0 -4
- package/dist/components/link/link.d.ts +0 -39
- package/dist/components/loading/index.d.ts +0 -2
- package/dist/components/loading/spinner.d.ts +0 -16
- package/dist/components/loading/styles.d.ts +0 -18
- package/dist/components/radio/index.d.ts +0 -2
- package/dist/components/radio/radio-description.d.ts +0 -13
- package/dist/components/radio/radio-group.d.ts +0 -33
- package/dist/components/row/index.d.ts +0 -4
- package/dist/components/row/row.d.ts +0 -32
- package/dist/components/snippet/index.d.ts +0 -2
- package/dist/components/snippet/snippet.d.ts +0 -36
- package/dist/components/snippet/styles.d.ts +0 -8
- package/dist/components/spacer/index.d.ts +0 -4
- package/dist/components/spacer/spacer.d.ts +0 -27
- package/dist/components/switch/index.d.ts +0 -2
- package/dist/components/switch/styles.d.ts +0 -6
- package/dist/components/switch/switch.d.ts +0 -50
- package/dist/components/text/child.d.ts +0 -22
- package/dist/components/text/index.d.ts +0 -4
- package/dist/components/user/index.d.ts +0 -2
- package/dist/components/user/user-link.d.ts +0 -16
- package/dist/hooks/index.d.ts +0 -5
- package/dist/hooks/use-theme.d.ts +0 -3
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -1
- package/dist/index.min.js +0 -1
- package/dist/theme/common.d.ts +0 -63
- package/dist/theme/dark.d.ts +0 -8
- package/dist/theme/default.d.ts +0 -8
- package/dist/theme/index.d.ts +0 -2
- package/dist/theme/shared.d.ts +0 -4
- package/dist/theme/theme-context.d.ts +0 -4
- package/dist/theme/theme-provider.d.ts +0 -7
- package/dist/theme/types.d.ts +0 -94
- package/dist/theme/utils.d.ts +0 -7
- package/dist/utils/collections.d.ts +0 -4
- package/dist/utils/object.d.ts +0 -5
- package/dist/utils/prop-types.d.ts +0 -37
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.StyledModalHideTab = exports.StyledModalHeader = exports.StyledModalFooter = exports.StyledModalCloseButton = exports.StyledModalBody = exports.StyledModal = void 0;
|
|
5
|
+
|
|
6
|
+
var _stitches = require("../theme/stitches.config");
|
|
7
|
+
|
|
8
|
+
const reboundAnimation = (0, _stitches.keyframes)({
|
|
9
|
+
'0%': {
|
|
10
|
+
transform: 'scale(0.95)'
|
|
11
|
+
},
|
|
12
|
+
'40%': {
|
|
13
|
+
transform: 'scale(1.02)'
|
|
14
|
+
},
|
|
15
|
+
'80%': {
|
|
16
|
+
transform: 'scale(0.98)'
|
|
17
|
+
},
|
|
18
|
+
'100%': {
|
|
19
|
+
transform: 'scale(1)'
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const appearanceIn = (0, _stitches.keyframes)({
|
|
23
|
+
'0%': {
|
|
24
|
+
opacity: 0,
|
|
25
|
+
transform: 'scale(0.95)'
|
|
26
|
+
},
|
|
27
|
+
'60%': {
|
|
28
|
+
opacity: 0.75,
|
|
29
|
+
transform: 'scale(1.02)'
|
|
30
|
+
},
|
|
31
|
+
'100%': {
|
|
32
|
+
opacity: 1,
|
|
33
|
+
transform: 'scale(1)'
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const appearanceOut = (0, _stitches.keyframes)({
|
|
37
|
+
'0%': {
|
|
38
|
+
opacity: 1,
|
|
39
|
+
transform: 'scale(1)'
|
|
40
|
+
},
|
|
41
|
+
'100%': {
|
|
42
|
+
opacity: 0,
|
|
43
|
+
transform: 'scale(0.95)'
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const StyledModalHideTab = (0, _stitches.styled)('div', {
|
|
47
|
+
outline: 'none',
|
|
48
|
+
overflow: 'hidden',
|
|
49
|
+
width: 0,
|
|
50
|
+
height: 0,
|
|
51
|
+
opacity: 0
|
|
52
|
+
});
|
|
53
|
+
exports.StyledModalHideTab = StyledModalHideTab;
|
|
54
|
+
const StyledModalCloseButton = (0, _stitches.styled)('button', {
|
|
55
|
+
position: 'absolute',
|
|
56
|
+
background: 'transparent',
|
|
57
|
+
border: 'none',
|
|
58
|
+
zIndex: '$1',
|
|
59
|
+
top: '$space$3',
|
|
60
|
+
right: '$space$2',
|
|
61
|
+
margin: 0,
|
|
62
|
+
d: 'inline-flex',
|
|
63
|
+
ai: 'center',
|
|
64
|
+
height: 'auto',
|
|
65
|
+
cursor: 'pointer',
|
|
66
|
+
boxSizing: 'border-box',
|
|
67
|
+
transition: '$default',
|
|
68
|
+
padding: 'calc($space$sm * 0.5)',
|
|
69
|
+
color: '$accents4',
|
|
70
|
+
br: '$space$5',
|
|
71
|
+
svg: {
|
|
72
|
+
color: 'currentColor'
|
|
73
|
+
},
|
|
74
|
+
'&:hover': {
|
|
75
|
+
svg: {
|
|
76
|
+
opacity: 0.8
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
variants: {
|
|
80
|
+
disabled: {
|
|
81
|
+
true: {
|
|
82
|
+
cursor: 'not-allowed'
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}, _stitches.sharedFocus);
|
|
87
|
+
exports.StyledModalCloseButton = StyledModalCloseButton;
|
|
88
|
+
const StyledModalHeader = (0, _stitches.styled)('div', {
|
|
89
|
+
display: 'flex',
|
|
90
|
+
flexShrink: 0,
|
|
91
|
+
ai: 'center',
|
|
92
|
+
ov: 'hidden',
|
|
93
|
+
color: 'inherit',
|
|
94
|
+
padding: '$sm $10',
|
|
95
|
+
fs: '$xs',
|
|
96
|
+
variants: {
|
|
97
|
+
noPadding: {
|
|
98
|
+
true: {
|
|
99
|
+
padding: 0
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
autoMargin: {
|
|
103
|
+
true: {
|
|
104
|
+
'> *:first-child': {
|
|
105
|
+
mt: 0
|
|
106
|
+
},
|
|
107
|
+
'> *:last-child': {
|
|
108
|
+
mb: 0
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
exports.StyledModalHeader = StyledModalHeader;
|
|
115
|
+
const StyledModalBody = (0, _stitches.styled)('div', {
|
|
116
|
+
display: 'flex',
|
|
117
|
+
flexDirection: 'column',
|
|
118
|
+
flex: '1 1 auto',
|
|
119
|
+
padding: '$sm $10',
|
|
120
|
+
oy: 'auto',
|
|
121
|
+
position: 'relative',
|
|
122
|
+
ta: 'left',
|
|
123
|
+
variants: {
|
|
124
|
+
noPadding: {
|
|
125
|
+
true: {
|
|
126
|
+
flex: 1,
|
|
127
|
+
padding: 0
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
autoMargin: {
|
|
131
|
+
true: {
|
|
132
|
+
'> *:first-child': {
|
|
133
|
+
mt: 0
|
|
134
|
+
},
|
|
135
|
+
'> *': {
|
|
136
|
+
mb: '$8'
|
|
137
|
+
},
|
|
138
|
+
'> *:last-child': {
|
|
139
|
+
mb: 0
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
exports.StyledModalBody = StyledModalBody;
|
|
146
|
+
const StyledModalFooter = (0, _stitches.styled)('div', {
|
|
147
|
+
d: 'flex',
|
|
148
|
+
flexWrap: 'wrap',
|
|
149
|
+
flexShrink: 0,
|
|
150
|
+
overflow: 'hidden',
|
|
151
|
+
color: 'inherit',
|
|
152
|
+
ai: 'center',
|
|
153
|
+
fs: '$xs',
|
|
154
|
+
padding: '$sm $lg',
|
|
155
|
+
variants: {
|
|
156
|
+
noPadding: {
|
|
157
|
+
true: {
|
|
158
|
+
padding: 0
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
autoMargin: {
|
|
162
|
+
true: {
|
|
163
|
+
'> *': {
|
|
164
|
+
m: '$2'
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
exports.StyledModalFooter = StyledModalFooter;
|
|
171
|
+
const StyledModal = (0, _stitches.styled)('section', {
|
|
172
|
+
maxWidth: '100%',
|
|
173
|
+
verticalAlign: 'middle',
|
|
174
|
+
overflow: 'hidden',
|
|
175
|
+
height: 'fit-content(20em)',
|
|
176
|
+
maxHeight: 'inherit',
|
|
177
|
+
display: 'flex',
|
|
178
|
+
outline: 'none',
|
|
179
|
+
flexDirection: 'column',
|
|
180
|
+
position: 'relative',
|
|
181
|
+
boxSizing: 'border-box',
|
|
182
|
+
color: '$foreground',
|
|
183
|
+
br: '$lg',
|
|
184
|
+
boxShadow: '$lg',
|
|
185
|
+
bg: '$background',
|
|
186
|
+
animationFillMode: 'forwards',
|
|
187
|
+
'&.nextui-modal-wrapper-enter:not(.nextui-modal-rendered)': {
|
|
188
|
+
animationName: appearanceIn,
|
|
189
|
+
animationDuration: '200ms',
|
|
190
|
+
animationTimingFunction: 'ease-in',
|
|
191
|
+
animationDirection: 'normal'
|
|
192
|
+
},
|
|
193
|
+
'&.nextui-modal-wrapper-leave': {
|
|
194
|
+
animationName: appearanceOut,
|
|
195
|
+
animationDuration: '50ms',
|
|
196
|
+
animationTimingFunction: 'ease-out'
|
|
197
|
+
},
|
|
198
|
+
variants: {
|
|
199
|
+
fullScreen: {
|
|
200
|
+
true: {
|
|
201
|
+
size: '100%',
|
|
202
|
+
maxHeight: '100%'
|
|
203
|
+
},
|
|
204
|
+
false: {
|
|
205
|
+
'&.nextui-modal-rebound': {
|
|
206
|
+
animationDuration: '250ms',
|
|
207
|
+
animationName: reboundAnimation,
|
|
208
|
+
animationTimingFunction: 'ease',
|
|
209
|
+
animationFillMode: 'forwards'
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
scroll: {
|
|
214
|
+
true: {
|
|
215
|
+
maxHeight: 'calc(100vh - 200px)'
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
closeButton: {
|
|
219
|
+
true: {
|
|
220
|
+
paddingTop: '$lg',
|
|
221
|
+
[`& ${StyledModalCloseButton}`]: {
|
|
222
|
+
svg: {
|
|
223
|
+
size: '$10'
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
isDark: {
|
|
229
|
+
true: {
|
|
230
|
+
bg: '$accents1'
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
compoundVariants: [{
|
|
235
|
+
// scroll && fullScreen
|
|
236
|
+
scroll: true,
|
|
237
|
+
fullScreen: true,
|
|
238
|
+
css: {
|
|
239
|
+
maxHeight: '100%'
|
|
240
|
+
}
|
|
241
|
+
}]
|
|
242
|
+
});
|
|
243
|
+
exports.StyledModal = StyledModal;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
|
2
|
+
declare const useModal: (initialVisible?: boolean) => {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
setVisible: Dispatch<SetStateAction<boolean>>;
|
|
5
|
+
currentRef: MutableRefObject<boolean>;
|
|
6
|
+
bindings: {
|
|
7
|
+
open: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default useModal;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _useCurrentState = _interopRequireDefault(require("../use-current-state"));
|
|
9
|
+
|
|
10
|
+
const useModal = (initialVisible = false) => {
|
|
11
|
+
const [visible, setVisible, currentRef] = (0, _useCurrentState.default)(initialVisible);
|
|
12
|
+
return {
|
|
13
|
+
visible,
|
|
14
|
+
setVisible,
|
|
15
|
+
currentRef,
|
|
16
|
+
bindings: {
|
|
17
|
+
open: visible,
|
|
18
|
+
onClose: () => setVisible(false)
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var _default = useModal;
|
|
24
|
+
exports.default = _default;
|
|
25
|
+
module.exports = exports.default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Pagination from './pagination';
|
|
2
|
+
export type { PaginationProps } from './pagination';
|
|
3
|
+
export type { PaginationItemProps } from './pagination-item';
|
|
4
|
+
export type { PaginationHighlightProps } from './pagination-highlight';
|
|
5
|
+
export { StyledPaginationEllipsis, StyledPaginationIcon, StyledPaginationItemContent, StyledPaginationItem, StyledPaginationHighlight, StyledPagination } from './pagination.styles';
|
|
6
|
+
export type { PaginationVariantsProps, PaginationItemVariantsProps, PaginationHighlightVariantsProps } from './pagination.styles';
|
|
7
|
+
export default Pagination;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = exports.StyledPaginationItemContent = exports.StyledPaginationItem = exports.StyledPaginationIcon = exports.StyledPaginationHighlight = exports.StyledPaginationEllipsis = exports.StyledPagination = void 0;
|
|
7
|
+
|
|
8
|
+
var _pagination = _interopRequireDefault(require("./pagination"));
|
|
9
|
+
|
|
10
|
+
var _pagination2 = require("./pagination.styles");
|
|
11
|
+
|
|
12
|
+
exports.StyledPaginationEllipsis = _pagination2.StyledPaginationEllipsis;
|
|
13
|
+
exports.StyledPaginationIcon = _pagination2.StyledPaginationIcon;
|
|
14
|
+
exports.StyledPaginationItemContent = _pagination2.StyledPaginationItemContent;
|
|
15
|
+
exports.StyledPaginationItem = _pagination2.StyledPaginationItem;
|
|
16
|
+
exports.StyledPaginationHighlight = _pagination2.StyledPaginationHighlight;
|
|
17
|
+
exports.StyledPagination = _pagination2.StyledPagination;
|
|
18
|
+
var _default = _pagination.default;
|
|
19
|
+
exports.default = _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
value?: string | number;
|
|
4
|
+
isBefore?: boolean;
|
|
5
|
+
onlyDots?: boolean;
|
|
6
|
+
animated?: boolean;
|
|
7
|
+
bordered?: boolean;
|
|
8
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const PaginationEllipsis: React.FC<Props>;
|
|
11
|
+
export default PaginationEllipsis;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _paginationItem = _interopRequireDefault(require("./pagination-item"));
|
|
11
|
+
|
|
12
|
+
var _pagination = require("./pagination.styles");
|
|
13
|
+
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
+
|
|
20
|
+
const PaginationEllipsis = ({
|
|
21
|
+
value,
|
|
22
|
+
isBefore,
|
|
23
|
+
onlyDots,
|
|
24
|
+
animated,
|
|
25
|
+
bordered,
|
|
26
|
+
onClick
|
|
27
|
+
}) => {
|
|
28
|
+
const [showMore, setShowMore] = (0, _react.useState)(false);
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_paginationItem.default, {
|
|
30
|
+
value: value,
|
|
31
|
+
onlyDots: onlyDots,
|
|
32
|
+
animated: animated,
|
|
33
|
+
bordered: bordered,
|
|
34
|
+
onClick: e => onClick && onClick(e),
|
|
35
|
+
onMouseEnter: () => setShowMore(true),
|
|
36
|
+
onMouseLeave: () => setShowMore(false),
|
|
37
|
+
children: showMore ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_pagination.StyledPaginationEllipsis, {
|
|
38
|
+
role: "presentation",
|
|
39
|
+
focusable: "false",
|
|
40
|
+
viewBox: "0 0 24 24",
|
|
41
|
+
stroke: "currentColor",
|
|
42
|
+
strokeWidth: "1.5",
|
|
43
|
+
strokeLinecap: "round",
|
|
44
|
+
strokeLinejoin: "round",
|
|
45
|
+
fill: "none",
|
|
46
|
+
shapeRendering: "geometricPrecision",
|
|
47
|
+
className: "nextui-pagination-ellipsis",
|
|
48
|
+
isEllipsis: true,
|
|
49
|
+
isBefore: isBefore,
|
|
50
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
51
|
+
d: "M13 17l5-5-5-5"
|
|
52
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
53
|
+
d: "M6 17l5-5-5-5"
|
|
54
|
+
})]
|
|
55
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_pagination.StyledPaginationEllipsis, {
|
|
56
|
+
viewBox: "0 0 24 24",
|
|
57
|
+
strokeWidth: "1.5",
|
|
58
|
+
strokeLinecap: "round",
|
|
59
|
+
strokeLinejoin: "round",
|
|
60
|
+
fill: "none",
|
|
61
|
+
shapeRendering: "geometricPrecision",
|
|
62
|
+
isEllipsis: false,
|
|
63
|
+
isBefore: isBefore,
|
|
64
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
65
|
+
cx: "12",
|
|
66
|
+
cy: "12",
|
|
67
|
+
r: "1",
|
|
68
|
+
fill: "currentColor"
|
|
69
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
70
|
+
cx: "19",
|
|
71
|
+
cy: "12",
|
|
72
|
+
r: "1",
|
|
73
|
+
fill: "currentColor"
|
|
74
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
75
|
+
cx: "5",
|
|
76
|
+
cy: "12",
|
|
77
|
+
r: "1",
|
|
78
|
+
fill: "currentColor"
|
|
79
|
+
})]
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var _default = PaginationEllipsis;
|
|
85
|
+
exports.default = _default;
|
|
86
|
+
module.exports = exports.default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CSS } from '../theme/stitches.config';
|
|
3
|
+
import { PaginationHighlightVariantsProps } from './pagination.styles';
|
|
4
|
+
interface Props {
|
|
5
|
+
active: number;
|
|
6
|
+
rounded?: boolean;
|
|
7
|
+
noMargin?: boolean;
|
|
8
|
+
shadow?: boolean;
|
|
9
|
+
css?: CSS;
|
|
10
|
+
as?: keyof JSX.IntrinsicElements;
|
|
11
|
+
}
|
|
12
|
+
export declare type PaginationHighlightProps = Props & PaginationHighlightVariantsProps;
|
|
13
|
+
declare const PaginationHighlight: React.FC<PaginationHighlightProps>;
|
|
14
|
+
export default PaginationHighlight;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _clsx = _interopRequireDefault(require("../utils/clsx"));
|
|
11
|
+
|
|
12
|
+
var _pagination = require("./pagination.styles");
|
|
13
|
+
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
+
|
|
20
|
+
const PaginationHighlight = ({
|
|
21
|
+
active,
|
|
22
|
+
shadow,
|
|
23
|
+
noMargin,
|
|
24
|
+
rounded,
|
|
25
|
+
css,
|
|
26
|
+
...props
|
|
27
|
+
}) => {
|
|
28
|
+
const leftValue = (0, _react.useMemo)(() => noMargin ? `$$paginationSize * ${active}` : `$$paginationSize * ${active} + ${active * 4 + 2}px`, [active, noMargin]);
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pagination.StyledPaginationHighlight, {
|
|
30
|
+
"aria-hidden": true,
|
|
31
|
+
shadow: shadow,
|
|
32
|
+
rounded: rounded,
|
|
33
|
+
className: (0, _clsx.default)('nextui-pagination-highlight', {
|
|
34
|
+
'nextui-pagination-highlight--rounded': rounded,
|
|
35
|
+
'nextui-pagination-highlight--active': active,
|
|
36
|
+
'nextui-pagination-highlight--no-margin': noMargin,
|
|
37
|
+
'nextui-pagination-highlight--shadow': shadow
|
|
38
|
+
}),
|
|
39
|
+
noMargin: noMargin,
|
|
40
|
+
css: {
|
|
41
|
+
left: `calc(${leftValue})`,
|
|
42
|
+
...css
|
|
43
|
+
},
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
PaginationHighlight.toString = () => '.nextui-pagination-highlight';
|
|
49
|
+
|
|
50
|
+
var _default = PaginationHighlight;
|
|
51
|
+
exports.default = _default;
|
|
52
|
+
module.exports = exports.default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CSS } from '../theme/stitches.config';
|
|
3
|
+
interface Props {
|
|
4
|
+
isPrev?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onlyDots?: boolean;
|
|
7
|
+
animated?: boolean;
|
|
8
|
+
bordered?: boolean;
|
|
9
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
10
|
+
}
|
|
11
|
+
declare type NativeAttrs = Omit<React.SVGAttributes<unknown>, keyof Props>;
|
|
12
|
+
export declare type PaginationIconProps = Props & NativeAttrs & {
|
|
13
|
+
css?: CSS;
|
|
14
|
+
};
|
|
15
|
+
declare const MemoPaginationIcon: React.NamedExoticComponent<PaginationIconProps>;
|
|
16
|
+
export default MemoPaginationIcon;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _paginationItem = _interopRequireDefault(require("./pagination-item"));
|
|
11
|
+
|
|
12
|
+
var _pagination = require("./pagination.styles");
|
|
13
|
+
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
16
|
+
const PaginationIcon = ({
|
|
17
|
+
isPrev,
|
|
18
|
+
disabled,
|
|
19
|
+
onlyDots,
|
|
20
|
+
animated,
|
|
21
|
+
bordered,
|
|
22
|
+
onClick,
|
|
23
|
+
...props
|
|
24
|
+
}) => {
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_paginationItem.default, {
|
|
26
|
+
preserveContent: true,
|
|
27
|
+
value: isPrev ? '<' : '>',
|
|
28
|
+
bordered: bordered,
|
|
29
|
+
animated: animated,
|
|
30
|
+
onlyDots: onlyDots,
|
|
31
|
+
disabled: disabled,
|
|
32
|
+
onClick: e => onClick && onClick(e),
|
|
33
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pagination.StyledPaginationIcon, {
|
|
34
|
+
role: "presentation",
|
|
35
|
+
focusable: "false",
|
|
36
|
+
viewBox: "0 0 24 24",
|
|
37
|
+
fill: "none",
|
|
38
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
+
className: "nextui-pagination-icon",
|
|
40
|
+
isPrev: isPrev,
|
|
41
|
+
...props,
|
|
42
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
43
|
+
d: "M15.5 19l-7-7 7-7",
|
|
44
|
+
stroke: "currentColor",
|
|
45
|
+
strokeWidth: 1.5,
|
|
46
|
+
strokeLinecap: "round",
|
|
47
|
+
strokeLinejoin: "round"
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
PaginationIcon.toString = () => '.nextui-pagination-icon';
|
|
54
|
+
|
|
55
|
+
const MemoPaginationIcon = /*#__PURE__*/_react.default.memo(PaginationIcon);
|
|
56
|
+
|
|
57
|
+
var _default = MemoPaginationIcon;
|
|
58
|
+
exports.default = _default;
|
|
59
|
+
module.exports = exports.default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CSS } from '../theme/stitches.config';
|
|
3
|
+
import { PaginationItemVariantsProps } from './pagination.styles';
|
|
4
|
+
interface Props {
|
|
5
|
+
active?: boolean;
|
|
6
|
+
value?: string | number;
|
|
7
|
+
onlyDots?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
bordered?: boolean;
|
|
10
|
+
animated?: boolean;
|
|
11
|
+
preserveContent?: boolean;
|
|
12
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
13
|
+
as?: keyof JSX.IntrinsicElements;
|
|
14
|
+
}
|
|
15
|
+
declare type NativeAttrs = Omit<React.ButtonHTMLAttributes<unknown>, keyof Props>;
|
|
16
|
+
export declare type PaginationItemProps = Props & NativeAttrs & PaginationItemVariantsProps & {
|
|
17
|
+
css?: CSS;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: React.ComponentType<Partial<{
|
|
20
|
+
preserveContent: boolean;
|
|
21
|
+
}> & Omit<React.PropsWithChildren<PaginationItemProps>, "preserveContent">>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _usePagination = require("../use-pagination");
|
|
11
|
+
|
|
12
|
+
var _clsx = _interopRequireDefault(require("../utils/clsx"));
|
|
13
|
+
|
|
14
|
+
var _withDefaults = _interopRequireDefault(require("../utils/with-defaults"));
|
|
15
|
+
|
|
16
|
+
var _pagination = require("./pagination.styles");
|
|
17
|
+
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
24
|
+
const defaultProps = {
|
|
25
|
+
preserveContent: false
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const getItemAriaLabel = page => {
|
|
29
|
+
if (!page) return;
|
|
30
|
+
|
|
31
|
+
switch (page) {
|
|
32
|
+
case _usePagination.DOTS:
|
|
33
|
+
return 'dots element';
|
|
34
|
+
|
|
35
|
+
case '<':
|
|
36
|
+
return 'previous page button';
|
|
37
|
+
|
|
38
|
+
case '>':
|
|
39
|
+
return 'next page button';
|
|
40
|
+
|
|
41
|
+
case 'first':
|
|
42
|
+
return 'first page button';
|
|
43
|
+
|
|
44
|
+
case 'last':
|
|
45
|
+
return 'last page button';
|
|
46
|
+
|
|
47
|
+
default:
|
|
48
|
+
return `${page} item`;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const preClass = 'nextui-pagination-item';
|
|
53
|
+
|
|
54
|
+
const PaginationItem = ({
|
|
55
|
+
active,
|
|
56
|
+
value,
|
|
57
|
+
children,
|
|
58
|
+
disabled,
|
|
59
|
+
animated,
|
|
60
|
+
bordered,
|
|
61
|
+
onClick,
|
|
62
|
+
onlyDots,
|
|
63
|
+
preserveContent,
|
|
64
|
+
...props
|
|
65
|
+
}) => {
|
|
66
|
+
const ariaLabel = (0, _react.useMemo)(() => active ? `${getItemAriaLabel(value)} active` : getItemAriaLabel(value), [value, active]);
|
|
67
|
+
|
|
68
|
+
const clickHandler = event => {
|
|
69
|
+
if (disabled) return;
|
|
70
|
+
onClick && onClick(event);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pagination.StyledPaginationItem, {
|
|
74
|
+
className: (0, _clsx.default)(preClass, {
|
|
75
|
+
[`${preClass}-active`]: active,
|
|
76
|
+
[`${preClass}-animated`]: animated,
|
|
77
|
+
[`${preClass}-disabled`]: disabled,
|
|
78
|
+
[`${preClass}-bordered`]: bordered,
|
|
79
|
+
[`${preClass}-only-dots`]: onlyDots,
|
|
80
|
+
[`${preClass}-preserve-content`]: preserveContent
|
|
81
|
+
}),
|
|
82
|
+
animated: animated,
|
|
83
|
+
active: active,
|
|
84
|
+
disabled: disabled,
|
|
85
|
+
bordered: bordered,
|
|
86
|
+
onlyDots: onlyDots,
|
|
87
|
+
preserveContent: preserveContent,
|
|
88
|
+
onClick: clickHandler,
|
|
89
|
+
"aria-label": ariaLabel,
|
|
90
|
+
tabIndex: disabled ? -1 : 0,
|
|
91
|
+
...props,
|
|
92
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pagination.StyledPaginationItemContent, {
|
|
93
|
+
className: `${preClass}-content`,
|
|
94
|
+
children: children
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
PaginationItem.toString = () => '.nextui-pagination-item';
|
|
100
|
+
|
|
101
|
+
var _default = (0, _withDefaults.default)(PaginationItem, defaultProps);
|
|
102
|
+
|
|
103
|
+
exports.default = _default;
|
|
104
|
+
module.exports = exports.default;
|