@wistia/ui 0.10.17-beta.f7aa0c32.a416489 → 0.10.18
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 +344 -311
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +51 -11
- package/dist/index.d.ts +51 -11
- package/dist/index.mjs +285 -253
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.10.
|
|
3
|
+
* @license @wistia/ui v0.10.18
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -83,6 +83,7 @@ __export(index_exports, {
|
|
|
83
83
|
ImageDimensionsValidator: () => import_validators.ImageDimensionsValidator,
|
|
84
84
|
Input: () => Input,
|
|
85
85
|
InputClickToCopy: () => InputClickToCopy,
|
|
86
|
+
InputPassword: () => InputPassword,
|
|
86
87
|
KeyboardShortcut: () => KeyboardShortcut,
|
|
87
88
|
Label: () => Label,
|
|
88
89
|
Link: () => Link,
|
|
@@ -8973,10 +8974,12 @@ var StyledFormControlLabel = import_styled_components39.default.label`
|
|
|
8973
8974
|
font-size: var(--wui-typography-label-3-size);
|
|
8974
8975
|
font-weight: var(--wui-typography-label-3-weight);
|
|
8975
8976
|
line-height: var(--wui-typography-label-3-line-height);
|
|
8977
|
+
justify-content: ${({ $align }) => $align === "left" ? "flex-start" : "space-between"};
|
|
8976
8978
|
|
|
8977
8979
|
${({ $disabled }) => $disabled && disabledStyle2}
|
|
8978
8980
|
`;
|
|
8979
8981
|
var FormControlLabel = ({
|
|
8982
|
+
align = "left",
|
|
8980
8983
|
label,
|
|
8981
8984
|
description,
|
|
8982
8985
|
disabled = false,
|
|
@@ -8992,15 +8995,17 @@ var FormControlLabel = ({
|
|
|
8992
8995
|
label,
|
|
8993
8996
|
/* @__PURE__ */ (0, import_jsx_runtime213.jsx)(FormControlLabelDescription, { children: description })
|
|
8994
8997
|
] });
|
|
8998
|
+
const slot = (0, import_type_guards27.isNotNil)(controlSlot) ? controlSlot : null;
|
|
8995
8999
|
return /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)(
|
|
8996
9000
|
StyledFormControlLabel,
|
|
8997
9001
|
{
|
|
9002
|
+
$align: align,
|
|
8998
9003
|
$disabled: disabled,
|
|
8999
9004
|
htmlFor,
|
|
9000
9005
|
...props,
|
|
9001
9006
|
children: [
|
|
9002
|
-
|
|
9003
|
-
labelContent
|
|
9007
|
+
align === "left" ? slot : labelContent,
|
|
9008
|
+
align === "left" ? labelContent : slot
|
|
9004
9009
|
]
|
|
9005
9010
|
}
|
|
9006
9011
|
);
|
|
@@ -12006,9 +12011,9 @@ var FilterMenu = (0, import_react56.forwardRef)(
|
|
|
12006
12011
|
FilterMenu.displayName = "FilterMenu";
|
|
12007
12012
|
|
|
12008
12013
|
// src/components/Modal/Modal.tsx
|
|
12009
|
-
var
|
|
12014
|
+
var import_react60 = require("react");
|
|
12010
12015
|
var import_styled_components72 = __toESM(require("styled-components"));
|
|
12011
|
-
var
|
|
12016
|
+
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
12012
12017
|
var import_type_guards47 = require("@wistia/type-guards");
|
|
12013
12018
|
|
|
12014
12019
|
// src/components/Modal/ModalHeader.tsx
|
|
@@ -12091,140 +12096,94 @@ var useFocusRestore = () => {
|
|
|
12091
12096
|
|
|
12092
12097
|
// src/components/Modal/ModalContent.tsx
|
|
12093
12098
|
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
12094
|
-
var
|
|
12095
|
-
|
|
12096
|
-
opacity: 0;
|
|
12097
|
-
transform: translateX(-50%) translateY(calc(var(--wui-modal-translate-y) + 24px));
|
|
12098
|
-
}
|
|
12099
|
-
|
|
12100
|
-
to {
|
|
12101
|
-
opacity: 1;
|
|
12102
|
-
transform: translateX(-50%) translateY(var(--wui-modal-translate-y));
|
|
12103
|
-
}
|
|
12104
|
-
`;
|
|
12105
|
-
var modalExit = import_styled_components70.keyframes`
|
|
12106
|
-
from {
|
|
12107
|
-
opacity: 1;
|
|
12108
|
-
transform: translateX(-50%) translateY(var(--wui-modal-translate-y));
|
|
12109
|
-
}
|
|
12099
|
+
var alignTopStyles = import_styled_components70.css`
|
|
12100
|
+
--wui-modal-translate-y: 0;
|
|
12110
12101
|
|
|
12111
|
-
|
|
12112
|
-
opacity: 0;
|
|
12113
|
-
transform: translateX(-50%) translateY(calc(var(--wui-modal-translate-y) + 24px));
|
|
12114
|
-
}
|
|
12102
|
+
top: 0;
|
|
12115
12103
|
`;
|
|
12116
|
-
var
|
|
12117
|
-
--wui-modal-screen-offset: var(--wui-space-05);
|
|
12104
|
+
var alignVerticalCenterStyles = import_styled_components70.css`
|
|
12118
12105
|
--wui-modal-translate-y: -50%;
|
|
12119
12106
|
|
|
12120
|
-
height: auto;
|
|
12121
|
-
max-height: calc(100vh - var(--wui-modal-screen-offset) * 2);
|
|
12122
12107
|
top: 50%;
|
|
12123
|
-
left: 50%;
|
|
12124
|
-
transform: translateX(-50%) translateY(var(--wui-modal-translate-y));
|
|
12125
|
-
transform-origin: left center;
|
|
12126
|
-
animation: ${modalEnter} var(--wui-motion-duration-04) var(--wui-motion-ease-out);
|
|
12127
|
-
|
|
12128
|
-
&[data-state='closed'] {
|
|
12129
|
-
animation: ${modalExit} var(--wui-motion-duration-03) var(--wui-motion-ease-out);
|
|
12130
|
-
}
|
|
12131
12108
|
`;
|
|
12132
|
-
var
|
|
12133
|
-
--wui-modal-
|
|
12134
|
-
--wui-modal-screen-offset-bottom: 5vh;
|
|
12135
|
-
--wui-modal-translate-y: 0%;
|
|
12109
|
+
var alignBottomStyles = import_styled_components70.css`
|
|
12110
|
+
--wui-modal-translate-y: 0;
|
|
12136
12111
|
|
|
12137
|
-
|
|
12138
|
-
max-height: calc(
|
|
12139
|
-
100vh - var(--wui-modal-screen-offset-top) - var(--wui-modal-screen-offset-bottom)
|
|
12140
|
-
);
|
|
12141
|
-
top: var(--wui-modal-screen-offset-top);
|
|
12142
|
-
left: 50%;
|
|
12143
|
-
transform: translateX(-50%) translateY(var(--wui-modal-translate-y));
|
|
12144
|
-
transform-origin: left center;
|
|
12145
|
-
animation: ${modalEnter} var(--wui-motion-duration-04) var(--wui-motion-ease-out);
|
|
12146
|
-
|
|
12147
|
-
&[data-state='closed'] {
|
|
12148
|
-
animation: ${modalExit} var(--wui-motion-duration-03) var(--wui-motion-ease-out);
|
|
12149
|
-
}
|
|
12112
|
+
bottom: 0;
|
|
12150
12113
|
`;
|
|
12151
|
-
var
|
|
12152
|
-
|
|
12153
|
-
opacity: 0;
|
|
12154
|
-
transform: translateX(100%);
|
|
12155
|
-
}
|
|
12114
|
+
var alignHorizontalCenterStyles = import_styled_components70.css`
|
|
12115
|
+
--wui-modal-translate-x: -50%;
|
|
12156
12116
|
|
|
12157
|
-
|
|
12158
|
-
opacity: 1;
|
|
12159
|
-
transform: translateX(0);
|
|
12160
|
-
}
|
|
12117
|
+
left: 50%;
|
|
12161
12118
|
`;
|
|
12162
|
-
var
|
|
12163
|
-
|
|
12164
|
-
opacity: 1;
|
|
12165
|
-
transform: translateX(0);
|
|
12166
|
-
}
|
|
12119
|
+
var alignRightStyles = import_styled_components70.css`
|
|
12120
|
+
--wui-modal-translate-x: 0;
|
|
12167
12121
|
|
|
12168
|
-
|
|
12169
|
-
opacity: 0;
|
|
12170
|
-
transform: translateX(100%);
|
|
12171
|
-
}
|
|
12122
|
+
right: 0;
|
|
12172
12123
|
`;
|
|
12173
|
-
var
|
|
12174
|
-
--wui-modal-
|
|
12124
|
+
var alignLeftStyles = import_styled_components70.css`
|
|
12125
|
+
--wui-modal-translate-x: 0;
|
|
12175
12126
|
|
|
12176
|
-
|
|
12177
|
-
top: var(--wui-modal-screen-offset);
|
|
12178
|
-
right: var(--wui-modal-screen-offset);
|
|
12179
|
-
animation: ${slideInRight} var(--wui-motion-duration-05) var(--wui-motion-ease-out);
|
|
12180
|
-
transform-origin: right center;
|
|
12181
|
-
|
|
12182
|
-
&[data-state='closed'] {
|
|
12183
|
-
animation: ${slideOutRight} var(--wui-motion-duration-03) var(--wui-motion-ease-in);
|
|
12184
|
-
}
|
|
12127
|
+
left: 0;
|
|
12185
12128
|
`;
|
|
12186
|
-
var positionStyleMap = {
|
|
12187
|
-
centered: centeredModalStyles,
|
|
12188
|
-
"fixed-top": fixedTopModalStyles,
|
|
12189
|
-
"right-side-panel": rightSidePanelModalStyles
|
|
12190
|
-
};
|
|
12191
12129
|
var StyledModalContent = (0, import_styled_components70.default)(import_react_dialog3.Content)`
|
|
12192
|
-
|
|
12130
|
+
background-color: var(--wui-color-bg-app);
|
|
12131
|
+
box-sizing: border-box;
|
|
12193
12132
|
display: flex;
|
|
12194
12133
|
flex-direction: column;
|
|
12195
|
-
|
|
12134
|
+
height: 100vh;
|
|
12196
12135
|
left: 0;
|
|
12136
|
+
overflow: auto;
|
|
12137
|
+
padding: var(--wui-space-05);
|
|
12138
|
+
position: fixed;
|
|
12139
|
+
top: 0;
|
|
12197
12140
|
width: 100vw;
|
|
12198
|
-
height: 100vh;
|
|
12199
12141
|
z-index: var(--wui-zindex-modal);
|
|
12200
|
-
box-sizing: border-box;
|
|
12201
|
-
padding: var(--wui-space-05);
|
|
12202
|
-
background-color: var(--wui-color-bg-app);
|
|
12203
|
-
overflow: auto;
|
|
12204
12142
|
|
|
12205
12143
|
${mq.smAndUp} {
|
|
12206
|
-
|
|
12144
|
+
--wui-modal-screen-offset: var(--wui-space-05);
|
|
12145
|
+
--wui-modal-max-height: calc(100vh - var(--wui-modal-screen-offset) * 2);
|
|
12146
|
+
--wui-modal-max-width: calc(100vw - var(--wui-modal-screen-offset) * 2);
|
|
12147
|
+
|
|
12207
12148
|
top: unset;
|
|
12208
12149
|
left: unset;
|
|
12209
|
-
|
|
12210
|
-
|
|
12211
|
-
|
|
12150
|
+
${({ $alignVertical }) => $alignVertical === "top" && alignTopStyles}
|
|
12151
|
+
${({ $alignVertical }) => $alignVertical === "center" && alignVerticalCenterStyles}
|
|
12152
|
+
${({ $alignVertical }) => $alignVertical === "bottom" && alignBottomStyles}
|
|
12153
|
+
${({ $alignHorizontal }) => $alignHorizontal === "center" && alignHorizontalCenterStyles}
|
|
12154
|
+
${({ $alignHorizontal }) => $alignHorizontal === "right" && alignRightStyles}
|
|
12155
|
+
${({ $alignHorizontal }) => $alignHorizontal === "left" && alignLeftStyles}
|
|
12156
|
+
animation: contentShow var(--wui-motion-duration-03) var(--wui-motion-ease-out);
|
|
12212
12157
|
border-radius: var(--wui-border-radius-03);
|
|
12213
|
-
|
|
12214
|
-
|
|
12215
|
-
|
|
12216
|
-
|
|
12158
|
+
height: ${({ $fullHeight }) => $fullHeight ? "min-content" : "auto"};
|
|
12159
|
+
max-height: var(--wui-modal-max-height);
|
|
12160
|
+
${({ $fullHeight }) => $fullHeight ? "min-height: calc(100vh - 48px);" : ""}
|
|
12161
|
+
max-width: var(--wui-modal-max-width);
|
|
12162
|
+
translate: var(--wui-modal-translate-x) var(--wui-modal-translate-y);
|
|
12163
|
+
min-width: ${({ $width }) => $width ?? DEFAULT_MODAL_WIDTH};
|
|
12164
|
+
width: ${({ $width }) => $width ?? DEFAULT_MODAL_WIDTH};
|
|
12165
|
+
}
|
|
12166
|
+
|
|
12167
|
+
@keyframes contentShow {
|
|
12168
|
+
from {
|
|
12169
|
+
scale: 0.96;
|
|
12170
|
+
}
|
|
12171
|
+
|
|
12172
|
+
to {
|
|
12173
|
+
scale: 1;
|
|
12174
|
+
}
|
|
12217
12175
|
}
|
|
12218
12176
|
`;
|
|
12219
12177
|
var ModalContent = (0, import_react58.forwardRef)(
|
|
12220
|
-
({ fullHeight, width,
|
|
12178
|
+
({ fullHeight, width, alignHorizontal, alignVertical, children, ...props }, ref) => {
|
|
12221
12179
|
useFocusRestore();
|
|
12222
12180
|
return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
|
|
12223
12181
|
StyledModalContent,
|
|
12224
12182
|
{
|
|
12225
12183
|
ref,
|
|
12184
|
+
$alignHorizontal: alignHorizontal,
|
|
12185
|
+
$alignVertical: alignVertical,
|
|
12226
12186
|
$fullHeight: fullHeight,
|
|
12227
|
-
$positionVariant: positionVariant,
|
|
12228
12187
|
$width: width,
|
|
12229
12188
|
"aria-describedby": void 0,
|
|
12230
12189
|
...props,
|
|
@@ -12234,41 +12193,63 @@ var ModalContent = (0, import_react58.forwardRef)(
|
|
|
12234
12193
|
}
|
|
12235
12194
|
);
|
|
12236
12195
|
|
|
12237
|
-
// src/components/
|
|
12238
|
-
var
|
|
12196
|
+
// src/private/components/Backdrop/Backdrop.tsx
|
|
12197
|
+
var import_react59 = require("react");
|
|
12239
12198
|
var import_styled_components71 = __toESM(require("styled-components"));
|
|
12240
|
-
var
|
|
12241
|
-
|
|
12242
|
-
|
|
12243
|
-
|
|
12244
|
-
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
opacity: 0;
|
|
12256
|
-
}
|
|
12257
|
-
`;
|
|
12258
|
-
var ModalOverlay = (0, import_styled_components71.default)(import_react_dialog4.DialogOverlay)`
|
|
12259
|
-
animation: ${backdropShow} var(--wui-motion-duration-02);
|
|
12199
|
+
var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
12200
|
+
var alignVerticalMap = {
|
|
12201
|
+
stretch: "normal",
|
|
12202
|
+
top: "start",
|
|
12203
|
+
center: "center",
|
|
12204
|
+
bottom: "end"
|
|
12205
|
+
};
|
|
12206
|
+
var alignHorizontalMap = {
|
|
12207
|
+
left: "start",
|
|
12208
|
+
center: "center",
|
|
12209
|
+
right: "end"
|
|
12210
|
+
};
|
|
12211
|
+
var BackdropComponent = import_styled_components71.default.div`
|
|
12212
|
+
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
12213
|
+
animation-name: backdropShow var(--wui-motion-duration-03) var(--wui-motion-ease-out);
|
|
12260
12214
|
background: var(--wui-color-backdrop);
|
|
12215
|
+
display: flex;
|
|
12261
12216
|
inset: 0;
|
|
12217
|
+
justify-content: ${({ $alignHorizontal }) => alignHorizontalMap[$alignHorizontal]};
|
|
12218
|
+
overflow-y: auto;
|
|
12262
12219
|
position: fixed;
|
|
12263
12220
|
z-index: var(--wui-zindex-backdrop);
|
|
12264
12221
|
|
|
12265
|
-
|
|
12266
|
-
animation:
|
|
12222
|
+
@media (prefers-reduced-motion: reduce) {
|
|
12223
|
+
animation: none;
|
|
12224
|
+
opacity: 1;
|
|
12225
|
+
}
|
|
12226
|
+
|
|
12227
|
+
@keyframes backdropShow {
|
|
12228
|
+
from {
|
|
12229
|
+
opacity: 0;
|
|
12230
|
+
}
|
|
12231
|
+
|
|
12232
|
+
to {
|
|
12233
|
+
opacity: 1;
|
|
12234
|
+
}
|
|
12267
12235
|
}
|
|
12268
12236
|
`;
|
|
12237
|
+
var Backdrop = (0, import_react59.forwardRef)(
|
|
12238
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
|
|
12239
|
+
BackdropComponent,
|
|
12240
|
+
{
|
|
12241
|
+
ref,
|
|
12242
|
+
$alignHorizontal: alignHorizontal,
|
|
12243
|
+
$alignVertical: alignVertical,
|
|
12244
|
+
...otherProps,
|
|
12245
|
+
children
|
|
12246
|
+
}
|
|
12247
|
+
)
|
|
12248
|
+
);
|
|
12249
|
+
Backdrop.displayName = "Backdrop";
|
|
12269
12250
|
|
|
12270
12251
|
// src/components/Modal/Modal.tsx
|
|
12271
|
-
var
|
|
12252
|
+
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
12272
12253
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
12273
12254
|
var ModalBody = import_styled_components72.default.div`
|
|
12274
12255
|
flex-direction: column;
|
|
@@ -12276,7 +12257,7 @@ var ModalBody = import_styled_components72.default.div`
|
|
|
12276
12257
|
flex: 1 0 0;
|
|
12277
12258
|
order: 2;
|
|
12278
12259
|
`;
|
|
12279
|
-
var Modal = (0,
|
|
12260
|
+
var Modal = (0, import_react60.forwardRef)(
|
|
12280
12261
|
({
|
|
12281
12262
|
children,
|
|
12282
12263
|
fullHeight = false,
|
|
@@ -12285,13 +12266,14 @@ var Modal = (0, import_react59.forwardRef)(
|
|
|
12285
12266
|
initialFocusRef,
|
|
12286
12267
|
isOpen,
|
|
12287
12268
|
onRequestClose,
|
|
12288
|
-
positionVariant = "centered",
|
|
12289
12269
|
title,
|
|
12290
12270
|
width = DEFAULT_MODAL_WIDTH,
|
|
12271
|
+
alignHorizontal = "center",
|
|
12272
|
+
alignVertical = "center",
|
|
12291
12273
|
...props
|
|
12292
12274
|
}, ref) => {
|
|
12293
|
-
return /* @__PURE__ */ (0,
|
|
12294
|
-
|
|
12275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
12276
|
+
import_react_dialog4.Root,
|
|
12295
12277
|
{
|
|
12296
12278
|
onOpenChange: (open2) => {
|
|
12297
12279
|
if (!open2 && (0, import_type_guards47.isNotNil)(onRequestClose)) {
|
|
@@ -12299,12 +12281,14 @@ var Modal = (0, import_react59.forwardRef)(
|
|
|
12299
12281
|
}
|
|
12300
12282
|
},
|
|
12301
12283
|
open: isOpen,
|
|
12302
|
-
children: /* @__PURE__ */ (0,
|
|
12303
|
-
/* @__PURE__ */ (0,
|
|
12304
|
-
/* @__PURE__ */ (0,
|
|
12284
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(import_react_dialog4.Portal, { children: [
|
|
12285
|
+
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(Backdrop, {}),
|
|
12286
|
+
/* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(
|
|
12305
12287
|
ModalContent,
|
|
12306
12288
|
{
|
|
12307
12289
|
ref,
|
|
12290
|
+
alignHorizontal,
|
|
12291
|
+
alignVertical,
|
|
12308
12292
|
fullHeight,
|
|
12309
12293
|
onOpenAutoFocus: (event) => {
|
|
12310
12294
|
if ((0, import_type_guards47.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
@@ -12314,12 +12298,11 @@ var Modal = (0, import_react59.forwardRef)(
|
|
|
12314
12298
|
});
|
|
12315
12299
|
}
|
|
12316
12300
|
},
|
|
12317
|
-
positionVariant,
|
|
12318
12301
|
width,
|
|
12319
12302
|
...props,
|
|
12320
12303
|
children: [
|
|
12321
|
-
/* @__PURE__ */ (0,
|
|
12322
|
-
/* @__PURE__ */ (0,
|
|
12304
|
+
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(ModalBody, { children }),
|
|
12305
|
+
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
12323
12306
|
ModalHeader,
|
|
12324
12307
|
{
|
|
12325
12308
|
hideCloseButton,
|
|
@@ -12350,7 +12333,7 @@ var getControlProps = (isOpen, onOpenChange) => {
|
|
|
12350
12333
|
// src/components/Popover/PopoverArrow.tsx
|
|
12351
12334
|
var import_react_popover = require("@radix-ui/react-popover");
|
|
12352
12335
|
var import_styled_components73 = __toESM(require("styled-components"));
|
|
12353
|
-
var
|
|
12336
|
+
var import_jsx_runtime255 = require("react/jsx-runtime");
|
|
12354
12337
|
var StyledPath = import_styled_components73.default.path`
|
|
12355
12338
|
fill: var(--wui-color-border-secondary);
|
|
12356
12339
|
`;
|
|
@@ -12389,7 +12372,7 @@ var StyledCircle = import_styled_components73.default.circle`
|
|
|
12389
12372
|
}
|
|
12390
12373
|
`;
|
|
12391
12374
|
var PopoverArrow = ({ isAnimated }) => {
|
|
12392
|
-
return /* @__PURE__ */ (0,
|
|
12375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(import_react_popover.PopoverArrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime255.jsxs)(
|
|
12393
12376
|
"svg",
|
|
12394
12377
|
{
|
|
12395
12378
|
fill: "none",
|
|
@@ -12398,8 +12381,8 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
12398
12381
|
width: "48",
|
|
12399
12382
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12400
12383
|
children: [
|
|
12401
|
-
/* @__PURE__ */ (0,
|
|
12402
|
-
/* @__PURE__ */ (0,
|
|
12384
|
+
/* @__PURE__ */ (0, import_jsx_runtime255.jsx)(StyledPath, { d: "M24 26.6667C21.0545 26.6667 18.6667 29.0545 18.6667 32C18.6667 34.9455 21.0545 37.3333 24 37.3333C26.9455 37.3333 29.3333 34.9455 29.3333 32C29.3333 29.0545 26.9455 26.6667 24 26.6667ZM23 0V32H25V0H23Z" }),
|
|
12385
|
+
/* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
|
|
12403
12386
|
StyledCircle,
|
|
12404
12387
|
{
|
|
12405
12388
|
$isAnimated: isAnimated,
|
|
@@ -12410,7 +12393,7 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
12410
12393
|
strokeWidth: "4"
|
|
12411
12394
|
}
|
|
12412
12395
|
),
|
|
12413
|
-
/* @__PURE__ */ (0,
|
|
12396
|
+
/* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
|
|
12414
12397
|
StyledCircle,
|
|
12415
12398
|
{
|
|
12416
12399
|
$isAnimated: isAnimated,
|
|
@@ -12428,7 +12411,7 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
12428
12411
|
PopoverArrow.displayName = "PopoverArrow";
|
|
12429
12412
|
|
|
12430
12413
|
// src/components/Popover/Popover.tsx
|
|
12431
|
-
var
|
|
12414
|
+
var import_jsx_runtime256 = require("react/jsx-runtime");
|
|
12432
12415
|
var StyledContent2 = (0, import_styled_components74.default)(import_react_popover2.Content)`
|
|
12433
12416
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12434
12417
|
${({ $unstyled }) => !$unstyled && import_styled_components74.css`
|
|
@@ -12467,9 +12450,9 @@ var Popover2 = ({
|
|
|
12467
12450
|
"--wui-popover-max-width": maxWidth,
|
|
12468
12451
|
"--wui-popover-max-height": maxHeight
|
|
12469
12452
|
};
|
|
12470
|
-
return /* @__PURE__ */ (0,
|
|
12471
|
-
/* @__PURE__ */ (0,
|
|
12472
|
-
/* @__PURE__ */ (0,
|
|
12453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime256.jsxs)(import_react_popover2.Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
12454
|
+
/* @__PURE__ */ (0, import_jsx_runtime256.jsx)(import_react_popover2.Trigger, { asChild: true, children: trigger }),
|
|
12455
|
+
/* @__PURE__ */ (0, import_jsx_runtime256.jsx)(import_react_popover2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime256.jsxs)(
|
|
12473
12456
|
StyledContent2,
|
|
12474
12457
|
{
|
|
12475
12458
|
$colorScheme: colorScheme,
|
|
@@ -12478,17 +12461,17 @@ var Popover2 = ({
|
|
|
12478
12461
|
$unstyled: unstyled,
|
|
12479
12462
|
style,
|
|
12480
12463
|
children: [
|
|
12481
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
12464
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(import_react_popover2.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
|
|
12482
12465
|
IconButton,
|
|
12483
12466
|
{
|
|
12484
12467
|
"data-wui-popover-close": true,
|
|
12485
12468
|
label: "Close",
|
|
12486
12469
|
variant: "ghost",
|
|
12487
|
-
children: /* @__PURE__ */ (0,
|
|
12470
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(Icon, { type: "close" })
|
|
12488
12471
|
}
|
|
12489
12472
|
) }),
|
|
12490
|
-
withArrow ? /* @__PURE__ */ (0,
|
|
12491
|
-
/* @__PURE__ */ (0,
|
|
12473
|
+
withArrow ? /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(PopoverArrow, { isAnimated }) : null,
|
|
12474
|
+
/* @__PURE__ */ (0, import_jsx_runtime256.jsx)("div", { children })
|
|
12492
12475
|
]
|
|
12493
12476
|
}
|
|
12494
12477
|
) })
|
|
@@ -12500,7 +12483,7 @@ Popover2.displayName = "Popover";
|
|
|
12500
12483
|
var import_styled_components75 = __toESM(require("styled-components"));
|
|
12501
12484
|
var import_react_progress = require("@radix-ui/react-progress");
|
|
12502
12485
|
var import_type_guards49 = require("@wistia/type-guards");
|
|
12503
|
-
var
|
|
12486
|
+
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
12504
12487
|
var ProgressBarWrapper = import_styled_components75.default.div`
|
|
12505
12488
|
--progress-bar-height: 8px;
|
|
12506
12489
|
--progress-bar-indicator-color: var(--wui-color-bg-fill);
|
|
@@ -12553,15 +12536,15 @@ var ProgressBar = ({
|
|
|
12553
12536
|
labelRight,
|
|
12554
12537
|
...props
|
|
12555
12538
|
}) => {
|
|
12556
|
-
return /* @__PURE__ */ (0,
|
|
12557
|
-
(0, import_type_guards49.isNotNil)(labelLeft) ? /* @__PURE__ */ (0,
|
|
12558
|
-
/* @__PURE__ */ (0,
|
|
12539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(ProgressBarWrapper, { children: [
|
|
12540
|
+
(0, import_type_guards49.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
|
|
12541
|
+
/* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
12559
12542
|
StyledProgressBar,
|
|
12560
12543
|
{
|
|
12561
12544
|
max,
|
|
12562
12545
|
value: progress,
|
|
12563
12546
|
...props,
|
|
12564
|
-
children: /* @__PURE__ */ (0,
|
|
12547
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
12565
12548
|
StyledProgressIndicator,
|
|
12566
12549
|
{
|
|
12567
12550
|
$max: max,
|
|
@@ -12570,17 +12553,17 @@ var ProgressBar = ({
|
|
|
12570
12553
|
)
|
|
12571
12554
|
}
|
|
12572
12555
|
),
|
|
12573
|
-
(0, import_type_guards49.isNotNil)(labelRight) ? /* @__PURE__ */ (0,
|
|
12556
|
+
(0, import_type_guards49.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(ProgressBarLabel, { children: labelRight }) : null
|
|
12574
12557
|
] });
|
|
12575
12558
|
};
|
|
12576
12559
|
ProgressBar.displayName = "ProgressBar";
|
|
12577
12560
|
|
|
12578
12561
|
// src/components/Radio/Radio.tsx
|
|
12579
|
-
var
|
|
12562
|
+
var import_react61 = require("react");
|
|
12580
12563
|
var import_styled_components76 = __toESM(require("styled-components"));
|
|
12581
12564
|
var import_type_guards50 = require("@wistia/type-guards");
|
|
12582
|
-
var
|
|
12583
|
-
var RadioIcon = () => /* @__PURE__ */ (0,
|
|
12565
|
+
var import_jsx_runtime258 = require("react/jsx-runtime");
|
|
12566
|
+
var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
|
|
12584
12567
|
"svg",
|
|
12585
12568
|
{
|
|
12586
12569
|
fill: "inherit",
|
|
@@ -12588,7 +12571,7 @@ var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
|
12588
12571
|
viewBox: "0 0 1 1",
|
|
12589
12572
|
width: "1",
|
|
12590
12573
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12591
|
-
children: /* @__PURE__ */ (0,
|
|
12574
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
|
|
12592
12575
|
"circle",
|
|
12593
12576
|
{
|
|
12594
12577
|
cx: "0.5",
|
|
@@ -12679,7 +12662,7 @@ var StyledHiddenRadioInput = import_styled_components76.default.input`
|
|
|
12679
12662
|
display: block;
|
|
12680
12663
|
}
|
|
12681
12664
|
`;
|
|
12682
|
-
var Radio = (0,
|
|
12665
|
+
var Radio = (0, import_react61.forwardRef)(
|
|
12683
12666
|
({
|
|
12684
12667
|
checked,
|
|
12685
12668
|
disabled = false,
|
|
@@ -12694,7 +12677,7 @@ var Radio = (0, import_react60.forwardRef)(
|
|
|
12694
12677
|
hideLabel = false,
|
|
12695
12678
|
...props
|
|
12696
12679
|
}, ref) => {
|
|
12697
|
-
const generatedId = (0,
|
|
12680
|
+
const generatedId = (0, import_react61.useId)();
|
|
12698
12681
|
const computedId = (0, import_type_guards50.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
12699
12682
|
const radioGroupContext = useRadioGroup();
|
|
12700
12683
|
const contextName = radioGroupContext?.name;
|
|
@@ -12703,13 +12686,13 @@ var Radio = (0, import_react60.forwardRef)(
|
|
|
12703
12686
|
const radioName = name ?? contextName;
|
|
12704
12687
|
const handleOnChange = onChange ?? contextOnChange;
|
|
12705
12688
|
const defaultChecked = (0, import_type_guards50.isNotUndefined)(value) && (0, import_type_guards50.isNotUndefined)(contextValue) ? contextValue.includes(value) : void 0;
|
|
12706
|
-
return /* @__PURE__ */ (0,
|
|
12689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime258.jsxs)(
|
|
12707
12690
|
StyledRadioWrapper,
|
|
12708
12691
|
{
|
|
12709
12692
|
$disabled: disabled,
|
|
12710
12693
|
"aria-invalid": props["aria-invalid"],
|
|
12711
12694
|
children: [
|
|
12712
|
-
/* @__PURE__ */ (0,
|
|
12695
|
+
/* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
|
|
12713
12696
|
StyledHiddenRadioInput,
|
|
12714
12697
|
{
|
|
12715
12698
|
...props,
|
|
@@ -12724,16 +12707,16 @@ var Radio = (0, import_react60.forwardRef)(
|
|
|
12724
12707
|
...(0, import_type_guards50.isNotUndefined)(defaultChecked) ? { defaultChecked } : { checked }
|
|
12725
12708
|
}
|
|
12726
12709
|
),
|
|
12727
|
-
/* @__PURE__ */ (0,
|
|
12710
|
+
/* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
|
|
12728
12711
|
FormControlLabel,
|
|
12729
12712
|
{
|
|
12730
|
-
controlSlot: /* @__PURE__ */ (0,
|
|
12713
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
|
|
12731
12714
|
StyledRadioInput,
|
|
12732
12715
|
{
|
|
12733
12716
|
$disabled: disabled,
|
|
12734
12717
|
$size: size,
|
|
12735
12718
|
"data-wui-faux-input": "true",
|
|
12736
|
-
children: /* @__PURE__ */ (0,
|
|
12719
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(RadioIcon, {})
|
|
12737
12720
|
}
|
|
12738
12721
|
),
|
|
12739
12722
|
description,
|
|
@@ -12751,20 +12734,20 @@ var Radio = (0, import_react60.forwardRef)(
|
|
|
12751
12734
|
Radio.displayName = "Radio";
|
|
12752
12735
|
|
|
12753
12736
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
12754
|
-
var
|
|
12737
|
+
var import_react64 = require("react");
|
|
12755
12738
|
var import_styled_components78 = __toESM(require("styled-components"));
|
|
12756
12739
|
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
12757
12740
|
var import_type_guards52 = require("@wistia/type-guards");
|
|
12758
12741
|
|
|
12759
12742
|
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
12760
|
-
var
|
|
12761
|
-
var
|
|
12762
|
-
var SelectedItemStyleContext = (0,
|
|
12743
|
+
var import_react62 = require("react");
|
|
12744
|
+
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
12745
|
+
var SelectedItemStyleContext = (0, import_react62.createContext)(null);
|
|
12763
12746
|
var SelectedItemStyleProvider = ({
|
|
12764
12747
|
children
|
|
12765
12748
|
}) => {
|
|
12766
|
-
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0,
|
|
12767
|
-
const selectedItemIndicatorStyle = (0,
|
|
12749
|
+
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0, import_react62.useState)(null);
|
|
12750
|
+
const selectedItemIndicatorStyle = (0, import_react62.useMemo)(
|
|
12768
12751
|
() => selectedItemMeasurements != null ? {
|
|
12769
12752
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
12770
12753
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px) translateY(-50%)`,
|
|
@@ -12772,17 +12755,17 @@ var SelectedItemStyleProvider = ({
|
|
|
12772
12755
|
} : void 0,
|
|
12773
12756
|
[selectedItemMeasurements]
|
|
12774
12757
|
);
|
|
12775
|
-
const contextValue = (0,
|
|
12758
|
+
const contextValue = (0, import_react62.useMemo)(
|
|
12776
12759
|
() => ({
|
|
12777
12760
|
setSelectedItemMeasurements,
|
|
12778
12761
|
selectedItemIndicatorStyle
|
|
12779
12762
|
}),
|
|
12780
12763
|
[selectedItemIndicatorStyle]
|
|
12781
12764
|
);
|
|
12782
|
-
return /* @__PURE__ */ (0,
|
|
12765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(SelectedItemStyleContext.Provider, { value: contextValue, children });
|
|
12783
12766
|
};
|
|
12784
12767
|
var useSelectedItemStyle = () => {
|
|
12785
|
-
const context = (0,
|
|
12768
|
+
const context = (0, import_react62.useContext)(SelectedItemStyleContext);
|
|
12786
12769
|
if (context === null) {
|
|
12787
12770
|
throw new Error("useSelectedItemStyle must be used within a SelectedItemStyleProvider");
|
|
12788
12771
|
}
|
|
@@ -12794,11 +12777,11 @@ var import_styled_components77 = __toESM(require("styled-components"));
|
|
|
12794
12777
|
var import_type_guards51 = require("@wistia/type-guards");
|
|
12795
12778
|
|
|
12796
12779
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
12797
|
-
var
|
|
12798
|
-
var SegmentedControlValueContext = (0,
|
|
12780
|
+
var import_react63 = require("react");
|
|
12781
|
+
var SegmentedControlValueContext = (0, import_react63.createContext)(null);
|
|
12799
12782
|
var SegmentedControlValueProvider = SegmentedControlValueContext.Provider;
|
|
12800
12783
|
var useSegmentedControlValue = () => {
|
|
12801
|
-
const context = (0,
|
|
12784
|
+
const context = (0, import_react63.useContext)(SegmentedControlValueContext);
|
|
12802
12785
|
if (context === null) {
|
|
12803
12786
|
throw new Error("useSegmentedControlValue must be used within a SegmentedControlValueProvider");
|
|
12804
12787
|
}
|
|
@@ -12806,7 +12789,7 @@ var useSegmentedControlValue = () => {
|
|
|
12806
12789
|
};
|
|
12807
12790
|
|
|
12808
12791
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
12809
|
-
var
|
|
12792
|
+
var import_jsx_runtime260 = require("react/jsx-runtime");
|
|
12810
12793
|
var selectedItemIndicatorStyles = import_styled_components77.css`
|
|
12811
12794
|
background-color: var(--wui-color-bg-fill-white);
|
|
12812
12795
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -12828,7 +12811,7 @@ var SelectedItemIndicator = () => {
|
|
|
12828
12811
|
if (!selectedValue || (0, import_type_guards51.isUndefined)(selectedItemIndicatorStyle)) {
|
|
12829
12812
|
return null;
|
|
12830
12813
|
}
|
|
12831
|
-
return /* @__PURE__ */ (0,
|
|
12814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
|
|
12832
12815
|
SelectedItemIndicatorDiv,
|
|
12833
12816
|
{
|
|
12834
12817
|
"data-wui-selected-item-indicator": true,
|
|
@@ -12838,7 +12821,7 @@ var SelectedItemIndicator = () => {
|
|
|
12838
12821
|
};
|
|
12839
12822
|
|
|
12840
12823
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
12841
|
-
var
|
|
12824
|
+
var import_jsx_runtime261 = require("react/jsx-runtime");
|
|
12842
12825
|
var segmentedControlStyles = import_styled_components78.css`
|
|
12843
12826
|
display: inline-flex;
|
|
12844
12827
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -12853,7 +12836,7 @@ var segmentedControlStyles = import_styled_components78.css`
|
|
|
12853
12836
|
var StyledSegmentedControl = (0, import_styled_components78.default)(import_react_toggle_group.Root)`
|
|
12854
12837
|
${segmentedControlStyles}
|
|
12855
12838
|
`;
|
|
12856
|
-
var SegmentedControl = (0,
|
|
12839
|
+
var SegmentedControl = (0, import_react64.forwardRef)(
|
|
12857
12840
|
({
|
|
12858
12841
|
children,
|
|
12859
12842
|
disabled = false,
|
|
@@ -12865,7 +12848,7 @@ var SegmentedControl = (0, import_react63.forwardRef)(
|
|
|
12865
12848
|
if ((0, import_type_guards52.isNil)(children)) {
|
|
12866
12849
|
return null;
|
|
12867
12850
|
}
|
|
12868
|
-
return /* @__PURE__ */ (0,
|
|
12851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
12869
12852
|
StyledSegmentedControl,
|
|
12870
12853
|
{
|
|
12871
12854
|
ref,
|
|
@@ -12877,9 +12860,9 @@ var SegmentedControl = (0, import_react63.forwardRef)(
|
|
|
12877
12860
|
type: "single",
|
|
12878
12861
|
value: selectedValue,
|
|
12879
12862
|
...props,
|
|
12880
|
-
children: /* @__PURE__ */ (0,
|
|
12863
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(SelectedItemStyleProvider, { children: [
|
|
12881
12864
|
children,
|
|
12882
|
-
/* @__PURE__ */ (0,
|
|
12865
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(SelectedItemIndicator, {})
|
|
12883
12866
|
] }) })
|
|
12884
12867
|
}
|
|
12885
12868
|
);
|
|
@@ -12888,11 +12871,11 @@ var SegmentedControl = (0, import_react63.forwardRef)(
|
|
|
12888
12871
|
SegmentedControl.displayName = "SegmentedControl";
|
|
12889
12872
|
|
|
12890
12873
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
12891
|
-
var
|
|
12874
|
+
var import_react65 = require("react");
|
|
12892
12875
|
var import_styled_components79 = __toESM(require("styled-components"));
|
|
12893
12876
|
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
12894
12877
|
var import_type_guards53 = require("@wistia/type-guards");
|
|
12895
|
-
var
|
|
12878
|
+
var import_jsx_runtime262 = require("react/jsx-runtime");
|
|
12896
12879
|
var segmentedControlItemStyles = import_styled_components79.css`
|
|
12897
12880
|
all: unset; /* ToggleGroupItem is a button element */
|
|
12898
12881
|
align-items: center;
|
|
@@ -12963,11 +12946,11 @@ var segmentedControlItemStyles = import_styled_components79.css`
|
|
|
12963
12946
|
var StyledSegmentedControlItem = (0, import_styled_components79.default)(import_react_toggle_group2.Item)`
|
|
12964
12947
|
${segmentedControlItemStyles}
|
|
12965
12948
|
`;
|
|
12966
|
-
var SegmentedControlItem = (0,
|
|
12949
|
+
var SegmentedControlItem = (0, import_react65.forwardRef)(
|
|
12967
12950
|
({ disabled, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
12968
12951
|
const selectedValue = useSegmentedControlValue();
|
|
12969
12952
|
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
12970
|
-
const buttonRef = (0,
|
|
12953
|
+
const buttonRef = (0, import_react65.useRef)(null);
|
|
12971
12954
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
12972
12955
|
const handleClick = (event) => {
|
|
12973
12956
|
const target = event.target;
|
|
@@ -12976,7 +12959,7 @@ var SegmentedControlItem = (0, import_react64.forwardRef)(
|
|
|
12976
12959
|
event.preventDefault();
|
|
12977
12960
|
}
|
|
12978
12961
|
};
|
|
12979
|
-
(0,
|
|
12962
|
+
(0, import_react65.useEffect)(() => {
|
|
12980
12963
|
const buttonElem = buttonRef.current;
|
|
12981
12964
|
if (!buttonElem) {
|
|
12982
12965
|
return void 0;
|
|
@@ -13001,7 +12984,7 @@ var SegmentedControlItem = (0, import_react64.forwardRef)(
|
|
|
13001
12984
|
resizeObserver.disconnect();
|
|
13002
12985
|
};
|
|
13003
12986
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
13004
|
-
return /* @__PURE__ */ (0,
|
|
12987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(
|
|
13005
12988
|
StyledSegmentedControlItem,
|
|
13006
12989
|
{
|
|
13007
12990
|
ref: combinedRef,
|
|
@@ -13023,9 +13006,9 @@ SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
|
13023
13006
|
|
|
13024
13007
|
// src/components/Select/Select.tsx
|
|
13025
13008
|
var import_react_select = require("@radix-ui/react-select");
|
|
13026
|
-
var
|
|
13009
|
+
var import_react66 = require("react");
|
|
13027
13010
|
var import_styled_components80 = __toESM(require("styled-components"));
|
|
13028
|
-
var
|
|
13011
|
+
var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
13029
13012
|
var StyledTrigger2 = (0, import_styled_components80.default)(import_react_select.Trigger)`
|
|
13030
13013
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
13031
13014
|
${inputCss};
|
|
@@ -13088,7 +13071,7 @@ var StyledContent3 = (0, import_styled_components80.default)(import_react_select
|
|
|
13088
13071
|
max-height: var(--radix-select-content-available-height);
|
|
13089
13072
|
z-index: var(--wui-zindex-select);
|
|
13090
13073
|
`;
|
|
13091
|
-
var Select = (0,
|
|
13074
|
+
var Select = (0, import_react66.forwardRef)(
|
|
13092
13075
|
({
|
|
13093
13076
|
colorScheme = "inherit",
|
|
13094
13077
|
children,
|
|
@@ -13098,13 +13081,13 @@ var Select = (0, import_react65.forwardRef)(
|
|
|
13098
13081
|
...props
|
|
13099
13082
|
}, forwardedRef) => {
|
|
13100
13083
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
13101
|
-
return /* @__PURE__ */ (0,
|
|
13084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
|
|
13102
13085
|
import_react_select.Root,
|
|
13103
13086
|
{
|
|
13104
13087
|
...props,
|
|
13105
13088
|
onValueChange: onChange,
|
|
13106
13089
|
children: [
|
|
13107
|
-
/* @__PURE__ */ (0,
|
|
13090
|
+
/* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
|
|
13108
13091
|
StyledTrigger2,
|
|
13109
13092
|
{
|
|
13110
13093
|
ref: forwardedRef,
|
|
@@ -13112,8 +13095,8 @@ var Select = (0, import_react65.forwardRef)(
|
|
|
13112
13095
|
$fullWidth: responsiveFullWidth,
|
|
13113
13096
|
...props,
|
|
13114
13097
|
children: [
|
|
13115
|
-
/* @__PURE__ */ (0,
|
|
13116
|
-
/* @__PURE__ */ (0,
|
|
13098
|
+
/* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_react_select.Value, { placeholder }),
|
|
13099
|
+
/* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
|
|
13117
13100
|
Icon,
|
|
13118
13101
|
{
|
|
13119
13102
|
size: "md",
|
|
@@ -13123,10 +13106,10 @@ var Select = (0, import_react65.forwardRef)(
|
|
|
13123
13106
|
]
|
|
13124
13107
|
}
|
|
13125
13108
|
),
|
|
13126
|
-
/* @__PURE__ */ (0,
|
|
13127
|
-
/* @__PURE__ */ (0,
|
|
13128
|
-
/* @__PURE__ */ (0,
|
|
13129
|
-
/* @__PURE__ */ (0,
|
|
13109
|
+
/* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(StyledContent3, { position: "popper", children: [
|
|
13110
|
+
/* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Icon, { type: "caret-up" }) }),
|
|
13111
|
+
/* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_react_select.Viewport, { children }),
|
|
13112
|
+
/* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(Icon, { type: "caret-down" }) })
|
|
13130
13113
|
] }) })
|
|
13131
13114
|
]
|
|
13132
13115
|
}
|
|
@@ -13137,10 +13120,10 @@ Select.displayName = "Select";
|
|
|
13137
13120
|
|
|
13138
13121
|
// src/components/Select/SelectOption.tsx
|
|
13139
13122
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
13140
|
-
var
|
|
13123
|
+
var import_react67 = require("react");
|
|
13141
13124
|
var import_styled_components81 = __toESM(require("styled-components"));
|
|
13142
13125
|
var import_type_guards54 = require("@wistia/type-guards");
|
|
13143
|
-
var
|
|
13126
|
+
var import_jsx_runtime264 = require("react/jsx-runtime");
|
|
13144
13127
|
var StyledItem = (0, import_styled_components81.default)(import_react_select2.Item)`
|
|
13145
13128
|
${variantStyleMap2.body3};
|
|
13146
13129
|
display: flex;
|
|
@@ -13168,25 +13151,25 @@ var StyledItem = (0, import_styled_components81.default)(import_react_select2.It
|
|
|
13168
13151
|
var StyledIconContainer = import_styled_components81.default.span`
|
|
13169
13152
|
width: 12px;
|
|
13170
13153
|
`;
|
|
13171
|
-
var SelectOption = (0,
|
|
13154
|
+
var SelectOption = (0, import_react67.forwardRef)(
|
|
13172
13155
|
({ children, selectedDisplayValue, ...props }, forwardedRef) => {
|
|
13173
|
-
return /* @__PURE__ */ (0,
|
|
13156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(
|
|
13174
13157
|
StyledItem,
|
|
13175
13158
|
{
|
|
13176
13159
|
...props,
|
|
13177
13160
|
ref: forwardedRef,
|
|
13178
13161
|
children: [
|
|
13179
|
-
/* @__PURE__ */ (0,
|
|
13162
|
+
/* @__PURE__ */ (0, import_jsx_runtime264.jsx)(StyledIconContainer, { "data-indicator": true, children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
|
|
13180
13163
|
Icon,
|
|
13181
13164
|
{
|
|
13182
13165
|
size: "sm",
|
|
13183
13166
|
type: "checkmark"
|
|
13184
13167
|
}
|
|
13185
13168
|
) }) }),
|
|
13186
|
-
(0, import_type_guards54.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0,
|
|
13169
|
+
(0, import_type_guards54.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)("div", { children: [
|
|
13187
13170
|
children,
|
|
13188
|
-
/* @__PURE__ */ (0,
|
|
13189
|
-
] }) : /* @__PURE__ */ (0,
|
|
13171
|
+
/* @__PURE__ */ (0, import_jsx_runtime264.jsx)("div", { style: { display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_react_select2.ItemText, { children: selectedDisplayValue }) })
|
|
13172
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_react_select2.ItemText, { children })
|
|
13190
13173
|
]
|
|
13191
13174
|
}
|
|
13192
13175
|
);
|
|
@@ -13197,13 +13180,13 @@ SelectOption.displayName = "SelectOption";
|
|
|
13197
13180
|
// src/components/Select/SelectOptionGroup.tsx
|
|
13198
13181
|
var import_react_select3 = require("@radix-ui/react-select");
|
|
13199
13182
|
var import_styled_components82 = __toESM(require("styled-components"));
|
|
13200
|
-
var
|
|
13183
|
+
var import_jsx_runtime265 = require("react/jsx-runtime");
|
|
13201
13184
|
var StyledLabel4 = (0, import_styled_components82.default)(import_react_select3.Label)`
|
|
13202
13185
|
padding: var(--wui-select-option-padding);
|
|
13203
13186
|
`;
|
|
13204
13187
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
13205
|
-
return /* @__PURE__ */ (0,
|
|
13206
|
-
/* @__PURE__ */ (0,
|
|
13188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
13189
|
+
/* @__PURE__ */ (0, import_jsx_runtime265.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
13207
13190
|
Text,
|
|
13208
13191
|
{
|
|
13209
13192
|
prominence: "secondary",
|
|
@@ -13219,7 +13202,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
13219
13202
|
var import_react_slider = require("@radix-ui/react-slider");
|
|
13220
13203
|
var import_styled_components83 = __toESM(require("styled-components"));
|
|
13221
13204
|
var import_type_guards55 = require("@wistia/type-guards");
|
|
13222
|
-
var
|
|
13205
|
+
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
13223
13206
|
var SliderContainer = import_styled_components83.default.div`
|
|
13224
13207
|
--wui-slider-track-color: var(--wui-gray-6);
|
|
13225
13208
|
--wui-slider-track-border-radius: var(--wui-border-radius-rounded);
|
|
@@ -13308,12 +13291,12 @@ var Slider = ({
|
|
|
13308
13291
|
onChange(newValue);
|
|
13309
13292
|
}
|
|
13310
13293
|
};
|
|
13311
|
-
return /* @__PURE__ */ (0,
|
|
13294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
|
|
13312
13295
|
SliderContainer,
|
|
13313
13296
|
{
|
|
13314
13297
|
...otherProps,
|
|
13315
13298
|
"data-testid": dataTestId,
|
|
13316
|
-
children: /* @__PURE__ */ (0,
|
|
13299
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime266.jsxs)(
|
|
13317
13300
|
StyledSliderRoot,
|
|
13318
13301
|
{
|
|
13319
13302
|
"aria-label": ariaLabel,
|
|
@@ -13326,8 +13309,8 @@ var Slider = ({
|
|
|
13326
13309
|
step,
|
|
13327
13310
|
...value ? { value } : {},
|
|
13328
13311
|
children: [
|
|
13329
|
-
/* @__PURE__ */ (0,
|
|
13330
|
-
values.map((_, index) => /* @__PURE__ */ (0,
|
|
13312
|
+
/* @__PURE__ */ (0, import_jsx_runtime266.jsx)(StyledSliderTrack, { "data-testid": `${dataTestId}-track`, children: /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(StyledSliderRange, { "data-testid": `${dataTestId}-range` }) }),
|
|
13313
|
+
values.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
|
|
13331
13314
|
StyledSliderThumb,
|
|
13332
13315
|
{
|
|
13333
13316
|
"data-testid": `${dataTestId}-thumb-${index}`
|
|
@@ -13343,10 +13326,10 @@ var Slider = ({
|
|
|
13343
13326
|
Slider.displayName = "Slider";
|
|
13344
13327
|
|
|
13345
13328
|
// src/components/Switch/Switch.tsx
|
|
13346
|
-
var
|
|
13329
|
+
var import_react68 = require("react");
|
|
13347
13330
|
var import_styled_components84 = __toESM(require("styled-components"));
|
|
13348
13331
|
var import_type_guards56 = require("@wistia/type-guards");
|
|
13349
|
-
var
|
|
13332
|
+
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
13350
13333
|
var sizeSmall3 = import_styled_components84.css`
|
|
13351
13334
|
--wui-size-small-width: 24px;
|
|
13352
13335
|
--wui-size-small-height: 14px;
|
|
@@ -13448,8 +13431,9 @@ var StyledHiddenSwitchInput = import_styled_components84.default.input`
|
|
|
13448
13431
|
}
|
|
13449
13432
|
}
|
|
13450
13433
|
`;
|
|
13451
|
-
var Switch = (0,
|
|
13434
|
+
var Switch = (0, import_react68.forwardRef)(
|
|
13452
13435
|
({
|
|
13436
|
+
align = "left",
|
|
13453
13437
|
checked,
|
|
13454
13438
|
disabled = false,
|
|
13455
13439
|
id,
|
|
@@ -13463,10 +13447,10 @@ var Switch = (0, import_react67.forwardRef)(
|
|
|
13463
13447
|
hideLabel = false,
|
|
13464
13448
|
...props
|
|
13465
13449
|
}, ref) => {
|
|
13466
|
-
const generatedId = (0,
|
|
13450
|
+
const generatedId = (0, import_react68.useId)();
|
|
13467
13451
|
const computedId = (0, import_type_guards56.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
13468
|
-
return /* @__PURE__ */ (0,
|
|
13469
|
-
/* @__PURE__ */ (0,
|
|
13452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
|
|
13453
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
|
|
13470
13454
|
StyledHiddenSwitchInput,
|
|
13471
13455
|
{
|
|
13472
13456
|
...props,
|
|
@@ -13481,10 +13465,11 @@ var Switch = (0, import_react67.forwardRef)(
|
|
|
13481
13465
|
value
|
|
13482
13466
|
}
|
|
13483
13467
|
),
|
|
13484
|
-
/* @__PURE__ */ (0,
|
|
13468
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
|
|
13485
13469
|
FormControlLabel,
|
|
13486
13470
|
{
|
|
13487
|
-
|
|
13471
|
+
align,
|
|
13472
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
|
|
13488
13473
|
StyledSwitchInput,
|
|
13489
13474
|
{
|
|
13490
13475
|
$disabled: disabled,
|
|
@@ -13507,7 +13492,7 @@ Switch.displayName = "Switch";
|
|
|
13507
13492
|
|
|
13508
13493
|
// src/components/Table/Table.tsx
|
|
13509
13494
|
var import_styled_components85 = __toESM(require("styled-components"));
|
|
13510
|
-
var
|
|
13495
|
+
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
13511
13496
|
var StyledTable = import_styled_components85.default.table`
|
|
13512
13497
|
width: 100%;
|
|
13513
13498
|
border-collapse: collapse;
|
|
@@ -13537,7 +13522,7 @@ var Table = ({
|
|
|
13537
13522
|
visuallyHiddenHeader = false,
|
|
13538
13523
|
...props
|
|
13539
13524
|
}) => {
|
|
13540
|
-
return /* @__PURE__ */ (0,
|
|
13525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
13541
13526
|
StyledTable,
|
|
13542
13527
|
{
|
|
13543
13528
|
$divided: divided,
|
|
@@ -13553,20 +13538,20 @@ var Table = ({
|
|
|
13553
13538
|
var import_styled_components86 = __toESM(require("styled-components"));
|
|
13554
13539
|
|
|
13555
13540
|
// src/components/Table/TableSectionContext.ts
|
|
13556
|
-
var
|
|
13557
|
-
var TableSectionContext = (0,
|
|
13541
|
+
var import_react69 = require("react");
|
|
13542
|
+
var TableSectionContext = (0, import_react69.createContext)(null);
|
|
13558
13543
|
|
|
13559
13544
|
// src/components/Table/TableBody.tsx
|
|
13560
|
-
var
|
|
13545
|
+
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
13561
13546
|
var StyledTableBody = import_styled_components86.default.tbody``;
|
|
13562
13547
|
var TableBody = ({ children, ...props }) => {
|
|
13563
|
-
return /* @__PURE__ */ (0,
|
|
13548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(StyledTableBody, { ...props, children }) });
|
|
13564
13549
|
};
|
|
13565
13550
|
|
|
13566
13551
|
// src/components/Table/TableCell.tsx
|
|
13567
|
-
var
|
|
13552
|
+
var import_react70 = require("react");
|
|
13568
13553
|
var import_styled_components87 = __toESM(require("styled-components"));
|
|
13569
|
-
var
|
|
13554
|
+
var import_jsx_runtime270 = require("react/jsx-runtime");
|
|
13570
13555
|
var sharedStyles = import_styled_components87.css`
|
|
13571
13556
|
color: var(--wui-color-text);
|
|
13572
13557
|
padding: var(--wui-space-02);
|
|
@@ -13585,48 +13570,48 @@ var StyledTd = import_styled_components87.default.td`
|
|
|
13585
13570
|
line-height: var(--wui-typography-body-2-line-height);
|
|
13586
13571
|
`;
|
|
13587
13572
|
var TableCell = ({ children, ...props }) => {
|
|
13588
|
-
const section = (0,
|
|
13573
|
+
const section = (0, import_react70.useContext)(TableSectionContext);
|
|
13589
13574
|
if (section === "head") {
|
|
13590
|
-
return /* @__PURE__ */ (0,
|
|
13575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(StyledTh, { ...props, children });
|
|
13591
13576
|
}
|
|
13592
|
-
return /* @__PURE__ */ (0,
|
|
13577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(StyledTd, { ...props, children });
|
|
13593
13578
|
};
|
|
13594
13579
|
|
|
13595
13580
|
// src/components/Table/TableFoot.tsx
|
|
13596
13581
|
var import_styled_components88 = __toESM(require("styled-components"));
|
|
13597
|
-
var
|
|
13582
|
+
var import_jsx_runtime271 = require("react/jsx-runtime");
|
|
13598
13583
|
var StyledTableFoot = import_styled_components88.default.tfoot``;
|
|
13599
13584
|
var TableFoot = ({ children, ...props }) => {
|
|
13600
|
-
return /* @__PURE__ */ (0,
|
|
13585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(StyledTableFoot, { ...props, children }) });
|
|
13601
13586
|
};
|
|
13602
13587
|
|
|
13603
13588
|
// src/components/Table/TableHead.tsx
|
|
13604
13589
|
var import_styled_components89 = __toESM(require("styled-components"));
|
|
13605
|
-
var
|
|
13590
|
+
var import_jsx_runtime272 = require("react/jsx-runtime");
|
|
13606
13591
|
var StyledThead = import_styled_components89.default.thead``;
|
|
13607
13592
|
var TableHead = ({ children, ...props }) => {
|
|
13608
|
-
return /* @__PURE__ */ (0,
|
|
13593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(StyledThead, { ...props, children }) });
|
|
13609
13594
|
};
|
|
13610
13595
|
|
|
13611
13596
|
// src/components/Table/TableRow.tsx
|
|
13612
13597
|
var import_styled_components90 = __toESM(require("styled-components"));
|
|
13613
|
-
var
|
|
13598
|
+
var import_jsx_runtime273 = require("react/jsx-runtime");
|
|
13614
13599
|
var StyledTableRow = import_styled_components90.default.tr``;
|
|
13615
13600
|
var TableRow = ({ children, ...props }) => {
|
|
13616
|
-
return /* @__PURE__ */ (0,
|
|
13601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(StyledTableRow, { ...props, children });
|
|
13617
13602
|
};
|
|
13618
13603
|
|
|
13619
13604
|
// src/components/Tabs/Tabs.tsx
|
|
13620
13605
|
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
13621
|
-
var
|
|
13606
|
+
var import_react72 = require("react");
|
|
13622
13607
|
var import_type_guards57 = require("@wistia/type-guards");
|
|
13623
13608
|
|
|
13624
13609
|
// src/components/Tabs/useTabsValue.tsx
|
|
13625
|
-
var
|
|
13626
|
-
var TabsValueContext = (0,
|
|
13610
|
+
var import_react71 = require("react");
|
|
13611
|
+
var TabsValueContext = (0, import_react71.createContext)(null);
|
|
13627
13612
|
var TabsValueProvider = TabsValueContext.Provider;
|
|
13628
13613
|
var useTabsValue = () => {
|
|
13629
|
-
const context = (0,
|
|
13614
|
+
const context = (0, import_react71.useContext)(TabsValueContext);
|
|
13630
13615
|
if (context === null) {
|
|
13631
13616
|
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
13632
13617
|
}
|
|
@@ -13634,7 +13619,7 @@ var useTabsValue = () => {
|
|
|
13634
13619
|
};
|
|
13635
13620
|
|
|
13636
13621
|
// src/components/Tabs/Tabs.tsx
|
|
13637
|
-
var
|
|
13622
|
+
var import_jsx_runtime274 = require("react/jsx-runtime");
|
|
13638
13623
|
var Tabs = ({
|
|
13639
13624
|
children,
|
|
13640
13625
|
value: valueProp,
|
|
@@ -13642,8 +13627,8 @@ var Tabs = ({
|
|
|
13642
13627
|
defaultValue,
|
|
13643
13628
|
...props
|
|
13644
13629
|
}) => {
|
|
13645
|
-
const [value, setValue] = (0,
|
|
13646
|
-
const onValueChange = (0,
|
|
13630
|
+
const [value, setValue] = (0, import_react72.useState)(valueProp ?? defaultValue);
|
|
13631
|
+
const onValueChange = (0, import_react72.useCallback)(
|
|
13647
13632
|
(newValue) => {
|
|
13648
13633
|
setValue(newValue);
|
|
13649
13634
|
if (onValueChangeProp) {
|
|
@@ -13662,15 +13647,15 @@ var Tabs = ({
|
|
|
13662
13647
|
if ((0, import_type_guards57.isNotNil)(defaultValue)) {
|
|
13663
13648
|
rootProps.defaultValue = defaultValue;
|
|
13664
13649
|
}
|
|
13665
|
-
return /* @__PURE__ */ (0,
|
|
13650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(import_react_tabs.Root, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(SelectedItemStyleProvider, { children }) }) });
|
|
13666
13651
|
};
|
|
13667
13652
|
Tabs.displayName = "Tabs";
|
|
13668
13653
|
|
|
13669
13654
|
// src/components/Tabs/TabsContent.tsx
|
|
13670
13655
|
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
13671
|
-
var
|
|
13656
|
+
var import_jsx_runtime275 = require("react/jsx-runtime");
|
|
13672
13657
|
var TabsContent = ({ children, value }) => {
|
|
13673
|
-
return /* @__PURE__ */ (0,
|
|
13658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_react_tabs2.Content, { value, children });
|
|
13674
13659
|
};
|
|
13675
13660
|
TabsContent.displayName = "TabsContent";
|
|
13676
13661
|
|
|
@@ -13690,14 +13675,14 @@ var TabsSelectedItemIndicatorDiv = (0, import_styled_components91.default)(Selec
|
|
|
13690
13675
|
`;
|
|
13691
13676
|
|
|
13692
13677
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
13693
|
-
var
|
|
13678
|
+
var import_jsx_runtime276 = require("react/jsx-runtime");
|
|
13694
13679
|
var SelectedTabIndicator = () => {
|
|
13695
13680
|
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
13696
13681
|
const selectedValue = useTabsValue();
|
|
13697
13682
|
if (selectedValue == null || (0, import_type_guards58.isUndefined)(selectedItemIndicatorStyle)) {
|
|
13698
13683
|
return null;
|
|
13699
13684
|
}
|
|
13700
|
-
return /* @__PURE__ */ (0,
|
|
13685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(
|
|
13701
13686
|
TabsSelectedItemIndicatorDiv,
|
|
13702
13687
|
{
|
|
13703
13688
|
"data-wui-selected-item-indicator": true,
|
|
@@ -13707,19 +13692,19 @@ var SelectedTabIndicator = () => {
|
|
|
13707
13692
|
};
|
|
13708
13693
|
|
|
13709
13694
|
// src/components/Tabs/TabsList.tsx
|
|
13710
|
-
var
|
|
13695
|
+
var import_jsx_runtime277 = require("react/jsx-runtime");
|
|
13711
13696
|
var StyledRadixTabsList = (0, import_styled_components92.default)(import_react_tabs3.List)`
|
|
13712
13697
|
${segmentedControlStyles}
|
|
13713
13698
|
`;
|
|
13714
13699
|
var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
13715
|
-
return /* @__PURE__ */ (0,
|
|
13700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)(
|
|
13716
13701
|
StyledRadixTabsList,
|
|
13717
13702
|
{
|
|
13718
13703
|
$fullWidth: fullWidth,
|
|
13719
13704
|
"aria-label": props["aria-label"],
|
|
13720
13705
|
children: [
|
|
13721
13706
|
children,
|
|
13722
|
-
/* @__PURE__ */ (0,
|
|
13707
|
+
/* @__PURE__ */ (0, import_jsx_runtime277.jsx)(SelectedTabIndicator, {})
|
|
13723
13708
|
]
|
|
13724
13709
|
}
|
|
13725
13710
|
);
|
|
@@ -13727,7 +13712,7 @@ var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
|
13727
13712
|
TabsList.displayName = "TabsList";
|
|
13728
13713
|
|
|
13729
13714
|
// src/components/Tabs/TabsTrigger.tsx
|
|
13730
|
-
var
|
|
13715
|
+
var import_react73 = require("react");
|
|
13731
13716
|
var import_type_guards59 = require("@wistia/type-guards");
|
|
13732
13717
|
|
|
13733
13718
|
// src/components/Tabs/StyledRadixTabsTrigger.tsx
|
|
@@ -13742,14 +13727,14 @@ var StyledRadixTabsTrigger = (0, import_styled_components93.default)(import_reac
|
|
|
13742
13727
|
`;
|
|
13743
13728
|
|
|
13744
13729
|
// src/components/Tabs/TabsTrigger.tsx
|
|
13745
|
-
var
|
|
13746
|
-
var TabsTrigger = (0,
|
|
13730
|
+
var import_jsx_runtime278 = require("react/jsx-runtime");
|
|
13731
|
+
var TabsTrigger = (0, import_react73.forwardRef)(
|
|
13747
13732
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
13748
13733
|
const selectedValue = useTabsValue();
|
|
13749
13734
|
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
13750
|
-
const buttonRef = (0,
|
|
13735
|
+
const buttonRef = (0, import_react73.useRef)(null);
|
|
13751
13736
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
13752
|
-
(0,
|
|
13737
|
+
(0, import_react73.useEffect)(() => {
|
|
13753
13738
|
const buttonElem = buttonRef.current;
|
|
13754
13739
|
if (!buttonElem) {
|
|
13755
13740
|
return void 0;
|
|
@@ -13774,7 +13759,7 @@ var TabsTrigger = (0, import_react72.forwardRef)(
|
|
|
13774
13759
|
resizeObserver.disconnect();
|
|
13775
13760
|
};
|
|
13776
13761
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
13777
|
-
return /* @__PURE__ */ (0,
|
|
13762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime278.jsxs)(
|
|
13778
13763
|
StyledRadixTabsTrigger,
|
|
13779
13764
|
{
|
|
13780
13765
|
...otherProps,
|
|
@@ -13796,7 +13781,7 @@ TabsTrigger.displayName = "TabsTrigger";
|
|
|
13796
13781
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
13797
13782
|
var import_styled_components94 = __toESM(require("styled-components"));
|
|
13798
13783
|
var import_type_guards60 = require("@wistia/type-guards");
|
|
13799
|
-
var
|
|
13784
|
+
var import_jsx_runtime279 = require("react/jsx-runtime");
|
|
13800
13785
|
var StyledThumbnailBadge = import_styled_components94.default.div`
|
|
13801
13786
|
align-items: center;
|
|
13802
13787
|
background-color: rgb(0 0 0 / 50%);
|
|
@@ -13822,15 +13807,15 @@ var StyledThumbnailBadge = import_styled_components94.default.div`
|
|
|
13822
13807
|
}
|
|
13823
13808
|
`;
|
|
13824
13809
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
13825
|
-
return /* @__PURE__ */ (0,
|
|
13810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime279.jsxs)(StyledThumbnailBadge, { ...props, children: [
|
|
13826
13811
|
(0, import_type_guards60.isNotNil)(icon) && icon,
|
|
13827
|
-
/* @__PURE__ */ (0,
|
|
13812
|
+
/* @__PURE__ */ (0, import_jsx_runtime279.jsx)("span", { children: label })
|
|
13828
13813
|
] });
|
|
13829
13814
|
};
|
|
13830
13815
|
ThumbnailBadge.displayName = "ThumbnailBadge";
|
|
13831
13816
|
|
|
13832
13817
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
13833
|
-
var
|
|
13818
|
+
var import_react74 = require("react");
|
|
13834
13819
|
var import_styled_components97 = __toESM(require("styled-components"));
|
|
13835
13820
|
var import_type_guards63 = require("@wistia/type-guards");
|
|
13836
13821
|
|
|
@@ -13969,7 +13954,7 @@ var getBackgroundGradient = (gradientName = void 0) => {
|
|
|
13969
13954
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
13970
13955
|
var import_styled_components96 = __toESM(require("styled-components"));
|
|
13971
13956
|
var import_type_guards62 = require("@wistia/type-guards");
|
|
13972
|
-
var
|
|
13957
|
+
var import_jsx_runtime280 = require("react/jsx-runtime");
|
|
13973
13958
|
var ScrubLine = import_styled_components96.default.div`
|
|
13974
13959
|
position: absolute;
|
|
13975
13960
|
top: 0;
|
|
@@ -14072,14 +14057,14 @@ var ThumbnailStoryboardViewer = ({
|
|
|
14072
14057
|
backgroundPosition,
|
|
14073
14058
|
backgroundSize
|
|
14074
14059
|
};
|
|
14075
|
-
return /* @__PURE__ */ (0,
|
|
14060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(
|
|
14076
14061
|
"div",
|
|
14077
14062
|
{
|
|
14078
14063
|
...props,
|
|
14079
14064
|
style: viewerStyles,
|
|
14080
14065
|
children: [
|
|
14081
|
-
/* @__PURE__ */ (0,
|
|
14082
|
-
showScrubLine ? /* @__PURE__ */ (0,
|
|
14066
|
+
/* @__PURE__ */ (0, import_jsx_runtime280.jsx)("div", { style: storyboardStyles }),
|
|
14067
|
+
showScrubLine ? /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
|
|
14083
14068
|
ScrubLine,
|
|
14084
14069
|
{
|
|
14085
14070
|
style: {
|
|
@@ -14093,7 +14078,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
14093
14078
|
};
|
|
14094
14079
|
|
|
14095
14080
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
14096
|
-
var
|
|
14081
|
+
var import_jsx_runtime281 = require("react/jsx-runtime");
|
|
14097
14082
|
var WideThumbnailImage = import_styled_components97.default.img`
|
|
14098
14083
|
height: 100%;
|
|
14099
14084
|
object-fit: cover;
|
|
@@ -14106,7 +14091,7 @@ var SquareThumbnailImage = import_styled_components97.default.img`
|
|
|
14106
14091
|
`;
|
|
14107
14092
|
var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
14108
14093
|
if (thumbnailImageType === "wide") {
|
|
14109
|
-
return /* @__PURE__ */ (0,
|
|
14094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
14110
14095
|
WideThumbnailImage,
|
|
14111
14096
|
{
|
|
14112
14097
|
alt: "",
|
|
@@ -14115,7 +14100,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
14115
14100
|
}
|
|
14116
14101
|
);
|
|
14117
14102
|
}
|
|
14118
|
-
return /* @__PURE__ */ (0,
|
|
14103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
14119
14104
|
SquareThumbnailImage,
|
|
14120
14105
|
{
|
|
14121
14106
|
alt: "",
|
|
@@ -14153,7 +14138,7 @@ var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
|
14153
14138
|
left: relativeLeft
|
|
14154
14139
|
};
|
|
14155
14140
|
};
|
|
14156
|
-
var Thumbnail = (0,
|
|
14141
|
+
var Thumbnail = (0, import_react74.forwardRef)(
|
|
14157
14142
|
({
|
|
14158
14143
|
gradientBackground = "defaultMidOne",
|
|
14159
14144
|
thumbnailImageType = "square",
|
|
@@ -14164,17 +14149,17 @@ var Thumbnail = (0, import_react73.forwardRef)(
|
|
|
14164
14149
|
height,
|
|
14165
14150
|
...props
|
|
14166
14151
|
}, ref) => {
|
|
14167
|
-
const [percent, setPercent] = (0,
|
|
14168
|
-
const [isMouseOver, setIsMouseOver] = (0,
|
|
14169
|
-
const [isStoryboardReady, setIsStoryboardReady] = (0,
|
|
14170
|
-
const storyboardElementRef = (0,
|
|
14171
|
-
const [cursorPosition, setCursorPosition] = (0,
|
|
14172
|
-
const backgroundUrl = (0,
|
|
14152
|
+
const [percent, setPercent] = (0, import_react74.useState)(0);
|
|
14153
|
+
const [isMouseOver, setIsMouseOver] = (0, import_react74.useState)(false);
|
|
14154
|
+
const [isStoryboardReady, setIsStoryboardReady] = (0, import_react74.useState)(false);
|
|
14155
|
+
const storyboardElementRef = (0, import_react74.useRef)(null);
|
|
14156
|
+
const [cursorPosition, setCursorPosition] = (0, import_react74.useState)(null);
|
|
14157
|
+
const backgroundUrl = (0, import_react74.useMemo)(
|
|
14173
14158
|
() => thumbnailImageType === "square" && (0, import_type_guards63.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
14174
14159
|
[thumbnailImageType, thumbnailUrl]
|
|
14175
14160
|
);
|
|
14176
14161
|
const isScrubbable = (0, import_type_guards63.isNotNil)(storyboard);
|
|
14177
|
-
const trackStoryboardLoadStatus = (0,
|
|
14162
|
+
const trackStoryboardLoadStatus = (0, import_react74.useCallback)(() => {
|
|
14178
14163
|
if (storyboardElementRef.current || !storyboard) {
|
|
14179
14164
|
return storyboardElementRef.current;
|
|
14180
14165
|
}
|
|
@@ -14184,7 +14169,7 @@ var Thumbnail = (0, import_react73.forwardRef)(
|
|
|
14184
14169
|
storyboardElementRef.current = asset;
|
|
14185
14170
|
return storyboardElementRef.current;
|
|
14186
14171
|
}, [storyboard]);
|
|
14187
|
-
const handleMouseMove = (0,
|
|
14172
|
+
const handleMouseMove = (0, import_react74.useCallback)(
|
|
14188
14173
|
(mouseEvent) => {
|
|
14189
14174
|
if (!isScrubbable) return;
|
|
14190
14175
|
const elem = mouseEvent.currentTarget;
|
|
@@ -14197,15 +14182,15 @@ var Thumbnail = (0, import_react73.forwardRef)(
|
|
|
14197
14182
|
},
|
|
14198
14183
|
[isScrubbable, trackStoryboardLoadStatus]
|
|
14199
14184
|
);
|
|
14200
|
-
const handleMouseOut = (0,
|
|
14185
|
+
const handleMouseOut = (0, import_react74.useCallback)(() => {
|
|
14201
14186
|
if (!isScrubbable) return;
|
|
14202
14187
|
setIsMouseOver(false);
|
|
14203
14188
|
setCursorPosition(null);
|
|
14204
14189
|
}, [isScrubbable]);
|
|
14205
|
-
const shouldRenderStoryboard = (0,
|
|
14190
|
+
const shouldRenderStoryboard = (0, import_react74.useMemo)(() => {
|
|
14206
14191
|
return Boolean(isScrubbable && isMouseOver && isStoryboardReady);
|
|
14207
14192
|
}, [isScrubbable, isMouseOver, isStoryboardReady]);
|
|
14208
|
-
const renderStoryboard = (0,
|
|
14193
|
+
const renderStoryboard = (0, import_react74.useCallback)(() => {
|
|
14209
14194
|
if (!storyboard || (0, import_type_guards63.isUndefined)(height) || (0, import_type_guards63.isEmptyString)(height)) return null;
|
|
14210
14195
|
const {
|
|
14211
14196
|
url,
|
|
@@ -14218,7 +14203,7 @@ var Thumbnail = (0, import_react73.forwardRef)(
|
|
|
14218
14203
|
} = storyboard;
|
|
14219
14204
|
const targetWidth = (0, import_type_guards63.isString)(width) ? parseInt(width, 10) : Number(width);
|
|
14220
14205
|
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
14221
|
-
return /* @__PURE__ */ (0,
|
|
14206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
14222
14207
|
ThumbnailStoryboardViewer,
|
|
14223
14208
|
{
|
|
14224
14209
|
cursorPosition: effectiveCursorPosition,
|
|
@@ -14238,7 +14223,7 @@ var Thumbnail = (0, import_react73.forwardRef)(
|
|
|
14238
14223
|
if (shouldRenderStoryboard) {
|
|
14239
14224
|
thumbnailContent = renderStoryboard();
|
|
14240
14225
|
} else if ((0, import_type_guards63.isNotNil)(thumbnailUrl)) {
|
|
14241
|
-
thumbnailContent = /* @__PURE__ */ (0,
|
|
14226
|
+
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
14242
14227
|
ThumbnailImage,
|
|
14243
14228
|
{
|
|
14244
14229
|
thumbnailImageType,
|
|
@@ -14248,7 +14233,7 @@ var Thumbnail = (0, import_react73.forwardRef)(
|
|
|
14248
14233
|
} else {
|
|
14249
14234
|
thumbnailContent = null;
|
|
14250
14235
|
}
|
|
14251
|
-
return /* @__PURE__ */ (0,
|
|
14236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(
|
|
14252
14237
|
StyledThumbnail,
|
|
14253
14238
|
{
|
|
14254
14239
|
ref,
|
|
@@ -14272,10 +14257,10 @@ var Thumbnail = (0, import_react73.forwardRef)(
|
|
|
14272
14257
|
Thumbnail.displayName = "Thumbnail";
|
|
14273
14258
|
|
|
14274
14259
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
14275
|
-
var
|
|
14260
|
+
var import_react75 = __toESM(require("react"));
|
|
14276
14261
|
var import_styled_components98 = __toESM(require("styled-components"));
|
|
14277
14262
|
var import_type_guards64 = require("@wistia/type-guards");
|
|
14278
|
-
var
|
|
14263
|
+
var import_jsx_runtime282 = (
|
|
14279
14264
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
14280
14265
|
require("react/jsx-runtime")
|
|
14281
14266
|
);
|
|
@@ -14352,15 +14337,15 @@ var ThumbnailCollage = ({
|
|
|
14352
14337
|
gradientBackground = "defaultMidOne",
|
|
14353
14338
|
...props
|
|
14354
14339
|
}) => {
|
|
14355
|
-
const thumbnailArray =
|
|
14340
|
+
const thumbnailArray = import_react75.default.Children.toArray(children);
|
|
14356
14341
|
const truncatedThumbnails = thumbnailArray.slice(0, 3);
|
|
14357
14342
|
const thumbnails = (0, import_type_guards64.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
|
|
14358
|
-
return
|
|
14343
|
+
return import_react75.default.cloneElement(child, {
|
|
14359
14344
|
...child.props,
|
|
14360
14345
|
children: void 0
|
|
14361
14346
|
});
|
|
14362
14347
|
}) : [
|
|
14363
|
-
/* @__PURE__ */ (0,
|
|
14348
|
+
/* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
|
|
14364
14349
|
Thumbnail,
|
|
14365
14350
|
{
|
|
14366
14351
|
gradientBackground,
|
|
@@ -14369,7 +14354,7 @@ var ThumbnailCollage = ({
|
|
|
14369
14354
|
"fallback"
|
|
14370
14355
|
)
|
|
14371
14356
|
];
|
|
14372
|
-
return /* @__PURE__ */ (0,
|
|
14357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
|
|
14373
14358
|
StyledThumbnailCollage,
|
|
14374
14359
|
{
|
|
14375
14360
|
$gradientBackground: gradientBackground,
|
|
@@ -14383,24 +14368,24 @@ var ThumbnailCollage = ({
|
|
|
14383
14368
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
14384
14369
|
var import_styled_components99 = __toESM(require("styled-components"));
|
|
14385
14370
|
var import_type_guards65 = require("@wistia/type-guards");
|
|
14386
|
-
var
|
|
14371
|
+
var import_jsx_runtime283 = require("react/jsx-runtime");
|
|
14387
14372
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
14388
14373
|
if (iconOnly) {
|
|
14389
|
-
return /* @__PURE__ */ (0,
|
|
14374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
|
|
14390
14375
|
"g",
|
|
14391
14376
|
{
|
|
14392
14377
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
14393
14378
|
fill: brandmarkColor,
|
|
14394
|
-
children: /* @__PURE__ */ (0,
|
|
14379
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime283.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" })
|
|
14395
14380
|
}
|
|
14396
14381
|
);
|
|
14397
14382
|
}
|
|
14398
|
-
return /* @__PURE__ */ (0,
|
|
14383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
|
|
14399
14384
|
"g",
|
|
14400
14385
|
{
|
|
14401
14386
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
14402
14387
|
fill: brandmarkColor,
|
|
14403
|
-
children: /* @__PURE__ */ (0,
|
|
14388
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime283.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" })
|
|
14404
14389
|
}
|
|
14405
14390
|
);
|
|
14406
14391
|
};
|
|
@@ -14408,12 +14393,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
14408
14393
|
if (iconOnly) {
|
|
14409
14394
|
return null;
|
|
14410
14395
|
}
|
|
14411
|
-
return /* @__PURE__ */ (0,
|
|
14396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
|
|
14412
14397
|
"g",
|
|
14413
14398
|
{
|
|
14414
14399
|
"data-testid": "ui-wistia-logo-logotype",
|
|
14415
14400
|
fill: logotypeColor,
|
|
14416
|
-
children: /* @__PURE__ */ (0,
|
|
14401
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime283.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" })
|
|
14417
14402
|
}
|
|
14418
14403
|
);
|
|
14419
14404
|
};
|
|
@@ -14481,7 +14466,7 @@ var WistiaLogo = ({
|
|
|
14481
14466
|
};
|
|
14482
14467
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
14483
14468
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
14484
|
-
const Logo = /* @__PURE__ */ (0,
|
|
14469
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(
|
|
14485
14470
|
WistiaLogoComponent,
|
|
14486
14471
|
{
|
|
14487
14472
|
$hoverColor: hoverColor,
|
|
@@ -14494,16 +14479,63 @@ var WistiaLogo = ({
|
|
|
14494
14479
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14495
14480
|
...props,
|
|
14496
14481
|
children: [
|
|
14497
|
-
/* @__PURE__ */ (0,
|
|
14498
|
-
(0, import_type_guards65.isNotNil)(description) ? /* @__PURE__ */ (0,
|
|
14482
|
+
/* @__PURE__ */ (0, import_jsx_runtime283.jsx)("title", { children: title }),
|
|
14483
|
+
(0, import_type_guards65.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("desc", { children: description }) : null,
|
|
14499
14484
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
14500
14485
|
renderLogotype(logotypeColor, iconOnly)
|
|
14501
14486
|
]
|
|
14502
14487
|
}
|
|
14503
14488
|
);
|
|
14504
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
14489
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)("a", { href, children: Logo }) : Logo;
|
|
14505
14490
|
};
|
|
14506
14491
|
WistiaLogo.displayName = "WistiaLogo";
|
|
14492
|
+
|
|
14493
|
+
// src/components/InputPassword/InputPassword.tsx
|
|
14494
|
+
var import_styled_components100 = __toESM(require("styled-components"));
|
|
14495
|
+
var import_react76 = require("react");
|
|
14496
|
+
var import_type_guards66 = require("@wistia/type-guards");
|
|
14497
|
+
var import_jsx_runtime284 = require("react/jsx-runtime");
|
|
14498
|
+
var StyledIconButton = (0, import_styled_components100.default)(IconButton)`
|
|
14499
|
+
/* override size for icon button since prop gets changed by Input */
|
|
14500
|
+
height: var(--icon-button-size-sm);
|
|
14501
|
+
width: var(--icon-button-size-sm);
|
|
14502
|
+
|
|
14503
|
+
/* override input padding variable since it is used for Input Icon positioning */
|
|
14504
|
+
--wui-input-horizontal-padding: 4px;
|
|
14505
|
+
`;
|
|
14506
|
+
var InputPassword = (0, import_react76.forwardRef)(
|
|
14507
|
+
({ onVisibilityToggle, disabled = false, ...props }, ref) => {
|
|
14508
|
+
const [isVisible, setIsVisible] = (0, import_react76.useState)(false);
|
|
14509
|
+
const handleClick = () => {
|
|
14510
|
+
const newVisibility = !isVisible;
|
|
14511
|
+
setIsVisible(newVisibility);
|
|
14512
|
+
if ((0, import_type_guards66.isFunction)(onVisibilityToggle)) {
|
|
14513
|
+
onVisibilityToggle(newVisibility);
|
|
14514
|
+
}
|
|
14515
|
+
};
|
|
14516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
|
|
14517
|
+
Input,
|
|
14518
|
+
{
|
|
14519
|
+
...props,
|
|
14520
|
+
ref,
|
|
14521
|
+
disabled,
|
|
14522
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
|
|
14523
|
+
StyledIconButton,
|
|
14524
|
+
{
|
|
14525
|
+
disabled,
|
|
14526
|
+
label: isVisible ? "Hide password" : "Show password",
|
|
14527
|
+
onClick: handleClick,
|
|
14528
|
+
tabIndex: disabled ? -1 : 0,
|
|
14529
|
+
variant: "ghost",
|
|
14530
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(Icon, { type: isVisible ? "preview" : "hide" })
|
|
14531
|
+
}
|
|
14532
|
+
),
|
|
14533
|
+
type: isVisible ? "text" : "password"
|
|
14534
|
+
}
|
|
14535
|
+
);
|
|
14536
|
+
}
|
|
14537
|
+
);
|
|
14538
|
+
InputPassword.displayName = "InputPassword";
|
|
14507
14539
|
// Annotate the CommonJS export names for ESM import in node:
|
|
14508
14540
|
0 && (module.exports = {
|
|
14509
14541
|
ActionButton,
|
|
@@ -14550,6 +14582,7 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
14550
14582
|
ImageDimensionsValidator,
|
|
14551
14583
|
Input,
|
|
14552
14584
|
InputClickToCopy,
|
|
14585
|
+
InputPassword,
|
|
14553
14586
|
KeyboardShortcut,
|
|
14554
14587
|
Label,
|
|
14555
14588
|
Link,
|