@wistia/ui 0.5.5-beta.05a00a72.6b7da9c → 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 +653 -619
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +114 -73
- package/dist/index.d.ts +114 -73
- package/dist/index.mjs +554 -523
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.5.5-beta.
|
|
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,
|
|
@@ -7181,11 +7184,63 @@ var Checkbox = (0, import_react19.forwardRef)(
|
|
|
7181
7184
|
);
|
|
7182
7185
|
Checkbox.displayName = "Checkbox";
|
|
7183
7186
|
|
|
7184
|
-
// src/components/
|
|
7185
|
-
var
|
|
7187
|
+
// src/components/Collapsible/Collapsible.tsx
|
|
7188
|
+
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
7186
7189
|
var import_type_guards21 = require("@wistia/type-guards");
|
|
7190
|
+
var import_styled_components34 = __toESM(require("styled-components"));
|
|
7187
7191
|
var import_jsx_runtime176 = require("react/jsx-runtime");
|
|
7188
|
-
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`
|
|
7189
7244
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
7190
7245
|
display: grid;
|
|
7191
7246
|
grid-template-areas: 'label slot' 'value value';
|
|
@@ -7198,7 +7253,7 @@ var StyledDataCard = import_styled_components34.default.div`
|
|
|
7198
7253
|
border-radius: var(--wui-border-radius-02);
|
|
7199
7254
|
position: relative;
|
|
7200
7255
|
`;
|
|
7201
|
-
var shimmer =
|
|
7256
|
+
var shimmer = import_styled_components36.keyframes`
|
|
7202
7257
|
0% {
|
|
7203
7258
|
background-position: 200% 0;
|
|
7204
7259
|
}
|
|
@@ -7206,7 +7261,7 @@ var shimmer = import_styled_components34.keyframes`
|
|
|
7206
7261
|
background-position: -200% 0;
|
|
7207
7262
|
}
|
|
7208
7263
|
`;
|
|
7209
|
-
var LoadingBackground =
|
|
7264
|
+
var LoadingBackground = import_styled_components36.default.div`
|
|
7210
7265
|
background: linear-gradient(
|
|
7211
7266
|
90deg,
|
|
7212
7267
|
var(--wui-color-bg-surface-tertiary) 25%,
|
|
@@ -7217,27 +7272,27 @@ var LoadingBackground = import_styled_components34.default.div`
|
|
|
7217
7272
|
animation: ${shimmer} 1.5s infinite;
|
|
7218
7273
|
border-radius: var(--wui-border-radius-01);
|
|
7219
7274
|
`;
|
|
7220
|
-
var StyledLoadingLabel = (0,
|
|
7275
|
+
var StyledLoadingLabel = (0, import_styled_components36.default)(LoadingBackground)`
|
|
7221
7276
|
width: 80px;
|
|
7222
7277
|
height: var(--wui-typography-heading-6-line-height);
|
|
7223
7278
|
`;
|
|
7224
|
-
var StyledLoadingValue = (0,
|
|
7279
|
+
var StyledLoadingValue = (0, import_styled_components36.default)(LoadingBackground)`
|
|
7225
7280
|
width: 90%;
|
|
7226
7281
|
height: var(--wui-typography-heading-3-line-height);
|
|
7227
7282
|
`;
|
|
7228
|
-
var StyledLabel3 = (0,
|
|
7283
|
+
var StyledLabel3 = (0, import_styled_components36.default)(Heading)`
|
|
7229
7284
|
grid-area: label;
|
|
7230
7285
|
`;
|
|
7231
|
-
var StyledValue = (0,
|
|
7286
|
+
var StyledValue = (0, import_styled_components36.default)(Heading)`
|
|
7232
7287
|
grid-area: value;
|
|
7233
7288
|
`;
|
|
7234
|
-
var StyledSlot =
|
|
7289
|
+
var StyledSlot = import_styled_components36.default.div`
|
|
7235
7290
|
display: flex;
|
|
7236
7291
|
justify-content: flex-end;
|
|
7237
7292
|
grid-area: slot;
|
|
7238
7293
|
align-self: center;
|
|
7239
7294
|
`;
|
|
7240
|
-
var StyledDataCardTrendContainer =
|
|
7295
|
+
var StyledDataCardTrendContainer = import_styled_components36.default.div`
|
|
7241
7296
|
position: absolute;
|
|
7242
7297
|
bottom: var(--wui-space-01);
|
|
7243
7298
|
right: var(--wui-space-01);
|
|
@@ -7250,39 +7305,39 @@ var DataCard = ({
|
|
|
7250
7305
|
isLoading = false,
|
|
7251
7306
|
trend,
|
|
7252
7307
|
...props
|
|
7253
|
-
}) => /* @__PURE__ */ (0,
|
|
7308
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime179.jsxs)(
|
|
7254
7309
|
StyledDataCard,
|
|
7255
7310
|
{
|
|
7256
7311
|
$colorScheme: colorScheme,
|
|
7257
7312
|
...props,
|
|
7258
7313
|
children: [
|
|
7259
|
-
/* @__PURE__ */ (0,
|
|
7314
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
|
|
7260
7315
|
StyledLabel3,
|
|
7261
7316
|
{
|
|
7262
7317
|
renderAs: "dt",
|
|
7263
7318
|
variant: "heading6",
|
|
7264
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
7319
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(StyledLoadingLabel, {}) : label
|
|
7265
7320
|
}
|
|
7266
7321
|
),
|
|
7267
|
-
/* @__PURE__ */ (0,
|
|
7322
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
|
|
7268
7323
|
StyledValue,
|
|
7269
7324
|
{
|
|
7270
7325
|
renderAs: "dd",
|
|
7271
7326
|
variant: "heading3",
|
|
7272
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
7327
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(StyledLoadingValue, {}) : value
|
|
7273
7328
|
}
|
|
7274
7329
|
),
|
|
7275
|
-
(0,
|
|
7276
|
-
(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 })
|
|
7277
7332
|
]
|
|
7278
7333
|
}
|
|
7279
7334
|
);
|
|
7280
7335
|
DataCard.displayName = "DataCard";
|
|
7281
7336
|
|
|
7282
7337
|
// src/components/DataCards/DataCards.tsx
|
|
7283
|
-
var
|
|
7284
|
-
var
|
|
7285
|
-
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)`
|
|
7286
7341
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7287
7342
|
margin-top: 0; /* Remove default <dl> style */
|
|
7288
7343
|
> * {
|
|
@@ -7296,7 +7351,7 @@ var DataCards = ({
|
|
|
7296
7351
|
colorScheme = "inherit",
|
|
7297
7352
|
...props
|
|
7298
7353
|
}) => {
|
|
7299
|
-
return /* @__PURE__ */ (0,
|
|
7354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
|
|
7300
7355
|
StyledDataCards,
|
|
7301
7356
|
{
|
|
7302
7357
|
...props,
|
|
@@ -7314,97 +7369,93 @@ var DataCards = ({
|
|
|
7314
7369
|
DataCards.displayName = "DataCards";
|
|
7315
7370
|
|
|
7316
7371
|
// src/components/DataCards/DataCardTrend.tsx
|
|
7317
|
-
var
|
|
7372
|
+
var import_styled_components39 = __toESM(require("styled-components"));
|
|
7318
7373
|
|
|
7319
7374
|
// src/components/Text/Text.tsx
|
|
7320
|
-
var
|
|
7321
|
-
var
|
|
7322
|
-
var
|
|
7323
|
-
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`
|
|
7324
7379
|
> strong,
|
|
7325
7380
|
b {
|
|
7326
7381
|
font-weight: var(--wui-typography-weight-body-bold);
|
|
7327
7382
|
}
|
|
7328
7383
|
`;
|
|
7329
|
-
var labelBoldStyles =
|
|
7384
|
+
var labelBoldStyles = import_styled_components38.css`
|
|
7330
7385
|
> strong,
|
|
7331
7386
|
b {
|
|
7332
7387
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
7333
7388
|
}
|
|
7334
7389
|
`;
|
|
7335
|
-
var body1TextStyle =
|
|
7390
|
+
var body1TextStyle = import_styled_components38.css`
|
|
7336
7391
|
--font-family: var(--wui-typography-body-1-family);
|
|
7337
7392
|
--font-size: var(--wui-typography-body-1-size);
|
|
7338
7393
|
--font-weight: var(--wui-typography-body-1-weight);
|
|
7339
7394
|
--line-height: var(--wui-typography-body-1-line-height);
|
|
7340
|
-
--paragraph-spacing: var(--wui-typography-body-1-paragraph-spacing);
|
|
7341
7395
|
${bodyBoldStyles}
|
|
7342
7396
|
`;
|
|
7343
|
-
var body2TextStyle =
|
|
7397
|
+
var body2TextStyle = import_styled_components38.css`
|
|
7344
7398
|
--font-family: var(--wui-typography-body-2-family);
|
|
7345
7399
|
--font-size: var(--wui-typography-body-2-size);
|
|
7346
7400
|
--font-weight: var(--wui-typography-body-2-weight);
|
|
7347
7401
|
--line-height: var(--wui-typography-body-2-line-height);
|
|
7348
|
-
--paragraph-spacing: var(--wui-typography-body-2-paragraph-spacing);
|
|
7349
7402
|
${bodyBoldStyles}
|
|
7350
7403
|
`;
|
|
7351
|
-
var body3TextStyle =
|
|
7404
|
+
var body3TextStyle = import_styled_components38.css`
|
|
7352
7405
|
--font-family: var(--wui-typography-body-3-family);
|
|
7353
7406
|
--font-size: var(--wui-typography-body-3-size);
|
|
7354
7407
|
--font-weight: var(--wui-typography-body-3-weight);
|
|
7355
7408
|
--line-height: var(--wui-typography-body-3-line-height);
|
|
7356
|
-
--paragraph-spacing: var(--wui-typography-body-3-paragraph-spacing);
|
|
7357
7409
|
${bodyBoldStyles}
|
|
7358
7410
|
`;
|
|
7359
|
-
var body4TextStyle =
|
|
7411
|
+
var body4TextStyle = import_styled_components38.css`
|
|
7360
7412
|
--font-family: var(--wui-typography-body-4-family);
|
|
7361
7413
|
--font-size: var(--wui-typography-body-4-size);
|
|
7362
7414
|
--font-weight: var(--wui-typography-body-4-weight);
|
|
7363
7415
|
--line-height: var(--wui-typography-body-4-line-height);
|
|
7364
|
-
--paragraph-spacing: var(--wui-typography-body-4-paragraph-spacing);
|
|
7365
7416
|
${bodyBoldStyles}
|
|
7366
7417
|
`;
|
|
7367
|
-
var label1TextStyle =
|
|
7418
|
+
var label1TextStyle = import_styled_components38.css`
|
|
7368
7419
|
--font-family: var(--wui-typography-label-1-family);
|
|
7369
7420
|
--font-size: var(--wui-typography-label-1-size);
|
|
7370
7421
|
--font-weight: var(--wui-typography-label-1-weight);
|
|
7371
7422
|
--line-height: var(--wui-typography-label-1-line-height);
|
|
7372
7423
|
${labelBoldStyles}
|
|
7373
7424
|
`;
|
|
7374
|
-
var label2TextStyle =
|
|
7425
|
+
var label2TextStyle = import_styled_components38.css`
|
|
7375
7426
|
--font-family: var(--wui-typography-label-2-family);
|
|
7376
7427
|
--font-size: var(--wui-typography-label-2-size);
|
|
7377
7428
|
--font-weight: var(--wui-typography-label-2-weight);
|
|
7378
7429
|
--line-height: var(--wui-typography-label-2-line-height);
|
|
7379
7430
|
${labelBoldStyles}
|
|
7380
7431
|
`;
|
|
7381
|
-
var label3TextStyle =
|
|
7432
|
+
var label3TextStyle = import_styled_components38.css`
|
|
7382
7433
|
--font-family: var(--wui-typography-label-3-family);
|
|
7383
7434
|
--font-size: var(--wui-typography-label-3-size);
|
|
7384
7435
|
--font-weight: var(--wui-typography-label-3-weight);
|
|
7385
7436
|
--line-height: var(--wui-typography-label-3-line-height);
|
|
7386
7437
|
${labelBoldStyles}
|
|
7387
7438
|
`;
|
|
7388
|
-
var label4TextStyle =
|
|
7439
|
+
var label4TextStyle = import_styled_components38.css`
|
|
7389
7440
|
--font-family: var(--wui-typography-label-4-family);
|
|
7390
7441
|
--font-size: var(--wui-typography-label-4-size);
|
|
7391
7442
|
--font-weight: var(--wui-typography-label-4-weight);
|
|
7392
7443
|
--line-height: var(--wui-typography-label-4-line-height);
|
|
7393
7444
|
${labelBoldStyles}
|
|
7394
7445
|
`;
|
|
7395
|
-
var body1MonoTextStyle =
|
|
7446
|
+
var body1MonoTextStyle = import_styled_components38.css`
|
|
7396
7447
|
${body1TextStyle};
|
|
7397
7448
|
--font-family: var(--wui-typography-family-mono);
|
|
7398
7449
|
`;
|
|
7399
|
-
var body2MonoTextStyle =
|
|
7450
|
+
var body2MonoTextStyle = import_styled_components38.css`
|
|
7400
7451
|
${body2TextStyle};
|
|
7401
7452
|
--font-family: var(--wui-typography-family-mono);
|
|
7402
7453
|
`;
|
|
7403
|
-
var body3MonoTextStyle =
|
|
7454
|
+
var body3MonoTextStyle = import_styled_components38.css`
|
|
7404
7455
|
${body3TextStyle};
|
|
7405
7456
|
--font-family: var(--wui-typography-family-mono);
|
|
7406
7457
|
`;
|
|
7407
|
-
var body4MonoTextStyle =
|
|
7458
|
+
var body4MonoTextStyle = import_styled_components38.css`
|
|
7408
7459
|
${body4TextStyle};
|
|
7409
7460
|
--font-family: var(--wui-typography-family-mono);
|
|
7410
7461
|
`;
|
|
@@ -7422,24 +7473,7 @@ var variantStyleMap2 = {
|
|
|
7422
7473
|
label3: label3TextStyle,
|
|
7423
7474
|
label4: label4TextStyle
|
|
7424
7475
|
};
|
|
7425
|
-
var
|
|
7426
|
-
var labelElement = "span";
|
|
7427
|
-
var DEFAULT_ELEMENT3 = bodyElement;
|
|
7428
|
-
var variantElementMap2 = {
|
|
7429
|
-
body1: DEFAULT_ELEMENT3,
|
|
7430
|
-
body2: DEFAULT_ELEMENT3,
|
|
7431
|
-
body3: DEFAULT_ELEMENT3,
|
|
7432
|
-
body4: DEFAULT_ELEMENT3,
|
|
7433
|
-
body1Mono: DEFAULT_ELEMENT3,
|
|
7434
|
-
body2Mono: DEFAULT_ELEMENT3,
|
|
7435
|
-
body3Mono: DEFAULT_ELEMENT3,
|
|
7436
|
-
body4Mono: DEFAULT_ELEMENT3,
|
|
7437
|
-
label1: labelElement,
|
|
7438
|
-
label2: labelElement,
|
|
7439
|
-
label3: labelElement,
|
|
7440
|
-
label4: labelElement
|
|
7441
|
-
};
|
|
7442
|
-
var StyledText = import_styled_components36.default.div`
|
|
7476
|
+
var StyledText = import_styled_components38.default.div`
|
|
7443
7477
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7444
7478
|
--text-color: ${({ $prominence, $disabled }) => {
|
|
7445
7479
|
if ($disabled) {
|
|
@@ -7463,27 +7497,24 @@ var StyledText = import_styled_components36.default.div`
|
|
|
7463
7497
|
margin: 0;
|
|
7464
7498
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
7465
7499
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
7466
|
-
${({ $inline }) => $inline &&
|
|
7500
|
+
${({ $inline }) => $inline && import_styled_components38.css`
|
|
7467
7501
|
display: inline-block;
|
|
7468
7502
|
`}
|
|
7469
|
-
${({ $disabled }) => $disabled &&
|
|
7503
|
+
${({ $disabled }) => $disabled && import_styled_components38.css`
|
|
7470
7504
|
--text-color: var(--wui-color-text-disabled);
|
|
7471
7505
|
`}
|
|
7472
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
7506
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components38.css`
|
|
7473
7507
|
user-select: none;
|
|
7474
7508
|
`}
|
|
7475
|
-
${({ $align }) =>
|
|
7509
|
+
${({ $align }) => import_styled_components38.css`
|
|
7476
7510
|
text-align: ${$align};
|
|
7477
7511
|
`}
|
|
7478
|
-
${({ as }) => as === "p" &&
|
|
7512
|
+
${({ as }) => as === "p" && import_styled_components38.css`
|
|
7479
7513
|
display: block;
|
|
7480
|
-
|
|
7481
|
-
+ p {
|
|
7482
|
-
margin-top: var(--paragraph-spacing, var(--wui-space-04));
|
|
7483
|
-
}
|
|
7484
7514
|
`}
|
|
7485
7515
|
`;
|
|
7486
|
-
var
|
|
7516
|
+
var DEFAULT_ELEMENT3 = "div";
|
|
7517
|
+
var TextComponent = (0, import_react21.forwardRef)(
|
|
7487
7518
|
({
|
|
7488
7519
|
align = "left",
|
|
7489
7520
|
colorScheme = "inherit",
|
|
@@ -7496,7 +7527,7 @@ var TextComponent = (0, import_react20.forwardRef)(
|
|
|
7496
7527
|
renderAs,
|
|
7497
7528
|
...otherProps
|
|
7498
7529
|
}, ref) => {
|
|
7499
|
-
return /* @__PURE__ */ (0,
|
|
7530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
7500
7531
|
StyledText,
|
|
7501
7532
|
{
|
|
7502
7533
|
ref,
|
|
@@ -7508,7 +7539,7 @@ var TextComponent = (0, import_react20.forwardRef)(
|
|
|
7508
7539
|
$preventUserSelect: preventUserSelect,
|
|
7509
7540
|
$prominence: prominence,
|
|
7510
7541
|
$variant: variant,
|
|
7511
|
-
as: renderAs ??
|
|
7542
|
+
as: renderAs ?? DEFAULT_ELEMENT3,
|
|
7512
7543
|
...otherProps
|
|
7513
7544
|
}
|
|
7514
7545
|
);
|
|
@@ -7518,8 +7549,8 @@ TextComponent.displayName = "Text";
|
|
|
7518
7549
|
var Text = makePolymorphic(TextComponent);
|
|
7519
7550
|
|
|
7520
7551
|
// src/components/DataCards/DataCardTrend.tsx
|
|
7521
|
-
var
|
|
7522
|
-
var StyledDataCardTrend =
|
|
7552
|
+
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
7553
|
+
var StyledDataCardTrend = import_styled_components39.default.div`
|
|
7523
7554
|
${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
|
|
7524
7555
|
background: var(--wui-color-bg-app);
|
|
7525
7556
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -7534,8 +7565,8 @@ var DataCardTrend = ({
|
|
|
7534
7565
|
children,
|
|
7535
7566
|
...props
|
|
7536
7567
|
}) => {
|
|
7537
|
-
return /* @__PURE__ */ (0,
|
|
7538
|
-
/* @__PURE__ */ (0,
|
|
7568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(StyledDataCardTrend, { $outlook: outlook, children: [
|
|
7569
|
+
/* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
|
|
7539
7570
|
Icon,
|
|
7540
7571
|
{
|
|
7541
7572
|
size: "md",
|
|
@@ -7543,7 +7574,7 @@ var DataCardTrend = ({
|
|
|
7543
7574
|
...props
|
|
7544
7575
|
}
|
|
7545
7576
|
),
|
|
7546
|
-
/* @__PURE__ */ (0,
|
|
7577
|
+
/* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
|
|
7547
7578
|
Text,
|
|
7548
7579
|
{
|
|
7549
7580
|
prominence: "secondary",
|
|
@@ -7555,22 +7586,22 @@ var DataCardTrend = ({
|
|
|
7555
7586
|
};
|
|
7556
7587
|
|
|
7557
7588
|
// src/components/Divider/Divider.tsx
|
|
7558
|
-
var
|
|
7559
|
-
var
|
|
7560
|
-
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`
|
|
7561
7592
|
border-top-color: var(--wui-color-border);
|
|
7562
7593
|
border-top-style: solid;
|
|
7563
7594
|
border-top-width: 1px;
|
|
7564
7595
|
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
7565
7596
|
height: 0;
|
|
7566
7597
|
`;
|
|
7567
|
-
var verticalBorderCss =
|
|
7598
|
+
var verticalBorderCss = import_styled_components40.css`
|
|
7568
7599
|
background-color: var(--wui-color-border);
|
|
7569
7600
|
max-width: 1px;
|
|
7570
7601
|
min-height: 100%;
|
|
7571
7602
|
width: 1px;
|
|
7572
7603
|
`;
|
|
7573
|
-
var DividerComponent =
|
|
7604
|
+
var DividerComponent = import_styled_components40.default.div`
|
|
7574
7605
|
${({ $orientation }) => {
|
|
7575
7606
|
switch ($orientation) {
|
|
7576
7607
|
case "vertical":
|
|
@@ -7585,7 +7616,7 @@ var Divider = ({
|
|
|
7585
7616
|
orientation = "horizontal",
|
|
7586
7617
|
...otherProps
|
|
7587
7618
|
}) => {
|
|
7588
|
-
return /* @__PURE__ */ (0,
|
|
7619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
|
|
7589
7620
|
DividerComponent,
|
|
7590
7621
|
{
|
|
7591
7622
|
$orientation: orientation,
|
|
@@ -7598,15 +7629,15 @@ var Divider = ({
|
|
|
7598
7629
|
Divider.displayName = "Divider";
|
|
7599
7630
|
|
|
7600
7631
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
7601
|
-
var
|
|
7602
|
-
var
|
|
7632
|
+
var import_styled_components44 = __toESM(require("styled-components"));
|
|
7633
|
+
var import_react23 = require("react");
|
|
7603
7634
|
|
|
7604
7635
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
7605
|
-
var
|
|
7606
|
-
var
|
|
7607
|
-
var
|
|
7608
|
-
var VisuallyHidden =
|
|
7609
|
-
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({
|
|
7610
7641
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
7611
7642
|
});
|
|
7612
7643
|
var ScreenReaderOnly = ({
|
|
@@ -7615,26 +7646,26 @@ var ScreenReaderOnly = ({
|
|
|
7615
7646
|
focusable = false,
|
|
7616
7647
|
...otherProps
|
|
7617
7648
|
}) => {
|
|
7618
|
-
const accessibleText = (0,
|
|
7649
|
+
const accessibleText = (0, import_type_guards24.isNotNil)(text) ? text : children;
|
|
7619
7650
|
if (focusable) {
|
|
7620
|
-
return /* @__PURE__ */ (0,
|
|
7651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
7621
7652
|
}
|
|
7622
|
-
return /* @__PURE__ */ (0,
|
|
7653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
7623
7654
|
};
|
|
7624
7655
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
7625
7656
|
|
|
7626
7657
|
// src/components/Tooltip/Tooltip.tsx
|
|
7627
7658
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
7628
|
-
var
|
|
7629
|
-
var
|
|
7630
|
-
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`
|
|
7631
7662
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
7632
7663
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
7633
7664
|
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
7634
7665
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
7635
7666
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
7636
7667
|
`;
|
|
7637
|
-
var StyledContent = (0,
|
|
7668
|
+
var StyledContent = (0, import_styled_components42.default)(import_react_tooltip2.Content)`
|
|
7638
7669
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
7639
7670
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
7640
7671
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -7692,14 +7723,14 @@ var Tooltip = ({
|
|
|
7692
7723
|
if (forceOpen === true) {
|
|
7693
7724
|
rootProps.open = true;
|
|
7694
7725
|
}
|
|
7695
|
-
return /* @__PURE__ */ (0,
|
|
7726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(
|
|
7696
7727
|
import_react_tooltip2.Root,
|
|
7697
7728
|
{
|
|
7698
7729
|
delayDuration: delay,
|
|
7699
7730
|
...rootProps,
|
|
7700
7731
|
children: [
|
|
7701
|
-
/* @__PURE__ */ (0,
|
|
7702
|
-
/* @__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)(
|
|
7703
7734
|
StyledContent,
|
|
7704
7735
|
{
|
|
7705
7736
|
$compact: compact,
|
|
@@ -7707,7 +7738,7 @@ var Tooltip = ({
|
|
|
7707
7738
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
7708
7739
|
children: [
|
|
7709
7740
|
content,
|
|
7710
|
-
!hideArrow ? /* @__PURE__ */ (0,
|
|
7741
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
|
|
7711
7742
|
"svg",
|
|
7712
7743
|
{
|
|
7713
7744
|
fill: "var(--tooltip-bg)",
|
|
@@ -7716,7 +7747,7 @@ var Tooltip = ({
|
|
|
7716
7747
|
viewBox: "0 0 12 8",
|
|
7717
7748
|
width: "12",
|
|
7718
7749
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7719
|
-
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" })
|
|
7720
7751
|
}
|
|
7721
7752
|
) }) : null
|
|
7722
7753
|
]
|
|
@@ -7729,11 +7760,11 @@ var Tooltip = ({
|
|
|
7729
7760
|
Tooltip.displayName = "Tooltip";
|
|
7730
7761
|
|
|
7731
7762
|
// src/components/Input/Input.tsx
|
|
7732
|
-
var
|
|
7733
|
-
var
|
|
7734
|
-
var
|
|
7735
|
-
var
|
|
7736
|
-
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`
|
|
7737
7768
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
7738
7769
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
7739
7770
|
--wui-input-color-border: var(--wui-color-border);
|
|
@@ -7774,7 +7805,7 @@ var inputStyles = import_styled_components41.css`
|
|
|
7774
7805
|
}
|
|
7775
7806
|
}
|
|
7776
7807
|
`;
|
|
7777
|
-
var StyledInputContainer =
|
|
7808
|
+
var StyledInputContainer = import_styled_components43.default.div`
|
|
7778
7809
|
display: inline-flex;
|
|
7779
7810
|
position: relative;
|
|
7780
7811
|
${inputStyles};
|
|
@@ -7818,7 +7849,7 @@ var StyledInputContainer = import_styled_components41.default.div`
|
|
|
7818
7849
|
padding-right: 32px;
|
|
7819
7850
|
}
|
|
7820
7851
|
`;
|
|
7821
|
-
var Input = (0,
|
|
7852
|
+
var Input = (0, import_react22.forwardRef)(
|
|
7822
7853
|
({
|
|
7823
7854
|
fullWidth = false,
|
|
7824
7855
|
monospace = false,
|
|
@@ -7828,27 +7859,27 @@ var Input = (0, import_react21.forwardRef)(
|
|
|
7828
7859
|
rightIcon,
|
|
7829
7860
|
...props
|
|
7830
7861
|
}, externalRef) => {
|
|
7831
|
-
const internalRef = (0,
|
|
7832
|
-
const ref = (0,
|
|
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;
|
|
7833
7864
|
let leftIconToDisplay = leftIcon;
|
|
7834
|
-
if ((0,
|
|
7835
|
-
leftIconToDisplay = /* @__PURE__ */ (0,
|
|
7865
|
+
if ((0, import_type_guards25.isNil)(leftIcon) && type === "search") {
|
|
7866
|
+
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(Icon, { type: "search" });
|
|
7836
7867
|
}
|
|
7837
|
-
if ((0,
|
|
7838
|
-
leftIconToDisplay = (0,
|
|
7868
|
+
if ((0, import_type_guards25.isNotNil)(leftIconToDisplay)) {
|
|
7869
|
+
leftIconToDisplay = (0, import_react22.cloneElement)(leftIconToDisplay, {
|
|
7839
7870
|
size: "md",
|
|
7840
7871
|
className: "wui-input-left-icon"
|
|
7841
7872
|
});
|
|
7842
7873
|
}
|
|
7843
7874
|
let rightIconToDisplay = rightIcon;
|
|
7844
|
-
if ((0,
|
|
7845
|
-
rightIconToDisplay = (0,
|
|
7875
|
+
if ((0, import_type_guards25.isNotNil)(rightIconToDisplay)) {
|
|
7876
|
+
rightIconToDisplay = (0, import_react22.cloneElement)(rightIconToDisplay, {
|
|
7846
7877
|
size: "md",
|
|
7847
7878
|
className: "wui-input-right-icon"
|
|
7848
7879
|
});
|
|
7849
7880
|
}
|
|
7850
7881
|
const handleFocus = (event) => {
|
|
7851
|
-
if ((0,
|
|
7882
|
+
if ((0, import_type_guards25.isNotNil)(props.onFocus)) {
|
|
7852
7883
|
props.onFocus(event);
|
|
7853
7884
|
}
|
|
7854
7885
|
if (autoSelect && isValidRef(ref) && "current" in ref) {
|
|
@@ -7857,21 +7888,21 @@ var Input = (0, import_react21.forwardRef)(
|
|
|
7857
7888
|
});
|
|
7858
7889
|
}
|
|
7859
7890
|
};
|
|
7860
|
-
return /* @__PURE__ */ (0,
|
|
7891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
|
|
7861
7892
|
StyledInputContainer,
|
|
7862
7893
|
{
|
|
7863
7894
|
$fullWidth: fullWidth,
|
|
7864
7895
|
$monospace: monospace,
|
|
7865
7896
|
children: [
|
|
7866
7897
|
leftIconToDisplay ?? null,
|
|
7867
|
-
type === "multiline" ? /* @__PURE__ */ (0,
|
|
7898
|
+
type === "multiline" ? /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
7868
7899
|
"textarea",
|
|
7869
7900
|
{
|
|
7870
7901
|
...props,
|
|
7871
7902
|
ref,
|
|
7872
7903
|
onFocus: handleFocus
|
|
7873
7904
|
}
|
|
7874
|
-
) : /* @__PURE__ */ (0,
|
|
7905
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
7875
7906
|
"input",
|
|
7876
7907
|
{
|
|
7877
7908
|
...props,
|
|
@@ -7889,8 +7920,8 @@ var Input = (0, import_react21.forwardRef)(
|
|
|
7889
7920
|
Input.displayName = "Input";
|
|
7890
7921
|
|
|
7891
7922
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
7892
|
-
var
|
|
7893
|
-
var StyledInput = (0,
|
|
7923
|
+
var import_jsx_runtime187 = require("react/jsx-runtime");
|
|
7924
|
+
var StyledInput = (0, import_styled_components44.default)(Input)`
|
|
7894
7925
|
:not([rows]) {
|
|
7895
7926
|
min-height: unset;
|
|
7896
7927
|
}
|
|
@@ -7910,7 +7941,7 @@ var StyledInput = (0, import_styled_components42.default)(Input)`
|
|
|
7910
7941
|
height: ${({ $height }) => `${$height}px`};
|
|
7911
7942
|
}
|
|
7912
7943
|
`;
|
|
7913
|
-
var editableStyles =
|
|
7944
|
+
var editableStyles = import_styled_components44.css`
|
|
7914
7945
|
&:has(+ :focus-within) {
|
|
7915
7946
|
background: var(--wui-color-bg-surface-hover);
|
|
7916
7947
|
}
|
|
@@ -7920,7 +7951,7 @@ var editableStyles = import_styled_components42.css`
|
|
|
7920
7951
|
cursor: pointer;
|
|
7921
7952
|
}
|
|
7922
7953
|
`;
|
|
7923
|
-
var StyledHeading2 = (0,
|
|
7954
|
+
var StyledHeading2 = (0, import_styled_components44.default)(Heading)`
|
|
7924
7955
|
width: 100%;
|
|
7925
7956
|
border-radius: var(--wui-border-radius-02);
|
|
7926
7957
|
padding: var(--wui-space-02);
|
|
@@ -7937,11 +7968,11 @@ var EditableHeading = ({
|
|
|
7937
7968
|
forceEditing = false,
|
|
7938
7969
|
editingDisabled = false
|
|
7939
7970
|
}) => {
|
|
7940
|
-
const [isEditing, setIsEditing] = (0,
|
|
7941
|
-
const [value, setValue] = (0,
|
|
7942
|
-
const [previousValue, setPreviousValue] = (0,
|
|
7943
|
-
const [headingHeight, setHeadingHeight] = (0,
|
|
7944
|
-
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);
|
|
7945
7976
|
const handleSetEditing = (editing) => {
|
|
7946
7977
|
if (editingDisabled) return;
|
|
7947
7978
|
if (editing && headingRef.current) {
|
|
@@ -7974,7 +8005,7 @@ var EditableHeading = ({
|
|
|
7974
8005
|
handleSetEditing(false);
|
|
7975
8006
|
}
|
|
7976
8007
|
};
|
|
7977
|
-
const HeadingComponent2 = /* @__PURE__ */ (0,
|
|
8008
|
+
const HeadingComponent2 = /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
7978
8009
|
StyledHeading2,
|
|
7979
8010
|
{
|
|
7980
8011
|
ref: headingRef,
|
|
@@ -7988,7 +8019,7 @@ var EditableHeading = ({
|
|
|
7988
8019
|
return HeadingComponent2;
|
|
7989
8020
|
}
|
|
7990
8021
|
if (isEditing || forceEditing) {
|
|
7991
|
-
return /* @__PURE__ */ (0,
|
|
8022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
7992
8023
|
StyledInput,
|
|
7993
8024
|
{
|
|
7994
8025
|
$height: headingHeight,
|
|
@@ -8006,8 +8037,8 @@ var EditableHeading = ({
|
|
|
8006
8037
|
}
|
|
8007
8038
|
);
|
|
8008
8039
|
}
|
|
8009
|
-
return /* @__PURE__ */ (0,
|
|
8010
|
-
/* @__PURE__ */ (0,
|
|
8040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(import_jsx_runtime187.Fragment, { children: [
|
|
8041
|
+
/* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
8011
8042
|
Tooltip,
|
|
8012
8043
|
{
|
|
8013
8044
|
compact: true,
|
|
@@ -8015,7 +8046,7 @@ var EditableHeading = ({
|
|
|
8015
8046
|
children: HeadingComponent2
|
|
8016
8047
|
}
|
|
8017
8048
|
),
|
|
8018
|
-
/* @__PURE__ */ (0,
|
|
8049
|
+
/* @__PURE__ */ (0, import_jsx_runtime187.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
8019
8050
|
"button",
|
|
8020
8051
|
{
|
|
8021
8052
|
"aria-label": ariaLabel,
|
|
@@ -8027,25 +8058,25 @@ var EditableHeading = ({
|
|
|
8027
8058
|
};
|
|
8028
8059
|
|
|
8029
8060
|
// src/components/Form/Form.tsx
|
|
8030
|
-
var
|
|
8031
|
-
var
|
|
8032
|
-
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");
|
|
8033
8064
|
|
|
8034
8065
|
// src/components/Stack/Stack.tsx
|
|
8035
|
-
var
|
|
8036
|
-
var
|
|
8037
|
-
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");
|
|
8038
8069
|
var DEFAULT_ELEMENT4 = "div";
|
|
8039
|
-
var StyledStack =
|
|
8070
|
+
var StyledStack = import_styled_components45.default.div`
|
|
8040
8071
|
display: flex;
|
|
8041
8072
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
8042
8073
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
8043
8074
|
`;
|
|
8044
|
-
var StackComponent = (0,
|
|
8075
|
+
var StackComponent = (0, import_react24.forwardRef)(
|
|
8045
8076
|
({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
|
|
8046
8077
|
const responsiveGap = useResponsiveProp(gap);
|
|
8047
8078
|
const responsiveDirection = useResponsiveProp(direction);
|
|
8048
|
-
return /* @__PURE__ */ (0,
|
|
8079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
|
|
8049
8080
|
StyledStack,
|
|
8050
8081
|
{
|
|
8051
8082
|
ref,
|
|
@@ -8061,29 +8092,29 @@ StackComponent.displayName = "Stack";
|
|
|
8061
8092
|
var Stack = makePolymorphic(StackComponent);
|
|
8062
8093
|
|
|
8063
8094
|
// src/components/Form/Form.tsx
|
|
8064
|
-
var
|
|
8065
|
-
var StyledForm =
|
|
8095
|
+
var import_jsx_runtime189 = require("react/jsx-runtime");
|
|
8096
|
+
var StyledForm = import_styled_components46.default.form`
|
|
8066
8097
|
--form-default-width: 690px;
|
|
8067
8098
|
|
|
8068
8099
|
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
8069
8100
|
align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
|
|
8070
8101
|
`;
|
|
8071
|
-
var FormContext = (0,
|
|
8102
|
+
var FormContext = (0, import_react25.createContext)({
|
|
8072
8103
|
values: {},
|
|
8073
8104
|
errors: {},
|
|
8074
8105
|
hasSubmitted: false,
|
|
8075
8106
|
formId: ""
|
|
8076
8107
|
});
|
|
8077
8108
|
var FormComponent = ({ children, action, values = {}, validate, fullWidth = false, ...props }, forwardedRef) => {
|
|
8078
|
-
const [errors, setErrors] = (0,
|
|
8079
|
-
const [hasSubmitted, setHasSubmitted] = (0,
|
|
8080
|
-
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)();
|
|
8081
8112
|
const ref = forwardedRef ?? innerRef;
|
|
8082
|
-
const autoId = (0,
|
|
8113
|
+
const autoId = (0, import_react25.useId)();
|
|
8083
8114
|
const id = props.id ?? autoId;
|
|
8084
8115
|
const handleValidate = (nextFormData) => {
|
|
8085
8116
|
const nextData = Object.fromEntries(nextFormData.entries());
|
|
8086
|
-
if ((0,
|
|
8117
|
+
if ((0, import_type_guards26.isUndefined)(validate)) {
|
|
8087
8118
|
return {};
|
|
8088
8119
|
}
|
|
8089
8120
|
return validate(nextData);
|
|
@@ -8093,7 +8124,7 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
|
|
|
8093
8124
|
props.onBlur(event);
|
|
8094
8125
|
}
|
|
8095
8126
|
const formData = new FormData(event.currentTarget);
|
|
8096
|
-
if ((0,
|
|
8127
|
+
if ((0, import_type_guards26.isNotUndefined)(validate)) {
|
|
8097
8128
|
handleValidate(formData);
|
|
8098
8129
|
}
|
|
8099
8130
|
};
|
|
@@ -8121,7 +8152,7 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
|
|
|
8121
8152
|
void action(null);
|
|
8122
8153
|
}
|
|
8123
8154
|
};
|
|
8124
|
-
const context = (0,
|
|
8155
|
+
const context = (0, import_react25.useMemo)(() => {
|
|
8125
8156
|
return {
|
|
8126
8157
|
values,
|
|
8127
8158
|
errors,
|
|
@@ -8131,7 +8162,7 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
|
|
|
8131
8162
|
}, [values, errors, id, hasSubmitted]);
|
|
8132
8163
|
return (
|
|
8133
8164
|
// @ts-expect-error - generic context providers are a giant pain
|
|
8134
|
-
/* @__PURE__ */ (0,
|
|
8165
|
+
/* @__PURE__ */ (0, import_jsx_runtime189.jsx)(FormContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
|
|
8135
8166
|
Stack,
|
|
8136
8167
|
{
|
|
8137
8168
|
gap: "space-05",
|
|
@@ -8149,15 +8180,15 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
|
|
|
8149
8180
|
);
|
|
8150
8181
|
};
|
|
8151
8182
|
FormComponent.displayName = "Form";
|
|
8152
|
-
var Form = (0,
|
|
8183
|
+
var Form = (0, import_react25.forwardRef)(FormComponent);
|
|
8153
8184
|
|
|
8154
8185
|
// src/components/Form/useFormState.tsx
|
|
8155
|
-
var
|
|
8186
|
+
var import_react26 = require("react");
|
|
8156
8187
|
var useFormState = (action, initialData = {}) => {
|
|
8157
|
-
const [data, setData] = (0,
|
|
8158
|
-
const [isPending, setIsPending] = (0,
|
|
8159
|
-
const [error, setError] = (0,
|
|
8160
|
-
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)(
|
|
8161
8192
|
async (nextFormData) => {
|
|
8162
8193
|
if (nextFormData === null) {
|
|
8163
8194
|
setData(initialData);
|
|
@@ -8188,23 +8219,23 @@ var useFormState = (action, initialData = {}) => {
|
|
|
8188
8219
|
};
|
|
8189
8220
|
|
|
8190
8221
|
// src/components/Form/FormErrorSummary.tsx
|
|
8191
|
-
var
|
|
8192
|
-
var
|
|
8193
|
-
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");
|
|
8194
8225
|
var ErrorItem = ({ name, error, formId }) => {
|
|
8195
|
-
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);
|
|
8196
8227
|
};
|
|
8197
8228
|
var FormErrorSummary = ({ description }) => {
|
|
8198
|
-
const ref = (0,
|
|
8199
|
-
const { formId, errors, hasSubmitted } = (0,
|
|
8229
|
+
const ref = (0, import_react27.useRef)(null);
|
|
8230
|
+
const { formId, errors, hasSubmitted } = (0, import_react27.useContext)(FormContext);
|
|
8200
8231
|
const isValid = Object.keys(errors).length === 0;
|
|
8201
8232
|
if (isValid || !hasSubmitted) {
|
|
8202
8233
|
return null;
|
|
8203
8234
|
}
|
|
8204
|
-
return /* @__PURE__ */ (0,
|
|
8205
|
-
/* @__PURE__ */ (0,
|
|
8206
|
-
/* @__PURE__ */ (0,
|
|
8207
|
-
([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)(
|
|
8208
8239
|
ErrorItem,
|
|
8209
8240
|
{
|
|
8210
8241
|
error: err,
|
|
@@ -8212,7 +8243,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
8212
8243
|
name
|
|
8213
8244
|
},
|
|
8214
8245
|
err
|
|
8215
|
-
)) : /* @__PURE__ */ (0,
|
|
8246
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
8216
8247
|
ErrorItem,
|
|
8217
8248
|
{
|
|
8218
8249
|
error: error ?? "",
|
|
@@ -8226,33 +8257,33 @@ var FormErrorSummary = ({ description }) => {
|
|
|
8226
8257
|
};
|
|
8227
8258
|
|
|
8228
8259
|
// src/components/FormField/FormField.tsx
|
|
8229
|
-
var
|
|
8230
|
-
var
|
|
8231
|
-
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");
|
|
8232
8263
|
|
|
8233
8264
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
8234
|
-
var
|
|
8265
|
+
var import_react29 = require("react");
|
|
8235
8266
|
|
|
8236
8267
|
// src/components/FormGroup/FormGroup.tsx
|
|
8237
|
-
var
|
|
8238
|
-
var
|
|
8239
|
-
var
|
|
8240
|
-
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`
|
|
8241
8272
|
border: 0;
|
|
8242
8273
|
`;
|
|
8243
|
-
var StyledLegend =
|
|
8274
|
+
var StyledLegend = import_styled_components47.default.legend`
|
|
8244
8275
|
margin-bottom: var(--space-01);
|
|
8245
8276
|
`;
|
|
8246
8277
|
var FormGroup = ({ children, label, ...props }) => {
|
|
8247
|
-
const ref = (0,
|
|
8248
|
-
return /* @__PURE__ */ (0,
|
|
8278
|
+
const ref = (0, import_react28.useRef)();
|
|
8279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(
|
|
8249
8280
|
Stack,
|
|
8250
8281
|
{
|
|
8251
8282
|
...props,
|
|
8252
8283
|
ref,
|
|
8253
8284
|
renderAs: StyledFieldset,
|
|
8254
8285
|
children: [
|
|
8255
|
-
/* @__PURE__ */ (0,
|
|
8286
|
+
/* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
8256
8287
|
Heading,
|
|
8257
8288
|
{
|
|
8258
8289
|
renderAs: StyledLegend,
|
|
@@ -8268,8 +8299,8 @@ var FormGroup = ({ children, label, ...props }) => {
|
|
|
8268
8299
|
FormGroup.displayName = "FormGroup";
|
|
8269
8300
|
|
|
8270
8301
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
8271
|
-
var
|
|
8272
|
-
var CheckboxGroupContext = (0,
|
|
8302
|
+
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
8303
|
+
var CheckboxGroupContext = (0, import_react29.createContext)(null);
|
|
8273
8304
|
var CheckboxGroup = ({
|
|
8274
8305
|
children,
|
|
8275
8306
|
name,
|
|
@@ -8277,19 +8308,19 @@ var CheckboxGroup = ({
|
|
|
8277
8308
|
value,
|
|
8278
8309
|
...props
|
|
8279
8310
|
}) => {
|
|
8280
|
-
const context = (0,
|
|
8311
|
+
const context = (0, import_react29.useMemo)(() => {
|
|
8281
8312
|
return {
|
|
8282
8313
|
name,
|
|
8283
8314
|
onChange
|
|
8284
8315
|
};
|
|
8285
8316
|
}, [name, onChange]);
|
|
8286
|
-
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 }) });
|
|
8287
8318
|
};
|
|
8288
8319
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
8289
8320
|
|
|
8290
8321
|
// src/components/FormField/FormField.tsx
|
|
8291
|
-
var
|
|
8292
|
-
var StyledFormField =
|
|
8322
|
+
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
8323
|
+
var StyledFormField = import_styled_components48.default.div`
|
|
8293
8324
|
--form-field-spacing: var(--wui-space-01);
|
|
8294
8325
|
--form-field-error-color: var(--wui-color-text-secondary-error);
|
|
8295
8326
|
|
|
@@ -8297,7 +8328,7 @@ var StyledFormField = import_styled_components46.default.div`
|
|
|
8297
8328
|
flex-direction: column;
|
|
8298
8329
|
gap: var(--form-field-spacing);
|
|
8299
8330
|
`;
|
|
8300
|
-
var StyledErrorList =
|
|
8331
|
+
var StyledErrorList = import_styled_components48.default.ul`
|
|
8301
8332
|
margin: 0;
|
|
8302
8333
|
padding: 0;
|
|
8303
8334
|
padding-left: var(--wui-space-04);
|
|
@@ -8306,8 +8337,8 @@ var StyledErrorList = import_styled_components46.default.ul`
|
|
|
8306
8337
|
gap: var(--wui-space-01);
|
|
8307
8338
|
`;
|
|
8308
8339
|
var ErrorMessages = ({ errors, id }) => {
|
|
8309
|
-
const isMultipleErrors = (0,
|
|
8310
|
-
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)(
|
|
8311
8342
|
Text,
|
|
8312
8343
|
{
|
|
8313
8344
|
colorScheme: "error",
|
|
@@ -8317,7 +8348,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
8317
8348
|
children: error
|
|
8318
8349
|
},
|
|
8319
8350
|
`${id}-${index}`
|
|
8320
|
-
)) }) : /* @__PURE__ */ (0,
|
|
8351
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
|
|
8321
8352
|
Text,
|
|
8322
8353
|
{
|
|
8323
8354
|
colorScheme: "error",
|
|
@@ -8337,8 +8368,8 @@ var FormField = ({
|
|
|
8337
8368
|
value,
|
|
8338
8369
|
...props
|
|
8339
8370
|
}) => {
|
|
8340
|
-
const formState = (0,
|
|
8341
|
-
const checkboxGroup = (0,
|
|
8371
|
+
const formState = (0, import_react30.useContext)(FormContext);
|
|
8372
|
+
const checkboxGroup = (0, import_react30.useContext)(CheckboxGroupContext);
|
|
8342
8373
|
const id = props.id ?? `${formState.formId}-${name}`;
|
|
8343
8374
|
const isInlineLabel = children.type === Checkbox;
|
|
8344
8375
|
const computedError = error ?? formState.errors[name];
|
|
@@ -8349,19 +8380,19 @@ var FormField = ({
|
|
|
8349
8380
|
label: isInlineLabel ? label : void 0,
|
|
8350
8381
|
...props
|
|
8351
8382
|
};
|
|
8352
|
-
if ((0,
|
|
8383
|
+
if ((0, import_type_guards28.isUndefined)(value) && (0, import_type_guards28.isNotUndefined)(defaultValue)) {
|
|
8353
8384
|
childProps = {
|
|
8354
8385
|
...childProps,
|
|
8355
8386
|
defaultValue
|
|
8356
8387
|
};
|
|
8357
8388
|
}
|
|
8358
|
-
if ((0,
|
|
8359
|
-
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;
|
|
8360
8391
|
const handleChange = (event) => {
|
|
8361
|
-
if ((0,
|
|
8392
|
+
if ((0, import_type_guards28.isNotUndefined)(props.onChange)) {
|
|
8362
8393
|
props.onChange(event);
|
|
8363
8394
|
}
|
|
8364
|
-
if ((0,
|
|
8395
|
+
if ((0, import_type_guards28.isNotUndefined)(checkboxGroup.onChange)) {
|
|
8365
8396
|
checkboxGroup.onChange(event);
|
|
8366
8397
|
}
|
|
8367
8398
|
};
|
|
@@ -8369,15 +8400,15 @@ var FormField = ({
|
|
|
8369
8400
|
...childProps,
|
|
8370
8401
|
name: computedName,
|
|
8371
8402
|
onChange: handleChange,
|
|
8372
|
-
"aria-invalid": (0,
|
|
8373
|
-
"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
|
|
8374
8405
|
};
|
|
8375
8406
|
}
|
|
8376
|
-
|
|
8377
|
-
return /* @__PURE__ */ (0,
|
|
8378
|
-
!isInlineLabel && /* @__PURE__ */ (0,
|
|
8379
|
-
(0,
|
|
8380
|
-
(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)(
|
|
8381
8412
|
ErrorMessages,
|
|
8382
8413
|
{
|
|
8383
8414
|
errors: computedError,
|
|
@@ -8389,9 +8420,9 @@ var FormField = ({
|
|
|
8389
8420
|
FormField.displayName = "FormField";
|
|
8390
8421
|
|
|
8391
8422
|
// src/components/FormGroup/RadioGroup.tsx
|
|
8392
|
-
var
|
|
8393
|
-
var
|
|
8394
|
-
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);
|
|
8395
8426
|
var RadioGroup = ({
|
|
8396
8427
|
children,
|
|
8397
8428
|
name,
|
|
@@ -8399,21 +8430,21 @@ var RadioGroup = ({
|
|
|
8399
8430
|
value,
|
|
8400
8431
|
...props
|
|
8401
8432
|
}) => {
|
|
8402
|
-
const context = (0,
|
|
8433
|
+
const context = (0, import_react31.useMemo)(() => {
|
|
8403
8434
|
return {
|
|
8404
8435
|
name,
|
|
8405
8436
|
onChange
|
|
8406
8437
|
};
|
|
8407
8438
|
}, [name, onChange]);
|
|
8408
|
-
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 }) });
|
|
8409
8440
|
};
|
|
8410
8441
|
RadioGroup.displayName = "RadioGroup";
|
|
8411
8442
|
|
|
8412
8443
|
// src/components/IconButton/IconButton.tsx
|
|
8413
|
-
var
|
|
8414
|
-
var
|
|
8415
|
-
var
|
|
8416
|
-
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)`
|
|
8417
8448
|
--icon-button-size-sm: 24px;
|
|
8418
8449
|
--icon-button-size-md: 32px;
|
|
8419
8450
|
--icon-button-size-lg: 40px;
|
|
@@ -8427,10 +8458,10 @@ var StyledButton2 = (0, import_styled_components47.default)(Button)`
|
|
|
8427
8458
|
align-items: center;
|
|
8428
8459
|
line-height: 1;
|
|
8429
8460
|
`;
|
|
8430
|
-
var IconButton = (0,
|
|
8461
|
+
var IconButton = (0, import_react32.forwardRef)(
|
|
8431
8462
|
({ children, label, size = "md", ...props }, ref) => {
|
|
8432
8463
|
const responsiveSize = useResponsiveProp(size);
|
|
8433
|
-
return /* @__PURE__ */ (0,
|
|
8464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
|
|
8434
8465
|
StyledButton2,
|
|
8435
8466
|
{
|
|
8436
8467
|
...props,
|
|
@@ -8438,7 +8469,7 @@ var IconButton = (0, import_react31.forwardRef)(
|
|
|
8438
8469
|
"aria-label": label,
|
|
8439
8470
|
"data-wistia-ui-icon-button": true,
|
|
8440
8471
|
size: responsiveSize,
|
|
8441
|
-
children: (0,
|
|
8472
|
+
children: (0, import_react32.cloneElement)(import_react32.Children.only(children), {
|
|
8442
8473
|
size: responsiveSize
|
|
8443
8474
|
})
|
|
8444
8475
|
}
|
|
@@ -8448,19 +8479,19 @@ var IconButton = (0, import_react31.forwardRef)(
|
|
|
8448
8479
|
IconButton.displayName = "IconButton";
|
|
8449
8480
|
|
|
8450
8481
|
// src/components/Menu/Menu.tsx
|
|
8451
|
-
var
|
|
8482
|
+
var import_styled_components50 = __toESM(require("styled-components"));
|
|
8452
8483
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
8453
|
-
var
|
|
8454
|
-
var
|
|
8484
|
+
var import_type_guards29 = require("@wistia/type-guards");
|
|
8485
|
+
var import_react34 = require("react");
|
|
8455
8486
|
|
|
8456
8487
|
// src/components/Menu/MenuContext.tsx
|
|
8457
|
-
var
|
|
8458
|
-
var MenuContext = (0,
|
|
8459
|
-
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);
|
|
8460
8491
|
|
|
8461
8492
|
// src/components/Menu/Menu.tsx
|
|
8462
|
-
var
|
|
8463
|
-
var open =
|
|
8493
|
+
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
8494
|
+
var open = import_styled_components50.keyframes`
|
|
8464
8495
|
from {
|
|
8465
8496
|
opacity: 0;
|
|
8466
8497
|
transform: scale(.97) translateY(-8px);
|
|
@@ -8470,7 +8501,7 @@ var open = import_styled_components48.keyframes`
|
|
|
8470
8501
|
transform: scale(1);
|
|
8471
8502
|
}
|
|
8472
8503
|
`;
|
|
8473
|
-
var close =
|
|
8504
|
+
var close = import_styled_components50.keyframes`
|
|
8474
8505
|
from {
|
|
8475
8506
|
opacity: 1;
|
|
8476
8507
|
transform: scale(1);
|
|
@@ -8480,7 +8511,7 @@ var close = import_styled_components48.keyframes`
|
|
|
8480
8511
|
transform: scale(.97) translateY(-8px);
|
|
8481
8512
|
}
|
|
8482
8513
|
`;
|
|
8483
|
-
var menuItemCss =
|
|
8514
|
+
var menuItemCss = import_styled_components50.css`
|
|
8484
8515
|
--menu-label-description-gap: var(--wui-space-01);
|
|
8485
8516
|
--menu-item-inner-gap: var(--wui-space-03);
|
|
8486
8517
|
--menu-item-left-icon-size: 24px;
|
|
@@ -8491,7 +8522,7 @@ var menuItemCss = import_styled_components48.css`
|
|
|
8491
8522
|
--menu-label-line-height: var(--wui-typography-label-3-line-height);
|
|
8492
8523
|
--menu-divider-margin: var(--wui-space-02);
|
|
8493
8524
|
`;
|
|
8494
|
-
var compactMenuItemCss =
|
|
8525
|
+
var compactMenuItemCss = import_styled_components50.css`
|
|
8495
8526
|
--menu-label-description-gap: 0;
|
|
8496
8527
|
--menu-item-inner-gap: var(--wui-space-02);
|
|
8497
8528
|
--menu-item-left-icon-size: 16px;
|
|
@@ -8502,7 +8533,7 @@ var compactMenuItemCss = import_styled_components48.css`
|
|
|
8502
8533
|
--menu-label-line-height: var(--wui-typography-label-4-line-height);
|
|
8503
8534
|
--menu-divider-margin: var(--wui-space-01);
|
|
8504
8535
|
`;
|
|
8505
|
-
var menuContentCss =
|
|
8536
|
+
var menuContentCss = import_styled_components50.css`
|
|
8506
8537
|
--menu-font-family: var(--wui-typography-family-default);
|
|
8507
8538
|
--menu-bg: var(--wui-color-bg-surface);
|
|
8508
8539
|
--menu-shadow: var(--wui-elevation-01);
|
|
@@ -8544,7 +8575,7 @@ var menuContentCss = import_styled_components48.css`
|
|
|
8544
8575
|
margin: var(--menu-divider-margin) 0;
|
|
8545
8576
|
}
|
|
8546
8577
|
`;
|
|
8547
|
-
var MenuContent = (0,
|
|
8578
|
+
var MenuContent = (0, import_styled_components50.default)(import_react_dropdown_menu.DropdownMenuContent)`
|
|
8548
8579
|
${menuContentCss}
|
|
8549
8580
|
`;
|
|
8550
8581
|
var Menu = ({
|
|
@@ -8560,9 +8591,9 @@ var Menu = ({
|
|
|
8560
8591
|
onInteractOutside,
|
|
8561
8592
|
...props
|
|
8562
8593
|
}) => {
|
|
8563
|
-
const contextValue = (0,
|
|
8594
|
+
const contextValue = (0, import_react34.useMemo)(() => ({ compact }), [compact]);
|
|
8564
8595
|
let controlProps = {
|
|
8565
|
-
...(0,
|
|
8596
|
+
...(0, import_type_guards29.isNotNil)(onOpenChange) && (0, import_type_guards29.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
8566
8597
|
};
|
|
8567
8598
|
if (disabled) {
|
|
8568
8599
|
controlProps = {
|
|
@@ -8570,24 +8601,24 @@ var Menu = ({
|
|
|
8570
8601
|
onOpenChange: () => null
|
|
8571
8602
|
};
|
|
8572
8603
|
}
|
|
8573
|
-
return /* @__PURE__ */ (0,
|
|
8604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(
|
|
8574
8605
|
import_react_dropdown_menu.DropdownMenu,
|
|
8575
8606
|
{
|
|
8576
8607
|
modal: false,
|
|
8577
8608
|
...controlProps,
|
|
8578
8609
|
children: [
|
|
8579
|
-
/* @__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)(
|
|
8580
8611
|
Button,
|
|
8581
8612
|
{
|
|
8582
8613
|
"aria-expanded": isOpen,
|
|
8583
8614
|
disabled,
|
|
8584
8615
|
forceState: isOpen ? "active" : void 0,
|
|
8585
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
8616
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(Icon, { type: "caret-down" }),
|
|
8586
8617
|
...triggerProps,
|
|
8587
8618
|
children: label
|
|
8588
8619
|
}
|
|
8589
8620
|
) }),
|
|
8590
|
-
/* @__PURE__ */ (0,
|
|
8621
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsx)(import_react_dropdown_menu.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
8591
8622
|
MenuContent,
|
|
8592
8623
|
{
|
|
8593
8624
|
...props,
|
|
@@ -8607,19 +8638,19 @@ var Menu = ({
|
|
|
8607
8638
|
Menu.displayName = "Menu";
|
|
8608
8639
|
|
|
8609
8640
|
// src/components/Menu/MenuLabel.tsx
|
|
8610
|
-
var
|
|
8641
|
+
var import_styled_components51 = __toESM(require("styled-components"));
|
|
8611
8642
|
var import_react_dropdown_menu2 = require("@radix-ui/react-dropdown-menu");
|
|
8612
|
-
var
|
|
8613
|
-
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)`
|
|
8614
8645
|
padding: var(--wui-space-02);
|
|
8615
8646
|
`;
|
|
8616
8647
|
var MenuLabel = ({ children, ...props }) => {
|
|
8617
|
-
return /* @__PURE__ */ (0,
|
|
8648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
8618
8649
|
StyledMenuLabel,
|
|
8619
8650
|
{
|
|
8620
8651
|
asChild: true,
|
|
8621
8652
|
...props,
|
|
8622
|
-
children: /* @__PURE__ */ (0,
|
|
8653
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
8623
8654
|
Heading,
|
|
8624
8655
|
{
|
|
8625
8656
|
renderAs: "span",
|
|
@@ -8634,17 +8665,17 @@ var MenuLabel = ({ children, ...props }) => {
|
|
|
8634
8665
|
MenuLabel.displayName = "MenuLabel";
|
|
8635
8666
|
|
|
8636
8667
|
// src/components/Menu/SubMenu.tsx
|
|
8637
|
-
var
|
|
8638
|
-
var
|
|
8668
|
+
var import_react36 = require("react");
|
|
8669
|
+
var import_styled_components54 = __toESM(require("styled-components"));
|
|
8639
8670
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
8640
|
-
var
|
|
8671
|
+
var import_type_guards31 = require("@wistia/type-guards");
|
|
8641
8672
|
|
|
8642
8673
|
// src/components/Menu/MenuItemButton.tsx
|
|
8643
|
-
var
|
|
8644
|
-
var
|
|
8645
|
-
var
|
|
8646
|
-
var
|
|
8647
|
-
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)`
|
|
8648
8679
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
8649
8680
|
|
|
8650
8681
|
display: flex;
|
|
@@ -8683,7 +8714,7 @@ var StyledButton3 = (0, import_styled_components50.default)(Button)`
|
|
|
8683
8714
|
padding-left: var(--wui-space-04);
|
|
8684
8715
|
}
|
|
8685
8716
|
`;
|
|
8686
|
-
var StyledLeftIconContainer =
|
|
8717
|
+
var StyledLeftIconContainer = import_styled_components52.default.div`
|
|
8687
8718
|
height: var(--menu-item-left-icon-size);
|
|
8688
8719
|
width: var(--menu-item-left-icon-size);
|
|
8689
8720
|
|
|
@@ -8694,7 +8725,7 @@ var StyledLeftIconContainer = import_styled_components50.default.div`
|
|
|
8694
8725
|
}
|
|
8695
8726
|
}
|
|
8696
8727
|
`;
|
|
8697
|
-
var StyledRightIconContainer =
|
|
8728
|
+
var StyledRightIconContainer = import_styled_components52.default.div`
|
|
8698
8729
|
height: var(--menu-item-right-icon-size);
|
|
8699
8730
|
width: var(--menu-item-right-icon-size);
|
|
8700
8731
|
|
|
@@ -8705,28 +8736,28 @@ var StyledRightIconContainer = import_styled_components50.default.div`
|
|
|
8705
8736
|
}
|
|
8706
8737
|
}
|
|
8707
8738
|
`;
|
|
8708
|
-
var StyledLabelAndDescriptionContainer =
|
|
8739
|
+
var StyledLabelAndDescriptionContainer = import_styled_components52.default.div`
|
|
8709
8740
|
display: flex;
|
|
8710
8741
|
flex-direction: column;
|
|
8711
8742
|
gap: var(--menu-label-description-gap);
|
|
8712
8743
|
flex-basis: 100%;
|
|
8713
8744
|
`;
|
|
8714
|
-
var StyledBadgeContainer =
|
|
8745
|
+
var StyledBadgeContainer = import_styled_components52.default.div`
|
|
8715
8746
|
align-self: start;
|
|
8716
8747
|
justify-self: end;
|
|
8717
8748
|
font-size: var(--wui-typography-label-4-size);
|
|
8718
8749
|
color: var(--wui-color-text-secondary);
|
|
8719
8750
|
`;
|
|
8720
|
-
var MenuItemButton = (0,
|
|
8751
|
+
var MenuItemButton = (0, import_react35.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
8721
8752
|
let { colorScheme, badge } = props;
|
|
8722
8753
|
if (appearance === "dangerous") {
|
|
8723
|
-
if ((0,
|
|
8754
|
+
if ((0, import_type_guards30.isNotUndefined)(colorScheme)) {
|
|
8724
8755
|
console.warn("colorScheme prop is ignored when appearance is dangerous");
|
|
8725
8756
|
}
|
|
8726
8757
|
colorScheme = "error";
|
|
8727
8758
|
}
|
|
8728
8759
|
if (appearance === "gated") {
|
|
8729
|
-
badge = /* @__PURE__ */ (0,
|
|
8760
|
+
badge = /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
8730
8761
|
Icon,
|
|
8731
8762
|
{
|
|
8732
8763
|
colorScheme: "purple",
|
|
@@ -8738,7 +8769,7 @@ var MenuItemButton = (0, import_react34.forwardRef)(({ children, appearance, com
|
|
|
8738
8769
|
}
|
|
8739
8770
|
);
|
|
8740
8771
|
}
|
|
8741
|
-
return /* @__PURE__ */ (0,
|
|
8772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
|
|
8742
8773
|
StyledButton3,
|
|
8743
8774
|
{
|
|
8744
8775
|
...props,
|
|
@@ -8748,10 +8779,10 @@ var MenuItemButton = (0, import_react34.forwardRef)(({ children, appearance, com
|
|
|
8748
8779
|
fullWidth: true,
|
|
8749
8780
|
unstyled: true,
|
|
8750
8781
|
children: [
|
|
8751
|
-
props.leftIcon ? /* @__PURE__ */ (0,
|
|
8752
|
-
/* @__PURE__ */ (0,
|
|
8753
|
-
(0,
|
|
8754
|
-
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
|
|
8755
8786
|
]
|
|
8756
8787
|
}
|
|
8757
8788
|
);
|
|
@@ -8759,33 +8790,33 @@ var MenuItemButton = (0, import_react34.forwardRef)(({ children, appearance, com
|
|
|
8759
8790
|
MenuItemButton.displayName = "MenuItemButton";
|
|
8760
8791
|
|
|
8761
8792
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
8762
|
-
var
|
|
8763
|
-
var
|
|
8764
|
-
var StyledMenuItemLabel =
|
|
8765
|
-
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({
|
|
8766
8797
|
variant: "body4",
|
|
8767
8798
|
prominence: "secondary"
|
|
8768
8799
|
})``;
|
|
8769
8800
|
var MenuItemLabel = ({ children }) => {
|
|
8770
|
-
return /* @__PURE__ */ (0,
|
|
8801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(StyledMenuItemLabel, { children });
|
|
8771
8802
|
};
|
|
8772
8803
|
var MenuItemDescription = ({ children }) => {
|
|
8773
|
-
return /* @__PURE__ */ (0,
|
|
8804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(StyledMenuItemDescription, { children });
|
|
8774
8805
|
};
|
|
8775
8806
|
|
|
8776
8807
|
// src/components/Menu/SubMenu.tsx
|
|
8777
|
-
var
|
|
8778
|
-
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)`
|
|
8779
8810
|
${menuContentCss}
|
|
8780
8811
|
|
|
8781
8812
|
${mq.smAndDown} {
|
|
8782
8813
|
transform: translateX(-100%) !important;
|
|
8783
8814
|
}
|
|
8784
8815
|
`;
|
|
8785
|
-
var StyledMobileSubMenuItems =
|
|
8816
|
+
var StyledMobileSubMenuItems = import_styled_components54.default.div`
|
|
8786
8817
|
margin-left: var(--wui-space-04);
|
|
8787
8818
|
`;
|
|
8788
|
-
var StyledSubTrigger = (0,
|
|
8819
|
+
var StyledSubTrigger = (0, import_styled_components54.default)(import_react_dropdown_menu3.DropdownMenuSubTrigger)`
|
|
8789
8820
|
outline: none;
|
|
8790
8821
|
|
|
8791
8822
|
&[data-state='open'],
|
|
@@ -8795,12 +8826,12 @@ var StyledSubTrigger = (0, import_styled_components52.default)(import_react_drop
|
|
|
8795
8826
|
`;
|
|
8796
8827
|
var SubMenuTrigger = (props) => {
|
|
8797
8828
|
const { isSmAndUp } = useMq();
|
|
8798
|
-
const
|
|
8799
|
-
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)(
|
|
8800
8831
|
MenuItemButton,
|
|
8801
8832
|
{
|
|
8802
8833
|
...props,
|
|
8803
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
8834
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Icon, { type: "caret-right" })
|
|
8804
8835
|
}
|
|
8805
8836
|
) });
|
|
8806
8837
|
};
|
|
@@ -8812,16 +8843,16 @@ var SubMenu = ({
|
|
|
8812
8843
|
...props
|
|
8813
8844
|
}) => {
|
|
8814
8845
|
const { isSmAndUp } = useMq();
|
|
8815
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
8846
|
+
const [isExpanded, setIsExpanded] = (0, import_react36.useState)(false);
|
|
8816
8847
|
const { compact } = useMenuContext();
|
|
8817
|
-
return isSmAndUp ? /* @__PURE__ */ (0,
|
|
8818
|
-
/* @__PURE__ */ (0,
|
|
8819
|
-
/* @__PURE__ */ (0,
|
|
8820
|
-
(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
|
|
8821
8852
|
] }),
|
|
8822
|
-
/* @__PURE__ */ (0,
|
|
8823
|
-
] }) : /* @__PURE__ */ (0,
|
|
8824
|
-
/* @__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)(
|
|
8825
8856
|
SubMenuTrigger,
|
|
8826
8857
|
{
|
|
8827
8858
|
...props,
|
|
@@ -8830,28 +8861,28 @@ var SubMenu = ({
|
|
|
8830
8861
|
setIsExpanded((prev) => !prev);
|
|
8831
8862
|
},
|
|
8832
8863
|
children: [
|
|
8833
|
-
/* @__PURE__ */ (0,
|
|
8834
|
-
/* @__PURE__ */ (0,
|
|
8864
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(MenuItemLabel, { children: label }),
|
|
8865
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(MenuItemDescription, { children: description })
|
|
8835
8866
|
]
|
|
8836
8867
|
}
|
|
8837
8868
|
),
|
|
8838
|
-
/* @__PURE__ */ (0,
|
|
8869
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
8839
8870
|
] });
|
|
8840
8871
|
};
|
|
8841
8872
|
SubMenu.displayName = "SubMenu";
|
|
8842
8873
|
|
|
8843
8874
|
// src/components/Menu/MenuItem.tsx
|
|
8844
|
-
var
|
|
8875
|
+
var import_react37 = require("react");
|
|
8845
8876
|
var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
|
|
8846
|
-
var
|
|
8847
|
-
var MenuItem = (0,
|
|
8877
|
+
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
8878
|
+
var MenuItem = (0, import_react37.forwardRef)(
|
|
8848
8879
|
({ onSelect = () => null, ...props }, ref) => {
|
|
8849
|
-
return /* @__PURE__ */ (0,
|
|
8880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
8850
8881
|
import_react_dropdown_menu4.DropdownMenuItem,
|
|
8851
8882
|
{
|
|
8852
8883
|
asChild: true,
|
|
8853
8884
|
onSelect,
|
|
8854
|
-
children: /* @__PURE__ */ (0,
|
|
8885
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
8855
8886
|
MenuItemButton,
|
|
8856
8887
|
{
|
|
8857
8888
|
...props,
|
|
@@ -8867,10 +8898,10 @@ MenuItem.displayName = "MenuItem";
|
|
|
8867
8898
|
|
|
8868
8899
|
// src/components/Menu/MenuRadioGroup.tsx
|
|
8869
8900
|
var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
|
|
8870
|
-
var
|
|
8901
|
+
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
8871
8902
|
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
8872
|
-
return /* @__PURE__ */ (0,
|
|
8873
|
-
/* @__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 }),
|
|
8874
8905
|
children
|
|
8875
8906
|
] });
|
|
8876
8907
|
};
|
|
@@ -8878,11 +8909,11 @@ MenuRadioGroup.displayName = "MenuRadioGroup";
|
|
|
8878
8909
|
|
|
8879
8910
|
// src/components/Menu/RadioMenuItem.tsx
|
|
8880
8911
|
var import_react_dropdown_menu6 = require("@radix-ui/react-dropdown-menu");
|
|
8881
|
-
var
|
|
8912
|
+
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
8882
8913
|
var RadioMenuItem = ({
|
|
8883
8914
|
onSelect,
|
|
8884
8915
|
value,
|
|
8885
|
-
indicator = /* @__PURE__ */ (0,
|
|
8916
|
+
indicator = /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
8886
8917
|
Icon,
|
|
8887
8918
|
{
|
|
8888
8919
|
size: "sm",
|
|
@@ -8892,17 +8923,17 @@ var RadioMenuItem = ({
|
|
|
8892
8923
|
...props
|
|
8893
8924
|
}) => {
|
|
8894
8925
|
const extraProps = onSelect ? { onSelect } : {};
|
|
8895
|
-
return /* @__PURE__ */ (0,
|
|
8926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
8896
8927
|
import_react_dropdown_menu6.DropdownMenuRadioItem,
|
|
8897
8928
|
{
|
|
8898
8929
|
...extraProps,
|
|
8899
8930
|
asChild: true,
|
|
8900
8931
|
value,
|
|
8901
|
-
children: /* @__PURE__ */ (0,
|
|
8932
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
8902
8933
|
MenuItemButton,
|
|
8903
8934
|
{
|
|
8904
8935
|
...props,
|
|
8905
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
8936
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(import_react_dropdown_menu6.DropdownMenuItemIndicator, { children: indicator })
|
|
8906
8937
|
}
|
|
8907
8938
|
)
|
|
8908
8939
|
}
|
|
@@ -8912,9 +8943,9 @@ RadioMenuItem.displayName = "RadioMenuItem";
|
|
|
8912
8943
|
|
|
8913
8944
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
8914
8945
|
var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
|
|
8915
|
-
var
|
|
8946
|
+
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
8916
8947
|
var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
8917
|
-
return checked ? /* @__PURE__ */ (0,
|
|
8948
|
+
return checked ? /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(
|
|
8918
8949
|
"svg",
|
|
8919
8950
|
{
|
|
8920
8951
|
...props,
|
|
@@ -8924,14 +8955,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
8924
8955
|
width: "24",
|
|
8925
8956
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8926
8957
|
children: [
|
|
8927
|
-
/* @__PURE__ */ (0,
|
|
8958
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8928
8959
|
"path",
|
|
8929
8960
|
{
|
|
8930
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",
|
|
8931
8962
|
fill: "#2949e5"
|
|
8932
8963
|
}
|
|
8933
8964
|
),
|
|
8934
|
-
/* @__PURE__ */ (0,
|
|
8965
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8935
8966
|
"path",
|
|
8936
8967
|
{
|
|
8937
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",
|
|
@@ -8940,7 +8971,7 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
8940
8971
|
)
|
|
8941
8972
|
]
|
|
8942
8973
|
}
|
|
8943
|
-
) : /* @__PURE__ */ (0,
|
|
8974
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(
|
|
8944
8975
|
"svg",
|
|
8945
8976
|
{
|
|
8946
8977
|
...props,
|
|
@@ -8950,14 +8981,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
8950
8981
|
width: "24",
|
|
8951
8982
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8952
8983
|
children: [
|
|
8953
|
-
/* @__PURE__ */ (0,
|
|
8984
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8954
8985
|
"path",
|
|
8955
8986
|
{
|
|
8956
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",
|
|
8957
8988
|
fill: "#fcfcfd"
|
|
8958
8989
|
}
|
|
8959
8990
|
),
|
|
8960
|
-
/* @__PURE__ */ (0,
|
|
8991
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8961
8992
|
"path",
|
|
8962
8993
|
{
|
|
8963
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",
|
|
@@ -8974,18 +9005,18 @@ var CheckboxMenuItem = ({
|
|
|
8974
9005
|
onCheckedChange,
|
|
8975
9006
|
...props
|
|
8976
9007
|
}) => {
|
|
8977
|
-
return /* @__PURE__ */ (0,
|
|
9008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8978
9009
|
import_react_dropdown_menu7.DropdownMenuCheckboxItem,
|
|
8979
9010
|
{
|
|
8980
9011
|
asChild: true,
|
|
8981
9012
|
checked,
|
|
8982
9013
|
onCheckedChange,
|
|
8983
9014
|
onSelect,
|
|
8984
|
-
children: /* @__PURE__ */ (0,
|
|
9015
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
8985
9016
|
MenuItemButton,
|
|
8986
9017
|
{
|
|
8987
9018
|
...props,
|
|
8988
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
9019
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(CheckboxIndicator2, { checked })
|
|
8989
9020
|
}
|
|
8990
9021
|
)
|
|
8991
9022
|
}
|
|
@@ -8994,37 +9025,37 @@ var CheckboxMenuItem = ({
|
|
|
8994
9025
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
8995
9026
|
|
|
8996
9027
|
// src/components/Modal/Modal.tsx
|
|
8997
|
-
var
|
|
8998
|
-
var
|
|
9028
|
+
var import_react41 = require("react");
|
|
9029
|
+
var import_styled_components59 = __toESM(require("styled-components"));
|
|
8999
9030
|
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
9000
|
-
var
|
|
9031
|
+
var import_type_guards33 = require("@wistia/type-guards");
|
|
9001
9032
|
|
|
9002
9033
|
// src/components/Modal/ModalHeader.tsx
|
|
9003
|
-
var
|
|
9034
|
+
var import_styled_components56 = __toESM(require("styled-components"));
|
|
9004
9035
|
var import_react_dialog2 = require("@radix-ui/react-dialog");
|
|
9005
9036
|
|
|
9006
9037
|
// src/components/Modal/ModalCloseButton.tsx
|
|
9007
|
-
var
|
|
9038
|
+
var import_styled_components55 = __toESM(require("styled-components"));
|
|
9008
9039
|
var import_react_dialog = require("@radix-ui/react-dialog");
|
|
9009
|
-
var
|
|
9010
|
-
var CloseButton = (0,
|
|
9040
|
+
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
9041
|
+
var CloseButton = (0, import_styled_components55.default)(import_react_dialog.Close)`
|
|
9011
9042
|
align-self: start;
|
|
9012
9043
|
`;
|
|
9013
9044
|
var ModalCloseButton = () => {
|
|
9014
|
-
return /* @__PURE__ */ (0,
|
|
9045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(CloseButton, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
9015
9046
|
IconButton,
|
|
9016
9047
|
{
|
|
9017
9048
|
label: "Dismiss modal",
|
|
9018
9049
|
size: "sm",
|
|
9019
9050
|
variant: "ghost",
|
|
9020
|
-
children: /* @__PURE__ */ (0,
|
|
9051
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(Icon, { type: "close" })
|
|
9021
9052
|
}
|
|
9022
9053
|
) });
|
|
9023
9054
|
};
|
|
9024
9055
|
|
|
9025
9056
|
// src/components/Modal/ModalHeader.tsx
|
|
9026
|
-
var
|
|
9027
|
-
var Header =
|
|
9057
|
+
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
9058
|
+
var Header = import_styled_components56.default.header`
|
|
9028
9059
|
display: flex;
|
|
9029
9060
|
order: 1;
|
|
9030
9061
|
gap: var(--wui-space-01);
|
|
@@ -9036,7 +9067,7 @@ var Header = import_styled_components54.default.header`
|
|
|
9036
9067
|
margin-top: 0;
|
|
9037
9068
|
}
|
|
9038
9069
|
`;
|
|
9039
|
-
var Title = (0,
|
|
9070
|
+
var Title = (0, import_styled_components56.default)(import_react_dialog2.Title)`
|
|
9040
9071
|
font-family: var(--wui-typography-heading-2-family);
|
|
9041
9072
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
9042
9073
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -9048,28 +9079,28 @@ var ModalHeader = ({
|
|
|
9048
9079
|
hideCloseButton
|
|
9049
9080
|
}) => {
|
|
9050
9081
|
const TitleWrapper = hideTitle ? ScreenReaderOnly : Title;
|
|
9051
|
-
return /* @__PURE__ */ (0,
|
|
9052
|
-
/* @__PURE__ */ (0,
|
|
9053
|
-
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, {})
|
|
9054
9085
|
] });
|
|
9055
9086
|
};
|
|
9056
9087
|
|
|
9057
9088
|
// src/components/Modal/ModalContent.tsx
|
|
9058
|
-
var
|
|
9059
|
-
var
|
|
9089
|
+
var import_react39 = require("react");
|
|
9090
|
+
var import_styled_components57 = __toESM(require("styled-components"));
|
|
9060
9091
|
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
9061
9092
|
|
|
9062
9093
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
9063
|
-
var
|
|
9064
|
-
var
|
|
9094
|
+
var import_react38 = require("react");
|
|
9095
|
+
var import_type_guards32 = require("@wistia/type-guards");
|
|
9065
9096
|
var useFocusRestore = () => {
|
|
9066
|
-
const previouslyFocusedRef = (0,
|
|
9067
|
-
(0,
|
|
9097
|
+
const previouslyFocusedRef = (0, import_react38.useRef)(null);
|
|
9098
|
+
(0, import_react38.useEffect)(() => {
|
|
9068
9099
|
previouslyFocusedRef.current = document.activeElement;
|
|
9069
9100
|
}, []);
|
|
9070
|
-
(0,
|
|
9101
|
+
(0, import_react38.useEffect)(() => {
|
|
9071
9102
|
return () => {
|
|
9072
|
-
if ((0,
|
|
9103
|
+
if ((0, import_type_guards32.isNotNil)(previouslyFocusedRef.current)) {
|
|
9073
9104
|
setTimeout(() => {
|
|
9074
9105
|
previouslyFocusedRef.current?.focus();
|
|
9075
9106
|
}, 0);
|
|
@@ -9079,8 +9110,8 @@ var useFocusRestore = () => {
|
|
|
9079
9110
|
};
|
|
9080
9111
|
|
|
9081
9112
|
// src/components/Modal/ModalContent.tsx
|
|
9082
|
-
var
|
|
9083
|
-
var StyledModalContent = (0,
|
|
9113
|
+
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
9114
|
+
var StyledModalContent = (0, import_styled_components57.default)(import_react_dialog3.Content)`
|
|
9084
9115
|
background-color: var(--wui-color-bg-app);
|
|
9085
9116
|
box-sizing: border-box;
|
|
9086
9117
|
display: flex;
|
|
@@ -9121,10 +9152,10 @@ var StyledModalContent = (0, import_styled_components55.default)(import_react_di
|
|
|
9121
9152
|
}
|
|
9122
9153
|
}
|
|
9123
9154
|
`;
|
|
9124
|
-
var ModalContent = (0,
|
|
9155
|
+
var ModalContent = (0, import_react39.forwardRef)(
|
|
9125
9156
|
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
9126
9157
|
useFocusRestore();
|
|
9127
|
-
return /* @__PURE__ */ (0,
|
|
9158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
9128
9159
|
StyledModalContent,
|
|
9129
9160
|
{
|
|
9130
9161
|
ref,
|
|
@@ -9139,9 +9170,9 @@ var ModalContent = (0, import_react38.forwardRef)(
|
|
|
9139
9170
|
);
|
|
9140
9171
|
|
|
9141
9172
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
9142
|
-
var
|
|
9143
|
-
var
|
|
9144
|
-
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");
|
|
9145
9176
|
var backdropAnimationDuration = 150;
|
|
9146
9177
|
var alignVerticalMap = {
|
|
9147
9178
|
stretch: "normal",
|
|
@@ -9154,7 +9185,7 @@ var alignHorizontalMap = {
|
|
|
9154
9185
|
center: "center",
|
|
9155
9186
|
right: "end"
|
|
9156
9187
|
};
|
|
9157
|
-
var BackdropComponent =
|
|
9188
|
+
var BackdropComponent = import_styled_components58.default.div`
|
|
9158
9189
|
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
9159
9190
|
animation-name: backdropShow;
|
|
9160
9191
|
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
@@ -9177,8 +9208,8 @@ var BackdropComponent = import_styled_components56.default.div`
|
|
|
9177
9208
|
}
|
|
9178
9209
|
}
|
|
9179
9210
|
`;
|
|
9180
|
-
var Backdrop = (0,
|
|
9181
|
-
({ 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)(
|
|
9182
9213
|
BackdropComponent,
|
|
9183
9214
|
{
|
|
9184
9215
|
ref,
|
|
@@ -9192,14 +9223,14 @@ var Backdrop = (0, import_react39.forwardRef)(
|
|
|
9192
9223
|
Backdrop.displayName = "Backdrop";
|
|
9193
9224
|
|
|
9194
9225
|
// src/components/Modal/Modal.tsx
|
|
9195
|
-
var
|
|
9226
|
+
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
9196
9227
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
9197
|
-
var ModalBody =
|
|
9228
|
+
var ModalBody = import_styled_components59.default.div`
|
|
9198
9229
|
flex-direction: column;
|
|
9199
9230
|
display: flex;
|
|
9200
9231
|
order: 2;
|
|
9201
9232
|
`;
|
|
9202
|
-
var Modal = (0,
|
|
9233
|
+
var Modal = (0, import_react41.forwardRef)(
|
|
9203
9234
|
({
|
|
9204
9235
|
children,
|
|
9205
9236
|
fullHeight = false,
|
|
@@ -9212,24 +9243,24 @@ var Modal = (0, import_react40.forwardRef)(
|
|
|
9212
9243
|
width = DEFAULT_MODAL_WIDTH,
|
|
9213
9244
|
...props
|
|
9214
9245
|
}, ref) => {
|
|
9215
|
-
return /* @__PURE__ */ (0,
|
|
9246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
|
|
9216
9247
|
import_react_dialog4.Root,
|
|
9217
9248
|
{
|
|
9218
9249
|
onOpenChange: (open2) => {
|
|
9219
|
-
if (!open2 && (0,
|
|
9250
|
+
if (!open2 && (0, import_type_guards33.isNotNil)(onRequestClose)) {
|
|
9220
9251
|
onRequestClose();
|
|
9221
9252
|
}
|
|
9222
9253
|
},
|
|
9223
9254
|
open: isOpen,
|
|
9224
|
-
children: /* @__PURE__ */ (0,
|
|
9225
|
-
/* @__PURE__ */ (0,
|
|
9226
|
-
/* @__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)(
|
|
9227
9258
|
ModalContent,
|
|
9228
9259
|
{
|
|
9229
9260
|
ref,
|
|
9230
9261
|
fullHeight,
|
|
9231
9262
|
onOpenAutoFocus: (event) => {
|
|
9232
|
-
if ((0,
|
|
9263
|
+
if ((0, import_type_guards33.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
9233
9264
|
event.preventDefault();
|
|
9234
9265
|
requestAnimationFrame(() => {
|
|
9235
9266
|
initialFocusRef.current?.focus();
|
|
@@ -9239,8 +9270,8 @@ var Modal = (0, import_react40.forwardRef)(
|
|
|
9239
9270
|
width,
|
|
9240
9271
|
...props,
|
|
9241
9272
|
children: [
|
|
9242
|
-
/* @__PURE__ */ (0,
|
|
9243
|
-
/* @__PURE__ */ (0,
|
|
9273
|
+
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)(ModalBody, { children }),
|
|
9274
|
+
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
|
|
9244
9275
|
ModalHeader,
|
|
9245
9276
|
{
|
|
9246
9277
|
hideCloseButton,
|
|
@@ -9259,16 +9290,16 @@ var Modal = (0, import_react40.forwardRef)(
|
|
|
9259
9290
|
Modal.displayName = "Modal";
|
|
9260
9291
|
|
|
9261
9292
|
// src/components/Radio/Radio.tsx
|
|
9262
|
-
var
|
|
9263
|
-
var
|
|
9264
|
-
var
|
|
9265
|
-
var
|
|
9266
|
-
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`
|
|
9267
9298
|
display: flex;
|
|
9268
9299
|
flex-direction: column;
|
|
9269
9300
|
padding-left: var(--wui-space-02);
|
|
9270
9301
|
`;
|
|
9271
|
-
var StyledRadio =
|
|
9302
|
+
var StyledRadio = import_styled_components60.default.input`
|
|
9272
9303
|
box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
|
|
9273
9304
|
appearance: none;
|
|
9274
9305
|
margin: 0;
|
|
@@ -9294,11 +9325,11 @@ var StyledRadio = import_styled_components58.default.input`
|
|
|
9294
9325
|
transform: scale(1);
|
|
9295
9326
|
}
|
|
9296
9327
|
`;
|
|
9297
|
-
var disabledStyle2 =
|
|
9328
|
+
var disabledStyle2 = import_styled_components60.css`
|
|
9298
9329
|
cursor: not-allowed;
|
|
9299
9330
|
opacity: 0.5;
|
|
9300
9331
|
`;
|
|
9301
|
-
var errorStyle =
|
|
9332
|
+
var errorStyle = import_styled_components60.css`
|
|
9302
9333
|
/* TODO Lamp to design error state */
|
|
9303
9334
|
&:hover,
|
|
9304
9335
|
&:focus,
|
|
@@ -9306,11 +9337,11 @@ var errorStyle = import_styled_components58.css`
|
|
|
9306
9337
|
border-color: transparent !important;
|
|
9307
9338
|
}
|
|
9308
9339
|
`;
|
|
9309
|
-
var defaultHoverStyle =
|
|
9340
|
+
var defaultHoverStyle = import_styled_components60.css`
|
|
9310
9341
|
/* TODO Lamp to design hover state */
|
|
9311
9342
|
cursor: pointer;
|
|
9312
9343
|
`;
|
|
9313
|
-
var StyledRadioWrapper =
|
|
9344
|
+
var StyledRadioWrapper = import_styled_components60.default.div`
|
|
9314
9345
|
align-items: baseline;
|
|
9315
9346
|
border: 1px solid transparent;
|
|
9316
9347
|
border-radius: 4px;
|
|
@@ -9333,7 +9364,7 @@ var StyledRadioWrapper = import_styled_components58.default.div`
|
|
|
9333
9364
|
|
|
9334
9365
|
${({ disabled }) => disabled && disabledStyle2};
|
|
9335
9366
|
`;
|
|
9336
|
-
var Radio = (0,
|
|
9367
|
+
var Radio = (0, import_react42.forwardRef)(
|
|
9337
9368
|
({
|
|
9338
9369
|
checked,
|
|
9339
9370
|
disabled = false,
|
|
@@ -9346,15 +9377,15 @@ var Radio = (0, import_react41.forwardRef)(
|
|
|
9346
9377
|
value = "false",
|
|
9347
9378
|
...otherProps
|
|
9348
9379
|
}, ref) => {
|
|
9349
|
-
const generatedId = (0,
|
|
9350
|
-
const computedId = (0,
|
|
9351
|
-
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)(
|
|
9352
9383
|
StyledRadioWrapper,
|
|
9353
9384
|
{
|
|
9354
9385
|
"aria-invalid": otherProps["aria-invalid"],
|
|
9355
9386
|
disabled,
|
|
9356
9387
|
children: [
|
|
9357
|
-
/* @__PURE__ */ (0,
|
|
9388
|
+
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
|
|
9358
9389
|
StyledRadio,
|
|
9359
9390
|
{
|
|
9360
9391
|
ref,
|
|
@@ -9369,8 +9400,8 @@ var Radio = (0, import_react41.forwardRef)(
|
|
|
9369
9400
|
...otherProps
|
|
9370
9401
|
}
|
|
9371
9402
|
),
|
|
9372
|
-
/* @__PURE__ */ (0,
|
|
9373
|
-
/* @__PURE__ */ (0,
|
|
9403
|
+
/* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(StyledLabelWrapper2, { children: [
|
|
9404
|
+
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
|
|
9374
9405
|
Label,
|
|
9375
9406
|
{
|
|
9376
9407
|
disabled,
|
|
@@ -9379,7 +9410,7 @@ var Radio = (0, import_react41.forwardRef)(
|
|
|
9379
9410
|
children: label
|
|
9380
9411
|
}
|
|
9381
9412
|
),
|
|
9382
|
-
/* @__PURE__ */ (0,
|
|
9413
|
+
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(LabelDescription, { children: description })
|
|
9383
9414
|
] })
|
|
9384
9415
|
]
|
|
9385
9416
|
}
|
|
@@ -9389,12 +9420,12 @@ var Radio = (0, import_react41.forwardRef)(
|
|
|
9389
9420
|
Radio.displayName = "Radio";
|
|
9390
9421
|
|
|
9391
9422
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
9392
|
-
var
|
|
9393
|
-
var
|
|
9423
|
+
var import_react43 = require("react");
|
|
9424
|
+
var import_styled_components61 = __toESM(require("styled-components"));
|
|
9394
9425
|
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
9395
|
-
var
|
|
9396
|
-
var
|
|
9397
|
-
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`
|
|
9398
9429
|
display: inline-flex;
|
|
9399
9430
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
9400
9431
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -9402,10 +9433,10 @@ var segmentedControlStyles = import_styled_components59.css`
|
|
|
9402
9433
|
gap: var(--wui-space-01);
|
|
9403
9434
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
9404
9435
|
`;
|
|
9405
|
-
var StyledSegmentedControl = (0,
|
|
9436
|
+
var StyledSegmentedControl = (0, import_styled_components61.default)(import_react_toggle_group.Root)`
|
|
9406
9437
|
${segmentedControlStyles}
|
|
9407
9438
|
`;
|
|
9408
|
-
var SegmentedControl = (0,
|
|
9439
|
+
var SegmentedControl = (0, import_react43.forwardRef)(
|
|
9409
9440
|
({
|
|
9410
9441
|
children,
|
|
9411
9442
|
disabled = false,
|
|
@@ -9414,10 +9445,10 @@ var SegmentedControl = (0, import_react42.forwardRef)(
|
|
|
9414
9445
|
onSelectedValueChange,
|
|
9415
9446
|
...props
|
|
9416
9447
|
}, ref) => {
|
|
9417
|
-
if ((0,
|
|
9448
|
+
if ((0, import_type_guards35.isNil)(children)) {
|
|
9418
9449
|
return null;
|
|
9419
9450
|
}
|
|
9420
|
-
return /* @__PURE__ */ (0,
|
|
9451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
|
|
9421
9452
|
StyledSegmentedControl,
|
|
9422
9453
|
{
|
|
9423
9454
|
ref,
|
|
@@ -9437,12 +9468,12 @@ var SegmentedControl = (0, import_react42.forwardRef)(
|
|
|
9437
9468
|
SegmentedControl.displayName = "SegmentedControl";
|
|
9438
9469
|
|
|
9439
9470
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
9440
|
-
var
|
|
9441
|
-
var
|
|
9471
|
+
var import_react44 = require("react");
|
|
9472
|
+
var import_styled_components62 = __toESM(require("styled-components"));
|
|
9442
9473
|
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
9443
|
-
var
|
|
9444
|
-
var
|
|
9445
|
-
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`
|
|
9446
9477
|
all: unset; /* ToggleGroupItem is a button element */
|
|
9447
9478
|
align-items: center;
|
|
9448
9479
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -9497,10 +9528,10 @@ var segmentedControlItemStyles = import_styled_components60.css`
|
|
|
9497
9528
|
}
|
|
9498
9529
|
}
|
|
9499
9530
|
`;
|
|
9500
|
-
var StyledSegmentedControlItem = (0,
|
|
9531
|
+
var StyledSegmentedControlItem = (0, import_styled_components62.default)(import_react_toggle_group2.Item)`
|
|
9501
9532
|
${segmentedControlItemStyles}
|
|
9502
9533
|
`;
|
|
9503
|
-
var SegmentedControlItem = (0,
|
|
9534
|
+
var SegmentedControlItem = (0, import_react44.forwardRef)(
|
|
9504
9535
|
({ disabled, icon, label, "aria-label": ariaLabel, value }, ref) => {
|
|
9505
9536
|
const handleClick = (event) => {
|
|
9506
9537
|
const target = event.target;
|
|
@@ -9509,12 +9540,12 @@ var SegmentedControlItem = (0, import_react43.forwardRef)(
|
|
|
9509
9540
|
event.preventDefault();
|
|
9510
9541
|
}
|
|
9511
9542
|
};
|
|
9512
|
-
return /* @__PURE__ */ (0,
|
|
9543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime212.jsxs)(
|
|
9513
9544
|
StyledSegmentedControlItem,
|
|
9514
9545
|
{
|
|
9515
9546
|
ref,
|
|
9516
|
-
$hasLabel: (0,
|
|
9517
|
-
"aria-label": (0,
|
|
9547
|
+
$hasLabel: (0, import_type_guards36.isNotNil)(label),
|
|
9548
|
+
"aria-label": (0, import_type_guards36.isNotNil)(label) ? void 0 : ariaLabel,
|
|
9518
9549
|
disabled,
|
|
9519
9550
|
onClick: handleClick,
|
|
9520
9551
|
value,
|
|
@@ -9528,200 +9559,16 @@ var SegmentedControlItem = (0, import_react43.forwardRef)(
|
|
|
9528
9559
|
);
|
|
9529
9560
|
SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
9530
9561
|
|
|
9531
|
-
// src/components/
|
|
9532
|
-
var
|
|
9533
|
-
var
|
|
9534
|
-
var
|
|
9535
|
-
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
9536
|
-
var StyledTrigger = (0, import_styled_components61.default)(import_react_select.Trigger)`
|
|
9537
|
-
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
9538
|
-
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
9539
|
-
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
9540
|
-
--wui-select-color-border: var(--wui-color-border);
|
|
9541
|
-
--wui-select-color-border-focus: var(--wui-color-border-active);
|
|
9542
|
-
--wui-select-color-border-error: var(--wui-color-border-error);
|
|
9543
|
-
--wui-select-color-border-disabled: var(--wui-color-border-disabled);
|
|
9544
|
-
--wui-select-border-radius: var(--wui-border-radius-rounded);
|
|
9545
|
-
--wui-select-multiline-border-radius: var(--wui-border-radius-02);
|
|
9546
|
-
--wui-select-vertical-padding: var(--wui-space-02);
|
|
9547
|
-
--wui-select-horizontal-padding: var(--wui-space-03);
|
|
9548
|
-
--wui-select-placeholder: var(--wui-gray-10);
|
|
9549
|
-
--wui-select-color-text-error: var(--wui-color-text-error);
|
|
9550
|
-
|
|
9551
|
-
padding: var(--wui-select-vertical-padding) var(--wui-select-horizontal-padding);
|
|
9552
|
-
background-color: var(--wui-select-color-bg);
|
|
9553
|
-
border: 1px solid var(--wui-select-color-border);
|
|
9554
|
-
border-radius: var(--wui-select-border-radius);
|
|
9555
|
-
min-width: 200px;
|
|
9556
|
-
text-align: left;
|
|
9557
|
-
display: inline-flex;
|
|
9558
|
-
align-items: center;
|
|
9559
|
-
justify-content: space-between;
|
|
9560
|
-
width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
|
|
9561
|
-
|
|
9562
|
-
&[aria-expanded='true'],
|
|
9563
|
-
&:focus {
|
|
9564
|
-
outline: 2px solid var(--wui-color-focus-ring);
|
|
9565
|
-
}
|
|
9566
|
-
|
|
9567
|
-
&[aria-invalid='true'] {
|
|
9568
|
-
outline: 2px solid var(--wui-select-color-border-error);
|
|
9569
|
-
color: var(--wui-select-color-text-error);
|
|
9570
|
-
}
|
|
9571
|
-
|
|
9572
|
-
&:disabled {
|
|
9573
|
-
border-color: var(--wui-color-bg-surface-disabled);
|
|
9574
|
-
background-color: var(--wui-color-bg-surface-disabled);
|
|
9575
|
-
}
|
|
9576
|
-
`;
|
|
9577
|
-
var StyledContent2 = (0, import_styled_components61.default)(import_react_select.Content)`
|
|
9578
|
-
--wui-select-content-border: var(--wui-color-border);
|
|
9579
|
-
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
9580
|
-
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
9581
|
-
--wui-select-option-padding: var(--wui-space-02);
|
|
9582
|
-
--wui-select-option-inner-gap: var(--wui-space-03);
|
|
9583
|
-
--wui-select-option-bg-hover: var(--wui-color-bg-surface-hover);
|
|
9584
|
-
|
|
9585
|
-
overflow: hidden;
|
|
9586
|
-
transform: translateY(8px);
|
|
9587
|
-
background-color: var(--wui-select-content-bg);
|
|
9588
|
-
border: 1px solid var(--wui-select-content-border);
|
|
9589
|
-
border-radius: var(--wui-select-content-border-radius);
|
|
9590
|
-
padding: var(--wui-select-option-padding);
|
|
9591
|
-
min-width: 200px;
|
|
9592
|
-
`;
|
|
9593
|
-
var Select = (0, import_react44.forwardRef)(
|
|
9594
|
-
({
|
|
9595
|
-
colorScheme = "inherit",
|
|
9596
|
-
children,
|
|
9597
|
-
onChange = () => null,
|
|
9598
|
-
placeholder = "Select...",
|
|
9599
|
-
fullWidth = false,
|
|
9600
|
-
...props
|
|
9601
|
-
}, forwardedRef) => {
|
|
9602
|
-
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
9603
|
-
return /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(
|
|
9604
|
-
import_react_select.Root,
|
|
9605
|
-
{
|
|
9606
|
-
...props,
|
|
9607
|
-
onValueChange: onChange,
|
|
9608
|
-
children: [
|
|
9609
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(
|
|
9610
|
-
StyledTrigger,
|
|
9611
|
-
{
|
|
9612
|
-
ref: forwardedRef,
|
|
9613
|
-
$colorScheme: colorScheme,
|
|
9614
|
-
$fullWidth: responsiveFullWidth,
|
|
9615
|
-
...props,
|
|
9616
|
-
children: [
|
|
9617
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.Value, { placeholder }),
|
|
9618
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
|
|
9619
|
-
Icon,
|
|
9620
|
-
{
|
|
9621
|
-
size: "md",
|
|
9622
|
-
type: "caret-down"
|
|
9623
|
-
}
|
|
9624
|
-
)
|
|
9625
|
-
]
|
|
9626
|
-
}
|
|
9627
|
-
),
|
|
9628
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(StyledContent2, { position: "popper", children: [
|
|
9629
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(Icon, { type: "caret-up" }) }),
|
|
9630
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.Viewport, { children }),
|
|
9631
|
-
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(Icon, { type: "caret-down" }) })
|
|
9632
|
-
] }) })
|
|
9633
|
-
]
|
|
9634
|
-
}
|
|
9635
|
-
);
|
|
9636
|
-
}
|
|
9637
|
-
);
|
|
9638
|
-
Select.displayName = "Select";
|
|
9639
|
-
|
|
9640
|
-
// src/components/Select/SelectOption.tsx
|
|
9641
|
-
var import_react_select2 = require("@radix-ui/react-select");
|
|
9642
|
-
var import_react45 = require("react");
|
|
9643
|
-
var import_styled_components62 = __toESM(require("styled-components"));
|
|
9644
|
-
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
9645
|
-
var StyledItem = (0, import_styled_components62.default)(import_react_select2.Item)`
|
|
9646
|
-
${variantStyleMap2.body3};
|
|
9647
|
-
display: flex;
|
|
9648
|
-
padding: var(--wui-select-option-padding);
|
|
9649
|
-
gap: var(--wui-select-option-inner-gap);
|
|
9650
|
-
font-size: var(--font-size);
|
|
9651
|
-
font-weight: var(--font-weight);
|
|
9652
|
-
border-radius: var(--wui-border-radius-01);
|
|
9653
|
-
|
|
9654
|
-
&:hover,
|
|
9655
|
-
&:focus-visible {
|
|
9656
|
-
background-color: var(--wui-select-option-bg-hover);
|
|
9657
|
-
outline: none;
|
|
9658
|
-
}
|
|
9659
|
-
|
|
9660
|
-
&[aria-disabled='true'] {
|
|
9661
|
-
color: var(--wui-color-text-disabled);
|
|
9662
|
-
}
|
|
9663
|
-
|
|
9664
|
-
&[aria-disabled='true']:hover {
|
|
9665
|
-
background-color: transparent;
|
|
9666
|
-
}
|
|
9667
|
-
`;
|
|
9668
|
-
var StyledIconContainer = import_styled_components62.default.span`
|
|
9669
|
-
width: 12px;
|
|
9670
|
-
`;
|
|
9671
|
-
var SelectOption = (0, import_react45.forwardRef)(
|
|
9672
|
-
({ children, ...props }, forwardedRef) => {
|
|
9673
|
-
return /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(
|
|
9674
|
-
StyledItem,
|
|
9675
|
-
{
|
|
9676
|
-
...props,
|
|
9677
|
-
ref: forwardedRef,
|
|
9678
|
-
children: [
|
|
9679
|
-
/* @__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)(
|
|
9680
|
-
Icon,
|
|
9681
|
-
{
|
|
9682
|
-
size: "sm",
|
|
9683
|
-
type: "checkmark"
|
|
9684
|
-
}
|
|
9685
|
-
) }) }),
|
|
9686
|
-
/* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_react_select2.ItemText, { children })
|
|
9687
|
-
]
|
|
9688
|
-
}
|
|
9689
|
-
);
|
|
9690
|
-
}
|
|
9691
|
-
);
|
|
9692
|
-
SelectOption.displayName = "Option";
|
|
9693
|
-
|
|
9694
|
-
// src/components/Select/SelectOptionGroup.tsx
|
|
9695
|
-
var import_react_select3 = require("@radix-ui/react-select");
|
|
9696
|
-
var import_styled_components63 = __toESM(require("styled-components"));
|
|
9697
|
-
var import_jsx_runtime212 = require("react/jsx-runtime");
|
|
9698
|
-
var StyledLabel4 = (0, import_styled_components63.default)(import_react_select3.Label)`
|
|
9699
|
-
padding: var(--wui-select-option-padding);
|
|
9700
|
-
`;
|
|
9701
|
-
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
9702
|
-
return /* @__PURE__ */ (0, import_jsx_runtime212.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
9703
|
-
/* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
|
|
9704
|
-
Text,
|
|
9705
|
-
{
|
|
9706
|
-
prominence: "secondary",
|
|
9707
|
-
variant: "body3",
|
|
9708
|
-
children: label
|
|
9709
|
-
}
|
|
9710
|
-
) }),
|
|
9711
|
-
children
|
|
9712
|
-
] });
|
|
9713
|
-
};
|
|
9714
|
-
|
|
9715
|
-
// src/components/Tabs/Tabs.tsx
|
|
9716
|
-
var import_react48 = require("react");
|
|
9717
|
-
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
9718
|
-
var import_type_guards36 = require("@wistia/type-guards");
|
|
9562
|
+
// src/components/Tabs/Tabs.tsx
|
|
9563
|
+
var import_react47 = require("react");
|
|
9564
|
+
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
9565
|
+
var import_type_guards38 = require("@wistia/type-guards");
|
|
9719
9566
|
|
|
9720
9567
|
// src/components/Tabs/TabPanel.tsx
|
|
9721
|
-
var
|
|
9568
|
+
var import_styled_components63 = __toESM(require("styled-components"));
|
|
9722
9569
|
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
9723
9570
|
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
9724
|
-
var StyledTabPanel = (0,
|
|
9571
|
+
var StyledTabPanel = (0, import_styled_components63.default)(import_react_tabs.Content)`
|
|
9725
9572
|
display: flex;
|
|
9726
9573
|
flex-direction: column;
|
|
9727
9574
|
`;
|
|
@@ -9738,10 +9585,10 @@ var TabPanel = ({ children, value, ...props }) => {
|
|
|
9738
9585
|
TabPanel.displayName = "TabPanel";
|
|
9739
9586
|
|
|
9740
9587
|
// src/components/Tabs/TabList.tsx
|
|
9741
|
-
var
|
|
9588
|
+
var import_styled_components64 = __toESM(require("styled-components"));
|
|
9742
9589
|
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
9743
9590
|
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
9744
|
-
var StyledTabList = (0,
|
|
9591
|
+
var StyledTabList = (0, import_styled_components64.default)(import_react_tabs2.List)`
|
|
9745
9592
|
${segmentedControlStyles}
|
|
9746
9593
|
|
|
9747
9594
|
margin-bottom: var(--wui-space-04);
|
|
@@ -9765,26 +9612,26 @@ var TabList = ({
|
|
|
9765
9612
|
TabList.displayName = "TabList";
|
|
9766
9613
|
|
|
9767
9614
|
// src/components/Tabs/TabItem.tsx
|
|
9768
|
-
var
|
|
9769
|
-
var
|
|
9615
|
+
var import_react45 = require("react");
|
|
9616
|
+
var import_styled_components65 = __toESM(require("styled-components"));
|
|
9770
9617
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
9771
|
-
var
|
|
9618
|
+
var import_type_guards37 = require("@wistia/type-guards");
|
|
9772
9619
|
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
9773
|
-
var StyledTabItem = (0,
|
|
9620
|
+
var StyledTabItem = (0, import_styled_components65.default)(import_react_tabs3.Trigger)`
|
|
9774
9621
|
${segmentedControlItemStyles}
|
|
9775
9622
|
|
|
9776
9623
|
&[data-state='active'] {
|
|
9777
9624
|
background-color: white;
|
|
9778
9625
|
}
|
|
9779
9626
|
`;
|
|
9780
|
-
var TabItem = (0,
|
|
9627
|
+
var TabItem = (0, import_react45.forwardRef)(
|
|
9781
9628
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, ref) => {
|
|
9782
9629
|
return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(
|
|
9783
9630
|
StyledTabItem,
|
|
9784
9631
|
{
|
|
9785
9632
|
ref,
|
|
9786
|
-
$hasLabel: (0,
|
|
9787
|
-
"aria-label": (0,
|
|
9633
|
+
$hasLabel: (0, import_type_guards37.isNotNil)(label),
|
|
9634
|
+
"aria-label": (0, import_type_guards37.isNotNil)(label) ? void 0 : ariaLabel,
|
|
9788
9635
|
disabled,
|
|
9789
9636
|
value,
|
|
9790
9637
|
children: [
|
|
@@ -9798,16 +9645,16 @@ var TabItem = (0, import_react46.forwardRef)(
|
|
|
9798
9645
|
TabItem.displayName = "TabItem";
|
|
9799
9646
|
|
|
9800
9647
|
// src/components/Tabs/extractTabItems.ts
|
|
9801
|
-
var
|
|
9648
|
+
var import_react46 = require("react");
|
|
9802
9649
|
var extractTabItems = (children) => {
|
|
9803
9650
|
const tabItems = [];
|
|
9804
|
-
|
|
9805
|
-
if (!(0,
|
|
9651
|
+
import_react46.Children.forEach(children, (child) => {
|
|
9652
|
+
if (!(0, import_react46.isValidElement)(child)) {
|
|
9806
9653
|
return;
|
|
9807
9654
|
}
|
|
9808
9655
|
if (typeof child.type !== "string" && child.type.displayName === "Tab") {
|
|
9809
9656
|
tabItems.push(child);
|
|
9810
|
-
} else if (child.type ===
|
|
9657
|
+
} else if (child.type === import_react46.Fragment) {
|
|
9811
9658
|
const fragmentElement = child;
|
|
9812
9659
|
tabItems.push(...extractTabItems(fragmentElement.props.children));
|
|
9813
9660
|
} else if ((child.props.children ?? null) != null) {
|
|
@@ -9821,7 +9668,7 @@ var extractTabItems = (children) => {
|
|
|
9821
9668
|
|
|
9822
9669
|
// src/components/Tabs/Tabs.tsx
|
|
9823
9670
|
var import_jsx_runtime216 = require("react/jsx-runtime");
|
|
9824
|
-
var Tabs = (0,
|
|
9671
|
+
var Tabs = (0, import_react47.forwardRef)(
|
|
9825
9672
|
({
|
|
9826
9673
|
children,
|
|
9827
9674
|
fullWidth = true,
|
|
@@ -9854,7 +9701,7 @@ var Tabs = (0, import_react48.forwardRef)(
|
|
|
9854
9701
|
label,
|
|
9855
9702
|
"aria-label": ariaLabelForTab
|
|
9856
9703
|
} = tab.props;
|
|
9857
|
-
if ((0,
|
|
9704
|
+
if ((0, import_type_guards38.isNil)(icon)) {
|
|
9858
9705
|
return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
9859
9706
|
TabItem,
|
|
9860
9707
|
{
|
|
@@ -9865,7 +9712,7 @@ var Tabs = (0, import_react48.forwardRef)(
|
|
|
9865
9712
|
value
|
|
9866
9713
|
);
|
|
9867
9714
|
}
|
|
9868
|
-
if ((0,
|
|
9715
|
+
if ((0, import_type_guards38.isNotNil)(label)) {
|
|
9869
9716
|
return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
9870
9717
|
TabItem,
|
|
9871
9718
|
{
|
|
@@ -9877,7 +9724,7 @@ var Tabs = (0, import_react48.forwardRef)(
|
|
|
9877
9724
|
value
|
|
9878
9725
|
);
|
|
9879
9726
|
}
|
|
9880
|
-
if ((0,
|
|
9727
|
+
if ((0, import_type_guards38.isNotNil)(ariaLabelForTab)) {
|
|
9881
9728
|
return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
9882
9729
|
TabItem,
|
|
9883
9730
|
{
|
|
@@ -9909,19 +9756,19 @@ var Tabs = (0, import_react48.forwardRef)(
|
|
|
9909
9756
|
Tabs.displayName = "Tabs";
|
|
9910
9757
|
|
|
9911
9758
|
// src/components/Tabs/Tab.tsx
|
|
9912
|
-
var
|
|
9759
|
+
var import_react48 = require("react");
|
|
9913
9760
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
9914
|
-
var Tab = (0,
|
|
9761
|
+
var Tab = (0, import_react48.forwardRef)(({ children }, ref) => {
|
|
9915
9762
|
return /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("div", { ref, children });
|
|
9916
9763
|
});
|
|
9917
9764
|
Tab.displayName = "Tab";
|
|
9918
9765
|
|
|
9919
9766
|
// src/components/Tag/Tag.tsx
|
|
9920
|
-
var
|
|
9921
|
-
var
|
|
9922
|
-
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");
|
|
9923
9770
|
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
9924
|
-
var TagLabel =
|
|
9771
|
+
var TagLabel = import_styled_components66.default.a`
|
|
9925
9772
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
9926
9773
|
font-size: var(--wui-typography-label-4-size);
|
|
9927
9774
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -9949,14 +9796,14 @@ var TagLabel = import_styled_components67.default.a`
|
|
|
9949
9796
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
9950
9797
|
}
|
|
9951
9798
|
`;
|
|
9952
|
-
var TagDivider =
|
|
9799
|
+
var TagDivider = import_styled_components66.default.div`
|
|
9953
9800
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
9954
9801
|
border-left: 1px solid var(--wui-color-border);
|
|
9955
9802
|
display: flex;
|
|
9956
9803
|
height: 14px;
|
|
9957
9804
|
width: 1px;
|
|
9958
9805
|
`;
|
|
9959
|
-
var StyledRemoveButton =
|
|
9806
|
+
var StyledRemoveButton = import_styled_components66.default.button`
|
|
9960
9807
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
9961
9808
|
all: unset;
|
|
9962
9809
|
cursor: pointer;
|
|
@@ -9984,7 +9831,7 @@ var StyledRemoveButton = import_styled_components67.default.button`
|
|
|
9984
9831
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
9985
9832
|
}
|
|
9986
9833
|
`;
|
|
9987
|
-
var StyledTag =
|
|
9834
|
+
var StyledTag = import_styled_components66.default.div`
|
|
9988
9835
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
9989
9836
|
align-items: center;
|
|
9990
9837
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -9997,10 +9844,10 @@ var StyledTag = import_styled_components67.default.div`
|
|
|
9997
9844
|
}
|
|
9998
9845
|
`;
|
|
9999
9846
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
10000
|
-
if ((0,
|
|
9847
|
+
if ((0, import_type_guards39.isNil)(onClickRemove)) {
|
|
10001
9848
|
return null;
|
|
10002
9849
|
}
|
|
10003
|
-
if ((0,
|
|
9850
|
+
if ((0, import_type_guards39.isNil)(onClickRemoveLabel)) {
|
|
10004
9851
|
throw new Error(
|
|
10005
9852
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
10006
9853
|
);
|
|
@@ -10027,9 +9874,9 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
10027
9874
|
)
|
|
10028
9875
|
] });
|
|
10029
9876
|
};
|
|
10030
|
-
var Tag = (0,
|
|
9877
|
+
var Tag = (0, import_react49.forwardRef)(
|
|
10031
9878
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
10032
|
-
const labelProps = (0,
|
|
9879
|
+
const labelProps = (0, import_type_guards39.isNotNil)(href) && (0, import_type_guards39.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
10033
9880
|
return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(
|
|
10034
9881
|
StyledTag,
|
|
10035
9882
|
{
|
|
@@ -10061,8 +9908,8 @@ var Tag = (0, import_react50.forwardRef)(
|
|
|
10061
9908
|
Tag.displayName = "Tag";
|
|
10062
9909
|
|
|
10063
9910
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
10064
|
-
var
|
|
10065
|
-
var
|
|
9911
|
+
var import_styled_components67 = __toESM(require("styled-components"));
|
|
9912
|
+
var import_type_guards40 = require("@wistia/type-guards");
|
|
10066
9913
|
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
10067
9914
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
10068
9915
|
if (iconOnly) {
|
|
@@ -10103,7 +9950,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
10103
9950
|
}
|
|
10104
9951
|
return "0 0 144 31.47";
|
|
10105
9952
|
};
|
|
10106
|
-
var WistiaLogoComponent =
|
|
9953
|
+
var WistiaLogoComponent = import_styled_components67.default.svg`
|
|
10107
9954
|
height: ${({ height }) => `${height}px`};
|
|
10108
9955
|
|
|
10109
9956
|
/* ensure it will always fit on mobile */
|
|
@@ -10156,7 +10003,7 @@ var WistiaLogo = ({
|
|
|
10156
10003
|
...otherProps,
|
|
10157
10004
|
children: [
|
|
10158
10005
|
/* @__PURE__ */ (0, import_jsx_runtime219.jsx)("title", { children: title }),
|
|
10159
|
-
(0,
|
|
10006
|
+
(0, import_type_guards40.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("desc", { children: description }) : null,
|
|
10160
10007
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
10161
10008
|
renderLogotype(logotypeColor, iconOnly)
|
|
10162
10009
|
]
|
|
@@ -10165,6 +10012,190 @@ var WistiaLogo = ({
|
|
|
10165
10012
|
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("a", { href, children: Logo }) : Logo;
|
|
10166
10013
|
};
|
|
10167
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
|
+
};
|
|
10168
10199
|
// Annotate the CommonJS export names for ESM import in node:
|
|
10169
10200
|
0 && (module.exports = {
|
|
10170
10201
|
ActionButton,
|
|
@@ -10179,6 +10210,9 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
10179
10210
|
Checkbox,
|
|
10180
10211
|
CheckboxGroup,
|
|
10181
10212
|
CheckboxMenuItem,
|
|
10213
|
+
Collapsible,
|
|
10214
|
+
CollapsibleContent,
|
|
10215
|
+
CollapsibleTrigger,
|
|
10182
10216
|
ColorSchemeWrapper,
|
|
10183
10217
|
DataCard,
|
|
10184
10218
|
DataCardTrend,
|