braid-design-system 34.6.0 → 34.6.1
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/CHANGELOG.md +6 -0
- package/README.md +4 -2
- package/dist/_virtual/_rolldown/runtime.cjs +1 -1
- package/dist/color-mode/query-param.d.cts +1 -1
- package/dist/color-mode/query-param.d.mts +1 -1
- package/dist/lib/components/Autosuggest/Autosuggest.cjs +2 -1
- package/dist/lib/components/Autosuggest/Autosuggest.mjs +2 -1
- package/dist/lib/components/BraidProvider/BraidProvider.cjs +3 -2
- package/dist/lib/components/BraidProvider/BraidProvider.mjs +3 -2
- package/dist/lib/components/Button/ButtonLoader.css.mjs +2 -1
- package/dist/lib/components/ButtonLink/ButtonLink.playroom.cjs +2 -1
- package/dist/lib/components/ButtonLink/ButtonLink.playroom.mjs +2 -1
- package/dist/lib/components/FieldMessage/FieldMessage.playroom.cjs +2 -1
- package/dist/lib/components/FieldMessage/FieldMessage.playroom.mjs +2 -1
- package/dist/lib/components/Link/Link.cjs +2 -1
- package/dist/lib/components/Link/Link.mjs +2 -1
- package/dist/lib/components/Loader/Loader.css.cjs +6 -5
- package/dist/lib/components/Loader/Loader.css.mjs +11 -9
- package/dist/lib/components/PageBlock/PageBlock.cjs +2 -1
- package/dist/lib/components/PageBlock/PageBlock.mjs +2 -1
- package/dist/lib/components/Stepper/Stepper.css.cjs +1 -1
- package/dist/lib/components/Stepper/Stepper.css.mjs +1 -1
- package/dist/lib/components/Table/TableBody.cjs +2 -1
- package/dist/lib/components/Table/TableBody.mjs +2 -1
- package/dist/lib/components/Table/TableCell.cjs +2 -1
- package/dist/lib/components/Table/TableCell.mjs +2 -1
- package/dist/lib/components/Table/TableFooter.cjs +2 -1
- package/dist/lib/components/Table/TableFooter.mjs +2 -1
- package/dist/lib/components/Table/TableHeader.cjs +2 -1
- package/dist/lib/components/Table/TableHeader.mjs +2 -1
- package/dist/lib/components/TextLink/TextLink.mjs +2 -1
- package/dist/lib/components/Textarea/formatRanges.cjs +3 -2
- package/dist/lib/components/Textarea/formatRanges.mjs +3 -2
- package/dist/lib/components/TooltipRenderer/TooltipRenderer.cjs +2 -1
- package/dist/lib/components/TooltipRenderer/TooltipRenderer.mjs +2 -1
- package/dist/lib/components/private/Modal/Modal.cjs +2 -1
- package/dist/lib/components/private/Modal/Modal.mjs +2 -1
- package/dist/lib/components/private/Popover/Popover.cjs +11 -9
- package/dist/lib/components/private/Popover/Popover.css.mjs +5 -4
- package/dist/lib/components/private/Popover/Popover.mjs +11 -9
- package/dist/lib/components/useToast/Toast.cjs +7 -6
- package/dist/lib/components/useToast/Toast.mjs +7 -6
- package/dist/lib/components/useToast/useFlipList.cjs +20 -22
- package/dist/lib/components/useToast/useFlipList.mjs +20 -22
- package/dist/lib/hooks/useIcon/icon.css.cjs +4 -7
- package/dist/lib/hooks/useIcon/icon.css.mjs +4 -7
- package/dist/lib/playroom/FrameComponent.cjs +2 -1
- package/dist/lib/playroom/FrameComponent.mjs +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<div align="center" >
|
|
2
|
-
<
|
|
3
|
-
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/seek-oss/braid-design-system/HEAD/logo-inverted.png" />
|
|
4
|
+
<img src="https://raw.githubusercontent.com/seek-oss/braid-design-system/HEAD/logo.png" alt="BRAID" title="BRAID" width="186px" />
|
|
5
|
+
</picture>
|
|
4
6
|
<br/>
|
|
5
7
|
<br/>
|
|
6
8
|
Themeable design system for the SEEK Group.
|
|
@@ -24,7 +24,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
}
|
|
25
25
|
return to;
|
|
26
26
|
};
|
|
27
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
27
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
28
28
|
value: mod,
|
|
29
29
|
enumerable: true
|
|
30
30
|
}) : target, mod));
|
|
@@ -43,6 +43,6 @@ declare const colorModeQueryParamCheck: string;
|
|
|
43
43
|
*
|
|
44
44
|
* @returns Braid color mode preference as query string parameter
|
|
45
45
|
*/
|
|
46
|
-
declare const getColorModeQueryParam: () => "
|
|
46
|
+
declare const getColorModeQueryParam: () => "" | "_bdsdm=1" | "_bdsdm=2" | "_bdsdm=0";
|
|
47
47
|
//#endregion
|
|
48
48
|
export { colorModeQueryParamCheck, getColorModeQueryParam };
|
|
@@ -43,6 +43,6 @@ declare const colorModeQueryParamCheck: string;
|
|
|
43
43
|
*
|
|
44
44
|
* @returns Braid color mode preference as query string parameter
|
|
45
45
|
*/
|
|
46
|
-
declare const getColorModeQueryParam: () => "
|
|
46
|
+
declare const getColorModeQueryParam: () => "" | "_bdsdm=1" | "_bdsdm=2" | "_bdsdm=0";
|
|
47
47
|
//#endregion
|
|
48
48
|
export { colorModeQueryParamCheck, getColorModeQueryParam };
|
|
@@ -43,7 +43,8 @@ const SUGGESTION_MOUSE_ENTER = 8;
|
|
|
43
43
|
const HAS_SUGGESTIONS_CHANGED = 9;
|
|
44
44
|
function SuggestionItem({ suggestion, highlighted, selected, onHover, id, ...restProps }) {
|
|
45
45
|
const { highlights = [], onClear, clearLabel, data } = suggestion;
|
|
46
|
-
const
|
|
46
|
+
const label = suggestion.label ?? suggestion.text;
|
|
47
|
+
const suggestionParts = (0, autosuggest_highlight_parse_index_js.default)(label, highlights.map(({ start, end }) => [start, end]));
|
|
47
48
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
|
|
48
49
|
component: "li",
|
|
49
50
|
cursor: "pointer",
|
|
@@ -39,7 +39,8 @@ const SUGGESTION_MOUSE_ENTER = 8;
|
|
|
39
39
|
const HAS_SUGGESTIONS_CHANGED = 9;
|
|
40
40
|
function SuggestionItem({ suggestion, highlighted, selected, onHover, id, ...restProps }) {
|
|
41
41
|
const { highlights = [], onClear, clearLabel, data } = suggestion;
|
|
42
|
-
const
|
|
42
|
+
const label = suggestion.label ?? suggestion.text;
|
|
43
|
+
const suggestionParts = parseHighlights(label, highlights.map(({ start, end }) => [start, end]));
|
|
43
44
|
return /* @__PURE__ */ jsx(Box, {
|
|
44
45
|
component: "li",
|
|
45
46
|
cursor: "pointer",
|
|
@@ -14,10 +14,11 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
14
14
|
//#region src/lib/components/BraidProvider/BraidProvider.tsx
|
|
15
15
|
if (process.env.NODE_ENV === "development") require_resetTracker.ensureResetImported();
|
|
16
16
|
const makeLinkComponent = (render) => ({ __forwardRef__: (0, react.forwardRef)(render) });
|
|
17
|
-
const
|
|
17
|
+
const DefaultLinkComponent = makeLinkComponent((props, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
18
18
|
ref,
|
|
19
19
|
...props
|
|
20
|
-
}))
|
|
20
|
+
}));
|
|
21
|
+
const LinkComponentContext = (0, react.createContext)(DefaultLinkComponent);
|
|
21
22
|
const useLinkComponent = (ref) => {
|
|
22
23
|
const linkComponent = (0, react.useContext)(LinkComponentContext);
|
|
23
24
|
(0, assert.default)(!ref || "__forwardRef__" in linkComponent, dedent.default`
|
|
@@ -11,10 +11,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
//#region src/lib/components/BraidProvider/BraidProvider.tsx
|
|
12
12
|
if (process.env.NODE_ENV === "development") ensureResetImported();
|
|
13
13
|
const makeLinkComponent = (render) => ({ __forwardRef__: forwardRef(render) });
|
|
14
|
-
const
|
|
14
|
+
const DefaultLinkComponent = makeLinkComponent((props, ref) => /* @__PURE__ */ jsx("a", {
|
|
15
15
|
ref,
|
|
16
16
|
...props
|
|
17
|
-
}))
|
|
17
|
+
}));
|
|
18
|
+
const LinkComponentContext = createContext(DefaultLinkComponent);
|
|
18
19
|
const useLinkComponent = (ref) => {
|
|
19
20
|
const linkComponent = useContext(LinkComponentContext);
|
|
20
21
|
assert(!ref || "__forwardRef__" in linkComponent, dedent`
|
|
@@ -2,7 +2,8 @@ import { endFileScope, setFileScope } from "@vanilla-extract/css/fileScope";
|
|
|
2
2
|
import { keyframes, style } from "@vanilla-extract/css";
|
|
3
3
|
//#region src/lib/components/Button/ButtonLoader.css.ts
|
|
4
4
|
setFileScope("src/lib/components/Button/ButtonLoader.css.ts", "braid-design-system");
|
|
5
|
-
const
|
|
5
|
+
const spin = keyframes({ to: { transform: "rotate(360deg)" } }, "spin");
|
|
6
|
+
const loading = style({ animation: `${spin} 0.7s linear infinite` }, "loading");
|
|
6
7
|
endFileScope();
|
|
7
8
|
//#endregion
|
|
8
9
|
export { loading };
|
|
@@ -4,9 +4,10 @@ let react = require("react");
|
|
|
4
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
5
|
//#region src/lib/components/ButtonLink/ButtonLink.playroom.tsx
|
|
6
6
|
const ButtonLink = (0, react.forwardRef)(({ variant, ...restProps }, ref) => {
|
|
7
|
+
const isValidVariant = variant && require_Button.buttonVariants.indexOf(variant) > -1;
|
|
7
8
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ButtonLink.ButtonLink, {
|
|
8
9
|
ref,
|
|
9
|
-
variant:
|
|
10
|
+
variant: isValidVariant ? variant : void 0,
|
|
10
11
|
...restProps
|
|
11
12
|
});
|
|
12
13
|
});
|
|
@@ -4,9 +4,10 @@ import { forwardRef } from "react";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/lib/components/ButtonLink/ButtonLink.playroom.tsx
|
|
6
6
|
const ButtonLink = forwardRef(({ variant, ...restProps }, ref) => {
|
|
7
|
+
const isValidVariant = variant && buttonVariants.indexOf(variant) > -1;
|
|
7
8
|
return /* @__PURE__ */ jsx(ButtonLink$1, {
|
|
8
9
|
ref,
|
|
9
|
-
variant:
|
|
10
|
+
variant: isValidVariant ? variant : void 0,
|
|
10
11
|
...restProps
|
|
11
12
|
});
|
|
12
13
|
});
|
|
@@ -3,8 +3,9 @@ const require_FieldMessage = require("./FieldMessage.cjs");
|
|
|
3
3
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
4
|
//#region src/lib/components/FieldMessage/FieldMessage.playroom.tsx
|
|
5
5
|
const FieldMessage = ({ id, tone, ...restProps }) => {
|
|
6
|
+
const resolvedId = require_useFallbackId.useFallbackId(id);
|
|
6
7
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FieldMessage.FieldMessage, {
|
|
7
|
-
id:
|
|
8
|
+
id: resolvedId,
|
|
8
9
|
tone: tone && require_FieldMessage.tones.indexOf(tone) > -1 ? tone : void 0,
|
|
9
10
|
...restProps
|
|
10
11
|
});
|
|
@@ -3,8 +3,9 @@ import { FieldMessage as FieldMessage$1, tones } from "./FieldMessage.mjs";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/components/FieldMessage/FieldMessage.playroom.tsx
|
|
5
5
|
const FieldMessage = ({ id, tone, ...restProps }) => {
|
|
6
|
+
const resolvedId = useFallbackId(id);
|
|
6
7
|
return /* @__PURE__ */ jsx(FieldMessage$1, {
|
|
7
|
-
id:
|
|
8
|
+
id: resolvedId,
|
|
8
9
|
tone: tone && tones.indexOf(tone) > -1 ? tone : void 0,
|
|
9
10
|
...restProps
|
|
10
11
|
});
|
|
@@ -8,7 +8,8 @@ let clsx = require("clsx");
|
|
|
8
8
|
clsx = require_runtime.__toESM(clsx, 1);
|
|
9
9
|
//#region src/lib/components/Link/Link.tsx
|
|
10
10
|
const Link = (0, react.forwardRef)(({ href, className, data, ...restProps }, ref) => {
|
|
11
|
-
|
|
11
|
+
const LinkComponent = require_BraidProvider.useLinkComponent(ref);
|
|
12
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LinkComponent, {
|
|
12
13
|
ref,
|
|
13
14
|
href,
|
|
14
15
|
className: (0, clsx.default)(require_atoms.atoms({ reset: "a" }), className),
|
|
@@ -6,7 +6,8 @@ import { jsx } from "react/jsx-runtime";
|
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
//#region src/lib/components/Link/Link.tsx
|
|
8
8
|
const Link = forwardRef(({ href, className, data, ...restProps }, ref) => {
|
|
9
|
-
|
|
9
|
+
const LinkComponent = useLinkComponent(ref);
|
|
10
|
+
return /* @__PURE__ */ jsx(LinkComponent, {
|
|
10
11
|
ref,
|
|
11
12
|
href,
|
|
12
13
|
className: clsx(atoms({ reset: "a" }), className),
|
|
@@ -13,11 +13,12 @@ const size = (0, _vanilla_extract_css.styleVariants)(require_vars_css.vars.textS
|
|
|
13
13
|
tablet: { height: tablet.fontSize }
|
|
14
14
|
}), "size");
|
|
15
15
|
const currentColor = (0, _vanilla_extract_css.style)({ fill: "currentcolor" }, "currentColor");
|
|
16
|
+
const bounce = (0, _vanilla_extract_css.keyframes)({
|
|
17
|
+
"33%": { transform: `translateY(-1.4em)` },
|
|
18
|
+
"66%": { transform: `translateY(1.4em)` }
|
|
19
|
+
}, "bounce");
|
|
16
20
|
const bounceAnimation = (0, _vanilla_extract_css.style)({
|
|
17
|
-
animationName:
|
|
18
|
-
"33%": { transform: `translateY(-1.4em)` },
|
|
19
|
-
"66%": { transform: `translateY(1.4em)` }
|
|
20
|
-
}, "bounce"),
|
|
21
|
+
animationName: bounce,
|
|
21
22
|
animationFillMode: "both",
|
|
22
23
|
animationIterationCount: "infinite",
|
|
23
24
|
animationTimingFunction: "ease-in-out",
|
|
@@ -27,7 +28,7 @@ const animationDelayInMs = 70;
|
|
|
27
28
|
const circle = (0, _vanilla_extract_css.style)([bounceAnimation, (0, _vanilla_extract_css.style)({
|
|
28
29
|
transform: `translateY(1.4em)`,
|
|
29
30
|
selectors: {
|
|
30
|
-
[`&:nth-child(1)`]: { animationDelay:
|
|
31
|
+
[`&:nth-child(1)`]: { animationDelay: `140ms` },
|
|
31
32
|
[`&:nth-child(2)`]: { animationDelay: `${animationDelayInMs}ms` }
|
|
32
33
|
}
|
|
33
34
|
}, "circle")], "circle");
|
|
@@ -13,11 +13,12 @@ const size = styleVariants(vars.textSize, ({ mobile, tablet }) => responsiveStyl
|
|
|
13
13
|
tablet: { height: tablet.fontSize }
|
|
14
14
|
}), "size");
|
|
15
15
|
const currentColor = style({ fill: "currentcolor" }, "currentColor");
|
|
16
|
+
const bounce = keyframes({
|
|
17
|
+
"33%": { transform: `translateY(-1.4em)` },
|
|
18
|
+
"66%": { transform: `translateY(1.4em)` }
|
|
19
|
+
}, "bounce");
|
|
16
20
|
const bounceAnimation = style({
|
|
17
|
-
animationName:
|
|
18
|
-
"33%": { transform: `translateY(-1.4em)` },
|
|
19
|
-
"66%": { transform: `translateY(1.4em)` }
|
|
20
|
-
}, "bounce"),
|
|
21
|
+
animationName: bounce,
|
|
21
22
|
animationFillMode: "both",
|
|
22
23
|
animationIterationCount: "infinite",
|
|
23
24
|
animationTimingFunction: "ease-in-out",
|
|
@@ -27,16 +28,17 @@ const animationDelayInMs = 70;
|
|
|
27
28
|
const circle = style([bounceAnimation, style({
|
|
28
29
|
transform: `translateY(1.4em)`,
|
|
29
30
|
selectors: {
|
|
30
|
-
[`&:nth-child(1)`]: { animationDelay:
|
|
31
|
+
[`&:nth-child(1)`]: { animationDelay: `140ms` },
|
|
31
32
|
[`&:nth-child(2)`]: { animationDelay: `${animationDelayInMs}ms` }
|
|
32
33
|
}
|
|
33
34
|
}, "circle")], "circle");
|
|
35
|
+
const fade = keyframes({
|
|
36
|
+
from: { opacity: 0 },
|
|
37
|
+
to: { opacity: 1 }
|
|
38
|
+
}, "fade");
|
|
34
39
|
const delay = style({
|
|
35
40
|
opacity: 0,
|
|
36
|
-
animationName:
|
|
37
|
-
from: { opacity: 0 },
|
|
38
|
-
to: { opacity: 1 }
|
|
39
|
-
}, "fade"),
|
|
41
|
+
animationName: fade,
|
|
40
42
|
animationIterationCount: "1",
|
|
41
43
|
animationFillMode: "forwards",
|
|
42
44
|
animationTimingFunction: "ease-in",
|
|
@@ -13,9 +13,10 @@ const validPageBlockComponents = [
|
|
|
13
13
|
"nav"
|
|
14
14
|
];
|
|
15
15
|
const PageBlock = ({ children, width = "large", component: componentProp, data, ...restProps }) => {
|
|
16
|
+
const component = componentProp && validPageBlockComponents.includes(componentProp) ? componentProp : "div";
|
|
16
17
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
|
|
17
18
|
width: "full",
|
|
18
|
-
component
|
|
19
|
+
component,
|
|
19
20
|
paddingX: require_pageBlockGutters.pageBlockGutters,
|
|
20
21
|
...require_buildDataAttributes.default({
|
|
21
22
|
data,
|
|
@@ -13,9 +13,10 @@ const validPageBlockComponents = [
|
|
|
13
13
|
"nav"
|
|
14
14
|
];
|
|
15
15
|
const PageBlock = ({ children, width = "large", component: componentProp, data, ...restProps }) => {
|
|
16
|
+
const component = componentProp && validPageBlockComponents.includes(componentProp) ? componentProp : "div";
|
|
16
17
|
return /* @__PURE__ */ jsx(Box, {
|
|
17
18
|
width: "full",
|
|
18
|
-
component
|
|
19
|
+
component,
|
|
19
20
|
paddingX: pageBlockGutters,
|
|
20
21
|
...buildDataAttributes_default({
|
|
21
22
|
data,
|
|
@@ -76,7 +76,7 @@ const tick = (0, _vanilla_extract_css.style)([
|
|
|
76
76
|
const progressBarGap = "xxsmall";
|
|
77
77
|
const dotSize = 2;
|
|
78
78
|
const progressTrack = (0, _vanilla_extract_css.style)({
|
|
79
|
-
background: `repeating-linear-gradient(90deg, ${baseColourVar}, ${baseColourVar} ${dotSize}px, transparent ${dotSize}px, transparent
|
|
79
|
+
background: `repeating-linear-gradient(90deg, ${baseColourVar}, ${baseColourVar} ${dotSize}px, transparent ${dotSize}px, transparent 4px)`,
|
|
80
80
|
height: require_vars_css.vars.borderWidth.large,
|
|
81
81
|
width: `${(0, _vanilla_extract_css_utils.calc)("100%").subtract(stepIndicatorSize).subtract((0, _vanilla_extract_css_utils.calc)(require_vars_css.vars.space[progressBarGap]).multiply(2))}`,
|
|
82
82
|
top: `${(0, _vanilla_extract_css_utils.calc)(stepIndicatorSize).subtract(require_vars_css.vars.borderWidth.large).divide(2)}`,
|
|
@@ -76,7 +76,7 @@ const tick = style([
|
|
|
76
76
|
const progressBarGap = "xxsmall";
|
|
77
77
|
const dotSize = 2;
|
|
78
78
|
const progressTrack = style({
|
|
79
|
-
background: `repeating-linear-gradient(90deg, ${baseColourVar}, ${baseColourVar} ${dotSize}px, transparent ${dotSize}px, transparent
|
|
79
|
+
background: `repeating-linear-gradient(90deg, ${baseColourVar}, ${baseColourVar} ${dotSize}px, transparent ${dotSize}px, transparent 4px)`,
|
|
80
80
|
height: vars.borderWidth.large,
|
|
81
81
|
width: `${calc("100%").subtract(stepIndicatorSize).subtract(calc(vars.space[progressBarGap]).multiply(2))}`,
|
|
82
82
|
top: `${calc(stepIndicatorSize).subtract(vars.borderWidth.large).divide(2)}`,
|
|
@@ -9,7 +9,8 @@ let react = require("react");
|
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
//#region src/lib/components/Table/TableBody.tsx
|
|
11
11
|
const TableBody = (0, react.forwardRef)(({ children, data, ...restProps }, ref) => {
|
|
12
|
-
|
|
12
|
+
const tableContext = (0, react.useContext)(require_TableContext.TableContext);
|
|
13
|
+
(0, assert.default)(tableContext, "TableBody must be used within a Table component");
|
|
13
14
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_TableContext.TableBodyContext.Provider, {
|
|
14
15
|
value: true,
|
|
15
16
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
|
|
@@ -7,7 +7,8 @@ import { forwardRef, useContext } from "react";
|
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/lib/components/Table/TableBody.tsx
|
|
9
9
|
const TableBody = forwardRef(({ children, data, ...restProps }, ref) => {
|
|
10
|
-
|
|
10
|
+
const tableContext = useContext(TableContext);
|
|
11
|
+
assert(tableContext, "TableBody must be used within a Table component");
|
|
11
12
|
return /* @__PURE__ */ jsx(TableBodyContext.Provider, {
|
|
12
13
|
value: true,
|
|
13
14
|
children: /* @__PURE__ */ jsx(Box, {
|
|
@@ -93,7 +93,8 @@ const TableCell = (0, react.forwardRef)((props, ref) => {
|
|
|
93
93
|
});
|
|
94
94
|
const TableHeaderCell = (0, react.forwardRef)((props, ref) => {
|
|
95
95
|
const tableHeaderContext = (0, react.useContext)(require_TableContext.TableHeaderContext);
|
|
96
|
-
|
|
96
|
+
const tableRowContext = (0, react.useContext)(require_TableContext.TableRowContext);
|
|
97
|
+
(0, assert.default)(tableRowContext, "TableHeaderCell cannot be used outside a TableRow component");
|
|
97
98
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Cell, {
|
|
98
99
|
...props,
|
|
99
100
|
header: true,
|
|
@@ -91,7 +91,8 @@ const TableCell = forwardRef((props, ref) => {
|
|
|
91
91
|
});
|
|
92
92
|
const TableHeaderCell = forwardRef((props, ref) => {
|
|
93
93
|
const tableHeaderContext = useContext(TableHeaderContext);
|
|
94
|
-
|
|
94
|
+
const tableRowContext = useContext(TableRowContext);
|
|
95
|
+
assert(tableRowContext, "TableHeaderCell cannot be used outside a TableRow component");
|
|
95
96
|
return /* @__PURE__ */ jsx(Cell, {
|
|
96
97
|
...props,
|
|
97
98
|
header: true,
|
|
@@ -9,7 +9,8 @@ let react = require("react");
|
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
//#region src/lib/components/Table/TableFooter.tsx
|
|
11
11
|
const TableFooter = (0, react.forwardRef)(({ children, data, ...restProps }, ref) => {
|
|
12
|
-
|
|
12
|
+
const tableContext = (0, react.useContext)(require_TableContext.TableContext);
|
|
13
|
+
(0, assert.default)(tableContext, "TableFooter must be used within a Table component");
|
|
13
14
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_TableContext.TableFooterContext.Provider, {
|
|
14
15
|
value: true,
|
|
15
16
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
|
|
@@ -7,7 +7,8 @@ import { forwardRef, useContext } from "react";
|
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/lib/components/Table/TableFooter.tsx
|
|
9
9
|
const TableFooter = forwardRef(({ children, data, ...restProps }, ref) => {
|
|
10
|
-
|
|
10
|
+
const tableContext = useContext(TableContext);
|
|
11
|
+
assert(tableContext, "TableFooter must be used within a Table component");
|
|
11
12
|
return /* @__PURE__ */ jsx(TableFooterContext.Provider, {
|
|
12
13
|
value: true,
|
|
13
14
|
children: /* @__PURE__ */ jsx(Box, {
|
|
@@ -9,7 +9,8 @@ let react = require("react");
|
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
//#region src/lib/components/Table/TableHeader.tsx
|
|
11
11
|
const TableHeader = (0, react.forwardRef)(({ children, data, ...restProps }, ref) => {
|
|
12
|
-
|
|
12
|
+
const tableContext = (0, react.useContext)(require_TableContext.TableContext);
|
|
13
|
+
(0, assert.default)(tableContext, "TableHeader must be used within a Table component");
|
|
13
14
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_TableContext.TableHeaderContext.Provider, {
|
|
14
15
|
value: true,
|
|
15
16
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
|
|
@@ -7,7 +7,8 @@ import { forwardRef, useContext } from "react";
|
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/lib/components/Table/TableHeader.tsx
|
|
9
9
|
const TableHeader = forwardRef(({ children, data, ...restProps }, ref) => {
|
|
10
|
-
|
|
10
|
+
const tableContext = useContext(TableContext);
|
|
11
|
+
assert(tableContext, "TableHeader must be used within a Table component");
|
|
11
12
|
return /* @__PURE__ */ jsx(TableHeaderContext.Provider, {
|
|
12
13
|
value: true,
|
|
13
14
|
children: /* @__PURE__ */ jsx(Box, {
|
|
@@ -18,7 +18,8 @@ const useLinkStyles = ({ reset = "a", weight, showVisited = false, hitArea = "st
|
|
|
18
18
|
const backgroundContext = useBackground();
|
|
19
19
|
const textContext = useContext(TextContext);
|
|
20
20
|
const isWeakDueToTextTone = !useContext(HeadingContext_default) && textContext?.tone !== "neutral";
|
|
21
|
-
|
|
21
|
+
const linkStyles = weight === "weak" || isWeakDueToTextTone ? weakLink : [isPlainBackground(backgroundContext.lightMode, "light") || weight === "regular" ? regularLinkLightMode[backgroundLightness.lightMode] : weakLink, isPlainBackground(backgroundContext.darkMode, "dark") || weight === "regular" ? regularLinkDarkMode[backgroundLightness.darkMode] : weakLink];
|
|
22
|
+
return clsx(base, linkStyles, weight !== "weak" ? fontWeight.medium : void 0, showVisited ? [visitedLightMode[backgroundLightness.lightMode], visitedDarkMode[backgroundLightness.darkMode]] : "", reset !== false ? atoms({ reset: typeof reset === "string" ? reset : "a" }) : null, atoms({ cursor: "pointer" }), hitArea === "large" && virtualTouchable);
|
|
22
23
|
};
|
|
23
24
|
const TextLinkContent = ({ icon, iconPosition = "leading", children }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
24
25
|
icon && iconPosition === "leading" ? /* @__PURE__ */ jsx(AvoidWidowIcon, {
|
|
@@ -7,7 +7,7 @@ autosuggest_highlight_parse_index_js = require_runtime.__toESM(autosuggest_highl
|
|
|
7
7
|
const formatRanges = (value, highlightRanges, tone) => {
|
|
8
8
|
if (highlightRanges && value) {
|
|
9
9
|
let lastEnd = 0;
|
|
10
|
-
|
|
10
|
+
const validatedAndSortedRanges = highlightRanges.sort((a, b) => a.start > b.start ? 1 : -1).reduce((acc, { end, start }) => {
|
|
11
11
|
const resolvedEnd = end || value.length;
|
|
12
12
|
if (resolvedEnd <= start) return acc;
|
|
13
13
|
const adjustedRange = [];
|
|
@@ -19,7 +19,8 @@ const formatRanges = (value, highlightRanges, tone) => {
|
|
|
19
19
|
lastEnd = resolvedEnd;
|
|
20
20
|
}
|
|
21
21
|
return [...acc, ...adjustedRange];
|
|
22
|
-
}, [])
|
|
22
|
+
}, []);
|
|
23
|
+
return (0, autosuggest_highlight_parse_index_js.default)(value, validatedAndSortedRanges.map(({ start, end }) => [start, end || value.length])).reduce((acc, { text, highlight }, i) => {
|
|
23
24
|
if (text) acc.push(highlight ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Highlight.Highlight, {
|
|
24
25
|
tone,
|
|
25
26
|
children: text
|
|
@@ -5,7 +5,7 @@ import parseHighlights from "autosuggest-highlight/parse/index.js";
|
|
|
5
5
|
const formatRanges = (value, highlightRanges, tone) => {
|
|
6
6
|
if (highlightRanges && value) {
|
|
7
7
|
let lastEnd = 0;
|
|
8
|
-
|
|
8
|
+
const validatedAndSortedRanges = highlightRanges.sort((a, b) => a.start > b.start ? 1 : -1).reduce((acc, { end, start }) => {
|
|
9
9
|
const resolvedEnd = end || value.length;
|
|
10
10
|
if (resolvedEnd <= start) return acc;
|
|
11
11
|
const adjustedRange = [];
|
|
@@ -17,7 +17,8 @@ const formatRanges = (value, highlightRanges, tone) => {
|
|
|
17
17
|
lastEnd = resolvedEnd;
|
|
18
18
|
}
|
|
19
19
|
return [...acc, ...adjustedRange];
|
|
20
|
-
}, [])
|
|
20
|
+
}, []);
|
|
21
|
+
return parseHighlights(value, validatedAndSortedRanges.map(({ start, end }) => [start, end || value.length])).reduce((acc, { text, highlight }, i) => {
|
|
21
22
|
if (text) acc.push(highlight ? /* @__PURE__ */ jsx(Highlight, {
|
|
22
23
|
tone,
|
|
23
24
|
children: text
|
|
@@ -17,8 +17,9 @@ const offsetSpace = "small";
|
|
|
17
17
|
const StaticTooltipContext = (0, react.createContext)(false);
|
|
18
18
|
const clamp = (min, value, max) => Math.max(min, Math.min(value, max));
|
|
19
19
|
const TooltipTextDefaultsProvider = ({ children }) => {
|
|
20
|
+
const themeName = require_useThemeName.useThemeName();
|
|
20
21
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_defaultTextProps.DefaultTextPropsProvider, {
|
|
21
|
-
size:
|
|
22
|
+
size: themeName === "docs" ? "small" : void 0,
|
|
22
23
|
weight: "medium",
|
|
23
24
|
children
|
|
24
25
|
});
|
|
@@ -15,8 +15,9 @@ const offsetSpace = "small";
|
|
|
15
15
|
const StaticTooltipContext = createContext(false);
|
|
16
16
|
const clamp = (min, value, max) => Math.max(min, Math.min(value, max));
|
|
17
17
|
const TooltipTextDefaultsProvider = ({ children }) => {
|
|
18
|
+
const themeName = useThemeName();
|
|
18
19
|
return /* @__PURE__ */ jsx(DefaultTextPropsProvider, {
|
|
19
|
-
size:
|
|
20
|
+
size: themeName === "docs" ? "small" : void 0,
|
|
20
21
|
weight: "medium",
|
|
21
22
|
children
|
|
22
23
|
});
|
|
@@ -10,6 +10,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
10
10
|
let react_focus_lock = require("react-focus-lock");
|
|
11
11
|
react_focus_lock = require_runtime.__toESM(react_focus_lock, 1);
|
|
12
12
|
//#region src/lib/components/private/Modal/Modal.tsx
|
|
13
|
+
const FocusLock = react_focus_lock.default.default ?? react_focus_lock.default;
|
|
13
14
|
const AllowCloseContext = (0, react.createContext)(true);
|
|
14
15
|
const ModalPortal = ({ children }) => {
|
|
15
16
|
const [modalElement, setElement] = (0, react.useState)(null);
|
|
@@ -106,7 +107,7 @@ const Modal = ({ id, open, children, description, onClose, width, closeLabel, il
|
|
|
106
107
|
window.removeEventListener(event, handleEvent);
|
|
107
108
|
};
|
|
108
109
|
}, [trapActive]);
|
|
109
|
-
return state === OPENING || state === OPEN || state === CLOSING ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModalPortal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
110
|
+
return state === OPENING || state === OPEN || state === CLOSING ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModalPortal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(FocusLock, {
|
|
110
111
|
className: require_Modal_css.resetStackingContext,
|
|
111
112
|
disabled: !trapActive,
|
|
112
113
|
autoFocus: false,
|
|
@@ -6,8 +6,9 @@ import { ModalContent } from "./ModalContent.mjs";
|
|
|
6
6
|
import { ariaHideOthers } from "./ariaHideOthers.mjs";
|
|
7
7
|
import { createContext, useContext, useEffect, useReducer, useRef, useState } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import
|
|
9
|
+
import FocusLockImport from "react-focus-lock";
|
|
10
10
|
//#region src/lib/components/private/Modal/Modal.tsx
|
|
11
|
+
const FocusLock = FocusLockImport.default ?? FocusLockImport;
|
|
11
12
|
const AllowCloseContext = createContext(true);
|
|
12
13
|
const ModalPortal = ({ children }) => {
|
|
13
14
|
const [modalElement, setElement] = useState(null);
|
|
@@ -55,16 +55,18 @@ const PopoverContent = (0, react.forwardRef)(({ id, role, align = "start", width
|
|
|
55
55
|
const spaceScale = require_useSpace.useSpace();
|
|
56
56
|
let offsetSpacePx = 0;
|
|
57
57
|
if (resolvedOffsetSpace !== "none") offsetSpacePx = spaceScale.space[resolvedOffsetSpace] * spaceScale.grid;
|
|
58
|
+
const floatingUiRequestedPosition = getFloatingUiPosition(placement, align);
|
|
59
|
+
const middleware = [
|
|
60
|
+
(0, _floating_ui_react_dom.offset)(offsetSpacePx),
|
|
61
|
+
!lockPlacement && (0, _floating_ui_react_dom.flip)(),
|
|
62
|
+
width === "full" ? (0, _floating_ui_react_dom.size)({ apply({ rects, elements }) {
|
|
63
|
+
Object.assign(elements.floating.style, { width: `${rects.reference.width}px` });
|
|
64
|
+
} }) : (0, _floating_ui_react_dom.shift)({ crossAxis: align === "center" }),
|
|
65
|
+
arrowRef && (0, _floating_ui_react_dom.arrow)({ element: arrowRef })
|
|
66
|
+
].filter(Boolean);
|
|
58
67
|
const { refs, floatingStyles, middlewareData, placement: floatingUiEvaluatedPosition, isPositioned } = (0, _floating_ui_react_dom.useFloating)({
|
|
59
|
-
placement:
|
|
60
|
-
middleware
|
|
61
|
-
(0, _floating_ui_react_dom.offset)(offsetSpacePx),
|
|
62
|
-
!lockPlacement && (0, _floating_ui_react_dom.flip)(),
|
|
63
|
-
width === "full" ? (0, _floating_ui_react_dom.size)({ apply({ rects, elements }) {
|
|
64
|
-
Object.assign(elements.floating.style, { width: `${rects.reference.width}px` });
|
|
65
|
-
} }) : (0, _floating_ui_react_dom.shift)({ crossAxis: align === "center" }),
|
|
66
|
-
arrowRef && (0, _floating_ui_react_dom.arrow)({ element: arrowRef })
|
|
67
|
-
].filter(Boolean),
|
|
68
|
+
placement: floatingUiRequestedPosition,
|
|
69
|
+
middleware,
|
|
68
70
|
whileElementsMounted: _floating_ui_react_dom.autoUpdate
|
|
69
71
|
});
|
|
70
72
|
(0, react.useEffect)(() => {
|
|
@@ -11,11 +11,12 @@ const backdrop = style({
|
|
|
11
11
|
const placementModifier = createVar("placementModifier");
|
|
12
12
|
const invertPlacement = style({ vars: { [placementModifier]: "-1" } }, "invertPlacement");
|
|
13
13
|
const transitionThreshold = "xxsmall";
|
|
14
|
+
const popupAnimation = keyframes({ from: {
|
|
15
|
+
opacity: 0,
|
|
16
|
+
transform: `translateY(${calc(vars.space[transitionThreshold]).multiply(fallbackVar(placementModifier, "1"))})`
|
|
17
|
+
} }, "popupAnimation");
|
|
14
18
|
const animation = style({
|
|
15
|
-
animationName:
|
|
16
|
-
opacity: 0,
|
|
17
|
-
transform: `translateY(${calc(vars.space[transitionThreshold]).multiply(fallbackVar(placementModifier, "1"))})`
|
|
18
|
-
} }, "popupAnimation"),
|
|
19
|
+
animationName: popupAnimation,
|
|
19
20
|
animationFillMode: "both",
|
|
20
21
|
animationTimingFunction: "ease",
|
|
21
22
|
animationDuration: "0.125s",
|
|
@@ -53,16 +53,18 @@ const PopoverContent = forwardRef(({ id, role, align = "start", width = "content
|
|
|
53
53
|
const spaceScale = useSpace();
|
|
54
54
|
let offsetSpacePx = 0;
|
|
55
55
|
if (resolvedOffsetSpace !== "none") offsetSpacePx = spaceScale.space[resolvedOffsetSpace] * spaceScale.grid;
|
|
56
|
+
const floatingUiRequestedPosition = getFloatingUiPosition(placement, align);
|
|
57
|
+
const middleware = [
|
|
58
|
+
offset(offsetSpacePx),
|
|
59
|
+
!lockPlacement && flip(),
|
|
60
|
+
width === "full" ? size({ apply({ rects, elements }) {
|
|
61
|
+
Object.assign(elements.floating.style, { width: `${rects.reference.width}px` });
|
|
62
|
+
} }) : shift({ crossAxis: align === "center" }),
|
|
63
|
+
arrowRef && arrow({ element: arrowRef })
|
|
64
|
+
].filter(Boolean);
|
|
56
65
|
const { refs, floatingStyles, middlewareData, placement: floatingUiEvaluatedPosition, isPositioned } = useFloating({
|
|
57
|
-
placement:
|
|
58
|
-
middleware
|
|
59
|
-
offset(offsetSpacePx),
|
|
60
|
-
!lockPlacement && flip(),
|
|
61
|
-
width === "full" ? size({ apply({ rects, elements }) {
|
|
62
|
-
Object.assign(elements.floating.style, { width: `${rects.reference.width}px` });
|
|
63
|
-
} }) : shift({ crossAxis: align === "center" }),
|
|
64
|
-
arrowRef && arrow({ element: arrowRef })
|
|
65
|
-
].filter(Boolean),
|
|
66
|
+
placement: floatingUiRequestedPosition,
|
|
67
|
+
middleware,
|
|
66
68
|
whileElementsMounted: autoUpdate
|
|
67
69
|
});
|
|
68
70
|
useEffect(() => {
|
|
@@ -25,20 +25,21 @@ const toneToIcon = {
|
|
|
25
25
|
critical: require_IconCritical.IconCritical,
|
|
26
26
|
positive: require_IconPositive.IconPositive
|
|
27
27
|
};
|
|
28
|
-
const toastDuration =
|
|
28
|
+
const toastDuration = 1e4;
|
|
29
29
|
const borderRadius = "large";
|
|
30
30
|
const Action = ({ label, onClick, removeToast }) => {
|
|
31
|
+
const handleClick = (0, react.useCallback)((event) => {
|
|
32
|
+
event.stopPropagation();
|
|
33
|
+
removeToast();
|
|
34
|
+
onClick();
|
|
35
|
+
}, [removeToast, onClick]);
|
|
31
36
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
32
37
|
baseline: false,
|
|
33
38
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
|
|
34
39
|
component: "span",
|
|
35
40
|
"aria-hidden": true,
|
|
36
41
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_TextLinkButton.TextLinkButton, {
|
|
37
|
-
onClick:
|
|
38
|
-
event.stopPropagation();
|
|
39
|
-
removeToast();
|
|
40
|
-
onClick();
|
|
41
|
-
}, [removeToast, onClick]),
|
|
42
|
+
onClick: handleClick,
|
|
42
43
|
hitArea: "large",
|
|
43
44
|
children: label
|
|
44
45
|
})
|
|
@@ -23,20 +23,21 @@ const toneToIcon = {
|
|
|
23
23
|
critical: IconCritical,
|
|
24
24
|
positive: IconPositive
|
|
25
25
|
};
|
|
26
|
-
const toastDuration =
|
|
26
|
+
const toastDuration = 1e4;
|
|
27
27
|
const borderRadius = "large";
|
|
28
28
|
const Action = ({ label, onClick, removeToast }) => {
|
|
29
|
+
const handleClick = useCallback((event) => {
|
|
30
|
+
event.stopPropagation();
|
|
31
|
+
removeToast();
|
|
32
|
+
onClick();
|
|
33
|
+
}, [removeToast, onClick]);
|
|
29
34
|
return /* @__PURE__ */ jsx(Text, {
|
|
30
35
|
baseline: false,
|
|
31
36
|
children: /* @__PURE__ */ jsx(Box, {
|
|
32
37
|
component: "span",
|
|
33
38
|
"aria-hidden": true,
|
|
34
39
|
children: /* @__PURE__ */ jsx(TextLinkButton, {
|
|
35
|
-
onClick:
|
|
36
|
-
event.stopPropagation();
|
|
37
|
-
removeToast();
|
|
38
|
-
onClick();
|
|
39
|
-
}, [removeToast, onClick]),
|
|
40
|
+
onClick: handleClick,
|
|
40
41
|
hitArea: "large",
|
|
41
42
|
children: label
|
|
42
43
|
})
|
|
@@ -139,28 +139,26 @@ const useFlipList = (expanded) => {
|
|
|
139
139
|
}]
|
|
140
140
|
});
|
|
141
141
|
break;
|
|
142
|
-
case "become-first":
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
});
|
|
163
|
-
break;
|
|
142
|
+
case "become-first": animations.push({
|
|
143
|
+
element,
|
|
144
|
+
transition: baseTransition,
|
|
145
|
+
transforms: [
|
|
146
|
+
{
|
|
147
|
+
property: "height",
|
|
148
|
+
from: require_px.px(currentHeight),
|
|
149
|
+
to: require_px.px(fullHeight)
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
property: "transform",
|
|
153
|
+
from: transform
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
property: "className",
|
|
157
|
+
from: expanded ? require_Toast_css.collapsed : void 0,
|
|
158
|
+
to: void 0
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
});
|
|
164
162
|
}
|
|
165
163
|
toastStates.set(toastKey, "entered");
|
|
166
164
|
});
|
|
@@ -139,28 +139,26 @@ const useFlipList = (expanded) => {
|
|
|
139
139
|
}]
|
|
140
140
|
});
|
|
141
141
|
break;
|
|
142
|
-
case "become-first":
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
});
|
|
163
|
-
break;
|
|
142
|
+
case "become-first": animations.push({
|
|
143
|
+
element,
|
|
144
|
+
transition: baseTransition,
|
|
145
|
+
transforms: [
|
|
146
|
+
{
|
|
147
|
+
property: "height",
|
|
148
|
+
from: px(currentHeight),
|
|
149
|
+
to: px(fullHeight)
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
property: "transform",
|
|
153
|
+
from: transform
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
property: "className",
|
|
157
|
+
from: expanded ? collapsed : void 0,
|
|
158
|
+
to: void 0
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
});
|
|
164
162
|
}
|
|
165
163
|
toastStates.set(toastKey, "entered");
|
|
166
164
|
});
|
|
@@ -15,18 +15,15 @@ const inlineCrop = (0, _vanilla_extract_css.style)({
|
|
|
15
15
|
marginBottom: `-${iconScaleIncrease}em`
|
|
16
16
|
}, "inlineCrop");
|
|
17
17
|
const inline = (0, _vanilla_extract_css.style)({ verticalAlign: "middle" }, "inline");
|
|
18
|
-
const uppercaseNudge = -.105;
|
|
19
|
-
const lowercaseNudge = -.065;
|
|
20
|
-
const verticalCorrection = .06;
|
|
21
18
|
const alignY = {
|
|
22
19
|
uppercase: (0, _vanilla_extract_css.styleVariants)({
|
|
23
|
-
none: { top:
|
|
24
|
-
up: { top:
|
|
20
|
+
none: { top: `-0.105em` },
|
|
21
|
+
up: { top: `-0.16499999999999998em` },
|
|
25
22
|
down: { top: `-0.045em` }
|
|
26
23
|
}, "alignY_uppercase"),
|
|
27
24
|
lowercase: (0, _vanilla_extract_css.styleVariants)({
|
|
28
|
-
none: { top:
|
|
29
|
-
up: { top:
|
|
25
|
+
none: { top: `-0.065em` },
|
|
26
|
+
up: { top: `-0.125em` },
|
|
30
27
|
down: { top: `-0.0050000000000000044em` }
|
|
31
28
|
}, "alignY_lowercase")
|
|
32
29
|
};
|
|
@@ -15,18 +15,15 @@ const inlineCrop = style({
|
|
|
15
15
|
marginBottom: `-${iconScaleIncrease}em`
|
|
16
16
|
}, "inlineCrop");
|
|
17
17
|
const inline = style({ verticalAlign: "middle" }, "inline");
|
|
18
|
-
const uppercaseNudge = -.105;
|
|
19
|
-
const lowercaseNudge = -.065;
|
|
20
|
-
const verticalCorrection = .06;
|
|
21
18
|
const alignY = {
|
|
22
19
|
uppercase: styleVariants({
|
|
23
|
-
none: { top:
|
|
24
|
-
up: { top:
|
|
20
|
+
none: { top: `-0.105em` },
|
|
21
|
+
up: { top: `-0.16499999999999998em` },
|
|
25
22
|
down: { top: `-0.045em` }
|
|
26
23
|
}, "alignY_uppercase"),
|
|
27
24
|
lowercase: styleVariants({
|
|
28
|
-
none: { top:
|
|
29
|
-
up: { top:
|
|
25
|
+
none: { top: `-0.065em` },
|
|
26
|
+
up: { top: `-0.125em` },
|
|
30
27
|
down: { top: `-0.0050000000000000044em` }
|
|
31
28
|
}, "alignY_lowercase")
|
|
32
29
|
};
|
|
@@ -17,7 +17,8 @@ const PlayroomLink = require_BraidProvider.makeLinkComponent(({ href, onClick, .
|
|
|
17
17
|
...restProps
|
|
18
18
|
}));
|
|
19
19
|
const ResponsiveReady = ({ children }) => {
|
|
20
|
-
|
|
20
|
+
const responsiveReady = require_useResponsiveValue.useResponsiveValue()({ mobile: true }) ?? false;
|
|
21
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: responsiveReady ? children : null });
|
|
21
22
|
};
|
|
22
23
|
var FrameComponent_default = ({ theme, children, frameSettings }) => {
|
|
23
24
|
const stackDebug = (0, react.useMemo)(() => frameSettings.stackDebug, [frameSettings.stackDebug]);
|
|
@@ -17,7 +17,8 @@ const PlayroomLink = makeLinkComponent(({ href, onClick, ...restProps }, ref) =>
|
|
|
17
17
|
...restProps
|
|
18
18
|
}));
|
|
19
19
|
const ResponsiveReady = ({ children }) => {
|
|
20
|
-
|
|
20
|
+
const responsiveReady = useResponsiveValue()({ mobile: true }) ?? false;
|
|
21
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: responsiveReady ? children : null });
|
|
21
22
|
};
|
|
22
23
|
var FrameComponent_default = ({ theme, children, frameSettings }) => {
|
|
23
24
|
const stackDebug = useMemo(() => frameSettings.stackDebug, [frameSettings.stackDebug]);
|