@wistia/ui 0.4.9 → 0.4.10-beta.129a60b0.d418b13
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 +252 -114
- 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 +279 -143
- 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.129a60b0.d418b13
|
|
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,49 +6151,52 @@ 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
|
|
@@ -8199,6 +8204,7 @@ var ModalContent = (0, import_react36.forwardRef)(
|
|
|
8199
8204
|
ref,
|
|
8200
8205
|
$fullHeight: fullHeight,
|
|
8201
8206
|
$width: width,
|
|
8207
|
+
"aria-describedby": void 0,
|
|
8202
8208
|
...otherProps,
|
|
8203
8209
|
children
|
|
8204
8210
|
}
|
|
@@ -8294,7 +8300,6 @@ var Modal = (0, import_react38.forwardRef)(
|
|
|
8294
8300
|
ModalContent,
|
|
8295
8301
|
{
|
|
8296
8302
|
ref,
|
|
8297
|
-
"aria-describedby": void 0,
|
|
8298
8303
|
fullHeight,
|
|
8299
8304
|
onOpenAutoFocus: (event) => {
|
|
8300
8305
|
if ((0, import_type_guards28.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
@@ -8456,12 +8461,143 @@ var Radio = (0, import_react39.forwardRef)(
|
|
|
8456
8461
|
);
|
|
8457
8462
|
Radio.displayName = "Radio";
|
|
8458
8463
|
|
|
8459
|
-
// src/components/
|
|
8464
|
+
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
8460
8465
|
var import_react40 = require("react");
|
|
8461
8466
|
var import_styled_components51 = __toESM(require("styled-components"));
|
|
8467
|
+
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
8462
8468
|
var import_type_guards30 = require("@wistia/type-guards");
|
|
8463
8469
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
8464
|
-
var
|
|
8470
|
+
var StyledSegmentedControl = (0, import_styled_components51.default)(import_react_toggle_group.Root)`
|
|
8471
|
+
display: inline-flex;
|
|
8472
|
+
background-color: var(--wui-color-bg-surface-secondary);
|
|
8473
|
+
border-radius: var(--wui-border-radius-rounded);
|
|
8474
|
+
border: 2px solid var(--wui-color-bg-surface-secondary);
|
|
8475
|
+
gap: var(--wui-space-01);
|
|
8476
|
+
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
8477
|
+
`;
|
|
8478
|
+
var SegmentedControl = (0, import_react40.forwardRef)(
|
|
8479
|
+
({
|
|
8480
|
+
children,
|
|
8481
|
+
disabled = false,
|
|
8482
|
+
fullWidth = false,
|
|
8483
|
+
selectedValue,
|
|
8484
|
+
onSelectedValueChange,
|
|
8485
|
+
...props
|
|
8486
|
+
}, ref) => {
|
|
8487
|
+
if ((0, import_type_guards30.isNil)(children)) {
|
|
8488
|
+
return null;
|
|
8489
|
+
}
|
|
8490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
8491
|
+
StyledSegmentedControl,
|
|
8492
|
+
{
|
|
8493
|
+
ref,
|
|
8494
|
+
$fullWidth: fullWidth,
|
|
8495
|
+
disabled,
|
|
8496
|
+
loop: true,
|
|
8497
|
+
onValueChange: onSelectedValueChange,
|
|
8498
|
+
rovingFocus: true,
|
|
8499
|
+
type: "single",
|
|
8500
|
+
value: selectedValue,
|
|
8501
|
+
...props,
|
|
8502
|
+
children
|
|
8503
|
+
}
|
|
8504
|
+
);
|
|
8505
|
+
}
|
|
8506
|
+
);
|
|
8507
|
+
SegmentedControl.displayName = "SegmentedControl";
|
|
8508
|
+
|
|
8509
|
+
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
8510
|
+
var import_react41 = require("react");
|
|
8511
|
+
var import_styled_components52 = __toESM(require("styled-components"));
|
|
8512
|
+
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
8513
|
+
var import_type_guards31 = require("@wistia/type-guards");
|
|
8514
|
+
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
8515
|
+
var StyledSegmentedControlItem = (0, import_styled_components52.default)(import_react_toggle_group2.Item)`
|
|
8516
|
+
all: unset; /* ToggleGroupItem is a button element */
|
|
8517
|
+
align-items: center;
|
|
8518
|
+
border-radius: var(--wui-border-radius-rounded);
|
|
8519
|
+
color: var(--wui-color-text-secondary);
|
|
8520
|
+
cursor: pointer;
|
|
8521
|
+
display: flex;
|
|
8522
|
+
flex-grow: 1;
|
|
8523
|
+
flex-shrink: 1;
|
|
8524
|
+
font-size: var(--wui-typography-label-3-size);
|
|
8525
|
+
justify-content: center;
|
|
8526
|
+
padding: 6px 8px;
|
|
8527
|
+
user-select: none;
|
|
8528
|
+
|
|
8529
|
+
/* Icon component */
|
|
8530
|
+
svg {
|
|
8531
|
+
height: 16px;
|
|
8532
|
+
width: 16px;
|
|
8533
|
+
|
|
8534
|
+
/* add right margin if there's a label and an icon */
|
|
8535
|
+
${({ $hasLabel }) => $hasLabel ? "margin-right: var(--wui-space-01)" : ""}
|
|
8536
|
+
}
|
|
8537
|
+
|
|
8538
|
+
&:hover {
|
|
8539
|
+
background-color: var(--wui-color-bg-surface-secondary-hover);
|
|
8540
|
+
}
|
|
8541
|
+
|
|
8542
|
+
&:focus-visible {
|
|
8543
|
+
outline: 2px solid var(--wui-color-focus-ring);
|
|
8544
|
+
}
|
|
8545
|
+
|
|
8546
|
+
&[data-state='on'] {
|
|
8547
|
+
background-color: var(--wui-color-bg-fill-white);
|
|
8548
|
+
color: var(--wui-color-text-selected);
|
|
8549
|
+
cursor: default;
|
|
8550
|
+
}
|
|
8551
|
+
|
|
8552
|
+
&:focus-visible,
|
|
8553
|
+
&[data-state='on'] {
|
|
8554
|
+
svg path {
|
|
8555
|
+
fill: var(--wui-color-focus-ring);
|
|
8556
|
+
}
|
|
8557
|
+
}
|
|
8558
|
+
|
|
8559
|
+
&[data-disabled] {
|
|
8560
|
+
cursor: not-allowed;
|
|
8561
|
+
|
|
8562
|
+
&:hover {
|
|
8563
|
+
background-color: inherit;
|
|
8564
|
+
}
|
|
8565
|
+
}
|
|
8566
|
+
`;
|
|
8567
|
+
var SegmentedControlItem = (0, import_react41.forwardRef)(
|
|
8568
|
+
({ disabled, icon, label, "aria-label": ariaLabel, value }, ref) => {
|
|
8569
|
+
const handleClick = (event) => {
|
|
8570
|
+
const target = event.target;
|
|
8571
|
+
const { state } = target.dataset;
|
|
8572
|
+
if (state === "on") {
|
|
8573
|
+
event.preventDefault();
|
|
8574
|
+
}
|
|
8575
|
+
};
|
|
8576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(
|
|
8577
|
+
StyledSegmentedControlItem,
|
|
8578
|
+
{
|
|
8579
|
+
ref,
|
|
8580
|
+
$hasLabel: (0, import_type_guards31.isNotNil)(label),
|
|
8581
|
+
"aria-label": (0, import_type_guards31.isNotNil)(label) ? void 0 : ariaLabel,
|
|
8582
|
+
disabled,
|
|
8583
|
+
onClick: handleClick,
|
|
8584
|
+
value,
|
|
8585
|
+
children: [
|
|
8586
|
+
icon,
|
|
8587
|
+
label
|
|
8588
|
+
]
|
|
8589
|
+
}
|
|
8590
|
+
);
|
|
8591
|
+
}
|
|
8592
|
+
);
|
|
8593
|
+
SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
8594
|
+
|
|
8595
|
+
// src/components/Tag/Tag.tsx
|
|
8596
|
+
var import_react42 = require("react");
|
|
8597
|
+
var import_styled_components53 = __toESM(require("styled-components"));
|
|
8598
|
+
var import_type_guards32 = require("@wistia/type-guards");
|
|
8599
|
+
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
8600
|
+
var TagLabel = import_styled_components53.default.a`
|
|
8465
8601
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8466
8602
|
font-size: var(--wui-typography-label-4-size);
|
|
8467
8603
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -8489,14 +8625,14 @@ var TagLabel = import_styled_components51.default.a`
|
|
|
8489
8625
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8490
8626
|
}
|
|
8491
8627
|
`;
|
|
8492
|
-
var TagDivider =
|
|
8628
|
+
var TagDivider = import_styled_components53.default.div`
|
|
8493
8629
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8494
8630
|
border-left: 1px solid var(--wui-color-border);
|
|
8495
8631
|
display: flex;
|
|
8496
8632
|
height: 14px;
|
|
8497
8633
|
width: 1px;
|
|
8498
8634
|
`;
|
|
8499
|
-
var StyledRemoveButton =
|
|
8635
|
+
var StyledRemoveButton = import_styled_components53.default.button`
|
|
8500
8636
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8501
8637
|
all: unset;
|
|
8502
8638
|
cursor: pointer;
|
|
@@ -8524,7 +8660,7 @@ var StyledRemoveButton = import_styled_components51.default.button`
|
|
|
8524
8660
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
8525
8661
|
}
|
|
8526
8662
|
`;
|
|
8527
|
-
var StyledTag =
|
|
8663
|
+
var StyledTag = import_styled_components53.default.div`
|
|
8528
8664
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8529
8665
|
align-items: center;
|
|
8530
8666
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -8533,47 +8669,47 @@ var StyledTag = import_styled_components51.default.div`
|
|
|
8533
8669
|
overflow: hidden;
|
|
8534
8670
|
`;
|
|
8535
8671
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
8536
|
-
if ((0,
|
|
8672
|
+
if ((0, import_type_guards32.isNil)(onClickRemove)) {
|
|
8537
8673
|
return null;
|
|
8538
8674
|
}
|
|
8539
|
-
if ((0,
|
|
8675
|
+
if ((0, import_type_guards32.isNil)(onClickRemoveLabel)) {
|
|
8540
8676
|
throw new Error(
|
|
8541
8677
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
8542
8678
|
);
|
|
8543
8679
|
}
|
|
8544
|
-
return /* @__PURE__ */ (0,
|
|
8545
|
-
/* @__PURE__ */ (0,
|
|
8546
|
-
/* @__PURE__ */ (0,
|
|
8680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(import_jsx_runtime205.Fragment, { children: [
|
|
8681
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
8682
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(
|
|
8547
8683
|
StyledRemoveButton,
|
|
8548
8684
|
{
|
|
8549
8685
|
$colorScheme: colorScheme,
|
|
8550
8686
|
onClick: onClickRemove,
|
|
8551
8687
|
type: "button",
|
|
8552
8688
|
children: [
|
|
8553
|
-
/* @__PURE__ */ (0,
|
|
8689
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
8554
8690
|
Icon,
|
|
8555
8691
|
{
|
|
8556
8692
|
size: "sm",
|
|
8557
8693
|
type: "close"
|
|
8558
8694
|
}
|
|
8559
8695
|
),
|
|
8560
|
-
/* @__PURE__ */ (0,
|
|
8696
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
8561
8697
|
]
|
|
8562
8698
|
}
|
|
8563
8699
|
)
|
|
8564
8700
|
] });
|
|
8565
8701
|
};
|
|
8566
|
-
var Tag = (0,
|
|
8702
|
+
var Tag = (0, import_react42.forwardRef)(
|
|
8567
8703
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
8568
|
-
const labelProps = (0,
|
|
8569
|
-
return /* @__PURE__ */ (0,
|
|
8704
|
+
const labelProps = (0, import_type_guards32.isNotNil)(href) && (0, import_type_guards32.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
8705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(
|
|
8570
8706
|
StyledTag,
|
|
8571
8707
|
{
|
|
8572
8708
|
ref,
|
|
8573
8709
|
$colorScheme: colorScheme,
|
|
8574
8710
|
...otherProps,
|
|
8575
8711
|
children: [
|
|
8576
|
-
/* @__PURE__ */ (0,
|
|
8712
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
8577
8713
|
TagLabel,
|
|
8578
8714
|
{
|
|
8579
8715
|
...labelProps,
|
|
@@ -8581,7 +8717,7 @@ var Tag = (0, import_react40.forwardRef)(
|
|
|
8581
8717
|
children: label
|
|
8582
8718
|
}
|
|
8583
8719
|
),
|
|
8584
|
-
/* @__PURE__ */ (0,
|
|
8720
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
8585
8721
|
RemoveButton,
|
|
8586
8722
|
{
|
|
8587
8723
|
colorScheme,
|
|
@@ -8598,16 +8734,16 @@ Tag.displayName = "Tag";
|
|
|
8598
8734
|
|
|
8599
8735
|
// src/components/Tooltip/Tooltip.tsx
|
|
8600
8736
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
8601
|
-
var
|
|
8602
|
-
var
|
|
8603
|
-
var CompactTooltipStyles =
|
|
8737
|
+
var import_styled_components54 = __toESM(require("styled-components"));
|
|
8738
|
+
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
8739
|
+
var CompactTooltipStyles = import_styled_components54.css`
|
|
8604
8740
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
8605
8741
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
8606
8742
|
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
8607
8743
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
8608
8744
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
8609
8745
|
`;
|
|
8610
|
-
var StyledContent = (0,
|
|
8746
|
+
var StyledContent = (0, import_styled_components54.default)(import_react_tooltip2.Content)`
|
|
8611
8747
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
8612
8748
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
8613
8749
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -8665,14 +8801,14 @@ var Tooltip = ({
|
|
|
8665
8801
|
if (forceOpen === true) {
|
|
8666
8802
|
rootProps.open = true;
|
|
8667
8803
|
}
|
|
8668
|
-
return /* @__PURE__ */ (0,
|
|
8804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
|
|
8669
8805
|
import_react_tooltip2.Root,
|
|
8670
8806
|
{
|
|
8671
8807
|
delayDuration: delay,
|
|
8672
8808
|
...rootProps,
|
|
8673
8809
|
children: [
|
|
8674
|
-
/* @__PURE__ */ (0,
|
|
8675
|
-
/* @__PURE__ */ (0,
|
|
8810
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
8811
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
|
|
8676
8812
|
StyledContent,
|
|
8677
8813
|
{
|
|
8678
8814
|
$compact: compact,
|
|
@@ -8680,7 +8816,7 @@ var Tooltip = ({
|
|
|
8680
8816
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
8681
8817
|
children: [
|
|
8682
8818
|
content,
|
|
8683
|
-
!hideArrow ? /* @__PURE__ */ (0,
|
|
8819
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
|
|
8684
8820
|
"svg",
|
|
8685
8821
|
{
|
|
8686
8822
|
fill: "var(--tooltip-bg)",
|
|
@@ -8689,7 +8825,7 @@ var Tooltip = ({
|
|
|
8689
8825
|
viewBox: "0 0 12 8",
|
|
8690
8826
|
width: "12",
|
|
8691
8827
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8692
|
-
children: /* @__PURE__ */ (0,
|
|
8828
|
+
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
8829
|
}
|
|
8694
8830
|
) }) : null
|
|
8695
8831
|
]
|
|
@@ -8702,26 +8838,26 @@ var Tooltip = ({
|
|
|
8702
8838
|
Tooltip.displayName = "Tooltip";
|
|
8703
8839
|
|
|
8704
8840
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
8705
|
-
var
|
|
8706
|
-
var
|
|
8707
|
-
var
|
|
8841
|
+
var import_styled_components55 = __toESM(require("styled-components"));
|
|
8842
|
+
var import_type_guards33 = require("@wistia/type-guards");
|
|
8843
|
+
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
8708
8844
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
8709
8845
|
if (iconOnly) {
|
|
8710
|
-
return /* @__PURE__ */ (0,
|
|
8846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
8711
8847
|
"g",
|
|
8712
8848
|
{
|
|
8713
8849
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8714
8850
|
fill: brandmarkColor,
|
|
8715
|
-
children: /* @__PURE__ */ (0,
|
|
8851
|
+
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
8852
|
}
|
|
8717
8853
|
);
|
|
8718
8854
|
}
|
|
8719
|
-
return /* @__PURE__ */ (0,
|
|
8855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
8720
8856
|
"g",
|
|
8721
8857
|
{
|
|
8722
8858
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
8723
8859
|
fill: brandmarkColor,
|
|
8724
|
-
children: /* @__PURE__ */ (0,
|
|
8860
|
+
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
8861
|
}
|
|
8726
8862
|
);
|
|
8727
8863
|
};
|
|
@@ -8729,12 +8865,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
8729
8865
|
if (iconOnly) {
|
|
8730
8866
|
return null;
|
|
8731
8867
|
}
|
|
8732
|
-
return /* @__PURE__ */ (0,
|
|
8868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
8733
8869
|
"g",
|
|
8734
8870
|
{
|
|
8735
8871
|
"data-testid": "ui-wistia-logo-logotype",
|
|
8736
8872
|
fill: logotypeColor,
|
|
8737
|
-
children: /* @__PURE__ */ (0,
|
|
8873
|
+
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
8874
|
}
|
|
8739
8875
|
);
|
|
8740
8876
|
};
|
|
@@ -8744,7 +8880,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
8744
8880
|
}
|
|
8745
8881
|
return "0 0 144 31.47";
|
|
8746
8882
|
};
|
|
8747
|
-
var WistiaLogoComponent =
|
|
8883
|
+
var WistiaLogoComponent = import_styled_components55.default.svg`
|
|
8748
8884
|
height: ${({ height }) => `${height}px`};
|
|
8749
8885
|
|
|
8750
8886
|
/* ensure it will always fit on mobile */
|
|
@@ -8786,7 +8922,7 @@ var WistiaLogo = ({
|
|
|
8786
8922
|
};
|
|
8787
8923
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
8788
8924
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
8789
|
-
const Logo = /* @__PURE__ */ (0,
|
|
8925
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(
|
|
8790
8926
|
WistiaLogoComponent,
|
|
8791
8927
|
{
|
|
8792
8928
|
$hoverColor: hoverColor,
|
|
@@ -8796,23 +8932,23 @@ var WistiaLogo = ({
|
|
|
8796
8932
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8797
8933
|
...otherProps,
|
|
8798
8934
|
children: [
|
|
8799
|
-
/* @__PURE__ */ (0,
|
|
8800
|
-
(0,
|
|
8935
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)("title", { children: title }),
|
|
8936
|
+
(0, import_type_guards33.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("desc", { children: description }) : null,
|
|
8801
8937
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
8802
8938
|
renderLogotype(logotypeColor, iconOnly)
|
|
8803
8939
|
]
|
|
8804
8940
|
}
|
|
8805
8941
|
);
|
|
8806
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
8942
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime207.jsx)("a", { href, children: Logo }) : Logo;
|
|
8807
8943
|
};
|
|
8808
8944
|
WistiaLogo.displayName = "WistiaLogo";
|
|
8809
8945
|
|
|
8810
8946
|
// src/components/Select/Select.tsx
|
|
8811
8947
|
var import_react_select = require("@radix-ui/react-select");
|
|
8812
|
-
var
|
|
8813
|
-
var
|
|
8814
|
-
var
|
|
8815
|
-
var StyledTrigger = (0,
|
|
8948
|
+
var import_react43 = require("react");
|
|
8949
|
+
var import_styled_components56 = __toESM(require("styled-components"));
|
|
8950
|
+
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
8951
|
+
var StyledTrigger = (0, import_styled_components56.default)(import_react_select.Trigger)`
|
|
8816
8952
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8817
8953
|
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
8818
8954
|
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
@@ -8853,7 +8989,7 @@ var StyledTrigger = (0, import_styled_components54.default)(import_react_select.
|
|
|
8853
8989
|
background-color: var(--wui-color-bg-surface-disabled);
|
|
8854
8990
|
}
|
|
8855
8991
|
`;
|
|
8856
|
-
var StyledContent2 = (0,
|
|
8992
|
+
var StyledContent2 = (0, import_styled_components56.default)(import_react_select.Content)`
|
|
8857
8993
|
--wui-select-content-border: var(--wui-color-border);
|
|
8858
8994
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
8859
8995
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -8869,7 +9005,7 @@ var StyledContent2 = (0, import_styled_components54.default)(import_react_select
|
|
|
8869
9005
|
padding: var(--wui-select-option-padding);
|
|
8870
9006
|
min-width: 200px;
|
|
8871
9007
|
`;
|
|
8872
|
-
var Select = (0,
|
|
9008
|
+
var Select = (0, import_react43.forwardRef)(
|
|
8873
9009
|
({
|
|
8874
9010
|
colorScheme = "inherit",
|
|
8875
9011
|
children,
|
|
@@ -8879,13 +9015,13 @@ var Select = (0, import_react41.forwardRef)(
|
|
|
8879
9015
|
...props
|
|
8880
9016
|
}, forwardedRef) => {
|
|
8881
9017
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
8882
|
-
return /* @__PURE__ */ (0,
|
|
9018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(
|
|
8883
9019
|
import_react_select.Root,
|
|
8884
9020
|
{
|
|
8885
9021
|
...props,
|
|
8886
9022
|
onValueChange: onChange,
|
|
8887
9023
|
children: [
|
|
8888
|
-
/* @__PURE__ */ (0,
|
|
9024
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(
|
|
8889
9025
|
StyledTrigger,
|
|
8890
9026
|
{
|
|
8891
9027
|
ref: forwardedRef,
|
|
@@ -8893,8 +9029,8 @@ var Select = (0, import_react41.forwardRef)(
|
|
|
8893
9029
|
$fullWidth: responsiveFullWidth,
|
|
8894
9030
|
...props,
|
|
8895
9031
|
children: [
|
|
8896
|
-
/* @__PURE__ */ (0,
|
|
8897
|
-
/* @__PURE__ */ (0,
|
|
9032
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.Value, { placeholder }),
|
|
9033
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
8898
9034
|
Icon,
|
|
8899
9035
|
{
|
|
8900
9036
|
size: "md",
|
|
@@ -8904,10 +9040,10 @@ var Select = (0, import_react41.forwardRef)(
|
|
|
8904
9040
|
]
|
|
8905
9041
|
}
|
|
8906
9042
|
),
|
|
8907
|
-
/* @__PURE__ */ (0,
|
|
8908
|
-
/* @__PURE__ */ (0,
|
|
8909
|
-
/* @__PURE__ */ (0,
|
|
8910
|
-
/* @__PURE__ */ (0,
|
|
9043
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(StyledContent2, { position: "popper", children: [
|
|
9044
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(Icon, { type: "caret-up" }) }),
|
|
9045
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.Viewport, { children }),
|
|
9046
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(Icon, { type: "caret-down" }) })
|
|
8911
9047
|
] }) })
|
|
8912
9048
|
]
|
|
8913
9049
|
}
|
|
@@ -8918,10 +9054,10 @@ Select.displayName = "Select";
|
|
|
8918
9054
|
|
|
8919
9055
|
// src/components/Select/SelectOption.tsx
|
|
8920
9056
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
8921
|
-
var
|
|
8922
|
-
var
|
|
8923
|
-
var
|
|
8924
|
-
var StyledItem = (0,
|
|
9057
|
+
var import_react44 = require("react");
|
|
9058
|
+
var import_styled_components57 = __toESM(require("styled-components"));
|
|
9059
|
+
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
9060
|
+
var StyledItem = (0, import_styled_components57.default)(import_react_select2.Item)`
|
|
8925
9061
|
${variantStyleMap2.body3};
|
|
8926
9062
|
display: flex;
|
|
8927
9063
|
padding: var(--wui-select-option-padding);
|
|
@@ -8944,25 +9080,25 @@ var StyledItem = (0, import_styled_components55.default)(import_react_select2.It
|
|
|
8944
9080
|
background-color: transparent;
|
|
8945
9081
|
}
|
|
8946
9082
|
`;
|
|
8947
|
-
var StyledIconContainer =
|
|
9083
|
+
var StyledIconContainer = import_styled_components57.default.span`
|
|
8948
9084
|
width: 12px;
|
|
8949
9085
|
`;
|
|
8950
|
-
var SelectOption = (0,
|
|
9086
|
+
var SelectOption = (0, import_react44.forwardRef)(
|
|
8951
9087
|
({ children, ...props }, forwardedRef) => {
|
|
8952
|
-
return /* @__PURE__ */ (0,
|
|
9088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
|
|
8953
9089
|
StyledItem,
|
|
8954
9090
|
{
|
|
8955
9091
|
...props,
|
|
8956
9092
|
ref: forwardedRef,
|
|
8957
9093
|
children: [
|
|
8958
|
-
/* @__PURE__ */ (0,
|
|
9094
|
+
/* @__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
9095
|
Icon,
|
|
8960
9096
|
{
|
|
8961
9097
|
size: "sm",
|
|
8962
9098
|
type: "checkmark"
|
|
8963
9099
|
}
|
|
8964
9100
|
) }) }),
|
|
8965
|
-
/* @__PURE__ */ (0,
|
|
9101
|
+
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_react_select2.ItemText, { children })
|
|
8966
9102
|
]
|
|
8967
9103
|
}
|
|
8968
9104
|
);
|
|
@@ -8972,14 +9108,14 @@ SelectOption.displayName = "Option";
|
|
|
8972
9108
|
|
|
8973
9109
|
// src/components/Select/SelectOptionGroup.tsx
|
|
8974
9110
|
var import_react_select3 = require("@radix-ui/react-select");
|
|
8975
|
-
var
|
|
8976
|
-
var
|
|
8977
|
-
var StyledLabel3 = (0,
|
|
9111
|
+
var import_styled_components58 = __toESM(require("styled-components"));
|
|
9112
|
+
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
9113
|
+
var StyledLabel3 = (0, import_styled_components58.default)(import_react_select3.Label)`
|
|
8978
9114
|
padding: var(--wui-select-option-padding);
|
|
8979
9115
|
`;
|
|
8980
9116
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
8981
|
-
return /* @__PURE__ */ (0,
|
|
8982
|
-
/* @__PURE__ */ (0,
|
|
9117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
9118
|
+
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(StyledLabel3, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
|
|
8983
9119
|
Text,
|
|
8984
9120
|
{
|
|
8985
9121
|
prominence: "secondary",
|
|
@@ -9028,6 +9164,8 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
9028
9164
|
RadioGroup,
|
|
9029
9165
|
RadioMenuItem,
|
|
9030
9166
|
ScreenReaderOnly,
|
|
9167
|
+
SegmentedControl,
|
|
9168
|
+
SegmentedControlItem,
|
|
9031
9169
|
Select,
|
|
9032
9170
|
SelectOption,
|
|
9033
9171
|
SelectOptionGroup,
|