@wistia/ui 0.5.4 → 0.5.5-beta.72ca8428.4bdcb4b
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/index.cjs +674 -610
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +113 -72
- package/dist/index.d.ts +113 -72
- package/dist/index.mjs +577 -516
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.5.
|
|
3
|
+
* @license @wistia/ui v0.5.5-beta.72ca8428.4bdcb4b
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -51,6 +51,9 @@ __export(index_exports, {
|
|
|
51
51
|
Checkbox: () => Checkbox,
|
|
52
52
|
CheckboxGroup: () => CheckboxGroup,
|
|
53
53
|
CheckboxMenuItem: () => CheckboxMenuItem,
|
|
54
|
+
Collapsible: () => Collapsible,
|
|
55
|
+
CollapsibleContent: () => CollapsibleContent,
|
|
56
|
+
CollapsibleTrigger: () => CollapsibleTrigger,
|
|
54
57
|
ColorSchemeWrapper: () => ColorSchemeWrapper,
|
|
55
58
|
DataCard: () => DataCard,
|
|
56
59
|
DataCardTrend: () => DataCardTrend,
|
|
@@ -5921,7 +5924,6 @@ var StyledLink = import_styled_components19.default.a`
|
|
|
5921
5924
|
align-items: baseline;
|
|
5922
5925
|
gap: var(--wui-space-01);
|
|
5923
5926
|
|
|
5924
|
-
/* This ensure that the icon is the corect color when the style is solid or the button is disabled */
|
|
5925
5927
|
&& {
|
|
5926
5928
|
svg {
|
|
5927
5929
|
width: var(--link-icon-size);
|
|
@@ -6193,8 +6195,10 @@ var StyledActionButton = (0, import_styled_components21.default)(Button)`
|
|
|
6193
6195
|
outline-color: var(--wui-color-focus-ring-disabled);
|
|
6194
6196
|
cursor: not-allowed;
|
|
6195
6197
|
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
+
&& {
|
|
6199
|
+
svg {
|
|
6200
|
+
color: var(--wui-color-icon-disabled);
|
|
6201
|
+
}
|
|
6198
6202
|
}
|
|
6199
6203
|
}
|
|
6200
6204
|
`;
|
|
@@ -6205,9 +6209,11 @@ var StyledMainIcon = import_styled_components21.default.div`
|
|
|
6205
6209
|
height: 24px;
|
|
6206
6210
|
transition: color var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
6207
6211
|
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6212
|
+
&& {
|
|
6213
|
+
svg {
|
|
6214
|
+
width: 24px;
|
|
6215
|
+
height: 24px;
|
|
6216
|
+
}
|
|
6211
6217
|
}
|
|
6212
6218
|
`;
|
|
6213
6219
|
var StyledSecondaryIcon = import_styled_components21.default.div`
|
|
@@ -6229,9 +6235,11 @@ var StyledSecondaryIcon = import_styled_components21.default.div`
|
|
|
6229
6235
|
}
|
|
6230
6236
|
`};
|
|
6231
6237
|
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6238
|
+
&& {
|
|
6239
|
+
svg {
|
|
6240
|
+
width: 24px;
|
|
6241
|
+
height: 24px;
|
|
6242
|
+
}
|
|
6235
6243
|
}
|
|
6236
6244
|
`;
|
|
6237
6245
|
var StyledLabel = import_styled_components21.default.span`
|
|
@@ -7176,11 +7184,63 @@ var Checkbox = (0, import_react19.forwardRef)(
|
|
|
7176
7184
|
);
|
|
7177
7185
|
Checkbox.displayName = "Checkbox";
|
|
7178
7186
|
|
|
7179
|
-
// src/components/
|
|
7180
|
-
var
|
|
7187
|
+
// src/components/Collapsible/Collapsible.tsx
|
|
7188
|
+
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
7181
7189
|
var import_type_guards21 = require("@wistia/type-guards");
|
|
7190
|
+
var import_styled_components34 = __toESM(require("styled-components"));
|
|
7182
7191
|
var import_jsx_runtime176 = require("react/jsx-runtime");
|
|
7183
|
-
var
|
|
7192
|
+
var StyledRoot = (0, import_styled_components34.default)(import_react_collapsible.Root)`
|
|
7193
|
+
&[data-state='closed'] [data-wui-collapsible-content] {
|
|
7194
|
+
display: -webkit-box;
|
|
7195
|
+
-webkit-box-orient: vertical;
|
|
7196
|
+
-webkit-line-clamp: var(--wui-collapsible-content-clamp-lines);
|
|
7197
|
+
overflow: hidden;
|
|
7198
|
+
}
|
|
7199
|
+
`;
|
|
7200
|
+
var Collapsible = ({
|
|
7201
|
+
children,
|
|
7202
|
+
isOpen = false,
|
|
7203
|
+
onOpenChange
|
|
7204
|
+
}) => {
|
|
7205
|
+
const controlProps = {
|
|
7206
|
+
...(0, import_type_guards21.isNotNil)(onOpenChange) && (0, import_type_guards21.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
7207
|
+
};
|
|
7208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(StyledRoot, { ...controlProps, children });
|
|
7209
|
+
};
|
|
7210
|
+
Collapsible.displayName = "Collapsible";
|
|
7211
|
+
|
|
7212
|
+
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
7213
|
+
var import_react20 = require("react");
|
|
7214
|
+
var import_react_collapsible2 = require("@radix-ui/react-collapsible");
|
|
7215
|
+
var import_jsx_runtime177 = require("react/jsx-runtime");
|
|
7216
|
+
var CollapsibleTrigger = ({ children }) => {
|
|
7217
|
+
import_react20.Children.only(children);
|
|
7218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_react_collapsible2.Trigger, { asChild: true, children });
|
|
7219
|
+
};
|
|
7220
|
+
|
|
7221
|
+
// src/components/Collapsible/CollapsibleContent.tsx
|
|
7222
|
+
var import_styled_components35 = __toESM(require("styled-components"));
|
|
7223
|
+
var import_react_collapsible3 = require("@radix-ui/react-collapsible");
|
|
7224
|
+
var import_type_guards22 = require("@wistia/type-guards");
|
|
7225
|
+
var import_jsx_runtime178 = require("react/jsx-runtime");
|
|
7226
|
+
var ClampedContent = import_styled_components35.default.div.attrs({ "data-wui-collapsible-content": true })`
|
|
7227
|
+
--wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
|
|
7228
|
+
`;
|
|
7229
|
+
var CollapsibleContent = ({ clamp, children }) => {
|
|
7230
|
+
if ((0, import_type_guards22.isNotUndefined)(clamp)) {
|
|
7231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(ClampedContent, { $clamp: clamp, children });
|
|
7232
|
+
}
|
|
7233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(import_react_collapsible3.Content, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(import_jsx_runtime178.Fragment, { children: [
|
|
7234
|
+
children,
|
|
7235
|
+
" "
|
|
7236
|
+
] }) });
|
|
7237
|
+
};
|
|
7238
|
+
|
|
7239
|
+
// src/components/DataCards/DataCard.tsx
|
|
7240
|
+
var import_styled_components36 = __toESM(require("styled-components"));
|
|
7241
|
+
var import_type_guards23 = require("@wistia/type-guards");
|
|
7242
|
+
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
7243
|
+
var StyledDataCard = import_styled_components36.default.div`
|
|
7184
7244
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
7185
7245
|
display: grid;
|
|
7186
7246
|
grid-template-areas: 'label slot' 'value value';
|
|
@@ -7193,7 +7253,7 @@ var StyledDataCard = import_styled_components34.default.div`
|
|
|
7193
7253
|
border-radius: var(--wui-border-radius-02);
|
|
7194
7254
|
position: relative;
|
|
7195
7255
|
`;
|
|
7196
|
-
var shimmer =
|
|
7256
|
+
var shimmer = import_styled_components36.keyframes`
|
|
7197
7257
|
0% {
|
|
7198
7258
|
background-position: 200% 0;
|
|
7199
7259
|
}
|
|
@@ -7201,7 +7261,7 @@ var shimmer = import_styled_components34.keyframes`
|
|
|
7201
7261
|
background-position: -200% 0;
|
|
7202
7262
|
}
|
|
7203
7263
|
`;
|
|
7204
|
-
var LoadingBackground =
|
|
7264
|
+
var LoadingBackground = import_styled_components36.default.div`
|
|
7205
7265
|
background: linear-gradient(
|
|
7206
7266
|
90deg,
|
|
7207
7267
|
var(--wui-color-bg-surface-tertiary) 25%,
|
|
@@ -7212,27 +7272,27 @@ var LoadingBackground = import_styled_components34.default.div`
|
|
|
7212
7272
|
animation: ${shimmer} 1.5s infinite;
|
|
7213
7273
|
border-radius: var(--wui-border-radius-01);
|
|
7214
7274
|
`;
|
|
7215
|
-
var StyledLoadingLabel = (0,
|
|
7275
|
+
var StyledLoadingLabel = (0, import_styled_components36.default)(LoadingBackground)`
|
|
7216
7276
|
width: 80px;
|
|
7217
7277
|
height: var(--wui-typography-heading-6-line-height);
|
|
7218
7278
|
`;
|
|
7219
|
-
var StyledLoadingValue = (0,
|
|
7279
|
+
var StyledLoadingValue = (0, import_styled_components36.default)(LoadingBackground)`
|
|
7220
7280
|
width: 90%;
|
|
7221
7281
|
height: var(--wui-typography-heading-3-line-height);
|
|
7222
7282
|
`;
|
|
7223
|
-
var StyledLabel3 = (0,
|
|
7283
|
+
var StyledLabel3 = (0, import_styled_components36.default)(Heading)`
|
|
7224
7284
|
grid-area: label;
|
|
7225
7285
|
`;
|
|
7226
|
-
var StyledValue = (0,
|
|
7286
|
+
var StyledValue = (0, import_styled_components36.default)(Heading)`
|
|
7227
7287
|
grid-area: value;
|
|
7228
7288
|
`;
|
|
7229
|
-
var StyledSlot =
|
|
7289
|
+
var StyledSlot = import_styled_components36.default.div`
|
|
7230
7290
|
display: flex;
|
|
7231
7291
|
justify-content: flex-end;
|
|
7232
7292
|
grid-area: slot;
|
|
7233
7293
|
align-self: center;
|
|
7234
7294
|
`;
|
|
7235
|
-
var StyledDataCardTrendContainer =
|
|
7295
|
+
var StyledDataCardTrendContainer = import_styled_components36.default.div`
|
|
7236
7296
|
position: absolute;
|
|
7237
7297
|
bottom: var(--wui-space-01);
|
|
7238
7298
|
right: var(--wui-space-01);
|
|
@@ -7245,39 +7305,39 @@ var DataCard = ({
|
|
|
7245
7305
|
isLoading = false,
|
|
7246
7306
|
trend,
|
|
7247
7307
|
...props
|
|
7248
|
-
}) => /* @__PURE__ */ (0,
|
|
7308
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime179.jsxs)(
|
|
7249
7309
|
StyledDataCard,
|
|
7250
7310
|
{
|
|
7251
7311
|
$colorScheme: colorScheme,
|
|
7252
7312
|
...props,
|
|
7253
7313
|
children: [
|
|
7254
|
-
/* @__PURE__ */ (0,
|
|
7314
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
|
|
7255
7315
|
StyledLabel3,
|
|
7256
7316
|
{
|
|
7257
7317
|
renderAs: "dt",
|
|
7258
7318
|
variant: "heading6",
|
|
7259
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
7319
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(StyledLoadingLabel, {}) : label
|
|
7260
7320
|
}
|
|
7261
7321
|
),
|
|
7262
|
-
/* @__PURE__ */ (0,
|
|
7322
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
|
|
7263
7323
|
StyledValue,
|
|
7264
7324
|
{
|
|
7265
7325
|
renderAs: "dd",
|
|
7266
7326
|
variant: "heading3",
|
|
7267
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
7327
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(StyledLoadingValue, {}) : value
|
|
7268
7328
|
}
|
|
7269
7329
|
),
|
|
7270
|
-
(0,
|
|
7271
|
-
(0,
|
|
7330
|
+
(0, import_type_guards23.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(StyledSlot, { children: upperRightSlot }),
|
|
7331
|
+
(0, import_type_guards23.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(StyledDataCardTrendContainer, { children: trend })
|
|
7272
7332
|
]
|
|
7273
7333
|
}
|
|
7274
7334
|
);
|
|
7275
7335
|
DataCard.displayName = "DataCard";
|
|
7276
7336
|
|
|
7277
7337
|
// src/components/DataCards/DataCards.tsx
|
|
7278
|
-
var
|
|
7279
|
-
var
|
|
7280
|
-
var StyledDataCards = (0,
|
|
7338
|
+
var import_styled_components37 = __toESM(require("styled-components"));
|
|
7339
|
+
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
7340
|
+
var StyledDataCards = (0, import_styled_components37.default)(Box)`
|
|
7281
7341
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7282
7342
|
margin-top: 0; /* Remove default <dl> style */
|
|
7283
7343
|
> * {
|
|
@@ -7291,7 +7351,7 @@ var DataCards = ({
|
|
|
7291
7351
|
colorScheme = "inherit",
|
|
7292
7352
|
...props
|
|
7293
7353
|
}) => {
|
|
7294
|
-
return /* @__PURE__ */ (0,
|
|
7354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
|
|
7295
7355
|
StyledDataCards,
|
|
7296
7356
|
{
|
|
7297
7357
|
...props,
|
|
@@ -7309,93 +7369,93 @@ var DataCards = ({
|
|
|
7309
7369
|
DataCards.displayName = "DataCards";
|
|
7310
7370
|
|
|
7311
7371
|
// src/components/DataCards/DataCardTrend.tsx
|
|
7312
|
-
var
|
|
7372
|
+
var import_styled_components39 = __toESM(require("styled-components"));
|
|
7313
7373
|
|
|
7314
7374
|
// src/components/Text/Text.tsx
|
|
7315
|
-
var
|
|
7316
|
-
var
|
|
7317
|
-
var
|
|
7318
|
-
var bodyBoldStyles =
|
|
7375
|
+
var import_react21 = require("react");
|
|
7376
|
+
var import_styled_components38 = __toESM(require("styled-components"));
|
|
7377
|
+
var import_jsx_runtime181 = require("react/jsx-runtime");
|
|
7378
|
+
var bodyBoldStyles = import_styled_components38.css`
|
|
7319
7379
|
> strong,
|
|
7320
7380
|
b {
|
|
7321
7381
|
font-weight: var(--wui-typography-weight-body-bold);
|
|
7322
7382
|
}
|
|
7323
7383
|
`;
|
|
7324
|
-
var labelBoldStyles =
|
|
7384
|
+
var labelBoldStyles = import_styled_components38.css`
|
|
7325
7385
|
> strong,
|
|
7326
7386
|
b {
|
|
7327
7387
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
7328
7388
|
}
|
|
7329
7389
|
`;
|
|
7330
|
-
var body1TextStyle =
|
|
7390
|
+
var body1TextStyle = import_styled_components38.css`
|
|
7331
7391
|
--font-family: var(--wui-typography-body-1-family);
|
|
7332
7392
|
--font-size: var(--wui-typography-body-1-size);
|
|
7333
7393
|
--font-weight: var(--wui-typography-body-1-weight);
|
|
7334
7394
|
--line-height: var(--wui-typography-body-1-line-height);
|
|
7335
7395
|
${bodyBoldStyles}
|
|
7336
7396
|
`;
|
|
7337
|
-
var body2TextStyle =
|
|
7397
|
+
var body2TextStyle = import_styled_components38.css`
|
|
7338
7398
|
--font-family: var(--wui-typography-body-2-family);
|
|
7339
7399
|
--font-size: var(--wui-typography-body-2-size);
|
|
7340
7400
|
--font-weight: var(--wui-typography-body-2-weight);
|
|
7341
7401
|
--line-height: var(--wui-typography-body-2-line-height);
|
|
7342
7402
|
${bodyBoldStyles}
|
|
7343
7403
|
`;
|
|
7344
|
-
var body3TextStyle =
|
|
7404
|
+
var body3TextStyle = import_styled_components38.css`
|
|
7345
7405
|
--font-family: var(--wui-typography-body-3-family);
|
|
7346
7406
|
--font-size: var(--wui-typography-body-3-size);
|
|
7347
7407
|
--font-weight: var(--wui-typography-body-3-weight);
|
|
7348
7408
|
--line-height: var(--wui-typography-body-3-line-height);
|
|
7349
7409
|
${bodyBoldStyles}
|
|
7350
7410
|
`;
|
|
7351
|
-
var body4TextStyle =
|
|
7411
|
+
var body4TextStyle = import_styled_components38.css`
|
|
7352
7412
|
--font-family: var(--wui-typography-body-4-family);
|
|
7353
7413
|
--font-size: var(--wui-typography-body-4-size);
|
|
7354
7414
|
--font-weight: var(--wui-typography-body-4-weight);
|
|
7355
7415
|
--line-height: var(--wui-typography-body-4-line-height);
|
|
7356
7416
|
${bodyBoldStyles}
|
|
7357
7417
|
`;
|
|
7358
|
-
var label1TextStyle =
|
|
7418
|
+
var label1TextStyle = import_styled_components38.css`
|
|
7359
7419
|
--font-family: var(--wui-typography-label-1-family);
|
|
7360
7420
|
--font-size: var(--wui-typography-label-1-size);
|
|
7361
7421
|
--font-weight: var(--wui-typography-label-1-weight);
|
|
7362
7422
|
--line-height: var(--wui-typography-label-1-line-height);
|
|
7363
7423
|
${labelBoldStyles}
|
|
7364
7424
|
`;
|
|
7365
|
-
var label2TextStyle =
|
|
7425
|
+
var label2TextStyle = import_styled_components38.css`
|
|
7366
7426
|
--font-family: var(--wui-typography-label-2-family);
|
|
7367
7427
|
--font-size: var(--wui-typography-label-2-size);
|
|
7368
7428
|
--font-weight: var(--wui-typography-label-2-weight);
|
|
7369
7429
|
--line-height: var(--wui-typography-label-2-line-height);
|
|
7370
7430
|
${labelBoldStyles}
|
|
7371
7431
|
`;
|
|
7372
|
-
var label3TextStyle =
|
|
7432
|
+
var label3TextStyle = import_styled_components38.css`
|
|
7373
7433
|
--font-family: var(--wui-typography-label-3-family);
|
|
7374
7434
|
--font-size: var(--wui-typography-label-3-size);
|
|
7375
7435
|
--font-weight: var(--wui-typography-label-3-weight);
|
|
7376
7436
|
--line-height: var(--wui-typography-label-3-line-height);
|
|
7377
7437
|
${labelBoldStyles}
|
|
7378
7438
|
`;
|
|
7379
|
-
var label4TextStyle =
|
|
7439
|
+
var label4TextStyle = import_styled_components38.css`
|
|
7380
7440
|
--font-family: var(--wui-typography-label-4-family);
|
|
7381
7441
|
--font-size: var(--wui-typography-label-4-size);
|
|
7382
7442
|
--font-weight: var(--wui-typography-label-4-weight);
|
|
7383
7443
|
--line-height: var(--wui-typography-label-4-line-height);
|
|
7384
7444
|
${labelBoldStyles}
|
|
7385
7445
|
`;
|
|
7386
|
-
var body1MonoTextStyle =
|
|
7446
|
+
var body1MonoTextStyle = import_styled_components38.css`
|
|
7387
7447
|
${body1TextStyle};
|
|
7388
7448
|
--font-family: var(--wui-typography-family-mono);
|
|
7389
7449
|
`;
|
|
7390
|
-
var body2MonoTextStyle =
|
|
7450
|
+
var body2MonoTextStyle = import_styled_components38.css`
|
|
7391
7451
|
${body2TextStyle};
|
|
7392
7452
|
--font-family: var(--wui-typography-family-mono);
|
|
7393
7453
|
`;
|
|
7394
|
-
var body3MonoTextStyle =
|
|
7454
|
+
var body3MonoTextStyle = import_styled_components38.css`
|
|
7395
7455
|
${body3TextStyle};
|
|
7396
7456
|
--font-family: var(--wui-typography-family-mono);
|
|
7397
7457
|
`;
|
|
7398
|
-
var body4MonoTextStyle =
|
|
7458
|
+
var body4MonoTextStyle = import_styled_components38.css`
|
|
7399
7459
|
${body4TextStyle};
|
|
7400
7460
|
--font-family: var(--wui-typography-family-mono);
|
|
7401
7461
|
`;
|
|
@@ -7413,7 +7473,7 @@ var variantStyleMap2 = {
|
|
|
7413
7473
|
label3: label3TextStyle,
|
|
7414
7474
|
label4: label4TextStyle
|
|
7415
7475
|
};
|
|
7416
|
-
var StyledText =
|
|
7476
|
+
var StyledText = import_styled_components38.default.div`
|
|
7417
7477
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7418
7478
|
--text-color: ${({ $prominence, $disabled }) => {
|
|
7419
7479
|
if ($disabled) {
|
|
@@ -7437,24 +7497,24 @@ var StyledText = import_styled_components36.default.div`
|
|
|
7437
7497
|
margin: 0;
|
|
7438
7498
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
7439
7499
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
7440
|
-
${({ $inline }) => $inline &&
|
|
7500
|
+
${({ $inline }) => $inline && import_styled_components38.css`
|
|
7441
7501
|
display: inline-block;
|
|
7442
7502
|
`}
|
|
7443
|
-
${({ $disabled }) => $disabled &&
|
|
7503
|
+
${({ $disabled }) => $disabled && import_styled_components38.css`
|
|
7444
7504
|
--text-color: var(--wui-color-text-disabled);
|
|
7445
7505
|
`}
|
|
7446
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
7506
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components38.css`
|
|
7447
7507
|
user-select: none;
|
|
7448
7508
|
`}
|
|
7449
|
-
${({ $align }) =>
|
|
7509
|
+
${({ $align }) => import_styled_components38.css`
|
|
7450
7510
|
text-align: ${$align};
|
|
7451
7511
|
`}
|
|
7452
|
-
${({ as }) => as === "p" &&
|
|
7512
|
+
${({ as }) => as === "p" && import_styled_components38.css`
|
|
7453
7513
|
display: block;
|
|
7454
7514
|
`}
|
|
7455
7515
|
`;
|
|
7456
7516
|
var DEFAULT_ELEMENT3 = "div";
|
|
7457
|
-
var TextComponent = (0,
|
|
7517
|
+
var TextComponent = (0, import_react21.forwardRef)(
|
|
7458
7518
|
({
|
|
7459
7519
|
align = "left",
|
|
7460
7520
|
colorScheme = "inherit",
|
|
@@ -7467,7 +7527,7 @@ var TextComponent = (0, import_react20.forwardRef)(
|
|
|
7467
7527
|
renderAs,
|
|
7468
7528
|
...otherProps
|
|
7469
7529
|
}, ref) => {
|
|
7470
|
-
return /* @__PURE__ */ (0,
|
|
7530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
7471
7531
|
StyledText,
|
|
7472
7532
|
{
|
|
7473
7533
|
ref,
|
|
@@ -7489,8 +7549,8 @@ TextComponent.displayName = "Text";
|
|
|
7489
7549
|
var Text = makePolymorphic(TextComponent);
|
|
7490
7550
|
|
|
7491
7551
|
// src/components/DataCards/DataCardTrend.tsx
|
|
7492
|
-
var
|
|
7493
|
-
var StyledDataCardTrend =
|
|
7552
|
+
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
7553
|
+
var StyledDataCardTrend = import_styled_components39.default.div`
|
|
7494
7554
|
${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
|
|
7495
7555
|
background: var(--wui-color-bg-app);
|
|
7496
7556
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -7505,8 +7565,8 @@ var DataCardTrend = ({
|
|
|
7505
7565
|
children,
|
|
7506
7566
|
...props
|
|
7507
7567
|
}) => {
|
|
7508
|
-
return /* @__PURE__ */ (0,
|
|
7509
|
-
/* @__PURE__ */ (0,
|
|
7568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(StyledDataCardTrend, { $outlook: outlook, children: [
|
|
7569
|
+
/* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
|
|
7510
7570
|
Icon,
|
|
7511
7571
|
{
|
|
7512
7572
|
size: "md",
|
|
@@ -7514,7 +7574,7 @@ var DataCardTrend = ({
|
|
|
7514
7574
|
...props
|
|
7515
7575
|
}
|
|
7516
7576
|
),
|
|
7517
|
-
/* @__PURE__ */ (0,
|
|
7577
|
+
/* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
|
|
7518
7578
|
Text,
|
|
7519
7579
|
{
|
|
7520
7580
|
prominence: "secondary",
|
|
@@ -7526,22 +7586,22 @@ var DataCardTrend = ({
|
|
|
7526
7586
|
};
|
|
7527
7587
|
|
|
7528
7588
|
// src/components/Divider/Divider.tsx
|
|
7529
|
-
var
|
|
7530
|
-
var
|
|
7531
|
-
var horizontalBorderCss =
|
|
7589
|
+
var import_styled_components40 = __toESM(require("styled-components"));
|
|
7590
|
+
var import_jsx_runtime183 = require("react/jsx-runtime");
|
|
7591
|
+
var horizontalBorderCss = import_styled_components40.css`
|
|
7532
7592
|
border-top-color: var(--wui-color-border);
|
|
7533
7593
|
border-top-style: solid;
|
|
7534
7594
|
border-top-width: 1px;
|
|
7535
7595
|
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
7536
7596
|
height: 0;
|
|
7537
7597
|
`;
|
|
7538
|
-
var verticalBorderCss =
|
|
7598
|
+
var verticalBorderCss = import_styled_components40.css`
|
|
7539
7599
|
background-color: var(--wui-color-border);
|
|
7540
7600
|
max-width: 1px;
|
|
7541
7601
|
min-height: 100%;
|
|
7542
7602
|
width: 1px;
|
|
7543
7603
|
`;
|
|
7544
|
-
var DividerComponent =
|
|
7604
|
+
var DividerComponent = import_styled_components40.default.div`
|
|
7545
7605
|
${({ $orientation }) => {
|
|
7546
7606
|
switch ($orientation) {
|
|
7547
7607
|
case "vertical":
|
|
@@ -7556,7 +7616,7 @@ var Divider = ({
|
|
|
7556
7616
|
orientation = "horizontal",
|
|
7557
7617
|
...otherProps
|
|
7558
7618
|
}) => {
|
|
7559
|
-
return /* @__PURE__ */ (0,
|
|
7619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
|
|
7560
7620
|
DividerComponent,
|
|
7561
7621
|
{
|
|
7562
7622
|
$orientation: orientation,
|
|
@@ -7569,15 +7629,15 @@ var Divider = ({
|
|
|
7569
7629
|
Divider.displayName = "Divider";
|
|
7570
7630
|
|
|
7571
7631
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
7572
|
-
var
|
|
7573
|
-
var
|
|
7632
|
+
var import_styled_components44 = __toESM(require("styled-components"));
|
|
7633
|
+
var import_react23 = require("react");
|
|
7574
7634
|
|
|
7575
7635
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
7576
|
-
var
|
|
7577
|
-
var
|
|
7578
|
-
var
|
|
7579
|
-
var VisuallyHidden =
|
|
7580
|
-
var VisuallyHiddenButFocusable =
|
|
7636
|
+
var import_styled_components41 = __toESM(require("styled-components"));
|
|
7637
|
+
var import_type_guards24 = require("@wistia/type-guards");
|
|
7638
|
+
var import_jsx_runtime184 = require("react/jsx-runtime");
|
|
7639
|
+
var VisuallyHidden = import_styled_components41.default.div({ ...visuallyHiddenStyle });
|
|
7640
|
+
var VisuallyHiddenButFocusable = import_styled_components41.default.div({
|
|
7581
7641
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
7582
7642
|
});
|
|
7583
7643
|
var ScreenReaderOnly = ({
|
|
@@ -7586,26 +7646,26 @@ var ScreenReaderOnly = ({
|
|
|
7586
7646
|
focusable = false,
|
|
7587
7647
|
...otherProps
|
|
7588
7648
|
}) => {
|
|
7589
|
-
const accessibleText = (0,
|
|
7649
|
+
const accessibleText = (0, import_type_guards24.isNotNil)(text) ? text : children;
|
|
7590
7650
|
if (focusable) {
|
|
7591
|
-
return /* @__PURE__ */ (0,
|
|
7651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
7592
7652
|
}
|
|
7593
|
-
return /* @__PURE__ */ (0,
|
|
7653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
7594
7654
|
};
|
|
7595
7655
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
7596
7656
|
|
|
7597
7657
|
// src/components/Tooltip/Tooltip.tsx
|
|
7598
7658
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
7599
|
-
var
|
|
7600
|
-
var
|
|
7601
|
-
var CompactTooltipStyles =
|
|
7659
|
+
var import_styled_components42 = __toESM(require("styled-components"));
|
|
7660
|
+
var import_jsx_runtime185 = require("react/jsx-runtime");
|
|
7661
|
+
var CompactTooltipStyles = import_styled_components42.css`
|
|
7602
7662
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
7603
7663
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
7604
7664
|
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
7605
7665
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
7606
7666
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
7607
7667
|
`;
|
|
7608
|
-
var StyledContent = (0,
|
|
7668
|
+
var StyledContent = (0, import_styled_components42.default)(import_react_tooltip2.Content)`
|
|
7609
7669
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
7610
7670
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
7611
7671
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -7663,14 +7723,14 @@ var Tooltip = ({
|
|
|
7663
7723
|
if (forceOpen === true) {
|
|
7664
7724
|
rootProps.open = true;
|
|
7665
7725
|
}
|
|
7666
|
-
return /* @__PURE__ */ (0,
|
|
7726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(
|
|
7667
7727
|
import_react_tooltip2.Root,
|
|
7668
7728
|
{
|
|
7669
7729
|
delayDuration: delay,
|
|
7670
7730
|
...rootProps,
|
|
7671
7731
|
children: [
|
|
7672
|
-
/* @__PURE__ */ (0,
|
|
7673
|
-
/* @__PURE__ */ (0,
|
|
7732
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
7733
|
+
/* @__PURE__ */ (0, import_jsx_runtime185.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(
|
|
7674
7734
|
StyledContent,
|
|
7675
7735
|
{
|
|
7676
7736
|
$compact: compact,
|
|
@@ -7678,7 +7738,7 @@ var Tooltip = ({
|
|
|
7678
7738
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
7679
7739
|
children: [
|
|
7680
7740
|
content,
|
|
7681
|
-
!hideArrow ? /* @__PURE__ */ (0,
|
|
7741
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
|
|
7682
7742
|
"svg",
|
|
7683
7743
|
{
|
|
7684
7744
|
fill: "var(--tooltip-bg)",
|
|
@@ -7687,7 +7747,7 @@ var Tooltip = ({
|
|
|
7687
7747
|
viewBox: "0 0 12 8",
|
|
7688
7748
|
width: "12",
|
|
7689
7749
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7690
|
-
children: /* @__PURE__ */ (0,
|
|
7750
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
|
|
7691
7751
|
}
|
|
7692
7752
|
) }) : null
|
|
7693
7753
|
]
|
|
@@ -7700,11 +7760,11 @@ var Tooltip = ({
|
|
|
7700
7760
|
Tooltip.displayName = "Tooltip";
|
|
7701
7761
|
|
|
7702
7762
|
// src/components/Input/Input.tsx
|
|
7703
|
-
var
|
|
7704
|
-
var
|
|
7705
|
-
var
|
|
7706
|
-
var
|
|
7707
|
-
var inputStyles =
|
|
7763
|
+
var import_react22 = require("react");
|
|
7764
|
+
var import_styled_components43 = __toESM(require("styled-components"));
|
|
7765
|
+
var import_type_guards25 = require("@wistia/type-guards");
|
|
7766
|
+
var import_jsx_runtime186 = require("react/jsx-runtime");
|
|
7767
|
+
var inputStyles = import_styled_components43.css`
|
|
7708
7768
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
7709
7769
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
7710
7770
|
--wui-input-color-border: var(--wui-color-border);
|
|
@@ -7745,7 +7805,7 @@ var inputStyles = import_styled_components41.css`
|
|
|
7745
7805
|
}
|
|
7746
7806
|
}
|
|
7747
7807
|
`;
|
|
7748
|
-
var StyledInputContainer =
|
|
7808
|
+
var StyledInputContainer = import_styled_components43.default.div`
|
|
7749
7809
|
display: inline-flex;
|
|
7750
7810
|
position: relative;
|
|
7751
7811
|
${inputStyles};
|
|
@@ -7789,10 +7849,7 @@ var StyledInputContainer = import_styled_components41.default.div`
|
|
|
7789
7849
|
padding-right: 32px;
|
|
7790
7850
|
}
|
|
7791
7851
|
`;
|
|
7792
|
-
var
|
|
7793
|
-
return typeof ref === "object" && ref !== null && "current" in ref && (0, import_type_guards23.isNotNil)(ref.current);
|
|
7794
|
-
};
|
|
7795
|
-
var Input = (0, import_react21.forwardRef)(
|
|
7852
|
+
var Input = (0, import_react22.forwardRef)(
|
|
7796
7853
|
({
|
|
7797
7854
|
fullWidth = false,
|
|
7798
7855
|
monospace = false,
|
|
@@ -7802,50 +7859,50 @@ var Input = (0, import_react21.forwardRef)(
|
|
|
7802
7859
|
rightIcon,
|
|
7803
7860
|
...props
|
|
7804
7861
|
}, externalRef) => {
|
|
7805
|
-
const internalRef = (0,
|
|
7806
|
-
const ref =
|
|
7862
|
+
const internalRef = (0, import_react22.useRef)();
|
|
7863
|
+
const ref = (0, import_type_guards25.isNotNil)(externalRef) && (0, import_type_guards25.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef;
|
|
7807
7864
|
let leftIconToDisplay = leftIcon;
|
|
7808
|
-
if ((0,
|
|
7809
|
-
leftIconToDisplay = /* @__PURE__ */ (0,
|
|
7865
|
+
if ((0, import_type_guards25.isNil)(leftIcon) && type === "search") {
|
|
7866
|
+
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(Icon, { type: "search" });
|
|
7810
7867
|
}
|
|
7811
|
-
if ((0,
|
|
7812
|
-
leftIconToDisplay = (0,
|
|
7868
|
+
if ((0, import_type_guards25.isNotNil)(leftIconToDisplay)) {
|
|
7869
|
+
leftIconToDisplay = (0, import_react22.cloneElement)(leftIconToDisplay, {
|
|
7813
7870
|
size: "md",
|
|
7814
7871
|
className: "wui-input-left-icon"
|
|
7815
7872
|
});
|
|
7816
7873
|
}
|
|
7817
7874
|
let rightIconToDisplay = rightIcon;
|
|
7818
|
-
if ((0,
|
|
7819
|
-
rightIconToDisplay = (0,
|
|
7875
|
+
if ((0, import_type_guards25.isNotNil)(rightIconToDisplay)) {
|
|
7876
|
+
rightIconToDisplay = (0, import_react22.cloneElement)(rightIconToDisplay, {
|
|
7820
7877
|
size: "md",
|
|
7821
7878
|
className: "wui-input-right-icon"
|
|
7822
7879
|
});
|
|
7823
7880
|
}
|
|
7824
7881
|
const handleFocus = (event) => {
|
|
7825
|
-
if ((0,
|
|
7882
|
+
if ((0, import_type_guards25.isNotNil)(props.onFocus)) {
|
|
7826
7883
|
props.onFocus(event);
|
|
7827
7884
|
}
|
|
7828
|
-
if (autoSelect && ref && "current" in ref) {
|
|
7885
|
+
if (autoSelect && isValidRef(ref) && "current" in ref) {
|
|
7829
7886
|
requestAnimationFrame(() => {
|
|
7830
7887
|
ref.current?.select();
|
|
7831
7888
|
});
|
|
7832
7889
|
}
|
|
7833
7890
|
};
|
|
7834
|
-
return /* @__PURE__ */ (0,
|
|
7891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
|
|
7835
7892
|
StyledInputContainer,
|
|
7836
7893
|
{
|
|
7837
7894
|
$fullWidth: fullWidth,
|
|
7838
7895
|
$monospace: monospace,
|
|
7839
7896
|
children: [
|
|
7840
7897
|
leftIconToDisplay ?? null,
|
|
7841
|
-
type === "multiline" ? /* @__PURE__ */ (0,
|
|
7898
|
+
type === "multiline" ? /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
7842
7899
|
"textarea",
|
|
7843
7900
|
{
|
|
7844
7901
|
...props,
|
|
7845
7902
|
ref,
|
|
7846
7903
|
onFocus: handleFocus
|
|
7847
7904
|
}
|
|
7848
|
-
) : /* @__PURE__ */ (0,
|
|
7905
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
7849
7906
|
"input",
|
|
7850
7907
|
{
|
|
7851
7908
|
...props,
|
|
@@ -7863,8 +7920,8 @@ var Input = (0, import_react21.forwardRef)(
|
|
|
7863
7920
|
Input.displayName = "Input";
|
|
7864
7921
|
|
|
7865
7922
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
7866
|
-
var
|
|
7867
|
-
var StyledInput = (0,
|
|
7923
|
+
var import_jsx_runtime187 = require("react/jsx-runtime");
|
|
7924
|
+
var StyledInput = (0, import_styled_components44.default)(Input)`
|
|
7868
7925
|
:not([rows]) {
|
|
7869
7926
|
min-height: unset;
|
|
7870
7927
|
}
|
|
@@ -7884,7 +7941,7 @@ var StyledInput = (0, import_styled_components42.default)(Input)`
|
|
|
7884
7941
|
height: ${({ $height }) => `${$height}px`};
|
|
7885
7942
|
}
|
|
7886
7943
|
`;
|
|
7887
|
-
var editableStyles =
|
|
7944
|
+
var editableStyles = import_styled_components44.css`
|
|
7888
7945
|
&:has(+ :focus-within) {
|
|
7889
7946
|
background: var(--wui-color-bg-surface-hover);
|
|
7890
7947
|
}
|
|
@@ -7894,7 +7951,7 @@ var editableStyles = import_styled_components42.css`
|
|
|
7894
7951
|
cursor: pointer;
|
|
7895
7952
|
}
|
|
7896
7953
|
`;
|
|
7897
|
-
var StyledHeading2 = (0,
|
|
7954
|
+
var StyledHeading2 = (0, import_styled_components44.default)(Heading)`
|
|
7898
7955
|
width: 100%;
|
|
7899
7956
|
border-radius: var(--wui-border-radius-02);
|
|
7900
7957
|
padding: var(--wui-space-02);
|
|
@@ -7911,11 +7968,11 @@ var EditableHeading = ({
|
|
|
7911
7968
|
forceEditing = false,
|
|
7912
7969
|
editingDisabled = false
|
|
7913
7970
|
}) => {
|
|
7914
|
-
const [isEditing, setIsEditing] = (0,
|
|
7915
|
-
const [value, setValue] = (0,
|
|
7916
|
-
const [previousValue, setPreviousValue] = (0,
|
|
7917
|
-
const [headingHeight, setHeadingHeight] = (0,
|
|
7918
|
-
const headingRef = (0,
|
|
7971
|
+
const [isEditing, setIsEditing] = (0, import_react23.useState)(false);
|
|
7972
|
+
const [value, setValue] = (0, import_react23.useState)(children);
|
|
7973
|
+
const [previousValue, setPreviousValue] = (0, import_react23.useState)(children);
|
|
7974
|
+
const [headingHeight, setHeadingHeight] = (0, import_react23.useState)("60");
|
|
7975
|
+
const headingRef = (0, import_react23.useRef)(null);
|
|
7919
7976
|
const handleSetEditing = (editing) => {
|
|
7920
7977
|
if (editingDisabled) return;
|
|
7921
7978
|
if (editing && headingRef.current) {
|
|
@@ -7948,7 +8005,7 @@ var EditableHeading = ({
|
|
|
7948
8005
|
handleSetEditing(false);
|
|
7949
8006
|
}
|
|
7950
8007
|
};
|
|
7951
|
-
const HeadingComponent2 = /* @__PURE__ */ (0,
|
|
8008
|
+
const HeadingComponent2 = /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
7952
8009
|
StyledHeading2,
|
|
7953
8010
|
{
|
|
7954
8011
|
ref: headingRef,
|
|
@@ -7962,7 +8019,7 @@ var EditableHeading = ({
|
|
|
7962
8019
|
return HeadingComponent2;
|
|
7963
8020
|
}
|
|
7964
8021
|
if (isEditing || forceEditing) {
|
|
7965
|
-
return /* @__PURE__ */ (0,
|
|
8022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
7966
8023
|
StyledInput,
|
|
7967
8024
|
{
|
|
7968
8025
|
$height: headingHeight,
|
|
@@ -7980,8 +8037,8 @@ var EditableHeading = ({
|
|
|
7980
8037
|
}
|
|
7981
8038
|
);
|
|
7982
8039
|
}
|
|
7983
|
-
return /* @__PURE__ */ (0,
|
|
7984
|
-
/* @__PURE__ */ (0,
|
|
8040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(import_jsx_runtime187.Fragment, { children: [
|
|
8041
|
+
/* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
7985
8042
|
Tooltip,
|
|
7986
8043
|
{
|
|
7987
8044
|
compact: true,
|
|
@@ -7989,7 +8046,7 @@ var EditableHeading = ({
|
|
|
7989
8046
|
children: HeadingComponent2
|
|
7990
8047
|
}
|
|
7991
8048
|
),
|
|
7992
|
-
/* @__PURE__ */ (0,
|
|
8049
|
+
/* @__PURE__ */ (0, import_jsx_runtime187.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
7993
8050
|
"button",
|
|
7994
8051
|
{
|
|
7995
8052
|
"aria-label": ariaLabel,
|
|
@@ -8001,25 +8058,25 @@ var EditableHeading = ({
|
|
|
8001
8058
|
};
|
|
8002
8059
|
|
|
8003
8060
|
// src/components/Form/Form.tsx
|
|
8004
|
-
var
|
|
8005
|
-
var
|
|
8006
|
-
var
|
|
8061
|
+
var import_react25 = require("react");
|
|
8062
|
+
var import_styled_components46 = __toESM(require("styled-components"));
|
|
8063
|
+
var import_type_guards26 = require("@wistia/type-guards");
|
|
8007
8064
|
|
|
8008
8065
|
// src/components/Stack/Stack.tsx
|
|
8009
|
-
var
|
|
8010
|
-
var
|
|
8011
|
-
var
|
|
8066
|
+
var import_react24 = require("react");
|
|
8067
|
+
var import_styled_components45 = __toESM(require("styled-components"));
|
|
8068
|
+
var import_jsx_runtime188 = require("react/jsx-runtime");
|
|
8012
8069
|
var DEFAULT_ELEMENT4 = "div";
|
|
8013
|
-
var StyledStack =
|
|
8070
|
+
var StyledStack = import_styled_components45.default.div`
|
|
8014
8071
|
display: flex;
|
|
8015
8072
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
8016
8073
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
8017
8074
|
`;
|
|
8018
|
-
var StackComponent = (0,
|
|
8075
|
+
var StackComponent = (0, import_react24.forwardRef)(
|
|
8019
8076
|
({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
|
|
8020
8077
|
const responsiveGap = useResponsiveProp(gap);
|
|
8021
8078
|
const responsiveDirection = useResponsiveProp(direction);
|
|
8022
|
-
return /* @__PURE__ */ (0,
|
|
8079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
|
|
8023
8080
|
StyledStack,
|
|
8024
8081
|
{
|
|
8025
8082
|
ref,
|
|
@@ -8035,29 +8092,29 @@ StackComponent.displayName = "Stack";
|
|
|
8035
8092
|
var Stack = makePolymorphic(StackComponent);
|
|
8036
8093
|
|
|
8037
8094
|
// src/components/Form/Form.tsx
|
|
8038
|
-
var
|
|
8039
|
-
var StyledForm =
|
|
8095
|
+
var import_jsx_runtime189 = require("react/jsx-runtime");
|
|
8096
|
+
var StyledForm = import_styled_components46.default.form`
|
|
8040
8097
|
--form-default-width: 690px;
|
|
8041
8098
|
|
|
8042
8099
|
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
8043
8100
|
align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
|
|
8044
8101
|
`;
|
|
8045
|
-
var FormContext = (0,
|
|
8102
|
+
var FormContext = (0, import_react25.createContext)({
|
|
8046
8103
|
values: {},
|
|
8047
8104
|
errors: {},
|
|
8048
8105
|
hasSubmitted: false,
|
|
8049
8106
|
formId: ""
|
|
8050
8107
|
});
|
|
8051
8108
|
var FormComponent = ({ children, action, values = {}, validate, fullWidth = false, ...props }, forwardedRef) => {
|
|
8052
|
-
const [errors, setErrors] = (0,
|
|
8053
|
-
const [hasSubmitted, setHasSubmitted] = (0,
|
|
8054
|
-
const innerRef = (0,
|
|
8109
|
+
const [errors, setErrors] = (0, import_react25.useState)({});
|
|
8110
|
+
const [hasSubmitted, setHasSubmitted] = (0, import_react25.useState)(false);
|
|
8111
|
+
const innerRef = (0, import_react25.useRef)();
|
|
8055
8112
|
const ref = forwardedRef ?? innerRef;
|
|
8056
|
-
const autoId = (0,
|
|
8113
|
+
const autoId = (0, import_react25.useId)();
|
|
8057
8114
|
const id = props.id ?? autoId;
|
|
8058
8115
|
const handleValidate = (nextFormData) => {
|
|
8059
8116
|
const nextData = Object.fromEntries(nextFormData.entries());
|
|
8060
|
-
if ((0,
|
|
8117
|
+
if ((0, import_type_guards26.isUndefined)(validate)) {
|
|
8061
8118
|
return {};
|
|
8062
8119
|
}
|
|
8063
8120
|
return validate(nextData);
|
|
@@ -8067,7 +8124,7 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
|
|
|
8067
8124
|
props.onBlur(event);
|
|
8068
8125
|
}
|
|
8069
8126
|
const formData = new FormData(event.currentTarget);
|
|
8070
|
-
if ((0,
|
|
8127
|
+
if ((0, import_type_guards26.isNotUndefined)(validate)) {
|
|
8071
8128
|
handleValidate(formData);
|
|
8072
8129
|
}
|
|
8073
8130
|
};
|
|
@@ -8095,7 +8152,7 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
|
|
|
8095
8152
|
void action(null);
|
|
8096
8153
|
}
|
|
8097
8154
|
};
|
|
8098
|
-
const context = (0,
|
|
8155
|
+
const context = (0, import_react25.useMemo)(() => {
|
|
8099
8156
|
return {
|
|
8100
8157
|
values,
|
|
8101
8158
|
errors,
|
|
@@ -8105,7 +8162,7 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
|
|
|
8105
8162
|
}, [values, errors, id, hasSubmitted]);
|
|
8106
8163
|
return (
|
|
8107
8164
|
// @ts-expect-error - generic context providers are a giant pain
|
|
8108
|
-
/* @__PURE__ */ (0,
|
|
8165
|
+
/* @__PURE__ */ (0, import_jsx_runtime189.jsx)(FormContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
|
|
8109
8166
|
Stack,
|
|
8110
8167
|
{
|
|
8111
8168
|
gap: "space-05",
|
|
@@ -8123,15 +8180,15 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
|
|
|
8123
8180
|
);
|
|
8124
8181
|
};
|
|
8125
8182
|
FormComponent.displayName = "Form";
|
|
8126
|
-
var Form = (0,
|
|
8183
|
+
var Form = (0, import_react25.forwardRef)(FormComponent);
|
|
8127
8184
|
|
|
8128
8185
|
// src/components/Form/useFormState.tsx
|
|
8129
|
-
var
|
|
8186
|
+
var import_react26 = require("react");
|
|
8130
8187
|
var useFormState = (action, initialData = {}) => {
|
|
8131
|
-
const [data, setData] = (0,
|
|
8132
|
-
const [isPending, setIsPending] = (0,
|
|
8133
|
-
const [error, setError] = (0,
|
|
8134
|
-
const formAction = (0,
|
|
8188
|
+
const [data, setData] = (0, import_react26.useState)(initialData);
|
|
8189
|
+
const [isPending, setIsPending] = (0, import_react26.useState)(false);
|
|
8190
|
+
const [error, setError] = (0, import_react26.useState)(null);
|
|
8191
|
+
const formAction = (0, import_react26.useCallback)(
|
|
8135
8192
|
async (nextFormData) => {
|
|
8136
8193
|
if (nextFormData === null) {
|
|
8137
8194
|
setData(initialData);
|
|
@@ -8162,23 +8219,23 @@ var useFormState = (action, initialData = {}) => {
|
|
|
8162
8219
|
};
|
|
8163
8220
|
|
|
8164
8221
|
// src/components/Form/FormErrorSummary.tsx
|
|
8165
|
-
var
|
|
8166
|
-
var
|
|
8167
|
-
var
|
|
8222
|
+
var import_react27 = require("react");
|
|
8223
|
+
var import_type_guards27 = require("@wistia/type-guards");
|
|
8224
|
+
var import_jsx_runtime190 = require("react/jsx-runtime");
|
|
8168
8225
|
var ErrorItem = ({ name, error, formId }) => {
|
|
8169
|
-
return /* @__PURE__ */ (0,
|
|
8226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(Link, { href: `${formId}-${name}`, children: error }) }, name);
|
|
8170
8227
|
};
|
|
8171
8228
|
var FormErrorSummary = ({ description }) => {
|
|
8172
|
-
const ref = (0,
|
|
8173
|
-
const { formId, errors, hasSubmitted } = (0,
|
|
8229
|
+
const ref = (0, import_react27.useRef)(null);
|
|
8230
|
+
const { formId, errors, hasSubmitted } = (0, import_react27.useContext)(FormContext);
|
|
8174
8231
|
const isValid = Object.keys(errors).length === 0;
|
|
8175
8232
|
if (isValid || !hasSubmitted) {
|
|
8176
8233
|
return null;
|
|
8177
8234
|
}
|
|
8178
|
-
return /* @__PURE__ */ (0,
|
|
8179
|
-
/* @__PURE__ */ (0,
|
|
8180
|
-
/* @__PURE__ */ (0,
|
|
8181
|
-
([name, error]) => (0,
|
|
8235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)("div", { ref, children: [
|
|
8236
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsx)("p", { children: description }),
|
|
8237
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards27.isNotUndefined)(error)).map(
|
|
8238
|
+
([name, error]) => (0, import_type_guards27.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
8182
8239
|
ErrorItem,
|
|
8183
8240
|
{
|
|
8184
8241
|
error: err,
|
|
@@ -8186,7 +8243,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
8186
8243
|
name
|
|
8187
8244
|
},
|
|
8188
8245
|
err
|
|
8189
|
-
)) : /* @__PURE__ */ (0,
|
|
8246
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
8190
8247
|
ErrorItem,
|
|
8191
8248
|
{
|
|
8192
8249
|
error: error ?? "",
|
|
@@ -8200,33 +8257,33 @@ var FormErrorSummary = ({ description }) => {
|
|
|
8200
8257
|
};
|
|
8201
8258
|
|
|
8202
8259
|
// src/components/FormField/FormField.tsx
|
|
8203
|
-
var
|
|
8204
|
-
var
|
|
8205
|
-
var
|
|
8260
|
+
var import_react30 = require("react");
|
|
8261
|
+
var import_styled_components48 = __toESM(require("styled-components"));
|
|
8262
|
+
var import_type_guards28 = require("@wistia/type-guards");
|
|
8206
8263
|
|
|
8207
8264
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
8208
|
-
var
|
|
8265
|
+
var import_react29 = require("react");
|
|
8209
8266
|
|
|
8210
8267
|
// src/components/FormGroup/FormGroup.tsx
|
|
8211
|
-
var
|
|
8212
|
-
var
|
|
8213
|
-
var
|
|
8214
|
-
var StyledFieldset =
|
|
8268
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
8269
|
+
var import_react28 = require("react");
|
|
8270
|
+
var import_jsx_runtime191 = require("react/jsx-runtime");
|
|
8271
|
+
var StyledFieldset = import_styled_components47.default.fieldset`
|
|
8215
8272
|
border: 0;
|
|
8216
8273
|
`;
|
|
8217
|
-
var StyledLegend =
|
|
8274
|
+
var StyledLegend = import_styled_components47.default.legend`
|
|
8218
8275
|
margin-bottom: var(--space-01);
|
|
8219
8276
|
`;
|
|
8220
8277
|
var FormGroup = ({ children, label, ...props }) => {
|
|
8221
|
-
const ref = (0,
|
|
8222
|
-
return /* @__PURE__ */ (0,
|
|
8278
|
+
const ref = (0, import_react28.useRef)();
|
|
8279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(
|
|
8223
8280
|
Stack,
|
|
8224
8281
|
{
|
|
8225
8282
|
...props,
|
|
8226
8283
|
ref,
|
|
8227
8284
|
renderAs: StyledFieldset,
|
|
8228
8285
|
children: [
|
|
8229
|
-
/* @__PURE__ */ (0,
|
|
8286
|
+
/* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
8230
8287
|
Heading,
|
|
8231
8288
|
{
|
|
8232
8289
|
renderAs: StyledLegend,
|
|
@@ -8242,8 +8299,8 @@ var FormGroup = ({ children, label, ...props }) => {
|
|
|
8242
8299
|
FormGroup.displayName = "FormGroup";
|
|
8243
8300
|
|
|
8244
8301
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
8245
|
-
var
|
|
8246
|
-
var CheckboxGroupContext = (0,
|
|
8302
|
+
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
8303
|
+
var CheckboxGroupContext = (0, import_react29.createContext)(null);
|
|
8247
8304
|
var CheckboxGroup = ({
|
|
8248
8305
|
children,
|
|
8249
8306
|
name,
|
|
@@ -8251,19 +8308,19 @@ var CheckboxGroup = ({
|
|
|
8251
8308
|
value,
|
|
8252
8309
|
...props
|
|
8253
8310
|
}) => {
|
|
8254
|
-
const context = (0,
|
|
8311
|
+
const context = (0, import_react29.useMemo)(() => {
|
|
8255
8312
|
return {
|
|
8256
8313
|
name,
|
|
8257
8314
|
onChange
|
|
8258
8315
|
};
|
|
8259
8316
|
}, [name, onChange]);
|
|
8260
|
-
return /* @__PURE__ */ (0,
|
|
8317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(FormGroup, { ...props, children }) });
|
|
8261
8318
|
};
|
|
8262
8319
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
8263
8320
|
|
|
8264
8321
|
// src/components/FormField/FormField.tsx
|
|
8265
|
-
var
|
|
8266
|
-
var StyledFormField =
|
|
8322
|
+
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
8323
|
+
var StyledFormField = import_styled_components48.default.div`
|
|
8267
8324
|
--form-field-spacing: var(--wui-space-01);
|
|
8268
8325
|
--form-field-error-color: var(--wui-color-text-secondary-error);
|
|
8269
8326
|
|
|
@@ -8271,7 +8328,7 @@ var StyledFormField = import_styled_components46.default.div`
|
|
|
8271
8328
|
flex-direction: column;
|
|
8272
8329
|
gap: var(--form-field-spacing);
|
|
8273
8330
|
`;
|
|
8274
|
-
var StyledErrorList =
|
|
8331
|
+
var StyledErrorList = import_styled_components48.default.ul`
|
|
8275
8332
|
margin: 0;
|
|
8276
8333
|
padding: 0;
|
|
8277
8334
|
padding-left: var(--wui-space-04);
|
|
@@ -8280,8 +8337,8 @@ var StyledErrorList = import_styled_components46.default.ul`
|
|
|
8280
8337
|
gap: var(--wui-space-01);
|
|
8281
8338
|
`;
|
|
8282
8339
|
var ErrorMessages = ({ errors, id }) => {
|
|
8283
|
-
const isMultipleErrors = (0,
|
|
8284
|
-
return isMultipleErrors ? /* @__PURE__ */ (0,
|
|
8340
|
+
const isMultipleErrors = (0, import_type_guards28.isArray)(errors);
|
|
8341
|
+
return isMultipleErrors ? /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
|
|
8285
8342
|
Text,
|
|
8286
8343
|
{
|
|
8287
8344
|
colorScheme: "error",
|
|
@@ -8291,7 +8348,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
8291
8348
|
children: error
|
|
8292
8349
|
},
|
|
8293
8350
|
`${id}-${index}`
|
|
8294
|
-
)) }) : /* @__PURE__ */ (0,
|
|
8351
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
|
|
8295
8352
|
Text,
|
|
8296
8353
|
{
|
|
8297
8354
|
colorScheme: "error",
|
|
@@ -8311,8 +8368,8 @@ var FormField = ({
|
|
|
8311
8368
|
value,
|
|
8312
8369
|
...props
|
|
8313
8370
|
}) => {
|
|
8314
|
-
const formState = (0,
|
|
8315
|
-
const checkboxGroup = (0,
|
|
8371
|
+
const formState = (0, import_react30.useContext)(FormContext);
|
|
8372
|
+
const checkboxGroup = (0, import_react30.useContext)(CheckboxGroupContext);
|
|
8316
8373
|
const id = props.id ?? `${formState.formId}-${name}`;
|
|
8317
8374
|
const isInlineLabel = children.type === Checkbox;
|
|
8318
8375
|
const computedError = error ?? formState.errors[name];
|
|
@@ -8323,19 +8380,19 @@ var FormField = ({
|
|
|
8323
8380
|
label: isInlineLabel ? label : void 0,
|
|
8324
8381
|
...props
|
|
8325
8382
|
};
|
|
8326
|
-
if ((0,
|
|
8383
|
+
if ((0, import_type_guards28.isUndefined)(value) && (0, import_type_guards28.isNotUndefined)(defaultValue)) {
|
|
8327
8384
|
childProps = {
|
|
8328
8385
|
...childProps,
|
|
8329
8386
|
defaultValue
|
|
8330
8387
|
};
|
|
8331
8388
|
}
|
|
8332
|
-
if ((0,
|
|
8333
|
-
const computedName = (0,
|
|
8389
|
+
if ((0, import_type_guards28.isNotNil)(checkboxGroup)) {
|
|
8390
|
+
const computedName = (0, import_type_guards28.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
|
|
8334
8391
|
const handleChange = (event) => {
|
|
8335
|
-
if ((0,
|
|
8392
|
+
if ((0, import_type_guards28.isNotUndefined)(props.onChange)) {
|
|
8336
8393
|
props.onChange(event);
|
|
8337
8394
|
}
|
|
8338
|
-
if ((0,
|
|
8395
|
+
if ((0, import_type_guards28.isNotUndefined)(checkboxGroup.onChange)) {
|
|
8339
8396
|
checkboxGroup.onChange(event);
|
|
8340
8397
|
}
|
|
8341
8398
|
};
|
|
@@ -8343,15 +8400,15 @@ var FormField = ({
|
|
|
8343
8400
|
...childProps,
|
|
8344
8401
|
name: computedName,
|
|
8345
8402
|
onChange: handleChange,
|
|
8346
|
-
"aria-invalid": (0,
|
|
8347
|
-
"aria-describedby": (0,
|
|
8403
|
+
"aria-invalid": (0, import_type_guards28.isNotNil)(error),
|
|
8404
|
+
"aria-describedby": (0, import_type_guards28.isNotNil)(error) ? `${id}-error` : void 0
|
|
8348
8405
|
};
|
|
8349
8406
|
}
|
|
8350
|
-
|
|
8351
|
-
return /* @__PURE__ */ (0,
|
|
8352
|
-
!isInlineLabel && /* @__PURE__ */ (0,
|
|
8353
|
-
(0,
|
|
8354
|
-
(0,
|
|
8407
|
+
import_react30.Children.only(children);
|
|
8408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(StyledFormField, { ...props, children: [
|
|
8409
|
+
!isInlineLabel && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(Label, { htmlFor: id, children: label }),
|
|
8410
|
+
(0, import_react30.cloneElement)(children, childProps),
|
|
8411
|
+
(0, import_type_guards28.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
|
|
8355
8412
|
ErrorMessages,
|
|
8356
8413
|
{
|
|
8357
8414
|
errors: computedError,
|
|
@@ -8363,9 +8420,9 @@ var FormField = ({
|
|
|
8363
8420
|
FormField.displayName = "FormField";
|
|
8364
8421
|
|
|
8365
8422
|
// src/components/FormGroup/RadioGroup.tsx
|
|
8366
|
-
var
|
|
8367
|
-
var
|
|
8368
|
-
var RadioGroupContext = (0,
|
|
8423
|
+
var import_react31 = require("react");
|
|
8424
|
+
var import_jsx_runtime194 = require("react/jsx-runtime");
|
|
8425
|
+
var RadioGroupContext = (0, import_react31.createContext)(null);
|
|
8369
8426
|
var RadioGroup = ({
|
|
8370
8427
|
children,
|
|
8371
8428
|
name,
|
|
@@ -8373,21 +8430,21 @@ var RadioGroup = ({
|
|
|
8373
8430
|
value,
|
|
8374
8431
|
...props
|
|
8375
8432
|
}) => {
|
|
8376
|
-
const context = (0,
|
|
8433
|
+
const context = (0, import_react31.useMemo)(() => {
|
|
8377
8434
|
return {
|
|
8378
8435
|
name,
|
|
8379
8436
|
onChange
|
|
8380
8437
|
};
|
|
8381
8438
|
}, [name, onChange]);
|
|
8382
|
-
return /* @__PURE__ */ (0,
|
|
8439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(FormGroup, { ...props, children }) });
|
|
8383
8440
|
};
|
|
8384
8441
|
RadioGroup.displayName = "RadioGroup";
|
|
8385
8442
|
|
|
8386
8443
|
// src/components/IconButton/IconButton.tsx
|
|
8387
|
-
var
|
|
8388
|
-
var
|
|
8389
|
-
var
|
|
8390
|
-
var StyledButton2 = (0,
|
|
8444
|
+
var import_react32 = require("react");
|
|
8445
|
+
var import_styled_components49 = __toESM(require("styled-components"));
|
|
8446
|
+
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
8447
|
+
var StyledButton2 = (0, import_styled_components49.default)(Button)`
|
|
8391
8448
|
--icon-button-size-sm: 24px;
|
|
8392
8449
|
--icon-button-size-md: 32px;
|
|
8393
8450
|
--icon-button-size-lg: 40px;
|
|
@@ -8401,10 +8458,10 @@ var StyledButton2 = (0, import_styled_components47.default)(Button)`
|
|
|
8401
8458
|
align-items: center;
|
|
8402
8459
|
line-height: 1;
|
|
8403
8460
|
`;
|
|
8404
|
-
var IconButton = (0,
|
|
8461
|
+
var IconButton = (0, import_react32.forwardRef)(
|
|
8405
8462
|
({ children, label, size = "md", ...props }, ref) => {
|
|
8406
8463
|
const responsiveSize = useResponsiveProp(size);
|
|
8407
|
-
return /* @__PURE__ */ (0,
|
|
8464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
|
|
8408
8465
|
StyledButton2,
|
|
8409
8466
|
{
|
|
8410
8467
|
...props,
|
|
@@ -8412,7 +8469,7 @@ var IconButton = (0, import_react31.forwardRef)(
|
|
|
8412
8469
|
"aria-label": label,
|
|
8413
8470
|
"data-wistia-ui-icon-button": true,
|
|
8414
8471
|
size: responsiveSize,
|
|
8415
|
-
children: (0,
|
|
8472
|
+
children: (0, import_react32.cloneElement)(import_react32.Children.only(children), {
|
|
8416
8473
|
size: responsiveSize
|
|
8417
8474
|
})
|
|
8418
8475
|
}
|
|
@@ -8422,19 +8479,19 @@ var IconButton = (0, import_react31.forwardRef)(
|
|
|
8422
8479
|
IconButton.displayName = "IconButton";
|
|
8423
8480
|
|
|
8424
8481
|
// src/components/Menu/Menu.tsx
|
|
8425
|
-
var
|
|
8482
|
+
var import_styled_components50 = __toESM(require("styled-components"));
|
|
8426
8483
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
8427
|
-
var
|
|
8428
|
-
var
|
|
8484
|
+
var import_type_guards29 = require("@wistia/type-guards");
|
|
8485
|
+
var import_react34 = require("react");
|
|
8429
8486
|
|
|
8430
8487
|
// src/components/Menu/MenuContext.tsx
|
|
8431
|
-
var
|
|
8432
|
-
var MenuContext = (0,
|
|
8433
|
-
var useMenuContext = () => (0,
|
|
8488
|
+
var import_react33 = require("react");
|
|
8489
|
+
var MenuContext = (0, import_react33.createContext)({ compact: false });
|
|
8490
|
+
var useMenuContext = () => (0, import_react33.useContext)(MenuContext);
|
|
8434
8491
|
|
|
8435
8492
|
// src/components/Menu/Menu.tsx
|
|
8436
|
-
var
|
|
8437
|
-
var open =
|
|
8493
|
+
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
8494
|
+
var open = import_styled_components50.keyframes`
|
|
8438
8495
|
from {
|
|
8439
8496
|
opacity: 0;
|
|
8440
8497
|
transform: scale(.97) translateY(-8px);
|
|
@@ -8444,7 +8501,7 @@ var open = import_styled_components48.keyframes`
|
|
|
8444
8501
|
transform: scale(1);
|
|
8445
8502
|
}
|
|
8446
8503
|
`;
|
|
8447
|
-
var close =
|
|
8504
|
+
var close = import_styled_components50.keyframes`
|
|
8448
8505
|
from {
|
|
8449
8506
|
opacity: 1;
|
|
8450
8507
|
transform: scale(1);
|
|
@@ -8454,7 +8511,7 @@ var close = import_styled_components48.keyframes`
|
|
|
8454
8511
|
transform: scale(.97) translateY(-8px);
|
|
8455
8512
|
}
|
|
8456
8513
|
`;
|
|
8457
|
-
var menuItemCss =
|
|
8514
|
+
var menuItemCss = import_styled_components50.css`
|
|
8458
8515
|
--menu-label-description-gap: var(--wui-space-01);
|
|
8459
8516
|
--menu-item-inner-gap: var(--wui-space-03);
|
|
8460
8517
|
--menu-item-left-icon-size: 24px;
|
|
@@ -8465,7 +8522,7 @@ var menuItemCss = import_styled_components48.css`
|
|
|
8465
8522
|
--menu-label-line-height: var(--wui-typography-label-3-line-height);
|
|
8466
8523
|
--menu-divider-margin: var(--wui-space-02);
|
|
8467
8524
|
`;
|
|
8468
|
-
var compactMenuItemCss =
|
|
8525
|
+
var compactMenuItemCss = import_styled_components50.css`
|
|
8469
8526
|
--menu-label-description-gap: 0;
|
|
8470
8527
|
--menu-item-inner-gap: var(--wui-space-02);
|
|
8471
8528
|
--menu-item-left-icon-size: 16px;
|
|
@@ -8476,7 +8533,7 @@ var compactMenuItemCss = import_styled_components48.css`
|
|
|
8476
8533
|
--menu-label-line-height: var(--wui-typography-label-4-line-height);
|
|
8477
8534
|
--menu-divider-margin: var(--wui-space-01);
|
|
8478
8535
|
`;
|
|
8479
|
-
var menuContentCss =
|
|
8536
|
+
var menuContentCss = import_styled_components50.css`
|
|
8480
8537
|
--menu-font-family: var(--wui-typography-family-default);
|
|
8481
8538
|
--menu-bg: var(--wui-color-bg-surface);
|
|
8482
8539
|
--menu-shadow: var(--wui-elevation-01);
|
|
@@ -8518,7 +8575,7 @@ var menuContentCss = import_styled_components48.css`
|
|
|
8518
8575
|
margin: var(--menu-divider-margin) 0;
|
|
8519
8576
|
}
|
|
8520
8577
|
`;
|
|
8521
|
-
var MenuContent = (0,
|
|
8578
|
+
var MenuContent = (0, import_styled_components50.default)(import_react_dropdown_menu.DropdownMenuContent)`
|
|
8522
8579
|
${menuContentCss}
|
|
8523
8580
|
`;
|
|
8524
8581
|
var Menu = ({
|
|
@@ -8534,9 +8591,9 @@ var Menu = ({
|
|
|
8534
8591
|
onInteractOutside,
|
|
8535
8592
|
...props
|
|
8536
8593
|
}) => {
|
|
8537
|
-
const contextValue = (0,
|
|
8594
|
+
const contextValue = (0, import_react34.useMemo)(() => ({ compact }), [compact]);
|
|
8538
8595
|
let controlProps = {
|
|
8539
|
-
...(0,
|
|
8596
|
+
...(0, import_type_guards29.isNotNil)(onOpenChange) && (0, import_type_guards29.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
8540
8597
|
};
|
|
8541
8598
|
if (disabled) {
|
|
8542
8599
|
controlProps = {
|
|
@@ -8544,24 +8601,24 @@ var Menu = ({
|
|
|
8544
8601
|
onOpenChange: () => null
|
|
8545
8602
|
};
|
|
8546
8603
|
}
|
|
8547
|
-
return /* @__PURE__ */ (0,
|
|
8604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(
|
|
8548
8605
|
import_react_dropdown_menu.DropdownMenu,
|
|
8549
8606
|
{
|
|
8550
8607
|
modal: false,
|
|
8551
8608
|
...controlProps,
|
|
8552
8609
|
children: [
|
|
8553
|
-
/* @__PURE__ */ (0,
|
|
8610
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards29.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
8554
8611
|
Button,
|
|
8555
8612
|
{
|
|
8556
8613
|
"aria-expanded": isOpen,
|
|
8557
8614
|
disabled,
|
|
8558
8615
|
forceState: isOpen ? "active" : void 0,
|
|
8559
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
8616
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(Icon, { type: "caret-down" }),
|
|
8560
8617
|
...triggerProps,
|
|
8561
8618
|
children: label
|
|
8562
8619
|
}
|
|
8563
8620
|
) }),
|
|
8564
|
-
/* @__PURE__ */ (0,
|
|
8621
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsx)(import_react_dropdown_menu.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
8565
8622
|
MenuContent,
|
|
8566
8623
|
{
|
|
8567
8624
|
...props,
|
|
@@ -8581,19 +8638,19 @@ var Menu = ({
|
|
|
8581
8638
|
Menu.displayName = "Menu";
|
|
8582
8639
|
|
|
8583
8640
|
// src/components/Menu/MenuLabel.tsx
|
|
8584
|
-
var
|
|
8641
|
+
var import_styled_components51 = __toESM(require("styled-components"));
|
|
8585
8642
|
var import_react_dropdown_menu2 = require("@radix-ui/react-dropdown-menu");
|
|
8586
|
-
var
|
|
8587
|
-
var StyledMenuLabel = (0,
|
|
8643
|
+
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
8644
|
+
var StyledMenuLabel = (0, import_styled_components51.default)(import_react_dropdown_menu2.DropdownMenuLabel)`
|
|
8588
8645
|
padding: var(--wui-space-02);
|
|
8589
8646
|
`;
|
|
8590
8647
|
var MenuLabel = ({ children, ...props }) => {
|
|
8591
|
-
return /* @__PURE__ */ (0,
|
|
8648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
8592
8649
|
StyledMenuLabel,
|
|
8593
8650
|
{
|
|
8594
8651
|
asChild: true,
|
|
8595
8652
|
...props,
|
|
8596
|
-
children: /* @__PURE__ */ (0,
|
|
8653
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
8597
8654
|
Heading,
|
|
8598
8655
|
{
|
|
8599
8656
|
renderAs: "span",
|
|
@@ -8608,17 +8665,17 @@ var MenuLabel = ({ children, ...props }) => {
|
|
|
8608
8665
|
MenuLabel.displayName = "MenuLabel";
|
|
8609
8666
|
|
|
8610
8667
|
// src/components/Menu/SubMenu.tsx
|
|
8611
|
-
var
|
|
8612
|
-
var
|
|
8668
|
+
var import_react36 = require("react");
|
|
8669
|
+
var import_styled_components54 = __toESM(require("styled-components"));
|
|
8613
8670
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
8614
|
-
var
|
|
8671
|
+
var import_type_guards31 = require("@wistia/type-guards");
|
|
8615
8672
|
|
|
8616
8673
|
// src/components/Menu/MenuItemButton.tsx
|
|
8617
|
-
var
|
|
8618
|
-
var
|
|
8619
|
-
var
|
|
8620
|
-
var
|
|
8621
|
-
var StyledButton3 = (0,
|
|
8674
|
+
var import_react35 = require("react");
|
|
8675
|
+
var import_styled_components52 = __toESM(require("styled-components"));
|
|
8676
|
+
var import_type_guards30 = require("@wistia/type-guards");
|
|
8677
|
+
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
8678
|
+
var StyledButton3 = (0, import_styled_components52.default)(Button)`
|
|
8622
8679
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
8623
8680
|
|
|
8624
8681
|
display: flex;
|
|
@@ -8657,46 +8714,50 @@ var StyledButton3 = (0, import_styled_components50.default)(Button)`
|
|
|
8657
8714
|
padding-left: var(--wui-space-04);
|
|
8658
8715
|
}
|
|
8659
8716
|
`;
|
|
8660
|
-
var StyledLeftIconContainer =
|
|
8717
|
+
var StyledLeftIconContainer = import_styled_components52.default.div`
|
|
8661
8718
|
height: var(--menu-item-left-icon-size);
|
|
8662
8719
|
width: var(--menu-item-left-icon-size);
|
|
8663
8720
|
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8721
|
+
&& {
|
|
8722
|
+
svg {
|
|
8723
|
+
height: var(--menu-item-left-icon-size);
|
|
8724
|
+
width: var(--menu-item-left-icon-size);
|
|
8725
|
+
}
|
|
8667
8726
|
}
|
|
8668
8727
|
`;
|
|
8669
|
-
var StyledRightIconContainer =
|
|
8728
|
+
var StyledRightIconContainer = import_styled_components52.default.div`
|
|
8670
8729
|
height: var(--menu-item-right-icon-size);
|
|
8671
8730
|
width: var(--menu-item-right-icon-size);
|
|
8672
8731
|
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8732
|
+
&& {
|
|
8733
|
+
svg {
|
|
8734
|
+
height: var(--menu-item-right-icon-size);
|
|
8735
|
+
width: var(--menu-item-right-icon-size);
|
|
8736
|
+
}
|
|
8676
8737
|
}
|
|
8677
8738
|
`;
|
|
8678
|
-
var StyledLabelAndDescriptionContainer =
|
|
8739
|
+
var StyledLabelAndDescriptionContainer = import_styled_components52.default.div`
|
|
8679
8740
|
display: flex;
|
|
8680
8741
|
flex-direction: column;
|
|
8681
8742
|
gap: var(--menu-label-description-gap);
|
|
8682
8743
|
flex-basis: 100%;
|
|
8683
8744
|
`;
|
|
8684
|
-
var StyledBadgeContainer =
|
|
8745
|
+
var StyledBadgeContainer = import_styled_components52.default.div`
|
|
8685
8746
|
align-self: start;
|
|
8686
8747
|
justify-self: end;
|
|
8687
8748
|
font-size: var(--wui-typography-label-4-size);
|
|
8688
8749
|
color: var(--wui-color-text-secondary);
|
|
8689
8750
|
`;
|
|
8690
|
-
var MenuItemButton = (0,
|
|
8751
|
+
var MenuItemButton = (0, import_react35.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
8691
8752
|
let { colorScheme, badge } = props;
|
|
8692
8753
|
if (appearance === "dangerous") {
|
|
8693
|
-
if ((0,
|
|
8754
|
+
if ((0, import_type_guards30.isNotUndefined)(colorScheme)) {
|
|
8694
8755
|
console.warn("colorScheme prop is ignored when appearance is dangerous");
|
|
8695
8756
|
}
|
|
8696
8757
|
colorScheme = "error";
|
|
8697
8758
|
}
|
|
8698
8759
|
if (appearance === "gated") {
|
|
8699
|
-
badge = /* @__PURE__ */ (0,
|
|
8760
|
+
badge = /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
8700
8761
|
Icon,
|
|
8701
8762
|
{
|
|
8702
8763
|
colorScheme: "purple",
|
|
@@ -8708,7 +8769,7 @@ var MenuItemButton = (0, import_react34.forwardRef)(({ children, appearance, com
|
|
|
8708
8769
|
}
|
|
8709
8770
|
);
|
|
8710
8771
|
}
|
|
8711
|
-
return /* @__PURE__ */ (0,
|
|
8772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
|
|
8712
8773
|
StyledButton3,
|
|
8713
8774
|
{
|
|
8714
8775
|
...props,
|
|
@@ -8718,10 +8779,10 @@ var MenuItemButton = (0, import_react34.forwardRef)(({ children, appearance, com
|
|
|
8718
8779
|
fullWidth: true,
|
|
8719
8780
|
unstyled: true,
|
|
8720
8781
|
children: [
|
|
8721
|
-
props.leftIcon ? /* @__PURE__ */ (0,
|
|
8722
|
-
/* @__PURE__ */ (0,
|
|
8723
|
-
(0,
|
|
8724
|
-
props.rightIcon ? /* @__PURE__ */ (0,
|
|
8782
|
+
props.leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
8783
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(StyledLabelAndDescriptionContainer, { children }),
|
|
8784
|
+
(0, import_type_guards30.isNotNil)(badge) || (0, import_type_guards30.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
8785
|
+
props.rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
8725
8786
|
]
|
|
8726
8787
|
}
|
|
8727
8788
|
);
|
|
@@ -8729,33 +8790,33 @@ var MenuItemButton = (0, import_react34.forwardRef)(({ children, appearance, com
|
|
|
8729
8790
|
MenuItemButton.displayName = "MenuItemButton";
|
|
8730
8791
|
|
|
8731
8792
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
8732
|
-
var
|
|
8733
|
-
var
|
|
8734
|
-
var StyledMenuItemLabel =
|
|
8735
|
-
var StyledMenuItemDescription = (0,
|
|
8793
|
+
var import_styled_components53 = __toESM(require("styled-components"));
|
|
8794
|
+
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
8795
|
+
var StyledMenuItemLabel = import_styled_components53.default.span``;
|
|
8796
|
+
var StyledMenuItemDescription = (0, import_styled_components53.default)(Text).attrs({
|
|
8736
8797
|
variant: "body4",
|
|
8737
8798
|
prominence: "secondary"
|
|
8738
8799
|
})``;
|
|
8739
8800
|
var MenuItemLabel = ({ children }) => {
|
|
8740
|
-
return /* @__PURE__ */ (0,
|
|
8801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(StyledMenuItemLabel, { children });
|
|
8741
8802
|
};
|
|
8742
8803
|
var MenuItemDescription = ({ children }) => {
|
|
8743
|
-
return /* @__PURE__ */ (0,
|
|
8804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(StyledMenuItemDescription, { children });
|
|
8744
8805
|
};
|
|
8745
8806
|
|
|
8746
8807
|
// src/components/Menu/SubMenu.tsx
|
|
8747
|
-
var
|
|
8748
|
-
var SubMenuContent = (0,
|
|
8808
|
+
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
8809
|
+
var SubMenuContent = (0, import_styled_components54.default)(import_react_dropdown_menu3.DropdownMenuSubContent)`
|
|
8749
8810
|
${menuContentCss}
|
|
8750
8811
|
|
|
8751
8812
|
${mq.smAndDown} {
|
|
8752
8813
|
transform: translateX(-100%) !important;
|
|
8753
8814
|
}
|
|
8754
8815
|
`;
|
|
8755
|
-
var StyledMobileSubMenuItems =
|
|
8816
|
+
var StyledMobileSubMenuItems = import_styled_components54.default.div`
|
|
8756
8817
|
margin-left: var(--wui-space-04);
|
|
8757
8818
|
`;
|
|
8758
|
-
var StyledSubTrigger = (0,
|
|
8819
|
+
var StyledSubTrigger = (0, import_styled_components54.default)(import_react_dropdown_menu3.DropdownMenuSubTrigger)`
|
|
8759
8820
|
outline: none;
|
|
8760
8821
|
|
|
8761
8822
|
&[data-state='open'],
|
|
@@ -8765,12 +8826,12 @@ var StyledSubTrigger = (0, import_styled_components52.default)(import_react_drop
|
|
|
8765
8826
|
`;
|
|
8766
8827
|
var SubMenuTrigger = (props) => {
|
|
8767
8828
|
const { isSmAndUp } = useMq();
|
|
8768
|
-
const
|
|
8769
|
-
return /* @__PURE__ */ (0,
|
|
8829
|
+
const Trigger4 = isSmAndUp ? StyledSubTrigger : import_react_dropdown_menu3.DropdownMenuItem;
|
|
8830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Trigger4, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
8770
8831
|
MenuItemButton,
|
|
8771
8832
|
{
|
|
8772
8833
|
...props,
|
|
8773
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
8834
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Icon, { type: "caret-right" })
|
|
8774
8835
|
}
|
|
8775
8836
|
) });
|
|
8776
8837
|
};
|
|
@@ -8782,16 +8843,16 @@ var SubMenu = ({
|
|
|
8782
8843
|
...props
|
|
8783
8844
|
}) => {
|
|
8784
8845
|
const { isSmAndUp } = useMq();
|
|
8785
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
8846
|
+
const [isExpanded, setIsExpanded] = (0, import_react36.useState)(false);
|
|
8786
8847
|
const { compact } = useMenuContext();
|
|
8787
|
-
return isSmAndUp ? /* @__PURE__ */ (0,
|
|
8788
|
-
/* @__PURE__ */ (0,
|
|
8789
|
-
/* @__PURE__ */ (0,
|
|
8790
|
-
(0,
|
|
8848
|
+
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
8849
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
8850
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(MenuItemLabel, { children: label }),
|
|
8851
|
+
(0, import_type_guards31.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(MenuItemDescription, { children: description }) : null
|
|
8791
8852
|
] }),
|
|
8792
|
-
/* @__PURE__ */ (0,
|
|
8793
|
-
] }) : /* @__PURE__ */ (0,
|
|
8794
|
-
/* @__PURE__ */ (0,
|
|
8853
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(SubMenuContent, { $compact: compact, children }) })
|
|
8854
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
|
|
8855
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(
|
|
8795
8856
|
SubMenuTrigger,
|
|
8796
8857
|
{
|
|
8797
8858
|
...props,
|
|
@@ -8800,28 +8861,28 @@ var SubMenu = ({
|
|
|
8800
8861
|
setIsExpanded((prev) => !prev);
|
|
8801
8862
|
},
|
|
8802
8863
|
children: [
|
|
8803
|
-
/* @__PURE__ */ (0,
|
|
8804
|
-
/* @__PURE__ */ (0,
|
|
8864
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(MenuItemLabel, { children: label }),
|
|
8865
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(MenuItemDescription, { children: description })
|
|
8805
8866
|
]
|
|
8806
8867
|
}
|
|
8807
8868
|
),
|
|
8808
|
-
/* @__PURE__ */ (0,
|
|
8869
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
8809
8870
|
] });
|
|
8810
8871
|
};
|
|
8811
8872
|
SubMenu.displayName = "SubMenu";
|
|
8812
8873
|
|
|
8813
8874
|
// src/components/Menu/MenuItem.tsx
|
|
8814
|
-
var
|
|
8875
|
+
var import_react37 = require("react");
|
|
8815
8876
|
var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
|
|
8816
|
-
var
|
|
8817
|
-
var MenuItem = (0,
|
|
8877
|
+
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
8878
|
+
var MenuItem = (0, import_react37.forwardRef)(
|
|
8818
8879
|
({ onSelect = () => null, ...props }, ref) => {
|
|
8819
|
-
return /* @__PURE__ */ (0,
|
|
8880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
8820
8881
|
import_react_dropdown_menu4.DropdownMenuItem,
|
|
8821
8882
|
{
|
|
8822
8883
|
asChild: true,
|
|
8823
8884
|
onSelect,
|
|
8824
|
-
children: /* @__PURE__ */ (0,
|
|
8885
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
8825
8886
|
MenuItemButton,
|
|
8826
8887
|
{
|
|
8827
8888
|
...props,
|
|
@@ -8837,10 +8898,10 @@ MenuItem.displayName = "MenuItem";
|
|
|
8837
8898
|
|
|
8838
8899
|
// src/components/Menu/MenuRadioGroup.tsx
|
|
8839
8900
|
var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
|
|
8840
|
-
var
|
|
8901
|
+
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
8841
8902
|
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
8842
|
-
return /* @__PURE__ */ (0,
|
|
8843
|
-
/* @__PURE__ */ (0,
|
|
8903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children: [
|
|
8904
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(MenuLabel, { children: label }),
|
|
8844
8905
|
children
|
|
8845
8906
|
] });
|
|
8846
8907
|
};
|
|
@@ -8848,11 +8909,11 @@ MenuRadioGroup.displayName = "MenuRadioGroup";
|
|
|
8848
8909
|
|
|
8849
8910
|
// src/components/Menu/RadioMenuItem.tsx
|
|
8850
8911
|
var import_react_dropdown_menu6 = require("@radix-ui/react-dropdown-menu");
|
|
8851
|
-
var
|
|
8912
|
+
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
8852
8913
|
var RadioMenuItem = ({
|
|
8853
8914
|
onSelect,
|
|
8854
8915
|
value,
|
|
8855
|
-
indicator = /* @__PURE__ */ (0,
|
|
8916
|
+
indicator = /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
8856
8917
|
Icon,
|
|
8857
8918
|
{
|
|
8858
8919
|
size: "sm",
|
|
@@ -8862,17 +8923,17 @@ var RadioMenuItem = ({
|
|
|
8862
8923
|
...props
|
|
8863
8924
|
}) => {
|
|
8864
8925
|
const extraProps = onSelect ? { onSelect } : {};
|
|
8865
|
-
return /* @__PURE__ */ (0,
|
|
8926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
8866
8927
|
import_react_dropdown_menu6.DropdownMenuRadioItem,
|
|
8867
8928
|
{
|
|
8868
8929
|
...extraProps,
|
|
8869
8930
|
asChild: true,
|
|
8870
8931
|
value,
|
|
8871
|
-
children: /* @__PURE__ */ (0,
|
|
8932
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
8872
8933
|
MenuItemButton,
|
|
8873
8934
|
{
|
|
8874
8935
|
...props,
|
|
8875
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
8936
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(import_react_dropdown_menu6.DropdownMenuItemIndicator, { children: indicator })
|
|
8876
8937
|
}
|
|
8877
8938
|
)
|
|
8878
8939
|
}
|
|
@@ -8882,9 +8943,9 @@ RadioMenuItem.displayName = "RadioMenuItem";
|
|
|
8882
8943
|
|
|
8883
8944
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
8884
8945
|
var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
|
|
8885
|
-
var
|
|
8946
|
+
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
8886
8947
|
var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
8887
|
-
return checked ? /* @__PURE__ */ (0,
|
|
8948
|
+
return checked ? /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(
|
|
8888
8949
|
"svg",
|
|
8889
8950
|
{
|
|
8890
8951
|
...props,
|
|
@@ -8894,14 +8955,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
8894
8955
|
width: "24",
|
|
8895
8956
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8896
8957
|
children: [
|
|
8897
|
-
/* @__PURE__ */ (0,
|
|
8958
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8898
8959
|
"path",
|
|
8899
8960
|
{
|
|
8900
8961
|
d: "m4 8c0-2.20914 1.79086-4 4-4h8c2.2091 0 4 1.79086 4 4v8c0 2.2091-1.7909 4-4 4h-8c-2.20914 0-4-1.7909-4-4z",
|
|
8901
8962
|
fill: "#2949e5"
|
|
8902
8963
|
}
|
|
8903
8964
|
),
|
|
8904
|
-
/* @__PURE__ */ (0,
|
|
8965
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8905
8966
|
"path",
|
|
8906
8967
|
{
|
|
8907
8968
|
d: "m10.4728 15.1931-3.09523-3.1131c-.18596-.187-.18596-.4902 0-.6773l.67341-.6773c.18596-.187.48749-.187.67344 0l2.08508 2.0971 4.4661-4.49174c.1859-.18703.4875-.18703.6734 0l.6734.67731c.186.18703.186.49027 0 .67731l-5.4762 5.50772c-.1859.187-.4874.187-.6734 0z",
|
|
@@ -8910,7 +8971,7 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
8910
8971
|
)
|
|
8911
8972
|
]
|
|
8912
8973
|
}
|
|
8913
|
-
) : /* @__PURE__ */ (0,
|
|
8974
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(
|
|
8914
8975
|
"svg",
|
|
8915
8976
|
{
|
|
8916
8977
|
...props,
|
|
@@ -8920,14 +8981,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
8920
8981
|
width: "24",
|
|
8921
8982
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8922
8983
|
children: [
|
|
8923
|
-
/* @__PURE__ */ (0,
|
|
8984
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8924
8985
|
"path",
|
|
8925
8986
|
{
|
|
8926
8987
|
d: "m8 4.5h8c1.933 0 3.5 1.567 3.5 3.5v8c0 1.933-1.567 3.5-3.5 3.5h-8c-1.933 0-3.5-1.567-3.5-3.5v-8c0-1.933 1.567-3.5 3.5-3.5z",
|
|
8927
8988
|
fill: "#fcfcfd"
|
|
8928
8989
|
}
|
|
8929
8990
|
),
|
|
8930
|
-
/* @__PURE__ */ (0,
|
|
8991
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8931
8992
|
"path",
|
|
8932
8993
|
{
|
|
8933
8994
|
d: "m8 4.5h8c1.933 0 3.5 1.567 3.5 3.5v8c0 1.933-1.567 3.5-3.5 3.5h-8c-1.933 0-3.5-1.567-3.5-3.5v-8c0-1.933 1.567-3.5 3.5-3.5z",
|
|
@@ -8944,18 +9005,18 @@ var CheckboxMenuItem = ({
|
|
|
8944
9005
|
onCheckedChange,
|
|
8945
9006
|
...props
|
|
8946
9007
|
}) => {
|
|
8947
|
-
return /* @__PURE__ */ (0,
|
|
9008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8948
9009
|
import_react_dropdown_menu7.DropdownMenuCheckboxItem,
|
|
8949
9010
|
{
|
|
8950
9011
|
asChild: true,
|
|
8951
9012
|
checked,
|
|
8952
9013
|
onCheckedChange,
|
|
8953
9014
|
onSelect,
|
|
8954
|
-
children: /* @__PURE__ */ (0,
|
|
9015
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8955
9016
|
MenuItemButton,
|
|
8956
9017
|
{
|
|
8957
9018
|
...props,
|
|
8958
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
9019
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(CheckboxIndicator2, { checked })
|
|
8959
9020
|
}
|
|
8960
9021
|
)
|
|
8961
9022
|
}
|
|
@@ -8964,37 +9025,37 @@ var CheckboxMenuItem = ({
|
|
|
8964
9025
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
8965
9026
|
|
|
8966
9027
|
// src/components/Modal/Modal.tsx
|
|
8967
|
-
var
|
|
8968
|
-
var
|
|
9028
|
+
var import_react41 = require("react");
|
|
9029
|
+
var import_styled_components59 = __toESM(require("styled-components"));
|
|
8969
9030
|
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
8970
|
-
var
|
|
9031
|
+
var import_type_guards33 = require("@wistia/type-guards");
|
|
8971
9032
|
|
|
8972
9033
|
// src/components/Modal/ModalHeader.tsx
|
|
8973
|
-
var
|
|
9034
|
+
var import_styled_components56 = __toESM(require("styled-components"));
|
|
8974
9035
|
var import_react_dialog2 = require("@radix-ui/react-dialog");
|
|
8975
9036
|
|
|
8976
9037
|
// src/components/Modal/ModalCloseButton.tsx
|
|
8977
|
-
var
|
|
9038
|
+
var import_styled_components55 = __toESM(require("styled-components"));
|
|
8978
9039
|
var import_react_dialog = require("@radix-ui/react-dialog");
|
|
8979
|
-
var
|
|
8980
|
-
var CloseButton = (0,
|
|
9040
|
+
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
9041
|
+
var CloseButton = (0, import_styled_components55.default)(import_react_dialog.Close)`
|
|
8981
9042
|
align-self: start;
|
|
8982
9043
|
`;
|
|
8983
9044
|
var ModalCloseButton = () => {
|
|
8984
|
-
return /* @__PURE__ */ (0,
|
|
9045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(CloseButton, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
8985
9046
|
IconButton,
|
|
8986
9047
|
{
|
|
8987
9048
|
label: "Dismiss modal",
|
|
8988
9049
|
size: "sm",
|
|
8989
9050
|
variant: "ghost",
|
|
8990
|
-
children: /* @__PURE__ */ (0,
|
|
9051
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(Icon, { type: "close" })
|
|
8991
9052
|
}
|
|
8992
9053
|
) });
|
|
8993
9054
|
};
|
|
8994
9055
|
|
|
8995
9056
|
// src/components/Modal/ModalHeader.tsx
|
|
8996
|
-
var
|
|
8997
|
-
var Header =
|
|
9057
|
+
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
9058
|
+
var Header = import_styled_components56.default.header`
|
|
8998
9059
|
display: flex;
|
|
8999
9060
|
order: 1;
|
|
9000
9061
|
gap: var(--wui-space-01);
|
|
@@ -9006,7 +9067,7 @@ var Header = import_styled_components54.default.header`
|
|
|
9006
9067
|
margin-top: 0;
|
|
9007
9068
|
}
|
|
9008
9069
|
`;
|
|
9009
|
-
var Title = (0,
|
|
9070
|
+
var Title = (0, import_styled_components56.default)(import_react_dialog2.Title)`
|
|
9010
9071
|
font-family: var(--wui-typography-heading-2-family);
|
|
9011
9072
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
9012
9073
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -9018,28 +9079,28 @@ var ModalHeader = ({
|
|
|
9018
9079
|
hideCloseButton
|
|
9019
9080
|
}) => {
|
|
9020
9081
|
const TitleWrapper = hideTitle ? ScreenReaderOnly : Title;
|
|
9021
|
-
return /* @__PURE__ */ (0,
|
|
9022
|
-
/* @__PURE__ */ (0,
|
|
9023
|
-
hideCloseButton ? null : /* @__PURE__ */ (0,
|
|
9082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(Header, { children: [
|
|
9083
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(TitleWrapper, { children: title }),
|
|
9084
|
+
hideCloseButton ? null : /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(ModalCloseButton, {})
|
|
9024
9085
|
] });
|
|
9025
9086
|
};
|
|
9026
9087
|
|
|
9027
9088
|
// src/components/Modal/ModalContent.tsx
|
|
9028
|
-
var
|
|
9029
|
-
var
|
|
9089
|
+
var import_react39 = require("react");
|
|
9090
|
+
var import_styled_components57 = __toESM(require("styled-components"));
|
|
9030
9091
|
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
9031
9092
|
|
|
9032
9093
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
9033
|
-
var
|
|
9034
|
-
var
|
|
9094
|
+
var import_react38 = require("react");
|
|
9095
|
+
var import_type_guards32 = require("@wistia/type-guards");
|
|
9035
9096
|
var useFocusRestore = () => {
|
|
9036
|
-
const previouslyFocusedRef = (0,
|
|
9037
|
-
(0,
|
|
9097
|
+
const previouslyFocusedRef = (0, import_react38.useRef)(null);
|
|
9098
|
+
(0, import_react38.useEffect)(() => {
|
|
9038
9099
|
previouslyFocusedRef.current = document.activeElement;
|
|
9039
9100
|
}, []);
|
|
9040
|
-
(0,
|
|
9101
|
+
(0, import_react38.useEffect)(() => {
|
|
9041
9102
|
return () => {
|
|
9042
|
-
if ((0,
|
|
9103
|
+
if ((0, import_type_guards32.isNotNil)(previouslyFocusedRef.current)) {
|
|
9043
9104
|
setTimeout(() => {
|
|
9044
9105
|
previouslyFocusedRef.current?.focus();
|
|
9045
9106
|
}, 0);
|
|
@@ -9049,8 +9110,8 @@ var useFocusRestore = () => {
|
|
|
9049
9110
|
};
|
|
9050
9111
|
|
|
9051
9112
|
// src/components/Modal/ModalContent.tsx
|
|
9052
|
-
var
|
|
9053
|
-
var StyledModalContent = (0,
|
|
9113
|
+
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
9114
|
+
var StyledModalContent = (0, import_styled_components57.default)(import_react_dialog3.Content)`
|
|
9054
9115
|
background-color: var(--wui-color-bg-app);
|
|
9055
9116
|
box-sizing: border-box;
|
|
9056
9117
|
display: flex;
|
|
@@ -9091,10 +9152,10 @@ var StyledModalContent = (0, import_styled_components55.default)(import_react_di
|
|
|
9091
9152
|
}
|
|
9092
9153
|
}
|
|
9093
9154
|
`;
|
|
9094
|
-
var ModalContent = (0,
|
|
9155
|
+
var ModalContent = (0, import_react39.forwardRef)(
|
|
9095
9156
|
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
9096
9157
|
useFocusRestore();
|
|
9097
|
-
return /* @__PURE__ */ (0,
|
|
9158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
9098
9159
|
StyledModalContent,
|
|
9099
9160
|
{
|
|
9100
9161
|
ref,
|
|
@@ -9109,9 +9170,9 @@ var ModalContent = (0, import_react38.forwardRef)(
|
|
|
9109
9170
|
);
|
|
9110
9171
|
|
|
9111
9172
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
9112
|
-
var
|
|
9113
|
-
var
|
|
9114
|
-
var
|
|
9173
|
+
var import_react40 = require("react");
|
|
9174
|
+
var import_styled_components58 = __toESM(require("styled-components"));
|
|
9175
|
+
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
9115
9176
|
var backdropAnimationDuration = 150;
|
|
9116
9177
|
var alignVerticalMap = {
|
|
9117
9178
|
stretch: "normal",
|
|
@@ -9124,7 +9185,7 @@ var alignHorizontalMap = {
|
|
|
9124
9185
|
center: "center",
|
|
9125
9186
|
right: "end"
|
|
9126
9187
|
};
|
|
9127
|
-
var BackdropComponent =
|
|
9188
|
+
var BackdropComponent = import_styled_components58.default.div`
|
|
9128
9189
|
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
9129
9190
|
animation-name: backdropShow;
|
|
9130
9191
|
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
@@ -9147,8 +9208,8 @@ var BackdropComponent = import_styled_components56.default.div`
|
|
|
9147
9208
|
}
|
|
9148
9209
|
}
|
|
9149
9210
|
`;
|
|
9150
|
-
var Backdrop = (0,
|
|
9151
|
-
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0,
|
|
9211
|
+
var Backdrop = (0, import_react40.forwardRef)(
|
|
9212
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
9152
9213
|
BackdropComponent,
|
|
9153
9214
|
{
|
|
9154
9215
|
ref,
|
|
@@ -9162,14 +9223,14 @@ var Backdrop = (0, import_react39.forwardRef)(
|
|
|
9162
9223
|
Backdrop.displayName = "Backdrop";
|
|
9163
9224
|
|
|
9164
9225
|
// src/components/Modal/Modal.tsx
|
|
9165
|
-
var
|
|
9226
|
+
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
9166
9227
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
9167
|
-
var ModalBody =
|
|
9228
|
+
var ModalBody = import_styled_components59.default.div`
|
|
9168
9229
|
flex-direction: column;
|
|
9169
9230
|
display: flex;
|
|
9170
9231
|
order: 2;
|
|
9171
9232
|
`;
|
|
9172
|
-
var Modal = (0,
|
|
9233
|
+
var Modal = (0, import_react41.forwardRef)(
|
|
9173
9234
|
({
|
|
9174
9235
|
children,
|
|
9175
9236
|
fullHeight = false,
|
|
@@ -9182,24 +9243,24 @@ var Modal = (0, import_react40.forwardRef)(
|
|
|
9182
9243
|
width = DEFAULT_MODAL_WIDTH,
|
|
9183
9244
|
...props
|
|
9184
9245
|
}, ref) => {
|
|
9185
|
-
return /* @__PURE__ */ (0,
|
|
9246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
|
|
9186
9247
|
import_react_dialog4.Root,
|
|
9187
9248
|
{
|
|
9188
9249
|
onOpenChange: (open2) => {
|
|
9189
|
-
if (!open2 && (0,
|
|
9250
|
+
if (!open2 && (0, import_type_guards33.isNotNil)(onRequestClose)) {
|
|
9190
9251
|
onRequestClose();
|
|
9191
9252
|
}
|
|
9192
9253
|
},
|
|
9193
9254
|
open: isOpen,
|
|
9194
|
-
children: /* @__PURE__ */ (0,
|
|
9195
|
-
/* @__PURE__ */ (0,
|
|
9196
|
-
/* @__PURE__ */ (0,
|
|
9255
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(import_react_dialog4.Portal, { children: [
|
|
9256
|
+
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)(Backdrop, {}),
|
|
9257
|
+
/* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
|
|
9197
9258
|
ModalContent,
|
|
9198
9259
|
{
|
|
9199
9260
|
ref,
|
|
9200
9261
|
fullHeight,
|
|
9201
9262
|
onOpenAutoFocus: (event) => {
|
|
9202
|
-
if ((0,
|
|
9263
|
+
if ((0, import_type_guards33.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
9203
9264
|
event.preventDefault();
|
|
9204
9265
|
requestAnimationFrame(() => {
|
|
9205
9266
|
initialFocusRef.current?.focus();
|
|
@@ -9209,8 +9270,8 @@ var Modal = (0, import_react40.forwardRef)(
|
|
|
9209
9270
|
width,
|
|
9210
9271
|
...props,
|
|
9211
9272
|
children: [
|
|
9212
|
-
/* @__PURE__ */ (0,
|
|
9213
|
-
/* @__PURE__ */ (0,
|
|
9273
|
+
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)(ModalBody, { children }),
|
|
9274
|
+
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
|
|
9214
9275
|
ModalHeader,
|
|
9215
9276
|
{
|
|
9216
9277
|
hideCloseButton,
|
|
@@ -9229,16 +9290,16 @@ var Modal = (0, import_react40.forwardRef)(
|
|
|
9229
9290
|
Modal.displayName = "Modal";
|
|
9230
9291
|
|
|
9231
9292
|
// src/components/Radio/Radio.tsx
|
|
9232
|
-
var
|
|
9233
|
-
var
|
|
9234
|
-
var
|
|
9235
|
-
var
|
|
9236
|
-
var StyledLabelWrapper2 =
|
|
9293
|
+
var import_react42 = require("react");
|
|
9294
|
+
var import_styled_components60 = __toESM(require("styled-components"));
|
|
9295
|
+
var import_type_guards34 = require("@wistia/type-guards");
|
|
9296
|
+
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
9297
|
+
var StyledLabelWrapper2 = import_styled_components60.default.div`
|
|
9237
9298
|
display: flex;
|
|
9238
9299
|
flex-direction: column;
|
|
9239
9300
|
padding-left: var(--wui-space-02);
|
|
9240
9301
|
`;
|
|
9241
|
-
var StyledRadio =
|
|
9302
|
+
var StyledRadio = import_styled_components60.default.input`
|
|
9242
9303
|
box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
|
|
9243
9304
|
appearance: none;
|
|
9244
9305
|
margin: 0;
|
|
@@ -9264,11 +9325,11 @@ var StyledRadio = import_styled_components58.default.input`
|
|
|
9264
9325
|
transform: scale(1);
|
|
9265
9326
|
}
|
|
9266
9327
|
`;
|
|
9267
|
-
var disabledStyle2 =
|
|
9328
|
+
var disabledStyle2 = import_styled_components60.css`
|
|
9268
9329
|
cursor: not-allowed;
|
|
9269
9330
|
opacity: 0.5;
|
|
9270
9331
|
`;
|
|
9271
|
-
var errorStyle =
|
|
9332
|
+
var errorStyle = import_styled_components60.css`
|
|
9272
9333
|
/* TODO Lamp to design error state */
|
|
9273
9334
|
&:hover,
|
|
9274
9335
|
&:focus,
|
|
@@ -9276,11 +9337,11 @@ var errorStyle = import_styled_components58.css`
|
|
|
9276
9337
|
border-color: transparent !important;
|
|
9277
9338
|
}
|
|
9278
9339
|
`;
|
|
9279
|
-
var defaultHoverStyle =
|
|
9340
|
+
var defaultHoverStyle = import_styled_components60.css`
|
|
9280
9341
|
/* TODO Lamp to design hover state */
|
|
9281
9342
|
cursor: pointer;
|
|
9282
9343
|
`;
|
|
9283
|
-
var StyledRadioWrapper =
|
|
9344
|
+
var StyledRadioWrapper = import_styled_components60.default.div`
|
|
9284
9345
|
align-items: baseline;
|
|
9285
9346
|
border: 1px solid transparent;
|
|
9286
9347
|
border-radius: 4px;
|
|
@@ -9303,7 +9364,7 @@ var StyledRadioWrapper = import_styled_components58.default.div`
|
|
|
9303
9364
|
|
|
9304
9365
|
${({ disabled }) => disabled && disabledStyle2};
|
|
9305
9366
|
`;
|
|
9306
|
-
var Radio = (0,
|
|
9367
|
+
var Radio = (0, import_react42.forwardRef)(
|
|
9307
9368
|
({
|
|
9308
9369
|
checked,
|
|
9309
9370
|
disabled = false,
|
|
@@ -9316,15 +9377,15 @@ var Radio = (0, import_react41.forwardRef)(
|
|
|
9316
9377
|
value = "false",
|
|
9317
9378
|
...otherProps
|
|
9318
9379
|
}, ref) => {
|
|
9319
|
-
const generatedId = (0,
|
|
9320
|
-
const computedId = (0,
|
|
9321
|
-
return /* @__PURE__ */ (0,
|
|
9380
|
+
const generatedId = (0, import_react42.useId)();
|
|
9381
|
+
const computedId = (0, import_type_guards34.isNonEmptyString)(id) ? id : `ui-radio-${generatedId}`;
|
|
9382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(
|
|
9322
9383
|
StyledRadioWrapper,
|
|
9323
9384
|
{
|
|
9324
9385
|
"aria-invalid": otherProps["aria-invalid"],
|
|
9325
9386
|
disabled,
|
|
9326
9387
|
children: [
|
|
9327
|
-
/* @__PURE__ */ (0,
|
|
9388
|
+
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
|
|
9328
9389
|
StyledRadio,
|
|
9329
9390
|
{
|
|
9330
9391
|
ref,
|
|
@@ -9339,8 +9400,8 @@ var Radio = (0, import_react41.forwardRef)(
|
|
|
9339
9400
|
...otherProps
|
|
9340
9401
|
}
|
|
9341
9402
|
),
|
|
9342
|
-
/* @__PURE__ */ (0,
|
|
9343
|
-
/* @__PURE__ */ (0,
|
|
9403
|
+
/* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(StyledLabelWrapper2, { children: [
|
|
9404
|
+
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
|
|
9344
9405
|
Label,
|
|
9345
9406
|
{
|
|
9346
9407
|
disabled,
|
|
@@ -9349,7 +9410,7 @@ var Radio = (0, import_react41.forwardRef)(
|
|
|
9349
9410
|
children: label
|
|
9350
9411
|
}
|
|
9351
9412
|
),
|
|
9352
|
-
/* @__PURE__ */ (0,
|
|
9413
|
+
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(LabelDescription, { children: description })
|
|
9353
9414
|
] })
|
|
9354
9415
|
]
|
|
9355
9416
|
}
|
|
@@ -9359,12 +9420,12 @@ var Radio = (0, import_react41.forwardRef)(
|
|
|
9359
9420
|
Radio.displayName = "Radio";
|
|
9360
9421
|
|
|
9361
9422
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
9362
|
-
var
|
|
9363
|
-
var
|
|
9423
|
+
var import_react43 = require("react");
|
|
9424
|
+
var import_styled_components61 = __toESM(require("styled-components"));
|
|
9364
9425
|
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
9365
|
-
var
|
|
9366
|
-
var
|
|
9367
|
-
var segmentedControlStyles =
|
|
9426
|
+
var import_type_guards35 = require("@wistia/type-guards");
|
|
9427
|
+
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
9428
|
+
var segmentedControlStyles = import_styled_components61.css`
|
|
9368
9429
|
display: inline-flex;
|
|
9369
9430
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
9370
9431
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -9372,10 +9433,10 @@ var segmentedControlStyles = import_styled_components59.css`
|
|
|
9372
9433
|
gap: var(--wui-space-01);
|
|
9373
9434
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
9374
9435
|
`;
|
|
9375
|
-
var StyledSegmentedControl = (0,
|
|
9436
|
+
var StyledSegmentedControl = (0, import_styled_components61.default)(import_react_toggle_group.Root)`
|
|
9376
9437
|
${segmentedControlStyles}
|
|
9377
9438
|
`;
|
|
9378
|
-
var SegmentedControl = (0,
|
|
9439
|
+
var SegmentedControl = (0, import_react43.forwardRef)(
|
|
9379
9440
|
({
|
|
9380
9441
|
children,
|
|
9381
9442
|
disabled = false,
|
|
@@ -9384,10 +9445,10 @@ var SegmentedControl = (0, import_react42.forwardRef)(
|
|
|
9384
9445
|
onSelectedValueChange,
|
|
9385
9446
|
...props
|
|
9386
9447
|
}, ref) => {
|
|
9387
|
-
if ((0,
|
|
9448
|
+
if ((0, import_type_guards35.isNil)(children)) {
|
|
9388
9449
|
return null;
|
|
9389
9450
|
}
|
|
9390
|
-
return /* @__PURE__ */ (0,
|
|
9451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
|
|
9391
9452
|
StyledSegmentedControl,
|
|
9392
9453
|
{
|
|
9393
9454
|
ref,
|
|
@@ -9407,12 +9468,12 @@ var SegmentedControl = (0, import_react42.forwardRef)(
|
|
|
9407
9468
|
SegmentedControl.displayName = "SegmentedControl";
|
|
9408
9469
|
|
|
9409
9470
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
9410
|
-
var
|
|
9411
|
-
var
|
|
9471
|
+
var import_react44 = require("react");
|
|
9472
|
+
var import_styled_components62 = __toESM(require("styled-components"));
|
|
9412
9473
|
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
9413
|
-
var
|
|
9414
|
-
var
|
|
9415
|
-
var segmentedControlItemStyles =
|
|
9474
|
+
var import_type_guards36 = require("@wistia/type-guards");
|
|
9475
|
+
var import_jsx_runtime212 = require("react/jsx-runtime");
|
|
9476
|
+
var segmentedControlItemStyles = import_styled_components62.css`
|
|
9416
9477
|
all: unset; /* ToggleGroupItem is a button element */
|
|
9417
9478
|
align-items: center;
|
|
9418
9479
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -9467,10 +9528,10 @@ var segmentedControlItemStyles = import_styled_components60.css`
|
|
|
9467
9528
|
}
|
|
9468
9529
|
}
|
|
9469
9530
|
`;
|
|
9470
|
-
var StyledSegmentedControlItem = (0,
|
|
9531
|
+
var StyledSegmentedControlItem = (0, import_styled_components62.default)(import_react_toggle_group2.Item)`
|
|
9471
9532
|
${segmentedControlItemStyles}
|
|
9472
9533
|
`;
|
|
9473
|
-
var SegmentedControlItem = (0,
|
|
9534
|
+
var SegmentedControlItem = (0, import_react44.forwardRef)(
|
|
9474
9535
|
({ disabled, icon, label, "aria-label": ariaLabel, value }, ref) => {
|
|
9475
9536
|
const handleClick = (event) => {
|
|
9476
9537
|
const target = event.target;
|
|
@@ -9479,12 +9540,12 @@ var SegmentedControlItem = (0, import_react43.forwardRef)(
|
|
|
9479
9540
|
event.preventDefault();
|
|
9480
9541
|
}
|
|
9481
9542
|
};
|
|
9482
|
-
return /* @__PURE__ */ (0,
|
|
9543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime212.jsxs)(
|
|
9483
9544
|
StyledSegmentedControlItem,
|
|
9484
9545
|
{
|
|
9485
9546
|
ref,
|
|
9486
|
-
$hasLabel: (0,
|
|
9487
|
-
"aria-label": (0,
|
|
9547
|
+
$hasLabel: (0, import_type_guards36.isNotNil)(label),
|
|
9548
|
+
"aria-label": (0, import_type_guards36.isNotNil)(label) ? void 0 : ariaLabel,
|
|
9488
9549
|
disabled,
|
|
9489
9550
|
onClick: handleClick,
|
|
9490
9551
|
value,
|
|
@@ -9498,200 +9559,16 @@ var SegmentedControlItem = (0, import_react43.forwardRef)(
|
|
|
9498
9559
|
);
|
|
9499
9560
|
SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
9500
9561
|
|
|
9501
|
-
// src/components/Select/Select.tsx
|
|
9502
|
-
var import_react_select = require("@radix-ui/react-select");
|
|
9503
|
-
var import_react44 = require("react");
|
|
9504
|
-
var import_styled_components61 = __toESM(require("styled-components"));
|
|
9505
|
-
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
9506
|
-
var StyledTrigger = (0, import_styled_components61.default)(import_react_select.Trigger)`
|
|
9507
|
-
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
9508
|
-
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
9509
|
-
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
9510
|
-
--wui-select-color-border: var(--wui-color-border);
|
|
9511
|
-
--wui-select-color-border-focus: var(--wui-color-border-active);
|
|
9512
|
-
--wui-select-color-border-error: var(--wui-color-border-error);
|
|
9513
|
-
--wui-select-color-border-disabled: var(--wui-color-border-disabled);
|
|
9514
|
-
--wui-select-border-radius: var(--wui-border-radius-rounded);
|
|
9515
|
-
--wui-select-multiline-border-radius: var(--wui-border-radius-02);
|
|
9516
|
-
--wui-select-vertical-padding: var(--wui-space-02);
|
|
9517
|
-
--wui-select-horizontal-padding: var(--wui-space-03);
|
|
9518
|
-
--wui-select-placeholder: var(--wui-gray-10);
|
|
9519
|
-
--wui-select-color-text-error: var(--wui-color-text-error);
|
|
9520
|
-
|
|
9521
|
-
padding: var(--wui-select-vertical-padding) var(--wui-select-horizontal-padding);
|
|
9522
|
-
background-color: var(--wui-select-color-bg);
|
|
9523
|
-
border: 1px solid var(--wui-select-color-border);
|
|
9524
|
-
border-radius: var(--wui-select-border-radius);
|
|
9525
|
-
min-width: 200px;
|
|
9526
|
-
text-align: left;
|
|
9527
|
-
display: inline-flex;
|
|
9528
|
-
align-items: center;
|
|
9529
|
-
justify-content: space-between;
|
|
9530
|
-
width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
|
|
9531
|
-
|
|
9532
|
-
&[aria-expanded='true'],
|
|
9533
|
-
&:focus {
|
|
9534
|
-
outline: 2px solid var(--wui-color-focus-ring);
|
|
9535
|
-
}
|
|
9536
|
-
|
|
9537
|
-
&[aria-invalid='true'] {
|
|
9538
|
-
outline: 2px solid var(--wui-select-color-border-error);
|
|
9539
|
-
color: var(--wui-select-color-text-error);
|
|
9540
|
-
}
|
|
9541
|
-
|
|
9542
|
-
&:disabled {
|
|
9543
|
-
border-color: var(--wui-color-bg-surface-disabled);
|
|
9544
|
-
background-color: var(--wui-color-bg-surface-disabled);
|
|
9545
|
-
}
|
|
9546
|
-
`;
|
|
9547
|
-
var StyledContent2 = (0, import_styled_components61.default)(import_react_select.Content)`
|
|
9548
|
-
--wui-select-content-border: var(--wui-color-border);
|
|
9549
|
-
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
9550
|
-
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
9551
|
-
--wui-select-option-padding: var(--wui-space-02);
|
|
9552
|
-
--wui-select-option-inner-gap: var(--wui-space-03);
|
|
9553
|
-
--wui-select-option-bg-hover: var(--wui-color-bg-surface-hover);
|
|
9554
|
-
|
|
9555
|
-
overflow: hidden;
|
|
9556
|
-
transform: translateY(8px);
|
|
9557
|
-
background-color: var(--wui-select-content-bg);
|
|
9558
|
-
border: 1px solid var(--wui-select-content-border);
|
|
9559
|
-
border-radius: var(--wui-select-content-border-radius);
|
|
9560
|
-
padding: var(--wui-select-option-padding);
|
|
9561
|
-
min-width: 200px;
|
|
9562
|
-
`;
|
|
9563
|
-
var Select = (0, import_react44.forwardRef)(
|
|
9564
|
-
({
|
|
9565
|
-
colorScheme = "inherit",
|
|
9566
|
-
children,
|
|
9567
|
-
onChange = () => null,
|
|
9568
|
-
placeholder = "Select...",
|
|
9569
|
-
fullWidth = false,
|
|
9570
|
-
...props
|
|
9571
|
-
}, forwardedRef) => {
|
|
9572
|
-
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
9573
|
-
return /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(
|
|
9574
|
-
import_react_select.Root,
|
|
9575
|
-
{
|
|
9576
|
-
...props,
|
|
9577
|
-
onValueChange: onChange,
|
|
9578
|
-
children: [
|
|
9579
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(
|
|
9580
|
-
StyledTrigger,
|
|
9581
|
-
{
|
|
9582
|
-
ref: forwardedRef,
|
|
9583
|
-
$colorScheme: colorScheme,
|
|
9584
|
-
$fullWidth: responsiveFullWidth,
|
|
9585
|
-
...props,
|
|
9586
|
-
children: [
|
|
9587
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.Value, { placeholder }),
|
|
9588
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
|
|
9589
|
-
Icon,
|
|
9590
|
-
{
|
|
9591
|
-
size: "md",
|
|
9592
|
-
type: "caret-down"
|
|
9593
|
-
}
|
|
9594
|
-
)
|
|
9595
|
-
]
|
|
9596
|
-
}
|
|
9597
|
-
),
|
|
9598
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(StyledContent2, { position: "popper", children: [
|
|
9599
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(Icon, { type: "caret-up" }) }),
|
|
9600
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.Viewport, { children }),
|
|
9601
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(Icon, { type: "caret-down" }) })
|
|
9602
|
-
] }) })
|
|
9603
|
-
]
|
|
9604
|
-
}
|
|
9605
|
-
);
|
|
9606
|
-
}
|
|
9607
|
-
);
|
|
9608
|
-
Select.displayName = "Select";
|
|
9609
|
-
|
|
9610
|
-
// src/components/Select/SelectOption.tsx
|
|
9611
|
-
var import_react_select2 = require("@radix-ui/react-select");
|
|
9612
|
-
var import_react45 = require("react");
|
|
9613
|
-
var import_styled_components62 = __toESM(require("styled-components"));
|
|
9614
|
-
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
9615
|
-
var StyledItem = (0, import_styled_components62.default)(import_react_select2.Item)`
|
|
9616
|
-
${variantStyleMap2.body3};
|
|
9617
|
-
display: flex;
|
|
9618
|
-
padding: var(--wui-select-option-padding);
|
|
9619
|
-
gap: var(--wui-select-option-inner-gap);
|
|
9620
|
-
font-size: var(--font-size);
|
|
9621
|
-
font-weight: var(--font-weight);
|
|
9622
|
-
border-radius: var(--wui-border-radius-01);
|
|
9623
|
-
|
|
9624
|
-
&:hover,
|
|
9625
|
-
&:focus-visible {
|
|
9626
|
-
background-color: var(--wui-select-option-bg-hover);
|
|
9627
|
-
outline: none;
|
|
9628
|
-
}
|
|
9629
|
-
|
|
9630
|
-
&[aria-disabled='true'] {
|
|
9631
|
-
color: var(--wui-color-text-disabled);
|
|
9632
|
-
}
|
|
9633
|
-
|
|
9634
|
-
&[aria-disabled='true']:hover {
|
|
9635
|
-
background-color: transparent;
|
|
9636
|
-
}
|
|
9637
|
-
`;
|
|
9638
|
-
var StyledIconContainer = import_styled_components62.default.span`
|
|
9639
|
-
width: 12px;
|
|
9640
|
-
`;
|
|
9641
|
-
var SelectOption = (0, import_react45.forwardRef)(
|
|
9642
|
-
({ children, ...props }, forwardedRef) => {
|
|
9643
|
-
return /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(
|
|
9644
|
-
StyledItem,
|
|
9645
|
-
{
|
|
9646
|
-
...props,
|
|
9647
|
-
ref: forwardedRef,
|
|
9648
|
-
children: [
|
|
9649
|
-
/* @__PURE__ */ (0, import_jsx_runtime211.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
|
|
9650
|
-
Icon,
|
|
9651
|
-
{
|
|
9652
|
-
size: "sm",
|
|
9653
|
-
type: "checkmark"
|
|
9654
|
-
}
|
|
9655
|
-
) }) }),
|
|
9656
|
-
/* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_react_select2.ItemText, { children })
|
|
9657
|
-
]
|
|
9658
|
-
}
|
|
9659
|
-
);
|
|
9660
|
-
}
|
|
9661
|
-
);
|
|
9662
|
-
SelectOption.displayName = "Option";
|
|
9663
|
-
|
|
9664
|
-
// src/components/Select/SelectOptionGroup.tsx
|
|
9665
|
-
var import_react_select3 = require("@radix-ui/react-select");
|
|
9666
|
-
var import_styled_components63 = __toESM(require("styled-components"));
|
|
9667
|
-
var import_jsx_runtime212 = require("react/jsx-runtime");
|
|
9668
|
-
var StyledLabel4 = (0, import_styled_components63.default)(import_react_select3.Label)`
|
|
9669
|
-
padding: var(--wui-select-option-padding);
|
|
9670
|
-
`;
|
|
9671
|
-
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
9672
|
-
return /* @__PURE__ */ (0, import_jsx_runtime212.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
9673
|
-
/* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
|
|
9674
|
-
Text,
|
|
9675
|
-
{
|
|
9676
|
-
prominence: "secondary",
|
|
9677
|
-
variant: "body3",
|
|
9678
|
-
children: label
|
|
9679
|
-
}
|
|
9680
|
-
) }),
|
|
9681
|
-
children
|
|
9682
|
-
] });
|
|
9683
|
-
};
|
|
9684
|
-
|
|
9685
9562
|
// src/components/Tabs/Tabs.tsx
|
|
9686
|
-
var
|
|
9563
|
+
var import_react47 = require("react");
|
|
9687
9564
|
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
9688
|
-
var
|
|
9565
|
+
var import_type_guards38 = require("@wistia/type-guards");
|
|
9689
9566
|
|
|
9690
9567
|
// src/components/Tabs/TabPanel.tsx
|
|
9691
|
-
var
|
|
9568
|
+
var import_styled_components63 = __toESM(require("styled-components"));
|
|
9692
9569
|
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
9693
9570
|
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
9694
|
-
var StyledTabPanel = (0,
|
|
9571
|
+
var StyledTabPanel = (0, import_styled_components63.default)(import_react_tabs.Content)`
|
|
9695
9572
|
display: flex;
|
|
9696
9573
|
flex-direction: column;
|
|
9697
9574
|
`;
|
|
@@ -9708,10 +9585,10 @@ var TabPanel = ({ children, value, ...props }) => {
|
|
|
9708
9585
|
TabPanel.displayName = "TabPanel";
|
|
9709
9586
|
|
|
9710
9587
|
// src/components/Tabs/TabList.tsx
|
|
9711
|
-
var
|
|
9588
|
+
var import_styled_components64 = __toESM(require("styled-components"));
|
|
9712
9589
|
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
9713
9590
|
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
9714
|
-
var StyledTabList = (0,
|
|
9591
|
+
var StyledTabList = (0, import_styled_components64.default)(import_react_tabs2.List)`
|
|
9715
9592
|
${segmentedControlStyles}
|
|
9716
9593
|
|
|
9717
9594
|
margin-bottom: var(--wui-space-04);
|
|
@@ -9735,26 +9612,26 @@ var TabList = ({
|
|
|
9735
9612
|
TabList.displayName = "TabList";
|
|
9736
9613
|
|
|
9737
9614
|
// src/components/Tabs/TabItem.tsx
|
|
9738
|
-
var
|
|
9739
|
-
var
|
|
9615
|
+
var import_react45 = require("react");
|
|
9616
|
+
var import_styled_components65 = __toESM(require("styled-components"));
|
|
9740
9617
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
9741
|
-
var
|
|
9618
|
+
var import_type_guards37 = require("@wistia/type-guards");
|
|
9742
9619
|
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
9743
|
-
var StyledTabItem = (0,
|
|
9620
|
+
var StyledTabItem = (0, import_styled_components65.default)(import_react_tabs3.Trigger)`
|
|
9744
9621
|
${segmentedControlItemStyles}
|
|
9745
9622
|
|
|
9746
9623
|
&[data-state='active'] {
|
|
9747
9624
|
background-color: white;
|
|
9748
9625
|
}
|
|
9749
9626
|
`;
|
|
9750
|
-
var TabItem = (0,
|
|
9627
|
+
var TabItem = (0, import_react45.forwardRef)(
|
|
9751
9628
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, ref) => {
|
|
9752
9629
|
return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(
|
|
9753
9630
|
StyledTabItem,
|
|
9754
9631
|
{
|
|
9755
9632
|
ref,
|
|
9756
|
-
$hasLabel: (0,
|
|
9757
|
-
"aria-label": (0,
|
|
9633
|
+
$hasLabel: (0, import_type_guards37.isNotNil)(label),
|
|
9634
|
+
"aria-label": (0, import_type_guards37.isNotNil)(label) ? void 0 : ariaLabel,
|
|
9758
9635
|
disabled,
|
|
9759
9636
|
value,
|
|
9760
9637
|
children: [
|
|
@@ -9768,16 +9645,16 @@ var TabItem = (0, import_react46.forwardRef)(
|
|
|
9768
9645
|
TabItem.displayName = "TabItem";
|
|
9769
9646
|
|
|
9770
9647
|
// src/components/Tabs/extractTabItems.ts
|
|
9771
|
-
var
|
|
9648
|
+
var import_react46 = require("react");
|
|
9772
9649
|
var extractTabItems = (children) => {
|
|
9773
9650
|
const tabItems = [];
|
|
9774
|
-
|
|
9775
|
-
if (!(0,
|
|
9651
|
+
import_react46.Children.forEach(children, (child) => {
|
|
9652
|
+
if (!(0, import_react46.isValidElement)(child)) {
|
|
9776
9653
|
return;
|
|
9777
9654
|
}
|
|
9778
9655
|
if (typeof child.type !== "string" && child.type.displayName === "Tab") {
|
|
9779
9656
|
tabItems.push(child);
|
|
9780
|
-
} else if (child.type ===
|
|
9657
|
+
} else if (child.type === import_react46.Fragment) {
|
|
9781
9658
|
const fragmentElement = child;
|
|
9782
9659
|
tabItems.push(...extractTabItems(fragmentElement.props.children));
|
|
9783
9660
|
} else if ((child.props.children ?? null) != null) {
|
|
@@ -9791,7 +9668,7 @@ var extractTabItems = (children) => {
|
|
|
9791
9668
|
|
|
9792
9669
|
// src/components/Tabs/Tabs.tsx
|
|
9793
9670
|
var import_jsx_runtime216 = require("react/jsx-runtime");
|
|
9794
|
-
var Tabs = (0,
|
|
9671
|
+
var Tabs = (0, import_react47.forwardRef)(
|
|
9795
9672
|
({
|
|
9796
9673
|
children,
|
|
9797
9674
|
fullWidth = true,
|
|
@@ -9824,7 +9701,7 @@ var Tabs = (0, import_react48.forwardRef)(
|
|
|
9824
9701
|
label,
|
|
9825
9702
|
"aria-label": ariaLabelForTab
|
|
9826
9703
|
} = tab.props;
|
|
9827
|
-
if ((0,
|
|
9704
|
+
if ((0, import_type_guards38.isNil)(icon)) {
|
|
9828
9705
|
return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
9829
9706
|
TabItem,
|
|
9830
9707
|
{
|
|
@@ -9835,7 +9712,7 @@ var Tabs = (0, import_react48.forwardRef)(
|
|
|
9835
9712
|
value
|
|
9836
9713
|
);
|
|
9837
9714
|
}
|
|
9838
|
-
if ((0,
|
|
9715
|
+
if ((0, import_type_guards38.isNotNil)(label)) {
|
|
9839
9716
|
return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
9840
9717
|
TabItem,
|
|
9841
9718
|
{
|
|
@@ -9847,7 +9724,7 @@ var Tabs = (0, import_react48.forwardRef)(
|
|
|
9847
9724
|
value
|
|
9848
9725
|
);
|
|
9849
9726
|
}
|
|
9850
|
-
if ((0,
|
|
9727
|
+
if ((0, import_type_guards38.isNotNil)(ariaLabelForTab)) {
|
|
9851
9728
|
return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
9852
9729
|
TabItem,
|
|
9853
9730
|
{
|
|
@@ -9879,19 +9756,19 @@ var Tabs = (0, import_react48.forwardRef)(
|
|
|
9879
9756
|
Tabs.displayName = "Tabs";
|
|
9880
9757
|
|
|
9881
9758
|
// src/components/Tabs/Tab.tsx
|
|
9882
|
-
var
|
|
9759
|
+
var import_react48 = require("react");
|
|
9883
9760
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
9884
|
-
var Tab = (0,
|
|
9761
|
+
var Tab = (0, import_react48.forwardRef)(({ children }, ref) => {
|
|
9885
9762
|
return /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("div", { ref, children });
|
|
9886
9763
|
});
|
|
9887
9764
|
Tab.displayName = "Tab";
|
|
9888
9765
|
|
|
9889
9766
|
// src/components/Tag/Tag.tsx
|
|
9890
|
-
var
|
|
9891
|
-
var
|
|
9892
|
-
var
|
|
9767
|
+
var import_react49 = require("react");
|
|
9768
|
+
var import_styled_components66 = __toESM(require("styled-components"));
|
|
9769
|
+
var import_type_guards39 = require("@wistia/type-guards");
|
|
9893
9770
|
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
9894
|
-
var TagLabel =
|
|
9771
|
+
var TagLabel = import_styled_components66.default.a`
|
|
9895
9772
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
9896
9773
|
font-size: var(--wui-typography-label-4-size);
|
|
9897
9774
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -9919,14 +9796,14 @@ var TagLabel = import_styled_components67.default.a`
|
|
|
9919
9796
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
9920
9797
|
}
|
|
9921
9798
|
`;
|
|
9922
|
-
var TagDivider =
|
|
9799
|
+
var TagDivider = import_styled_components66.default.div`
|
|
9923
9800
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
9924
9801
|
border-left: 1px solid var(--wui-color-border);
|
|
9925
9802
|
display: flex;
|
|
9926
9803
|
height: 14px;
|
|
9927
9804
|
width: 1px;
|
|
9928
9805
|
`;
|
|
9929
|
-
var StyledRemoveButton =
|
|
9806
|
+
var StyledRemoveButton = import_styled_components66.default.button`
|
|
9930
9807
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
9931
9808
|
all: unset;
|
|
9932
9809
|
cursor: pointer;
|
|
@@ -9954,7 +9831,7 @@ var StyledRemoveButton = import_styled_components67.default.button`
|
|
|
9954
9831
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
9955
9832
|
}
|
|
9956
9833
|
`;
|
|
9957
|
-
var StyledTag =
|
|
9834
|
+
var StyledTag = import_styled_components66.default.div`
|
|
9958
9835
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
9959
9836
|
align-items: center;
|
|
9960
9837
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -9967,10 +9844,10 @@ var StyledTag = import_styled_components67.default.div`
|
|
|
9967
9844
|
}
|
|
9968
9845
|
`;
|
|
9969
9846
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
9970
|
-
if ((0,
|
|
9847
|
+
if ((0, import_type_guards39.isNil)(onClickRemove)) {
|
|
9971
9848
|
return null;
|
|
9972
9849
|
}
|
|
9973
|
-
if ((0,
|
|
9850
|
+
if ((0, import_type_guards39.isNil)(onClickRemoveLabel)) {
|
|
9974
9851
|
throw new Error(
|
|
9975
9852
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
9976
9853
|
);
|
|
@@ -9997,9 +9874,9 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
9997
9874
|
)
|
|
9998
9875
|
] });
|
|
9999
9876
|
};
|
|
10000
|
-
var Tag = (0,
|
|
9877
|
+
var Tag = (0, import_react49.forwardRef)(
|
|
10001
9878
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
10002
|
-
const labelProps = (0,
|
|
9879
|
+
const labelProps = (0, import_type_guards39.isNotNil)(href) && (0, import_type_guards39.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
10003
9880
|
return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(
|
|
10004
9881
|
StyledTag,
|
|
10005
9882
|
{
|
|
@@ -10031,8 +9908,8 @@ var Tag = (0, import_react50.forwardRef)(
|
|
|
10031
9908
|
Tag.displayName = "Tag";
|
|
10032
9909
|
|
|
10033
9910
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
10034
|
-
var
|
|
10035
|
-
var
|
|
9911
|
+
var import_styled_components67 = __toESM(require("styled-components"));
|
|
9912
|
+
var import_type_guards40 = require("@wistia/type-guards");
|
|
10036
9913
|
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
10037
9914
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
10038
9915
|
if (iconOnly) {
|
|
@@ -10073,7 +9950,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
10073
9950
|
}
|
|
10074
9951
|
return "0 0 144 31.47";
|
|
10075
9952
|
};
|
|
10076
|
-
var WistiaLogoComponent =
|
|
9953
|
+
var WistiaLogoComponent = import_styled_components67.default.svg`
|
|
10077
9954
|
height: ${({ height }) => `${height}px`};
|
|
10078
9955
|
|
|
10079
9956
|
/* ensure it will always fit on mobile */
|
|
@@ -10126,7 +10003,7 @@ var WistiaLogo = ({
|
|
|
10126
10003
|
...otherProps,
|
|
10127
10004
|
children: [
|
|
10128
10005
|
/* @__PURE__ */ (0, import_jsx_runtime219.jsx)("title", { children: title }),
|
|
10129
|
-
(0,
|
|
10006
|
+
(0, import_type_guards40.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("desc", { children: description }) : null,
|
|
10130
10007
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
10131
10008
|
renderLogotype(logotypeColor, iconOnly)
|
|
10132
10009
|
]
|
|
@@ -10135,6 +10012,190 @@ var WistiaLogo = ({
|
|
|
10135
10012
|
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("a", { href, children: Logo }) : Logo;
|
|
10136
10013
|
};
|
|
10137
10014
|
WistiaLogo.displayName = "WistiaLogo";
|
|
10015
|
+
|
|
10016
|
+
// src/components/Select/Select.tsx
|
|
10017
|
+
var import_react_select = require("@radix-ui/react-select");
|
|
10018
|
+
var import_react50 = require("react");
|
|
10019
|
+
var import_styled_components68 = __toESM(require("styled-components"));
|
|
10020
|
+
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
10021
|
+
var StyledTrigger = (0, import_styled_components68.default)(import_react_select.Trigger)`
|
|
10022
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10023
|
+
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
10024
|
+
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
10025
|
+
--wui-select-color-border: var(--wui-color-border);
|
|
10026
|
+
--wui-select-color-border-focus: var(--wui-color-border-active);
|
|
10027
|
+
--wui-select-color-border-error: var(--wui-color-border-error);
|
|
10028
|
+
--wui-select-color-border-disabled: var(--wui-color-border-disabled);
|
|
10029
|
+
--wui-select-border-radius: var(--wui-border-radius-rounded);
|
|
10030
|
+
--wui-select-multiline-border-radius: var(--wui-border-radius-02);
|
|
10031
|
+
--wui-select-vertical-padding: var(--wui-space-02);
|
|
10032
|
+
--wui-select-horizontal-padding: var(--wui-space-03);
|
|
10033
|
+
--wui-select-placeholder: var(--wui-gray-10);
|
|
10034
|
+
--wui-select-color-text-error: var(--wui-color-text-error);
|
|
10035
|
+
|
|
10036
|
+
padding: var(--wui-select-vertical-padding) var(--wui-select-horizontal-padding);
|
|
10037
|
+
background-color: var(--wui-select-color-bg);
|
|
10038
|
+
border: 1px solid var(--wui-select-color-border);
|
|
10039
|
+
border-radius: var(--wui-select-border-radius);
|
|
10040
|
+
min-width: 200px;
|
|
10041
|
+
text-align: left;
|
|
10042
|
+
display: inline-flex;
|
|
10043
|
+
align-items: center;
|
|
10044
|
+
justify-content: space-between;
|
|
10045
|
+
width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
|
|
10046
|
+
|
|
10047
|
+
&[aria-expanded='true'],
|
|
10048
|
+
&:focus {
|
|
10049
|
+
outline: 2px solid var(--wui-color-focus-ring);
|
|
10050
|
+
}
|
|
10051
|
+
|
|
10052
|
+
&[aria-invalid='true'] {
|
|
10053
|
+
outline: 2px solid var(--wui-select-color-border-error);
|
|
10054
|
+
color: var(--wui-select-color-text-error);
|
|
10055
|
+
}
|
|
10056
|
+
|
|
10057
|
+
&:disabled {
|
|
10058
|
+
border-color: var(--wui-color-bg-surface-disabled);
|
|
10059
|
+
background-color: var(--wui-color-bg-surface-disabled);
|
|
10060
|
+
}
|
|
10061
|
+
`;
|
|
10062
|
+
var StyledContent2 = (0, import_styled_components68.default)(import_react_select.Content)`
|
|
10063
|
+
--wui-select-content-border: var(--wui-color-border);
|
|
10064
|
+
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
10065
|
+
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
10066
|
+
--wui-select-option-padding: var(--wui-space-02);
|
|
10067
|
+
--wui-select-option-inner-gap: var(--wui-space-03);
|
|
10068
|
+
--wui-select-option-bg-hover: var(--wui-color-bg-surface-hover);
|
|
10069
|
+
|
|
10070
|
+
overflow: hidden;
|
|
10071
|
+
transform: translateY(8px);
|
|
10072
|
+
background-color: var(--wui-select-content-bg);
|
|
10073
|
+
border: 1px solid var(--wui-select-content-border);
|
|
10074
|
+
border-radius: var(--wui-select-content-border-radius);
|
|
10075
|
+
padding: var(--wui-select-option-padding);
|
|
10076
|
+
min-width: 200px;
|
|
10077
|
+
`;
|
|
10078
|
+
var Select = (0, import_react50.forwardRef)(
|
|
10079
|
+
({
|
|
10080
|
+
colorScheme = "inherit",
|
|
10081
|
+
children,
|
|
10082
|
+
onChange = () => null,
|
|
10083
|
+
placeholder = "Select...",
|
|
10084
|
+
fullWidth = false,
|
|
10085
|
+
...props
|
|
10086
|
+
}, forwardedRef) => {
|
|
10087
|
+
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
10088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(
|
|
10089
|
+
import_react_select.Root,
|
|
10090
|
+
{
|
|
10091
|
+
...props,
|
|
10092
|
+
onValueChange: onChange,
|
|
10093
|
+
children: [
|
|
10094
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(
|
|
10095
|
+
StyledTrigger,
|
|
10096
|
+
{
|
|
10097
|
+
ref: forwardedRef,
|
|
10098
|
+
$colorScheme: colorScheme,
|
|
10099
|
+
$fullWidth: responsiveFullWidth,
|
|
10100
|
+
...props,
|
|
10101
|
+
children: [
|
|
10102
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(import_react_select.Value, { placeholder }),
|
|
10103
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
|
|
10104
|
+
Icon,
|
|
10105
|
+
{
|
|
10106
|
+
size: "md",
|
|
10107
|
+
type: "caret-down"
|
|
10108
|
+
}
|
|
10109
|
+
)
|
|
10110
|
+
]
|
|
10111
|
+
}
|
|
10112
|
+
),
|
|
10113
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(StyledContent2, { position: "popper", children: [
|
|
10114
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(Icon, { type: "caret-up" }) }),
|
|
10115
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(import_react_select.Viewport, { children }),
|
|
10116
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(Icon, { type: "caret-down" }) })
|
|
10117
|
+
] }) })
|
|
10118
|
+
]
|
|
10119
|
+
}
|
|
10120
|
+
);
|
|
10121
|
+
}
|
|
10122
|
+
);
|
|
10123
|
+
Select.displayName = "Select";
|
|
10124
|
+
|
|
10125
|
+
// src/components/Select/SelectOption.tsx
|
|
10126
|
+
var import_react_select2 = require("@radix-ui/react-select");
|
|
10127
|
+
var import_react51 = require("react");
|
|
10128
|
+
var import_styled_components69 = __toESM(require("styled-components"));
|
|
10129
|
+
var import_jsx_runtime221 = require("react/jsx-runtime");
|
|
10130
|
+
var StyledItem = (0, import_styled_components69.default)(import_react_select2.Item)`
|
|
10131
|
+
${variantStyleMap2.body3};
|
|
10132
|
+
display: flex;
|
|
10133
|
+
padding: var(--wui-select-option-padding);
|
|
10134
|
+
gap: var(--wui-select-option-inner-gap);
|
|
10135
|
+
font-size: var(--font-size);
|
|
10136
|
+
font-weight: var(--font-weight);
|
|
10137
|
+
border-radius: var(--wui-border-radius-01);
|
|
10138
|
+
|
|
10139
|
+
&:hover,
|
|
10140
|
+
&:focus-visible {
|
|
10141
|
+
background-color: var(--wui-select-option-bg-hover);
|
|
10142
|
+
outline: none;
|
|
10143
|
+
}
|
|
10144
|
+
|
|
10145
|
+
&[aria-disabled='true'] {
|
|
10146
|
+
color: var(--wui-color-text-disabled);
|
|
10147
|
+
}
|
|
10148
|
+
|
|
10149
|
+
&[aria-disabled='true']:hover {
|
|
10150
|
+
background-color: transparent;
|
|
10151
|
+
}
|
|
10152
|
+
`;
|
|
10153
|
+
var StyledIconContainer = import_styled_components69.default.span`
|
|
10154
|
+
width: 12px;
|
|
10155
|
+
`;
|
|
10156
|
+
var SelectOption = (0, import_react51.forwardRef)(
|
|
10157
|
+
({ children, ...props }, forwardedRef) => {
|
|
10158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(
|
|
10159
|
+
StyledItem,
|
|
10160
|
+
{
|
|
10161
|
+
...props,
|
|
10162
|
+
ref: forwardedRef,
|
|
10163
|
+
children: [
|
|
10164
|
+
/* @__PURE__ */ (0, import_jsx_runtime221.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
|
|
10165
|
+
Icon,
|
|
10166
|
+
{
|
|
10167
|
+
size: "sm",
|
|
10168
|
+
type: "checkmark"
|
|
10169
|
+
}
|
|
10170
|
+
) }) }),
|
|
10171
|
+
/* @__PURE__ */ (0, import_jsx_runtime221.jsx)(import_react_select2.ItemText, { children })
|
|
10172
|
+
]
|
|
10173
|
+
}
|
|
10174
|
+
);
|
|
10175
|
+
}
|
|
10176
|
+
);
|
|
10177
|
+
SelectOption.displayName = "Option";
|
|
10178
|
+
|
|
10179
|
+
// src/components/Select/SelectOptionGroup.tsx
|
|
10180
|
+
var import_react_select3 = require("@radix-ui/react-select");
|
|
10181
|
+
var import_styled_components70 = __toESM(require("styled-components"));
|
|
10182
|
+
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
10183
|
+
var StyledLabel4 = (0, import_styled_components70.default)(import_react_select3.Label)`
|
|
10184
|
+
padding: var(--wui-select-option-padding);
|
|
10185
|
+
`;
|
|
10186
|
+
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
10187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
10188
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
|
|
10189
|
+
Text,
|
|
10190
|
+
{
|
|
10191
|
+
prominence: "secondary",
|
|
10192
|
+
variant: "body3",
|
|
10193
|
+
children: label
|
|
10194
|
+
}
|
|
10195
|
+
) }),
|
|
10196
|
+
children
|
|
10197
|
+
] });
|
|
10198
|
+
};
|
|
10138
10199
|
// Annotate the CommonJS export names for ESM import in node:
|
|
10139
10200
|
0 && (module.exports = {
|
|
10140
10201
|
ActionButton,
|
|
@@ -10149,6 +10210,9 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
10149
10210
|
Checkbox,
|
|
10150
10211
|
CheckboxGroup,
|
|
10151
10212
|
CheckboxMenuItem,
|
|
10213
|
+
Collapsible,
|
|
10214
|
+
CollapsibleContent,
|
|
10215
|
+
CollapsibleTrigger,
|
|
10152
10216
|
ColorSchemeWrapper,
|
|
10153
10217
|
DataCard,
|
|
10154
10218
|
DataCardTrend,
|