@sanity/ui 2.9.0-corel.0 → 3.0.0-static.0
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/bin/ui.js +6 -0
- package/dist/_chunks-cjs/buildCommand.js +2836 -0
- package/dist/_chunks-cjs/buildCommand.js.map +1 -0
- package/dist/_chunks-cjs/getTheme_v2.js +1 -27
- package/dist/_chunks-cjs/getTheme_v2.js.map +1 -1
- package/dist/_chunks-es/getTheme_v2.mjs +1 -27
- package/dist/_chunks-es/getTheme_v2.mjs.map +1 -1
- package/dist/_legacy/getTheme_v2.esm.js +1 -27
- package/dist/_legacy/getTheme_v2.esm.js.map +1 -1
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +23 -0
- package/dist/cli.js.map +1 -0
- package/dist/css.d.mts +943 -0
- package/dist/css.d.ts +943 -0
- package/dist/css.esm.js +3135 -0
- package/dist/css.esm.js.map +1 -0
- package/dist/css.js +3135 -0
- package/dist/css.js.map +1 -0
- package/dist/css.mjs +3135 -0
- package/dist/css.mjs.map +1 -0
- package/dist/index.d.mts +175 -164
- package/dist/index.d.ts +175 -164
- package/dist/index.esm.js +864 -1955
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +870 -1962
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +864 -1955
- package/dist/index.mjs.map +1 -1
- package/dist/sanity-theme.css +25 -0
- package/dist/system.css +2953 -0
- package/dist/theme.d.mts +84 -22
- package/dist/theme.d.ts +84 -22
- package/dist/theme.esm.js +232 -283
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +232 -283
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +232 -283
- package/dist/theme.mjs.map +1 -1
- package/exports/css.ts +1 -0
- package/package.json +25 -4
- package/src/core/__workshop__/constants.ts +15 -15
- package/src/core/__workshop__/fontsPlugin.tsx +1 -1
- package/src/core/components/autocomplete/autocomplete.styles.tsx +1 -1
- package/src/core/components/autocomplete/autocomplete.tsx +12 -4
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +1 -3
- package/src/core/components/breadcrumbs/__workshop__/index.ts +0 -5
- package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +14 -2
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +14 -9
- package/src/core/components/dialog/__workshop__/panes.tsx +1 -1
- package/src/core/components/dialog/dialog.tsx +77 -92
- package/src/core/components/hotkeys/hotkeys.tsx +18 -29
- package/src/core/components/menu/menu.tsx +8 -5
- package/src/core/components/menu/menuDivider.ts +2 -1
- package/src/core/components/menu/menuGroup.tsx +16 -8
- package/src/core/components/menu/menuItem.tsx +23 -14
- package/src/core/components/skeleton/skeleton.tsx +1 -1
- package/src/core/components/skeleton/styles.ts +1 -1
- package/src/core/components/skeleton/textSkeleton.tsx +1 -1
- package/src/core/components/tab/tab.tsx +6 -7
- package/src/core/components/tab/tabList.tsx +3 -2
- package/src/core/components/toast/styles.ts +1 -1
- package/src/core/components/toast/toast.tsx +6 -4
- package/src/core/components/toast/toastProvider.tsx +31 -22
- package/src/core/components/tree/style.ts +1 -1
- package/src/core/components/tree/tree.tsx +8 -2
- package/src/core/components/tree/treeGroup.tsx +1 -1
- package/src/core/components/tree/treeItem.tsx +38 -25
- package/src/core/components/tree/types.ts +5 -1
- package/src/core/lib/styled/elements.ts +135 -0
- package/src/core/lib/styled/index.ts +2 -0
- package/src/core/lib/styled/members.ts +15 -0
- package/src/core/lib/styled/styled.ts +79 -0
- package/src/core/primitives/_selectable/selectable.tsx +27 -14
- package/src/core/primitives/avatar/avatar.tsx +52 -32
- package/src/core/primitives/avatar/avatarCounter.tsx +1 -1
- package/src/core/primitives/avatar/avatarStack.tsx +1 -1
- package/src/core/primitives/badge/__workshop__/tones.tsx +9 -16
- package/src/core/primitives/badge/badge.tsx +18 -20
- package/src/core/primitives/box/box.tsx +62 -74
- package/src/core/primitives/button/__workshop__/props.tsx +3 -1
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled1.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled2.tsx +1 -1
- package/src/core/primitives/button/button.tsx +38 -45
- package/src/core/primitives/button/styles.ts +2 -2
- package/src/core/primitives/card/RootCardContext.ts +3 -0
- package/src/core/primitives/card/__workshop__/selected.tsx +1 -1
- package/src/core/primitives/card/__workshop__/styled.tsx +1 -1
- package/src/core/primitives/card/card.tsx +44 -46
- package/src/core/primitives/card/styles.ts +1 -1
- package/src/core/primitives/checkbox/checkbox.tsx +6 -8
- package/src/core/primitives/code/code.tsx +23 -12
- package/src/core/primitives/code/styles.ts +1 -1
- package/src/core/primitives/container/container.tsx +7 -15
- package/src/core/primitives/flex/__workshop__/example.tsx +1 -1
- package/src/core/primitives/flex/flex.tsx +6 -19
- package/src/core/primitives/grid/grid.tsx +2 -1
- package/src/core/primitives/heading/heading.tsx +32 -19
- package/src/core/primitives/heading/styles.ts +1 -1
- package/src/core/primitives/inline/inline.tsx +22 -13
- package/src/core/primitives/kbd/kbd.tsx +30 -37
- package/src/core/primitives/label/label.tsx +15 -4
- package/src/core/primitives/label/styles.ts +1 -1
- package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +0 -1
- package/src/core/primitives/popover/popover.tsx +21 -15
- package/src/core/primitives/popover/popoverCard.tsx +36 -38
- package/src/core/primitives/radio/radio.tsx +1 -1
- package/src/core/primitives/radio/styles.ts +1 -1
- package/src/core/primitives/select/select.tsx +1 -1
- package/src/core/primitives/select/styles.ts +1 -1
- package/src/core/primitives/spinner/spinner.tsx +6 -20
- package/src/core/primitives/stack/stack.tsx +12 -10
- package/src/core/primitives/switch/styles.ts +9 -9
- package/src/core/primitives/switch/switch.tsx +20 -21
- package/src/core/primitives/text/__workshop__/colored.tsx +1 -1
- package/src/core/primitives/text/styles.ts +1 -2
- package/src/core/primitives/text/text.tsx +17 -21
- package/src/core/primitives/textArea/textArea.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/textInput/textInput.tsx +176 -123
- package/src/core/primitives/tooltip/tooltip.test.tsx +1 -0
- package/src/core/primitives/tooltip/tooltip.tsx +13 -13
- package/src/core/primitives/tooltip/tooltipCard.tsx +15 -14
- package/src/core/primitives/types.ts +35 -16
- package/src/core/styles/border/borderStyle.ts +6 -0
- package/src/core/styles/border/types.ts +1 -0
- package/src/core/styles/box/boxStyle.ts +6 -0
- package/src/core/styles/card/_cardColorStyle.ts +0 -8
- package/src/core/styles/flex/flexStyle.ts +0 -18
- package/src/core/styles/flex/types.ts +1 -3
- package/src/core/styles/grid/gridStyle.ts +0 -10
- package/src/core/styles/helpers.ts +9 -0
- package/src/core/styles/input/textInputStyle.ts +1 -1
- package/src/core/theme/__workshop__/build/Root.tsx +1 -1
- package/src/core/theme/themeProvider.tsx +1 -1
- package/src/core/theme/useTheme.ts +1 -1
- package/src/core/types/avatar.ts +6 -1
- package/src/core/types/button.ts +1 -0
- package/src/core/types/flex.ts +27 -26
- package/src/core/types/gridItem.ts +32 -24
- package/src/core/types/radius.ts +7 -4
- package/src/core/utils/arrow/arrow.tsx +1 -1
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +1 -1
- package/src/core/utils/layer/layer.tsx +28 -11
- package/src/core/utils/srOnly/srOnly.tsx +1 -1
- package/src/core/utils/virtualList/virtualList.tsx +1 -1
- package/src/css/_resp.ts +28 -0
- package/src/css/cli/buildCommand.ts +36 -0
- package/src/css/cli/index.ts +38 -0
- package/src/css/compile/comileRules.ts +59 -0
- package/src/css/compile/compileRule.ts +58 -0
- package/src/css/compile/compileSystem.ts +7 -0
- package/src/css/compile/compileTheme.ts +509 -0
- package/src/css/components/breadcrumbs/breadcrumbs.ts +5 -0
- package/src/css/components/breadcrumbs/index.ts +1 -0
- package/src/css/components/breadcrumbs/rules.ts +7 -0
- package/src/css/components/dialog/classes.ts +29 -0
- package/src/css/components/dialog/index.ts +1 -0
- package/src/css/components/dialog/rules.ts +75 -0
- package/src/css/components/tree/index.ts +1 -0
- package/src/css/components/tree/rules.ts +52 -0
- package/src/css/components/tree/tree.ts +5 -0
- package/src/css/composeClassNames.ts +3 -0
- package/src/css/index.ts +47 -0
- package/src/css/primitives/avatar/avatar.ts +32 -0
- package/src/css/primitives/avatar/index.ts +2 -0
- package/src/css/primitives/avatar/rules.ts +190 -0
- package/src/css/primitives/avatar/types.ts +9 -0
- package/src/css/primitives/badge/badge.ts +8 -0
- package/src/css/primitives/badge/index.ts +2 -0
- package/src/css/primitives/badge/rules.ts +25 -0
- package/src/css/primitives/badge/types.ts +8 -0
- package/src/css/primitives/box/box.ts +34 -0
- package/src/css/primitives/box/index.ts +2 -0
- package/src/css/primitives/box/rules.ts +25 -0
- package/src/css/primitives/box/types.ts +49 -0
- package/src/css/primitives/button/button.ts +26 -0
- package/src/css/primitives/button/index.ts +1 -0
- package/src/css/primitives/button/rules.ts +58 -0
- package/src/css/primitives/card/card.ts +21 -0
- package/src/css/primitives/card/index.ts +1 -0
- package/src/css/primitives/card/rules.ts +93 -0
- package/src/{core/primitives/checkbox/styles.ts → css/primitives/checkbox/__styles.ts} +3 -3
- package/src/css/primitives/checkbox/checkbox.ts +9 -0
- package/src/css/primitives/checkbox/index.ts +1 -0
- package/src/css/primitives/checkbox/rules.ts +136 -0
- package/src/css/primitives/code/code.ts +9 -0
- package/src/css/primitives/code/index.ts +2 -0
- package/src/css/primitives/code/rules.ts +71 -0
- package/src/css/primitives/code/types.ts +10 -0
- package/src/css/primitives/container/container.ts +7 -0
- package/src/css/primitives/container/index.ts +2 -0
- package/src/css/primitives/container/rules.ts +8 -0
- package/src/css/primitives/container/types.ts +6 -0
- package/src/css/primitives/heading/heading.ts +16 -0
- package/src/css/primitives/heading/index.ts +2 -0
- package/src/css/primitives/heading/rules.ts +84 -0
- package/src/css/primitives/heading/types.ts +12 -0
- package/src/css/primitives/kbd/index.ts +2 -0
- package/src/css/primitives/kbd/kbd.ts +7 -0
- package/src/css/primitives/kbd/rules.ts +20 -0
- package/src/css/primitives/kbd/types.ts +5 -0
- package/src/css/primitives/label/index.ts +2 -0
- package/src/css/primitives/label/label.ts +16 -0
- package/src/css/primitives/label/rules.ts +85 -0
- package/src/css/primitives/label/types.ts +12 -0
- package/src/css/primitives/popover/index.ts +1 -0
- package/src/css/primitives/popover/popover.ts +5 -0
- package/src/css/primitives/popover/rules.ts +5 -0
- package/src/css/primitives/radio/index.ts +1 -0
- package/src/css/primitives/radio/radio.ts +5 -0
- package/src/css/primitives/radio/rules.ts +5 -0
- package/src/css/primitives/select/index.ts +1 -0
- package/src/css/primitives/select/rules.ts +5 -0
- package/src/css/primitives/select/select.ts +5 -0
- package/src/{core/primitives/_selectable/style.ts → css/primitives/selectable/__style.ts} +5 -4
- package/src/css/primitives/selectable/index.ts +2 -0
- package/src/css/primitives/selectable/rules.ts +27 -0
- package/src/css/primitives/selectable/selectable.ts +9 -0
- package/src/css/primitives/selectable/types.ts +6 -0
- package/src/css/primitives/spinner/index.ts +1 -0
- package/src/css/primitives/spinner/rules.ts +22 -0
- package/src/css/primitives/spinner/spinner.ts +5 -0
- package/src/css/primitives/switch/index.ts +1 -0
- package/src/css/primitives/switch/rules.ts +132 -0
- package/src/css/primitives/switch/switch.ts +5 -0
- package/src/css/primitives/text/index.ts +2 -0
- package/src/css/primitives/text/rules.ts +75 -0
- package/src/css/primitives/text/text.ts +16 -0
- package/src/css/primitives/text/types.ts +11 -0
- package/src/css/primitives/textArea/index.ts +1 -0
- package/src/css/primitives/textArea/rules.ts +5 -0
- package/src/css/primitives/textArea/textArea.ts +5 -0
- package/src/css/primitives/textInput/index.ts +1 -0
- package/src/css/primitives/textInput/rules.ts +226 -0
- package/src/css/primitives/textInput/textInput.ts +7 -0
- package/src/css/primitives/token/rules.ts +45 -0
- package/src/css/primitives/tooltip/index.ts +1 -0
- package/src/css/primitives/tooltip/rules.ts +17 -0
- package/src/css/primitives/tooltip/tooltip.ts +9 -0
- package/src/css/responsiveRules.ts +25 -0
- package/src/css/rules.ts +121 -0
- package/src/css/styles/border/border.ts +22 -0
- package/src/css/styles/border/index.ts +2 -0
- package/src/css/styles/border/rules.ts +24 -0
- package/src/css/styles/border/types.ts +10 -0
- package/src/css/styles/display/rules.ts +62 -0
- package/src/css/styles/flex/flex.ts +20 -0
- package/src/css/styles/flex/index.ts +2 -0
- package/src/css/styles/flex/rules.ts +28 -0
- package/src/css/styles/flex/types.ts +35 -0
- package/src/css/styles/flexItem/flexItem.ts +8 -0
- package/src/css/styles/flexItem/index.ts +2 -0
- package/src/css/styles/flexItem/rules.ts +11 -0
- package/src/css/styles/flexItem/types.ts +11 -0
- package/src/css/styles/font/font.ts +12 -0
- package/src/css/styles/font/index.ts +2 -0
- package/src/css/styles/font/rules.ts +125 -0
- package/src/css/styles/font/types.ts +6 -0
- package/src/css/styles/gap/gap.ts +8 -0
- package/src/css/styles/gap/index.ts +2 -0
- package/src/css/styles/gap/rules.ts +33 -0
- package/src/css/styles/gap/types.ts +9 -0
- package/src/css/styles/grid/rules.ts +35 -0
- package/src/css/styles/gridItem/gridItem.ts +15 -0
- package/src/css/styles/gridItem/index.ts +2 -0
- package/src/css/styles/gridItem/rules.ts +96 -0
- package/src/css/styles/gridItem/types.ts +41 -0
- package/src/css/styles/height/rules.ts +7 -0
- package/src/css/styles/margin/index.ts +2 -0
- package/src/css/styles/margin/margin.ts +15 -0
- package/src/css/styles/margin/rules.ts +59 -0
- package/src/css/styles/margin/types.ts +11 -0
- package/src/css/styles/maxWidth/index.ts +2 -0
- package/src/css/styles/maxWidth/maxWidth.ts +6 -0
- package/src/css/styles/maxWidth/rules.ts +36 -0
- package/src/css/styles/maxWidth/types.ts +6 -0
- package/src/css/styles/overflow/rules.ts +9 -0
- package/src/css/styles/padding/index.ts +2 -0
- package/src/css/styles/padding/padding.ts +15 -0
- package/src/css/styles/padding/rules.ts +59 -0
- package/src/css/styles/padding/types.ts +12 -0
- package/src/css/styles/pointerEvents/index.ts +2 -0
- package/src/css/styles/pointerEvents/pointerEvents.ts +6 -0
- package/src/css/styles/pointerEvents/rules.ts +11 -0
- package/src/css/styles/pointerEvents/types.ts +7 -0
- package/src/css/styles/position/index.ts +2 -0
- package/src/css/styles/position/position.ts +7 -0
- package/src/css/styles/position/rules.ts +31 -0
- package/src/css/styles/position/types.ts +13 -0
- package/src/css/styles/radius/index.ts +2 -0
- package/src/css/styles/radius/radius.ts +8 -0
- package/src/css/styles/radius/rules.ts +13 -0
- package/src/css/styles/radius/types.ts +7 -0
- package/src/css/styles/shadow/rules.ts +53 -0
- package/src/css/styles/width/index.ts +2 -0
- package/src/css/styles/width/rules.ts +7 -0
- package/src/css/styles/width/types.ts +8 -0
- package/src/css/styles/width/width.ts +6 -0
- package/src/css/types.ts +591 -0
- package/src/css/varNames.ts +381 -0
- package/src/css/vars.ts +313 -0
- package/src/theme/build/_deprecated/color/factory.ts +1 -1
- package/src/theme/build/_deprecated/color/muted/createMuted.ts +2 -2
- package/src/theme/build/buildColorTheme.ts +39 -45
- package/src/theme/build/renderColorTheme.ts +65 -239
- package/src/theme/build/resolveColorTokens.ts +115 -51
- package/src/theme/config/tokens/color/types.ts +18 -4
- package/src/theme/defaults/colorTokens.ts +10 -17
- package/src/theme/defaults/config.ts +1 -1
- package/src/theme/getScopedTheme.ts +2 -9
- package/src/theme/system/_constants.ts +25 -0
- package/src/theme/system/_types.ts +41 -0
- package/src/theme/system/color/_constants.ts +0 -8
- package/src/theme/system/color/badge.ts +7 -3
- package/src/theme/system/index.ts +2 -0
- package/src/theme/system/v0/color/_system.ts +4 -8
- package/src/theme/system/v0/color/color.ts +2 -3
- package/src/theme/versioning/themeColor_v0_v2.ts +0 -26
- package/src/theme/versioning/v0_v2.ts +0 -4
- package/src/core/components/breadcrumbs/__workshop__/buttons.tsx +0 -58
- package/src/core/components/dialog/styles.ts +0 -76
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './popover'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './radio'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './select'
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {getTheme_v2} from '@sanity/ui/theme'
|
|
2
|
-
import {css} from 'styled
|
|
3
|
-
import {ThemeProps} from '
|
|
4
|
-
import {_cardColorStyle} from '
|
|
5
|
-
import {SelectableTone} from '
|
|
2
|
+
import {css} from '../../../core/lib/styled'
|
|
3
|
+
import {ThemeProps} from '../../../core/styles'
|
|
4
|
+
import {_cardColorStyle} from '../../../core/styles/card'
|
|
5
|
+
import {SelectableTone} from '../../../core/types'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @internal
|
|
9
|
+
* @deprecated
|
|
9
10
|
*/
|
|
10
11
|
export interface SelectableStyleProps {
|
|
11
12
|
$tone: SelectableTone
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {Rules} from '../../types'
|
|
2
|
+
|
|
3
|
+
export const selectableRules: Rules = {
|
|
4
|
+
selectable: {
|
|
5
|
+
'backgroundColor': 'inherit',
|
|
6
|
+
'color': 'inherit',
|
|
7
|
+
|
|
8
|
+
'@nest': {
|
|
9
|
+
'&[data-as="button"]': {
|
|
10
|
+
WebkitFontSmoothing: 'inherit',
|
|
11
|
+
appearance: 'none',
|
|
12
|
+
outline: 'none',
|
|
13
|
+
font: 'inherit',
|
|
14
|
+
textAlign: 'inherit',
|
|
15
|
+
border: 0,
|
|
16
|
+
// width: '-moz-available',
|
|
17
|
+
// width: '-webkit-fill-available',
|
|
18
|
+
width: 'stretch',
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
/* &:is(a) */
|
|
22
|
+
'&[data-as="a"]': {
|
|
23
|
+
textDecoration: 'none',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {composeClassNames} from '../../composeClassNames'
|
|
2
|
+
import {radius} from '../../styles/radius'
|
|
3
|
+
import {SelectableStyleProps} from './types'
|
|
4
|
+
|
|
5
|
+
export function selectable(props: SelectableStyleProps): string {
|
|
6
|
+
const {tone = 'default'} = props
|
|
7
|
+
|
|
8
|
+
return composeClassNames('selectable', `selectable-tone-${tone}`, radius(props))
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './spinner'
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {Rules} from '../../types'
|
|
2
|
+
|
|
3
|
+
export const spinnerRules: Rules = {
|
|
4
|
+
spinner: {
|
|
5
|
+
'@keyframes': {
|
|
6
|
+
'spinner-rotate': {
|
|
7
|
+
from: {
|
|
8
|
+
transform: 'rotate(0deg)',
|
|
9
|
+
},
|
|
10
|
+
to: {
|
|
11
|
+
transform: 'rotate(360deg)',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
'@nest': {
|
|
17
|
+
'& > span > svg': {
|
|
18
|
+
animation: 'spinner-rotate 500ms linear infinite',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './switch'
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import {Rules} from '../../types'
|
|
2
|
+
|
|
3
|
+
export const switchRules: Rules = {
|
|
4
|
+
'switch': {},
|
|
5
|
+
|
|
6
|
+
'switch-input': {
|
|
7
|
+
position: 'absolute',
|
|
8
|
+
top: 0,
|
|
9
|
+
right: 0,
|
|
10
|
+
bottom: 0,
|
|
11
|
+
left: 0,
|
|
12
|
+
opacity: 0,
|
|
13
|
+
height: '100%',
|
|
14
|
+
width: '100%',
|
|
15
|
+
outline: 'none',
|
|
16
|
+
padding: 0,
|
|
17
|
+
margin: 0,
|
|
18
|
+
|
|
19
|
+
/* Place the input element above the representation element */
|
|
20
|
+
zIndex: 1,
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
'switch-presentation': {
|
|
24
|
+
// --switch-bg-color: ${color.input.default.enabled.border};
|
|
25
|
+
// --switch-fg-color: ${color.input.default.enabled.bg};
|
|
26
|
+
// --switch-box-shadow: none;
|
|
27
|
+
// &:not([hidden]) {
|
|
28
|
+
// display: block;
|
|
29
|
+
// }
|
|
30
|
+
// position: relative;
|
|
31
|
+
// width: ${rem(input.switch.width)};
|
|
32
|
+
// height: ${rem(input.switch.height)};
|
|
33
|
+
// border-radius: ${rem(input.switch.height / 2)};
|
|
34
|
+
// /* Make sure it’s not possible to interact with the wrapper element */
|
|
35
|
+
// pointer-events: none;
|
|
36
|
+
// &:after {
|
|
37
|
+
// content: '';
|
|
38
|
+
// display: block;
|
|
39
|
+
// position: absolute;
|
|
40
|
+
// top: 0;
|
|
41
|
+
// left: 0;
|
|
42
|
+
// right: 0;
|
|
43
|
+
// bottom: 0;
|
|
44
|
+
// z-index: 1;
|
|
45
|
+
// box-shadow: var(--switch-box-shadow);
|
|
46
|
+
// border-radius: inherit;
|
|
47
|
+
// }
|
|
48
|
+
// /* Focus styles */
|
|
49
|
+
// input:focus + && {
|
|
50
|
+
// --switch-box-shadow: ${focusRingStyle({focusRing: input.switch.focusRing})};
|
|
51
|
+
// }
|
|
52
|
+
// input:focus:not(:focus-visible) + && {
|
|
53
|
+
// --switch-box-shadow: none;
|
|
54
|
+
// }
|
|
55
|
+
// input:checked + && {
|
|
56
|
+
// --switch-bg-color: ${color.input.default.enabled.fg};
|
|
57
|
+
// --switch-fg-color: ${color.input.default.enabled.bg};
|
|
58
|
+
// }
|
|
59
|
+
// @media (hover: hover) {
|
|
60
|
+
// input:not(:disabled):hover + && {
|
|
61
|
+
// --switch-bg-color: ${color.input.default.hovered.border};
|
|
62
|
+
// --switch-fg-color: ${color.input.default.hovered.bg};
|
|
63
|
+
// }
|
|
64
|
+
// input:not(:disabled):checked:hover + && {
|
|
65
|
+
// --switch-bg-color: ${color.input.default.enabled.fg};
|
|
66
|
+
// --switch-fg-color: ${color.input.default.enabled.bg};
|
|
67
|
+
// }
|
|
68
|
+
// }
|
|
69
|
+
// input:not([data-read-only]):disabled + && {
|
|
70
|
+
// --switch-bg-color: ${color.input.default.disabled.border};
|
|
71
|
+
// --switch-fg-color: ${color.input.default.disabled.bg};
|
|
72
|
+
// }
|
|
73
|
+
// input[data-read-only]:disabled + && {
|
|
74
|
+
// --switch-bg-color: ${color.input.default.readOnly.border};
|
|
75
|
+
// --switch-fg-color: ${color.input.default.readOnly.bg};
|
|
76
|
+
// }
|
|
77
|
+
// input:checked[data-read-only]:disabled + && {
|
|
78
|
+
// --switch-bg-color: ${color.input.default.readOnly.fg};
|
|
79
|
+
// --switch-fg-color: ${color.input.default.readOnly.bg};
|
|
80
|
+
// }
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
'switch-track': {
|
|
84
|
+
// &:not([hidden]) {
|
|
85
|
+
// display: block;
|
|
86
|
+
// }
|
|
87
|
+
// background-color: var(--switch-bg-color);
|
|
88
|
+
// position: absolute;
|
|
89
|
+
// left: 0;
|
|
90
|
+
// top: 0;
|
|
91
|
+
// width: ${rem(input.switch.width)};
|
|
92
|
+
// height: ${rem(input.switch.height)};
|
|
93
|
+
// border-radius: ${rem(input.switch.height / 2)};
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
'switch-thumb': {
|
|
97
|
+
// const {$indeterminate} = props
|
|
98
|
+
// const {input} = getTheme_v2(props.theme)
|
|
99
|
+
// const trackWidth = input.switch.width
|
|
100
|
+
// const trackHeight = input.switch.height
|
|
101
|
+
// const trackPadding = input.switch.padding
|
|
102
|
+
// const size = trackHeight - input.switch.padding * 2
|
|
103
|
+
// const checkedOffset = trackWidth - trackPadding * 2 - size
|
|
104
|
+
// const indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding
|
|
105
|
+
// const checked = $indeterminate !== true && props.$checked === true
|
|
106
|
+
// return css`
|
|
107
|
+
// &:not([hidden]) {
|
|
108
|
+
// display: block;
|
|
109
|
+
// }
|
|
110
|
+
// position: absolute;
|
|
111
|
+
// left: ${rem(trackPadding)};
|
|
112
|
+
// top: ${rem(trackPadding)};
|
|
113
|
+
// height: ${rem(size)};
|
|
114
|
+
// width: ${rem(size)};
|
|
115
|
+
// border-radius: ${rem(size / 2)};
|
|
116
|
+
// transition-property: transform;
|
|
117
|
+
// transition-duration: ${input.switch.transitionDurationMs}ms;
|
|
118
|
+
// transition-timing-function: ${input.switch.transitionTimingFunction};
|
|
119
|
+
// background: var(--switch-fg-color);
|
|
120
|
+
// transform: translate3d(0, 0, 0);
|
|
121
|
+
// box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.05);
|
|
122
|
+
// ${checked &&
|
|
123
|
+
// css`
|
|
124
|
+
// transform: translate3d(${checkedOffset}px, 0, 0);
|
|
125
|
+
// `}
|
|
126
|
+
// ${$indeterminate &&
|
|
127
|
+
// css`
|
|
128
|
+
// transform: translate3d(${indeterminateOffset}px, 0, 0);
|
|
129
|
+
// `}
|
|
130
|
+
// `
|
|
131
|
+
},
|
|
132
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {responsiveRules} from '../../responsiveRules'
|
|
2
|
+
import {Rules} from '../../types'
|
|
3
|
+
|
|
4
|
+
export const textRules: Rules = {
|
|
5
|
+
'text': {
|
|
6
|
+
'--font-weight-regular': `var(--font-text-weight-regular)`,
|
|
7
|
+
'--font-weight-medium': `var(--font-text-weight-medium)`,
|
|
8
|
+
'--font-weight-semibold': `var(--font-text-weight-semibold)`,
|
|
9
|
+
'--font-weight-bold': `var(--font-text-weight-bold)`,
|
|
10
|
+
|
|
11
|
+
'--font-family': `var(--font-text-family)`,
|
|
12
|
+
|
|
13
|
+
'color': 'var(--color-fg)',
|
|
14
|
+
|
|
15
|
+
'@nest': {
|
|
16
|
+
'& a': {
|
|
17
|
+
color: 'var(--color-link-fg)',
|
|
18
|
+
textDecoration: 'none',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
'text-accent': {
|
|
24
|
+
'--fg-color': 'var(--color-accent-fg)',
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
'text-muted': {
|
|
28
|
+
'--fg-color': 'var(--color-muted-fg)',
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
...responsiveRules('text-0', {
|
|
32
|
+
'--font-size': 'var(--font-text-0-size)',
|
|
33
|
+
'--font-line-height': 'var(--font-text-0-line-height)',
|
|
34
|
+
'--font-letter-spacing': 'var(--font-text-0-letter-spacing)',
|
|
35
|
+
'--font-icon-size': 'var(--font-text-0-icon-size)',
|
|
36
|
+
'--font-ascender-height': 'var(--font-text-0-ascender-height)',
|
|
37
|
+
'--font-descender-height': 'var(--font-text-0-descender-height)',
|
|
38
|
+
}),
|
|
39
|
+
|
|
40
|
+
...responsiveRules('text-1', {
|
|
41
|
+
'--font-size': 'var(--font-text-1-size)',
|
|
42
|
+
'--font-line-height': 'var(--font-text-1-line-height)',
|
|
43
|
+
'--font-letter-spacing': 'var(--font-text-1-letter-spacing)',
|
|
44
|
+
'--font-icon-size': 'var(--font-text-1-icon-size)',
|
|
45
|
+
'--font-ascender-height': 'var(--font-text-1-ascender-height)',
|
|
46
|
+
'--font-descender-height': 'var(--font-text-1-descender-height)',
|
|
47
|
+
}),
|
|
48
|
+
|
|
49
|
+
...responsiveRules('text-2', {
|
|
50
|
+
'--font-size': 'var(--font-text-2-size)',
|
|
51
|
+
'--font-line-height': 'var(--font-text-2-line-height)',
|
|
52
|
+
'--font-letter-spacing': 'var(--font-text-2-letter-spacing)',
|
|
53
|
+
'--font-icon-size': 'var(--font-text-2-icon-size)',
|
|
54
|
+
'--font-ascender-height': 'var(--font-text-2-ascender-height)',
|
|
55
|
+
'--font-descender-height': 'var(--font-text-2-descender-height)',
|
|
56
|
+
}),
|
|
57
|
+
|
|
58
|
+
...responsiveRules('text-3', {
|
|
59
|
+
'--font-size': 'var(--font-text-3-size)',
|
|
60
|
+
'--font-line-height': 'var(--font-text-3-line-height)',
|
|
61
|
+
'--font-letter-spacing': 'var(--font-text-3-letter-spacing)',
|
|
62
|
+
'--font-icon-size': 'var(--font-text-3-icon-size)',
|
|
63
|
+
'--font-ascender-height': 'var(--font-text-3-ascender-height)',
|
|
64
|
+
'--font-descender-height': 'var(--font-text-3-descender-height)',
|
|
65
|
+
}),
|
|
66
|
+
|
|
67
|
+
...responsiveRules('text-4', {
|
|
68
|
+
'--font-size': 'var(--font-text-4-size)',
|
|
69
|
+
'--font-line-height': 'var(--font-text-4-line-height)',
|
|
70
|
+
'--font-letter-spacing': 'var(--font-text-4-letter-spacing)',
|
|
71
|
+
'--font-icon-size': 'var(--font-text-4-icon-size)',
|
|
72
|
+
'--font-ascender-height': 'var(--font-text-4-ascender-height)',
|
|
73
|
+
'--font-descender-height': 'var(--font-text-4-descender-height)',
|
|
74
|
+
}),
|
|
75
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {_resp} from '../../_resp'
|
|
2
|
+
import {composeClassNames} from '../../composeClassNames'
|
|
3
|
+
import {font} from '../../styles/font'
|
|
4
|
+
import {TextStyleProps} from './types'
|
|
5
|
+
|
|
6
|
+
/** @public */
|
|
7
|
+
export function text(props: TextStyleProps): string {
|
|
8
|
+
return composeClassNames(
|
|
9
|
+
'text',
|
|
10
|
+
'block',
|
|
11
|
+
font(props),
|
|
12
|
+
props.accent && 'text-accent',
|
|
13
|
+
props.muted && 'text-muted',
|
|
14
|
+
_resp(`text`, props.size),
|
|
15
|
+
)
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {FontStyleProps} from '@sanity/ui/css'
|
|
2
|
+
import {ResponsiveProp} from '../../types'
|
|
3
|
+
|
|
4
|
+
export type TextSize = number
|
|
5
|
+
|
|
6
|
+
/** @public */
|
|
7
|
+
export interface TextStyleProps extends FontStyleProps {
|
|
8
|
+
accent?: boolean
|
|
9
|
+
muted?: boolean
|
|
10
|
+
size?: ResponsiveProp<TextSize>
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './textArea'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './textInput'
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import {Rules} from '../../types'
|
|
2
|
+
|
|
3
|
+
export const textInputRules: Rules = {
|
|
4
|
+
'text-input': {
|
|
5
|
+
//
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
'text-input-wrapper': {
|
|
9
|
+
'@nest': {
|
|
10
|
+
'& > input': {
|
|
11
|
+
'appearance': 'none',
|
|
12
|
+
'background': 'none',
|
|
13
|
+
'border': 0,
|
|
14
|
+
'borderRadius': 0,
|
|
15
|
+
'outline': 'none',
|
|
16
|
+
'width': '100%',
|
|
17
|
+
'boxSizing': 'border-box',
|
|
18
|
+
'fontFamily': 'var(--font-family)',
|
|
19
|
+
'fontSize': 'var(--font-size)',
|
|
20
|
+
/* font-family: ${font.text.family}, */
|
|
21
|
+
/* font-weight: ${($weight && font.text.weights[$weight]) || font.text.weights.regular}, */
|
|
22
|
+
'margin': 0,
|
|
23
|
+
'position': 'relative',
|
|
24
|
+
'zIndex': 1,
|
|
25
|
+
'display': 'block',
|
|
26
|
+
'color': 'var(--input-fg-color)',
|
|
27
|
+
|
|
28
|
+
'@nest': {
|
|
29
|
+
// NOTE: This is a hack to disable Chrome’s autofill styles
|
|
30
|
+
'&:-webkit-autofill, &:-webkit-autofill:hover, &:-webkit-autofill:focus, &:-webkit-autofill:active':
|
|
31
|
+
{
|
|
32
|
+
WebkitTextFillColor: 'var(--input-fg-color) !important',
|
|
33
|
+
transition: 'background-color 5000s',
|
|
34
|
+
transitionDelay: '86400s', // 24h
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
// /* &:is(textarea) */
|
|
38
|
+
// &[data-as='textarea'] {
|
|
39
|
+
// resize: none;
|
|
40
|
+
// }
|
|
41
|
+
// &::placeholder {
|
|
42
|
+
// color: var(--input-placeholder-color);
|
|
43
|
+
// }
|
|
44
|
+
// &[data-scheme='${$scheme}'][data-tone='${$tone}'] {
|
|
45
|
+
// /* --input-fg-color: ${color.input.default.enabled.fg}; */
|
|
46
|
+
// /* --input-placeholder-color: ${color.input.default.enabled.placeholder}; */
|
|
47
|
+
// /* enabled */
|
|
48
|
+
// &:not(:invalid):not(:disabled):not(:read-only) {
|
|
49
|
+
// /* --input-fg-color: ${color.input.default.enabled.fg}; */
|
|
50
|
+
// /* --input-placeholder-color: ${color.input.default.enabled.placeholder}; */
|
|
51
|
+
// }
|
|
52
|
+
// /* disabled */
|
|
53
|
+
// &:not(:invalid):disabled {
|
|
54
|
+
// /* --input-fg-color: ${color.input.default.disabled.fg}; */
|
|
55
|
+
// /* --input-placeholder-color: ${color.input.default.disabled.placeholder}; */
|
|
56
|
+
// }
|
|
57
|
+
// /* invalid */
|
|
58
|
+
// &:invalid {
|
|
59
|
+
// /* --input-fg-color: ${color.input.invalid.enabled.fg}; */
|
|
60
|
+
// /* --input-placeholder-color: ${color.input.invalid.enabled.placeholder}; */
|
|
61
|
+
// }
|
|
62
|
+
// /* readOnly */
|
|
63
|
+
// &:read-only {
|
|
64
|
+
// /* --input-fg-color: ${color.input.default.readOnly.fg}; */
|
|
65
|
+
// /* --input-placeholder-color: ${color.input.default.readOnly.placeholder}; */
|
|
66
|
+
// }
|
|
67
|
+
// }
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
'text-input-prefix': {
|
|
74
|
+
'borderTopRightRadius': 0,
|
|
75
|
+
'borderBottomRightRadius': 0,
|
|
76
|
+
|
|
77
|
+
'@nest': {
|
|
78
|
+
'& > span': {
|
|
79
|
+
display: 'block',
|
|
80
|
+
margin: '-1px',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
'text-input-suffix': {
|
|
86
|
+
'borderTopRightRadius': 0,
|
|
87
|
+
'borderBottomRightRadius': 0,
|
|
88
|
+
|
|
89
|
+
'@nest': {
|
|
90
|
+
'& > span': {
|
|
91
|
+
display: 'block',
|
|
92
|
+
margin: '-1px',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
'text-input-presentation': {
|
|
98
|
+
'--input-box-shadow': 'none',
|
|
99
|
+
|
|
100
|
+
'position': 'absolute',
|
|
101
|
+
'top': 0,
|
|
102
|
+
'left': 0,
|
|
103
|
+
'right': 0,
|
|
104
|
+
'bottom': 0,
|
|
105
|
+
'display': 'block',
|
|
106
|
+
'pointerEvents': 'none',
|
|
107
|
+
'zIndex': 0,
|
|
108
|
+
|
|
109
|
+
'backgroundColor': 'var(--card-bg-color)',
|
|
110
|
+
'boxShadow': 'var(--input-box-shadow)',
|
|
111
|
+
|
|
112
|
+
// border-top-left-radius: ${$hasPrefix ? 0 : undefined};
|
|
113
|
+
// border-bottom-left-radius: ${$hasPrefix ? 0 : undefined};
|
|
114
|
+
// border-top-right-radius: ${$hasSuffix ? 0 : undefined};
|
|
115
|
+
// border-bottom-right-radius: ${$hasSuffix ? 0 : undefined};
|
|
116
|
+
|
|
117
|
+
// &[data-scheme='${$scheme}'][data-tone='${$tone}'] {
|
|
118
|
+
// --card-bg-color: ${color.input.default.enabled.bg};
|
|
119
|
+
// --card-fg-color: ${color.input.default.enabled.fg};
|
|
120
|
+
|
|
121
|
+
// /* enabled */
|
|
122
|
+
// *:not(:disabled) + &[data-border] {
|
|
123
|
+
// --input-box-shadow: ${focusRingBorderStyle({
|
|
124
|
+
// color: color.input.default.enabled.border,
|
|
125
|
+
// width: input.border.width,
|
|
126
|
+
// })};
|
|
127
|
+
// }
|
|
128
|
+
|
|
129
|
+
// /* invalid */
|
|
130
|
+
// *:not(:disabled):invalid + & {
|
|
131
|
+
// --card-bg-color: ${color.input.invalid.enabled.bg};
|
|
132
|
+
// --card-fg-color: ${color.input.invalid.enabled.fg};
|
|
133
|
+
|
|
134
|
+
// &[data-border] {
|
|
135
|
+
// --input-box-shadow: ${focusRingBorderStyle({
|
|
136
|
+
// color: color.input.invalid.enabled.border,
|
|
137
|
+
// width: input.border.width,
|
|
138
|
+
// })};
|
|
139
|
+
// }
|
|
140
|
+
// }
|
|
141
|
+
|
|
142
|
+
// /* focused */
|
|
143
|
+
// *:not(:disabled):focus + & {
|
|
144
|
+
// &[data-border] {
|
|
145
|
+
// --input-box-shadow: ${$unstableDisableFocusRing
|
|
146
|
+
// ? undefined
|
|
147
|
+
// : focusRingStyle({
|
|
148
|
+
// border: {color: color.input.default.enabled.border, width: input.border.width},
|
|
149
|
+
// focusRing: input.text.focusRing,
|
|
150
|
+
// })};
|
|
151
|
+
// }
|
|
152
|
+
|
|
153
|
+
// &:not([data-border]) {
|
|
154
|
+
// --input-box-shadow: ${$unstableDisableFocusRing
|
|
155
|
+
// ? undefined
|
|
156
|
+
// : focusRingStyle({focusRing: input.text.focusRing})};
|
|
157
|
+
// }
|
|
158
|
+
// }
|
|
159
|
+
|
|
160
|
+
// /* disabled */
|
|
161
|
+
// *:not(:invalid):disabled + & {
|
|
162
|
+
// --card-bg-color: ${color.input.default.disabled.bg} !important;
|
|
163
|
+
// --card-fg-color: ${color.input.default.disabled.fg} !important;
|
|
164
|
+
// --card-icon-color: ${color.input.default.disabled.fg} !important;
|
|
165
|
+
|
|
166
|
+
// &[data-border] {
|
|
167
|
+
// --input-box-shadow: ${focusRingBorderStyle({
|
|
168
|
+
// color: color.input.default.disabled.border,
|
|
169
|
+
// width: input.border.width,
|
|
170
|
+
// })};
|
|
171
|
+
// }
|
|
172
|
+
// }
|
|
173
|
+
|
|
174
|
+
// *:invalid:disabled + & {
|
|
175
|
+
// --card-bg-color: ${color.input.invalid.disabled.bg} !important;
|
|
176
|
+
// --card-fg-color: ${color.input.invalid.disabled.fg} !important;
|
|
177
|
+
// --card-icon-color: ${color.input.invalid.disabled.fg} !important;
|
|
178
|
+
|
|
179
|
+
// &[data-border] {
|
|
180
|
+
// --input-box-shadow: ${focusRingBorderStyle({
|
|
181
|
+
// color: color.input.invalid.disabled.border,
|
|
182
|
+
// width: input.border.width,
|
|
183
|
+
// })};
|
|
184
|
+
// }
|
|
185
|
+
// }
|
|
186
|
+
|
|
187
|
+
// /* readOnly */
|
|
188
|
+
// *:not(:invalid):read-only + & {
|
|
189
|
+
// --card-bg-color: ${color.input.default.readOnly.bg} !important;
|
|
190
|
+
// --card-fg-color: ${color.input.default.readOnly.fg} !important;
|
|
191
|
+
// }
|
|
192
|
+
|
|
193
|
+
// *:invalid:read-only + & {
|
|
194
|
+
// --card-bg-color: ${color.input.invalid.readOnly.bg} !important;
|
|
195
|
+
// --card-fg-color: ${color.input.invalid.readOnly.fg} !important;
|
|
196
|
+
// }
|
|
197
|
+
|
|
198
|
+
// /* hovered */
|
|
199
|
+
// @media (hover: hover) {
|
|
200
|
+
// *:not(:disabled):not(:read-only):not(:invalid):hover + & {
|
|
201
|
+
// --card-bg-color: ${color.input.default.hovered.bg};
|
|
202
|
+
// --card-fg-color: ${color.input.default.hovered.fg};
|
|
203
|
+
// }
|
|
204
|
+
|
|
205
|
+
// *:invalid:not(:disabled):not(:read-only):hover + & {
|
|
206
|
+
// --card-bg-color: ${color.input.invalid.hovered.bg};
|
|
207
|
+
// --card-fg-color: ${color.input.invalid.hovered.fg};
|
|
208
|
+
// }
|
|
209
|
+
|
|
210
|
+
// *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {
|
|
211
|
+
// --input-box-shadow: ${focusRingBorderStyle({
|
|
212
|
+
// color: color.input.default.hovered.border,
|
|
213
|
+
// width: input.border.width,
|
|
214
|
+
// })};
|
|
215
|
+
// }
|
|
216
|
+
|
|
217
|
+
// *:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border] {
|
|
218
|
+
// --input-box-shadow: ${focusRingBorderStyle({
|
|
219
|
+
// color: color.input.invalid.hovered.border,
|
|
220
|
+
// width: input.border.width,
|
|
221
|
+
// })};
|
|
222
|
+
// }
|
|
223
|
+
// }
|
|
224
|
+
// }
|
|
225
|
+
},
|
|
226
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import {_resp} from '../../_resp'
|
|
2
|
+
import {composeClassNames} from '../../composeClassNames'
|
|
3
|
+
import {ResponsiveProp} from '../../types'
|
|
4
|
+
|
|
5
|
+
export function textInput(props: {size: ResponsiveProp<number>}): string {
|
|
6
|
+
return composeClassNames('text-input', _resp('text-input', props.size))
|
|
7
|
+
}
|