@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.js
CHANGED
|
@@ -4220,7 +4220,6 @@ function textInputFontSizeStyle(props) {
|
|
|
4220
4220
|
|
|
4221
4221
|
function textInputRepresentationStyle(props) {
|
|
4222
4222
|
const {
|
|
4223
|
-
$border,
|
|
4224
4223
|
$hasPrefix,
|
|
4225
4224
|
$hasSuffix,
|
|
4226
4225
|
$scheme,
|
|
@@ -4232,25 +4231,27 @@ function textInputRepresentationStyle(props) {
|
|
|
4232
4231
|
input
|
|
4233
4232
|
} = theme.sanity;
|
|
4234
4233
|
const color = theme.sanity.color.input;
|
|
4235
|
-
return styled.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,
|
|
4234
|
+
return styled.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({
|
|
4236
4235
|
color: color.default.enabled.border,
|
|
4237
4236
|
width: input.border.width
|
|
4238
|
-
})
|
|
4237
|
+
}), color.invalid.enabled.bg, color.invalid.enabled.fg, focusRingBorderStyle({
|
|
4239
4238
|
color: color.invalid.enabled.border,
|
|
4240
4239
|
width: input.border.width
|
|
4241
|
-
})
|
|
4242
|
-
border:
|
|
4240
|
+
}), focusRingStyle({
|
|
4241
|
+
border: {
|
|
4243
4242
|
color: color.default.enabled.border,
|
|
4244
4243
|
width: input.border.width
|
|
4245
|
-
}
|
|
4244
|
+
},
|
|
4246
4245
|
focusRing
|
|
4247
|
-
}),
|
|
4246
|
+
}), focusRingStyle({
|
|
4247
|
+
focusRing
|
|
4248
|
+
}), color.default.disabled.bg, color.default.disabled.fg, focusRingBorderStyle({
|
|
4248
4249
|
color: color.default.disabled.border,
|
|
4249
4250
|
width: input.border.width
|
|
4250
|
-
})
|
|
4251
|
+
}), color.default.readOnly.bg, color.default.readOnly.fg, color.default.hovered.bg, color.default.hovered.fg, focusRingBorderStyle({
|
|
4251
4252
|
color: color.default.hovered.border,
|
|
4252
4253
|
width: input.border.width
|
|
4253
|
-
})
|
|
4254
|
+
}));
|
|
4254
4255
|
}
|
|
4255
4256
|
|
|
4256
4257
|
function responsiveMarginStyle(props) {
|
|
@@ -6869,10 +6870,10 @@ const TextArea = react.forwardRef(function TextArea2(props, forwardedRef) {
|
|
|
6869
6870
|
disabled,
|
|
6870
6871
|
ref
|
|
6871
6872
|
})), /* @__PURE__ */jsxRuntime.jsx(Presentation$1, {
|
|
6872
|
-
$border: border,
|
|
6873
6873
|
$radius: useArrayProp(radius),
|
|
6874
6874
|
$scheme: rootTheme.scheme,
|
|
6875
6875
|
$tone: rootTheme.tone,
|
|
6876
|
+
"data-border": border ? "" : void 0,
|
|
6876
6877
|
"data-scheme": rootTheme.scheme,
|
|
6877
6878
|
"data-tone": rootTheme.tone
|
|
6878
6879
|
})]
|
|
@@ -6954,12 +6955,12 @@ const TextInput = react.forwardRef(function TextInput2(props, forwardedRef) {
|
|
|
6954
6955
|
})
|
|
6955
6956
|
}), [prefix, radius]);
|
|
6956
6957
|
const presentationNode = react.useMemo(() => /* @__PURE__ */jsxRuntime.jsxs(Presentation, {
|
|
6957
|
-
$border: border,
|
|
6958
6958
|
$hasPrefix,
|
|
6959
6959
|
$hasSuffix,
|
|
6960
6960
|
$radius: radius,
|
|
6961
6961
|
$scheme: rootTheme.scheme,
|
|
6962
6962
|
$tone: rootTheme.tone,
|
|
6963
|
+
"data-border": border ? "" : void 0,
|
|
6963
6964
|
"data-scheme": rootTheme.scheme,
|
|
6964
6965
|
"data-tone": rootTheme.tone,
|
|
6965
6966
|
children: [icon && /* @__PURE__ */jsxRuntime.jsx(LeftBox, {
|