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