@strapi/design-system 2.0.0-beta.5 → 2.0.0-rc.7
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/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/BaseLink/BaseLink.d.ts +2 -2
- package/dist/components/BaseLink/BaseLink.d.ts.map +1 -1
- package/dist/components/Box/Box.d.ts +1 -1
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +2 -4
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/Crumb.d.ts +2 -4
- package/dist/components/Breadcrumbs/Crumb.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/CrumbLink.d.ts +2 -4
- package/dist/components/Breadcrumbs/CrumbLink.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/CrumbSimpleMenu.d.ts +2 -5
- package/dist/components/Breadcrumbs/CrumbSimpleMenu.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +3 -2
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/utils.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts +2 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/CardAction.d.ts +2 -1
- package/dist/components/Card/CardAction.d.ts.map +1 -1
- package/dist/components/Card/CardCheckbox.d.ts +2 -1
- package/dist/components/Card/CardCheckbox.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.d.ts +4 -0
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +5 -1
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/EmptyStateLayout/EmptyStateLayout.d.ts +2 -2
- package/dist/components/EmptyStateLayout/EmptyStateLayout.d.ts.map +1 -1
- package/dist/components/Field/Field.d.ts +4 -0
- package/dist/components/Field/Field.d.ts.map +1 -1
- package/dist/components/Grid/Grid.d.ts +2 -1
- package/dist/components/Grid/Grid.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +7 -18
- package/dist/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/LinkButton/LinkButton.d.ts +4 -10
- package/dist/components/LinkButton/LinkButton.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +1 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +8 -11
- package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/components/RawTable/RawCell.d.ts +1 -1
- package/dist/components/RawTable/RawCell.d.ts.map +1 -1
- package/dist/components/RawTable/RawTable.d.ts +1 -1
- package/dist/components/RawTable/RawTable.d.ts.map +1 -1
- package/dist/components/Searchbar/Searchbar.d.ts.map +1 -1
- package/dist/components/Select/MultiSelect.d.ts +2 -2
- package/dist/components/Select/MultiSelect.d.ts.map +1 -1
- package/dist/components/Select/SelectParts.d.ts +6 -0
- package/dist/components/Select/SelectParts.d.ts.map +1 -1
- package/dist/components/Select/SingleSelect.d.ts +2 -2
- package/dist/components/Select/SingleSelect.d.ts.map +1 -1
- package/dist/components/SimpleMenu/SimpleMenu.d.ts +1 -1
- package/dist/components/SimpleMenu/SimpleMenu.d.ts.map +1 -1
- package/dist/components/SubNav/SubNavLink.d.ts.map +1 -1
- package/dist/components/Switch/Switch.d.ts +4 -6
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Table/Cell.d.ts +2 -2
- package/dist/components/Table/Cell.d.ts.map +1 -1
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Tag/Tag.d.ts +5 -2
- package/dist/components/Tag/Tag.d.ts.map +1 -1
- package/dist/components/TextButton/TextButton.d.ts +8 -3
- package/dist/components/TextButton/TextButton.d.ts.map +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.js +706 -649
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +703 -648
- package/dist/index.mjs.map +1 -1
- package/dist/styles/global.d.ts.map +1 -1
- package/package.json +9 -7
- package/dist/components/BaseButton/BaseButton.d.ts +0 -10
- package/dist/components/BaseButton/BaseButton.d.ts.map +0 -1
- package/dist/components/BaseButton/index.d.ts +0 -2
- package/dist/components/BaseButton/index.d.ts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -26,7 +26,9 @@ import * as Dialog$1 from "@radix-ui/react-dialog";
|
|
|
26
26
|
import * as ScrollArea from "@radix-ui/react-scroll-area";
|
|
27
27
|
import { NumberParser, NumberFormatter } from "@internationalized/number";
|
|
28
28
|
import * as Popover$1 from "@radix-ui/react-popover";
|
|
29
|
+
import * as Progress from "@radix-ui/react-progress";
|
|
29
30
|
import * as RadioGroup from "@radix-ui/react-radio-group";
|
|
31
|
+
import * as Switch from "@radix-ui/react-switch";
|
|
30
32
|
import * as Tabs$1 from "@radix-ui/react-tabs";
|
|
31
33
|
const createContext = (rootComponentName, defaultContext) => {
|
|
32
34
|
const Context = React.createContext(defaultContext);
|
|
@@ -435,25 +437,38 @@ const AccordionItem = styled(RadixAccordion.Item)`
|
|
|
435
437
|
overflow: hidden;
|
|
436
438
|
|
|
437
439
|
&:first-child {
|
|
438
|
-
border-top-left-radius:
|
|
439
|
-
border-top-right-radius:
|
|
440
|
+
border-top-left-radius: 0.3rem;
|
|
441
|
+
border-top-right-radius: 0.3rem;
|
|
440
442
|
}
|
|
441
443
|
|
|
442
444
|
&:last-child {
|
|
443
|
-
border-bottom-left-radius:
|
|
444
|
-
border-bottom-right-radius:
|
|
445
|
+
border-bottom-left-radius: 0.3rem;
|
|
446
|
+
border-bottom-right-radius: 0.3rem;
|
|
445
447
|
}
|
|
446
448
|
|
|
447
449
|
& + & {
|
|
448
450
|
border-top: ${(props) => props.$size === "S" ? `solid 1px ${props.theme.colors.neutral200}` : "unset"};
|
|
449
451
|
}
|
|
450
452
|
|
|
453
|
+
&[data-state='open'] {
|
|
454
|
+
box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
&:hover {
|
|
458
|
+
box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
|
|
459
|
+
}
|
|
460
|
+
|
|
451
461
|
/* This applies our desired focus effect correctly. */
|
|
452
462
|
&:focus-within {
|
|
453
463
|
position: relative;
|
|
454
464
|
z-index: 1;
|
|
455
465
|
box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
|
|
456
466
|
}
|
|
467
|
+
|
|
468
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
469
|
+
transition: box-shadow ${(props) => props.theme.motion.timings["120"]}
|
|
470
|
+
${(props) => props.theme.motion.easings.easeOutQuad};
|
|
471
|
+
}
|
|
457
472
|
`;
|
|
458
473
|
const Trigger$7 = React.forwardRef(
|
|
459
474
|
({ caretPosition = "left", description, icon: Icon, children, ...restProps }, forwardedRef) => {
|
|
@@ -469,10 +484,11 @@ const Trigger$7 = React.forwardRef(
|
|
|
469
484
|
fontWeight: size === "S" ? "bold" : void 0,
|
|
470
485
|
ellipsis: true,
|
|
471
486
|
variant: size === "M" ? "delta" : void 0,
|
|
487
|
+
textAlign: "left",
|
|
472
488
|
children
|
|
473
489
|
}
|
|
474
490
|
),
|
|
475
|
-
description && size === "M" ? /* @__PURE__ */ jsx(Typography, { children: description }) : null
|
|
491
|
+
description && size === "M" ? /* @__PURE__ */ jsx(Typography, { textAlign: "left", children: description }) : null
|
|
476
492
|
] })
|
|
477
493
|
] }),
|
|
478
494
|
caretPosition === "right" ? /* @__PURE__ */ jsx(TriggerIcon, { $size: size, children: /* @__PURE__ */ jsx(CaretDown, { width: size === "S" ? "1.2rem" : "1.6rem", height: size === "S" ? "1.2rem" : "1.6rem" }) }) : null
|
|
@@ -1136,51 +1152,32 @@ const Base = styled(Flex)`
|
|
|
1136
1152
|
`;
|
|
1137
1153
|
}};
|
|
1138
1154
|
`;
|
|
1139
|
-
const
|
|
1140
|
-
({ disabled,
|
|
1141
|
-
return /* @__PURE__ */ jsx(
|
|
1142
|
-
BaseButtonWrapper,
|
|
1143
|
-
{
|
|
1144
|
-
ref,
|
|
1145
|
-
"aria-disabled": disabled,
|
|
1146
|
-
disabled,
|
|
1147
|
-
tag: "button",
|
|
1148
|
-
type: "button",
|
|
1149
|
-
padding: 2,
|
|
1150
|
-
hasRadius: true,
|
|
1151
|
-
background: "neutral0",
|
|
1152
|
-
borderColor: "neutral200",
|
|
1153
|
-
cursor: "pointer",
|
|
1154
|
-
...props,
|
|
1155
|
-
children
|
|
1156
|
-
}
|
|
1157
|
-
);
|
|
1158
|
-
}
|
|
1159
|
-
);
|
|
1160
|
-
const BaseButtonWrapper = styled(Flex)`
|
|
1161
|
-
&[aria-disabled='true'] {
|
|
1162
|
-
pointer-events: none;
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
${focus}
|
|
1166
|
-
`;
|
|
1167
|
-
const BaseLink = forwardRef(
|
|
1168
|
-
({ href, rel = "noreferrer noopener", target = "_self", disabled = false, isExternal = false, ...props }, ref) => {
|
|
1155
|
+
const BaseLinkImpl = forwardRef(
|
|
1156
|
+
({ href, disabled = false, isExternal = false, ...props }, ref) => {
|
|
1169
1157
|
return /* @__PURE__ */ jsx(
|
|
1170
|
-
|
|
1158
|
+
BaseLink,
|
|
1171
1159
|
{
|
|
1172
1160
|
tag: "a",
|
|
1173
1161
|
ref,
|
|
1174
|
-
target: isExternal ? "_blank" :
|
|
1175
|
-
rel: isExternal ?
|
|
1176
|
-
href
|
|
1162
|
+
target: isExternal ? "_blank" : void 0,
|
|
1163
|
+
rel: isExternal ? "noreferrer noopener" : void 0,
|
|
1164
|
+
href,
|
|
1165
|
+
tabIndex: disabled ? -1 : void 0,
|
|
1177
1166
|
"aria-disabled": disabled,
|
|
1178
|
-
|
|
1167
|
+
pointerEvents: disabled ? "none" : void 0,
|
|
1168
|
+
cursor: disabled ? void 0 : "pointer",
|
|
1179
1169
|
...props
|
|
1180
1170
|
}
|
|
1181
1171
|
);
|
|
1182
1172
|
}
|
|
1183
1173
|
);
|
|
1174
|
+
const BaseLink = styled(Box)`
|
|
1175
|
+
text-decoration: none;
|
|
1176
|
+
|
|
1177
|
+
&:visited {
|
|
1178
|
+
color: inherit;
|
|
1179
|
+
}
|
|
1180
|
+
`;
|
|
1184
1181
|
const Divider$1 = () => {
|
|
1185
1182
|
return /* @__PURE__ */ jsx(Box, { "aria-hidden": true, paddingLeft: 1, paddingRight: 1, children: /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral500", children: "/" }) });
|
|
1186
1183
|
};
|
|
@@ -1194,30 +1191,34 @@ const AlignedList = styled(Flex)`
|
|
|
1194
1191
|
margin-left: ${({ theme }) => `calc(-1*${theme.spaces[2]})`};
|
|
1195
1192
|
}
|
|
1196
1193
|
`;
|
|
1197
|
-
const Breadcrumbs = (
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
};
|
|
1207
|
-
Breadcrumbs.displayName = "Breadcrumbs";
|
|
1208
|
-
const Crumb = ({ children, isCurrent = false, ...props }) => /* @__PURE__ */ jsx(Box, { paddingLeft: 2, paddingRight: 2, paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ jsx(
|
|
1209
|
-
Typography,
|
|
1210
|
-
{
|
|
1211
|
-
variant: "pi",
|
|
1212
|
-
textColor: "neutral800",
|
|
1213
|
-
fontWeight: isCurrent ? "bold" : "regular",
|
|
1214
|
-
"aria-current": isCurrent,
|
|
1215
|
-
...props,
|
|
1216
|
-
children
|
|
1194
|
+
const Breadcrumbs = React.forwardRef(
|
|
1195
|
+
({ label, children, ...props }, forwardedRef) => {
|
|
1196
|
+
const childrenArray = React.Children.toArray(children);
|
|
1197
|
+
return /* @__PURE__ */ jsx(Box, { "aria-label": label, tag: "nav", ...props, ref: forwardedRef, children: /* @__PURE__ */ jsx(AlignedList, { tag: "ol", children: React.Children.map(childrenArray, (child, index) => {
|
|
1198
|
+
const shouldDisplayDivider = childrenArray.length > 1 && index + 1 < childrenArray.length;
|
|
1199
|
+
return /* @__PURE__ */ jsxs(Flex, { inline: true, tag: "li", children: [
|
|
1200
|
+
child,
|
|
1201
|
+
shouldDisplayDivider && /* @__PURE__ */ jsx(Divider$1, {})
|
|
1202
|
+
] });
|
|
1203
|
+
}) }) });
|
|
1217
1204
|
}
|
|
1218
|
-
)
|
|
1205
|
+
);
|
|
1206
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
1207
|
+
const Crumb = React.forwardRef(
|
|
1208
|
+
({ children, isCurrent = false, ...props }, forwardedRef) => /* @__PURE__ */ jsx(Box, { paddingLeft: 2, paddingRight: 2, paddingTop: 1, paddingBottom: 1, ref: forwardedRef, children: /* @__PURE__ */ jsx(
|
|
1209
|
+
Typography,
|
|
1210
|
+
{
|
|
1211
|
+
variant: "pi",
|
|
1212
|
+
textColor: "neutral800",
|
|
1213
|
+
fontWeight: isCurrent ? "bold" : "regular",
|
|
1214
|
+
"aria-current": isCurrent,
|
|
1215
|
+
...props,
|
|
1216
|
+
children
|
|
1217
|
+
}
|
|
1218
|
+
) })
|
|
1219
|
+
);
|
|
1219
1220
|
Crumb.displayName = "Crumb";
|
|
1220
|
-
const StyledLink = styled(
|
|
1221
|
+
const StyledLink = styled(BaseLinkImpl)`
|
|
1221
1222
|
border-radius: ${({ theme }) => theme.borderRadius};
|
|
1222
1223
|
color: ${({ theme }) => theme.colors.neutral600};
|
|
1223
1224
|
font-size: ${({ theme }) => theme.fontSizes[1]};
|
|
@@ -1231,9 +1232,22 @@ const StyledLink = styled(BaseLink)`
|
|
|
1231
1232
|
color: ${({ theme }) => theme.colors.neutral700};
|
|
1232
1233
|
}
|
|
1233
1234
|
`;
|
|
1234
|
-
const CrumbLink = ({ children, ...props }) => /* @__PURE__ */ jsx(StyledLink, { ...props, children });
|
|
1235
|
+
const CrumbLink = React.forwardRef(({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsx(StyledLink, { ref: forwardedRef, ...props, children }));
|
|
1235
1236
|
CrumbLink.displayName = "CrumbLink";
|
|
1236
1237
|
const stripReactIdOfColon = (str) => str.replaceAll(":", "");
|
|
1238
|
+
function setRef(ref, value) {
|
|
1239
|
+
if (typeof ref === "function") {
|
|
1240
|
+
ref(value);
|
|
1241
|
+
} else if (ref !== null && ref !== void 0) {
|
|
1242
|
+
ref.current = value;
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
function composeRefs(...refs) {
|
|
1246
|
+
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
1247
|
+
}
|
|
1248
|
+
function useComposedRefs(...refs) {
|
|
1249
|
+
return React.useCallback(composeRefs(...refs), refs);
|
|
1250
|
+
}
|
|
1237
1251
|
const isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent);
|
|
1238
1252
|
const useIsomorphicLayoutEffect = isSSR() ? useEffect : useLayoutEffect;
|
|
1239
1253
|
const useReactId = React["useId".toString()] || (() => void 0);
|
|
@@ -1283,7 +1297,7 @@ const DANGER = "danger";
|
|
|
1283
1297
|
const SUCCESS = "success";
|
|
1284
1298
|
const GHOST = "ghost";
|
|
1285
1299
|
const LIGHT_VARIANTS = [SUCCESS_LIGHT, DANGER_LIGHT];
|
|
1286
|
-
const VARIANTS
|
|
1300
|
+
const VARIANTS = [DEFAULT, TERTIARY, SECONDARY, DANGER, SUCCESS, GHOST, ...LIGHT_VARIANTS];
|
|
1287
1301
|
const BUTTON_SIZES = ["S", "M", "L"];
|
|
1288
1302
|
const getVariantColorName = (variant2) => {
|
|
1289
1303
|
if (variant2 === SUCCESS_LIGHT || variant2 === DANGER_LIGHT) {
|
|
@@ -1292,7 +1306,7 @@ const getVariantColorName = (variant2) => {
|
|
|
1292
1306
|
if (variant2 === TERTIARY) {
|
|
1293
1307
|
return "neutral";
|
|
1294
1308
|
}
|
|
1295
|
-
if (variant2 === DEFAULT || variant2 === SECONDARY || VARIANTS
|
|
1309
|
+
if (variant2 === DEFAULT || variant2 === SECONDARY || VARIANTS.every((vari) => vari !== variant2)) {
|
|
1296
1310
|
return "primary";
|
|
1297
1311
|
}
|
|
1298
1312
|
return `${variant2}`;
|
|
@@ -1302,6 +1316,7 @@ const getDisabledStyle = ({ theme }) => {
|
|
|
1302
1316
|
border: 1px solid ${theme.colors.neutral200};
|
|
1303
1317
|
background: ${theme.colors.neutral150};
|
|
1304
1318
|
color: ${theme.colors.neutral600};
|
|
1319
|
+
cursor: default;
|
|
1305
1320
|
`;
|
|
1306
1321
|
};
|
|
1307
1322
|
const getHoverStyle = ({ theme, $variant }) => {
|
|
@@ -1388,6 +1403,8 @@ const getVariantStyle = ({ theme, $variant }) => {
|
|
|
1388
1403
|
}
|
|
1389
1404
|
default: {
|
|
1390
1405
|
return css`
|
|
1406
|
+
border: 1px solid ${theme.colors.buttonPrimary600};
|
|
1407
|
+
background: ${theme.colors.buttonPrimary600};
|
|
1391
1408
|
color: ${theme.colors.buttonNeutral0};
|
|
1392
1409
|
`;
|
|
1393
1410
|
}
|
|
@@ -1420,21 +1437,22 @@ const Button = forwardRef(
|
|
|
1420
1437
|
disabled: isDisabled,
|
|
1421
1438
|
$size: size,
|
|
1422
1439
|
$variant: variant2,
|
|
1440
|
+
tag: "button",
|
|
1423
1441
|
onClick: handleClick,
|
|
1424
|
-
|
|
1425
|
-
background: "buttonPrimary600",
|
|
1426
|
-
borderColor: "buttonPrimary600",
|
|
1442
|
+
hasRadius: true,
|
|
1427
1443
|
gap: 2,
|
|
1428
|
-
inline:
|
|
1429
|
-
|
|
1444
|
+
inline: true,
|
|
1445
|
+
alignItems: "center",
|
|
1446
|
+
justifyContent: "center",
|
|
1447
|
+
width: fullWidth ? "100%" : void 0,
|
|
1430
1448
|
paddingLeft: 4,
|
|
1431
1449
|
paddingRight: 4,
|
|
1432
|
-
|
|
1450
|
+
cursor: "pointer",
|
|
1433
1451
|
...props,
|
|
1434
1452
|
children: [
|
|
1435
|
-
(startIcon || loading) && /* @__PURE__ */ jsx(
|
|
1453
|
+
(startIcon || loading) && /* @__PURE__ */ jsx(Flex, { tag: "span", "aria-hidden": true, flex: "1 0 1.2rem", children: loading ? /* @__PURE__ */ jsx(LoaderAnimated, {}) : startIcon }),
|
|
1436
1454
|
/* @__PURE__ */ jsx(Typography, { variant: size === "S" ? "pi" : void 0, fontWeight: "bold", children }),
|
|
1437
|
-
endIcon && /* @__PURE__ */ jsx(Flex, { "aria-hidden": true, children: endIcon })
|
|
1455
|
+
endIcon && /* @__PURE__ */ jsx(Flex, { tag: "span", "aria-hidden": true, flex: "1 0 1.2rem", children: endIcon })
|
|
1438
1456
|
]
|
|
1439
1457
|
}
|
|
1440
1458
|
);
|
|
@@ -1452,20 +1470,10 @@ const LoaderAnimated = styled(Loader$1)`
|
|
|
1452
1470
|
animation: ${rotation$2} 2s infinite linear;
|
|
1453
1471
|
will-change: transform;
|
|
1454
1472
|
`;
|
|
1455
|
-
const ButtonWrapper = styled(
|
|
1473
|
+
const ButtonWrapper = styled(Flex)`
|
|
1456
1474
|
height: ${({ theme, $size }) => theme.sizes.button[$size]};
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
height: 1.2rem;
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
&[aria-disabled='true'] {
|
|
1463
|
-
${getDisabledStyle}
|
|
1464
|
-
|
|
1465
|
-
&:active {
|
|
1466
|
-
${getDisabledStyle}
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1475
|
+
text-decoration: none;
|
|
1476
|
+
${getVariantStyle}
|
|
1469
1477
|
|
|
1470
1478
|
&:hover {
|
|
1471
1479
|
${getHoverStyle}
|
|
@@ -1475,7 +1483,9 @@ const ButtonWrapper = styled(BaseButton)`
|
|
|
1475
1483
|
${getActiveStyle}
|
|
1476
1484
|
}
|
|
1477
1485
|
|
|
1478
|
-
|
|
1486
|
+
&[aria-disabled='true'] {
|
|
1487
|
+
${getDisabledStyle}
|
|
1488
|
+
}
|
|
1479
1489
|
|
|
1480
1490
|
@media (prefers-reduced-motion: no-preference) {
|
|
1481
1491
|
transition:
|
|
@@ -1485,8 +1495,8 @@ const ButtonWrapper = styled(BaseButton)`
|
|
|
1485
1495
|
}
|
|
1486
1496
|
`;
|
|
1487
1497
|
const Link = forwardRef(
|
|
1488
|
-
({ children, href, disabled = false, startIcon, endIcon, isExternal =
|
|
1489
|
-
return /* @__PURE__ */ jsxs(LinkWrapper$
|
|
1498
|
+
({ children, href, disabled = false, startIcon, endIcon, isExternal = false, ...props }, ref) => {
|
|
1499
|
+
return /* @__PURE__ */ jsxs(LinkWrapper$1, { ref, href, disabled, isExternal, ...props, children: [
|
|
1490
1500
|
startIcon,
|
|
1491
1501
|
/* @__PURE__ */ jsx(Typography, { textColor: disabled ? "neutral600" : "primary600", children }),
|
|
1492
1502
|
endIcon,
|
|
@@ -1494,7 +1504,7 @@ const Link = forwardRef(
|
|
|
1494
1504
|
] });
|
|
1495
1505
|
}
|
|
1496
1506
|
);
|
|
1497
|
-
const LinkWrapper$
|
|
1507
|
+
const LinkWrapper$1 = styled(BaseLinkImpl)`
|
|
1498
1508
|
display: inline-flex;
|
|
1499
1509
|
align-items: center;
|
|
1500
1510
|
text-decoration: none;
|
|
@@ -1510,7 +1520,9 @@ const LinkWrapper$2 = styled(BaseLink)`
|
|
|
1510
1520
|
}
|
|
1511
1521
|
|
|
1512
1522
|
&:hover {
|
|
1513
|
-
|
|
1523
|
+
span {
|
|
1524
|
+
color: ${({ theme }) => theme.colors.primary500};
|
|
1525
|
+
}
|
|
1514
1526
|
}
|
|
1515
1527
|
|
|
1516
1528
|
&:active {
|
|
@@ -1689,37 +1701,41 @@ const Menu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
1689
1701
|
SubTrigger,
|
|
1690
1702
|
Trigger: Trigger$6
|
|
1691
1703
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1692
|
-
const SimpleMenu = (
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
}
|
|
1704
|
+
const SimpleMenu = React.forwardRef(
|
|
1705
|
+
({ children, onOpen, onClose, popoverPlacement, onReachEnd, ...props }, forwardedRef) => {
|
|
1706
|
+
const triggerRef = React.useRef(null);
|
|
1707
|
+
const composedRef = useComposedRefs(forwardedRef, triggerRef);
|
|
1708
|
+
const contentRef = React.useRef(null);
|
|
1709
|
+
const [internalIsOpen, setInternalIsOpen] = React.useState(false);
|
|
1710
|
+
const handleReachEnd = (entry) => {
|
|
1711
|
+
if (onReachEnd) {
|
|
1712
|
+
onReachEnd(entry);
|
|
1713
|
+
}
|
|
1714
|
+
};
|
|
1715
|
+
const handleOpenChange = (isOpen) => {
|
|
1716
|
+
if (isOpen && typeof onOpen === "function") {
|
|
1717
|
+
onOpen();
|
|
1718
|
+
} else if (!isOpen && typeof onClose === "function") {
|
|
1719
|
+
onClose();
|
|
1720
|
+
}
|
|
1721
|
+
setInternalIsOpen(isOpen);
|
|
1722
|
+
};
|
|
1723
|
+
const generatedId = useId();
|
|
1724
|
+
const intersectionId = `intersection-${stripReactIdOfColon(generatedId)}`;
|
|
1725
|
+
useIntersection(contentRef, handleReachEnd, {
|
|
1726
|
+
selectorToWatch: `#${intersectionId}`,
|
|
1727
|
+
/**
|
|
1728
|
+
* We need to know when the select is open because only then will viewportRef
|
|
1729
|
+
* not be null. Because it uses a portal that (sensibly) is not mounted 24/7.
|
|
1730
|
+
*/
|
|
1731
|
+
skipWhen: !internalIsOpen
|
|
1732
|
+
});
|
|
1733
|
+
return /* @__PURE__ */ jsxs(Root$7, { onOpenChange: handleOpenChange, children: [
|
|
1734
|
+
/* @__PURE__ */ jsx(Trigger$6, { ref: composedRef, ...props, children: props.label }),
|
|
1735
|
+
/* @__PURE__ */ jsx(Content$6, { ref: contentRef, intersectionId, popoverPlacement, children })
|
|
1736
|
+
] });
|
|
1737
|
+
}
|
|
1738
|
+
);
|
|
1723
1739
|
const MenuItem = Item$3;
|
|
1724
1740
|
const StyledButton = styled(SimpleMenu)`
|
|
1725
1741
|
padding: ${({ theme }) => `${theme.spaces[1]} ${theme.spaces[2]}`};
|
|
@@ -1730,16 +1746,19 @@ const StyledButton = styled(SimpleMenu)`
|
|
|
1730
1746
|
background-color: ${({ theme }) => theme.colors.neutral200};
|
|
1731
1747
|
}
|
|
1732
1748
|
`;
|
|
1733
|
-
const CrumbSimpleMenu = (
|
|
1749
|
+
const CrumbSimpleMenu = React.forwardRef(
|
|
1750
|
+
({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsx(StyledButton, { ref: forwardedRef, endIcon: null, size: "S", ...props, children })
|
|
1751
|
+
);
|
|
1734
1752
|
CrumbSimpleMenu.displayName = "CrumbSimpleMenu";
|
|
1735
1753
|
const CardContext = React.createContext({ id: "" });
|
|
1736
1754
|
const useCard = () => React.useContext(CardContext);
|
|
1737
|
-
const Card = ({ id, ...props }) => {
|
|
1755
|
+
const Card = React.forwardRef(({ id, ...props }, forwardedRef) => {
|
|
1738
1756
|
const generatedId = useId(id);
|
|
1739
1757
|
const context = React.useMemo(() => ({ id: generatedId }), [generatedId]);
|
|
1740
1758
|
return /* @__PURE__ */ jsx(CardContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
|
|
1741
1759
|
Box,
|
|
1742
1760
|
{
|
|
1761
|
+
ref: forwardedRef,
|
|
1743
1762
|
id,
|
|
1744
1763
|
tabIndex: 0,
|
|
1745
1764
|
hasRadius: true,
|
|
@@ -1753,10 +1772,10 @@ const Card = ({ id, ...props }) => {
|
|
|
1753
1772
|
...props
|
|
1754
1773
|
}
|
|
1755
1774
|
) });
|
|
1756
|
-
};
|
|
1757
|
-
const CardActionImpl = ({ position, ...restProps }) => {
|
|
1758
|
-
return /* @__PURE__ */ jsx(CardAction, { $position: position, ...restProps, direction: "row", gap: 2 });
|
|
1759
|
-
};
|
|
1775
|
+
});
|
|
1776
|
+
const CardActionImpl = React.forwardRef(({ position, ...restProps }, forwardedRef) => {
|
|
1777
|
+
return /* @__PURE__ */ jsx(CardAction, { ref: forwardedRef, $position: position, ...restProps, direction: "row", gap: 2 });
|
|
1778
|
+
});
|
|
1760
1779
|
const CardAction = styled(Flex)`
|
|
1761
1780
|
position: absolute;
|
|
1762
1781
|
top: ${({ theme }) => theme.spaces[3]};
|
|
@@ -1807,19 +1826,6 @@ const CardBadge = (props) => /* @__PURE__ */ jsx(CardBadgeWrapper, { children: /
|
|
|
1807
1826
|
const CardBody = (props) => {
|
|
1808
1827
|
return /* @__PURE__ */ jsx(Box, { paddingLeft: 3, paddingRight: 3, paddingTop: 2, paddingBottom: 2, children: /* @__PURE__ */ jsx(Flex, { ...props, alignItems: "flex-start" }) });
|
|
1809
1828
|
};
|
|
1810
|
-
function setRef(ref, value) {
|
|
1811
|
-
if (typeof ref === "function") {
|
|
1812
|
-
ref(value);
|
|
1813
|
-
} else if (ref !== null && ref !== void 0) {
|
|
1814
|
-
ref.current = value;
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
function composeRefs(...refs) {
|
|
1818
|
-
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
1819
|
-
}
|
|
1820
|
-
function useComposedRefs(...refs) {
|
|
1821
|
-
return React.useCallback(composeRefs(...refs), refs);
|
|
1822
|
-
}
|
|
1823
1829
|
const CheckIcon = ({ fill, ...props }) => {
|
|
1824
1830
|
const { colors } = useTheme();
|
|
1825
1831
|
return /* @__PURE__ */ jsx(
|
|
@@ -1902,10 +1908,10 @@ const CheckboxImpl = React.forwardRef(({ children, ...restProps }, forwardedRef)
|
|
|
1902
1908
|
/* @__PURE__ */ jsx(Typography, { tag: "label", textColor: "neutral800", htmlFor: labelId, children })
|
|
1903
1909
|
] });
|
|
1904
1910
|
});
|
|
1905
|
-
const CardCheckbox = (props) => {
|
|
1911
|
+
const CardCheckbox = React.forwardRef((props, forwardedRef) => {
|
|
1906
1912
|
const { id } = useCard();
|
|
1907
|
-
return /* @__PURE__ */ jsx(CardActionImpl, { position: "start", children: /* @__PURE__ */ jsx(CheckboxImpl, { "aria-labelledby": `${id}-title`, ...props }) });
|
|
1908
|
-
};
|
|
1913
|
+
return /* @__PURE__ */ jsx(CardActionImpl, { position: "start", children: /* @__PURE__ */ jsx(CheckboxImpl, { "aria-labelledby": `${id}-title`, ...props, ref: forwardedRef }) });
|
|
1914
|
+
});
|
|
1909
1915
|
const BreakBox = styled(Box)`
|
|
1910
1916
|
word-break: break-all;
|
|
1911
1917
|
`;
|
|
@@ -2937,7 +2943,7 @@ lodash.exports;
|
|
|
2937
2943
|
}
|
|
2938
2944
|
var runInContext = function runInContext2(context) {
|
|
2939
2945
|
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
|
2940
|
-
var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function,
|
|
2946
|
+
var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError = context.TypeError;
|
|
2941
2947
|
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
|
2942
2948
|
var coreJsData = context["__core-js_shared__"];
|
|
2943
2949
|
var funcToString = funcProto.toString;
|
|
@@ -2963,7 +2969,7 @@ lodash.exports;
|
|
|
2963
2969
|
}
|
|
2964
2970
|
}();
|
|
2965
2971
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
2966
|
-
var nativeCeil =
|
|
2972
|
+
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
|
|
2967
2973
|
var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
|
2968
2974
|
var metaMap = WeakMap && new WeakMap();
|
|
2969
2975
|
var realNames = {};
|
|
@@ -4709,7 +4715,7 @@ lodash.exports;
|
|
|
4709
4715
|
return setWrapToString(result2, func, bitmask);
|
|
4710
4716
|
}
|
|
4711
4717
|
function createRound(methodName) {
|
|
4712
|
-
var func =
|
|
4718
|
+
var func = Math2[methodName];
|
|
4713
4719
|
return function(number, precision) {
|
|
4714
4720
|
number = toNumber(number);
|
|
4715
4721
|
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
|
@@ -7832,6 +7838,7 @@ const Input$2 = React.forwardRef(
|
|
|
7832
7838
|
hasError: hasErrorProp,
|
|
7833
7839
|
required: requiredProp,
|
|
7834
7840
|
className,
|
|
7841
|
+
size = "M",
|
|
7835
7842
|
...props
|
|
7836
7843
|
}, ref) => {
|
|
7837
7844
|
const { id, error, hint, name, required } = useField("Input");
|
|
@@ -7850,14 +7857,13 @@ const Input$2 = React.forwardRef(
|
|
|
7850
7857
|
return /* @__PURE__ */ jsxs(
|
|
7851
7858
|
InputWrapper,
|
|
7852
7859
|
{
|
|
7853
|
-
paddingLeft: 3,
|
|
7854
|
-
paddingRight: 3,
|
|
7855
|
-
paddingTop: 2,
|
|
7856
|
-
paddingBottom: 2,
|
|
7857
7860
|
gap: 2,
|
|
7858
7861
|
justifyContent: "space-between",
|
|
7859
7862
|
$hasError: hasError || hasErrorProp,
|
|
7860
7863
|
$disabled: disabled,
|
|
7864
|
+
$size: size,
|
|
7865
|
+
$hasLeftAction: Boolean(startAction),
|
|
7866
|
+
$hasRightAction: Boolean(endAction),
|
|
7861
7867
|
className,
|
|
7862
7868
|
children: [
|
|
7863
7869
|
startAction,
|
|
@@ -7867,13 +7873,12 @@ const Input$2 = React.forwardRef(
|
|
|
7867
7873
|
id,
|
|
7868
7874
|
name,
|
|
7869
7875
|
ref,
|
|
7876
|
+
$size: size,
|
|
7870
7877
|
"aria-describedby": ariaDescription,
|
|
7871
7878
|
"aria-invalid": hasError || hasErrorProp,
|
|
7872
7879
|
"aria-disabled": disabled,
|
|
7873
7880
|
disabled,
|
|
7874
7881
|
"data-disabled": disabled ? "" : void 0,
|
|
7875
|
-
$hasLeftAction: Boolean(startAction),
|
|
7876
|
-
$hasRightAction: Boolean(endAction),
|
|
7877
7882
|
onChange: handleChange,
|
|
7878
7883
|
"aria-required": required || requiredProp,
|
|
7879
7884
|
...props
|
|
@@ -7898,6 +7903,19 @@ const InputElement = styled.input`
|
|
|
7898
7903
|
width: 100%;
|
|
7899
7904
|
background: inherit;
|
|
7900
7905
|
|
|
7906
|
+
${(props) => {
|
|
7907
|
+
switch (props.$size) {
|
|
7908
|
+
case "S":
|
|
7909
|
+
return css`
|
|
7910
|
+
padding-block: ${props.theme.spaces[1]};
|
|
7911
|
+
`;
|
|
7912
|
+
default:
|
|
7913
|
+
return css`
|
|
7914
|
+
padding-block: ${props.theme.spaces[2]};
|
|
7915
|
+
`;
|
|
7916
|
+
}
|
|
7917
|
+
}};
|
|
7918
|
+
|
|
7901
7919
|
::placeholder {
|
|
7902
7920
|
color: ${({ theme }) => theme.colors.neutral500};
|
|
7903
7921
|
opacity: 1;
|
|
@@ -7919,6 +7937,21 @@ const InputWrapper = styled(Flex)`
|
|
|
7919
7937
|
background: ${({ theme }) => theme.colors.neutral0};
|
|
7920
7938
|
${inputFocusStyle()}
|
|
7921
7939
|
|
|
7940
|
+
${(props) => {
|
|
7941
|
+
switch (props.$size) {
|
|
7942
|
+
case "S":
|
|
7943
|
+
return css`
|
|
7944
|
+
padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
|
|
7945
|
+
padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
|
|
7946
|
+
`;
|
|
7947
|
+
default:
|
|
7948
|
+
return css`
|
|
7949
|
+
padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
|
|
7950
|
+
padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
|
|
7951
|
+
`;
|
|
7952
|
+
}
|
|
7953
|
+
}}
|
|
7954
|
+
|
|
7922
7955
|
${({ theme, $disabled }) => $disabled ? css`
|
|
7923
7956
|
color: ${theme.colors.neutral600};
|
|
7924
7957
|
background: ${theme.colors.neutral150};
|
|
@@ -8101,6 +8134,7 @@ const Combobox = React.forwardRef(
|
|
|
8101
8134
|
onLoadMore,
|
|
8102
8135
|
placeholder = "Select or enter a value",
|
|
8103
8136
|
required: requiredProp = false,
|
|
8137
|
+
size = "M",
|
|
8104
8138
|
startIcon,
|
|
8105
8139
|
textValue,
|
|
8106
8140
|
value,
|
|
@@ -8200,7 +8234,7 @@ const Combobox = React.forwardRef(
|
|
|
8200
8234
|
onFilterValueChange: handleFilterValueChange,
|
|
8201
8235
|
isPrintableCharacter: isPrintableCharacter2,
|
|
8202
8236
|
children: [
|
|
8203
|
-
/* @__PURE__ */ jsxs(Trigger$5, { $hasError: hasError, className, children: [
|
|
8237
|
+
/* @__PURE__ */ jsxs(Trigger$5, { $hasError: hasError, $size: size, className, children: [
|
|
8204
8238
|
/* @__PURE__ */ jsxs(Flex, { flex: "1", tag: "span", gap: 3, children: [
|
|
8205
8239
|
startIcon ? /* @__PURE__ */ jsx(Box, { flex: "0 0 1.6rem", tag: "span", "aria-hidden": true, children: startIcon }) : null,
|
|
8206
8240
|
/* @__PURE__ */ jsx(
|
|
@@ -8265,10 +8299,6 @@ const IconBox$3 = styled(Box)`
|
|
|
8265
8299
|
const Trigger$5 = styled(Combobox$1.Trigger)`
|
|
8266
8300
|
position: relative;
|
|
8267
8301
|
border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
|
|
8268
|
-
padding-right: ${({ theme }) => theme.spaces[3]};
|
|
8269
|
-
padding-left: ${({ theme }) => theme.spaces[3]};
|
|
8270
|
-
padding-top: ${({ theme }) => theme.spaces[2]};
|
|
8271
|
-
padding-bottom: ${({ theme }) => theme.spaces[2]};
|
|
8272
8302
|
border-radius: ${({ theme }) => theme.borderRadius};
|
|
8273
8303
|
background: ${({ theme }) => theme.colors.neutral0};
|
|
8274
8304
|
overflow: hidden;
|
|
@@ -8277,6 +8307,23 @@ const Trigger$5 = styled(Combobox$1.Trigger)`
|
|
|
8277
8307
|
justify-content: space-between;
|
|
8278
8308
|
gap: ${({ theme }) => theme.spaces[4]};
|
|
8279
8309
|
|
|
8310
|
+
${(props) => {
|
|
8311
|
+
switch (props.$size) {
|
|
8312
|
+
case "S":
|
|
8313
|
+
return css`
|
|
8314
|
+
padding-inline-start: ${({ theme }) => theme.spaces[4]};
|
|
8315
|
+
padding-inline-end: ${({ theme }) => theme.spaces[3]};
|
|
8316
|
+
padding-block: ${({ theme }) => theme.spaces[1]};
|
|
8317
|
+
`;
|
|
8318
|
+
default:
|
|
8319
|
+
return css`
|
|
8320
|
+
padding-inline-start: ${({ theme }) => theme.spaces[4]};
|
|
8321
|
+
padding-inline-end: ${({ theme }) => theme.spaces[3]};
|
|
8322
|
+
padding-block: ${({ theme }) => theme.spaces[2]};
|
|
8323
|
+
`;
|
|
8324
|
+
}
|
|
8325
|
+
}}
|
|
8326
|
+
|
|
8280
8327
|
&[data-disabled] {
|
|
8281
8328
|
color: ${({ theme }) => theme.colors.neutral600};
|
|
8282
8329
|
background: ${({ theme }) => theme.colors.neutral150};
|
|
@@ -8435,19 +8482,7 @@ const ContentImpl$1 = styled(AlertDialog.Content)`
|
|
|
8435
8482
|
}
|
|
8436
8483
|
`;
|
|
8437
8484
|
const Header$1 = React.forwardRef(({ children, ...restProps }, forwardedRef) => {
|
|
8438
|
-
return /* @__PURE__ */ jsx(AlertDialog.Title, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
8439
|
-
Title$1,
|
|
8440
|
-
{
|
|
8441
|
-
tag: "h2",
|
|
8442
|
-
ref: forwardedRef,
|
|
8443
|
-
padding: 6,
|
|
8444
|
-
justifyContent: "center",
|
|
8445
|
-
variant: "h2",
|
|
8446
|
-
fontWeight: "bold",
|
|
8447
|
-
...restProps,
|
|
8448
|
-
children
|
|
8449
|
-
}
|
|
8450
|
-
) });
|
|
8485
|
+
return /* @__PURE__ */ jsx(AlertDialog.Title, { asChild: true, children: /* @__PURE__ */ jsx(Title$1, { tag: "h2", variant: "beta", ref: forwardedRef, padding: 6, fontWeight: "bold", ...restProps, children }) });
|
|
8451
8486
|
});
|
|
8452
8487
|
const Title$1 = styled(Typography)`
|
|
8453
8488
|
display: flex;
|
|
@@ -8621,8 +8656,7 @@ ${css`
|
|
|
8621
8656
|
img,
|
|
8622
8657
|
picture,
|
|
8623
8658
|
video,
|
|
8624
|
-
canvas
|
|
8625
|
-
svg {
|
|
8659
|
+
canvas {
|
|
8626
8660
|
display: block;
|
|
8627
8661
|
max-width: 100%;
|
|
8628
8662
|
}
|
|
@@ -8737,7 +8771,7 @@ const Portal$1 = React.forwardRef(
|
|
|
8737
8771
|
);
|
|
8738
8772
|
Portal$1.displayName = "Portal";
|
|
8739
8773
|
const SelectTrigger = React.forwardRef(
|
|
8740
|
-
({ onClear, clearLabel = "Clear", startIcon, disabled, hasError, children, id, ...restProps }, ref) => {
|
|
8774
|
+
({ onClear, clearLabel = "Clear", startIcon, disabled, hasError, children, id, size = "M", withTags, ...restProps }, ref) => {
|
|
8741
8775
|
const triggerRef = React.useRef(null);
|
|
8742
8776
|
const handleClearClick = (e) => {
|
|
8743
8777
|
if (onClear && !disabled) {
|
|
@@ -8759,13 +8793,11 @@ const SelectTrigger = React.forwardRef(
|
|
|
8759
8793
|
overflow: "hidden",
|
|
8760
8794
|
hasRadius: true,
|
|
8761
8795
|
background: disabled ? "neutral150" : "neutral0",
|
|
8762
|
-
paddingLeft: 3,
|
|
8763
|
-
paddingRight: 3,
|
|
8764
|
-
paddingTop: 2,
|
|
8765
|
-
paddingBottom: 2,
|
|
8766
8796
|
gap: 4,
|
|
8767
8797
|
cursor: "default",
|
|
8768
8798
|
"aria-labelledby": labelNode ? `${id}-label` : void 0,
|
|
8799
|
+
$size: size,
|
|
8800
|
+
$withTags: withTags,
|
|
8769
8801
|
...restProps,
|
|
8770
8802
|
children: [
|
|
8771
8803
|
/* @__PURE__ */ jsxs(Flex, { flex: "1", tag: "span", gap: 3, children: [
|
|
@@ -8810,6 +8842,22 @@ const IconBox$2 = styled(Box)`
|
|
|
8810
8842
|
`;
|
|
8811
8843
|
const StyledTrigger = styled(Flex)`
|
|
8812
8844
|
border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
|
|
8845
|
+
${(props) => {
|
|
8846
|
+
switch (props.$size) {
|
|
8847
|
+
case "S":
|
|
8848
|
+
return css`
|
|
8849
|
+
padding-block: ${props.theme.spaces[1]};
|
|
8850
|
+
padding-inline-start: ${props.$withTags ? props.theme.spaces[1] : props.theme.spaces[4]};
|
|
8851
|
+
padding-inline-end: ${props.theme.spaces[3]};
|
|
8852
|
+
`;
|
|
8853
|
+
default:
|
|
8854
|
+
return css`
|
|
8855
|
+
padding-block: ${props.$withTags ? "0.3rem" : props.theme.spaces[2]};
|
|
8856
|
+
padding-inline-start: ${props.$withTags ? props.theme.spaces[1] : props.theme.spaces[4]};
|
|
8857
|
+
padding-inline-end: ${props.theme.spaces[3]};
|
|
8858
|
+
`;
|
|
8859
|
+
}
|
|
8860
|
+
}}
|
|
8813
8861
|
|
|
8814
8862
|
&[aria-disabled='true'] {
|
|
8815
8863
|
color: ${(props) => props.theme.colors.neutral600};
|
|
@@ -8844,8 +8892,7 @@ const SelectContent = styled(Select.Content)`
|
|
|
8844
8892
|
border: 1px solid ${({ theme }) => theme.colors.neutral150};
|
|
8845
8893
|
border-radius: ${({ theme }) => theme.borderRadius};
|
|
8846
8894
|
min-width: var(--radix-select-trigger-width);
|
|
8847
|
-
|
|
8848
|
-
max-height: 15rem;
|
|
8895
|
+
max-height: 15.6rem;
|
|
8849
8896
|
z-index: ${({ theme }) => theme.zIndices.popover};
|
|
8850
8897
|
|
|
8851
8898
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -8929,6 +8976,7 @@ const SingleSelect = React.forwardRef(
|
|
|
8929
8976
|
onReachEnd,
|
|
8930
8977
|
placeholder,
|
|
8931
8978
|
required: requiredProp,
|
|
8979
|
+
size,
|
|
8932
8980
|
startIcon,
|
|
8933
8981
|
value: passedValue,
|
|
8934
8982
|
...restProps
|
|
@@ -9004,6 +9052,7 @@ const SingleSelect = React.forwardRef(
|
|
|
9004
9052
|
onClear: value && onClear ? handleOnClear : void 0,
|
|
9005
9053
|
"aria-label": restProps["aria-label"],
|
|
9006
9054
|
"aria-describedby": ariaDescription ?? restProps["aria-describedby"],
|
|
9055
|
+
size,
|
|
9007
9056
|
children: /* @__PURE__ */ jsx(Value, { placeholder, textColor: value ? "neutral800" : "neutral600", children: value && customizeContent ? customizeContent(value) : void 0 })
|
|
9008
9057
|
}
|
|
9009
9058
|
),
|
|
@@ -9020,7 +9069,7 @@ const SingleSelectOption = React.forwardRef(
|
|
|
9020
9069
|
({ value, startIcon, children, ...restProps }, ref) => {
|
|
9021
9070
|
return /* @__PURE__ */ jsxs(Item$2, { ref, value: value.toString(), ...restProps, children: [
|
|
9022
9071
|
startIcon && /* @__PURE__ */ jsx(Box, { tag: "span", "aria-hidden": true, children: startIcon }),
|
|
9023
|
-
/* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(ItemText, { children }) })
|
|
9072
|
+
/* @__PURE__ */ jsx(Typography, { lineHeight: "20px", children: /* @__PURE__ */ jsx(ItemText, { children }) })
|
|
9024
9073
|
] });
|
|
9025
9074
|
}
|
|
9026
9075
|
);
|
|
@@ -9052,6 +9101,7 @@ const DatePicker$1 = React.forwardRef(
|
|
|
9052
9101
|
required: requiredProp = false,
|
|
9053
9102
|
onClear,
|
|
9054
9103
|
clearLabel = "Clear",
|
|
9104
|
+
size = "M",
|
|
9055
9105
|
...restProps
|
|
9056
9106
|
}, ref) => {
|
|
9057
9107
|
const timeZone = getLocalTimeZone();
|
|
@@ -9162,7 +9212,7 @@ const DatePicker$1 = React.forwardRef(
|
|
|
9162
9212
|
trigger,
|
|
9163
9213
|
value,
|
|
9164
9214
|
children: [
|
|
9165
|
-
/* @__PURE__ */ jsxs(DatePickerTrigger, { className, hasError, children: [
|
|
9215
|
+
/* @__PURE__ */ jsxs(DatePickerTrigger, { className, hasError, size, children: [
|
|
9166
9216
|
/* @__PURE__ */ jsx(Calendar, { fill: "neutral500", "aria-hidden": true }),
|
|
9167
9217
|
/* @__PURE__ */ jsx(DatePickerTextInput, { ref, "aria-describedby": ariaDescription, id, name, ...restProps }),
|
|
9168
9218
|
textValue && onClear ? /* @__PURE__ */ jsx(
|
|
@@ -9208,7 +9258,7 @@ const makeInitialCalendarDate = ({ currentValue, minDate: minDate$1, maxDate: ma
|
|
|
9208
9258
|
};
|
|
9209
9259
|
const DATE_PICKER_TRIGGER_NAME = "DatePickerTrigger";
|
|
9210
9260
|
const DatePickerTrigger = React.forwardRef(
|
|
9211
|
-
({ hasError, ...restProps }, forwardedRef) => {
|
|
9261
|
+
({ hasError, size, ...restProps }, forwardedRef) => {
|
|
9212
9262
|
const context = useDatePickerContext(DATE_PICKER_TRIGGER_NAME);
|
|
9213
9263
|
const composedRefs = useComposedRefs(forwardedRef, (node) => context.onTriggerChange(node));
|
|
9214
9264
|
const handleOpenChange = () => {
|
|
@@ -9233,9 +9283,8 @@ const DatePickerTrigger = React.forwardRef(
|
|
|
9233
9283
|
{
|
|
9234
9284
|
ref: composedRefs,
|
|
9235
9285
|
$hasError: hasError,
|
|
9286
|
+
$size: size,
|
|
9236
9287
|
...restProps,
|
|
9237
|
-
paddingLeft: 3,
|
|
9238
|
-
paddingRight: 3,
|
|
9239
9288
|
hasRadius: true,
|
|
9240
9289
|
gap: 3,
|
|
9241
9290
|
overflow: "hidden",
|
|
@@ -9265,7 +9314,20 @@ const DatePickerTrigger = React.forwardRef(
|
|
|
9265
9314
|
);
|
|
9266
9315
|
const TriggerElement = styled(Flex)`
|
|
9267
9316
|
border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
|
|
9268
|
-
|
|
9317
|
+
${(props) => {
|
|
9318
|
+
switch (props.$size) {
|
|
9319
|
+
case "S":
|
|
9320
|
+
return css`
|
|
9321
|
+
padding-block: ${props.theme.spaces[1]};
|
|
9322
|
+
padding-inline: ${props.theme.spaces[3]};
|
|
9323
|
+
`;
|
|
9324
|
+
default:
|
|
9325
|
+
return css`
|
|
9326
|
+
padding-block: ${props.theme.spaces[2]};
|
|
9327
|
+
padding-inline: ${props.theme.spaces[3]};
|
|
9328
|
+
`;
|
|
9329
|
+
}
|
|
9330
|
+
}}
|
|
9269
9331
|
|
|
9270
9332
|
& > svg {
|
|
9271
9333
|
flex: 1 0 auto;
|
|
@@ -9882,6 +9944,7 @@ const DateTimePicker = React.forwardRef(
|
|
|
9882
9944
|
step,
|
|
9883
9945
|
value,
|
|
9884
9946
|
initialDate,
|
|
9947
|
+
size,
|
|
9885
9948
|
...props
|
|
9886
9949
|
}, forwardedRef) => {
|
|
9887
9950
|
const DatePickerElement2 = React.useRef(null);
|
|
@@ -9941,6 +10004,7 @@ const DateTimePicker = React.forwardRef(
|
|
|
9941
10004
|
DatePicker,
|
|
9942
10005
|
{
|
|
9943
10006
|
...props,
|
|
10007
|
+
size,
|
|
9944
10008
|
value: dateValue?.toDate("UTC"),
|
|
9945
10009
|
onChange: handleDateChange,
|
|
9946
10010
|
required,
|
|
@@ -9954,6 +10018,7 @@ const DateTimePicker = React.forwardRef(
|
|
|
9954
10018
|
/* @__PURE__ */ jsx(Root$6, { children: /* @__PURE__ */ jsx(
|
|
9955
10019
|
TimePicker,
|
|
9956
10020
|
{
|
|
10021
|
+
size,
|
|
9957
10022
|
hasError,
|
|
9958
10023
|
value: timeValue,
|
|
9959
10024
|
onChange: handleTimeChange,
|
|
@@ -10000,30 +10065,27 @@ const EmptyStateIconWrapper = styled(Box)`
|
|
|
10000
10065
|
height: 8.8rem;
|
|
10001
10066
|
}
|
|
10002
10067
|
`;
|
|
10003
|
-
const EmptyStateLayout = (
|
|
10004
|
-
icon,
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
}
|
|
10025
|
-
);
|
|
10026
|
-
};
|
|
10068
|
+
const EmptyStateLayout = React.forwardRef(
|
|
10069
|
+
({ icon, content, action, hasRadius = true, shadow = "tableShadow" }, forwardedRef) => {
|
|
10070
|
+
return /* @__PURE__ */ jsxs(
|
|
10071
|
+
Flex,
|
|
10072
|
+
{
|
|
10073
|
+
ref: forwardedRef,
|
|
10074
|
+
alignItems: "center",
|
|
10075
|
+
direction: "column",
|
|
10076
|
+
padding: 11,
|
|
10077
|
+
background: "neutral0",
|
|
10078
|
+
hasRadius,
|
|
10079
|
+
shadow,
|
|
10080
|
+
children: [
|
|
10081
|
+
icon ? /* @__PURE__ */ jsx(EmptyStateIconWrapper, { paddingBottom: 6, "aria-hidden": true, children: icon }) : null,
|
|
10082
|
+
/* @__PURE__ */ jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsx(Typography, { variant: "delta", tag: "p", textAlign: "center", textColor: "neutral600", children: content }) }),
|
|
10083
|
+
action
|
|
10084
|
+
]
|
|
10085
|
+
}
|
|
10086
|
+
);
|
|
10087
|
+
}
|
|
10088
|
+
);
|
|
10027
10089
|
const getFocusableNodes = (node, includeNegativeTabIndex) => {
|
|
10028
10090
|
const nodes = [
|
|
10029
10091
|
...node.querySelectorAll(
|
|
@@ -10109,7 +10171,7 @@ const Wrapper$1 = styled(Box)`
|
|
|
10109
10171
|
const ItemImpl = forwardRef(
|
|
10110
10172
|
({ col, s, xs, ...props }, forwardedRef) => /* @__PURE__ */ jsx(Item$1, { ref: forwardedRef, $col: col, $s: s, $xs: xs, ...props })
|
|
10111
10173
|
);
|
|
10112
|
-
const Item$1 = styled(
|
|
10174
|
+
const Item$1 = styled(Flex)`
|
|
10113
10175
|
grid-column: span ${({ $col }) => $col ?? 1};
|
|
10114
10176
|
max-width: 100%;
|
|
10115
10177
|
|
|
@@ -10126,10 +10188,6 @@ const Grid = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
10126
10188
|
Item: ItemImpl,
|
|
10127
10189
|
Root: Root$3
|
|
10128
10190
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
10129
|
-
const VARIANT_DEFAULT = "tertiary";
|
|
10130
|
-
const VARIANT_SECONDARY = "secondary";
|
|
10131
|
-
const SIZES = ["S", "M", "L"];
|
|
10132
|
-
const VARIANTS = [VARIANT_DEFAULT, VARIANT_SECONDARY];
|
|
10133
10191
|
const IconButton = forwardRef(
|
|
10134
10192
|
({
|
|
10135
10193
|
label,
|
|
@@ -10137,8 +10195,8 @@ const IconButton = forwardRef(
|
|
|
10137
10195
|
children,
|
|
10138
10196
|
disabled = false,
|
|
10139
10197
|
onClick,
|
|
10140
|
-
size =
|
|
10141
|
-
variant: variant2 =
|
|
10198
|
+
size = "M",
|
|
10199
|
+
variant: variant2 = "tertiary",
|
|
10142
10200
|
withTooltip = true,
|
|
10143
10201
|
...restProps
|
|
10144
10202
|
}, ref) => {
|
|
@@ -10152,7 +10210,11 @@ const IconButton = forwardRef(
|
|
|
10152
10210
|
{
|
|
10153
10211
|
"aria-disabled": disabled,
|
|
10154
10212
|
background: disabled ? "neutral150" : background,
|
|
10213
|
+
tag: "button",
|
|
10214
|
+
display: "inline-flex",
|
|
10155
10215
|
justifyContent: "center",
|
|
10216
|
+
hasRadius: true,
|
|
10217
|
+
cursor: "pointer",
|
|
10156
10218
|
...restProps,
|
|
10157
10219
|
ref,
|
|
10158
10220
|
$size: size,
|
|
@@ -10164,42 +10226,55 @@ const IconButton = forwardRef(
|
|
|
10164
10226
|
return withTooltip ? /* @__PURE__ */ jsx(TooltipImpl, { label, children: component }) : component;
|
|
10165
10227
|
}
|
|
10166
10228
|
);
|
|
10167
|
-
const IconButtonWrapper = styled(
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10229
|
+
const IconButtonWrapper = styled(Flex)`
|
|
10230
|
+
text-decoration: none;
|
|
10231
|
+
|
|
10232
|
+
${(props) => {
|
|
10233
|
+
switch (props.$size) {
|
|
10234
|
+
case "S": {
|
|
10235
|
+
return css`
|
|
10236
|
+
padding-block: 0.6rem;
|
|
10237
|
+
padding-inline: 0.6rem;
|
|
10238
|
+
`;
|
|
10239
|
+
}
|
|
10240
|
+
case "M": {
|
|
10241
|
+
return css`
|
|
10242
|
+
padding-block: 0.9rem;
|
|
10243
|
+
padding-inline: 0.9rem;
|
|
10244
|
+
`;
|
|
10245
|
+
}
|
|
10246
|
+
case "L": {
|
|
10247
|
+
return css`
|
|
10248
|
+
padding-block: 1.1rem;
|
|
10249
|
+
padding-inline: 1.1rem;
|
|
10250
|
+
`;
|
|
10251
|
+
}
|
|
10185
10252
|
}
|
|
10186
|
-
|
|
10187
|
-
}
|
|
10253
|
+
}}
|
|
10254
|
+
${getVariantStyle}
|
|
10255
|
+
${(props) => props.$variant === "tertiary" ? css`
|
|
10256
|
+
color: ${props.theme.colors.neutral600};
|
|
10257
|
+
` : ""}
|
|
10188
10258
|
|
|
10189
|
-
&:hover
|
|
10190
|
-
|
|
10191
|
-
color: ${({ theme, $variant }) => {
|
|
10192
|
-
if ($variant === VARIANT_SECONDARY) {
|
|
10193
|
-
return theme.colors.primary600;
|
|
10259
|
+
&:hover {
|
|
10260
|
+
${getHoverStyle}
|
|
10194
10261
|
}
|
|
10195
|
-
|
|
10196
|
-
|
|
10262
|
+
|
|
10263
|
+
&:active {
|
|
10264
|
+
${getActiveStyle}
|
|
10197
10265
|
}
|
|
10198
10266
|
|
|
10199
10267
|
&[aria-disabled='true'] {
|
|
10200
|
-
|
|
10268
|
+
${getDisabledStyle}
|
|
10201
10269
|
}
|
|
10202
|
-
|
|
10270
|
+
|
|
10271
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
10272
|
+
transition:
|
|
10273
|
+
${(props) => props.theme.transitions.backgroundColor},
|
|
10274
|
+
${(props) => props.theme.transitions.color},
|
|
10275
|
+
border-color ${(props) => props.theme.motion.timings["200"]} ${(props) => props.theme.motion.easings.easeOutQuad};
|
|
10276
|
+
}
|
|
10277
|
+
`;
|
|
10203
10278
|
const IconButtonGroup = styled(Flex)`
|
|
10204
10279
|
& ${IconButtonWrapper}:first-child {
|
|
10205
10280
|
border-radius: ${({ theme }) => `${theme.borderRadius} 0 0 ${theme.borderRadius}`};
|
|
@@ -10211,25 +10286,10 @@ const IconButtonGroup = styled(Flex)`
|
|
|
10211
10286
|
|
|
10212
10287
|
& ${IconButtonWrapper} {
|
|
10213
10288
|
border-radius: 0;
|
|
10214
|
-
color: ${({ theme }) => theme.colors.neutral700};
|
|
10215
10289
|
|
|
10216
10290
|
& + ${IconButtonWrapper} {
|
|
10217
10291
|
border-left: none;
|
|
10218
10292
|
}
|
|
10219
|
-
|
|
10220
|
-
&:hover {
|
|
10221
|
-
background-color: ${({ theme }) => theme.colors.neutral100};
|
|
10222
|
-
color: ${({ theme }) => theme.colors.neutral800};
|
|
10223
|
-
}
|
|
10224
|
-
|
|
10225
|
-
&:active {
|
|
10226
|
-
background-color: ${({ theme }) => theme.colors.neutral150};
|
|
10227
|
-
color: ${({ theme }) => theme.colors.neutral900};
|
|
10228
|
-
}
|
|
10229
|
-
|
|
10230
|
-
&[aria-disabled='true'] {
|
|
10231
|
-
color: ${({ theme }) => theme.colors.neutral600};
|
|
10232
|
-
}
|
|
10233
10293
|
}
|
|
10234
10294
|
`;
|
|
10235
10295
|
const addMarks = StateEffect.define();
|
|
@@ -10409,62 +10469,19 @@ const JSONInputContainer = styled(Flex)`
|
|
|
10409
10469
|
}
|
|
10410
10470
|
`;
|
|
10411
10471
|
const LinkButton = forwardRef(
|
|
10412
|
-
({
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
return /* @__PURE__ */ jsxs(
|
|
10416
|
-
LinkWrapper$1,
|
|
10472
|
+
({ disabled, ...restProps }, ref) => {
|
|
10473
|
+
return /* @__PURE__ */ jsx(
|
|
10474
|
+
Button,
|
|
10417
10475
|
{
|
|
10418
10476
|
ref,
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
hasRadius: true,
|
|
10424
|
-
display: "inline-flex",
|
|
10425
|
-
paddingBottom: paddingX,
|
|
10426
|
-
paddingLeft: paddingY,
|
|
10427
|
-
paddingRight: paddingY,
|
|
10428
|
-
paddingTop: paddingX,
|
|
10429
|
-
pointerEvents: disabled ? "none" : void 0,
|
|
10430
|
-
...props,
|
|
10431
|
-
children: [
|
|
10432
|
-
startIcon && /* @__PURE__ */ jsx(Flex, { "aria-hidden": true, children: startIcon }),
|
|
10433
|
-
/* @__PURE__ */ jsx(Typography, { variant: size === "S" ? "pi" : void 0, fontWeight: "bold", textColor: "buttonNeutral0", children }),
|
|
10434
|
-
endIcon && /* @__PURE__ */ jsx(Flex, { "aria-hidden": true, children: endIcon })
|
|
10435
|
-
]
|
|
10477
|
+
tag: BaseLinkImpl,
|
|
10478
|
+
tabIndex: disabled ? -1 : void 0,
|
|
10479
|
+
disabled,
|
|
10480
|
+
...restProps
|
|
10436
10481
|
}
|
|
10437
10482
|
);
|
|
10438
10483
|
}
|
|
10439
10484
|
);
|
|
10440
|
-
const LinkWrapper$1 = styled(BaseLink)`
|
|
10441
|
-
gap: ${({ theme }) => theme.spaces[2]};
|
|
10442
|
-
|
|
10443
|
-
${focus}
|
|
10444
|
-
|
|
10445
|
-
&[aria-disabled='true'] {
|
|
10446
|
-
pointer-events: none;
|
|
10447
|
-
}
|
|
10448
|
-
|
|
10449
|
-
text-decoration: none;
|
|
10450
|
-
|
|
10451
|
-
&[aria-disabled='true'] {
|
|
10452
|
-
${getDisabledStyle}
|
|
10453
|
-
&:active {
|
|
10454
|
-
${getDisabledStyle}
|
|
10455
|
-
}
|
|
10456
|
-
}
|
|
10457
|
-
|
|
10458
|
-
&:hover {
|
|
10459
|
-
${getHoverStyle}
|
|
10460
|
-
}
|
|
10461
|
-
|
|
10462
|
-
&:active {
|
|
10463
|
-
${getActiveStyle}
|
|
10464
|
-
}
|
|
10465
|
-
|
|
10466
|
-
${getVariantStyle}
|
|
10467
|
-
`;
|
|
10468
10485
|
const MainWrapper = styled(Box)`
|
|
10469
10486
|
// To prevent global outline on focus visible to force an outline when Main is focused
|
|
10470
10487
|
&:focus-visible {
|
|
@@ -10500,6 +10517,7 @@ const SkipToContent = ({ children }) => {
|
|
|
10500
10517
|
}
|
|
10501
10518
|
);
|
|
10502
10519
|
};
|
|
10520
|
+
const setOpacity = (hex, alpha) => `${hex}${Math.floor(alpha * 255).toString(16).padStart(2, "0")}`;
|
|
10503
10521
|
const ScrollAreaImpl$1 = React.forwardRef(
|
|
10504
10522
|
({ children, viewportRef, ...restProps }, forwardedRef) => {
|
|
10505
10523
|
return /* @__PURE__ */ jsxs(ScrollAreaRoot, { ref: forwardedRef, ...restProps, children: [
|
|
@@ -10517,7 +10535,7 @@ const ScrollAreaRoot = styled(ScrollArea.Root)`
|
|
|
10517
10535
|
`;
|
|
10518
10536
|
const ScrollAreaViewport = styled(ScrollArea.Viewport)`
|
|
10519
10537
|
min-width: 100%;
|
|
10520
|
-
padding-inline
|
|
10538
|
+
padding-inline: 4px;
|
|
10521
10539
|
`;
|
|
10522
10540
|
const Scrollbar = styled(ScrollArea.Scrollbar)`
|
|
10523
10541
|
display: flex;
|
|
@@ -10559,17 +10577,13 @@ const Trigger$2 = React.forwardRef((props, forwardedRef) => {
|
|
|
10559
10577
|
return /* @__PURE__ */ jsx(Dialog$1.Trigger, { ...props, asChild: true, ref: forwardedRef });
|
|
10560
10578
|
});
|
|
10561
10579
|
const Content$2 = React.forwardRef((props, forwardedRef) => {
|
|
10562
|
-
return /* @__PURE__ */
|
|
10563
|
-
/* @__PURE__ */ jsx(Overlay, {}),
|
|
10564
|
-
/* @__PURE__ */ jsx(ContentImpl, { ref: forwardedRef, ...props })
|
|
10565
|
-
] });
|
|
10580
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, { children: /* @__PURE__ */ jsx(Overlay, { children: /* @__PURE__ */ jsx(ContentImpl, { ref: forwardedRef, ...props }) }) });
|
|
10566
10581
|
});
|
|
10567
10582
|
const Overlay = styled(Dialog$1.Overlay)`
|
|
10568
|
-
background
|
|
10583
|
+
background: ${(props) => setOpacity(props.theme.colors.neutral800, 0.2)};
|
|
10569
10584
|
position: fixed;
|
|
10570
10585
|
inset: 0;
|
|
10571
10586
|
z-index: ${(props) => props.theme.zIndices.overlay};
|
|
10572
|
-
opacity: 0.2;
|
|
10573
10587
|
|
|
10574
10588
|
@media (prefers-reduced-motion: no-preference) {
|
|
10575
10589
|
animation: ${ANIMATIONS.overlayFadeIn} ${(props) => props.theme.motion.timings["200"]}
|
|
@@ -10764,7 +10778,7 @@ const NumberInput = React.forwardRef(
|
|
|
10764
10778
|
onKeyDown: handleKeyDown,
|
|
10765
10779
|
onBlur: handleBlur,
|
|
10766
10780
|
value: inputValue,
|
|
10767
|
-
endAction: /* @__PURE__ */ jsxs(
|
|
10781
|
+
endAction: /* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
|
|
10768
10782
|
/* @__PURE__ */ jsx(
|
|
10769
10783
|
ArrowButton,
|
|
10770
10784
|
{
|
|
@@ -10798,13 +10812,14 @@ const NumberInput = React.forwardRef(
|
|
|
10798
10812
|
);
|
|
10799
10813
|
const ArrowButton = styled.button`
|
|
10800
10814
|
display: flex;
|
|
10801
|
-
|
|
10802
|
-
align-items:
|
|
10815
|
+
justify-content: center;
|
|
10816
|
+
align-items: center;
|
|
10803
10817
|
transform: translateY(${({ $reverse }) => $reverse ? `-2px` : `2px`});
|
|
10804
10818
|
cursor: ${({ disabled }) => disabled ? "not-allowed" : void 0};
|
|
10819
|
+
height: 1.1rem;
|
|
10820
|
+
|
|
10805
10821
|
svg {
|
|
10806
|
-
|
|
10807
|
-
height: 0.4rem;
|
|
10822
|
+
width: 1.2rem;
|
|
10808
10823
|
transform: ${({ $reverse }) => $reverse ? "rotateX(180deg)" : void 0};
|
|
10809
10824
|
}
|
|
10810
10825
|
`;
|
|
@@ -10867,7 +10882,7 @@ const NextLink = forwardRef(
|
|
|
10867
10882
|
] });
|
|
10868
10883
|
}
|
|
10869
10884
|
);
|
|
10870
|
-
const LinkWrapper = styled(
|
|
10885
|
+
const LinkWrapper = styled(BaseLinkImpl)`
|
|
10871
10886
|
padding: ${({ theme }) => theme.spaces[3]};
|
|
10872
10887
|
border-radius: ${({ theme }) => theme.borderRadius};
|
|
10873
10888
|
box-shadow: ${({ $active, theme }) => $active ? theme.shadows.filterShadow : void 0};
|
|
@@ -10957,19 +10972,22 @@ const PopoverContent = styled(Popover$1.Content)`
|
|
|
10957
10972
|
}
|
|
10958
10973
|
}
|
|
10959
10974
|
`;
|
|
10960
|
-
const ScrollAreaImpl = (
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
}
|
|
10975
|
+
const ScrollAreaImpl = React.forwardRef(
|
|
10976
|
+
({ children, intersectionId, onReachEnd, ...props }, forwardedRef) => {
|
|
10977
|
+
const popoverRef = React.useRef(null);
|
|
10978
|
+
const composedRef = useComposedRefs(popoverRef, forwardedRef);
|
|
10979
|
+
const generatedIntersectionId = useId();
|
|
10980
|
+
useIntersection(popoverRef, onReachEnd ?? (() => {
|
|
10981
|
+
}), {
|
|
10982
|
+
selectorToWatch: `#${stripReactIdOfColon(generatedIntersectionId)}`,
|
|
10983
|
+
skipWhen: !intersectionId || !onReachEnd
|
|
10984
|
+
});
|
|
10985
|
+
return /* @__PURE__ */ jsxs(PopoverScrollArea, { ref: composedRef, ...props, children: [
|
|
10986
|
+
children,
|
|
10987
|
+
intersectionId && onReachEnd && /* @__PURE__ */ jsx(Box, { id: stripReactIdOfColon(generatedIntersectionId), width: "100%", height: "1px" })
|
|
10988
|
+
] });
|
|
10989
|
+
}
|
|
10990
|
+
);
|
|
10973
10991
|
const PopoverScrollArea = styled(ScrollAreaImpl$1)`
|
|
10974
10992
|
height: 20rem;
|
|
10975
10993
|
`;
|
|
@@ -10980,36 +10998,34 @@ const Popover = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
10980
10998
|
ScrollArea: ScrollAreaImpl,
|
|
10981
10999
|
Trigger: Trigger$1
|
|
10982
11000
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
10983
|
-
const
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
11001
|
+
const ProgressBar = React.forwardRef(
|
|
11002
|
+
({ size = "M", value, ...restProps }, forwardedRef) => {
|
|
11003
|
+
return /* @__PURE__ */ jsx(ProgressRoot, { ref: forwardedRef, $size: size, ...restProps, children: /* @__PURE__ */ jsx(ProgressIndicator, { style: { transform: `translate3D(-${100 - (value ?? 0)}%, 0, 0)` } }) });
|
|
11004
|
+
}
|
|
11005
|
+
);
|
|
11006
|
+
const ProgressRoot = styled(Progress.Root)`
|
|
11007
|
+
position: relative;
|
|
11008
|
+
overflow: hidden;
|
|
11009
|
+
width: ${(props) => props.$size === "S" ? "7.8rem" : "10.2rem"};
|
|
11010
|
+
height: ${(props) => props.$size === "S" ? "0.4rem" : "0.8rem"};
|
|
11011
|
+
background-color: ${(props) => props.theme.colors.neutral600};
|
|
11012
|
+
border-radius: ${(props) => props.theme.borderRadius};
|
|
11013
|
+
|
|
11014
|
+
/* Fix overflow clipping in Safari */
|
|
11015
|
+
/* https://gist.github.com/domske/b66047671c780a238b51c51ffde8d3a0 */
|
|
11016
|
+
transform: translateZ(0);
|
|
11017
|
+
`;
|
|
11018
|
+
const ProgressIndicator = styled(Progress.Indicator)`
|
|
11019
|
+
background-color: ${({ theme }) => theme.colors.neutral0};
|
|
11020
|
+
border-radius: ${({ theme }) => theme.borderRadius};
|
|
11021
|
+
width: 100%;
|
|
11022
|
+
height: 100%;
|
|
11023
|
+
|
|
11024
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
11025
|
+
transition: transform ${(props) => props.theme.motion.timings["320"]}
|
|
11026
|
+
${(props) => props.theme.motion.easings.authenticMotion};
|
|
10992
11027
|
}
|
|
10993
11028
|
`;
|
|
10994
|
-
const ProgressBar = ({ min = 0, max = 100, value = 0, children, size = "M", ...props }) => {
|
|
10995
|
-
return /* @__PURE__ */ jsx(
|
|
10996
|
-
ProgressbarBase,
|
|
10997
|
-
{
|
|
10998
|
-
background: "neutral600",
|
|
10999
|
-
hasRadius: true,
|
|
11000
|
-
"aria-label": children,
|
|
11001
|
-
"aria-valuemax": max,
|
|
11002
|
-
"aria-valuemin": min,
|
|
11003
|
-
"aria-valuenow": value,
|
|
11004
|
-
height: size === "S" ? 1 : 2,
|
|
11005
|
-
position: "relative",
|
|
11006
|
-
role: "progressbar",
|
|
11007
|
-
$value: value,
|
|
11008
|
-
width: size === "S" ? "78px" : "102px",
|
|
11009
|
-
...props
|
|
11010
|
-
}
|
|
11011
|
-
);
|
|
11012
|
-
};
|
|
11013
11029
|
const Group = React.forwardRef((props, forwardedRef) => {
|
|
11014
11030
|
return /* @__PURE__ */ jsx(RadioGroupRoot, { ref: forwardedRef, ...props });
|
|
11015
11031
|
});
|
|
@@ -11103,172 +11119,171 @@ const RawTableContext = React.createContext({
|
|
|
11103
11119
|
}
|
|
11104
11120
|
});
|
|
11105
11121
|
const useTable = () => React.useContext(RawTableContext);
|
|
11106
|
-
const RawTable = (
|
|
11107
|
-
colCount,
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
}) => {
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
setRowIndex(rowIndex2);
|
|
11121
|
-
}, []);
|
|
11122
|
-
React.useEffect(() => {
|
|
11123
|
-
if (mountedRef.current) {
|
|
11124
|
-
focusFocusable(tableRef.current);
|
|
11125
|
-
}
|
|
11126
|
-
if (!mountedRef.current) {
|
|
11127
|
-
mountedRef.current = true;
|
|
11128
|
-
}
|
|
11129
|
-
}, [colIndex, rowIndex]);
|
|
11130
|
-
const handleKeyDown = (e) => {
|
|
11131
|
-
switch (e.key) {
|
|
11132
|
-
case KeyboardKeys.RIGHT: {
|
|
11133
|
-
e.preventDefault();
|
|
11134
|
-
setColIndex((prevColIndex) => prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex);
|
|
11135
|
-
break;
|
|
11136
|
-
}
|
|
11137
|
-
case KeyboardKeys.LEFT: {
|
|
11138
|
-
e.preventDefault();
|
|
11139
|
-
setColIndex((prevColIndex) => prevColIndex > 0 ? prevColIndex - 1 : prevColIndex);
|
|
11140
|
-
break;
|
|
11141
|
-
}
|
|
11142
|
-
case KeyboardKeys.UP: {
|
|
11143
|
-
e.preventDefault();
|
|
11144
|
-
setRowIndex((prevRowIndex) => prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex);
|
|
11145
|
-
break;
|
|
11122
|
+
const RawTable = React.forwardRef(
|
|
11123
|
+
({ colCount, rowCount, jumpStep = 3, initialCol = 0, initialRow = 0, ...props }, forwardedRef) => {
|
|
11124
|
+
const tableRef = React.useRef(null);
|
|
11125
|
+
const mountedRef = React.useRef(false);
|
|
11126
|
+
const composedRef = useComposedRefs(tableRef, forwardedRef);
|
|
11127
|
+
const [rowIndex, setRowIndex] = React.useState(initialRow);
|
|
11128
|
+
const [colIndex, setColIndex] = React.useState(initialCol);
|
|
11129
|
+
const setTableValues = React.useCallback(({ colIndex: colIndex2, rowIndex: rowIndex2 }) => {
|
|
11130
|
+
setColIndex(colIndex2);
|
|
11131
|
+
setRowIndex(rowIndex2);
|
|
11132
|
+
}, []);
|
|
11133
|
+
React.useEffect(() => {
|
|
11134
|
+
if (mountedRef.current) {
|
|
11135
|
+
focusFocusable(tableRef.current);
|
|
11146
11136
|
}
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
setRowIndex((prevRowIndex) => prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex);
|
|
11150
|
-
break;
|
|
11137
|
+
if (!mountedRef.current) {
|
|
11138
|
+
mountedRef.current = true;
|
|
11151
11139
|
}
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11140
|
+
}, [colIndex, rowIndex]);
|
|
11141
|
+
const handleKeyDown = (e) => {
|
|
11142
|
+
switch (e.key) {
|
|
11143
|
+
case KeyboardKeys.RIGHT: {
|
|
11144
|
+
e.preventDefault();
|
|
11145
|
+
setColIndex((prevColIndex) => prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex);
|
|
11146
|
+
break;
|
|
11156
11147
|
}
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11148
|
+
case KeyboardKeys.LEFT: {
|
|
11149
|
+
e.preventDefault();
|
|
11150
|
+
setColIndex((prevColIndex) => prevColIndex > 0 ? prevColIndex - 1 : prevColIndex);
|
|
11151
|
+
break;
|
|
11152
|
+
}
|
|
11153
|
+
case KeyboardKeys.UP: {
|
|
11154
|
+
e.preventDefault();
|
|
11155
|
+
setRowIndex((prevRowIndex) => prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex);
|
|
11156
|
+
break;
|
|
11157
|
+
}
|
|
11158
|
+
case KeyboardKeys.DOWN: {
|
|
11159
|
+
e.preventDefault();
|
|
11160
|
+
setRowIndex((prevRowIndex) => prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex);
|
|
11161
|
+
break;
|
|
11162
|
+
}
|
|
11163
|
+
case KeyboardKeys.HOME: {
|
|
11164
|
+
e.preventDefault();
|
|
11165
|
+
if (e.ctrlKey) {
|
|
11166
|
+
setRowIndex(0);
|
|
11167
|
+
}
|
|
11168
|
+
setColIndex(0);
|
|
11169
|
+
break;
|
|
11170
|
+
}
|
|
11171
|
+
case KeyboardKeys.END: {
|
|
11172
|
+
e.preventDefault();
|
|
11173
|
+
if (e.ctrlKey) {
|
|
11174
|
+
setRowIndex(rowCount - 1);
|
|
11175
|
+
}
|
|
11176
|
+
setColIndex(colCount - 1);
|
|
11177
|
+
break;
|
|
11178
|
+
}
|
|
11179
|
+
case KeyboardKeys.PAGE_DOWN: {
|
|
11180
|
+
e.preventDefault();
|
|
11181
|
+
setRowIndex((prevRowIndex) => prevRowIndex + jumpStep < rowCount ? prevRowIndex + jumpStep : rowCount - 1);
|
|
11182
|
+
break;
|
|
11183
|
+
}
|
|
11184
|
+
case KeyboardKeys.PAGE_UP: {
|
|
11185
|
+
e.preventDefault();
|
|
11186
|
+
setRowIndex((prevRowIndex) => prevRowIndex - jumpStep > 0 ? prevRowIndex - jumpStep : 0);
|
|
11187
|
+
break;
|
|
11164
11188
|
}
|
|
11165
|
-
setColIndex(colCount - 1);
|
|
11166
|
-
break;
|
|
11167
11189
|
}
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11190
|
+
};
|
|
11191
|
+
const context = React.useMemo(() => ({ rowIndex, colIndex, setTableValues }), [colIndex, rowIndex, setTableValues]);
|
|
11192
|
+
return /* @__PURE__ */ jsx(RawTableContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
|
|
11193
|
+
"table",
|
|
11194
|
+
{
|
|
11195
|
+
role: "grid",
|
|
11196
|
+
ref: composedRef,
|
|
11197
|
+
"aria-rowcount": rowCount,
|
|
11198
|
+
"aria-colcount": colCount,
|
|
11199
|
+
onKeyDown: handleKeyDown,
|
|
11200
|
+
...props
|
|
11172
11201
|
}
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11202
|
+
) });
|
|
11203
|
+
}
|
|
11204
|
+
);
|
|
11205
|
+
const RawTd = React.forwardRef(
|
|
11206
|
+
({ coords = { col: 0, row: 0 }, tag = "td", ...props }, forwardedRef) => {
|
|
11207
|
+
const tdRef = React.useRef(null);
|
|
11208
|
+
const composedRef = useComposedRefs(forwardedRef, tdRef);
|
|
11209
|
+
const { rowIndex, colIndex, setTableValues } = useTable();
|
|
11210
|
+
const [isActive, setIsActive] = React.useState(false);
|
|
11211
|
+
const handleKeyDown = (e) => {
|
|
11212
|
+
const focusableNodes = getFocusableNodes(tdRef.current, true);
|
|
11213
|
+
if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length === 0) {
|
|
11214
|
+
return;
|
|
11177
11215
|
}
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
}
|
|
11193
|
-
const RawTd = ({ coords = { col: 0, row: 0 }, tag = "td", ...props }) => {
|
|
11194
|
-
const tdRef = React.useRef(null);
|
|
11195
|
-
const { rowIndex, colIndex, setTableValues } = useTable();
|
|
11196
|
-
const [isActive, setIsActive] = React.useState(false);
|
|
11197
|
-
const handleKeyDown = (e) => {
|
|
11198
|
-
const focusableNodes = getFocusableNodes(tdRef.current, true);
|
|
11199
|
-
if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length === 0) {
|
|
11200
|
-
return;
|
|
11201
|
-
}
|
|
11202
|
-
if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== "BUTTON")) {
|
|
11203
|
-
e.preventDefault();
|
|
11204
|
-
const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);
|
|
11205
|
-
if (e.key === KeyboardKeys.RIGHT) {
|
|
11206
|
-
const nextNode = focusableNodes[focussedButtonIndex + 1];
|
|
11207
|
-
if (nextNode) {
|
|
11208
|
-
e.stopPropagation();
|
|
11209
|
-
nextNode.focus();
|
|
11210
|
-
}
|
|
11211
|
-
} else if (e.key === KeyboardKeys.LEFT) {
|
|
11212
|
-
const nextNode = focusableNodes[focussedButtonIndex - 1];
|
|
11213
|
-
if (nextNode) {
|
|
11214
|
-
e.stopPropagation();
|
|
11215
|
-
nextNode.focus();
|
|
11216
|
+
if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== "BUTTON")) {
|
|
11217
|
+
e.preventDefault();
|
|
11218
|
+
const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);
|
|
11219
|
+
if (e.key === KeyboardKeys.RIGHT) {
|
|
11220
|
+
const nextNode = focusableNodes[focussedButtonIndex + 1];
|
|
11221
|
+
if (nextNode) {
|
|
11222
|
+
e.stopPropagation();
|
|
11223
|
+
nextNode.focus();
|
|
11224
|
+
}
|
|
11225
|
+
} else if (e.key === KeyboardKeys.LEFT) {
|
|
11226
|
+
const nextNode = focusableNodes[focussedButtonIndex - 1];
|
|
11227
|
+
if (nextNode) {
|
|
11228
|
+
e.stopPropagation();
|
|
11229
|
+
nextNode.focus();
|
|
11230
|
+
}
|
|
11216
11231
|
}
|
|
11217
|
-
}
|
|
11218
|
-
return;
|
|
11219
|
-
}
|
|
11220
|
-
const isEnterKey = e.key === KeyboardKeys.ENTER;
|
|
11221
|
-
if (isEnterKey && !isActive) {
|
|
11222
|
-
setIsActive(true);
|
|
11223
|
-
} else if ((e.key === KeyboardKeys.ESCAPE || isEnterKey) && isActive) {
|
|
11224
|
-
if (isEnterKey && document.activeElement?.tagName === "A") {
|
|
11225
11232
|
return;
|
|
11226
11233
|
}
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
e.
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;
|
|
11234
|
-
useIsomorphicLayoutEffect(() => {
|
|
11235
|
-
const focusableNodes = getFocusableNodes(tdRef.current, true);
|
|
11236
|
-
if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
|
|
11237
|
-
tdRef.current.setAttribute("tabIndex", !isActive && isFocused ? "0" : "-1");
|
|
11238
|
-
focusableNodes.forEach((node, index) => {
|
|
11239
|
-
node.setAttribute("tabIndex", isActive ? "0" : "-1");
|
|
11240
|
-
if (isActive && index === 0) {
|
|
11241
|
-
node.focus();
|
|
11234
|
+
const isEnterKey = e.key === KeyboardKeys.ENTER;
|
|
11235
|
+
if (isEnterKey && !isActive) {
|
|
11236
|
+
setIsActive(true);
|
|
11237
|
+
} else if ((e.key === KeyboardKeys.ESCAPE || isEnterKey) && isActive) {
|
|
11238
|
+
if (isEnterKey && document.activeElement?.tagName === "A") {
|
|
11239
|
+
return;
|
|
11242
11240
|
}
|
|
11243
|
-
|
|
11244
|
-
|
|
11241
|
+
setIsActive(false);
|
|
11242
|
+
tdRef.current.focus();
|
|
11243
|
+
} else if (isActive) {
|
|
11244
|
+
e.stopPropagation();
|
|
11245
|
+
}
|
|
11246
|
+
};
|
|
11247
|
+
const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;
|
|
11248
|
+
useIsomorphicLayoutEffect(() => {
|
|
11249
|
+
const focusableNodes = getFocusableNodes(tdRef.current, true);
|
|
11250
|
+
if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
|
|
11251
|
+
tdRef.current.setAttribute("tabIndex", !isActive && isFocused ? "0" : "-1");
|
|
11252
|
+
focusableNodes.forEach((node, index) => {
|
|
11253
|
+
node.setAttribute("tabIndex", isActive ? "0" : "-1");
|
|
11254
|
+
if (isActive && index === 0) {
|
|
11255
|
+
node.focus();
|
|
11256
|
+
}
|
|
11257
|
+
});
|
|
11258
|
+
} else {
|
|
11259
|
+
focusableNodes.forEach((node) => {
|
|
11260
|
+
node.setAttribute("tabIndex", isFocused ? "0" : "-1");
|
|
11261
|
+
});
|
|
11262
|
+
}
|
|
11263
|
+
}, [isActive, isFocused]);
|
|
11264
|
+
const handleFocusableNodeFocus = React.useCallback(() => {
|
|
11265
|
+
const focusableNodes = getFocusableNodes(tdRef.current, true);
|
|
11266
|
+
if (focusableNodes.length >= 1 && (getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || !focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
|
|
11267
|
+
setIsActive(true);
|
|
11268
|
+
}
|
|
11269
|
+
setTableValues({ rowIndex: coords.row - 1, colIndex: coords.col - 1 });
|
|
11270
|
+
}, [coords, setTableValues]);
|
|
11271
|
+
useIsomorphicLayoutEffect(() => {
|
|
11272
|
+
const cell = tdRef.current;
|
|
11273
|
+
const focusableNodes = getFocusableNodes(cell, true);
|
|
11245
11274
|
focusableNodes.forEach((node) => {
|
|
11246
|
-
node.
|
|
11247
|
-
});
|
|
11248
|
-
}
|
|
11249
|
-
}, [isActive, isFocused]);
|
|
11250
|
-
const handleFocusableNodeFocus = React.useCallback(() => {
|
|
11251
|
-
const focusableNodes = getFocusableNodes(tdRef.current, true);
|
|
11252
|
-
if (focusableNodes.length >= 1 && (getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || !focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
|
|
11253
|
-
setIsActive(true);
|
|
11254
|
-
}
|
|
11255
|
-
setTableValues({ rowIndex: coords.row - 1, colIndex: coords.col - 1 });
|
|
11256
|
-
}, [coords, setTableValues]);
|
|
11257
|
-
useIsomorphicLayoutEffect(() => {
|
|
11258
|
-
const cell = tdRef.current;
|
|
11259
|
-
const focusableNodes = getFocusableNodes(cell, true);
|
|
11260
|
-
focusableNodes.forEach((node) => {
|
|
11261
|
-
node.addEventListener("focus", handleFocusableNodeFocus);
|
|
11262
|
-
});
|
|
11263
|
-
return () => {
|
|
11264
|
-
const focusableNodes2 = getFocusableNodes(cell, true);
|
|
11265
|
-
focusableNodes2.forEach((node) => {
|
|
11266
|
-
node.removeEventListener("focus", handleFocusableNodeFocus);
|
|
11275
|
+
node.addEventListener("focus", handleFocusableNodeFocus);
|
|
11267
11276
|
});
|
|
11268
|
-
|
|
11269
|
-
|
|
11270
|
-
|
|
11271
|
-
|
|
11277
|
+
return () => {
|
|
11278
|
+
const focusableNodes2 = getFocusableNodes(cell, true);
|
|
11279
|
+
focusableNodes2.forEach((node) => {
|
|
11280
|
+
node.removeEventListener("focus", handleFocusableNodeFocus);
|
|
11281
|
+
});
|
|
11282
|
+
};
|
|
11283
|
+
}, [handleFocusableNodeFocus]);
|
|
11284
|
+
return /* @__PURE__ */ jsx(Box, { role: "gridcell", tag, ref: composedRef, onKeyDown: handleKeyDown, ...props });
|
|
11285
|
+
}
|
|
11286
|
+
);
|
|
11272
11287
|
const RawTh = (props) => /* @__PURE__ */ jsx(RawTd, { ...props, tag: "th" });
|
|
11273
11288
|
const RawThead = ({ children, ...props }) => {
|
|
11274
11289
|
const childrenClone = React.Children.toArray(children).map((child) => {
|
|
@@ -11319,14 +11334,18 @@ const SearchbarWrapper = styled.div`
|
|
|
11319
11334
|
&:focus-within {
|
|
11320
11335
|
${SearchIcon} {
|
|
11321
11336
|
fill: ${({ theme }) => theme.colors.primary600};
|
|
11322
|
-
path {
|
|
11323
|
-
}
|
|
11324
11337
|
}
|
|
11325
11338
|
}
|
|
11326
11339
|
`;
|
|
11327
11340
|
const SearchbarInput = styled(Input$2)`
|
|
11328
11341
|
border: 1px solid transparent;
|
|
11329
11342
|
|
|
11343
|
+
&:hover {
|
|
11344
|
+
button {
|
|
11345
|
+
cursor: pointer;
|
|
11346
|
+
}
|
|
11347
|
+
}
|
|
11348
|
+
|
|
11330
11349
|
${inputFocusStyle()}
|
|
11331
11350
|
`;
|
|
11332
11351
|
const Searchbar = React.forwardRef(
|
|
@@ -11346,7 +11365,17 @@ const Searchbar = React.forwardRef(
|
|
|
11346
11365
|
ref: actualRef,
|
|
11347
11366
|
value,
|
|
11348
11367
|
startAction: /* @__PURE__ */ jsx(SearchIcon, { "aria-hidden": true }),
|
|
11349
|
-
endAction: isCompleting ? /* @__PURE__ */ jsx(
|
|
11368
|
+
endAction: isCompleting ? /* @__PURE__ */ jsx(
|
|
11369
|
+
Action$1,
|
|
11370
|
+
{
|
|
11371
|
+
label: clearLabel,
|
|
11372
|
+
onClick: handleClear,
|
|
11373
|
+
onMouseDown: (e) => {
|
|
11374
|
+
e.preventDefault();
|
|
11375
|
+
},
|
|
11376
|
+
children: /* @__PURE__ */ jsx(CloseIcon, {})
|
|
11377
|
+
}
|
|
11378
|
+
) : void 0,
|
|
11350
11379
|
...props
|
|
11351
11380
|
}
|
|
11352
11381
|
)
|
|
@@ -11354,47 +11383,60 @@ const Searchbar = React.forwardRef(
|
|
|
11354
11383
|
}
|
|
11355
11384
|
);
|
|
11356
11385
|
const SearchForm = (props) => /* @__PURE__ */ jsx("form", { ...props, role: "search" });
|
|
11357
|
-
const
|
|
11386
|
+
const ButtonBox$1 = styled(Box)`
|
|
11387
|
+
display: inline-flex;
|
|
11388
|
+
border: none;
|
|
11389
|
+
|
|
11390
|
+
& > svg {
|
|
11391
|
+
height: 0.8rem;
|
|
11392
|
+
width: 0.8rem;
|
|
11393
|
+
}
|
|
11394
|
+
|
|
11395
|
+
& > svg path {
|
|
11396
|
+
fill: ${({ theme, ...p }) => p["aria-disabled"] ? theme.colors.neutral600 : theme.colors.primary600};
|
|
11397
|
+
}
|
|
11398
|
+
|
|
11399
|
+
&:hover {
|
|
11400
|
+
cursor: ${({ $iconAction }) => $iconAction ? "pointer" : "initial"};
|
|
11401
|
+
}
|
|
11402
|
+
`;
|
|
11403
|
+
const Tag = ({ children, icon, label, disabled = false, onClick, ...props }) => {
|
|
11358
11404
|
const handleClick = (e) => {
|
|
11359
11405
|
if (disabled || !onClick)
|
|
11360
11406
|
return;
|
|
11361
11407
|
onClick(e);
|
|
11362
11408
|
};
|
|
11363
11409
|
return /* @__PURE__ */ jsxs(
|
|
11364
|
-
|
|
11410
|
+
Flex,
|
|
11365
11411
|
{
|
|
11366
|
-
|
|
11412
|
+
inline: true,
|
|
11367
11413
|
background: disabled ? "neutral200" : "primary100",
|
|
11368
11414
|
color: disabled ? "neutral700" : "primary600",
|
|
11369
11415
|
paddingLeft: 3,
|
|
11370
|
-
paddingRight:
|
|
11371
|
-
onClick: handleClick,
|
|
11372
|
-
"aria-disabled": disabled,
|
|
11373
|
-
disabled,
|
|
11374
|
-
borderWidth: "1px",
|
|
11375
|
-
borderStyle: "solid",
|
|
11416
|
+
paddingRight: 1,
|
|
11376
11417
|
borderColor: disabled ? "neutral300" : "primary200",
|
|
11377
11418
|
hasRadius: true,
|
|
11378
11419
|
height: "3.2rem",
|
|
11379
|
-
gap: 2,
|
|
11380
11420
|
...props,
|
|
11381
11421
|
children: [
|
|
11382
11422
|
/* @__PURE__ */ jsx(TagText, { $disabled: disabled, variant: "pi", fontWeight: "bold", children }),
|
|
11383
|
-
|
|
11423
|
+
/* @__PURE__ */ jsx(
|
|
11424
|
+
ButtonBox$1,
|
|
11425
|
+
{
|
|
11426
|
+
tag: "button",
|
|
11427
|
+
disabled,
|
|
11428
|
+
"aria-disabled": disabled,
|
|
11429
|
+
"aria-label": label,
|
|
11430
|
+
padding: 2,
|
|
11431
|
+
onClick: handleClick,
|
|
11432
|
+
$iconAction: !!onClick,
|
|
11433
|
+
children: icon
|
|
11434
|
+
}
|
|
11435
|
+
)
|
|
11384
11436
|
]
|
|
11385
11437
|
}
|
|
11386
11438
|
);
|
|
11387
11439
|
};
|
|
11388
|
-
const TagWrapper = styled(Flex)`
|
|
11389
|
-
& > svg {
|
|
11390
|
-
height: 0.8rem;
|
|
11391
|
-
width: 0.8rem;
|
|
11392
|
-
}
|
|
11393
|
-
|
|
11394
|
-
& > svg path {
|
|
11395
|
-
fill: ${({ theme, ...p }) => p["aria-disabled"] ? theme.colors.neutral600 : theme.colors.primary600};
|
|
11396
|
-
}
|
|
11397
|
-
`;
|
|
11398
11440
|
const TagText = styled(Typography)`
|
|
11399
11441
|
color: inherit;
|
|
11400
11442
|
border-right: 1px solid ${({ theme, $disabled }) => $disabled ? theme.colors.neutral300 : theme.colors.primary200};
|
|
@@ -11415,6 +11457,7 @@ const MultiSelect = React.forwardRef(
|
|
|
11415
11457
|
onReachEnd,
|
|
11416
11458
|
placeholder,
|
|
11417
11459
|
required: requiredProp,
|
|
11460
|
+
size,
|
|
11418
11461
|
startIcon,
|
|
11419
11462
|
value: passedValue,
|
|
11420
11463
|
withTags,
|
|
@@ -11498,7 +11541,8 @@ const MultiSelect = React.forwardRef(
|
|
|
11498
11541
|
disabled,
|
|
11499
11542
|
clearLabel,
|
|
11500
11543
|
onClear: value?.length ? onClear : void 0,
|
|
11501
|
-
|
|
11544
|
+
withTags: Boolean(withTags && (value?.length ?? 0 > 0)),
|
|
11545
|
+
size,
|
|
11502
11546
|
children: /* @__PURE__ */ jsx(Value, { placeholder, textColor: value?.length ? "neutral800" : "neutral600", children: value?.length ? withTags ? renderTags : customizeContent ? customizeContent(value) : void 0 : void 0 })
|
|
11503
11547
|
}
|
|
11504
11548
|
),
|
|
@@ -11661,7 +11705,7 @@ const SubNavHeader = ({
|
|
|
11661
11705
|
] });
|
|
11662
11706
|
}
|
|
11663
11707
|
return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "flex-start", paddingLeft: 6, paddingTop: 6, paddingBottom: 2, paddingRight: 4, children: [
|
|
11664
|
-
/* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", children: [
|
|
11708
|
+
/* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", width: "100%", gap: 2, children: [
|
|
11665
11709
|
/* @__PURE__ */ jsx(Typography, { variant: "beta", tag, children: label }),
|
|
11666
11710
|
searchable && /* @__PURE__ */ jsx(IconButton, { ref: searchButtonRef, onClick: toggleSearch, label: searchLabel, children: /* @__PURE__ */ jsx(Search, {}) })
|
|
11667
11711
|
] }),
|
|
@@ -11690,7 +11734,13 @@ const SubNavLink = forwardRef(
|
|
|
11690
11734
|
);
|
|
11691
11735
|
}
|
|
11692
11736
|
);
|
|
11693
|
-
const
|
|
11737
|
+
const CustomBullet = styled.span`
|
|
11738
|
+
width: 0.4rem;
|
|
11739
|
+
height: 0.4rem;
|
|
11740
|
+
background-color: ${({ theme, $active }) => $active ? theme.colors.primary600 : theme.colors.neutral600};
|
|
11741
|
+
border-radius: 50%;
|
|
11742
|
+
`;
|
|
11743
|
+
const SubNavLinkWrapper = styled(BaseLinkImpl)`
|
|
11694
11744
|
display: flex;
|
|
11695
11745
|
align-items: center;
|
|
11696
11746
|
justify-content: space-between;
|
|
@@ -11709,18 +11759,16 @@ const SubNavLinkWrapper = styled(BaseLink)`
|
|
|
11709
11759
|
font-weight: 500;
|
|
11710
11760
|
`;
|
|
11711
11761
|
}}
|
|
11762
|
+
|
|
11763
|
+
${CustomBullet} {
|
|
11764
|
+
background-color: ${({ theme }) => theme.colors.primary600};
|
|
11765
|
+
}
|
|
11712
11766
|
}
|
|
11713
11767
|
|
|
11714
11768
|
&:focus-visible {
|
|
11715
11769
|
outline-offset: -2px;
|
|
11716
11770
|
}
|
|
11717
11771
|
`;
|
|
11718
|
-
const CustomBullet = styled.span`
|
|
11719
|
-
width: 0.4rem;
|
|
11720
|
-
height: 0.4rem;
|
|
11721
|
-
background-color: ${({ theme, $active }) => $active ? theme.colors.primary600 : theme.colors.neutral600};
|
|
11722
|
-
border-radius: 50%;
|
|
11723
|
-
`;
|
|
11724
11772
|
const IconWrapper = styled.div`
|
|
11725
11773
|
svg {
|
|
11726
11774
|
height: 1.6rem;
|
|
@@ -11851,70 +11899,84 @@ const SubNavSections = ({ children, spacing = 2, horizontal = false, ...props })
|
|
|
11851
11899
|
}
|
|
11852
11900
|
) });
|
|
11853
11901
|
};
|
|
11854
|
-
const
|
|
11855
|
-
({
|
|
11856
|
-
|
|
11857
|
-
|
|
11858
|
-
|
|
11859
|
-
|
|
11860
|
-
|
|
11861
|
-
|
|
11862
|
-
|
|
11863
|
-
|
|
11864
|
-
|
|
11865
|
-
|
|
11866
|
-
|
|
11867
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
|
|
11902
|
+
const SwitchImpl = React.forwardRef(
|
|
11903
|
+
({
|
|
11904
|
+
visibleLabels,
|
|
11905
|
+
onLabel = "On",
|
|
11906
|
+
offLabel = "Off",
|
|
11907
|
+
onCheckedChange: onCheckedChangeProp,
|
|
11908
|
+
checked: checkedProp,
|
|
11909
|
+
defaultChecked,
|
|
11910
|
+
disabled,
|
|
11911
|
+
...restProps
|
|
11912
|
+
}, forwardedRef) => {
|
|
11913
|
+
const [internalChecked, setInternalChecked] = useControllableState$1({
|
|
11914
|
+
prop: checkedProp,
|
|
11915
|
+
defaultProp: defaultChecked
|
|
11916
|
+
});
|
|
11917
|
+
const handleCheckChange = (checked) => {
|
|
11918
|
+
setInternalChecked(checked);
|
|
11919
|
+
};
|
|
11920
|
+
return /* @__PURE__ */ jsxs(Flex, { gap: 3, children: [
|
|
11921
|
+
/* @__PURE__ */ jsx(
|
|
11922
|
+
SwitchRoot,
|
|
11923
|
+
{
|
|
11924
|
+
ref: forwardedRef,
|
|
11925
|
+
onCheckedChange: composeEventHandlers(onCheckedChangeProp, handleCheckChange),
|
|
11926
|
+
checked: internalChecked,
|
|
11927
|
+
disabled,
|
|
11928
|
+
...restProps,
|
|
11929
|
+
children: /* @__PURE__ */ jsx(SwitchThumb, {})
|
|
11930
|
+
}
|
|
11931
|
+
),
|
|
11932
|
+
visibleLabels ? /* @__PURE__ */ jsx(LabelTypography, { "aria-hidden": true, "data-disabled": disabled, "data-state": internalChecked ? "checked" : "unchecked", children: internalChecked ? onLabel : offLabel }) : null
|
|
11933
|
+
] });
|
|
11875
11934
|
}
|
|
11876
11935
|
);
|
|
11877
|
-
const
|
|
11878
|
-
background: ${({ theme }) => theme.colors.danger500};
|
|
11879
|
-
border: none;
|
|
11880
|
-
border-radius: 16px;
|
|
11881
|
-
position: relative;
|
|
11882
|
-
height: 2.4rem;
|
|
11936
|
+
const SwitchRoot = styled(Switch.Root)`
|
|
11883
11937
|
width: 4rem;
|
|
11938
|
+
height: 2.4rem;
|
|
11939
|
+
border-radius: 1.2rem;
|
|
11940
|
+
background-color: ${({ theme }) => theme.colors.danger500};
|
|
11884
11941
|
|
|
11885
|
-
&
|
|
11886
|
-
|
|
11942
|
+
&[data-state='checked'] {
|
|
11943
|
+
background-color: ${({ theme }) => theme.colors.success500};
|
|
11887
11944
|
}
|
|
11888
11945
|
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
background: ${({ theme }) => theme.colors.neutral0};
|
|
11892
|
-
width: 1rem;
|
|
11893
|
-
height: 1rem;
|
|
11894
|
-
border-radius: 50%;
|
|
11895
|
-
position: absolute;
|
|
11896
|
-
transition: all 0.5s;
|
|
11897
|
-
left: ${({ theme }) => theme.spaces[1]};
|
|
11898
|
-
top: ${({ theme }) => theme.spaces[1]};
|
|
11946
|
+
&[data-disabled] {
|
|
11947
|
+
background-color: ${({ theme }) => theme.colors.neutral300};
|
|
11899
11948
|
}
|
|
11900
11949
|
|
|
11901
|
-
@media (prefers-reduced-motion:
|
|
11902
|
-
|
|
11903
|
-
transition: none;
|
|
11904
|
-
}
|
|
11950
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
11951
|
+
transition: ${(props) => props.theme.transitions.backgroundColor};
|
|
11905
11952
|
}
|
|
11906
11953
|
`;
|
|
11907
|
-
const
|
|
11908
|
-
|
|
11909
|
-
|
|
11910
|
-
|
|
11954
|
+
const SwitchThumb = styled(Switch.Thumb)`
|
|
11955
|
+
display: block;
|
|
11956
|
+
height: 1.6rem;
|
|
11957
|
+
width: 1.6rem;
|
|
11958
|
+
border-radius: 50%;
|
|
11959
|
+
background-color: ${({ theme }) => theme.colors.neutral0};
|
|
11960
|
+
transform: translateX(4px);
|
|
11961
|
+
|
|
11962
|
+
&[data-state='checked'] {
|
|
11963
|
+
transform: translateX(20px);
|
|
11964
|
+
}
|
|
11965
|
+
|
|
11966
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
11967
|
+
transition: transform ${(props) => props.theme.motion.timings["120"]}
|
|
11968
|
+
${(props) => props.theme.motion.easings.authenticMotion};
|
|
11969
|
+
}
|
|
11970
|
+
`;
|
|
11971
|
+
const LabelTypography = styled(Typography)`
|
|
11972
|
+
color: ${(props) => props.theme.colors.danger600};
|
|
11911
11973
|
|
|
11912
|
-
&[
|
|
11913
|
-
|
|
11974
|
+
&[data-state='checked'] {
|
|
11975
|
+
color: ${(props) => props.theme.colors.success600};
|
|
11914
11976
|
}
|
|
11915
11977
|
|
|
11916
|
-
&[
|
|
11917
|
-
|
|
11978
|
+
&[data-disabled='true'] {
|
|
11979
|
+
color: ${({ theme }) => theme.colors.neutral500};
|
|
11918
11980
|
}
|
|
11919
11981
|
`;
|
|
11920
11982
|
const [TabsProvider, useTabs] = createContext("Tabs");
|
|
@@ -12084,7 +12146,7 @@ const TableBox = styled(Box)`
|
|
|
12084
12146
|
const ScrollContainer = styled(Box)`
|
|
12085
12147
|
overflow-x: auto;
|
|
12086
12148
|
`;
|
|
12087
|
-
const Table = ({ footer, ...props }) => {
|
|
12149
|
+
const Table = React.forwardRef(({ footer, ...props }, forwardedRef) => {
|
|
12088
12150
|
const tableRef = React.useRef(null);
|
|
12089
12151
|
const [overflowing, setOverflowing] = React.useState();
|
|
12090
12152
|
const handleScroll = (e) => {
|
|
@@ -12107,10 +12169,10 @@ const Table = ({ footer, ...props }) => {
|
|
|
12107
12169
|
}
|
|
12108
12170
|
}, []);
|
|
12109
12171
|
return /* @__PURE__ */ jsxs(TableContainer, { shadow: "tableShadow", hasRadius: true, background: "neutral0", children: [
|
|
12110
|
-
/* @__PURE__ */ jsx(TableBox, { $overflowing: overflowing, position: "relative", children: /* @__PURE__ */ jsx(ScrollContainer, { ref: tableRef, onScroll: handleScroll, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ jsx(TableWrapper, { ...props }) }) }),
|
|
12172
|
+
/* @__PURE__ */ jsx(TableBox, { $overflowing: overflowing, position: "relative", children: /* @__PURE__ */ jsx(ScrollContainer, { ref: tableRef, onScroll: handleScroll, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ jsx(TableWrapper, { ref: forwardedRef, ...props }) }) }),
|
|
12111
12173
|
footer
|
|
12112
12174
|
] });
|
|
12113
|
-
};
|
|
12175
|
+
});
|
|
12114
12176
|
const TbodyWrapper = styled(RawTbody)`
|
|
12115
12177
|
& tr:last-of-type {
|
|
12116
12178
|
border-bottom: none;
|
|
@@ -12151,7 +12213,6 @@ const Tr = (props) => {
|
|
|
12151
12213
|
const CellWrapper = styled(RawTd)`
|
|
12152
12214
|
vertical-align: middle;
|
|
12153
12215
|
text-align: left;
|
|
12154
|
-
color: ${({ theme }) => theme.colors.neutral600};
|
|
12155
12216
|
outline-offset: -4px;
|
|
12156
12217
|
|
|
12157
12218
|
/**
|
|
@@ -12161,15 +12222,15 @@ const CellWrapper = styled(RawTd)`
|
|
|
12161
12222
|
vertical-align: sub;
|
|
12162
12223
|
}
|
|
12163
12224
|
`;
|
|
12164
|
-
const Th = ({ children, action, ...props }) => {
|
|
12165
|
-
return /* @__PURE__ */ jsx(CellWrapper, { as: RawTh, ...props, children: /* @__PURE__ */ jsxs(Flex, { children: [
|
|
12225
|
+
const Th = React.forwardRef(({ children, action, ...props }, forwardedRef) => {
|
|
12226
|
+
return /* @__PURE__ */ jsx(CellWrapper, { color: "neutral600", as: RawTh, ref: forwardedRef, ...props, children: /* @__PURE__ */ jsxs(Flex, { children: [
|
|
12166
12227
|
children,
|
|
12167
12228
|
action
|
|
12168
12229
|
] }) });
|
|
12169
|
-
};
|
|
12170
|
-
const Td = ({ children, ...props }) => {
|
|
12171
|
-
return /* @__PURE__ */ jsx(CellWrapper, { ...props, children });
|
|
12172
|
-
};
|
|
12230
|
+
});
|
|
12231
|
+
const Td = React.forwardRef(({ children, ...props }, forwardedRef) => {
|
|
12232
|
+
return /* @__PURE__ */ jsx(CellWrapper, { color: "neutral800", ref: forwardedRef, ...props, children });
|
|
12233
|
+
});
|
|
12173
12234
|
const IconBox = styled(Box)`
|
|
12174
12235
|
height: 2.4rem;
|
|
12175
12236
|
width: 2.4rem;
|
|
@@ -12202,6 +12263,28 @@ const TFooter = ({ children, icon, ...props }) => {
|
|
|
12202
12263
|
] }) })
|
|
12203
12264
|
] });
|
|
12204
12265
|
};
|
|
12266
|
+
const TextButton = forwardRef(
|
|
12267
|
+
({ children, startIcon, endIcon, disabled = false, loading = false, ...props }, ref) => {
|
|
12268
|
+
const isDisabled = disabled || loading;
|
|
12269
|
+
return /* @__PURE__ */ jsxs(
|
|
12270
|
+
TextButtonWrapper,
|
|
12271
|
+
{
|
|
12272
|
+
ref,
|
|
12273
|
+
disabled: isDisabled,
|
|
12274
|
+
"aria-disabled": isDisabled,
|
|
12275
|
+
tag: "button",
|
|
12276
|
+
type: "button",
|
|
12277
|
+
gap: 2,
|
|
12278
|
+
...props,
|
|
12279
|
+
children: [
|
|
12280
|
+
loading ? /* @__PURE__ */ jsx(LoadingWrapper, { "aria-hidden": true, children: /* @__PURE__ */ jsx(Loader$1, {}) }) : startIcon,
|
|
12281
|
+
/* @__PURE__ */ jsx(Typography, { variant: "pi", children }),
|
|
12282
|
+
endIcon
|
|
12283
|
+
]
|
|
12284
|
+
}
|
|
12285
|
+
);
|
|
12286
|
+
}
|
|
12287
|
+
);
|
|
12205
12288
|
const rotation = keyframes`
|
|
12206
12289
|
from {
|
|
12207
12290
|
transform: rotate(0deg);
|
|
@@ -12210,51 +12293,24 @@ const rotation = keyframes`
|
|
|
12210
12293
|
transform: rotate(359deg);
|
|
12211
12294
|
}
|
|
12212
12295
|
`;
|
|
12213
|
-
const LoadingWrapper = styled.
|
|
12296
|
+
const LoadingWrapper = styled.span`
|
|
12297
|
+
display: flex;
|
|
12214
12298
|
animation: ${rotation} 2s infinite linear;
|
|
12215
12299
|
will-change: transform;
|
|
12216
12300
|
`;
|
|
12217
12301
|
const TextButtonWrapper = styled(Flex)`
|
|
12218
12302
|
border: none;
|
|
12303
|
+
background-color: transparent;
|
|
12304
|
+
color: ${(props) => props.theme.colors.primary600};
|
|
12305
|
+
cursor: pointer;
|
|
12219
12306
|
|
|
12220
12307
|
&[aria-disabled='true'] {
|
|
12221
12308
|
pointer-events: none;
|
|
12222
|
-
|
|
12223
|
-
fill: ${({ theme }) => theme.colors.neutral600};
|
|
12224
|
-
}
|
|
12225
|
-
}
|
|
12226
|
-
|
|
12227
|
-
svg path {
|
|
12228
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
|
12309
|
+
color: ${(props) => props.theme.colors.neutral600};
|
|
12229
12310
|
}
|
|
12230
12311
|
|
|
12231
12312
|
${focus}
|
|
12232
12313
|
`;
|
|
12233
|
-
const TextButton = React.forwardRef(
|
|
12234
|
-
({ children, startIcon, endIcon, onClick, disabled = false, loading = false, ...props }, ref) => {
|
|
12235
|
-
const handleClick = onClick && !disabled ? onClick : void 0;
|
|
12236
|
-
const isDisabled = disabled || loading;
|
|
12237
|
-
return /* @__PURE__ */ jsxs(
|
|
12238
|
-
TextButtonWrapper,
|
|
12239
|
-
{
|
|
12240
|
-
ref,
|
|
12241
|
-
"aria-disabled": isDisabled,
|
|
12242
|
-
onClick: handleClick,
|
|
12243
|
-
tag: "button",
|
|
12244
|
-
type: "button",
|
|
12245
|
-
background: "transparent",
|
|
12246
|
-
gap: 2,
|
|
12247
|
-
...props,
|
|
12248
|
-
children: [
|
|
12249
|
-
loading ? /* @__PURE__ */ jsx(LoadingWrapper, { "aria-hidden": true, children: /* @__PURE__ */ jsx(Loader$1, {}) }) : startIcon,
|
|
12250
|
-
/* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: isDisabled ? "neutral600" : "primary600", children }),
|
|
12251
|
-
endIcon
|
|
12252
|
-
]
|
|
12253
|
-
}
|
|
12254
|
-
);
|
|
12255
|
-
}
|
|
12256
|
-
);
|
|
12257
|
-
TextButton.displayName = "TextButton";
|
|
12258
12314
|
const TextInput = React.forwardRef((props, ref) => {
|
|
12259
12315
|
return /* @__PURE__ */ jsx(Input$2, { ref, ...props });
|
|
12260
12316
|
});
|
|
@@ -12544,8 +12600,7 @@ export {
|
|
|
12544
12600
|
Alert,
|
|
12545
12601
|
Avatar,
|
|
12546
12602
|
Badge,
|
|
12547
|
-
|
|
12548
|
-
BaseLink,
|
|
12603
|
+
BaseLinkImpl as BaseLink,
|
|
12549
12604
|
Box,
|
|
12550
12605
|
Breadcrumbs,
|
|
12551
12606
|
Button,
|
|
@@ -12628,7 +12683,7 @@ export {
|
|
|
12628
12683
|
SubNavLinkSection,
|
|
12629
12684
|
SubNavSection,
|
|
12630
12685
|
SubNavSections,
|
|
12631
|
-
Switch,
|
|
12686
|
+
SwitchImpl as Switch,
|
|
12632
12687
|
TFooter,
|
|
12633
12688
|
Table,
|
|
12634
12689
|
Tabs,
|