@nextui-org/react 1.0.2-alpha.2 → 1.0.2-beta.4
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 +10 -5
- package/cjs/avatar/avatar-group.js +1 -35
- package/cjs/avatar/avatar-group.styles.js +1 -52
- package/cjs/avatar/avatar.js +1 -75
- package/cjs/avatar/avatar.styles.js +1 -334
- package/cjs/avatar/index.js +1 -22
- package/cjs/backdrop/backdrop.js +1 -137
- package/cjs/backdrop/backdrop.styles.js +1 -119
- package/cjs/backdrop/index.js +1 -16
- package/cjs/button/button-group-context.js +1 -21
- package/cjs/button/button-group.js +1 -81
- package/cjs/button/button-group.styles.js +1 -136
- package/cjs/button/button-icon.js +1 -68
- package/cjs/button/button.js +1 -145
- package/cjs/button/button.styles.js +1 -695
- package/cjs/button/index.js +1 -25
- package/cjs/button/utils.js +1 -27
- package/cjs/card/card.js +1 -117
- package/cjs/card/card.styles.js +1 -267
- package/cjs/card/index.js +1 -24
- package/cjs/checkbox/checkbox-context.js +1 -25
- package/cjs/checkbox/checkbox-group.js +1 -89
- package/cjs/checkbox/checkbox.js +1 -192
- package/cjs/checkbox/checkbox.styles.js +1 -563
- package/cjs/checkbox/index.js +1 -26
- package/cjs/code/code.js +1 -42
- package/cjs/code/code.styles.js +1 -14
- package/cjs/code/index.js +1 -15
- package/cjs/col/col.js +1 -46
- package/cjs/col/col.styles.js +1 -16
- package/cjs/col/index.js +1 -14
- package/cjs/collapse/collapse-context.js +1 -20
- package/cjs/collapse/collapse-group.js +1 -90
- package/cjs/collapse/collapse-icon.js +1 -41
- package/cjs/collapse/collapse.js +1 -190
- package/cjs/collapse/collapse.styles.js +1 -254
- package/cjs/collapse/index.js +1 -22
- package/cjs/container/container.js +1 -91
- package/cjs/container/container.styles.js +1 -45
- package/cjs/container/index.js +1 -14
- package/cjs/css-baseline/css-baseline.js +1 -247
- package/cjs/css-baseline/index.js +1 -11
- package/cjs/divider/divider.js +1 -82
- package/cjs/divider/divider.styles.js +1 -77
- package/cjs/divider/index.js +1 -15
- package/cjs/grid/grid-container.js +1 -60
- package/cjs/grid/grid-item.js +1 -123
- package/cjs/grid/grid.js +1 -29
- package/cjs/grid/grid.styles.js +1 -15
- package/cjs/grid/index.js +1 -18
- package/cjs/image/image.js +1 -150
- package/cjs/image/image.skeleton.js +1 -50
- package/cjs/image/image.styles.js +1 -57
- package/cjs/image/index.js +1 -16
- package/cjs/index.js +1 -435
- package/cjs/input/index.js +1 -30
- package/cjs/input/input-password.js +1 -80
- package/cjs/input/input-props.js +1 -30
- package/cjs/input/input.js +1 -317
- package/cjs/input/input.styles.js +1 -878
- package/cjs/input/password-icon.js +1 -51
- package/cjs/link/icon.js +1 -42
- package/cjs/link/index.js +1 -15
- package/cjs/link/link.js +1 -42
- package/cjs/link/link.styles.js +1 -135
- package/cjs/loading/index.js +1 -24
- package/cjs/loading/loading.js +1 -80
- package/cjs/loading/loading.styles.js +1 -438
- package/cjs/loading/spinner.js +1 -47
- package/cjs/modal/index.js +1 -28
- package/cjs/modal/modal-body.js +1 -62
- package/cjs/modal/modal-close-button.js +1 -49
- package/cjs/modal/modal-context.js +1 -18
- package/cjs/modal/modal-footer.js +1 -69
- package/cjs/modal/modal-header.js +1 -69
- package/cjs/modal/modal-wrapper.js +1 -153
- package/cjs/modal/modal.js +1 -159
- package/cjs/modal/modal.styles.js +1 -243
- package/cjs/modal/use-modal.js +1 -25
- package/cjs/pagination/index.js +1 -19
- package/cjs/pagination/pagination-ellipsis.js +1 -86
- package/cjs/pagination/pagination-highlight.js +1 -52
- package/cjs/pagination/pagination-icon.js +1 -59
- package/cjs/pagination/pagination-item.js +1 -104
- package/cjs/pagination/pagination.js +1 -169
- package/cjs/pagination/pagination.styles.js +1 -361
- package/cjs/progress/index.js +1 -15
- package/cjs/progress/progress.js +1 -101
- package/cjs/progress/progress.styles.js +1 -165
- package/cjs/radio/index.js +1 -24
- package/cjs/radio/radio-context.js +1 -24
- package/cjs/radio/radio-group.js +1 -78
- package/cjs/radio/radio.js +1 -156
- package/cjs/radio/radio.styles.js +1 -240
- package/cjs/row/index.js +1 -14
- package/cjs/row/row.js +1 -54
- package/cjs/row/row.styles.js +1 -25
- package/cjs/snippet/index.js +1 -16
- package/cjs/snippet/snippet-icon.js +1 -52
- package/cjs/snippet/snippet.js +1 -137
- package/cjs/snippet/snippet.styles.js +1 -141
- package/cjs/spacer/index.js +1 -14
- package/cjs/spacer/spacer.js +1 -49
- package/cjs/spacer/spacer.styles.js +1 -24
- package/cjs/switch/index.js +1 -17
- package/cjs/switch/switch.js +1 -142
- package/cjs/switch/switch.styles.js +1 -283
- package/cjs/text/child.js +1 -83
- package/cjs/text/index.js +1 -14
- package/cjs/text/text.js +1 -124
- package/cjs/text/text.styles.js +1 -41
- package/cjs/textarea/index.js +1 -12
- package/cjs/textarea/textarea.js +1 -126
- package/cjs/textarea/utils.js +1 -126
- package/cjs/theme/common.js +1 -490
- package/cjs/theme/dark-theme.js +1 -38
- package/cjs/theme/index.js +1 -31
- package/cjs/theme/light-theme.js +1 -33
- package/cjs/theme/stitches.config.js +1 -88
- package/cjs/theme/theme-context.js +1 -22
- package/cjs/theme/theme-provider.js +1 -115
- package/cjs/theme/types.js +1 -3
- package/cjs/theme/utils.js +1 -113
- package/cjs/tooltip/index.js +1 -17
- package/cjs/tooltip/placement.js +1 -193
- package/cjs/tooltip/tooltip-content.js +1 -135
- package/cjs/tooltip/tooltip.js +1 -141
- package/cjs/tooltip/tooltip.styles.js +1 -159
- package/cjs/use-body-scroll/index.js +1 -12
- package/cjs/use-body-scroll/use-body-scroll.js +1 -77
- package/cjs/use-click-anywhere/index.js +1 -12
- package/cjs/use-click-anywhere/use-click-anywhere.js +1 -19
- package/cjs/use-click-away/index.js +1 -12
- package/cjs/use-click-away/use-click-away.js +1 -23
- package/cjs/use-clipboard/index.js +1 -12
- package/cjs/use-clipboard/use-clipboard.js +1 -57
- package/cjs/use-current-state/index.js +1 -12
- package/cjs/use-current-state/use-current-state.js +1 -28
- package/cjs/use-drip/index.js +1 -12
- package/cjs/use-drip/use-drip.js +1 -38
- package/cjs/use-input/index.js +1 -12
- package/cjs/use-input/use-input.js +1 -32
- package/cjs/use-keyboard/codes.js +1 -104
- package/cjs/use-keyboard/helper.js +1 -35
- package/cjs/use-keyboard/index.js +1 -15
- package/cjs/use-keyboard/use-keyboard.js +1 -76
- package/cjs/use-pagination/index.js +1 -88
- package/cjs/use-portal/index.js +1 -12
- package/cjs/use-portal/use-portal.js +1 -43
- package/cjs/use-real-shape/index.js +1 -12
- package/cjs/use-real-shape/use-real-shape.js +1 -55
- package/cjs/use-resize/index.js +1 -12
- package/cjs/use-resize/use-resize.js +1 -23
- package/cjs/use-ssr/index.js +1 -12
- package/cjs/use-ssr/use-ssr.js +1 -25
- package/cjs/use-theme/index.js +1 -12
- package/cjs/use-theme/use-theme.js +1 -16
- package/cjs/use-warning/index.js +1 -12
- package/cjs/use-warning/use-warning.js +1 -23
- package/cjs/user/index.js +1 -21
- package/cjs/user/user-link.js +1 -46
- package/cjs/user/user.js +1 -63
- package/cjs/user/user.styles.js +1 -56
- package/cjs/utils/assertion.js +1 -42
- package/cjs/utils/clear-icon.js +1 -70
- package/cjs/utils/clsx.js +1 -57
- package/cjs/utils/collections.js +1 -110
- package/cjs/utils/color.js +1 -187
- package/cjs/utils/css-transition.js +1 -76
- package/cjs/utils/deep-merge.js +1 -33
- package/cjs/utils/dimensions.js +1 -10
- package/cjs/utils/dom.js +1 -110
- package/cjs/utils/drip.js +1 -116
- package/cjs/utils/expand.js +1 -109
- package/cjs/utils/icons.js +1 -481
- package/cjs/utils/numbers.js +1 -23
- package/cjs/utils/object.js +1 -40
- package/cjs/utils/prop-types.js +1 -56
- package/cjs/utils/react.js +1 -24
- package/cjs/utils/strings.js +1 -18
- package/cjs/utils/types.d.js +1 -3
- package/cjs/utils/with-defaults.js +1 -13
- package/esm/avatar/avatar-group.js +1 -35
- package/esm/avatar/avatar-group.styles.js +1 -52
- package/esm/avatar/avatar.js +1 -75
- package/esm/avatar/avatar.styles.js +1 -334
- package/esm/avatar/index.js +1 -22
- package/esm/backdrop/backdrop.js +1 -137
- package/esm/backdrop/backdrop.styles.js +1 -119
- package/esm/backdrop/index.js +1 -16
- package/esm/button/button-group-context.js +1 -21
- package/esm/button/button-group.js +1 -81
- package/esm/button/button-group.styles.js +1 -136
- package/esm/button/button-icon.js +1 -68
- package/esm/button/button.js +1 -145
- package/esm/button/button.styles.js +1 -695
- package/esm/button/index.js +1 -25
- package/esm/button/utils.js +1 -27
- package/esm/card/card.js +1 -117
- package/esm/card/card.styles.js +1 -267
- package/esm/card/index.js +1 -24
- package/esm/checkbox/checkbox-context.js +1 -25
- package/esm/checkbox/checkbox-group.js +1 -89
- package/esm/checkbox/checkbox.js +1 -192
- package/esm/checkbox/checkbox.styles.js +1 -563
- package/esm/checkbox/index.js +1 -26
- package/esm/code/code.js +1 -42
- package/esm/code/code.styles.js +1 -14
- package/esm/code/index.js +1 -15
- package/esm/col/col.js +1 -46
- package/esm/col/col.styles.js +1 -16
- package/esm/col/index.js +1 -14
- package/esm/collapse/collapse-context.js +1 -20
- package/esm/collapse/collapse-group.js +1 -90
- package/esm/collapse/collapse-icon.js +1 -41
- package/esm/collapse/collapse.js +1 -190
- package/esm/collapse/collapse.styles.js +1 -254
- package/esm/collapse/index.js +1 -22
- package/esm/container/container.js +1 -91
- package/esm/container/container.styles.js +1 -45
- package/esm/container/index.js +1 -14
- package/esm/css-baseline/css-baseline.js +1 -247
- package/esm/css-baseline/index.js +1 -11
- package/esm/divider/divider.js +1 -82
- package/esm/divider/divider.styles.js +1 -77
- package/esm/divider/index.js +1 -15
- package/esm/grid/grid-container.js +1 -60
- package/esm/grid/grid-item.js +1 -123
- package/esm/grid/grid.js +1 -29
- package/esm/grid/grid.styles.js +1 -15
- package/esm/grid/index.js +1 -18
- package/esm/image/image.js +1 -150
- package/esm/image/image.skeleton.js +1 -50
- package/esm/image/image.styles.js +1 -57
- package/esm/image/index.js +1 -16
- package/esm/index.js +1 -435
- package/esm/input/index.js +1 -30
- package/esm/input/input-password.js +1 -80
- package/esm/input/input-props.js +1 -30
- package/esm/input/input.js +1 -317
- package/esm/input/input.styles.js +1 -878
- package/esm/input/password-icon.js +1 -51
- package/esm/link/icon.js +1 -42
- package/esm/link/index.js +1 -15
- package/esm/link/link.js +1 -42
- package/esm/link/link.styles.js +1 -135
- package/esm/loading/index.js +1 -24
- package/esm/loading/loading.js +1 -80
- package/esm/loading/loading.styles.js +1 -438
- package/esm/loading/spinner.js +1 -47
- package/esm/modal/index.js +1 -28
- package/esm/modal/modal-body.js +1 -62
- package/esm/modal/modal-close-button.js +1 -49
- package/esm/modal/modal-context.js +1 -18
- package/esm/modal/modal-footer.js +1 -69
- package/esm/modal/modal-header.js +1 -69
- package/esm/modal/modal-wrapper.js +1 -153
- package/esm/modal/modal.js +1 -159
- package/esm/modal/modal.styles.js +1 -243
- package/esm/modal/use-modal.js +1 -25
- package/esm/pagination/index.js +1 -19
- package/esm/pagination/pagination-ellipsis.js +1 -86
- package/esm/pagination/pagination-highlight.js +1 -52
- package/esm/pagination/pagination-icon.js +1 -59
- package/esm/pagination/pagination-item.js +1 -104
- package/esm/pagination/pagination.js +1 -169
- package/esm/pagination/pagination.styles.js +1 -361
- package/esm/progress/index.js +1 -15
- package/esm/progress/progress.js +1 -101
- package/esm/progress/progress.styles.js +1 -165
- package/esm/radio/index.js +1 -24
- package/esm/radio/radio-context.js +1 -24
- package/esm/radio/radio-group.js +1 -78
- package/esm/radio/radio.js +1 -156
- package/esm/radio/radio.styles.js +1 -240
- package/esm/row/index.js +1 -14
- package/esm/row/row.js +1 -54
- package/esm/row/row.styles.js +1 -25
- package/esm/snippet/index.js +1 -16
- package/esm/snippet/snippet-icon.js +1 -52
- package/esm/snippet/snippet.js +1 -137
- package/esm/snippet/snippet.styles.js +1 -141
- package/esm/spacer/index.js +1 -14
- package/esm/spacer/spacer.js +1 -49
- package/esm/spacer/spacer.styles.js +1 -24
- package/esm/switch/index.js +1 -17
- package/esm/switch/switch.js +1 -142
- package/esm/switch/switch.styles.js +1 -283
- package/esm/text/child.js +1 -83
- package/esm/text/index.js +1 -14
- package/esm/text/text.js +1 -124
- package/esm/text/text.styles.js +1 -41
- package/esm/textarea/index.js +1 -12
- package/esm/textarea/textarea.js +1 -126
- package/esm/textarea/utils.js +1 -126
- package/esm/theme/common.js +1 -490
- package/esm/theme/dark-theme.js +1 -38
- package/esm/theme/index.js +1 -31
- package/esm/theme/light-theme.js +1 -33
- package/esm/theme/stitches.config.js +1 -88
- package/esm/theme/theme-context.js +1 -22
- package/esm/theme/theme-provider.js +1 -115
- package/esm/theme/types.js +1 -3
- package/esm/theme/utils.js +1 -113
- package/esm/tooltip/index.js +1 -17
- package/esm/tooltip/placement.js +1 -193
- package/esm/tooltip/tooltip-content.js +1 -135
- package/esm/tooltip/tooltip.js +1 -141
- package/esm/tooltip/tooltip.styles.js +1 -159
- package/esm/use-body-scroll/index.js +1 -12
- package/esm/use-body-scroll/use-body-scroll.js +1 -77
- package/esm/use-click-anywhere/index.js +1 -12
- package/esm/use-click-anywhere/use-click-anywhere.js +1 -19
- package/esm/use-click-away/index.js +1 -12
- package/esm/use-click-away/use-click-away.js +1 -23
- package/esm/use-clipboard/index.js +1 -12
- package/esm/use-clipboard/use-clipboard.js +1 -57
- package/esm/use-current-state/index.js +1 -12
- package/esm/use-current-state/use-current-state.js +1 -28
- package/esm/use-drip/index.js +1 -12
- package/esm/use-drip/use-drip.js +1 -38
- package/esm/use-input/index.js +1 -12
- package/esm/use-input/use-input.js +1 -32
- package/esm/use-keyboard/codes.js +1 -104
- package/esm/use-keyboard/helper.js +1 -35
- package/esm/use-keyboard/index.js +1 -15
- package/esm/use-keyboard/use-keyboard.js +1 -76
- package/esm/use-pagination/index.js +1 -88
- package/esm/use-portal/index.js +1 -12
- package/esm/use-portal/use-portal.js +1 -43
- package/esm/use-real-shape/index.js +1 -12
- package/esm/use-real-shape/use-real-shape.js +1 -55
- package/esm/use-resize/index.js +1 -12
- package/esm/use-resize/use-resize.js +1 -23
- package/esm/use-ssr/index.js +1 -12
- package/esm/use-ssr/use-ssr.js +1 -25
- package/esm/use-theme/index.js +1 -12
- package/esm/use-theme/use-theme.js +1 -16
- package/esm/use-warning/index.js +1 -12
- package/esm/use-warning/use-warning.js +1 -23
- package/esm/user/index.js +1 -21
- package/esm/user/user-link.js +1 -46
- package/esm/user/user.js +1 -63
- package/esm/user/user.styles.js +1 -56
- package/esm/utils/assertion.js +1 -42
- package/esm/utils/clear-icon.js +1 -70
- package/esm/utils/clsx.js +1 -57
- package/esm/utils/collections.js +1 -110
- package/esm/utils/color.js +1 -187
- package/esm/utils/css-transition.js +1 -76
- package/esm/utils/deep-merge.js +1 -33
- package/esm/utils/dimensions.js +1 -10
- package/esm/utils/dom.js +1 -110
- package/esm/utils/drip.js +1 -116
- package/esm/utils/expand.js +1 -109
- package/esm/utils/icons.js +1 -481
- package/esm/utils/numbers.js +1 -23
- package/esm/utils/object.js +1 -40
- package/esm/utils/prop-types.js +1 -56
- package/esm/utils/react.js +1 -24
- package/esm/utils/strings.js +1 -18
- package/esm/utils/types.d.js +1 -3
- package/esm/utils/with-defaults.js +1 -13
- package/package.json +8 -3
- package/{cjs → types}/avatar/avatar-group.d.ts +0 -0
- package/{cjs → types}/avatar/avatar-group.styles.d.ts +82 -0
- package/{cjs → types}/avatar/avatar.d.ts +0 -0
- package/{esm → types}/avatar/avatar.styles.d.ts +41 -0
- package/{cjs → types}/avatar/index.d.ts +0 -0
- package/{cjs → types}/backdrop/backdrop.d.ts +1 -1
- package/{cjs → types}/backdrop/backdrop.styles.d.ts +123 -0
- package/{cjs → types}/backdrop/index.d.ts +0 -0
- package/{cjs → types}/button/button-group-context.d.ts +0 -0
- package/{cjs → types}/button/button-group.d.ts +0 -0
- package/{cjs → types}/button/button-group.styles.d.ts +41 -0
- package/{esm → types}/button/button-icon.d.ts +42 -0
- package/{cjs → types}/button/button.d.ts +1 -0
- package/{esm/backdrop/backdrop.styles.d.ts → types/button/button.styles.d.ts} +1286 -898
- package/{cjs → types}/button/index.d.ts +0 -0
- package/{cjs → types}/button/utils.d.ts +0 -0
- package/{cjs → types}/card/card.d.ts +0 -0
- package/{cjs → types}/card/card.styles.d.ts +164 -0
- package/{cjs → types}/card/index.d.ts +0 -0
- package/{cjs → types}/checkbox/checkbox-context.d.ts +0 -0
- package/{cjs → types}/checkbox/checkbox-group.d.ts +0 -0
- package/{cjs → types}/checkbox/checkbox.d.ts +0 -0
- package/{cjs → types}/checkbox/checkbox.styles.d.ts +369 -0
- package/{cjs → types}/checkbox/index.d.ts +0 -0
- package/{cjs → types}/code/code.d.ts +0 -0
- package/{esm → types}/code/code.styles.d.ts +82 -0
- package/{cjs → types}/code/index.d.ts +0 -0
- package/{cjs → types}/col/col.d.ts +0 -0
- package/{cjs → types}/col/col.styles.d.ts +41 -0
- package/{cjs → types}/col/index.d.ts +0 -0
- package/{cjs → types}/collapse/collapse-context.d.ts +0 -0
- package/{cjs → types}/collapse/collapse-group.d.ts +0 -0
- package/{cjs → types}/collapse/collapse-icon.d.ts +0 -0
- package/{esm → types}/collapse/collapse.d.ts +5 -3
- package/{esm → types}/collapse/collapse.styles.d.ts +205 -0
- package/{cjs → types}/collapse/index.d.ts +0 -0
- package/{cjs → types}/container/container.d.ts +0 -0
- package/{cjs → types}/container/container.styles.d.ts +41 -0
- package/{cjs → types}/container/index.d.ts +0 -0
- package/{cjs → types}/css-baseline/css-baseline.d.ts +0 -0
- package/{cjs → types}/css-baseline/index.d.ts +0 -0
- package/{cjs → types}/divider/divider.d.ts +0 -0
- package/{esm → types}/divider/divider.styles.d.ts +82 -0
- package/{cjs → types}/divider/index.d.ts +0 -0
- package/{cjs → types}/grid/grid-container.d.ts +0 -0
- package/{cjs → types}/grid/grid-item.d.ts +0 -0
- package/{cjs → types}/grid/grid.d.ts +0 -0
- package/{cjs → types}/grid/grid.styles.d.ts +82 -0
- package/{cjs → types}/grid/index.d.ts +0 -0
- package/{cjs → types}/image/image.d.ts +0 -0
- package/{cjs → types}/image/image.skeleton.d.ts +0 -0
- package/{esm → types}/image/image.styles.d.ts +123 -0
- package/{cjs → types}/image/index.d.ts +0 -0
- package/{cjs → types}/index.d.ts +0 -0
- package/{cjs → types}/input/index.d.ts +0 -0
- package/{cjs → types}/input/input-password.d.ts +0 -0
- package/{cjs → types}/input/input-props.d.ts +0 -0
- package/{cjs → types}/input/input.d.ts +0 -0
- package/{cjs → types}/input/input.styles.d.ts +451 -0
- package/{cjs → types}/input/password-icon.d.ts +0 -0
- package/{cjs → types}/link/icon.d.ts +0 -0
- package/{cjs → types}/link/index.d.ts +0 -0
- package/{cjs → types}/link/link.d.ts +1 -1
- package/{cjs → types}/link/link.styles.d.ts +83 -1
- package/{cjs → types}/loading/index.d.ts +0 -0
- package/{cjs → types}/loading/loading.d.ts +0 -0
- package/{esm → types}/loading/loading.styles.d.ts +246 -0
- package/{cjs → types}/loading/spinner.d.ts +0 -0
- package/{cjs → types}/modal/index.d.ts +0 -0
- package/{cjs → types}/modal/modal-body.d.ts +0 -0
- package/{cjs → types}/modal/modal-close-button.d.ts +0 -0
- package/{cjs → types}/modal/modal-context.d.ts +0 -0
- package/{cjs → types}/modal/modal-footer.d.ts +0 -0
- package/{cjs → types}/modal/modal-header.d.ts +0 -0
- package/{cjs → types}/modal/modal-wrapper.d.ts +0 -0
- package/{cjs → types}/modal/modal.d.ts +0 -0
- package/{cjs → types}/modal/modal.styles.d.ts +246 -0
- package/{cjs → types}/modal/use-modal.d.ts +0 -0
- package/{cjs → types}/pagination/index.d.ts +0 -0
- package/{cjs → types}/pagination/pagination-ellipsis.d.ts +0 -0
- package/{cjs → types}/pagination/pagination-highlight.d.ts +0 -0
- package/{cjs → types}/pagination/pagination-icon.d.ts +0 -0
- package/{cjs → types}/pagination/pagination-item.d.ts +0 -0
- package/{cjs → types}/pagination/pagination.d.ts +0 -0
- package/{esm → types}/pagination/pagination.styles.d.ts +246 -0
- package/{cjs → types}/progress/index.d.ts +0 -0
- package/{esm → types}/progress/progress.d.ts +1 -1
- package/{esm → types}/progress/progress.styles.d.ts +83 -1
- package/{cjs → types}/radio/index.d.ts +0 -0
- package/{cjs → types}/radio/radio-context.d.ts +0 -0
- package/{cjs → types}/radio/radio-group.d.ts +0 -0
- package/{cjs → types}/radio/radio.d.ts +0 -0
- package/{cjs → types}/radio/radio.styles.d.ts +246 -0
- package/{cjs → types}/row/index.d.ts +0 -0
- package/{cjs → types}/row/row.d.ts +0 -0
- package/{cjs → types}/row/row.styles.d.ts +41 -0
- package/{cjs → types}/snippet/index.d.ts +0 -0
- package/{cjs → types}/snippet/snippet-icon.d.ts +0 -0
- package/{cjs → types}/snippet/snippet.d.ts +0 -0
- package/{esm → types}/snippet/snippet.styles.d.ts +164 -0
- package/{cjs → types}/spacer/index.d.ts +0 -0
- package/{cjs → types}/spacer/spacer.d.ts +0 -0
- package/{cjs → types}/spacer/spacer.styles.d.ts +41 -0
- package/{cjs → types}/switch/index.d.ts +1 -1
- package/{cjs → types}/switch/switch.d.ts +0 -0
- package/{cjs → types}/switch/switch.styles.d.ts +164 -0
- package/{esm → types}/text/child.d.ts +2 -0
- package/{cjs → types}/text/index.d.ts +0 -0
- package/{cjs → types}/text/text.d.ts +3 -3
- package/{cjs → types}/text/text.styles.d.ts +41 -0
- package/{cjs → types}/textarea/index.d.ts +0 -0
- package/{cjs → types}/textarea/textarea.d.ts +0 -0
- package/{cjs → types}/textarea/utils.d.ts +0 -0
- package/{cjs → types}/theme/common.d.ts +76 -0
- package/{cjs → types}/theme/dark-theme.d.ts +10 -0
- package/{cjs → types}/theme/light-theme.d.ts +0 -0
- package/{cjs → types}/theme/stitches.config.d.ts +5411 -4087
- package/{cjs → types}/theme/theme-context.d.ts +0 -0
- package/{cjs → types}/theme/theme-provider.d.ts +0 -0
- package/{cjs → types}/theme/types.d.ts +1 -0
- package/{cjs → types}/theme/utils.d.ts +0 -0
- package/{cjs → types}/tooltip/index.d.ts +0 -0
- package/{cjs → types}/tooltip/placement.d.ts +0 -0
- package/{cjs → types}/tooltip/tooltip-content.d.ts +0 -0
- package/{esm → types}/tooltip/tooltip.d.ts +4 -1
- package/{esm → types}/tooltip/tooltip.styles.d.ts +164 -0
- package/{cjs → types}/use-body-scroll/index.d.ts +0 -0
- package/{cjs → types}/use-body-scroll/use-body-scroll.d.ts +0 -0
- package/{cjs → types}/use-click-anywhere/index.d.ts +0 -0
- package/{cjs → types}/use-click-anywhere/use-click-anywhere.d.ts +0 -0
- package/{cjs → types}/use-click-away/index.d.ts +0 -0
- package/{cjs → types}/use-click-away/use-click-away.d.ts +0 -0
- package/{cjs → types}/use-clipboard/index.d.ts +0 -0
- package/{cjs → types}/use-clipboard/use-clipboard.d.ts +0 -0
- package/{cjs → types}/use-current-state/index.d.ts +0 -0
- package/{cjs → types}/use-current-state/use-current-state.d.ts +0 -0
- package/{cjs → types}/use-drip/index.d.ts +0 -0
- package/{cjs → types}/use-drip/use-drip.d.ts +0 -0
- package/{cjs → types}/use-input/index.d.ts +0 -0
- package/{cjs → types}/use-input/use-input.d.ts +0 -0
- package/{cjs → types}/use-keyboard/codes.d.ts +0 -0
- package/{cjs → types}/use-keyboard/helper.d.ts +0 -0
- package/{cjs → types}/use-keyboard/index.d.ts +0 -0
- package/{cjs → types}/use-keyboard/use-keyboard.d.ts +0 -0
- package/{cjs → types}/use-pagination/index.d.ts +0 -0
- package/{cjs → types}/use-portal/index.d.ts +0 -0
- package/{cjs → types}/use-portal/use-portal.d.ts +0 -0
- package/{cjs → types}/use-real-shape/index.d.ts +0 -0
- package/{cjs → types}/use-real-shape/use-real-shape.d.ts +0 -0
- package/{cjs → types}/use-resize/index.d.ts +0 -0
- package/{cjs → types}/use-resize/use-resize.d.ts +0 -0
- package/{cjs → types}/use-ssr/index.d.ts +0 -0
- package/{cjs → types}/use-ssr/use-ssr.d.ts +0 -0
- package/{cjs → types}/use-theme/index.d.ts +0 -0
- package/{cjs → types}/use-theme/use-theme.d.ts +0 -0
- package/{cjs → types}/use-warning/index.d.ts +0 -0
- package/{cjs → types}/use-warning/use-warning.d.ts +0 -0
- package/{cjs → types}/user/index.d.ts +0 -0
- package/{cjs → types}/user/user-link.d.ts +0 -0
- package/{cjs → types}/user/user.d.ts +0 -0
- package/{cjs → types}/user/user.styles.d.ts +205 -0
- package/{cjs → types}/utils/assertion.d.ts +0 -0
- package/{cjs → types}/utils/clear-icon.d.ts +0 -0
- package/{cjs → types}/utils/clsx.d.ts +0 -0
- package/{cjs → types}/utils/collections.d.ts +0 -0
- package/{cjs → types}/utils/color.d.ts +0 -0
- package/{cjs → types}/utils/css-transition.d.ts +0 -0
- package/{cjs → types}/utils/deep-merge.d.ts +0 -0
- package/{cjs → types}/utils/dimensions.d.ts +0 -0
- package/{cjs → types}/utils/drip.d.ts +41 -0
- package/{cjs → types}/utils/expand.d.ts +0 -0
- package/{cjs → types}/utils/numbers.d.ts +0 -0
- package/{cjs → types}/utils/object.d.ts +0 -0
- package/{cjs → types}/utils/prop-types.d.ts +0 -0
- package/{cjs → types}/utils/with-defaults.d.ts +0 -0
- package/umd/nextui.js +4532 -602
- package/umd/nextui.min.js +1 -1
- package/cjs/avatar/avatar.styles.d.ts +0 -904
- package/cjs/button/button-icon.d.ts +0 -909
- package/cjs/button/button.styles.d.ts +0 -907
- package/cjs/code/code.styles.d.ts +0 -1782
- package/cjs/collapse/collapse.d.ts +0 -41
- package/cjs/collapse/collapse.styles.d.ts +0 -4472
- package/cjs/divider/divider.styles.d.ts +0 -1787
- package/cjs/image/image.styles.d.ts +0 -2676
- package/cjs/loading/loading.styles.d.ts +0 -5356
- package/cjs/pagination/pagination.styles.d.ts +0 -5369
- package/cjs/progress/progress.d.ts +0 -65
- package/cjs/progress/progress.styles.d.ts +0 -1793
- package/cjs/snippet/snippet.styles.d.ts +0 -3570
- package/cjs/text/child.d.ts +0 -21
- package/cjs/theme/ssr-provider.d.ts +0 -7
- package/cjs/theme/ssr-provider.js +0 -51
- package/cjs/tooltip/tooltip.d.ts +0 -56
- package/cjs/tooltip/tooltip.styles.d.ts +0 -3571
- package/esm/avatar/avatar-group.d.ts +0 -13
- package/esm/avatar/avatar-group.styles.d.ts +0 -1785
- package/esm/avatar/avatar.d.ts +0 -21
- package/esm/avatar/index.d.ts +0 -7
- package/esm/backdrop/backdrop.d.ts +0 -37
- package/esm/backdrop/index.d.ts +0 -5
- package/esm/button/button-group-context.d.ts +0 -20
- package/esm/button/button-group.d.ts +0 -34
- package/esm/button/button-group.styles.d.ts +0 -899
- package/esm/button/button.d.ts +0 -30
- package/esm/button/button.styles.d.ts +0 -907
- package/esm/button/index.d.ts +0 -10
- package/esm/button/utils.d.ts +0 -4
- package/esm/card/card.d.ts +0 -23
- package/esm/card/card.styles.d.ts +0 -3575
- package/esm/card/index.d.ts +0 -5
- package/esm/checkbox/checkbox-context.d.ts +0 -13
- package/esm/checkbox/checkbox-group.d.ts +0 -29
- package/esm/checkbox/checkbox.d.ts +0 -58
- package/esm/checkbox/checkbox.styles.d.ts +0 -8054
- package/esm/checkbox/index.d.ts +0 -6
- package/esm/code/code.d.ts +0 -15
- package/esm/code/index.d.ts +0 -5
- package/esm/col/col.d.ts +0 -20
- package/esm/col/col.styles.d.ts +0 -893
- package/esm/col/index.d.ts +0 -5
- package/esm/collapse/collapse-context.d.ts +0 -9
- package/esm/collapse/collapse-group.d.ts +0 -18
- package/esm/collapse/collapse-icon.d.ts +0 -19
- package/esm/collapse/index.d.ts +0 -6
- package/esm/container/container.d.ts +0 -40
- package/esm/container/container.styles.d.ts +0 -896
- package/esm/container/index.d.ts +0 -5
- package/esm/css-baseline/css-baseline.d.ts +0 -9
- package/esm/css-baseline/index.d.ts +0 -1
- package/esm/divider/divider.d.ts +0 -22
- package/esm/divider/index.d.ts +0 -5
- package/esm/grid/grid-container.d.ts +0 -22
- package/esm/grid/grid-item.d.ts +0 -37
- package/esm/grid/grid.d.ts +0 -9
- package/esm/grid/grid.styles.d.ts +0 -1783
- package/esm/grid/index.d.ts +0 -7
- package/esm/image/image.d.ts +0 -29
- package/esm/image/image.skeleton.d.ts +0 -19
- package/esm/image/index.d.ts +0 -5
- package/esm/index.d.ts +0 -79
- package/esm/input/index.d.ts +0 -7
- package/esm/input/input-password.d.ts +0 -98
- package/esm/input/input-props.d.ts +0 -66
- package/esm/input/input.d.ts +0 -18
- package/esm/input/input.styles.d.ts +0 -9854
- package/esm/input/password-icon.d.ts +0 -6
- package/esm/link/icon.d.ts +0 -4
- package/esm/link/index.d.ts +0 -5
- package/esm/link/link.d.ts +0 -43
- package/esm/link/link.styles.d.ts +0 -1788
- package/esm/loading/index.d.ts +0 -7
- package/esm/loading/loading.d.ts +0 -24
- package/esm/loading/spinner.d.ts +0 -17
- package/esm/modal/index.d.ts +0 -8
- package/esm/modal/modal-body.d.ts +0 -45
- package/esm/modal/modal-close-button.d.ts +0 -13
- package/esm/modal/modal-context.d.ts +0 -8
- package/esm/modal/modal-footer.d.ts +0 -24
- package/esm/modal/modal-header.d.ts +0 -24
- package/esm/modal/modal-wrapper.d.ts +0 -24
- package/esm/modal/modal.d.ts +0 -42
- package/esm/modal/modal.styles.d.ts +0 -5362
- package/esm/modal/use-modal.d.ts +0 -11
- package/esm/pagination/index.d.ts +0 -7
- package/esm/pagination/pagination-ellipsis.d.ts +0 -11
- package/esm/pagination/pagination-highlight.d.ts +0 -14
- package/esm/pagination/pagination-icon.d.ts +0 -16
- package/esm/pagination/pagination-item.d.ts +0 -22
- package/esm/pagination/pagination.d.ts +0 -46
- package/esm/progress/index.d.ts +0 -5
- package/esm/radio/index.d.ts +0 -4
- package/esm/radio/radio-context.d.ts +0 -13
- package/esm/radio/radio-group.d.ts +0 -30
- package/esm/radio/radio.d.ts +0 -45
- package/esm/radio/radio.styles.d.ts +0 -5357
- package/esm/row/index.d.ts +0 -5
- package/esm/row/row.d.ts +0 -21
- package/esm/row/row.styles.d.ts +0 -895
- package/esm/snippet/index.d.ts +0 -5
- package/esm/snippet/snippet-icon.d.ts +0 -21
- package/esm/snippet/snippet.d.ts +0 -35
- package/esm/spacer/index.d.ts +0 -5
- package/esm/spacer/spacer.d.ts +0 -41
- package/esm/spacer/spacer.styles.d.ts +0 -894
- package/esm/switch/index.d.ts +0 -5
- package/esm/switch/switch.d.ts +0 -82
- package/esm/switch/switch.styles.d.ts +0 -3576
- package/esm/text/index.d.ts +0 -4
- package/esm/text/text.d.ts +0 -59
- package/esm/text/text.styles.d.ts +0 -894
- package/esm/textarea/index.d.ts +0 -3
- package/esm/textarea/textarea.d.ts +0 -42
- package/esm/textarea/utils.d.ts +0 -13
- package/esm/theme/common.d.ts +0 -1584
- package/esm/theme/dark-theme.d.ts +0 -33
- package/esm/theme/light-theme.d.ts +0 -28
- package/esm/theme/ssr-provider.d.ts +0 -7
- package/esm/theme/ssr-provider.js +0 -51
- package/esm/theme/stitches.config.d.ts +0 -8700
- package/esm/theme/theme-context.d.ts +0 -5
- package/esm/theme/theme-provider.d.ts +0 -14
- package/esm/theme/types.d.ts +0 -75
- package/esm/theme/utils.d.ts +0 -16
- package/esm/tooltip/index.d.ts +0 -6
- package/esm/tooltip/placement.d.ts +0 -39
- package/esm/tooltip/tooltip-content.d.ts +0 -27
- package/esm/use-body-scroll/index.d.ts +0 -3
- package/esm/use-body-scroll/use-body-scroll.d.ts +0 -9
- package/esm/use-click-anywhere/index.d.ts +0 -2
- package/esm/use-click-anywhere/use-click-anywhere.d.ts +0 -2
- package/esm/use-click-away/index.d.ts +0 -2
- package/esm/use-click-away/use-click-away.d.ts +0 -3
- package/esm/use-clipboard/index.d.ts +0 -3
- package/esm/use-clipboard/use-clipboard.d.ts +0 -8
- package/esm/use-current-state/index.d.ts +0 -2
- package/esm/use-current-state/use-current-state.d.ts +0 -8
- package/esm/use-drip/index.d.ts +0 -2
- package/esm/use-drip/use-drip.d.ts +0 -9
- package/esm/use-input/index.d.ts +0 -2
- package/esm/use-input/use-input.d.ts +0 -13
- package/esm/use-keyboard/codes.d.ts +0 -92
- package/esm/use-keyboard/helper.d.ts +0 -3
- package/esm/use-keyboard/index.d.ts +0 -5
- package/esm/use-keyboard/use-keyboard.d.ts +0 -22
- package/esm/use-pagination/index.d.ts +0 -20
- package/esm/use-portal/index.d.ts +0 -2
- package/esm/use-portal/use-portal.d.ts +0 -2
- package/esm/use-real-shape/index.d.ts +0 -2
- package/esm/use-real-shape/use-real-shape.d.ts +0 -9
- package/esm/use-resize/index.d.ts +0 -2
- package/esm/use-resize/use-resize.d.ts +0 -2
- package/esm/use-ssr/index.d.ts +0 -2
- package/esm/use-ssr/use-ssr.d.ts +0 -6
- package/esm/use-theme/index.d.ts +0 -2
- package/esm/use-theme/use-theme.d.ts +0 -3
- package/esm/use-warning/index.d.ts +0 -2
- package/esm/use-warning/use-warning.d.ts +0 -2
- package/esm/user/index.d.ts +0 -6
- package/esm/user/user-link.d.ts +0 -32
- package/esm/user/user.d.ts +0 -35
- package/esm/user/user.styles.d.ts +0 -4456
- package/esm/utils/assertion.d.ts +0 -8
- package/esm/utils/clear-icon.d.ts +0 -16
- package/esm/utils/clsx.d.ts +0 -1
- package/esm/utils/collections.d.ts +0 -12
- package/esm/utils/color.d.ts +0 -28
- package/esm/utils/css-transition.d.ts +0 -27
- package/esm/utils/deep-merge.d.ts +0 -1
- package/esm/utils/dimensions.d.ts +0 -1
- package/esm/utils/drip.d.ts +0 -936
- package/esm/utils/expand.d.ts +0 -20
- package/esm/utils/numbers.d.ts +0 -9
- package/esm/utils/object.d.ts +0 -11
- package/esm/utils/prop-types.d.ts +0 -54
- package/esm/utils/with-defaults.d.ts +0 -3
|
@@ -1,283 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.StyledSwitchInput = exports.StyledSwitchContainer = exports.StyledSwitchCircle = exports.StyledSwitch = void 0;
|
|
5
|
-
|
|
6
|
-
var _stitches = require("../theme/stitches.config");
|
|
7
|
-
|
|
8
|
-
const StyledSwitchContainer = (0, _stitches.styled)('label', {
|
|
9
|
-
WebkitTapHighlightColor: 'transparent',
|
|
10
|
-
d: 'inline-block',
|
|
11
|
-
verticalAlign: 'center',
|
|
12
|
-
whiteSpace: 'nowrap',
|
|
13
|
-
us: 'none',
|
|
14
|
-
transition: '$default',
|
|
15
|
-
padding: '$1 0',
|
|
16
|
-
position: 'relative',
|
|
17
|
-
cursor: 'pointer',
|
|
18
|
-
'@motion': {
|
|
19
|
-
transition: 'none'
|
|
20
|
-
},
|
|
21
|
-
variants: {
|
|
22
|
-
color: {
|
|
23
|
-
default: {
|
|
24
|
-
$$switchColor: '$colors$primary',
|
|
25
|
-
$$switchColorShadow: '$colors$primaryLight',
|
|
26
|
-
$$switchColorHover: '$colors$primaryDark'
|
|
27
|
-
},
|
|
28
|
-
primary: {
|
|
29
|
-
$$switchColor: '$colors$primary',
|
|
30
|
-
$$switchColorShadow: '$colors$primaryLight',
|
|
31
|
-
$$switchColorHover: '$colors$primaryDark'
|
|
32
|
-
},
|
|
33
|
-
secondary: {
|
|
34
|
-
$$switchColor: '$colors$secondary',
|
|
35
|
-
$$switchColorShadow: '$colors$secondaryLight',
|
|
36
|
-
$$switchColorHover: '$colors$secondaryDark'
|
|
37
|
-
},
|
|
38
|
-
success: {
|
|
39
|
-
$$switchColor: '$colors$success',
|
|
40
|
-
$$switchColorShadow: '$colors$successLight',
|
|
41
|
-
$$switchColorHover: '$colors$successDark'
|
|
42
|
-
},
|
|
43
|
-
warning: {
|
|
44
|
-
$$switchColor: '$colors$warning',
|
|
45
|
-
$$switchColorShadow: '$colors$warningLight',
|
|
46
|
-
$$switchColorHover: '$colors$warningDark'
|
|
47
|
-
},
|
|
48
|
-
error: {
|
|
49
|
-
$$switchColor: '$colors$error',
|
|
50
|
-
$$switchColorShadow: '$colors$errorLight',
|
|
51
|
-
$$switchColorHover: '$colors$errorDark'
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
size: {
|
|
55
|
-
xs: {
|
|
56
|
-
$$switchWidth: '$space$12',
|
|
57
|
-
$$switchHeight: '$space$9',
|
|
58
|
-
width: ' $$switchWidth',
|
|
59
|
-
maxWidth: '$$switchWidth',
|
|
60
|
-
height: '$$switchHeight'
|
|
61
|
-
},
|
|
62
|
-
sm: {
|
|
63
|
-
$$switchWidth: '$space$14',
|
|
64
|
-
$$switchHeight: '$space$10',
|
|
65
|
-
width: '$$switchWidth',
|
|
66
|
-
maxWidth: '$$switchWidth',
|
|
67
|
-
height: '$$switchHeight'
|
|
68
|
-
},
|
|
69
|
-
md: {
|
|
70
|
-
$$switchWidth: '$space$15',
|
|
71
|
-
$$switchHeight: '$space$11',
|
|
72
|
-
width: '$$switchWidth',
|
|
73
|
-
maxWidth: '$$switchWidth',
|
|
74
|
-
height: '$$switchHeight'
|
|
75
|
-
},
|
|
76
|
-
lg: {
|
|
77
|
-
$$switchWidth: '$space$17',
|
|
78
|
-
$$switchHeight: '$space$12',
|
|
79
|
-
width: '$$switchWidth',
|
|
80
|
-
maxWidth: '$$switchWidth',
|
|
81
|
-
height: '$$switchHeight'
|
|
82
|
-
},
|
|
83
|
-
xl: {
|
|
84
|
-
$$switchWidth: '$space$18',
|
|
85
|
-
$$switchHeight: '$space$13',
|
|
86
|
-
width: '$$switchWidth',
|
|
87
|
-
maxWidth: '$$switchWidth',
|
|
88
|
-
height: '$$switchHeight'
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
borderWeight: {
|
|
92
|
-
light: {
|
|
93
|
-
$$switchBorderW: '$borderWeights$light'
|
|
94
|
-
},
|
|
95
|
-
normal: {
|
|
96
|
-
$$switchBorderW: '$borderWeights$normal'
|
|
97
|
-
},
|
|
98
|
-
bold: {
|
|
99
|
-
$$switchBorderW: '$borderWeights$bold'
|
|
100
|
-
},
|
|
101
|
-
extrabold: {
|
|
102
|
-
$$switchBorderW: '$borderWeights$extrabold'
|
|
103
|
-
},
|
|
104
|
-
black: {
|
|
105
|
-
$$switchBorderW: '$borderWeights$black'
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
disabled: {
|
|
109
|
-
true: {
|
|
110
|
-
cursor: 'not-allowed'
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
animated: {
|
|
114
|
-
false: {
|
|
115
|
-
transition: 'none'
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
defaultVariants: {
|
|
120
|
-
color: 'default',
|
|
121
|
-
size: 'md',
|
|
122
|
-
borderWeight: 'normal'
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
exports.StyledSwitchContainer = StyledSwitchContainer;
|
|
126
|
-
const StyledSwitchInput = (0, _stitches.styled)('input', {}, _stitches.sharedVisuallyHidden);
|
|
127
|
-
exports.StyledSwitchInput = StyledSwitchInput;
|
|
128
|
-
const StyledSwitchCircle = (0, _stitches.styled)('span', {
|
|
129
|
-
position: 'absolute',
|
|
130
|
-
display: 'flex',
|
|
131
|
-
size: 'calc($$switchHeight * 0.7)',
|
|
132
|
-
jc: 'center',
|
|
133
|
-
ai: 'center',
|
|
134
|
-
top: '50%',
|
|
135
|
-
transform: 'translateY(-50%)',
|
|
136
|
-
left: 'calc($$switchWidth / 15)',
|
|
137
|
-
transition: 'left 0.25s ease, width 0.2s ease',
|
|
138
|
-
bg: '$background',
|
|
139
|
-
br: '$pill',
|
|
140
|
-
'& svg': {
|
|
141
|
-
bg: 'transparent',
|
|
142
|
-
size: 'calc($$switchHeight * 0.44)'
|
|
143
|
-
},
|
|
144
|
-
'@motion': {
|
|
145
|
-
transition: 'none'
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
exports.StyledSwitchCircle = StyledSwitchCircle;
|
|
149
|
-
const StyledSwitch = (0, _stitches.styled)('div', {
|
|
150
|
-
opacity: 1,
|
|
151
|
-
width: '$$switchWidth',
|
|
152
|
-
height: '$$switchHeight',
|
|
153
|
-
transition: '$default',
|
|
154
|
-
position: 'relative',
|
|
155
|
-
overflow: 'hidden',
|
|
156
|
-
padding: 0,
|
|
157
|
-
br: '$pill',
|
|
158
|
-
bg: '$accents2',
|
|
159
|
-
'@motion': {
|
|
160
|
-
transition: 'none'
|
|
161
|
-
},
|
|
162
|
-
variants: {
|
|
163
|
-
checked: {
|
|
164
|
-
true: {
|
|
165
|
-
bg: '$$switchColor',
|
|
166
|
-
[`& ${StyledSwitchCircle}`]: {
|
|
167
|
-
left: 'calc(100% - ($$switchWidth / 15) - $$switchHeight * 0.7)'
|
|
168
|
-
},
|
|
169
|
-
'&:hover:not(&:active)': {
|
|
170
|
-
bg: '$$switchColorHover'
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
bordered: {
|
|
175
|
-
true: {
|
|
176
|
-
bg: 'transparent',
|
|
177
|
-
border: '$$switchBorderW solid $border',
|
|
178
|
-
'&:hover': {
|
|
179
|
-
borderColor: '$$switchColor'
|
|
180
|
-
},
|
|
181
|
-
[`& ${StyledSwitchCircle}`]: {
|
|
182
|
-
left: 'calc(($$switchWidth / 15) - ($$switchBorderW / 2))',
|
|
183
|
-
bg: '$accents2'
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
squared: {
|
|
188
|
-
true: {
|
|
189
|
-
br: '2px',
|
|
190
|
-
[`& ${StyledSwitchCircle}`]: {
|
|
191
|
-
br: '2px'
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
shadow: {
|
|
196
|
-
true: {}
|
|
197
|
-
},
|
|
198
|
-
disabled: {
|
|
199
|
-
true: {
|
|
200
|
-
borderColor: '$accents2',
|
|
201
|
-
bg: '$accents2',
|
|
202
|
-
[`& ${StyledSwitchCircle}`]: {
|
|
203
|
-
bg: '$accents3'
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
animated: {
|
|
208
|
-
true: {
|
|
209
|
-
'&:active': {
|
|
210
|
-
[`& ${StyledSwitchCircle}`]: {
|
|
211
|
-
width: 'calc($$switchHeight * 0.7 + ($$switchWidth / 10))'
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
false: {
|
|
216
|
-
transition: 'none',
|
|
217
|
-
[`& ${StyledSwitchCircle}`]: {
|
|
218
|
-
transition: 'none'
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
compoundVariants: [{
|
|
224
|
-
// checked && disabled
|
|
225
|
-
checked: true,
|
|
226
|
-
disabled: true,
|
|
227
|
-
css: {
|
|
228
|
-
bg: '$accents3',
|
|
229
|
-
[`& ${StyledSwitchCircle}`]: {
|
|
230
|
-
bg: '$accents2'
|
|
231
|
-
},
|
|
232
|
-
'&:hover:not(&:active)': {
|
|
233
|
-
bg: '$accents3'
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}, // shadow && checked
|
|
237
|
-
{
|
|
238
|
-
shadow: true,
|
|
239
|
-
checked: true,
|
|
240
|
-
css: {
|
|
241
|
-
normalShadowVar: '$$switchColorShadow'
|
|
242
|
-
}
|
|
243
|
-
}, // animated && !checked
|
|
244
|
-
{
|
|
245
|
-
animated: true,
|
|
246
|
-
checked: false,
|
|
247
|
-
css: {
|
|
248
|
-
'&:active': {
|
|
249
|
-
[`& ${StyledSwitchCircle}`]: {
|
|
250
|
-
left: 'calc($$switchWidth / 7.5)'
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}, // animated && checked
|
|
255
|
-
{
|
|
256
|
-
animated: true,
|
|
257
|
-
checked: true,
|
|
258
|
-
css: {
|
|
259
|
-
'&:active': {
|
|
260
|
-
[`& ${StyledSwitchCircle}`]: {
|
|
261
|
-
left: 'calc(100% - ($$switchWidth / 5) - $$switchHeight * 0.7)'
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
}, // checked && bordered
|
|
266
|
-
{
|
|
267
|
-
checked: true,
|
|
268
|
-
bordered: true,
|
|
269
|
-
css: {
|
|
270
|
-
bg: '$$switchColor',
|
|
271
|
-
border: '$$switchBorderW solid transparent',
|
|
272
|
-
'&:hover:not(&:active)': {
|
|
273
|
-
borderColor: 'transparent'
|
|
274
|
-
},
|
|
275
|
-
[`& ${StyledSwitchCircle}`]: {
|
|
276
|
-
left: 'calc(100% - ($$switchWidth / 15) - $$switchHeight * 0.7 + ($$switchBorderW / 2))',
|
|
277
|
-
bg: '$background'
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}]
|
|
281
|
-
}, _stitches.sharedFocus); // types
|
|
282
|
-
|
|
283
|
-
exports.StyledSwitch = StyledSwitch;
|
|
1
|
+
import{styled as t,sharedFocus as i,sharedVisuallyHidden as $}from"../theme/stitches.config";export const StyledSwitchContainer=t("label",{WebkitTapHighlightColor:"transparent",d:"inline-block",verticalAlign:"center",whiteSpace:"nowrap",us:"none",transition:"$default",padding:"$1 0",position:"relative",cursor:"pointer","@motion":{transition:"none"},variants:{color:{default:{$$switchColor:"$colors$primary",$$switchColorShadow:"$colors$primaryShadow",$$switchColorHover:"$colors$primaryDark"},primary:{$$switchColor:"$colors$primary",$$switchColorShadow:"$colors$primaryShadow",$$switchColorHover:"$colors$primaryDark"},secondary:{$$switchColor:"$colors$secondary",$$switchColorShadow:"$colors$secondaryShadow",$$switchColorHover:"$colors$secondaryDark"},success:{$$switchColor:"$colors$success",$$switchColorShadow:"$colors$successShadow",$$switchColorHover:"$colors$successDark"},warning:{$$switchColor:"$colors$warning",$$switchColorShadow:"$colors$warningShadow",$$switchColorHover:"$colors$warningDark"},error:{$$switchColor:"$colors$error",$$switchColorShadow:"$colors$errorShadow",$$switchColorHover:"$colors$errorDark"}},size:{xs:{$$switchWidth:"$space$12",$$switchHeight:"$space$9",width:" $$switchWidth",maxWidth:"$$switchWidth",height:"$$switchHeight"},sm:{$$switchWidth:"$space$14",$$switchHeight:"$space$10",width:"$$switchWidth",maxWidth:"$$switchWidth",height:"$$switchHeight"},md:{$$switchWidth:"$space$15",$$switchHeight:"$space$11",width:"$$switchWidth",maxWidth:"$$switchWidth",height:"$$switchHeight"},lg:{$$switchWidth:"$space$17",$$switchHeight:"$space$12",width:"$$switchWidth",maxWidth:"$$switchWidth",height:"$$switchHeight"},xl:{$$switchWidth:"$space$18",$$switchHeight:"$space$13",width:"$$switchWidth",maxWidth:"$$switchWidth",height:"$$switchHeight"}},borderWeight:{light:{$$switchBorderW:"$borderWeights$light"},normal:{$$switchBorderW:"$borderWeights$normal"},bold:{$$switchBorderW:"$borderWeights$bold"},extrabold:{$$switchBorderW:"$borderWeights$extrabold"},black:{$$switchBorderW:"$borderWeights$black"}},disabled:{true:{cursor:"not-allowed"}},animated:{false:{transition:"none"}}},defaultVariants:{color:"default",size:"md",borderWeight:"normal"}});export const StyledSwitchInput=t("input",{},$);export const StyledSwitchCircle=t("span",{position:"absolute",display:"flex",size:"calc($$switchHeight * 0.7)",jc:"center",ai:"center",top:"50%",transform:"translateY(-50%)",left:"calc($$switchWidth / 15)",transition:"left 0.25s ease, width 0.2s ease",bg:"$background",br:"$pill","& svg":{bg:"transparent",size:"calc($$switchHeight * 0.44)"},"@motion":{transition:"none"}});export const StyledSwitch=t("div",{opacity:1,width:"$$switchWidth",height:"$$switchHeight",transition:"$default",position:"relative",overflow:"hidden",padding:0,br:"$pill",bg:"$accents2","@motion":{transition:"none"},variants:{checked:{true:{bg:"$$switchColor",[`& ${StyledSwitchCircle}`]:{left:"calc(100% - ($$switchWidth / 15) - $$switchHeight * 0.7)"},"&:hover:not(&:active)":{bg:"$$switchColorHover"}}},bordered:{true:{bg:"transparent",border:"$$switchBorderW solid $border","&:hover":{borderColor:"$$switchColor"},[`& ${StyledSwitchCircle}`]:{left:"calc(($$switchWidth / 15) - ($$switchBorderW / 2))",bg:"$accents2"}}},squared:{true:{br:"2px",[`& ${StyledSwitchCircle}`]:{br:"2px"}}},shadow:{true:{}},disabled:{true:{borderColor:"$accents2",bg:"$accents2",[`& ${StyledSwitchCircle}`]:{bg:"$accents3"}}},animated:{true:{"&:active":{[`& ${StyledSwitchCircle}`]:{width:"calc($$switchHeight * 0.7 + ($$switchWidth / 10))"}}},false:{transition:"none",[`& ${StyledSwitchCircle}`]:{transition:"none"}}}},compoundVariants:[{checked:!0,disabled:!0,css:{bg:"$accents3",[`& ${StyledSwitchCircle}`]:{bg:"$accents2"},"&:hover:not(&:active)":{bg:"$accents3"}}},{shadow:!0,checked:!0,css:{normalShadowVar:"$$switchColorShadow"}},{animated:!0,checked:!1,css:{"&:active":{[`& ${StyledSwitchCircle}`]:{left:"calc($$switchWidth / 7.5)"}}}},{animated:!0,checked:!0,css:{"&:active":{[`& ${StyledSwitchCircle}`]:{left:"calc(100% - ($$switchWidth / 5) - $$switchHeight * 0.7)"}}}},{checked:!0,bordered:!0,css:{bg:"$$switchColor",border:"$$switchBorderW solid transparent","&:hover:not(&:active)":{borderColor:"transparent"},[`& ${StyledSwitchCircle}`]:{left:"calc(100% - ($$switchWidth / 15) - $$switchHeight * 0.7 + ($$switchBorderW / 2))",bg:"$background"}}}]},i);
|
package/esm/text/child.js
CHANGED
|
@@ -1,83 +1 @@
|
|
|
1
|
-
"
|
|
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 _color = require("../utils/color");
|
|
13
|
-
|
|
14
|
-
var _text = require("./text.styles");
|
|
15
|
-
|
|
16
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
|
-
const defaultProps = {
|
|
23
|
-
color: 'default'
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const TextChild = ({
|
|
27
|
-
children,
|
|
28
|
-
tag,
|
|
29
|
-
className,
|
|
30
|
-
color: userColor,
|
|
31
|
-
transform,
|
|
32
|
-
margin: marginProp,
|
|
33
|
-
size,
|
|
34
|
-
css,
|
|
35
|
-
...props
|
|
36
|
-
}) => {
|
|
37
|
-
const color = (0, _react.useMemo)(() => {
|
|
38
|
-
if ((0, _color.isNormalColor)(userColor)) {
|
|
39
|
-
switch (userColor) {
|
|
40
|
-
case 'default':
|
|
41
|
-
return '$text';
|
|
42
|
-
|
|
43
|
-
default:
|
|
44
|
-
return `$${userColor}`;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return userColor;
|
|
49
|
-
}, [userColor]);
|
|
50
|
-
const fontSize = (0, _react.useMemo)(() => {
|
|
51
|
-
if (!size) return 'inherit';
|
|
52
|
-
if (typeof size === 'number') return `${size}px`;
|
|
53
|
-
return size;
|
|
54
|
-
}, [size]);
|
|
55
|
-
const margin = (0, _react.useMemo)(() => {
|
|
56
|
-
if (!marginProp) return 'inherit';
|
|
57
|
-
if (typeof marginProp === 'number') return `${size}px`;
|
|
58
|
-
return marginProp;
|
|
59
|
-
}, [marginProp]);
|
|
60
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.default.Fragment, {
|
|
61
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_text.StyledText, {
|
|
62
|
-
as: tag,
|
|
63
|
-
css: {
|
|
64
|
-
color,
|
|
65
|
-
fontSize: size ? fontSize : '',
|
|
66
|
-
margin,
|
|
67
|
-
tt: transform,
|
|
68
|
-
...css
|
|
69
|
-
},
|
|
70
|
-
...props,
|
|
71
|
-
children: children
|
|
72
|
-
})
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
TextChild.toString = () => '.nextui-text-child';
|
|
77
|
-
|
|
78
|
-
const MemoTextChild = /*#__PURE__*/_react.default.memo(TextChild);
|
|
79
|
-
|
|
80
|
-
var _default = (0, _withDefaults.default)(MemoTextChild, defaultProps);
|
|
81
|
-
|
|
82
|
-
exports.default = _default;
|
|
83
|
-
module.exports = exports.default;
|
|
1
|
+
import t,{useMemo as r}from"react";import o from"../utils/with-defaults";import{isNormalColor as e}from"../utils/color";import{StyledText as i}from"./text.styles";import{jsx as m}from"react/jsx-runtime";const s=({children:t,tag:o,color:s,transform:n,margin:c,size:l,css:f,...a})=>{const u=r((()=>e(s)?"default"===s?"$text":`$${s}`:s),[s]),p=r((()=>l?"number"==typeof l?`${l}px`:l:"inherit"),[l]),x=r((()=>c?"number"==typeof c?`${l}px`:c:"inherit"),[c]);return m(i,{as:o,css:{color:u,fontSize:l?p:"",margin:x,tt:n,...f},...a,children:t})};s.toString=()=>".nextui-text-child";const n=t.memo(s);export default o(n,{color:"default"});
|
package/esm/text/index.js
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
exports.__esModule = true;
|
|
6
|
-
exports.default = exports.StyledText = void 0;
|
|
7
|
-
|
|
8
|
-
var _text = _interopRequireDefault(require("./text"));
|
|
9
|
-
|
|
10
|
-
var _text2 = require("./text.styles");
|
|
11
|
-
|
|
12
|
-
exports.StyledText = _text2.StyledText;
|
|
13
|
-
var _default = _text.default;
|
|
14
|
-
exports.default = _default;
|
|
1
|
+
import t from"./text";export{StyledText}from"./text.styles";export default t;
|
package/esm/text/text.js
CHANGED
|
@@ -1,124 +1 @@
|
|
|
1
|
-
"
|
|
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 _child = _interopRequireDefault(require("./child"));
|
|
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 defaultProps = {
|
|
21
|
-
h1: false,
|
|
22
|
-
h2: false,
|
|
23
|
-
h3: false,
|
|
24
|
-
h4: false,
|
|
25
|
-
h5: false,
|
|
26
|
-
h6: false,
|
|
27
|
-
b: false,
|
|
28
|
-
sm: false,
|
|
29
|
-
transform: 'none',
|
|
30
|
-
i: false,
|
|
31
|
-
span: false,
|
|
32
|
-
del: false,
|
|
33
|
-
em: false,
|
|
34
|
-
blockquote: false,
|
|
35
|
-
color: 'default'
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const getModifierChild = (tags, children, size, transform) => {
|
|
39
|
-
if (!tags.length) return children;
|
|
40
|
-
const nextTag = tags.slice(1, tags.length);
|
|
41
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_child.default, {
|
|
42
|
-
tag: tags[0],
|
|
43
|
-
size: size,
|
|
44
|
-
transform: transform,
|
|
45
|
-
children: getModifierChild(nextTag, children, size)
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const Text = ({
|
|
50
|
-
h1,
|
|
51
|
-
h2,
|
|
52
|
-
h3,
|
|
53
|
-
h4,
|
|
54
|
-
h5,
|
|
55
|
-
h6,
|
|
56
|
-
b,
|
|
57
|
-
small,
|
|
58
|
-
i,
|
|
59
|
-
span,
|
|
60
|
-
del,
|
|
61
|
-
em,
|
|
62
|
-
blockquote,
|
|
63
|
-
transform,
|
|
64
|
-
size,
|
|
65
|
-
margin,
|
|
66
|
-
children,
|
|
67
|
-
...props
|
|
68
|
-
}) => {
|
|
69
|
-
const elements = {
|
|
70
|
-
h1,
|
|
71
|
-
h2,
|
|
72
|
-
h3,
|
|
73
|
-
h4,
|
|
74
|
-
h5,
|
|
75
|
-
h6,
|
|
76
|
-
blockquote
|
|
77
|
-
};
|
|
78
|
-
const inlineElements = {
|
|
79
|
-
span,
|
|
80
|
-
small,
|
|
81
|
-
b,
|
|
82
|
-
em,
|
|
83
|
-
i,
|
|
84
|
-
del
|
|
85
|
-
};
|
|
86
|
-
const names = Object.keys(elements).filter(name => elements[name]);
|
|
87
|
-
const inlineNames = Object.keys(inlineElements).filter(name => inlineElements[name]);
|
|
88
|
-
/**
|
|
89
|
-
* Render element "p" only if no element is found.
|
|
90
|
-
* If there is only one modifier, just rendered one modifier element
|
|
91
|
-
* e.g.
|
|
92
|
-
* <Text /> => <p />
|
|
93
|
-
* <Text em /> => <em />
|
|
94
|
-
* <Text b em /> => <b><em>children</em></b>
|
|
95
|
-
*/
|
|
96
|
-
|
|
97
|
-
const tag = (0, _react.useMemo)(() => {
|
|
98
|
-
if (names[0]) return names[0];
|
|
99
|
-
if (inlineNames[0]) return inlineNames[0];
|
|
100
|
-
return 'p';
|
|
101
|
-
}, [names, inlineNames]);
|
|
102
|
-
const renderableChildElements = inlineNames.filter(name => name !== tag);
|
|
103
|
-
const modifers = (0, _react.useMemo)(() => {
|
|
104
|
-
if (!renderableChildElements.length) return children;
|
|
105
|
-
return getModifierChild(renderableChildElements, children, size, transform);
|
|
106
|
-
}, [renderableChildElements, children, size, transform]);
|
|
107
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_child.default, {
|
|
108
|
-
transform: transform,
|
|
109
|
-
tag: tag,
|
|
110
|
-
margin: margin,
|
|
111
|
-
size: size,
|
|
112
|
-
...props,
|
|
113
|
-
children: modifers
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
Text.toString = () => '.nextui-text';
|
|
118
|
-
|
|
119
|
-
const MemoText = /*#__PURE__*/_react.default.memo(Text);
|
|
120
|
-
|
|
121
|
-
var _default = (0, _withDefaults.default)(MemoText, defaultProps);
|
|
122
|
-
|
|
123
|
-
exports.default = _default;
|
|
124
|
-
module.exports = exports.default;
|
|
1
|
+
import t,{useMemo as e}from"react";import r from"../utils/with-defaults";import l from"./child";import{jsx as o}from"react/jsx-runtime";const n=(t,e,r,h)=>{if(!t.length)return e;const i=t.slice(1,t.length);return o(l,{tag:t[0],size:r,transform:h,children:n(i,e,r)})},h=({h1:t,h2:r,h3:h,h4:i,h5:s,h6:m,b:a,small:c,i:f,span:u,del:d,em:p,blockquote:b,transform:g,size:k,margin:x,children:j,...q})=>{const z={h1:t,h2:r,h3:h,h4:i,h5:s,h6:m,blockquote:b},y={span:u,small:c,b:a,em:p,i:f,del:d},O=Object.keys(z).filter((t=>z[t])),w=Object.keys(y).filter((t=>y[t])),S=e((()=>O[0]?O[0]:w[0]?w[0]:"p"),[O,w]),v=w.filter((t=>t!==S)),A=e((()=>v.length?n(v,j,k,g):j),[v,j,k,g]);return o(l,{transform:g,tag:S,margin:x,size:k,...q,children:A})};h.toString=()=>".nextui-text";const i=t.memo(h);export default r(i,{h1:!1,h2:!1,h3:!1,h4:!1,h5:!1,h6:!1,b:!1,small:!1,transform:"none",i:!1,span:!1,del:!1,em:!1,blockquote:!1,color:"default"});
|
package/esm/text/text.styles.js
CHANGED
|
@@ -1,41 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.StyledText = void 0;
|
|
5
|
-
|
|
6
|
-
var _stitches = require("../theme/stitches.config");
|
|
7
|
-
|
|
8
|
-
const StyledText = (0, _stitches.styled)('p', {
|
|
9
|
-
variants: {
|
|
10
|
-
weight: {
|
|
11
|
-
hairline: {
|
|
12
|
-
fontWeight: '$hairline'
|
|
13
|
-
},
|
|
14
|
-
thin: {
|
|
15
|
-
fontWeight: '$thin'
|
|
16
|
-
},
|
|
17
|
-
light: {
|
|
18
|
-
fontWeight: '$light'
|
|
19
|
-
},
|
|
20
|
-
normal: {
|
|
21
|
-
fontWeight: '$normal'
|
|
22
|
-
},
|
|
23
|
-
medium: {
|
|
24
|
-
fontWeight: '$medium'
|
|
25
|
-
},
|
|
26
|
-
semibold: {
|
|
27
|
-
fontWeight: '$semibold'
|
|
28
|
-
},
|
|
29
|
-
bold: {
|
|
30
|
-
fontWeight: '$bold'
|
|
31
|
-
},
|
|
32
|
-
extrabold: {
|
|
33
|
-
fontWeight: '$extrabold'
|
|
34
|
-
},
|
|
35
|
-
black: {
|
|
36
|
-
fontWeight: '$black'
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
exports.StyledText = StyledText;
|
|
1
|
+
import{styled as t}from"../theme/stitches.config";export const StyledText=t("p",{variants:{weight:{hairline:{fontWeight:"$hairline"},thin:{fontWeight:"$thin"},light:{fontWeight:"$light"},normal:{fontWeight:"$normal"},medium:{fontWeight:"$medium"},semibold:{fontWeight:"$semibold"},bold:{fontWeight:"$bold"},extrabold:{fontWeight:"$extrabold"},black:{fontWeight:"$black"}}}});
|
package/esm/textarea/index.js
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
exports.__esModule = true;
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _textarea = _interopRequireDefault(require("./textarea"));
|
|
9
|
-
|
|
10
|
-
var _default = _textarea.default;
|
|
11
|
-
exports.default = _default;
|
|
12
|
-
module.exports = exports.default;
|
|
1
|
+
import t from"./textarea";export default t;
|