@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,98 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Props } from './input-props';
|
|
3
|
+
import { CSS } from '../theme/stitches.config';
|
|
4
|
+
interface PasswordProps extends Props {
|
|
5
|
+
hideToggle?: boolean;
|
|
6
|
+
visibleIcon?: React.ReactNode;
|
|
7
|
+
hiddenIcon?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const passwordDefaultProps: {
|
|
10
|
+
hideToggle: boolean;
|
|
11
|
+
visibleIcon: JSX.Element;
|
|
12
|
+
hiddenIcon: JSX.Element;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
bordered: boolean;
|
|
15
|
+
readOnly: boolean;
|
|
16
|
+
clearable: boolean;
|
|
17
|
+
rounded: boolean;
|
|
18
|
+
animated: boolean;
|
|
19
|
+
underlined: boolean;
|
|
20
|
+
shadow: boolean;
|
|
21
|
+
fullWidth: boolean;
|
|
22
|
+
contentClickable: boolean;
|
|
23
|
+
contentRightStyling: boolean;
|
|
24
|
+
contentLeftStyling: boolean;
|
|
25
|
+
required: boolean;
|
|
26
|
+
width: string;
|
|
27
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
28
|
+
color: "default" | "primary" | "secondary" | "success" | "warning" | "error";
|
|
29
|
+
helperColor: "default" | "primary" | "secondary" | "success" | "warning" | "error";
|
|
30
|
+
status: "default" | "primary" | "secondary" | "success" | "warning" | "error";
|
|
31
|
+
borderWeight: "light" | "normal" | "bold" | "extrabold" | "black";
|
|
32
|
+
autoComplete: string;
|
|
33
|
+
className: string;
|
|
34
|
+
placeholder: string;
|
|
35
|
+
initialValue: string;
|
|
36
|
+
};
|
|
37
|
+
declare type NativeAttrs = Omit<React.InputHTMLAttributes<any>, keyof PasswordProps>;
|
|
38
|
+
export declare type InputPasswordProps = PasswordProps & typeof passwordDefaultProps & NativeAttrs & {
|
|
39
|
+
css?: CSS;
|
|
40
|
+
};
|
|
41
|
+
declare const _default: React.ComponentType<Partial<{
|
|
42
|
+
hideToggle: boolean;
|
|
43
|
+
visibleIcon: JSX.Element;
|
|
44
|
+
hiddenIcon: JSX.Element;
|
|
45
|
+
disabled: boolean;
|
|
46
|
+
bordered: boolean;
|
|
47
|
+
readOnly: boolean;
|
|
48
|
+
clearable: boolean;
|
|
49
|
+
rounded: boolean;
|
|
50
|
+
animated: boolean;
|
|
51
|
+
underlined: boolean;
|
|
52
|
+
shadow: boolean;
|
|
53
|
+
fullWidth: boolean;
|
|
54
|
+
contentClickable: boolean;
|
|
55
|
+
contentRightStyling: boolean;
|
|
56
|
+
contentLeftStyling: boolean;
|
|
57
|
+
required: boolean;
|
|
58
|
+
width: string;
|
|
59
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
60
|
+
color: "default" | "primary" | "secondary" | "success" | "warning" | "error";
|
|
61
|
+
helperColor: "default" | "primary" | "secondary" | "success" | "warning" | "error";
|
|
62
|
+
status: "default" | "primary" | "secondary" | "success" | "warning" | "error";
|
|
63
|
+
borderWeight: "light" | "normal" | "bold" | "extrabold" | "black";
|
|
64
|
+
autoComplete: string;
|
|
65
|
+
className: string;
|
|
66
|
+
placeholder: string;
|
|
67
|
+
initialValue: string;
|
|
68
|
+
}> & Omit<PasswordProps & {
|
|
69
|
+
hideToggle: boolean;
|
|
70
|
+
visibleIcon: JSX.Element;
|
|
71
|
+
hiddenIcon: JSX.Element;
|
|
72
|
+
disabled: boolean;
|
|
73
|
+
bordered: boolean;
|
|
74
|
+
readOnly: boolean;
|
|
75
|
+
clearable: boolean;
|
|
76
|
+
rounded: boolean;
|
|
77
|
+
animated: boolean;
|
|
78
|
+
underlined: boolean;
|
|
79
|
+
shadow: boolean;
|
|
80
|
+
fullWidth: boolean;
|
|
81
|
+
contentClickable: boolean;
|
|
82
|
+
contentRightStyling: boolean;
|
|
83
|
+
contentLeftStyling: boolean;
|
|
84
|
+
required: boolean;
|
|
85
|
+
width: string;
|
|
86
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
87
|
+
color: "default" | "primary" | "secondary" | "success" | "warning" | "error";
|
|
88
|
+
helperColor: "default" | "primary" | "secondary" | "success" | "warning" | "error";
|
|
89
|
+
status: "default" | "primary" | "secondary" | "success" | "warning" | "error";
|
|
90
|
+
borderWeight: "light" | "normal" | "bold" | "extrabold" | "black";
|
|
91
|
+
autoComplete: string;
|
|
92
|
+
className: string;
|
|
93
|
+
placeholder: string;
|
|
94
|
+
initialValue: string;
|
|
95
|
+
} & NativeAttrs & {
|
|
96
|
+
css?: CSS | undefined;
|
|
97
|
+
} & React.RefAttributes<HTMLInputElement>, "clearable" | "rounded" | "contentClickable" | "contentLeftStyling" | "contentRightStyling" | "width" | "color" | "size" | "className" | "borderWeight" | "bordered" | "placeholder" | "status" | "animated" | "disabled" | "autoComplete" | "readOnly" | "required" | "shadow" | "initialValue" | "fullWidth" | "helperColor" | "underlined" | "hideToggle" | "visibleIcon" | "hiddenIcon">>;
|
|
98
|
+
export default _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
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 _withDefaults = _interopRequireDefault(require("../utils/with-defaults"));
|
|
11
|
+
|
|
12
|
+
var _inputProps = require("./input-props");
|
|
13
|
+
|
|
14
|
+
var _passwordIcon = _interopRequireDefault(require("./password-icon"));
|
|
15
|
+
|
|
16
|
+
var _input = _interopRequireDefault(require("./input"));
|
|
17
|
+
|
|
18
|
+
var _clsx = _interopRequireDefault(require("../utils/clsx"));
|
|
19
|
+
|
|
20
|
+
var _assertion = require("../utils/assertion");
|
|
21
|
+
|
|
22
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
+
|
|
24
|
+
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); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
const passwordDefaultProps = { ..._inputProps.defaultProps,
|
|
29
|
+
hideToggle: false,
|
|
30
|
+
visibleIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_passwordIcon.default, {
|
|
31
|
+
visible: true
|
|
32
|
+
}),
|
|
33
|
+
hiddenIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_passwordIcon.default, {
|
|
34
|
+
visible: false
|
|
35
|
+
})
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const InputPassword = /*#__PURE__*/_react.default.forwardRef(({
|
|
39
|
+
hideToggle,
|
|
40
|
+
visibleIcon,
|
|
41
|
+
hiddenIcon,
|
|
42
|
+
children,
|
|
43
|
+
...props
|
|
44
|
+
}, ref) => {
|
|
45
|
+
const inputRef = (0, _react.useRef)(null);
|
|
46
|
+
const [visible, setVisible] = (0, _react.useState)(false);
|
|
47
|
+
(0, _react.useImperativeHandle)(ref, () => inputRef.current);
|
|
48
|
+
|
|
49
|
+
const iconClickHandler = () => {
|
|
50
|
+
setVisible(v => !v);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const inputProps = (0, _react.useMemo)(() => ({ ...props,
|
|
54
|
+
ref: inputRef,
|
|
55
|
+
className: (0, _clsx.default)('nextui-input-password', props.className),
|
|
56
|
+
contentClickable: true,
|
|
57
|
+
onContentClick: iconClickHandler,
|
|
58
|
+
type: visible ? 'text' : 'password'
|
|
59
|
+
}), [props, iconClickHandler, visible, inputRef]);
|
|
60
|
+
const icon = (0, _react.useMemo)(() => {
|
|
61
|
+
if (hideToggle) return null;
|
|
62
|
+
return visible ? visibleIcon : hiddenIcon;
|
|
63
|
+
}, [hideToggle, visible, visibleIcon, hiddenIcon]);
|
|
64
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.default, {
|
|
65
|
+
contentRight: icon,
|
|
66
|
+
...inputProps,
|
|
67
|
+
children: children
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
if (_assertion.__DEV__) {
|
|
72
|
+
InputPassword.displayName = 'NextUI - Input Password';
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
InputPassword.toString = () => '.nextui-input-password';
|
|
76
|
+
|
|
77
|
+
var _default = (0, _withDefaults.default)(InputPassword, passwordDefaultProps);
|
|
78
|
+
|
|
79
|
+
exports.default = _default;
|
|
80
|
+
module.exports = exports.default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NormalSizes, SimpleColors, ContentPosition, NormalWeights, AsProp } from '../utils/prop-types';
|
|
3
|
+
export declare type FormElement = HTMLInputElement | HTMLTextAreaElement;
|
|
4
|
+
export interface Props extends AsProp<'input' | 'textarea'>, React.HTMLAttributes<FormElement> {
|
|
5
|
+
value?: string;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
initialValue?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
size?: NormalSizes;
|
|
10
|
+
color?: SimpleColors;
|
|
11
|
+
helperColor?: SimpleColors;
|
|
12
|
+
status?: SimpleColors;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
shadow?: boolean;
|
|
15
|
+
animated?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
label?: string;
|
|
19
|
+
helperText?: string;
|
|
20
|
+
labelPlaceholder?: string;
|
|
21
|
+
labelLeft?: string;
|
|
22
|
+
labelRight?: string;
|
|
23
|
+
contentLeft?: React.ReactNode;
|
|
24
|
+
contentRight?: React.ReactNode;
|
|
25
|
+
contentClickable?: boolean;
|
|
26
|
+
contentRightStyling?: boolean;
|
|
27
|
+
contentLeftStyling?: boolean;
|
|
28
|
+
rounded?: boolean;
|
|
29
|
+
bordered?: boolean;
|
|
30
|
+
underlined?: boolean;
|
|
31
|
+
borderWeight?: NormalWeights;
|
|
32
|
+
width?: string;
|
|
33
|
+
className?: string;
|
|
34
|
+
clearable?: boolean;
|
|
35
|
+
onChange?: (e: React.ChangeEvent<FormElement>) => void;
|
|
36
|
+
onClearClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
37
|
+
onFocus?: (e: React.FocusEvent<FormElement>) => void;
|
|
38
|
+
onBlur?: (e: React.FocusEvent<FormElement>) => void;
|
|
39
|
+
onContentClick?: (key: ContentPosition, e: React.MouseEvent<HTMLDivElement>) => void;
|
|
40
|
+
autoComplete?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare const defaultProps: {
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
bordered: boolean;
|
|
45
|
+
readOnly: boolean;
|
|
46
|
+
clearable: boolean;
|
|
47
|
+
rounded: boolean;
|
|
48
|
+
animated: boolean;
|
|
49
|
+
underlined: boolean;
|
|
50
|
+
shadow: boolean;
|
|
51
|
+
fullWidth: boolean;
|
|
52
|
+
contentClickable: boolean;
|
|
53
|
+
contentRightStyling: boolean;
|
|
54
|
+
contentLeftStyling: boolean;
|
|
55
|
+
required: boolean;
|
|
56
|
+
width: string;
|
|
57
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
58
|
+
color: "default" | "primary" | "secondary" | "success" | "warning" | "error";
|
|
59
|
+
helperColor: "default" | "primary" | "secondary" | "success" | "warning" | "error";
|
|
60
|
+
status: "default" | "primary" | "secondary" | "success" | "warning" | "error";
|
|
61
|
+
borderWeight: "light" | "normal" | "bold" | "extrabold" | "black";
|
|
62
|
+
autoComplete: string;
|
|
63
|
+
className: string;
|
|
64
|
+
placeholder: string;
|
|
65
|
+
initialValue: string;
|
|
66
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.defaultProps = void 0;
|
|
5
|
+
const defaultProps = {
|
|
6
|
+
disabled: false,
|
|
7
|
+
bordered: false,
|
|
8
|
+
readOnly: false,
|
|
9
|
+
clearable: false,
|
|
10
|
+
rounded: false,
|
|
11
|
+
animated: true,
|
|
12
|
+
underlined: false,
|
|
13
|
+
shadow: true,
|
|
14
|
+
fullWidth: false,
|
|
15
|
+
contentClickable: false,
|
|
16
|
+
contentRightStyling: true,
|
|
17
|
+
contentLeftStyling: true,
|
|
18
|
+
required: false,
|
|
19
|
+
width: 'initial',
|
|
20
|
+
size: 'md',
|
|
21
|
+
color: 'default',
|
|
22
|
+
helperColor: 'default',
|
|
23
|
+
status: 'default',
|
|
24
|
+
borderWeight: 'normal',
|
|
25
|
+
autoComplete: 'off',
|
|
26
|
+
className: '',
|
|
27
|
+
placeholder: '',
|
|
28
|
+
initialValue: ''
|
|
29
|
+
};
|
|
30
|
+
exports.defaultProps = defaultProps;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { PropsWithoutRef, RefAttributes } from 'react';
|
|
2
|
+
import { CSS } from '../theme/stitches.config';
|
|
3
|
+
import Textarea from '../textarea';
|
|
4
|
+
import InputPassword from './input-password';
|
|
5
|
+
import { Props, FormElement, defaultProps } from './input-props';
|
|
6
|
+
declare type NativeAttrs = Omit<React.InputHTMLAttributes<any>, keyof Props>;
|
|
7
|
+
export declare type InputProps = Props & typeof defaultProps & NativeAttrs & {
|
|
8
|
+
css?: CSS;
|
|
9
|
+
};
|
|
10
|
+
declare type InputComponent<T, P = {}> = React.ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> & {
|
|
11
|
+
Textarea: typeof Textarea;
|
|
12
|
+
Password: typeof InputPassword;
|
|
13
|
+
};
|
|
14
|
+
declare type ComponentProps = Partial<typeof defaultProps> & Omit<Props, keyof typeof defaultProps> & NativeAttrs & {
|
|
15
|
+
css?: CSS;
|
|
16
|
+
};
|
|
17
|
+
declare const _default: InputComponent<FormElement, ComponentProps>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,317 @@
|
|
|
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 _collections = require("../utils/collections");
|
|
11
|
+
|
|
12
|
+
var _inputProps = require("./input-props");
|
|
13
|
+
|
|
14
|
+
var _assertion = require("../utils/assertion");
|
|
15
|
+
|
|
16
|
+
var _useTheme = _interopRequireDefault(require("../use-theme"));
|
|
17
|
+
|
|
18
|
+
var _useWarning = _interopRequireDefault(require("../use-warning"));
|
|
19
|
+
|
|
20
|
+
var _input = require("./input.styles");
|
|
21
|
+
|
|
22
|
+
var _clearIcon = _interopRequireDefault(require("../utils/clear-icon"));
|
|
23
|
+
|
|
24
|
+
var _clsx = _interopRequireDefault(require("../utils/clsx"));
|
|
25
|
+
|
|
26
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
const simulateChangeEvent = (el, event) => {
|
|
33
|
+
return { ...event,
|
|
34
|
+
target: el,
|
|
35
|
+
currentTarget: el
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const preClass = 'nextui-input';
|
|
40
|
+
|
|
41
|
+
const Input = /*#__PURE__*/_react.default.forwardRef(({
|
|
42
|
+
as: Component = 'input',
|
|
43
|
+
label,
|
|
44
|
+
labelPlaceholder,
|
|
45
|
+
labelLeft,
|
|
46
|
+
labelRight,
|
|
47
|
+
size,
|
|
48
|
+
helperText,
|
|
49
|
+
color,
|
|
50
|
+
helperColor,
|
|
51
|
+
status,
|
|
52
|
+
contentLeft,
|
|
53
|
+
contentRight,
|
|
54
|
+
contentClickable,
|
|
55
|
+
contentLeftStyling,
|
|
56
|
+
contentRightStyling,
|
|
57
|
+
onContentClick,
|
|
58
|
+
initialValue,
|
|
59
|
+
onChange,
|
|
60
|
+
readOnly,
|
|
61
|
+
value,
|
|
62
|
+
onClearClick,
|
|
63
|
+
clearable,
|
|
64
|
+
shadow,
|
|
65
|
+
animated,
|
|
66
|
+
required,
|
|
67
|
+
width: widthProp,
|
|
68
|
+
className,
|
|
69
|
+
onBlur,
|
|
70
|
+
onFocus,
|
|
71
|
+
autoComplete,
|
|
72
|
+
placeholder,
|
|
73
|
+
fullWidth,
|
|
74
|
+
borderWeight,
|
|
75
|
+
disabled,
|
|
76
|
+
bordered,
|
|
77
|
+
underlined,
|
|
78
|
+
rounded,
|
|
79
|
+
css,
|
|
80
|
+
...props
|
|
81
|
+
}, ref) => {
|
|
82
|
+
const inputRef = (0, _react.useRef)(null);
|
|
83
|
+
(0, _react.useImperativeHandle)(ref, () => inputRef.current);
|
|
84
|
+
const [selfValue, setSelfValue] = (0, _react.useState)(initialValue);
|
|
85
|
+
const [hover, setHover] = (0, _react.useState)(false);
|
|
86
|
+
const {
|
|
87
|
+
isDark
|
|
88
|
+
} = (0, _useTheme.default)();
|
|
89
|
+
const isControlledComponent = (0, _react.useMemo)(() => value !== undefined, [value]);
|
|
90
|
+
const inputLabel = (0, _react.useMemo)(() => label || labelPlaceholder, [label, labelPlaceholder]);
|
|
91
|
+
const inputPlaceholder = (0, _react.useMemo)(() => labelPlaceholder ? '' : placeholder, [placeholder, labelPlaceholder]);
|
|
92
|
+
const width = (0, _react.useMemo)(() => {
|
|
93
|
+
if (fullWidth) return '100%';
|
|
94
|
+
if (widthProp) return widthProp;
|
|
95
|
+
return 'initial';
|
|
96
|
+
}, [fullWidth, widthProp]);
|
|
97
|
+
|
|
98
|
+
if (underlined && _assertion.__DEV__) {
|
|
99
|
+
bordered && (0, _useWarning.default)('Using underlined and bordered at the same time will have no effect.');
|
|
100
|
+
rounded && (0, _useWarning.default)('Using underlined and rounded at the same time will have no effect.');
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const changeHandler = event => {
|
|
104
|
+
if (disabled || readOnly) return;
|
|
105
|
+
setSelfValue(event.target.value);
|
|
106
|
+
onChange && onChange(event);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const clearHandler = event => {
|
|
110
|
+
event.preventDefault();
|
|
111
|
+
event.stopPropagation();
|
|
112
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
113
|
+
setSelfValue('');
|
|
114
|
+
onClearClick && onClearClick(event);
|
|
115
|
+
/* istanbul ignore next */
|
|
116
|
+
|
|
117
|
+
if (!inputRef.current) return;
|
|
118
|
+
const changeEvent = simulateChangeEvent(inputRef.current, event);
|
|
119
|
+
changeEvent.target.value = '';
|
|
120
|
+
onChange && onChange(changeEvent);
|
|
121
|
+
inputRef.current.focus();
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const focusHandler = e => {
|
|
125
|
+
setHover(true);
|
|
126
|
+
onFocus && onFocus(e);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const blurHandler = e => {
|
|
130
|
+
setHover(false);
|
|
131
|
+
onBlur && onBlur(e);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const contentClickHandler = (key, e) => {
|
|
135
|
+
if (disabled) return;
|
|
136
|
+
onContentClick && onContentClick(key, e);
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
(0, _react.useEffect)(() => {
|
|
140
|
+
if (isControlledComponent) {
|
|
141
|
+
setSelfValue(value);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
const isTextarea = (0, _react.useMemo)(() => Component === 'textarea', [Component]);
|
|
145
|
+
const controlledValue = isControlledComponent ? {
|
|
146
|
+
value: selfValue
|
|
147
|
+
} : {
|
|
148
|
+
defaultValue: initialValue
|
|
149
|
+
};
|
|
150
|
+
const inputProps = { ...props,
|
|
151
|
+
...controlledValue
|
|
152
|
+
};
|
|
153
|
+
const {
|
|
154
|
+
inputId,
|
|
155
|
+
labelId
|
|
156
|
+
} = (0, _react.useMemo)(() => {
|
|
157
|
+
const nextuiId = (0, _collections.getId)();
|
|
158
|
+
return {
|
|
159
|
+
inputId: inputProps.id || `${preClass}-${nextuiId}`,
|
|
160
|
+
labelId: !(0, _assertion.isEmpty)(inputProps.id) ? `${preClass}-label-${inputProps.id}` : `${preClass}-label-${nextuiId}`
|
|
161
|
+
};
|
|
162
|
+
}, [inputProps.id]);
|
|
163
|
+
|
|
164
|
+
if (inputLabel) {
|
|
165
|
+
inputProps['aria-labelledby'] = labelId;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const getState = (0, _react.useMemo)(() => {
|
|
169
|
+
return hover ? 'hover' : disabled ? 'disabled' : readOnly ? 'read-only' : selfValue ? 'with-value' : 'normal';
|
|
170
|
+
}, [hover, disabled, readOnly, selfValue]);
|
|
171
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_input.StyledInputMainContainer, {
|
|
172
|
+
color: color,
|
|
173
|
+
"data-state": getState,
|
|
174
|
+
helperColor: helperColor,
|
|
175
|
+
borderWeight: borderWeight,
|
|
176
|
+
status: status,
|
|
177
|
+
size: size,
|
|
178
|
+
rounded: rounded,
|
|
179
|
+
disabled: disabled,
|
|
180
|
+
css: {
|
|
181
|
+
width,
|
|
182
|
+
...css
|
|
183
|
+
},
|
|
184
|
+
className: (0, _clsx.default)(`${preClass}-main-container`, `${preClass}-main-container--${getState}`),
|
|
185
|
+
children: [inputLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.StyledInputBlockLabel, {
|
|
186
|
+
id: labelId,
|
|
187
|
+
className: `${preClass}-block-label`,
|
|
188
|
+
htmlFor: inputId,
|
|
189
|
+
isTextarea: isTextarea,
|
|
190
|
+
underlined: underlined,
|
|
191
|
+
animated: animated,
|
|
192
|
+
bordered: bordered,
|
|
193
|
+
rounded: rounded,
|
|
194
|
+
hasContentLeft: !!contentLeft,
|
|
195
|
+
withValue: !!selfValue,
|
|
196
|
+
asPlaceholder: !!labelPlaceholder,
|
|
197
|
+
focused: hover,
|
|
198
|
+
children: inputLabel
|
|
199
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.StyledInputContainer, {
|
|
200
|
+
animated: animated,
|
|
201
|
+
isTextarea: isTextarea,
|
|
202
|
+
underlined: underlined,
|
|
203
|
+
isReadOnly: readOnly,
|
|
204
|
+
focused: hover,
|
|
205
|
+
className: (0, _clsx.default)(`${preClass}-container`, `${preClass}-container--${getState}`, {
|
|
206
|
+
[`${preClass}-container--input`]: !isTextarea,
|
|
207
|
+
[`${preClass}-container--textarea`]: isTextarea,
|
|
208
|
+
[`${preClass}-container--read-only`]: readOnly
|
|
209
|
+
}, className),
|
|
210
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_input.StyledInputWrapper, {
|
|
211
|
+
as: inputLabel ? 'div' : 'label',
|
|
212
|
+
animated: animated,
|
|
213
|
+
bordered: bordered,
|
|
214
|
+
shadow: shadow,
|
|
215
|
+
disabled: disabled,
|
|
216
|
+
focused: hover,
|
|
217
|
+
isReadOnly: readOnly,
|
|
218
|
+
underlined: underlined,
|
|
219
|
+
isTextarea: isTextarea,
|
|
220
|
+
className: (0, _clsx.default)(`${preClass}-wrapper`, `${preClass}-wrapper--${getState}`, {
|
|
221
|
+
[`${preClass}-wrapper--bordered`]: bordered,
|
|
222
|
+
[`${preClass}-wrapper--underlined`]: underlined,
|
|
223
|
+
[`${preClass}-wrapper--shadow`]: shadow
|
|
224
|
+
}),
|
|
225
|
+
children: [!inputLabel && placeholder && /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.StyledInputPlaceholder, {
|
|
226
|
+
className: `${preClass}-placeholder`,
|
|
227
|
+
children: placeholder
|
|
228
|
+
}), labelLeft && /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.StyledInputLabel, {
|
|
229
|
+
className: `${preClass}-label--left`,
|
|
230
|
+
isDefaultStatus: status === 'default',
|
|
231
|
+
underlined: underlined,
|
|
232
|
+
bordered: bordered,
|
|
233
|
+
isDark: isDark,
|
|
234
|
+
children: labelLeft
|
|
235
|
+
}), contentLeft && /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.StyledInputContent, {
|
|
236
|
+
className: (0, _clsx.default)(`${preClass}-content`, `${preClass}-content--left`),
|
|
237
|
+
applyStyles: contentLeftStyling,
|
|
238
|
+
clickable: contentClickable,
|
|
239
|
+
onClick: e => contentClickHandler('left', e),
|
|
240
|
+
children: contentLeft
|
|
241
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.StyledInput, {
|
|
242
|
+
type: "text",
|
|
243
|
+
as: Component,
|
|
244
|
+
id: inputId,
|
|
245
|
+
ref: inputRef,
|
|
246
|
+
className: (0, _clsx.default)({
|
|
247
|
+
[`${preClass}`]: !isTextarea,
|
|
248
|
+
[`${preClass}-textarea`]: isTextarea,
|
|
249
|
+
[`${preClass}-disabled`]: disabled,
|
|
250
|
+
[`${preClass}-rounded`]: rounded,
|
|
251
|
+
[`${preClass}-${preClass}-right-content`]: contentRight,
|
|
252
|
+
[`${preClass}-left-content`]: contentLeft
|
|
253
|
+
}),
|
|
254
|
+
isTextarea: isTextarea,
|
|
255
|
+
focused: hover,
|
|
256
|
+
bordered: bordered,
|
|
257
|
+
placeholder: inputPlaceholder,
|
|
258
|
+
disabled: disabled,
|
|
259
|
+
readOnly: readOnly,
|
|
260
|
+
onFocus: focusHandler,
|
|
261
|
+
onBlur: blurHandler,
|
|
262
|
+
onChange: changeHandler,
|
|
263
|
+
autoComplete: autoComplete,
|
|
264
|
+
hasLeftContent: !!contentLeft,
|
|
265
|
+
hasRightContent: !!contentRight,
|
|
266
|
+
"data-state": getState,
|
|
267
|
+
"aria-placeholder": inputPlaceholder,
|
|
268
|
+
"aria-readonly": readOnly,
|
|
269
|
+
"aria-required": required,
|
|
270
|
+
"aria-multiline": isTextarea,
|
|
271
|
+
...inputProps
|
|
272
|
+
}), clearable && /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.StyledInputClearButton, {
|
|
273
|
+
className: `${preClass}-clear-button`,
|
|
274
|
+
animated: animated,
|
|
275
|
+
underlined: underlined,
|
|
276
|
+
visible: Boolean(selfValue),
|
|
277
|
+
hasContentRight: !!contentRight,
|
|
278
|
+
disabled: disabled || readOnly,
|
|
279
|
+
onClick: clearHandler,
|
|
280
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_clearIcon.default, {
|
|
281
|
+
fill: "currentColor"
|
|
282
|
+
})
|
|
283
|
+
}), contentRight && /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.StyledInputContent, {
|
|
284
|
+
className: (0, _clsx.default)(`${preClass}-content`, `${preClass}-content--right`),
|
|
285
|
+
applyStyles: contentRightStyling,
|
|
286
|
+
clickable: contentClickable,
|
|
287
|
+
onClick: e => contentClickHandler('right', e),
|
|
288
|
+
children: contentRight
|
|
289
|
+
}), labelRight && /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.StyledInputLabel, {
|
|
290
|
+
className: `${preClass}-label--right`,
|
|
291
|
+
isDefaultStatus: status === 'default',
|
|
292
|
+
underlined: underlined,
|
|
293
|
+
bordered: bordered,
|
|
294
|
+
isRight: true,
|
|
295
|
+
isDark: isDark,
|
|
296
|
+
children: labelRight
|
|
297
|
+
})]
|
|
298
|
+
})
|
|
299
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.StyledHelperTextContainer, {
|
|
300
|
+
className: `${preClass}-helper-text-container`,
|
|
301
|
+
withValue: !!helperText,
|
|
302
|
+
children: helperText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.StyledHelperText, {
|
|
303
|
+
className: `${preClass}-helper-text`,
|
|
304
|
+
children: helperText
|
|
305
|
+
})
|
|
306
|
+
})]
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
Input.displayName = 'NextUI - Input';
|
|
311
|
+
Input.defaultProps = _inputProps.defaultProps;
|
|
312
|
+
|
|
313
|
+
Input.toString = () => '.nextui-input';
|
|
314
|
+
|
|
315
|
+
var _default = Input;
|
|
316
|
+
exports.default = _default;
|
|
317
|
+
module.exports = exports.default;
|