@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.js
CHANGED
|
@@ -25,7 +25,9 @@ const Dialog$1 = require("@radix-ui/react-dialog");
|
|
|
25
25
|
const ScrollArea = require("@radix-ui/react-scroll-area");
|
|
26
26
|
const number = require("@internationalized/number");
|
|
27
27
|
const Popover$1 = require("@radix-ui/react-popover");
|
|
28
|
+
const Progress = require("@radix-ui/react-progress");
|
|
28
29
|
const RadioGroup = require("@radix-ui/react-radio-group");
|
|
30
|
+
const Switch = require("@radix-ui/react-switch");
|
|
29
31
|
const Tabs$1 = require("@radix-ui/react-tabs");
|
|
30
32
|
function _interopNamespace(e) {
|
|
31
33
|
if (e && e.__esModule)
|
|
@@ -56,7 +58,9 @@ const AlertDialog__namespace = /* @__PURE__ */ _interopNamespace(AlertDialog);
|
|
|
56
58
|
const Dialog__namespace = /* @__PURE__ */ _interopNamespace(Dialog$1);
|
|
57
59
|
const ScrollArea__namespace = /* @__PURE__ */ _interopNamespace(ScrollArea);
|
|
58
60
|
const Popover__namespace = /* @__PURE__ */ _interopNamespace(Popover$1);
|
|
61
|
+
const Progress__namespace = /* @__PURE__ */ _interopNamespace(Progress);
|
|
59
62
|
const RadioGroup__namespace = /* @__PURE__ */ _interopNamespace(RadioGroup);
|
|
63
|
+
const Switch__namespace = /* @__PURE__ */ _interopNamespace(Switch);
|
|
60
64
|
const Tabs__namespace = /* @__PURE__ */ _interopNamespace(Tabs$1);
|
|
61
65
|
const createContext = (rootComponentName, defaultContext) => {
|
|
62
66
|
const Context = React__namespace.createContext(defaultContext);
|
|
@@ -465,25 +469,38 @@ const AccordionItem = styledComponents.styled(RadixAccordion__namespace.Item)`
|
|
|
465
469
|
overflow: hidden;
|
|
466
470
|
|
|
467
471
|
&:first-child {
|
|
468
|
-
border-top-left-radius:
|
|
469
|
-
border-top-right-radius:
|
|
472
|
+
border-top-left-radius: 0.3rem;
|
|
473
|
+
border-top-right-radius: 0.3rem;
|
|
470
474
|
}
|
|
471
475
|
|
|
472
476
|
&:last-child {
|
|
473
|
-
border-bottom-left-radius:
|
|
474
|
-
border-bottom-right-radius:
|
|
477
|
+
border-bottom-left-radius: 0.3rem;
|
|
478
|
+
border-bottom-right-radius: 0.3rem;
|
|
475
479
|
}
|
|
476
480
|
|
|
477
481
|
& + & {
|
|
478
482
|
border-top: ${(props) => props.$size === "S" ? `solid 1px ${props.theme.colors.neutral200}` : "unset"};
|
|
479
483
|
}
|
|
480
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
|
+
|
|
481
493
|
/* This applies our desired focus effect correctly. */
|
|
482
494
|
&:focus-within {
|
|
483
495
|
position: relative;
|
|
484
496
|
z-index: 1;
|
|
485
497
|
box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
|
|
486
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
|
+
}
|
|
487
504
|
`;
|
|
488
505
|
const Trigger$7 = React__namespace.forwardRef(
|
|
489
506
|
({ caretPosition = "left", description, icon: Icon, children, ...restProps }, forwardedRef) => {
|
|
@@ -499,10 +516,11 @@ const Trigger$7 = React__namespace.forwardRef(
|
|
|
499
516
|
fontWeight: size === "S" ? "bold" : void 0,
|
|
500
517
|
ellipsis: true,
|
|
501
518
|
variant: size === "M" ? "delta" : void 0,
|
|
519
|
+
textAlign: "left",
|
|
502
520
|
children
|
|
503
521
|
}
|
|
504
522
|
),
|
|
505
|
-
description && size === "M" ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { children: description }) : null
|
|
523
|
+
description && size === "M" ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { textAlign: "left", children: description }) : null
|
|
506
524
|
] })
|
|
507
525
|
] }),
|
|
508
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
|
|
@@ -1166,51 +1184,32 @@ const Base = styledComponents.styled(Flex)`
|
|
|
1166
1184
|
`;
|
|
1167
1185
|
}};
|
|
1168
1186
|
`;
|
|
1169
|
-
const
|
|
1170
|
-
({ disabled,
|
|
1171
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1172
|
-
BaseButtonWrapper,
|
|
1173
|
-
{
|
|
1174
|
-
ref,
|
|
1175
|
-
"aria-disabled": disabled,
|
|
1176
|
-
disabled,
|
|
1177
|
-
tag: "button",
|
|
1178
|
-
type: "button",
|
|
1179
|
-
padding: 2,
|
|
1180
|
-
hasRadius: true,
|
|
1181
|
-
background: "neutral0",
|
|
1182
|
-
borderColor: "neutral200",
|
|
1183
|
-
cursor: "pointer",
|
|
1184
|
-
...props,
|
|
1185
|
-
children
|
|
1186
|
-
}
|
|
1187
|
-
);
|
|
1188
|
-
}
|
|
1189
|
-
);
|
|
1190
|
-
const BaseButtonWrapper = styledComponents.styled(Flex)`
|
|
1191
|
-
&[aria-disabled='true'] {
|
|
1192
|
-
pointer-events: none;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
${focus}
|
|
1196
|
-
`;
|
|
1197
|
-
const BaseLink = forwardRef(
|
|
1198
|
-
({ href, rel = "noreferrer noopener", target = "_self", disabled = false, isExternal = false, ...props }, ref) => {
|
|
1187
|
+
const BaseLinkImpl = forwardRef(
|
|
1188
|
+
({ href, disabled = false, isExternal = false, ...props }, ref) => {
|
|
1199
1189
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1200
|
-
|
|
1190
|
+
BaseLink,
|
|
1201
1191
|
{
|
|
1202
1192
|
tag: "a",
|
|
1203
1193
|
ref,
|
|
1204
|
-
target: isExternal ? "_blank" :
|
|
1205
|
-
rel: isExternal ?
|
|
1206
|
-
href
|
|
1194
|
+
target: isExternal ? "_blank" : void 0,
|
|
1195
|
+
rel: isExternal ? "noreferrer noopener" : void 0,
|
|
1196
|
+
href,
|
|
1197
|
+
tabIndex: disabled ? -1 : void 0,
|
|
1207
1198
|
"aria-disabled": disabled,
|
|
1208
|
-
|
|
1199
|
+
pointerEvents: disabled ? "none" : void 0,
|
|
1200
|
+
cursor: disabled ? void 0 : "pointer",
|
|
1209
1201
|
...props
|
|
1210
1202
|
}
|
|
1211
1203
|
);
|
|
1212
1204
|
}
|
|
1213
1205
|
);
|
|
1206
|
+
const BaseLink = styledComponents.styled(Box)`
|
|
1207
|
+
text-decoration: none;
|
|
1208
|
+
|
|
1209
|
+
&:visited {
|
|
1210
|
+
color: inherit;
|
|
1211
|
+
}
|
|
1212
|
+
`;
|
|
1214
1213
|
const Divider$1 = () => {
|
|
1215
1214
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": true, paddingLeft: 1, paddingRight: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "pi", textColor: "neutral500", children: "/" }) });
|
|
1216
1215
|
};
|
|
@@ -1224,30 +1223,34 @@ const AlignedList = styledComponents.styled(Flex)`
|
|
|
1224
1223
|
margin-left: ${({ theme }) => `calc(-1*${theme.spaces[2]})`};
|
|
1225
1224
|
}
|
|
1226
1225
|
`;
|
|
1227
|
-
const Breadcrumbs = (
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
};
|
|
1237
|
-
Breadcrumbs.displayName = "Breadcrumbs";
|
|
1238
|
-
const Crumb = ({ children, isCurrent = false, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(Box, { paddingLeft: 2, paddingRight: 2, paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1239
|
-
Typography,
|
|
1240
|
-
{
|
|
1241
|
-
variant: "pi",
|
|
1242
|
-
textColor: "neutral800",
|
|
1243
|
-
fontWeight: isCurrent ? "bold" : "regular",
|
|
1244
|
-
"aria-current": isCurrent,
|
|
1245
|
-
...props,
|
|
1246
|
-
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
|
+
}) }) });
|
|
1247
1236
|
}
|
|
1248
|
-
)
|
|
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
|
+
);
|
|
1249
1252
|
Crumb.displayName = "Crumb";
|
|
1250
|
-
const StyledLink = styledComponents.styled(
|
|
1253
|
+
const StyledLink = styledComponents.styled(BaseLinkImpl)`
|
|
1251
1254
|
border-radius: ${({ theme }) => theme.borderRadius};
|
|
1252
1255
|
color: ${({ theme }) => theme.colors.neutral600};
|
|
1253
1256
|
font-size: ${({ theme }) => theme.fontSizes[1]};
|
|
@@ -1261,9 +1264,22 @@ const StyledLink = styledComponents.styled(BaseLink)`
|
|
|
1261
1264
|
color: ${({ theme }) => theme.colors.neutral700};
|
|
1262
1265
|
}
|
|
1263
1266
|
`;
|
|
1264
|
-
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 }));
|
|
1265
1268
|
CrumbLink.displayName = "CrumbLink";
|
|
1266
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
|
+
}
|
|
1267
1283
|
const isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent);
|
|
1268
1284
|
const useIsomorphicLayoutEffect = isSSR() ? React.useEffect : React.useLayoutEffect;
|
|
1269
1285
|
const useReactId = React__namespace["useId".toString()] || (() => void 0);
|
|
@@ -1313,7 +1329,7 @@ const DANGER = "danger";
|
|
|
1313
1329
|
const SUCCESS = "success";
|
|
1314
1330
|
const GHOST = "ghost";
|
|
1315
1331
|
const LIGHT_VARIANTS = [SUCCESS_LIGHT, DANGER_LIGHT];
|
|
1316
|
-
const VARIANTS
|
|
1332
|
+
const VARIANTS = [DEFAULT, TERTIARY, SECONDARY, DANGER, SUCCESS, GHOST, ...LIGHT_VARIANTS];
|
|
1317
1333
|
const BUTTON_SIZES = ["S", "M", "L"];
|
|
1318
1334
|
const getVariantColorName = (variant2) => {
|
|
1319
1335
|
if (variant2 === SUCCESS_LIGHT || variant2 === DANGER_LIGHT) {
|
|
@@ -1322,7 +1338,7 @@ const getVariantColorName = (variant2) => {
|
|
|
1322
1338
|
if (variant2 === TERTIARY) {
|
|
1323
1339
|
return "neutral";
|
|
1324
1340
|
}
|
|
1325
|
-
if (variant2 === DEFAULT || variant2 === SECONDARY || VARIANTS
|
|
1341
|
+
if (variant2 === DEFAULT || variant2 === SECONDARY || VARIANTS.every((vari) => vari !== variant2)) {
|
|
1326
1342
|
return "primary";
|
|
1327
1343
|
}
|
|
1328
1344
|
return `${variant2}`;
|
|
@@ -1332,6 +1348,7 @@ const getDisabledStyle = ({ theme }) => {
|
|
|
1332
1348
|
border: 1px solid ${theme.colors.neutral200};
|
|
1333
1349
|
background: ${theme.colors.neutral150};
|
|
1334
1350
|
color: ${theme.colors.neutral600};
|
|
1351
|
+
cursor: default;
|
|
1335
1352
|
`;
|
|
1336
1353
|
};
|
|
1337
1354
|
const getHoverStyle = ({ theme, $variant }) => {
|
|
@@ -1418,6 +1435,8 @@ const getVariantStyle = ({ theme, $variant }) => {
|
|
|
1418
1435
|
}
|
|
1419
1436
|
default: {
|
|
1420
1437
|
return styledComponents.css`
|
|
1438
|
+
border: 1px solid ${theme.colors.buttonPrimary600};
|
|
1439
|
+
background: ${theme.colors.buttonPrimary600};
|
|
1421
1440
|
color: ${theme.colors.buttonNeutral0};
|
|
1422
1441
|
`;
|
|
1423
1442
|
}
|
|
@@ -1450,21 +1469,22 @@ const Button = forwardRef(
|
|
|
1450
1469
|
disabled: isDisabled,
|
|
1451
1470
|
$size: size,
|
|
1452
1471
|
$variant: variant2,
|
|
1472
|
+
tag: "button",
|
|
1453
1473
|
onClick: handleClick,
|
|
1454
|
-
|
|
1455
|
-
background: "buttonPrimary600",
|
|
1456
|
-
borderColor: "buttonPrimary600",
|
|
1474
|
+
hasRadius: true,
|
|
1457
1475
|
gap: 2,
|
|
1458
|
-
inline:
|
|
1459
|
-
|
|
1476
|
+
inline: true,
|
|
1477
|
+
alignItems: "center",
|
|
1478
|
+
justifyContent: "center",
|
|
1479
|
+
width: fullWidth ? "100%" : void 0,
|
|
1460
1480
|
paddingLeft: 4,
|
|
1461
1481
|
paddingRight: 4,
|
|
1462
|
-
|
|
1482
|
+
cursor: "pointer",
|
|
1463
1483
|
...props,
|
|
1464
1484
|
children: [
|
|
1465
|
-
(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 }),
|
|
1466
1486
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: size === "S" ? "pi" : void 0, fontWeight: "bold", children }),
|
|
1467
|
-
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 })
|
|
1468
1488
|
]
|
|
1469
1489
|
}
|
|
1470
1490
|
);
|
|
@@ -1482,20 +1502,10 @@ const LoaderAnimated = styledComponents.styled(icons.Loader)`
|
|
|
1482
1502
|
animation: ${rotation$2} 2s infinite linear;
|
|
1483
1503
|
will-change: transform;
|
|
1484
1504
|
`;
|
|
1485
|
-
const ButtonWrapper = styledComponents.styled(
|
|
1505
|
+
const ButtonWrapper = styledComponents.styled(Flex)`
|
|
1486
1506
|
height: ${({ theme, $size }) => theme.sizes.button[$size]};
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
height: 1.2rem;
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
&[aria-disabled='true'] {
|
|
1493
|
-
${getDisabledStyle}
|
|
1494
|
-
|
|
1495
|
-
&:active {
|
|
1496
|
-
${getDisabledStyle}
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1507
|
+
text-decoration: none;
|
|
1508
|
+
${getVariantStyle}
|
|
1499
1509
|
|
|
1500
1510
|
&:hover {
|
|
1501
1511
|
${getHoverStyle}
|
|
@@ -1505,7 +1515,9 @@ const ButtonWrapper = styledComponents.styled(BaseButton)`
|
|
|
1505
1515
|
${getActiveStyle}
|
|
1506
1516
|
}
|
|
1507
1517
|
|
|
1508
|
-
|
|
1518
|
+
&[aria-disabled='true'] {
|
|
1519
|
+
${getDisabledStyle}
|
|
1520
|
+
}
|
|
1509
1521
|
|
|
1510
1522
|
@media (prefers-reduced-motion: no-preference) {
|
|
1511
1523
|
transition:
|
|
@@ -1515,8 +1527,8 @@ const ButtonWrapper = styledComponents.styled(BaseButton)`
|
|
|
1515
1527
|
}
|
|
1516
1528
|
`;
|
|
1517
1529
|
const Link = forwardRef(
|
|
1518
|
-
({ children, href, disabled = false, startIcon, endIcon, isExternal =
|
|
1519
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(LinkWrapper$
|
|
1530
|
+
({ children, href, disabled = false, startIcon, endIcon, isExternal = false, ...props }, ref) => {
|
|
1531
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(LinkWrapper$1, { ref, href, disabled, isExternal, ...props, children: [
|
|
1520
1532
|
startIcon,
|
|
1521
1533
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { textColor: disabled ? "neutral600" : "primary600", children }),
|
|
1522
1534
|
endIcon,
|
|
@@ -1524,7 +1536,7 @@ const Link = forwardRef(
|
|
|
1524
1536
|
] });
|
|
1525
1537
|
}
|
|
1526
1538
|
);
|
|
1527
|
-
const LinkWrapper$
|
|
1539
|
+
const LinkWrapper$1 = styledComponents.styled(BaseLinkImpl)`
|
|
1528
1540
|
display: inline-flex;
|
|
1529
1541
|
align-items: center;
|
|
1530
1542
|
text-decoration: none;
|
|
@@ -1540,7 +1552,9 @@ const LinkWrapper$2 = styledComponents.styled(BaseLink)`
|
|
|
1540
1552
|
}
|
|
1541
1553
|
|
|
1542
1554
|
&:hover {
|
|
1543
|
-
|
|
1555
|
+
span {
|
|
1556
|
+
color: ${({ theme }) => theme.colors.primary500};
|
|
1557
|
+
}
|
|
1544
1558
|
}
|
|
1545
1559
|
|
|
1546
1560
|
&:active {
|
|
@@ -1719,37 +1733,41 @@ const Menu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
1719
1733
|
SubTrigger,
|
|
1720
1734
|
Trigger: Trigger$6
|
|
1721
1735
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1722
|
-
const SimpleMenu = (
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
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
|
-
}
|
|
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
|
+
);
|
|
1753
1771
|
const MenuItem = Item$3;
|
|
1754
1772
|
const StyledButton = styledComponents.styled(SimpleMenu)`
|
|
1755
1773
|
padding: ${({ theme }) => `${theme.spaces[1]} ${theme.spaces[2]}`};
|
|
@@ -1760,16 +1778,19 @@ const StyledButton = styledComponents.styled(SimpleMenu)`
|
|
|
1760
1778
|
background-color: ${({ theme }) => theme.colors.neutral200};
|
|
1761
1779
|
}
|
|
1762
1780
|
`;
|
|
1763
|
-
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
|
+
);
|
|
1764
1784
|
CrumbSimpleMenu.displayName = "CrumbSimpleMenu";
|
|
1765
1785
|
const CardContext = React__namespace.createContext({ id: "" });
|
|
1766
1786
|
const useCard = () => React__namespace.useContext(CardContext);
|
|
1767
|
-
const Card = ({ id, ...props }) => {
|
|
1787
|
+
const Card = React__namespace.forwardRef(({ id, ...props }, forwardedRef) => {
|
|
1768
1788
|
const generatedId = useId(id);
|
|
1769
1789
|
const context = React__namespace.useMemo(() => ({ id: generatedId }), [generatedId]);
|
|
1770
1790
|
return /* @__PURE__ */ jsxRuntime.jsx(CardContext.Provider, { value: context, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1771
1791
|
Box,
|
|
1772
1792
|
{
|
|
1793
|
+
ref: forwardedRef,
|
|
1773
1794
|
id,
|
|
1774
1795
|
tabIndex: 0,
|
|
1775
1796
|
hasRadius: true,
|
|
@@ -1783,10 +1804,10 @@ const Card = ({ id, ...props }) => {
|
|
|
1783
1804
|
...props
|
|
1784
1805
|
}
|
|
1785
1806
|
) });
|
|
1786
|
-
};
|
|
1787
|
-
const CardActionImpl = ({ position, ...restProps }) => {
|
|
1788
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CardAction, { $position: position, ...restProps, direction: "row", gap: 2 });
|
|
1789
|
-
};
|
|
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
|
+
});
|
|
1790
1811
|
const CardAction = styledComponents.styled(Flex)`
|
|
1791
1812
|
position: absolute;
|
|
1792
1813
|
top: ${({ theme }) => theme.spaces[3]};
|
|
@@ -1837,19 +1858,6 @@ const CardBadge = (props) => /* @__PURE__ */ jsxRuntime.jsx(CardBadgeWrapper, {
|
|
|
1837
1858
|
const CardBody = (props) => {
|
|
1838
1859
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { paddingLeft: 3, paddingRight: 3, paddingTop: 2, paddingBottom: 2, children: /* @__PURE__ */ jsxRuntime.jsx(Flex, { ...props, alignItems: "flex-start" }) });
|
|
1839
1860
|
};
|
|
1840
|
-
function setRef(ref, value) {
|
|
1841
|
-
if (typeof ref === "function") {
|
|
1842
|
-
ref(value);
|
|
1843
|
-
} else if (ref !== null && ref !== void 0) {
|
|
1844
|
-
ref.current = value;
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
function composeRefs(...refs) {
|
|
1848
|
-
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
1849
|
-
}
|
|
1850
|
-
function useComposedRefs(...refs) {
|
|
1851
|
-
return React__namespace.useCallback(composeRefs(...refs), refs);
|
|
1852
|
-
}
|
|
1853
1861
|
const CheckIcon = ({ fill, ...props }) => {
|
|
1854
1862
|
const { colors } = styledComponents.useTheme();
|
|
1855
1863
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1932,10 +1940,10 @@ const CheckboxImpl = React__namespace.forwardRef(({ children, ...restProps }, fo
|
|
|
1932
1940
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { tag: "label", textColor: "neutral800", htmlFor: labelId, children })
|
|
1933
1941
|
] });
|
|
1934
1942
|
});
|
|
1935
|
-
const CardCheckbox = (props) => {
|
|
1943
|
+
const CardCheckbox = React__namespace.forwardRef((props, forwardedRef) => {
|
|
1936
1944
|
const { id } = useCard();
|
|
1937
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CardActionImpl, { position: "start", children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxImpl, { "aria-labelledby": `${id}-title`, ...props }) });
|
|
1938
|
-
};
|
|
1945
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CardActionImpl, { position: "start", children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxImpl, { "aria-labelledby": `${id}-title`, ...props, ref: forwardedRef }) });
|
|
1946
|
+
});
|
|
1939
1947
|
const BreakBox = styledComponents.styled(Box)`
|
|
1940
1948
|
word-break: break-all;
|
|
1941
1949
|
`;
|
|
@@ -2967,7 +2975,7 @@ lodash.exports;
|
|
|
2967
2975
|
}
|
|
2968
2976
|
var runInContext = function runInContext2(context) {
|
|
2969
2977
|
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
|
2970
|
-
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;
|
|
2971
2979
|
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
|
2972
2980
|
var coreJsData = context["__core-js_shared__"];
|
|
2973
2981
|
var funcToString = funcProto.toString;
|
|
@@ -2993,7 +3001,7 @@ lodash.exports;
|
|
|
2993
3001
|
}
|
|
2994
3002
|
}();
|
|
2995
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;
|
|
2996
|
-
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;
|
|
2997
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");
|
|
2998
3006
|
var metaMap = WeakMap && new WeakMap();
|
|
2999
3007
|
var realNames = {};
|
|
@@ -4739,7 +4747,7 @@ lodash.exports;
|
|
|
4739
4747
|
return setWrapToString(result2, func, bitmask);
|
|
4740
4748
|
}
|
|
4741
4749
|
function createRound(methodName) {
|
|
4742
|
-
var func =
|
|
4750
|
+
var func = Math2[methodName];
|
|
4743
4751
|
return function(number2, precision) {
|
|
4744
4752
|
number2 = toNumber(number2);
|
|
4745
4753
|
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
|
@@ -7862,6 +7870,7 @@ const Input$2 = React__namespace.forwardRef(
|
|
|
7862
7870
|
hasError: hasErrorProp,
|
|
7863
7871
|
required: requiredProp,
|
|
7864
7872
|
className,
|
|
7873
|
+
size = "M",
|
|
7865
7874
|
...props
|
|
7866
7875
|
}, ref) => {
|
|
7867
7876
|
const { id, error, hint, name, required } = useField("Input");
|
|
@@ -7880,14 +7889,13 @@ const Input$2 = React__namespace.forwardRef(
|
|
|
7880
7889
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7881
7890
|
InputWrapper,
|
|
7882
7891
|
{
|
|
7883
|
-
paddingLeft: 3,
|
|
7884
|
-
paddingRight: 3,
|
|
7885
|
-
paddingTop: 2,
|
|
7886
|
-
paddingBottom: 2,
|
|
7887
7892
|
gap: 2,
|
|
7888
7893
|
justifyContent: "space-between",
|
|
7889
7894
|
$hasError: hasError || hasErrorProp,
|
|
7890
7895
|
$disabled: disabled,
|
|
7896
|
+
$size: size,
|
|
7897
|
+
$hasLeftAction: Boolean(startAction),
|
|
7898
|
+
$hasRightAction: Boolean(endAction),
|
|
7891
7899
|
className,
|
|
7892
7900
|
children: [
|
|
7893
7901
|
startAction,
|
|
@@ -7897,13 +7905,12 @@ const Input$2 = React__namespace.forwardRef(
|
|
|
7897
7905
|
id,
|
|
7898
7906
|
name,
|
|
7899
7907
|
ref,
|
|
7908
|
+
$size: size,
|
|
7900
7909
|
"aria-describedby": ariaDescription,
|
|
7901
7910
|
"aria-invalid": hasError || hasErrorProp,
|
|
7902
7911
|
"aria-disabled": disabled,
|
|
7903
7912
|
disabled,
|
|
7904
7913
|
"data-disabled": disabled ? "" : void 0,
|
|
7905
|
-
$hasLeftAction: Boolean(startAction),
|
|
7906
|
-
$hasRightAction: Boolean(endAction),
|
|
7907
7914
|
onChange: handleChange,
|
|
7908
7915
|
"aria-required": required || requiredProp,
|
|
7909
7916
|
...props
|
|
@@ -7928,6 +7935,19 @@ const InputElement = styledComponents.styled.input`
|
|
|
7928
7935
|
width: 100%;
|
|
7929
7936
|
background: inherit;
|
|
7930
7937
|
|
|
7938
|
+
${(props) => {
|
|
7939
|
+
switch (props.$size) {
|
|
7940
|
+
case "S":
|
|
7941
|
+
return styledComponents.css`
|
|
7942
|
+
padding-block: ${props.theme.spaces[1]};
|
|
7943
|
+
`;
|
|
7944
|
+
default:
|
|
7945
|
+
return styledComponents.css`
|
|
7946
|
+
padding-block: ${props.theme.spaces[2]};
|
|
7947
|
+
`;
|
|
7948
|
+
}
|
|
7949
|
+
}};
|
|
7950
|
+
|
|
7931
7951
|
::placeholder {
|
|
7932
7952
|
color: ${({ theme }) => theme.colors.neutral500};
|
|
7933
7953
|
opacity: 1;
|
|
@@ -7949,6 +7969,21 @@ const InputWrapper = styledComponents.styled(Flex)`
|
|
|
7949
7969
|
background: ${({ theme }) => theme.colors.neutral0};
|
|
7950
7970
|
${inputFocusStyle()}
|
|
7951
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
|
+
|
|
7952
7987
|
${({ theme, $disabled }) => $disabled ? styledComponents.css`
|
|
7953
7988
|
color: ${theme.colors.neutral600};
|
|
7954
7989
|
background: ${theme.colors.neutral150};
|
|
@@ -8131,6 +8166,7 @@ const Combobox = React__namespace.forwardRef(
|
|
|
8131
8166
|
onLoadMore,
|
|
8132
8167
|
placeholder = "Select or enter a value",
|
|
8133
8168
|
required: requiredProp = false,
|
|
8169
|
+
size = "M",
|
|
8134
8170
|
startIcon,
|
|
8135
8171
|
textValue,
|
|
8136
8172
|
value,
|
|
@@ -8230,7 +8266,7 @@ const Combobox = React__namespace.forwardRef(
|
|
|
8230
8266
|
onFilterValueChange: handleFilterValueChange,
|
|
8231
8267
|
isPrintableCharacter: isPrintableCharacter2,
|
|
8232
8268
|
children: [
|
|
8233
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Trigger$5, { $hasError: hasError, className, children: [
|
|
8269
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Trigger$5, { $hasError: hasError, $size: size, className, children: [
|
|
8234
8270
|
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { flex: "1", tag: "span", gap: 3, children: [
|
|
8235
8271
|
startIcon ? /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "0 0 1.6rem", tag: "span", "aria-hidden": true, children: startIcon }) : null,
|
|
8236
8272
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8295,10 +8331,6 @@ const IconBox$3 = styledComponents.styled(Box)`
|
|
|
8295
8331
|
const Trigger$5 = styledComponents.styled(uiPrimitives.Combobox.Trigger)`
|
|
8296
8332
|
position: relative;
|
|
8297
8333
|
border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
|
|
8298
|
-
padding-right: ${({ theme }) => theme.spaces[3]};
|
|
8299
|
-
padding-left: ${({ theme }) => theme.spaces[3]};
|
|
8300
|
-
padding-top: ${({ theme }) => theme.spaces[2]};
|
|
8301
|
-
padding-bottom: ${({ theme }) => theme.spaces[2]};
|
|
8302
8334
|
border-radius: ${({ theme }) => theme.borderRadius};
|
|
8303
8335
|
background: ${({ theme }) => theme.colors.neutral0};
|
|
8304
8336
|
overflow: hidden;
|
|
@@ -8307,6 +8339,23 @@ const Trigger$5 = styledComponents.styled(uiPrimitives.Combobox.Trigger)`
|
|
|
8307
8339
|
justify-content: space-between;
|
|
8308
8340
|
gap: ${({ theme }) => theme.spaces[4]};
|
|
8309
8341
|
|
|
8342
|
+
${(props) => {
|
|
8343
|
+
switch (props.$size) {
|
|
8344
|
+
case "S":
|
|
8345
|
+
return styledComponents.css`
|
|
8346
|
+
padding-inline-start: ${({ theme }) => theme.spaces[4]};
|
|
8347
|
+
padding-inline-end: ${({ theme }) => theme.spaces[3]};
|
|
8348
|
+
padding-block: ${({ theme }) => theme.spaces[1]};
|
|
8349
|
+
`;
|
|
8350
|
+
default:
|
|
8351
|
+
return styledComponents.css`
|
|
8352
|
+
padding-inline-start: ${({ theme }) => theme.spaces[4]};
|
|
8353
|
+
padding-inline-end: ${({ theme }) => theme.spaces[3]};
|
|
8354
|
+
padding-block: ${({ theme }) => theme.spaces[2]};
|
|
8355
|
+
`;
|
|
8356
|
+
}
|
|
8357
|
+
}}
|
|
8358
|
+
|
|
8310
8359
|
&[data-disabled] {
|
|
8311
8360
|
color: ${({ theme }) => theme.colors.neutral600};
|
|
8312
8361
|
background: ${({ theme }) => theme.colors.neutral150};
|
|
@@ -8465,19 +8514,7 @@ const ContentImpl$1 = styledComponents.styled(AlertDialog__namespace.Content)`
|
|
|
8465
8514
|
}
|
|
8466
8515
|
`;
|
|
8467
8516
|
const Header$1 = React__namespace.forwardRef(({ children, ...restProps }, forwardedRef) => {
|
|
8468
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AlertDialog__namespace.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8469
|
-
Title$1,
|
|
8470
|
-
{
|
|
8471
|
-
tag: "h2",
|
|
8472
|
-
ref: forwardedRef,
|
|
8473
|
-
padding: 6,
|
|
8474
|
-
justifyContent: "center",
|
|
8475
|
-
variant: "h2",
|
|
8476
|
-
fontWeight: "bold",
|
|
8477
|
-
...restProps,
|
|
8478
|
-
children
|
|
8479
|
-
}
|
|
8480
|
-
) });
|
|
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 }) });
|
|
8481
8518
|
});
|
|
8482
8519
|
const Title$1 = styledComponents.styled(Typography)`
|
|
8483
8520
|
display: flex;
|
|
@@ -8651,8 +8688,7 @@ ${styledComponents.css`
|
|
|
8651
8688
|
img,
|
|
8652
8689
|
picture,
|
|
8653
8690
|
video,
|
|
8654
|
-
canvas
|
|
8655
|
-
svg {
|
|
8691
|
+
canvas {
|
|
8656
8692
|
display: block;
|
|
8657
8693
|
max-width: 100%;
|
|
8658
8694
|
}
|
|
@@ -8767,7 +8803,7 @@ const Portal$1 = React__namespace.forwardRef(
|
|
|
8767
8803
|
);
|
|
8768
8804
|
Portal$1.displayName = "Portal";
|
|
8769
8805
|
const SelectTrigger = React__namespace.forwardRef(
|
|
8770
|
-
({ onClear, clearLabel = "Clear", startIcon, disabled, hasError, children, id, ...restProps }, ref) => {
|
|
8806
|
+
({ onClear, clearLabel = "Clear", startIcon, disabled, hasError, children, id, size = "M", withTags, ...restProps }, ref) => {
|
|
8771
8807
|
const triggerRef = React__namespace.useRef(null);
|
|
8772
8808
|
const handleClearClick = (e) => {
|
|
8773
8809
|
if (onClear && !disabled) {
|
|
@@ -8789,13 +8825,11 @@ const SelectTrigger = React__namespace.forwardRef(
|
|
|
8789
8825
|
overflow: "hidden",
|
|
8790
8826
|
hasRadius: true,
|
|
8791
8827
|
background: disabled ? "neutral150" : "neutral0",
|
|
8792
|
-
paddingLeft: 3,
|
|
8793
|
-
paddingRight: 3,
|
|
8794
|
-
paddingTop: 2,
|
|
8795
|
-
paddingBottom: 2,
|
|
8796
8828
|
gap: 4,
|
|
8797
8829
|
cursor: "default",
|
|
8798
8830
|
"aria-labelledby": labelNode ? `${id}-label` : void 0,
|
|
8831
|
+
$size: size,
|
|
8832
|
+
$withTags: withTags,
|
|
8799
8833
|
...restProps,
|
|
8800
8834
|
children: [
|
|
8801
8835
|
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { flex: "1", tag: "span", gap: 3, children: [
|
|
@@ -8840,6 +8874,22 @@ const IconBox$2 = styledComponents.styled(Box)`
|
|
|
8840
8874
|
`;
|
|
8841
8875
|
const StyledTrigger = styledComponents.styled(Flex)`
|
|
8842
8876
|
border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
|
|
8877
|
+
${(props) => {
|
|
8878
|
+
switch (props.$size) {
|
|
8879
|
+
case "S":
|
|
8880
|
+
return styledComponents.css`
|
|
8881
|
+
padding-block: ${props.theme.spaces[1]};
|
|
8882
|
+
padding-inline-start: ${props.$withTags ? props.theme.spaces[1] : props.theme.spaces[4]};
|
|
8883
|
+
padding-inline-end: ${props.theme.spaces[3]};
|
|
8884
|
+
`;
|
|
8885
|
+
default:
|
|
8886
|
+
return styledComponents.css`
|
|
8887
|
+
padding-block: ${props.$withTags ? "0.3rem" : props.theme.spaces[2]};
|
|
8888
|
+
padding-inline-start: ${props.$withTags ? props.theme.spaces[1] : props.theme.spaces[4]};
|
|
8889
|
+
padding-inline-end: ${props.theme.spaces[3]};
|
|
8890
|
+
`;
|
|
8891
|
+
}
|
|
8892
|
+
}}
|
|
8843
8893
|
|
|
8844
8894
|
&[aria-disabled='true'] {
|
|
8845
8895
|
color: ${(props) => props.theme.colors.neutral600};
|
|
@@ -8874,8 +8924,7 @@ const SelectContent = styledComponents.styled(uiPrimitives.Select.Content)`
|
|
|
8874
8924
|
border: 1px solid ${({ theme }) => theme.colors.neutral150};
|
|
8875
8925
|
border-radius: ${({ theme }) => theme.borderRadius};
|
|
8876
8926
|
min-width: var(--radix-select-trigger-width);
|
|
8877
|
-
|
|
8878
|
-
max-height: 15rem;
|
|
8927
|
+
max-height: 15.6rem;
|
|
8879
8928
|
z-index: ${({ theme }) => theme.zIndices.popover};
|
|
8880
8929
|
|
|
8881
8930
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -8959,6 +9008,7 @@ const SingleSelect = React__namespace.forwardRef(
|
|
|
8959
9008
|
onReachEnd,
|
|
8960
9009
|
placeholder,
|
|
8961
9010
|
required: requiredProp,
|
|
9011
|
+
size,
|
|
8962
9012
|
startIcon,
|
|
8963
9013
|
value: passedValue,
|
|
8964
9014
|
...restProps
|
|
@@ -9034,6 +9084,7 @@ const SingleSelect = React__namespace.forwardRef(
|
|
|
9034
9084
|
onClear: value && onClear ? handleOnClear : void 0,
|
|
9035
9085
|
"aria-label": restProps["aria-label"],
|
|
9036
9086
|
"aria-describedby": ariaDescription ?? restProps["aria-describedby"],
|
|
9087
|
+
size,
|
|
9037
9088
|
children: /* @__PURE__ */ jsxRuntime.jsx(Value, { placeholder, textColor: value ? "neutral800" : "neutral600", children: value && customizeContent ? customizeContent(value) : void 0 })
|
|
9038
9089
|
}
|
|
9039
9090
|
),
|
|
@@ -9050,7 +9101,7 @@ const SingleSelectOption = React__namespace.forwardRef(
|
|
|
9050
9101
|
({ value, startIcon, children, ...restProps }, ref) => {
|
|
9051
9102
|
return /* @__PURE__ */ jsxRuntime.jsxs(Item$2, { ref, value: value.toString(), ...restProps, children: [
|
|
9052
9103
|
startIcon && /* @__PURE__ */ jsxRuntime.jsx(Box, { tag: "span", "aria-hidden": true, children: startIcon }),
|
|
9053
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { children: /* @__PURE__ */ jsxRuntime.jsx(ItemText, { children }) })
|
|
9104
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { lineHeight: "20px", children: /* @__PURE__ */ jsxRuntime.jsx(ItemText, { children }) })
|
|
9054
9105
|
] });
|
|
9055
9106
|
}
|
|
9056
9107
|
);
|
|
@@ -9082,6 +9133,7 @@ const DatePicker$1 = React__namespace.forwardRef(
|
|
|
9082
9133
|
required: requiredProp = false,
|
|
9083
9134
|
onClear,
|
|
9084
9135
|
clearLabel = "Clear",
|
|
9136
|
+
size = "M",
|
|
9085
9137
|
...restProps
|
|
9086
9138
|
}, ref) => {
|
|
9087
9139
|
const timeZone = date.getLocalTimeZone();
|
|
@@ -9192,7 +9244,7 @@ const DatePicker$1 = React__namespace.forwardRef(
|
|
|
9192
9244
|
trigger,
|
|
9193
9245
|
value,
|
|
9194
9246
|
children: [
|
|
9195
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DatePickerTrigger, { className, hasError, children: [
|
|
9247
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DatePickerTrigger, { className, hasError, size, children: [
|
|
9196
9248
|
/* @__PURE__ */ jsxRuntime.jsx(icons.Calendar, { fill: "neutral500", "aria-hidden": true }),
|
|
9197
9249
|
/* @__PURE__ */ jsxRuntime.jsx(DatePickerTextInput, { ref, "aria-describedby": ariaDescription, id, name, ...restProps }),
|
|
9198
9250
|
textValue && onClear ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9238,7 +9290,7 @@ const makeInitialCalendarDate = ({ currentValue, minDate, maxDate }) => {
|
|
|
9238
9290
|
};
|
|
9239
9291
|
const DATE_PICKER_TRIGGER_NAME = "DatePickerTrigger";
|
|
9240
9292
|
const DatePickerTrigger = React__namespace.forwardRef(
|
|
9241
|
-
({ hasError, ...restProps }, forwardedRef) => {
|
|
9293
|
+
({ hasError, size, ...restProps }, forwardedRef) => {
|
|
9242
9294
|
const context = useDatePickerContext(DATE_PICKER_TRIGGER_NAME);
|
|
9243
9295
|
const composedRefs = useComposedRefs(forwardedRef, (node) => context.onTriggerChange(node));
|
|
9244
9296
|
const handleOpenChange = () => {
|
|
@@ -9263,9 +9315,8 @@ const DatePickerTrigger = React__namespace.forwardRef(
|
|
|
9263
9315
|
{
|
|
9264
9316
|
ref: composedRefs,
|
|
9265
9317
|
$hasError: hasError,
|
|
9318
|
+
$size: size,
|
|
9266
9319
|
...restProps,
|
|
9267
|
-
paddingLeft: 3,
|
|
9268
|
-
paddingRight: 3,
|
|
9269
9320
|
hasRadius: true,
|
|
9270
9321
|
gap: 3,
|
|
9271
9322
|
overflow: "hidden",
|
|
@@ -9295,7 +9346,20 @@ const DatePickerTrigger = React__namespace.forwardRef(
|
|
|
9295
9346
|
);
|
|
9296
9347
|
const TriggerElement = styledComponents.styled(Flex)`
|
|
9297
9348
|
border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
|
|
9298
|
-
|
|
9349
|
+
${(props) => {
|
|
9350
|
+
switch (props.$size) {
|
|
9351
|
+
case "S":
|
|
9352
|
+
return styledComponents.css`
|
|
9353
|
+
padding-block: ${props.theme.spaces[1]};
|
|
9354
|
+
padding-inline: ${props.theme.spaces[3]};
|
|
9355
|
+
`;
|
|
9356
|
+
default:
|
|
9357
|
+
return styledComponents.css`
|
|
9358
|
+
padding-block: ${props.theme.spaces[2]};
|
|
9359
|
+
padding-inline: ${props.theme.spaces[3]};
|
|
9360
|
+
`;
|
|
9361
|
+
}
|
|
9362
|
+
}}
|
|
9299
9363
|
|
|
9300
9364
|
& > svg {
|
|
9301
9365
|
flex: 1 0 auto;
|
|
@@ -9912,6 +9976,7 @@ const DateTimePicker = React__namespace.forwardRef(
|
|
|
9912
9976
|
step,
|
|
9913
9977
|
value,
|
|
9914
9978
|
initialDate,
|
|
9979
|
+
size,
|
|
9915
9980
|
...props
|
|
9916
9981
|
}, forwardedRef) => {
|
|
9917
9982
|
const DatePickerElement2 = React__namespace.useRef(null);
|
|
@@ -9971,6 +10036,7 @@ const DateTimePicker = React__namespace.forwardRef(
|
|
|
9971
10036
|
DatePicker,
|
|
9972
10037
|
{
|
|
9973
10038
|
...props,
|
|
10039
|
+
size,
|
|
9974
10040
|
value: dateValue?.toDate("UTC"),
|
|
9975
10041
|
onChange: handleDateChange,
|
|
9976
10042
|
required,
|
|
@@ -9984,6 +10050,7 @@ const DateTimePicker = React__namespace.forwardRef(
|
|
|
9984
10050
|
/* @__PURE__ */ jsxRuntime.jsx(Root$6, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9985
10051
|
TimePicker,
|
|
9986
10052
|
{
|
|
10053
|
+
size,
|
|
9987
10054
|
hasError,
|
|
9988
10055
|
value: timeValue,
|
|
9989
10056
|
onChange: handleTimeChange,
|
|
@@ -10030,30 +10097,27 @@ const EmptyStateIconWrapper = styledComponents.styled(Box)`
|
|
|
10030
10097
|
height: 8.8rem;
|
|
10031
10098
|
}
|
|
10032
10099
|
`;
|
|
10033
|
-
const EmptyStateLayout = (
|
|
10034
|
-
icon,
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
}
|
|
10055
|
-
);
|
|
10056
|
-
};
|
|
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
|
+
);
|
|
10057
10121
|
const getFocusableNodes = (node, includeNegativeTabIndex) => {
|
|
10058
10122
|
const nodes = [
|
|
10059
10123
|
...node.querySelectorAll(
|
|
@@ -10139,7 +10203,7 @@ const Wrapper$1 = styledComponents.styled(Box)`
|
|
|
10139
10203
|
const ItemImpl = forwardRef(
|
|
10140
10204
|
({ col, s, xs, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(Item$1, { ref: forwardedRef, $col: col, $s: s, $xs: xs, ...props })
|
|
10141
10205
|
);
|
|
10142
|
-
const Item$1 = styledComponents.styled(
|
|
10206
|
+
const Item$1 = styledComponents.styled(Flex)`
|
|
10143
10207
|
grid-column: span ${({ $col }) => $col ?? 1};
|
|
10144
10208
|
max-width: 100%;
|
|
10145
10209
|
|
|
@@ -10156,10 +10220,6 @@ const Grid = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
10156
10220
|
Item: ItemImpl,
|
|
10157
10221
|
Root: Root$3
|
|
10158
10222
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
10159
|
-
const VARIANT_DEFAULT = "tertiary";
|
|
10160
|
-
const VARIANT_SECONDARY = "secondary";
|
|
10161
|
-
const SIZES = ["S", "M", "L"];
|
|
10162
|
-
const VARIANTS = [VARIANT_DEFAULT, VARIANT_SECONDARY];
|
|
10163
10223
|
const IconButton = forwardRef(
|
|
10164
10224
|
({
|
|
10165
10225
|
label,
|
|
@@ -10167,8 +10227,8 @@ const IconButton = forwardRef(
|
|
|
10167
10227
|
children,
|
|
10168
10228
|
disabled = false,
|
|
10169
10229
|
onClick,
|
|
10170
|
-
size =
|
|
10171
|
-
variant: variant2 =
|
|
10230
|
+
size = "M",
|
|
10231
|
+
variant: variant2 = "tertiary",
|
|
10172
10232
|
withTooltip = true,
|
|
10173
10233
|
...restProps
|
|
10174
10234
|
}, ref) => {
|
|
@@ -10182,7 +10242,11 @@ const IconButton = forwardRef(
|
|
|
10182
10242
|
{
|
|
10183
10243
|
"aria-disabled": disabled,
|
|
10184
10244
|
background: disabled ? "neutral150" : background,
|
|
10245
|
+
tag: "button",
|
|
10246
|
+
display: "inline-flex",
|
|
10185
10247
|
justifyContent: "center",
|
|
10248
|
+
hasRadius: true,
|
|
10249
|
+
cursor: "pointer",
|
|
10186
10250
|
...restProps,
|
|
10187
10251
|
ref,
|
|
10188
10252
|
$size: size,
|
|
@@ -10194,43 +10258,56 @@ const IconButton = forwardRef(
|
|
|
10194
10258
|
return withTooltip ? /* @__PURE__ */ jsxRuntime.jsx(TooltipImpl, { label, children: component }) : component;
|
|
10195
10259
|
}
|
|
10196
10260
|
);
|
|
10197
|
-
const IconButtonWrapper = styledComponents.styled(
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
|
|
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
|
+
}
|
|
10215
10284
|
}
|
|
10216
|
-
|
|
10217
|
-
}
|
|
10285
|
+
}}
|
|
10286
|
+
${getVariantStyle}
|
|
10287
|
+
${(props) => props.$variant === "tertiary" ? styledComponents.css`
|
|
10288
|
+
color: ${props.theme.colors.neutral600};
|
|
10289
|
+
` : ""}
|
|
10218
10290
|
|
|
10219
|
-
&:hover
|
|
10220
|
-
|
|
10221
|
-
color: ${({ theme, $variant }) => {
|
|
10222
|
-
if ($variant === VARIANT_SECONDARY) {
|
|
10223
|
-
return theme.colors.primary600;
|
|
10291
|
+
&:hover {
|
|
10292
|
+
${getHoverStyle}
|
|
10224
10293
|
}
|
|
10225
|
-
|
|
10226
|
-
|
|
10294
|
+
|
|
10295
|
+
&:active {
|
|
10296
|
+
${getActiveStyle}
|
|
10227
10297
|
}
|
|
10228
10298
|
|
|
10229
10299
|
&[aria-disabled='true'] {
|
|
10230
|
-
|
|
10300
|
+
${getDisabledStyle}
|
|
10231
10301
|
}
|
|
10232
|
-
|
|
10233
|
-
|
|
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};
|
|
10308
|
+
}
|
|
10309
|
+
`;
|
|
10310
|
+
const IconButtonGroup = styledComponents.styled(Flex)`
|
|
10234
10311
|
& ${IconButtonWrapper}:first-child {
|
|
10235
10312
|
border-radius: ${({ theme }) => `${theme.borderRadius} 0 0 ${theme.borderRadius}`};
|
|
10236
10313
|
}
|
|
@@ -10241,25 +10318,10 @@ const IconButtonGroup = styledComponents.styled(Flex)`
|
|
|
10241
10318
|
|
|
10242
10319
|
& ${IconButtonWrapper} {
|
|
10243
10320
|
border-radius: 0;
|
|
10244
|
-
color: ${({ theme }) => theme.colors.neutral700};
|
|
10245
10321
|
|
|
10246
10322
|
& + ${IconButtonWrapper} {
|
|
10247
10323
|
border-left: none;
|
|
10248
10324
|
}
|
|
10249
|
-
|
|
10250
|
-
&:hover {
|
|
10251
|
-
background-color: ${({ theme }) => theme.colors.neutral100};
|
|
10252
|
-
color: ${({ theme }) => theme.colors.neutral800};
|
|
10253
|
-
}
|
|
10254
|
-
|
|
10255
|
-
&:active {
|
|
10256
|
-
background-color: ${({ theme }) => theme.colors.neutral150};
|
|
10257
|
-
color: ${({ theme }) => theme.colors.neutral900};
|
|
10258
|
-
}
|
|
10259
|
-
|
|
10260
|
-
&[aria-disabled='true'] {
|
|
10261
|
-
color: ${({ theme }) => theme.colors.neutral600};
|
|
10262
|
-
}
|
|
10263
10325
|
}
|
|
10264
10326
|
`;
|
|
10265
10327
|
const addMarks = state.StateEffect.define();
|
|
@@ -10439,62 +10501,19 @@ const JSONInputContainer = styledComponents.styled(Flex)`
|
|
|
10439
10501
|
}
|
|
10440
10502
|
`;
|
|
10441
10503
|
const LinkButton = forwardRef(
|
|
10442
|
-
({
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10446
|
-
LinkWrapper$1,
|
|
10504
|
+
({ disabled, ...restProps }, ref) => {
|
|
10505
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10506
|
+
Button,
|
|
10447
10507
|
{
|
|
10448
10508
|
ref,
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
hasRadius: true,
|
|
10454
|
-
display: "inline-flex",
|
|
10455
|
-
paddingBottom: paddingX,
|
|
10456
|
-
paddingLeft: paddingY,
|
|
10457
|
-
paddingRight: paddingY,
|
|
10458
|
-
paddingTop: paddingX,
|
|
10459
|
-
pointerEvents: disabled ? "none" : void 0,
|
|
10460
|
-
...props,
|
|
10461
|
-
children: [
|
|
10462
|
-
startIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { "aria-hidden": true, children: startIcon }),
|
|
10463
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: size === "S" ? "pi" : void 0, fontWeight: "bold", textColor: "buttonNeutral0", children }),
|
|
10464
|
-
endIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { "aria-hidden": true, children: endIcon })
|
|
10465
|
-
]
|
|
10509
|
+
tag: BaseLinkImpl,
|
|
10510
|
+
tabIndex: disabled ? -1 : void 0,
|
|
10511
|
+
disabled,
|
|
10512
|
+
...restProps
|
|
10466
10513
|
}
|
|
10467
10514
|
);
|
|
10468
10515
|
}
|
|
10469
10516
|
);
|
|
10470
|
-
const LinkWrapper$1 = styledComponents.styled(BaseLink)`
|
|
10471
|
-
gap: ${({ theme }) => theme.spaces[2]};
|
|
10472
|
-
|
|
10473
|
-
${focus}
|
|
10474
|
-
|
|
10475
|
-
&[aria-disabled='true'] {
|
|
10476
|
-
pointer-events: none;
|
|
10477
|
-
}
|
|
10478
|
-
|
|
10479
|
-
text-decoration: none;
|
|
10480
|
-
|
|
10481
|
-
&[aria-disabled='true'] {
|
|
10482
|
-
${getDisabledStyle}
|
|
10483
|
-
&:active {
|
|
10484
|
-
${getDisabledStyle}
|
|
10485
|
-
}
|
|
10486
|
-
}
|
|
10487
|
-
|
|
10488
|
-
&:hover {
|
|
10489
|
-
${getHoverStyle}
|
|
10490
|
-
}
|
|
10491
|
-
|
|
10492
|
-
&:active {
|
|
10493
|
-
${getActiveStyle}
|
|
10494
|
-
}
|
|
10495
|
-
|
|
10496
|
-
${getVariantStyle}
|
|
10497
|
-
`;
|
|
10498
10517
|
const MainWrapper = styledComponents.styled(Box)`
|
|
10499
10518
|
// To prevent global outline on focus visible to force an outline when Main is focused
|
|
10500
10519
|
&:focus-visible {
|
|
@@ -10530,6 +10549,7 @@ const SkipToContent = ({ children }) => {
|
|
|
10530
10549
|
}
|
|
10531
10550
|
);
|
|
10532
10551
|
};
|
|
10552
|
+
const setOpacity = (hex, alpha) => `${hex}${Math.floor(alpha * 255).toString(16).padStart(2, "0")}`;
|
|
10533
10553
|
const ScrollAreaImpl$1 = React__namespace.forwardRef(
|
|
10534
10554
|
({ children, viewportRef, ...restProps }, forwardedRef) => {
|
|
10535
10555
|
return /* @__PURE__ */ jsxRuntime.jsxs(ScrollAreaRoot, { ref: forwardedRef, ...restProps, children: [
|
|
@@ -10547,7 +10567,7 @@ const ScrollAreaRoot = styledComponents.styled(ScrollArea__namespace.Root)`
|
|
|
10547
10567
|
`;
|
|
10548
10568
|
const ScrollAreaViewport = styledComponents.styled(ScrollArea__namespace.Viewport)`
|
|
10549
10569
|
min-width: 100%;
|
|
10550
|
-
padding-inline
|
|
10570
|
+
padding-inline: 4px;
|
|
10551
10571
|
`;
|
|
10552
10572
|
const Scrollbar = styledComponents.styled(ScrollArea__namespace.Scrollbar)`
|
|
10553
10573
|
display: flex;
|
|
@@ -10589,17 +10609,13 @@ const Trigger$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
10589
10609
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Trigger, { ...props, asChild: true, ref: forwardedRef });
|
|
10590
10610
|
});
|
|
10591
10611
|
const Content$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
10592
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
10593
|
-
/* @__PURE__ */ jsxRuntime.jsx(Overlay, {}),
|
|
10594
|
-
/* @__PURE__ */ jsxRuntime.jsx(ContentImpl, { ref: forwardedRef, ...props })
|
|
10595
|
-
] });
|
|
10612
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(Overlay, { children: /* @__PURE__ */ jsxRuntime.jsx(ContentImpl, { ref: forwardedRef, ...props }) }) });
|
|
10596
10613
|
});
|
|
10597
10614
|
const Overlay = styledComponents.styled(Dialog__namespace.Overlay)`
|
|
10598
|
-
background
|
|
10615
|
+
background: ${(props) => setOpacity(props.theme.colors.neutral800, 0.2)};
|
|
10599
10616
|
position: fixed;
|
|
10600
10617
|
inset: 0;
|
|
10601
10618
|
z-index: ${(props) => props.theme.zIndices.overlay};
|
|
10602
|
-
opacity: 0.2;
|
|
10603
10619
|
|
|
10604
10620
|
@media (prefers-reduced-motion: no-preference) {
|
|
10605
10621
|
animation: ${ANIMATIONS.overlayFadeIn} ${(props) => props.theme.motion.timings["200"]}
|
|
@@ -10794,7 +10810,7 @@ const NumberInput = React__namespace.forwardRef(
|
|
|
10794
10810
|
onKeyDown: handleKeyDown,
|
|
10795
10811
|
onBlur: handleBlur,
|
|
10796
10812
|
value: inputValue,
|
|
10797
|
-
endAction: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10813
|
+
endAction: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", children: [
|
|
10798
10814
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10799
10815
|
ArrowButton,
|
|
10800
10816
|
{
|
|
@@ -10828,13 +10844,14 @@ const NumberInput = React__namespace.forwardRef(
|
|
|
10828
10844
|
);
|
|
10829
10845
|
const ArrowButton = styledComponents.styled.button`
|
|
10830
10846
|
display: flex;
|
|
10831
|
-
|
|
10832
|
-
align-items:
|
|
10847
|
+
justify-content: center;
|
|
10848
|
+
align-items: center;
|
|
10833
10849
|
transform: translateY(${({ $reverse }) => $reverse ? `-2px` : `2px`});
|
|
10834
10850
|
cursor: ${({ disabled }) => disabled ? "not-allowed" : void 0};
|
|
10851
|
+
height: 1.1rem;
|
|
10852
|
+
|
|
10835
10853
|
svg {
|
|
10836
|
-
|
|
10837
|
-
height: 0.4rem;
|
|
10854
|
+
width: 1.2rem;
|
|
10838
10855
|
transform: ${({ $reverse }) => $reverse ? "rotateX(180deg)" : void 0};
|
|
10839
10856
|
}
|
|
10840
10857
|
`;
|
|
@@ -10897,7 +10914,7 @@ const NextLink = forwardRef(
|
|
|
10897
10914
|
] });
|
|
10898
10915
|
}
|
|
10899
10916
|
);
|
|
10900
|
-
const LinkWrapper = styledComponents.styled(
|
|
10917
|
+
const LinkWrapper = styledComponents.styled(BaseLinkImpl)`
|
|
10901
10918
|
padding: ${({ theme }) => theme.spaces[3]};
|
|
10902
10919
|
border-radius: ${({ theme }) => theme.borderRadius};
|
|
10903
10920
|
box-shadow: ${({ $active, theme }) => $active ? theme.shadows.filterShadow : void 0};
|
|
@@ -10987,19 +11004,22 @@ const PopoverContent = styledComponents.styled(Popover__namespace.Content)`
|
|
|
10987
11004
|
}
|
|
10988
11005
|
}
|
|
10989
11006
|
`;
|
|
10990
|
-
const ScrollAreaImpl = (
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
|
|
10995
|
-
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
}
|
|
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
|
+
);
|
|
11003
11023
|
const PopoverScrollArea = styledComponents.styled(ScrollAreaImpl$1)`
|
|
11004
11024
|
height: 20rem;
|
|
11005
11025
|
`;
|
|
@@ -11010,36 +11030,34 @@ const Popover = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
11010
11030
|
ScrollArea: ScrollAreaImpl,
|
|
11011
11031
|
Trigger: Trigger$1
|
|
11012
11032
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
11013
|
-
const
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
|
|
11033
|
+
const ProgressBar = React__namespace.forwardRef(
|
|
11034
|
+
({ size = "M", value, ...restProps }, forwardedRef) => {
|
|
11035
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ProgressRoot, { ref: forwardedRef, $size: size, ...restProps, children: /* @__PURE__ */ jsxRuntime.jsx(ProgressIndicator, { style: { transform: `translate3D(-${100 - (value ?? 0)}%, 0, 0)` } }) });
|
|
11036
|
+
}
|
|
11037
|
+
);
|
|
11038
|
+
const ProgressRoot = styledComponents.styled(Progress__namespace.Root)`
|
|
11039
|
+
position: relative;
|
|
11040
|
+
overflow: hidden;
|
|
11041
|
+
width: ${(props) => props.$size === "S" ? "7.8rem" : "10.2rem"};
|
|
11042
|
+
height: ${(props) => props.$size === "S" ? "0.4rem" : "0.8rem"};
|
|
11043
|
+
background-color: ${(props) => props.theme.colors.neutral600};
|
|
11044
|
+
border-radius: ${(props) => props.theme.borderRadius};
|
|
11045
|
+
|
|
11046
|
+
/* Fix overflow clipping in Safari */
|
|
11047
|
+
/* https://gist.github.com/domske/b66047671c780a238b51c51ffde8d3a0 */
|
|
11048
|
+
transform: translateZ(0);
|
|
11049
|
+
`;
|
|
11050
|
+
const ProgressIndicator = styledComponents.styled(Progress__namespace.Indicator)`
|
|
11051
|
+
background-color: ${({ theme }) => theme.colors.neutral0};
|
|
11052
|
+
border-radius: ${({ theme }) => theme.borderRadius};
|
|
11053
|
+
width: 100%;
|
|
11054
|
+
height: 100%;
|
|
11055
|
+
|
|
11056
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
11057
|
+
transition: transform ${(props) => props.theme.motion.timings["320"]}
|
|
11058
|
+
${(props) => props.theme.motion.easings.authenticMotion};
|
|
11022
11059
|
}
|
|
11023
11060
|
`;
|
|
11024
|
-
const ProgressBar = ({ min = 0, max = 100, value = 0, children, size = "M", ...props }) => {
|
|
11025
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11026
|
-
ProgressbarBase,
|
|
11027
|
-
{
|
|
11028
|
-
background: "neutral600",
|
|
11029
|
-
hasRadius: true,
|
|
11030
|
-
"aria-label": children,
|
|
11031
|
-
"aria-valuemax": max,
|
|
11032
|
-
"aria-valuemin": min,
|
|
11033
|
-
"aria-valuenow": value,
|
|
11034
|
-
height: size === "S" ? 1 : 2,
|
|
11035
|
-
position: "relative",
|
|
11036
|
-
role: "progressbar",
|
|
11037
|
-
$value: value,
|
|
11038
|
-
width: size === "S" ? "78px" : "102px",
|
|
11039
|
-
...props
|
|
11040
|
-
}
|
|
11041
|
-
);
|
|
11042
|
-
};
|
|
11043
11061
|
const Group = React__namespace.forwardRef((props, forwardedRef) => {
|
|
11044
11062
|
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupRoot, { ref: forwardedRef, ...props });
|
|
11045
11063
|
});
|
|
@@ -11133,172 +11151,171 @@ const RawTableContext = React__namespace.createContext({
|
|
|
11133
11151
|
}
|
|
11134
11152
|
});
|
|
11135
11153
|
const useTable = () => React__namespace.useContext(RawTableContext);
|
|
11136
|
-
const RawTable = (
|
|
11137
|
-
colCount,
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
}) => {
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
setRowIndex(rowIndex2);
|
|
11151
|
-
}, []);
|
|
11152
|
-
React__namespace.useEffect(() => {
|
|
11153
|
-
if (mountedRef.current) {
|
|
11154
|
-
focusFocusable(tableRef.current);
|
|
11155
|
-
}
|
|
11156
|
-
if (!mountedRef.current) {
|
|
11157
|
-
mountedRef.current = true;
|
|
11158
|
-
}
|
|
11159
|
-
}, [colIndex, rowIndex]);
|
|
11160
|
-
const handleKeyDown = (e) => {
|
|
11161
|
-
switch (e.key) {
|
|
11162
|
-
case KeyboardKeys.RIGHT: {
|
|
11163
|
-
e.preventDefault();
|
|
11164
|
-
setColIndex((prevColIndex) => prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex);
|
|
11165
|
-
break;
|
|
11166
|
-
}
|
|
11167
|
-
case KeyboardKeys.LEFT: {
|
|
11168
|
-
e.preventDefault();
|
|
11169
|
-
setColIndex((prevColIndex) => prevColIndex > 0 ? prevColIndex - 1 : prevColIndex);
|
|
11170
|
-
break;
|
|
11171
|
-
}
|
|
11172
|
-
case KeyboardKeys.UP: {
|
|
11173
|
-
e.preventDefault();
|
|
11174
|
-
setRowIndex((prevRowIndex) => prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex);
|
|
11175
|
-
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);
|
|
11176
11168
|
}
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
setRowIndex((prevRowIndex) => prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex);
|
|
11180
|
-
break;
|
|
11169
|
+
if (!mountedRef.current) {
|
|
11170
|
+
mountedRef.current = true;
|
|
11181
11171
|
}
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
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;
|
|
11186
11179
|
}
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
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;
|
|
11194
11220
|
}
|
|
11195
|
-
setColIndex(colCount - 1);
|
|
11196
|
-
break;
|
|
11197
11221
|
}
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
|
|
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
|
|
11202
11233
|
}
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
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;
|
|
11207
11247
|
}
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
}
|
|
11223
|
-
const RawTd = ({ coords = { col: 0, row: 0 }, tag = "td", ...props }) => {
|
|
11224
|
-
const tdRef = React__namespace.useRef(null);
|
|
11225
|
-
const { rowIndex, colIndex, setTableValues } = useTable();
|
|
11226
|
-
const [isActive, setIsActive] = React__namespace.useState(false);
|
|
11227
|
-
const handleKeyDown = (e) => {
|
|
11228
|
-
const focusableNodes = getFocusableNodes(tdRef.current, true);
|
|
11229
|
-
if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length === 0) {
|
|
11230
|
-
return;
|
|
11231
|
-
}
|
|
11232
|
-
if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== "BUTTON")) {
|
|
11233
|
-
e.preventDefault();
|
|
11234
|
-
const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);
|
|
11235
|
-
if (e.key === KeyboardKeys.RIGHT) {
|
|
11236
|
-
const nextNode = focusableNodes[focussedButtonIndex + 1];
|
|
11237
|
-
if (nextNode) {
|
|
11238
|
-
e.stopPropagation();
|
|
11239
|
-
nextNode.focus();
|
|
11240
|
-
}
|
|
11241
|
-
} else if (e.key === KeyboardKeys.LEFT) {
|
|
11242
|
-
const nextNode = focusableNodes[focussedButtonIndex - 1];
|
|
11243
|
-
if (nextNode) {
|
|
11244
|
-
e.stopPropagation();
|
|
11245
|
-
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
|
+
}
|
|
11246
11263
|
}
|
|
11247
|
-
}
|
|
11248
|
-
return;
|
|
11249
|
-
}
|
|
11250
|
-
const isEnterKey = e.key === KeyboardKeys.ENTER;
|
|
11251
|
-
if (isEnterKey && !isActive) {
|
|
11252
|
-
setIsActive(true);
|
|
11253
|
-
} else if ((e.key === KeyboardKeys.ESCAPE || isEnterKey) && isActive) {
|
|
11254
|
-
if (isEnterKey && document.activeElement?.tagName === "A") {
|
|
11255
11264
|
return;
|
|
11256
11265
|
}
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
e.
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;
|
|
11264
|
-
useIsomorphicLayoutEffect(() => {
|
|
11265
|
-
const focusableNodes = getFocusableNodes(tdRef.current, true);
|
|
11266
|
-
if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
|
|
11267
|
-
tdRef.current.setAttribute("tabIndex", !isActive && isFocused ? "0" : "-1");
|
|
11268
|
-
focusableNodes.forEach((node, index) => {
|
|
11269
|
-
node.setAttribute("tabIndex", isActive ? "0" : "-1");
|
|
11270
|
-
if (isActive && index === 0) {
|
|
11271
|
-
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;
|
|
11272
11272
|
}
|
|
11273
|
-
|
|
11274
|
-
|
|
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);
|
|
11275
11306
|
focusableNodes.forEach((node) => {
|
|
11276
|
-
node.
|
|
11307
|
+
node.addEventListener("focus", handleFocusableNodeFocus);
|
|
11277
11308
|
});
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
}
|
|
11285
|
-
|
|
11286
|
-
}
|
|
11287
|
-
|
|
11288
|
-
const cell = tdRef.current;
|
|
11289
|
-
const focusableNodes = getFocusableNodes(cell, true);
|
|
11290
|
-
focusableNodes.forEach((node) => {
|
|
11291
|
-
node.addEventListener("focus", handleFocusableNodeFocus);
|
|
11292
|
-
});
|
|
11293
|
-
return () => {
|
|
11294
|
-
const focusableNodes2 = getFocusableNodes(cell, true);
|
|
11295
|
-
focusableNodes2.forEach((node) => {
|
|
11296
|
-
node.removeEventListener("focus", handleFocusableNodeFocus);
|
|
11297
|
-
});
|
|
11298
|
-
};
|
|
11299
|
-
}, [handleFocusableNodeFocus]);
|
|
11300
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { role: "gridcell", tag, ref: tdRef, onKeyDown: handleKeyDown, ...props });
|
|
11301
|
-
};
|
|
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
|
+
);
|
|
11302
11319
|
const RawTh = (props) => /* @__PURE__ */ jsxRuntime.jsx(RawTd, { ...props, tag: "th" });
|
|
11303
11320
|
const RawThead = ({ children, ...props }) => {
|
|
11304
11321
|
const childrenClone = React__namespace.Children.toArray(children).map((child) => {
|
|
@@ -11349,14 +11366,18 @@ const SearchbarWrapper = styledComponents.styled.div`
|
|
|
11349
11366
|
&:focus-within {
|
|
11350
11367
|
${SearchIcon} {
|
|
11351
11368
|
fill: ${({ theme }) => theme.colors.primary600};
|
|
11352
|
-
path {
|
|
11353
|
-
}
|
|
11354
11369
|
}
|
|
11355
11370
|
}
|
|
11356
11371
|
`;
|
|
11357
11372
|
const SearchbarInput = styledComponents.styled(Input$2)`
|
|
11358
11373
|
border: 1px solid transparent;
|
|
11359
11374
|
|
|
11375
|
+
&:hover {
|
|
11376
|
+
button {
|
|
11377
|
+
cursor: pointer;
|
|
11378
|
+
}
|
|
11379
|
+
}
|
|
11380
|
+
|
|
11360
11381
|
${inputFocusStyle()}
|
|
11361
11382
|
`;
|
|
11362
11383
|
const Searchbar = React__namespace.forwardRef(
|
|
@@ -11376,7 +11397,17 @@ const Searchbar = React__namespace.forwardRef(
|
|
|
11376
11397
|
ref: actualRef,
|
|
11377
11398
|
value,
|
|
11378
11399
|
startAction: /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { "aria-hidden": true }),
|
|
11379
|
-
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,
|
|
11380
11411
|
...props
|
|
11381
11412
|
}
|
|
11382
11413
|
)
|
|
@@ -11384,47 +11415,60 @@ const Searchbar = React__namespace.forwardRef(
|
|
|
11384
11415
|
}
|
|
11385
11416
|
);
|
|
11386
11417
|
const SearchForm = (props) => /* @__PURE__ */ jsxRuntime.jsx("form", { ...props, role: "search" });
|
|
11387
|
-
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 }) => {
|
|
11388
11436
|
const handleClick = (e) => {
|
|
11389
11437
|
if (disabled || !onClick)
|
|
11390
11438
|
return;
|
|
11391
11439
|
onClick(e);
|
|
11392
11440
|
};
|
|
11393
11441
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11394
|
-
|
|
11442
|
+
Flex,
|
|
11395
11443
|
{
|
|
11396
|
-
|
|
11444
|
+
inline: true,
|
|
11397
11445
|
background: disabled ? "neutral200" : "primary100",
|
|
11398
11446
|
color: disabled ? "neutral700" : "primary600",
|
|
11399
11447
|
paddingLeft: 3,
|
|
11400
|
-
paddingRight:
|
|
11401
|
-
onClick: handleClick,
|
|
11402
|
-
"aria-disabled": disabled,
|
|
11403
|
-
disabled,
|
|
11404
|
-
borderWidth: "1px",
|
|
11405
|
-
borderStyle: "solid",
|
|
11448
|
+
paddingRight: 1,
|
|
11406
11449
|
borderColor: disabled ? "neutral300" : "primary200",
|
|
11407
11450
|
hasRadius: true,
|
|
11408
11451
|
height: "3.2rem",
|
|
11409
|
-
gap: 2,
|
|
11410
11452
|
...props,
|
|
11411
11453
|
children: [
|
|
11412
11454
|
/* @__PURE__ */ jsxRuntime.jsx(TagText, { $disabled: disabled, variant: "pi", fontWeight: "bold", children }),
|
|
11413
|
-
|
|
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
|
+
)
|
|
11414
11468
|
]
|
|
11415
11469
|
}
|
|
11416
11470
|
);
|
|
11417
11471
|
};
|
|
11418
|
-
const TagWrapper = styledComponents.styled(Flex)`
|
|
11419
|
-
& > svg {
|
|
11420
|
-
height: 0.8rem;
|
|
11421
|
-
width: 0.8rem;
|
|
11422
|
-
}
|
|
11423
|
-
|
|
11424
|
-
& > svg path {
|
|
11425
|
-
fill: ${({ theme, ...p }) => p["aria-disabled"] ? theme.colors.neutral600 : theme.colors.primary600};
|
|
11426
|
-
}
|
|
11427
|
-
`;
|
|
11428
11472
|
const TagText = styledComponents.styled(Typography)`
|
|
11429
11473
|
color: inherit;
|
|
11430
11474
|
border-right: 1px solid ${({ theme, $disabled }) => $disabled ? theme.colors.neutral300 : theme.colors.primary200};
|
|
@@ -11445,6 +11489,7 @@ const MultiSelect = React__namespace.forwardRef(
|
|
|
11445
11489
|
onReachEnd,
|
|
11446
11490
|
placeholder,
|
|
11447
11491
|
required: requiredProp,
|
|
11492
|
+
size,
|
|
11448
11493
|
startIcon,
|
|
11449
11494
|
value: passedValue,
|
|
11450
11495
|
withTags,
|
|
@@ -11528,7 +11573,8 @@ const MultiSelect = React__namespace.forwardRef(
|
|
|
11528
11573
|
disabled,
|
|
11529
11574
|
clearLabel,
|
|
11530
11575
|
onClear: value?.length ? onClear : void 0,
|
|
11531
|
-
|
|
11576
|
+
withTags: Boolean(withTags && (value?.length ?? 0 > 0)),
|
|
11577
|
+
size,
|
|
11532
11578
|
children: /* @__PURE__ */ jsxRuntime.jsx(Value, { placeholder, textColor: value?.length ? "neutral800" : "neutral600", children: value?.length ? withTags ? renderTags : customizeContent ? customizeContent(value) : void 0 : void 0 })
|
|
11533
11579
|
}
|
|
11534
11580
|
),
|
|
@@ -11691,7 +11737,7 @@ const SubNavHeader = ({
|
|
|
11691
11737
|
] });
|
|
11692
11738
|
}
|
|
11693
11739
|
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", alignItems: "flex-start", paddingLeft: 6, paddingTop: 6, paddingBottom: 2, paddingRight: 4, children: [
|
|
11694
|
-
/* @__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: [
|
|
11695
11741
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "beta", tag, children: label }),
|
|
11696
11742
|
searchable && /* @__PURE__ */ jsxRuntime.jsx(IconButton, { ref: searchButtonRef, onClick: toggleSearch, label: searchLabel, children: /* @__PURE__ */ jsxRuntime.jsx(icons.Search, {}) })
|
|
11697
11743
|
] }),
|
|
@@ -11720,7 +11766,13 @@ const SubNavLink = forwardRef(
|
|
|
11720
11766
|
);
|
|
11721
11767
|
}
|
|
11722
11768
|
);
|
|
11723
|
-
const
|
|
11769
|
+
const CustomBullet = styledComponents.styled.span`
|
|
11770
|
+
width: 0.4rem;
|
|
11771
|
+
height: 0.4rem;
|
|
11772
|
+
background-color: ${({ theme, $active }) => $active ? theme.colors.primary600 : theme.colors.neutral600};
|
|
11773
|
+
border-radius: 50%;
|
|
11774
|
+
`;
|
|
11775
|
+
const SubNavLinkWrapper = styledComponents.styled(BaseLinkImpl)`
|
|
11724
11776
|
display: flex;
|
|
11725
11777
|
align-items: center;
|
|
11726
11778
|
justify-content: space-between;
|
|
@@ -11739,18 +11791,16 @@ const SubNavLinkWrapper = styledComponents.styled(BaseLink)`
|
|
|
11739
11791
|
font-weight: 500;
|
|
11740
11792
|
`;
|
|
11741
11793
|
}}
|
|
11794
|
+
|
|
11795
|
+
${CustomBullet} {
|
|
11796
|
+
background-color: ${({ theme }) => theme.colors.primary600};
|
|
11797
|
+
}
|
|
11742
11798
|
}
|
|
11743
11799
|
|
|
11744
11800
|
&:focus-visible {
|
|
11745
11801
|
outline-offset: -2px;
|
|
11746
11802
|
}
|
|
11747
11803
|
`;
|
|
11748
|
-
const CustomBullet = styledComponents.styled.span`
|
|
11749
|
-
width: 0.4rem;
|
|
11750
|
-
height: 0.4rem;
|
|
11751
|
-
background-color: ${({ theme, $active }) => $active ? theme.colors.primary600 : theme.colors.neutral600};
|
|
11752
|
-
border-radius: 50%;
|
|
11753
|
-
`;
|
|
11754
11804
|
const IconWrapper = styledComponents.styled.div`
|
|
11755
11805
|
svg {
|
|
11756
11806
|
height: 1.6rem;
|
|
@@ -11881,70 +11931,84 @@ const SubNavSections = ({ children, spacing = 2, horizontal = false, ...props })
|
|
|
11881
11931
|
}
|
|
11882
11932
|
) });
|
|
11883
11933
|
};
|
|
11884
|
-
const
|
|
11885
|
-
({
|
|
11886
|
-
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
|
|
11895
|
-
|
|
11896
|
-
|
|
11897
|
-
|
|
11898
|
-
|
|
11899
|
-
|
|
11900
|
-
|
|
11901
|
-
|
|
11902
|
-
|
|
11903
|
-
|
|
11904
|
-
|
|
11934
|
+
const SwitchImpl = React__namespace.forwardRef(
|
|
11935
|
+
({
|
|
11936
|
+
visibleLabels,
|
|
11937
|
+
onLabel = "On",
|
|
11938
|
+
offLabel = "Off",
|
|
11939
|
+
onCheckedChange: onCheckedChangeProp,
|
|
11940
|
+
checked: checkedProp,
|
|
11941
|
+
defaultChecked,
|
|
11942
|
+
disabled,
|
|
11943
|
+
...restProps
|
|
11944
|
+
}, forwardedRef) => {
|
|
11945
|
+
const [internalChecked, setInternalChecked] = useControllableState$1({
|
|
11946
|
+
prop: checkedProp,
|
|
11947
|
+
defaultProp: defaultChecked
|
|
11948
|
+
});
|
|
11949
|
+
const handleCheckChange = (checked) => {
|
|
11950
|
+
setInternalChecked(checked);
|
|
11951
|
+
};
|
|
11952
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: 3, children: [
|
|
11953
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11954
|
+
SwitchRoot,
|
|
11955
|
+
{
|
|
11956
|
+
ref: forwardedRef,
|
|
11957
|
+
onCheckedChange: uiPrimitives.composeEventHandlers(onCheckedChangeProp, handleCheckChange),
|
|
11958
|
+
checked: internalChecked,
|
|
11959
|
+
disabled,
|
|
11960
|
+
...restProps,
|
|
11961
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(SwitchThumb, {})
|
|
11962
|
+
}
|
|
11963
|
+
),
|
|
11964
|
+
visibleLabels ? /* @__PURE__ */ jsxRuntime.jsx(LabelTypography, { "aria-hidden": true, "data-disabled": disabled, "data-state": internalChecked ? "checked" : "unchecked", children: internalChecked ? onLabel : offLabel }) : null
|
|
11965
|
+
] });
|
|
11905
11966
|
}
|
|
11906
11967
|
);
|
|
11907
|
-
const
|
|
11908
|
-
background: ${({ theme }) => theme.colors.danger500};
|
|
11909
|
-
border: none;
|
|
11910
|
-
border-radius: 16px;
|
|
11911
|
-
position: relative;
|
|
11912
|
-
height: 2.4rem;
|
|
11968
|
+
const SwitchRoot = styledComponents.styled(Switch__namespace.Root)`
|
|
11913
11969
|
width: 4rem;
|
|
11970
|
+
height: 2.4rem;
|
|
11971
|
+
border-radius: 1.2rem;
|
|
11972
|
+
background-color: ${({ theme }) => theme.colors.danger500};
|
|
11914
11973
|
|
|
11915
|
-
&
|
|
11916
|
-
|
|
11974
|
+
&[data-state='checked'] {
|
|
11975
|
+
background-color: ${({ theme }) => theme.colors.success500};
|
|
11917
11976
|
}
|
|
11918
11977
|
|
|
11919
|
-
|
|
11920
|
-
|
|
11921
|
-
background: ${({ theme }) => theme.colors.neutral0};
|
|
11922
|
-
width: 1rem;
|
|
11923
|
-
height: 1rem;
|
|
11924
|
-
border-radius: 50%;
|
|
11925
|
-
position: absolute;
|
|
11926
|
-
transition: all 0.5s;
|
|
11927
|
-
left: ${({ theme }) => theme.spaces[1]};
|
|
11928
|
-
top: ${({ theme }) => theme.spaces[1]};
|
|
11978
|
+
&[data-disabled] {
|
|
11979
|
+
background-color: ${({ theme }) => theme.colors.neutral300};
|
|
11929
11980
|
}
|
|
11930
11981
|
|
|
11931
|
-
@media (prefers-reduced-motion:
|
|
11932
|
-
|
|
11933
|
-
transition: none;
|
|
11934
|
-
}
|
|
11982
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
11983
|
+
transition: ${(props) => props.theme.transitions.backgroundColor};
|
|
11935
11984
|
}
|
|
11936
11985
|
`;
|
|
11937
|
-
const
|
|
11938
|
-
|
|
11939
|
-
|
|
11940
|
-
|
|
11986
|
+
const SwitchThumb = styledComponents.styled(Switch__namespace.Thumb)`
|
|
11987
|
+
display: block;
|
|
11988
|
+
height: 1.6rem;
|
|
11989
|
+
width: 1.6rem;
|
|
11990
|
+
border-radius: 50%;
|
|
11991
|
+
background-color: ${({ theme }) => theme.colors.neutral0};
|
|
11992
|
+
transform: translateX(4px);
|
|
11993
|
+
|
|
11994
|
+
&[data-state='checked'] {
|
|
11995
|
+
transform: translateX(20px);
|
|
11996
|
+
}
|
|
11997
|
+
|
|
11998
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
11999
|
+
transition: transform ${(props) => props.theme.motion.timings["120"]}
|
|
12000
|
+
${(props) => props.theme.motion.easings.authenticMotion};
|
|
12001
|
+
}
|
|
12002
|
+
`;
|
|
12003
|
+
const LabelTypography = styledComponents.styled(Typography)`
|
|
12004
|
+
color: ${(props) => props.theme.colors.danger600};
|
|
11941
12005
|
|
|
11942
|
-
&[
|
|
11943
|
-
|
|
12006
|
+
&[data-state='checked'] {
|
|
12007
|
+
color: ${(props) => props.theme.colors.success600};
|
|
11944
12008
|
}
|
|
11945
12009
|
|
|
11946
|
-
&[
|
|
11947
|
-
|
|
12010
|
+
&[data-disabled='true'] {
|
|
12011
|
+
color: ${({ theme }) => theme.colors.neutral500};
|
|
11948
12012
|
}
|
|
11949
12013
|
`;
|
|
11950
12014
|
const [TabsProvider, useTabs] = createContext("Tabs");
|
|
@@ -12114,7 +12178,7 @@ const TableBox = styledComponents.styled(Box)`
|
|
|
12114
12178
|
const ScrollContainer = styledComponents.styled(Box)`
|
|
12115
12179
|
overflow-x: auto;
|
|
12116
12180
|
`;
|
|
12117
|
-
const Table = ({ footer, ...props }) => {
|
|
12181
|
+
const Table = React__namespace.forwardRef(({ footer, ...props }, forwardedRef) => {
|
|
12118
12182
|
const tableRef = React__namespace.useRef(null);
|
|
12119
12183
|
const [overflowing, setOverflowing] = React__namespace.useState();
|
|
12120
12184
|
const handleScroll = (e) => {
|
|
@@ -12137,10 +12201,10 @@ const Table = ({ footer, ...props }) => {
|
|
|
12137
12201
|
}
|
|
12138
12202
|
}, []);
|
|
12139
12203
|
return /* @__PURE__ */ jsxRuntime.jsxs(TableContainer, { shadow: "tableShadow", hasRadius: true, background: "neutral0", children: [
|
|
12140
|
-
/* @__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 }) }) }),
|
|
12141
12205
|
footer
|
|
12142
12206
|
] });
|
|
12143
|
-
};
|
|
12207
|
+
});
|
|
12144
12208
|
const TbodyWrapper = styledComponents.styled(RawTbody)`
|
|
12145
12209
|
& tr:last-of-type {
|
|
12146
12210
|
border-bottom: none;
|
|
@@ -12181,7 +12245,6 @@ const Tr = (props) => {
|
|
|
12181
12245
|
const CellWrapper = styledComponents.styled(RawTd)`
|
|
12182
12246
|
vertical-align: middle;
|
|
12183
12247
|
text-align: left;
|
|
12184
|
-
color: ${({ theme }) => theme.colors.neutral600};
|
|
12185
12248
|
outline-offset: -4px;
|
|
12186
12249
|
|
|
12187
12250
|
/**
|
|
@@ -12191,15 +12254,15 @@ const CellWrapper = styledComponents.styled(RawTd)`
|
|
|
12191
12254
|
vertical-align: sub;
|
|
12192
12255
|
}
|
|
12193
12256
|
`;
|
|
12194
|
-
const Th = ({ children, action, ...props }) => {
|
|
12195
|
-
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: [
|
|
12196
12259
|
children,
|
|
12197
12260
|
action
|
|
12198
12261
|
] }) });
|
|
12199
|
-
};
|
|
12200
|
-
const Td = ({ children, ...props }) => {
|
|
12201
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CellWrapper, { ...props, children });
|
|
12202
|
-
};
|
|
12262
|
+
});
|
|
12263
|
+
const Td = React__namespace.forwardRef(({ children, ...props }, forwardedRef) => {
|
|
12264
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CellWrapper, { color: "neutral800", ref: forwardedRef, ...props, children });
|
|
12265
|
+
});
|
|
12203
12266
|
const IconBox = styledComponents.styled(Box)`
|
|
12204
12267
|
height: 2.4rem;
|
|
12205
12268
|
width: 2.4rem;
|
|
@@ -12232,6 +12295,28 @@ const TFooter = ({ children, icon, ...props }) => {
|
|
|
12232
12295
|
] }) })
|
|
12233
12296
|
] });
|
|
12234
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
|
+
);
|
|
12235
12320
|
const rotation = styledComponents.keyframes`
|
|
12236
12321
|
from {
|
|
12237
12322
|
transform: rotate(0deg);
|
|
@@ -12240,51 +12325,24 @@ const rotation = styledComponents.keyframes`
|
|
|
12240
12325
|
transform: rotate(359deg);
|
|
12241
12326
|
}
|
|
12242
12327
|
`;
|
|
12243
|
-
const LoadingWrapper = styledComponents.styled.
|
|
12328
|
+
const LoadingWrapper = styledComponents.styled.span`
|
|
12329
|
+
display: flex;
|
|
12244
12330
|
animation: ${rotation} 2s infinite linear;
|
|
12245
12331
|
will-change: transform;
|
|
12246
12332
|
`;
|
|
12247
12333
|
const TextButtonWrapper = styledComponents.styled(Flex)`
|
|
12248
12334
|
border: none;
|
|
12335
|
+
background-color: transparent;
|
|
12336
|
+
color: ${(props) => props.theme.colors.primary600};
|
|
12337
|
+
cursor: pointer;
|
|
12249
12338
|
|
|
12250
12339
|
&[aria-disabled='true'] {
|
|
12251
12340
|
pointer-events: none;
|
|
12252
|
-
|
|
12253
|
-
fill: ${({ theme }) => theme.colors.neutral600};
|
|
12254
|
-
}
|
|
12255
|
-
}
|
|
12256
|
-
|
|
12257
|
-
svg path {
|
|
12258
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
|
12341
|
+
color: ${(props) => props.theme.colors.neutral600};
|
|
12259
12342
|
}
|
|
12260
12343
|
|
|
12261
12344
|
${focus}
|
|
12262
12345
|
`;
|
|
12263
|
-
const TextButton = React__namespace.forwardRef(
|
|
12264
|
-
({ children, startIcon, endIcon, onClick, disabled = false, loading = false, ...props }, ref) => {
|
|
12265
|
-
const handleClick = onClick && !disabled ? onClick : void 0;
|
|
12266
|
-
const isDisabled = disabled || loading;
|
|
12267
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12268
|
-
TextButtonWrapper,
|
|
12269
|
-
{
|
|
12270
|
-
ref,
|
|
12271
|
-
"aria-disabled": isDisabled,
|
|
12272
|
-
onClick: handleClick,
|
|
12273
|
-
tag: "button",
|
|
12274
|
-
type: "button",
|
|
12275
|
-
background: "transparent",
|
|
12276
|
-
gap: 2,
|
|
12277
|
-
...props,
|
|
12278
|
-
children: [
|
|
12279
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingWrapper, { "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(icons.Loader, {}) }) : startIcon,
|
|
12280
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "pi", textColor: isDisabled ? "neutral600" : "primary600", children }),
|
|
12281
|
-
endIcon
|
|
12282
|
-
]
|
|
12283
|
-
}
|
|
12284
|
-
);
|
|
12285
|
-
}
|
|
12286
|
-
);
|
|
12287
|
-
TextButton.displayName = "TextButton";
|
|
12288
12346
|
const TextInput = React__namespace.forwardRef((props, ref) => {
|
|
12289
12347
|
return /* @__PURE__ */ jsxRuntime.jsx(Input$2, { ref, ...props });
|
|
12290
12348
|
});
|
|
@@ -12589,8 +12647,7 @@ exports.Accordion = Accordion;
|
|
|
12589
12647
|
exports.Alert = Alert;
|
|
12590
12648
|
exports.Avatar = Avatar;
|
|
12591
12649
|
exports.Badge = Badge;
|
|
12592
|
-
exports.
|
|
12593
|
-
exports.BaseLink = BaseLink;
|
|
12650
|
+
exports.BaseLink = BaseLinkImpl;
|
|
12594
12651
|
exports.Box = Box;
|
|
12595
12652
|
exports.Breadcrumbs = Breadcrumbs;
|
|
12596
12653
|
exports.Button = Button;
|
|
@@ -12673,7 +12730,7 @@ exports.SubNavLink = SubNavLink;
|
|
|
12673
12730
|
exports.SubNavLinkSection = SubNavLinkSection;
|
|
12674
12731
|
exports.SubNavSection = SubNavSection;
|
|
12675
12732
|
exports.SubNavSections = SubNavSections;
|
|
12676
|
-
exports.Switch =
|
|
12733
|
+
exports.Switch = SwitchImpl;
|
|
12677
12734
|
exports.TFooter = TFooter;
|
|
12678
12735
|
exports.Table = Table;
|
|
12679
12736
|
exports.Tabs = Tabs;
|