@sanity/ui 1.0.0-beta.29 → 1.0.0-beta.30
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/dist/sanity-ui.esm.js +12 -11
- package/dist/sanity-ui.esm.js.map +1 -1
- package/dist/sanity-ui.js +12 -11
- package/dist/sanity-ui.js.map +1 -1
- package/package.json +4 -4
- package/src/primitives/textArea/textArea.tsx +1 -1
- package/src/primitives/textInput/textInput.tsx +1 -1
- package/src/styles/input/textInputStyle.ts +35 -28
package/dist/sanity-ui.esm.js
CHANGED
|
@@ -4192,7 +4192,6 @@ function textInputFontSizeStyle(props) {
|
|
|
4192
4192
|
|
|
4193
4193
|
function textInputRepresentationStyle(props) {
|
|
4194
4194
|
const {
|
|
4195
|
-
$border,
|
|
4196
4195
|
$hasPrefix,
|
|
4197
4196
|
$hasSuffix,
|
|
4198
4197
|
$scheme,
|
|
@@ -4204,25 +4203,27 @@ function textInputRepresentationStyle(props) {
|
|
|
4204
4203
|
input
|
|
4205
4204
|
} = theme.sanity;
|
|
4206
4205
|
const color = theme.sanity.color.input;
|
|
4207
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n\n &[data-scheme='", "'][data-tone='", "'] {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n /* enabled */\n *:not(:disabled) + & {\n --input-box-shadow: ", ";\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n --input-box-shadow: ", ";\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n --input-box-shadow: ", ";\n }\n\n /* disabled */\n *:disabled + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n --input-box-shadow: ", ";\n }\n\n /* readOnly */\n *:read-only + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + & {\n --input-box-shadow: ", ";\n }\n }\n }\n "])), $hasPrefix ? 0 : void 0, $hasPrefix ? 0 : void 0, $hasSuffix ? 0 : void 0, $hasSuffix ? 0 : void 0, $scheme, $tone, color.default.enabled.bg, color.default.enabled.fg,
|
|
4206
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n\n &[data-scheme='", "'][data-tone='", "'] {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n /* enabled */\n *:not(:disabled) + &[data-border] {\n --input-box-shadow: ", ";\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n &[data-border] {\n --input-box-shadow: ", ";\n }\n\n &:not([data-border]) {\n --input-box-shadow: ", ";\n }\n }\n\n /* disabled */\n *:disabled + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* readOnly */\n *:read-only + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n }\n "])), $hasPrefix ? 0 : void 0, $hasPrefix ? 0 : void 0, $hasSuffix ? 0 : void 0, $hasSuffix ? 0 : void 0, $scheme, $tone, color.default.enabled.bg, color.default.enabled.fg, focusRingBorderStyle({
|
|
4208
4207
|
color: color.default.enabled.border,
|
|
4209
4208
|
width: input.border.width
|
|
4210
|
-
})
|
|
4209
|
+
}), color.invalid.enabled.bg, color.invalid.enabled.fg, focusRingBorderStyle({
|
|
4211
4210
|
color: color.invalid.enabled.border,
|
|
4212
4211
|
width: input.border.width
|
|
4213
|
-
})
|
|
4214
|
-
border:
|
|
4212
|
+
}), focusRingStyle({
|
|
4213
|
+
border: {
|
|
4215
4214
|
color: color.default.enabled.border,
|
|
4216
4215
|
width: input.border.width
|
|
4217
|
-
}
|
|
4216
|
+
},
|
|
4218
4217
|
focusRing
|
|
4219
|
-
}),
|
|
4218
|
+
}), focusRingStyle({
|
|
4219
|
+
focusRing
|
|
4220
|
+
}), color.default.disabled.bg, color.default.disabled.fg, focusRingBorderStyle({
|
|
4220
4221
|
color: color.default.disabled.border,
|
|
4221
4222
|
width: input.border.width
|
|
4222
|
-
})
|
|
4223
|
+
}), color.default.readOnly.bg, color.default.readOnly.fg, color.default.hovered.bg, color.default.hovered.fg, focusRingBorderStyle({
|
|
4223
4224
|
color: color.default.hovered.border,
|
|
4224
4225
|
width: input.border.width
|
|
4225
|
-
})
|
|
4226
|
+
}));
|
|
4226
4227
|
}
|
|
4227
4228
|
|
|
4228
4229
|
function responsiveMarginStyle(props) {
|
|
@@ -6841,10 +6842,10 @@ const TextArea = forwardRef(function TextArea2(props, forwardedRef) {
|
|
|
6841
6842
|
disabled,
|
|
6842
6843
|
ref
|
|
6843
6844
|
})), /* @__PURE__ */jsx(Presentation$1, {
|
|
6844
|
-
$border: border,
|
|
6845
6845
|
$radius: useArrayProp(radius),
|
|
6846
6846
|
$scheme: rootTheme.scheme,
|
|
6847
6847
|
$tone: rootTheme.tone,
|
|
6848
|
+
"data-border": border ? "" : void 0,
|
|
6848
6849
|
"data-scheme": rootTheme.scheme,
|
|
6849
6850
|
"data-tone": rootTheme.tone
|
|
6850
6851
|
})]
|
|
@@ -6926,12 +6927,12 @@ const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
|
|
|
6926
6927
|
})
|
|
6927
6928
|
}), [prefix, radius]);
|
|
6928
6929
|
const presentationNode = useMemo(() => /* @__PURE__ */jsxs(Presentation, {
|
|
6929
|
-
$border: border,
|
|
6930
6930
|
$hasPrefix,
|
|
6931
6931
|
$hasSuffix,
|
|
6932
6932
|
$radius: radius,
|
|
6933
6933
|
$scheme: rootTheme.scheme,
|
|
6934
6934
|
$tone: rootTheme.tone,
|
|
6935
|
+
"data-border": border ? "" : void 0,
|
|
6935
6936
|
"data-scheme": rootTheme.scheme,
|
|
6936
6937
|
"data-tone": rootTheme.tone,
|
|
6937
6938
|
children: [icon && /* @__PURE__ */jsx(LeftBox, {
|