@wistia/ui 0.4.9 → 0.4.10-beta.0ed4d620.68377ec
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 +481 -309
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +172 -16
- package/dist/index.d.ts +172 -16
- package/dist/index.mjs +432 -262
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.4.
|
|
3
|
+
* @license @wistia/ui v0.4.10-beta.0ed4d620.68377ec
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -75,6 +75,8 @@ __export(index_exports, {
|
|
|
75
75
|
RadioGroup: () => RadioGroup,
|
|
76
76
|
RadioMenuItem: () => RadioMenuItem,
|
|
77
77
|
ScreenReaderOnly: () => ScreenReaderOnly,
|
|
78
|
+
SegmentedControl: () => SegmentedControl,
|
|
79
|
+
SegmentedControlItem: () => SegmentedControlItem,
|
|
78
80
|
Select: () => Select,
|
|
79
81
|
SelectOption: () => SelectOption,
|
|
80
82
|
SelectOptionGroup: () => SelectOptionGroup,
|
|
@@ -6042,7 +6044,7 @@ var StyledBadge = import_styled_components22.default.div`
|
|
|
6042
6044
|
padding: var(--wui-space-01) var(--wui-space-02);
|
|
6043
6045
|
width: fit-content;
|
|
6044
6046
|
|
|
6045
|
-
/*
|
|
6047
|
+
/* Icon component size */
|
|
6046
6048
|
svg {
|
|
6047
6049
|
height: 12px;
|
|
6048
6050
|
width: 12px;
|
|
@@ -6149,77 +6151,113 @@ var wrapChildren = (children) => {
|
|
|
6149
6151
|
}
|
|
6150
6152
|
return null;
|
|
6151
6153
|
};
|
|
6152
|
-
var Box = (
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
}
|
|
6154
|
+
var Box = (0, import_react16.forwardRef)(
|
|
6155
|
+
({
|
|
6156
|
+
alignContent = "stretch",
|
|
6157
|
+
alignItems = "flex-start",
|
|
6158
|
+
alignSelf,
|
|
6159
|
+
basis,
|
|
6160
|
+
children,
|
|
6161
|
+
direction = "row",
|
|
6162
|
+
fill = false,
|
|
6163
|
+
fillViewport = false,
|
|
6164
|
+
gap,
|
|
6165
|
+
grow,
|
|
6166
|
+
hasBoxParent = false,
|
|
6167
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
6168
|
+
inline = false,
|
|
6169
|
+
justifyContent = "flex-start",
|
|
6170
|
+
order,
|
|
6171
|
+
shrink,
|
|
6172
|
+
wrapItems = false,
|
|
6173
|
+
...otherProps
|
|
6174
|
+
}, ref) => {
|
|
6175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
|
|
6176
|
+
BoxComponent,
|
|
6177
|
+
{
|
|
6178
|
+
ref,
|
|
6179
|
+
$alignContent: alignContent,
|
|
6180
|
+
$alignItems: alignItems,
|
|
6181
|
+
$alignSelf: alignSelf,
|
|
6182
|
+
$basis: basis,
|
|
6183
|
+
$fillBox: fill,
|
|
6184
|
+
$fillViewport: fillViewport,
|
|
6185
|
+
$flexDirection: direction,
|
|
6186
|
+
$gap: gap,
|
|
6187
|
+
$grow: grow,
|
|
6188
|
+
$inline: inline,
|
|
6189
|
+
$justifyContent: justifyContent,
|
|
6190
|
+
$order: order,
|
|
6191
|
+
$shrink: shrink,
|
|
6192
|
+
$wrapItems: wrapItems,
|
|
6193
|
+
as: "div",
|
|
6194
|
+
...otherProps,
|
|
6195
|
+
children: wrapChildren(children)
|
|
6196
|
+
}
|
|
6197
|
+
);
|
|
6198
|
+
}
|
|
6199
|
+
);
|
|
6195
6200
|
Box.displayName = "Box";
|
|
6196
6201
|
|
|
6197
6202
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
6203
|
+
var import_react17 = require("react");
|
|
6198
6204
|
var import_styled_components24 = __toESM(require("styled-components"));
|
|
6199
6205
|
var import_jsx_runtime168 = require("react/jsx-runtime");
|
|
6200
6206
|
var StyledBreadcrumbs = import_styled_components24.default.nav`
|
|
6201
6207
|
display: flex;
|
|
6202
6208
|
align-items: center;
|
|
6203
6209
|
gap: var(--wui-space-01);
|
|
6210
|
+
overflow: hidden;
|
|
6204
6211
|
|
|
6205
|
-
>
|
|
6212
|
+
> [data-wui-breadcrumb-divider]:last-of-type {
|
|
6206
6213
|
display: none;
|
|
6207
6214
|
}
|
|
6208
6215
|
`;
|
|
6216
|
+
var BUFFER_WIDTH = 10;
|
|
6209
6217
|
var Breadcrumbs = ({ children, ...props }) => {
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
+
const { isXsAndDown } = useMq();
|
|
6219
|
+
let crumbs = import_react17.Children.toArray(children);
|
|
6220
|
+
if (isXsAndDown) {
|
|
6221
|
+
crumbs = crumbs.slice(-1);
|
|
6222
|
+
}
|
|
6223
|
+
const crumbMaxWidth = Math.floor(100 / crumbs.length) - BUFFER_WIDTH;
|
|
6224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(import_jsx_runtime168.Fragment, { children: [
|
|
6225
|
+
/* @__PURE__ */ (0, import_jsx_runtime168.jsx)("style", { type: "text/css", children: `
|
|
6226
|
+
[data-wui-breadcrumbs] {
|
|
6227
|
+
container-type: inline-size;
|
|
6228
|
+
container-name: breadcrumbs;
|
|
6229
|
+
}
|
|
6230
|
+
|
|
6231
|
+
@container breadcrumbs (width < 100vw) {
|
|
6232
|
+
[data-wui-breadcrumb] {
|
|
6233
|
+
max-width: ${crumbMaxWidth}cqw;
|
|
6234
|
+
}
|
|
6235
|
+
}
|
|
6236
|
+
` }),
|
|
6237
|
+
/* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
|
|
6238
|
+
StyledBreadcrumbs,
|
|
6239
|
+
{
|
|
6240
|
+
"aria-label": "Breadcrumbs",
|
|
6241
|
+
"data-wui-breadcrumbs": true,
|
|
6242
|
+
...props,
|
|
6243
|
+
children: crumbs
|
|
6244
|
+
}
|
|
6245
|
+
)
|
|
6246
|
+
] });
|
|
6218
6247
|
};
|
|
6219
6248
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
6220
6249
|
|
|
6221
6250
|
// src/components/Breadcrumbs/Breadcrumb.tsx
|
|
6251
|
+
var import_styled_components25 = __toESM(require("styled-components"));
|
|
6222
6252
|
var import_jsx_runtime169 = require("react/jsx-runtime");
|
|
6253
|
+
var BreadcrumbContent = import_styled_components25.default.span`
|
|
6254
|
+
overflow: hidden;
|
|
6255
|
+
white-space: nowrap;
|
|
6256
|
+
display: block;
|
|
6257
|
+
text-overflow: ellipsis;
|
|
6258
|
+
text-align: left;
|
|
6259
|
+
flex: 0;
|
|
6260
|
+
`;
|
|
6223
6261
|
var Breadcrumb = ({ icon, href, children, ...props }) => {
|
|
6224
6262
|
return /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)(import_jsx_runtime169.Fragment, { children: [
|
|
6225
6263
|
/* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
|
|
@@ -6229,21 +6267,22 @@ var Breadcrumb = ({ icon, href, children, ...props }) => {
|
|
|
6229
6267
|
href,
|
|
6230
6268
|
leftIcon: icon,
|
|
6231
6269
|
variant: "ghost",
|
|
6232
|
-
children
|
|
6270
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(BreadcrumbContent, { "data-wui-breadcrumb": true, children })
|
|
6233
6271
|
}
|
|
6234
6272
|
),
|
|
6235
|
-
/* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
|
|
6273
|
+
/* @__PURE__ */ (0, import_jsx_runtime169.jsx)("div", { "data-wui-breadcrumb-divider": true, children: /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
|
|
6236
6274
|
Icon,
|
|
6237
6275
|
{
|
|
6238
6276
|
size: "sm",
|
|
6277
|
+
style: { flex: "0 1 auto" },
|
|
6239
6278
|
type: "caret-right"
|
|
6240
6279
|
}
|
|
6241
|
-
)
|
|
6280
|
+
) })
|
|
6242
6281
|
] });
|
|
6243
6282
|
};
|
|
6244
6283
|
|
|
6245
6284
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
6246
|
-
var
|
|
6285
|
+
var import_styled_components26 = __toESM(require("styled-components"));
|
|
6247
6286
|
var import_type_guards16 = require("@wistia/type-guards");
|
|
6248
6287
|
var import_jsx_runtime170 = require("react/jsx-runtime");
|
|
6249
6288
|
var getAlignment = (align) => {
|
|
@@ -6258,7 +6297,7 @@ var getAlignment = (align) => {
|
|
|
6258
6297
|
}
|
|
6259
6298
|
return "flex-start";
|
|
6260
6299
|
};
|
|
6261
|
-
var ButtonGroupComponent =
|
|
6300
|
+
var ButtonGroupComponent = import_styled_components26.default.div`
|
|
6262
6301
|
display: flex;
|
|
6263
6302
|
|
|
6264
6303
|
/* this helps ensure that primary buttons appear at the top of the column */
|
|
@@ -6300,9 +6339,9 @@ var ButtonGroup = ({
|
|
|
6300
6339
|
ButtonGroup.displayName = "ButtonGroup";
|
|
6301
6340
|
|
|
6302
6341
|
// src/components/Card/Card.tsx
|
|
6303
|
-
var
|
|
6342
|
+
var import_styled_components27 = __toESM(require("styled-components"));
|
|
6304
6343
|
var import_jsx_runtime171 = require("react/jsx-runtime");
|
|
6305
|
-
var StyledCard = (0,
|
|
6344
|
+
var StyledCard = (0, import_styled_components27.default)(Box)`
|
|
6306
6345
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
6307
6346
|
box-sizing: border-box;
|
|
6308
6347
|
padding: ${({ $paddingSize }) => `var(--wui-${$paddingSize})`};
|
|
@@ -6351,17 +6390,17 @@ var Card = ({
|
|
|
6351
6390
|
Card.displayName = "Card";
|
|
6352
6391
|
|
|
6353
6392
|
// src/components/Checkbox/Checkbox.tsx
|
|
6354
|
-
var
|
|
6393
|
+
var import_react19 = require("react");
|
|
6355
6394
|
var import_react_checkbox = require("@radix-ui/react-checkbox");
|
|
6356
|
-
var
|
|
6395
|
+
var import_styled_components31 = __toESM(require("styled-components"));
|
|
6357
6396
|
var import_type_guards18 = require("@wistia/type-guards");
|
|
6358
6397
|
|
|
6359
6398
|
// src/components/Label/Label.tsx
|
|
6360
|
-
var
|
|
6399
|
+
var import_styled_components29 = __toESM(require("styled-components"));
|
|
6361
6400
|
|
|
6362
6401
|
// src/components/Heading/Heading.tsx
|
|
6363
|
-
var
|
|
6364
|
-
var
|
|
6402
|
+
var import_react18 = require("react");
|
|
6403
|
+
var import_styled_components28 = __toESM(require("styled-components"));
|
|
6365
6404
|
|
|
6366
6405
|
// src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
6367
6406
|
var makePolymorphic = (component) => {
|
|
@@ -6370,43 +6409,43 @@ var makePolymorphic = (component) => {
|
|
|
6370
6409
|
|
|
6371
6410
|
// src/components/Heading/Heading.tsx
|
|
6372
6411
|
var import_jsx_runtime172 = require("react/jsx-runtime");
|
|
6373
|
-
var heroStyle =
|
|
6412
|
+
var heroStyle = import_styled_components28.css`
|
|
6374
6413
|
--font-family: var(--wui-typography-heading-hero-family);
|
|
6375
6414
|
--font-size: var(--wui-typography-heading-hero-size);
|
|
6376
6415
|
--font-weight: var(--wui-typography-heading-hero-weight);
|
|
6377
6416
|
--line-height: var(--wui-typography-heading-hero-line-height);
|
|
6378
6417
|
`;
|
|
6379
|
-
var heading1TextStyle =
|
|
6418
|
+
var heading1TextStyle = import_styled_components28.css`
|
|
6380
6419
|
--font-family: var(--wui-typography-heading-1-family);
|
|
6381
6420
|
--font-size: var(--wui-typography-heading-1-size);
|
|
6382
6421
|
--font-weight: var(--wui-typography-heading-1-weight);
|
|
6383
6422
|
--line-height: var(--wui-typography-heading-1-line-height);
|
|
6384
6423
|
`;
|
|
6385
|
-
var heading2TextStyle =
|
|
6424
|
+
var heading2TextStyle = import_styled_components28.css`
|
|
6386
6425
|
--font-family: var(--wui-typography-heading-2-family);
|
|
6387
6426
|
--font-size: var(--wui-typography-heading-2-size);
|
|
6388
6427
|
--font-weight: var(--wui-typography-heading-2-weight);
|
|
6389
6428
|
--line-height: var(--wui-typography-heading-2-line-height);
|
|
6390
6429
|
`;
|
|
6391
|
-
var heading3TextStyle =
|
|
6430
|
+
var heading3TextStyle = import_styled_components28.css`
|
|
6392
6431
|
--font-family: var(--wui-typography-heading-3-family);
|
|
6393
6432
|
--font-size: var(--wui-typography-heading-3-size);
|
|
6394
6433
|
--font-weight: var(--wui-typography-heading-3-weight);
|
|
6395
6434
|
--line-height: var(--wui-typography-heading-3-line-height);
|
|
6396
6435
|
`;
|
|
6397
|
-
var heading4TextStyle =
|
|
6436
|
+
var heading4TextStyle = import_styled_components28.css`
|
|
6398
6437
|
--font-family: var(--wui-typography-heading-4-family);
|
|
6399
6438
|
--font-size: var(--wui-typography-heading-4-size);
|
|
6400
6439
|
--font-weight: var(--wui-typography-heading-4-weight);
|
|
6401
6440
|
--line-height: var(--wui-typography-heading-4-line-height);
|
|
6402
6441
|
`;
|
|
6403
|
-
var heading5TextStyle =
|
|
6442
|
+
var heading5TextStyle = import_styled_components28.css`
|
|
6404
6443
|
--font-family: var(--wui-typography-heading-5-family);
|
|
6405
6444
|
--font-size: var(--wui-typography-heading-5-size);
|
|
6406
6445
|
--font-weight: var(--wui-typography-heading-5-weight);
|
|
6407
6446
|
--line-height: var(--wui-typography-heading-5-line-height);
|
|
6408
6447
|
`;
|
|
6409
|
-
var heading6TextStyle =
|
|
6448
|
+
var heading6TextStyle = import_styled_components28.css`
|
|
6410
6449
|
--font-family: var(--wui-typography-heading-6-family);
|
|
6411
6450
|
--font-size: var(--wui-typography-heading-6-size);
|
|
6412
6451
|
--font-weight: var(--wui-typography-heading-6-weight);
|
|
@@ -6422,7 +6461,7 @@ var variantStyleMap = {
|
|
|
6422
6461
|
heading6: heading6TextStyle
|
|
6423
6462
|
};
|
|
6424
6463
|
var DEFAULT_ELEMENT = "h1";
|
|
6425
|
-
var StyledHeading =
|
|
6464
|
+
var StyledHeading = import_styled_components28.default.div`
|
|
6426
6465
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
6427
6466
|
font-family: var(--font-family);
|
|
6428
6467
|
font-size: var(--font-size);
|
|
@@ -6431,16 +6470,16 @@ var StyledHeading = import_styled_components27.default.div`
|
|
|
6431
6470
|
color: var(--wui-color-text);
|
|
6432
6471
|
${({ $variant }) => variantStyleMap[$variant]}
|
|
6433
6472
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
6434
|
-
${({ $inline }) => $inline &&
|
|
6473
|
+
${({ $inline }) => $inline && import_styled_components28.css`
|
|
6435
6474
|
display: inline-block;
|
|
6436
6475
|
`}
|
|
6437
|
-
${({ $disabled }) => $disabled &&
|
|
6476
|
+
${({ $disabled }) => $disabled && import_styled_components28.css`
|
|
6438
6477
|
color: var(--wui-color-text-disabled);
|
|
6439
6478
|
`}
|
|
6440
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
6479
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components28.css`
|
|
6441
6480
|
user-select: none;
|
|
6442
6481
|
`}
|
|
6443
|
-
${({ $align }) =>
|
|
6482
|
+
${({ $align }) => import_styled_components28.css`
|
|
6444
6483
|
text-align: ${$align};
|
|
6445
6484
|
`}
|
|
6446
6485
|
margin: 0;
|
|
@@ -6454,7 +6493,7 @@ var variantElementMap = {
|
|
|
6454
6493
|
heading5: "h5",
|
|
6455
6494
|
heading6: "h6"
|
|
6456
6495
|
};
|
|
6457
|
-
var HeadingComponent = (0,
|
|
6496
|
+
var HeadingComponent = (0, import_react18.forwardRef)(
|
|
6458
6497
|
({
|
|
6459
6498
|
align = "left",
|
|
6460
6499
|
colorScheme = "inherit",
|
|
@@ -6486,7 +6525,7 @@ var Heading = makePolymorphic(HeadingComponent);
|
|
|
6486
6525
|
|
|
6487
6526
|
// src/components/Label/Label.tsx
|
|
6488
6527
|
var import_jsx_runtime173 = require("react/jsx-runtime");
|
|
6489
|
-
var requiredStyle =
|
|
6528
|
+
var requiredStyle = import_styled_components29.css`
|
|
6490
6529
|
&::after {
|
|
6491
6530
|
color: var(--wui-color-text-error);
|
|
6492
6531
|
display: inline;
|
|
@@ -6494,10 +6533,10 @@ var requiredStyle = import_styled_components28.css`
|
|
|
6494
6533
|
content: '*';
|
|
6495
6534
|
}
|
|
6496
6535
|
`;
|
|
6497
|
-
var disabledStyle =
|
|
6536
|
+
var disabledStyle = import_styled_components29.css`
|
|
6498
6537
|
color: var(--wui-color-text-disabled);
|
|
6499
6538
|
`;
|
|
6500
|
-
var StyledLabel2 = (0,
|
|
6539
|
+
var StyledLabel2 = (0, import_styled_components29.default)(Heading).attrs({
|
|
6501
6540
|
variant: "heading6",
|
|
6502
6541
|
renderAs: "label"
|
|
6503
6542
|
})`
|
|
@@ -6540,10 +6579,10 @@ var Label = ({
|
|
|
6540
6579
|
Label.displayName = "Label";
|
|
6541
6580
|
|
|
6542
6581
|
// src/components/Label/LabelDescription.tsx
|
|
6543
|
-
var
|
|
6582
|
+
var import_styled_components30 = __toESM(require("styled-components"));
|
|
6544
6583
|
var import_type_guards17 = require("@wistia/type-guards");
|
|
6545
6584
|
var import_jsx_runtime174 = require("react/jsx-runtime");
|
|
6546
|
-
var StyledLabelDescription =
|
|
6585
|
+
var StyledLabelDescription = import_styled_components30.default.div`
|
|
6547
6586
|
color: var(--wui-color-text-secondary);
|
|
6548
6587
|
font-size: var(--wui-typography-body-4-size);
|
|
6549
6588
|
font-weight: var(--wui-typography-body-4-weight);
|
|
@@ -6579,7 +6618,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
|
|
|
6579
6618
|
)
|
|
6580
6619
|
}
|
|
6581
6620
|
);
|
|
6582
|
-
var StyledCheckboxWrapper =
|
|
6621
|
+
var StyledCheckboxWrapper = import_styled_components31.default.div`
|
|
6583
6622
|
display: flex;
|
|
6584
6623
|
align-items: center;
|
|
6585
6624
|
cursor: pointer;
|
|
@@ -6593,7 +6632,7 @@ var StyledCheckboxWrapper = import_styled_components30.default.div`
|
|
|
6593
6632
|
background-color: #efefef;
|
|
6594
6633
|
}
|
|
6595
6634
|
`;
|
|
6596
|
-
var StyledCheckboxRoot = (0,
|
|
6635
|
+
var StyledCheckboxRoot = (0, import_styled_components31.default)(import_react_checkbox.Root)`
|
|
6597
6636
|
all: unset; /* CheckboxRoot renders as a button element, so we need to reset all styles */
|
|
6598
6637
|
background-color: var(--wui-color-bg-fill-white);
|
|
6599
6638
|
min-width: 16px;
|
|
@@ -6627,15 +6666,15 @@ var StyledCheckboxRoot = (0, import_styled_components30.default)(import_react_ch
|
|
|
6627
6666
|
/* TODO Lamp to design focus state */
|
|
6628
6667
|
}
|
|
6629
6668
|
`;
|
|
6630
|
-
var StyledCheckboxIndicator = (0,
|
|
6669
|
+
var StyledCheckboxIndicator = (0, import_styled_components31.default)(import_react_checkbox.Indicator)`
|
|
6631
6670
|
display: flex;
|
|
6632
6671
|
`;
|
|
6633
|
-
var StyledLabelWrapper =
|
|
6672
|
+
var StyledLabelWrapper = import_styled_components31.default.div`
|
|
6634
6673
|
display: flex;
|
|
6635
6674
|
flex-direction: column;
|
|
6636
6675
|
margin-left: var(--wui-space-02);
|
|
6637
6676
|
`;
|
|
6638
|
-
var Checkbox = (0,
|
|
6677
|
+
var Checkbox = (0, import_react19.forwardRef)(
|
|
6639
6678
|
({
|
|
6640
6679
|
checked,
|
|
6641
6680
|
disabled = false,
|
|
@@ -6649,7 +6688,7 @@ var Checkbox = (0, import_react18.forwardRef)(
|
|
|
6649
6688
|
value = "false",
|
|
6650
6689
|
...otherProps
|
|
6651
6690
|
}, ref) => {
|
|
6652
|
-
const generatedId = (0,
|
|
6691
|
+
const generatedId = (0, import_react19.useId)();
|
|
6653
6692
|
const computedId = (0, import_type_guards18.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-group-${generatedId}`;
|
|
6654
6693
|
return /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(StyledCheckboxWrapper, { children: [
|
|
6655
6694
|
/* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
|
|
@@ -6698,22 +6737,22 @@ var Checkbox = (0, import_react18.forwardRef)(
|
|
|
6698
6737
|
Checkbox.displayName = "Checkbox";
|
|
6699
6738
|
|
|
6700
6739
|
// src/components/Divider/Divider.tsx
|
|
6701
|
-
var
|
|
6740
|
+
var import_styled_components32 = __toESM(require("styled-components"));
|
|
6702
6741
|
var import_jsx_runtime176 = require("react/jsx-runtime");
|
|
6703
|
-
var horizontalBorderCss =
|
|
6742
|
+
var horizontalBorderCss = import_styled_components32.css`
|
|
6704
6743
|
border-top-color: var(--wui-color-border);
|
|
6705
6744
|
border-top-style: solid;
|
|
6706
6745
|
border-top-width: 1px;
|
|
6707
6746
|
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
6708
6747
|
height: 0;
|
|
6709
6748
|
`;
|
|
6710
|
-
var verticalBorderCss =
|
|
6749
|
+
var verticalBorderCss = import_styled_components32.css`
|
|
6711
6750
|
background-color: var(--wui-color-border);
|
|
6712
6751
|
max-width: 1px;
|
|
6713
6752
|
min-height: 100%;
|
|
6714
6753
|
width: 1px;
|
|
6715
6754
|
`;
|
|
6716
|
-
var DividerComponent =
|
|
6755
|
+
var DividerComponent = import_styled_components32.default.div`
|
|
6717
6756
|
${({ $orientation }) => {
|
|
6718
6757
|
switch ($orientation) {
|
|
6719
6758
|
case "vertical":
|
|
@@ -6741,21 +6780,21 @@ var Divider = ({
|
|
|
6741
6780
|
Divider.displayName = "Divider";
|
|
6742
6781
|
|
|
6743
6782
|
// src/components/Form/Form.tsx
|
|
6744
|
-
var
|
|
6745
|
-
var
|
|
6783
|
+
var import_react21 = require("react");
|
|
6784
|
+
var import_styled_components34 = __toESM(require("styled-components"));
|
|
6746
6785
|
var import_type_guards19 = require("@wistia/type-guards");
|
|
6747
6786
|
|
|
6748
6787
|
// src/components/Stack/Stack.tsx
|
|
6749
|
-
var
|
|
6750
|
-
var
|
|
6788
|
+
var import_react20 = require("react");
|
|
6789
|
+
var import_styled_components33 = __toESM(require("styled-components"));
|
|
6751
6790
|
var import_jsx_runtime177 = require("react/jsx-runtime");
|
|
6752
6791
|
var DEFAULT_ELEMENT2 = "div";
|
|
6753
|
-
var StyledStack =
|
|
6792
|
+
var StyledStack = import_styled_components33.default.div`
|
|
6754
6793
|
display: flex;
|
|
6755
6794
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
6756
6795
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
6757
6796
|
`;
|
|
6758
|
-
var StackComponent = (0,
|
|
6797
|
+
var StackComponent = (0, import_react20.forwardRef)(
|
|
6759
6798
|
({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
|
|
6760
6799
|
const responsiveGap = useResponsiveProp(gap);
|
|
6761
6800
|
const responsiveDirection = useResponsiveProp(direction);
|
|
@@ -6776,24 +6815,24 @@ var Stack = makePolymorphic(StackComponent);
|
|
|
6776
6815
|
|
|
6777
6816
|
// src/components/Form/Form.tsx
|
|
6778
6817
|
var import_jsx_runtime178 = require("react/jsx-runtime");
|
|
6779
|
-
var StyledForm =
|
|
6818
|
+
var StyledForm = import_styled_components34.default.form`
|
|
6780
6819
|
--form-default-width: 690px;
|
|
6781
6820
|
|
|
6782
6821
|
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
6783
6822
|
align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
|
|
6784
6823
|
`;
|
|
6785
|
-
var FormContext = (0,
|
|
6824
|
+
var FormContext = (0, import_react21.createContext)({
|
|
6786
6825
|
values: {},
|
|
6787
6826
|
errors: {},
|
|
6788
6827
|
hasSubmitted: false,
|
|
6789
6828
|
formId: ""
|
|
6790
6829
|
});
|
|
6791
6830
|
var FormComponent = ({ children, action, values = {}, validate, fullWidth = false, ...props }, forwardedRef) => {
|
|
6792
|
-
const [errors, setErrors] = (0,
|
|
6793
|
-
const [hasSubmitted, setHasSubmitted] = (0,
|
|
6794
|
-
const innerRef = (0,
|
|
6831
|
+
const [errors, setErrors] = (0, import_react21.useState)({});
|
|
6832
|
+
const [hasSubmitted, setHasSubmitted] = (0, import_react21.useState)(false);
|
|
6833
|
+
const innerRef = (0, import_react21.useRef)();
|
|
6795
6834
|
const ref = forwardedRef ?? innerRef;
|
|
6796
|
-
const autoId = (0,
|
|
6835
|
+
const autoId = (0, import_react21.useId)();
|
|
6797
6836
|
const id = props.id ?? autoId;
|
|
6798
6837
|
const handleValidate = (nextFormData) => {
|
|
6799
6838
|
const nextData = Object.fromEntries(nextFormData.entries());
|
|
@@ -6835,7 +6874,7 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
|
|
|
6835
6874
|
void action(null);
|
|
6836
6875
|
}
|
|
6837
6876
|
};
|
|
6838
|
-
const context = (0,
|
|
6877
|
+
const context = (0, import_react21.useMemo)(() => {
|
|
6839
6878
|
return {
|
|
6840
6879
|
values,
|
|
6841
6880
|
errors,
|
|
@@ -6863,15 +6902,15 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
|
|
|
6863
6902
|
);
|
|
6864
6903
|
};
|
|
6865
6904
|
FormComponent.displayName = "Form";
|
|
6866
|
-
var Form = (0,
|
|
6905
|
+
var Form = (0, import_react21.forwardRef)(FormComponent);
|
|
6867
6906
|
|
|
6868
6907
|
// src/components/Form/useFormState.tsx
|
|
6869
|
-
var
|
|
6908
|
+
var import_react22 = require("react");
|
|
6870
6909
|
var useFormState = (action, initialData = {}) => {
|
|
6871
|
-
const [data, setData] = (0,
|
|
6872
|
-
const [isPending, setIsPending] = (0,
|
|
6873
|
-
const [error, setError] = (0,
|
|
6874
|
-
const formAction = (0,
|
|
6910
|
+
const [data, setData] = (0, import_react22.useState)(initialData);
|
|
6911
|
+
const [isPending, setIsPending] = (0, import_react22.useState)(false);
|
|
6912
|
+
const [error, setError] = (0, import_react22.useState)(null);
|
|
6913
|
+
const formAction = (0, import_react22.useCallback)(
|
|
6875
6914
|
async (nextFormData) => {
|
|
6876
6915
|
if (nextFormData === null) {
|
|
6877
6916
|
setData(initialData);
|
|
@@ -6902,15 +6941,15 @@ var useFormState = (action, initialData = {}) => {
|
|
|
6902
6941
|
};
|
|
6903
6942
|
|
|
6904
6943
|
// src/components/Form/FormErrorSummary.tsx
|
|
6905
|
-
var
|
|
6944
|
+
var import_react23 = require("react");
|
|
6906
6945
|
var import_type_guards20 = require("@wistia/type-guards");
|
|
6907
6946
|
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
6908
6947
|
var ErrorItem = ({ name, error, formId }) => {
|
|
6909
6948
|
return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(Link, { href: `${formId}-${name}`, children: error }) }, name);
|
|
6910
6949
|
};
|
|
6911
6950
|
var FormErrorSummary = ({ description }) => {
|
|
6912
|
-
const ref = (0,
|
|
6913
|
-
const { formId, errors, hasSubmitted } = (0,
|
|
6951
|
+
const ref = (0, import_react23.useRef)(null);
|
|
6952
|
+
const { formId, errors, hasSubmitted } = (0, import_react23.useContext)(FormContext);
|
|
6914
6953
|
const isValid = Object.keys(errors).length === 0;
|
|
6915
6954
|
if (isValid || !hasSubmitted) {
|
|
6916
6955
|
return null;
|
|
@@ -6940,95 +6979,95 @@ var FormErrorSummary = ({ description }) => {
|
|
|
6940
6979
|
};
|
|
6941
6980
|
|
|
6942
6981
|
// src/components/FormField/FormField.tsx
|
|
6943
|
-
var
|
|
6944
|
-
var
|
|
6982
|
+
var import_react27 = require("react");
|
|
6983
|
+
var import_styled_components37 = __toESM(require("styled-components"));
|
|
6945
6984
|
var import_type_guards21 = require("@wistia/type-guards");
|
|
6946
6985
|
|
|
6947
6986
|
// src/components/Text/Text.tsx
|
|
6948
|
-
var
|
|
6949
|
-
var
|
|
6987
|
+
var import_react24 = require("react");
|
|
6988
|
+
var import_styled_components35 = __toESM(require("styled-components"));
|
|
6950
6989
|
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
6951
|
-
var bodyBoldStyles =
|
|
6990
|
+
var bodyBoldStyles = import_styled_components35.css`
|
|
6952
6991
|
> strong,
|
|
6953
6992
|
b {
|
|
6954
6993
|
font-weight: var(--wui-typography-weight-body-bold);
|
|
6955
6994
|
}
|
|
6956
6995
|
`;
|
|
6957
|
-
var labelBoldStyles =
|
|
6996
|
+
var labelBoldStyles = import_styled_components35.css`
|
|
6958
6997
|
> strong,
|
|
6959
6998
|
b {
|
|
6960
6999
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
6961
7000
|
}
|
|
6962
7001
|
`;
|
|
6963
|
-
var body1TextStyle =
|
|
7002
|
+
var body1TextStyle = import_styled_components35.css`
|
|
6964
7003
|
--font-family: var(--wui-typography-body-1-family);
|
|
6965
7004
|
--font-size: var(--wui-typography-body-1-size);
|
|
6966
7005
|
--font-weight: var(--wui-typography-body-1-weight);
|
|
6967
7006
|
--line-height: var(--wui-typography-body-1-line-height);
|
|
6968
7007
|
${bodyBoldStyles}
|
|
6969
7008
|
`;
|
|
6970
|
-
var body2TextStyle =
|
|
7009
|
+
var body2TextStyle = import_styled_components35.css`
|
|
6971
7010
|
--font-family: var(--wui-typography-body-2-family);
|
|
6972
7011
|
--font-size: var(--wui-typography-body-2-size);
|
|
6973
7012
|
--font-weight: var(--wui-typography-body-2-weight);
|
|
6974
7013
|
--line-height: var(--wui-typography-body-2-line-height);
|
|
6975
7014
|
${bodyBoldStyles}
|
|
6976
7015
|
`;
|
|
6977
|
-
var body3TextStyle =
|
|
7016
|
+
var body3TextStyle = import_styled_components35.css`
|
|
6978
7017
|
--font-family: var(--wui-typography-body-3-family);
|
|
6979
7018
|
--font-size: var(--wui-typography-body-3-size);
|
|
6980
7019
|
--font-weight: var(--wui-typography-body-3-weight);
|
|
6981
7020
|
--line-height: var(--wui-typography-body-3-line-height);
|
|
6982
7021
|
${bodyBoldStyles}
|
|
6983
7022
|
`;
|
|
6984
|
-
var body4TextStyle =
|
|
7023
|
+
var body4TextStyle = import_styled_components35.css`
|
|
6985
7024
|
--font-family: var(--wui-typography-body-4-family);
|
|
6986
7025
|
--font-size: var(--wui-typography-body-4-size);
|
|
6987
7026
|
--font-weight: var(--wui-typography-body-4-weight);
|
|
6988
7027
|
--line-height: var(--wui-typography-body-4-line-height);
|
|
6989
7028
|
${bodyBoldStyles}
|
|
6990
7029
|
`;
|
|
6991
|
-
var label1TextStyle =
|
|
7030
|
+
var label1TextStyle = import_styled_components35.css`
|
|
6992
7031
|
--font-family: var(--wui-typography-label-1-family);
|
|
6993
7032
|
--font-size: var(--wui-typography-label-1-size);
|
|
6994
7033
|
--font-weight: var(--wui-typography-label-1-weight);
|
|
6995
7034
|
--line-height: var(--wui-typography-label-1-line-height);
|
|
6996
7035
|
${labelBoldStyles}
|
|
6997
7036
|
`;
|
|
6998
|
-
var label2TextStyle =
|
|
7037
|
+
var label2TextStyle = import_styled_components35.css`
|
|
6999
7038
|
--font-family: var(--wui-typography-label-2-family);
|
|
7000
7039
|
--font-size: var(--wui-typography-label-2-size);
|
|
7001
7040
|
--font-weight: var(--wui-typography-label-2-weight);
|
|
7002
7041
|
--line-height: var(--wui-typography-label-2-line-height);
|
|
7003
7042
|
${labelBoldStyles}
|
|
7004
7043
|
`;
|
|
7005
|
-
var label3TextStyle =
|
|
7044
|
+
var label3TextStyle = import_styled_components35.css`
|
|
7006
7045
|
--font-family: var(--wui-typography-label-3-family);
|
|
7007
7046
|
--font-size: var(--wui-typography-label-3-size);
|
|
7008
7047
|
--font-weight: var(--wui-typography-label-3-weight);
|
|
7009
7048
|
--line-height: var(--wui-typography-label-3-line-height);
|
|
7010
7049
|
${labelBoldStyles}
|
|
7011
7050
|
`;
|
|
7012
|
-
var label4TextStyle =
|
|
7051
|
+
var label4TextStyle = import_styled_components35.css`
|
|
7013
7052
|
--font-family: var(--wui-typography-label-4-family);
|
|
7014
7053
|
--font-size: var(--wui-typography-label-4-size);
|
|
7015
7054
|
--font-weight: var(--wui-typography-label-4-weight);
|
|
7016
7055
|
--line-height: var(--wui-typography-label-4-line-height);
|
|
7017
7056
|
${labelBoldStyles}
|
|
7018
7057
|
`;
|
|
7019
|
-
var body1MonoTextStyle =
|
|
7058
|
+
var body1MonoTextStyle = import_styled_components35.css`
|
|
7020
7059
|
${body1TextStyle};
|
|
7021
7060
|
--font-family: var(--wui-typography-family-mono);
|
|
7022
7061
|
`;
|
|
7023
|
-
var body2MonoTextStyle =
|
|
7062
|
+
var body2MonoTextStyle = import_styled_components35.css`
|
|
7024
7063
|
${body2TextStyle};
|
|
7025
7064
|
--font-family: var(--wui-typography-family-mono);
|
|
7026
7065
|
`;
|
|
7027
|
-
var body3MonoTextStyle =
|
|
7066
|
+
var body3MonoTextStyle = import_styled_components35.css`
|
|
7028
7067
|
${body3TextStyle};
|
|
7029
7068
|
--font-family: var(--wui-typography-family-mono);
|
|
7030
7069
|
`;
|
|
7031
|
-
var body4MonoTextStyle =
|
|
7070
|
+
var body4MonoTextStyle = import_styled_components35.css`
|
|
7032
7071
|
${body4TextStyle};
|
|
7033
7072
|
--font-family: var(--wui-typography-family-mono);
|
|
7034
7073
|
`;
|
|
@@ -7046,7 +7085,7 @@ var variantStyleMap2 = {
|
|
|
7046
7085
|
label3: label3TextStyle,
|
|
7047
7086
|
label4: label4TextStyle
|
|
7048
7087
|
};
|
|
7049
|
-
var StyledText =
|
|
7088
|
+
var StyledText = import_styled_components35.default.div`
|
|
7050
7089
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7051
7090
|
--text-color: ${({ $prominence, $disabled }) => {
|
|
7052
7091
|
if ($disabled) {
|
|
@@ -7070,24 +7109,24 @@ var StyledText = import_styled_components34.default.div`
|
|
|
7070
7109
|
margin: 0;
|
|
7071
7110
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
7072
7111
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
7073
|
-
${({ $inline }) => $inline &&
|
|
7112
|
+
${({ $inline }) => $inline && import_styled_components35.css`
|
|
7074
7113
|
display: inline-block;
|
|
7075
7114
|
`}
|
|
7076
|
-
${({ $disabled }) => $disabled &&
|
|
7115
|
+
${({ $disabled }) => $disabled && import_styled_components35.css`
|
|
7077
7116
|
--text-color: var(--wui-color-text-disabled);
|
|
7078
7117
|
`}
|
|
7079
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
7118
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components35.css`
|
|
7080
7119
|
user-select: none;
|
|
7081
7120
|
`}
|
|
7082
|
-
${({ $align }) =>
|
|
7121
|
+
${({ $align }) => import_styled_components35.css`
|
|
7083
7122
|
text-align: ${$align};
|
|
7084
7123
|
`}
|
|
7085
|
-
${({ as }) => as === "p" &&
|
|
7124
|
+
${({ as }) => as === "p" && import_styled_components35.css`
|
|
7086
7125
|
display: block;
|
|
7087
7126
|
`}
|
|
7088
7127
|
`;
|
|
7089
7128
|
var DEFAULT_ELEMENT3 = "div";
|
|
7090
|
-
var TextComponent = (0,
|
|
7129
|
+
var TextComponent = (0, import_react24.forwardRef)(
|
|
7091
7130
|
({
|
|
7092
7131
|
align = "left",
|
|
7093
7132
|
colorScheme = "inherit",
|
|
@@ -7122,20 +7161,20 @@ TextComponent.displayName = "Text";
|
|
|
7122
7161
|
var Text = makePolymorphic(TextComponent);
|
|
7123
7162
|
|
|
7124
7163
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
7125
|
-
var
|
|
7164
|
+
var import_react26 = require("react");
|
|
7126
7165
|
|
|
7127
7166
|
// src/components/FormGroup/FormGroup.tsx
|
|
7128
|
-
var
|
|
7129
|
-
var
|
|
7167
|
+
var import_styled_components36 = __toESM(require("styled-components"));
|
|
7168
|
+
var import_react25 = require("react");
|
|
7130
7169
|
var import_jsx_runtime181 = require("react/jsx-runtime");
|
|
7131
|
-
var StyledFieldset =
|
|
7170
|
+
var StyledFieldset = import_styled_components36.default.fieldset`
|
|
7132
7171
|
border: 0;
|
|
7133
7172
|
`;
|
|
7134
|
-
var StyledLegend =
|
|
7173
|
+
var StyledLegend = import_styled_components36.default.legend`
|
|
7135
7174
|
margin-bottom: var(--space-01);
|
|
7136
7175
|
`;
|
|
7137
7176
|
var FormGroup = ({ children, label, ...props }) => {
|
|
7138
|
-
const ref = (0,
|
|
7177
|
+
const ref = (0, import_react25.useRef)();
|
|
7139
7178
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
|
|
7140
7179
|
Stack,
|
|
7141
7180
|
{
|
|
@@ -7160,7 +7199,7 @@ FormGroup.displayName = "FormGroup";
|
|
|
7160
7199
|
|
|
7161
7200
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
7162
7201
|
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
7163
|
-
var CheckboxGroupContext = (0,
|
|
7202
|
+
var CheckboxGroupContext = (0, import_react26.createContext)(null);
|
|
7164
7203
|
var CheckboxGroup = ({
|
|
7165
7204
|
children,
|
|
7166
7205
|
name,
|
|
@@ -7168,7 +7207,7 @@ var CheckboxGroup = ({
|
|
|
7168
7207
|
value,
|
|
7169
7208
|
...props
|
|
7170
7209
|
}) => {
|
|
7171
|
-
const context = (0,
|
|
7210
|
+
const context = (0, import_react26.useMemo)(() => {
|
|
7172
7211
|
return {
|
|
7173
7212
|
name,
|
|
7174
7213
|
onChange
|
|
@@ -7180,7 +7219,7 @@ CheckboxGroup.displayName = "CheckboxGroup";
|
|
|
7180
7219
|
|
|
7181
7220
|
// src/components/FormField/FormField.tsx
|
|
7182
7221
|
var import_jsx_runtime183 = require("react/jsx-runtime");
|
|
7183
|
-
var StyledFormField =
|
|
7222
|
+
var StyledFormField = import_styled_components37.default.div`
|
|
7184
7223
|
--form-field-spacing: var(--wui-space-01);
|
|
7185
7224
|
--form-field-error-color: var(--wui-color-text-secondary-error);
|
|
7186
7225
|
|
|
@@ -7188,7 +7227,7 @@ var StyledFormField = import_styled_components36.default.div`
|
|
|
7188
7227
|
flex-direction: column;
|
|
7189
7228
|
gap: var(--form-field-spacing);
|
|
7190
7229
|
`;
|
|
7191
|
-
var StyledErrorList =
|
|
7230
|
+
var StyledErrorList = import_styled_components37.default.ul`
|
|
7192
7231
|
margin: 0;
|
|
7193
7232
|
padding: 0;
|
|
7194
7233
|
padding-left: var(--wui-space-04);
|
|
@@ -7228,8 +7267,8 @@ var FormField = ({
|
|
|
7228
7267
|
value,
|
|
7229
7268
|
...props
|
|
7230
7269
|
}) => {
|
|
7231
|
-
const formState = (0,
|
|
7232
|
-
const checkboxGroup = (0,
|
|
7270
|
+
const formState = (0, import_react27.useContext)(FormContext);
|
|
7271
|
+
const checkboxGroup = (0, import_react27.useContext)(CheckboxGroupContext);
|
|
7233
7272
|
const id = props.id ?? `${formState.formId}-${name}`;
|
|
7234
7273
|
const isInlineLabel = children.type === Checkbox;
|
|
7235
7274
|
const computedError = error ?? formState.errors[name];
|
|
@@ -7264,10 +7303,10 @@ var FormField = ({
|
|
|
7264
7303
|
"aria-describedby": (0, import_type_guards21.isNotNil)(error) ? `${id}-error` : void 0
|
|
7265
7304
|
};
|
|
7266
7305
|
}
|
|
7267
|
-
|
|
7306
|
+
import_react27.Children.only(children);
|
|
7268
7307
|
return /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)(StyledFormField, { ...props, children: [
|
|
7269
7308
|
!isInlineLabel && /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(Label, { htmlFor: id, children: label }),
|
|
7270
|
-
(0,
|
|
7309
|
+
(0, import_react27.cloneElement)(children, childProps),
|
|
7271
7310
|
(0, import_type_guards21.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
|
|
7272
7311
|
ErrorMessages,
|
|
7273
7312
|
{
|
|
@@ -7280,9 +7319,9 @@ var FormField = ({
|
|
|
7280
7319
|
FormField.displayName = "FormField";
|
|
7281
7320
|
|
|
7282
7321
|
// src/components/FormGroup/RadioGroup.tsx
|
|
7283
|
-
var
|
|
7322
|
+
var import_react28 = require("react");
|
|
7284
7323
|
var import_jsx_runtime184 = require("react/jsx-runtime");
|
|
7285
|
-
var RadioGroupContext = (0,
|
|
7324
|
+
var RadioGroupContext = (0, import_react28.createContext)(null);
|
|
7286
7325
|
var RadioGroup = ({
|
|
7287
7326
|
children,
|
|
7288
7327
|
name,
|
|
@@ -7290,7 +7329,7 @@ var RadioGroup = ({
|
|
|
7290
7329
|
value,
|
|
7291
7330
|
...props
|
|
7292
7331
|
}) => {
|
|
7293
|
-
const context = (0,
|
|
7332
|
+
const context = (0, import_react28.useMemo)(() => {
|
|
7294
7333
|
return {
|
|
7295
7334
|
name,
|
|
7296
7335
|
onChange
|
|
@@ -7301,10 +7340,10 @@ var RadioGroup = ({
|
|
|
7301
7340
|
RadioGroup.displayName = "RadioGroup";
|
|
7302
7341
|
|
|
7303
7342
|
// src/components/IconButton/IconButton.tsx
|
|
7304
|
-
var
|
|
7305
|
-
var
|
|
7343
|
+
var import_react29 = require("react");
|
|
7344
|
+
var import_styled_components38 = __toESM(require("styled-components"));
|
|
7306
7345
|
var import_jsx_runtime185 = require("react/jsx-runtime");
|
|
7307
|
-
var StyledButton2 = (0,
|
|
7346
|
+
var StyledButton2 = (0, import_styled_components38.default)(Button)`
|
|
7308
7347
|
--icon-button-size-sm: 24px;
|
|
7309
7348
|
--icon-button-size-md: 32px;
|
|
7310
7349
|
--icon-button-size-lg: 40px;
|
|
@@ -7318,7 +7357,7 @@ var StyledButton2 = (0, import_styled_components37.default)(Button)`
|
|
|
7318
7357
|
align-items: center;
|
|
7319
7358
|
line-height: 1;
|
|
7320
7359
|
`;
|
|
7321
|
-
var IconButton = (0,
|
|
7360
|
+
var IconButton = (0, import_react29.forwardRef)(
|
|
7322
7361
|
({ children, label, size = "md", ...props }, ref) => {
|
|
7323
7362
|
const responsiveSize = useResponsiveProp(size);
|
|
7324
7363
|
return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
|
|
@@ -7329,7 +7368,7 @@ var IconButton = (0, import_react28.forwardRef)(
|
|
|
7329
7368
|
"aria-label": label,
|
|
7330
7369
|
"data-wistia-ui-icon-button": true,
|
|
7331
7370
|
size: responsiveSize,
|
|
7332
|
-
children: (0,
|
|
7371
|
+
children: (0, import_react29.cloneElement)(import_react29.Children.only(children), {
|
|
7333
7372
|
size: responsiveSize
|
|
7334
7373
|
})
|
|
7335
7374
|
}
|
|
@@ -7339,11 +7378,11 @@ var IconButton = (0, import_react28.forwardRef)(
|
|
|
7339
7378
|
IconButton.displayName = "IconButton";
|
|
7340
7379
|
|
|
7341
7380
|
// src/components/Input/Input.tsx
|
|
7342
|
-
var
|
|
7343
|
-
var
|
|
7381
|
+
var import_react30 = require("react");
|
|
7382
|
+
var import_styled_components39 = __toESM(require("styled-components"));
|
|
7344
7383
|
var import_type_guards22 = require("@wistia/type-guards");
|
|
7345
7384
|
var import_jsx_runtime186 = require("react/jsx-runtime");
|
|
7346
|
-
var inputStyles =
|
|
7385
|
+
var inputStyles = import_styled_components39.css`
|
|
7347
7386
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
7348
7387
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
7349
7388
|
--wui-input-color-border: var(--wui-color-border);
|
|
@@ -7384,7 +7423,7 @@ var inputStyles = import_styled_components38.css`
|
|
|
7384
7423
|
}
|
|
7385
7424
|
}
|
|
7386
7425
|
`;
|
|
7387
|
-
var StyledInputContainer =
|
|
7426
|
+
var StyledInputContainer = import_styled_components39.default.div`
|
|
7388
7427
|
display: inline-flex;
|
|
7389
7428
|
position: relative;
|
|
7390
7429
|
${inputStyles};
|
|
@@ -7431,7 +7470,7 @@ var StyledInputContainer = import_styled_components38.default.div`
|
|
|
7431
7470
|
var isValidRef = (ref) => {
|
|
7432
7471
|
return typeof ref === "object" && ref !== null && "current" in ref && (0, import_type_guards22.isNotNil)(ref.current);
|
|
7433
7472
|
};
|
|
7434
|
-
var Input = (0,
|
|
7473
|
+
var Input = (0, import_react30.forwardRef)(
|
|
7435
7474
|
({
|
|
7436
7475
|
fullWidth = false,
|
|
7437
7476
|
monospace = false,
|
|
@@ -7441,21 +7480,21 @@ var Input = (0, import_react29.forwardRef)(
|
|
|
7441
7480
|
rightIcon,
|
|
7442
7481
|
...props
|
|
7443
7482
|
}, externalRef) => {
|
|
7444
|
-
const internalRef = (0,
|
|
7483
|
+
const internalRef = (0, import_react30.useRef)();
|
|
7445
7484
|
const ref = isValidRef(externalRef) ? externalRef : internalRef;
|
|
7446
7485
|
let leftIconToDisplay = leftIcon;
|
|
7447
7486
|
if ((0, import_type_guards22.isNil)(leftIcon) && type === "search") {
|
|
7448
7487
|
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(Icon, { type: "search" });
|
|
7449
7488
|
}
|
|
7450
7489
|
if ((0, import_type_guards22.isNotNil)(leftIconToDisplay)) {
|
|
7451
|
-
leftIconToDisplay = (0,
|
|
7490
|
+
leftIconToDisplay = (0, import_react30.cloneElement)(leftIconToDisplay, {
|
|
7452
7491
|
size: "md",
|
|
7453
7492
|
className: "wui-input-left-icon"
|
|
7454
7493
|
});
|
|
7455
7494
|
}
|
|
7456
7495
|
let rightIconToDisplay = rightIcon;
|
|
7457
7496
|
if ((0, import_type_guards22.isNotNil)(rightIconToDisplay)) {
|
|
7458
|
-
rightIconToDisplay = (0,
|
|
7497
|
+
rightIconToDisplay = (0, import_react30.cloneElement)(rightIconToDisplay, {
|
|
7459
7498
|
size: "md",
|
|
7460
7499
|
className: "wui-input-right-icon"
|
|
7461
7500
|
});
|
|
@@ -7502,19 +7541,19 @@ var Input = (0, import_react29.forwardRef)(
|
|
|
7502
7541
|
Input.displayName = "Input";
|
|
7503
7542
|
|
|
7504
7543
|
// src/components/Menu/Menu.tsx
|
|
7505
|
-
var
|
|
7544
|
+
var import_styled_components40 = __toESM(require("styled-components"));
|
|
7506
7545
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
7507
7546
|
var import_type_guards23 = require("@wistia/type-guards");
|
|
7508
|
-
var
|
|
7547
|
+
var import_react32 = require("react");
|
|
7509
7548
|
|
|
7510
7549
|
// src/components/Menu/MenuContext.tsx
|
|
7511
|
-
var
|
|
7512
|
-
var MenuContext = (0,
|
|
7513
|
-
var useMenuContext = () => (0,
|
|
7550
|
+
var import_react31 = require("react");
|
|
7551
|
+
var MenuContext = (0, import_react31.createContext)({ compact: false });
|
|
7552
|
+
var useMenuContext = () => (0, import_react31.useContext)(MenuContext);
|
|
7514
7553
|
|
|
7515
7554
|
// src/components/Menu/Menu.tsx
|
|
7516
7555
|
var import_jsx_runtime187 = require("react/jsx-runtime");
|
|
7517
|
-
var open =
|
|
7556
|
+
var open = import_styled_components40.keyframes`
|
|
7518
7557
|
from {
|
|
7519
7558
|
opacity: 0;
|
|
7520
7559
|
transform: scale(.97) translateY(-8px);
|
|
@@ -7524,7 +7563,7 @@ var open = import_styled_components39.keyframes`
|
|
|
7524
7563
|
transform: scale(1);
|
|
7525
7564
|
}
|
|
7526
7565
|
`;
|
|
7527
|
-
var close =
|
|
7566
|
+
var close = import_styled_components40.keyframes`
|
|
7528
7567
|
from {
|
|
7529
7568
|
opacity: 1;
|
|
7530
7569
|
transform: scale(1);
|
|
@@ -7534,7 +7573,7 @@ var close = import_styled_components39.keyframes`
|
|
|
7534
7573
|
transform: scale(.97) translateY(-8px);
|
|
7535
7574
|
}
|
|
7536
7575
|
`;
|
|
7537
|
-
var menuItemCss =
|
|
7576
|
+
var menuItemCss = import_styled_components40.css`
|
|
7538
7577
|
--menu-label-description-gap: var(--wui-space-01);
|
|
7539
7578
|
--menu-item-inner-gap: var(--wui-space-03);
|
|
7540
7579
|
--menu-item-left-icon-size: 24px;
|
|
@@ -7545,7 +7584,7 @@ var menuItemCss = import_styled_components39.css`
|
|
|
7545
7584
|
--menu-label-line-height: var(--wui-typography-label-3-line-height);
|
|
7546
7585
|
--menu-divider-margin: var(--wui-space-02);
|
|
7547
7586
|
`;
|
|
7548
|
-
var compactMenuItemCss =
|
|
7587
|
+
var compactMenuItemCss = import_styled_components40.css`
|
|
7549
7588
|
--menu-label-description-gap: 0;
|
|
7550
7589
|
--menu-item-inner-gap: var(--wui-space-02);
|
|
7551
7590
|
--menu-item-left-icon-size: 16px;
|
|
@@ -7556,7 +7595,7 @@ var compactMenuItemCss = import_styled_components39.css`
|
|
|
7556
7595
|
--menu-label-line-height: var(--wui-typography-label-4-line-height);
|
|
7557
7596
|
--menu-divider-margin: var(--wui-space-01);
|
|
7558
7597
|
`;
|
|
7559
|
-
var menuContentCss =
|
|
7598
|
+
var menuContentCss = import_styled_components40.css`
|
|
7560
7599
|
--menu-font-family: var(--wui-typography-family-default);
|
|
7561
7600
|
--menu-bg: var(--wui-color-bg-surface);
|
|
7562
7601
|
--menu-shadow: 0 0 64px 0 rgba(0 0 0 / 8%); /* TODO - Need a box-shadow token */
|
|
@@ -7597,7 +7636,7 @@ var menuContentCss = import_styled_components39.css`
|
|
|
7597
7636
|
margin: var(--menu-divider-margin) 0;
|
|
7598
7637
|
}
|
|
7599
7638
|
`;
|
|
7600
|
-
var MenuContent = (0,
|
|
7639
|
+
var MenuContent = (0, import_styled_components40.default)(import_react_dropdown_menu.DropdownMenuContent)`
|
|
7601
7640
|
${menuContentCss}
|
|
7602
7641
|
`;
|
|
7603
7642
|
var Menu = ({
|
|
@@ -7613,7 +7652,7 @@ var Menu = ({
|
|
|
7613
7652
|
onInteractOutside,
|
|
7614
7653
|
...props
|
|
7615
7654
|
}) => {
|
|
7616
|
-
const contextValue = (0,
|
|
7655
|
+
const contextValue = (0, import_react32.useMemo)(() => ({ compact }), [compact]);
|
|
7617
7656
|
let controlProps = {
|
|
7618
7657
|
...(0, import_type_guards23.isNotNil)(onOpenChange) && (0, import_type_guards23.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
7619
7658
|
};
|
|
@@ -7660,10 +7699,10 @@ var Menu = ({
|
|
|
7660
7699
|
Menu.displayName = "Menu";
|
|
7661
7700
|
|
|
7662
7701
|
// src/components/Menu/MenuLabel.tsx
|
|
7663
|
-
var
|
|
7702
|
+
var import_styled_components41 = __toESM(require("styled-components"));
|
|
7664
7703
|
var import_react_dropdown_menu2 = require("@radix-ui/react-dropdown-menu");
|
|
7665
7704
|
var import_jsx_runtime188 = require("react/jsx-runtime");
|
|
7666
|
-
var StyledMenuLabel = (0,
|
|
7705
|
+
var StyledMenuLabel = (0, import_styled_components41.default)(import_react_dropdown_menu2.DropdownMenuLabel)`
|
|
7667
7706
|
padding: var(--wui-space-02);
|
|
7668
7707
|
`;
|
|
7669
7708
|
var MenuLabel = ({ children, ...props }) => {
|
|
@@ -7687,17 +7726,17 @@ var MenuLabel = ({ children, ...props }) => {
|
|
|
7687
7726
|
MenuLabel.displayName = "MenuLabel";
|
|
7688
7727
|
|
|
7689
7728
|
// src/components/Menu/SubMenu.tsx
|
|
7690
|
-
var
|
|
7691
|
-
var
|
|
7729
|
+
var import_react34 = require("react");
|
|
7730
|
+
var import_styled_components44 = __toESM(require("styled-components"));
|
|
7692
7731
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
7693
7732
|
var import_type_guards25 = require("@wistia/type-guards");
|
|
7694
7733
|
|
|
7695
7734
|
// src/components/Menu/MenuItemButton.tsx
|
|
7696
|
-
var
|
|
7697
|
-
var
|
|
7735
|
+
var import_react33 = require("react");
|
|
7736
|
+
var import_styled_components42 = __toESM(require("styled-components"));
|
|
7698
7737
|
var import_type_guards24 = require("@wistia/type-guards");
|
|
7699
7738
|
var import_jsx_runtime189 = require("react/jsx-runtime");
|
|
7700
|
-
var StyledButton3 = (0,
|
|
7739
|
+
var StyledButton3 = (0, import_styled_components42.default)(Button)`
|
|
7701
7740
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
7702
7741
|
|
|
7703
7742
|
display: flex;
|
|
@@ -7735,7 +7774,7 @@ var StyledButton3 = (0, import_styled_components41.default)(Button)`
|
|
|
7735
7774
|
padding-left: var(--wui-space-04);
|
|
7736
7775
|
}
|
|
7737
7776
|
`;
|
|
7738
|
-
var StyledLeftIconContainer =
|
|
7777
|
+
var StyledLeftIconContainer = import_styled_components42.default.div`
|
|
7739
7778
|
height: var(--menu-item-left-icon-size);
|
|
7740
7779
|
width: var(--menu-item-left-icon-size);
|
|
7741
7780
|
|
|
@@ -7744,7 +7783,7 @@ var StyledLeftIconContainer = import_styled_components41.default.div`
|
|
|
7744
7783
|
width: var(--menu-item-left-icon-size);
|
|
7745
7784
|
}
|
|
7746
7785
|
`;
|
|
7747
|
-
var StyledRightIconContainer =
|
|
7786
|
+
var StyledRightIconContainer = import_styled_components42.default.div`
|
|
7748
7787
|
height: var(--menu-item-right-icon-size);
|
|
7749
7788
|
width: var(--menu-item-right-icon-size);
|
|
7750
7789
|
|
|
@@ -7753,19 +7792,19 @@ var StyledRightIconContainer = import_styled_components41.default.div`
|
|
|
7753
7792
|
width: var(--menu-item-right-icon-size);
|
|
7754
7793
|
}
|
|
7755
7794
|
`;
|
|
7756
|
-
var StyledLabelAndDescriptionContainer =
|
|
7795
|
+
var StyledLabelAndDescriptionContainer = import_styled_components42.default.div`
|
|
7757
7796
|
display: flex;
|
|
7758
7797
|
flex-direction: column;
|
|
7759
7798
|
gap: var(--menu-label-description-gap);
|
|
7760
7799
|
flex-basis: 100%;
|
|
7761
7800
|
`;
|
|
7762
|
-
var StyledBadgeContainer =
|
|
7801
|
+
var StyledBadgeContainer = import_styled_components42.default.div`
|
|
7763
7802
|
align-self: start;
|
|
7764
7803
|
justify-self: end;
|
|
7765
7804
|
font-size: var(--wui-typography-label-4-size);
|
|
7766
7805
|
color: var(--wui-color-text-secondary);
|
|
7767
7806
|
`;
|
|
7768
|
-
var MenuItemButton = (0,
|
|
7807
|
+
var MenuItemButton = (0, import_react33.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
7769
7808
|
let { colorScheme, badge } = props;
|
|
7770
7809
|
if (appearance === "dangerous") {
|
|
7771
7810
|
if ((0, import_type_guards24.isNotUndefined)(colorScheme)) {
|
|
@@ -7807,10 +7846,10 @@ var MenuItemButton = (0, import_react32.forwardRef)(({ children, appearance, com
|
|
|
7807
7846
|
MenuItemButton.displayName = "MenuItemButton";
|
|
7808
7847
|
|
|
7809
7848
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
7810
|
-
var
|
|
7849
|
+
var import_styled_components43 = __toESM(require("styled-components"));
|
|
7811
7850
|
var import_jsx_runtime190 = require("react/jsx-runtime");
|
|
7812
|
-
var StyledMenuItemLabel =
|
|
7813
|
-
var StyledMenuItemDescription = (0,
|
|
7851
|
+
var StyledMenuItemLabel = import_styled_components43.default.span``;
|
|
7852
|
+
var StyledMenuItemDescription = (0, import_styled_components43.default)(Text).attrs({
|
|
7814
7853
|
variant: "body4",
|
|
7815
7854
|
prominence: "secondary"
|
|
7816
7855
|
})``;
|
|
@@ -7823,17 +7862,17 @@ var MenuItemDescription = ({ children }) => {
|
|
|
7823
7862
|
|
|
7824
7863
|
// src/components/Menu/SubMenu.tsx
|
|
7825
7864
|
var import_jsx_runtime191 = require("react/jsx-runtime");
|
|
7826
|
-
var SubMenuContent = (0,
|
|
7865
|
+
var SubMenuContent = (0, import_styled_components44.default)(import_react_dropdown_menu3.DropdownMenuSubContent)`
|
|
7827
7866
|
${menuContentCss}
|
|
7828
7867
|
|
|
7829
7868
|
${mq.smAndDown} {
|
|
7830
7869
|
transform: translateX(-100%) !important;
|
|
7831
7870
|
}
|
|
7832
7871
|
`;
|
|
7833
|
-
var StyledMobileSubMenuItems =
|
|
7872
|
+
var StyledMobileSubMenuItems = import_styled_components44.default.div`
|
|
7834
7873
|
margin-left: var(--wui-space-04);
|
|
7835
7874
|
`;
|
|
7836
|
-
var StyledSubTrigger = (0,
|
|
7875
|
+
var StyledSubTrigger = (0, import_styled_components44.default)(import_react_dropdown_menu3.DropdownMenuSubTrigger)`
|
|
7837
7876
|
outline: none;
|
|
7838
7877
|
|
|
7839
7878
|
&[data-state='open'],
|
|
@@ -7860,7 +7899,7 @@ var SubMenu = ({
|
|
|
7860
7899
|
...props
|
|
7861
7900
|
}) => {
|
|
7862
7901
|
const { isSmAndUp } = useMq();
|
|
7863
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
7902
|
+
const [isExpanded, setIsExpanded] = (0, import_react34.useState)(false);
|
|
7864
7903
|
const { compact } = useMenuContext();
|
|
7865
7904
|
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
7866
7905
|
/* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
@@ -7889,10 +7928,10 @@ var SubMenu = ({
|
|
|
7889
7928
|
SubMenu.displayName = "SubMenu";
|
|
7890
7929
|
|
|
7891
7930
|
// src/components/Menu/MenuItem.tsx
|
|
7892
|
-
var
|
|
7931
|
+
var import_react35 = require("react");
|
|
7893
7932
|
var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
|
|
7894
7933
|
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
7895
|
-
var MenuItem = (0,
|
|
7934
|
+
var MenuItem = (0, import_react35.forwardRef)(
|
|
7896
7935
|
({ onSelect = () => null, ...props }, ref) => {
|
|
7897
7936
|
return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
7898
7937
|
import_react_dropdown_menu4.DropdownMenuItem,
|
|
@@ -8042,20 +8081,20 @@ var CheckboxMenuItem = ({
|
|
|
8042
8081
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
8043
8082
|
|
|
8044
8083
|
// src/components/Modal/Modal.tsx
|
|
8045
|
-
var
|
|
8046
|
-
var
|
|
8084
|
+
var import_react39 = require("react");
|
|
8085
|
+
var import_styled_components50 = __toESM(require("styled-components"));
|
|
8047
8086
|
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
8048
8087
|
var import_type_guards28 = require("@wistia/type-guards");
|
|
8049
8088
|
|
|
8050
8089
|
// src/components/Modal/ModalHeader.tsx
|
|
8051
|
-
var
|
|
8090
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
8052
8091
|
var import_react_dialog2 = require("@radix-ui/react-dialog");
|
|
8053
8092
|
|
|
8054
8093
|
// src/components/Modal/ModalCloseButton.tsx
|
|
8055
|
-
var
|
|
8094
|
+
var import_styled_components45 = __toESM(require("styled-components"));
|
|
8056
8095
|
var import_react_dialog = require("@radix-ui/react-dialog");
|
|
8057
8096
|
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
8058
|
-
var CloseButton = (0,
|
|
8097
|
+
var CloseButton = (0, import_styled_components45.default)(import_react_dialog.Close)`
|
|
8059
8098
|
align-self: start;
|
|
8060
8099
|
`;
|
|
8061
8100
|
var ModalCloseButton = () => {
|
|
@@ -8071,11 +8110,11 @@ var ModalCloseButton = () => {
|
|
|
8071
8110
|
};
|
|
8072
8111
|
|
|
8073
8112
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
8074
|
-
var
|
|
8113
|
+
var import_styled_components46 = __toESM(require("styled-components"));
|
|
8075
8114
|
var import_type_guards26 = require("@wistia/type-guards");
|
|
8076
8115
|
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
8077
|
-
var VisuallyHidden =
|
|
8078
|
-
var VisuallyHiddenButFocusable =
|
|
8116
|
+
var VisuallyHidden = import_styled_components46.default.div({ ...visuallyHiddenStyle });
|
|
8117
|
+
var VisuallyHiddenButFocusable = import_styled_components46.default.div({
|
|
8079
8118
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
8080
8119
|
});
|
|
8081
8120
|
var ScreenReaderOnly = ({
|
|
@@ -8094,7 +8133,7 @@ ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
|
8094
8133
|
|
|
8095
8134
|
// src/components/Modal/ModalHeader.tsx
|
|
8096
8135
|
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
8097
|
-
var Header =
|
|
8136
|
+
var Header = import_styled_components47.default.header`
|
|
8098
8137
|
display: flex;
|
|
8099
8138
|
order: 1;
|
|
8100
8139
|
gap: var(--wui-space-01);
|
|
@@ -8106,7 +8145,7 @@ var Header = import_styled_components46.default.header`
|
|
|
8106
8145
|
margin-top: 0;
|
|
8107
8146
|
}
|
|
8108
8147
|
`;
|
|
8109
|
-
var Title = (0,
|
|
8148
|
+
var Title = (0, import_styled_components47.default)(import_react_dialog2.Title)`
|
|
8110
8149
|
font-family: var(--wui-typography-heading-2-family);
|
|
8111
8150
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
8112
8151
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -8125,19 +8164,19 @@ var ModalHeader = ({
|
|
|
8125
8164
|
};
|
|
8126
8165
|
|
|
8127
8166
|
// src/components/Modal/ModalContent.tsx
|
|
8128
|
-
var
|
|
8129
|
-
var
|
|
8167
|
+
var import_react37 = require("react");
|
|
8168
|
+
var import_styled_components48 = __toESM(require("styled-components"));
|
|
8130
8169
|
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
8131
8170
|
|
|
8132
8171
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
8133
|
-
var
|
|
8172
|
+
var import_react36 = require("react");
|
|
8134
8173
|
var import_type_guards27 = require("@wistia/type-guards");
|
|
8135
8174
|
var useFocusRestore = () => {
|
|
8136
|
-
const previouslyFocusedRef = (0,
|
|
8137
|
-
(0,
|
|
8175
|
+
const previouslyFocusedRef = (0, import_react36.useRef)(null);
|
|
8176
|
+
(0, import_react36.useEffect)(() => {
|
|
8138
8177
|
previouslyFocusedRef.current = document.activeElement;
|
|
8139
8178
|
}, []);
|
|
8140
|
-
(0,
|
|
8179
|
+
(0, import_react36.useEffect)(() => {
|
|
8141
8180
|
return () => {
|
|
8142
8181
|
if ((0, import_type_guards27.isNotNil)(previouslyFocusedRef.current)) {
|
|
8143
8182
|
setTimeout(() => {
|
|
@@ -8150,7 +8189,7 @@ var useFocusRestore = () => {
|
|
|
8150
8189
|
|
|
8151
8190
|
// src/components/Modal/ModalContent.tsx
|
|
8152
8191
|
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
8153
|
-
var StyledModalContent = (0,
|
|
8192
|
+
var StyledModalContent = (0, import_styled_components48.default)(import_react_dialog3.Content)`
|
|
8154
8193
|
background-color: var(--wui-color-bg-app);
|
|
8155
8194
|
box-sizing: border-box;
|
|
8156
8195
|
display: flex;
|
|
@@ -8190,7 +8229,7 @@ var StyledModalContent = (0, import_styled_components47.default)(import_react_di
|
|
|
8190
8229
|
}
|
|
8191
8230
|
}
|
|
8192
8231
|
`;
|
|
8193
|
-
var ModalContent = (0,
|
|
8232
|
+
var ModalContent = (0, import_react37.forwardRef)(
|
|
8194
8233
|
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
8195
8234
|
useFocusRestore();
|
|
8196
8235
|
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
@@ -8199,6 +8238,7 @@ var ModalContent = (0, import_react36.forwardRef)(
|
|
|
8199
8238
|
ref,
|
|
8200
8239
|
$fullHeight: fullHeight,
|
|
8201
8240
|
$width: width,
|
|
8241
|
+
"aria-describedby": void 0,
|
|
8202
8242
|
...otherProps,
|
|
8203
8243
|
children
|
|
8204
8244
|
}
|
|
@@ -8207,8 +8247,8 @@ var ModalContent = (0, import_react36.forwardRef)(
|
|
|
8207
8247
|
);
|
|
8208
8248
|
|
|
8209
8249
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
8210
|
-
var
|
|
8211
|
-
var
|
|
8250
|
+
var import_react38 = require("react");
|
|
8251
|
+
var import_styled_components49 = __toESM(require("styled-components"));
|
|
8212
8252
|
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
8213
8253
|
var backdropAnimationDuration = 150;
|
|
8214
8254
|
var alignVerticalMap = {
|
|
@@ -8222,7 +8262,7 @@ var alignHorizontalMap = {
|
|
|
8222
8262
|
center: "center",
|
|
8223
8263
|
right: "end"
|
|
8224
8264
|
};
|
|
8225
|
-
var BackdropComponent =
|
|
8265
|
+
var BackdropComponent = import_styled_components49.default.div`
|
|
8226
8266
|
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
8227
8267
|
animation-name: backdropShow;
|
|
8228
8268
|
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
@@ -8245,7 +8285,7 @@ var BackdropComponent = import_styled_components48.default.div`
|
|
|
8245
8285
|
}
|
|
8246
8286
|
}
|
|
8247
8287
|
`;
|
|
8248
|
-
var Backdrop = (0,
|
|
8288
|
+
var Backdrop = (0, import_react38.forwardRef)(
|
|
8249
8289
|
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
8250
8290
|
BackdropComponent,
|
|
8251
8291
|
{
|
|
@@ -8261,12 +8301,12 @@ Backdrop.displayName = "Backdrop";
|
|
|
8261
8301
|
|
|
8262
8302
|
// src/components/Modal/Modal.tsx
|
|
8263
8303
|
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
8264
|
-
var ModalBody =
|
|
8304
|
+
var ModalBody = import_styled_components50.default.div`
|
|
8265
8305
|
flex-direction: column;
|
|
8266
8306
|
display: flex;
|
|
8267
8307
|
order: 2;
|
|
8268
8308
|
`;
|
|
8269
|
-
var Modal = (0,
|
|
8309
|
+
var Modal = (0, import_react39.forwardRef)(
|
|
8270
8310
|
({
|
|
8271
8311
|
children,
|
|
8272
8312
|
fullHeight = false,
|
|
@@ -8294,7 +8334,6 @@ var Modal = (0, import_react38.forwardRef)(
|
|
|
8294
8334
|
ModalContent,
|
|
8295
8335
|
{
|
|
8296
8336
|
ref,
|
|
8297
|
-
"aria-describedby": void 0,
|
|
8298
8337
|
fullHeight,
|
|
8299
8338
|
onOpenAutoFocus: (event) => {
|
|
8300
8339
|
if ((0, import_type_guards28.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
@@ -8327,16 +8366,16 @@ var Modal = (0, import_react38.forwardRef)(
|
|
|
8327
8366
|
Modal.displayName = "Modal";
|
|
8328
8367
|
|
|
8329
8368
|
// src/components/Radio/Radio.tsx
|
|
8330
|
-
var
|
|
8331
|
-
var
|
|
8369
|
+
var import_react40 = require("react");
|
|
8370
|
+
var import_styled_components51 = __toESM(require("styled-components"));
|
|
8332
8371
|
var import_type_guards29 = require("@wistia/type-guards");
|
|
8333
8372
|
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
8334
|
-
var StyledLabelWrapper2 =
|
|
8373
|
+
var StyledLabelWrapper2 = import_styled_components51.default.div`
|
|
8335
8374
|
display: flex;
|
|
8336
8375
|
flex-direction: column;
|
|
8337
8376
|
padding-left: var(--wui-space-02);
|
|
8338
8377
|
`;
|
|
8339
|
-
var StyledRadio =
|
|
8378
|
+
var StyledRadio = import_styled_components51.default.input`
|
|
8340
8379
|
box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
|
|
8341
8380
|
appearance: none;
|
|
8342
8381
|
margin: 0;
|
|
@@ -8362,11 +8401,11 @@ var StyledRadio = import_styled_components50.default.input`
|
|
|
8362
8401
|
transform: scale(1);
|
|
8363
8402
|
}
|
|
8364
8403
|
`;
|
|
8365
|
-
var disabledStyle2 =
|
|
8404
|
+
var disabledStyle2 = import_styled_components51.css`
|
|
8366
8405
|
cursor: not-allowed;
|
|
8367
8406
|
opacity: 0.5;
|
|
8368
8407
|
`;
|
|
8369
|
-
var errorStyle =
|
|
8408
|
+
var errorStyle = import_styled_components51.css`
|
|
8370
8409
|
/* TODO Lamp to design error state */
|
|
8371
8410
|
&:hover,
|
|
8372
8411
|
&:focus,
|
|
@@ -8374,11 +8413,11 @@ var errorStyle = import_styled_components50.css`
|
|
|
8374
8413
|
border-color: transparent !important;
|
|
8375
8414
|
}
|
|
8376
8415
|
`;
|
|
8377
|
-
var defaultHoverStyle =
|
|
8416
|
+
var defaultHoverStyle = import_styled_components51.css`
|
|
8378
8417
|
/* TODO Lamp to design hover state */
|
|
8379
8418
|
cursor: pointer;
|
|
8380
8419
|
`;
|
|
8381
|
-
var StyledRadioWrapper =
|
|
8420
|
+
var StyledRadioWrapper = import_styled_components51.default.div`
|
|
8382
8421
|
align-items: baseline;
|
|
8383
8422
|
border: 1px solid transparent;
|
|
8384
8423
|
border-radius: 4px;
|
|
@@ -8401,7 +8440,7 @@ var StyledRadioWrapper = import_styled_components50.default.div`
|
|
|
8401
8440
|
|
|
8402
8441
|
${({ disabled }) => disabled && disabledStyle2};
|
|
8403
8442
|
`;
|
|
8404
|
-
var Radio = (0,
|
|
8443
|
+
var Radio = (0, import_react40.forwardRef)(
|
|
8405
8444
|
({
|
|
8406
8445
|
checked,
|
|
8407
8446
|
disabled = false,
|
|
@@ -8414,7 +8453,7 @@ var Radio = (0, import_react39.forwardRef)(
|
|
|
8414
8453
|
value = "false",
|
|
8415
8454
|
...otherProps
|
|
8416
8455
|
}, ref) => {
|
|
8417
|
-
const generatedId = (0,
|
|
8456
|
+
const generatedId = (0, import_react40.useId)();
|
|
8418
8457
|
const computedId = (0, import_type_guards29.isNonEmptyString)(id) ? id : `ui-radio-${generatedId}`;
|
|
8419
8458
|
return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(
|
|
8420
8459
|
StyledRadioWrapper,
|
|
@@ -8456,12 +8495,143 @@ var Radio = (0, import_react39.forwardRef)(
|
|
|
8456
8495
|
);
|
|
8457
8496
|
Radio.displayName = "Radio";
|
|
8458
8497
|
|
|
8459
|
-
// src/components/
|
|
8460
|
-
var
|
|
8461
|
-
var
|
|
8498
|
+
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
8499
|
+
var import_react41 = require("react");
|
|
8500
|
+
var import_styled_components52 = __toESM(require("styled-components"));
|
|
8501
|
+
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
8462
8502
|
var import_type_guards30 = require("@wistia/type-guards");
|
|
8463
8503
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
8464
|
-
var
|
|
8504
|
+
var StyledSegmentedControl = (0, import_styled_components52.default)(import_react_toggle_group.Root)`
|
|
8505
|
+
display: inline-flex;
|
|
8506
|
+
background-color: var(--wui-color-bg-surface-secondary);
|
|
8507
|
+
border-radius: var(--wui-border-radius-rounded);
|
|
8508
|
+
border: 2px solid var(--wui-color-bg-surface-secondary);
|
|
8509
|
+
gap: var(--wui-space-01);
|
|
8510
|
+
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
8511
|
+
`;
|
|
8512
|
+
var SegmentedControl = (0, import_react41.forwardRef)(
|
|
8513
|
+
({
|
|
8514
|
+
children,
|
|
8515
|
+
disabled = false,
|
|
8516
|
+
fullWidth = false,
|
|
8517
|
+
selectedValue,
|
|
8518
|
+
onSelectedValueChange,
|
|
8519
|
+
...props
|
|
8520
|
+
}, ref) => {
|
|
8521
|
+
if ((0, import_type_guards30.isNil)(children)) {
|
|
8522
|
+
return null;
|
|
8523
|
+
}
|
|
8524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
8525
|
+
StyledSegmentedControl,
|
|
8526
|
+
{
|
|
8527
|
+
ref,
|
|
8528
|
+
$fullWidth: fullWidth,
|
|
8529
|
+
disabled,
|
|
8530
|
+
loop: true,
|
|
8531
|
+
onValueChange: onSelectedValueChange,
|
|
8532
|
+
rovingFocus: true,
|
|
8533
|
+
type: "single",
|
|
8534
|
+
value: selectedValue,
|
|
8535
|
+
...props,
|
|
8536
|
+
children
|
|
8537
|
+
}
|
|
8538
|
+
);
|
|
8539
|
+
}
|
|
8540
|
+
);
|
|
8541
|
+
SegmentedControl.displayName = "SegmentedControl";
|
|
8542
|
+
|
|
8543
|
+
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
8544
|
+
var import_react42 = require("react");
|
|
8545
|
+
var import_styled_components53 = __toESM(require("styled-components"));
|
|
8546
|
+
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
8547
|
+
var import_type_guards31 = require("@wistia/type-guards");
|
|
8548
|
+
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
8549
|
+
var StyledSegmentedControlItem = (0, import_styled_components53.default)(import_react_toggle_group2.Item)`
|
|
8550
|
+
all: unset; /* ToggleGroupItem is a button element */
|
|
8551
|
+
align-items: center;
|
|
8552
|
+
border-radius: var(--wui-border-radius-rounded);
|
|
8553
|
+
color: var(--wui-color-text-secondary);
|
|
8554
|
+
cursor: pointer;
|
|
8555
|
+
display: flex;
|
|
8556
|
+
flex-grow: 1;
|
|
8557
|
+
flex-shrink: 1;
|
|
8558
|
+
font-size: var(--wui-typography-label-3-size);
|
|
8559
|
+
justify-content: center;
|
|
8560
|
+
padding: 6px 8px;
|
|
8561
|
+
user-select: none;
|
|
8562
|
+
|
|
8563
|
+
/* Icon component */
|
|
8564
|
+
svg {
|
|
8565
|
+
height: 16px;
|
|
8566
|
+
width: 16px;
|
|
8567
|
+
|
|
8568
|
+
/* add right margin if there's a label and an icon */
|
|
8569
|
+
${({ $hasLabel }) => $hasLabel ? "margin-right: var(--wui-space-01)" : ""}
|
|
8570
|
+
}
|
|
8571
|
+
|
|
8572
|
+
&:hover {
|
|
8573
|
+
background-color: var(--wui-color-bg-surface-secondary-hover);
|
|
8574
|
+
}
|
|
8575
|
+
|
|
8576
|
+
&:focus-visible {
|
|
8577
|
+
outline: 2px solid var(--wui-color-focus-ring);
|
|
8578
|
+
}
|
|
8579
|
+
|
|
8580
|
+
&[data-state='on'] {
|
|
8581
|
+
background-color: var(--wui-color-bg-fill-white);
|
|
8582
|
+
color: var(--wui-color-text-selected);
|
|
8583
|
+
cursor: default;
|
|
8584
|
+
}
|
|
8585
|
+
|
|
8586
|
+
&:focus-visible,
|
|
8587
|
+
&[data-state='on'] {
|
|
8588
|
+
svg path {
|
|
8589
|
+
fill: var(--wui-color-focus-ring);
|
|
8590
|
+
}
|
|
8591
|
+
}
|
|
8592
|
+
|
|
8593
|
+
&[data-disabled] {
|
|
8594
|
+
cursor: not-allowed;
|
|
8595
|
+
|
|
8596
|
+
&:hover {
|
|
8597
|
+
background-color: inherit;
|
|
8598
|
+
}
|
|
8599
|
+
}
|
|
8600
|
+
`;
|
|
8601
|
+
var SegmentedControlItem = (0, import_react42.forwardRef)(
|
|
8602
|
+
({ disabled, icon, label, "aria-label": ariaLabel, value }, ref) => {
|
|
8603
|
+
const handleClick = (event) => {
|
|
8604
|
+
const target = event.target;
|
|
8605
|
+
const { state } = target.dataset;
|
|
8606
|
+
if (state === "on") {
|
|
8607
|
+
event.preventDefault();
|
|
8608
|
+
}
|
|
8609
|
+
};
|
|
8610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(
|
|
8611
|
+
StyledSegmentedControlItem,
|
|
8612
|
+
{
|
|
8613
|
+
ref,
|
|
8614
|
+
$hasLabel: (0, import_type_guards31.isNotNil)(label),
|
|
8615
|
+
"aria-label": (0, import_type_guards31.isNotNil)(label) ? void 0 : ariaLabel,
|
|
8616
|
+
disabled,
|
|
8617
|
+
onClick: handleClick,
|
|
8618
|
+
value,
|
|
8619
|
+
children: [
|
|
8620
|
+
icon,
|
|
8621
|
+
label
|
|
8622
|
+
]
|
|
8623
|
+
}
|
|
8624
|
+
);
|
|
8625
|
+
}
|
|
8626
|
+
);
|
|
8627
|
+
SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
8628
|
+
|
|
8629
|
+
// src/components/Tag/Tag.tsx
|
|
8630
|
+
var import_react43 = require("react");
|
|
8631
|
+
var import_styled_components54 = __toESM(require("styled-components"));
|
|
8632
|
+
var import_type_guards32 = require("@wistia/type-guards");
|
|
8633
|
+
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
8634
|
+
var TagLabel = import_styled_components54.default.a`
|
|
8465
8635
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8466
8636
|
font-size: var(--wui-typography-label-4-size);
|
|
8467
8637
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -8489,14 +8659,14 @@ var TagLabel = import_styled_components51.default.a`
|
|
|
8489
8659
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8490
8660
|
}
|
|
8491
8661
|
`;
|
|
8492
|
-
var TagDivider =
|
|
8662
|
+
var TagDivider = import_styled_components54.default.div`
|
|
8493
8663
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8494
8664
|
border-left: 1px solid var(--wui-color-border);
|
|
8495
8665
|
display: flex;
|
|
8496
8666
|
height: 14px;
|
|
8497
8667
|
width: 1px;
|
|
8498
8668
|
`;
|
|
8499
|
-
var StyledRemoveButton =
|
|
8669
|
+
var StyledRemoveButton = import_styled_components54.default.button`
|
|
8500
8670
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8501
8671
|
all: unset;
|
|
8502
8672
|
cursor: pointer;
|
|
@@ -8524,7 +8694,7 @@ var StyledRemoveButton = import_styled_components51.default.button`
|
|
|
8524
8694
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8525
8695
|
}
|
|
8526
8696
|
`;
|
|
8527
|
-
var StyledTag =
|
|
8697
|
+
var StyledTag = import_styled_components54.default.div`
|
|
8528
8698
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8529
8699
|
align-items: center;
|
|
8530
8700
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -8533,47 +8703,47 @@ var StyledTag = import_styled_components51.default.div`
|
|
|
8533
8703
|
overflow: hidden;
|
|
8534
8704
|
`;
|
|
8535
8705
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
8536
|
-
if ((0,
|
|
8706
|
+
if ((0, import_type_guards32.isNil)(onClickRemove)) {
|
|
8537
8707
|
return null;
|
|
8538
8708
|
}
|
|
8539
|
-
if ((0,
|
|
8709
|
+
if ((0, import_type_guards32.isNil)(onClickRemoveLabel)) {
|
|
8540
8710
|
throw new Error(
|
|
8541
8711
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
8542
8712
|
);
|
|
8543
8713
|
}
|
|
8544
|
-
return /* @__PURE__ */ (0,
|
|
8545
|
-
/* @__PURE__ */ (0,
|
|
8546
|
-
/* @__PURE__ */ (0,
|
|
8714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(import_jsx_runtime205.Fragment, { children: [
|
|
8715
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
8716
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(
|
|
8547
8717
|
StyledRemoveButton,
|
|
8548
8718
|
{
|
|
8549
8719
|
$colorScheme: colorScheme,
|
|
8550
8720
|
onClick: onClickRemove,
|
|
8551
8721
|
type: "button",
|
|
8552
8722
|
children: [
|
|
8553
|
-
/* @__PURE__ */ (0,
|
|
8723
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
8554
8724
|
Icon,
|
|
8555
8725
|
{
|
|
8556
8726
|
size: "sm",
|
|
8557
8727
|
type: "close"
|
|
8558
8728
|
}
|
|
8559
8729
|
),
|
|
8560
|
-
/* @__PURE__ */ (0,
|
|
8730
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
8561
8731
|
]
|
|
8562
8732
|
}
|
|
8563
8733
|
)
|
|
8564
8734
|
] });
|
|
8565
8735
|
};
|
|
8566
|
-
var Tag = (0,
|
|
8736
|
+
var Tag = (0, import_react43.forwardRef)(
|
|
8567
8737
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
8568
|
-
const labelProps = (0,
|
|
8569
|
-
return /* @__PURE__ */ (0,
|
|
8738
|
+
const labelProps = (0, import_type_guards32.isNotNil)(href) && (0, import_type_guards32.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
8739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(
|
|
8570
8740
|
StyledTag,
|
|
8571
8741
|
{
|
|
8572
8742
|
ref,
|
|
8573
8743
|
$colorScheme: colorScheme,
|
|
8574
8744
|
...otherProps,
|
|
8575
8745
|
children: [
|
|
8576
|
-
/* @__PURE__ */ (0,
|
|
8746
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
8577
8747
|
TagLabel,
|
|
8578
8748
|
{
|
|
8579
8749
|
...labelProps,
|
|
@@ -8581,7 +8751,7 @@ var Tag = (0, import_react40.forwardRef)(
|
|
|
8581
8751
|
children: label
|
|
8582
8752
|
}
|
|
8583
8753
|
),
|
|
8584
|
-
/* @__PURE__ */ (0,
|
|
8754
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
8585
8755
|
RemoveButton,
|
|
8586
8756
|
{
|
|
8587
8757
|
colorScheme,
|
|
@@ -8598,16 +8768,16 @@ Tag.displayName = "Tag";
|
|
|
8598
8768
|
|
|
8599
8769
|
// src/components/Tooltip/Tooltip.tsx
|
|
8600
8770
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
8601
|
-
var
|
|
8602
|
-
var
|
|
8603
|
-
var CompactTooltipStyles =
|
|
8771
|
+
var import_styled_components55 = __toESM(require("styled-components"));
|
|
8772
|
+
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
8773
|
+
var CompactTooltipStyles = import_styled_components55.css`
|
|
8604
8774
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
8605
8775
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
8606
8776
|
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
8607
8777
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
8608
8778
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
8609
8779
|
`;
|
|
8610
|
-
var StyledContent = (0,
|
|
8780
|
+
var StyledContent = (0, import_styled_components55.default)(import_react_tooltip2.Content)`
|
|
8611
8781
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
8612
8782
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
8613
8783
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -8665,14 +8835,14 @@ var Tooltip = ({
|
|
|
8665
8835
|
if (forceOpen === true) {
|
|
8666
8836
|
rootProps.open = true;
|
|
8667
8837
|
}
|
|
8668
|
-
return /* @__PURE__ */ (0,
|
|
8838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
|
|
8669
8839
|
import_react_tooltip2.Root,
|
|
8670
8840
|
{
|
|
8671
8841
|
delayDuration: delay,
|
|
8672
8842
|
...rootProps,
|
|
8673
8843
|
children: [
|
|
8674
|
-
/* @__PURE__ */ (0,
|
|
8675
|
-
/* @__PURE__ */ (0,
|
|
8844
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
8845
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
|
|
8676
8846
|
StyledContent,
|
|
8677
8847
|
{
|
|
8678
8848
|
$compact: compact,
|
|
@@ -8680,7 +8850,7 @@ var Tooltip = ({
|
|
|
8680
8850
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
8681
8851
|
children: [
|
|
8682
8852
|
content,
|
|
8683
|
-
!hideArrow ? /* @__PURE__ */ (0,
|
|
8853
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
|
|
8684
8854
|
"svg",
|
|
8685
8855
|
{
|
|
8686
8856
|
fill: "var(--tooltip-bg)",
|
|
@@ -8689,7 +8859,7 @@ var Tooltip = ({
|
|
|
8689
8859
|
viewBox: "0 0 12 8",
|
|
8690
8860
|
width: "12",
|
|
8691
8861
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8692
|
-
children: /* @__PURE__ */ (0,
|
|
8862
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime206.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" })
|
|
8693
8863
|
}
|
|
8694
8864
|
) }) : null
|
|
8695
8865
|
]
|
|
@@ -8702,26 +8872,26 @@ var Tooltip = ({
|
|
|
8702
8872
|
Tooltip.displayName = "Tooltip";
|
|
8703
8873
|
|
|
8704
8874
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
8705
|
-
var
|
|
8706
|
-
var
|
|
8707
|
-
var
|
|
8875
|
+
var import_styled_components56 = __toESM(require("styled-components"));
|
|
8876
|
+
var import_type_guards33 = require("@wistia/type-guards");
|
|
8877
|
+
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
8708
8878
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
8709
8879
|
if (iconOnly) {
|
|
8710
|
-
return /* @__PURE__ */ (0,
|
|
8880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
8711
8881
|
"g",
|
|
8712
8882
|
{
|
|
8713
8883
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8714
8884
|
fill: brandmarkColor,
|
|
8715
|
-
children: /* @__PURE__ */ (0,
|
|
8885
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
8716
8886
|
}
|
|
8717
8887
|
);
|
|
8718
8888
|
}
|
|
8719
|
-
return /* @__PURE__ */ (0,
|
|
8889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
8720
8890
|
"g",
|
|
8721
8891
|
{
|
|
8722
8892
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8723
8893
|
fill: brandmarkColor,
|
|
8724
|
-
children: /* @__PURE__ */ (0,
|
|
8894
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
8725
8895
|
}
|
|
8726
8896
|
);
|
|
8727
8897
|
};
|
|
@@ -8729,12 +8899,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
8729
8899
|
if (iconOnly) {
|
|
8730
8900
|
return null;
|
|
8731
8901
|
}
|
|
8732
|
-
return /* @__PURE__ */ (0,
|
|
8902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
8733
8903
|
"g",
|
|
8734
8904
|
{
|
|
8735
8905
|
"data-testid": "ui-wistia-logo-logotype",
|
|
8736
8906
|
fill: logotypeColor,
|
|
8737
|
-
children: /* @__PURE__ */ (0,
|
|
8907
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
|
|
8738
8908
|
}
|
|
8739
8909
|
);
|
|
8740
8910
|
};
|
|
@@ -8744,7 +8914,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
8744
8914
|
}
|
|
8745
8915
|
return "0 0 144 31.47";
|
|
8746
8916
|
};
|
|
8747
|
-
var WistiaLogoComponent =
|
|
8917
|
+
var WistiaLogoComponent = import_styled_components56.default.svg`
|
|
8748
8918
|
height: ${({ height }) => `${height}px`};
|
|
8749
8919
|
|
|
8750
8920
|
/* ensure it will always fit on mobile */
|
|
@@ -8786,7 +8956,7 @@ var WistiaLogo = ({
|
|
|
8786
8956
|
};
|
|
8787
8957
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
8788
8958
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
8789
|
-
const Logo = /* @__PURE__ */ (0,
|
|
8959
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(
|
|
8790
8960
|
WistiaLogoComponent,
|
|
8791
8961
|
{
|
|
8792
8962
|
$hoverColor: hoverColor,
|
|
@@ -8796,23 +8966,23 @@ var WistiaLogo = ({
|
|
|
8796
8966
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8797
8967
|
...otherProps,
|
|
8798
8968
|
children: [
|
|
8799
|
-
/* @__PURE__ */ (0,
|
|
8800
|
-
(0,
|
|
8969
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)("title", { children: title }),
|
|
8970
|
+
(0, import_type_guards33.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("desc", { children: description }) : null,
|
|
8801
8971
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
8802
8972
|
renderLogotype(logotypeColor, iconOnly)
|
|
8803
8973
|
]
|
|
8804
8974
|
}
|
|
8805
8975
|
);
|
|
8806
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
8976
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("a", { href, children: Logo }) : Logo;
|
|
8807
8977
|
};
|
|
8808
8978
|
WistiaLogo.displayName = "WistiaLogo";
|
|
8809
8979
|
|
|
8810
8980
|
// src/components/Select/Select.tsx
|
|
8811
8981
|
var import_react_select = require("@radix-ui/react-select");
|
|
8812
|
-
var
|
|
8813
|
-
var
|
|
8814
|
-
var
|
|
8815
|
-
var StyledTrigger = (0,
|
|
8982
|
+
var import_react44 = require("react");
|
|
8983
|
+
var import_styled_components57 = __toESM(require("styled-components"));
|
|
8984
|
+
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
8985
|
+
var StyledTrigger = (0, import_styled_components57.default)(import_react_select.Trigger)`
|
|
8816
8986
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8817
8987
|
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
8818
8988
|
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
@@ -8853,7 +9023,7 @@ var StyledTrigger = (0, import_styled_components54.default)(import_react_select.
|
|
|
8853
9023
|
background-color: var(--wui-color-bg-surface-disabled);
|
|
8854
9024
|
}
|
|
8855
9025
|
`;
|
|
8856
|
-
var StyledContent2 = (0,
|
|
9026
|
+
var StyledContent2 = (0, import_styled_components57.default)(import_react_select.Content)`
|
|
8857
9027
|
--wui-select-content-border: var(--wui-color-border);
|
|
8858
9028
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
8859
9029
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -8869,7 +9039,7 @@ var StyledContent2 = (0, import_styled_components54.default)(import_react_select
|
|
|
8869
9039
|
padding: var(--wui-select-option-padding);
|
|
8870
9040
|
min-width: 200px;
|
|
8871
9041
|
`;
|
|
8872
|
-
var Select = (0,
|
|
9042
|
+
var Select = (0, import_react44.forwardRef)(
|
|
8873
9043
|
({
|
|
8874
9044
|
colorScheme = "inherit",
|
|
8875
9045
|
children,
|
|
@@ -8879,13 +9049,13 @@ var Select = (0, import_react41.forwardRef)(
|
|
|
8879
9049
|
...props
|
|
8880
9050
|
}, forwardedRef) => {
|
|
8881
9051
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
8882
|
-
return /* @__PURE__ */ (0,
|
|
9052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(
|
|
8883
9053
|
import_react_select.Root,
|
|
8884
9054
|
{
|
|
8885
9055
|
...props,
|
|
8886
9056
|
onValueChange: onChange,
|
|
8887
9057
|
children: [
|
|
8888
|
-
/* @__PURE__ */ (0,
|
|
9058
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(
|
|
8889
9059
|
StyledTrigger,
|
|
8890
9060
|
{
|
|
8891
9061
|
ref: forwardedRef,
|
|
@@ -8893,8 +9063,8 @@ var Select = (0, import_react41.forwardRef)(
|
|
|
8893
9063
|
$fullWidth: responsiveFullWidth,
|
|
8894
9064
|
...props,
|
|
8895
9065
|
children: [
|
|
8896
|
-
/* @__PURE__ */ (0,
|
|
8897
|
-
/* @__PURE__ */ (0,
|
|
9066
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.Value, { placeholder }),
|
|
9067
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
8898
9068
|
Icon,
|
|
8899
9069
|
{
|
|
8900
9070
|
size: "md",
|
|
@@ -8904,10 +9074,10 @@ var Select = (0, import_react41.forwardRef)(
|
|
|
8904
9074
|
]
|
|
8905
9075
|
}
|
|
8906
9076
|
),
|
|
8907
|
-
/* @__PURE__ */ (0,
|
|
8908
|
-
/* @__PURE__ */ (0,
|
|
8909
|
-
/* @__PURE__ */ (0,
|
|
8910
|
-
/* @__PURE__ */ (0,
|
|
9077
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(StyledContent2, { position: "popper", children: [
|
|
9078
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(Icon, { type: "caret-up" }) }),
|
|
9079
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.Viewport, { children }),
|
|
9080
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(Icon, { type: "caret-down" }) })
|
|
8911
9081
|
] }) })
|
|
8912
9082
|
]
|
|
8913
9083
|
}
|
|
@@ -8918,10 +9088,10 @@ Select.displayName = "Select";
|
|
|
8918
9088
|
|
|
8919
9089
|
// src/components/Select/SelectOption.tsx
|
|
8920
9090
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
8921
|
-
var
|
|
8922
|
-
var
|
|
8923
|
-
var
|
|
8924
|
-
var StyledItem = (0,
|
|
9091
|
+
var import_react45 = require("react");
|
|
9092
|
+
var import_styled_components58 = __toESM(require("styled-components"));
|
|
9093
|
+
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
9094
|
+
var StyledItem = (0, import_styled_components58.default)(import_react_select2.Item)`
|
|
8925
9095
|
${variantStyleMap2.body3};
|
|
8926
9096
|
display: flex;
|
|
8927
9097
|
padding: var(--wui-select-option-padding);
|
|
@@ -8944,25 +9114,25 @@ var StyledItem = (0, import_styled_components55.default)(import_react_select2.It
|
|
|
8944
9114
|
background-color: transparent;
|
|
8945
9115
|
}
|
|
8946
9116
|
`;
|
|
8947
|
-
var StyledIconContainer =
|
|
9117
|
+
var StyledIconContainer = import_styled_components58.default.span`
|
|
8948
9118
|
width: 12px;
|
|
8949
9119
|
`;
|
|
8950
|
-
var SelectOption = (0,
|
|
9120
|
+
var SelectOption = (0, import_react45.forwardRef)(
|
|
8951
9121
|
({ children, ...props }, forwardedRef) => {
|
|
8952
|
-
return /* @__PURE__ */ (0,
|
|
9122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
|
|
8953
9123
|
StyledItem,
|
|
8954
9124
|
{
|
|
8955
9125
|
...props,
|
|
8956
9126
|
ref: forwardedRef,
|
|
8957
9127
|
children: [
|
|
8958
|
-
/* @__PURE__ */ (0,
|
|
9128
|
+
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
|
|
8959
9129
|
Icon,
|
|
8960
9130
|
{
|
|
8961
9131
|
size: "sm",
|
|
8962
9132
|
type: "checkmark"
|
|
8963
9133
|
}
|
|
8964
9134
|
) }) }),
|
|
8965
|
-
/* @__PURE__ */ (0,
|
|
9135
|
+
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_react_select2.ItemText, { children })
|
|
8966
9136
|
]
|
|
8967
9137
|
}
|
|
8968
9138
|
);
|
|
@@ -8972,14 +9142,14 @@ SelectOption.displayName = "Option";
|
|
|
8972
9142
|
|
|
8973
9143
|
// src/components/Select/SelectOptionGroup.tsx
|
|
8974
9144
|
var import_react_select3 = require("@radix-ui/react-select");
|
|
8975
|
-
var
|
|
8976
|
-
var
|
|
8977
|
-
var StyledLabel3 = (0,
|
|
9145
|
+
var import_styled_components59 = __toESM(require("styled-components"));
|
|
9146
|
+
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
9147
|
+
var StyledLabel3 = (0, import_styled_components59.default)(import_react_select3.Label)`
|
|
8978
9148
|
padding: var(--wui-select-option-padding);
|
|
8979
9149
|
`;
|
|
8980
9150
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
8981
|
-
return /* @__PURE__ */ (0,
|
|
8982
|
-
/* @__PURE__ */ (0,
|
|
9151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
9152
|
+
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(StyledLabel3, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
|
|
8983
9153
|
Text,
|
|
8984
9154
|
{
|
|
8985
9155
|
prominence: "secondary",
|
|
@@ -9028,6 +9198,8 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
9028
9198
|
RadioGroup,
|
|
9029
9199
|
RadioMenuItem,
|
|
9030
9200
|
ScreenReaderOnly,
|
|
9201
|
+
SegmentedControl,
|
|
9202
|
+
SegmentedControlItem,
|
|
9031
9203
|
Select,
|
|
9032
9204
|
SelectOption,
|
|
9033
9205
|
SelectOptionGroup,
|