@nextui-org/react 1.0.2-alpha.2 → 1.0.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -5
- package/cjs/avatar/avatar-group.js +1 -35
- package/cjs/avatar/avatar-group.styles.js +1 -52
- package/cjs/avatar/avatar.js +1 -75
- package/cjs/avatar/avatar.styles.js +1 -334
- package/cjs/avatar/index.js +1 -22
- package/cjs/backdrop/backdrop.js +1 -137
- package/cjs/backdrop/backdrop.styles.js +1 -119
- package/cjs/backdrop/index.js +1 -16
- package/cjs/button/button-group-context.js +1 -21
- package/cjs/button/button-group.js +1 -81
- package/cjs/button/button-group.styles.js +1 -136
- package/cjs/button/button-icon.js +1 -68
- package/cjs/button/button.js +1 -145
- package/cjs/button/button.styles.js +1 -695
- package/cjs/button/index.js +1 -25
- package/cjs/button/utils.js +1 -27
- package/cjs/card/card.js +1 -117
- package/cjs/card/card.styles.js +1 -267
- package/cjs/card/index.js +1 -24
- package/cjs/checkbox/checkbox-context.js +1 -25
- package/cjs/checkbox/checkbox-group.js +1 -89
- package/cjs/checkbox/checkbox.js +1 -192
- package/cjs/checkbox/checkbox.styles.js +1 -563
- package/cjs/checkbox/index.js +1 -26
- package/cjs/code/code.js +1 -42
- package/cjs/code/code.styles.js +1 -14
- package/cjs/code/index.js +1 -15
- package/cjs/col/col.js +1 -46
- package/cjs/col/col.styles.js +1 -16
- package/cjs/col/index.js +1 -14
- package/cjs/collapse/collapse-context.js +1 -20
- package/cjs/collapse/collapse-group.js +1 -90
- package/cjs/collapse/collapse-icon.js +1 -41
- package/cjs/collapse/collapse.js +1 -190
- package/cjs/collapse/collapse.styles.js +1 -254
- package/cjs/collapse/index.js +1 -22
- package/cjs/container/container.js +1 -91
- package/cjs/container/container.styles.js +1 -45
- package/cjs/container/index.js +1 -14
- package/cjs/css-baseline/css-baseline.js +1 -247
- package/cjs/css-baseline/index.js +1 -11
- package/cjs/divider/divider.js +1 -82
- package/cjs/divider/divider.styles.js +1 -77
- package/cjs/divider/index.js +1 -15
- package/cjs/grid/grid-container.js +1 -60
- package/cjs/grid/grid-item.js +1 -123
- package/cjs/grid/grid.js +1 -29
- package/cjs/grid/grid.styles.js +1 -15
- package/cjs/grid/index.js +1 -18
- package/cjs/image/image.js +1 -150
- package/cjs/image/image.skeleton.js +1 -50
- package/cjs/image/image.styles.js +1 -57
- package/cjs/image/index.js +1 -16
- package/cjs/index.js +1 -435
- package/cjs/input/index.js +1 -30
- package/cjs/input/input-password.js +1 -80
- package/cjs/input/input-props.js +1 -30
- package/cjs/input/input.js +1 -317
- package/cjs/input/input.styles.js +1 -878
- package/cjs/input/password-icon.js +1 -51
- package/cjs/link/icon.js +1 -42
- package/cjs/link/index.js +1 -15
- package/cjs/link/link.js +1 -42
- package/cjs/link/link.styles.js +1 -135
- package/cjs/loading/index.js +1 -24
- package/cjs/loading/loading.js +1 -80
- package/cjs/loading/loading.styles.js +1 -438
- package/cjs/loading/spinner.js +1 -47
- package/cjs/modal/index.js +1 -28
- package/cjs/modal/modal-body.js +1 -62
- package/cjs/modal/modal-close-button.js +1 -49
- package/cjs/modal/modal-context.js +1 -18
- package/cjs/modal/modal-footer.js +1 -69
- package/cjs/modal/modal-header.js +1 -69
- package/cjs/modal/modal-wrapper.js +1 -153
- package/cjs/modal/modal.js +1 -159
- package/cjs/modal/modal.styles.js +1 -243
- package/cjs/modal/use-modal.js +1 -25
- package/cjs/pagination/index.js +1 -19
- package/cjs/pagination/pagination-ellipsis.js +1 -86
- package/cjs/pagination/pagination-highlight.js +1 -52
- package/cjs/pagination/pagination-icon.js +1 -59
- package/cjs/pagination/pagination-item.js +1 -104
- package/cjs/pagination/pagination.js +1 -169
- package/cjs/pagination/pagination.styles.js +1 -361
- package/cjs/progress/index.js +1 -15
- package/cjs/progress/progress.js +1 -101
- package/cjs/progress/progress.styles.js +1 -165
- package/cjs/radio/index.js +1 -24
- package/cjs/radio/radio-context.js +1 -24
- package/cjs/radio/radio-group.js +1 -78
- package/cjs/radio/radio.js +1 -156
- package/cjs/radio/radio.styles.js +1 -240
- package/cjs/row/index.js +1 -14
- package/cjs/row/row.js +1 -54
- package/cjs/row/row.styles.js +1 -25
- package/cjs/snippet/index.js +1 -16
- package/cjs/snippet/snippet-icon.js +1 -52
- package/cjs/snippet/snippet.js +1 -137
- package/cjs/snippet/snippet.styles.js +1 -141
- package/cjs/spacer/index.js +1 -14
- package/cjs/spacer/spacer.js +1 -49
- package/cjs/spacer/spacer.styles.js +1 -24
- package/cjs/switch/index.js +1 -17
- package/cjs/switch/switch.js +1 -142
- package/cjs/switch/switch.styles.js +1 -283
- package/cjs/text/child.js +1 -83
- package/cjs/text/index.js +1 -14
- package/cjs/text/text.js +1 -124
- package/cjs/text/text.styles.js +1 -41
- package/cjs/textarea/index.js +1 -12
- package/cjs/textarea/textarea.js +1 -126
- package/cjs/textarea/utils.js +1 -126
- package/cjs/theme/common.js +1 -490
- package/cjs/theme/dark-theme.js +1 -38
- package/cjs/theme/index.js +1 -31
- package/cjs/theme/light-theme.js +1 -33
- package/cjs/theme/stitches.config.js +1 -88
- package/cjs/theme/theme-context.js +1 -22
- package/cjs/theme/theme-provider.js +1 -115
- package/cjs/theme/types.js +1 -3
- package/cjs/theme/utils.js +1 -113
- package/cjs/tooltip/index.js +1 -17
- package/cjs/tooltip/placement.js +1 -193
- package/cjs/tooltip/tooltip-content.js +1 -135
- package/cjs/tooltip/tooltip.js +1 -141
- package/cjs/tooltip/tooltip.styles.js +1 -159
- package/cjs/use-body-scroll/index.js +1 -12
- package/cjs/use-body-scroll/use-body-scroll.js +1 -77
- package/cjs/use-click-anywhere/index.js +1 -12
- package/cjs/use-click-anywhere/use-click-anywhere.js +1 -19
- package/cjs/use-click-away/index.js +1 -12
- package/cjs/use-click-away/use-click-away.js +1 -23
- package/cjs/use-clipboard/index.js +1 -12
- package/cjs/use-clipboard/use-clipboard.js +1 -57
- package/cjs/use-current-state/index.js +1 -12
- package/cjs/use-current-state/use-current-state.js +1 -28
- package/cjs/use-drip/index.js +1 -12
- package/cjs/use-drip/use-drip.js +1 -38
- package/cjs/use-input/index.js +1 -12
- package/cjs/use-input/use-input.js +1 -32
- package/cjs/use-keyboard/codes.js +1 -104
- package/cjs/use-keyboard/helper.js +1 -35
- package/cjs/use-keyboard/index.js +1 -15
- package/cjs/use-keyboard/use-keyboard.js +1 -76
- package/cjs/use-pagination/index.js +1 -88
- package/cjs/use-portal/index.js +1 -12
- package/cjs/use-portal/use-portal.js +1 -43
- package/cjs/use-real-shape/index.js +1 -12
- package/cjs/use-real-shape/use-real-shape.js +1 -55
- package/cjs/use-resize/index.js +1 -12
- package/cjs/use-resize/use-resize.js +1 -23
- package/cjs/use-ssr/index.js +1 -12
- package/cjs/use-ssr/use-ssr.js +1 -25
- package/cjs/use-theme/index.js +1 -12
- package/cjs/use-theme/use-theme.js +1 -16
- package/cjs/use-warning/index.js +1 -12
- package/cjs/use-warning/use-warning.js +1 -23
- package/cjs/user/index.js +1 -21
- package/cjs/user/user-link.js +1 -46
- package/cjs/user/user.js +1 -63
- package/cjs/user/user.styles.js +1 -56
- package/cjs/utils/assertion.js +1 -42
- package/cjs/utils/clear-icon.js +1 -70
- package/cjs/utils/clsx.js +1 -57
- package/cjs/utils/collections.js +1 -110
- package/cjs/utils/color.js +1 -187
- package/cjs/utils/css-transition.js +1 -76
- package/cjs/utils/deep-merge.js +1 -33
- package/cjs/utils/dimensions.js +1 -10
- package/cjs/utils/dom.js +1 -110
- package/cjs/utils/drip.js +1 -116
- package/cjs/utils/expand.js +1 -109
- package/cjs/utils/icons.js +1 -481
- package/cjs/utils/numbers.js +1 -23
- package/cjs/utils/object.js +1 -40
- package/cjs/utils/prop-types.js +1 -56
- package/cjs/utils/react.js +1 -24
- package/cjs/utils/strings.js +1 -18
- package/cjs/utils/types.d.js +1 -3
- package/cjs/utils/with-defaults.js +1 -13
- package/esm/avatar/avatar-group.js +1 -35
- package/esm/avatar/avatar-group.styles.js +1 -52
- package/esm/avatar/avatar.js +1 -75
- package/esm/avatar/avatar.styles.js +1 -334
- package/esm/avatar/index.js +1 -22
- package/esm/backdrop/backdrop.js +1 -137
- package/esm/backdrop/backdrop.styles.js +1 -119
- package/esm/backdrop/index.js +1 -16
- package/esm/button/button-group-context.js +1 -21
- package/esm/button/button-group.js +1 -81
- package/esm/button/button-group.styles.js +1 -136
- package/esm/button/button-icon.js +1 -68
- package/esm/button/button.js +1 -145
- package/esm/button/button.styles.js +1 -695
- package/esm/button/index.js +1 -25
- package/esm/button/utils.js +1 -27
- package/esm/card/card.js +1 -117
- package/esm/card/card.styles.js +1 -267
- package/esm/card/index.js +1 -24
- package/esm/checkbox/checkbox-context.js +1 -25
- package/esm/checkbox/checkbox-group.js +1 -89
- package/esm/checkbox/checkbox.js +1 -192
- package/esm/checkbox/checkbox.styles.js +1 -563
- package/esm/checkbox/index.js +1 -26
- package/esm/code/code.js +1 -42
- package/esm/code/code.styles.js +1 -14
- package/esm/code/index.js +1 -15
- package/esm/col/col.js +1 -46
- package/esm/col/col.styles.js +1 -16
- package/esm/col/index.js +1 -14
- package/esm/collapse/collapse-context.js +1 -20
- package/esm/collapse/collapse-group.js +1 -90
- package/esm/collapse/collapse-icon.js +1 -41
- package/esm/collapse/collapse.js +1 -190
- package/esm/collapse/collapse.styles.js +1 -254
- package/esm/collapse/index.js +1 -22
- package/esm/container/container.js +1 -91
- package/esm/container/container.styles.js +1 -45
- package/esm/container/index.js +1 -14
- package/esm/css-baseline/css-baseline.js +1 -247
- package/esm/css-baseline/index.js +1 -11
- package/esm/divider/divider.js +1 -82
- package/esm/divider/divider.styles.js +1 -77
- package/esm/divider/index.js +1 -15
- package/esm/grid/grid-container.js +1 -60
- package/esm/grid/grid-item.js +1 -123
- package/esm/grid/grid.js +1 -29
- package/esm/grid/grid.styles.js +1 -15
- package/esm/grid/index.js +1 -18
- package/esm/image/image.js +1 -150
- package/esm/image/image.skeleton.js +1 -50
- package/esm/image/image.styles.js +1 -57
- package/esm/image/index.js +1 -16
- package/esm/index.js +1 -435
- package/esm/input/index.js +1 -30
- package/esm/input/input-password.js +1 -80
- package/esm/input/input-props.js +1 -30
- package/esm/input/input.js +1 -317
- package/esm/input/input.styles.js +1 -878
- package/esm/input/password-icon.js +1 -51
- package/esm/link/icon.js +1 -42
- package/esm/link/index.js +1 -15
- package/esm/link/link.js +1 -42
- package/esm/link/link.styles.js +1 -135
- package/esm/loading/index.js +1 -24
- package/esm/loading/loading.js +1 -80
- package/esm/loading/loading.styles.js +1 -438
- package/esm/loading/spinner.js +1 -47
- package/esm/modal/index.js +1 -28
- package/esm/modal/modal-body.js +1 -62
- package/esm/modal/modal-close-button.js +1 -49
- package/esm/modal/modal-context.js +1 -18
- package/esm/modal/modal-footer.js +1 -69
- package/esm/modal/modal-header.js +1 -69
- package/esm/modal/modal-wrapper.js +1 -153
- package/esm/modal/modal.js +1 -159
- package/esm/modal/modal.styles.js +1 -243
- package/esm/modal/use-modal.js +1 -25
- package/esm/pagination/index.js +1 -19
- package/esm/pagination/pagination-ellipsis.js +1 -86
- package/esm/pagination/pagination-highlight.js +1 -52
- package/esm/pagination/pagination-icon.js +1 -59
- package/esm/pagination/pagination-item.js +1 -104
- package/esm/pagination/pagination.js +1 -169
- package/esm/pagination/pagination.styles.js +1 -361
- package/esm/progress/index.js +1 -15
- package/esm/progress/progress.js +1 -101
- package/esm/progress/progress.styles.js +1 -165
- package/esm/radio/index.js +1 -24
- package/esm/radio/radio-context.js +1 -24
- package/esm/radio/radio-group.js +1 -78
- package/esm/radio/radio.js +1 -156
- package/esm/radio/radio.styles.js +1 -240
- package/esm/row/index.js +1 -14
- package/esm/row/row.js +1 -54
- package/esm/row/row.styles.js +1 -25
- package/esm/snippet/index.js +1 -16
- package/esm/snippet/snippet-icon.js +1 -52
- package/esm/snippet/snippet.js +1 -137
- package/esm/snippet/snippet.styles.js +1 -141
- package/esm/spacer/index.js +1 -14
- package/esm/spacer/spacer.js +1 -49
- package/esm/spacer/spacer.styles.js +1 -24
- package/esm/switch/index.js +1 -17
- package/esm/switch/switch.js +1 -142
- package/esm/switch/switch.styles.js +1 -283
- package/esm/text/child.js +1 -83
- package/esm/text/index.js +1 -14
- package/esm/text/text.js +1 -124
- package/esm/text/text.styles.js +1 -41
- package/esm/textarea/index.js +1 -12
- package/esm/textarea/textarea.js +1 -126
- package/esm/textarea/utils.js +1 -126
- package/esm/theme/common.js +1 -490
- package/esm/theme/dark-theme.js +1 -38
- package/esm/theme/index.js +1 -31
- package/esm/theme/light-theme.js +1 -33
- package/esm/theme/stitches.config.js +1 -88
- package/esm/theme/theme-context.js +1 -22
- package/esm/theme/theme-provider.js +1 -115
- package/esm/theme/types.js +1 -3
- package/esm/theme/utils.js +1 -113
- package/esm/tooltip/index.js +1 -17
- package/esm/tooltip/placement.js +1 -193
- package/esm/tooltip/tooltip-content.js +1 -135
- package/esm/tooltip/tooltip.js +1 -141
- package/esm/tooltip/tooltip.styles.js +1 -159
- package/esm/use-body-scroll/index.js +1 -12
- package/esm/use-body-scroll/use-body-scroll.js +1 -77
- package/esm/use-click-anywhere/index.js +1 -12
- package/esm/use-click-anywhere/use-click-anywhere.js +1 -19
- package/esm/use-click-away/index.js +1 -12
- package/esm/use-click-away/use-click-away.js +1 -23
- package/esm/use-clipboard/index.js +1 -12
- package/esm/use-clipboard/use-clipboard.js +1 -57
- package/esm/use-current-state/index.js +1 -12
- package/esm/use-current-state/use-current-state.js +1 -28
- package/esm/use-drip/index.js +1 -12
- package/esm/use-drip/use-drip.js +1 -38
- package/esm/use-input/index.js +1 -12
- package/esm/use-input/use-input.js +1 -32
- package/esm/use-keyboard/codes.js +1 -104
- package/esm/use-keyboard/helper.js +1 -35
- package/esm/use-keyboard/index.js +1 -15
- package/esm/use-keyboard/use-keyboard.js +1 -76
- package/esm/use-pagination/index.js +1 -88
- package/esm/use-portal/index.js +1 -12
- package/esm/use-portal/use-portal.js +1 -43
- package/esm/use-real-shape/index.js +1 -12
- package/esm/use-real-shape/use-real-shape.js +1 -55
- package/esm/use-resize/index.js +1 -12
- package/esm/use-resize/use-resize.js +1 -23
- package/esm/use-ssr/index.js +1 -12
- package/esm/use-ssr/use-ssr.js +1 -25
- package/esm/use-theme/index.js +1 -12
- package/esm/use-theme/use-theme.js +1 -16
- package/esm/use-warning/index.js +1 -12
- package/esm/use-warning/use-warning.js +1 -23
- package/esm/user/index.js +1 -21
- package/esm/user/user-link.js +1 -46
- package/esm/user/user.js +1 -63
- package/esm/user/user.styles.js +1 -56
- package/esm/utils/assertion.js +1 -42
- package/esm/utils/clear-icon.js +1 -70
- package/esm/utils/clsx.js +1 -57
- package/esm/utils/collections.js +1 -110
- package/esm/utils/color.js +1 -187
- package/esm/utils/css-transition.js +1 -76
- package/esm/utils/deep-merge.js +1 -33
- package/esm/utils/dimensions.js +1 -10
- package/esm/utils/dom.js +1 -110
- package/esm/utils/drip.js +1 -116
- package/esm/utils/expand.js +1 -109
- package/esm/utils/icons.js +1 -481
- package/esm/utils/numbers.js +1 -23
- package/esm/utils/object.js +1 -40
- package/esm/utils/prop-types.js +1 -56
- package/esm/utils/react.js +1 -24
- package/esm/utils/strings.js +1 -18
- package/esm/utils/types.d.js +1 -3
- package/esm/utils/with-defaults.js +1 -13
- package/package.json +8 -3
- package/{cjs → types}/avatar/avatar-group.d.ts +0 -0
- package/{cjs → types}/avatar/avatar-group.styles.d.ts +82 -0
- package/{cjs → types}/avatar/avatar.d.ts +0 -0
- package/{esm → types}/avatar/avatar.styles.d.ts +41 -0
- package/{cjs → types}/avatar/index.d.ts +0 -0
- package/{cjs → types}/backdrop/backdrop.d.ts +1 -1
- package/{cjs → types}/backdrop/backdrop.styles.d.ts +123 -0
- package/{cjs → types}/backdrop/index.d.ts +0 -0
- package/{cjs → types}/button/button-group-context.d.ts +0 -0
- package/{cjs → types}/button/button-group.d.ts +0 -0
- package/{cjs → types}/button/button-group.styles.d.ts +41 -0
- package/{esm → types}/button/button-icon.d.ts +42 -0
- package/{cjs → types}/button/button.d.ts +1 -0
- package/{esm/backdrop/backdrop.styles.d.ts → types/button/button.styles.d.ts} +1286 -898
- package/{cjs → types}/button/index.d.ts +0 -0
- package/{cjs → types}/button/utils.d.ts +0 -0
- package/{cjs → types}/card/card.d.ts +0 -0
- package/{cjs → types}/card/card.styles.d.ts +164 -0
- package/{cjs → types}/card/index.d.ts +0 -0
- package/{cjs → types}/checkbox/checkbox-context.d.ts +0 -0
- package/{cjs → types}/checkbox/checkbox-group.d.ts +0 -0
- package/{cjs → types}/checkbox/checkbox.d.ts +0 -0
- package/{cjs → types}/checkbox/checkbox.styles.d.ts +369 -0
- package/{cjs → types}/checkbox/index.d.ts +0 -0
- package/{cjs → types}/code/code.d.ts +0 -0
- package/{esm → types}/code/code.styles.d.ts +82 -0
- package/{cjs → types}/code/index.d.ts +0 -0
- package/{cjs → types}/col/col.d.ts +0 -0
- package/{cjs → types}/col/col.styles.d.ts +41 -0
- package/{cjs → types}/col/index.d.ts +0 -0
- package/{cjs → types}/collapse/collapse-context.d.ts +0 -0
- package/{cjs → types}/collapse/collapse-group.d.ts +0 -0
- package/{cjs → types}/collapse/collapse-icon.d.ts +0 -0
- package/{esm → types}/collapse/collapse.d.ts +5 -3
- package/{esm → types}/collapse/collapse.styles.d.ts +205 -0
- package/{cjs → types}/collapse/index.d.ts +0 -0
- package/{cjs → types}/container/container.d.ts +0 -0
- package/{cjs → types}/container/container.styles.d.ts +41 -0
- package/{cjs → types}/container/index.d.ts +0 -0
- package/{cjs → types}/css-baseline/css-baseline.d.ts +0 -0
- package/{cjs → types}/css-baseline/index.d.ts +0 -0
- package/{cjs → types}/divider/divider.d.ts +0 -0
- package/{esm → types}/divider/divider.styles.d.ts +82 -0
- package/{cjs → types}/divider/index.d.ts +0 -0
- package/{cjs → types}/grid/grid-container.d.ts +0 -0
- package/{cjs → types}/grid/grid-item.d.ts +0 -0
- package/{cjs → types}/grid/grid.d.ts +0 -0
- package/{cjs → types}/grid/grid.styles.d.ts +82 -0
- package/{cjs → types}/grid/index.d.ts +0 -0
- package/{cjs → types}/image/image.d.ts +0 -0
- package/{cjs → types}/image/image.skeleton.d.ts +0 -0
- package/{esm → types}/image/image.styles.d.ts +123 -0
- package/{cjs → types}/image/index.d.ts +0 -0
- package/{cjs → types}/index.d.ts +0 -0
- package/{cjs → types}/input/index.d.ts +0 -0
- package/{cjs → types}/input/input-password.d.ts +0 -0
- package/{cjs → types}/input/input-props.d.ts +0 -0
- package/{cjs → types}/input/input.d.ts +0 -0
- package/{cjs → types}/input/input.styles.d.ts +451 -0
- package/{cjs → types}/input/password-icon.d.ts +0 -0
- package/{cjs → types}/link/icon.d.ts +0 -0
- package/{cjs → types}/link/index.d.ts +0 -0
- package/{cjs → types}/link/link.d.ts +1 -1
- package/{cjs → types}/link/link.styles.d.ts +83 -1
- package/{cjs → types}/loading/index.d.ts +0 -0
- package/{cjs → types}/loading/loading.d.ts +0 -0
- package/{esm → types}/loading/loading.styles.d.ts +246 -0
- package/{cjs → types}/loading/spinner.d.ts +0 -0
- package/{cjs → types}/modal/index.d.ts +0 -0
- package/{cjs → types}/modal/modal-body.d.ts +0 -0
- package/{cjs → types}/modal/modal-close-button.d.ts +0 -0
- package/{cjs → types}/modal/modal-context.d.ts +0 -0
- package/{cjs → types}/modal/modal-footer.d.ts +0 -0
- package/{cjs → types}/modal/modal-header.d.ts +0 -0
- package/{cjs → types}/modal/modal-wrapper.d.ts +0 -0
- package/{cjs → types}/modal/modal.d.ts +0 -0
- package/{cjs → types}/modal/modal.styles.d.ts +246 -0
- package/{cjs → types}/modal/use-modal.d.ts +0 -0
- package/{cjs → types}/pagination/index.d.ts +0 -0
- package/{cjs → types}/pagination/pagination-ellipsis.d.ts +0 -0
- package/{cjs → types}/pagination/pagination-highlight.d.ts +0 -0
- package/{cjs → types}/pagination/pagination-icon.d.ts +0 -0
- package/{cjs → types}/pagination/pagination-item.d.ts +0 -0
- package/{cjs → types}/pagination/pagination.d.ts +0 -0
- package/{esm → types}/pagination/pagination.styles.d.ts +246 -0
- package/{cjs → types}/progress/index.d.ts +0 -0
- package/{esm → types}/progress/progress.d.ts +1 -1
- package/{esm → types}/progress/progress.styles.d.ts +83 -1
- package/{cjs → types}/radio/index.d.ts +0 -0
- package/{cjs → types}/radio/radio-context.d.ts +0 -0
- package/{cjs → types}/radio/radio-group.d.ts +0 -0
- package/{cjs → types}/radio/radio.d.ts +0 -0
- package/{cjs → types}/radio/radio.styles.d.ts +246 -0
- package/{cjs → types}/row/index.d.ts +0 -0
- package/{cjs → types}/row/row.d.ts +0 -0
- package/{cjs → types}/row/row.styles.d.ts +41 -0
- package/{cjs → types}/snippet/index.d.ts +0 -0
- package/{cjs → types}/snippet/snippet-icon.d.ts +0 -0
- package/{cjs → types}/snippet/snippet.d.ts +0 -0
- package/{esm → types}/snippet/snippet.styles.d.ts +164 -0
- package/{cjs → types}/spacer/index.d.ts +0 -0
- package/{cjs → types}/spacer/spacer.d.ts +0 -0
- package/{cjs → types}/spacer/spacer.styles.d.ts +41 -0
- package/{cjs → types}/switch/index.d.ts +1 -1
- package/{cjs → types}/switch/switch.d.ts +0 -0
- package/{cjs → types}/switch/switch.styles.d.ts +164 -0
- package/{esm → types}/text/child.d.ts +2 -0
- package/{cjs → types}/text/index.d.ts +0 -0
- package/{cjs → types}/text/text.d.ts +3 -3
- package/{cjs → types}/text/text.styles.d.ts +41 -0
- package/{cjs → types}/textarea/index.d.ts +0 -0
- package/{cjs → types}/textarea/textarea.d.ts +0 -0
- package/{cjs → types}/textarea/utils.d.ts +0 -0
- package/{cjs → types}/theme/common.d.ts +76 -0
- package/{cjs → types}/theme/dark-theme.d.ts +10 -0
- package/{cjs → types}/theme/light-theme.d.ts +0 -0
- package/{cjs → types}/theme/stitches.config.d.ts +5411 -4087
- package/{cjs → types}/theme/theme-context.d.ts +0 -0
- package/{cjs → types}/theme/theme-provider.d.ts +0 -0
- package/{cjs → types}/theme/types.d.ts +1 -0
- package/{cjs → types}/theme/utils.d.ts +0 -0
- package/{cjs → types}/tooltip/index.d.ts +0 -0
- package/{cjs → types}/tooltip/placement.d.ts +0 -0
- package/{cjs → types}/tooltip/tooltip-content.d.ts +0 -0
- package/{esm → types}/tooltip/tooltip.d.ts +4 -1
- package/{esm → types}/tooltip/tooltip.styles.d.ts +164 -0
- package/{cjs → types}/use-body-scroll/index.d.ts +0 -0
- package/{cjs → types}/use-body-scroll/use-body-scroll.d.ts +0 -0
- package/{cjs → types}/use-click-anywhere/index.d.ts +0 -0
- package/{cjs → types}/use-click-anywhere/use-click-anywhere.d.ts +0 -0
- package/{cjs → types}/use-click-away/index.d.ts +0 -0
- package/{cjs → types}/use-click-away/use-click-away.d.ts +0 -0
- package/{cjs → types}/use-clipboard/index.d.ts +0 -0
- package/{cjs → types}/use-clipboard/use-clipboard.d.ts +0 -0
- package/{cjs → types}/use-current-state/index.d.ts +0 -0
- package/{cjs → types}/use-current-state/use-current-state.d.ts +0 -0
- package/{cjs → types}/use-drip/index.d.ts +0 -0
- package/{cjs → types}/use-drip/use-drip.d.ts +0 -0
- package/{cjs → types}/use-input/index.d.ts +0 -0
- package/{cjs → types}/use-input/use-input.d.ts +0 -0
- package/{cjs → types}/use-keyboard/codes.d.ts +0 -0
- package/{cjs → types}/use-keyboard/helper.d.ts +0 -0
- package/{cjs → types}/use-keyboard/index.d.ts +0 -0
- package/{cjs → types}/use-keyboard/use-keyboard.d.ts +0 -0
- package/{cjs → types}/use-pagination/index.d.ts +0 -0
- package/{cjs → types}/use-portal/index.d.ts +0 -0
- package/{cjs → types}/use-portal/use-portal.d.ts +0 -0
- package/{cjs → types}/use-real-shape/index.d.ts +0 -0
- package/{cjs → types}/use-real-shape/use-real-shape.d.ts +0 -0
- package/{cjs → types}/use-resize/index.d.ts +0 -0
- package/{cjs → types}/use-resize/use-resize.d.ts +0 -0
- package/{cjs → types}/use-ssr/index.d.ts +0 -0
- package/{cjs → types}/use-ssr/use-ssr.d.ts +0 -0
- package/{cjs → types}/use-theme/index.d.ts +0 -0
- package/{cjs → types}/use-theme/use-theme.d.ts +0 -0
- package/{cjs → types}/use-warning/index.d.ts +0 -0
- package/{cjs → types}/use-warning/use-warning.d.ts +0 -0
- package/{cjs → types}/user/index.d.ts +0 -0
- package/{cjs → types}/user/user-link.d.ts +0 -0
- package/{cjs → types}/user/user.d.ts +0 -0
- package/{cjs → types}/user/user.styles.d.ts +205 -0
- package/{cjs → types}/utils/assertion.d.ts +0 -0
- package/{cjs → types}/utils/clear-icon.d.ts +0 -0
- package/{cjs → types}/utils/clsx.d.ts +0 -0
- package/{cjs → types}/utils/collections.d.ts +0 -0
- package/{cjs → types}/utils/color.d.ts +0 -0
- package/{cjs → types}/utils/css-transition.d.ts +0 -0
- package/{cjs → types}/utils/deep-merge.d.ts +0 -0
- package/{cjs → types}/utils/dimensions.d.ts +0 -0
- package/{cjs → types}/utils/drip.d.ts +41 -0
- package/{cjs → types}/utils/expand.d.ts +0 -0
- package/{cjs → types}/utils/numbers.d.ts +0 -0
- package/{cjs → types}/utils/object.d.ts +0 -0
- package/{cjs → types}/utils/prop-types.d.ts +0 -0
- package/{cjs → types}/utils/with-defaults.d.ts +0 -0
- package/umd/nextui.js +4532 -602
- package/umd/nextui.min.js +1 -1
- package/cjs/avatar/avatar.styles.d.ts +0 -904
- package/cjs/button/button-icon.d.ts +0 -909
- package/cjs/button/button.styles.d.ts +0 -907
- package/cjs/code/code.styles.d.ts +0 -1782
- package/cjs/collapse/collapse.d.ts +0 -41
- package/cjs/collapse/collapse.styles.d.ts +0 -4472
- package/cjs/divider/divider.styles.d.ts +0 -1787
- package/cjs/image/image.styles.d.ts +0 -2676
- package/cjs/loading/loading.styles.d.ts +0 -5356
- package/cjs/pagination/pagination.styles.d.ts +0 -5369
- package/cjs/progress/progress.d.ts +0 -65
- package/cjs/progress/progress.styles.d.ts +0 -1793
- package/cjs/snippet/snippet.styles.d.ts +0 -3570
- package/cjs/text/child.d.ts +0 -21
- package/cjs/theme/ssr-provider.d.ts +0 -7
- package/cjs/theme/ssr-provider.js +0 -51
- package/cjs/tooltip/tooltip.d.ts +0 -56
- package/cjs/tooltip/tooltip.styles.d.ts +0 -3571
- package/esm/avatar/avatar-group.d.ts +0 -13
- package/esm/avatar/avatar-group.styles.d.ts +0 -1785
- package/esm/avatar/avatar.d.ts +0 -21
- package/esm/avatar/index.d.ts +0 -7
- package/esm/backdrop/backdrop.d.ts +0 -37
- package/esm/backdrop/index.d.ts +0 -5
- package/esm/button/button-group-context.d.ts +0 -20
- package/esm/button/button-group.d.ts +0 -34
- package/esm/button/button-group.styles.d.ts +0 -899
- package/esm/button/button.d.ts +0 -30
- package/esm/button/button.styles.d.ts +0 -907
- package/esm/button/index.d.ts +0 -10
- package/esm/button/utils.d.ts +0 -4
- package/esm/card/card.d.ts +0 -23
- package/esm/card/card.styles.d.ts +0 -3575
- package/esm/card/index.d.ts +0 -5
- package/esm/checkbox/checkbox-context.d.ts +0 -13
- package/esm/checkbox/checkbox-group.d.ts +0 -29
- package/esm/checkbox/checkbox.d.ts +0 -58
- package/esm/checkbox/checkbox.styles.d.ts +0 -8054
- package/esm/checkbox/index.d.ts +0 -6
- package/esm/code/code.d.ts +0 -15
- package/esm/code/index.d.ts +0 -5
- package/esm/col/col.d.ts +0 -20
- package/esm/col/col.styles.d.ts +0 -893
- package/esm/col/index.d.ts +0 -5
- package/esm/collapse/collapse-context.d.ts +0 -9
- package/esm/collapse/collapse-group.d.ts +0 -18
- package/esm/collapse/collapse-icon.d.ts +0 -19
- package/esm/collapse/index.d.ts +0 -6
- package/esm/container/container.d.ts +0 -40
- package/esm/container/container.styles.d.ts +0 -896
- package/esm/container/index.d.ts +0 -5
- package/esm/css-baseline/css-baseline.d.ts +0 -9
- package/esm/css-baseline/index.d.ts +0 -1
- package/esm/divider/divider.d.ts +0 -22
- package/esm/divider/index.d.ts +0 -5
- package/esm/grid/grid-container.d.ts +0 -22
- package/esm/grid/grid-item.d.ts +0 -37
- package/esm/grid/grid.d.ts +0 -9
- package/esm/grid/grid.styles.d.ts +0 -1783
- package/esm/grid/index.d.ts +0 -7
- package/esm/image/image.d.ts +0 -29
- package/esm/image/image.skeleton.d.ts +0 -19
- package/esm/image/index.d.ts +0 -5
- package/esm/index.d.ts +0 -79
- package/esm/input/index.d.ts +0 -7
- package/esm/input/input-password.d.ts +0 -98
- package/esm/input/input-props.d.ts +0 -66
- package/esm/input/input.d.ts +0 -18
- package/esm/input/input.styles.d.ts +0 -9854
- package/esm/input/password-icon.d.ts +0 -6
- package/esm/link/icon.d.ts +0 -4
- package/esm/link/index.d.ts +0 -5
- package/esm/link/link.d.ts +0 -43
- package/esm/link/link.styles.d.ts +0 -1788
- package/esm/loading/index.d.ts +0 -7
- package/esm/loading/loading.d.ts +0 -24
- package/esm/loading/spinner.d.ts +0 -17
- package/esm/modal/index.d.ts +0 -8
- package/esm/modal/modal-body.d.ts +0 -45
- package/esm/modal/modal-close-button.d.ts +0 -13
- package/esm/modal/modal-context.d.ts +0 -8
- package/esm/modal/modal-footer.d.ts +0 -24
- package/esm/modal/modal-header.d.ts +0 -24
- package/esm/modal/modal-wrapper.d.ts +0 -24
- package/esm/modal/modal.d.ts +0 -42
- package/esm/modal/modal.styles.d.ts +0 -5362
- package/esm/modal/use-modal.d.ts +0 -11
- package/esm/pagination/index.d.ts +0 -7
- package/esm/pagination/pagination-ellipsis.d.ts +0 -11
- package/esm/pagination/pagination-highlight.d.ts +0 -14
- package/esm/pagination/pagination-icon.d.ts +0 -16
- package/esm/pagination/pagination-item.d.ts +0 -22
- package/esm/pagination/pagination.d.ts +0 -46
- package/esm/progress/index.d.ts +0 -5
- package/esm/radio/index.d.ts +0 -4
- package/esm/radio/radio-context.d.ts +0 -13
- package/esm/radio/radio-group.d.ts +0 -30
- package/esm/radio/radio.d.ts +0 -45
- package/esm/radio/radio.styles.d.ts +0 -5357
- package/esm/row/index.d.ts +0 -5
- package/esm/row/row.d.ts +0 -21
- package/esm/row/row.styles.d.ts +0 -895
- package/esm/snippet/index.d.ts +0 -5
- package/esm/snippet/snippet-icon.d.ts +0 -21
- package/esm/snippet/snippet.d.ts +0 -35
- package/esm/spacer/index.d.ts +0 -5
- package/esm/spacer/spacer.d.ts +0 -41
- package/esm/spacer/spacer.styles.d.ts +0 -894
- package/esm/switch/index.d.ts +0 -5
- package/esm/switch/switch.d.ts +0 -82
- package/esm/switch/switch.styles.d.ts +0 -3576
- package/esm/text/index.d.ts +0 -4
- package/esm/text/text.d.ts +0 -59
- package/esm/text/text.styles.d.ts +0 -894
- package/esm/textarea/index.d.ts +0 -3
- package/esm/textarea/textarea.d.ts +0 -42
- package/esm/textarea/utils.d.ts +0 -13
- package/esm/theme/common.d.ts +0 -1584
- package/esm/theme/dark-theme.d.ts +0 -33
- package/esm/theme/light-theme.d.ts +0 -28
- package/esm/theme/ssr-provider.d.ts +0 -7
- package/esm/theme/ssr-provider.js +0 -51
- package/esm/theme/stitches.config.d.ts +0 -8700
- package/esm/theme/theme-context.d.ts +0 -5
- package/esm/theme/theme-provider.d.ts +0 -14
- package/esm/theme/types.d.ts +0 -75
- package/esm/theme/utils.d.ts +0 -16
- package/esm/tooltip/index.d.ts +0 -6
- package/esm/tooltip/placement.d.ts +0 -39
- package/esm/tooltip/tooltip-content.d.ts +0 -27
- package/esm/use-body-scroll/index.d.ts +0 -3
- package/esm/use-body-scroll/use-body-scroll.d.ts +0 -9
- package/esm/use-click-anywhere/index.d.ts +0 -2
- package/esm/use-click-anywhere/use-click-anywhere.d.ts +0 -2
- package/esm/use-click-away/index.d.ts +0 -2
- package/esm/use-click-away/use-click-away.d.ts +0 -3
- package/esm/use-clipboard/index.d.ts +0 -3
- package/esm/use-clipboard/use-clipboard.d.ts +0 -8
- package/esm/use-current-state/index.d.ts +0 -2
- package/esm/use-current-state/use-current-state.d.ts +0 -8
- package/esm/use-drip/index.d.ts +0 -2
- package/esm/use-drip/use-drip.d.ts +0 -9
- package/esm/use-input/index.d.ts +0 -2
- package/esm/use-input/use-input.d.ts +0 -13
- package/esm/use-keyboard/codes.d.ts +0 -92
- package/esm/use-keyboard/helper.d.ts +0 -3
- package/esm/use-keyboard/index.d.ts +0 -5
- package/esm/use-keyboard/use-keyboard.d.ts +0 -22
- package/esm/use-pagination/index.d.ts +0 -20
- package/esm/use-portal/index.d.ts +0 -2
- package/esm/use-portal/use-portal.d.ts +0 -2
- package/esm/use-real-shape/index.d.ts +0 -2
- package/esm/use-real-shape/use-real-shape.d.ts +0 -9
- package/esm/use-resize/index.d.ts +0 -2
- package/esm/use-resize/use-resize.d.ts +0 -2
- package/esm/use-ssr/index.d.ts +0 -2
- package/esm/use-ssr/use-ssr.d.ts +0 -6
- package/esm/use-theme/index.d.ts +0 -2
- package/esm/use-theme/use-theme.d.ts +0 -3
- package/esm/use-warning/index.d.ts +0 -2
- package/esm/use-warning/use-warning.d.ts +0 -2
- package/esm/user/index.d.ts +0 -6
- package/esm/user/user-link.d.ts +0 -32
- package/esm/user/user.d.ts +0 -35
- package/esm/user/user.styles.d.ts +0 -4456
- package/esm/utils/assertion.d.ts +0 -8
- package/esm/utils/clear-icon.d.ts +0 -16
- package/esm/utils/clsx.d.ts +0 -1
- package/esm/utils/collections.d.ts +0 -12
- package/esm/utils/color.d.ts +0 -28
- package/esm/utils/css-transition.d.ts +0 -27
- package/esm/utils/deep-merge.d.ts +0 -1
- package/esm/utils/dimensions.d.ts +0 -1
- package/esm/utils/drip.d.ts +0 -936
- package/esm/utils/expand.d.ts +0 -20
- package/esm/utils/numbers.d.ts +0 -9
- package/esm/utils/object.d.ts +0 -11
- package/esm/utils/prop-types.d.ts +0 -54
- package/esm/utils/with-defaults.d.ts +0 -3
|
@@ -1,878 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.StyledInputWrapper = exports.StyledInputPlaceholder = exports.StyledInputMainContainer = exports.StyledInputLabel = exports.StyledInputContent = exports.StyledInputContainer = exports.StyledInputClearButton = exports.StyledInputBlockLabel = exports.StyledInput = exports.StyledHelperTextContainer = exports.StyledHelperText = void 0;
|
|
5
|
-
|
|
6
|
-
var _stitches = require("../theme/stitches.config");
|
|
7
|
-
|
|
8
|
-
var _color = require("../utils/color");
|
|
9
|
-
|
|
10
|
-
const baseInputValues = {
|
|
11
|
-
$$inputColor: '$colors$accents1',
|
|
12
|
-
$$inputTextColor: '$colors$text',
|
|
13
|
-
$$inputPlaceholderColor: '$colors$accents3',
|
|
14
|
-
$$inputPlaceholderOpacity: 1,
|
|
15
|
-
$$inputShadow: '$shadows$sm',
|
|
16
|
-
$$inputBorderColor: '$colors$border',
|
|
17
|
-
$$inputHoverBorderColor: '$colors$foreground',
|
|
18
|
-
$$inputLabelColor: '$$inputHoverBorderColor'
|
|
19
|
-
};
|
|
20
|
-
const StyledInputMainContainer = (0, _stitches.styled)('div', { ...baseInputValues,
|
|
21
|
-
display: 'inline-flex',
|
|
22
|
-
flexDirection: 'column',
|
|
23
|
-
justifyContent: 'center',
|
|
24
|
-
position: 'relative',
|
|
25
|
-
boxSizing: 'border-box',
|
|
26
|
-
WebkitBoxAlign: 'center',
|
|
27
|
-
variants: {
|
|
28
|
-
color: {
|
|
29
|
-
default: {},
|
|
30
|
-
primary: {
|
|
31
|
-
$$inputHoverBorderColor: '$colors$primary',
|
|
32
|
-
$$inputLabelColor: '$colors$primary'
|
|
33
|
-
},
|
|
34
|
-
secondary: {
|
|
35
|
-
$$inputHoverBorderColor: '$colors$secondary',
|
|
36
|
-
$$inputLabelColor: '$colors$secondary'
|
|
37
|
-
},
|
|
38
|
-
success: {
|
|
39
|
-
$$inputHoverBorderColor: '$colors$success',
|
|
40
|
-
$$inputLabelColor: '$colors$success'
|
|
41
|
-
},
|
|
42
|
-
warning: {
|
|
43
|
-
$$inputHoverBorderColor: '$colors$warning',
|
|
44
|
-
$$inputLabelColor: '$colors$warning'
|
|
45
|
-
},
|
|
46
|
-
error: {
|
|
47
|
-
$$inputHoverBorderColor: '$colors$error',
|
|
48
|
-
$$inputLabelColor: '$colors$error'
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
status: {
|
|
52
|
-
default: {},
|
|
53
|
-
primary: {
|
|
54
|
-
$$inputColor: (0, _color.addColorAlpha)(_stitches.theme == null ? void 0 : _stitches.theme.colors.primary.value, 0.2),
|
|
55
|
-
$$inputPlaceholderColor: '$colors$primary',
|
|
56
|
-
$$inputTextColor: '$colors$primary',
|
|
57
|
-
$$inputLabelColor: '$$inputTextColor',
|
|
58
|
-
$$inputHoverBorderColor: '$colors$primary',
|
|
59
|
-
$$inputPlaceholderOpacity: 0.5
|
|
60
|
-
},
|
|
61
|
-
secondary: {
|
|
62
|
-
$$inputColor: (0, _color.addColorAlpha)(_stitches.theme == null ? void 0 : _stitches.theme.colors.secondary.value, 0.2),
|
|
63
|
-
$$inputPlaceholderColor: '$colors$secondary',
|
|
64
|
-
$$inputTextColor: '$colors$secondary',
|
|
65
|
-
$$inputLabelColor: '$$inputTextColor',
|
|
66
|
-
$$inputHoverBorderColor: '$colors$secondary',
|
|
67
|
-
$$inputPlaceholderOpacity: 0.5
|
|
68
|
-
},
|
|
69
|
-
success: {
|
|
70
|
-
$$inputColor: (0, _color.addColorAlpha)(_stitches.theme == null ? void 0 : _stitches.theme.colors.success.value, 0.2),
|
|
71
|
-
$$inputPlaceholderColor: '$colors$success',
|
|
72
|
-
$$inputTextColor: '$colors$success',
|
|
73
|
-
$$inputLabelColor: '$$inputTextColor',
|
|
74
|
-
$$inputHoverBorderColor: '$colors$success',
|
|
75
|
-
$$inputPlaceholderOpacity: 0.5
|
|
76
|
-
},
|
|
77
|
-
warning: {
|
|
78
|
-
$$inputColor: (0, _color.addColorAlpha)(_stitches.theme == null ? void 0 : _stitches.theme.colors.warning.value, 0.2),
|
|
79
|
-
$$inputPlaceholderColor: '$colors$warning',
|
|
80
|
-
$$inputTextColor: '$colors$warning',
|
|
81
|
-
$$inputLabelColor: '$$inputTextColor',
|
|
82
|
-
$$inputHoverBorderColor: '$colors$warning',
|
|
83
|
-
$$inputPlaceholderOpacity: 0.5
|
|
84
|
-
},
|
|
85
|
-
error: {
|
|
86
|
-
$$inputColor: (0, _color.addColorAlpha)(_stitches.theme == null ? void 0 : _stitches.theme.colors.error.value, 0.2),
|
|
87
|
-
$$inputPlaceholderColor: '$colors$error',
|
|
88
|
-
$$inputTextColor: '$colors$error',
|
|
89
|
-
$$inputLabelColor: '$$inputTextColor',
|
|
90
|
-
$$inputHoverBorderColor: '$colors$error',
|
|
91
|
-
$$inputPlaceholderOpacity: 0.5
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
helperColor: {
|
|
95
|
-
default: {
|
|
96
|
-
$$inputHelperColor: '$colors$text'
|
|
97
|
-
},
|
|
98
|
-
primary: {
|
|
99
|
-
$$inputHelperColor: '$colors$primary'
|
|
100
|
-
},
|
|
101
|
-
secondary: {
|
|
102
|
-
$$inputHelperColor: '$colors$secondary'
|
|
103
|
-
},
|
|
104
|
-
success: {
|
|
105
|
-
$$inputHelperColor: '$colors$success'
|
|
106
|
-
},
|
|
107
|
-
warning: {
|
|
108
|
-
$$inputHelperColor: '$colors$warning'
|
|
109
|
-
},
|
|
110
|
-
error: {
|
|
111
|
-
$$inputHelperColor: '$colors$error'
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
borderWeight: {
|
|
115
|
-
light: {
|
|
116
|
-
$$inputBorderWeight: '$borderWeights$light'
|
|
117
|
-
},
|
|
118
|
-
normal: {
|
|
119
|
-
$$inputBorderWeight: '$borderWeights$normal'
|
|
120
|
-
},
|
|
121
|
-
bold: {
|
|
122
|
-
$$inputBorderWeight: '$borderWeights$bold'
|
|
123
|
-
},
|
|
124
|
-
extrabold: {
|
|
125
|
-
$$inputBorderWeight: '$borderWeights$extrabold'
|
|
126
|
-
},
|
|
127
|
-
black: {
|
|
128
|
-
$$inputBorderWeight: '$borderWeights$black'
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
size: {
|
|
132
|
-
xs: {
|
|
133
|
-
$$inputBorderRadius: '$space$3',
|
|
134
|
-
$$inputFontSize: '$fontSizes$tiny',
|
|
135
|
-
$$inputHeightRatio: '1.2',
|
|
136
|
-
br: '$$inputBorderRadius'
|
|
137
|
-
},
|
|
138
|
-
sm: {
|
|
139
|
-
$$inputBorderRadius: '$space$4',
|
|
140
|
-
$$inputFontSize: '$fontSizes$tiny',
|
|
141
|
-
$$inputHeightRatio: '1.6',
|
|
142
|
-
br: '$$inputBorderRadius'
|
|
143
|
-
},
|
|
144
|
-
md: {
|
|
145
|
-
$$inputBorderRadius: '$space$6',
|
|
146
|
-
$$inputFontSize: '$fontSizes$xs',
|
|
147
|
-
$$inputHeightRatio: '2',
|
|
148
|
-
br: '$$inputBorderRadius'
|
|
149
|
-
},
|
|
150
|
-
lg: {
|
|
151
|
-
$$inputBorderRadius: '$space$7',
|
|
152
|
-
$$inputFontSize: '$fontSizes$base',
|
|
153
|
-
$$inputHeightRatio: '2.2',
|
|
154
|
-
br: '$$inputBorderRadius'
|
|
155
|
-
},
|
|
156
|
-
xl: {
|
|
157
|
-
$$inputBorderRadius: '$space$8',
|
|
158
|
-
$$inputFontSize: '$fontSizes$sm',
|
|
159
|
-
$$inputHeightRatio: '2.6',
|
|
160
|
-
br: '$$inputBorderRadius'
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
rounded: {
|
|
164
|
-
true: {
|
|
165
|
-
$$inputBorderRadius: '$radii$pill'
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
disabled: {
|
|
169
|
-
true: {
|
|
170
|
-
$$inputColor: '$colors$accents2',
|
|
171
|
-
$$inputTextColor: '$colors$accents3',
|
|
172
|
-
$$inputPlaceholderColor: '$colors$accents3',
|
|
173
|
-
$$inputShadow: '$shadows$sm'
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
exports.StyledInputMainContainer = StyledInputMainContainer;
|
|
179
|
-
const StyledInputContainer = (0, _stitches.styled)('div', {
|
|
180
|
-
width: '100%',
|
|
181
|
-
br: '$$inputBorderRadius',
|
|
182
|
-
'@motion': {
|
|
183
|
-
transition: 'none'
|
|
184
|
-
},
|
|
185
|
-
variants: {
|
|
186
|
-
isTextarea: {
|
|
187
|
-
false: {
|
|
188
|
-
display: 'inline-flex',
|
|
189
|
-
alignItems: 'center',
|
|
190
|
-
height: 'calc($$inputHeightRatio * $9)'
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
focused: {
|
|
194
|
-
true: {}
|
|
195
|
-
},
|
|
196
|
-
isReadOnly: {
|
|
197
|
-
false: {}
|
|
198
|
-
},
|
|
199
|
-
underlined: {
|
|
200
|
-
true: {}
|
|
201
|
-
},
|
|
202
|
-
animated: {
|
|
203
|
-
true: {
|
|
204
|
-
transition: '$default'
|
|
205
|
-
},
|
|
206
|
-
false: {
|
|
207
|
-
transition: 'none'
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
compoundVariants: [{
|
|
212
|
-
// underlined && !isReadOnly
|
|
213
|
-
isReadOnly: false,
|
|
214
|
-
underlined: true,
|
|
215
|
-
css: {
|
|
216
|
-
transform: 'none'
|
|
217
|
-
}
|
|
218
|
-
}, {
|
|
219
|
-
// focused && animated && !isReadOnly && !underlined
|
|
220
|
-
focused: true,
|
|
221
|
-
animated: true,
|
|
222
|
-
isReadOnly: false,
|
|
223
|
-
underlined: false,
|
|
224
|
-
css: {
|
|
225
|
-
transform: 'translateY(-$space$1)'
|
|
226
|
-
}
|
|
227
|
-
}]
|
|
228
|
-
});
|
|
229
|
-
exports.StyledInputContainer = StyledInputContainer;
|
|
230
|
-
const StyledInput = (0, _stitches.styled)('input', {
|
|
231
|
-
padding: 0,
|
|
232
|
-
fontSize: '$$inputFontSize',
|
|
233
|
-
bg: 'transparent',
|
|
234
|
-
border: 'none',
|
|
235
|
-
color: '$$inputTextColor',
|
|
236
|
-
br: 0,
|
|
237
|
-
outline: 'none',
|
|
238
|
-
size: '100%',
|
|
239
|
-
minWidth: 0,
|
|
240
|
-
WebkitAppearance: 'none',
|
|
241
|
-
'::placeholder': {
|
|
242
|
-
color: '$$inputPlaceholderColor',
|
|
243
|
-
transition: 'opacity 0.25s ease 0s',
|
|
244
|
-
MozTransition: 'opacity 0.25s ease 0s',
|
|
245
|
-
MsTransition: 'opacity 0.25s ease 0s',
|
|
246
|
-
WebkitTransition: 'opacity 0.25s ease 0s'
|
|
247
|
-
},
|
|
248
|
-
'@motion': {
|
|
249
|
-
transition: 'none',
|
|
250
|
-
'&::placeholder': {
|
|
251
|
-
transition: 'none'
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
'&:disabled': {
|
|
255
|
-
pe: 'none',
|
|
256
|
-
color: '$accents4',
|
|
257
|
-
cursor: 'not-allowed'
|
|
258
|
-
},
|
|
259
|
-
variants: {
|
|
260
|
-
isTextarea: {
|
|
261
|
-
true: {
|
|
262
|
-
boxShadow: 'none',
|
|
263
|
-
display: 'block',
|
|
264
|
-
size: '100%',
|
|
265
|
-
resize: 'none',
|
|
266
|
-
border: 'none',
|
|
267
|
-
outline: 'none'
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
focused: {
|
|
271
|
-
true: {
|
|
272
|
-
'&::placeholder': {
|
|
273
|
-
opacity: 0,
|
|
274
|
-
transition: 'opacity 0.25s ease 0s'
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
bordered: {
|
|
279
|
-
true: {
|
|
280
|
-
padding: '0 $3'
|
|
281
|
-
}
|
|
282
|
-
},
|
|
283
|
-
rounded: {
|
|
284
|
-
true: {
|
|
285
|
-
padding: '0 $3'
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
animated: {
|
|
289
|
-
false: {
|
|
290
|
-
transition: 'none',
|
|
291
|
-
'::placeholder': {
|
|
292
|
-
transition: 'none'
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
},
|
|
296
|
-
hasLeftContent: {
|
|
297
|
-
true: {
|
|
298
|
-
ml: 0
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
hasRightContent: {
|
|
302
|
-
true: {
|
|
303
|
-
mr: 0
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
exports.StyledInput = StyledInput;
|
|
309
|
-
const StyledInputWrapper = (0, _stitches.styled)('div', {
|
|
310
|
-
flex: 1,
|
|
311
|
-
position: 'relative',
|
|
312
|
-
br: '$$inputBorderRadius',
|
|
313
|
-
bg: '$$inputColor',
|
|
314
|
-
display: 'inline-flex',
|
|
315
|
-
verticalAlign: 'middle',
|
|
316
|
-
alignItems: 'center',
|
|
317
|
-
userSelect: 'none',
|
|
318
|
-
'@motion': {
|
|
319
|
-
transition: 'none',
|
|
320
|
-
'&:before': {
|
|
321
|
-
transition: 'none'
|
|
322
|
-
},
|
|
323
|
-
'&:after': {
|
|
324
|
-
transition: 'none'
|
|
325
|
-
}
|
|
326
|
-
},
|
|
327
|
-
variants: {
|
|
328
|
-
focused: {
|
|
329
|
-
true: {}
|
|
330
|
-
},
|
|
331
|
-
isReadOnly: {
|
|
332
|
-
true: {}
|
|
333
|
-
},
|
|
334
|
-
bordered: {
|
|
335
|
-
true: {
|
|
336
|
-
bg: 'transparent',
|
|
337
|
-
border: 'none',
|
|
338
|
-
boxShadow: '0 0 0 $$inputBorderWeight $$inputBorderColor',
|
|
339
|
-
transition: 'box-shadow 0.25s ease'
|
|
340
|
-
}
|
|
341
|
-
},
|
|
342
|
-
shadow: {
|
|
343
|
-
true: {
|
|
344
|
-
transition: '$default'
|
|
345
|
-
}
|
|
346
|
-
},
|
|
347
|
-
disabled: {
|
|
348
|
-
true: {
|
|
349
|
-
cursor: 'not-allowed'
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
underlined: {
|
|
353
|
-
true: {
|
|
354
|
-
bg: 'transparent',
|
|
355
|
-
[`& ${StyledInput}`]: {
|
|
356
|
-
margin: '$2 $3'
|
|
357
|
-
},
|
|
358
|
-
'&:before': {
|
|
359
|
-
content: '',
|
|
360
|
-
position: 'absolute',
|
|
361
|
-
zIndex: '$2',
|
|
362
|
-
width: 0,
|
|
363
|
-
bottom: 0,
|
|
364
|
-
height: '$1',
|
|
365
|
-
left: '50%',
|
|
366
|
-
transform: 'translate(-50%)',
|
|
367
|
-
background: '$$inputHoverBorderColor',
|
|
368
|
-
transition: 'width 0.25s ease'
|
|
369
|
-
},
|
|
370
|
-
'&:after': {
|
|
371
|
-
content: '',
|
|
372
|
-
position: 'absolute',
|
|
373
|
-
zIndex: '$1',
|
|
374
|
-
bottom: 0,
|
|
375
|
-
width: '100%',
|
|
376
|
-
height: '$$inputBorderWeight',
|
|
377
|
-
bg: '$$inputBorderColor'
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
false: {
|
|
381
|
-
[`& ${StyledInput}`]: {
|
|
382
|
-
margin: '$2 $5'
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
},
|
|
386
|
-
animated: {
|
|
387
|
-
false: {
|
|
388
|
-
transition: 'none',
|
|
389
|
-
'&:before': {
|
|
390
|
-
transition: 'none'
|
|
391
|
-
},
|
|
392
|
-
'&:after': {
|
|
393
|
-
transition: 'none'
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
},
|
|
397
|
-
isTextarea: {
|
|
398
|
-
true: {
|
|
399
|
-
boxSizing: 'border-box',
|
|
400
|
-
width: '100%',
|
|
401
|
-
maxWidth: '100%',
|
|
402
|
-
height: 'auto'
|
|
403
|
-
},
|
|
404
|
-
false: {
|
|
405
|
-
height: '100%'
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
},
|
|
409
|
-
compoundVariants: [{
|
|
410
|
-
// underlined && bordered
|
|
411
|
-
bordered: true,
|
|
412
|
-
underlined: true,
|
|
413
|
-
css: {
|
|
414
|
-
boxShadow: '0 0 0 0px $$inputBorderColor'
|
|
415
|
-
}
|
|
416
|
-
}, {
|
|
417
|
-
// focused && underlined
|
|
418
|
-
focused: true,
|
|
419
|
-
underlined: true,
|
|
420
|
-
css: {
|
|
421
|
-
'&:before': {
|
|
422
|
-
width: '100%'
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
}, // focused && shadow && !readOnly
|
|
426
|
-
{
|
|
427
|
-
focused: true,
|
|
428
|
-
shadow: true,
|
|
429
|
-
isReadOnly: false,
|
|
430
|
-
underlined: false,
|
|
431
|
-
css: {
|
|
432
|
-
boxShadow: '$$inputShadow'
|
|
433
|
-
}
|
|
434
|
-
}, // focused && bordered && !readOnly && !underlined
|
|
435
|
-
{
|
|
436
|
-
focused: true,
|
|
437
|
-
bordered: true,
|
|
438
|
-
isReadOnly: false,
|
|
439
|
-
underlined: false,
|
|
440
|
-
css: {
|
|
441
|
-
boxShadow: '0 0 0 $$inputBorderWeight $$inputHoverBorderColor'
|
|
442
|
-
}
|
|
443
|
-
}, // bordered && !readOnly && !underlined
|
|
444
|
-
{
|
|
445
|
-
bordered: true,
|
|
446
|
-
isReadOnly: false,
|
|
447
|
-
underlined: false,
|
|
448
|
-
css: {
|
|
449
|
-
'&:hover': {
|
|
450
|
-
boxShadow: '0 0 0 $$inputBorderWeight $$inputHoverBorderColor'
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
}, // isTextarea && !underlined
|
|
454
|
-
{
|
|
455
|
-
isTextarea: true,
|
|
456
|
-
underlined: false,
|
|
457
|
-
css: {
|
|
458
|
-
[`& ${StyledInput}`]: {
|
|
459
|
-
margin: '$xs $sm'
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
}]
|
|
463
|
-
});
|
|
464
|
-
exports.StyledInputWrapper = StyledInputWrapper;
|
|
465
|
-
const StyledHelperTextContainer = (0, _stitches.styled)('div', {
|
|
466
|
-
position: 'absolute',
|
|
467
|
-
opacity: 0,
|
|
468
|
-
bottom: 'calc($$inputHeightRatio * -$space$5)',
|
|
469
|
-
'@motion': {
|
|
470
|
-
transition: 'none'
|
|
471
|
-
},
|
|
472
|
-
variants: {
|
|
473
|
-
animated: {
|
|
474
|
-
true: {
|
|
475
|
-
transition: 'opacity 0.25s ease'
|
|
476
|
-
},
|
|
477
|
-
false: {
|
|
478
|
-
transition: 'none'
|
|
479
|
-
}
|
|
480
|
-
},
|
|
481
|
-
withValue: {
|
|
482
|
-
true: {
|
|
483
|
-
opacity: 1
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
});
|
|
488
|
-
exports.StyledHelperTextContainer = StyledHelperTextContainer;
|
|
489
|
-
const StyledHelperText = (0, _stitches.styled)('p', {
|
|
490
|
-
margin: '$1 0 0 $5',
|
|
491
|
-
fontSize: '$space$5',
|
|
492
|
-
color: '$$inputHelperColor'
|
|
493
|
-
});
|
|
494
|
-
exports.StyledHelperText = StyledHelperText;
|
|
495
|
-
const StyledInputPlaceholder = (0, _stitches.styled)('span', {}, _stitches.sharedVisuallyHidden); /// Input accessories
|
|
496
|
-
|
|
497
|
-
exports.StyledInputPlaceholder = StyledInputPlaceholder;
|
|
498
|
-
const StyledInputBlockLabel = (0, _stitches.styled)('label', {
|
|
499
|
-
d: 'block',
|
|
500
|
-
fontWeight: '$normal',
|
|
501
|
-
color: '$$inputLabelColor',
|
|
502
|
-
p: '0 0 0 $2',
|
|
503
|
-
mb: '$3',
|
|
504
|
-
fs: '$$inputFontSize',
|
|
505
|
-
lh: '$md',
|
|
506
|
-
WebkitTouchCallout: 'none'
|
|
507
|
-
/* iOS Safari */
|
|
508
|
-
,
|
|
509
|
-
WebkitUserSelect: 'none'
|
|
510
|
-
/* Safari */
|
|
511
|
-
,
|
|
512
|
-
KhtmlUserSelect: 'none'
|
|
513
|
-
/* Konqueror HTML */
|
|
514
|
-
,
|
|
515
|
-
MozUserSelect: 'none'
|
|
516
|
-
/* Firefox */
|
|
517
|
-
,
|
|
518
|
-
MsUserSelect: 'none'
|
|
519
|
-
/* Internet Explorer/Edge */
|
|
520
|
-
,
|
|
521
|
-
us: 'none'
|
|
522
|
-
/* Non-prefixed version, currently supported by Chrome and Opera */
|
|
523
|
-
,
|
|
524
|
-
'> *:first-child': {
|
|
525
|
-
marginTop: 0
|
|
526
|
-
},
|
|
527
|
-
'> *:last-child': {
|
|
528
|
-
mb: 0
|
|
529
|
-
},
|
|
530
|
-
'@motion': {
|
|
531
|
-
transition: 'none'
|
|
532
|
-
},
|
|
533
|
-
variants: {
|
|
534
|
-
rounded: {
|
|
535
|
-
true: {
|
|
536
|
-
padding: '0 0 0 $3'
|
|
537
|
-
}
|
|
538
|
-
},
|
|
539
|
-
asPlaceholder: {
|
|
540
|
-
true: {
|
|
541
|
-
position: 'absolute',
|
|
542
|
-
padding: 0,
|
|
543
|
-
zIndex: '$1',
|
|
544
|
-
left: '$space$6',
|
|
545
|
-
top: '20%',
|
|
546
|
-
mb: 0,
|
|
547
|
-
cursor: 'text',
|
|
548
|
-
color: '$$inputPlaceholderColor',
|
|
549
|
-
transition: 'left 0.25s ease 0s, color 0.25s ease 0s, top 0.25s ease 0s'
|
|
550
|
-
}
|
|
551
|
-
},
|
|
552
|
-
animated: {
|
|
553
|
-
false: {
|
|
554
|
-
transition: 'none'
|
|
555
|
-
}
|
|
556
|
-
},
|
|
557
|
-
focused: {
|
|
558
|
-
true: {
|
|
559
|
-
color: '$$inputHoverBorderColor'
|
|
560
|
-
}
|
|
561
|
-
},
|
|
562
|
-
underlined: {
|
|
563
|
-
true: {}
|
|
564
|
-
},
|
|
565
|
-
withValue: {
|
|
566
|
-
true: {}
|
|
567
|
-
},
|
|
568
|
-
isTextarea: {
|
|
569
|
-
true: {}
|
|
570
|
-
},
|
|
571
|
-
bordered: {
|
|
572
|
-
true: {}
|
|
573
|
-
},
|
|
574
|
-
hasContentLeft: {
|
|
575
|
-
true: {}
|
|
576
|
-
}
|
|
577
|
-
},
|
|
578
|
-
compoundVariants: [// underlined && asPlaceholder
|
|
579
|
-
{
|
|
580
|
-
underlined: true,
|
|
581
|
-
asPlaceholder: true,
|
|
582
|
-
css: {
|
|
583
|
-
left: '$space$2'
|
|
584
|
-
}
|
|
585
|
-
}, // asPlaceholder && focused && !underlined
|
|
586
|
-
{
|
|
587
|
-
asPlaceholder: true,
|
|
588
|
-
focused: true,
|
|
589
|
-
underlined: false,
|
|
590
|
-
css: {
|
|
591
|
-
top: '-72%',
|
|
592
|
-
left: '$2',
|
|
593
|
-
cursor: 'inherit'
|
|
594
|
-
}
|
|
595
|
-
}, // asPlaceholder && focused && underlined
|
|
596
|
-
{
|
|
597
|
-
asPlaceholder: true,
|
|
598
|
-
focused: true,
|
|
599
|
-
underlined: true,
|
|
600
|
-
css: {
|
|
601
|
-
top: '-72%',
|
|
602
|
-
left: '0px',
|
|
603
|
-
cursor: 'inherit'
|
|
604
|
-
}
|
|
605
|
-
}, // asPlaceholder && focused && withValue && !underlined
|
|
606
|
-
{
|
|
607
|
-
asPlaceholder: true,
|
|
608
|
-
withValue: true,
|
|
609
|
-
underlined: false,
|
|
610
|
-
css: {
|
|
611
|
-
color: '$$inputTextColor',
|
|
612
|
-
top: '-72%',
|
|
613
|
-
left: '$2',
|
|
614
|
-
cursor: 'inherit'
|
|
615
|
-
}
|
|
616
|
-
}, // asPlaceholder && focused && withValue && underlined
|
|
617
|
-
{
|
|
618
|
-
asPlaceholder: true,
|
|
619
|
-
withValue: true,
|
|
620
|
-
underlined: true,
|
|
621
|
-
css: {
|
|
622
|
-
color: '$$inputTextColor',
|
|
623
|
-
top: '-72%',
|
|
624
|
-
left: '0px',
|
|
625
|
-
cursor: 'inherit'
|
|
626
|
-
}
|
|
627
|
-
}, // asPlaceholder && isTextarea
|
|
628
|
-
{
|
|
629
|
-
asPlaceholder: true,
|
|
630
|
-
isTextarea: true,
|
|
631
|
-
css: {
|
|
632
|
-
top: '$5'
|
|
633
|
-
}
|
|
634
|
-
}, // asPlaceholder && hasContentLeft
|
|
635
|
-
{
|
|
636
|
-
asPlaceholder: true,
|
|
637
|
-
hasContentLeft: true,
|
|
638
|
-
css: {
|
|
639
|
-
left: 'calc($space$6 + $$inputHeightRatio * $space$7)'
|
|
640
|
-
}
|
|
641
|
-
}, // asPlaceholder && isTextarea && focused
|
|
642
|
-
{
|
|
643
|
-
asPlaceholder: true,
|
|
644
|
-
isTextarea: true,
|
|
645
|
-
focused: true,
|
|
646
|
-
css: {
|
|
647
|
-
top: '-$10'
|
|
648
|
-
}
|
|
649
|
-
}, // asPlaceholder && isTextarea && withValue
|
|
650
|
-
{
|
|
651
|
-
asPlaceholder: true,
|
|
652
|
-
isTextarea: true,
|
|
653
|
-
withValue: true,
|
|
654
|
-
css: {
|
|
655
|
-
top: '-$11'
|
|
656
|
-
}
|
|
657
|
-
}, // focused && asPlaceholder && isTextarea && bordered
|
|
658
|
-
{
|
|
659
|
-
asPlaceholder: true,
|
|
660
|
-
focused: true,
|
|
661
|
-
isTextarea: true,
|
|
662
|
-
bordered: true,
|
|
663
|
-
css: {
|
|
664
|
-
top: '-$12'
|
|
665
|
-
}
|
|
666
|
-
}],
|
|
667
|
-
defaultVariants: {
|
|
668
|
-
asPlaceholder: false
|
|
669
|
-
}
|
|
670
|
-
});
|
|
671
|
-
exports.StyledInputBlockLabel = StyledInputBlockLabel;
|
|
672
|
-
const StyledInputLabel = (0, _stitches.styled)('span', {
|
|
673
|
-
position: 'relative',
|
|
674
|
-
display: 'inline-flex',
|
|
675
|
-
width: 'initial',
|
|
676
|
-
height: '100%',
|
|
677
|
-
fontWeight: '$medium',
|
|
678
|
-
ai: 'center',
|
|
679
|
-
pe: 'none',
|
|
680
|
-
margin: 0,
|
|
681
|
-
padding: '0 $sm',
|
|
682
|
-
color: '$$inputPlaceholderColor',
|
|
683
|
-
fontSize: '$$inputFontSize',
|
|
684
|
-
lineHeight: '$xs',
|
|
685
|
-
variants: {
|
|
686
|
-
isRight: {
|
|
687
|
-
true: {
|
|
688
|
-
btrr: '$$inputBorderRadius',
|
|
689
|
-
bbrr: '$$inputBorderRadius'
|
|
690
|
-
},
|
|
691
|
-
false: {
|
|
692
|
-
btlr: '$$inputBorderRadius',
|
|
693
|
-
bblr: '$$inputBorderRadius'
|
|
694
|
-
}
|
|
695
|
-
},
|
|
696
|
-
isDark: {
|
|
697
|
-
true: {}
|
|
698
|
-
},
|
|
699
|
-
isDefaultStatus: {
|
|
700
|
-
true: {}
|
|
701
|
-
},
|
|
702
|
-
underlined: {
|
|
703
|
-
true: {
|
|
704
|
-
bg: 'transparent'
|
|
705
|
-
}
|
|
706
|
-
},
|
|
707
|
-
bordered: {
|
|
708
|
-
true: {
|
|
709
|
-
'&:after': {
|
|
710
|
-
display: 'none'
|
|
711
|
-
},
|
|
712
|
-
'&:before': {
|
|
713
|
-
display: 'none'
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
},
|
|
718
|
-
compoundVariants: [// isRight && underlined
|
|
719
|
-
{
|
|
720
|
-
isRight: true,
|
|
721
|
-
underlined: true,
|
|
722
|
-
css: {
|
|
723
|
-
borderLeftColor: '$$inputPlaceholderColor',
|
|
724
|
-
borderLeftStyle: 'solid',
|
|
725
|
-
marginLeft: '$2',
|
|
726
|
-
borderLeftWidth: 'calc($$inputBorderWeight / 2)',
|
|
727
|
-
height: '40%'
|
|
728
|
-
}
|
|
729
|
-
}, // !isRight && underlined
|
|
730
|
-
{
|
|
731
|
-
isRight: false,
|
|
732
|
-
underlined: true,
|
|
733
|
-
css: {
|
|
734
|
-
borderRightColor: '$$inputPlaceholderColor',
|
|
735
|
-
borderRightStyle: 'solid',
|
|
736
|
-
marginRight: '$2',
|
|
737
|
-
borderRightWidth: 'calc($$inputBorderWeight / 1)',
|
|
738
|
-
height: '40%'
|
|
739
|
-
}
|
|
740
|
-
}, // isDefaultStatus && !bordered && !underlined
|
|
741
|
-
{
|
|
742
|
-
isDefaultStatus: true,
|
|
743
|
-
bordered: false,
|
|
744
|
-
underlined: false,
|
|
745
|
-
css: {
|
|
746
|
-
bg: '$accents2'
|
|
747
|
-
}
|
|
748
|
-
}, // isDefaultStatus && !bordered && !underlined && isDark
|
|
749
|
-
{
|
|
750
|
-
isDefaultStatus: true,
|
|
751
|
-
bordered: false,
|
|
752
|
-
underlined: false,
|
|
753
|
-
isDark: true,
|
|
754
|
-
css: {
|
|
755
|
-
color: '$accents6'
|
|
756
|
-
}
|
|
757
|
-
}, // !isDefaultStatus && !bordered && !underlined
|
|
758
|
-
{
|
|
759
|
-
isDefaultStatus: false,
|
|
760
|
-
bordered: true,
|
|
761
|
-
underlined: false,
|
|
762
|
-
css: {
|
|
763
|
-
bg: '$$inputColor'
|
|
764
|
-
}
|
|
765
|
-
}, // bordered && isRight
|
|
766
|
-
{
|
|
767
|
-
bordered: true,
|
|
768
|
-
isRight: true,
|
|
769
|
-
css: {
|
|
770
|
-
peddingRight: '$sm',
|
|
771
|
-
paddingLeft: 0
|
|
772
|
-
}
|
|
773
|
-
}, // bordered && !isRight
|
|
774
|
-
{
|
|
775
|
-
bordered: true,
|
|
776
|
-
isRight: false,
|
|
777
|
-
css: {
|
|
778
|
-
peddingLeft: '$sm',
|
|
779
|
-
paddingRight: 0
|
|
780
|
-
}
|
|
781
|
-
}],
|
|
782
|
-
defaultVariants: {
|
|
783
|
-
isRight: false
|
|
784
|
-
}
|
|
785
|
-
});
|
|
786
|
-
exports.StyledInputLabel = StyledInputLabel;
|
|
787
|
-
const StyledInputContent = (0, _stitches.styled)('span', {
|
|
788
|
-
variants: {
|
|
789
|
-
applyStyles: {
|
|
790
|
-
true: {
|
|
791
|
-
display: 'flex',
|
|
792
|
-
boxSizing: 'content-box',
|
|
793
|
-
width: 'calc($$inputHeightRatio * $space$4)',
|
|
794
|
-
height: '100%',
|
|
795
|
-
alignItems: 'center',
|
|
796
|
-
verticalAlign: 'center',
|
|
797
|
-
margin: 0,
|
|
798
|
-
padding: '0 calc($$inputHeightRatio * $3)',
|
|
799
|
-
color: '$$inputTextColor',
|
|
800
|
-
lineHeight: '$xs',
|
|
801
|
-
position: 'relative',
|
|
802
|
-
cursor: 'default',
|
|
803
|
-
pe: 'none'
|
|
804
|
-
}
|
|
805
|
-
},
|
|
806
|
-
clickable: {
|
|
807
|
-
true: {
|
|
808
|
-
cursor: 'pointer',
|
|
809
|
-
pe: 'auto'
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
});
|
|
814
|
-
exports.StyledInputContent = StyledInputContent;
|
|
815
|
-
const StyledInputClearButton = (0, _stitches.styled)('button', {
|
|
816
|
-
position: 'absolute',
|
|
817
|
-
right: 0,
|
|
818
|
-
margin: 0,
|
|
819
|
-
d: 'inline-flex',
|
|
820
|
-
ai: 'center',
|
|
821
|
-
border: 'none',
|
|
822
|
-
bg: 'transparent',
|
|
823
|
-
width: 'auto',
|
|
824
|
-
height: 'auto',
|
|
825
|
-
cursor: 'pointer',
|
|
826
|
-
boxSizing: 'border-box',
|
|
827
|
-
transition: 'color 250ms ease 0s, transform 250ms ease 0s, opacity 250ms ease 0s',
|
|
828
|
-
color: '$$inputPlaceholderColor',
|
|
829
|
-
visibility: 'hidden',
|
|
830
|
-
transform: 'translateX(20%)',
|
|
831
|
-
opacity: 0,
|
|
832
|
-
'&:hover': {
|
|
833
|
-
opacity: 0.85
|
|
834
|
-
},
|
|
835
|
-
svg: {
|
|
836
|
-
color: 'currentColor',
|
|
837
|
-
size: 'calc($space$5 * $$inputHeightRatio)'
|
|
838
|
-
},
|
|
839
|
-
'@motion': {
|
|
840
|
-
transition: 'none'
|
|
841
|
-
},
|
|
842
|
-
variants: {
|
|
843
|
-
visible: {
|
|
844
|
-
true: {
|
|
845
|
-
visibility: 'visible',
|
|
846
|
-
transform: 'translateX(0)',
|
|
847
|
-
opacity: 1
|
|
848
|
-
}
|
|
849
|
-
},
|
|
850
|
-
underlined: {
|
|
851
|
-
true: {
|
|
852
|
-
padding: '0 $1'
|
|
853
|
-
}
|
|
854
|
-
},
|
|
855
|
-
animated: {
|
|
856
|
-
false: {
|
|
857
|
-
transition: 'none'
|
|
858
|
-
}
|
|
859
|
-
},
|
|
860
|
-
hasContentRight: {
|
|
861
|
-
true: {
|
|
862
|
-
padding: 0,
|
|
863
|
-
position: 'relative',
|
|
864
|
-
transform: 'translateX(30%)'
|
|
865
|
-
}
|
|
866
|
-
},
|
|
867
|
-
disabled: {
|
|
868
|
-
true: {
|
|
869
|
-
cursor: 'not-allowed',
|
|
870
|
-
'&:hover': {
|
|
871
|
-
color: '$accents3'
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
}); // types
|
|
877
|
-
|
|
878
|
-
exports.StyledInputClearButton = StyledInputClearButton;
|
|
1
|
+
import{styled as e,sharedVisuallyHidden as o}from"../theme/stitches.config";export const StyledInputMainContainer=e("div",{$$inputColor:"$colors$accents1",$$inputTextColor:"$colors$text",$$inputPlaceholderColor:"$colors$accents3",$$inputPlaceholderOpacity:1,$$inputShadow:"$shadows$sm",$$inputBorderColor:"$colors$border",$$inputHoverBorderColor:"$colors$foreground",$$inputLabelColor:"$$inputHoverBorderColor",display:"inline-flex",flexDirection:"column",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitBoxAlign:"center",variants:{color:{default:{},primary:{$$inputHoverBorderColor:"$colors$primary",$$inputLabelColor:"$colors$primary"},secondary:{$$inputHoverBorderColor:"$colors$secondary",$$inputLabelColor:"$colors$secondary"},success:{$$inputHoverBorderColor:"$colors$success",$$inputLabelColor:"$colors$success"},warning:{$$inputHoverBorderColor:"$colors$warning",$$inputLabelColor:"$colors$warning"},error:{$$inputHoverBorderColor:"$colors$error",$$inputLabelColor:"$colors$error"}},status:{default:{},primary:{$$inputColor:"$colors$primaryLight",$$inputPlaceholderColor:"$colors$primary",$$inputTextColor:"$colors$primary",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$primary",$$inputPlaceholderOpacity:.5},secondary:{$$inputColor:"$colors$secondaryLight",$$inputPlaceholderColor:"$colors$secondary",$$inputTextColor:"$colors$secondary",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$secondary",$$inputPlaceholderOpacity:.5},success:{$$inputColor:"$colors$successLight",$$inputPlaceholderColor:"$colors$success",$$inputTextColor:"$colors$success",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$success",$$inputPlaceholderOpacity:.5},warning:{$$inputColor:"$colors$warningLight",$$inputPlaceholderColor:"$colors$warning",$$inputTextColor:"$colors$warning",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$warning",$$inputPlaceholderOpacity:.5},error:{$$inputColor:"$colors$errorLight",$$inputPlaceholderColor:"$colors$error",$$inputTextColor:"$colors$error",$$inputLabelColor:"$$inputTextColor",$$inputHoverBorderColor:"$colors$error",$$inputPlaceholderOpacity:.5}},helperColor:{default:{$$inputHelperColor:"$colors$text"},primary:{$$inputHelperColor:"$colors$primary"},secondary:{$$inputHelperColor:"$colors$secondary"},success:{$$inputHelperColor:"$colors$success"},warning:{$$inputHelperColor:"$colors$warning"},error:{$$inputHelperColor:"$colors$error"}},borderWeight:{light:{$$inputBorderWeight:"$borderWeights$light"},normal:{$$inputBorderWeight:"$borderWeights$normal"},bold:{$$inputBorderWeight:"$borderWeights$bold"},extrabold:{$$inputBorderWeight:"$borderWeights$extrabold"},black:{$$inputBorderWeight:"$borderWeights$black"}},size:{xs:{$$inputBorderRadius:"$space$3",$$inputFontSize:"$fontSizes$tiny",$$inputHeightRatio:"1.2",br:"$$inputBorderRadius"},sm:{$$inputBorderRadius:"$space$4",$$inputFontSize:"$fontSizes$tiny",$$inputHeightRatio:"1.6",br:"$$inputBorderRadius"},md:{$$inputBorderRadius:"$space$6",$$inputFontSize:"$fontSizes$xs",$$inputHeightRatio:"2",br:"$$inputBorderRadius"},lg:{$$inputBorderRadius:"$space$7",$$inputFontSize:"$fontSizes$base",$$inputHeightRatio:"2.2",br:"$$inputBorderRadius"},xl:{$$inputBorderRadius:"$space$8",$$inputFontSize:"$fontSizes$sm",$$inputHeightRatio:"2.6",br:"$$inputBorderRadius"}},rounded:{true:{$$inputBorderRadius:"$radii$pill"}},disabled:{true:{$$inputColor:"$colors$accents2",$$inputTextColor:"$colors$accents3",$$inputPlaceholderColor:"$colors$accents3",$$inputShadow:"$shadows$sm"}}}});export const StyledInputContainer=e("div",{width:"100%",br:"$$inputBorderRadius","@motion":{transition:"none"},variants:{isTextarea:{false:{display:"inline-flex",alignItems:"center",height:"calc($$inputHeightRatio * $9)"}},focused:{true:{}},isReadOnly:{false:{}},underlined:{true:{}},animated:{true:{transition:"$default"},false:{transition:"none"}}},compoundVariants:[{isReadOnly:!1,underlined:!0,css:{transform:"none"}},{focused:!0,animated:!0,isReadOnly:!1,underlined:!1,css:{transform:"translateY(-$space$1)"}}]});export const StyledInput=e("input",{padding:0,fontSize:"$$inputFontSize",bg:"transparent",border:"none",color:"$$inputTextColor",br:0,outline:"none",size:"100%",minWidth:0,WebkitAppearance:"none","::placeholder":{color:"$$inputPlaceholderColor",transition:"opacity 0.25s ease 0s",MozTransition:"opacity 0.25s ease 0s",MsTransition:"opacity 0.25s ease 0s",WebkitTransition:"opacity 0.25s ease 0s"},"@motion":{transition:"none","&::placeholder":{transition:"none"}},"&:disabled":{pe:"none",color:"$accents4",cursor:"not-allowed"},variants:{isTextarea:{true:{boxShadow:"none",display:"block",size:"100%",resize:"none",border:"none",outline:"none"}},focused:{true:{"&::placeholder":{opacity:0,transition:"opacity 0.25s ease 0s"}}},bordered:{true:{padding:"0 $3"}},rounded:{true:{padding:"0 $3"}},animated:{false:{transition:"none","::placeholder":{transition:"none"}}},hasLeftContent:{true:{ml:0}},hasRightContent:{true:{mr:0}}}});export const StyledInputWrapper=e("div",{flex:1,position:"relative",br:"$$inputBorderRadius",bg:"$$inputColor",display:"inline-flex",verticalAlign:"middle",alignItems:"center",userSelect:"none","@motion":{transition:"none","&:before":{transition:"none"},"&:after":{transition:"none"}},variants:{focused:{true:{}},isReadOnly:{true:{}},bordered:{true:{bg:"transparent",border:"none",boxShadow:"0 0 0 $$inputBorderWeight $$inputBorderColor",transition:"box-shadow 0.25s ease"}},shadow:{true:{transition:"$default"}},disabled:{true:{cursor:"not-allowed"}},underlined:{true:{bg:"transparent",[`& ${StyledInput}`]:{margin:"$2 $3"},"&:before":{content:"",position:"absolute",zIndex:"$2",width:0,bottom:0,height:"$1",left:"50%",transform:"translate(-50%)",background:"$$inputHoverBorderColor",transition:"width 0.25s ease"},"&:after":{content:"",position:"absolute",zIndex:"$1",bottom:0,width:"100%",height:"$$inputBorderWeight",bg:"$$inputBorderColor"}},false:{[`& ${StyledInput}`]:{margin:"$2 $5"}}},animated:{false:{transition:"none","&:before":{transition:"none"},"&:after":{transition:"none"}}},isTextarea:{true:{boxSizing:"border-box",width:"100%",maxWidth:"100%",height:"auto"},false:{height:"100%"}}},compoundVariants:[{bordered:!0,underlined:!0,css:{boxShadow:"0 0 0 0px $$inputBorderColor"}},{focused:!0,underlined:!0,css:{"&:before":{width:"100%"}}},{focused:!0,shadow:!0,isReadOnly:!1,underlined:!1,css:{boxShadow:"$$inputShadow"}},{focused:!0,bordered:!0,isReadOnly:!1,underlined:!1,css:{boxShadow:"0 0 0 $$inputBorderWeight $$inputHoverBorderColor"}},{bordered:!0,isReadOnly:!1,underlined:!1,css:{"&:hover":{boxShadow:"0 0 0 $$inputBorderWeight $$inputHoverBorderColor"}}},{isTextarea:!0,underlined:!1,css:{[`& ${StyledInput}`]:{margin:"$xs $sm"}}}]});export const StyledHelperTextContainer=e("div",{position:"absolute",opacity:0,bottom:"calc($$inputHeightRatio * -$space$5)","@motion":{transition:"none"},variants:{animated:{true:{transition:"opacity 0.25s ease"},false:{transition:"none"}},withValue:{true:{opacity:1}}}});export const StyledHelperText=e("p",{margin:"$1 0 0 $5",fontSize:"$space$5",color:"$$inputHelperColor"});export const StyledInputPlaceholder=e("span",{},o);export const StyledInputBlockLabel=e("label",{d:"block",fontWeight:"$normal",color:"$$inputLabelColor",p:"0 0 0 $2",mb:"$3",fs:"$$inputFontSize",lh:"$md",WebkitTouchCallout:"none",WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",MsUserSelect:"none",us:"none","> *:first-child":{marginTop:0},"> *:last-child":{mb:0},"@motion":{transition:"none"},variants:{rounded:{true:{padding:"0 0 0 $3"}},asPlaceholder:{true:{position:"absolute",padding:0,zIndex:"$1",left:"$space$6",top:"20%",mb:0,cursor:"text",color:"$$inputPlaceholderColor",transition:"left 0.25s ease 0s, color 0.25s ease 0s, top 0.25s ease 0s"}},animated:{false:{transition:"none"}},focused:{true:{color:"$$inputHoverBorderColor"}},underlined:{true:{}},withValue:{true:{}},isTextarea:{true:{}},bordered:{true:{}},hasContentLeft:{true:{}}},compoundVariants:[{underlined:!0,asPlaceholder:!0,css:{left:"$space$2"}},{asPlaceholder:!0,focused:!0,underlined:!1,isTextarea:!1,css:{top:"-72%",left:"$2",cursor:"inherit"}},{asPlaceholder:!0,focused:!0,underlined:!0,isTextarea:!1,css:{top:"-72%",left:"0px",cursor:"inherit"}},{asPlaceholder:!0,withValue:!0,underlined:!1,isTextarea:!1,css:{color:"$$inputTextColor",top:"-72%",left:"$2",cursor:"inherit"}},{asPlaceholder:!0,withValue:!0,underlined:!0,isTextarea:!1,css:{color:"$$inputTextColor",top:"-72%",left:"0px",cursor:"inherit"}},{asPlaceholder:!0,isTextarea:!0,css:{top:"$5"}},{asPlaceholder:!0,hasContentLeft:!0,css:{left:"calc($space$6 + $$inputHeightRatio * $space$7)"}},{asPlaceholder:!0,isTextarea:!0,focused:!0,css:{top:"calc(-$space$10 - $space$3)",left:"$2"}},{asPlaceholder:!0,isTextarea:!0,withValue:!0,css:{top:"-$11"}},{asPlaceholder:!0,focused:!0,isTextarea:!0,bordered:!0,css:{top:"-$12"}}],defaultVariants:{asPlaceholder:!1}});export const StyledInputLabel=e("span",{position:"relative",display:"inline-flex",width:"initial",height:"100%",fontWeight:"$medium",ai:"center",pe:"none",margin:0,padding:"0 $sm",color:"$$inputPlaceholderColor",fontSize:"$$inputFontSize",lineHeight:"$xs",variants:{isRight:{true:{btrr:"$$inputBorderRadius",bbrr:"$$inputBorderRadius"},false:{btlr:"$$inputBorderRadius",bblr:"$$inputBorderRadius"}},isDark:{true:{}},isDefaultStatus:{true:{}},underlined:{true:{bg:"transparent"}},bordered:{true:{"&:after":{display:"none"},"&:before":{display:"none"}}}},compoundVariants:[{isRight:!0,underlined:!0,css:{borderLeftColor:"$$inputPlaceholderColor",borderLeftStyle:"solid",marginLeft:"$2",borderLeftWidth:"calc($$inputBorderWeight / 2)",height:"40%"}},{isRight:!1,underlined:!0,css:{borderRightColor:"$$inputPlaceholderColor",borderRightStyle:"solid",marginRight:"$2",borderRightWidth:"calc($$inputBorderWeight / 1)",height:"40%"}},{isDefaultStatus:!0,bordered:!1,underlined:!1,css:{bg:"$accents2"}},{isDefaultStatus:!0,bordered:!1,underlined:!1,isDark:!0,css:{color:"$accents6"}},{isDefaultStatus:!1,bordered:!0,underlined:!1,css:{bg:"$$inputColor"}},{bordered:!0,isRight:!0,css:{peddingRight:"$sm",paddingLeft:0}},{bordered:!0,isRight:!1,css:{peddingLeft:"$sm",paddingRight:0}}],defaultVariants:{isRight:!1}});export const StyledInputContent=e("span",{variants:{applyStyles:{true:{display:"flex",boxSizing:"content-box",width:"calc($$inputHeightRatio * $space$4)",height:"100%",alignItems:"center",verticalAlign:"center",margin:0,padding:"0 calc($$inputHeightRatio * $3)",color:"$$inputTextColor",lineHeight:"$xs",position:"relative",cursor:"default",pe:"none"}},clickable:{true:{cursor:"pointer",pe:"auto"}}}});export const StyledInputClearButton=e("button",{position:"absolute",right:0,margin:0,d:"inline-flex",ai:"center",border:"none",bg:"transparent",width:"auto",height:"auto",cursor:"pointer",boxSizing:"border-box",transition:"color 250ms ease 0s, transform 250ms ease 0s, opacity 250ms ease 0s",color:"$$inputPlaceholderColor",visibility:"hidden",transform:"translateX(20%)",opacity:0,"&:hover":{opacity:.85},svg:{color:"currentColor",size:"calc($space$5 * $$inputHeightRatio)"},"@motion":{transition:"none"},variants:{visible:{true:{visibility:"visible",transform:"translateX(0)",opacity:1}},underlined:{true:{padding:"0 $1"}},animated:{false:{transition:"none"}},hasContentRight:{true:{padding:0,position:"relative",transform:"translateX(30%)"}},disabled:{true:{cursor:"not-allowed","&:hover":{color:"$accents3"}}}}});
|