@strapi/design-system 2.0.0-beta.6 → 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/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.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.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/Popover/Popover.d.ts +1 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -2
- 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/SelectParts.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/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 +511 -538
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +511 -538
- package/dist/index.mjs.map +1 -1
- package/dist/styles/global.d.ts.map +1 -1
- package/package.json +7 -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.js
CHANGED
|
@@ -469,25 +469,38 @@ const AccordionItem = styledComponents.styled(RadixAccordion__namespace.Item)`
|
|
|
469
469
|
overflow: hidden;
|
|
470
470
|
|
|
471
471
|
&:first-child {
|
|
472
|
-
border-top-left-radius:
|
|
473
|
-
border-top-right-radius:
|
|
472
|
+
border-top-left-radius: 0.3rem;
|
|
473
|
+
border-top-right-radius: 0.3rem;
|
|
474
474
|
}
|
|
475
475
|
|
|
476
476
|
&:last-child {
|
|
477
|
-
border-bottom-left-radius:
|
|
478
|
-
border-bottom-right-radius:
|
|
477
|
+
border-bottom-left-radius: 0.3rem;
|
|
478
|
+
border-bottom-right-radius: 0.3rem;
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
& + & {
|
|
482
482
|
border-top: ${(props) => props.$size === "S" ? `solid 1px ${props.theme.colors.neutral200}` : "unset"};
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
+
&[data-state='open'] {
|
|
486
|
+
box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
&:hover {
|
|
490
|
+
box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
|
|
491
|
+
}
|
|
492
|
+
|
|
485
493
|
/* This applies our desired focus effect correctly. */
|
|
486
494
|
&:focus-within {
|
|
487
495
|
position: relative;
|
|
488
496
|
z-index: 1;
|
|
489
497
|
box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
|
|
490
498
|
}
|
|
499
|
+
|
|
500
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
501
|
+
transition: box-shadow ${(props) => props.theme.motion.timings["120"]}
|
|
502
|
+
${(props) => props.theme.motion.easings.easeOutQuad};
|
|
503
|
+
}
|
|
491
504
|
`;
|
|
492
505
|
const Trigger$7 = React__namespace.forwardRef(
|
|
493
506
|
({ caretPosition = "left", description, icon: Icon, children, ...restProps }, forwardedRef) => {
|
|
@@ -503,10 +516,11 @@ const Trigger$7 = React__namespace.forwardRef(
|
|
|
503
516
|
fontWeight: size === "S" ? "bold" : void 0,
|
|
504
517
|
ellipsis: true,
|
|
505
518
|
variant: size === "M" ? "delta" : void 0,
|
|
519
|
+
textAlign: "left",
|
|
506
520
|
children
|
|
507
521
|
}
|
|
508
522
|
),
|
|
509
|
-
description && size === "M" ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { children: description }) : null
|
|
523
|
+
description && size === "M" ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { textAlign: "left", children: description }) : null
|
|
510
524
|
] })
|
|
511
525
|
] }),
|
|
512
526
|
caretPosition === "right" ? /* @__PURE__ */ jsxRuntime.jsx(TriggerIcon, { $size: size, children: /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, { width: size === "S" ? "1.2rem" : "1.6rem", height: size === "S" ? "1.2rem" : "1.6rem" }) }) : null
|
|
@@ -1170,51 +1184,32 @@ const Base = styledComponents.styled(Flex)`
|
|
|
1170
1184
|
`;
|
|
1171
1185
|
}};
|
|
1172
1186
|
`;
|
|
1173
|
-
const
|
|
1174
|
-
({ disabled,
|
|
1175
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1176
|
-
BaseButtonWrapper,
|
|
1177
|
-
{
|
|
1178
|
-
ref,
|
|
1179
|
-
"aria-disabled": disabled,
|
|
1180
|
-
disabled,
|
|
1181
|
-
tag: "button",
|
|
1182
|
-
type: "button",
|
|
1183
|
-
padding: 2,
|
|
1184
|
-
hasRadius: true,
|
|
1185
|
-
background: "neutral0",
|
|
1186
|
-
borderColor: "neutral200",
|
|
1187
|
-
cursor: "pointer",
|
|
1188
|
-
...props,
|
|
1189
|
-
children
|
|
1190
|
-
}
|
|
1191
|
-
);
|
|
1192
|
-
}
|
|
1193
|
-
);
|
|
1194
|
-
const BaseButtonWrapper = styledComponents.styled(Flex)`
|
|
1195
|
-
&[aria-disabled='true'] {
|
|
1196
|
-
pointer-events: none;
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
${focus}
|
|
1200
|
-
`;
|
|
1201
|
-
const BaseLink = forwardRef(
|
|
1202
|
-
({ href, rel = "noreferrer noopener", target = "_self", disabled = false, isExternal = false, ...props }, ref) => {
|
|
1187
|
+
const BaseLinkImpl = forwardRef(
|
|
1188
|
+
({ href, disabled = false, isExternal = false, ...props }, ref) => {
|
|
1203
1189
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1204
|
-
|
|
1190
|
+
BaseLink,
|
|
1205
1191
|
{
|
|
1206
1192
|
tag: "a",
|
|
1207
1193
|
ref,
|
|
1208
|
-
target: isExternal ? "_blank" :
|
|
1209
|
-
rel: isExternal ?
|
|
1210
|
-
href
|
|
1194
|
+
target: isExternal ? "_blank" : void 0,
|
|
1195
|
+
rel: isExternal ? "noreferrer noopener" : void 0,
|
|
1196
|
+
href,
|
|
1197
|
+
tabIndex: disabled ? -1 : void 0,
|
|
1211
1198
|
"aria-disabled": disabled,
|
|
1212
|
-
|
|
1199
|
+
pointerEvents: disabled ? "none" : void 0,
|
|
1200
|
+
cursor: disabled ? void 0 : "pointer",
|
|
1213
1201
|
...props
|
|
1214
1202
|
}
|
|
1215
1203
|
);
|
|
1216
1204
|
}
|
|
1217
1205
|
);
|
|
1206
|
+
const BaseLink = styledComponents.styled(Box)`
|
|
1207
|
+
text-decoration: none;
|
|
1208
|
+
|
|
1209
|
+
&:visited {
|
|
1210
|
+
color: inherit;
|
|
1211
|
+
}
|
|
1212
|
+
`;
|
|
1218
1213
|
const Divider$1 = () => {
|
|
1219
1214
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": true, paddingLeft: 1, paddingRight: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "pi", textColor: "neutral500", children: "/" }) });
|
|
1220
1215
|
};
|
|
@@ -1228,30 +1223,34 @@ const AlignedList = styledComponents.styled(Flex)`
|
|
|
1228
1223
|
margin-left: ${({ theme }) => `calc(-1*${theme.spaces[2]})`};
|
|
1229
1224
|
}
|
|
1230
1225
|
`;
|
|
1231
|
-
const Breadcrumbs = (
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
};
|
|
1241
|
-
Breadcrumbs.displayName = "Breadcrumbs";
|
|
1242
|
-
const Crumb = ({ children, isCurrent = false, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(Box, { paddingLeft: 2, paddingRight: 2, paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1243
|
-
Typography,
|
|
1244
|
-
{
|
|
1245
|
-
variant: "pi",
|
|
1246
|
-
textColor: "neutral800",
|
|
1247
|
-
fontWeight: isCurrent ? "bold" : "regular",
|
|
1248
|
-
"aria-current": isCurrent,
|
|
1249
|
-
...props,
|
|
1250
|
-
children
|
|
1226
|
+
const Breadcrumbs = React__namespace.forwardRef(
|
|
1227
|
+
({ label, children, ...props }, forwardedRef) => {
|
|
1228
|
+
const childrenArray = React__namespace.Children.toArray(children);
|
|
1229
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-label": label, tag: "nav", ...props, ref: forwardedRef, children: /* @__PURE__ */ jsxRuntime.jsx(AlignedList, { tag: "ol", children: React__namespace.Children.map(childrenArray, (child, index) => {
|
|
1230
|
+
const shouldDisplayDivider = childrenArray.length > 1 && index + 1 < childrenArray.length;
|
|
1231
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { inline: true, tag: "li", children: [
|
|
1232
|
+
child,
|
|
1233
|
+
shouldDisplayDivider && /* @__PURE__ */ jsxRuntime.jsx(Divider$1, {})
|
|
1234
|
+
] });
|
|
1235
|
+
}) }) });
|
|
1251
1236
|
}
|
|
1252
|
-
)
|
|
1237
|
+
);
|
|
1238
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
1239
|
+
const Crumb = React__namespace.forwardRef(
|
|
1240
|
+
({ children, isCurrent = false, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(Box, { paddingLeft: 2, paddingRight: 2, paddingTop: 1, paddingBottom: 1, ref: forwardedRef, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1241
|
+
Typography,
|
|
1242
|
+
{
|
|
1243
|
+
variant: "pi",
|
|
1244
|
+
textColor: "neutral800",
|
|
1245
|
+
fontWeight: isCurrent ? "bold" : "regular",
|
|
1246
|
+
"aria-current": isCurrent,
|
|
1247
|
+
...props,
|
|
1248
|
+
children
|
|
1249
|
+
}
|
|
1250
|
+
) })
|
|
1251
|
+
);
|
|
1253
1252
|
Crumb.displayName = "Crumb";
|
|
1254
|
-
const StyledLink = styledComponents.styled(
|
|
1253
|
+
const StyledLink = styledComponents.styled(BaseLinkImpl)`
|
|
1255
1254
|
border-radius: ${({ theme }) => theme.borderRadius};
|
|
1256
1255
|
color: ${({ theme }) => theme.colors.neutral600};
|
|
1257
1256
|
font-size: ${({ theme }) => theme.fontSizes[1]};
|
|
@@ -1265,9 +1264,22 @@ const StyledLink = styledComponents.styled(BaseLink)`
|
|
|
1265
1264
|
color: ${({ theme }) => theme.colors.neutral700};
|
|
1266
1265
|
}
|
|
1267
1266
|
`;
|
|
1268
|
-
const CrumbLink = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(StyledLink, { ...props, children });
|
|
1267
|
+
const CrumbLink = React__namespace.forwardRef(({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledLink, { ref: forwardedRef, ...props, children }));
|
|
1269
1268
|
CrumbLink.displayName = "CrumbLink";
|
|
1270
1269
|
const stripReactIdOfColon = (str) => str.replaceAll(":", "");
|
|
1270
|
+
function setRef(ref, value) {
|
|
1271
|
+
if (typeof ref === "function") {
|
|
1272
|
+
ref(value);
|
|
1273
|
+
} else if (ref !== null && ref !== void 0) {
|
|
1274
|
+
ref.current = value;
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
function composeRefs(...refs) {
|
|
1278
|
+
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
1279
|
+
}
|
|
1280
|
+
function useComposedRefs(...refs) {
|
|
1281
|
+
return React__namespace.useCallback(composeRefs(...refs), refs);
|
|
1282
|
+
}
|
|
1271
1283
|
const isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent);
|
|
1272
1284
|
const useIsomorphicLayoutEffect = isSSR() ? React.useEffect : React.useLayoutEffect;
|
|
1273
1285
|
const useReactId = React__namespace["useId".toString()] || (() => void 0);
|
|
@@ -1317,7 +1329,7 @@ const DANGER = "danger";
|
|
|
1317
1329
|
const SUCCESS = "success";
|
|
1318
1330
|
const GHOST = "ghost";
|
|
1319
1331
|
const LIGHT_VARIANTS = [SUCCESS_LIGHT, DANGER_LIGHT];
|
|
1320
|
-
const VARIANTS
|
|
1332
|
+
const VARIANTS = [DEFAULT, TERTIARY, SECONDARY, DANGER, SUCCESS, GHOST, ...LIGHT_VARIANTS];
|
|
1321
1333
|
const BUTTON_SIZES = ["S", "M", "L"];
|
|
1322
1334
|
const getVariantColorName = (variant2) => {
|
|
1323
1335
|
if (variant2 === SUCCESS_LIGHT || variant2 === DANGER_LIGHT) {
|
|
@@ -1326,7 +1338,7 @@ const getVariantColorName = (variant2) => {
|
|
|
1326
1338
|
if (variant2 === TERTIARY) {
|
|
1327
1339
|
return "neutral";
|
|
1328
1340
|
}
|
|
1329
|
-
if (variant2 === DEFAULT || variant2 === SECONDARY || VARIANTS
|
|
1341
|
+
if (variant2 === DEFAULT || variant2 === SECONDARY || VARIANTS.every((vari) => vari !== variant2)) {
|
|
1330
1342
|
return "primary";
|
|
1331
1343
|
}
|
|
1332
1344
|
return `${variant2}`;
|
|
@@ -1336,6 +1348,7 @@ const getDisabledStyle = ({ theme }) => {
|
|
|
1336
1348
|
border: 1px solid ${theme.colors.neutral200};
|
|
1337
1349
|
background: ${theme.colors.neutral150};
|
|
1338
1350
|
color: ${theme.colors.neutral600};
|
|
1351
|
+
cursor: default;
|
|
1339
1352
|
`;
|
|
1340
1353
|
};
|
|
1341
1354
|
const getHoverStyle = ({ theme, $variant }) => {
|
|
@@ -1422,6 +1435,8 @@ const getVariantStyle = ({ theme, $variant }) => {
|
|
|
1422
1435
|
}
|
|
1423
1436
|
default: {
|
|
1424
1437
|
return styledComponents.css`
|
|
1438
|
+
border: 1px solid ${theme.colors.buttonPrimary600};
|
|
1439
|
+
background: ${theme.colors.buttonPrimary600};
|
|
1425
1440
|
color: ${theme.colors.buttonNeutral0};
|
|
1426
1441
|
`;
|
|
1427
1442
|
}
|
|
@@ -1454,21 +1469,22 @@ const Button = forwardRef(
|
|
|
1454
1469
|
disabled: isDisabled,
|
|
1455
1470
|
$size: size,
|
|
1456
1471
|
$variant: variant2,
|
|
1472
|
+
tag: "button",
|
|
1457
1473
|
onClick: handleClick,
|
|
1458
|
-
|
|
1459
|
-
background: "buttonPrimary600",
|
|
1460
|
-
borderColor: "buttonPrimary600",
|
|
1474
|
+
hasRadius: true,
|
|
1461
1475
|
gap: 2,
|
|
1462
|
-
inline:
|
|
1463
|
-
|
|
1476
|
+
inline: true,
|
|
1477
|
+
alignItems: "center",
|
|
1478
|
+
justifyContent: "center",
|
|
1479
|
+
width: fullWidth ? "100%" : void 0,
|
|
1464
1480
|
paddingLeft: 4,
|
|
1465
1481
|
paddingRight: 4,
|
|
1466
|
-
|
|
1482
|
+
cursor: "pointer",
|
|
1467
1483
|
...props,
|
|
1468
1484
|
children: [
|
|
1469
|
-
(startIcon || loading) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1485
|
+
(startIcon || loading) && /* @__PURE__ */ jsxRuntime.jsx(Flex, { tag: "span", "aria-hidden": true, flex: "1 0 1.2rem", children: loading ? /* @__PURE__ */ jsxRuntime.jsx(LoaderAnimated, {}) : startIcon }),
|
|
1470
1486
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: size === "S" ? "pi" : void 0, fontWeight: "bold", children }),
|
|
1471
|
-
endIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { "aria-hidden": true, children: endIcon })
|
|
1487
|
+
endIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { tag: "span", "aria-hidden": true, flex: "1 0 1.2rem", children: endIcon })
|
|
1472
1488
|
]
|
|
1473
1489
|
}
|
|
1474
1490
|
);
|
|
@@ -1486,20 +1502,10 @@ const LoaderAnimated = styledComponents.styled(icons.Loader)`
|
|
|
1486
1502
|
animation: ${rotation$2} 2s infinite linear;
|
|
1487
1503
|
will-change: transform;
|
|
1488
1504
|
`;
|
|
1489
|
-
const ButtonWrapper = styledComponents.styled(
|
|
1505
|
+
const ButtonWrapper = styledComponents.styled(Flex)`
|
|
1490
1506
|
height: ${({ theme, $size }) => theme.sizes.button[$size]};
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
height: 1.2rem;
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
&[aria-disabled='true'] {
|
|
1497
|
-
${getDisabledStyle}
|
|
1498
|
-
|
|
1499
|
-
&:active {
|
|
1500
|
-
${getDisabledStyle}
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1507
|
+
text-decoration: none;
|
|
1508
|
+
${getVariantStyle}
|
|
1503
1509
|
|
|
1504
1510
|
&:hover {
|
|
1505
1511
|
${getHoverStyle}
|
|
@@ -1509,7 +1515,9 @@ const ButtonWrapper = styledComponents.styled(BaseButton)`
|
|
|
1509
1515
|
${getActiveStyle}
|
|
1510
1516
|
}
|
|
1511
1517
|
|
|
1512
|
-
|
|
1518
|
+
&[aria-disabled='true'] {
|
|
1519
|
+
${getDisabledStyle}
|
|
1520
|
+
}
|
|
1513
1521
|
|
|
1514
1522
|
@media (prefers-reduced-motion: no-preference) {
|
|
1515
1523
|
transition:
|
|
@@ -1520,7 +1528,7 @@ const ButtonWrapper = styledComponents.styled(BaseButton)`
|
|
|
1520
1528
|
`;
|
|
1521
1529
|
const Link = forwardRef(
|
|
1522
1530
|
({ children, href, disabled = false, startIcon, endIcon, isExternal = false, ...props }, ref) => {
|
|
1523
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(LinkWrapper$
|
|
1531
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(LinkWrapper$1, { ref, href, disabled, isExternal, ...props, children: [
|
|
1524
1532
|
startIcon,
|
|
1525
1533
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { textColor: disabled ? "neutral600" : "primary600", children }),
|
|
1526
1534
|
endIcon,
|
|
@@ -1528,7 +1536,7 @@ const Link = forwardRef(
|
|
|
1528
1536
|
] });
|
|
1529
1537
|
}
|
|
1530
1538
|
);
|
|
1531
|
-
const LinkWrapper$
|
|
1539
|
+
const LinkWrapper$1 = styledComponents.styled(BaseLinkImpl)`
|
|
1532
1540
|
display: inline-flex;
|
|
1533
1541
|
align-items: center;
|
|
1534
1542
|
text-decoration: none;
|
|
@@ -1544,7 +1552,9 @@ const LinkWrapper$2 = styledComponents.styled(BaseLink)`
|
|
|
1544
1552
|
}
|
|
1545
1553
|
|
|
1546
1554
|
&:hover {
|
|
1547
|
-
|
|
1555
|
+
span {
|
|
1556
|
+
color: ${({ theme }) => theme.colors.primary500};
|
|
1557
|
+
}
|
|
1548
1558
|
}
|
|
1549
1559
|
|
|
1550
1560
|
&:active {
|
|
@@ -1723,37 +1733,41 @@ const Menu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
1723
1733
|
SubTrigger,
|
|
1724
1734
|
Trigger: Trigger$6
|
|
1725
1735
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1726
|
-
const SimpleMenu = (
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
}
|
|
1736
|
+
const SimpleMenu = React__namespace.forwardRef(
|
|
1737
|
+
({ children, onOpen, onClose, popoverPlacement, onReachEnd, ...props }, forwardedRef) => {
|
|
1738
|
+
const triggerRef = React__namespace.useRef(null);
|
|
1739
|
+
const composedRef = useComposedRefs(forwardedRef, triggerRef);
|
|
1740
|
+
const contentRef = React__namespace.useRef(null);
|
|
1741
|
+
const [internalIsOpen, setInternalIsOpen] = React__namespace.useState(false);
|
|
1742
|
+
const handleReachEnd = (entry) => {
|
|
1743
|
+
if (onReachEnd) {
|
|
1744
|
+
onReachEnd(entry);
|
|
1745
|
+
}
|
|
1746
|
+
};
|
|
1747
|
+
const handleOpenChange = (isOpen) => {
|
|
1748
|
+
if (isOpen && typeof onOpen === "function") {
|
|
1749
|
+
onOpen();
|
|
1750
|
+
} else if (!isOpen && typeof onClose === "function") {
|
|
1751
|
+
onClose();
|
|
1752
|
+
}
|
|
1753
|
+
setInternalIsOpen(isOpen);
|
|
1754
|
+
};
|
|
1755
|
+
const generatedId = useId();
|
|
1756
|
+
const intersectionId = `intersection-${stripReactIdOfColon(generatedId)}`;
|
|
1757
|
+
useIntersection(contentRef, handleReachEnd, {
|
|
1758
|
+
selectorToWatch: `#${intersectionId}`,
|
|
1759
|
+
/**
|
|
1760
|
+
* We need to know when the select is open because only then will viewportRef
|
|
1761
|
+
* not be null. Because it uses a portal that (sensibly) is not mounted 24/7.
|
|
1762
|
+
*/
|
|
1763
|
+
skipWhen: !internalIsOpen
|
|
1764
|
+
});
|
|
1765
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Root$7, { onOpenChange: handleOpenChange, children: [
|
|
1766
|
+
/* @__PURE__ */ jsxRuntime.jsx(Trigger$6, { ref: composedRef, ...props, children: props.label }),
|
|
1767
|
+
/* @__PURE__ */ jsxRuntime.jsx(Content$6, { ref: contentRef, intersectionId, popoverPlacement, children })
|
|
1768
|
+
] });
|
|
1769
|
+
}
|
|
1770
|
+
);
|
|
1757
1771
|
const MenuItem = Item$3;
|
|
1758
1772
|
const StyledButton = styledComponents.styled(SimpleMenu)`
|
|
1759
1773
|
padding: ${({ theme }) => `${theme.spaces[1]} ${theme.spaces[2]}`};
|
|
@@ -1764,16 +1778,19 @@ const StyledButton = styledComponents.styled(SimpleMenu)`
|
|
|
1764
1778
|
background-color: ${({ theme }) => theme.colors.neutral200};
|
|
1765
1779
|
}
|
|
1766
1780
|
`;
|
|
1767
|
-
const CrumbSimpleMenu =
|
|
1781
|
+
const CrumbSimpleMenu = React__namespace.forwardRef(
|
|
1782
|
+
({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledButton, { ref: forwardedRef, endIcon: null, size: "S", ...props, children })
|
|
1783
|
+
);
|
|
1768
1784
|
CrumbSimpleMenu.displayName = "CrumbSimpleMenu";
|
|
1769
1785
|
const CardContext = React__namespace.createContext({ id: "" });
|
|
1770
1786
|
const useCard = () => React__namespace.useContext(CardContext);
|
|
1771
|
-
const Card = ({ id, ...props }) => {
|
|
1787
|
+
const Card = React__namespace.forwardRef(({ id, ...props }, forwardedRef) => {
|
|
1772
1788
|
const generatedId = useId(id);
|
|
1773
1789
|
const context = React__namespace.useMemo(() => ({ id: generatedId }), [generatedId]);
|
|
1774
1790
|
return /* @__PURE__ */ jsxRuntime.jsx(CardContext.Provider, { value: context, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1775
1791
|
Box,
|
|
1776
1792
|
{
|
|
1793
|
+
ref: forwardedRef,
|
|
1777
1794
|
id,
|
|
1778
1795
|
tabIndex: 0,
|
|
1779
1796
|
hasRadius: true,
|
|
@@ -1787,10 +1804,10 @@ const Card = ({ id, ...props }) => {
|
|
|
1787
1804
|
...props
|
|
1788
1805
|
}
|
|
1789
1806
|
) });
|
|
1790
|
-
};
|
|
1791
|
-
const CardActionImpl = ({ position, ...restProps }) => {
|
|
1792
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CardAction, { $position: position, ...restProps, direction: "row", gap: 2 });
|
|
1793
|
-
};
|
|
1807
|
+
});
|
|
1808
|
+
const CardActionImpl = React__namespace.forwardRef(({ position, ...restProps }, forwardedRef) => {
|
|
1809
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CardAction, { ref: forwardedRef, $position: position, ...restProps, direction: "row", gap: 2 });
|
|
1810
|
+
});
|
|
1794
1811
|
const CardAction = styledComponents.styled(Flex)`
|
|
1795
1812
|
position: absolute;
|
|
1796
1813
|
top: ${({ theme }) => theme.spaces[3]};
|
|
@@ -1841,19 +1858,6 @@ const CardBadge = (props) => /* @__PURE__ */ jsxRuntime.jsx(CardBadgeWrapper, {
|
|
|
1841
1858
|
const CardBody = (props) => {
|
|
1842
1859
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { paddingLeft: 3, paddingRight: 3, paddingTop: 2, paddingBottom: 2, children: /* @__PURE__ */ jsxRuntime.jsx(Flex, { ...props, alignItems: "flex-start" }) });
|
|
1843
1860
|
};
|
|
1844
|
-
function setRef(ref, value) {
|
|
1845
|
-
if (typeof ref === "function") {
|
|
1846
|
-
ref(value);
|
|
1847
|
-
} else if (ref !== null && ref !== void 0) {
|
|
1848
|
-
ref.current = value;
|
|
1849
|
-
}
|
|
1850
|
-
}
|
|
1851
|
-
function composeRefs(...refs) {
|
|
1852
|
-
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
1853
|
-
}
|
|
1854
|
-
function useComposedRefs(...refs) {
|
|
1855
|
-
return React__namespace.useCallback(composeRefs(...refs), refs);
|
|
1856
|
-
}
|
|
1857
1861
|
const CheckIcon = ({ fill, ...props }) => {
|
|
1858
1862
|
const { colors } = styledComponents.useTheme();
|
|
1859
1863
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1936,10 +1940,10 @@ const CheckboxImpl = React__namespace.forwardRef(({ children, ...restProps }, fo
|
|
|
1936
1940
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { tag: "label", textColor: "neutral800", htmlFor: labelId, children })
|
|
1937
1941
|
] });
|
|
1938
1942
|
});
|
|
1939
|
-
const CardCheckbox = (props) => {
|
|
1943
|
+
const CardCheckbox = React__namespace.forwardRef((props, forwardedRef) => {
|
|
1940
1944
|
const { id } = useCard();
|
|
1941
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CardActionImpl, { position: "start", children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxImpl, { "aria-labelledby": `${id}-title`, ...props }) });
|
|
1942
|
-
};
|
|
1945
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CardActionImpl, { position: "start", children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxImpl, { "aria-labelledby": `${id}-title`, ...props, ref: forwardedRef }) });
|
|
1946
|
+
});
|
|
1943
1947
|
const BreakBox = styledComponents.styled(Box)`
|
|
1944
1948
|
word-break: break-all;
|
|
1945
1949
|
`;
|
|
@@ -2971,7 +2975,7 @@ lodash.exports;
|
|
|
2971
2975
|
}
|
|
2972
2976
|
var runInContext = function runInContext2(context) {
|
|
2973
2977
|
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
|
2974
|
-
var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function,
|
|
2978
|
+
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;
|
|
2975
2979
|
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
|
2976
2980
|
var coreJsData = context["__core-js_shared__"];
|
|
2977
2981
|
var funcToString = funcProto.toString;
|
|
@@ -2997,7 +3001,7 @@ lodash.exports;
|
|
|
2997
3001
|
}
|
|
2998
3002
|
}();
|
|
2999
3003
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
3000
|
-
var nativeCeil =
|
|
3004
|
+
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;
|
|
3001
3005
|
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");
|
|
3002
3006
|
var metaMap = WeakMap && new WeakMap();
|
|
3003
3007
|
var realNames = {};
|
|
@@ -4743,7 +4747,7 @@ lodash.exports;
|
|
|
4743
4747
|
return setWrapToString(result2, func, bitmask);
|
|
4744
4748
|
}
|
|
4745
4749
|
function createRound(methodName) {
|
|
4746
|
-
var func =
|
|
4750
|
+
var func = Math2[methodName];
|
|
4747
4751
|
return function(number2, precision) {
|
|
4748
4752
|
number2 = toNumber(number2);
|
|
4749
4753
|
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
|
@@ -7889,6 +7893,9 @@ const Input$2 = React__namespace.forwardRef(
|
|
|
7889
7893
|
justifyContent: "space-between",
|
|
7890
7894
|
$hasError: hasError || hasErrorProp,
|
|
7891
7895
|
$disabled: disabled,
|
|
7896
|
+
$size: size,
|
|
7897
|
+
$hasLeftAction: Boolean(startAction),
|
|
7898
|
+
$hasRightAction: Boolean(endAction),
|
|
7892
7899
|
className,
|
|
7893
7900
|
children: [
|
|
7894
7901
|
startAction,
|
|
@@ -7898,8 +7905,6 @@ const Input$2 = React__namespace.forwardRef(
|
|
|
7898
7905
|
id,
|
|
7899
7906
|
name,
|
|
7900
7907
|
ref,
|
|
7901
|
-
$hasLeftAction: Boolean(startAction),
|
|
7902
|
-
$hasRightAction: Boolean(endAction),
|
|
7903
7908
|
$size: size,
|
|
7904
7909
|
"aria-describedby": ariaDescription,
|
|
7905
7910
|
"aria-invalid": hasError || hasErrorProp,
|
|
@@ -7934,14 +7939,10 @@ const InputElement = styledComponents.styled.input`
|
|
|
7934
7939
|
switch (props.$size) {
|
|
7935
7940
|
case "S":
|
|
7936
7941
|
return styledComponents.css`
|
|
7937
|
-
padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
|
|
7938
|
-
padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
|
|
7939
7942
|
padding-block: ${props.theme.spaces[1]};
|
|
7940
7943
|
`;
|
|
7941
7944
|
default:
|
|
7942
7945
|
return styledComponents.css`
|
|
7943
|
-
padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
|
|
7944
|
-
padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
|
|
7945
7946
|
padding-block: ${props.theme.spaces[2]};
|
|
7946
7947
|
`;
|
|
7947
7948
|
}
|
|
@@ -7968,6 +7969,21 @@ const InputWrapper = styledComponents.styled(Flex)`
|
|
|
7968
7969
|
background: ${({ theme }) => theme.colors.neutral0};
|
|
7969
7970
|
${inputFocusStyle()}
|
|
7970
7971
|
|
|
7972
|
+
${(props) => {
|
|
7973
|
+
switch (props.$size) {
|
|
7974
|
+
case "S":
|
|
7975
|
+
return styledComponents.css`
|
|
7976
|
+
padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
|
|
7977
|
+
padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
|
|
7978
|
+
`;
|
|
7979
|
+
default:
|
|
7980
|
+
return styledComponents.css`
|
|
7981
|
+
padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
|
|
7982
|
+
padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
|
|
7983
|
+
`;
|
|
7984
|
+
}
|
|
7985
|
+
}}
|
|
7986
|
+
|
|
7971
7987
|
${({ theme, $disabled }) => $disabled ? styledComponents.css`
|
|
7972
7988
|
color: ${theme.colors.neutral600};
|
|
7973
7989
|
background: ${theme.colors.neutral150};
|
|
@@ -8498,19 +8514,7 @@ const ContentImpl$1 = styledComponents.styled(AlertDialog__namespace.Content)`
|
|
|
8498
8514
|
}
|
|
8499
8515
|
`;
|
|
8500
8516
|
const Header$1 = React__namespace.forwardRef(({ children, ...restProps }, forwardedRef) => {
|
|
8501
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AlertDialog__namespace.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8502
|
-
Title$1,
|
|
8503
|
-
{
|
|
8504
|
-
tag: "h2",
|
|
8505
|
-
ref: forwardedRef,
|
|
8506
|
-
padding: 6,
|
|
8507
|
-
justifyContent: "center",
|
|
8508
|
-
variant: "h2",
|
|
8509
|
-
fontWeight: "bold",
|
|
8510
|
-
...restProps,
|
|
8511
|
-
children
|
|
8512
|
-
}
|
|
8513
|
-
) });
|
|
8517
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AlertDialog__namespace.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Title$1, { tag: "h2", variant: "beta", ref: forwardedRef, padding: 6, fontWeight: "bold", ...restProps, children }) });
|
|
8514
8518
|
});
|
|
8515
8519
|
const Title$1 = styledComponents.styled(Typography)`
|
|
8516
8520
|
display: flex;
|
|
@@ -8684,8 +8688,7 @@ ${styledComponents.css`
|
|
|
8684
8688
|
img,
|
|
8685
8689
|
picture,
|
|
8686
8690
|
video,
|
|
8687
|
-
canvas
|
|
8688
|
-
svg {
|
|
8691
|
+
canvas {
|
|
8689
8692
|
display: block;
|
|
8690
8693
|
max-width: 100%;
|
|
8691
8694
|
}
|
|
@@ -8921,8 +8924,7 @@ const SelectContent = styledComponents.styled(uiPrimitives.Select.Content)`
|
|
|
8921
8924
|
border: 1px solid ${({ theme }) => theme.colors.neutral150};
|
|
8922
8925
|
border-radius: ${({ theme }) => theme.borderRadius};
|
|
8923
8926
|
min-width: var(--radix-select-trigger-width);
|
|
8924
|
-
|
|
8925
|
-
max-height: 15rem;
|
|
8927
|
+
max-height: 15.6rem;
|
|
8926
8928
|
z-index: ${({ theme }) => theme.zIndices.popover};
|
|
8927
8929
|
|
|
8928
8930
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -9099,7 +9101,7 @@ const SingleSelectOption = React__namespace.forwardRef(
|
|
|
9099
9101
|
({ value, startIcon, children, ...restProps }, ref) => {
|
|
9100
9102
|
return /* @__PURE__ */ jsxRuntime.jsxs(Item$2, { ref, value: value.toString(), ...restProps, children: [
|
|
9101
9103
|
startIcon && /* @__PURE__ */ jsxRuntime.jsx(Box, { tag: "span", "aria-hidden": true, children: startIcon }),
|
|
9102
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { children: /* @__PURE__ */ jsxRuntime.jsx(ItemText, { children }) })
|
|
9104
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { lineHeight: "20px", children: /* @__PURE__ */ jsxRuntime.jsx(ItemText, { children }) })
|
|
9103
9105
|
] });
|
|
9104
9106
|
}
|
|
9105
9107
|
);
|
|
@@ -10095,30 +10097,27 @@ const EmptyStateIconWrapper = styledComponents.styled(Box)`
|
|
|
10095
10097
|
height: 8.8rem;
|
|
10096
10098
|
}
|
|
10097
10099
|
`;
|
|
10098
|
-
const EmptyStateLayout = (
|
|
10099
|
-
icon,
|
|
10100
|
-
|
|
10101
|
-
|
|
10102
|
-
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
|
|
10109
|
-
|
|
10110
|
-
|
|
10111
|
-
|
|
10112
|
-
|
|
10113
|
-
|
|
10114
|
-
|
|
10115
|
-
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
}
|
|
10120
|
-
);
|
|
10121
|
-
};
|
|
10100
|
+
const EmptyStateLayout = React__namespace.forwardRef(
|
|
10101
|
+
({ icon, content, action, hasRadius = true, shadow = "tableShadow" }, forwardedRef) => {
|
|
10102
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10103
|
+
Flex,
|
|
10104
|
+
{
|
|
10105
|
+
ref: forwardedRef,
|
|
10106
|
+
alignItems: "center",
|
|
10107
|
+
direction: "column",
|
|
10108
|
+
padding: 11,
|
|
10109
|
+
background: "neutral0",
|
|
10110
|
+
hasRadius,
|
|
10111
|
+
shadow,
|
|
10112
|
+
children: [
|
|
10113
|
+
icon ? /* @__PURE__ */ jsxRuntime.jsx(EmptyStateIconWrapper, { paddingBottom: 6, "aria-hidden": true, children: icon }) : null,
|
|
10114
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "delta", tag: "p", textAlign: "center", textColor: "neutral600", children: content }) }),
|
|
10115
|
+
action
|
|
10116
|
+
]
|
|
10117
|
+
}
|
|
10118
|
+
);
|
|
10119
|
+
}
|
|
10120
|
+
);
|
|
10122
10121
|
const getFocusableNodes = (node, includeNegativeTabIndex) => {
|
|
10123
10122
|
const nodes = [
|
|
10124
10123
|
...node.querySelectorAll(
|
|
@@ -10204,7 +10203,7 @@ const Wrapper$1 = styledComponents.styled(Box)`
|
|
|
10204
10203
|
const ItemImpl = forwardRef(
|
|
10205
10204
|
({ col, s, xs, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(Item$1, { ref: forwardedRef, $col: col, $s: s, $xs: xs, ...props })
|
|
10206
10205
|
);
|
|
10207
|
-
const Item$1 = styledComponents.styled(
|
|
10206
|
+
const Item$1 = styledComponents.styled(Flex)`
|
|
10208
10207
|
grid-column: span ${({ $col }) => $col ?? 1};
|
|
10209
10208
|
max-width: 100%;
|
|
10210
10209
|
|
|
@@ -10221,10 +10220,6 @@ const Grid = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
10221
10220
|
Item: ItemImpl,
|
|
10222
10221
|
Root: Root$3
|
|
10223
10222
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
10224
|
-
const VARIANT_DEFAULT = "tertiary";
|
|
10225
|
-
const VARIANT_SECONDARY = "secondary";
|
|
10226
|
-
const SIZES = ["S", "M", "L"];
|
|
10227
|
-
const VARIANTS = [VARIANT_DEFAULT, VARIANT_SECONDARY];
|
|
10228
10223
|
const IconButton = forwardRef(
|
|
10229
10224
|
({
|
|
10230
10225
|
label,
|
|
@@ -10232,8 +10227,8 @@ const IconButton = forwardRef(
|
|
|
10232
10227
|
children,
|
|
10233
10228
|
disabled = false,
|
|
10234
10229
|
onClick,
|
|
10235
|
-
size =
|
|
10236
|
-
variant: variant2 =
|
|
10230
|
+
size = "M",
|
|
10231
|
+
variant: variant2 = "tertiary",
|
|
10237
10232
|
withTooltip = true,
|
|
10238
10233
|
...restProps
|
|
10239
10234
|
}, ref) => {
|
|
@@ -10247,7 +10242,11 @@ const IconButton = forwardRef(
|
|
|
10247
10242
|
{
|
|
10248
10243
|
"aria-disabled": disabled,
|
|
10249
10244
|
background: disabled ? "neutral150" : background,
|
|
10245
|
+
tag: "button",
|
|
10246
|
+
display: "inline-flex",
|
|
10250
10247
|
justifyContent: "center",
|
|
10248
|
+
hasRadius: true,
|
|
10249
|
+
cursor: "pointer",
|
|
10251
10250
|
...restProps,
|
|
10252
10251
|
ref,
|
|
10253
10252
|
$size: size,
|
|
@@ -10259,40 +10258,53 @@ const IconButton = forwardRef(
|
|
|
10259
10258
|
return withTooltip ? /* @__PURE__ */ jsxRuntime.jsx(TooltipImpl, { label, children: component }) : component;
|
|
10260
10259
|
}
|
|
10261
10260
|
);
|
|
10262
|
-
const IconButtonWrapper = styledComponents.styled(
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10261
|
+
const IconButtonWrapper = styledComponents.styled(Flex)`
|
|
10262
|
+
text-decoration: none;
|
|
10263
|
+
|
|
10264
|
+
${(props) => {
|
|
10265
|
+
switch (props.$size) {
|
|
10266
|
+
case "S": {
|
|
10267
|
+
return styledComponents.css`
|
|
10268
|
+
padding-block: 0.6rem;
|
|
10269
|
+
padding-inline: 0.6rem;
|
|
10270
|
+
`;
|
|
10271
|
+
}
|
|
10272
|
+
case "M": {
|
|
10273
|
+
return styledComponents.css`
|
|
10274
|
+
padding-block: 0.9rem;
|
|
10275
|
+
padding-inline: 0.9rem;
|
|
10276
|
+
`;
|
|
10277
|
+
}
|
|
10278
|
+
case "L": {
|
|
10279
|
+
return styledComponents.css`
|
|
10280
|
+
padding-block: 1.1rem;
|
|
10281
|
+
padding-inline: 1.1rem;
|
|
10282
|
+
`;
|
|
10283
|
+
}
|
|
10280
10284
|
}
|
|
10281
|
-
|
|
10282
|
-
}
|
|
10285
|
+
}}
|
|
10286
|
+
${getVariantStyle}
|
|
10287
|
+
${(props) => props.$variant === "tertiary" ? styledComponents.css`
|
|
10288
|
+
color: ${props.theme.colors.neutral600};
|
|
10289
|
+
` : ""}
|
|
10283
10290
|
|
|
10284
|
-
&:hover
|
|
10285
|
-
|
|
10286
|
-
color: ${({ theme, $variant }) => {
|
|
10287
|
-
if ($variant === VARIANT_SECONDARY) {
|
|
10288
|
-
return theme.colors.primary600;
|
|
10291
|
+
&:hover {
|
|
10292
|
+
${getHoverStyle}
|
|
10289
10293
|
}
|
|
10290
|
-
|
|
10291
|
-
|
|
10294
|
+
|
|
10295
|
+
&:active {
|
|
10296
|
+
${getActiveStyle}
|
|
10292
10297
|
}
|
|
10293
10298
|
|
|
10294
10299
|
&[aria-disabled='true'] {
|
|
10295
|
-
|
|
10300
|
+
${getDisabledStyle}
|
|
10301
|
+
}
|
|
10302
|
+
|
|
10303
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
10304
|
+
transition:
|
|
10305
|
+
${(props) => props.theme.transitions.backgroundColor},
|
|
10306
|
+
${(props) => props.theme.transitions.color},
|
|
10307
|
+
border-color ${(props) => props.theme.motion.timings["200"]} ${(props) => props.theme.motion.easings.easeOutQuad};
|
|
10296
10308
|
}
|
|
10297
10309
|
`;
|
|
10298
10310
|
const IconButtonGroup = styledComponents.styled(Flex)`
|
|
@@ -10306,25 +10318,10 @@ const IconButtonGroup = styledComponents.styled(Flex)`
|
|
|
10306
10318
|
|
|
10307
10319
|
& ${IconButtonWrapper} {
|
|
10308
10320
|
border-radius: 0;
|
|
10309
|
-
color: ${({ theme }) => theme.colors.neutral700};
|
|
10310
10321
|
|
|
10311
10322
|
& + ${IconButtonWrapper} {
|
|
10312
10323
|
border-left: none;
|
|
10313
10324
|
}
|
|
10314
|
-
|
|
10315
|
-
&:hover {
|
|
10316
|
-
background-color: ${({ theme }) => theme.colors.neutral100};
|
|
10317
|
-
color: ${({ theme }) => theme.colors.neutral800};
|
|
10318
|
-
}
|
|
10319
|
-
|
|
10320
|
-
&:active {
|
|
10321
|
-
background-color: ${({ theme }) => theme.colors.neutral150};
|
|
10322
|
-
color: ${({ theme }) => theme.colors.neutral900};
|
|
10323
|
-
}
|
|
10324
|
-
|
|
10325
|
-
&[aria-disabled='true'] {
|
|
10326
|
-
color: ${({ theme }) => theme.colors.neutral600};
|
|
10327
|
-
}
|
|
10328
10325
|
}
|
|
10329
10326
|
`;
|
|
10330
10327
|
const addMarks = state.StateEffect.define();
|
|
@@ -10504,62 +10501,19 @@ const JSONInputContainer = styledComponents.styled(Flex)`
|
|
|
10504
10501
|
}
|
|
10505
10502
|
`;
|
|
10506
10503
|
const LinkButton = forwardRef(
|
|
10507
|
-
({
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10511
|
-
LinkWrapper$1,
|
|
10504
|
+
({ disabled, ...restProps }, ref) => {
|
|
10505
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10506
|
+
Button,
|
|
10512
10507
|
{
|
|
10513
10508
|
ref,
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
hasRadius: true,
|
|
10519
|
-
display: "inline-flex",
|
|
10520
|
-
paddingBottom: paddingX,
|
|
10521
|
-
paddingLeft: paddingY,
|
|
10522
|
-
paddingRight: paddingY,
|
|
10523
|
-
paddingTop: paddingX,
|
|
10524
|
-
pointerEvents: disabled ? "none" : void 0,
|
|
10525
|
-
...props,
|
|
10526
|
-
children: [
|
|
10527
|
-
startIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { "aria-hidden": true, children: startIcon }),
|
|
10528
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: size === "S" ? "pi" : void 0, fontWeight: "bold", children }),
|
|
10529
|
-
endIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { "aria-hidden": true, children: endIcon })
|
|
10530
|
-
]
|
|
10509
|
+
tag: BaseLinkImpl,
|
|
10510
|
+
tabIndex: disabled ? -1 : void 0,
|
|
10511
|
+
disabled,
|
|
10512
|
+
...restProps
|
|
10531
10513
|
}
|
|
10532
10514
|
);
|
|
10533
10515
|
}
|
|
10534
10516
|
);
|
|
10535
|
-
const LinkWrapper$1 = styledComponents.styled(BaseLink)`
|
|
10536
|
-
gap: ${({ theme }) => theme.spaces[2]};
|
|
10537
|
-
|
|
10538
|
-
${focus}
|
|
10539
|
-
|
|
10540
|
-
&[aria-disabled='true'] {
|
|
10541
|
-
pointer-events: none;
|
|
10542
|
-
}
|
|
10543
|
-
|
|
10544
|
-
text-decoration: none;
|
|
10545
|
-
|
|
10546
|
-
&[aria-disabled='true'] {
|
|
10547
|
-
${getDisabledStyle}
|
|
10548
|
-
&:active {
|
|
10549
|
-
${getDisabledStyle}
|
|
10550
|
-
}
|
|
10551
|
-
}
|
|
10552
|
-
|
|
10553
|
-
&:hover {
|
|
10554
|
-
${getHoverStyle}
|
|
10555
|
-
}
|
|
10556
|
-
|
|
10557
|
-
&:active {
|
|
10558
|
-
${getActiveStyle}
|
|
10559
|
-
}
|
|
10560
|
-
|
|
10561
|
-
${getVariantStyle}
|
|
10562
|
-
`;
|
|
10563
10517
|
const MainWrapper = styledComponents.styled(Box)`
|
|
10564
10518
|
// To prevent global outline on focus visible to force an outline when Main is focused
|
|
10565
10519
|
&:focus-visible {
|
|
@@ -10595,6 +10549,7 @@ const SkipToContent = ({ children }) => {
|
|
|
10595
10549
|
}
|
|
10596
10550
|
);
|
|
10597
10551
|
};
|
|
10552
|
+
const setOpacity = (hex, alpha) => `${hex}${Math.floor(alpha * 255).toString(16).padStart(2, "0")}`;
|
|
10598
10553
|
const ScrollAreaImpl$1 = React__namespace.forwardRef(
|
|
10599
10554
|
({ children, viewportRef, ...restProps }, forwardedRef) => {
|
|
10600
10555
|
return /* @__PURE__ */ jsxRuntime.jsxs(ScrollAreaRoot, { ref: forwardedRef, ...restProps, children: [
|
|
@@ -10654,17 +10609,13 @@ const Trigger$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
10654
10609
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Trigger, { ...props, asChild: true, ref: forwardedRef });
|
|
10655
10610
|
});
|
|
10656
10611
|
const Content$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
10657
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
10658
|
-
/* @__PURE__ */ jsxRuntime.jsx(Overlay, {}),
|
|
10659
|
-
/* @__PURE__ */ jsxRuntime.jsx(ContentImpl, { ref: forwardedRef, ...props })
|
|
10660
|
-
] });
|
|
10612
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(Overlay, { children: /* @__PURE__ */ jsxRuntime.jsx(ContentImpl, { ref: forwardedRef, ...props }) }) });
|
|
10661
10613
|
});
|
|
10662
10614
|
const Overlay = styledComponents.styled(Dialog__namespace.Overlay)`
|
|
10663
|
-
background
|
|
10615
|
+
background: ${(props) => setOpacity(props.theme.colors.neutral800, 0.2)};
|
|
10664
10616
|
position: fixed;
|
|
10665
10617
|
inset: 0;
|
|
10666
10618
|
z-index: ${(props) => props.theme.zIndices.overlay};
|
|
10667
|
-
opacity: 0.2;
|
|
10668
10619
|
|
|
10669
10620
|
@media (prefers-reduced-motion: no-preference) {
|
|
10670
10621
|
animation: ${ANIMATIONS.overlayFadeIn} ${(props) => props.theme.motion.timings["200"]}
|
|
@@ -10963,7 +10914,7 @@ const NextLink = forwardRef(
|
|
|
10963
10914
|
] });
|
|
10964
10915
|
}
|
|
10965
10916
|
);
|
|
10966
|
-
const LinkWrapper = styledComponents.styled(
|
|
10917
|
+
const LinkWrapper = styledComponents.styled(BaseLinkImpl)`
|
|
10967
10918
|
padding: ${({ theme }) => theme.spaces[3]};
|
|
10968
10919
|
border-radius: ${({ theme }) => theme.borderRadius};
|
|
10969
10920
|
box-shadow: ${({ $active, theme }) => $active ? theme.shadows.filterShadow : void 0};
|
|
@@ -11053,19 +11004,22 @@ const PopoverContent = styledComponents.styled(Popover__namespace.Content)`
|
|
|
11053
11004
|
}
|
|
11054
11005
|
}
|
|
11055
11006
|
`;
|
|
11056
|
-
const ScrollAreaImpl = (
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
}
|
|
11007
|
+
const ScrollAreaImpl = React__namespace.forwardRef(
|
|
11008
|
+
({ children, intersectionId, onReachEnd, ...props }, forwardedRef) => {
|
|
11009
|
+
const popoverRef = React__namespace.useRef(null);
|
|
11010
|
+
const composedRef = useComposedRefs(popoverRef, forwardedRef);
|
|
11011
|
+
const generatedIntersectionId = useId();
|
|
11012
|
+
useIntersection(popoverRef, onReachEnd ?? (() => {
|
|
11013
|
+
}), {
|
|
11014
|
+
selectorToWatch: `#${stripReactIdOfColon(generatedIntersectionId)}`,
|
|
11015
|
+
skipWhen: !intersectionId || !onReachEnd
|
|
11016
|
+
});
|
|
11017
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(PopoverScrollArea, { ref: composedRef, ...props, children: [
|
|
11018
|
+
children,
|
|
11019
|
+
intersectionId && onReachEnd && /* @__PURE__ */ jsxRuntime.jsx(Box, { id: stripReactIdOfColon(generatedIntersectionId), width: "100%", height: "1px" })
|
|
11020
|
+
] });
|
|
11021
|
+
}
|
|
11022
|
+
);
|
|
11069
11023
|
const PopoverScrollArea = styledComponents.styled(ScrollAreaImpl$1)`
|
|
11070
11024
|
height: 20rem;
|
|
11071
11025
|
`;
|
|
@@ -11197,172 +11151,171 @@ const RawTableContext = React__namespace.createContext({
|
|
|
11197
11151
|
}
|
|
11198
11152
|
});
|
|
11199
11153
|
const useTable = () => React__namespace.useContext(RawTableContext);
|
|
11200
|
-
const RawTable = (
|
|
11201
|
-
colCount,
|
|
11202
|
-
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
}) => {
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
setRowIndex(rowIndex2);
|
|
11215
|
-
}, []);
|
|
11216
|
-
React__namespace.useEffect(() => {
|
|
11217
|
-
if (mountedRef.current) {
|
|
11218
|
-
focusFocusable(tableRef.current);
|
|
11219
|
-
}
|
|
11220
|
-
if (!mountedRef.current) {
|
|
11221
|
-
mountedRef.current = true;
|
|
11222
|
-
}
|
|
11223
|
-
}, [colIndex, rowIndex]);
|
|
11224
|
-
const handleKeyDown = (e) => {
|
|
11225
|
-
switch (e.key) {
|
|
11226
|
-
case KeyboardKeys.RIGHT: {
|
|
11227
|
-
e.preventDefault();
|
|
11228
|
-
setColIndex((prevColIndex) => prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex);
|
|
11229
|
-
break;
|
|
11230
|
-
}
|
|
11231
|
-
case KeyboardKeys.LEFT: {
|
|
11232
|
-
e.preventDefault();
|
|
11233
|
-
setColIndex((prevColIndex) => prevColIndex > 0 ? prevColIndex - 1 : prevColIndex);
|
|
11234
|
-
break;
|
|
11235
|
-
}
|
|
11236
|
-
case KeyboardKeys.UP: {
|
|
11237
|
-
e.preventDefault();
|
|
11238
|
-
setRowIndex((prevRowIndex) => prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex);
|
|
11239
|
-
break;
|
|
11154
|
+
const RawTable = React__namespace.forwardRef(
|
|
11155
|
+
({ colCount, rowCount, jumpStep = 3, initialCol = 0, initialRow = 0, ...props }, forwardedRef) => {
|
|
11156
|
+
const tableRef = React__namespace.useRef(null);
|
|
11157
|
+
const mountedRef = React__namespace.useRef(false);
|
|
11158
|
+
const composedRef = useComposedRefs(tableRef, forwardedRef);
|
|
11159
|
+
const [rowIndex, setRowIndex] = React__namespace.useState(initialRow);
|
|
11160
|
+
const [colIndex, setColIndex] = React__namespace.useState(initialCol);
|
|
11161
|
+
const setTableValues = React__namespace.useCallback(({ colIndex: colIndex2, rowIndex: rowIndex2 }) => {
|
|
11162
|
+
setColIndex(colIndex2);
|
|
11163
|
+
setRowIndex(rowIndex2);
|
|
11164
|
+
}, []);
|
|
11165
|
+
React__namespace.useEffect(() => {
|
|
11166
|
+
if (mountedRef.current) {
|
|
11167
|
+
focusFocusable(tableRef.current);
|
|
11240
11168
|
}
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
setRowIndex((prevRowIndex) => prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex);
|
|
11244
|
-
break;
|
|
11169
|
+
if (!mountedRef.current) {
|
|
11170
|
+
mountedRef.current = true;
|
|
11245
11171
|
}
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11172
|
+
}, [colIndex, rowIndex]);
|
|
11173
|
+
const handleKeyDown = (e) => {
|
|
11174
|
+
switch (e.key) {
|
|
11175
|
+
case KeyboardKeys.RIGHT: {
|
|
11176
|
+
e.preventDefault();
|
|
11177
|
+
setColIndex((prevColIndex) => prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex);
|
|
11178
|
+
break;
|
|
11250
11179
|
}
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
|
|
11180
|
+
case KeyboardKeys.LEFT: {
|
|
11181
|
+
e.preventDefault();
|
|
11182
|
+
setColIndex((prevColIndex) => prevColIndex > 0 ? prevColIndex - 1 : prevColIndex);
|
|
11183
|
+
break;
|
|
11184
|
+
}
|
|
11185
|
+
case KeyboardKeys.UP: {
|
|
11186
|
+
e.preventDefault();
|
|
11187
|
+
setRowIndex((prevRowIndex) => prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex);
|
|
11188
|
+
break;
|
|
11189
|
+
}
|
|
11190
|
+
case KeyboardKeys.DOWN: {
|
|
11191
|
+
e.preventDefault();
|
|
11192
|
+
setRowIndex((prevRowIndex) => prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex);
|
|
11193
|
+
break;
|
|
11194
|
+
}
|
|
11195
|
+
case KeyboardKeys.HOME: {
|
|
11196
|
+
e.preventDefault();
|
|
11197
|
+
if (e.ctrlKey) {
|
|
11198
|
+
setRowIndex(0);
|
|
11199
|
+
}
|
|
11200
|
+
setColIndex(0);
|
|
11201
|
+
break;
|
|
11202
|
+
}
|
|
11203
|
+
case KeyboardKeys.END: {
|
|
11204
|
+
e.preventDefault();
|
|
11205
|
+
if (e.ctrlKey) {
|
|
11206
|
+
setRowIndex(rowCount - 1);
|
|
11207
|
+
}
|
|
11208
|
+
setColIndex(colCount - 1);
|
|
11209
|
+
break;
|
|
11210
|
+
}
|
|
11211
|
+
case KeyboardKeys.PAGE_DOWN: {
|
|
11212
|
+
e.preventDefault();
|
|
11213
|
+
setRowIndex((prevRowIndex) => prevRowIndex + jumpStep < rowCount ? prevRowIndex + jumpStep : rowCount - 1);
|
|
11214
|
+
break;
|
|
11215
|
+
}
|
|
11216
|
+
case KeyboardKeys.PAGE_UP: {
|
|
11217
|
+
e.preventDefault();
|
|
11218
|
+
setRowIndex((prevRowIndex) => prevRowIndex - jumpStep > 0 ? prevRowIndex - jumpStep : 0);
|
|
11219
|
+
break;
|
|
11258
11220
|
}
|
|
11259
|
-
setColIndex(colCount - 1);
|
|
11260
|
-
break;
|
|
11261
11221
|
}
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11222
|
+
};
|
|
11223
|
+
const context = React__namespace.useMemo(() => ({ rowIndex, colIndex, setTableValues }), [colIndex, rowIndex, setTableValues]);
|
|
11224
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RawTableContext.Provider, { value: context, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11225
|
+
"table",
|
|
11226
|
+
{
|
|
11227
|
+
role: "grid",
|
|
11228
|
+
ref: composedRef,
|
|
11229
|
+
"aria-rowcount": rowCount,
|
|
11230
|
+
"aria-colcount": colCount,
|
|
11231
|
+
onKeyDown: handleKeyDown,
|
|
11232
|
+
...props
|
|
11266
11233
|
}
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
|
|
11270
|
-
|
|
11234
|
+
) });
|
|
11235
|
+
}
|
|
11236
|
+
);
|
|
11237
|
+
const RawTd = React__namespace.forwardRef(
|
|
11238
|
+
({ coords = { col: 0, row: 0 }, tag = "td", ...props }, forwardedRef) => {
|
|
11239
|
+
const tdRef = React__namespace.useRef(null);
|
|
11240
|
+
const composedRef = useComposedRefs(forwardedRef, tdRef);
|
|
11241
|
+
const { rowIndex, colIndex, setTableValues } = useTable();
|
|
11242
|
+
const [isActive, setIsActive] = React__namespace.useState(false);
|
|
11243
|
+
const handleKeyDown = (e) => {
|
|
11244
|
+
const focusableNodes = getFocusableNodes(tdRef.current, true);
|
|
11245
|
+
if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length === 0) {
|
|
11246
|
+
return;
|
|
11271
11247
|
}
|
|
11272
|
-
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
}
|
|
11287
|
-
const RawTd = ({ coords = { col: 0, row: 0 }, tag = "td", ...props }) => {
|
|
11288
|
-
const tdRef = React__namespace.useRef(null);
|
|
11289
|
-
const { rowIndex, colIndex, setTableValues } = useTable();
|
|
11290
|
-
const [isActive, setIsActive] = React__namespace.useState(false);
|
|
11291
|
-
const handleKeyDown = (e) => {
|
|
11292
|
-
const focusableNodes = getFocusableNodes(tdRef.current, true);
|
|
11293
|
-
if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length === 0) {
|
|
11294
|
-
return;
|
|
11295
|
-
}
|
|
11296
|
-
if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== "BUTTON")) {
|
|
11297
|
-
e.preventDefault();
|
|
11298
|
-
const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);
|
|
11299
|
-
if (e.key === KeyboardKeys.RIGHT) {
|
|
11300
|
-
const nextNode = focusableNodes[focussedButtonIndex + 1];
|
|
11301
|
-
if (nextNode) {
|
|
11302
|
-
e.stopPropagation();
|
|
11303
|
-
nextNode.focus();
|
|
11304
|
-
}
|
|
11305
|
-
} else if (e.key === KeyboardKeys.LEFT) {
|
|
11306
|
-
const nextNode = focusableNodes[focussedButtonIndex - 1];
|
|
11307
|
-
if (nextNode) {
|
|
11308
|
-
e.stopPropagation();
|
|
11309
|
-
nextNode.focus();
|
|
11248
|
+
if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== "BUTTON")) {
|
|
11249
|
+
e.preventDefault();
|
|
11250
|
+
const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);
|
|
11251
|
+
if (e.key === KeyboardKeys.RIGHT) {
|
|
11252
|
+
const nextNode = focusableNodes[focussedButtonIndex + 1];
|
|
11253
|
+
if (nextNode) {
|
|
11254
|
+
e.stopPropagation();
|
|
11255
|
+
nextNode.focus();
|
|
11256
|
+
}
|
|
11257
|
+
} else if (e.key === KeyboardKeys.LEFT) {
|
|
11258
|
+
const nextNode = focusableNodes[focussedButtonIndex - 1];
|
|
11259
|
+
if (nextNode) {
|
|
11260
|
+
e.stopPropagation();
|
|
11261
|
+
nextNode.focus();
|
|
11262
|
+
}
|
|
11310
11263
|
}
|
|
11311
|
-
}
|
|
11312
|
-
return;
|
|
11313
|
-
}
|
|
11314
|
-
const isEnterKey = e.key === KeyboardKeys.ENTER;
|
|
11315
|
-
if (isEnterKey && !isActive) {
|
|
11316
|
-
setIsActive(true);
|
|
11317
|
-
} else if ((e.key === KeyboardKeys.ESCAPE || isEnterKey) && isActive) {
|
|
11318
|
-
if (isEnterKey && document.activeElement?.tagName === "A") {
|
|
11319
11264
|
return;
|
|
11320
11265
|
}
|
|
11321
|
-
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
e.
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;
|
|
11328
|
-
useIsomorphicLayoutEffect(() => {
|
|
11329
|
-
const focusableNodes = getFocusableNodes(tdRef.current, true);
|
|
11330
|
-
if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
|
|
11331
|
-
tdRef.current.setAttribute("tabIndex", !isActive && isFocused ? "0" : "-1");
|
|
11332
|
-
focusableNodes.forEach((node, index) => {
|
|
11333
|
-
node.setAttribute("tabIndex", isActive ? "0" : "-1");
|
|
11334
|
-
if (isActive && index === 0) {
|
|
11335
|
-
node.focus();
|
|
11266
|
+
const isEnterKey = e.key === KeyboardKeys.ENTER;
|
|
11267
|
+
if (isEnterKey && !isActive) {
|
|
11268
|
+
setIsActive(true);
|
|
11269
|
+
} else if ((e.key === KeyboardKeys.ESCAPE || isEnterKey) && isActive) {
|
|
11270
|
+
if (isEnterKey && document.activeElement?.tagName === "A") {
|
|
11271
|
+
return;
|
|
11336
11272
|
}
|
|
11337
|
-
|
|
11338
|
-
|
|
11273
|
+
setIsActive(false);
|
|
11274
|
+
tdRef.current.focus();
|
|
11275
|
+
} else if (isActive) {
|
|
11276
|
+
e.stopPropagation();
|
|
11277
|
+
}
|
|
11278
|
+
};
|
|
11279
|
+
const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;
|
|
11280
|
+
useIsomorphicLayoutEffect(() => {
|
|
11281
|
+
const focusableNodes = getFocusableNodes(tdRef.current, true);
|
|
11282
|
+
if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
|
|
11283
|
+
tdRef.current.setAttribute("tabIndex", !isActive && isFocused ? "0" : "-1");
|
|
11284
|
+
focusableNodes.forEach((node, index) => {
|
|
11285
|
+
node.setAttribute("tabIndex", isActive ? "0" : "-1");
|
|
11286
|
+
if (isActive && index === 0) {
|
|
11287
|
+
node.focus();
|
|
11288
|
+
}
|
|
11289
|
+
});
|
|
11290
|
+
} else {
|
|
11291
|
+
focusableNodes.forEach((node) => {
|
|
11292
|
+
node.setAttribute("tabIndex", isFocused ? "0" : "-1");
|
|
11293
|
+
});
|
|
11294
|
+
}
|
|
11295
|
+
}, [isActive, isFocused]);
|
|
11296
|
+
const handleFocusableNodeFocus = React__namespace.useCallback(() => {
|
|
11297
|
+
const focusableNodes = getFocusableNodes(tdRef.current, true);
|
|
11298
|
+
if (focusableNodes.length >= 1 && (getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || !focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
|
|
11299
|
+
setIsActive(true);
|
|
11300
|
+
}
|
|
11301
|
+
setTableValues({ rowIndex: coords.row - 1, colIndex: coords.col - 1 });
|
|
11302
|
+
}, [coords, setTableValues]);
|
|
11303
|
+
useIsomorphicLayoutEffect(() => {
|
|
11304
|
+
const cell = tdRef.current;
|
|
11305
|
+
const focusableNodes = getFocusableNodes(cell, true);
|
|
11339
11306
|
focusableNodes.forEach((node) => {
|
|
11340
|
-
node.
|
|
11307
|
+
node.addEventListener("focus", handleFocusableNodeFocus);
|
|
11341
11308
|
});
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
}
|
|
11349
|
-
|
|
11350
|
-
}
|
|
11351
|
-
|
|
11352
|
-
const cell = tdRef.current;
|
|
11353
|
-
const focusableNodes = getFocusableNodes(cell, true);
|
|
11354
|
-
focusableNodes.forEach((node) => {
|
|
11355
|
-
node.addEventListener("focus", handleFocusableNodeFocus);
|
|
11356
|
-
});
|
|
11357
|
-
return () => {
|
|
11358
|
-
const focusableNodes2 = getFocusableNodes(cell, true);
|
|
11359
|
-
focusableNodes2.forEach((node) => {
|
|
11360
|
-
node.removeEventListener("focus", handleFocusableNodeFocus);
|
|
11361
|
-
});
|
|
11362
|
-
};
|
|
11363
|
-
}, [handleFocusableNodeFocus]);
|
|
11364
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { role: "gridcell", tag, ref: tdRef, onKeyDown: handleKeyDown, ...props });
|
|
11365
|
-
};
|
|
11309
|
+
return () => {
|
|
11310
|
+
const focusableNodes2 = getFocusableNodes(cell, true);
|
|
11311
|
+
focusableNodes2.forEach((node) => {
|
|
11312
|
+
node.removeEventListener("focus", handleFocusableNodeFocus);
|
|
11313
|
+
});
|
|
11314
|
+
};
|
|
11315
|
+
}, [handleFocusableNodeFocus]);
|
|
11316
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { role: "gridcell", tag, ref: composedRef, onKeyDown: handleKeyDown, ...props });
|
|
11317
|
+
}
|
|
11318
|
+
);
|
|
11366
11319
|
const RawTh = (props) => /* @__PURE__ */ jsxRuntime.jsx(RawTd, { ...props, tag: "th" });
|
|
11367
11320
|
const RawThead = ({ children, ...props }) => {
|
|
11368
11321
|
const childrenClone = React__namespace.Children.toArray(children).map((child) => {
|
|
@@ -11413,14 +11366,18 @@ const SearchbarWrapper = styledComponents.styled.div`
|
|
|
11413
11366
|
&:focus-within {
|
|
11414
11367
|
${SearchIcon} {
|
|
11415
11368
|
fill: ${({ theme }) => theme.colors.primary600};
|
|
11416
|
-
path {
|
|
11417
|
-
}
|
|
11418
11369
|
}
|
|
11419
11370
|
}
|
|
11420
11371
|
`;
|
|
11421
11372
|
const SearchbarInput = styledComponents.styled(Input$2)`
|
|
11422
11373
|
border: 1px solid transparent;
|
|
11423
11374
|
|
|
11375
|
+
&:hover {
|
|
11376
|
+
button {
|
|
11377
|
+
cursor: pointer;
|
|
11378
|
+
}
|
|
11379
|
+
}
|
|
11380
|
+
|
|
11424
11381
|
${inputFocusStyle()}
|
|
11425
11382
|
`;
|
|
11426
11383
|
const Searchbar = React__namespace.forwardRef(
|
|
@@ -11440,7 +11397,17 @@ const Searchbar = React__namespace.forwardRef(
|
|
|
11440
11397
|
ref: actualRef,
|
|
11441
11398
|
value,
|
|
11442
11399
|
startAction: /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { "aria-hidden": true }),
|
|
11443
|
-
endAction: isCompleting ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
11400
|
+
endAction: isCompleting ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
11401
|
+
Action$1,
|
|
11402
|
+
{
|
|
11403
|
+
label: clearLabel,
|
|
11404
|
+
onClick: handleClear,
|
|
11405
|
+
onMouseDown: (e) => {
|
|
11406
|
+
e.preventDefault();
|
|
11407
|
+
},
|
|
11408
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {})
|
|
11409
|
+
}
|
|
11410
|
+
) : void 0,
|
|
11444
11411
|
...props
|
|
11445
11412
|
}
|
|
11446
11413
|
)
|
|
@@ -11448,47 +11415,60 @@ const Searchbar = React__namespace.forwardRef(
|
|
|
11448
11415
|
}
|
|
11449
11416
|
);
|
|
11450
11417
|
const SearchForm = (props) => /* @__PURE__ */ jsxRuntime.jsx("form", { ...props, role: "search" });
|
|
11451
|
-
const
|
|
11418
|
+
const ButtonBox$1 = styledComponents.styled(Box)`
|
|
11419
|
+
display: inline-flex;
|
|
11420
|
+
border: none;
|
|
11421
|
+
|
|
11422
|
+
& > svg {
|
|
11423
|
+
height: 0.8rem;
|
|
11424
|
+
width: 0.8rem;
|
|
11425
|
+
}
|
|
11426
|
+
|
|
11427
|
+
& > svg path {
|
|
11428
|
+
fill: ${({ theme, ...p }) => p["aria-disabled"] ? theme.colors.neutral600 : theme.colors.primary600};
|
|
11429
|
+
}
|
|
11430
|
+
|
|
11431
|
+
&:hover {
|
|
11432
|
+
cursor: ${({ $iconAction }) => $iconAction ? "pointer" : "initial"};
|
|
11433
|
+
}
|
|
11434
|
+
`;
|
|
11435
|
+
const Tag = ({ children, icon, label, disabled = false, onClick, ...props }) => {
|
|
11452
11436
|
const handleClick = (e) => {
|
|
11453
11437
|
if (disabled || !onClick)
|
|
11454
11438
|
return;
|
|
11455
11439
|
onClick(e);
|
|
11456
11440
|
};
|
|
11457
11441
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11458
|
-
|
|
11442
|
+
Flex,
|
|
11459
11443
|
{
|
|
11460
|
-
|
|
11444
|
+
inline: true,
|
|
11461
11445
|
background: disabled ? "neutral200" : "primary100",
|
|
11462
11446
|
color: disabled ? "neutral700" : "primary600",
|
|
11463
11447
|
paddingLeft: 3,
|
|
11464
|
-
paddingRight:
|
|
11465
|
-
onClick: handleClick,
|
|
11466
|
-
"aria-disabled": disabled,
|
|
11467
|
-
disabled,
|
|
11468
|
-
borderWidth: "1px",
|
|
11469
|
-
borderStyle: "solid",
|
|
11448
|
+
paddingRight: 1,
|
|
11470
11449
|
borderColor: disabled ? "neutral300" : "primary200",
|
|
11471
11450
|
hasRadius: true,
|
|
11472
11451
|
height: "3.2rem",
|
|
11473
|
-
gap: 2,
|
|
11474
11452
|
...props,
|
|
11475
11453
|
children: [
|
|
11476
11454
|
/* @__PURE__ */ jsxRuntime.jsx(TagText, { $disabled: disabled, variant: "pi", fontWeight: "bold", children }),
|
|
11477
|
-
|
|
11455
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11456
|
+
ButtonBox$1,
|
|
11457
|
+
{
|
|
11458
|
+
tag: "button",
|
|
11459
|
+
disabled,
|
|
11460
|
+
"aria-disabled": disabled,
|
|
11461
|
+
"aria-label": label,
|
|
11462
|
+
padding: 2,
|
|
11463
|
+
onClick: handleClick,
|
|
11464
|
+
$iconAction: !!onClick,
|
|
11465
|
+
children: icon
|
|
11466
|
+
}
|
|
11467
|
+
)
|
|
11478
11468
|
]
|
|
11479
11469
|
}
|
|
11480
11470
|
);
|
|
11481
11471
|
};
|
|
11482
|
-
const TagWrapper = styledComponents.styled(Flex)`
|
|
11483
|
-
& > svg {
|
|
11484
|
-
height: 0.8rem;
|
|
11485
|
-
width: 0.8rem;
|
|
11486
|
-
}
|
|
11487
|
-
|
|
11488
|
-
& > svg path {
|
|
11489
|
-
fill: ${({ theme, ...p }) => p["aria-disabled"] ? theme.colors.neutral600 : theme.colors.primary600};
|
|
11490
|
-
}
|
|
11491
|
-
`;
|
|
11492
11472
|
const TagText = styledComponents.styled(Typography)`
|
|
11493
11473
|
color: inherit;
|
|
11494
11474
|
border-right: 1px solid ${({ theme, $disabled }) => $disabled ? theme.colors.neutral300 : theme.colors.primary200};
|
|
@@ -11757,7 +11737,7 @@ const SubNavHeader = ({
|
|
|
11757
11737
|
] });
|
|
11758
11738
|
}
|
|
11759
11739
|
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", alignItems: "flex-start", paddingLeft: 6, paddingTop: 6, paddingBottom: 2, paddingRight: 4, children: [
|
|
11760
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", children: [
|
|
11740
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", width: "100%", gap: 2, children: [
|
|
11761
11741
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "beta", tag, children: label }),
|
|
11762
11742
|
searchable && /* @__PURE__ */ jsxRuntime.jsx(IconButton, { ref: searchButtonRef, onClick: toggleSearch, label: searchLabel, children: /* @__PURE__ */ jsxRuntime.jsx(icons.Search, {}) })
|
|
11763
11743
|
] }),
|
|
@@ -11792,7 +11772,7 @@ const CustomBullet = styledComponents.styled.span`
|
|
|
11792
11772
|
background-color: ${({ theme, $active }) => $active ? theme.colors.primary600 : theme.colors.neutral600};
|
|
11793
11773
|
border-radius: 50%;
|
|
11794
11774
|
`;
|
|
11795
|
-
const SubNavLinkWrapper = styledComponents.styled(
|
|
11775
|
+
const SubNavLinkWrapper = styledComponents.styled(BaseLinkImpl)`
|
|
11796
11776
|
display: flex;
|
|
11797
11777
|
align-items: center;
|
|
11798
11778
|
justify-content: space-between;
|
|
@@ -12198,7 +12178,7 @@ const TableBox = styledComponents.styled(Box)`
|
|
|
12198
12178
|
const ScrollContainer = styledComponents.styled(Box)`
|
|
12199
12179
|
overflow-x: auto;
|
|
12200
12180
|
`;
|
|
12201
|
-
const Table = ({ footer, ...props }) => {
|
|
12181
|
+
const Table = React__namespace.forwardRef(({ footer, ...props }, forwardedRef) => {
|
|
12202
12182
|
const tableRef = React__namespace.useRef(null);
|
|
12203
12183
|
const [overflowing, setOverflowing] = React__namespace.useState();
|
|
12204
12184
|
const handleScroll = (e) => {
|
|
@@ -12221,10 +12201,10 @@ const Table = ({ footer, ...props }) => {
|
|
|
12221
12201
|
}
|
|
12222
12202
|
}, []);
|
|
12223
12203
|
return /* @__PURE__ */ jsxRuntime.jsxs(TableContainer, { shadow: "tableShadow", hasRadius: true, background: "neutral0", children: [
|
|
12224
|
-
/* @__PURE__ */ jsxRuntime.jsx(TableBox, { $overflowing: overflowing, position: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(ScrollContainer, { ref: tableRef, onScroll: handleScroll, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ jsxRuntime.jsx(TableWrapper, { ...props }) }) }),
|
|
12204
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableBox, { $overflowing: overflowing, position: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(ScrollContainer, { ref: tableRef, onScroll: handleScroll, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ jsxRuntime.jsx(TableWrapper, { ref: forwardedRef, ...props }) }) }),
|
|
12225
12205
|
footer
|
|
12226
12206
|
] });
|
|
12227
|
-
};
|
|
12207
|
+
});
|
|
12228
12208
|
const TbodyWrapper = styledComponents.styled(RawTbody)`
|
|
12229
12209
|
& tr:last-of-type {
|
|
12230
12210
|
border-bottom: none;
|
|
@@ -12265,7 +12245,6 @@ const Tr = (props) => {
|
|
|
12265
12245
|
const CellWrapper = styledComponents.styled(RawTd)`
|
|
12266
12246
|
vertical-align: middle;
|
|
12267
12247
|
text-align: left;
|
|
12268
|
-
color: ${({ theme }) => theme.colors.neutral600};
|
|
12269
12248
|
outline-offset: -4px;
|
|
12270
12249
|
|
|
12271
12250
|
/**
|
|
@@ -12275,15 +12254,15 @@ const CellWrapper = styledComponents.styled(RawTd)`
|
|
|
12275
12254
|
vertical-align: sub;
|
|
12276
12255
|
}
|
|
12277
12256
|
`;
|
|
12278
|
-
const Th = ({ children, action, ...props }) => {
|
|
12279
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CellWrapper, { as: RawTh, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { children: [
|
|
12257
|
+
const Th = React__namespace.forwardRef(({ children, action, ...props }, forwardedRef) => {
|
|
12258
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CellWrapper, { color: "neutral600", as: RawTh, ref: forwardedRef, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { children: [
|
|
12280
12259
|
children,
|
|
12281
12260
|
action
|
|
12282
12261
|
] }) });
|
|
12283
|
-
};
|
|
12284
|
-
const Td = ({ children, ...props }) => {
|
|
12285
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CellWrapper, { ...props, children });
|
|
12286
|
-
};
|
|
12262
|
+
});
|
|
12263
|
+
const Td = React__namespace.forwardRef(({ children, ...props }, forwardedRef) => {
|
|
12264
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CellWrapper, { color: "neutral800", ref: forwardedRef, ...props, children });
|
|
12265
|
+
});
|
|
12287
12266
|
const IconBox = styledComponents.styled(Box)`
|
|
12288
12267
|
height: 2.4rem;
|
|
12289
12268
|
width: 2.4rem;
|
|
@@ -12316,6 +12295,28 @@ const TFooter = ({ children, icon, ...props }) => {
|
|
|
12316
12295
|
] }) })
|
|
12317
12296
|
] });
|
|
12318
12297
|
};
|
|
12298
|
+
const TextButton = forwardRef(
|
|
12299
|
+
({ children, startIcon, endIcon, disabled = false, loading = false, ...props }, ref) => {
|
|
12300
|
+
const isDisabled = disabled || loading;
|
|
12301
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12302
|
+
TextButtonWrapper,
|
|
12303
|
+
{
|
|
12304
|
+
ref,
|
|
12305
|
+
disabled: isDisabled,
|
|
12306
|
+
"aria-disabled": isDisabled,
|
|
12307
|
+
tag: "button",
|
|
12308
|
+
type: "button",
|
|
12309
|
+
gap: 2,
|
|
12310
|
+
...props,
|
|
12311
|
+
children: [
|
|
12312
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingWrapper, { "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(icons.Loader, {}) }) : startIcon,
|
|
12313
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "pi", children }),
|
|
12314
|
+
endIcon
|
|
12315
|
+
]
|
|
12316
|
+
}
|
|
12317
|
+
);
|
|
12318
|
+
}
|
|
12319
|
+
);
|
|
12319
12320
|
const rotation = styledComponents.keyframes`
|
|
12320
12321
|
from {
|
|
12321
12322
|
transform: rotate(0deg);
|
|
@@ -12324,51 +12325,24 @@ const rotation = styledComponents.keyframes`
|
|
|
12324
12325
|
transform: rotate(359deg);
|
|
12325
12326
|
}
|
|
12326
12327
|
`;
|
|
12327
|
-
const LoadingWrapper = styledComponents.styled.
|
|
12328
|
+
const LoadingWrapper = styledComponents.styled.span`
|
|
12329
|
+
display: flex;
|
|
12328
12330
|
animation: ${rotation} 2s infinite linear;
|
|
12329
12331
|
will-change: transform;
|
|
12330
12332
|
`;
|
|
12331
12333
|
const TextButtonWrapper = styledComponents.styled(Flex)`
|
|
12332
12334
|
border: none;
|
|
12335
|
+
background-color: transparent;
|
|
12336
|
+
color: ${(props) => props.theme.colors.primary600};
|
|
12337
|
+
cursor: pointer;
|
|
12333
12338
|
|
|
12334
12339
|
&[aria-disabled='true'] {
|
|
12335
12340
|
pointer-events: none;
|
|
12336
|
-
|
|
12337
|
-
fill: ${({ theme }) => theme.colors.neutral600};
|
|
12338
|
-
}
|
|
12339
|
-
}
|
|
12340
|
-
|
|
12341
|
-
svg path {
|
|
12342
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
|
12341
|
+
color: ${(props) => props.theme.colors.neutral600};
|
|
12343
12342
|
}
|
|
12344
12343
|
|
|
12345
12344
|
${focus}
|
|
12346
12345
|
`;
|
|
12347
|
-
const TextButton = React__namespace.forwardRef(
|
|
12348
|
-
({ children, startIcon, endIcon, onClick, disabled = false, loading = false, ...props }, ref) => {
|
|
12349
|
-
const handleClick = onClick && !disabled ? onClick : void 0;
|
|
12350
|
-
const isDisabled = disabled || loading;
|
|
12351
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12352
|
-
TextButtonWrapper,
|
|
12353
|
-
{
|
|
12354
|
-
ref,
|
|
12355
|
-
"aria-disabled": isDisabled,
|
|
12356
|
-
onClick: handleClick,
|
|
12357
|
-
tag: "button",
|
|
12358
|
-
type: "button",
|
|
12359
|
-
background: "transparent",
|
|
12360
|
-
gap: 2,
|
|
12361
|
-
...props,
|
|
12362
|
-
children: [
|
|
12363
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingWrapper, { "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(icons.Loader, {}) }) : startIcon,
|
|
12364
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "pi", textColor: isDisabled ? "neutral600" : "primary600", children }),
|
|
12365
|
-
endIcon
|
|
12366
|
-
]
|
|
12367
|
-
}
|
|
12368
|
-
);
|
|
12369
|
-
}
|
|
12370
|
-
);
|
|
12371
|
-
TextButton.displayName = "TextButton";
|
|
12372
12346
|
const TextInput = React__namespace.forwardRef((props, ref) => {
|
|
12373
12347
|
return /* @__PURE__ */ jsxRuntime.jsx(Input$2, { ref, ...props });
|
|
12374
12348
|
});
|
|
@@ -12673,8 +12647,7 @@ exports.Accordion = Accordion;
|
|
|
12673
12647
|
exports.Alert = Alert;
|
|
12674
12648
|
exports.Avatar = Avatar;
|
|
12675
12649
|
exports.Badge = Badge;
|
|
12676
|
-
exports.
|
|
12677
|
-
exports.BaseLink = BaseLink;
|
|
12650
|
+
exports.BaseLink = BaseLinkImpl;
|
|
12678
12651
|
exports.Box = Box;
|
|
12679
12652
|
exports.Breadcrumbs = Breadcrumbs;
|
|
12680
12653
|
exports.Button = Button;
|