@sanity/ui 2.0.0-beta.1 → 2.0.0-beta.3
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/index.cjs.mjs +10 -36
- package/dist/index.d.ts +180 -239
- package/dist/index.esm.js +105 -84
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +113 -297
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs.mjs +1 -1
- package/dist/theme.d.ts +75 -111
- package/dist/theme.esm.js +169 -97
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +169 -97
- package/dist/theme.js.map +1 -1
- package/package.json +1 -1
- package/src/core/__workshop__/constants.ts +3 -2
- package/src/core/_compat.ts +236 -87
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +6 -3
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +1 -1
- package/src/core/primitives/avatar/__workshop__/stack.tsx +1 -1
- package/src/core/primitives/avatar/avatar.tsx +14 -4
- package/src/core/primitives/avatar/avatarCounter.tsx +16 -5
- package/src/core/primitives/avatar/avatarStack.tsx +2 -2
- package/src/core/primitives/kbd/kbd.tsx +2 -0
- package/src/core/primitives/tooltip/tooltip.tsx +1 -1
- package/src/core/styles/margin/marginsStyle.test.ts +2 -2
- package/src/core/styles/padding/paddingStyle.test.ts +2 -2
- package/src/core/theme/__workshop__/build/Root.tsx +20 -3
- package/src/core/theme/__workshop__/build/story.tsx +16 -10
- package/src/core/theme/__workshop__/canvas.tsx +7 -7
- package/src/core/theme/__workshop__/debug/story.tsx +159 -0
- package/src/core/theme/__workshop__/index.ts +5 -0
- package/src/core/theme/theme.test.tsx +2 -2
- package/src/core/types/avatar.ts +1 -1
- package/src/core/types/button.ts +1 -2
- package/src/theme/build/_deprecated/color/factory.ts +3 -3
- package/src/theme/build/buildColorTheme.ts +16 -16
- package/src/theme/build/colorToken/colorToken.ts +19 -0
- package/src/theme/build/colorToken/compileColorToken.ts +17 -0
- package/src/theme/build/colorToken/index.ts +2 -0
- package/src/theme/build/colorToken/types.ts +6 -0
- package/src/theme/build/renderColorTheme.ts +14 -15
- package/src/theme/build/renderColorValue.ts +1 -1
- package/src/theme/config/system.ts +9 -9
- package/src/theme/config/tokens/color/types.ts +12 -1
- package/src/theme/config/tokens/parseTokenKey.ts +1 -0
- package/src/theme/config/tokens/parseTokenValue.ts +1 -0
- package/src/theme/defaults/colorTokens.ts +127 -66
- package/src/theme/defaults/config.ts +1 -0
- package/src/theme/defaults/fonts.ts +13 -5
- package/src/theme/index.ts +0 -7
- package/src/theme/system/color/_constants.ts +5 -2
- package/src/theme/system/color/_system.ts +2 -1
- package/src/theme/system/color/avatar.ts +2 -12
- package/src/theme/system/color/button.ts +4 -20
- package/src/theme/system/color/input.ts +3 -11
- package/src/theme/system/color/selectable.ts +3 -14
- package/src/theme/system/shadow.ts +0 -6
- package/src/theme/system/styles.ts +0 -6
- package/src/theme/system/theme.ts +2 -0
- package/src/theme/system/v0/avatar.ts +1 -1
- package/src/theme/system/v0/color/button.ts +4 -4
- package/src/theme/system/v0/color/card.ts +2 -2
- package/src/theme/system/v0/color/input.ts +3 -3
- package/src/theme/system/v0/color/muted.ts +2 -2
- package/src/theme/system/v0/color/solid.ts +2 -2
- package/src/theme/versioning/themeColor_v0_v2.ts +2 -2
- package/src/theme/versioning/v2_v0.ts +2 -2
- package/src/theme/build/colorToken.ts +0 -39
package/dist/index.js
CHANGED
|
@@ -21,6 +21,16 @@ function _interopDefaultCompat(e) {
|
|
|
21
21
|
var ReactIs__default = /*#__PURE__*/_interopDefaultCompat(ReactIs);
|
|
22
22
|
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
23
23
|
var Refractor__default = /*#__PURE__*/_interopDefaultCompat(Refractor);
|
|
24
|
+
const createColorTheme = theme.createColorTheme;
|
|
25
|
+
const hexToRgb = theme.hexToRgb;
|
|
26
|
+
const hslToRgb = theme.hslToRgb;
|
|
27
|
+
const multiply = theme.multiply;
|
|
28
|
+
const parseColor = theme.parseColor;
|
|
29
|
+
const rgbToHex = theme.rgbToHex;
|
|
30
|
+
const rgbToHsl = theme.rgbToHsl;
|
|
31
|
+
const rgba = theme.rgba;
|
|
32
|
+
const screen = theme.screen;
|
|
33
|
+
const studioTheme = theme.buildTheme();
|
|
24
34
|
const EMPTY_ARRAY = [];
|
|
25
35
|
const EMPTY_RECORD = {};
|
|
26
36
|
function _fillCSSObject(keys, value) {
|
|
@@ -1827,14 +1837,14 @@ const Avatar = react.forwardRef(function Avatar2(props, ref) {
|
|
|
1827
1837
|
arrowPosition: arrowPositionProp,
|
|
1828
1838
|
animateArrowFrom,
|
|
1829
1839
|
status = "online",
|
|
1830
|
-
size: sizeProp =
|
|
1840
|
+
size: sizeProp = 1,
|
|
1831
1841
|
...restProps
|
|
1832
1842
|
} = props;
|
|
1833
|
-
const as = ReactIs__default.default.isValidElementType(asProp) ? asProp : "div";
|
|
1834
|
-
const size = useArrayProp(sizeProp);
|
|
1835
1843
|
const {
|
|
1836
1844
|
avatar
|
|
1837
1845
|
} = useTheme_v2();
|
|
1846
|
+
const as = ReactIs__default.default.isValidElementType(asProp) ? asProp : "div";
|
|
1847
|
+
const size = useArrayProp(sizeProp);
|
|
1838
1848
|
const avatarSize = avatar.sizes[size[0]] || avatar.sizes[0];
|
|
1839
1849
|
const _sizeRem = avatarSize.size;
|
|
1840
1850
|
const _radius = _sizeRem / 2;
|
|
@@ -1856,7 +1866,12 @@ const Avatar = react.forwardRef(function Avatar2(props, ref) {
|
|
|
1856
1866
|
onImageLoadError(new Error("Avatar: the image failed to load"));
|
|
1857
1867
|
}
|
|
1858
1868
|
}, [onImageLoadError]);
|
|
1859
|
-
const initialsSize = react.useMemo(() => size.map(s =>
|
|
1869
|
+
const initialsSize = react.useMemo(() => size.map(s => {
|
|
1870
|
+
if (s === 1) return 1;
|
|
1871
|
+
if (s === 2) return 3;
|
|
1872
|
+
if (s === 3) return 5;
|
|
1873
|
+
return 0;
|
|
1874
|
+
}), [size]);
|
|
1860
1875
|
return /* @__PURE__ */jsxRuntime.jsxs(Root$C, {
|
|
1861
1876
|
as,
|
|
1862
1877
|
"data-as": typeof as === "string" ? as : void 0,
|
|
@@ -1919,6 +1934,7 @@ const Avatar = react.forwardRef(function Avatar2(props, ref) {
|
|
|
1919
1934
|
children: /* @__PURE__ */jsxRuntime.jsx(InitialsLabel, {
|
|
1920
1935
|
forwardedAs: "span",
|
|
1921
1936
|
size: initialsSize,
|
|
1937
|
+
weight: "medium",
|
|
1922
1938
|
children: initials
|
|
1923
1939
|
})
|
|
1924
1940
|
})
|
|
@@ -1930,62 +1946,7 @@ var __defProp$B = Object.defineProperty;
|
|
|
1930
1946
|
var __template$A = (cooked, raw) => __freeze$A(__defProp$B(cooked, "raw", {
|
|
1931
1947
|
value: __freeze$A(raw || cooked.slice())
|
|
1932
1948
|
}));
|
|
1933
|
-
var _a$A
|
|
1934
|
-
function textBaseStyle(props) {
|
|
1935
|
-
const {
|
|
1936
|
-
$accent,
|
|
1937
|
-
$muted
|
|
1938
|
-
} = props;
|
|
1939
|
-
const {
|
|
1940
|
-
font
|
|
1941
|
-
} = theme.getTheme_v2(props.theme);
|
|
1942
|
-
return styled.css(_c$a || (_c$a = __template$A(["\n color: var(--card-fg-color);\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n background-color: var(--card-code-bg-color);\n color: var(--card-code-fg-color);\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ", ";\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n color: var(--card-icon-color);\n\n & path {\n vector-effect: non-scaling-stroke !important;\n }\n }\n "])), $accent && styled.css(_a$A || (_a$A = __template$A(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$l || (_b$l = __template$A(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family, font.text.weights.bold);
|
|
1943
|
-
}
|
|
1944
|
-
var __freeze$z = Object.freeze;
|
|
1945
|
-
var __defProp$A = Object.defineProperty;
|
|
1946
|
-
var __template$z = (cooked, raw) => __freeze$z(__defProp$A(cooked, "raw", {
|
|
1947
|
-
value: __freeze$z(raw || cooked.slice())
|
|
1948
|
-
}));
|
|
1949
|
-
var _a$z;
|
|
1950
|
-
const Root$B = styled__default.default.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
|
|
1951
|
-
const SpanWithTextOverflow$1 = styled__default.default.span(_a$z || (_a$z = __template$z(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
1952
|
-
const Text = react.forwardRef(function Text2(props, ref) {
|
|
1953
|
-
const {
|
|
1954
|
-
accent = false,
|
|
1955
|
-
align,
|
|
1956
|
-
children: childrenProp,
|
|
1957
|
-
muted = false,
|
|
1958
|
-
size = 2,
|
|
1959
|
-
textOverflow,
|
|
1960
|
-
weight,
|
|
1961
|
-
...restProps
|
|
1962
|
-
} = props;
|
|
1963
|
-
let children = childrenProp;
|
|
1964
|
-
if (textOverflow === "ellipsis") {
|
|
1965
|
-
children = /* @__PURE__ */jsxRuntime.jsx(SpanWithTextOverflow$1, {
|
|
1966
|
-
children
|
|
1967
|
-
});
|
|
1968
|
-
}
|
|
1969
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$B, {
|
|
1970
|
-
"data-ui": "Text",
|
|
1971
|
-
...restProps,
|
|
1972
|
-
$accent: accent,
|
|
1973
|
-
$align: useArrayProp(align),
|
|
1974
|
-
$muted: muted,
|
|
1975
|
-
ref,
|
|
1976
|
-
$size: useArrayProp(size),
|
|
1977
|
-
$weight: weight,
|
|
1978
|
-
children: /* @__PURE__ */jsxRuntime.jsx("span", {
|
|
1979
|
-
children
|
|
1980
|
-
})
|
|
1981
|
-
});
|
|
1982
|
-
});
|
|
1983
|
-
var __freeze$y = Object.freeze;
|
|
1984
|
-
var __defProp$z = Object.defineProperty;
|
|
1985
|
-
var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
|
|
1986
|
-
value: __freeze$y(raw || cooked.slice())
|
|
1987
|
-
}));
|
|
1988
|
-
var _a$y;
|
|
1949
|
+
var _a$A;
|
|
1989
1950
|
function _responsiveAvatarCounterSizeStyle(props) {
|
|
1990
1951
|
const {
|
|
1991
1952
|
avatar,
|
|
@@ -2005,23 +1966,28 @@ function _avatarCounterBaseStyle(props) {
|
|
|
2005
1966
|
const {
|
|
2006
1967
|
space
|
|
2007
1968
|
} = theme.getTheme_v2(props.theme);
|
|
2008
|
-
return styled.css(_a$
|
|
1969
|
+
return styled.css(_a$A || (_a$A = __template$A(["\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n user-select: none;\n color: inherit;\n color: var(--card-fg-color);\n background: var(--card-bg-color);\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n inset 0 0 0 1px var(--card-hairline-hard-color);\n padding: 0 ", ";\n\n &:not([hidden]) {\n display: flex;\n }\n "])), rem(space[2]));
|
|
2009
1970
|
}
|
|
2010
|
-
const Root$
|
|
1971
|
+
const Root$B = styled__default.default.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
|
|
2011
1972
|
const AvatarCounter = react.forwardRef(function AvatarCounter2(props, ref) {
|
|
2012
1973
|
const {
|
|
2013
1974
|
count,
|
|
2014
|
-
size: sizeProp =
|
|
1975
|
+
size: sizeProp = 1
|
|
2015
1976
|
} = props;
|
|
2016
1977
|
const size = useArrayProp(sizeProp);
|
|
2017
|
-
const
|
|
2018
|
-
|
|
1978
|
+
const fontSize = react.useMemo(() => size.map(s => {
|
|
1979
|
+
if (s === 1) return 1;
|
|
1980
|
+
if (s === 2) return 3;
|
|
1981
|
+
if (s === 3) return 5;
|
|
1982
|
+
return 0;
|
|
1983
|
+
}), [size]);
|
|
1984
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$B, {
|
|
2019
1985
|
$size: size,
|
|
2020
1986
|
"data-ui": "AvatarCounter",
|
|
2021
1987
|
ref,
|
|
2022
|
-
children: /* @__PURE__ */jsxRuntime.jsx(
|
|
1988
|
+
children: /* @__PURE__ */jsxRuntime.jsx(Label, {
|
|
2023
1989
|
as: "span",
|
|
2024
|
-
size:
|
|
1990
|
+
size: fontSize,
|
|
2025
1991
|
weight: "medium",
|
|
2026
1992
|
children: count
|
|
2027
1993
|
})
|
|
@@ -2031,13 +1997,13 @@ function childrenToElementArray(children) {
|
|
|
2031
1997
|
const childrenArray = Array.isArray(children) ? children : [children];
|
|
2032
1998
|
return childrenArray.filter(node => ReactIs.isElement(node) || ReactIs.isFragment(node) || typeof node === "string");
|
|
2033
1999
|
}
|
|
2034
|
-
var __freeze$
|
|
2035
|
-
var __defProp$
|
|
2036
|
-
var __template$
|
|
2037
|
-
value: __freeze$
|
|
2000
|
+
var __freeze$z = Object.freeze;
|
|
2001
|
+
var __defProp$A = Object.defineProperty;
|
|
2002
|
+
var __template$z = (cooked, raw) => __freeze$z(__defProp$A(cooked, "raw", {
|
|
2003
|
+
value: __freeze$z(raw || cooked.slice())
|
|
2038
2004
|
}));
|
|
2039
|
-
var _a$
|
|
2040
|
-
const BASE_STYLES = styled.css(_a$
|
|
2005
|
+
var _a$z;
|
|
2006
|
+
const BASE_STYLES = styled.css(_a$z || (_a$z = __template$z(["\n white-space: nowrap;\n\n & > div {\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n }\n"])));
|
|
2041
2007
|
function avatarStackStyle() {
|
|
2042
2008
|
return BASE_STYLES;
|
|
2043
2009
|
}
|
|
@@ -2056,12 +2022,12 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
2056
2022
|
};
|
|
2057
2023
|
});
|
|
2058
2024
|
}
|
|
2059
|
-
const Root$
|
|
2025
|
+
const Root$A = styled__default.default.div(responsiveAvatarStackSizeStyle, avatarStackStyle);
|
|
2060
2026
|
const AvatarStack = react.forwardRef(function AvatarStack2(props, ref) {
|
|
2061
2027
|
const {
|
|
2062
2028
|
children: childrenProp,
|
|
2063
2029
|
maxLength: maxLengthProp = 4,
|
|
2064
|
-
size: sizeProp =
|
|
2030
|
+
size: sizeProp = 1,
|
|
2065
2031
|
...restProps
|
|
2066
2032
|
} = props;
|
|
2067
2033
|
const children = childrenToElementArray(childrenProp).filter(child => typeof child !== "string");
|
|
@@ -2071,14 +2037,15 @@ const AvatarStack = react.forwardRef(function AvatarStack2(props, ref) {
|
|
|
2071
2037
|
const visibleCount = maxLength - 1;
|
|
2072
2038
|
const extraCount = len - visibleCount;
|
|
2073
2039
|
const visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
|
|
2074
|
-
return /* @__PURE__ */jsxRuntime.jsxs(Root$
|
|
2040
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$A, {
|
|
2075
2041
|
"data-ui": "AvatarStack",
|
|
2076
2042
|
...restProps,
|
|
2077
2043
|
ref,
|
|
2078
2044
|
$size: size,
|
|
2079
2045
|
children: [len === 0 && /* @__PURE__ */jsxRuntime.jsx("div", {
|
|
2080
2046
|
children: /* @__PURE__ */jsxRuntime.jsx(AvatarCounter, {
|
|
2081
|
-
count: len
|
|
2047
|
+
count: len,
|
|
2048
|
+
size
|
|
2082
2049
|
})
|
|
2083
2050
|
}), len !== 0 && extraCount > 1 && /* @__PURE__ */jsxRuntime.jsx("div", {
|
|
2084
2051
|
children: /* @__PURE__ */jsxRuntime.jsx(AvatarCounter, {
|
|
@@ -2092,7 +2059,7 @@ const AvatarStack = react.forwardRef(function AvatarStack2(props, ref) {
|
|
|
2092
2059
|
}, String(childIndex)))]
|
|
2093
2060
|
});
|
|
2094
2061
|
});
|
|
2095
|
-
const Root$
|
|
2062
|
+
const Root$z = styled__default.default.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle);
|
|
2096
2063
|
const Box = react.forwardRef(function Box2(props, ref) {
|
|
2097
2064
|
const {
|
|
2098
2065
|
as: asProp = "div",
|
|
@@ -2123,7 +2090,7 @@ const Box = react.forwardRef(function Box2(props, ref) {
|
|
|
2123
2090
|
sizing,
|
|
2124
2091
|
...restProps
|
|
2125
2092
|
} = props;
|
|
2126
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2093
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$z, {
|
|
2127
2094
|
"data-as": typeof asProp === "string" ? asProp : void 0,
|
|
2128
2095
|
"data-ui": "Box",
|
|
2129
2096
|
...restProps,
|
|
@@ -2157,6 +2124,61 @@ const Box = react.forwardRef(function Box2(props, ref) {
|
|
|
2157
2124
|
children: props.children
|
|
2158
2125
|
});
|
|
2159
2126
|
});
|
|
2127
|
+
var __freeze$y = Object.freeze;
|
|
2128
|
+
var __defProp$z = Object.defineProperty;
|
|
2129
|
+
var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
|
|
2130
|
+
value: __freeze$y(raw || cooked.slice())
|
|
2131
|
+
}));
|
|
2132
|
+
var _a$y, _b$l, _c$a;
|
|
2133
|
+
function textBaseStyle(props) {
|
|
2134
|
+
const {
|
|
2135
|
+
$accent,
|
|
2136
|
+
$muted
|
|
2137
|
+
} = props;
|
|
2138
|
+
const {
|
|
2139
|
+
font
|
|
2140
|
+
} = theme.getTheme_v2(props.theme);
|
|
2141
|
+
return styled.css(_c$a || (_c$a = __template$y(["\n color: var(--card-fg-color);\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n background-color: var(--card-code-bg-color);\n color: var(--card-code-fg-color);\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ", ";\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n color: var(--card-icon-color);\n\n & path {\n vector-effect: non-scaling-stroke !important;\n }\n }\n "])), $accent && styled.css(_a$y || (_a$y = __template$y(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$l || (_b$l = __template$y(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family, font.text.weights.bold);
|
|
2142
|
+
}
|
|
2143
|
+
var __freeze$x = Object.freeze;
|
|
2144
|
+
var __defProp$y = Object.defineProperty;
|
|
2145
|
+
var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
|
|
2146
|
+
value: __freeze$x(raw || cooked.slice())
|
|
2147
|
+
}));
|
|
2148
|
+
var _a$x;
|
|
2149
|
+
const Root$y = styled__default.default.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
|
|
2150
|
+
const SpanWithTextOverflow$1 = styled__default.default.span(_a$x || (_a$x = __template$x(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
2151
|
+
const Text = react.forwardRef(function Text2(props, ref) {
|
|
2152
|
+
const {
|
|
2153
|
+
accent = false,
|
|
2154
|
+
align,
|
|
2155
|
+
children: childrenProp,
|
|
2156
|
+
muted = false,
|
|
2157
|
+
size = 2,
|
|
2158
|
+
textOverflow,
|
|
2159
|
+
weight,
|
|
2160
|
+
...restProps
|
|
2161
|
+
} = props;
|
|
2162
|
+
let children = childrenProp;
|
|
2163
|
+
if (textOverflow === "ellipsis") {
|
|
2164
|
+
children = /* @__PURE__ */jsxRuntime.jsx(SpanWithTextOverflow$1, {
|
|
2165
|
+
children
|
|
2166
|
+
});
|
|
2167
|
+
}
|
|
2168
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$y, {
|
|
2169
|
+
"data-ui": "Text",
|
|
2170
|
+
...restProps,
|
|
2171
|
+
$accent: accent,
|
|
2172
|
+
$align: useArrayProp(align),
|
|
2173
|
+
$muted: muted,
|
|
2174
|
+
ref,
|
|
2175
|
+
$size: useArrayProp(size),
|
|
2176
|
+
$weight: weight,
|
|
2177
|
+
children: /* @__PURE__ */jsxRuntime.jsx("span", {
|
|
2178
|
+
children
|
|
2179
|
+
})
|
|
2180
|
+
});
|
|
2181
|
+
});
|
|
2160
2182
|
function badgeStyle(props) {
|
|
2161
2183
|
const {
|
|
2162
2184
|
$tone
|
|
@@ -2990,7 +3012,7 @@ var __template$o = (cooked, raw) => __freeze$o(__defProp$p(cooked, "raw", {
|
|
|
2990
3012
|
}));
|
|
2991
3013
|
var _a$o;
|
|
2992
3014
|
function kbdStyle() {
|
|
2993
|
-
return styled.css(_a$o || (_a$o = __template$o(["\n --card-bg-color: var(--card-kbd-bg-color);\n --card-border-color: var(--card-kbd-border-color);\n --card-fg-color: var(--card-kbd-fg-color);\n\n box-shadow: inset 0 0 0 1px var(--card-border-color);\n background: var(--card-bg-color);\n font: inherit;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
3015
|
+
return styled.css(_a$o || (_a$o = __template$o(["\n --card-bg-color: var(--card-kbd-bg-color);\n --card-border-color: var(--card-kbd-border-color);\n --card-fg-color: var(--card-kbd-fg-color);\n\n box-shadow: inset 0 0 0 1px var(--card-border-color);\n background: var(--card-bg-color);\n font: inherit;\n\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
2994
3016
|
}
|
|
2995
3017
|
const Root$m = styled__default.default.kbd(responsiveRadiusStyle, kbdStyle);
|
|
2996
3018
|
const KBD = react.forwardRef(function KBD2(props, ref) {
|
|
@@ -4788,7 +4810,7 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
4788
4810
|
content,
|
|
4789
4811
|
disabled,
|
|
4790
4812
|
fallbackPlacements: fallbackPlacementsProp = (_b = props.fallbackPlacements) != null ? _b : DEFAULT_FALLBACK_PLACEMENTS[(_a2 = props.placement) != null ? _a2 : "bottom"],
|
|
4791
|
-
padding =
|
|
4813
|
+
padding = 2,
|
|
4792
4814
|
placement: placementProp = "bottom",
|
|
4793
4815
|
portal: portalProp,
|
|
4794
4816
|
radius = 2,
|
|
@@ -7617,222 +7639,6 @@ const TreeItem = react.memo(function TreeItem2(props) {
|
|
|
7617
7639
|
})]
|
|
7618
7640
|
});
|
|
7619
7641
|
});
|
|
7620
|
-
Object.defineProperty(exports, 'COLOR_CONFIG_BLEND_KEYS', {
|
|
7621
|
-
enumerable: true,
|
|
7622
|
-
get: function () {
|
|
7623
|
-
return theme.COLOR_CONFIG_BLEND_KEYS;
|
|
7624
|
-
}
|
|
7625
|
-
});
|
|
7626
|
-
Object.defineProperty(exports, 'COLOR_CONFIG_CARD_KEYS', {
|
|
7627
|
-
enumerable: true,
|
|
7628
|
-
get: function () {
|
|
7629
|
-
return theme.COLOR_CONFIG_CARD_KEYS;
|
|
7630
|
-
}
|
|
7631
|
-
});
|
|
7632
|
-
Object.defineProperty(exports, 'COLOR_CONFIG_CARD_TONES', {
|
|
7633
|
-
enumerable: true,
|
|
7634
|
-
get: function () {
|
|
7635
|
-
return theme.COLOR_CONFIG_CARD_TONES;
|
|
7636
|
-
}
|
|
7637
|
-
});
|
|
7638
|
-
Object.defineProperty(exports, 'COLOR_CONFIG_STATE_KEYS', {
|
|
7639
|
-
enumerable: true,
|
|
7640
|
-
get: function () {
|
|
7641
|
-
return theme.COLOR_CONFIG_STATE_KEYS;
|
|
7642
|
-
}
|
|
7643
|
-
});
|
|
7644
|
-
Object.defineProperty(exports, 'COLOR_CONFIG_STATE_TONES', {
|
|
7645
|
-
enumerable: true,
|
|
7646
|
-
get: function () {
|
|
7647
|
-
return theme.COLOR_CONFIG_STATE_TONES;
|
|
7648
|
-
}
|
|
7649
|
-
});
|
|
7650
|
-
Object.defineProperty(exports, 'THEME_COLOR_BLEND_MODES', {
|
|
7651
|
-
enumerable: true,
|
|
7652
|
-
get: function () {
|
|
7653
|
-
return theme.THEME_COLOR_BLEND_MODES;
|
|
7654
|
-
}
|
|
7655
|
-
});
|
|
7656
|
-
Object.defineProperty(exports, 'THEME_COLOR_BUTTON_MODES', {
|
|
7657
|
-
enumerable: true,
|
|
7658
|
-
get: function () {
|
|
7659
|
-
return theme.THEME_COLOR_BUTTON_MODES;
|
|
7660
|
-
}
|
|
7661
|
-
});
|
|
7662
|
-
Object.defineProperty(exports, 'THEME_COLOR_CARD_TONES', {
|
|
7663
|
-
enumerable: true,
|
|
7664
|
-
get: function () {
|
|
7665
|
-
return theme.THEME_COLOR_CARD_TONES;
|
|
7666
|
-
}
|
|
7667
|
-
});
|
|
7668
|
-
Object.defineProperty(exports, 'THEME_COLOR_STATES', {
|
|
7669
|
-
enumerable: true,
|
|
7670
|
-
get: function () {
|
|
7671
|
-
return theme.THEME_COLOR_STATES;
|
|
7672
|
-
}
|
|
7673
|
-
});
|
|
7674
|
-
Object.defineProperty(exports, 'THEME_COLOR_STATE_TONES', {
|
|
7675
|
-
enumerable: true,
|
|
7676
|
-
get: function () {
|
|
7677
|
-
return theme.THEME_COLOR_STATE_TONES;
|
|
7678
|
-
}
|
|
7679
|
-
});
|
|
7680
|
-
Object.defineProperty(exports, 'buildTheme', {
|
|
7681
|
-
enumerable: true,
|
|
7682
|
-
get: function () {
|
|
7683
|
-
return theme.buildTheme;
|
|
7684
|
-
}
|
|
7685
|
-
});
|
|
7686
|
-
Object.defineProperty(exports, 'createColorTheme', {
|
|
7687
|
-
enumerable: true,
|
|
7688
|
-
get: function () {
|
|
7689
|
-
return theme.createColorTheme;
|
|
7690
|
-
}
|
|
7691
|
-
});
|
|
7692
|
-
Object.defineProperty(exports, 'hexToRgb', {
|
|
7693
|
-
enumerable: true,
|
|
7694
|
-
get: function () {
|
|
7695
|
-
return theme.hexToRgb;
|
|
7696
|
-
}
|
|
7697
|
-
});
|
|
7698
|
-
Object.defineProperty(exports, 'hslToRgb', {
|
|
7699
|
-
enumerable: true,
|
|
7700
|
-
get: function () {
|
|
7701
|
-
return theme.hslToRgb;
|
|
7702
|
-
}
|
|
7703
|
-
});
|
|
7704
|
-
Object.defineProperty(exports, 'isColorBlendModeValue', {
|
|
7705
|
-
enumerable: true,
|
|
7706
|
-
get: function () {
|
|
7707
|
-
return theme.isColorBlendModeValue;
|
|
7708
|
-
}
|
|
7709
|
-
});
|
|
7710
|
-
Object.defineProperty(exports, 'isColorButtonMode', {
|
|
7711
|
-
enumerable: true,
|
|
7712
|
-
get: function () {
|
|
7713
|
-
return theme.isColorButtonMode;
|
|
7714
|
-
}
|
|
7715
|
-
});
|
|
7716
|
-
Object.defineProperty(exports, 'isColorConfigBaseKey', {
|
|
7717
|
-
enumerable: true,
|
|
7718
|
-
get: function () {
|
|
7719
|
-
return theme.isColorConfigBaseKey;
|
|
7720
|
-
}
|
|
7721
|
-
});
|
|
7722
|
-
Object.defineProperty(exports, 'isColorConfigBaseTone', {
|
|
7723
|
-
enumerable: true,
|
|
7724
|
-
get: function () {
|
|
7725
|
-
return theme.isColorConfigBaseTone;
|
|
7726
|
-
}
|
|
7727
|
-
});
|
|
7728
|
-
Object.defineProperty(exports, 'isColorConfigBlendKey', {
|
|
7729
|
-
enumerable: true,
|
|
7730
|
-
get: function () {
|
|
7731
|
-
return theme.isColorConfigBlendKey;
|
|
7732
|
-
}
|
|
7733
|
-
});
|
|
7734
|
-
Object.defineProperty(exports, 'isColorConfigStateKey', {
|
|
7735
|
-
enumerable: true,
|
|
7736
|
-
get: function () {
|
|
7737
|
-
return theme.isColorConfigStateKey;
|
|
7738
|
-
}
|
|
7739
|
-
});
|
|
7740
|
-
Object.defineProperty(exports, 'isColorConfigStateTone', {
|
|
7741
|
-
enumerable: true,
|
|
7742
|
-
get: function () {
|
|
7743
|
-
return theme.isColorConfigStateTone;
|
|
7744
|
-
}
|
|
7745
|
-
});
|
|
7746
|
-
Object.defineProperty(exports, 'isColorHueKey', {
|
|
7747
|
-
enumerable: true,
|
|
7748
|
-
get: function () {
|
|
7749
|
-
return theme.isColorHueKey;
|
|
7750
|
-
}
|
|
7751
|
-
});
|
|
7752
|
-
Object.defineProperty(exports, 'isColorOpacityValue', {
|
|
7753
|
-
enumerable: true,
|
|
7754
|
-
get: function () {
|
|
7755
|
-
return theme.isColorOpacityValue;
|
|
7756
|
-
}
|
|
7757
|
-
});
|
|
7758
|
-
Object.defineProperty(exports, 'isColorTintKey', {
|
|
7759
|
-
enumerable: true,
|
|
7760
|
-
get: function () {
|
|
7761
|
-
return theme.isColorTintKey;
|
|
7762
|
-
}
|
|
7763
|
-
});
|
|
7764
|
-
Object.defineProperty(exports, 'isColorTokenValue', {
|
|
7765
|
-
enumerable: true,
|
|
7766
|
-
get: function () {
|
|
7767
|
-
return theme.isColorTokenValue;
|
|
7768
|
-
}
|
|
7769
|
-
});
|
|
7770
|
-
Object.defineProperty(exports, 'isColorValue', {
|
|
7771
|
-
enumerable: true,
|
|
7772
|
-
get: function () {
|
|
7773
|
-
return theme.isColorValue;
|
|
7774
|
-
}
|
|
7775
|
-
});
|
|
7776
|
-
Object.defineProperty(exports, 'multiply', {
|
|
7777
|
-
enumerable: true,
|
|
7778
|
-
get: function () {
|
|
7779
|
-
return theme.multiply;
|
|
7780
|
-
}
|
|
7781
|
-
});
|
|
7782
|
-
Object.defineProperty(exports, 'parseColor', {
|
|
7783
|
-
enumerable: true,
|
|
7784
|
-
get: function () {
|
|
7785
|
-
return theme.parseColor;
|
|
7786
|
-
}
|
|
7787
|
-
});
|
|
7788
|
-
Object.defineProperty(exports, 'parseTokenKey', {
|
|
7789
|
-
enumerable: true,
|
|
7790
|
-
get: function () {
|
|
7791
|
-
return theme.parseTokenKey;
|
|
7792
|
-
}
|
|
7793
|
-
});
|
|
7794
|
-
Object.defineProperty(exports, 'parseTokenValue', {
|
|
7795
|
-
enumerable: true,
|
|
7796
|
-
get: function () {
|
|
7797
|
-
return theme.parseTokenValue;
|
|
7798
|
-
}
|
|
7799
|
-
});
|
|
7800
|
-
Object.defineProperty(exports, 'rgbToHex', {
|
|
7801
|
-
enumerable: true,
|
|
7802
|
-
get: function () {
|
|
7803
|
-
return theme.rgbToHex;
|
|
7804
|
-
}
|
|
7805
|
-
});
|
|
7806
|
-
Object.defineProperty(exports, 'rgbToHsl', {
|
|
7807
|
-
enumerable: true,
|
|
7808
|
-
get: function () {
|
|
7809
|
-
return theme.rgbToHsl;
|
|
7810
|
-
}
|
|
7811
|
-
});
|
|
7812
|
-
Object.defineProperty(exports, 'rgba', {
|
|
7813
|
-
enumerable: true,
|
|
7814
|
-
get: function () {
|
|
7815
|
-
return theme.rgba;
|
|
7816
|
-
}
|
|
7817
|
-
});
|
|
7818
|
-
Object.defineProperty(exports, 'rgbaToRGBA', {
|
|
7819
|
-
enumerable: true,
|
|
7820
|
-
get: function () {
|
|
7821
|
-
return theme.rgbaToRGBA;
|
|
7822
|
-
}
|
|
7823
|
-
});
|
|
7824
|
-
Object.defineProperty(exports, 'screen', {
|
|
7825
|
-
enumerable: true,
|
|
7826
|
-
get: function () {
|
|
7827
|
-
return theme.screen;
|
|
7828
|
-
}
|
|
7829
|
-
});
|
|
7830
|
-
Object.defineProperty(exports, 'studioTheme', {
|
|
7831
|
-
enumerable: true,
|
|
7832
|
-
get: function () {
|
|
7833
|
-
return theme.defaultTheme;
|
|
7834
|
-
}
|
|
7835
|
-
});
|
|
7836
7642
|
exports.Arrow = Arrow;
|
|
7837
7643
|
exports.Autocomplete = Autocomplete;
|
|
7838
7644
|
exports.Avatar = Avatar;
|
|
@@ -7909,8 +7715,11 @@ exports._raf2 = _raf2;
|
|
|
7909
7715
|
exports._responsive = _responsive;
|
|
7910
7716
|
exports.attemptFocus = attemptFocus;
|
|
7911
7717
|
exports.containsOrEqualsElement = containsOrEqualsElement;
|
|
7718
|
+
exports.createColorTheme = createColorTheme;
|
|
7912
7719
|
exports.focusFirstDescendant = focusFirstDescendant;
|
|
7913
7720
|
exports.focusLastDescendant = focusLastDescendant;
|
|
7721
|
+
exports.hexToRgb = hexToRgb;
|
|
7722
|
+
exports.hslToRgb = hslToRgb;
|
|
7914
7723
|
exports.isFocusable = isFocusable;
|
|
7915
7724
|
exports.isHTMLAnchorElement = isHTMLAnchorElement;
|
|
7916
7725
|
exports.isHTMLButtonElement = isHTMLButtonElement;
|
|
@@ -7918,12 +7727,19 @@ exports.isHTMLElement = isHTMLElement;
|
|
|
7918
7727
|
exports.isHTMLInputElement = isHTMLInputElement;
|
|
7919
7728
|
exports.isHTMLSelectElement = isHTMLSelectElement;
|
|
7920
7729
|
exports.isHTMLTextAreaElement = isHTMLTextAreaElement;
|
|
7730
|
+
exports.multiply = multiply;
|
|
7731
|
+
exports.parseColor = parseColor;
|
|
7921
7732
|
exports.rem = rem;
|
|
7922
7733
|
exports.responsiveCodeFontStyle = responsiveCodeFontStyle;
|
|
7923
7734
|
exports.responsiveHeadingFont = responsiveHeadingFont;
|
|
7924
7735
|
exports.responsiveLabelFont = responsiveLabelFont;
|
|
7925
7736
|
exports.responsiveTextAlignStyle = responsiveTextAlignStyle;
|
|
7926
7737
|
exports.responsiveTextFont = responsiveTextFont;
|
|
7738
|
+
exports.rgbToHex = rgbToHex;
|
|
7739
|
+
exports.rgbToHsl = rgbToHsl;
|
|
7740
|
+
exports.rgba = rgba;
|
|
7741
|
+
exports.screen = screen;
|
|
7742
|
+
exports.studioTheme = studioTheme;
|
|
7927
7743
|
exports.useArrayProp = useArrayProp;
|
|
7928
7744
|
exports.useBoundaryElement = useBoundaryElement;
|
|
7929
7745
|
exports.useClickOutside = useClickOutside;
|