@uniformdev/design-system 19.54.0 → 19.54.2-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +283 -113
- package/dist/index.d.mts +402 -370
- package/dist/index.d.ts +402 -370
- package/dist/index.js +317 -137
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1447,6 +1447,7 @@ __export(src_exports, {
|
|
|
1447
1447
|
ParameterToggle: () => ParameterToggle,
|
|
1448
1448
|
ParameterToggleInner: () => ParameterToggleInner,
|
|
1449
1449
|
Popover: () => Popover2,
|
|
1450
|
+
ProgressBar: () => ProgressBar,
|
|
1450
1451
|
ProgressList: () => ProgressList,
|
|
1451
1452
|
ProgressListItem: () => ProgressListItem,
|
|
1452
1453
|
ResolveIcon: () => ResolveIcon,
|
|
@@ -1485,6 +1486,7 @@ __export(src_exports, {
|
|
|
1485
1486
|
VerticalRhythm: () => VerticalRhythm,
|
|
1486
1487
|
WarningMessage: () => WarningMessage,
|
|
1487
1488
|
accessibleHidden: () => accessibleHidden,
|
|
1489
|
+
addPathSegmentToPathname: () => addPathSegmentToPathname,
|
|
1488
1490
|
borderTopIcon: () => borderTopIcon,
|
|
1489
1491
|
breakpoints: () => breakpoints,
|
|
1490
1492
|
button: () => button,
|
|
@@ -1513,6 +1515,8 @@ __export(src_exports, {
|
|
|
1513
1515
|
fadeOutBottom: () => fadeOutBottom,
|
|
1514
1516
|
fullWidthScreenIcon: () => fullWidthScreenIcon,
|
|
1515
1517
|
getDrawerAttributes: () => getDrawerAttributes,
|
|
1518
|
+
getParentPath: () => getParentPath,
|
|
1519
|
+
getPathSegment: () => getPathSegment,
|
|
1516
1520
|
growSubtle: () => growSubtle,
|
|
1517
1521
|
imageTextIcon: () => imageTextIcon,
|
|
1518
1522
|
infoFilledIcon: () => infoFilledIcon,
|
|
@@ -1520,6 +1524,8 @@ __export(src_exports, {
|
|
|
1520
1524
|
inputError: () => inputError,
|
|
1521
1525
|
inputSelect: () => inputSelect,
|
|
1522
1526
|
isMacLike: () => isMacLike,
|
|
1527
|
+
isSecureURL: () => isSecureURL,
|
|
1528
|
+
isValidUrl: () => isValidUrl,
|
|
1523
1529
|
jsonIcon: () => jsonIcon,
|
|
1524
1530
|
labelText: () => labelText,
|
|
1525
1531
|
loaderAnimationData: () => loader_default,
|
|
@@ -1817,6 +1823,9 @@ var Theme = ({ disableReset = false }) => {
|
|
|
1817
1823
|
] });
|
|
1818
1824
|
};
|
|
1819
1825
|
|
|
1826
|
+
// src/utils/index.ts
|
|
1827
|
+
init_emotion_jsx_shim();
|
|
1828
|
+
|
|
1820
1829
|
// src/utils/Breakpoints.ts
|
|
1821
1830
|
init_emotion_jsx_shim();
|
|
1822
1831
|
var import_react_use = require("react-use");
|
|
@@ -1832,13 +1841,55 @@ var mq = (size) => `@media (min-width: ${breakpoints[size]}px)`;
|
|
|
1832
1841
|
var supports = (cssProp) => `@supports (${cssProp})`;
|
|
1833
1842
|
var cq = (size) => `@container (min-width: ${size})`;
|
|
1834
1843
|
|
|
1835
|
-
// src/utils/index.ts
|
|
1836
|
-
init_emotion_jsx_shim();
|
|
1837
|
-
|
|
1838
1844
|
// src/utils/replaceUnderscoreInString.ts
|
|
1839
1845
|
init_emotion_jsx_shim();
|
|
1840
1846
|
var replaceUnderscoreInString = (title) => (title == null ? void 0 : title.includes("_")) ? title.replaceAll("_", " ") : title;
|
|
1841
1847
|
|
|
1848
|
+
// src/utils/url.ts
|
|
1849
|
+
init_emotion_jsx_shim();
|
|
1850
|
+
var isSecureURL = (value = "") => {
|
|
1851
|
+
try {
|
|
1852
|
+
const url = new URL(value);
|
|
1853
|
+
return url.protocol === "https:";
|
|
1854
|
+
} catch (e) {
|
|
1855
|
+
return false;
|
|
1856
|
+
}
|
|
1857
|
+
};
|
|
1858
|
+
var isValidUrl = (urlString, options = {}) => {
|
|
1859
|
+
try {
|
|
1860
|
+
const isRelativeToLocation = /^([/.])/.test(urlString);
|
|
1861
|
+
const url = new URL(
|
|
1862
|
+
urlString,
|
|
1863
|
+
options.allowRelative && isRelativeToLocation ? "https://defaultbaseurl.com" : void 0
|
|
1864
|
+
);
|
|
1865
|
+
if (options.isSecure) {
|
|
1866
|
+
return url.protocol === "https:";
|
|
1867
|
+
}
|
|
1868
|
+
return true;
|
|
1869
|
+
} catch (e) {
|
|
1870
|
+
return false;
|
|
1871
|
+
}
|
|
1872
|
+
};
|
|
1873
|
+
var addPathSegmentToPathname = (path, pathSegment) => {
|
|
1874
|
+
return `/${path.substring(1).split("/").filter((s) => s).concat(pathSegment).join("/")}`;
|
|
1875
|
+
};
|
|
1876
|
+
var getPathSegment = (path) => {
|
|
1877
|
+
return path.split("/").pop() || path;
|
|
1878
|
+
};
|
|
1879
|
+
var getParentPath = (path, noRootSlash) => {
|
|
1880
|
+
var _a;
|
|
1881
|
+
if (path === "/") {
|
|
1882
|
+
return "";
|
|
1883
|
+
}
|
|
1884
|
+
const pathSegments = path == null ? void 0 : path.split("/");
|
|
1885
|
+
if ((pathSegments == null ? void 0 : pathSegments.length) === 2) {
|
|
1886
|
+
return noRootSlash ? "" : "/";
|
|
1887
|
+
} else {
|
|
1888
|
+
pathSegments == null ? void 0 : pathSegments.pop();
|
|
1889
|
+
return (_a = pathSegments == null ? void 0 : pathSegments.join("/")) != null ? _a : "n/a";
|
|
1890
|
+
}
|
|
1891
|
+
};
|
|
1892
|
+
|
|
1842
1893
|
// src/utils/useOutsideClick.tsx
|
|
1843
1894
|
init_emotion_jsx_shim();
|
|
1844
1895
|
var import_react2 = require("react");
|
|
@@ -13218,14 +13269,48 @@ function renderWithIcon(children, icon) {
|
|
|
13218
13269
|
// src/components/ButtonWithMenu/ButtonWithMenu.styles.ts
|
|
13219
13270
|
init_emotion_jsx_shim();
|
|
13220
13271
|
var import_react35 = require("@emotion/react");
|
|
13272
|
+
var buttonSizeBase = import_react35.css`
|
|
13273
|
+
--icon-padding: var(--spacing-xs);
|
|
13274
|
+
--svg-size: 1rem;
|
|
13275
|
+
--line-offset: -5px;
|
|
13276
|
+
font-size: var(--fs-sm);
|
|
13277
|
+
|
|
13278
|
+
> button {
|
|
13279
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
13280
|
+
}
|
|
13281
|
+
`;
|
|
13282
|
+
var buttonSizeSmall = import_react35.css`
|
|
13283
|
+
--icon-padding: var(--spacing-xs);
|
|
13284
|
+
--svg-size: 0.85rem;
|
|
13285
|
+
--line-offset: -1px;
|
|
13286
|
+
font-size: var(--fs-sm);
|
|
13287
|
+
|
|
13288
|
+
> button {
|
|
13289
|
+
padding: var(--spacing-xs) var(--spacing-base);
|
|
13290
|
+
}
|
|
13291
|
+
`;
|
|
13292
|
+
var buttonSizeLarge = import_react35.css`
|
|
13293
|
+
--icon-padding: var(--spacing-sm);
|
|
13294
|
+
--svg-size: 1.5rem;
|
|
13295
|
+
--line-offset: -5px;
|
|
13296
|
+
font-size: var(--fs-sm);
|
|
13297
|
+
line-height: 1.25;
|
|
13298
|
+
|
|
13299
|
+
> button {
|
|
13300
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
13301
|
+
}
|
|
13302
|
+
`;
|
|
13221
13303
|
var ButtonWithMenuContainer = import_react35.css`
|
|
13222
13304
|
align-items: center;
|
|
13223
13305
|
border: 1px solid transparent;
|
|
13224
13306
|
border-radius: var(--rounded-sm);
|
|
13225
13307
|
color: var(--white);
|
|
13226
13308
|
display: inline-flex;
|
|
13227
|
-
font-size: var(--fs-sm);
|
|
13228
13309
|
position: relative;
|
|
13310
|
+
min-height: 24px;
|
|
13311
|
+
transition: color var(--duration-fast) var(--timing-ease-out),
|
|
13312
|
+
border-color var(--duration-fast) var(--timing-ease-out),
|
|
13313
|
+
background-color var(--duration-fast) var(--timing-ease-out);
|
|
13229
13314
|
|
|
13230
13315
|
&:active {
|
|
13231
13316
|
opacity: var(--opacity-75);
|
|
@@ -13238,15 +13323,19 @@ var ButtonWithMenuContainer = import_react35.css`
|
|
|
13238
13323
|
&:focus {
|
|
13239
13324
|
border-color: var(--gray-700);
|
|
13240
13325
|
}
|
|
13326
|
+
|
|
13327
|
+
svg {
|
|
13328
|
+
width: var(--svg-size);
|
|
13329
|
+
height: var(--svg-size);
|
|
13330
|
+
}
|
|
13241
13331
|
`;
|
|
13242
13332
|
var ButtonWithMenuBtn = import_react35.css`
|
|
13333
|
+
align-items: center;
|
|
13243
13334
|
border: 1px solid transparent;
|
|
13244
13335
|
background: transparent;
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
letter-spacing: 0.025rem;
|
|
13249
|
-
line-height: 1.25;
|
|
13336
|
+
line-height: 1;
|
|
13337
|
+
display: inline-flex;
|
|
13338
|
+
gap: var(--spacing-xs);
|
|
13250
13339
|
|
|
13251
13340
|
&:focus {
|
|
13252
13341
|
outline: none;
|
|
@@ -13263,8 +13352,17 @@ var ButtonWithMenuBtn = import_react35.css`
|
|
|
13263
13352
|
}
|
|
13264
13353
|
`;
|
|
13265
13354
|
var ButtonWithMenuIcon = import_react35.css`
|
|
13266
|
-
padding: var(--
|
|
13267
|
-
|
|
13355
|
+
padding: var(--icon-padding);
|
|
13356
|
+
position: relative;
|
|
13357
|
+
|
|
13358
|
+
&:before {
|
|
13359
|
+
background: currentColor;
|
|
13360
|
+
content: '';
|
|
13361
|
+
display: block;
|
|
13362
|
+
inset: var(--line-offset) auto var(--line-offset) -1px;
|
|
13363
|
+
width: 1px;
|
|
13364
|
+
position: absolute;
|
|
13365
|
+
}
|
|
13268
13366
|
`;
|
|
13269
13367
|
var buttonPrimary2 = import_react35.css`
|
|
13270
13368
|
background: var(--brand-secondary-1);
|
|
@@ -13304,6 +13402,24 @@ var buttonGhostDisabled = import_react35.css`
|
|
|
13304
13402
|
border-color: var(--gray-400);
|
|
13305
13403
|
color: var(--gray-400);
|
|
13306
13404
|
`;
|
|
13405
|
+
var buttonSecondaryOutline = import_react35.css`
|
|
13406
|
+
background: var(--white);
|
|
13407
|
+
color: var(--primary-action-default);
|
|
13408
|
+
border-color: var(--primary-action-default);
|
|
13409
|
+
|
|
13410
|
+
&:hover {
|
|
13411
|
+
color: var(--primary-action-hover);
|
|
13412
|
+
border-color: var(--primary-action-hover);
|
|
13413
|
+
}
|
|
13414
|
+
`;
|
|
13415
|
+
var buttonSecondaryOutlineDisabled = import_react35.css`
|
|
13416
|
+
background: var(--white);
|
|
13417
|
+
color: var(--gray-400);
|
|
13418
|
+
border-color: var(--gray-400);
|
|
13419
|
+
`;
|
|
13420
|
+
var buttonWithMenuIconOffset = import_react35.css`
|
|
13421
|
+
margin-left: -10px;
|
|
13422
|
+
`;
|
|
13307
13423
|
|
|
13308
13424
|
// src/components/ButtonWithMenu/ButtonWithMenu.tsx
|
|
13309
13425
|
var import_jsx_runtime27 = require("@emotion/react/jsx-runtime");
|
|
@@ -13311,30 +13427,43 @@ var ButtonWithMenu = ({
|
|
|
13311
13427
|
onButtonClick,
|
|
13312
13428
|
buttonType = "secondary",
|
|
13313
13429
|
buttonText,
|
|
13430
|
+
icon,
|
|
13314
13431
|
disabled,
|
|
13315
13432
|
children,
|
|
13316
13433
|
placement,
|
|
13434
|
+
size = "lg",
|
|
13317
13435
|
...buttonProps
|
|
13318
13436
|
}) => {
|
|
13319
13437
|
const buttonTheme = {
|
|
13320
13438
|
primary: buttonPrimary2,
|
|
13321
13439
|
secondary: buttonSecondary2,
|
|
13322
13440
|
ghost: buttonGhost2,
|
|
13323
|
-
unimportant: buttonUnimportant2
|
|
13441
|
+
unimportant: buttonUnimportant2,
|
|
13442
|
+
secondaryOutline: buttonSecondaryOutline
|
|
13324
13443
|
};
|
|
13325
13444
|
const buttonDisabledTheme = {
|
|
13326
13445
|
primary: buttonPrimaryDisabled,
|
|
13327
13446
|
secondary: buttonSecondaryDisabled,
|
|
13328
13447
|
ghost: buttonGhostDisabled,
|
|
13329
|
-
unimportant: buttonUnimportantDisabled
|
|
13448
|
+
unimportant: buttonUnimportantDisabled,
|
|
13449
|
+
secondaryOutline: buttonSecondaryOutlineDisabled
|
|
13450
|
+
};
|
|
13451
|
+
const sizes2 = {
|
|
13452
|
+
base: buttonSizeBase,
|
|
13453
|
+
sm: buttonSizeSmall,
|
|
13454
|
+
lg: buttonSizeLarge
|
|
13330
13455
|
};
|
|
13331
13456
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
13332
13457
|
"div",
|
|
13333
13458
|
{
|
|
13334
|
-
css: [
|
|
13459
|
+
css: [
|
|
13460
|
+
sizes2[size],
|
|
13461
|
+
ButtonWithMenuContainer,
|
|
13462
|
+
disabled ? buttonDisabledTheme[buttonType] : buttonTheme[buttonType]
|
|
13463
|
+
],
|
|
13335
13464
|
"data-testid": "multioptions-button",
|
|
13336
13465
|
children: [
|
|
13337
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.
|
|
13466
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
13338
13467
|
"button",
|
|
13339
13468
|
{
|
|
13340
13469
|
type: "button",
|
|
@@ -13343,7 +13472,10 @@ var ButtonWithMenu = ({
|
|
|
13343
13472
|
onClick: onButtonClick,
|
|
13344
13473
|
"data-testid": "multioptions-button-main",
|
|
13345
13474
|
...buttonProps,
|
|
13346
|
-
children:
|
|
13475
|
+
children: [
|
|
13476
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { icon, iconColor: "currentColor", css: buttonWithMenuIconOffset }) : null,
|
|
13477
|
+
buttonText
|
|
13478
|
+
]
|
|
13347
13479
|
}
|
|
13348
13480
|
),
|
|
13349
13481
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
@@ -13351,7 +13483,7 @@ var ButtonWithMenu = ({
|
|
|
13351
13483
|
{
|
|
13352
13484
|
menuLabel: "buttonMenu",
|
|
13353
13485
|
placement,
|
|
13354
|
-
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { css: ButtonWithMenuIcon, "data-testid": "multioptions-button-call-menu", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { icon: import_CgChevronDown2.CgChevronDown,
|
|
13486
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { css: ButtonWithMenuIcon, "data-testid": "multioptions-button-call-menu", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { icon: import_CgChevronDown2.CgChevronDown, iconColor: "currentColor" }) }),
|
|
13355
13487
|
children
|
|
13356
13488
|
}
|
|
13357
13489
|
)
|
|
@@ -15102,24 +15234,6 @@ init_emotion_jsx_shim();
|
|
|
15102
15234
|
init_emotion_jsx_shim();
|
|
15103
15235
|
var import_react72 = require("react");
|
|
15104
15236
|
|
|
15105
|
-
// src/utils/url.ts
|
|
15106
|
-
init_emotion_jsx_shim();
|
|
15107
|
-
var isValidUrl = (urlString, options = {}) => {
|
|
15108
|
-
try {
|
|
15109
|
-
const isRelativeToLocation = /^([/.])/.test(urlString);
|
|
15110
|
-
const url = new URL(
|
|
15111
|
-
urlString,
|
|
15112
|
-
options.allowRelative && isRelativeToLocation ? "https://defaultbaseurl.com" : void 0
|
|
15113
|
-
);
|
|
15114
|
-
if (options.isSecure) {
|
|
15115
|
-
return url.protocol === "https:";
|
|
15116
|
-
}
|
|
15117
|
-
return true;
|
|
15118
|
-
} catch (e) {
|
|
15119
|
-
return false;
|
|
15120
|
-
}
|
|
15121
|
-
};
|
|
15122
|
-
|
|
15123
15237
|
// src/components/Input/Caption.tsx
|
|
15124
15238
|
init_emotion_jsx_shim();
|
|
15125
15239
|
|
|
@@ -20229,33 +20343,93 @@ var ParameterToggleInner = (0, import_react120.forwardRef)(
|
|
|
20229
20343
|
}
|
|
20230
20344
|
);
|
|
20231
20345
|
|
|
20346
|
+
// src/components/ProgressBar/ProgressBar.tsx
|
|
20347
|
+
init_emotion_jsx_shim();
|
|
20348
|
+
|
|
20349
|
+
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
20350
|
+
init_emotion_jsx_shim();
|
|
20351
|
+
var import_react121 = require("@emotion/react");
|
|
20352
|
+
var container = import_react121.css`
|
|
20353
|
+
background: var(--gray-50);
|
|
20354
|
+
margin-block: var(--spacing-sm);
|
|
20355
|
+
position: relative;
|
|
20356
|
+
overflow: hidden;
|
|
20357
|
+
height: 1rem;
|
|
20358
|
+
border-radius: var(--rounded-sm);
|
|
20359
|
+
border: solid 1px var(--gray-300);
|
|
20360
|
+
`;
|
|
20361
|
+
var themeMap = {
|
|
20362
|
+
primary: import_react121.css`
|
|
20363
|
+
background-color: var(--accent-light);
|
|
20364
|
+
`,
|
|
20365
|
+
secondary: import_react121.css`
|
|
20366
|
+
background-color: var(--brand-secondary-5);
|
|
20367
|
+
`
|
|
20368
|
+
};
|
|
20369
|
+
var bar = import_react121.css`
|
|
20370
|
+
position: absolute;
|
|
20371
|
+
inset: 0;
|
|
20372
|
+
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
20373
|
+
transform-origin: 0 center;
|
|
20374
|
+
`;
|
|
20375
|
+
|
|
20376
|
+
// src/components/ProgressBar/ProgressBar.tsx
|
|
20377
|
+
var import_jsx_runtime108 = require("@emotion/react/jsx-runtime");
|
|
20378
|
+
function ProgressBar({ className, current, max, theme = "primary" }) {
|
|
20379
|
+
const valueNow = Math.min(current, max);
|
|
20380
|
+
const valuePercentage = max > 0 ? Math.ceil(100 / max * valueNow) : 0;
|
|
20381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
20382
|
+
"div",
|
|
20383
|
+
{
|
|
20384
|
+
className,
|
|
20385
|
+
css: container,
|
|
20386
|
+
role: "progressbar",
|
|
20387
|
+
"aria-busy": valuePercentage !== 100,
|
|
20388
|
+
"aria-invalid": false,
|
|
20389
|
+
"aria-valuemin": 0,
|
|
20390
|
+
"aria-valuemax": max,
|
|
20391
|
+
"aria-valuenow": valueNow,
|
|
20392
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
20393
|
+
"div",
|
|
20394
|
+
{
|
|
20395
|
+
css: [bar, themeMap[theme]],
|
|
20396
|
+
style: {
|
|
20397
|
+
transform: `scaleX(${valuePercentage / 100})`
|
|
20398
|
+
},
|
|
20399
|
+
"aria-label": `${current} / ${max}`
|
|
20400
|
+
}
|
|
20401
|
+
)
|
|
20402
|
+
}
|
|
20403
|
+
);
|
|
20404
|
+
}
|
|
20405
|
+
|
|
20232
20406
|
// src/components/ProgressList/ProgressList.tsx
|
|
20233
20407
|
init_emotion_jsx_shim();
|
|
20234
|
-
var
|
|
20408
|
+
var import_react123 = require("@emotion/react");
|
|
20235
20409
|
var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
|
|
20236
20410
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
20237
20411
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
20238
|
-
var
|
|
20412
|
+
var import_react124 = require("react");
|
|
20239
20413
|
|
|
20240
20414
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
20241
20415
|
init_emotion_jsx_shim();
|
|
20242
|
-
var
|
|
20243
|
-
var progressListStyles =
|
|
20416
|
+
var import_react122 = require("@emotion/react");
|
|
20417
|
+
var progressListStyles = import_react122.css`
|
|
20244
20418
|
display: flex;
|
|
20245
20419
|
flex-direction: column;
|
|
20246
20420
|
gap: var(--spacing-sm);
|
|
20247
20421
|
list-style-type: none;
|
|
20248
20422
|
`;
|
|
20249
|
-
var progressListItemStyles =
|
|
20423
|
+
var progressListItemStyles = import_react122.css`
|
|
20250
20424
|
display: flex;
|
|
20251
20425
|
gap: var(--spacing-base);
|
|
20252
20426
|
align-items: center;
|
|
20253
20427
|
`;
|
|
20254
20428
|
|
|
20255
20429
|
// src/components/ProgressList/ProgressList.tsx
|
|
20256
|
-
var
|
|
20430
|
+
var import_jsx_runtime109 = require("@emotion/react/jsx-runtime");
|
|
20257
20431
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
20258
|
-
const itemsWithStatus = (0,
|
|
20432
|
+
const itemsWithStatus = (0, import_react124.useMemo)(() => {
|
|
20259
20433
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
20260
20434
|
return items.map((item, index) => {
|
|
20261
20435
|
let status = "queued";
|
|
@@ -20267,8 +20441,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
|
20267
20441
|
return { ...item, status };
|
|
20268
20442
|
});
|
|
20269
20443
|
}, [items, inProgressId]);
|
|
20270
|
-
return /* @__PURE__ */ (0,
|
|
20271
|
-
return /* @__PURE__ */ (0,
|
|
20444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
|
|
20445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
20272
20446
|
ProgressListItem,
|
|
20273
20447
|
{
|
|
20274
20448
|
status,
|
|
@@ -20288,7 +20462,7 @@ var ProgressListItem = ({
|
|
|
20288
20462
|
errorLevel = "danger",
|
|
20289
20463
|
autoEllipsis = false
|
|
20290
20464
|
}) => {
|
|
20291
|
-
const icon = (0,
|
|
20465
|
+
const icon = (0, import_react124.useMemo)(() => {
|
|
20292
20466
|
if (error) {
|
|
20293
20467
|
return warningIcon;
|
|
20294
20468
|
}
|
|
@@ -20299,14 +20473,14 @@ var ProgressListItem = ({
|
|
|
20299
20473
|
};
|
|
20300
20474
|
return iconPerStatus[status];
|
|
20301
20475
|
}, [status, error]);
|
|
20302
|
-
const statusStyles = (0,
|
|
20476
|
+
const statusStyles = (0, import_react124.useMemo)(() => {
|
|
20303
20477
|
if (error) {
|
|
20304
|
-
return errorLevel === "caution" ?
|
|
20478
|
+
return errorLevel === "caution" ? import_react123.css`
|
|
20305
20479
|
color: rgb(161, 98, 7);
|
|
20306
20480
|
& svg {
|
|
20307
20481
|
color: rgb(250, 204, 21);
|
|
20308
20482
|
}
|
|
20309
|
-
` :
|
|
20483
|
+
` : import_react123.css`
|
|
20310
20484
|
color: rgb(185, 28, 28);
|
|
20311
20485
|
& svg {
|
|
20312
20486
|
color: var(--brand-primary-2);
|
|
@@ -20314,37 +20488,37 @@ var ProgressListItem = ({
|
|
|
20314
20488
|
`;
|
|
20315
20489
|
}
|
|
20316
20490
|
const colorPerStatus = {
|
|
20317
|
-
completed:
|
|
20491
|
+
completed: import_react123.css`
|
|
20318
20492
|
opacity: 0.75;
|
|
20319
20493
|
`,
|
|
20320
|
-
inProgress:
|
|
20494
|
+
inProgress: import_react123.css`
|
|
20321
20495
|
-webkit-text-stroke-width: thin;
|
|
20322
20496
|
`,
|
|
20323
|
-
queued:
|
|
20497
|
+
queued: import_react123.css`
|
|
20324
20498
|
opacity: 0.5;
|
|
20325
20499
|
`
|
|
20326
20500
|
};
|
|
20327
20501
|
return colorPerStatus[status];
|
|
20328
20502
|
}, [status, error, errorLevel]);
|
|
20329
|
-
return /* @__PURE__ */ (0,
|
|
20330
|
-
/* @__PURE__ */ (0,
|
|
20331
|
-
/* @__PURE__ */ (0,
|
|
20503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("li", { css: [progressListItemStyles, statusStyles], children: [
|
|
20504
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Icon, { icon, size: 20, iconColor: "currentColor" }) }) }),
|
|
20505
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { children: [
|
|
20332
20506
|
children,
|
|
20333
|
-
/* @__PURE__ */ (0,
|
|
20507
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
|
|
20334
20508
|
] })
|
|
20335
20509
|
] });
|
|
20336
20510
|
};
|
|
20337
20511
|
|
|
20338
20512
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20339
20513
|
init_emotion_jsx_shim();
|
|
20340
|
-
var
|
|
20514
|
+
var import_react126 = require("@emotion/react");
|
|
20341
20515
|
var import_CgCheck5 = require("@react-icons/all-files/cg/CgCheck");
|
|
20342
|
-
var
|
|
20516
|
+
var import_react127 = require("react");
|
|
20343
20517
|
|
|
20344
20518
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
20345
20519
|
init_emotion_jsx_shim();
|
|
20346
|
-
var
|
|
20347
|
-
var segmentedControlStyles =
|
|
20520
|
+
var import_react125 = require("@emotion/react");
|
|
20521
|
+
var segmentedControlStyles = import_react125.css`
|
|
20348
20522
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
20349
20523
|
--segmented-control-border-width: 1px;
|
|
20350
20524
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -20363,14 +20537,14 @@ var segmentedControlStyles = import_react124.css`
|
|
|
20363
20537
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
20364
20538
|
font-size: var(--fs-xs);
|
|
20365
20539
|
`;
|
|
20366
|
-
var segmentedControlVerticalStyles =
|
|
20540
|
+
var segmentedControlVerticalStyles = import_react125.css`
|
|
20367
20541
|
flex-direction: column;
|
|
20368
20542
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
20369
20543
|
var(--segmented-control-rounded-value) 0 0;
|
|
20370
20544
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
20371
20545
|
var(--segmented-control-rounded-value);
|
|
20372
20546
|
`;
|
|
20373
|
-
var segmentedControlItemStyles =
|
|
20547
|
+
var segmentedControlItemStyles = import_react125.css`
|
|
20374
20548
|
&:first-of-type label {
|
|
20375
20549
|
border-radius: var(--segmented-control-first-border-radius);
|
|
20376
20550
|
}
|
|
@@ -20378,10 +20552,10 @@ var segmentedControlItemStyles = import_react124.css`
|
|
|
20378
20552
|
border-radius: var(--segmented-control-last-border-radius);
|
|
20379
20553
|
}
|
|
20380
20554
|
`;
|
|
20381
|
-
var segmentedControlInputStyles =
|
|
20555
|
+
var segmentedControlInputStyles = import_react125.css`
|
|
20382
20556
|
${accessibleHidden}
|
|
20383
20557
|
`;
|
|
20384
|
-
var segmentedControlLabelStyles = (checked, disabled) =>
|
|
20558
|
+
var segmentedControlLabelStyles = (checked, disabled) => import_react125.css`
|
|
20385
20559
|
position: relative;
|
|
20386
20560
|
display: flex;
|
|
20387
20561
|
align-items: center;
|
|
@@ -20448,23 +20622,23 @@ var segmentedControlLabelStyles = (checked, disabled) => import_react124.css`
|
|
|
20448
20622
|
`}
|
|
20449
20623
|
}
|
|
20450
20624
|
`;
|
|
20451
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
20625
|
+
var segmentedControlLabelIconOnlyStyles = import_react125.css`
|
|
20452
20626
|
padding-inline: 0.5em;
|
|
20453
20627
|
`;
|
|
20454
|
-
var segmentedControlLabelCheckStyles =
|
|
20628
|
+
var segmentedControlLabelCheckStyles = import_react125.css`
|
|
20455
20629
|
opacity: 0.5;
|
|
20456
20630
|
`;
|
|
20457
|
-
var segmentedControlLabelContentStyles =
|
|
20631
|
+
var segmentedControlLabelContentStyles = import_react125.css`
|
|
20458
20632
|
display: flex;
|
|
20459
20633
|
align-items: center;
|
|
20460
20634
|
justify-content: center;
|
|
20461
20635
|
gap: var(--spacing-sm);
|
|
20462
20636
|
height: 100%;
|
|
20463
20637
|
`;
|
|
20464
|
-
var segmentedControlLabelTextStyles =
|
|
20638
|
+
var segmentedControlLabelTextStyles = import_react125.css``;
|
|
20465
20639
|
|
|
20466
20640
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20467
|
-
var
|
|
20641
|
+
var import_jsx_runtime110 = require("@emotion/react/jsx-runtime");
|
|
20468
20642
|
var SegmentedControl = ({
|
|
20469
20643
|
name,
|
|
20470
20644
|
options,
|
|
@@ -20476,7 +20650,7 @@ var SegmentedControl = ({
|
|
|
20476
20650
|
size = "md",
|
|
20477
20651
|
...props
|
|
20478
20652
|
}) => {
|
|
20479
|
-
const onOptionChange = (0,
|
|
20653
|
+
const onOptionChange = (0, import_react127.useCallback)(
|
|
20480
20654
|
(event) => {
|
|
20481
20655
|
if (event.target.checked) {
|
|
20482
20656
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -20484,18 +20658,18 @@ var SegmentedControl = ({
|
|
|
20484
20658
|
},
|
|
20485
20659
|
[options, onChange]
|
|
20486
20660
|
);
|
|
20487
|
-
const sizeStyles = (0,
|
|
20661
|
+
const sizeStyles = (0, import_react127.useMemo)(() => {
|
|
20488
20662
|
const map = {
|
|
20489
|
-
sm: (0,
|
|
20490
|
-
md: (0,
|
|
20491
|
-
lg: (0,
|
|
20663
|
+
sm: (0, import_react126.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
20664
|
+
md: (0, import_react126.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
20665
|
+
lg: (0, import_react126.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" })
|
|
20492
20666
|
};
|
|
20493
20667
|
return map[size];
|
|
20494
20668
|
}, [size]);
|
|
20495
|
-
const isIconOnly = (0,
|
|
20669
|
+
const isIconOnly = (0, import_react127.useMemo)(() => {
|
|
20496
20670
|
return options.every((option) => option.icon && !option.label);
|
|
20497
20671
|
}, [options]);
|
|
20498
|
-
return /* @__PURE__ */ (0,
|
|
20672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
20499
20673
|
"div",
|
|
20500
20674
|
{
|
|
20501
20675
|
css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
|
|
@@ -20503,11 +20677,11 @@ var SegmentedControl = ({
|
|
|
20503
20677
|
children: options.map((option, index) => {
|
|
20504
20678
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
20505
20679
|
const isDisabled = disabled || option.disabled;
|
|
20506
|
-
return /* @__PURE__ */ (0,
|
|
20680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
20507
20681
|
Tooltip,
|
|
20508
20682
|
{
|
|
20509
20683
|
title: isDisabled || !option.tooltip ? "" : option.tooltip,
|
|
20510
|
-
children: /* @__PURE__ */ (0,
|
|
20684
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { css: segmentedControlItemStyles, "data-testid": "container-segmented-control", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
20511
20685
|
"label",
|
|
20512
20686
|
{
|
|
20513
20687
|
css: [
|
|
@@ -20516,7 +20690,7 @@ var SegmentedControl = ({
|
|
|
20516
20690
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
20517
20691
|
],
|
|
20518
20692
|
children: [
|
|
20519
|
-
/* @__PURE__ */ (0,
|
|
20693
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
20520
20694
|
"input",
|
|
20521
20695
|
{
|
|
20522
20696
|
css: segmentedControlInputStyles,
|
|
@@ -20528,10 +20702,10 @@ var SegmentedControl = ({
|
|
|
20528
20702
|
disabled: isDisabled
|
|
20529
20703
|
}
|
|
20530
20704
|
),
|
|
20531
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0,
|
|
20532
|
-
/* @__PURE__ */ (0,
|
|
20533
|
-
!option.icon ? null : /* @__PURE__ */ (0,
|
|
20534
|
-
!text ? null : /* @__PURE__ */ (0,
|
|
20705
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_CgCheck5.CgCheck, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
20706
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("span", { css: segmentedControlLabelContentStyles, children: [
|
|
20707
|
+
!option.icon ? null : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Icon, { icon: option.icon, size: "1.5em", iconColor: "currentColor" }),
|
|
20708
|
+
!text ? null : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
20535
20709
|
] })
|
|
20536
20710
|
]
|
|
20537
20711
|
}
|
|
@@ -20549,18 +20723,18 @@ init_emotion_jsx_shim();
|
|
|
20549
20723
|
|
|
20550
20724
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
20551
20725
|
init_emotion_jsx_shim();
|
|
20552
|
-
var
|
|
20553
|
-
var lightFadingOut =
|
|
20726
|
+
var import_react128 = require("@emotion/react");
|
|
20727
|
+
var lightFadingOut = import_react128.keyframes`
|
|
20554
20728
|
from { opacity: 0.1; }
|
|
20555
20729
|
to { opacity: 0.025; }
|
|
20556
20730
|
`;
|
|
20557
|
-
var skeletonStyles =
|
|
20731
|
+
var skeletonStyles = import_react128.css`
|
|
20558
20732
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
20559
20733
|
background-color: var(--gray-900);
|
|
20560
20734
|
`;
|
|
20561
20735
|
|
|
20562
20736
|
// src/components/Skeleton/Skeleton.tsx
|
|
20563
|
-
var
|
|
20737
|
+
var import_jsx_runtime111 = require("@emotion/react/jsx-runtime");
|
|
20564
20738
|
var Skeleton = ({
|
|
20565
20739
|
width = "100%",
|
|
20566
20740
|
height = "1.25rem",
|
|
@@ -20568,7 +20742,7 @@ var Skeleton = ({
|
|
|
20568
20742
|
circle = false,
|
|
20569
20743
|
children,
|
|
20570
20744
|
...otherProps
|
|
20571
|
-
}) => /* @__PURE__ */ (0,
|
|
20745
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
20572
20746
|
"div",
|
|
20573
20747
|
{
|
|
20574
20748
|
css: [
|
|
@@ -20593,8 +20767,8 @@ var React23 = __toESM(require("react"));
|
|
|
20593
20767
|
|
|
20594
20768
|
// src/components/Switch/Switch.styles.ts
|
|
20595
20769
|
init_emotion_jsx_shim();
|
|
20596
|
-
var
|
|
20597
|
-
var SwitchInputContainer =
|
|
20770
|
+
var import_react129 = require("@emotion/react");
|
|
20771
|
+
var SwitchInputContainer = import_react129.css`
|
|
20598
20772
|
cursor: pointer;
|
|
20599
20773
|
display: inline-block;
|
|
20600
20774
|
position: relative;
|
|
@@ -20603,7 +20777,7 @@ var SwitchInputContainer = import_react128.css`
|
|
|
20603
20777
|
vertical-align: middle;
|
|
20604
20778
|
user-select: none;
|
|
20605
20779
|
`;
|
|
20606
|
-
var SwitchInput =
|
|
20780
|
+
var SwitchInput = import_react129.css`
|
|
20607
20781
|
appearance: none;
|
|
20608
20782
|
border-radius: var(--rounded-full);
|
|
20609
20783
|
background-color: var(--white);
|
|
@@ -20641,7 +20815,7 @@ var SwitchInput = import_react128.css`
|
|
|
20641
20815
|
cursor: not-allowed;
|
|
20642
20816
|
}
|
|
20643
20817
|
`;
|
|
20644
|
-
var SwitchInputDisabled =
|
|
20818
|
+
var SwitchInputDisabled = import_react129.css`
|
|
20645
20819
|
opacity: var(--opacity-50);
|
|
20646
20820
|
cursor: not-allowed;
|
|
20647
20821
|
|
|
@@ -20649,7 +20823,7 @@ var SwitchInputDisabled = import_react128.css`
|
|
|
20649
20823
|
cursor: not-allowed;
|
|
20650
20824
|
}
|
|
20651
20825
|
`;
|
|
20652
|
-
var SwitchInputLabel =
|
|
20826
|
+
var SwitchInputLabel = import_react129.css`
|
|
20653
20827
|
align-items: center;
|
|
20654
20828
|
color: var(--brand-secondary-1);
|
|
20655
20829
|
display: inline-flex;
|
|
@@ -20671,26 +20845,26 @@ var SwitchInputLabel = import_react128.css`
|
|
|
20671
20845
|
top: 0;
|
|
20672
20846
|
}
|
|
20673
20847
|
`;
|
|
20674
|
-
var SwitchText =
|
|
20848
|
+
var SwitchText = import_react129.css`
|
|
20675
20849
|
color: var(--gray-500);
|
|
20676
20850
|
font-size: var(--fs-sm);
|
|
20677
20851
|
padding-inline: var(--spacing-2xl) 0;
|
|
20678
20852
|
`;
|
|
20679
20853
|
|
|
20680
20854
|
// src/components/Switch/Switch.tsx
|
|
20681
|
-
var
|
|
20855
|
+
var import_jsx_runtime112 = require("@emotion/react/jsx-runtime");
|
|
20682
20856
|
var Switch = React23.forwardRef(
|
|
20683
20857
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
20684
20858
|
let additionalText = infoText;
|
|
20685
20859
|
if (infoText && toggleText) {
|
|
20686
20860
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
20687
20861
|
}
|
|
20688
|
-
return /* @__PURE__ */ (0,
|
|
20689
|
-
/* @__PURE__ */ (0,
|
|
20690
|
-
/* @__PURE__ */ (0,
|
|
20691
|
-
/* @__PURE__ */ (0,
|
|
20862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_jsx_runtime112.Fragment, { children: [
|
|
20863
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
20864
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
20865
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { css: SwitchInputLabel, children: label })
|
|
20692
20866
|
] }),
|
|
20693
|
-
additionalText ? /* @__PURE__ */ (0,
|
|
20867
|
+
additionalText ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("p", { css: SwitchText, children: additionalText }) : null,
|
|
20694
20868
|
children
|
|
20695
20869
|
] });
|
|
20696
20870
|
}
|
|
@@ -20702,8 +20876,8 @@ var React24 = __toESM(require("react"));
|
|
|
20702
20876
|
|
|
20703
20877
|
// src/components/Table/Table.styles.ts
|
|
20704
20878
|
init_emotion_jsx_shim();
|
|
20705
|
-
var
|
|
20706
|
-
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) =>
|
|
20879
|
+
var import_react130 = require("@emotion/react");
|
|
20880
|
+
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => import_react130.css`
|
|
20707
20881
|
border-bottom: 1px solid var(--gray-400);
|
|
20708
20882
|
border-collapse: collapse;
|
|
20709
20883
|
min-width: 100%;
|
|
@@ -20714,67 +20888,67 @@ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => impor
|
|
|
20714
20888
|
padding: ${cellPadding};
|
|
20715
20889
|
}
|
|
20716
20890
|
`;
|
|
20717
|
-
var tableHead =
|
|
20891
|
+
var tableHead = import_react130.css`
|
|
20718
20892
|
background: var(--gray-100);
|
|
20719
20893
|
color: var(--brand-secondary-1);
|
|
20720
20894
|
text-align: left;
|
|
20721
20895
|
`;
|
|
20722
|
-
var tableRow =
|
|
20896
|
+
var tableRow = import_react130.css`
|
|
20723
20897
|
border-bottom: 1px solid var(--gray-200);
|
|
20724
20898
|
`;
|
|
20725
|
-
var tableCellHead =
|
|
20899
|
+
var tableCellHead = import_react130.css`
|
|
20726
20900
|
font-size: var(--fs-sm);
|
|
20727
20901
|
text-transform: uppercase;
|
|
20728
20902
|
font-weight: var(--fw-bold);
|
|
20729
20903
|
`;
|
|
20730
20904
|
|
|
20731
20905
|
// src/components/Table/Table.tsx
|
|
20732
|
-
var
|
|
20906
|
+
var import_jsx_runtime113 = require("@emotion/react/jsx-runtime");
|
|
20733
20907
|
var Table = React24.forwardRef(
|
|
20734
20908
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
20735
|
-
return /* @__PURE__ */ (0,
|
|
20909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
20736
20910
|
}
|
|
20737
20911
|
);
|
|
20738
20912
|
var TableHead = React24.forwardRef(
|
|
20739
20913
|
({ children, ...otherProps }, ref) => {
|
|
20740
|
-
return /* @__PURE__ */ (0,
|
|
20914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
|
|
20741
20915
|
}
|
|
20742
20916
|
);
|
|
20743
20917
|
var TableBody = React24.forwardRef(
|
|
20744
20918
|
({ children, ...otherProps }, ref) => {
|
|
20745
|
-
return /* @__PURE__ */ (0,
|
|
20919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("tbody", { ref, ...otherProps, children });
|
|
20746
20920
|
}
|
|
20747
20921
|
);
|
|
20748
20922
|
var TableFoot = React24.forwardRef(
|
|
20749
20923
|
({ children, ...otherProps }, ref) => {
|
|
20750
|
-
return /* @__PURE__ */ (0,
|
|
20924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("tfoot", { ref, ...otherProps, children });
|
|
20751
20925
|
}
|
|
20752
20926
|
);
|
|
20753
20927
|
var TableRow = React24.forwardRef(
|
|
20754
20928
|
({ children, ...otherProps }, ref) => {
|
|
20755
|
-
return /* @__PURE__ */ (0,
|
|
20929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
|
|
20756
20930
|
}
|
|
20757
20931
|
);
|
|
20758
20932
|
var TableCellHead = React24.forwardRef(
|
|
20759
20933
|
({ children, ...otherProps }, ref) => {
|
|
20760
|
-
return /* @__PURE__ */ (0,
|
|
20934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
20761
20935
|
}
|
|
20762
20936
|
);
|
|
20763
20937
|
var TableCellData = React24.forwardRef(
|
|
20764
20938
|
({ children, ...otherProps }, ref) => {
|
|
20765
|
-
return /* @__PURE__ */ (0,
|
|
20939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("td", { ref, ...otherProps, children });
|
|
20766
20940
|
}
|
|
20767
20941
|
);
|
|
20768
20942
|
|
|
20769
20943
|
// src/components/Tabs/Tabs.tsx
|
|
20770
20944
|
init_emotion_jsx_shim();
|
|
20771
|
-
var
|
|
20945
|
+
var import_react132 = require("react");
|
|
20772
20946
|
var import_Tab = require("reakit/Tab");
|
|
20773
20947
|
|
|
20774
20948
|
// src/components/Tabs/Tabs.styles.ts
|
|
20775
20949
|
init_emotion_jsx_shim();
|
|
20776
|
-
var
|
|
20777
|
-
var tabButtonStyles =
|
|
20950
|
+
var import_react131 = require("@emotion/react");
|
|
20951
|
+
var tabButtonStyles = import_react131.css`
|
|
20778
20952
|
align-items: center;
|
|
20779
20953
|
border: 0;
|
|
20780
20954
|
height: 2.5rem;
|
|
@@ -20791,30 +20965,30 @@ var tabButtonStyles = import_react130.css`
|
|
|
20791
20965
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
20792
20966
|
}
|
|
20793
20967
|
`;
|
|
20794
|
-
var tabButtonGroupStyles =
|
|
20968
|
+
var tabButtonGroupStyles = import_react131.css`
|
|
20795
20969
|
display: flex;
|
|
20796
20970
|
gap: var(--spacing-base);
|
|
20797
20971
|
border-bottom: 1px solid var(--gray-300);
|
|
20798
20972
|
`;
|
|
20799
20973
|
|
|
20800
20974
|
// src/components/Tabs/Tabs.tsx
|
|
20801
|
-
var
|
|
20802
|
-
var CurrentTabContext = (0,
|
|
20975
|
+
var import_jsx_runtime114 = require("@emotion/react/jsx-runtime");
|
|
20976
|
+
var CurrentTabContext = (0, import_react132.createContext)(null);
|
|
20803
20977
|
var useCurrentTab = () => {
|
|
20804
|
-
const context = (0,
|
|
20978
|
+
const context = (0, import_react132.useContext)(CurrentTabContext);
|
|
20805
20979
|
if (!context) {
|
|
20806
20980
|
throw new Error("This component can only be used inside <Tabs>");
|
|
20807
20981
|
}
|
|
20808
20982
|
return context;
|
|
20809
20983
|
};
|
|
20810
20984
|
var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...props }) => {
|
|
20811
|
-
const selected = (0,
|
|
20985
|
+
const selected = (0, import_react132.useMemo)(() => {
|
|
20812
20986
|
if (selectedId)
|
|
20813
20987
|
return selectedId;
|
|
20814
20988
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
20815
20989
|
}, [selectedId, useHashForState]);
|
|
20816
20990
|
const tab = (0, import_Tab.useTabState)({ ...props, selectedId: selected });
|
|
20817
|
-
(0,
|
|
20991
|
+
(0, import_react132.useEffect)(() => {
|
|
20818
20992
|
var _a;
|
|
20819
20993
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
20820
20994
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -20822,24 +20996,24 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
20822
20996
|
window.location.hash = selectedValueWithoutNull != null ? selectedValueWithoutNull : "";
|
|
20823
20997
|
}
|
|
20824
20998
|
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
20825
|
-
(0,
|
|
20999
|
+
(0, import_react132.useEffect)(() => {
|
|
20826
21000
|
if (selected && selected !== tab.selectedId) {
|
|
20827
21001
|
tab.setSelectedId(selected);
|
|
20828
21002
|
}
|
|
20829
21003
|
}, [selected]);
|
|
20830
|
-
return /* @__PURE__ */ (0,
|
|
21004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(CurrentTabContext.Provider, { value: tab, children });
|
|
20831
21005
|
};
|
|
20832
21006
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
20833
21007
|
const currentTab = useCurrentTab();
|
|
20834
|
-
return /* @__PURE__ */ (0,
|
|
21008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_Tab.TabList, { ...props, ...currentTab, css: tabButtonGroupStyles, children });
|
|
20835
21009
|
};
|
|
20836
21010
|
var TabButton = ({ children, id, ...props }) => {
|
|
20837
21011
|
const currentTab = useCurrentTab();
|
|
20838
|
-
return /* @__PURE__ */ (0,
|
|
21012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_Tab.Tab, { type: "button", id, ...currentTab, ...props, css: tabButtonStyles, children });
|
|
20839
21013
|
};
|
|
20840
21014
|
var TabContent = ({ children, ...props }) => {
|
|
20841
21015
|
const currentTab = useCurrentTab();
|
|
20842
|
-
return /* @__PURE__ */ (0,
|
|
21016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_Tab.TabPanel, { ...props, ...currentTab, children });
|
|
20843
21017
|
};
|
|
20844
21018
|
|
|
20845
21019
|
// src/components/Validation/StatusBullet.tsx
|
|
@@ -20847,8 +21021,8 @@ init_emotion_jsx_shim();
|
|
|
20847
21021
|
|
|
20848
21022
|
// src/components/Validation/StatusBullet.styles.ts
|
|
20849
21023
|
init_emotion_jsx_shim();
|
|
20850
|
-
var
|
|
20851
|
-
var StatusBulletContainer =
|
|
21024
|
+
var import_react133 = require("@emotion/react");
|
|
21025
|
+
var StatusBulletContainer = import_react133.css`
|
|
20852
21026
|
align-items: center;
|
|
20853
21027
|
align-self: center;
|
|
20854
21028
|
color: var(--gray-500);
|
|
@@ -20865,33 +21039,33 @@ var StatusBulletContainer = import_react132.css`
|
|
|
20865
21039
|
display: block;
|
|
20866
21040
|
}
|
|
20867
21041
|
`;
|
|
20868
|
-
var StatusBulletBase =
|
|
21042
|
+
var StatusBulletBase = import_react133.css`
|
|
20869
21043
|
font-size: var(--fs-sm);
|
|
20870
21044
|
&:before {
|
|
20871
21045
|
width: var(--fs-xs);
|
|
20872
21046
|
height: var(--fs-xs);
|
|
20873
21047
|
}
|
|
20874
21048
|
`;
|
|
20875
|
-
var StatusBulletSmall =
|
|
21049
|
+
var StatusBulletSmall = import_react133.css`
|
|
20876
21050
|
font-size: var(--fs-xs);
|
|
20877
21051
|
&:before {
|
|
20878
21052
|
width: var(--fs-xxs);
|
|
20879
21053
|
height: var(--fs-xxs);
|
|
20880
21054
|
}
|
|
20881
21055
|
`;
|
|
20882
|
-
var StatusDraft =
|
|
21056
|
+
var StatusDraft = import_react133.css`
|
|
20883
21057
|
&:before {
|
|
20884
21058
|
background: var(--white);
|
|
20885
21059
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
20886
21060
|
}
|
|
20887
21061
|
`;
|
|
20888
|
-
var StatusModified =
|
|
21062
|
+
var StatusModified = import_react133.css`
|
|
20889
21063
|
&:before {
|
|
20890
21064
|
background: linear-gradient(to right, var(--white) 50%, var(--primary-action-default) 50% 100%);
|
|
20891
21065
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
20892
21066
|
}
|
|
20893
21067
|
`;
|
|
20894
|
-
var StatusError =
|
|
21068
|
+
var StatusError = import_react133.css`
|
|
20895
21069
|
color: var(--error);
|
|
20896
21070
|
&:before {
|
|
20897
21071
|
/* TODO: replace this with an svg icon */
|
|
@@ -20904,19 +21078,19 @@ var StatusError = import_react132.css`
|
|
|
20904
21078
|
);
|
|
20905
21079
|
}
|
|
20906
21080
|
`;
|
|
20907
|
-
var StatusPublished =
|
|
21081
|
+
var StatusPublished = import_react133.css`
|
|
20908
21082
|
&:before {
|
|
20909
21083
|
background: var(--primary-action-default);
|
|
20910
21084
|
}
|
|
20911
21085
|
`;
|
|
20912
|
-
var StatusOrphan =
|
|
21086
|
+
var StatusOrphan = import_react133.css`
|
|
20913
21087
|
&:before {
|
|
20914
21088
|
background: var(--brand-secondary-5);
|
|
20915
21089
|
}
|
|
20916
21090
|
`;
|
|
20917
21091
|
|
|
20918
21092
|
// src/components/Validation/StatusBullet.tsx
|
|
20919
|
-
var
|
|
21093
|
+
var import_jsx_runtime115 = require("@emotion/react/jsx-runtime");
|
|
20920
21094
|
var StatusBullet = ({
|
|
20921
21095
|
status,
|
|
20922
21096
|
hideText = false,
|
|
@@ -20934,7 +21108,7 @@ var StatusBullet = ({
|
|
|
20934
21108
|
Previous: StatusDraft
|
|
20935
21109
|
};
|
|
20936
21110
|
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
20937
|
-
return /* @__PURE__ */ (0,
|
|
21111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
20938
21112
|
"span",
|
|
20939
21113
|
{
|
|
20940
21114
|
role: "status",
|
|
@@ -21050,6 +21224,7 @@ var StatusBullet = ({
|
|
|
21050
21224
|
ParameterToggle,
|
|
21051
21225
|
ParameterToggleInner,
|
|
21052
21226
|
Popover,
|
|
21227
|
+
ProgressBar,
|
|
21053
21228
|
ProgressList,
|
|
21054
21229
|
ProgressListItem,
|
|
21055
21230
|
ResolveIcon,
|
|
@@ -21088,6 +21263,7 @@ var StatusBullet = ({
|
|
|
21088
21263
|
VerticalRhythm,
|
|
21089
21264
|
WarningMessage,
|
|
21090
21265
|
accessibleHidden,
|
|
21266
|
+
addPathSegmentToPathname,
|
|
21091
21267
|
borderTopIcon,
|
|
21092
21268
|
breakpoints,
|
|
21093
21269
|
button,
|
|
@@ -21116,6 +21292,8 @@ var StatusBullet = ({
|
|
|
21116
21292
|
fadeOutBottom,
|
|
21117
21293
|
fullWidthScreenIcon,
|
|
21118
21294
|
getDrawerAttributes,
|
|
21295
|
+
getParentPath,
|
|
21296
|
+
getPathSegment,
|
|
21119
21297
|
growSubtle,
|
|
21120
21298
|
imageTextIcon,
|
|
21121
21299
|
infoFilledIcon,
|
|
@@ -21123,6 +21301,8 @@ var StatusBullet = ({
|
|
|
21123
21301
|
inputError,
|
|
21124
21302
|
inputSelect,
|
|
21125
21303
|
isMacLike,
|
|
21304
|
+
isSecureURL,
|
|
21305
|
+
isValidUrl,
|
|
21126
21306
|
jsonIcon,
|
|
21127
21307
|
labelText,
|
|
21128
21308
|
loaderAnimationData,
|