@uniformdev/design-system 19.54.0 → 19.54.2-alpha.12
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 +294 -117
- package/dist/index.d.mts +402 -370
- package/dist/index.d.ts +402 -370
- package/dist/index.js +328 -141
- 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");
|
|
@@ -13155,6 +13206,7 @@ var Menu = ({
|
|
|
13155
13206
|
import_Menu.Menu,
|
|
13156
13207
|
{
|
|
13157
13208
|
...menuState,
|
|
13209
|
+
"data-auto-resize-opt-in": true,
|
|
13158
13210
|
focusable: false,
|
|
13159
13211
|
"aria-label": menuLabel,
|
|
13160
13212
|
...!isRendered ? { unstable_popoverStyles: { position: "absolute", opacity: "0" } } : void 0,
|
|
@@ -13218,14 +13270,48 @@ function renderWithIcon(children, icon) {
|
|
|
13218
13270
|
// src/components/ButtonWithMenu/ButtonWithMenu.styles.ts
|
|
13219
13271
|
init_emotion_jsx_shim();
|
|
13220
13272
|
var import_react35 = require("@emotion/react");
|
|
13273
|
+
var buttonSizeBase = import_react35.css`
|
|
13274
|
+
--icon-padding: var(--spacing-xs);
|
|
13275
|
+
--svg-size: 1rem;
|
|
13276
|
+
--line-offset: -5px;
|
|
13277
|
+
font-size: var(--fs-sm);
|
|
13278
|
+
|
|
13279
|
+
> button {
|
|
13280
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
13281
|
+
}
|
|
13282
|
+
`;
|
|
13283
|
+
var buttonSizeSmall = import_react35.css`
|
|
13284
|
+
--icon-padding: var(--spacing-xs);
|
|
13285
|
+
--svg-size: 0.85rem;
|
|
13286
|
+
--line-offset: -1px;
|
|
13287
|
+
font-size: var(--fs-sm);
|
|
13288
|
+
|
|
13289
|
+
> button {
|
|
13290
|
+
padding: var(--spacing-xs) var(--spacing-base);
|
|
13291
|
+
}
|
|
13292
|
+
`;
|
|
13293
|
+
var buttonSizeLarge = import_react35.css`
|
|
13294
|
+
--icon-padding: var(--spacing-sm);
|
|
13295
|
+
--svg-size: 1.5rem;
|
|
13296
|
+
--line-offset: -5px;
|
|
13297
|
+
font-size: var(--fs-sm);
|
|
13298
|
+
line-height: 1.25;
|
|
13299
|
+
|
|
13300
|
+
> button {
|
|
13301
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
13302
|
+
}
|
|
13303
|
+
`;
|
|
13221
13304
|
var ButtonWithMenuContainer = import_react35.css`
|
|
13222
13305
|
align-items: center;
|
|
13223
13306
|
border: 1px solid transparent;
|
|
13224
13307
|
border-radius: var(--rounded-sm);
|
|
13225
13308
|
color: var(--white);
|
|
13226
13309
|
display: inline-flex;
|
|
13227
|
-
font-size: var(--fs-sm);
|
|
13228
13310
|
position: relative;
|
|
13311
|
+
min-height: 24px;
|
|
13312
|
+
transition: color var(--duration-fast) var(--timing-ease-out),
|
|
13313
|
+
border-color var(--duration-fast) var(--timing-ease-out),
|
|
13314
|
+
background-color var(--duration-fast) var(--timing-ease-out);
|
|
13229
13315
|
|
|
13230
13316
|
&:active {
|
|
13231
13317
|
opacity: var(--opacity-75);
|
|
@@ -13238,15 +13324,19 @@ var ButtonWithMenuContainer = import_react35.css`
|
|
|
13238
13324
|
&:focus {
|
|
13239
13325
|
border-color: var(--gray-700);
|
|
13240
13326
|
}
|
|
13327
|
+
|
|
13328
|
+
svg {
|
|
13329
|
+
width: var(--svg-size);
|
|
13330
|
+
height: var(--svg-size);
|
|
13331
|
+
}
|
|
13241
13332
|
`;
|
|
13242
13333
|
var ButtonWithMenuBtn = import_react35.css`
|
|
13334
|
+
align-items: center;
|
|
13243
13335
|
border: 1px solid transparent;
|
|
13244
13336
|
background: transparent;
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
letter-spacing: 0.025rem;
|
|
13249
|
-
line-height: 1.25;
|
|
13337
|
+
line-height: 1;
|
|
13338
|
+
display: inline-flex;
|
|
13339
|
+
gap: var(--spacing-xs);
|
|
13250
13340
|
|
|
13251
13341
|
&:focus {
|
|
13252
13342
|
outline: none;
|
|
@@ -13263,8 +13353,17 @@ var ButtonWithMenuBtn = import_react35.css`
|
|
|
13263
13353
|
}
|
|
13264
13354
|
`;
|
|
13265
13355
|
var ButtonWithMenuIcon = import_react35.css`
|
|
13266
|
-
padding: var(--
|
|
13267
|
-
|
|
13356
|
+
padding: var(--icon-padding);
|
|
13357
|
+
position: relative;
|
|
13358
|
+
|
|
13359
|
+
&:before {
|
|
13360
|
+
background: currentColor;
|
|
13361
|
+
content: '';
|
|
13362
|
+
display: block;
|
|
13363
|
+
inset: var(--line-offset) auto var(--line-offset) -1px;
|
|
13364
|
+
width: 1px;
|
|
13365
|
+
position: absolute;
|
|
13366
|
+
}
|
|
13268
13367
|
`;
|
|
13269
13368
|
var buttonPrimary2 = import_react35.css`
|
|
13270
13369
|
background: var(--brand-secondary-1);
|
|
@@ -13304,6 +13403,24 @@ var buttonGhostDisabled = import_react35.css`
|
|
|
13304
13403
|
border-color: var(--gray-400);
|
|
13305
13404
|
color: var(--gray-400);
|
|
13306
13405
|
`;
|
|
13406
|
+
var buttonSecondaryOutline = import_react35.css`
|
|
13407
|
+
background: var(--white);
|
|
13408
|
+
color: var(--primary-action-default);
|
|
13409
|
+
border-color: var(--primary-action-default);
|
|
13410
|
+
|
|
13411
|
+
&:hover {
|
|
13412
|
+
color: var(--primary-action-hover);
|
|
13413
|
+
border-color: var(--primary-action-hover);
|
|
13414
|
+
}
|
|
13415
|
+
`;
|
|
13416
|
+
var buttonSecondaryOutlineDisabled = import_react35.css`
|
|
13417
|
+
background: var(--white);
|
|
13418
|
+
color: var(--gray-400);
|
|
13419
|
+
border-color: var(--gray-400);
|
|
13420
|
+
`;
|
|
13421
|
+
var buttonWithMenuIconOffset = import_react35.css`
|
|
13422
|
+
margin-left: -10px;
|
|
13423
|
+
`;
|
|
13307
13424
|
|
|
13308
13425
|
// src/components/ButtonWithMenu/ButtonWithMenu.tsx
|
|
13309
13426
|
var import_jsx_runtime27 = require("@emotion/react/jsx-runtime");
|
|
@@ -13311,30 +13428,43 @@ var ButtonWithMenu = ({
|
|
|
13311
13428
|
onButtonClick,
|
|
13312
13429
|
buttonType = "secondary",
|
|
13313
13430
|
buttonText,
|
|
13431
|
+
icon,
|
|
13314
13432
|
disabled,
|
|
13315
13433
|
children,
|
|
13316
13434
|
placement,
|
|
13435
|
+
size = "lg",
|
|
13317
13436
|
...buttonProps
|
|
13318
13437
|
}) => {
|
|
13319
13438
|
const buttonTheme = {
|
|
13320
13439
|
primary: buttonPrimary2,
|
|
13321
13440
|
secondary: buttonSecondary2,
|
|
13322
13441
|
ghost: buttonGhost2,
|
|
13323
|
-
unimportant: buttonUnimportant2
|
|
13442
|
+
unimportant: buttonUnimportant2,
|
|
13443
|
+
secondaryOutline: buttonSecondaryOutline
|
|
13324
13444
|
};
|
|
13325
13445
|
const buttonDisabledTheme = {
|
|
13326
13446
|
primary: buttonPrimaryDisabled,
|
|
13327
13447
|
secondary: buttonSecondaryDisabled,
|
|
13328
13448
|
ghost: buttonGhostDisabled,
|
|
13329
|
-
unimportant: buttonUnimportantDisabled
|
|
13449
|
+
unimportant: buttonUnimportantDisabled,
|
|
13450
|
+
secondaryOutline: buttonSecondaryOutlineDisabled
|
|
13451
|
+
};
|
|
13452
|
+
const sizes2 = {
|
|
13453
|
+
base: buttonSizeBase,
|
|
13454
|
+
sm: buttonSizeSmall,
|
|
13455
|
+
lg: buttonSizeLarge
|
|
13330
13456
|
};
|
|
13331
13457
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
13332
13458
|
"div",
|
|
13333
13459
|
{
|
|
13334
|
-
css: [
|
|
13460
|
+
css: [
|
|
13461
|
+
sizes2[size],
|
|
13462
|
+
ButtonWithMenuContainer,
|
|
13463
|
+
disabled ? buttonDisabledTheme[buttonType] : buttonTheme[buttonType]
|
|
13464
|
+
],
|
|
13335
13465
|
"data-testid": "multioptions-button",
|
|
13336
13466
|
children: [
|
|
13337
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.
|
|
13467
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
13338
13468
|
"button",
|
|
13339
13469
|
{
|
|
13340
13470
|
type: "button",
|
|
@@ -13343,7 +13473,10 @@ var ButtonWithMenu = ({
|
|
|
13343
13473
|
onClick: onButtonClick,
|
|
13344
13474
|
"data-testid": "multioptions-button-main",
|
|
13345
13475
|
...buttonProps,
|
|
13346
|
-
children:
|
|
13476
|
+
children: [
|
|
13477
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { icon, iconColor: "currentColor", css: buttonWithMenuIconOffset }) : null,
|
|
13478
|
+
buttonText
|
|
13479
|
+
]
|
|
13347
13480
|
}
|
|
13348
13481
|
),
|
|
13349
13482
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
@@ -13351,7 +13484,7 @@ var ButtonWithMenu = ({
|
|
|
13351
13484
|
{
|
|
13352
13485
|
menuLabel: "buttonMenu",
|
|
13353
13486
|
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,
|
|
13487
|
+
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
13488
|
children
|
|
13356
13489
|
}
|
|
13357
13490
|
)
|
|
@@ -15102,24 +15235,6 @@ init_emotion_jsx_shim();
|
|
|
15102
15235
|
init_emotion_jsx_shim();
|
|
15103
15236
|
var import_react72 = require("react");
|
|
15104
15237
|
|
|
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
15238
|
// src/components/Input/Caption.tsx
|
|
15124
15239
|
init_emotion_jsx_shim();
|
|
15125
15240
|
|
|
@@ -17490,10 +17605,16 @@ var cardBaseTitleStyles = import_react93.css`
|
|
|
17490
17605
|
font-size: var(--fs-sm);
|
|
17491
17606
|
color: var(--gray-500);
|
|
17492
17607
|
cursor: pointer;
|
|
17608
|
+
white-space: nowrap;
|
|
17609
|
+
overflow: hidden;
|
|
17610
|
+
text-overflow: ellipsis;
|
|
17493
17611
|
`;
|
|
17494
17612
|
var cardBaseSubtitleStyles = import_react93.css`
|
|
17495
17613
|
font-size: var(--fs-xs);
|
|
17496
17614
|
color: var(--gray-500);
|
|
17615
|
+
white-space: nowrap;
|
|
17616
|
+
overflow: hidden;
|
|
17617
|
+
text-overflow: ellipsis;
|
|
17497
17618
|
`;
|
|
17498
17619
|
var cardBaseMenuButtonStyles = import_react93.css`
|
|
17499
17620
|
padding: var(--spacing-2xs);
|
|
@@ -17521,8 +17642,8 @@ var MediaCard = ({
|
|
|
17521
17642
|
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(Card, { tag: "button", css: cardBaseStyles, ...cardProps, onClick, children: [
|
|
17522
17643
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { css: cardBaseCoverIconWrapperStyles, children: cover }),
|
|
17523
17644
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { css: cardBaseContentStyles, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(HorizontalRhythm, { gap: "sm", justify: "space-between", align: "center", css: { width: "100%" }, children: [
|
|
17524
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(VerticalRhythm, { gap: "0", align: "flex-start", css: { flex: 1 }, children: [
|
|
17525
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(HorizontalRhythm, { gap: "xs", align: "center", children: [
|
|
17645
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(VerticalRhythm, { gap: "0", align: "flex-start", css: { flex: 1, minWidth: 0 }, children: [
|
|
17646
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(HorizontalRhythm, { gap: "xs", align: "center", css: { maxWidth: "100%" }, children: [
|
|
17526
17647
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { css: cardBaseTitleStyles, "data-testid": "card-title", children: title }),
|
|
17527
17648
|
!infoPopover ? null : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { css: { display: "flex", cursor: "default" }, onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
17528
17649
|
Popover2,
|
|
@@ -17537,9 +17658,9 @@ var MediaCard = ({
|
|
|
17537
17658
|
}
|
|
17538
17659
|
) })
|
|
17539
17660
|
] }),
|
|
17540
|
-
|
|
17661
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { css: cardBaseSubtitleStyles, children: subtitle }) : null
|
|
17541
17662
|
] }),
|
|
17542
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { css: { cursor: "default" }, onClick: (e) => e.stopPropagation(), children: sideSection }),
|
|
17663
|
+
sideSection ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { css: { cursor: "default" }, onClick: (e) => e.stopPropagation(), children: sideSection }) : null,
|
|
17543
17664
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(VerticalRhythm, { align: "center", justify: "center", onClick: (e) => e.stopPropagation(), children: !menuItems || Array.isArray(menuItems) && !menuItems.length ? null : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
17544
17665
|
Menu,
|
|
17545
17666
|
{
|
|
@@ -20229,33 +20350,93 @@ var ParameterToggleInner = (0, import_react120.forwardRef)(
|
|
|
20229
20350
|
}
|
|
20230
20351
|
);
|
|
20231
20352
|
|
|
20353
|
+
// src/components/ProgressBar/ProgressBar.tsx
|
|
20354
|
+
init_emotion_jsx_shim();
|
|
20355
|
+
|
|
20356
|
+
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
20357
|
+
init_emotion_jsx_shim();
|
|
20358
|
+
var import_react121 = require("@emotion/react");
|
|
20359
|
+
var container = import_react121.css`
|
|
20360
|
+
background: var(--gray-50);
|
|
20361
|
+
margin-block: var(--spacing-sm);
|
|
20362
|
+
position: relative;
|
|
20363
|
+
overflow: hidden;
|
|
20364
|
+
height: 1rem;
|
|
20365
|
+
border-radius: var(--rounded-sm);
|
|
20366
|
+
border: solid 1px var(--gray-300);
|
|
20367
|
+
`;
|
|
20368
|
+
var themeMap = {
|
|
20369
|
+
primary: import_react121.css`
|
|
20370
|
+
background-color: var(--accent-light);
|
|
20371
|
+
`,
|
|
20372
|
+
secondary: import_react121.css`
|
|
20373
|
+
background-color: var(--brand-secondary-5);
|
|
20374
|
+
`
|
|
20375
|
+
};
|
|
20376
|
+
var bar = import_react121.css`
|
|
20377
|
+
position: absolute;
|
|
20378
|
+
inset: 0;
|
|
20379
|
+
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
20380
|
+
transform-origin: 0 center;
|
|
20381
|
+
`;
|
|
20382
|
+
|
|
20383
|
+
// src/components/ProgressBar/ProgressBar.tsx
|
|
20384
|
+
var import_jsx_runtime108 = require("@emotion/react/jsx-runtime");
|
|
20385
|
+
function ProgressBar({ className, current, max, theme = "primary" }) {
|
|
20386
|
+
const valueNow = Math.min(current, max);
|
|
20387
|
+
const valuePercentage = max > 0 ? Math.ceil(100 / max * valueNow) : 0;
|
|
20388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
20389
|
+
"div",
|
|
20390
|
+
{
|
|
20391
|
+
className,
|
|
20392
|
+
css: container,
|
|
20393
|
+
role: "progressbar",
|
|
20394
|
+
"aria-busy": valuePercentage !== 100,
|
|
20395
|
+
"aria-invalid": false,
|
|
20396
|
+
"aria-valuemin": 0,
|
|
20397
|
+
"aria-valuemax": max,
|
|
20398
|
+
"aria-valuenow": valueNow,
|
|
20399
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
20400
|
+
"div",
|
|
20401
|
+
{
|
|
20402
|
+
css: [bar, themeMap[theme]],
|
|
20403
|
+
style: {
|
|
20404
|
+
transform: `scaleX(${valuePercentage / 100})`
|
|
20405
|
+
},
|
|
20406
|
+
"aria-label": `${current} / ${max}`
|
|
20407
|
+
}
|
|
20408
|
+
)
|
|
20409
|
+
}
|
|
20410
|
+
);
|
|
20411
|
+
}
|
|
20412
|
+
|
|
20232
20413
|
// src/components/ProgressList/ProgressList.tsx
|
|
20233
20414
|
init_emotion_jsx_shim();
|
|
20234
|
-
var
|
|
20415
|
+
var import_react123 = require("@emotion/react");
|
|
20235
20416
|
var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
|
|
20236
20417
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
20237
20418
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
20238
|
-
var
|
|
20419
|
+
var import_react124 = require("react");
|
|
20239
20420
|
|
|
20240
20421
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
20241
20422
|
init_emotion_jsx_shim();
|
|
20242
|
-
var
|
|
20243
|
-
var progressListStyles =
|
|
20423
|
+
var import_react122 = require("@emotion/react");
|
|
20424
|
+
var progressListStyles = import_react122.css`
|
|
20244
20425
|
display: flex;
|
|
20245
20426
|
flex-direction: column;
|
|
20246
20427
|
gap: var(--spacing-sm);
|
|
20247
20428
|
list-style-type: none;
|
|
20248
20429
|
`;
|
|
20249
|
-
var progressListItemStyles =
|
|
20430
|
+
var progressListItemStyles = import_react122.css`
|
|
20250
20431
|
display: flex;
|
|
20251
20432
|
gap: var(--spacing-base);
|
|
20252
20433
|
align-items: center;
|
|
20253
20434
|
`;
|
|
20254
20435
|
|
|
20255
20436
|
// src/components/ProgressList/ProgressList.tsx
|
|
20256
|
-
var
|
|
20437
|
+
var import_jsx_runtime109 = require("@emotion/react/jsx-runtime");
|
|
20257
20438
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
20258
|
-
const itemsWithStatus = (0,
|
|
20439
|
+
const itemsWithStatus = (0, import_react124.useMemo)(() => {
|
|
20259
20440
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
20260
20441
|
return items.map((item, index) => {
|
|
20261
20442
|
let status = "queued";
|
|
@@ -20267,8 +20448,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
|
20267
20448
|
return { ...item, status };
|
|
20268
20449
|
});
|
|
20269
20450
|
}, [items, inProgressId]);
|
|
20270
|
-
return /* @__PURE__ */ (0,
|
|
20271
|
-
return /* @__PURE__ */ (0,
|
|
20451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
|
|
20452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
20272
20453
|
ProgressListItem,
|
|
20273
20454
|
{
|
|
20274
20455
|
status,
|
|
@@ -20288,7 +20469,7 @@ var ProgressListItem = ({
|
|
|
20288
20469
|
errorLevel = "danger",
|
|
20289
20470
|
autoEllipsis = false
|
|
20290
20471
|
}) => {
|
|
20291
|
-
const icon = (0,
|
|
20472
|
+
const icon = (0, import_react124.useMemo)(() => {
|
|
20292
20473
|
if (error) {
|
|
20293
20474
|
return warningIcon;
|
|
20294
20475
|
}
|
|
@@ -20299,14 +20480,14 @@ var ProgressListItem = ({
|
|
|
20299
20480
|
};
|
|
20300
20481
|
return iconPerStatus[status];
|
|
20301
20482
|
}, [status, error]);
|
|
20302
|
-
const statusStyles = (0,
|
|
20483
|
+
const statusStyles = (0, import_react124.useMemo)(() => {
|
|
20303
20484
|
if (error) {
|
|
20304
|
-
return errorLevel === "caution" ?
|
|
20485
|
+
return errorLevel === "caution" ? import_react123.css`
|
|
20305
20486
|
color: rgb(161, 98, 7);
|
|
20306
20487
|
& svg {
|
|
20307
20488
|
color: rgb(250, 204, 21);
|
|
20308
20489
|
}
|
|
20309
|
-
` :
|
|
20490
|
+
` : import_react123.css`
|
|
20310
20491
|
color: rgb(185, 28, 28);
|
|
20311
20492
|
& svg {
|
|
20312
20493
|
color: var(--brand-primary-2);
|
|
@@ -20314,37 +20495,37 @@ var ProgressListItem = ({
|
|
|
20314
20495
|
`;
|
|
20315
20496
|
}
|
|
20316
20497
|
const colorPerStatus = {
|
|
20317
|
-
completed:
|
|
20498
|
+
completed: import_react123.css`
|
|
20318
20499
|
opacity: 0.75;
|
|
20319
20500
|
`,
|
|
20320
|
-
inProgress:
|
|
20501
|
+
inProgress: import_react123.css`
|
|
20321
20502
|
-webkit-text-stroke-width: thin;
|
|
20322
20503
|
`,
|
|
20323
|
-
queued:
|
|
20504
|
+
queued: import_react123.css`
|
|
20324
20505
|
opacity: 0.5;
|
|
20325
20506
|
`
|
|
20326
20507
|
};
|
|
20327
20508
|
return colorPerStatus[status];
|
|
20328
20509
|
}, [status, error, errorLevel]);
|
|
20329
|
-
return /* @__PURE__ */ (0,
|
|
20330
|
-
/* @__PURE__ */ (0,
|
|
20331
|
-
/* @__PURE__ */ (0,
|
|
20510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("li", { css: [progressListItemStyles, statusStyles], children: [
|
|
20511
|
+
/* @__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" }) }) }),
|
|
20512
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { children: [
|
|
20332
20513
|
children,
|
|
20333
|
-
/* @__PURE__ */ (0,
|
|
20514
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
|
|
20334
20515
|
] })
|
|
20335
20516
|
] });
|
|
20336
20517
|
};
|
|
20337
20518
|
|
|
20338
20519
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20339
20520
|
init_emotion_jsx_shim();
|
|
20340
|
-
var
|
|
20521
|
+
var import_react126 = require("@emotion/react");
|
|
20341
20522
|
var import_CgCheck5 = require("@react-icons/all-files/cg/CgCheck");
|
|
20342
|
-
var
|
|
20523
|
+
var import_react127 = require("react");
|
|
20343
20524
|
|
|
20344
20525
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
20345
20526
|
init_emotion_jsx_shim();
|
|
20346
|
-
var
|
|
20347
|
-
var segmentedControlStyles =
|
|
20527
|
+
var import_react125 = require("@emotion/react");
|
|
20528
|
+
var segmentedControlStyles = import_react125.css`
|
|
20348
20529
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
20349
20530
|
--segmented-control-border-width: 1px;
|
|
20350
20531
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -20363,14 +20544,14 @@ var segmentedControlStyles = import_react124.css`
|
|
|
20363
20544
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
20364
20545
|
font-size: var(--fs-xs);
|
|
20365
20546
|
`;
|
|
20366
|
-
var segmentedControlVerticalStyles =
|
|
20547
|
+
var segmentedControlVerticalStyles = import_react125.css`
|
|
20367
20548
|
flex-direction: column;
|
|
20368
20549
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
20369
20550
|
var(--segmented-control-rounded-value) 0 0;
|
|
20370
20551
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
20371
20552
|
var(--segmented-control-rounded-value);
|
|
20372
20553
|
`;
|
|
20373
|
-
var segmentedControlItemStyles =
|
|
20554
|
+
var segmentedControlItemStyles = import_react125.css`
|
|
20374
20555
|
&:first-of-type label {
|
|
20375
20556
|
border-radius: var(--segmented-control-first-border-radius);
|
|
20376
20557
|
}
|
|
@@ -20378,10 +20559,10 @@ var segmentedControlItemStyles = import_react124.css`
|
|
|
20378
20559
|
border-radius: var(--segmented-control-last-border-radius);
|
|
20379
20560
|
}
|
|
20380
20561
|
`;
|
|
20381
|
-
var segmentedControlInputStyles =
|
|
20562
|
+
var segmentedControlInputStyles = import_react125.css`
|
|
20382
20563
|
${accessibleHidden}
|
|
20383
20564
|
`;
|
|
20384
|
-
var segmentedControlLabelStyles = (checked, disabled) =>
|
|
20565
|
+
var segmentedControlLabelStyles = (checked, disabled) => import_react125.css`
|
|
20385
20566
|
position: relative;
|
|
20386
20567
|
display: flex;
|
|
20387
20568
|
align-items: center;
|
|
@@ -20448,23 +20629,23 @@ var segmentedControlLabelStyles = (checked, disabled) => import_react124.css`
|
|
|
20448
20629
|
`}
|
|
20449
20630
|
}
|
|
20450
20631
|
`;
|
|
20451
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
20632
|
+
var segmentedControlLabelIconOnlyStyles = import_react125.css`
|
|
20452
20633
|
padding-inline: 0.5em;
|
|
20453
20634
|
`;
|
|
20454
|
-
var segmentedControlLabelCheckStyles =
|
|
20635
|
+
var segmentedControlLabelCheckStyles = import_react125.css`
|
|
20455
20636
|
opacity: 0.5;
|
|
20456
20637
|
`;
|
|
20457
|
-
var segmentedControlLabelContentStyles =
|
|
20638
|
+
var segmentedControlLabelContentStyles = import_react125.css`
|
|
20458
20639
|
display: flex;
|
|
20459
20640
|
align-items: center;
|
|
20460
20641
|
justify-content: center;
|
|
20461
20642
|
gap: var(--spacing-sm);
|
|
20462
20643
|
height: 100%;
|
|
20463
20644
|
`;
|
|
20464
|
-
var segmentedControlLabelTextStyles =
|
|
20645
|
+
var segmentedControlLabelTextStyles = import_react125.css``;
|
|
20465
20646
|
|
|
20466
20647
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20467
|
-
var
|
|
20648
|
+
var import_jsx_runtime110 = require("@emotion/react/jsx-runtime");
|
|
20468
20649
|
var SegmentedControl = ({
|
|
20469
20650
|
name,
|
|
20470
20651
|
options,
|
|
@@ -20476,7 +20657,7 @@ var SegmentedControl = ({
|
|
|
20476
20657
|
size = "md",
|
|
20477
20658
|
...props
|
|
20478
20659
|
}) => {
|
|
20479
|
-
const onOptionChange = (0,
|
|
20660
|
+
const onOptionChange = (0, import_react127.useCallback)(
|
|
20480
20661
|
(event) => {
|
|
20481
20662
|
if (event.target.checked) {
|
|
20482
20663
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -20484,18 +20665,18 @@ var SegmentedControl = ({
|
|
|
20484
20665
|
},
|
|
20485
20666
|
[options, onChange]
|
|
20486
20667
|
);
|
|
20487
|
-
const sizeStyles = (0,
|
|
20668
|
+
const sizeStyles = (0, import_react127.useMemo)(() => {
|
|
20488
20669
|
const map = {
|
|
20489
|
-
sm: (0,
|
|
20490
|
-
md: (0,
|
|
20491
|
-
lg: (0,
|
|
20670
|
+
sm: (0, import_react126.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
20671
|
+
md: (0, import_react126.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
20672
|
+
lg: (0, import_react126.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" })
|
|
20492
20673
|
};
|
|
20493
20674
|
return map[size];
|
|
20494
20675
|
}, [size]);
|
|
20495
|
-
const isIconOnly = (0,
|
|
20676
|
+
const isIconOnly = (0, import_react127.useMemo)(() => {
|
|
20496
20677
|
return options.every((option) => option.icon && !option.label);
|
|
20497
20678
|
}, [options]);
|
|
20498
|
-
return /* @__PURE__ */ (0,
|
|
20679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
20499
20680
|
"div",
|
|
20500
20681
|
{
|
|
20501
20682
|
css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
|
|
@@ -20503,11 +20684,11 @@ var SegmentedControl = ({
|
|
|
20503
20684
|
children: options.map((option, index) => {
|
|
20504
20685
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
20505
20686
|
const isDisabled = disabled || option.disabled;
|
|
20506
|
-
return /* @__PURE__ */ (0,
|
|
20687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
20507
20688
|
Tooltip,
|
|
20508
20689
|
{
|
|
20509
20690
|
title: isDisabled || !option.tooltip ? "" : option.tooltip,
|
|
20510
|
-
children: /* @__PURE__ */ (0,
|
|
20691
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { css: segmentedControlItemStyles, "data-testid": "container-segmented-control", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
20511
20692
|
"label",
|
|
20512
20693
|
{
|
|
20513
20694
|
css: [
|
|
@@ -20516,7 +20697,7 @@ var SegmentedControl = ({
|
|
|
20516
20697
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
20517
20698
|
],
|
|
20518
20699
|
children: [
|
|
20519
|
-
/* @__PURE__ */ (0,
|
|
20700
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
20520
20701
|
"input",
|
|
20521
20702
|
{
|
|
20522
20703
|
css: segmentedControlInputStyles,
|
|
@@ -20528,10 +20709,10 @@ var SegmentedControl = ({
|
|
|
20528
20709
|
disabled: isDisabled
|
|
20529
20710
|
}
|
|
20530
20711
|
),
|
|
20531
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0,
|
|
20532
|
-
/* @__PURE__ */ (0,
|
|
20533
|
-
!option.icon ? null : /* @__PURE__ */ (0,
|
|
20534
|
-
!text ? null : /* @__PURE__ */ (0,
|
|
20712
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_CgCheck5.CgCheck, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
20713
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("span", { css: segmentedControlLabelContentStyles, children: [
|
|
20714
|
+
!option.icon ? null : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Icon, { icon: option.icon, size: "1.5em", iconColor: "currentColor" }),
|
|
20715
|
+
!text ? null : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
20535
20716
|
] })
|
|
20536
20717
|
]
|
|
20537
20718
|
}
|
|
@@ -20549,18 +20730,18 @@ init_emotion_jsx_shim();
|
|
|
20549
20730
|
|
|
20550
20731
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
20551
20732
|
init_emotion_jsx_shim();
|
|
20552
|
-
var
|
|
20553
|
-
var lightFadingOut =
|
|
20733
|
+
var import_react128 = require("@emotion/react");
|
|
20734
|
+
var lightFadingOut = import_react128.keyframes`
|
|
20554
20735
|
from { opacity: 0.1; }
|
|
20555
20736
|
to { opacity: 0.025; }
|
|
20556
20737
|
`;
|
|
20557
|
-
var skeletonStyles =
|
|
20738
|
+
var skeletonStyles = import_react128.css`
|
|
20558
20739
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
20559
20740
|
background-color: var(--gray-900);
|
|
20560
20741
|
`;
|
|
20561
20742
|
|
|
20562
20743
|
// src/components/Skeleton/Skeleton.tsx
|
|
20563
|
-
var
|
|
20744
|
+
var import_jsx_runtime111 = require("@emotion/react/jsx-runtime");
|
|
20564
20745
|
var Skeleton = ({
|
|
20565
20746
|
width = "100%",
|
|
20566
20747
|
height = "1.25rem",
|
|
@@ -20568,7 +20749,7 @@ var Skeleton = ({
|
|
|
20568
20749
|
circle = false,
|
|
20569
20750
|
children,
|
|
20570
20751
|
...otherProps
|
|
20571
|
-
}) => /* @__PURE__ */ (0,
|
|
20752
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
20572
20753
|
"div",
|
|
20573
20754
|
{
|
|
20574
20755
|
css: [
|
|
@@ -20593,8 +20774,8 @@ var React23 = __toESM(require("react"));
|
|
|
20593
20774
|
|
|
20594
20775
|
// src/components/Switch/Switch.styles.ts
|
|
20595
20776
|
init_emotion_jsx_shim();
|
|
20596
|
-
var
|
|
20597
|
-
var SwitchInputContainer =
|
|
20777
|
+
var import_react129 = require("@emotion/react");
|
|
20778
|
+
var SwitchInputContainer = import_react129.css`
|
|
20598
20779
|
cursor: pointer;
|
|
20599
20780
|
display: inline-block;
|
|
20600
20781
|
position: relative;
|
|
@@ -20603,7 +20784,7 @@ var SwitchInputContainer = import_react128.css`
|
|
|
20603
20784
|
vertical-align: middle;
|
|
20604
20785
|
user-select: none;
|
|
20605
20786
|
`;
|
|
20606
|
-
var SwitchInput =
|
|
20787
|
+
var SwitchInput = import_react129.css`
|
|
20607
20788
|
appearance: none;
|
|
20608
20789
|
border-radius: var(--rounded-full);
|
|
20609
20790
|
background-color: var(--white);
|
|
@@ -20641,7 +20822,7 @@ var SwitchInput = import_react128.css`
|
|
|
20641
20822
|
cursor: not-allowed;
|
|
20642
20823
|
}
|
|
20643
20824
|
`;
|
|
20644
|
-
var SwitchInputDisabled =
|
|
20825
|
+
var SwitchInputDisabled = import_react129.css`
|
|
20645
20826
|
opacity: var(--opacity-50);
|
|
20646
20827
|
cursor: not-allowed;
|
|
20647
20828
|
|
|
@@ -20649,7 +20830,7 @@ var SwitchInputDisabled = import_react128.css`
|
|
|
20649
20830
|
cursor: not-allowed;
|
|
20650
20831
|
}
|
|
20651
20832
|
`;
|
|
20652
|
-
var SwitchInputLabel =
|
|
20833
|
+
var SwitchInputLabel = import_react129.css`
|
|
20653
20834
|
align-items: center;
|
|
20654
20835
|
color: var(--brand-secondary-1);
|
|
20655
20836
|
display: inline-flex;
|
|
@@ -20671,26 +20852,26 @@ var SwitchInputLabel = import_react128.css`
|
|
|
20671
20852
|
top: 0;
|
|
20672
20853
|
}
|
|
20673
20854
|
`;
|
|
20674
|
-
var SwitchText =
|
|
20855
|
+
var SwitchText = import_react129.css`
|
|
20675
20856
|
color: var(--gray-500);
|
|
20676
20857
|
font-size: var(--fs-sm);
|
|
20677
20858
|
padding-inline: var(--spacing-2xl) 0;
|
|
20678
20859
|
`;
|
|
20679
20860
|
|
|
20680
20861
|
// src/components/Switch/Switch.tsx
|
|
20681
|
-
var
|
|
20862
|
+
var import_jsx_runtime112 = require("@emotion/react/jsx-runtime");
|
|
20682
20863
|
var Switch = React23.forwardRef(
|
|
20683
20864
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
20684
20865
|
let additionalText = infoText;
|
|
20685
20866
|
if (infoText && toggleText) {
|
|
20686
20867
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
20687
20868
|
}
|
|
20688
|
-
return /* @__PURE__ */ (0,
|
|
20689
|
-
/* @__PURE__ */ (0,
|
|
20690
|
-
/* @__PURE__ */ (0,
|
|
20691
|
-
/* @__PURE__ */ (0,
|
|
20869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_jsx_runtime112.Fragment, { children: [
|
|
20870
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
|
|
20871
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
|
|
20872
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { css: SwitchInputLabel, children: label })
|
|
20692
20873
|
] }),
|
|
20693
|
-
additionalText ? /* @__PURE__ */ (0,
|
|
20874
|
+
additionalText ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("p", { css: SwitchText, children: additionalText }) : null,
|
|
20694
20875
|
children
|
|
20695
20876
|
] });
|
|
20696
20877
|
}
|
|
@@ -20702,8 +20883,8 @@ var React24 = __toESM(require("react"));
|
|
|
20702
20883
|
|
|
20703
20884
|
// src/components/Table/Table.styles.ts
|
|
20704
20885
|
init_emotion_jsx_shim();
|
|
20705
|
-
var
|
|
20706
|
-
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) =>
|
|
20886
|
+
var import_react130 = require("@emotion/react");
|
|
20887
|
+
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => import_react130.css`
|
|
20707
20888
|
border-bottom: 1px solid var(--gray-400);
|
|
20708
20889
|
border-collapse: collapse;
|
|
20709
20890
|
min-width: 100%;
|
|
@@ -20714,67 +20895,67 @@ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => impor
|
|
|
20714
20895
|
padding: ${cellPadding};
|
|
20715
20896
|
}
|
|
20716
20897
|
`;
|
|
20717
|
-
var tableHead =
|
|
20898
|
+
var tableHead = import_react130.css`
|
|
20718
20899
|
background: var(--gray-100);
|
|
20719
20900
|
color: var(--brand-secondary-1);
|
|
20720
20901
|
text-align: left;
|
|
20721
20902
|
`;
|
|
20722
|
-
var tableRow =
|
|
20903
|
+
var tableRow = import_react130.css`
|
|
20723
20904
|
border-bottom: 1px solid var(--gray-200);
|
|
20724
20905
|
`;
|
|
20725
|
-
var tableCellHead =
|
|
20906
|
+
var tableCellHead = import_react130.css`
|
|
20726
20907
|
font-size: var(--fs-sm);
|
|
20727
20908
|
text-transform: uppercase;
|
|
20728
20909
|
font-weight: var(--fw-bold);
|
|
20729
20910
|
`;
|
|
20730
20911
|
|
|
20731
20912
|
// src/components/Table/Table.tsx
|
|
20732
|
-
var
|
|
20913
|
+
var import_jsx_runtime113 = require("@emotion/react/jsx-runtime");
|
|
20733
20914
|
var Table = React24.forwardRef(
|
|
20734
20915
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
20735
|
-
return /* @__PURE__ */ (0,
|
|
20916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
20736
20917
|
}
|
|
20737
20918
|
);
|
|
20738
20919
|
var TableHead = React24.forwardRef(
|
|
20739
20920
|
({ children, ...otherProps }, ref) => {
|
|
20740
|
-
return /* @__PURE__ */ (0,
|
|
20921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
|
|
20741
20922
|
}
|
|
20742
20923
|
);
|
|
20743
20924
|
var TableBody = React24.forwardRef(
|
|
20744
20925
|
({ children, ...otherProps }, ref) => {
|
|
20745
|
-
return /* @__PURE__ */ (0,
|
|
20926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("tbody", { ref, ...otherProps, children });
|
|
20746
20927
|
}
|
|
20747
20928
|
);
|
|
20748
20929
|
var TableFoot = React24.forwardRef(
|
|
20749
20930
|
({ children, ...otherProps }, ref) => {
|
|
20750
|
-
return /* @__PURE__ */ (0,
|
|
20931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("tfoot", { ref, ...otherProps, children });
|
|
20751
20932
|
}
|
|
20752
20933
|
);
|
|
20753
20934
|
var TableRow = React24.forwardRef(
|
|
20754
20935
|
({ children, ...otherProps }, ref) => {
|
|
20755
|
-
return /* @__PURE__ */ (0,
|
|
20936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
|
|
20756
20937
|
}
|
|
20757
20938
|
);
|
|
20758
20939
|
var TableCellHead = React24.forwardRef(
|
|
20759
20940
|
({ children, ...otherProps }, ref) => {
|
|
20760
|
-
return /* @__PURE__ */ (0,
|
|
20941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
20761
20942
|
}
|
|
20762
20943
|
);
|
|
20763
20944
|
var TableCellData = React24.forwardRef(
|
|
20764
20945
|
({ children, ...otherProps }, ref) => {
|
|
20765
|
-
return /* @__PURE__ */ (0,
|
|
20946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("td", { ref, ...otherProps, children });
|
|
20766
20947
|
}
|
|
20767
20948
|
);
|
|
20768
20949
|
|
|
20769
20950
|
// src/components/Tabs/Tabs.tsx
|
|
20770
20951
|
init_emotion_jsx_shim();
|
|
20771
|
-
var
|
|
20952
|
+
var import_react132 = require("react");
|
|
20772
20953
|
var import_Tab = require("reakit/Tab");
|
|
20773
20954
|
|
|
20774
20955
|
// src/components/Tabs/Tabs.styles.ts
|
|
20775
20956
|
init_emotion_jsx_shim();
|
|
20776
|
-
var
|
|
20777
|
-
var tabButtonStyles =
|
|
20957
|
+
var import_react131 = require("@emotion/react");
|
|
20958
|
+
var tabButtonStyles = import_react131.css`
|
|
20778
20959
|
align-items: center;
|
|
20779
20960
|
border: 0;
|
|
20780
20961
|
height: 2.5rem;
|
|
@@ -20791,30 +20972,30 @@ var tabButtonStyles = import_react130.css`
|
|
|
20791
20972
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
20792
20973
|
}
|
|
20793
20974
|
`;
|
|
20794
|
-
var tabButtonGroupStyles =
|
|
20975
|
+
var tabButtonGroupStyles = import_react131.css`
|
|
20795
20976
|
display: flex;
|
|
20796
20977
|
gap: var(--spacing-base);
|
|
20797
20978
|
border-bottom: 1px solid var(--gray-300);
|
|
20798
20979
|
`;
|
|
20799
20980
|
|
|
20800
20981
|
// src/components/Tabs/Tabs.tsx
|
|
20801
|
-
var
|
|
20802
|
-
var CurrentTabContext = (0,
|
|
20982
|
+
var import_jsx_runtime114 = require("@emotion/react/jsx-runtime");
|
|
20983
|
+
var CurrentTabContext = (0, import_react132.createContext)(null);
|
|
20803
20984
|
var useCurrentTab = () => {
|
|
20804
|
-
const context = (0,
|
|
20985
|
+
const context = (0, import_react132.useContext)(CurrentTabContext);
|
|
20805
20986
|
if (!context) {
|
|
20806
20987
|
throw new Error("This component can only be used inside <Tabs>");
|
|
20807
20988
|
}
|
|
20808
20989
|
return context;
|
|
20809
20990
|
};
|
|
20810
20991
|
var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...props }) => {
|
|
20811
|
-
const selected = (0,
|
|
20992
|
+
const selected = (0, import_react132.useMemo)(() => {
|
|
20812
20993
|
if (selectedId)
|
|
20813
20994
|
return selectedId;
|
|
20814
20995
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
20815
20996
|
}, [selectedId, useHashForState]);
|
|
20816
20997
|
const tab = (0, import_Tab.useTabState)({ ...props, selectedId: selected });
|
|
20817
|
-
(0,
|
|
20998
|
+
(0, import_react132.useEffect)(() => {
|
|
20818
20999
|
var _a;
|
|
20819
21000
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
20820
21001
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -20822,24 +21003,24 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
20822
21003
|
window.location.hash = selectedValueWithoutNull != null ? selectedValueWithoutNull : "";
|
|
20823
21004
|
}
|
|
20824
21005
|
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
20825
|
-
(0,
|
|
21006
|
+
(0, import_react132.useEffect)(() => {
|
|
20826
21007
|
if (selected && selected !== tab.selectedId) {
|
|
20827
21008
|
tab.setSelectedId(selected);
|
|
20828
21009
|
}
|
|
20829
21010
|
}, [selected]);
|
|
20830
|
-
return /* @__PURE__ */ (0,
|
|
21011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(CurrentTabContext.Provider, { value: tab, children });
|
|
20831
21012
|
};
|
|
20832
21013
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
20833
21014
|
const currentTab = useCurrentTab();
|
|
20834
|
-
return /* @__PURE__ */ (0,
|
|
21015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_Tab.TabList, { ...props, ...currentTab, css: tabButtonGroupStyles, children });
|
|
20835
21016
|
};
|
|
20836
21017
|
var TabButton = ({ children, id, ...props }) => {
|
|
20837
21018
|
const currentTab = useCurrentTab();
|
|
20838
|
-
return /* @__PURE__ */ (0,
|
|
21019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_Tab.Tab, { type: "button", id, ...currentTab, ...props, css: tabButtonStyles, children });
|
|
20839
21020
|
};
|
|
20840
21021
|
var TabContent = ({ children, ...props }) => {
|
|
20841
21022
|
const currentTab = useCurrentTab();
|
|
20842
|
-
return /* @__PURE__ */ (0,
|
|
21023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_Tab.TabPanel, { ...props, ...currentTab, children });
|
|
20843
21024
|
};
|
|
20844
21025
|
|
|
20845
21026
|
// src/components/Validation/StatusBullet.tsx
|
|
@@ -20847,8 +21028,8 @@ init_emotion_jsx_shim();
|
|
|
20847
21028
|
|
|
20848
21029
|
// src/components/Validation/StatusBullet.styles.ts
|
|
20849
21030
|
init_emotion_jsx_shim();
|
|
20850
|
-
var
|
|
20851
|
-
var StatusBulletContainer =
|
|
21031
|
+
var import_react133 = require("@emotion/react");
|
|
21032
|
+
var StatusBulletContainer = import_react133.css`
|
|
20852
21033
|
align-items: center;
|
|
20853
21034
|
align-self: center;
|
|
20854
21035
|
color: var(--gray-500);
|
|
@@ -20865,33 +21046,33 @@ var StatusBulletContainer = import_react132.css`
|
|
|
20865
21046
|
display: block;
|
|
20866
21047
|
}
|
|
20867
21048
|
`;
|
|
20868
|
-
var StatusBulletBase =
|
|
21049
|
+
var StatusBulletBase = import_react133.css`
|
|
20869
21050
|
font-size: var(--fs-sm);
|
|
20870
21051
|
&:before {
|
|
20871
21052
|
width: var(--fs-xs);
|
|
20872
21053
|
height: var(--fs-xs);
|
|
20873
21054
|
}
|
|
20874
21055
|
`;
|
|
20875
|
-
var StatusBulletSmall =
|
|
21056
|
+
var StatusBulletSmall = import_react133.css`
|
|
20876
21057
|
font-size: var(--fs-xs);
|
|
20877
21058
|
&:before {
|
|
20878
21059
|
width: var(--fs-xxs);
|
|
20879
21060
|
height: var(--fs-xxs);
|
|
20880
21061
|
}
|
|
20881
21062
|
`;
|
|
20882
|
-
var StatusDraft =
|
|
21063
|
+
var StatusDraft = import_react133.css`
|
|
20883
21064
|
&:before {
|
|
20884
21065
|
background: var(--white);
|
|
20885
21066
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
20886
21067
|
}
|
|
20887
21068
|
`;
|
|
20888
|
-
var StatusModified =
|
|
21069
|
+
var StatusModified = import_react133.css`
|
|
20889
21070
|
&:before {
|
|
20890
21071
|
background: linear-gradient(to right, var(--white) 50%, var(--primary-action-default) 50% 100%);
|
|
20891
21072
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
20892
21073
|
}
|
|
20893
21074
|
`;
|
|
20894
|
-
var StatusError =
|
|
21075
|
+
var StatusError = import_react133.css`
|
|
20895
21076
|
color: var(--error);
|
|
20896
21077
|
&:before {
|
|
20897
21078
|
/* TODO: replace this with an svg icon */
|
|
@@ -20904,19 +21085,19 @@ var StatusError = import_react132.css`
|
|
|
20904
21085
|
);
|
|
20905
21086
|
}
|
|
20906
21087
|
`;
|
|
20907
|
-
var StatusPublished =
|
|
21088
|
+
var StatusPublished = import_react133.css`
|
|
20908
21089
|
&:before {
|
|
20909
21090
|
background: var(--primary-action-default);
|
|
20910
21091
|
}
|
|
20911
21092
|
`;
|
|
20912
|
-
var StatusOrphan =
|
|
21093
|
+
var StatusOrphan = import_react133.css`
|
|
20913
21094
|
&:before {
|
|
20914
21095
|
background: var(--brand-secondary-5);
|
|
20915
21096
|
}
|
|
20916
21097
|
`;
|
|
20917
21098
|
|
|
20918
21099
|
// src/components/Validation/StatusBullet.tsx
|
|
20919
|
-
var
|
|
21100
|
+
var import_jsx_runtime115 = require("@emotion/react/jsx-runtime");
|
|
20920
21101
|
var StatusBullet = ({
|
|
20921
21102
|
status,
|
|
20922
21103
|
hideText = false,
|
|
@@ -20934,7 +21115,7 @@ var StatusBullet = ({
|
|
|
20934
21115
|
Previous: StatusDraft
|
|
20935
21116
|
};
|
|
20936
21117
|
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
20937
|
-
return /* @__PURE__ */ (0,
|
|
21118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
20938
21119
|
"span",
|
|
20939
21120
|
{
|
|
20940
21121
|
role: "status",
|
|
@@ -21050,6 +21231,7 @@ var StatusBullet = ({
|
|
|
21050
21231
|
ParameterToggle,
|
|
21051
21232
|
ParameterToggleInner,
|
|
21052
21233
|
Popover,
|
|
21234
|
+
ProgressBar,
|
|
21053
21235
|
ProgressList,
|
|
21054
21236
|
ProgressListItem,
|
|
21055
21237
|
ResolveIcon,
|
|
@@ -21088,6 +21270,7 @@ var StatusBullet = ({
|
|
|
21088
21270
|
VerticalRhythm,
|
|
21089
21271
|
WarningMessage,
|
|
21090
21272
|
accessibleHidden,
|
|
21273
|
+
addPathSegmentToPathname,
|
|
21091
21274
|
borderTopIcon,
|
|
21092
21275
|
breakpoints,
|
|
21093
21276
|
button,
|
|
@@ -21116,6 +21299,8 @@ var StatusBullet = ({
|
|
|
21116
21299
|
fadeOutBottom,
|
|
21117
21300
|
fullWidthScreenIcon,
|
|
21118
21301
|
getDrawerAttributes,
|
|
21302
|
+
getParentPath,
|
|
21303
|
+
getPathSegment,
|
|
21119
21304
|
growSubtle,
|
|
21120
21305
|
imageTextIcon,
|
|
21121
21306
|
infoFilledIcon,
|
|
@@ -21123,6 +21308,8 @@ var StatusBullet = ({
|
|
|
21123
21308
|
inputError,
|
|
21124
21309
|
inputSelect,
|
|
21125
21310
|
isMacLike,
|
|
21311
|
+
isSecureURL,
|
|
21312
|
+
isValidUrl,
|
|
21126
21313
|
jsonIcon,
|
|
21127
21314
|
labelText,
|
|
21128
21315
|
loaderAnimationData,
|