@nextui-org/react 1.0.2-beta.3 → 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 +2 -2
- 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 -726
- 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 -196
- package/cjs/collapse/collapse.styles.js +1 -256
- 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 -318
- 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 -503
- 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 -111
- 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 -143
- 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 -726
- 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 -196
- package/esm/collapse/collapse.styles.js +1 -256
- 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 -318
- 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 -503
- 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 -111
- 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 -143
- 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 +7 -3
- package/{cjs → types}/avatar/avatar-group.d.ts +0 -0
- package/{cjs → types}/avatar/avatar-group.styles.d.ts +16 -0
- package/{cjs → types}/avatar/avatar.d.ts +0 -0
- package/{esm → types}/avatar/avatar.styles.d.ts +8 -0
- package/{cjs → types}/avatar/index.d.ts +0 -0
- package/{cjs → types}/backdrop/backdrop.d.ts +0 -0
- package/{cjs → types}/backdrop/backdrop.styles.d.ts +24 -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 +8 -0
- package/{esm → types}/button/button-icon.d.ts +9 -0
- package/{cjs → types}/button/button.d.ts +1 -0
- package/{esm/backdrop/backdrop.styles.d.ts → types/button/button.styles.d.ts} +1220 -931
- 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 +32 -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 +72 -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 +16 -0
- package/{cjs → types}/code/index.d.ts +0 -0
- package/{cjs → types}/col/col.d.ts +0 -0
- package/{esm → types}/col/col.styles.d.ts +8 -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/{cjs → types}/collapse/collapse.d.ts +0 -0
- package/{esm → types}/collapse/collapse.styles.d.ts +40 -0
- package/{cjs → types}/collapse/index.d.ts +0 -0
- package/{cjs → types}/container/container.d.ts +0 -0
- package/{esm → types}/container/container.styles.d.ts +8 -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 +16 -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 +16 -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 +24 -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 +88 -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 +17 -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 +48 -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 +48 -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 +48 -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 +17 -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 +48 -0
- package/{cjs → types}/row/index.d.ts +0 -0
- package/{cjs → types}/row/row.d.ts +0 -0
- package/{esm → types}/row/row.styles.d.ts +8 -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 +32 -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 +8 -0
- package/{cjs → types}/switch/index.d.ts +0 -0
- package/{cjs → types}/switch/switch.d.ts +0 -0
- package/{cjs → types}/switch/switch.styles.d.ts +32 -0
- package/{cjs → types}/text/child.d.ts +0 -0
- package/{cjs → types}/text/index.d.ts +0 -0
- package/{cjs → types}/text/text.d.ts +0 -0
- package/{cjs → types}/text/text.styles.d.ts +8 -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 +16 -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 +1021 -1
- 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 +0 -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/{cjs → types}/tooltip/tooltip.d.ts +0 -0
- package/{esm → types}/tooltip/tooltip.styles.d.ts +32 -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 +40 -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 +8 -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 +4436 -512
- package/umd/nextui.min.js +1 -1
- package/cjs/avatar/avatar.styles.d.ts +0 -937
- package/cjs/button/button-icon.d.ts +0 -942
- package/cjs/button/button.styles.d.ts +0 -940
- package/cjs/code/code.styles.d.ts +0 -1848
- package/cjs/col/col.styles.d.ts +0 -926
- package/cjs/collapse/collapse.styles.d.ts +0 -4637
- package/cjs/container/container.styles.d.ts +0 -929
- package/cjs/divider/divider.styles.d.ts +0 -1853
- package/cjs/image/image.styles.d.ts +0 -2775
- package/cjs/loading/loading.styles.d.ts +0 -5554
- package/cjs/pagination/pagination.styles.d.ts +0 -5567
- package/cjs/progress/progress.d.ts +0 -65
- package/cjs/progress/progress.styles.d.ts +0 -1859
- package/cjs/row/row.styles.d.ts +0 -928
- package/cjs/snippet/snippet.styles.d.ts +0 -3702
- package/cjs/tooltip/tooltip.styles.d.ts +0 -3703
- package/esm/avatar/avatar-group.d.ts +0 -13
- package/esm/avatar/avatar-group.styles.d.ts +0 -1851
- 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 -932
- package/esm/button/button.d.ts +0 -30
- package/esm/button/button.styles.d.ts +0 -940
- 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 -3707
- 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 -8351
- 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/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/collapse.d.ts +0 -43
- package/esm/collapse/index.d.ts +0 -6
- package/esm/container/container.d.ts +0 -40
- 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 -1849
- 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 -10217
- 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 -1854
- 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 -5560
- 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 -5555
- package/esm/row/index.d.ts +0 -5
- package/esm/row/row.d.ts +0 -21
- 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 -927
- package/esm/switch/index.d.ts +0 -5
- package/esm/switch/switch.d.ts +0 -82
- package/esm/switch/switch.styles.d.ts +0 -3708
- package/esm/text/child.d.ts +0 -23
- package/esm/text/index.d.ts +0 -4
- package/esm/text/text.d.ts +0 -59
- package/esm/text/text.styles.d.ts +0 -927
- 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 -1644
- package/esm/theme/dark-theme.d.ts +0 -33
- package/esm/theme/light-theme.d.ts +0 -28
- package/esm/theme/stitches.config.d.ts +0 -9004
- 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 -76
- 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/tooltip/tooltip.d.ts +0 -59
- 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 -4621
- 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 -969
- 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/README.md
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
<p align="center">
|
|
24
24
|
<a rel="noopener noreferrer" target="_blank" href="https://www.vercel.com?utm_source=nextui&utm_marketing=oss">
|
|
25
|
-
<img height="34px" src="https://raw.githubusercontent.com/nextui-org/nextui/main/apps/docs/public/
|
|
25
|
+
<img height="34px" src="https://raw.githubusercontent.com/nextui-org/nextui/main/apps/docs/public/images/sponsored-by-vercel.svg" alt="Sponsored by vercel">
|
|
26
26
|
</a>
|
|
27
27
|
</p>
|
|
28
28
|
|
|
@@ -76,7 +76,7 @@ import Button from '@nextui-org/react/button';
|
|
|
76
76
|
const Component = () => <Button>Click me</Button>;
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
###
|
|
79
|
+
### Community
|
|
80
80
|
|
|
81
81
|
We're excited to see the community adopt NextUI, raise issues, and provide feedback.
|
|
82
82
|
Whether it's a feature request, bug report, or a project to showcase, please get involved!
|
|
@@ -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
|
+
var e=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=void 0;e(require("react"));var r=function(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u(r);if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}a.default=e,t&&t.set(e,a);return a}(require("./avatar-group.styles")),t=require("react/jsx-runtime");function u(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(u=function(e){return e?t:r})(e)}const a=({count:e,children:u,...a})=>(0,t.jsxs)(r.default,{...a,children:[u,e&&(0,t.jsxs)(r.StyledAvatarGroupCount,{className:"nextui-avatar-group-count",children:["+",e]})]});a.toString=()=>".nextui-avatar-group";var n=a;exports.default=n,module.exports=exports.default;
|
|
@@ -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
|
+
var t=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=exports.StyledAvatarGroupCount=exports.StyledAvatarGroup=void 0;var e=require("../theme/stitches.config"),a=t(require("./avatar.styles"));const r=(0,e.styled)("span",{fontSize:"$xs",display:"inline-flex",alignItems:"center",marginLeft:"$3",color:"$text"});exports.StyledAvatarGroupCount=r;const o=(0,e.styled)("div",{dflex:"center",height:"auto",width:"max-content","@motion":{transition:"none"},[`& ${a.default}`]:{marginLeft:"-$space$5",transition:"$default",".only-text-avatar":{boxShadow:"$xs"}},".only-text-avatar":{boxShadow:"$xs"},variants:{animated:{true:{[`& ${a.default}:hover`]:{transform:"translate(-$space$5)"}}}},defaultVariants:{animated:!0}});exports.StyledAvatarGroup=o;var n=o;exports.default=n;
|
package/cjs/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
|
+
var e=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=u(t);if(a&&a.has(e))return a.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var s=n?Object.getOwnPropertyDescriptor(e,l):null;s&&(s.get||s.set)?Object.defineProperty(r,l,s):r[l]=e[l]}r.default=e,a&&a.set(e,r);return r}(require("react")),a=e(require("./avatar.styles")),r=e(require("../utils/clsx")),n=require("react/jsx-runtime");function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(u=function(e){return e?a:t})(e)}const l=e=>(null==e?void 0:e.length)<=4?e:null==e?void 0:e.slice(0,3),s=({src:e,text:u,icon:s,alt:i,className:o,...c})=>{const f=!e,[d,p]=(0,t.useState)(!1),v=(0,t.useRef)(null);(0,t.useEffect)((()=>{var e;(null==v||null==(e=v.current)?void 0:e.complete)&&p(!0)}),[]);const x=(0,t.useMemo)((()=>!d&&e?"loading":"ready"),[e,d]);return(0,n.jsxs)(a.default,{className:(0,r.default)({"only-text-avatar":f},o),"data-state":x,...c,children:[(0,n.jsx)("span",{className:"nextui-avatar-bg"}),!f&&(0,n.jsx)("img",{ref:v,className:(0,r.default)("nextui-avatar-img",`nextui-avatar--${x}`,{"nextui-avatar-ready":d}),src:e,alt:i,"data-state":x,onLoad:()=>p(!0)}),f&&!s&&u&&(0,n.jsx)("span",{className:"nextui-avatar-text",children:l(u)}),s&&(0,n.jsx)("span",{className:"nextui-avatar-icon",children:s})]})};s.toString=()=>".nextui-avatar";var i=s;exports.default=i,module.exports=exports.default;
|
|
@@ -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
|
+
exports.__esModule=!0,exports.default=exports.StyledAvatar=void 0;const a=(0,require("../theme/stitches.config").styled)("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"}});exports.StyledAvatar=a;var t=a;exports.default=t;
|
package/cjs/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
|
+
var r=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=exports.StyledAvatarGroupCount=exports.StyledAvatarGroup=exports.StyledAvatar=void 0;var e=r(require("./avatar")),t=r(require("./avatar-group")),a=require("./avatar.styles");exports.StyledAvatar=a.StyledAvatar;var u=require("./avatar-group.styles");exports.StyledAvatarGroup=u.StyledAvatarGroup,exports.StyledAvatarGroupCount=u.StyledAvatarGroupCount,e.default.Group=t.default;var o=e.default;exports.default=o;
|