@wistia/ui 0.14.1 → 0.14.2-beta.9eaa334e.773c63d
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 +338 -326
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.mjs +400 -388
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.14.
|
|
3
|
+
* @license @wistia/ui v0.14.2-beta.9eaa334e.773c63d
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -9497,7 +9497,7 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
9497
9497
|
|
|
9498
9498
|
// src/components/ColorPicker/ColorGrid.tsx
|
|
9499
9499
|
import { useCallback as useCallback10 } from "react";
|
|
9500
|
-
import
|
|
9500
|
+
import styled32 from "styled-components";
|
|
9501
9501
|
import { Root as RadioGroupRoot } from "@radix-ui/react-radio-group";
|
|
9502
9502
|
|
|
9503
9503
|
// src/components/ColorPicker/ColorPickerContext.tsx
|
|
@@ -9964,7 +9964,7 @@ var ColorPickerProvider = ({
|
|
|
9964
9964
|
);
|
|
9965
9965
|
const whatValuePropShouldBe = shouldEnforceMinContrast ? formatHex2(getAccessibleDerivativeColor(formatHex2(nonDerivedValueAsHsv))) : formatHex2(nonDerivedValueAsHsv);
|
|
9966
9966
|
useEffect10(() => {
|
|
9967
|
-
if (valueAsHex
|
|
9967
|
+
if (valueAsHex !== whatValuePropShouldBe && !isTransitioning) {
|
|
9968
9968
|
onValueChange(whatValuePropShouldBe);
|
|
9969
9969
|
}
|
|
9970
9970
|
}, [valueAsHex, whatValuePropShouldBe, isTransitioning, onValueChange]);
|
|
@@ -10011,17 +10011,86 @@ var useColorPickerState = () => {
|
|
|
10011
10011
|
return context;
|
|
10012
10012
|
};
|
|
10013
10013
|
|
|
10014
|
-
// src/components/
|
|
10014
|
+
// src/components/Label/Label.tsx
|
|
10015
|
+
import styled31, { css as css26 } from "styled-components";
|
|
10015
10016
|
import { jsx as jsx226 } from "react/jsx-runtime";
|
|
10016
|
-
var
|
|
10017
|
+
var requiredStyle = css26`
|
|
10018
|
+
&::after {
|
|
10019
|
+
color: var(--wui-color-text-error);
|
|
10020
|
+
display: inline;
|
|
10021
|
+
padding-left: var(--wui-space-01);
|
|
10022
|
+
content: '*';
|
|
10023
|
+
}
|
|
10024
|
+
`;
|
|
10025
|
+
var disabledStyle3 = css26`
|
|
10026
|
+
color: var(--wui-color-text-disabled);
|
|
10027
|
+
`;
|
|
10028
|
+
var StyledLabel2 = styled31.label`
|
|
10029
|
+
display: block;
|
|
10030
|
+
width: 100%;
|
|
10031
|
+
color: var(--wui-color-text);
|
|
10032
|
+
font-family: var(--wui-typography-heading-6-family);
|
|
10033
|
+
line-height: var(--wui-typography-heading-6-line-height);
|
|
10034
|
+
font-size: var(--wui-typography-heading-6-size);
|
|
10035
|
+
font-weight: var(--wui-typography-heading-6-weight);
|
|
10036
|
+
|
|
10037
|
+
/* if label is wrapping an input this ensures it appears beneath the label with a nice margin */
|
|
10038
|
+
> input,
|
|
10039
|
+
> textarea,
|
|
10040
|
+
> select {
|
|
10041
|
+
display: block;
|
|
10042
|
+
}
|
|
10043
|
+
|
|
10044
|
+
> label {
|
|
10045
|
+
font-weight: normal;
|
|
10046
|
+
}
|
|
10047
|
+
|
|
10048
|
+
${({ $screenReaderOnly }) => $screenReaderOnly && visuallyHiddenStyle}
|
|
10049
|
+
${({ $disabled }) => $disabled && disabledStyle3}
|
|
10050
|
+
${({ $required }) => $required && requiredStyle}
|
|
10051
|
+
`;
|
|
10052
|
+
var Label = ({
|
|
10053
|
+
children,
|
|
10054
|
+
disabled = false,
|
|
10055
|
+
htmlFor,
|
|
10056
|
+
required = false,
|
|
10057
|
+
screenReaderOnly = false,
|
|
10058
|
+
...props
|
|
10059
|
+
}) => {
|
|
10060
|
+
return /* @__PURE__ */ jsx226(
|
|
10061
|
+
StyledLabel2,
|
|
10062
|
+
{
|
|
10063
|
+
...props,
|
|
10064
|
+
$disabled: disabled,
|
|
10065
|
+
$required: required,
|
|
10066
|
+
$screenReaderOnly: screenReaderOnly,
|
|
10067
|
+
htmlFor,
|
|
10068
|
+
children
|
|
10069
|
+
}
|
|
10070
|
+
);
|
|
10071
|
+
};
|
|
10072
|
+
Label.displayName = "Label_UI";
|
|
10073
|
+
|
|
10074
|
+
// src/components/ColorPicker/ColorGrid.tsx
|
|
10075
|
+
import { jsx as jsx227, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
10076
|
+
var Container = styled32.div`
|
|
10077
|
+
display: grid;
|
|
10078
|
+
gap: var(--wui-space-01);
|
|
10079
|
+
grid-template-columns: minmax(0, 1fr);
|
|
10080
|
+
padding: var(--wui-space-02);
|
|
10081
|
+
`;
|
|
10082
|
+
var LabelContainer = styled32.div`
|
|
10083
|
+
padding-top: var(--wui-space-01);
|
|
10084
|
+
`;
|
|
10085
|
+
var ItemsContainer = styled32(RadioGroupRoot)`
|
|
10017
10086
|
display: flex;
|
|
10018
10087
|
flex-wrap: wrap;
|
|
10019
10088
|
align-items: center;
|
|
10020
10089
|
justify-content: start;
|
|
10021
|
-
padding: var(--wui-space-
|
|
10090
|
+
padding: var(--wui-space-01) 6px;
|
|
10022
10091
|
gap: var(--wui-space-02);
|
|
10023
10092
|
`;
|
|
10024
|
-
var ColorGrid = ({ children }) => {
|
|
10093
|
+
var ColorGrid = ({ children, label }) => {
|
|
10025
10094
|
const { valueAsHex, onChangeNonDerivedValueAsHsv } = useColorPickerState();
|
|
10026
10095
|
const onValueChange = useCallback10(
|
|
10027
10096
|
(value) => {
|
|
@@ -10030,26 +10099,29 @@ var ColorGrid = ({ children }) => {
|
|
|
10030
10099
|
},
|
|
10031
10100
|
[onChangeNonDerivedValueAsHsv]
|
|
10032
10101
|
);
|
|
10033
|
-
return /* @__PURE__ */
|
|
10034
|
-
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10102
|
+
return /* @__PURE__ */ jsxs20(Container, { children: [
|
|
10103
|
+
label != null && /* @__PURE__ */ jsx227(LabelContainer, { children: /* @__PURE__ */ jsx227(Label, { children: label }) }),
|
|
10104
|
+
/* @__PURE__ */ jsx227(
|
|
10105
|
+
ItemsContainer,
|
|
10106
|
+
{
|
|
10107
|
+
onValueChange,
|
|
10108
|
+
value: valueAsHex,
|
|
10109
|
+
children
|
|
10110
|
+
}
|
|
10111
|
+
)
|
|
10112
|
+
] });
|
|
10041
10113
|
};
|
|
10042
10114
|
ColorGrid.displayName = "ColorGrid_UI";
|
|
10043
10115
|
|
|
10044
10116
|
// src/components/ColorPicker/ColorGridOption.tsx
|
|
10045
|
-
import
|
|
10117
|
+
import styled35 from "styled-components";
|
|
10046
10118
|
import { Item as RadioGroupItem } from "@radix-ui/react-radio-group";
|
|
10047
10119
|
import { formatHex as formatHex3 } from "culori/fn";
|
|
10048
10120
|
|
|
10049
10121
|
// src/components/ColorPicker/ColorSwatch.tsx
|
|
10050
|
-
import
|
|
10051
|
-
import { jsx as
|
|
10052
|
-
var ColorSwatchDiv =
|
|
10122
|
+
import styled33 from "styled-components";
|
|
10123
|
+
import { jsx as jsx228, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
10124
|
+
var ColorSwatchDiv = styled33.div`
|
|
10053
10125
|
aspect-ratio: 1;
|
|
10054
10126
|
width: ${({ $diameterPx }) => `${$diameterPx}px`};
|
|
10055
10127
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10068,7 +10140,7 @@ var ColorSwatchDiv = styled32.div`
|
|
|
10068
10140
|
outline-offset: 2px;
|
|
10069
10141
|
transform: ${({ $selected }) => $selected ? "scale(0.9)" : "scale(1)"};
|
|
10070
10142
|
`;
|
|
10071
|
-
var DerivativeHalfCircle =
|
|
10143
|
+
var DerivativeHalfCircle = styled33.div`
|
|
10072
10144
|
position: absolute;
|
|
10073
10145
|
right: 0;
|
|
10074
10146
|
top: 0;
|
|
@@ -10085,7 +10157,7 @@ var ColorSwatch = ({
|
|
|
10085
10157
|
value
|
|
10086
10158
|
}) => {
|
|
10087
10159
|
const { valueAsHex: colorPickerValueAsHex } = useColorPickerState();
|
|
10088
|
-
return /* @__PURE__ */
|
|
10160
|
+
return /* @__PURE__ */ jsxs21(
|
|
10089
10161
|
ColorSwatchDiv,
|
|
10090
10162
|
{
|
|
10091
10163
|
$diameterPx: diameterPx,
|
|
@@ -10096,7 +10168,7 @@ var ColorSwatch = ({
|
|
|
10096
10168
|
backgroundColor: value
|
|
10097
10169
|
},
|
|
10098
10170
|
children: [
|
|
10099
|
-
derivativeIsSelected ? /* @__PURE__ */
|
|
10171
|
+
derivativeIsSelected ? /* @__PURE__ */ jsx228(DerivativeHalfCircle, { $color: colorPickerValueAsHex }) : null,
|
|
10100
10172
|
children
|
|
10101
10173
|
]
|
|
10102
10174
|
}
|
|
@@ -10111,8 +10183,8 @@ import {
|
|
|
10111
10183
|
Portal as TooltipPortal,
|
|
10112
10184
|
Arrow as TooltipArrow
|
|
10113
10185
|
} from "@radix-ui/react-tooltip";
|
|
10114
|
-
import
|
|
10115
|
-
import { jsx as
|
|
10186
|
+
import styled34, { keyframes } from "styled-components";
|
|
10187
|
+
import { jsx as jsx229, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
10116
10188
|
var hide = keyframes`
|
|
10117
10189
|
from {
|
|
10118
10190
|
opacity: 1;
|
|
@@ -10161,7 +10233,7 @@ var slideRightAndFade = keyframes`
|
|
|
10161
10233
|
transform: translateX(0);
|
|
10162
10234
|
}
|
|
10163
10235
|
`;
|
|
10164
|
-
var StyledContent =
|
|
10236
|
+
var StyledContent = styled34(TooltipContent)`
|
|
10165
10237
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
10166
10238
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
10167
10239
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -10223,21 +10295,21 @@ var Tooltip = ({
|
|
|
10223
10295
|
if (forceOpen === true) {
|
|
10224
10296
|
rootProps.open = true;
|
|
10225
10297
|
}
|
|
10226
|
-
return /* @__PURE__ */
|
|
10298
|
+
return /* @__PURE__ */ jsxs22(
|
|
10227
10299
|
TooltipRoot,
|
|
10228
10300
|
{
|
|
10229
10301
|
delayDuration: delay,
|
|
10230
10302
|
...rootProps,
|
|
10231
10303
|
children: [
|
|
10232
|
-
/* @__PURE__ */
|
|
10233
|
-
/* @__PURE__ */
|
|
10304
|
+
/* @__PURE__ */ jsx229(TooltipTrigger, { asChild: true, children }),
|
|
10305
|
+
/* @__PURE__ */ jsx229(TooltipPortal, { children: /* @__PURE__ */ jsxs22(
|
|
10234
10306
|
StyledContent,
|
|
10235
10307
|
{
|
|
10236
10308
|
side: direction,
|
|
10237
10309
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
10238
10310
|
children: [
|
|
10239
10311
|
content,
|
|
10240
|
-
!hideArrow ? /* @__PURE__ */
|
|
10312
|
+
!hideArrow ? /* @__PURE__ */ jsx229(TooltipArrow, { asChild: true, children: /* @__PURE__ */ jsx229(
|
|
10241
10313
|
"svg",
|
|
10242
10314
|
{
|
|
10243
10315
|
fill: "var(--tooltip-bg)",
|
|
@@ -10246,7 +10318,7 @@ var Tooltip = ({
|
|
|
10246
10318
|
viewBox: "0 0 12 8",
|
|
10247
10319
|
width: "12",
|
|
10248
10320
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10249
|
-
children: /* @__PURE__ */
|
|
10321
|
+
children: /* @__PURE__ */ jsx229("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
|
|
10250
10322
|
}
|
|
10251
10323
|
) }) : null
|
|
10252
10324
|
]
|
|
@@ -10259,8 +10331,8 @@ var Tooltip = ({
|
|
|
10259
10331
|
Tooltip.displayName = "Tooltip_UI";
|
|
10260
10332
|
|
|
10261
10333
|
// src/components/ColorPicker/ColorGridOption.tsx
|
|
10262
|
-
import { jsx as
|
|
10263
|
-
var Container2 =
|
|
10334
|
+
import { jsx as jsx230 } from "react/jsx-runtime";
|
|
10335
|
+
var Container2 = styled35(RadioGroupItem)`
|
|
10264
10336
|
border: none;
|
|
10265
10337
|
appearance: none;
|
|
10266
10338
|
outline: none;
|
|
@@ -10270,16 +10342,17 @@ var Container2 = styled34(RadioGroupItem)`
|
|
|
10270
10342
|
cursor: pointer;
|
|
10271
10343
|
user-select: none;
|
|
10272
10344
|
`;
|
|
10273
|
-
var ColorGridOption = ({ value, name }) => {
|
|
10345
|
+
var ColorGridOption = ({ value: rawValue, name }) => {
|
|
10346
|
+
const value = rawValue.toLocaleLowerCase();
|
|
10274
10347
|
const { valueAsHsv, nonDerivedValueAsHex } = useColorPickerState();
|
|
10275
10348
|
const valueAsHex = formatHex3(valueAsHsv);
|
|
10276
10349
|
const isSelected = valueAsHex === value;
|
|
10277
10350
|
const derivativeIsSelected = !isSelected && nonDerivedValueAsHex === value;
|
|
10278
|
-
return /* @__PURE__ */
|
|
10351
|
+
return /* @__PURE__ */ jsx230(
|
|
10279
10352
|
Tooltip,
|
|
10280
10353
|
{
|
|
10281
|
-
content: name ?? /* @__PURE__ */
|
|
10282
|
-
children: /* @__PURE__ */
|
|
10354
|
+
content: name ?? /* @__PURE__ */ jsx230("span", { style: { fontFamily: "var(--wui-typography-family-mono)" }, children: value }),
|
|
10355
|
+
children: /* @__PURE__ */ jsx230(
|
|
10283
10356
|
Container2,
|
|
10284
10357
|
{
|
|
10285
10358
|
"aria-label": value,
|
|
@@ -10287,7 +10360,7 @@ var ColorGridOption = ({ value, name }) => {
|
|
|
10287
10360
|
role: "option",
|
|
10288
10361
|
tabIndex: -1,
|
|
10289
10362
|
value,
|
|
10290
|
-
children: /* @__PURE__ */
|
|
10363
|
+
children: /* @__PURE__ */ jsx230(
|
|
10291
10364
|
ColorSwatch,
|
|
10292
10365
|
{
|
|
10293
10366
|
derivativeIsSelected,
|
|
@@ -10304,10 +10377,10 @@ ColorGridOption.displayName = "ColorGridOption_UI";
|
|
|
10304
10377
|
|
|
10305
10378
|
// src/components/ColorPicker/ColorList.tsx
|
|
10306
10379
|
import { useCallback as useCallback11 } from "react";
|
|
10307
|
-
import
|
|
10380
|
+
import styled36 from "styled-components";
|
|
10308
10381
|
import { Root as ToggleGroupRoot } from "@radix-ui/react-toggle-group";
|
|
10309
|
-
import { jsx as
|
|
10310
|
-
var Container3 =
|
|
10382
|
+
import { jsx as jsx231 } from "react/jsx-runtime";
|
|
10383
|
+
var Container3 = styled36(ToggleGroupRoot)`
|
|
10311
10384
|
display: grid;
|
|
10312
10385
|
grid-template-columns: minmax(0, 1fr);
|
|
10313
10386
|
padding: var(--wui-space-02);
|
|
@@ -10324,7 +10397,7 @@ var ColorList = ({ children }) => {
|
|
|
10324
10397
|
},
|
|
10325
10398
|
[onChangeNonDerivedValueAsHsv]
|
|
10326
10399
|
);
|
|
10327
|
-
return /* @__PURE__ */
|
|
10400
|
+
return /* @__PURE__ */ jsx231(
|
|
10328
10401
|
Container3,
|
|
10329
10402
|
{
|
|
10330
10403
|
onValueChange,
|
|
@@ -10337,29 +10410,29 @@ var ColorList = ({ children }) => {
|
|
|
10337
10410
|
ColorList.displayName = "ColorList_UI";
|
|
10338
10411
|
|
|
10339
10412
|
// src/components/ColorPicker/ColorListGroup.tsx
|
|
10340
|
-
import
|
|
10341
|
-
import { jsx as
|
|
10342
|
-
var
|
|
10413
|
+
import styled37 from "styled-components";
|
|
10414
|
+
import { jsx as jsx232, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
10415
|
+
var Container4 = styled37.div`
|
|
10416
|
+
display: grid;
|
|
10417
|
+
gap: var(--wui-space-01);
|
|
10418
|
+
grid-template-columns: minmax(0, 1fr);
|
|
10419
|
+
`;
|
|
10420
|
+
var ItemsContainer2 = styled37.div`
|
|
10343
10421
|
display: flex;
|
|
10344
10422
|
flex-direction: column;
|
|
10345
10423
|
`;
|
|
10424
|
+
var LabelContainer2 = styled37.div`
|
|
10425
|
+
padding-top: var(--wui-space-01);
|
|
10426
|
+
`;
|
|
10346
10427
|
var ColorListGroup = ({ label, children }) => {
|
|
10347
|
-
return /* @__PURE__ */
|
|
10348
|
-
|
|
10428
|
+
return /* @__PURE__ */ jsxs23(
|
|
10429
|
+
Container4,
|
|
10349
10430
|
{
|
|
10350
10431
|
"aria-label": label,
|
|
10351
10432
|
role: "group",
|
|
10352
10433
|
children: [
|
|
10353
|
-
/* @__PURE__ */
|
|
10354
|
-
|
|
10355
|
-
{
|
|
10356
|
-
prominence: "secondary",
|
|
10357
|
-
renderAs: "span",
|
|
10358
|
-
variant: "label4",
|
|
10359
|
-
children: label
|
|
10360
|
-
}
|
|
10361
|
-
),
|
|
10362
|
-
/* @__PURE__ */ jsx231(ItemsContainer, { children })
|
|
10434
|
+
/* @__PURE__ */ jsx232(LabelContainer2, { children: /* @__PURE__ */ jsx232(Label, { children: label }) }),
|
|
10435
|
+
/* @__PURE__ */ jsx232(ItemsContainer2, { children })
|
|
10363
10436
|
]
|
|
10364
10437
|
}
|
|
10365
10438
|
);
|
|
@@ -10367,14 +10440,14 @@ var ColorListGroup = ({ label, children }) => {
|
|
|
10367
10440
|
ColorListGroup.displayName = "ColorListGroup_UI";
|
|
10368
10441
|
|
|
10369
10442
|
// src/components/ColorPicker/ColorListOption.tsx
|
|
10370
|
-
import
|
|
10443
|
+
import styled38 from "styled-components";
|
|
10371
10444
|
import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
|
|
10372
10445
|
import { formatHex as formatHex4 } from "culori/fn";
|
|
10373
10446
|
|
|
10374
10447
|
// src/components/ColorPicker/ColorNameOrHexCode.tsx
|
|
10375
|
-
import { jsx as
|
|
10448
|
+
import { jsx as jsx233, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
10376
10449
|
var ColorNameOrHexCode = ({ name, hexCode }) => {
|
|
10377
|
-
return /* @__PURE__ */
|
|
10450
|
+
return /* @__PURE__ */ jsxs24(
|
|
10378
10451
|
Box,
|
|
10379
10452
|
{
|
|
10380
10453
|
alignItems: "center",
|
|
@@ -10382,7 +10455,7 @@ var ColorNameOrHexCode = ({ name, hexCode }) => {
|
|
|
10382
10455
|
grow: 1,
|
|
10383
10456
|
justifyContent: "space-between",
|
|
10384
10457
|
children: [
|
|
10385
|
-
/* @__PURE__ */
|
|
10458
|
+
/* @__PURE__ */ jsx233(
|
|
10386
10459
|
Text,
|
|
10387
10460
|
{
|
|
10388
10461
|
renderAs: "span",
|
|
@@ -10390,7 +10463,7 @@ var ColorNameOrHexCode = ({ name, hexCode }) => {
|
|
|
10390
10463
|
children: name ?? hexCode
|
|
10391
10464
|
}
|
|
10392
10465
|
),
|
|
10393
|
-
name != null && /* @__PURE__ */
|
|
10466
|
+
name != null && /* @__PURE__ */ jsx233(
|
|
10394
10467
|
Text,
|
|
10395
10468
|
{
|
|
10396
10469
|
prominence: "secondary",
|
|
@@ -10405,8 +10478,8 @@ var ColorNameOrHexCode = ({ name, hexCode }) => {
|
|
|
10405
10478
|
};
|
|
10406
10479
|
|
|
10407
10480
|
// src/components/ColorPicker/ColorListOption.tsx
|
|
10408
|
-
import { jsx as
|
|
10409
|
-
var
|
|
10481
|
+
import { jsx as jsx234, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
10482
|
+
var Container5 = styled38(ToggleGroupItem)`
|
|
10410
10483
|
border: none;
|
|
10411
10484
|
appearance: none;
|
|
10412
10485
|
outline: none;
|
|
@@ -10428,13 +10501,14 @@ var Container4 = styled37(ToggleGroupItem)`
|
|
|
10428
10501
|
background-color: var(--wui-color-bg-surface-secondary-hover);
|
|
10429
10502
|
}
|
|
10430
10503
|
`;
|
|
10431
|
-
var ColorListOption = ({ value, name }) => {
|
|
10504
|
+
var ColorListOption = ({ value: rawValue, name }) => {
|
|
10505
|
+
const value = rawValue.toLocaleLowerCase();
|
|
10432
10506
|
const { valueAsHsv, nonDerivedValueAsHex } = useColorPickerState();
|
|
10433
10507
|
const valueAsHex = formatHex4(valueAsHsv);
|
|
10434
10508
|
const isSelected = valueAsHex === value;
|
|
10435
10509
|
const derivativeIsSelected = !isSelected && nonDerivedValueAsHex === value;
|
|
10436
|
-
return /* @__PURE__ */
|
|
10437
|
-
|
|
10510
|
+
return /* @__PURE__ */ jsxs25(
|
|
10511
|
+
Container5,
|
|
10438
10512
|
{
|
|
10439
10513
|
"aria-label": value,
|
|
10440
10514
|
"aria-selected": valueAsHex === value,
|
|
@@ -10442,7 +10516,7 @@ var ColorListOption = ({ value, name }) => {
|
|
|
10442
10516
|
tabIndex: -1,
|
|
10443
10517
|
value,
|
|
10444
10518
|
children: [
|
|
10445
|
-
/* @__PURE__ */
|
|
10519
|
+
/* @__PURE__ */ jsx234(
|
|
10446
10520
|
ColorSwatch,
|
|
10447
10521
|
{
|
|
10448
10522
|
derivativeIsSelected,
|
|
@@ -10450,7 +10524,7 @@ var ColorListOption = ({ value, name }) => {
|
|
|
10450
10524
|
value
|
|
10451
10525
|
}
|
|
10452
10526
|
),
|
|
10453
|
-
/* @__PURE__ */
|
|
10527
|
+
/* @__PURE__ */ jsx234(
|
|
10454
10528
|
ColorNameOrHexCode,
|
|
10455
10529
|
{
|
|
10456
10530
|
hexCode: value,
|
|
@@ -10465,7 +10539,7 @@ ColorListOption.displayName = "ColorListOption_UI";
|
|
|
10465
10539
|
|
|
10466
10540
|
// src/components/ColorPicker/ColorPicker.tsx
|
|
10467
10541
|
import { Root as PopoverRoot } from "@radix-ui/react-popover";
|
|
10468
|
-
import { jsx as
|
|
10542
|
+
import { jsx as jsx235 } from "react/jsx-runtime";
|
|
10469
10543
|
var ColorPicker = ({
|
|
10470
10544
|
children,
|
|
10471
10545
|
colorForComparison = DEFAULT_COLOR_FOR_COMPARISON,
|
|
@@ -10474,14 +10548,14 @@ var ColorPicker = ({
|
|
|
10474
10548
|
onValueChange,
|
|
10475
10549
|
value
|
|
10476
10550
|
}) => {
|
|
10477
|
-
return /* @__PURE__ */
|
|
10551
|
+
return /* @__PURE__ */ jsx235(PopoverRoot, { modal: false, children: /* @__PURE__ */ jsx235(
|
|
10478
10552
|
ColorPickerProvider,
|
|
10479
10553
|
{
|
|
10480
10554
|
colorForComparison,
|
|
10481
10555
|
minimumContrastRatio,
|
|
10482
10556
|
onValueChange,
|
|
10483
10557
|
opacityForContrastCalculation,
|
|
10484
|
-
value,
|
|
10558
|
+
value: value.toLocaleLowerCase(),
|
|
10485
10559
|
children
|
|
10486
10560
|
}
|
|
10487
10561
|
) });
|
|
@@ -10490,9 +10564,9 @@ ColorPicker.displayName = "ColorPicker_UI";
|
|
|
10490
10564
|
|
|
10491
10565
|
// src/components/ColorPicker/ColorPickerPopoverContent.tsx
|
|
10492
10566
|
import { Content as PopoverContent, Portal as PopoverPortal } from "@radix-ui/react-popover";
|
|
10493
|
-
import
|
|
10494
|
-
import { jsx as
|
|
10495
|
-
var StyledPopoverContent =
|
|
10567
|
+
import styled39 from "styled-components";
|
|
10568
|
+
import { jsx as jsx236 } from "react/jsx-runtime";
|
|
10569
|
+
var StyledPopoverContent = styled39(PopoverContent)`
|
|
10496
10570
|
background-color: var(--wui-color-bg-surface);
|
|
10497
10571
|
border-radius: var(--wui-border-radius-02);
|
|
10498
10572
|
border: 1px solid var(--wui-color-border);
|
|
@@ -10507,7 +10581,7 @@ var StyledPopoverContent = styled38(PopoverContent)`
|
|
|
10507
10581
|
var ColorPickerPopoverContent = ({
|
|
10508
10582
|
children
|
|
10509
10583
|
}) => {
|
|
10510
|
-
return /* @__PURE__ */
|
|
10584
|
+
return /* @__PURE__ */ jsx236(PopoverPortal, { children: /* @__PURE__ */ jsx236(
|
|
10511
10585
|
StyledPopoverContent,
|
|
10512
10586
|
{
|
|
10513
10587
|
align: "start",
|
|
@@ -10519,40 +10593,40 @@ var ColorPickerPopoverContent = ({
|
|
|
10519
10593
|
ColorPickerPopoverContent.displayName = "ColorPickerPopoverContent_UI";
|
|
10520
10594
|
|
|
10521
10595
|
// src/components/ColorPicker/ColorPickerSection.tsx
|
|
10522
|
-
import
|
|
10523
|
-
import { jsx as
|
|
10524
|
-
var
|
|
10596
|
+
import styled40 from "styled-components";
|
|
10597
|
+
import { jsx as jsx237 } from "react/jsx-runtime";
|
|
10598
|
+
var Container6 = styled40.div`
|
|
10525
10599
|
padding: var(--wui-space-02);
|
|
10526
10600
|
`;
|
|
10527
10601
|
var ColorPickerSection = ({ children }) => {
|
|
10528
|
-
return /* @__PURE__ */
|
|
10602
|
+
return /* @__PURE__ */ jsx237(Container6, { children: /* @__PURE__ */ jsx237(Stack, { children }) });
|
|
10529
10603
|
};
|
|
10530
10604
|
ColorPickerSection.displayName = "ColorPickerSection_UI";
|
|
10531
10605
|
|
|
10532
10606
|
// src/components/ColorPicker/ColorPickerTrigger.tsx
|
|
10533
10607
|
import { forwardRef as forwardRef13 } from "react";
|
|
10534
10608
|
import { Trigger as PopoverTrigger } from "@radix-ui/react-popover";
|
|
10535
|
-
import
|
|
10609
|
+
import styled41 from "styled-components";
|
|
10536
10610
|
|
|
10537
10611
|
// src/components/ColorPicker/ValueSwatch.tsx
|
|
10538
|
-
import { jsx as
|
|
10612
|
+
import { jsx as jsx238 } from "react/jsx-runtime";
|
|
10539
10613
|
var ValueSwatch = () => {
|
|
10540
10614
|
const { valueAsHex } = useColorPickerState();
|
|
10541
|
-
return /* @__PURE__ */
|
|
10615
|
+
return /* @__PURE__ */ jsx238(ColorSwatch, { value: valueAsHex });
|
|
10542
10616
|
};
|
|
10543
10617
|
ValueSwatch.displayName = "ValueSwatch_UI";
|
|
10544
10618
|
|
|
10545
10619
|
// src/components/ColorPicker/ValueNameOrHexCode.tsx
|
|
10546
|
-
import { jsx as
|
|
10620
|
+
import { jsx as jsx239 } from "react/jsx-runtime";
|
|
10547
10621
|
var ValueNameOrHexCode = () => {
|
|
10548
10622
|
const { valueAsHex } = useColorPickerState();
|
|
10549
|
-
return /* @__PURE__ */
|
|
10623
|
+
return /* @__PURE__ */ jsx239(ColorNameOrHexCode, { hexCode: valueAsHex });
|
|
10550
10624
|
};
|
|
10551
10625
|
ValueNameOrHexCode.displayName = "ValueNameOrHexCode_UI";
|
|
10552
10626
|
|
|
10553
10627
|
// src/components/ColorPicker/ColorPickerTrigger.tsx
|
|
10554
|
-
import { jsx as
|
|
10555
|
-
var StyledPopoverTrigger =
|
|
10628
|
+
import { jsx as jsx240, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
10629
|
+
var StyledPopoverTrigger = styled41(PopoverTrigger)`
|
|
10556
10630
|
background-color: var(--wui-color-bg-surface);
|
|
10557
10631
|
border-radius: var(--wui-border-radius-rounded);
|
|
10558
10632
|
border: 1px solid var(--wui-color-border);
|
|
@@ -10563,7 +10637,7 @@ var StyledPopoverTrigger = styled40(PopoverTrigger)`
|
|
|
10563
10637
|
background-color: var(--wui-color-bg-surface-hover);
|
|
10564
10638
|
}
|
|
10565
10639
|
`;
|
|
10566
|
-
var DefaultTriggerContentContainer =
|
|
10640
|
+
var DefaultTriggerContentContainer = styled41.div`
|
|
10567
10641
|
align-items: center;
|
|
10568
10642
|
display: flex;
|
|
10569
10643
|
flex-direction: row;
|
|
@@ -10571,19 +10645,19 @@ var DefaultTriggerContentContainer = styled40.div`
|
|
|
10571
10645
|
padding-right: var(--wui-space-01);
|
|
10572
10646
|
`;
|
|
10573
10647
|
var DefaultTriggerContent = () => {
|
|
10574
|
-
return /* @__PURE__ */
|
|
10575
|
-
/* @__PURE__ */
|
|
10576
|
-
/* @__PURE__ */
|
|
10648
|
+
return /* @__PURE__ */ jsxs26(DefaultTriggerContentContainer, { children: [
|
|
10649
|
+
/* @__PURE__ */ jsx240(ValueSwatch, {}),
|
|
10650
|
+
/* @__PURE__ */ jsx240(ValueNameOrHexCode, {})
|
|
10577
10651
|
] });
|
|
10578
10652
|
};
|
|
10579
10653
|
var ColorPickerTrigger = forwardRef13(
|
|
10580
10654
|
({ children, ...props }, forwardedRef) => {
|
|
10581
|
-
return /* @__PURE__ */
|
|
10655
|
+
return /* @__PURE__ */ jsx240(
|
|
10582
10656
|
StyledPopoverTrigger,
|
|
10583
10657
|
{
|
|
10584
10658
|
ref: forwardedRef,
|
|
10585
10659
|
...props,
|
|
10586
|
-
children: children ?? /* @__PURE__ */
|
|
10660
|
+
children: children ?? /* @__PURE__ */ jsx240(DefaultTriggerContent, {})
|
|
10587
10661
|
}
|
|
10588
10662
|
);
|
|
10589
10663
|
}
|
|
@@ -10591,9 +10665,9 @@ var ColorPickerTrigger = forwardRef13(
|
|
|
10591
10665
|
ColorPickerTrigger.displayName = "ColorPickerTrigger_UI";
|
|
10592
10666
|
|
|
10593
10667
|
// src/components/ColorPicker/ContrastIndicator.tsx
|
|
10594
|
-
import
|
|
10595
|
-
import { jsx as
|
|
10596
|
-
var
|
|
10668
|
+
import styled42 from "styled-components";
|
|
10669
|
+
import { jsx as jsx241, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
10670
|
+
var Container7 = styled42.div`
|
|
10597
10671
|
display: flex;
|
|
10598
10672
|
flex-direction: row;
|
|
10599
10673
|
justify-content: end;
|
|
@@ -10605,8 +10679,8 @@ var floorToTenth = (value) => {
|
|
|
10605
10679
|
var ContrastIndicator = () => {
|
|
10606
10680
|
const { currentContrastRatio, minimumContrastRatio } = useColorPickerState();
|
|
10607
10681
|
const isContrastSufficient = currentContrastRatio >= minimumContrastRatio;
|
|
10608
|
-
const label = /* @__PURE__ */
|
|
10609
|
-
/* @__PURE__ */
|
|
10682
|
+
const label = /* @__PURE__ */ jsxs27("div", { children: [
|
|
10683
|
+
/* @__PURE__ */ jsx241(
|
|
10610
10684
|
Text,
|
|
10611
10685
|
{
|
|
10612
10686
|
renderAs: "span",
|
|
@@ -10615,7 +10689,7 @@ var ContrastIndicator = () => {
|
|
|
10615
10689
|
}
|
|
10616
10690
|
),
|
|
10617
10691
|
" ",
|
|
10618
|
-
/* @__PURE__ */
|
|
10692
|
+
/* @__PURE__ */ jsxs27(
|
|
10619
10693
|
Text,
|
|
10620
10694
|
{
|
|
10621
10695
|
renderAs: "span",
|
|
@@ -10627,19 +10701,19 @@ var ContrastIndicator = () => {
|
|
|
10627
10701
|
}
|
|
10628
10702
|
)
|
|
10629
10703
|
] });
|
|
10630
|
-
return /* @__PURE__ */
|
|
10704
|
+
return /* @__PURE__ */ jsx241(Container7, { children: isContrastSufficient ? /* @__PURE__ */ jsx241(
|
|
10631
10705
|
Badge,
|
|
10632
10706
|
{
|
|
10633
10707
|
colorScheme: "success",
|
|
10634
|
-
icon: /* @__PURE__ */
|
|
10708
|
+
icon: /* @__PURE__ */ jsx241(Icon, { type: "checkmark" }),
|
|
10635
10709
|
label,
|
|
10636
10710
|
variant: "outline"
|
|
10637
10711
|
}
|
|
10638
|
-
) : /* @__PURE__ */
|
|
10712
|
+
) : /* @__PURE__ */ jsx241(
|
|
10639
10713
|
Badge,
|
|
10640
10714
|
{
|
|
10641
10715
|
colorScheme: "warning",
|
|
10642
|
-
icon: /* @__PURE__ */
|
|
10716
|
+
icon: /* @__PURE__ */ jsx241(Icon, { type: "error" }),
|
|
10643
10717
|
label,
|
|
10644
10718
|
variant: "outline"
|
|
10645
10719
|
}
|
|
@@ -10651,10 +10725,10 @@ import { useCallback as useCallback12 } from "react";
|
|
|
10651
10725
|
|
|
10652
10726
|
// src/components/Switch/Switch.tsx
|
|
10653
10727
|
import { forwardRef as forwardRef14, useId as useId3 } from "react";
|
|
10654
|
-
import
|
|
10728
|
+
import styled43, { css as css27 } from "styled-components";
|
|
10655
10729
|
import { isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
10656
|
-
import { jsx as
|
|
10657
|
-
var sizeSmall2 =
|
|
10730
|
+
import { jsx as jsx242, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
10731
|
+
var sizeSmall2 = css27`
|
|
10658
10732
|
--wui-size-small-width: 24px;
|
|
10659
10733
|
--wui-size-small-height: 14px;
|
|
10660
10734
|
|
|
@@ -10669,7 +10743,7 @@ var sizeSmall2 = css26`
|
|
|
10669
10743
|
height: calc(var(--wui-size-small-width) / 2);
|
|
10670
10744
|
}
|
|
10671
10745
|
`;
|
|
10672
|
-
var sizeMedium2 =
|
|
10746
|
+
var sizeMedium2 = css27`
|
|
10673
10747
|
--wui-size-medium-width: 32px;
|
|
10674
10748
|
--wui-size-medium-height: 18px;
|
|
10675
10749
|
|
|
@@ -10684,7 +10758,7 @@ var sizeMedium2 = css26`
|
|
|
10684
10758
|
height: calc(var(--wui-size-medium-width) / 2);
|
|
10685
10759
|
}
|
|
10686
10760
|
`;
|
|
10687
|
-
var sizeLarge2 =
|
|
10761
|
+
var sizeLarge2 = css27`
|
|
10688
10762
|
--wui-size-large-width: 40px;
|
|
10689
10763
|
--wui-size-large-height: 22px;
|
|
10690
10764
|
|
|
@@ -10704,14 +10778,14 @@ var getSizeCss2 = (size) => {
|
|
|
10704
10778
|
if (size === "lg") return sizeLarge2;
|
|
10705
10779
|
return sizeMedium2;
|
|
10706
10780
|
};
|
|
10707
|
-
var StyledSwitchWrapper =
|
|
10781
|
+
var StyledSwitchWrapper = styled43.div`
|
|
10708
10782
|
display: flex;
|
|
10709
10783
|
margin: 0;
|
|
10710
10784
|
|
|
10711
10785
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
10712
10786
|
user-select: none;
|
|
10713
10787
|
`;
|
|
10714
|
-
var StyledSwitchInput =
|
|
10788
|
+
var StyledSwitchInput = styled43.div`
|
|
10715
10789
|
${({ $size }) => getSizeCss2($size)}
|
|
10716
10790
|
line-height: 0;
|
|
10717
10791
|
margin: 0;
|
|
@@ -10739,7 +10813,7 @@ var StyledSwitchInput = styled42.div`
|
|
|
10739
10813
|
transition: all 0.2s ease-in-out;
|
|
10740
10814
|
}
|
|
10741
10815
|
`;
|
|
10742
|
-
var StyledHiddenSwitchInput =
|
|
10816
|
+
var StyledHiddenSwitchInput = styled43.input`
|
|
10743
10817
|
${visuallyHiddenStyle}
|
|
10744
10818
|
|
|
10745
10819
|
/* toggles display of faux-input background-color and toggle position */
|
|
@@ -10773,8 +10847,8 @@ var Switch = forwardRef14(
|
|
|
10773
10847
|
}, ref) => {
|
|
10774
10848
|
const generatedId = useId3();
|
|
10775
10849
|
const computedId = isNonEmptyString4(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
10776
|
-
return /* @__PURE__ */
|
|
10777
|
-
/* @__PURE__ */
|
|
10850
|
+
return /* @__PURE__ */ jsxs28(StyledSwitchWrapper, { $disabled: disabled, children: [
|
|
10851
|
+
/* @__PURE__ */ jsx242(
|
|
10778
10852
|
StyledHiddenSwitchInput,
|
|
10779
10853
|
{
|
|
10780
10854
|
...props,
|
|
@@ -10789,11 +10863,11 @@ var Switch = forwardRef14(
|
|
|
10789
10863
|
value
|
|
10790
10864
|
}
|
|
10791
10865
|
),
|
|
10792
|
-
/* @__PURE__ */
|
|
10866
|
+
/* @__PURE__ */ jsx242(
|
|
10793
10867
|
FormControlLabel,
|
|
10794
10868
|
{
|
|
10795
10869
|
align,
|
|
10796
|
-
controlSlot: /* @__PURE__ */
|
|
10870
|
+
controlSlot: /* @__PURE__ */ jsx242(
|
|
10797
10871
|
StyledSwitchInput,
|
|
10798
10872
|
{
|
|
10799
10873
|
$disabled: disabled,
|
|
@@ -10815,7 +10889,7 @@ var Switch = forwardRef14(
|
|
|
10815
10889
|
Switch.displayName = "Switch_UI";
|
|
10816
10890
|
|
|
10817
10891
|
// src/components/ColorPicker/ContrastEnforcerSwitch.tsx
|
|
10818
|
-
import { jsx as
|
|
10892
|
+
import { jsx as jsx243 } from "react/jsx-runtime";
|
|
10819
10893
|
var ContrastEnforcerSwitch = () => {
|
|
10820
10894
|
const { setShouldEnforceMinContrast, shouldEnforceMinContrast, hasAccessibleDerivatives: hasAccessibleDerivatives2 } = useColorPickerState();
|
|
10821
10895
|
const onChangeContrastLimitedSwitch = useCallback12(
|
|
@@ -10831,48 +10905,48 @@ var ContrastEnforcerSwitch = () => {
|
|
|
10831
10905
|
if (!hasAccessibleDerivatives2) {
|
|
10832
10906
|
return null;
|
|
10833
10907
|
}
|
|
10834
|
-
return /* @__PURE__ */
|
|
10908
|
+
return /* @__PURE__ */ jsx243(
|
|
10835
10909
|
Switch,
|
|
10836
10910
|
{
|
|
10837
10911
|
align: "right",
|
|
10838
10912
|
checked: shouldEnforceMinContrast,
|
|
10839
|
-
label: /* @__PURE__ */
|
|
10913
|
+
label: /* @__PURE__ */ jsx243(Text, { variant: "label3", children: "Limit to high-contrast colors" }),
|
|
10840
10914
|
onChange: onChangeContrastLimitedSwitch
|
|
10841
10915
|
}
|
|
10842
10916
|
);
|
|
10843
10917
|
};
|
|
10844
10918
|
|
|
10845
10919
|
// src/components/ColorPicker/ContrastPreview.tsx
|
|
10846
|
-
import { jsx as
|
|
10920
|
+
import { jsx as jsx244 } from "react/jsx-runtime";
|
|
10847
10921
|
var ContrastPreview = () => {
|
|
10848
10922
|
const { valueAsHex, colorForComparison } = useColorPickerState();
|
|
10849
|
-
return /* @__PURE__ */
|
|
10923
|
+
return /* @__PURE__ */ jsx244(
|
|
10850
10924
|
ColorSwatch,
|
|
10851
10925
|
{
|
|
10852
10926
|
diameterPx: 36,
|
|
10853
10927
|
value: valueAsHex,
|
|
10854
|
-
children: /* @__PURE__ */
|
|
10928
|
+
children: /* @__PURE__ */ jsx244(Text, { style: { color: colorForComparison }, children: "Aa" })
|
|
10855
10929
|
}
|
|
10856
10930
|
);
|
|
10857
10931
|
};
|
|
10858
10932
|
|
|
10859
10933
|
// src/components/ColorPicker/ContrastControls.tsx
|
|
10860
|
-
import { jsx as
|
|
10934
|
+
import { jsx as jsx245, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
10861
10935
|
var ContrastControls = () => {
|
|
10862
|
-
return /* @__PURE__ */
|
|
10863
|
-
/* @__PURE__ */
|
|
10936
|
+
return /* @__PURE__ */ jsxs29(ColorPickerSection, { children: [
|
|
10937
|
+
/* @__PURE__ */ jsxs29(
|
|
10864
10938
|
Box,
|
|
10865
10939
|
{
|
|
10866
10940
|
alignItems: "center",
|
|
10867
10941
|
direction: "row",
|
|
10868
10942
|
justifyContent: "space-between",
|
|
10869
10943
|
children: [
|
|
10870
|
-
/* @__PURE__ */
|
|
10871
|
-
/* @__PURE__ */
|
|
10944
|
+
/* @__PURE__ */ jsx245(ContrastPreview, {}),
|
|
10945
|
+
/* @__PURE__ */ jsx245(ContrastIndicator, {})
|
|
10872
10946
|
]
|
|
10873
10947
|
}
|
|
10874
10948
|
),
|
|
10875
|
-
/* @__PURE__ */
|
|
10949
|
+
/* @__PURE__ */ jsx245(ContrastEnforcerSwitch, {})
|
|
10876
10950
|
] });
|
|
10877
10951
|
};
|
|
10878
10952
|
ContrastControls.displayName = "ContrastControls_UI";
|
|
@@ -10883,12 +10957,12 @@ import { parseHex as parseHex2 } from "culori/fn";
|
|
|
10883
10957
|
|
|
10884
10958
|
// src/components/Input/Input.tsx
|
|
10885
10959
|
import { forwardRef as forwardRef15, cloneElement as cloneElement4, useRef as useRef9 } from "react";
|
|
10886
|
-
import
|
|
10960
|
+
import styled44, { css as css29 } from "styled-components";
|
|
10887
10961
|
import { isNil as isNil13, isNotNil as isNotNil18, isRecord as isRecord4 } from "@wistia/type-guards";
|
|
10888
10962
|
|
|
10889
10963
|
// src/css/inputCss.ts
|
|
10890
|
-
import { css as
|
|
10891
|
-
var inputCss =
|
|
10964
|
+
import { css as css28 } from "styled-components";
|
|
10965
|
+
var inputCss = css28`
|
|
10892
10966
|
/* Colors */
|
|
10893
10967
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
10894
10968
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
@@ -10914,8 +10988,8 @@ var inputCss = css27`
|
|
|
10914
10988
|
`;
|
|
10915
10989
|
|
|
10916
10990
|
// src/components/Input/Input.tsx
|
|
10917
|
-
import { jsx as
|
|
10918
|
-
var inputStyles =
|
|
10991
|
+
import { jsx as jsx246, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
10992
|
+
var inputStyles = css29`
|
|
10919
10993
|
${inputCss}
|
|
10920
10994
|
input,
|
|
10921
10995
|
textarea {
|
|
@@ -10950,7 +11024,7 @@ var inputStyles = css28`
|
|
|
10950
11024
|
}
|
|
10951
11025
|
}
|
|
10952
11026
|
`;
|
|
10953
|
-
var StyledInputContainer =
|
|
11027
|
+
var StyledInputContainer = styled44.div`
|
|
10954
11028
|
display: inline-flex;
|
|
10955
11029
|
position: relative;
|
|
10956
11030
|
${inputStyles};
|
|
@@ -11031,7 +11105,7 @@ var Input = forwardRef15(
|
|
|
11031
11105
|
const ref = isNotNil18(externalRef) && isRecord4(externalRef) && "current" in externalRef ? externalRef : internalRef;
|
|
11032
11106
|
let leftIconToDisplay = leftIcon;
|
|
11033
11107
|
if (isNil13(leftIcon) && type === "search") {
|
|
11034
|
-
leftIconToDisplay = /* @__PURE__ */
|
|
11108
|
+
leftIconToDisplay = /* @__PURE__ */ jsx246(Icon, { type: "search" });
|
|
11035
11109
|
}
|
|
11036
11110
|
if (isNotNil18(leftIconToDisplay)) {
|
|
11037
11111
|
leftIconToDisplay = cloneElement4(leftIconToDisplay, {
|
|
@@ -11056,21 +11130,21 @@ var Input = forwardRef15(
|
|
|
11056
11130
|
});
|
|
11057
11131
|
}
|
|
11058
11132
|
};
|
|
11059
|
-
return /* @__PURE__ */
|
|
11133
|
+
return /* @__PURE__ */ jsxs30(
|
|
11060
11134
|
StyledInputContainer,
|
|
11061
11135
|
{
|
|
11062
11136
|
$fullWidth: fullWidth,
|
|
11063
11137
|
$monospace: monospace,
|
|
11064
11138
|
children: [
|
|
11065
11139
|
leftIconToDisplay ?? null,
|
|
11066
|
-
type === "multiline" ? /* @__PURE__ */
|
|
11140
|
+
type === "multiline" ? /* @__PURE__ */ jsx246(
|
|
11067
11141
|
"textarea",
|
|
11068
11142
|
{
|
|
11069
11143
|
...props,
|
|
11070
11144
|
ref,
|
|
11071
11145
|
onFocus: handleFocus2
|
|
11072
11146
|
}
|
|
11073
|
-
) : /* @__PURE__ */
|
|
11147
|
+
) : /* @__PURE__ */ jsx246(
|
|
11074
11148
|
"input",
|
|
11075
11149
|
{
|
|
11076
11150
|
...props,
|
|
@@ -11088,7 +11162,7 @@ var Input = forwardRef15(
|
|
|
11088
11162
|
Input.displayName = "Input_UI";
|
|
11089
11163
|
|
|
11090
11164
|
// src/components/ColorPicker/HexColorInput.tsx
|
|
11091
|
-
import { jsx as
|
|
11165
|
+
import { jsx as jsx247 } from "react/jsx-runtime";
|
|
11092
11166
|
var SIX_DIGIT_HEX_CODE_LENGTH = 7;
|
|
11093
11167
|
var isValidHexChar = (char) => {
|
|
11094
11168
|
return /^[0-9a-fA-F]$/.test(char);
|
|
@@ -11228,7 +11302,7 @@ var HexColorInput = ({ autoFocus = true }) => {
|
|
|
11228
11302
|
useEffect11(() => {
|
|
11229
11303
|
setTextInputValue(valueAsHex);
|
|
11230
11304
|
}, [valueAsHex]);
|
|
11231
|
-
return /* @__PURE__ */
|
|
11305
|
+
return /* @__PURE__ */ jsx247(
|
|
11232
11306
|
Input,
|
|
11233
11307
|
{
|
|
11234
11308
|
ref: inputRef,
|
|
@@ -11257,15 +11331,15 @@ import {
|
|
|
11257
11331
|
Track as SliderTrack,
|
|
11258
11332
|
Thumb as SliderThumb
|
|
11259
11333
|
} from "@radix-ui/react-slider";
|
|
11260
|
-
import
|
|
11334
|
+
import styled46 from "styled-components";
|
|
11261
11335
|
import { formatHex as formatHex6 } from "culori/fn";
|
|
11262
11336
|
|
|
11263
11337
|
// src/components/ColorPicker/HSVHueCanvas.tsx
|
|
11264
11338
|
import { useEffect as useEffect12, useRef as useRef11 } from "react";
|
|
11265
|
-
import
|
|
11339
|
+
import styled45 from "styled-components";
|
|
11266
11340
|
import { formatHex as formatHex5 } from "culori/fn";
|
|
11267
|
-
import { jsx as
|
|
11268
|
-
var Canvas =
|
|
11341
|
+
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
11342
|
+
var Canvas = styled45.canvas`
|
|
11269
11343
|
display: block;
|
|
11270
11344
|
height: 100%;
|
|
11271
11345
|
width: 100%;
|
|
@@ -11293,7 +11367,7 @@ var HSVHueCanvas = ({ hsv }) => {
|
|
|
11293
11367
|
ctx.fillStyle = gradient;
|
|
11294
11368
|
ctx.fillRect(0, 0, width, height);
|
|
11295
11369
|
}, [hsv.s, hsv.v]);
|
|
11296
|
-
return /* @__PURE__ */
|
|
11370
|
+
return /* @__PURE__ */ jsx248(
|
|
11297
11371
|
Canvas,
|
|
11298
11372
|
{
|
|
11299
11373
|
ref: canvasRef,
|
|
@@ -11303,9 +11377,9 @@ var HSVHueCanvas = ({ hsv }) => {
|
|
|
11303
11377
|
};
|
|
11304
11378
|
|
|
11305
11379
|
// src/components/ColorPicker/HueSlider.tsx
|
|
11306
|
-
import { jsx as
|
|
11380
|
+
import { jsx as jsx249, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
11307
11381
|
var TWENTY_FOUR = 24;
|
|
11308
|
-
var
|
|
11382
|
+
var Container8 = styled46.div`
|
|
11309
11383
|
border-radius: var(--wui-border-radius-rounded);
|
|
11310
11384
|
border: 1px solid var(--wui-color-border);
|
|
11311
11385
|
height: ${TWENTY_FOUR}px;
|
|
@@ -11313,7 +11387,7 @@ var Container7 = styled45.div`
|
|
|
11313
11387
|
padding: 0 var(--wui-space-03);
|
|
11314
11388
|
position: relative;
|
|
11315
11389
|
`;
|
|
11316
|
-
var Root =
|
|
11390
|
+
var Root = styled46(SliderRoot)`
|
|
11317
11391
|
align-items: center;
|
|
11318
11392
|
display: flex;
|
|
11319
11393
|
position: absolute;
|
|
@@ -11322,11 +11396,11 @@ var Root = styled45(SliderRoot)`
|
|
|
11322
11396
|
width: calc(100% - var(--wui-space-05));
|
|
11323
11397
|
height: 16px;
|
|
11324
11398
|
`;
|
|
11325
|
-
var Track =
|
|
11399
|
+
var Track = styled46(SliderTrack)`
|
|
11326
11400
|
width: 100%;
|
|
11327
11401
|
`;
|
|
11328
|
-
var Thumb =
|
|
11329
|
-
var ThumbInner =
|
|
11402
|
+
var Thumb = styled46(SliderThumb)``;
|
|
11403
|
+
var ThumbInner = styled46.div`
|
|
11330
11404
|
cursor: pointer;
|
|
11331
11405
|
display: block;
|
|
11332
11406
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -11370,8 +11444,8 @@ var HueSlider = () => {
|
|
|
11370
11444
|
},
|
|
11371
11445
|
[nonDerivedValueAsHsv, onChangeNonDerivedValueAsHsv]
|
|
11372
11446
|
);
|
|
11373
|
-
return /* @__PURE__ */
|
|
11374
|
-
/* @__PURE__ */
|
|
11447
|
+
return /* @__PURE__ */ jsxs31(Container8, { style: containerStyle, children: [
|
|
11448
|
+
/* @__PURE__ */ jsxs31(
|
|
11375
11449
|
Root,
|
|
11376
11450
|
{
|
|
11377
11451
|
max: THREE_SIXTY,
|
|
@@ -11381,23 +11455,23 @@ var HueSlider = () => {
|
|
|
11381
11455
|
step: 1,
|
|
11382
11456
|
value: [nonDerivedValueAsHsv.h ?? 0],
|
|
11383
11457
|
children: [
|
|
11384
|
-
/* @__PURE__ */
|
|
11385
|
-
/* @__PURE__ */
|
|
11458
|
+
/* @__PURE__ */ jsx249(Track, {}),
|
|
11459
|
+
/* @__PURE__ */ jsx249(Thumb, { "aria-label": "Hue slider", children: /* @__PURE__ */ jsx249(ThumbInner, { style: thumbInnerStyle }) })
|
|
11386
11460
|
]
|
|
11387
11461
|
}
|
|
11388
11462
|
),
|
|
11389
|
-
/* @__PURE__ */
|
|
11463
|
+
/* @__PURE__ */ jsx249(HSVHueCanvas, { hsv: valueAsHsv })
|
|
11390
11464
|
] });
|
|
11391
11465
|
};
|
|
11392
11466
|
HueSlider.displayName = "HueSlider_UI";
|
|
11393
11467
|
|
|
11394
11468
|
// src/components/ColorPicker/SaturationAndValuePicker.tsx
|
|
11395
11469
|
import { useCallback as useCallback15, useEffect as useEffect14, useLayoutEffect as useLayoutEffect4, useMemo as useMemo10, useRef as useRef13, useState as useState14 } from "react";
|
|
11396
|
-
import
|
|
11470
|
+
import styled48 from "styled-components";
|
|
11397
11471
|
|
|
11398
11472
|
// src/components/ColorPicker/HSVSaturationValueCanvas.tsx
|
|
11399
11473
|
import { useEffect as useEffect13, useRef as useRef12 } from "react";
|
|
11400
|
-
import
|
|
11474
|
+
import styled47 from "styled-components";
|
|
11401
11475
|
|
|
11402
11476
|
// src/components/ColorPicker/canvas-utils.ts
|
|
11403
11477
|
var drawSmoothCurve = (context, points) => {
|
|
@@ -11426,8 +11500,8 @@ var drawSmoothCurve = (context, points) => {
|
|
|
11426
11500
|
};
|
|
11427
11501
|
|
|
11428
11502
|
// src/components/ColorPicker/HSVSaturationValueCanvas.tsx
|
|
11429
|
-
import { jsx as
|
|
11430
|
-
var Canvas2 =
|
|
11503
|
+
import { jsx as jsx250 } from "react/jsx-runtime";
|
|
11504
|
+
var Canvas2 = styled47.canvas`
|
|
11431
11505
|
display: block;
|
|
11432
11506
|
width: 100%;
|
|
11433
11507
|
`;
|
|
@@ -11534,7 +11608,7 @@ var HSVSaturationValueCanvas = ({
|
|
|
11534
11608
|
colorForComparison,
|
|
11535
11609
|
opacityForContrastCalculation
|
|
11536
11610
|
]);
|
|
11537
|
-
return /* @__PURE__ */
|
|
11611
|
+
return /* @__PURE__ */ jsx250(
|
|
11538
11612
|
Canvas2,
|
|
11539
11613
|
{
|
|
11540
11614
|
ref: canvasRef,
|
|
@@ -11545,16 +11619,16 @@ var HSVSaturationValueCanvas = ({
|
|
|
11545
11619
|
};
|
|
11546
11620
|
|
|
11547
11621
|
// src/components/ColorPicker/SaturationAndValuePicker.tsx
|
|
11548
|
-
import { jsx as
|
|
11622
|
+
import { jsx as jsx251, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
11549
11623
|
var SATURATION_NUDGE = 0.02;
|
|
11550
11624
|
var VALUE_NUDGE = 0.02;
|
|
11551
|
-
var
|
|
11625
|
+
var Container9 = styled48.div`
|
|
11552
11626
|
border-radius: var(--wui-border-radius-02);
|
|
11553
11627
|
box-shadow: 0 0 0 1px var(--wui-color-border);
|
|
11554
11628
|
overflow: hidden;
|
|
11555
11629
|
position: relative;
|
|
11556
11630
|
`;
|
|
11557
|
-
var Thumb2 =
|
|
11631
|
+
var Thumb2 = styled48.button.attrs({ type: "button" })`
|
|
11558
11632
|
appearance: none;
|
|
11559
11633
|
border-radius: var(--wui-border-radius-rounded);
|
|
11560
11634
|
border: none;
|
|
@@ -11714,14 +11788,14 @@ var SaturationAndValuePicker = ({
|
|
|
11714
11788
|
}, [onWindowMouseMove, onWindowMouseUp]);
|
|
11715
11789
|
return (
|
|
11716
11790
|
// eslint-disable-next-line styled-components-a11y/no-static-element-interactions
|
|
11717
|
-
/* @__PURE__ */
|
|
11718
|
-
|
|
11791
|
+
/* @__PURE__ */ jsxs32(
|
|
11792
|
+
Container9,
|
|
11719
11793
|
{
|
|
11720
11794
|
ref: containerRef,
|
|
11721
11795
|
"data-testid": dataTestId,
|
|
11722
11796
|
onMouseDown: onContainerMouseDown,
|
|
11723
11797
|
children: [
|
|
11724
|
-
/* @__PURE__ */
|
|
11798
|
+
/* @__PURE__ */ jsx251(
|
|
11725
11799
|
Thumb2,
|
|
11726
11800
|
{
|
|
11727
11801
|
ref: thumbRef,
|
|
@@ -11733,7 +11807,7 @@ var SaturationAndValuePicker = ({
|
|
|
11733
11807
|
tabIndex: 0
|
|
11734
11808
|
}
|
|
11735
11809
|
),
|
|
11736
|
-
/* @__PURE__ */
|
|
11810
|
+
/* @__PURE__ */ jsx251(
|
|
11737
11811
|
HSVSaturationValueCanvas,
|
|
11738
11812
|
{
|
|
11739
11813
|
colorForComparison,
|
|
@@ -11743,8 +11817,8 @@ var SaturationAndValuePicker = ({
|
|
|
11743
11817
|
shouldShowContrastCurve: shouldEnforceMinContrast
|
|
11744
11818
|
}
|
|
11745
11819
|
),
|
|
11746
|
-
/* @__PURE__ */
|
|
11747
|
-
/* @__PURE__ */
|
|
11820
|
+
/* @__PURE__ */ jsx251(ScreenReaderOnly, { id: instructionsId, children: "Move right to increase saturation, left to decrease saturation, up to increase value, and down to decrease value." }),
|
|
11821
|
+
/* @__PURE__ */ jsxs32(ScreenReaderOnly, { "aria-live": "polite", children: [
|
|
11748
11822
|
"Current color: ",
|
|
11749
11823
|
valueAsHex,
|
|
11750
11824
|
". Hue: ",
|
|
@@ -11775,14 +11849,14 @@ import {
|
|
|
11775
11849
|
isValidElement as isValidElement2
|
|
11776
11850
|
} from "react";
|
|
11777
11851
|
import { matchSorter } from "match-sorter";
|
|
11778
|
-
import
|
|
11852
|
+
import styled50 from "styled-components";
|
|
11779
11853
|
|
|
11780
11854
|
// src/components/Tag/Tag.tsx
|
|
11781
11855
|
import { forwardRef as forwardRef16 } from "react";
|
|
11782
|
-
import
|
|
11856
|
+
import styled49 from "styled-components";
|
|
11783
11857
|
import { isNil as isNil14, isNotNil as isNotNil19, isNonEmptyString as isNonEmptyString5 } from "@wistia/type-guards";
|
|
11784
|
-
import { Fragment as Fragment6, jsx as
|
|
11785
|
-
var TagLabel =
|
|
11858
|
+
import { Fragment as Fragment6, jsx as jsx252, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
11859
|
+
var TagLabel = styled49.a`
|
|
11786
11860
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11787
11861
|
font-size: var(--wui-typography-label-4-size);
|
|
11788
11862
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -11817,14 +11891,14 @@ var TagLabel = styled48.a`
|
|
|
11817
11891
|
background: var(--wui-color-bg-surface-secondary-active);
|
|
11818
11892
|
}
|
|
11819
11893
|
`;
|
|
11820
|
-
var TagDivider =
|
|
11894
|
+
var TagDivider = styled49.div`
|
|
11821
11895
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11822
11896
|
border-left: 1px solid var(--wui-color-border);
|
|
11823
11897
|
display: flex;
|
|
11824
11898
|
height: 14px;
|
|
11825
11899
|
width: 1px;
|
|
11826
11900
|
`;
|
|
11827
|
-
var StyledRemoveButton =
|
|
11901
|
+
var StyledRemoveButton = styled49.button`
|
|
11828
11902
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11829
11903
|
all: unset;
|
|
11830
11904
|
cursor: pointer;
|
|
@@ -11852,7 +11926,7 @@ var StyledRemoveButton = styled48.button`
|
|
|
11852
11926
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
11853
11927
|
}
|
|
11854
11928
|
`;
|
|
11855
|
-
var StyledTag =
|
|
11929
|
+
var StyledTag = styled49.div`
|
|
11856
11930
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11857
11931
|
align-items: center;
|
|
11858
11932
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -11873,23 +11947,23 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
11873
11947
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
11874
11948
|
);
|
|
11875
11949
|
}
|
|
11876
|
-
return /* @__PURE__ */
|
|
11877
|
-
/* @__PURE__ */
|
|
11878
|
-
/* @__PURE__ */
|
|
11950
|
+
return /* @__PURE__ */ jsxs33(Fragment6, { children: [
|
|
11951
|
+
/* @__PURE__ */ jsx252(TagDivider, { $colorScheme: colorScheme }),
|
|
11952
|
+
/* @__PURE__ */ jsxs33(
|
|
11879
11953
|
StyledRemoveButton,
|
|
11880
11954
|
{
|
|
11881
11955
|
$colorScheme: colorScheme,
|
|
11882
11956
|
onClick: onClickRemove,
|
|
11883
11957
|
type: "button",
|
|
11884
11958
|
children: [
|
|
11885
|
-
/* @__PURE__ */
|
|
11959
|
+
/* @__PURE__ */ jsx252(
|
|
11886
11960
|
Icon,
|
|
11887
11961
|
{
|
|
11888
11962
|
size: "sm",
|
|
11889
11963
|
type: "close"
|
|
11890
11964
|
}
|
|
11891
11965
|
),
|
|
11892
|
-
/* @__PURE__ */
|
|
11966
|
+
/* @__PURE__ */ jsx252(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
11893
11967
|
]
|
|
11894
11968
|
}
|
|
11895
11969
|
)
|
|
@@ -11899,14 +11973,14 @@ var Tag = forwardRef16(
|
|
|
11899
11973
|
({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
|
|
11900
11974
|
const hasIcon = isNotNil19(icon);
|
|
11901
11975
|
const labelProps = isNotNil19(href) && isNonEmptyString5(href) ? { href, as: "a" } : { as: "span" };
|
|
11902
|
-
return /* @__PURE__ */
|
|
11976
|
+
return /* @__PURE__ */ jsxs33(
|
|
11903
11977
|
StyledTag,
|
|
11904
11978
|
{
|
|
11905
11979
|
ref,
|
|
11906
11980
|
$colorScheme: colorScheme,
|
|
11907
11981
|
...props,
|
|
11908
11982
|
children: [
|
|
11909
|
-
/* @__PURE__ */
|
|
11983
|
+
/* @__PURE__ */ jsxs33(
|
|
11910
11984
|
TagLabel,
|
|
11911
11985
|
{
|
|
11912
11986
|
...labelProps,
|
|
@@ -11917,7 +11991,7 @@ var Tag = forwardRef16(
|
|
|
11917
11991
|
]
|
|
11918
11992
|
}
|
|
11919
11993
|
),
|
|
11920
|
-
/* @__PURE__ */
|
|
11994
|
+
/* @__PURE__ */ jsx252(
|
|
11921
11995
|
RemoveButton,
|
|
11922
11996
|
{
|
|
11923
11997
|
colorScheme,
|
|
@@ -11933,8 +12007,8 @@ var Tag = forwardRef16(
|
|
|
11933
12007
|
Tag.displayName = "Tag_UI";
|
|
11934
12008
|
|
|
11935
12009
|
// src/components/Combobox/Combobox.tsx
|
|
11936
|
-
import { jsx as
|
|
11937
|
-
var ComboboxWapper =
|
|
12010
|
+
import { jsx as jsx253, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
12011
|
+
var ComboboxWapper = styled50.div`
|
|
11938
12012
|
${inputCss};
|
|
11939
12013
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
11940
12014
|
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
@@ -11983,7 +12057,7 @@ var ComboboxWapper = styled49.div`
|
|
|
11983
12057
|
}
|
|
11984
12058
|
}
|
|
11985
12059
|
`;
|
|
11986
|
-
var ComboboxInput =
|
|
12060
|
+
var ComboboxInput = styled50(Ariakit.Combobox)`
|
|
11987
12061
|
appearance: none;
|
|
11988
12062
|
padding: 0;
|
|
11989
12063
|
width: 100%;
|
|
@@ -11998,7 +12072,7 @@ var ComboboxInput = styled49(Ariakit.Combobox)`
|
|
|
11998
12072
|
outline-width: 2px;
|
|
11999
12073
|
}
|
|
12000
12074
|
`;
|
|
12001
|
-
var ComboboxPopover =
|
|
12075
|
+
var ComboboxPopover = styled50(Ariakit.Popover)`
|
|
12002
12076
|
--wui-combobox-content-border: var(--wui-color-border);
|
|
12003
12077
|
--wui-combobox-content-bg: var(--wui-color-bg-surface);
|
|
12004
12078
|
--wui-combobox-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -12023,7 +12097,7 @@ var ComboboxPopover = styled49(Ariakit.Popover)`
|
|
|
12023
12097
|
--item-opacity: 0.5;
|
|
12024
12098
|
}
|
|
12025
12099
|
`;
|
|
12026
|
-
var ComboboxItem2 =
|
|
12100
|
+
var ComboboxItem2 = styled50(Ariakit.ComboboxItem)`
|
|
12027
12101
|
${variantStyleMap2.body3};
|
|
12028
12102
|
display: flex;
|
|
12029
12103
|
padding: var(--wui-combobox-option-padding);
|
|
@@ -12048,12 +12122,12 @@ var ComboboxItem2 = styled49(Ariakit.ComboboxItem)`
|
|
|
12048
12122
|
background-color: transparent;
|
|
12049
12123
|
}
|
|
12050
12124
|
`;
|
|
12051
|
-
var NoResults =
|
|
12125
|
+
var NoResults = styled50.div`
|
|
12052
12126
|
gap: var(--wui-space-02);
|
|
12053
12127
|
`;
|
|
12054
12128
|
var POPOVER_WIDTH_OFFSET = 20;
|
|
12055
12129
|
var ComboboxOption = ({ value, children }) => {
|
|
12056
|
-
return /* @__PURE__ */
|
|
12130
|
+
return /* @__PURE__ */ jsx253(
|
|
12057
12131
|
ComboboxItem2,
|
|
12058
12132
|
{
|
|
12059
12133
|
className: "combobox-item",
|
|
@@ -12106,7 +12180,7 @@ var Combobox2 = ({
|
|
|
12106
12180
|
const matches = useMemo11(() => {
|
|
12107
12181
|
return matchSorter(Object.keys(options), searchValue);
|
|
12108
12182
|
}, [options, searchValue]);
|
|
12109
|
-
return /* @__PURE__ */
|
|
12183
|
+
return /* @__PURE__ */ jsxs34(
|
|
12110
12184
|
Ariakit.ComboboxProvider,
|
|
12111
12185
|
{
|
|
12112
12186
|
selectedValue: value,
|
|
@@ -12117,13 +12191,13 @@ var Combobox2 = ({
|
|
|
12117
12191
|
});
|
|
12118
12192
|
},
|
|
12119
12193
|
children: [
|
|
12120
|
-
/* @__PURE__ */
|
|
12194
|
+
/* @__PURE__ */ jsxs34(
|
|
12121
12195
|
ComboboxWapper,
|
|
12122
12196
|
{
|
|
12123
12197
|
ref: comboboxWrapperRef,
|
|
12124
12198
|
$fullWidth: fullWidth,
|
|
12125
12199
|
children: [
|
|
12126
|
-
value.map((selectedValue) => /* @__PURE__ */
|
|
12200
|
+
value.map((selectedValue) => /* @__PURE__ */ jsx253(
|
|
12127
12201
|
Tag,
|
|
12128
12202
|
{
|
|
12129
12203
|
href: "https://example.com",
|
|
@@ -12133,11 +12207,11 @@ var Combobox2 = ({
|
|
|
12133
12207
|
},
|
|
12134
12208
|
selectedValue
|
|
12135
12209
|
)),
|
|
12136
|
-
/* @__PURE__ */
|
|
12210
|
+
/* @__PURE__ */ jsx253(ComboboxInput, { placeholder })
|
|
12137
12211
|
]
|
|
12138
12212
|
}
|
|
12139
12213
|
),
|
|
12140
|
-
/* @__PURE__ */
|
|
12214
|
+
/* @__PURE__ */ jsxs34(
|
|
12141
12215
|
ComboboxPopover,
|
|
12142
12216
|
{
|
|
12143
12217
|
"aria-busy": isPending,
|
|
@@ -12147,14 +12221,14 @@ var Combobox2 = ({
|
|
|
12147
12221
|
width: wrapperWidth
|
|
12148
12222
|
},
|
|
12149
12223
|
children: [
|
|
12150
|
-
matches.map((match) => /* @__PURE__ */
|
|
12224
|
+
matches.map((match) => /* @__PURE__ */ jsxs34(
|
|
12151
12225
|
ComboboxItem2,
|
|
12152
12226
|
{
|
|
12153
12227
|
className: "combobox-item",
|
|
12154
12228
|
focusOnHover: true,
|
|
12155
12229
|
value: match,
|
|
12156
12230
|
children: [
|
|
12157
|
-
/* @__PURE__ */
|
|
12231
|
+
/* @__PURE__ */ jsx253(
|
|
12158
12232
|
Icon,
|
|
12159
12233
|
{
|
|
12160
12234
|
size: "sm",
|
|
@@ -12169,7 +12243,7 @@ var Combobox2 = ({
|
|
|
12169
12243
|
},
|
|
12170
12244
|
match
|
|
12171
12245
|
)),
|
|
12172
|
-
!matches.length && /* @__PURE__ */
|
|
12246
|
+
!matches.length && /* @__PURE__ */ jsx253(NoResults, { children: "No results found" })
|
|
12173
12247
|
]
|
|
12174
12248
|
}
|
|
12175
12249
|
)
|
|
@@ -12180,10 +12254,10 @@ var Combobox2 = ({
|
|
|
12180
12254
|
|
|
12181
12255
|
// src/components/DataCards/DataCard.tsx
|
|
12182
12256
|
import { useRef as useRef15 } from "react";
|
|
12183
|
-
import
|
|
12257
|
+
import styled51, { keyframes as keyframes2 } from "styled-components";
|
|
12184
12258
|
import { isNotNil as isNotNil20 } from "@wistia/type-guards";
|
|
12185
|
-
import { jsx as
|
|
12186
|
-
var StyledDataCard =
|
|
12259
|
+
import { jsx as jsx254, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
12260
|
+
var StyledDataCard = styled51.div`
|
|
12187
12261
|
--wui-data-card-text: var(--wui-color-text-button);
|
|
12188
12262
|
--wui-color-text: var(--wui-data-card-text);
|
|
12189
12263
|
--wui-data-card-background: var(--wui-color-bg-surface-secondary);
|
|
@@ -12265,7 +12339,7 @@ var shimmer = keyframes2`
|
|
|
12265
12339
|
background-position: -200% 0;
|
|
12266
12340
|
}
|
|
12267
12341
|
`;
|
|
12268
|
-
var LoadingBackground =
|
|
12342
|
+
var LoadingBackground = styled51.div`
|
|
12269
12343
|
background: linear-gradient(
|
|
12270
12344
|
90deg,
|
|
12271
12345
|
var(--wui-color-bg-surface-tertiary) 25%,
|
|
@@ -12276,32 +12350,32 @@ var LoadingBackground = styled50.div`
|
|
|
12276
12350
|
animation: ${shimmer} 1.5s infinite;
|
|
12277
12351
|
border-radius: var(--wui-border-radius-01);
|
|
12278
12352
|
`;
|
|
12279
|
-
var StyledLoadingLabel =
|
|
12353
|
+
var StyledLoadingLabel = styled51(LoadingBackground)`
|
|
12280
12354
|
width: 80px;
|
|
12281
12355
|
height: var(--wui-typography-heading-6-line-height);
|
|
12282
12356
|
`;
|
|
12283
|
-
var StyledLoadingValue =
|
|
12357
|
+
var StyledLoadingValue = styled51(LoadingBackground)`
|
|
12284
12358
|
width: 90%;
|
|
12285
12359
|
height: var(--wui-typography-heading-3-line-height);
|
|
12286
12360
|
`;
|
|
12287
|
-
var
|
|
12361
|
+
var StyledLabel3 = styled51(Heading)`
|
|
12288
12362
|
grid-area: label;
|
|
12289
12363
|
`;
|
|
12290
|
-
var StyledValue =
|
|
12364
|
+
var StyledValue = styled51(Heading)`
|
|
12291
12365
|
grid-area: value;
|
|
12292
12366
|
`;
|
|
12293
|
-
var StyledSlot =
|
|
12367
|
+
var StyledSlot = styled51.div`
|
|
12294
12368
|
display: flex;
|
|
12295
12369
|
justify-content: flex-end;
|
|
12296
12370
|
grid-area: slot;
|
|
12297
12371
|
align-self: center;
|
|
12298
12372
|
`;
|
|
12299
|
-
var StyledDataCardTrendContainer =
|
|
12373
|
+
var StyledDataCardTrendContainer = styled51.div`
|
|
12300
12374
|
position: absolute;
|
|
12301
12375
|
bottom: var(--wui-space-01);
|
|
12302
12376
|
right: var(--wui-space-01);
|
|
12303
12377
|
`;
|
|
12304
|
-
var StyledSubtitle =
|
|
12378
|
+
var StyledSubtitle = styled51(Text)`
|
|
12305
12379
|
grid-area: subtitle;
|
|
12306
12380
|
`;
|
|
12307
12381
|
var DataCardInner = ({
|
|
@@ -12313,30 +12387,30 @@ var DataCardInner = ({
|
|
|
12313
12387
|
trend,
|
|
12314
12388
|
subtitle,
|
|
12315
12389
|
...props
|
|
12316
|
-
}) => /* @__PURE__ */
|
|
12390
|
+
}) => /* @__PURE__ */ jsxs35(
|
|
12317
12391
|
StyledDataCard,
|
|
12318
12392
|
{
|
|
12319
12393
|
$colorScheme: colorScheme,
|
|
12320
12394
|
...props,
|
|
12321
12395
|
children: [
|
|
12322
|
-
/* @__PURE__ */
|
|
12323
|
-
|
|
12396
|
+
/* @__PURE__ */ jsx254(
|
|
12397
|
+
StyledLabel3,
|
|
12324
12398
|
{
|
|
12325
12399
|
renderAs: "dt",
|
|
12326
12400
|
variant: "heading6",
|
|
12327
|
-
children: isLoading ? /* @__PURE__ */
|
|
12401
|
+
children: isLoading ? /* @__PURE__ */ jsx254(StyledLoadingLabel, {}) : label
|
|
12328
12402
|
}
|
|
12329
12403
|
),
|
|
12330
|
-
/* @__PURE__ */
|
|
12404
|
+
/* @__PURE__ */ jsx254(
|
|
12331
12405
|
StyledValue,
|
|
12332
12406
|
{
|
|
12333
12407
|
renderAs: "dd",
|
|
12334
12408
|
variant: "heading3",
|
|
12335
|
-
children: isLoading ? /* @__PURE__ */
|
|
12409
|
+
children: isLoading ? /* @__PURE__ */ jsx254(StyledLoadingValue, {}) : value
|
|
12336
12410
|
}
|
|
12337
12411
|
),
|
|
12338
|
-
isNotNil20(upperRightSlot) && !isLoading && /* @__PURE__ */
|
|
12339
|
-
isNotNil20(subtitle) && !isLoading && /* @__PURE__ */
|
|
12412
|
+
isNotNil20(upperRightSlot) && !isLoading && /* @__PURE__ */ jsx254(StyledSlot, { children: upperRightSlot }),
|
|
12413
|
+
isNotNil20(subtitle) && !isLoading && /* @__PURE__ */ jsx254(
|
|
12340
12414
|
StyledSubtitle,
|
|
12341
12415
|
{
|
|
12342
12416
|
"data-wui-data-card-subtitle": true,
|
|
@@ -12344,7 +12418,7 @@ var DataCardInner = ({
|
|
|
12344
12418
|
children: subtitle
|
|
12345
12419
|
}
|
|
12346
12420
|
),
|
|
12347
|
-
isNotNil20(trend) && !isLoading && /* @__PURE__ */
|
|
12421
|
+
isNotNil20(trend) && !isLoading && /* @__PURE__ */ jsx254(StyledDataCardTrendContainer, { children: trend })
|
|
12348
12422
|
]
|
|
12349
12423
|
}
|
|
12350
12424
|
);
|
|
@@ -12352,12 +12426,12 @@ var DataCard = (props) => {
|
|
|
12352
12426
|
const ref = useRef15(null);
|
|
12353
12427
|
if (isNotNil20(props.href) || isNotNil20(props.onClick)) {
|
|
12354
12428
|
const { "aria-pressed": ariaPressed, ...dataCardProps } = props;
|
|
12355
|
-
return /* @__PURE__ */
|
|
12429
|
+
return /* @__PURE__ */ jsx254(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ jsx254(
|
|
12356
12430
|
DataCardInner,
|
|
12357
12431
|
{
|
|
12358
12432
|
upperRightSlot: props.upperRightSlot,
|
|
12359
12433
|
...dataCardProps,
|
|
12360
|
-
label: /* @__PURE__ */
|
|
12434
|
+
label: /* @__PURE__ */ jsx254(
|
|
12361
12435
|
Button,
|
|
12362
12436
|
{
|
|
12363
12437
|
ref,
|
|
@@ -12374,14 +12448,14 @@ var DataCard = (props) => {
|
|
|
12374
12448
|
}
|
|
12375
12449
|
) });
|
|
12376
12450
|
}
|
|
12377
|
-
return /* @__PURE__ */
|
|
12451
|
+
return /* @__PURE__ */ jsx254(DataCardInner, { ...props });
|
|
12378
12452
|
};
|
|
12379
12453
|
DataCard.displayName = "DataCard_UI";
|
|
12380
12454
|
|
|
12381
12455
|
// src/components/DataCards/DataCards.tsx
|
|
12382
|
-
import
|
|
12383
|
-
import { jsx as
|
|
12384
|
-
var StyledDataCards =
|
|
12456
|
+
import styled52 from "styled-components";
|
|
12457
|
+
import { jsx as jsx255 } from "react/jsx-runtime";
|
|
12458
|
+
var StyledDataCards = styled52(Box)`
|
|
12385
12459
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12386
12460
|
margin-top: 0; /* Remove default <dl> style */
|
|
12387
12461
|
> * {
|
|
@@ -12395,7 +12469,7 @@ var DataCards = ({
|
|
|
12395
12469
|
colorScheme = "inherit",
|
|
12396
12470
|
...props
|
|
12397
12471
|
}) => {
|
|
12398
|
-
return /* @__PURE__ */
|
|
12472
|
+
return /* @__PURE__ */ jsx255(
|
|
12399
12473
|
StyledDataCards,
|
|
12400
12474
|
{
|
|
12401
12475
|
...props,
|
|
@@ -12414,9 +12488,9 @@ var DataCards = ({
|
|
|
12414
12488
|
DataCards.displayName = "DataCards_UI";
|
|
12415
12489
|
|
|
12416
12490
|
// src/components/DataCards/DataCardTrend.tsx
|
|
12417
|
-
import
|
|
12418
|
-
import { jsx as
|
|
12419
|
-
var StyledDataCardTrend =
|
|
12491
|
+
import styled53 from "styled-components";
|
|
12492
|
+
import { jsx as jsx256, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
12493
|
+
var StyledDataCardTrend = styled53.div`
|
|
12420
12494
|
${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
|
|
12421
12495
|
background: var(--wui-color-bg-app);
|
|
12422
12496
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -12431,8 +12505,8 @@ var DataCardTrend = ({
|
|
|
12431
12505
|
children,
|
|
12432
12506
|
...props
|
|
12433
12507
|
}) => {
|
|
12434
|
-
return /* @__PURE__ */
|
|
12435
|
-
/* @__PURE__ */
|
|
12508
|
+
return /* @__PURE__ */ jsxs36(StyledDataCardTrend, { $outlook: outlook, children: [
|
|
12509
|
+
/* @__PURE__ */ jsx256(
|
|
12436
12510
|
Icon,
|
|
12437
12511
|
{
|
|
12438
12512
|
size: "md",
|
|
@@ -12440,7 +12514,7 @@ var DataCardTrend = ({
|
|
|
12440
12514
|
...props
|
|
12441
12515
|
}
|
|
12442
12516
|
),
|
|
12443
|
-
/* @__PURE__ */
|
|
12517
|
+
/* @__PURE__ */ jsx256(
|
|
12444
12518
|
Text,
|
|
12445
12519
|
{
|
|
12446
12520
|
prominence: "secondary",
|
|
@@ -12452,15 +12526,15 @@ var DataCardTrend = ({
|
|
|
12452
12526
|
};
|
|
12453
12527
|
|
|
12454
12528
|
// src/components/DataCards/DataCardHoverArrow.tsx
|
|
12455
|
-
import
|
|
12456
|
-
import { jsx as
|
|
12457
|
-
var StyledIconContainer =
|
|
12529
|
+
import styled54 from "styled-components";
|
|
12530
|
+
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
12531
|
+
var StyledIconContainer = styled54.div`
|
|
12458
12532
|
display: flex;
|
|
12459
12533
|
align-items: center;
|
|
12460
12534
|
align-self: center;
|
|
12461
12535
|
height: 0;
|
|
12462
12536
|
`;
|
|
12463
|
-
var DataCardHoverArrow = () => /* @__PURE__ */
|
|
12537
|
+
var DataCardHoverArrow = () => /* @__PURE__ */ jsx257(StyledIconContainer, { children: /* @__PURE__ */ jsx257(
|
|
12464
12538
|
Icon,
|
|
12465
12539
|
{
|
|
12466
12540
|
"data-wui-data-card-hover-icon": true,
|
|
@@ -12470,22 +12544,22 @@ var DataCardHoverArrow = () => /* @__PURE__ */ jsx256(StyledIconContainer, { chi
|
|
|
12470
12544
|
DataCardHoverArrow.displayName = "DataCardHoverArrow_UI";
|
|
12471
12545
|
|
|
12472
12546
|
// src/components/Divider/Divider.tsx
|
|
12473
|
-
import
|
|
12474
|
-
import { jsx as
|
|
12475
|
-
var horizontalBorderCss =
|
|
12547
|
+
import styled55, { css as css30 } from "styled-components";
|
|
12548
|
+
import { jsx as jsx258 } from "react/jsx-runtime";
|
|
12549
|
+
var horizontalBorderCss = css30`
|
|
12476
12550
|
border-top-color: var(--wui-color-border);
|
|
12477
12551
|
border-top-style: solid;
|
|
12478
12552
|
border-top-width: 1px;
|
|
12479
12553
|
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
12480
12554
|
height: 0;
|
|
12481
12555
|
`;
|
|
12482
|
-
var verticalBorderCss =
|
|
12556
|
+
var verticalBorderCss = css30`
|
|
12483
12557
|
background-color: var(--wui-color-border);
|
|
12484
12558
|
max-width: 1px;
|
|
12485
12559
|
min-height: 100%;
|
|
12486
12560
|
width: 1px;
|
|
12487
12561
|
`;
|
|
12488
|
-
var DividerComponent =
|
|
12562
|
+
var DividerComponent = styled55.div`
|
|
12489
12563
|
${({ $orientation }) => {
|
|
12490
12564
|
switch ($orientation) {
|
|
12491
12565
|
case "vertical":
|
|
@@ -12497,7 +12571,7 @@ var DividerComponent = styled54.div`
|
|
|
12497
12571
|
}}
|
|
12498
12572
|
`;
|
|
12499
12573
|
var Divider = ({ orientation = "horizontal", ...props }) => {
|
|
12500
|
-
return /* @__PURE__ */
|
|
12574
|
+
return /* @__PURE__ */ jsx258(
|
|
12501
12575
|
DividerComponent,
|
|
12502
12576
|
{
|
|
12503
12577
|
$orientation: orientation,
|
|
@@ -12510,10 +12584,10 @@ var Divider = ({ orientation = "horizontal", ...props }) => {
|
|
|
12510
12584
|
Divider.displayName = "Divider_UI";
|
|
12511
12585
|
|
|
12512
12586
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
12513
|
-
import
|
|
12587
|
+
import styled56, { css as css31 } from "styled-components";
|
|
12514
12588
|
import { useState as useState16, useRef as useRef16 } from "react";
|
|
12515
|
-
import { Fragment as Fragment7, jsx as
|
|
12516
|
-
var StyledInput =
|
|
12589
|
+
import { Fragment as Fragment7, jsx as jsx259, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
12590
|
+
var StyledInput = styled56(Input)`
|
|
12517
12591
|
&:not([rows]) {
|
|
12518
12592
|
min-height: unset;
|
|
12519
12593
|
}
|
|
@@ -12533,7 +12607,7 @@ var StyledInput = styled55(Input)`
|
|
|
12533
12607
|
min-height: ${({ $height }) => `${$height}px`};
|
|
12534
12608
|
}
|
|
12535
12609
|
`;
|
|
12536
|
-
var editableStyles =
|
|
12610
|
+
var editableStyles = css31`
|
|
12537
12611
|
&:has(+ :focus-within) {
|
|
12538
12612
|
background: var(--wui-color-bg-surface-hover);
|
|
12539
12613
|
}
|
|
@@ -12543,7 +12617,7 @@ var editableStyles = css30`
|
|
|
12543
12617
|
cursor: pointer;
|
|
12544
12618
|
}
|
|
12545
12619
|
`;
|
|
12546
|
-
var StyledHeading2 =
|
|
12620
|
+
var StyledHeading2 = styled56(Heading)`
|
|
12547
12621
|
width: 100%;
|
|
12548
12622
|
border-radius: var(--wui-border-radius-02);
|
|
12549
12623
|
padding: var(--wui-space-02);
|
|
@@ -12598,7 +12672,7 @@ var EditableHeading = ({
|
|
|
12598
12672
|
handleSetEditing(false);
|
|
12599
12673
|
}
|
|
12600
12674
|
};
|
|
12601
|
-
const HeadingComponent2 = /* @__PURE__ */
|
|
12675
|
+
const HeadingComponent2 = /* @__PURE__ */ jsx259(
|
|
12602
12676
|
StyledHeading2,
|
|
12603
12677
|
{
|
|
12604
12678
|
ref: headingRef,
|
|
@@ -12612,7 +12686,7 @@ var EditableHeading = ({
|
|
|
12612
12686
|
return HeadingComponent2;
|
|
12613
12687
|
}
|
|
12614
12688
|
if (isEditing || __forceEditing) {
|
|
12615
|
-
return /* @__PURE__ */
|
|
12689
|
+
return /* @__PURE__ */ jsx259(
|
|
12616
12690
|
StyledInput,
|
|
12617
12691
|
{
|
|
12618
12692
|
$height: headingHeight,
|
|
@@ -12631,9 +12705,9 @@ var EditableHeading = ({
|
|
|
12631
12705
|
}
|
|
12632
12706
|
);
|
|
12633
12707
|
}
|
|
12634
|
-
return /* @__PURE__ */
|
|
12635
|
-
/* @__PURE__ */
|
|
12636
|
-
/* @__PURE__ */
|
|
12708
|
+
return /* @__PURE__ */ jsxs37(Fragment7, { children: [
|
|
12709
|
+
/* @__PURE__ */ jsx259(Tooltip, { content: tooltipText, children: HeadingComponent2 }),
|
|
12710
|
+
/* @__PURE__ */ jsx259(ScreenReaderOnly, { children: /* @__PURE__ */ jsx259(
|
|
12637
12711
|
"button",
|
|
12638
12712
|
{
|
|
12639
12713
|
"aria-label": ariaLabel,
|
|
@@ -12683,9 +12757,9 @@ var useFormState = (action, initialData = {}) => {
|
|
|
12683
12757
|
// src/components/Form/FormErrorSummary.tsx
|
|
12684
12758
|
import { useContext as useContext5, useRef as useRef17 } from "react";
|
|
12685
12759
|
import { isArray as isArray2, isNotUndefined as isNotUndefined9 } from "@wistia/type-guards";
|
|
12686
|
-
import { jsx as
|
|
12760
|
+
import { jsx as jsx260, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
12687
12761
|
var ErrorItem = ({ name, error, formId }) => {
|
|
12688
|
-
return /* @__PURE__ */
|
|
12762
|
+
return /* @__PURE__ */ jsx260("li", { children: /* @__PURE__ */ jsx260(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
12689
12763
|
};
|
|
12690
12764
|
var FormErrorSummary = ({ description }) => {
|
|
12691
12765
|
const ref = useRef17(null);
|
|
@@ -12694,10 +12768,10 @@ var FormErrorSummary = ({ description }) => {
|
|
|
12694
12768
|
if (isValid || !hasSubmitted) {
|
|
12695
12769
|
return null;
|
|
12696
12770
|
}
|
|
12697
|
-
return /* @__PURE__ */
|
|
12698
|
-
/* @__PURE__ */
|
|
12699
|
-
/* @__PURE__ */
|
|
12700
|
-
([name, error]) => isArray2(error) ? error.map((err) => /* @__PURE__ */
|
|
12771
|
+
return /* @__PURE__ */ jsxs38("div", { ref, children: [
|
|
12772
|
+
/* @__PURE__ */ jsx260("p", { children: description }),
|
|
12773
|
+
/* @__PURE__ */ jsx260("ul", { children: Object.entries(errors).filter(([, error]) => isNotUndefined9(error)).map(
|
|
12774
|
+
([name, error]) => isArray2(error) ? error.map((err) => /* @__PURE__ */ jsx260(
|
|
12701
12775
|
ErrorItem,
|
|
12702
12776
|
{
|
|
12703
12777
|
error: err,
|
|
@@ -12705,7 +12779,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
12705
12779
|
name
|
|
12706
12780
|
},
|
|
12707
12781
|
err
|
|
12708
|
-
)) : /* @__PURE__ */
|
|
12782
|
+
)) : /* @__PURE__ */ jsx260(
|
|
12709
12783
|
ErrorItem,
|
|
12710
12784
|
{
|
|
12711
12785
|
error: error ?? "",
|
|
@@ -12722,69 +12796,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
12722
12796
|
import { Children as Children6, cloneElement as cloneElement5, useContext as useContext6 } from "react";
|
|
12723
12797
|
import styled57 from "styled-components";
|
|
12724
12798
|
import { isArray as isArray3, isNotNil as isNotNil21, isNotUndefined as isNotUndefined10, isUndefined as isUndefined4 } from "@wistia/type-guards";
|
|
12725
|
-
|
|
12726
|
-
// src/components/Label/Label.tsx
|
|
12727
|
-
import styled56, { css as css31 } from "styled-components";
|
|
12728
|
-
import { jsx as jsx260 } from "react/jsx-runtime";
|
|
12729
|
-
var requiredStyle = css31`
|
|
12730
|
-
&::after {
|
|
12731
|
-
color: var(--wui-color-text-error);
|
|
12732
|
-
display: inline;
|
|
12733
|
-
padding-left: var(--wui-space-01);
|
|
12734
|
-
content: '*';
|
|
12735
|
-
}
|
|
12736
|
-
`;
|
|
12737
|
-
var disabledStyle3 = css31`
|
|
12738
|
-
color: var(--wui-color-text-disabled);
|
|
12739
|
-
`;
|
|
12740
|
-
var StyledLabel3 = styled56.label`
|
|
12741
|
-
display: block;
|
|
12742
|
-
width: 100%;
|
|
12743
|
-
color: var(--wui-color-text);
|
|
12744
|
-
font-family: var(--wui-typography-heading-6-family);
|
|
12745
|
-
line-height: var(--wui-typography-heading-6-line-height);
|
|
12746
|
-
font-size: var(--wui-typography-heading-6-size);
|
|
12747
|
-
font-weight: var(--wui-typography-heading-6-weight);
|
|
12748
|
-
|
|
12749
|
-
/* if label is wrapping an input this ensures it appears beneath the label with a nice margin */
|
|
12750
|
-
> input,
|
|
12751
|
-
> textarea,
|
|
12752
|
-
> select {
|
|
12753
|
-
display: block;
|
|
12754
|
-
}
|
|
12755
|
-
|
|
12756
|
-
> label {
|
|
12757
|
-
font-weight: normal;
|
|
12758
|
-
}
|
|
12759
|
-
|
|
12760
|
-
${({ $screenReaderOnly }) => $screenReaderOnly && visuallyHiddenStyle}
|
|
12761
|
-
${({ $disabled }) => $disabled && disabledStyle3}
|
|
12762
|
-
${({ $required }) => $required && requiredStyle}
|
|
12763
|
-
`;
|
|
12764
|
-
var Label = ({
|
|
12765
|
-
children,
|
|
12766
|
-
disabled = false,
|
|
12767
|
-
htmlFor,
|
|
12768
|
-
required = false,
|
|
12769
|
-
screenReaderOnly = false,
|
|
12770
|
-
...props
|
|
12771
|
-
}) => {
|
|
12772
|
-
return /* @__PURE__ */ jsx260(
|
|
12773
|
-
StyledLabel3,
|
|
12774
|
-
{
|
|
12775
|
-
...props,
|
|
12776
|
-
$disabled: disabled,
|
|
12777
|
-
$required: required,
|
|
12778
|
-
$screenReaderOnly: screenReaderOnly,
|
|
12779
|
-
htmlFor,
|
|
12780
|
-
children
|
|
12781
|
-
}
|
|
12782
|
-
);
|
|
12783
|
-
};
|
|
12784
|
-
Label.displayName = "Label_UI";
|
|
12785
|
-
|
|
12786
|
-
// src/components/FormField/FormField.tsx
|
|
12787
|
-
import { Fragment as Fragment8, jsx as jsx261, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
12799
|
+
import { Fragment as Fragment8, jsx as jsx261, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
12788
12800
|
var StyledFormField = styled57.div`
|
|
12789
12801
|
--form-field-spacing: var(--wui-space-01);
|
|
12790
12802
|
--form-field-spacing-inline: var(--wui-space-02);
|
|
@@ -12916,7 +12928,7 @@ var FormField = ({
|
|
|
12916
12928
|
};
|
|
12917
12929
|
}
|
|
12918
12930
|
Children6.only(children);
|
|
12919
|
-
return /* @__PURE__ */
|
|
12931
|
+
return /* @__PURE__ */ jsxs39(
|
|
12920
12932
|
StyledFormField,
|
|
12921
12933
|
{
|
|
12922
12934
|
...props,
|
|
@@ -12925,7 +12937,7 @@ var FormField = ({
|
|
|
12925
12937
|
!isIntegratedLabel && /* @__PURE__ */ jsx261(Label, { htmlFor: computedId, children: label }),
|
|
12926
12938
|
isNotNil21(description) ? /* @__PURE__ */ jsx261(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
|
|
12927
12939
|
cloneElement5(children, childProps),
|
|
12928
|
-
isNotNil21(computedError) ? /* @__PURE__ */
|
|
12940
|
+
isNotNil21(computedError) ? /* @__PURE__ */ jsxs39(Fragment8, { children: [
|
|
12929
12941
|
/* @__PURE__ */ jsx261("div", {}),
|
|
12930
12942
|
/* @__PURE__ */ jsx261(
|
|
12931
12943
|
ErrorMessages,
|
|
@@ -13110,7 +13122,7 @@ InputClickToCopy.displayName = "InputClickToCopy_UI";
|
|
|
13110
13122
|
// src/components/KeyboardShortcut/KeyboardShortcut.tsx
|
|
13111
13123
|
import styled60 from "styled-components";
|
|
13112
13124
|
import { isNotNil as isNotNil22 } from "@wistia/type-guards";
|
|
13113
|
-
import { jsx as jsx265, jsxs as
|
|
13125
|
+
import { jsx as jsx265, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
13114
13126
|
var StyledKeyboardShortcut = styled60.div`
|
|
13115
13127
|
align-items: center;
|
|
13116
13128
|
display: flex;
|
|
@@ -13197,7 +13209,7 @@ var KeyboardShortcut = ({
|
|
|
13197
13209
|
keyboardKeys,
|
|
13198
13210
|
fullWidth = false,
|
|
13199
13211
|
...otherProps
|
|
13200
|
-
}) => /* @__PURE__ */
|
|
13212
|
+
}) => /* @__PURE__ */ jsxs40(
|
|
13201
13213
|
StyledKeyboardShortcut,
|
|
13202
13214
|
{
|
|
13203
13215
|
$fullWidth: fullWidth,
|
|
@@ -13236,7 +13248,7 @@ var ListItem = ({ children }) => {
|
|
|
13236
13248
|
ListItem.displayName = "ListItem_UI";
|
|
13237
13249
|
|
|
13238
13250
|
// src/components/List/List.tsx
|
|
13239
|
-
import { jsx as jsx267, jsxs as
|
|
13251
|
+
import { jsx as jsx267, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
13240
13252
|
var spacesStyle = css33`
|
|
13241
13253
|
overflow: hidden;
|
|
13242
13254
|
padding-left: 0;
|
|
@@ -13339,7 +13351,7 @@ var renderListFromArray = (listItems, variant, otherProps) => {
|
|
|
13339
13351
|
const nextItem = listItems[i + 1];
|
|
13340
13352
|
const key = `item-${itemCount += 1}`;
|
|
13341
13353
|
if (Array.isArray(nextItem)) {
|
|
13342
|
-
return /* @__PURE__ */
|
|
13354
|
+
return /* @__PURE__ */ jsxs41(ListItem, { children: [
|
|
13343
13355
|
item,
|
|
13344
13356
|
renderListFromArray(nextItem, variant, otherProps)
|
|
13345
13357
|
] }, key);
|
|
@@ -13391,7 +13403,7 @@ var MenuContext = createContext7({ compact: false });
|
|
|
13391
13403
|
var useMenuContext = () => useContext8(MenuContext);
|
|
13392
13404
|
|
|
13393
13405
|
// src/components/Menu/Menu.tsx
|
|
13394
|
-
import { jsx as jsx268, jsxs as
|
|
13406
|
+
import { jsx as jsx268, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
13395
13407
|
var open = keyframes3`
|
|
13396
13408
|
from {
|
|
13397
13409
|
opacity: 0;
|
|
@@ -13504,7 +13516,7 @@ var Menu = forwardRef19(
|
|
|
13504
13516
|
onOpenChange: () => null
|
|
13505
13517
|
};
|
|
13506
13518
|
}
|
|
13507
|
-
return /* @__PURE__ */ jsx268(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */
|
|
13519
|
+
return /* @__PURE__ */ jsx268(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs42(
|
|
13508
13520
|
DropdownMenu,
|
|
13509
13521
|
{
|
|
13510
13522
|
modal: false,
|
|
@@ -13589,7 +13601,7 @@ import { isNotNil as isNotNil26 } from "@wistia/type-guards";
|
|
|
13589
13601
|
import { forwardRef as forwardRef20 } from "react";
|
|
13590
13602
|
import styled65 from "styled-components";
|
|
13591
13603
|
import { isNotNil as isNotNil25, isNotUndefined as isNotUndefined12 } from "@wistia/type-guards";
|
|
13592
|
-
import { jsx as jsx270, jsxs as
|
|
13604
|
+
import { jsx as jsx270, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
13593
13605
|
var StyledButton3 = styled65(Button)`
|
|
13594
13606
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
13595
13607
|
|
|
@@ -13684,7 +13696,7 @@ var MenuItemButton = forwardRef20(({ children, appearance, command, icon, ...pro
|
|
|
13684
13696
|
}
|
|
13685
13697
|
);
|
|
13686
13698
|
}
|
|
13687
|
-
return /* @__PURE__ */
|
|
13699
|
+
return /* @__PURE__ */ jsxs43(
|
|
13688
13700
|
StyledButton3,
|
|
13689
13701
|
{
|
|
13690
13702
|
...props,
|
|
@@ -13724,7 +13736,7 @@ var MenuItemDescription = ({ children }) => {
|
|
|
13724
13736
|
};
|
|
13725
13737
|
|
|
13726
13738
|
// src/components/Menu/SubMenu.tsx
|
|
13727
|
-
import { jsx as jsx272, jsxs as
|
|
13739
|
+
import { jsx as jsx272, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
13728
13740
|
var SubMenuContent = styled67(DropdownMenuSubContent)`
|
|
13729
13741
|
${menuContentCss}
|
|
13730
13742
|
|
|
@@ -13765,14 +13777,14 @@ var SubMenu = ({
|
|
|
13765
13777
|
const { isSmAndUp } = useMq();
|
|
13766
13778
|
const [isExpanded, setIsExpanded] = useState19(false);
|
|
13767
13779
|
const { compact } = useMenuContext();
|
|
13768
|
-
return isSmAndUp ? /* @__PURE__ */
|
|
13769
|
-
/* @__PURE__ */
|
|
13780
|
+
return isSmAndUp ? /* @__PURE__ */ jsxs44(DropdownMenuSub, { onOpenChange, children: [
|
|
13781
|
+
/* @__PURE__ */ jsxs44(SubMenuTrigger, { ...props, children: [
|
|
13770
13782
|
/* @__PURE__ */ jsx272(MenuItemLabel, { children: label }),
|
|
13771
13783
|
isNotNil26(description) ? /* @__PURE__ */ jsx272(MenuItemDescription, { children: description }) : null
|
|
13772
13784
|
] }),
|
|
13773
13785
|
/* @__PURE__ */ jsx272(DropdownMenuPortal2, { children: /* @__PURE__ */ jsx272(SubMenuContent, { $compact: compact, children }) })
|
|
13774
|
-
] }) : /* @__PURE__ */
|
|
13775
|
-
/* @__PURE__ */
|
|
13786
|
+
] }) : /* @__PURE__ */ jsxs44(DropdownMenuGroup, { children: [
|
|
13787
|
+
/* @__PURE__ */ jsxs44(
|
|
13776
13788
|
SubMenuTrigger,
|
|
13777
13789
|
{
|
|
13778
13790
|
...props,
|
|
@@ -13869,9 +13881,9 @@ import {
|
|
|
13869
13881
|
DropdownMenuItemIndicator as DropdownMenuItemIndicator2
|
|
13870
13882
|
} from "@radix-ui/react-dropdown-menu";
|
|
13871
13883
|
import { isNotNil as isNotNil27 } from "@wistia/type-guards";
|
|
13872
|
-
import { jsx as jsx276, jsxs as
|
|
13884
|
+
import { jsx as jsx276, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
13873
13885
|
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
13874
|
-
return checked ? /* @__PURE__ */
|
|
13886
|
+
return checked ? /* @__PURE__ */ jsxs45(
|
|
13875
13887
|
"svg",
|
|
13876
13888
|
{
|
|
13877
13889
|
...props,
|
|
@@ -13897,7 +13909,7 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
13897
13909
|
)
|
|
13898
13910
|
]
|
|
13899
13911
|
}
|
|
13900
|
-
) : /* @__PURE__ */
|
|
13912
|
+
) : /* @__PURE__ */ jsxs45(
|
|
13901
13913
|
"svg",
|
|
13902
13914
|
{
|
|
13903
13915
|
...props,
|
|
@@ -13954,11 +13966,11 @@ CheckboxMenuItem.displayName = "CheckboxMenuItem_UI";
|
|
|
13954
13966
|
// src/components/Menu/FilterMenu.tsx
|
|
13955
13967
|
import { Children as Children7, forwardRef as forwardRef22 } from "react";
|
|
13956
13968
|
import { DropdownMenuItem as DropdownMenuItem3 } from "@radix-ui/react-dropdown-menu";
|
|
13957
|
-
import { jsx as jsx277, jsxs as
|
|
13969
|
+
import { jsx as jsx277, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
13958
13970
|
var FilterMenuItem = CheckboxMenuItem;
|
|
13959
13971
|
var FilterMenu = forwardRef22(
|
|
13960
13972
|
({ value, onChange, searchValue, onSearchValueChange, children, ...props }, ref) => {
|
|
13961
|
-
return /* @__PURE__ */
|
|
13973
|
+
return /* @__PURE__ */ jsxs46(
|
|
13962
13974
|
Menu,
|
|
13963
13975
|
{
|
|
13964
13976
|
...props,
|
|
@@ -14083,7 +14095,7 @@ var ModalCloseButton = () => {
|
|
|
14083
14095
|
};
|
|
14084
14096
|
|
|
14085
14097
|
// src/components/Modal/ModalHeader.tsx
|
|
14086
|
-
import { jsx as jsx279, jsxs as
|
|
14098
|
+
import { jsx as jsx279, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
14087
14099
|
var Header = styled69.header`
|
|
14088
14100
|
display: flex;
|
|
14089
14101
|
order: 1;
|
|
@@ -14107,7 +14119,7 @@ var ModalHeader = ({
|
|
|
14107
14119
|
hideCloseButton
|
|
14108
14120
|
}) => {
|
|
14109
14121
|
const TitleComponent = hideTitle ? /* @__PURE__ */ jsx279(ScreenReaderOnly, { children: /* @__PURE__ */ jsx279(Title, { children: title }) }) : /* @__PURE__ */ jsx279(Title, { children: title });
|
|
14110
|
-
return /* @__PURE__ */
|
|
14122
|
+
return /* @__PURE__ */ jsxs47(Header, { $hideTitle: hideTitle, children: [
|
|
14111
14123
|
TitleComponent,
|
|
14112
14124
|
hideCloseButton ? null : /* @__PURE__ */ jsx279(ModalCloseButton, {})
|
|
14113
14125
|
] });
|
|
@@ -14315,7 +14327,7 @@ var ModalOverlay = styled71(DialogOverlay)`
|
|
|
14315
14327
|
`;
|
|
14316
14328
|
|
|
14317
14329
|
// src/components/Modal/Modal.tsx
|
|
14318
|
-
import { jsx as jsx281, jsxs as
|
|
14330
|
+
import { jsx as jsx281, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
14319
14331
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
14320
14332
|
var ModalBody = styled72.div`
|
|
14321
14333
|
flex-direction: column;
|
|
@@ -14345,9 +14357,9 @@ var Modal = forwardRef24(
|
|
|
14345
14357
|
}
|
|
14346
14358
|
},
|
|
14347
14359
|
open: isOpen,
|
|
14348
|
-
children: /* @__PURE__ */
|
|
14360
|
+
children: /* @__PURE__ */ jsxs48(DialogPortal, { children: [
|
|
14349
14361
|
/* @__PURE__ */ jsx281(ModalOverlay, {}),
|
|
14350
|
-
/* @__PURE__ */
|
|
14362
|
+
/* @__PURE__ */ jsxs48(
|
|
14351
14363
|
ModalContent,
|
|
14352
14364
|
{
|
|
14353
14365
|
ref,
|
|
@@ -14395,7 +14407,7 @@ var getControlProps = (isOpen, onOpenChange) => {
|
|
|
14395
14407
|
// src/components/Popover/PopoverArrow.tsx
|
|
14396
14408
|
import { PopoverArrow as RadixPopoverArrow } from "@radix-ui/react-popover";
|
|
14397
14409
|
import styled73, { css as css36, keyframes as keyframes6 } from "styled-components";
|
|
14398
|
-
import { jsx as jsx282, jsxs as
|
|
14410
|
+
import { jsx as jsx282, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
14399
14411
|
var StyledPath = styled73.path`
|
|
14400
14412
|
fill: var(--wui-color-border-secondary);
|
|
14401
14413
|
`;
|
|
@@ -14434,7 +14446,7 @@ var StyledCircle = styled73.circle`
|
|
|
14434
14446
|
}
|
|
14435
14447
|
`;
|
|
14436
14448
|
var PopoverArrow = ({ isAnimated }) => {
|
|
14437
|
-
return /* @__PURE__ */ jsx282(RadixPopoverArrow, { asChild: true, children: /* @__PURE__ */
|
|
14449
|
+
return /* @__PURE__ */ jsx282(RadixPopoverArrow, { asChild: true, children: /* @__PURE__ */ jsxs49(
|
|
14438
14450
|
"svg",
|
|
14439
14451
|
{
|
|
14440
14452
|
fill: "none",
|
|
@@ -14473,7 +14485,7 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
14473
14485
|
PopoverArrow.displayName = "PopoverArrow_UI";
|
|
14474
14486
|
|
|
14475
14487
|
// src/components/Popover/Popover.tsx
|
|
14476
|
-
import { jsx as jsx283, jsxs as
|
|
14488
|
+
import { jsx as jsx283, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
14477
14489
|
var StyledContent2 = styled74(Content2)`
|
|
14478
14490
|
z-index: var(--wui-zindex-popover);
|
|
14479
14491
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
@@ -14513,9 +14525,9 @@ var Popover2 = ({
|
|
|
14513
14525
|
"--wui-popover-max-width": maxWidth,
|
|
14514
14526
|
"--wui-popover-max-height": maxHeight
|
|
14515
14527
|
};
|
|
14516
|
-
return /* @__PURE__ */
|
|
14528
|
+
return /* @__PURE__ */ jsxs50(Root2, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
14517
14529
|
/* @__PURE__ */ jsx283(Trigger2, { asChild: true, children: trigger }),
|
|
14518
|
-
/* @__PURE__ */ jsx283(Portal, { children: /* @__PURE__ */
|
|
14530
|
+
/* @__PURE__ */ jsx283(Portal, { children: /* @__PURE__ */ jsxs50(
|
|
14519
14531
|
StyledContent2,
|
|
14520
14532
|
{
|
|
14521
14533
|
$colorScheme: colorScheme,
|
|
@@ -14546,7 +14558,7 @@ Popover2.displayName = "Popover_UI";
|
|
|
14546
14558
|
import styled75 from "styled-components";
|
|
14547
14559
|
import { Root as ProgressRoot, Indicator as ProgressIndicator } from "@radix-ui/react-progress";
|
|
14548
14560
|
import { isNotNil as isNotNil31 } from "@wistia/type-guards";
|
|
14549
|
-
import { jsx as jsx284, jsxs as
|
|
14561
|
+
import { jsx as jsx284, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
14550
14562
|
var ProgressBarWrapper = styled75.div`
|
|
14551
14563
|
--progress-bar-height: 8px;
|
|
14552
14564
|
--progress-bar-indicator-color: var(--wui-color-bg-fill);
|
|
@@ -14599,7 +14611,7 @@ var ProgressBar = ({
|
|
|
14599
14611
|
labelRight,
|
|
14600
14612
|
...props
|
|
14601
14613
|
}) => {
|
|
14602
|
-
return /* @__PURE__ */
|
|
14614
|
+
return /* @__PURE__ */ jsxs51(ProgressBarWrapper, { children: [
|
|
14603
14615
|
isNotNil31(labelLeft) ? /* @__PURE__ */ jsx284(ProgressBarLabel, { children: labelLeft }) : null,
|
|
14604
14616
|
/* @__PURE__ */ jsx284(
|
|
14605
14617
|
StyledProgressBar,
|
|
@@ -14625,7 +14637,7 @@ ProgressBar.displayName = "ProgressBar_UI";
|
|
|
14625
14637
|
import { forwardRef as forwardRef25, useId as useId4 } from "react";
|
|
14626
14638
|
import styled76, { css as css38 } from "styled-components";
|
|
14627
14639
|
import { isNonEmptyString as isNonEmptyString6, isNotUndefined as isNotUndefined13 } from "@wistia/type-guards";
|
|
14628
|
-
import { jsx as jsx285, jsxs as
|
|
14640
|
+
import { jsx as jsx285, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
14629
14641
|
var RadioIcon = () => /* @__PURE__ */ jsx285(
|
|
14630
14642
|
"svg",
|
|
14631
14643
|
{
|
|
@@ -14749,7 +14761,7 @@ var Radio = forwardRef25(
|
|
|
14749
14761
|
const radioName = name ?? contextName;
|
|
14750
14762
|
const handleOnChange = onChange ?? contextOnChange;
|
|
14751
14763
|
const defaultChecked = isNotUndefined13(value) && isNotUndefined13(contextValue) ? contextValue.includes(value) : void 0;
|
|
14752
|
-
return /* @__PURE__ */
|
|
14764
|
+
return /* @__PURE__ */ jsxs52(
|
|
14753
14765
|
StyledRadioWrapper,
|
|
14754
14766
|
{
|
|
14755
14767
|
$disabled: disabled,
|
|
@@ -14803,7 +14815,7 @@ import { forwardRef as forwardRef27 } from "react";
|
|
|
14803
14815
|
import { forwardRef as forwardRef26, useId as useId5 } from "react";
|
|
14804
14816
|
import styled77, { css as css39 } from "styled-components";
|
|
14805
14817
|
import { isNonEmptyString as isNonEmptyString7, isNotUndefined as isNotUndefined14 } from "@wistia/type-guards";
|
|
14806
|
-
import { jsx as jsx286, jsxs as
|
|
14818
|
+
import { jsx as jsx286, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
14807
14819
|
var checkedStyles = css39`
|
|
14808
14820
|
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
14809
14821
|
--wui-color-icon: var(--wui-color-icon-selected);
|
|
@@ -14931,7 +14943,7 @@ var RadioCardRoot = forwardRef26(
|
|
|
14931
14943
|
const radioName = name ?? contextName;
|
|
14932
14944
|
const handleOnChange = onChange ?? contextOnChange;
|
|
14933
14945
|
const defaultChecked = isNotUndefined14(value) && isNotUndefined14(contextValue) ? contextValue.includes(value) : void 0;
|
|
14934
|
-
return /* @__PURE__ */
|
|
14946
|
+
return /* @__PURE__ */ jsxs53(
|
|
14935
14947
|
StyledCard2,
|
|
14936
14948
|
{
|
|
14937
14949
|
$aspectRatio: aspectRatio,
|
|
@@ -15015,7 +15027,7 @@ var RadioCardIndicator = styled78.div`
|
|
|
15015
15027
|
RadioCardIndicator.displayName = "RadioCardIndicator_UI";
|
|
15016
15028
|
|
|
15017
15029
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
15018
|
-
import { jsx as jsx287, jsxs as
|
|
15030
|
+
import { jsx as jsx287, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
15019
15031
|
var StyledCardContent = styled79.div`
|
|
15020
15032
|
display: grid;
|
|
15021
15033
|
grid-auto-flow: column;
|
|
@@ -15035,11 +15047,11 @@ var RadioCardDefaultLayout = ({
|
|
|
15035
15047
|
description,
|
|
15036
15048
|
showIndicator = true
|
|
15037
15049
|
}) => {
|
|
15038
|
-
return /* @__PURE__ */
|
|
15050
|
+
return /* @__PURE__ */ jsxs54(StyledCardContent, { children: [
|
|
15039
15051
|
showIndicator ? /* @__PURE__ */ jsx287(StyledIndicatorContainer, { $hasIcon: isNotNil32(icon), children: /* @__PURE__ */ jsx287(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
|
|
15040
|
-
/* @__PURE__ */
|
|
15052
|
+
/* @__PURE__ */ jsxs54(Stack, { gap: "space-02", children: [
|
|
15041
15053
|
isNotNil32(icon) && /* @__PURE__ */ jsx287(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
|
|
15042
|
-
/* @__PURE__ */
|
|
15054
|
+
/* @__PURE__ */ jsxs54(
|
|
15043
15055
|
Stack,
|
|
15044
15056
|
{
|
|
15045
15057
|
gap: "space-01",
|
|
@@ -15202,7 +15214,7 @@ var SelectedItemIndicator = () => {
|
|
|
15202
15214
|
};
|
|
15203
15215
|
|
|
15204
15216
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
15205
|
-
import { jsx as jsx292, jsxs as
|
|
15217
|
+
import { jsx as jsx292, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
15206
15218
|
var segmentedControlStyles = css41`
|
|
15207
15219
|
display: inline-flex;
|
|
15208
15220
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -15241,7 +15253,7 @@ var SegmentedControl = forwardRef29(
|
|
|
15241
15253
|
type: "single",
|
|
15242
15254
|
value: selectedValue,
|
|
15243
15255
|
...props,
|
|
15244
|
-
children: /* @__PURE__ */ jsx292(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */
|
|
15256
|
+
children: /* @__PURE__ */ jsx292(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ jsxs55(SelectedItemStyleProvider, { children: [
|
|
15245
15257
|
children,
|
|
15246
15258
|
/* @__PURE__ */ jsx292(SelectedItemIndicator, {})
|
|
15247
15259
|
] }) })
|
|
@@ -15256,7 +15268,7 @@ import { forwardRef as forwardRef30, useEffect as useEffect18, useRef as useRef1
|
|
|
15256
15268
|
import styled82, { css as css42 } from "styled-components";
|
|
15257
15269
|
import { Item as ToggleGroupItem2 } from "@radix-ui/react-toggle-group";
|
|
15258
15270
|
import { isNotNil as isNotNil33 } from "@wistia/type-guards";
|
|
15259
|
-
import { jsxs as
|
|
15271
|
+
import { jsxs as jsxs56 } from "react/jsx-runtime";
|
|
15260
15272
|
var segmentedControlItemStyles = css42`
|
|
15261
15273
|
all: unset; /* ToggleGroupItem is a button element */
|
|
15262
15274
|
align-items: center;
|
|
@@ -15365,7 +15377,7 @@ var SegmentedControlItem = forwardRef30(
|
|
|
15365
15377
|
resizeObserver.disconnect();
|
|
15366
15378
|
};
|
|
15367
15379
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
15368
|
-
return /* @__PURE__ */
|
|
15380
|
+
return /* @__PURE__ */ jsxs56(
|
|
15369
15381
|
StyledSegmentedControlItem,
|
|
15370
15382
|
{
|
|
15371
15383
|
ref: combinedRef,
|
|
@@ -15398,7 +15410,7 @@ import {
|
|
|
15398
15410
|
} from "@radix-ui/react-select";
|
|
15399
15411
|
import { forwardRef as forwardRef31 } from "react";
|
|
15400
15412
|
import styled83 from "styled-components";
|
|
15401
|
-
import { jsx as jsx293, jsxs as
|
|
15413
|
+
import { jsx as jsx293, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
15402
15414
|
var StyledTrigger2 = styled83(Trigger3)`
|
|
15403
15415
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
15404
15416
|
${inputCss};
|
|
@@ -15471,13 +15483,13 @@ var Select = forwardRef31(
|
|
|
15471
15483
|
...props
|
|
15472
15484
|
}, forwardedRef) => {
|
|
15473
15485
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
15474
|
-
return /* @__PURE__ */
|
|
15486
|
+
return /* @__PURE__ */ jsxs57(
|
|
15475
15487
|
Root3,
|
|
15476
15488
|
{
|
|
15477
15489
|
...props,
|
|
15478
15490
|
onValueChange: onChange,
|
|
15479
15491
|
children: [
|
|
15480
|
-
/* @__PURE__ */
|
|
15492
|
+
/* @__PURE__ */ jsxs57(
|
|
15481
15493
|
StyledTrigger2,
|
|
15482
15494
|
{
|
|
15483
15495
|
ref: forwardedRef,
|
|
@@ -15496,7 +15508,7 @@ var Select = forwardRef31(
|
|
|
15496
15508
|
]
|
|
15497
15509
|
}
|
|
15498
15510
|
),
|
|
15499
|
-
/* @__PURE__ */ jsx293(Portal2, { children: /* @__PURE__ */
|
|
15511
|
+
/* @__PURE__ */ jsx293(Portal2, { children: /* @__PURE__ */ jsxs57(StyledContent3, { position: "popper", children: [
|
|
15500
15512
|
/* @__PURE__ */ jsx293(ScrollUpButton, { children: /* @__PURE__ */ jsx293(Icon, { type: "caret-up" }) }),
|
|
15501
15513
|
/* @__PURE__ */ jsx293(Viewport, { children }),
|
|
15502
15514
|
/* @__PURE__ */ jsx293(ScrollDownButton, { children: /* @__PURE__ */ jsx293(Icon, { type: "caret-down" }) })
|
|
@@ -15513,7 +15525,7 @@ import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
|
15513
15525
|
import { forwardRef as forwardRef32 } from "react";
|
|
15514
15526
|
import styled84 from "styled-components";
|
|
15515
15527
|
import { isNotNil as isNotNil34 } from "@wistia/type-guards";
|
|
15516
|
-
import { jsx as jsx294, jsxs as
|
|
15528
|
+
import { jsx as jsx294, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
15517
15529
|
var StyledItem = styled84(Item)`
|
|
15518
15530
|
${variantStyleMap2.body3};
|
|
15519
15531
|
display: flex;
|
|
@@ -15543,7 +15555,7 @@ var StyledIconContainer2 = styled84.span`
|
|
|
15543
15555
|
`;
|
|
15544
15556
|
var SelectOption = forwardRef32(
|
|
15545
15557
|
({ children, selectedDisplayValue, ...props }, forwardedRef) => {
|
|
15546
|
-
return /* @__PURE__ */
|
|
15558
|
+
return /* @__PURE__ */ jsxs58(
|
|
15547
15559
|
StyledItem,
|
|
15548
15560
|
{
|
|
15549
15561
|
...props,
|
|
@@ -15556,7 +15568,7 @@ var SelectOption = forwardRef32(
|
|
|
15556
15568
|
type: "checkmark"
|
|
15557
15569
|
}
|
|
15558
15570
|
) }) }),
|
|
15559
|
-
isNotNil34(selectedDisplayValue) ? /* @__PURE__ */
|
|
15571
|
+
isNotNil34(selectedDisplayValue) ? /* @__PURE__ */ jsxs58("div", { children: [
|
|
15560
15572
|
children,
|
|
15561
15573
|
/* @__PURE__ */ jsx294("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx294(ItemText, { children: selectedDisplayValue }) })
|
|
15562
15574
|
] }) : /* @__PURE__ */ jsx294(ItemText, { children })
|
|
@@ -15570,12 +15582,12 @@ SelectOption.displayName = "SelectOption_UI";
|
|
|
15570
15582
|
// src/components/Select/SelectOptionGroup.tsx
|
|
15571
15583
|
import { Group, Label as Label3 } from "@radix-ui/react-select";
|
|
15572
15584
|
import styled85 from "styled-components";
|
|
15573
|
-
import { jsx as jsx295, jsxs as
|
|
15585
|
+
import { jsx as jsx295, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
15574
15586
|
var StyledLabel4 = styled85(Label3)`
|
|
15575
15587
|
padding: var(--wui-select-option-padding);
|
|
15576
15588
|
`;
|
|
15577
15589
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
15578
|
-
return /* @__PURE__ */
|
|
15590
|
+
return /* @__PURE__ */ jsxs59(Group, { ...props, children: [
|
|
15579
15591
|
/* @__PURE__ */ jsx295(StyledLabel4, { children: /* @__PURE__ */ jsx295(
|
|
15580
15592
|
Text,
|
|
15581
15593
|
{
|
|
@@ -15597,7 +15609,7 @@ import {
|
|
|
15597
15609
|
} from "@radix-ui/react-slider";
|
|
15598
15610
|
import styled86 from "styled-components";
|
|
15599
15611
|
import { isNonEmptyString as isNonEmptyString8 } from "@wistia/type-guards";
|
|
15600
|
-
import { jsx as jsx296, jsxs as
|
|
15612
|
+
import { jsx as jsx296, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
15601
15613
|
var SliderContainer = styled86.div`
|
|
15602
15614
|
--wui-slider-track-color: var(--wui-gray-6);
|
|
15603
15615
|
--wui-slider-track-border-radius: var(--wui-border-radius-rounded);
|
|
@@ -15691,7 +15703,7 @@ var Slider = ({
|
|
|
15691
15703
|
{
|
|
15692
15704
|
...otherProps,
|
|
15693
15705
|
"data-testid": dataTestId,
|
|
15694
|
-
children: /* @__PURE__ */
|
|
15706
|
+
children: /* @__PURE__ */ jsxs60(
|
|
15695
15707
|
StyledSliderRoot,
|
|
15696
15708
|
{
|
|
15697
15709
|
"aria-label": ariaLabel,
|
|
@@ -15922,12 +15934,12 @@ var SelectedTabIndicator = () => {
|
|
|
15922
15934
|
};
|
|
15923
15935
|
|
|
15924
15936
|
// src/components/Tabs/TabsList.tsx
|
|
15925
|
-
import { jsx as jsx306, jsxs as
|
|
15937
|
+
import { jsx as jsx306, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
15926
15938
|
var StyledRadixTabsList = styled94(RadixTabList)`
|
|
15927
15939
|
${segmentedControlStyles}
|
|
15928
15940
|
`;
|
|
15929
15941
|
var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
15930
|
-
return /* @__PURE__ */
|
|
15942
|
+
return /* @__PURE__ */ jsxs61(
|
|
15931
15943
|
StyledRadixTabsList,
|
|
15932
15944
|
{
|
|
15933
15945
|
$fullWidth: fullWidth,
|
|
@@ -15957,7 +15969,7 @@ var StyledRadixTabsTrigger = styled95(RadixTabsTrigger)`
|
|
|
15957
15969
|
`;
|
|
15958
15970
|
|
|
15959
15971
|
// src/components/Tabs/TabsTrigger.tsx
|
|
15960
|
-
import { jsxs as
|
|
15972
|
+
import { jsxs as jsxs62 } from "react/jsx-runtime";
|
|
15961
15973
|
var TabsTrigger = forwardRef33(
|
|
15962
15974
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
15963
15975
|
const selectedValue = useTabsValue();
|
|
@@ -15989,7 +16001,7 @@ var TabsTrigger = forwardRef33(
|
|
|
15989
16001
|
resizeObserver.disconnect();
|
|
15990
16002
|
};
|
|
15991
16003
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
15992
|
-
return /* @__PURE__ */
|
|
16004
|
+
return /* @__PURE__ */ jsxs62(
|
|
15993
16005
|
StyledRadixTabsTrigger,
|
|
15994
16006
|
{
|
|
15995
16007
|
...otherProps,
|
|
@@ -16011,7 +16023,7 @@ TabsTrigger.displayName = "TabsTrigger_UI";
|
|
|
16011
16023
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
16012
16024
|
import styled96 from "styled-components";
|
|
16013
16025
|
import { isNotNil as isNotNil37 } from "@wistia/type-guards";
|
|
16014
|
-
import { jsx as jsx307, jsxs as
|
|
16026
|
+
import { jsx as jsx307, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
16015
16027
|
var StyledThumbnailBadge = styled96.div`
|
|
16016
16028
|
align-items: center;
|
|
16017
16029
|
background-color: rgb(0 0 0 / 50%);
|
|
@@ -16037,7 +16049,7 @@ var StyledThumbnailBadge = styled96.div`
|
|
|
16037
16049
|
}
|
|
16038
16050
|
`;
|
|
16039
16051
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
16040
|
-
return /* @__PURE__ */
|
|
16052
|
+
return /* @__PURE__ */ jsxs63(StyledThumbnailBadge, { ...props, children: [
|
|
16041
16053
|
isNotNil37(icon) && icon,
|
|
16042
16054
|
/* @__PURE__ */ jsx307("span", { children: label })
|
|
16043
16055
|
] });
|
|
@@ -16184,7 +16196,7 @@ var getBackgroundGradient = (gradientName = void 0) => {
|
|
|
16184
16196
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
16185
16197
|
import styled97 from "styled-components";
|
|
16186
16198
|
import { isNotNil as isNotNil39 } from "@wistia/type-guards";
|
|
16187
|
-
import { jsx as jsx308, jsxs as
|
|
16199
|
+
import { jsx as jsx308, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
16188
16200
|
var ScrubLine = styled97.div`
|
|
16189
16201
|
position: absolute;
|
|
16190
16202
|
top: 0;
|
|
@@ -16288,7 +16300,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
16288
16300
|
backgroundPosition,
|
|
16289
16301
|
backgroundSize
|
|
16290
16302
|
};
|
|
16291
|
-
return /* @__PURE__ */
|
|
16303
|
+
return /* @__PURE__ */ jsxs64(
|
|
16292
16304
|
"div",
|
|
16293
16305
|
{
|
|
16294
16306
|
...props,
|
|
@@ -16309,7 +16321,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
16309
16321
|
};
|
|
16310
16322
|
|
|
16311
16323
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
16312
|
-
import { jsx as jsx309, jsxs as
|
|
16324
|
+
import { jsx as jsx309, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
16313
16325
|
var WideThumbnailImage = styled98.img`
|
|
16314
16326
|
height: 100%;
|
|
16315
16327
|
object-fit: cover;
|
|
@@ -16464,7 +16476,7 @@ var Thumbnail = forwardRef34(
|
|
|
16464
16476
|
} else {
|
|
16465
16477
|
thumbnailContent = null;
|
|
16466
16478
|
}
|
|
16467
|
-
return /* @__PURE__ */
|
|
16479
|
+
return /* @__PURE__ */ jsxs65(
|
|
16468
16480
|
StyledThumbnail,
|
|
16469
16481
|
{
|
|
16470
16482
|
ref,
|
|
@@ -16597,7 +16609,7 @@ var ThumbnailCollage = ({
|
|
|
16597
16609
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
16598
16610
|
import styled100, { css as css46 } from "styled-components";
|
|
16599
16611
|
import { isNotNil as isNotNil41 } from "@wistia/type-guards";
|
|
16600
|
-
import { jsx as jsx311, jsxs as
|
|
16612
|
+
import { jsx as jsx311, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
16601
16613
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
16602
16614
|
if (iconOnly) {
|
|
16603
16615
|
return /* @__PURE__ */ jsx311(
|
|
@@ -16695,7 +16707,7 @@ var WistiaLogo = ({
|
|
|
16695
16707
|
};
|
|
16696
16708
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
16697
16709
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
16698
|
-
const Logo = /* @__PURE__ */
|
|
16710
|
+
const Logo = /* @__PURE__ */ jsxs66(
|
|
16699
16711
|
WistiaLogoComponent,
|
|
16700
16712
|
{
|
|
16701
16713
|
$hoverColor: hoverColor,
|