@sanity/ui 0.37.15 → 0.37.18
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/lib/dts/src/primitives/textArea/textArea.d.ts.map +1 -1
- package/lib/dts/src/primitives/textInput/textInput.d.ts.map +1 -1
- package/lib/dts/src/styles/input/textInputStyle.d.ts +3 -1
- package/lib/dts/src/styles/input/textInputStyle.d.ts.map +1 -1
- package/lib/dts/src/theme/studioTheme/color.d.ts.map +1 -1
- package/lib/sanity-ui.js +35 -23
- package/lib/sanity-ui.js.map +1 -1
- package/lib/sanity-ui.modern.mjs +37 -25
- package/lib/sanity-ui.modern.mjs.map +1 -1
- package/lib/sanity-ui.module.js +35 -23
- package/lib/sanity-ui.module.js.map +1 -1
- package/package.json +2 -2
- package/src/components/dialog/styles.ts +1 -1
- package/src/primitives/textArea/textArea.tsx +4 -0
- package/src/primitives/textInput/__workshop__/tones.tsx +222 -105
- package/src/primitives/textInput/textInput.tsx +5 -1
- package/src/styles/input/textInputStyle.ts +7 -5
- package/src/theme/studioTheme/color.ts +15 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textArea.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/textArea/textArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAevC,OAAO,EAAC,kBAAkB,EAAe,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAC,qBAAqB,EAAC,MAAM,UAAU,CAAA;AAE9C;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,qBAAqB;IAC1D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC3B,MAAM,CAAC,EAAE,kBAAkB,CAAA;CAC5B;AAsBD;;GAEG;AACH,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"textArea.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/textArea/textArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAevC,OAAO,EAAC,kBAAkB,EAAe,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAC,qBAAqB,EAAC,MAAM,UAAU,CAAA;AAE9C;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,qBAAqB;IAC1D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC3B,MAAM,CAAC,EAAE,kBAAkB,CAAA;CAC5B;AAsBD;;GAEG;AACH,eAAO,MAAM,QAAQ,i4LAiDnB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInput.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/textInput/textInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAwE,MAAM,OAAO,CAAA;AAiB5F,OAAO,EAAC,kBAAkB,EAAe,MAAM,aAAa,CAAA;AAE5D,OAAO,EAAS,WAAW,EAAC,MAAM,WAAW,CAAA;AAI7C;;GAEG;AACH,oBAAY,yBAAyB,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAC7D,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,aAAa,GAAG,KAAK,CAAC,CAAA;AAEpF;;GAEG;AACH,oBAAY,aAAa,GACrB,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,KAAK,GACL,OAAO,GACP,QAAQ,GACR,UAAU,GACV,KAAK,GACL,MAAM,GACN,MAAM,GACN,MAAM,CAAA;AAEV;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,yBAAyB,CAAA;IACjD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC5B,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,SAAS,CAAA;IAC5C,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,SAAS,CAAA;IACjD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC3B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,MAAM,CAAC,EAAE,kBAAkB,CAAA;CAC5B;AA+DD;;GAEG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"textInput.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/textInput/textInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAwE,MAAM,OAAO,CAAA;AAiB5F,OAAO,EAAC,kBAAkB,EAAe,MAAM,aAAa,CAAA;AAE5D,OAAO,EAAS,WAAW,EAAC,MAAM,WAAW,CAAA;AAI7C;;GAEG;AACH,oBAAY,yBAAyB,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAC7D,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,aAAa,GAAG,KAAK,CAAC,CAAA;AAEpF;;GAEG;AACH,oBAAY,aAAa,GACrB,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,KAAK,GACL,OAAO,GACP,QAAQ,GACR,UAAU,GACV,KAAK,GACL,MAAM,GACN,MAAM,GACN,MAAM,CAAA;AAEV;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,yBAAyB,CAAA;IACjD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC5B,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,SAAS,CAAA;IAC5C,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,SAAS,CAAA;IACjD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC3B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,MAAM,CAAC,EAAE,kBAAkB,CAAA;CAC5B;AA+DD;;GAEG;AACH,eAAO,MAAM,SAAS,63LAkOpB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSObject, FlattenSimpleInterpolation } from 'styled-components';
|
|
2
|
-
import { ThemeFontWeightKey } from '../../theme';
|
|
2
|
+
import { ThemeColorSchemeKey, ThemeFontWeightKey } from '../../theme';
|
|
3
3
|
import { CardTone } from '../../types';
|
|
4
4
|
import { ThemeProps } from '../types';
|
|
5
5
|
/**
|
|
@@ -7,6 +7,7 @@ import { ThemeProps } from '../types';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface TextInputInputStyleProps {
|
|
9
9
|
$fontSize: number[];
|
|
10
|
+
$scheme: ThemeColorSchemeKey;
|
|
10
11
|
$tone: CardTone;
|
|
11
12
|
$weight?: ThemeFontWeightKey;
|
|
12
13
|
}
|
|
@@ -17,6 +18,7 @@ export interface TextInputRepresentationStyleProps {
|
|
|
17
18
|
$border?: boolean;
|
|
18
19
|
$hasPrefix?: boolean;
|
|
19
20
|
$hasSuffix?: boolean;
|
|
21
|
+
$scheme: ThemeColorSchemeKey;
|
|
20
22
|
$tone: CardTone;
|
|
21
23
|
}
|
|
22
24
|
export declare function textInputRootStyle(): FlattenSimpleInterpolation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInputStyle.d.ts","sourceRoot":"","sources":["../../../../../src/styles/input/textInputStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,SAAS,EAAE,0BAA0B,EAAC,MAAM,mBAAmB,CAAA;AAC5E,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"textInputStyle.d.ts","sourceRoot":"","sources":["../../../../../src/styles/input/textInputStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,SAAS,EAAE,0BAA0B,EAAC,MAAM,mBAAmB,CAAA;AAC5E,OAAO,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,aAAa,CAAA;AACnE,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAA;AAGpC,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAA;AAEnC;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,OAAO,EAAE,mBAAmB,CAAA;IAC5B,KAAK,EAAE,QAAQ,CAAA;IACf,OAAO,CAAC,EAAE,kBAAkB,CAAA;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,EAAE,mBAAmB,CAAA;IAC5B,KAAK,EAAE,QAAQ,CAAA;CAChB;AAUD,wBAAgB,kBAAkB,IAAI,0BAA0B,CAE/D;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,wBAAwB,GAAG,UAAU,GAC3C,0BAA0B,CAsE5B;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,wBAAwB,GAAG,UAAU,GAAG,SAAS,EAAE,CAYhG;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,iCAAiC,GAAG,UAAU,GACpD,0BAA0B,CA2F5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../src/theme/studioTheme/color.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../src/theme/studioTheme/color.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,KAAK,0CA6mBhB,CAAA"}
|
package/lib/sanity-ui.js
CHANGED
|
@@ -1984,18 +1984,20 @@ var color = createColorTheme({
|
|
|
1984
1984
|
name = _ref.name;
|
|
1985
1985
|
|
|
1986
1986
|
if (name === 'default') {
|
|
1987
|
-
var
|
|
1987
|
+
var _tints = color$1.hues.gray;
|
|
1988
|
+
|
|
1989
|
+
var _skeletonFrom = dark ? _tints[900].hex : _tints[100].hex;
|
|
1988
1990
|
|
|
1989
1991
|
return {
|
|
1990
1992
|
fg: dark ? color$1.white.hex : color$1.black.hex,
|
|
1991
1993
|
bg: dark ? color$1.black.hex : color$1.white.hex,
|
|
1992
|
-
border:
|
|
1994
|
+
border: _tints[dark ? 800 : 200].hex,
|
|
1993
1995
|
focusRing: color$1.hues.blue[dark ? 500 : 500].hex,
|
|
1994
1996
|
shadow: {
|
|
1995
|
-
outline: rgba(
|
|
1996
|
-
umbra:
|
|
1997
|
-
penumbra:
|
|
1998
|
-
ambient:
|
|
1997
|
+
outline: rgba(_tints[500].hex, 0.4),
|
|
1998
|
+
umbra: dark ? rgba(_tints[950].hex, 0.4) : rgba(_tints[500].hex, 0.2),
|
|
1999
|
+
penumbra: dark ? rgba(_tints[950].hex, 0.28) : rgba(_tints[500].hex, 0.14),
|
|
2000
|
+
ambient: dark ? rgba(_tints[950].hex, 0.24) : rgba(_tints[500].hex, 0.12)
|
|
1999
2001
|
},
|
|
2000
2002
|
skeleton: {
|
|
2001
2003
|
from: _skeletonFrom,
|
|
@@ -2005,18 +2007,18 @@ var color = createColorTheme({
|
|
|
2005
2007
|
}
|
|
2006
2008
|
|
|
2007
2009
|
if (name === 'transparent') {
|
|
2008
|
-
var
|
|
2009
|
-
var _skeletonFrom2 =
|
|
2010
|
+
var _tints2 = tones["default"];
|
|
2011
|
+
var _skeletonFrom2 = _tints2[dark ? 800 : 200].hex;
|
|
2010
2012
|
return {
|
|
2011
|
-
fg:
|
|
2012
|
-
bg:
|
|
2013
|
-
border:
|
|
2013
|
+
fg: _tints2[dark ? 100 : 900].hex,
|
|
2014
|
+
bg: _tints2[dark ? 950 : 50].hex,
|
|
2015
|
+
border: _tints2[dark ? 800 : 300].hex,
|
|
2014
2016
|
focusRing: color$1.hues.blue[500].hex,
|
|
2015
2017
|
shadow: {
|
|
2016
|
-
outline: rgba(
|
|
2017
|
-
umbra:
|
|
2018
|
-
penumbra:
|
|
2019
|
-
ambient:
|
|
2018
|
+
outline: rgba(_tints2[500].hex, 0.4),
|
|
2019
|
+
umbra: dark ? rgba(_tints2[900].hex, 0.4) : rgba(_tints2[500].hex, 0.2),
|
|
2020
|
+
penumbra: dark ? rgba(_tints2[900].hex, 0.28) : rgba(_tints2[500].hex, 0.14),
|
|
2021
|
+
ambient: dark ? rgba(_tints2[900].hex, 0.24) : rgba(_tints2[500].hex, 0.12)
|
|
2020
2022
|
},
|
|
2021
2023
|
skeleton: {
|
|
2022
2024
|
from: _skeletonFrom2,
|
|
@@ -2033,10 +2035,10 @@ var color = createColorTheme({
|
|
|
2033
2035
|
border: tints[dark ? 800 : 200].hex,
|
|
2034
2036
|
focusRing: tints[500].hex,
|
|
2035
2037
|
shadow: {
|
|
2036
|
-
outline: rgba(tints[500].hex,
|
|
2037
|
-
umbra:
|
|
2038
|
-
penumbra:
|
|
2039
|
-
ambient:
|
|
2038
|
+
outline: rgba(tints[500].hex, 0.4),
|
|
2039
|
+
umbra: dark ? rgba(tints[900].hex, 0.4) : rgba(tints[500].hex, 0.2),
|
|
2040
|
+
penumbra: dark ? rgba(tints[900].hex, 0.28) : rgba(tints[500].hex, 0.14),
|
|
2041
|
+
ambient: dark ? rgba(tints[900].hex, 0.24) : rgba(tints[500].hex, 0.12)
|
|
2040
2042
|
},
|
|
2041
2043
|
skeleton: {
|
|
2042
2044
|
from: skeletonFrom,
|
|
@@ -3701,11 +3703,12 @@ function textInputRootStyle() {
|
|
|
3701
3703
|
}
|
|
3702
3704
|
function textInputBaseStyle(props) {
|
|
3703
3705
|
var theme = props.theme,
|
|
3706
|
+
$scheme = props.$scheme,
|
|
3704
3707
|
$tone = props.$tone,
|
|
3705
3708
|
$weight = props.$weight;
|
|
3706
3709
|
var font = theme.sanity.fonts.text;
|
|
3707
3710
|
var color = theme.sanity.color.input;
|
|
3708
|
-
return styled.css(_templateObject2$n || (_templateObject2$n = _taggedTemplateLiteralLoose(["\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ", ";\n font-weight: ", ";\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome\u2019s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-tone='", "'] {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n }\n "])), font.family, $weight && font.weights[$weight] || font.weights.regular, $tone, color["default"].enabled.fg, color["default"].enabled.placeholder, color["default"].enabled.fg, color["default"].enabled.placeholder, color["default"].disabled.fg, color["default"].disabled.placeholder, color.invalid.enabled.fg, color.invalid.enabled.placeholder, color["default"].readOnly.fg, color["default"].readOnly.placeholder);
|
|
3711
|
+
return styled.css(_templateObject2$n || (_templateObject2$n = _taggedTemplateLiteralLoose(["\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ", ";\n font-weight: ", ";\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome\u2019s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-scheme='", "'][data-tone='", "'] {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n }\n "])), font.family, $weight && font.weights[$weight] || font.weights.regular, $scheme, $tone, color["default"].enabled.fg, color["default"].enabled.placeholder, color["default"].enabled.fg, color["default"].enabled.placeholder, color["default"].disabled.fg, color["default"].disabled.placeholder, color.invalid.enabled.fg, color.invalid.enabled.placeholder, color["default"].readOnly.fg, color["default"].readOnly.placeholder);
|
|
3709
3712
|
}
|
|
3710
3713
|
function textInputFontSizeStyle(props) {
|
|
3711
3714
|
var theme = props.theme;
|
|
@@ -3724,13 +3727,14 @@ function textInputRepresentationStyle(props) {
|
|
|
3724
3727
|
var $border = props.$border,
|
|
3725
3728
|
$hasPrefix = props.$hasPrefix,
|
|
3726
3729
|
$hasSuffix = props.$hasSuffix,
|
|
3730
|
+
$scheme = props.$scheme,
|
|
3727
3731
|
$tone = props.$tone,
|
|
3728
3732
|
theme = props.theme;
|
|
3729
3733
|
var _theme$sanity2 = theme.sanity,
|
|
3730
3734
|
focusRing = _theme$sanity2.focusRing,
|
|
3731
3735
|
input = _theme$sanity2.input;
|
|
3732
3736
|
var color = theme.sanity.color.input;
|
|
3733
|
-
return styled.css(_templateObject3$e || (_templateObject3$e = _taggedTemplateLiteralLoose(["\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-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 : undefined, $hasPrefix ? 0 : undefined, $hasSuffix ? 0 : undefined, $hasSuffix ? 0 : undefined, $tone, color["default"].enabled.bg, color["default"].enabled.fg, $border ? focusRingBorderStyle({
|
|
3737
|
+
return styled.css(_templateObject3$e || (_templateObject3$e = _taggedTemplateLiteralLoose(["\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 : undefined, $hasPrefix ? 0 : undefined, $hasSuffix ? 0 : undefined, $hasSuffix ? 0 : undefined, $scheme, $tone, color["default"].enabled.bg, color["default"].enabled.fg, $border ? focusRingBorderStyle({
|
|
3734
3738
|
color: color["default"].enabled.border,
|
|
3735
3739
|
width: input.border.width
|
|
3736
3740
|
}) : undefined, color.invalid.enabled.bg, color.invalid.enabled.fg, $border ? focusRingBorderStyle({
|
|
@@ -6585,10 +6589,12 @@ var TextArea = /*#__PURE__*/React.forwardRef(function TextArea(props, forwardedR
|
|
|
6585
6589
|
"data-ui": "TextArea"
|
|
6586
6590
|
}, /*#__PURE__*/React__default["default"].createElement(InputRoot$1, null, /*#__PURE__*/React__default["default"].createElement(Input$1, _extends({
|
|
6587
6591
|
"data-as": "textarea",
|
|
6592
|
+
"data-scheme": rootTheme.scheme,
|
|
6588
6593
|
"data-tone": rootTheme.tone
|
|
6589
6594
|
}, restProps, {
|
|
6590
6595
|
"$fontSize": useArrayProp(fontSize),
|
|
6591
6596
|
"$padding": useArrayProp(padding),
|
|
6597
|
+
"$scheme": rootTheme.scheme,
|
|
6592
6598
|
"$space": useArrayProp(0),
|
|
6593
6599
|
"$tone": rootTheme.tone,
|
|
6594
6600
|
"$weight": weight,
|
|
@@ -6597,7 +6603,9 @@ var TextArea = /*#__PURE__*/React.forwardRef(function TextArea(props, forwardedR
|
|
|
6597
6603
|
})), /*#__PURE__*/React__default["default"].createElement(Presentation$1, {
|
|
6598
6604
|
"$border": border,
|
|
6599
6605
|
"$radius": useArrayProp(radius),
|
|
6606
|
+
"$scheme": rootTheme.scheme,
|
|
6600
6607
|
"$tone": rootTheme.tone,
|
|
6608
|
+
"data-scheme": rootTheme.scheme,
|
|
6601
6609
|
"data-tone": rootTheme.tone
|
|
6602
6610
|
})));
|
|
6603
6611
|
});
|
|
@@ -6698,7 +6706,9 @@ var TextInput = /*#__PURE__*/React.forwardRef(function TextInput(props, forwarde
|
|
|
6698
6706
|
"$hasPrefix": $hasPrefix,
|
|
6699
6707
|
"$hasSuffix": $hasSuffix,
|
|
6700
6708
|
"$radius": radius,
|
|
6709
|
+
"$scheme": rootTheme.scheme,
|
|
6701
6710
|
"$tone": rootTheme.tone,
|
|
6711
|
+
"data-scheme": rootTheme.scheme,
|
|
6702
6712
|
"data-tone": rootTheme.tone
|
|
6703
6713
|
}, icon && /*#__PURE__*/React__default["default"].createElement(LeftBox, {
|
|
6704
6714
|
padding: padding
|
|
@@ -6709,7 +6719,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function TextInput(props, forwarde
|
|
|
6709
6719
|
}, /*#__PURE__*/React__default["default"].createElement(Text, {
|
|
6710
6720
|
size: fontSize
|
|
6711
6721
|
}, /*#__PURE__*/React.isValidElement(iconRight) && iconRight, ReactIs.isValidElementType(iconRight) && /*#__PURE__*/React.createElement(iconRight))));
|
|
6712
|
-
}, [border, fontSize, icon, iconRight, padding, radius, rootTheme
|
|
6722
|
+
}, [border, fontSize, icon, iconRight, padding, radius, rootTheme, $hasClearButton, $hasPrefix, $hasSuffix]); // Render clear button (memoized)
|
|
6713
6723
|
|
|
6714
6724
|
var clearButtonBoxPadding = React.useMemo(function () {
|
|
6715
6725
|
return padding.map(function (v) {
|
|
@@ -6764,12 +6774,14 @@ var TextInput = /*#__PURE__*/React.forwardRef(function TextInput(props, forwarde
|
|
|
6764
6774
|
tone: rootTheme.tone
|
|
6765
6775
|
}, prefixNode, /*#__PURE__*/React__default["default"].createElement(InputRoot, null, /*#__PURE__*/React__default["default"].createElement(Input, _extends({
|
|
6766
6776
|
"data-as": "input",
|
|
6777
|
+
"data-scheme": rootTheme.scheme,
|
|
6767
6778
|
"data-tone": rootTheme.tone
|
|
6768
6779
|
}, restProps, {
|
|
6769
6780
|
"$fontSize": fontSize,
|
|
6770
6781
|
"$iconLeft": $hasIcon,
|
|
6771
6782
|
"$iconRight": $hasIconRight || $hasClearButton,
|
|
6772
6783
|
"$padding": padding,
|
|
6784
|
+
"$scheme": rootTheme.scheme,
|
|
6773
6785
|
"$space": space,
|
|
6774
6786
|
"$tone": rootTheme.tone,
|
|
6775
6787
|
"$weight": weight,
|
|
@@ -7733,7 +7745,7 @@ function dialogStyle(_ref) {
|
|
|
7733
7745
|
alignItems: 'center',
|
|
7734
7746
|
justifyContent: 'center',
|
|
7735
7747
|
outline: 'none',
|
|
7736
|
-
background: color.shadow.
|
|
7748
|
+
background: color.shadow.umbra
|
|
7737
7749
|
};
|
|
7738
7750
|
}
|
|
7739
7751
|
function responsiveDialogPositionStyle(props) {
|