@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
package/cjs/utils/prop-types.js
CHANGED
|
@@ -1,56 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.tuple = exports.textWeights = exports.textTransforms = exports.simpleColors = exports.normalWeights = exports.normalLoaders = exports.normalColors = exports.extraColors = exports.extendedColorsNoGradient = exports.extendedColors = exports.excludedInputPropsForTextarea = void 0;
|
|
5
|
-
|
|
6
|
-
const tuple = (...args) => args;
|
|
7
|
-
|
|
8
|
-
exports.tuple = tuple;
|
|
9
|
-
const normalSizes = tuple('xs', 'sm', 'md', 'lg', 'xl');
|
|
10
|
-
const normalColors = tuple('default', 'primary', 'secondary', 'success', 'warning', 'error', 'gradient');
|
|
11
|
-
exports.normalColors = normalColors;
|
|
12
|
-
const simpleColors = tuple('default', 'primary', 'secondary', 'success', 'warning', 'error');
|
|
13
|
-
exports.simpleColors = simpleColors;
|
|
14
|
-
const extendedColors = tuple('default', 'primary', 'secondary', 'success', 'warning', 'error', 'invert', 'gradient');
|
|
15
|
-
exports.extendedColors = extendedColors;
|
|
16
|
-
const extendedColorsNoGradient = tuple('default', 'primary', 'secondary', 'success', 'warning', 'error', 'invert');
|
|
17
|
-
exports.extendedColorsNoGradient = extendedColorsNoGradient;
|
|
18
|
-
const extraColors = tuple('default', 'primary', 'secondary', 'success', 'warning', 'error', 'dark', 'lite', 'alert', 'purple', 'violet', 'gradient', 'cyan');
|
|
19
|
-
exports.extraColors = extraColors;
|
|
20
|
-
const normalLoaders = tuple('default', 'points', 'points-opacity', 'gradient', 'spinner');
|
|
21
|
-
exports.normalLoaders = normalLoaders;
|
|
22
|
-
const normalWeights = tuple('light', 'normal', 'bold', 'extrabold', 'black');
|
|
23
|
-
exports.normalWeights = normalWeights;
|
|
24
|
-
const textWeights = tuple(
|
|
25
|
-
/* Keyword values */
|
|
26
|
-
'normal', 'bold',
|
|
27
|
-
/* Keyword values relative to the parent */
|
|
28
|
-
'lighter', 'bolder',
|
|
29
|
-
/* Global values */
|
|
30
|
-
'inherit', 'initial', 'revert', 'unset');
|
|
31
|
-
exports.textWeights = textWeights;
|
|
32
|
-
const textTransforms = tuple(
|
|
33
|
-
/* Keyword values */
|
|
34
|
-
'none', 'capitalize', 'uppercase', 'lowercase', 'full-width', 'full-size-kana',
|
|
35
|
-
/* Global values */
|
|
36
|
-
'inherit', 'initial', 'revert', 'unset');
|
|
37
|
-
exports.textTransforms = textTransforms;
|
|
38
|
-
const copyTypes = tuple('default', 'slient', 'prevent');
|
|
39
|
-
const triggerTypes = tuple('hover', 'click');
|
|
40
|
-
const placement = tuple('top', 'topStart', 'topEnd', 'left', 'leftStart', 'leftEnd', 'bottom', 'bottomStart', 'bottomEnd', 'right', 'rightStart', 'rightEnd');
|
|
41
|
-
const position = tuple('static', 'relative', 'absolute', 'fixed', 'sticky',
|
|
42
|
-
/* Global values */
|
|
43
|
-
'inherit', 'initial', 'revert', 'unset');
|
|
44
|
-
const objectFit = tuple('contain', 'cover', 'fill', 'none', 'scale-down',
|
|
45
|
-
/* Global values */
|
|
46
|
-
'inherit', 'initial', 'revert', 'unset');
|
|
47
|
-
const dividerAlign = tuple('start', 'center', 'end', 'left', 'right');
|
|
48
|
-
const justify = tuple('flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly');
|
|
49
|
-
const alignItems = tuple('flex-start', 'flex-end', 'center', 'stretch', 'baseline');
|
|
50
|
-
const alignContent = tuple('stretch', 'center', 'flex-start', 'flex-end', 'space-between', 'space-around');
|
|
51
|
-
const direction = tuple('row', 'row-reverse', 'column', 'column-reverse');
|
|
52
|
-
const wrap = tuple('nowrap', 'wrap', 'wrap-reverse');
|
|
53
|
-
const display = tuple('flex', 'block', 'grid', 'inline', 'inline-block', 'inline-flex', 'inline-grid');
|
|
54
|
-
const contentPosition = tuple('left', 'right');
|
|
55
|
-
const excludedInputPropsForTextarea = tuple('clearable', 'as', 'rounded', 'labelLeft', 'labelRight', 'contentLeft', 'contentRight', 'contentClickable', 'contentLeftStyling', 'contentRightStyling', 'onContentClick', 'onClearClick', 'css');
|
|
56
|
-
exports.excludedInputPropsForTextarea = excludedInputPropsForTextarea;
|
|
1
|
+
exports.__esModule=!0,exports.tuple=exports.textWeights=exports.textTransforms=exports.simpleColors=exports.normalWeights=exports.normalLoaders=exports.normalColors=exports.extraColors=exports.extendedColorsNoGradient=exports.extendedColors=exports.excludedInputPropsForTextarea=void 0;const e=(...e)=>e;exports.tuple=e;e("xs","sm","md","lg","xl");const t=e("default","primary","secondary","success","warning","error","gradient");exports.normalColors=t;const r=e("default","primary","secondary","success","warning","error");exports.simpleColors=r;const o=e("default","primary","secondary","success","warning","error","invert","gradient");exports.extendedColors=o;const n=e("default","primary","secondary","success","warning","error","invert");exports.extendedColorsNoGradient=n;const s=e("default","primary","secondary","success","warning","error","dark","lite","alert","purple","violet","gradient","cyan");exports.extraColors=s;const l=e("default","points","points-opacity","gradient","spinner");exports.normalLoaders=l;const a=e("light","normal","bold","extrabold","black");exports.normalWeights=a;const i=e("normal","bold","lighter","bolder","inherit","initial","revert","unset");exports.textWeights=i;const c=e("none","capitalize","uppercase","lowercase","full-width","full-size-kana","inherit","initial","revert","unset");exports.textTransforms=c;e("default","slient","prevent"),e("hover","click"),e("top","topStart","topEnd","left","leftStart","leftEnd","bottom","bottomStart","bottomEnd","right","rightStart","rightEnd"),e("static","relative","absolute","fixed","sticky","inherit","initial","revert","unset"),e("contain","cover","fill","none","scale-down","inherit","initial","revert","unset"),e("start","center","end","left","right"),e("flex-start","center","flex-end","space-between","space-around","space-evenly"),e("flex-start","flex-end","center","stretch","baseline"),e("stretch","center","flex-start","flex-end","space-between","space-around"),e("row","row-reverse","column","column-reverse"),e("nowrap","wrap","wrap-reverse"),e("flex","block","grid","inline","inline-block","inline-flex","inline-grid"),e("left","right");const d=e("clearable","as","rounded","labelLeft","labelRight","contentLeft","contentRight","contentClickable","contentLeftStyling","contentRightStyling","onContentClick","onClearClick","css");exports.excludedInputPropsForTextarea=d;
|
package/cjs/utils/react.js
CHANGED
|
@@ -1,24 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.addChildrenClass = addChildrenClass;
|
|
5
|
-
exports.getValidChildren = getValidChildren;
|
|
6
|
-
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
|
|
9
|
-
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); }
|
|
10
|
-
|
|
11
|
-
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; }
|
|
12
|
-
|
|
13
|
-
function getValidChildren(children) {
|
|
14
|
-
return React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function addChildrenClass(children, className) {
|
|
18
|
-
const validChildren = getValidChildren(children);
|
|
19
|
-
return validChildren.map(child => {
|
|
20
|
-
return /*#__PURE__*/React.cloneElement(child, {
|
|
21
|
-
className: `${child.props.className} ${className}`
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
}
|
|
1
|
+
exports.__esModule=!0,exports.addChildrenClass=function(r,n){return t(r).map((r=>e.cloneElement(r,{className:`${r.props.className} ${n}`})))},exports.getValidChildren=t;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(require("react"));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}function t(r){return e.Children.toArray(r).filter((r=>e.isValidElement(r)))}
|
package/cjs/utils/strings.js
CHANGED
|
@@ -1,18 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.kebabCase = exports.includes = void 0;
|
|
5
|
-
|
|
6
|
-
const kebabCase = text => {
|
|
7
|
-
var _text$replace, _text$replace$replace, _text$replace$replace2;
|
|
8
|
-
|
|
9
|
-
return text == null ? void 0 : text.replace == null ? void 0 : (_text$replace = text.replace(/([a-z])([A-Z])/g, '$1-$2')) == null ? void 0 : _text$replace.replace == null ? void 0 : (_text$replace$replace = (_text$replace$replace2 = _text$replace.replace(/\s+/g, '-')).toLowerCase) == null ? void 0 : _text$replace$replace.call(_text$replace$replace2);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
exports.kebabCase = kebabCase;
|
|
13
|
-
|
|
14
|
-
const includes = (text, search) => {
|
|
15
|
-
return search == null ? void 0 : search.some(item => text == null ? void 0 : text.includes(item));
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
exports.includes = includes;
|
|
1
|
+
exports.__esModule=!0,exports.kebabCase=exports.includes=void 0;exports.kebabCase=e=>{var l,s,o;return null==e||null==e.replace||null==(l=e.replace(/([a-z])([A-Z])/g,"$1-$2"))||null==l.replace||null==(s=(o=l.replace(/\s+/g,"-")).toLowerCase)?void 0:s.call(o)};exports.includes=(e,l)=>null==l?void 0:l.some((l=>null==e?void 0:e.includes(l)));
|
package/cjs/utils/types.d.js
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = void 0;
|
|
5
|
-
|
|
6
|
-
const withDefaults = (component, defaultProps) => {
|
|
7
|
-
component.defaultProps = defaultProps;
|
|
8
|
-
return component;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
var _default = withDefaults;
|
|
12
|
-
exports.default = _default;
|
|
13
|
-
module.exports = exports.default;
|
|
1
|
+
exports.__esModule=!0,exports.default=void 0;var e=(e,o)=>(e.defaultProps=o,e);exports.default=e,module.exports=exports.default;
|
|
@@ -1,35 +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 = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _avatarGroup = _interopRequireWildcard(require("./avatar-group.styles"));
|
|
11
|
-
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
|
|
14
|
-
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); }
|
|
15
|
-
|
|
16
|
-
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; }
|
|
17
|
-
|
|
18
|
-
const AvatarGroup = ({
|
|
19
|
-
count,
|
|
20
|
-
children,
|
|
21
|
-
...props
|
|
22
|
-
}) => {
|
|
23
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_avatarGroup.default, { ...props,
|
|
24
|
-
children: [children, count && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_avatarGroup.StyledAvatarGroupCount, {
|
|
25
|
-
className: "nextui-avatar-group-count",
|
|
26
|
-
children: ["+", count]
|
|
27
|
-
})]
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
AvatarGroup.toString = () => '.nextui-avatar-group';
|
|
32
|
-
|
|
33
|
-
var _default = AvatarGroup;
|
|
34
|
-
exports.default = _default;
|
|
35
|
-
module.exports = exports.default;
|
|
1
|
+
import r from"react";import t,{StyledAvatarGroupCount as a}from"./avatar-group.styles";import{jsxs as o}from"react/jsx-runtime";const e=({count:r,children:e,...i})=>o(t,{...i,children:[e,r&&o(a,{className:"nextui-avatar-group-count",children:["+",r]})]});e.toString=()=>".nextui-avatar-group";export default e;
|
|
@@ -1,52 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
exports.__esModule = true;
|
|
6
|
-
exports.default = exports.StyledAvatarGroupCount = exports.StyledAvatarGroup = void 0;
|
|
7
|
-
|
|
8
|
-
var _stitches = require("../theme/stitches.config");
|
|
9
|
-
|
|
10
|
-
var _avatar = _interopRequireDefault(require("./avatar.styles"));
|
|
11
|
-
|
|
12
|
-
const StyledAvatarGroupCount = (0, _stitches.styled)('span', {
|
|
13
|
-
fontSize: '$xs',
|
|
14
|
-
display: 'inline-flex',
|
|
15
|
-
alignItems: 'center',
|
|
16
|
-
marginLeft: '$3',
|
|
17
|
-
color: '$text'
|
|
18
|
-
});
|
|
19
|
-
exports.StyledAvatarGroupCount = StyledAvatarGroupCount;
|
|
20
|
-
const StyledAvatarGroup = (0, _stitches.styled)('div', {
|
|
21
|
-
dflex: 'center',
|
|
22
|
-
height: 'auto',
|
|
23
|
-
width: 'max-content',
|
|
24
|
-
'@motion': {
|
|
25
|
-
transition: 'none'
|
|
26
|
-
},
|
|
27
|
-
[`& ${_avatar.default}`]: {
|
|
28
|
-
marginLeft: '-$space$5',
|
|
29
|
-
transition: '$default',
|
|
30
|
-
'.only-text-avatar': {
|
|
31
|
-
boxShadow: '$xs'
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
'.only-text-avatar': {
|
|
35
|
-
boxShadow: '$xs'
|
|
36
|
-
},
|
|
37
|
-
variants: {
|
|
38
|
-
animated: {
|
|
39
|
-
true: {
|
|
40
|
-
[`& ${_avatar.default}:hover`]: {
|
|
41
|
-
transform: 'translate(-$space$5)'
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
defaultVariants: {
|
|
47
|
-
animated: true
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
exports.StyledAvatarGroup = StyledAvatarGroup;
|
|
51
|
-
var _default = StyledAvatarGroup;
|
|
52
|
-
exports.default = _default;
|
|
1
|
+
import{styled as t}from"../theme/stitches.config";import a from"./avatar.styles";export const StyledAvatarGroupCount=t("span",{fontSize:"$xs",display:"inline-flex",alignItems:"center",marginLeft:"$3",color:"$text"});export const StyledAvatarGroup=t("div",{dflex:"center",height:"auto",width:"max-content","@motion":{transition:"none"},[`& ${a}`]:{marginLeft:"-$space$5",transition:"$default",".only-text-avatar":{boxShadow:"$xs"}},".only-text-avatar":{boxShadow:"$xs"},variants:{animated:{true:{[`& ${a}:hover`]:{transform:"translate(-$space$5)"}}}},defaultVariants:{animated:!0}});export default StyledAvatarGroup;
|
package/esm/avatar/avatar.js
CHANGED
|
@@ -1,75 +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 _avatar = _interopRequireDefault(require("./avatar.styles"));
|
|
11
|
-
|
|
12
|
-
var _clsx = _interopRequireDefault(require("../utils/clsx"));
|
|
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 safeText = text => {
|
|
21
|
-
if ((text == null ? void 0 : text.length) <= 4) return text;
|
|
22
|
-
return text == null ? void 0 : text.slice(0, 3);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const Avatar = ({
|
|
26
|
-
src,
|
|
27
|
-
text,
|
|
28
|
-
icon,
|
|
29
|
-
alt,
|
|
30
|
-
className,
|
|
31
|
-
...props
|
|
32
|
-
}) => {
|
|
33
|
-
const showText = !src;
|
|
34
|
-
const [ready, setReady] = (0, _react.useState)(false);
|
|
35
|
-
const imgRef = (0, _react.useRef)(null);
|
|
36
|
-
(0, _react.useEffect)(() => {
|
|
37
|
-
var _imgRef$current;
|
|
38
|
-
|
|
39
|
-
(imgRef == null ? void 0 : (_imgRef$current = imgRef.current) == null ? void 0 : _imgRef$current.complete) && setReady(true);
|
|
40
|
-
}, []);
|
|
41
|
-
const getState = (0, _react.useMemo)(() => {
|
|
42
|
-
return !ready && src ? 'loading' : 'ready';
|
|
43
|
-
}, [src, ready]);
|
|
44
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_avatar.default, {
|
|
45
|
-
className: (0, _clsx.default)({
|
|
46
|
-
'only-text-avatar': showText
|
|
47
|
-
}, className),
|
|
48
|
-
"data-state": getState,
|
|
49
|
-
...props,
|
|
50
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
51
|
-
className: "nextui-avatar-bg"
|
|
52
|
-
}), !showText && /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
53
|
-
ref: imgRef,
|
|
54
|
-
className: (0, _clsx.default)('nextui-avatar-img', `nextui-avatar--${getState}`, {
|
|
55
|
-
'nextui-avatar-ready': ready
|
|
56
|
-
}),
|
|
57
|
-
src: src,
|
|
58
|
-
alt: alt,
|
|
59
|
-
"data-state": getState,
|
|
60
|
-
onLoad: () => setReady(true)
|
|
61
|
-
}), showText && !icon && text && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
62
|
-
className: "nextui-avatar-text",
|
|
63
|
-
children: safeText(text)
|
|
64
|
-
}), icon && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
65
|
-
className: "nextui-avatar-icon",
|
|
66
|
-
children: icon
|
|
67
|
-
})]
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
Avatar.toString = () => '.nextui-avatar';
|
|
72
|
-
|
|
73
|
-
var _default = Avatar;
|
|
74
|
-
exports.default = _default;
|
|
75
|
-
module.exports = exports.default;
|
|
1
|
+
import a,{useMemo as t,useState as r,useRef as e,useEffect as s}from"react";import n from"./avatar.styles";import l from"../utils/clsx";import{jsx as i}from"react/jsx-runtime";import{jsxs as o}from"react/jsx-runtime";const c=a=>(null==a?void 0:a.length)<=4?a:null==a?void 0:a.slice(0,3),m=({src:a,text:m,icon:u,alt:x,className:d,...v})=>{const p=!a,[f,g]=r(!1),N=e(null);s((()=>{var a;(null==N||null==(a=N.current)?void 0:a.complete)&&g(!0)}),[]);const h=t((()=>!f&&a?"loading":"ready"),[a,f]);return o(n,{className:l({"only-text-avatar":p},d),"data-state":h,...v,children:[i("span",{className:"nextui-avatar-bg"}),!p&&i("img",{ref:N,className:l("nextui-avatar-img",`nextui-avatar--${h}`,{"nextui-avatar-ready":f}),src:a,alt:x,"data-state":h,onLoad:()=>g(!0)}),p&&!u&&m&&i("span",{className:"nextui-avatar-text",children:c(m)}),u&&i("span",{className:"nextui-avatar-icon",children:u})]})};m.toString=()=>".nextui-avatar";export default m;
|
|
@@ -1,334 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = exports.StyledAvatar = void 0;
|
|
5
|
-
|
|
6
|
-
var _stitches = require("../theme/stitches.config");
|
|
7
|
-
|
|
8
|
-
const StyledAvatar = (0, _stitches.styled)('span', {
|
|
9
|
-
dflex: 'center',
|
|
10
|
-
position: 'relative',
|
|
11
|
-
zIndex: '$1',
|
|
12
|
-
boxSizing: 'border-box',
|
|
13
|
-
overflow: 'hidden',
|
|
14
|
-
verticalAlign: 'top',
|
|
15
|
-
cursor: 'auto',
|
|
16
|
-
transition: '$default',
|
|
17
|
-
'&:first-child': {
|
|
18
|
-
margin: 0
|
|
19
|
-
},
|
|
20
|
-
'&:hover .nextui-avatar-bg': {
|
|
21
|
-
boxShadow: ' inset 0 0 40px 0 rgb(0 0 0 / 14%)'
|
|
22
|
-
},
|
|
23
|
-
'.nextui-avatar-img': {
|
|
24
|
-
opacity: 0,
|
|
25
|
-
zIndex: '$3',
|
|
26
|
-
display: 'flex',
|
|
27
|
-
bg: '$background',
|
|
28
|
-
transition: 'transform 250ms ease 0ms, opacity 200ms ease-in 0ms',
|
|
29
|
-
width: '100%',
|
|
30
|
-
height: '100%',
|
|
31
|
-
objectFit: 'cover'
|
|
32
|
-
},
|
|
33
|
-
'&[data-state="ready"] .nextui-avatar-img': {
|
|
34
|
-
opacity: 1
|
|
35
|
-
},
|
|
36
|
-
'.nextui-avatar-bg': {
|
|
37
|
-
position: 'absolute',
|
|
38
|
-
top: 0,
|
|
39
|
-
left: 0,
|
|
40
|
-
right: 0,
|
|
41
|
-
bottom: 0,
|
|
42
|
-
zIndex: '$2',
|
|
43
|
-
transition: '$default'
|
|
44
|
-
},
|
|
45
|
-
'.nextui-avatar-icon': {
|
|
46
|
-
display: 'flex',
|
|
47
|
-
position: 'absolute',
|
|
48
|
-
left: '50%',
|
|
49
|
-
top: '50%',
|
|
50
|
-
ta: 'center',
|
|
51
|
-
zIndex: '$2',
|
|
52
|
-
transform: 'translate(-50%, -50%)',
|
|
53
|
-
whiteSpace: 'nowrap',
|
|
54
|
-
us: 'none'
|
|
55
|
-
},
|
|
56
|
-
'.nextui-avatar-text': {
|
|
57
|
-
position: 'absolute',
|
|
58
|
-
zIndex: '$2',
|
|
59
|
-
left: '50%',
|
|
60
|
-
top: '50%',
|
|
61
|
-
ta: 'center',
|
|
62
|
-
transform: 'translate(-50%, -50%) scale(0.65)',
|
|
63
|
-
whiteSpace: 'nowrap',
|
|
64
|
-
us: 'none'
|
|
65
|
-
},
|
|
66
|
-
'@motion': {
|
|
67
|
-
transition: 'none',
|
|
68
|
-
'.nextui-avatar-bg, .nextui-avatar-img': {
|
|
69
|
-
transition: 'none'
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
variants: {
|
|
73
|
-
color: {
|
|
74
|
-
default: {
|
|
75
|
-
'.nextui-avatar-bg': {
|
|
76
|
-
bg: '$accents2'
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
primary: {
|
|
80
|
-
'.nextui-avatar-bg': {
|
|
81
|
-
bg: '$primary'
|
|
82
|
-
},
|
|
83
|
-
'.nextui-avatar-text': {
|
|
84
|
-
color: '$background'
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
secondary: {
|
|
88
|
-
'.nextui-avatar-bg': {
|
|
89
|
-
bg: '$secondary'
|
|
90
|
-
},
|
|
91
|
-
'.nextui-avatar-text': {
|
|
92
|
-
color: '$background'
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
success: {
|
|
96
|
-
'.nextui-avatar-bg': {
|
|
97
|
-
bg: '$success'
|
|
98
|
-
},
|
|
99
|
-
'.nextui-avatar-text': {
|
|
100
|
-
color: '$background'
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
warning: {
|
|
104
|
-
'.nextui-avatar-bg': {
|
|
105
|
-
bg: '$warning'
|
|
106
|
-
},
|
|
107
|
-
'.nextui-avatar-text': {
|
|
108
|
-
color: '$background'
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
error: {
|
|
112
|
-
'.nextui-avatar-bg': {
|
|
113
|
-
bg: '$error'
|
|
114
|
-
},
|
|
115
|
-
'.nextui-avatar-text': {
|
|
116
|
-
color: '$background'
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
gradient: {
|
|
120
|
-
'.nextui-avatar-bg': {
|
|
121
|
-
bg: '$gradient'
|
|
122
|
-
},
|
|
123
|
-
'.nextui-avatar-text': {
|
|
124
|
-
color: '$background'
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
textColor: {
|
|
129
|
-
default: {
|
|
130
|
-
'.nextui-avatar-text': {
|
|
131
|
-
color: '$text'
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
primary: {
|
|
135
|
-
'.nextui-avatar-text': {
|
|
136
|
-
color: '$primary'
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
secondary: {
|
|
140
|
-
'.nextui-avatar-text': {
|
|
141
|
-
color: '$secondary'
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
success: {
|
|
145
|
-
'.nextui-avatar-text': {
|
|
146
|
-
color: '$success'
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
warning: {
|
|
150
|
-
'.nextui-avatar-text': {
|
|
151
|
-
color: '$warning'
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
error: {
|
|
155
|
-
'.nextui-avatar-text': {
|
|
156
|
-
color: '$error'
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
size: {
|
|
161
|
-
xs: {
|
|
162
|
-
$$avatarXs: '$space$9',
|
|
163
|
-
sizeMin: '$$avatarXs',
|
|
164
|
-
'&.nextui-avatar-bg': {
|
|
165
|
-
size: '$$avatarXs'
|
|
166
|
-
},
|
|
167
|
-
'.nextui-avatar-text': {
|
|
168
|
-
fontSize: '$xs'
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
sm: {
|
|
172
|
-
$$avatarSm: '$space$11',
|
|
173
|
-
sizeMin: '$$avatarSm',
|
|
174
|
-
'.nextui-avatar-bg': {
|
|
175
|
-
size: '$$avatarSm'
|
|
176
|
-
},
|
|
177
|
-
'.nextui-avatar-text': {
|
|
178
|
-
fontSize: '$base'
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
md: {
|
|
182
|
-
$$avatarMd: '$space$14',
|
|
183
|
-
sizeMin: '$$avatarMd',
|
|
184
|
-
'.nextui-avatar-bg': {
|
|
185
|
-
size: '$$avatarMd'
|
|
186
|
-
},
|
|
187
|
-
'.nextui-avatar-text': {
|
|
188
|
-
fontSize: '$sm'
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
lg: {
|
|
192
|
-
$$avatarLg: '$space$16',
|
|
193
|
-
sizeMin: '$$avatarLg',
|
|
194
|
-
'.nextui-avatar-bg': {
|
|
195
|
-
size: '$$avatarLg'
|
|
196
|
-
},
|
|
197
|
-
'.nextui-avatar-text': {
|
|
198
|
-
fontSize: '$sm'
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
xl: {
|
|
202
|
-
$$avatarXl: '$space$18',
|
|
203
|
-
sizeMin: '$$avatarXl',
|
|
204
|
-
'&.nextui-avatar-bg': {
|
|
205
|
-
size: '$$avatarXl'
|
|
206
|
-
},
|
|
207
|
-
'.nextui-avatar-text': {
|
|
208
|
-
fontSize: '$md'
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
borderWeight: {
|
|
213
|
-
light: {
|
|
214
|
-
'.nextui-avatar-img': {
|
|
215
|
-
borderWidth: '$light'
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
normal: {
|
|
219
|
-
'.nextui-avatar-img': {
|
|
220
|
-
borderWidth: '$normal'
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
bold: {
|
|
224
|
-
'.nextui-avatar-img': {
|
|
225
|
-
borderWidth: '$normal'
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
extrabold: {
|
|
229
|
-
'.nextui-avatar-img': {
|
|
230
|
-
borderWidth: '$normal'
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
black: {
|
|
234
|
-
'.nextui-avatar-img': {
|
|
235
|
-
borderWidth: '$normal'
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
bordered: {
|
|
240
|
-
true: {
|
|
241
|
-
'&:hover:not(.only-text-avatar) .nextui-avatar-bg': {
|
|
242
|
-
opacity: '0.6'
|
|
243
|
-
},
|
|
244
|
-
'.nextui-avatar-img': {
|
|
245
|
-
borderStyle: 'solid',
|
|
246
|
-
borderColor: '$background'
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
stacked: {
|
|
251
|
-
true: {
|
|
252
|
-
ml: '-$5'
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
pointer: {
|
|
256
|
-
true: {
|
|
257
|
-
cursor: 'pointer'
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
rounded: {
|
|
261
|
-
true: {
|
|
262
|
-
borderRadius: '$rounded',
|
|
263
|
-
'.nextui-avatar-img': {
|
|
264
|
-
borderRadius: '$rounded'
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
squared: {
|
|
269
|
-
true: {
|
|
270
|
-
borderRadius: '$squared',
|
|
271
|
-
'.nextui-avatar-img': {
|
|
272
|
-
borderRadius: '$squared'
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
zoomed: {
|
|
277
|
-
true: {
|
|
278
|
-
'&:hover .nextui-avatar-img': {
|
|
279
|
-
transform: 'scale(1.125)'
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
compoundVariants: [{
|
|
285
|
-
bordered: true,
|
|
286
|
-
borderWeight: 'light',
|
|
287
|
-
css: {
|
|
288
|
-
padding: 'calc($1/2)'
|
|
289
|
-
}
|
|
290
|
-
}, {
|
|
291
|
-
bordered: true,
|
|
292
|
-
borderWeight: 'normal',
|
|
293
|
-
css: {
|
|
294
|
-
padding: '$1'
|
|
295
|
-
}
|
|
296
|
-
}, {
|
|
297
|
-
bordered: true,
|
|
298
|
-
borderWeight: 'bold',
|
|
299
|
-
css: {
|
|
300
|
-
padding: 'calc($2/1.5)'
|
|
301
|
-
}
|
|
302
|
-
}, {
|
|
303
|
-
bordered: true,
|
|
304
|
-
borderWeight: 'extrabold',
|
|
305
|
-
css: {
|
|
306
|
-
padding: '$2'
|
|
307
|
-
}
|
|
308
|
-
}, {
|
|
309
|
-
bordered: true,
|
|
310
|
-
borderWeight: 'black',
|
|
311
|
-
css: {
|
|
312
|
-
padding: 'calc($3/1.5)'
|
|
313
|
-
}
|
|
314
|
-
}, {
|
|
315
|
-
rounded: true,
|
|
316
|
-
squared: true,
|
|
317
|
-
css: {
|
|
318
|
-
borderRadius: '$squared',
|
|
319
|
-
'.nextui-avatar-img': {
|
|
320
|
-
borderRadius: '$squared'
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}],
|
|
324
|
-
defaultVariants: {
|
|
325
|
-
size: 'md',
|
|
326
|
-
rounded: true,
|
|
327
|
-
color: 'default',
|
|
328
|
-
textColor: 'default',
|
|
329
|
-
borderWeight: 'normal'
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
|
-
exports.StyledAvatar = StyledAvatar;
|
|
333
|
-
var _default = StyledAvatar;
|
|
334
|
-
exports.default = _default;
|
|
1
|
+
import{styled as a}from"../theme/stitches.config";export const StyledAvatar=a("span",{dflex:"center",position:"relative",zIndex:"$1",boxSizing:"border-box",overflow:"hidden",verticalAlign:"top",cursor:"auto",transition:"$default","&:first-child":{margin:0},"&:hover .nextui-avatar-bg":{boxShadow:" inset 0 0 40px 0 rgb(0 0 0 / 14%)"},".nextui-avatar-img":{opacity:0,zIndex:"$3",display:"flex",bg:"$background",transition:"transform 250ms ease 0ms, opacity 200ms ease-in 0ms",width:"100%",height:"100%",objectFit:"cover"},'&[data-state="ready"] .nextui-avatar-img':{opacity:1},".nextui-avatar-bg":{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:"$2",transition:"$default"},".nextui-avatar-icon":{display:"flex",position:"absolute",left:"50%",top:"50%",ta:"center",zIndex:"$2",transform:"translate(-50%, -50%)",whiteSpace:"nowrap",us:"none"},".nextui-avatar-text":{position:"absolute",zIndex:"$2",left:"50%",top:"50%",ta:"center",transform:"translate(-50%, -50%) scale(0.65)",whiteSpace:"nowrap",us:"none"},"@motion":{transition:"none",".nextui-avatar-bg, .nextui-avatar-img":{transition:"none"}},variants:{color:{default:{".nextui-avatar-bg":{bg:"$accents2"}},primary:{".nextui-avatar-bg":{bg:"$primary"},".nextui-avatar-text":{color:"$background"}},secondary:{".nextui-avatar-bg":{bg:"$secondary"},".nextui-avatar-text":{color:"$background"}},success:{".nextui-avatar-bg":{bg:"$success"},".nextui-avatar-text":{color:"$background"}},warning:{".nextui-avatar-bg":{bg:"$warning"},".nextui-avatar-text":{color:"$background"}},error:{".nextui-avatar-bg":{bg:"$error"},".nextui-avatar-text":{color:"$background"}},gradient:{".nextui-avatar-bg":{bg:"$gradient"},".nextui-avatar-text":{color:"$background"}}},textColor:{default:{".nextui-avatar-text":{color:"$text"}},primary:{".nextui-avatar-text":{color:"$primary"}},secondary:{".nextui-avatar-text":{color:"$secondary"}},success:{".nextui-avatar-text":{color:"$success"}},warning:{".nextui-avatar-text":{color:"$warning"}},error:{".nextui-avatar-text":{color:"$error"}}},size:{xs:{$$avatarXs:"$space$9",sizeMin:"$$avatarXs","&.nextui-avatar-bg":{size:"$$avatarXs"},".nextui-avatar-text":{fontSize:"$xs"}},sm:{$$avatarSm:"$space$11",sizeMin:"$$avatarSm",".nextui-avatar-bg":{size:"$$avatarSm"},".nextui-avatar-text":{fontSize:"$base"}},md:{$$avatarMd:"$space$14",sizeMin:"$$avatarMd",".nextui-avatar-bg":{size:"$$avatarMd"},".nextui-avatar-text":{fontSize:"$sm"}},lg:{$$avatarLg:"$space$16",sizeMin:"$$avatarLg",".nextui-avatar-bg":{size:"$$avatarLg"},".nextui-avatar-text":{fontSize:"$sm"}},xl:{$$avatarXl:"$space$18",sizeMin:"$$avatarXl","&.nextui-avatar-bg":{size:"$$avatarXl"},".nextui-avatar-text":{fontSize:"$md"}}},borderWeight:{light:{".nextui-avatar-img":{borderWidth:"$light"}},normal:{".nextui-avatar-img":{borderWidth:"$normal"}},bold:{".nextui-avatar-img":{borderWidth:"$normal"}},extrabold:{".nextui-avatar-img":{borderWidth:"$normal"}},black:{".nextui-avatar-img":{borderWidth:"$normal"}}},bordered:{true:{"&:hover:not(.only-text-avatar) .nextui-avatar-bg":{opacity:"0.6"},".nextui-avatar-img":{borderStyle:"solid",borderColor:"$background"}}},stacked:{true:{ml:"-$5"}},pointer:{true:{cursor:"pointer"}},rounded:{true:{borderRadius:"$rounded",".nextui-avatar-img":{borderRadius:"$rounded"}}},squared:{true:{borderRadius:"$squared",".nextui-avatar-img":{borderRadius:"$squared"}}},zoomed:{true:{"&:hover .nextui-avatar-img":{transform:"scale(1.125)"}}}},compoundVariants:[{bordered:!0,borderWeight:"light",css:{padding:"calc($1/2)"}},{bordered:!0,borderWeight:"normal",css:{padding:"$1"}},{bordered:!0,borderWeight:"bold",css:{padding:"calc($2/1.5)"}},{bordered:!0,borderWeight:"extrabold",css:{padding:"$2"}},{bordered:!0,borderWeight:"black",css:{padding:"calc($3/1.5)"}},{rounded:!0,squared:!0,css:{borderRadius:"$squared",".nextui-avatar-img":{borderRadius:"$squared"}}}],defaultVariants:{size:"md",rounded:!0,color:"default",textColor:"default",borderWeight:"normal"}});export default StyledAvatar;
|
package/esm/avatar/index.js
CHANGED
|
@@ -1,22 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
exports.__esModule = true;
|
|
6
|
-
exports.default = exports.StyledAvatarGroupCount = exports.StyledAvatarGroup = exports.StyledAvatar = void 0;
|
|
7
|
-
|
|
8
|
-
var _avatar = _interopRequireDefault(require("./avatar"));
|
|
9
|
-
|
|
10
|
-
var _avatarGroup = _interopRequireDefault(require("./avatar-group"));
|
|
11
|
-
|
|
12
|
-
var _avatar2 = require("./avatar.styles");
|
|
13
|
-
|
|
14
|
-
exports.StyledAvatar = _avatar2.StyledAvatar;
|
|
15
|
-
|
|
16
|
-
var _avatarGroup2 = require("./avatar-group.styles");
|
|
17
|
-
|
|
18
|
-
exports.StyledAvatarGroup = _avatarGroup2.StyledAvatarGroup;
|
|
19
|
-
exports.StyledAvatarGroupCount = _avatarGroup2.StyledAvatarGroupCount;
|
|
20
|
-
_avatar.default.Group = _avatarGroup.default;
|
|
21
|
-
var _default = _avatar.default;
|
|
22
|
-
exports.default = _default;
|
|
1
|
+
import r from"./avatar";import a from"./avatar-group";export{StyledAvatar}from"./avatar.styles";export{StyledAvatarGroup}from"./avatar-group.styles";export{StyledAvatarGroupCount}from"./avatar-group.styles";r.Group=a;export default r;
|