@wistia/ui 0.0.25 → 0.1.1
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 +633 -371
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +88 -60
- package/dist/index.d.ts +88 -60
- package/dist/index.mjs +600 -335
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.
|
|
3
|
+
* @license @wistia/ui v0.1.1
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -66,6 +66,7 @@ __export(index_exports, {
|
|
|
66
66
|
MenuItemLabel: () => MenuItemLabel,
|
|
67
67
|
MenuLabel: () => MenuLabel,
|
|
68
68
|
MenuRadioGroup: () => MenuRadioGroup,
|
|
69
|
+
Modal: () => Modal,
|
|
69
70
|
Radio: () => Radio,
|
|
70
71
|
RadioGroup: () => RadioGroup,
|
|
71
72
|
RadioMenuItem: () => RadioMenuItem,
|
|
@@ -96,7 +97,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
96
97
|
var import_react_tooltip = require("@radix-ui/react-tooltip");
|
|
97
98
|
|
|
98
99
|
// src/css/GlobalStyle.tsx
|
|
99
|
-
var
|
|
100
|
+
var import_styled_components10 = require("styled-components");
|
|
100
101
|
|
|
101
102
|
// src/css/resetCss.tsx
|
|
102
103
|
var import_styled_components = require("styled-components");
|
|
@@ -155,12 +156,13 @@ var resetCss = import_styled_components.css`
|
|
|
155
156
|
}
|
|
156
157
|
|
|
157
158
|
/* Balance text wrapping on headings */
|
|
158
|
-
|
|
159
|
+
|
|
160
|
+
/* h1,
|
|
159
161
|
h2,
|
|
160
162
|
h3,
|
|
161
163
|
h4 {
|
|
162
164
|
text-wrap: balance;
|
|
163
|
-
}
|
|
165
|
+
} */
|
|
164
166
|
|
|
165
167
|
/* A elements that don't have a class get default styles */
|
|
166
168
|
a:not([class]) {
|
|
@@ -232,7 +234,7 @@ var globalStyleAdjustmentsCss = import_styled_components2.css`
|
|
|
232
234
|
`;
|
|
233
235
|
|
|
234
236
|
// src/css/designTokens/index.tsx
|
|
235
|
-
var
|
|
237
|
+
var import_styled_components9 = require("styled-components");
|
|
236
238
|
|
|
237
239
|
// src/css/designTokens/colorGlobal.tsx
|
|
238
240
|
var import_styled_components3 = require("styled-components");
|
|
@@ -1360,8 +1362,16 @@ var typographyTokens = import_styled_components7.css`
|
|
|
1360
1362
|
--wui-typography-label-4-weight: var(--wui-typography-weight-label);
|
|
1361
1363
|
`;
|
|
1362
1364
|
|
|
1365
|
+
// src/css/designTokens/zIndex.tsx
|
|
1366
|
+
var import_styled_components8 = require("styled-components");
|
|
1367
|
+
var zIndexTokens = import_styled_components8.css`
|
|
1368
|
+
--wui-zindex-backdrop: 100;
|
|
1369
|
+
--wui-zindex-modal: 100;
|
|
1370
|
+
--wui-zindex-menu: 500;
|
|
1371
|
+
`;
|
|
1372
|
+
|
|
1363
1373
|
// src/css/designTokens/index.tsx
|
|
1364
|
-
var colorTokens =
|
|
1374
|
+
var colorTokens = import_styled_components9.css`
|
|
1365
1375
|
${lightGlobalTokens}
|
|
1366
1376
|
/* Dark mode is disabled until we have a more robust plan for supporting it */
|
|
1367
1377
|
|
|
@@ -1370,17 +1380,18 @@ var colorTokens = import_styled_components8.css`
|
|
|
1370
1380
|
} */
|
|
1371
1381
|
${colorAliasTokens}
|
|
1372
1382
|
`;
|
|
1373
|
-
var designTokens =
|
|
1383
|
+
var designTokens = import_styled_components9.css`
|
|
1374
1384
|
:root {
|
|
1375
1385
|
${colorTokens}
|
|
1376
1386
|
${spacingTokens}
|
|
1377
1387
|
${borderRadiusTokens}
|
|
1378
1388
|
${typographyTokens}
|
|
1389
|
+
${zIndexTokens}
|
|
1379
1390
|
}
|
|
1380
1391
|
`;
|
|
1381
1392
|
|
|
1382
1393
|
// src/css/GlobalStyle.tsx
|
|
1383
|
-
var GlobalStyle =
|
|
1394
|
+
var GlobalStyle = import_styled_components10.createGlobalStyle`
|
|
1384
1395
|
${resetCss}
|
|
1385
1396
|
${globalStyleAdjustmentsCss}
|
|
1386
1397
|
${designTokens}
|
|
@@ -1613,14 +1624,14 @@ var import_sonner2 = require("sonner");
|
|
|
1613
1624
|
|
|
1614
1625
|
// src/private/components/Toast/Toast.tsx
|
|
1615
1626
|
var import_react4 = require("react");
|
|
1616
|
-
var
|
|
1627
|
+
var import_styled_components13 = __toESM(require("styled-components"));
|
|
1617
1628
|
var import_type_guards5 = require("@wistia/type-guards");
|
|
1618
1629
|
|
|
1619
1630
|
// src/components/Ellipsis/Ellipsis.tsx
|
|
1620
1631
|
var import_type_guards4 = require("@wistia/type-guards");
|
|
1621
|
-
var
|
|
1632
|
+
var import_styled_components11 = __toESM(require("styled-components"));
|
|
1622
1633
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1623
|
-
var ellipsisStyle =
|
|
1634
|
+
var ellipsisStyle = import_styled_components11.css`
|
|
1624
1635
|
overflow: hidden;
|
|
1625
1636
|
text-overflow: ellipsis;
|
|
1626
1637
|
white-space: nowrap;
|
|
@@ -1643,14 +1654,14 @@ var ellipsisStyle = import_styled_components10.css`
|
|
|
1643
1654
|
}
|
|
1644
1655
|
}
|
|
1645
1656
|
`;
|
|
1646
|
-
var ellipsisFlexParentStyle =
|
|
1657
|
+
var ellipsisFlexParentStyle = import_styled_components11.css`
|
|
1647
1658
|
min-width: 0;
|
|
1648
1659
|
`;
|
|
1649
|
-
var EllipsisComponent =
|
|
1660
|
+
var EllipsisComponent = import_styled_components11.default.div`
|
|
1650
1661
|
${ellipsisStyle};
|
|
1651
1662
|
${({ $lines }) => {
|
|
1652
1663
|
if ((0, import_type_guards4.isNotNil)($lines)) {
|
|
1653
|
-
return
|
|
1664
|
+
return import_styled_components11.css`
|
|
1654
1665
|
-webkit-box-orient: vertical;
|
|
1655
1666
|
-webkit-line-clamp: ${$lines};
|
|
1656
1667
|
display: -webkit-box;
|
|
@@ -1671,7 +1682,7 @@ var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */ (0, impor
|
|
|
1671
1682
|
Ellipsis.displayName = "Ellipsis";
|
|
1672
1683
|
|
|
1673
1684
|
// src/private/helpers/getColorScheme/getColorScheme.ts
|
|
1674
|
-
var
|
|
1685
|
+
var import_styled_components12 = require("styled-components");
|
|
1675
1686
|
var colorSchemeSchema = [
|
|
1676
1687
|
{ token: "bg-surface", step: "surface" },
|
|
1677
1688
|
{ token: "bg-surface-hover", step: "3" },
|
|
@@ -1698,7 +1709,7 @@ var colorSchemeSchema = [
|
|
|
1698
1709
|
{ token: "icon-on-fill", step: "contrast" },
|
|
1699
1710
|
{ token: "focus-ring", step: "9" }
|
|
1700
1711
|
];
|
|
1701
|
-
var defaultScheme =
|
|
1712
|
+
var defaultScheme = import_styled_components12.css`
|
|
1702
1713
|
--wui-color-bg-surface: var(--wui-gray-surface);
|
|
1703
1714
|
--wui-color-bg-surface-hover: var(--wui-gray-3);
|
|
1704
1715
|
--wui-color-bg-surface-active: var(--wui-gray-4);
|
|
@@ -1724,7 +1735,7 @@ var defaultScheme = import_styled_components11.css`
|
|
|
1724
1735
|
--wui-color-icon-on-fill: var(--wui-gray-contrast);
|
|
1725
1736
|
--wui-color-focus-ring: var(--wui-blue-9);
|
|
1726
1737
|
`;
|
|
1727
|
-
var navScheme =
|
|
1738
|
+
var navScheme = import_styled_components12.css`
|
|
1728
1739
|
--wui-color-bg-fill-active: var(--wui-blue-5);
|
|
1729
1740
|
--wui-color-bg-fill-hover: var(--wui-blue-4);
|
|
1730
1741
|
--wui-color-bg-fill: var(--wui-blue-1);
|
|
@@ -1775,7 +1786,7 @@ var getColorScheme = (colorScheme) => {
|
|
|
1775
1786
|
if (colorScheme === "default") {
|
|
1776
1787
|
return defaultScheme;
|
|
1777
1788
|
}
|
|
1778
|
-
return
|
|
1789
|
+
return import_styled_components12.css`
|
|
1779
1790
|
${colorSchemeSchema.map(({ token, step }) => {
|
|
1780
1791
|
return `--wui-color-${token}: var(--wui-${colorScheme === "info" ? "blue" : colorScheme}-${step});`;
|
|
1781
1792
|
}).join("")}
|
|
@@ -1784,12 +1795,12 @@ var getColorScheme = (colorScheme) => {
|
|
|
1784
1795
|
|
|
1785
1796
|
// src/private/components/Toast/Toast.tsx
|
|
1786
1797
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1787
|
-
var Message = (0,
|
|
1798
|
+
var Message = (0, import_styled_components13.default)(Ellipsis)`
|
|
1788
1799
|
line-height: var(--wui-typography-label-3-line-height);
|
|
1789
1800
|
font-size: var(--wui-typography-label-3-size);
|
|
1790
1801
|
font-weight: var(--wui-typography-label-3-weight);
|
|
1791
1802
|
`;
|
|
1792
|
-
var MessageWrapper =
|
|
1803
|
+
var MessageWrapper = import_styled_components13.default.div`
|
|
1793
1804
|
display: flex;
|
|
1794
1805
|
flex-grow: 1;
|
|
1795
1806
|
flex-shrink: 1;
|
|
@@ -1802,13 +1813,13 @@ var MessageWrapper = import_styled_components12.default.div`
|
|
|
1802
1813
|
margin-right: var(--wui-space-02); /* space between icon & message */
|
|
1803
1814
|
}
|
|
1804
1815
|
`;
|
|
1805
|
-
var ActionWrapper =
|
|
1816
|
+
var ActionWrapper = import_styled_components13.default.div`
|
|
1806
1817
|
flex-grow: 0;
|
|
1807
1818
|
flex-shrink: 0;
|
|
1808
1819
|
flex-basis: auto;
|
|
1809
1820
|
margin-right: var(--wui-space-03);
|
|
1810
1821
|
`;
|
|
1811
|
-
var StyledToast =
|
|
1822
|
+
var StyledToast = import_styled_components13.default.div`
|
|
1812
1823
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
1813
1824
|
display: flex;
|
|
1814
1825
|
align-items: center;
|
|
@@ -1905,10 +1916,10 @@ var useAriaLive = () => {
|
|
|
1905
1916
|
// src/components/Avatar/Avatar.tsx
|
|
1906
1917
|
var import_react7 = require("react");
|
|
1907
1918
|
var import_type_guards8 = require("@wistia/type-guards");
|
|
1908
|
-
var
|
|
1919
|
+
var import_styled_components15 = __toESM(require("styled-components"));
|
|
1909
1920
|
|
|
1910
1921
|
// src/components/ColorSchemeWrapper/ColorSchemeWrapper.tsx
|
|
1911
|
-
var
|
|
1922
|
+
var import_styled_components14 = __toESM(require("styled-components"));
|
|
1912
1923
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1913
1924
|
var colorSchemeOptions = [
|
|
1914
1925
|
"inherit",
|
|
@@ -1927,7 +1938,7 @@ var colorSchemeOptions = [
|
|
|
1927
1938
|
"vendor-marketo",
|
|
1928
1939
|
"vendor-pardot"
|
|
1929
1940
|
];
|
|
1930
|
-
var StyledColorSchemeWrapper =
|
|
1941
|
+
var StyledColorSchemeWrapper = import_styled_components14.default.div`
|
|
1931
1942
|
${({ $colorScheme, $nav }) => getColorScheme($nav ? "nav" : $colorScheme)};
|
|
1932
1943
|
`;
|
|
1933
1944
|
var ColorSchemeWrapper = ({
|
|
@@ -1962,7 +1973,7 @@ var formatNameForDisplay = (name) => {
|
|
|
1962
1973
|
|
|
1963
1974
|
// src/components/Avatar/Avatar.tsx
|
|
1964
1975
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1965
|
-
var AvatarImage =
|
|
1976
|
+
var AvatarImage = import_styled_components15.default.img`
|
|
1966
1977
|
align-items: center;
|
|
1967
1978
|
background-color: white;
|
|
1968
1979
|
border-radius: 50%;
|
|
@@ -1989,7 +2000,7 @@ var avatarSizeMap = {
|
|
|
1989
2000
|
lg: 32
|
|
1990
2001
|
};
|
|
1991
2002
|
var fontSizeScaleMultiplier = 0.55;
|
|
1992
|
-
var InitialsContainer =
|
|
2003
|
+
var InitialsContainer = import_styled_components15.default.div`
|
|
1993
2004
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
1994
2005
|
align-items: center;
|
|
1995
2006
|
background-color: var(--wui-color-bg-fill);
|
|
@@ -2011,7 +2022,7 @@ var InitialsContainer = import_styled_components14.default.div`
|
|
|
2011
2022
|
box-shadow: inset 0 0 0 2px rgb(0 0 0 / 50%);
|
|
2012
2023
|
}
|
|
2013
2024
|
`;
|
|
2014
|
-
var AvatarWrapper =
|
|
2025
|
+
var AvatarWrapper = import_styled_components15.default.div`
|
|
2015
2026
|
max-height: ${({ $maxHeight }) => $maxHeight}px;
|
|
2016
2027
|
`;
|
|
2017
2028
|
var chooseColorScheme = (name) => {
|
|
@@ -2075,10 +2086,10 @@ Avatar.displayName = "Avatar";
|
|
|
2075
2086
|
|
|
2076
2087
|
// src/components/Badge/Badge.tsx
|
|
2077
2088
|
var import_react8 = require("react");
|
|
2078
|
-
var
|
|
2089
|
+
var import_styled_components16 = __toESM(require("styled-components"));
|
|
2079
2090
|
var import_type_guards9 = require("@wistia/type-guards");
|
|
2080
2091
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2081
|
-
var StyledBadge =
|
|
2092
|
+
var StyledBadge = import_styled_components16.default.div`
|
|
2082
2093
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
2083
2094
|
align-items: center;
|
|
2084
2095
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -2120,7 +2131,7 @@ Badge.displayName = "Badge";
|
|
|
2120
2131
|
|
|
2121
2132
|
// src/components/Box/Box.tsx
|
|
2122
2133
|
var import_react9 = require("react");
|
|
2123
|
-
var
|
|
2134
|
+
var import_styled_components17 = __toESM(require("styled-components"));
|
|
2124
2135
|
var import_type_guards10 = require("@wistia/type-guards");
|
|
2125
2136
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2126
2137
|
var isDev = process.env["NODE_ENV"] === "development" || process.env["NODE_ENV"] === "test";
|
|
@@ -2164,7 +2175,7 @@ var getFillViewportStyle = (fillViewport) => {
|
|
|
2164
2175
|
}
|
|
2165
2176
|
return void 0;
|
|
2166
2177
|
};
|
|
2167
|
-
var BoxComponent =
|
|
2178
|
+
var BoxComponent = import_styled_components17.default.div`
|
|
2168
2179
|
align-content: ${({ $alignContent }) => $alignContent};
|
|
2169
2180
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
2170
2181
|
align-self: ${({ $alignSelf }) => $alignSelf ?? null};
|
|
@@ -2241,12 +2252,12 @@ Box.displayName = "Box";
|
|
|
2241
2252
|
|
|
2242
2253
|
// src/components/Button/Button.tsx
|
|
2243
2254
|
var import_react12 = require("react");
|
|
2244
|
-
var
|
|
2255
|
+
var import_styled_components22 = __toESM(require("styled-components"));
|
|
2245
2256
|
var import_type_guards14 = require("@wistia/type-guards");
|
|
2246
2257
|
|
|
2247
2258
|
// src/css/buttonResetCss.tsx
|
|
2248
|
-
var
|
|
2249
|
-
var buttonResetCss =
|
|
2259
|
+
var import_styled_components18 = require("styled-components");
|
|
2260
|
+
var buttonResetCss = import_styled_components18.css`
|
|
2250
2261
|
align-items: center;
|
|
2251
2262
|
background-color: transparent;
|
|
2252
2263
|
background-image: none;
|
|
@@ -2291,8 +2302,8 @@ var buttonResetCss = import_styled_components17.css`
|
|
|
2291
2302
|
`;
|
|
2292
2303
|
|
|
2293
2304
|
// src/components/Button/buttonStyles.tsx
|
|
2294
|
-
var
|
|
2295
|
-
var buttonSmallStyles =
|
|
2305
|
+
var import_styled_components19 = require("styled-components");
|
|
2306
|
+
var buttonSmallStyles = import_styled_components19.css`
|
|
2296
2307
|
--button-padding-vertical: var(--wui-space-01);
|
|
2297
2308
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2298
2309
|
--button-label-padding-horizontal: var(--wui-space-01);
|
|
@@ -2303,7 +2314,7 @@ var buttonSmallStyles = import_styled_components18.css`
|
|
|
2303
2314
|
--button-icon-size: 12px;
|
|
2304
2315
|
--button-label-gap: 4px;
|
|
2305
2316
|
`;
|
|
2306
|
-
var buttonMediumStyles =
|
|
2317
|
+
var buttonMediumStyles = import_styled_components19.css`
|
|
2307
2318
|
--button-padding-vertical: var(--wui-space-02);
|
|
2308
2319
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2309
2320
|
--button-label-padding-horizontal: 6px;
|
|
@@ -2314,7 +2325,7 @@ var buttonMediumStyles = import_styled_components18.css`
|
|
|
2314
2325
|
--button-icon-size: 16px;
|
|
2315
2326
|
--button-label-gap: 6px;
|
|
2316
2327
|
`;
|
|
2317
|
-
var buttonLargeStyles =
|
|
2328
|
+
var buttonLargeStyles = import_styled_components19.css`
|
|
2318
2329
|
--button-padding-vertical: var(--wui-space-02);
|
|
2319
2330
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2320
2331
|
--button-label-padding-horizontal: var(--wui-space-02);
|
|
@@ -2325,7 +2336,7 @@ var buttonLargeStyles = import_styled_components18.css`
|
|
|
2325
2336
|
--button-icon-size: 24px;
|
|
2326
2337
|
--button-label-gap: 8px;
|
|
2327
2338
|
`;
|
|
2328
|
-
var buttonExtraLargeStyles =
|
|
2339
|
+
var buttonExtraLargeStyles = import_styled_components19.css`
|
|
2329
2340
|
--button-padding-vertical: var(--wui-space-03);
|
|
2330
2341
|
--button-padding-horizontal: var(--wui-space-03);
|
|
2331
2342
|
--button-label-padding-horizontal: var(--wui-space-02);
|
|
@@ -2336,34 +2347,34 @@ var buttonExtraLargeStyles = import_styled_components18.css`
|
|
|
2336
2347
|
--button-icon-size: 24px;
|
|
2337
2348
|
--button-label-gap: 8px;
|
|
2338
2349
|
`;
|
|
2339
|
-
var ghostButtonVariant =
|
|
2350
|
+
var ghostButtonVariant = import_styled_components19.css`
|
|
2340
2351
|
--button-color-bg: transparent;
|
|
2341
2352
|
--button-color-bg-hover: var(--wui-color-bg-surface-hover);
|
|
2342
2353
|
--button-color-bg-active: var(--wui-color-bg-surface-active);
|
|
2343
2354
|
--button-color-text: var(--wui-color-text);
|
|
2344
2355
|
--button-color-icon: var(--wui-color-icon);
|
|
2345
2356
|
`;
|
|
2346
|
-
var outlineButtonVariant =
|
|
2357
|
+
var outlineButtonVariant = import_styled_components19.css`
|
|
2347
2358
|
${ghostButtonVariant};
|
|
2348
2359
|
--button-color-border: var(--wui-color-border);
|
|
2349
2360
|
|
|
2350
2361
|
box-shadow: 0 0 0 2px var(--button-color-border) inset;
|
|
2351
2362
|
`;
|
|
2352
|
-
var softButtonVariant =
|
|
2363
|
+
var softButtonVariant = import_styled_components19.css`
|
|
2353
2364
|
--button-color-bg: var(--wui-color-bg-surface-secondary);
|
|
2354
2365
|
--button-color-bg-hover: var(--wui-color-bg-surface-secondary-hover);
|
|
2355
2366
|
--button-color-bg-active: var(--wui-color-bg-surface-secondary-active);
|
|
2356
2367
|
--button-color-text: var(--wui-color-text);
|
|
2357
2368
|
--button-color-icon: var(--wui-color-icon);
|
|
2358
2369
|
`;
|
|
2359
|
-
var solidButtonVariant =
|
|
2370
|
+
var solidButtonVariant = import_styled_components19.css`
|
|
2360
2371
|
--button-color-bg: var(--wui-color-bg-fill);
|
|
2361
2372
|
--button-color-bg-hover: var(--wui-color-bg-fill-hover);
|
|
2362
2373
|
--button-color-bg-active: var(--wui-color-bg-fill-active);
|
|
2363
2374
|
--button-color-text: var(--wui-color-text-on-fill);
|
|
2364
2375
|
--button-color-icon: var(--wui-color-icon-on-fill);
|
|
2365
2376
|
`;
|
|
2366
|
-
var disabledButtonVariant =
|
|
2377
|
+
var disabledButtonVariant = import_styled_components19.css`
|
|
2367
2378
|
--button-color-bg: var(--wui-color-bg-surface-disabled);
|
|
2368
2379
|
--button-color-bg-hover: var(--wui-color-bg-surface-disabled);
|
|
2369
2380
|
--button-color-bg-active: var(--wui-color-bg-surface-disabled);
|
|
@@ -2371,7 +2382,7 @@ var disabledButtonVariant = import_styled_components18.css`
|
|
|
2371
2382
|
--button-color-icon: var(--wui-color-icon-disabled);
|
|
2372
2383
|
--button-color-border: var(--wui-color-border-disabled);
|
|
2373
2384
|
`;
|
|
2374
|
-
var pressedButtonVariant =
|
|
2385
|
+
var pressedButtonVariant = import_styled_components19.css`
|
|
2375
2386
|
--button-color-bg: var(--wui-color-bg-surface-selected);
|
|
2376
2387
|
--button-color-bg-hover: var(--wui-color-bg-surface-selected-hover);
|
|
2377
2388
|
--button-color-bg-active: var(--wui-color-bg-surface-selected-active);
|
|
@@ -2379,7 +2390,7 @@ var pressedButtonVariant = import_styled_components18.css`
|
|
|
2379
2390
|
--button-color-icon: var(--wui-color-icon-selected);
|
|
2380
2391
|
--button-color-border: var(--wui-color-border-selected);
|
|
2381
2392
|
`;
|
|
2382
|
-
var buttonBaseStyles =
|
|
2393
|
+
var buttonBaseStyles = import_styled_components19.css`
|
|
2383
2394
|
border-radius: var(--wui-border-radius-rounded);
|
|
2384
2395
|
font-family: var(--button-typography-family);
|
|
2385
2396
|
font-size: var(--button-typography-size);
|
|
@@ -2446,7 +2457,7 @@ var buttonSizeStyles = {
|
|
|
2446
2457
|
|
|
2447
2458
|
// src/components/Icon/Icon.tsx
|
|
2448
2459
|
var import_type_guards12 = require("@wistia/type-guards");
|
|
2449
|
-
var
|
|
2460
|
+
var import_styled_components20 = __toESM(require("styled-components"));
|
|
2450
2461
|
|
|
2451
2462
|
// src/components/Icon/icons/AbTestIcon.tsx
|
|
2452
2463
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
@@ -5631,7 +5642,7 @@ var iconSizeMap = {
|
|
|
5631
5642
|
xl: "32",
|
|
5632
5643
|
xxl: "48"
|
|
5633
5644
|
};
|
|
5634
|
-
var StyledIcon =
|
|
5645
|
+
var StyledIcon = import_styled_components20.default.svg`
|
|
5635
5646
|
${({ $colorScheme }) => getColorScheme($colorScheme ?? "inherit")}
|
|
5636
5647
|
`;
|
|
5637
5648
|
var Icon = ({
|
|
@@ -5682,7 +5693,7 @@ Icon.displayName = "Icon";
|
|
|
5682
5693
|
// src/components/Link/Link.tsx
|
|
5683
5694
|
var import_react11 = require("react");
|
|
5684
5695
|
var import_type_guards13 = require("@wistia/type-guards");
|
|
5685
|
-
var
|
|
5696
|
+
var import_styled_components21 = __toESM(require("styled-components"));
|
|
5686
5697
|
var import_react_router_dom = require("react-router-dom");
|
|
5687
5698
|
var import_jsx_runtime165 = require("react/jsx-runtime");
|
|
5688
5699
|
var generateHref = (href, type, disabled) => {
|
|
@@ -5700,7 +5711,7 @@ var generateHref = (href, type, disabled) => {
|
|
|
5700
5711
|
};
|
|
5701
5712
|
var isButton = (props) => (0, import_type_guards13.isUndefined)(props.href);
|
|
5702
5713
|
var isLink = (props) => (0, import_type_guards13.isNotUndefined)(props.href);
|
|
5703
|
-
var StyledLink =
|
|
5714
|
+
var StyledLink = import_styled_components21.default.a`
|
|
5704
5715
|
${({ href }) => (0, import_type_guards13.isNil)(href) && buttonResetCss};
|
|
5705
5716
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
5706
5717
|
cursor: pointer;
|
|
@@ -5792,7 +5803,7 @@ Link.displayName = "Link";
|
|
|
5792
5803
|
// src/components/Button/Button.tsx
|
|
5793
5804
|
var import_jsx_runtime166 = require("react/jsx-runtime");
|
|
5794
5805
|
var isLink2 = (props) => (0, import_type_guards14.isNotUndefined)(props.href);
|
|
5795
|
-
var StyledButton =
|
|
5806
|
+
var StyledButton = import_styled_components22.default.button`
|
|
5796
5807
|
${buttonResetCss}
|
|
5797
5808
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
5798
5809
|
${({ $size }) => buttonSizeStyles[$size]}
|
|
@@ -5802,7 +5813,7 @@ var StyledButton = import_styled_components21.default.button`
|
|
|
5802
5813
|
position: relative;
|
|
5803
5814
|
text-align: center;
|
|
5804
5815
|
`;
|
|
5805
|
-
var StyledButtonContent =
|
|
5816
|
+
var StyledButtonContent = import_styled_components22.default.div`
|
|
5806
5817
|
align-items: center;
|
|
5807
5818
|
display: inline-flex;
|
|
5808
5819
|
flex-grow: 1;
|
|
@@ -5814,10 +5825,10 @@ var StyledButtonContent = import_styled_components21.default.div`
|
|
|
5814
5825
|
${({ $hasLeftIcon }) => $hasLeftIcon && "padding-left: 0;"}
|
|
5815
5826
|
${({ $hasRightIcon }) => $hasRightIcon && "padding-right: 0;"}
|
|
5816
5827
|
`;
|
|
5817
|
-
var StyledButtonContentLabel =
|
|
5828
|
+
var StyledButtonContentLabel = import_styled_components22.default.span`
|
|
5818
5829
|
flex: 1;
|
|
5819
5830
|
`;
|
|
5820
|
-
var StyledButtonLoading =
|
|
5831
|
+
var StyledButtonLoading = import_styled_components22.default.div`
|
|
5821
5832
|
position: absolute;
|
|
5822
5833
|
display: flex;
|
|
5823
5834
|
`;
|
|
@@ -5929,7 +5940,7 @@ var Button = (0, import_react12.forwardRef)(
|
|
|
5929
5940
|
Button.displayName = "Button";
|
|
5930
5941
|
|
|
5931
5942
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
5932
|
-
var
|
|
5943
|
+
var import_styled_components23 = __toESM(require("styled-components"));
|
|
5933
5944
|
var import_type_guards15 = require("@wistia/type-guards");
|
|
5934
5945
|
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
5935
5946
|
var getAlignment = (align) => {
|
|
@@ -5944,7 +5955,7 @@ var getAlignment = (align) => {
|
|
|
5944
5955
|
}
|
|
5945
5956
|
return "flex-start";
|
|
5946
5957
|
};
|
|
5947
|
-
var ButtonGroupComponent =
|
|
5958
|
+
var ButtonGroupComponent = import_styled_components23.default.div`
|
|
5948
5959
|
display: flex;
|
|
5949
5960
|
|
|
5950
5961
|
/* this helps ensure that primary buttons appear at the top of the column */
|
|
@@ -5988,15 +5999,15 @@ ButtonGroup.displayName = "ButtonGroup";
|
|
|
5988
5999
|
// src/components/Checkbox/Checkbox.tsx
|
|
5989
6000
|
var import_react14 = require("react");
|
|
5990
6001
|
var import_react_checkbox = require("@radix-ui/react-checkbox");
|
|
5991
|
-
var
|
|
6002
|
+
var import_styled_components27 = __toESM(require("styled-components"));
|
|
5992
6003
|
var import_type_guards17 = require("@wistia/type-guards");
|
|
5993
6004
|
|
|
5994
6005
|
// src/components/Label/Label.tsx
|
|
5995
|
-
var
|
|
6006
|
+
var import_styled_components25 = __toESM(require("styled-components"));
|
|
5996
6007
|
|
|
5997
6008
|
// src/components/Heading/Heading.tsx
|
|
5998
6009
|
var import_react13 = require("react");
|
|
5999
|
-
var
|
|
6010
|
+
var import_styled_components24 = __toESM(require("styled-components"));
|
|
6000
6011
|
|
|
6001
6012
|
// src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
6002
6013
|
var makePolymorphic = (component) => {
|
|
@@ -6005,43 +6016,43 @@ var makePolymorphic = (component) => {
|
|
|
6005
6016
|
|
|
6006
6017
|
// src/components/Heading/Heading.tsx
|
|
6007
6018
|
var import_jsx_runtime168 = require("react/jsx-runtime");
|
|
6008
|
-
var heroStyle =
|
|
6019
|
+
var heroStyle = import_styled_components24.css`
|
|
6009
6020
|
--font-family: var(--wui-typography-heading-hero-family);
|
|
6010
6021
|
--font-size: var(--wui-typography-heading-hero-size);
|
|
6011
6022
|
--font-weight: var(--wui-typography-heading-hero-weight);
|
|
6012
6023
|
--line-height: var(--wui-typography-heading-hero-line-height);
|
|
6013
6024
|
`;
|
|
6014
|
-
var heading1TextStyle =
|
|
6025
|
+
var heading1TextStyle = import_styled_components24.css`
|
|
6015
6026
|
--font-family: var(--wui-typography-heading-1-family);
|
|
6016
6027
|
--font-size: var(--wui-typography-heading-1-size);
|
|
6017
6028
|
--font-weight: var(--wui-typography-heading-1-weight);
|
|
6018
6029
|
--line-height: var(--wui-typography-heading-1-line-height);
|
|
6019
6030
|
`;
|
|
6020
|
-
var heading2TextStyle =
|
|
6031
|
+
var heading2TextStyle = import_styled_components24.css`
|
|
6021
6032
|
--font-family: var(--wui-typography-heading-2-family);
|
|
6022
6033
|
--font-size: var(--wui-typography-heading-2-size);
|
|
6023
6034
|
--font-weight: var(--wui-typography-heading-2-weight);
|
|
6024
6035
|
--line-height: var(--wui-typography-heading-2-line-height);
|
|
6025
6036
|
`;
|
|
6026
|
-
var heading3TextStyle =
|
|
6037
|
+
var heading3TextStyle = import_styled_components24.css`
|
|
6027
6038
|
--font-family: var(--wui-typography-heading-3-family);
|
|
6028
6039
|
--font-size: var(--wui-typography-heading-3-size);
|
|
6029
6040
|
--font-weight: var(--wui-typography-heading-3-weight);
|
|
6030
6041
|
--line-height: var(--wui-typography-heading-3-line-height);
|
|
6031
6042
|
`;
|
|
6032
|
-
var heading4TextStyle =
|
|
6043
|
+
var heading4TextStyle = import_styled_components24.css`
|
|
6033
6044
|
--font-family: var(--wui-typography-heading-4-family);
|
|
6034
6045
|
--font-size: var(--wui-typography-heading-4-size);
|
|
6035
6046
|
--font-weight: var(--wui-typography-heading-4-weight);
|
|
6036
6047
|
--line-height: var(--wui-typography-heading-4-line-height);
|
|
6037
6048
|
`;
|
|
6038
|
-
var heading5TextStyle =
|
|
6049
|
+
var heading5TextStyle = import_styled_components24.css`
|
|
6039
6050
|
--font-family: var(--wui-typography-heading-5-family);
|
|
6040
6051
|
--font-size: var(--wui-typography-heading-5-size);
|
|
6041
6052
|
--font-weight: var(--wui-typography-heading-5-weight);
|
|
6042
6053
|
--line-height: var(--wui-typography-heading-5-line-height);
|
|
6043
6054
|
`;
|
|
6044
|
-
var heading6TextStyle =
|
|
6055
|
+
var heading6TextStyle = import_styled_components24.css`
|
|
6045
6056
|
--font-family: var(--wui-typography-heading-6-family);
|
|
6046
6057
|
--font-size: var(--wui-typography-heading-6-size);
|
|
6047
6058
|
--font-weight: var(--wui-typography-heading-6-weight);
|
|
@@ -6057,7 +6068,7 @@ var variantStyleMap = {
|
|
|
6057
6068
|
heading6: heading6TextStyle
|
|
6058
6069
|
};
|
|
6059
6070
|
var DEFAULT_ELEMENT = "h1";
|
|
6060
|
-
var StyledHeading =
|
|
6071
|
+
var StyledHeading = import_styled_components24.default.div`
|
|
6061
6072
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
6062
6073
|
font-family: var(--font-family);
|
|
6063
6074
|
font-size: var(--font-size);
|
|
@@ -6066,16 +6077,16 @@ var StyledHeading = import_styled_components23.default.div`
|
|
|
6066
6077
|
color: var(--wui-color-text);
|
|
6067
6078
|
${({ $variant }) => variantStyleMap[$variant]}
|
|
6068
6079
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
6069
|
-
${({ $inline }) => $inline &&
|
|
6080
|
+
${({ $inline }) => $inline && import_styled_components24.css`
|
|
6070
6081
|
display: inline-block;
|
|
6071
6082
|
`}
|
|
6072
|
-
${({ $disabled }) => $disabled &&
|
|
6083
|
+
${({ $disabled }) => $disabled && import_styled_components24.css`
|
|
6073
6084
|
color: var(--wui-color-text-disabled);
|
|
6074
6085
|
`}
|
|
6075
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
6086
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components24.css`
|
|
6076
6087
|
user-select: none;
|
|
6077
6088
|
`}
|
|
6078
|
-
${({ $align }) =>
|
|
6089
|
+
${({ $align }) => import_styled_components24.css`
|
|
6079
6090
|
text-align: ${$align};
|
|
6080
6091
|
`}
|
|
6081
6092
|
margin: 0;
|
|
@@ -6121,7 +6132,7 @@ var Heading = makePolymorphic(HeadingComponent);
|
|
|
6121
6132
|
|
|
6122
6133
|
// src/components/Label/Label.tsx
|
|
6123
6134
|
var import_jsx_runtime169 = require("react/jsx-runtime");
|
|
6124
|
-
var requiredStyle =
|
|
6135
|
+
var requiredStyle = import_styled_components25.css`
|
|
6125
6136
|
&::after {
|
|
6126
6137
|
color: var(--wui-color-text-error);
|
|
6127
6138
|
display: inline;
|
|
@@ -6129,10 +6140,10 @@ var requiredStyle = import_styled_components24.css`
|
|
|
6129
6140
|
content: '*';
|
|
6130
6141
|
}
|
|
6131
6142
|
`;
|
|
6132
|
-
var disabledStyle =
|
|
6143
|
+
var disabledStyle = import_styled_components25.css`
|
|
6133
6144
|
color: var(--wui-color-text-disabled);
|
|
6134
6145
|
`;
|
|
6135
|
-
var StyledLabel = (0,
|
|
6146
|
+
var StyledLabel = (0, import_styled_components25.default)(Heading).attrs({
|
|
6136
6147
|
variant: "heading6",
|
|
6137
6148
|
renderAs: "label"
|
|
6138
6149
|
})`
|
|
@@ -6175,10 +6186,10 @@ var Label = ({
|
|
|
6175
6186
|
Label.displayName = "Label";
|
|
6176
6187
|
|
|
6177
6188
|
// src/components/Label/LabelDescription.tsx
|
|
6178
|
-
var
|
|
6189
|
+
var import_styled_components26 = __toESM(require("styled-components"));
|
|
6179
6190
|
var import_type_guards16 = require("@wistia/type-guards");
|
|
6180
6191
|
var import_jsx_runtime170 = require("react/jsx-runtime");
|
|
6181
|
-
var StyledLabelDescription =
|
|
6192
|
+
var StyledLabelDescription = import_styled_components26.default.div`
|
|
6182
6193
|
color: var(--wui-color-text-secondary);
|
|
6183
6194
|
font-size: var(--wui-typography-body-4-size);
|
|
6184
6195
|
font-weight: var(--wui-typography-body-4-weight);
|
|
@@ -6214,7 +6225,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
|
|
|
6214
6225
|
)
|
|
6215
6226
|
}
|
|
6216
6227
|
);
|
|
6217
|
-
var StyledCheckboxWrapper =
|
|
6228
|
+
var StyledCheckboxWrapper = import_styled_components27.default.div`
|
|
6218
6229
|
display: flex;
|
|
6219
6230
|
align-items: center;
|
|
6220
6231
|
cursor: pointer;
|
|
@@ -6228,7 +6239,7 @@ var StyledCheckboxWrapper = import_styled_components26.default.div`
|
|
|
6228
6239
|
background-color: #efefef;
|
|
6229
6240
|
}
|
|
6230
6241
|
`;
|
|
6231
|
-
var StyledCheckboxRoot = (0,
|
|
6242
|
+
var StyledCheckboxRoot = (0, import_styled_components27.default)(import_react_checkbox.Root)`
|
|
6232
6243
|
all: unset; /* CheckboxRoot renders as a button element, so we need to reset all styles */
|
|
6233
6244
|
background-color: var(--wui-color-bg-fill-white);
|
|
6234
6245
|
min-width: 16px;
|
|
@@ -6262,10 +6273,10 @@ var StyledCheckboxRoot = (0, import_styled_components26.default)(import_react_ch
|
|
|
6262
6273
|
/* TODO Lamp to design focus state */
|
|
6263
6274
|
}
|
|
6264
6275
|
`;
|
|
6265
|
-
var StyledCheckboxIndicator = (0,
|
|
6276
|
+
var StyledCheckboxIndicator = (0, import_styled_components27.default)(import_react_checkbox.Indicator)`
|
|
6266
6277
|
display: flex;
|
|
6267
6278
|
`;
|
|
6268
|
-
var StyledLabelWrapper =
|
|
6279
|
+
var StyledLabelWrapper = import_styled_components27.default.div`
|
|
6269
6280
|
display: flex;
|
|
6270
6281
|
flex-direction: column;
|
|
6271
6282
|
margin-left: var(--wui-space-02);
|
|
@@ -6333,13 +6344,13 @@ var Checkbox = (0, import_react14.forwardRef)(
|
|
|
6333
6344
|
Checkbox.displayName = "Checkbox";
|
|
6334
6345
|
|
|
6335
6346
|
// src/components/Divider/Divider.tsx
|
|
6336
|
-
var
|
|
6347
|
+
var import_styled_components28 = __toESM(require("styled-components"));
|
|
6337
6348
|
var import_jsx_runtime172 = require("react/jsx-runtime");
|
|
6338
6349
|
var sizeToPixelMap = {
|
|
6339
6350
|
lg: 4,
|
|
6340
6351
|
sm: 1
|
|
6341
6352
|
};
|
|
6342
|
-
var DividerComponent =
|
|
6353
|
+
var DividerComponent = import_styled_components28.default.hr`
|
|
6343
6354
|
background: none;
|
|
6344
6355
|
border-bottom: none;
|
|
6345
6356
|
border-left: none;
|
|
@@ -6366,15 +6377,15 @@ Divider.displayName = "Divider";
|
|
|
6366
6377
|
|
|
6367
6378
|
// src/components/Form/Form.tsx
|
|
6368
6379
|
var import_react16 = require("react");
|
|
6369
|
-
var
|
|
6380
|
+
var import_styled_components30 = __toESM(require("styled-components"));
|
|
6370
6381
|
var import_type_guards18 = require("@wistia/type-guards");
|
|
6371
6382
|
|
|
6372
6383
|
// src/components/Stack/Stack.tsx
|
|
6373
6384
|
var import_react15 = require("react");
|
|
6374
|
-
var
|
|
6385
|
+
var import_styled_components29 = __toESM(require("styled-components"));
|
|
6375
6386
|
var import_jsx_runtime173 = require("react/jsx-runtime");
|
|
6376
6387
|
var DEFAULT_ELEMENT2 = "div";
|
|
6377
|
-
var StyledStack =
|
|
6388
|
+
var StyledStack = import_styled_components29.default.div`
|
|
6378
6389
|
display: flex;
|
|
6379
6390
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
6380
6391
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
@@ -6404,7 +6415,7 @@ var Stack = makePolymorphic(StackComponent);
|
|
|
6404
6415
|
|
|
6405
6416
|
// src/components/Form/Form.tsx
|
|
6406
6417
|
var import_jsx_runtime174 = require("react/jsx-runtime");
|
|
6407
|
-
var StyledForm =
|
|
6418
|
+
var StyledForm = import_styled_components30.default.form`
|
|
6408
6419
|
--form-default-width: 690px;
|
|
6409
6420
|
|
|
6410
6421
|
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
@@ -6569,94 +6580,94 @@ var FormErrorSummary = ({ description }) => {
|
|
|
6569
6580
|
|
|
6570
6581
|
// src/components/FormField/FormField.tsx
|
|
6571
6582
|
var import_react22 = require("react");
|
|
6572
|
-
var
|
|
6583
|
+
var import_styled_components33 = __toESM(require("styled-components"));
|
|
6573
6584
|
var import_type_guards20 = require("@wistia/type-guards");
|
|
6574
6585
|
|
|
6575
6586
|
// src/components/Text/Text.tsx
|
|
6576
6587
|
var import_react19 = require("react");
|
|
6577
|
-
var
|
|
6588
|
+
var import_styled_components31 = __toESM(require("styled-components"));
|
|
6578
6589
|
var import_jsx_runtime176 = require("react/jsx-runtime");
|
|
6579
|
-
var bodyBoldStyles =
|
|
6590
|
+
var bodyBoldStyles = import_styled_components31.css`
|
|
6580
6591
|
> strong,
|
|
6581
6592
|
b {
|
|
6582
6593
|
font-weight: var(--wui-typography-weight-body-bold);
|
|
6583
6594
|
}
|
|
6584
6595
|
`;
|
|
6585
|
-
var labelBoldStyles =
|
|
6596
|
+
var labelBoldStyles = import_styled_components31.css`
|
|
6586
6597
|
> strong,
|
|
6587
6598
|
b {
|
|
6588
6599
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
6589
6600
|
}
|
|
6590
6601
|
`;
|
|
6591
|
-
var body1TextStyle =
|
|
6602
|
+
var body1TextStyle = import_styled_components31.css`
|
|
6592
6603
|
--font-family: var(--wui-typography-body-1-family);
|
|
6593
6604
|
--font-size: var(--wui-typography-body-1-size);
|
|
6594
6605
|
--font-weight: var(--wui-typography-body-1-weight);
|
|
6595
6606
|
--line-height: var(--wui-typography-body-1-line-height);
|
|
6596
6607
|
${bodyBoldStyles}
|
|
6597
6608
|
`;
|
|
6598
|
-
var body2TextStyle =
|
|
6609
|
+
var body2TextStyle = import_styled_components31.css`
|
|
6599
6610
|
--font-family: var(--wui-typography-body-2-family);
|
|
6600
6611
|
--font-size: var(--wui-typography-body-2-size);
|
|
6601
6612
|
--font-weight: var(--wui-typography-body-2-weight);
|
|
6602
6613
|
--line-height: var(--wui-typography-body-2-line-height);
|
|
6603
6614
|
${bodyBoldStyles}
|
|
6604
6615
|
`;
|
|
6605
|
-
var body3TextStyle =
|
|
6616
|
+
var body3TextStyle = import_styled_components31.css`
|
|
6606
6617
|
--font-family: var(--wui-typography-body-3-family);
|
|
6607
6618
|
--font-size: var(--wui-typography-body-3-size);
|
|
6608
6619
|
--font-weight: var(--wui-typography-body-3-weight);
|
|
6609
6620
|
--line-height: var(--wui-typography-body-3-line-height);
|
|
6610
6621
|
${bodyBoldStyles}
|
|
6611
6622
|
`;
|
|
6612
|
-
var body4TextStyle =
|
|
6623
|
+
var body4TextStyle = import_styled_components31.css`
|
|
6613
6624
|
--font-family: var(--wui-typography-body-4-family);
|
|
6614
6625
|
--font-size: var(--wui-typography-body-4-size);
|
|
6615
6626
|
--font-weight: var(--wui-typography-body-4-weight);
|
|
6616
6627
|
--line-height: var(--wui-typography-body-4-line-height);
|
|
6617
6628
|
${bodyBoldStyles}
|
|
6618
6629
|
`;
|
|
6619
|
-
var label1TextStyle =
|
|
6630
|
+
var label1TextStyle = import_styled_components31.css`
|
|
6620
6631
|
--font-family: var(--wui-typography-label-1-family);
|
|
6621
6632
|
--font-size: var(--wui-typography-label-1-size);
|
|
6622
6633
|
--font-weight: var(--wui-typography-label-1-weight);
|
|
6623
6634
|
--line-height: var(--wui-typography-label-1-line-height);
|
|
6624
6635
|
${labelBoldStyles}
|
|
6625
6636
|
`;
|
|
6626
|
-
var label2TextStyle =
|
|
6637
|
+
var label2TextStyle = import_styled_components31.css`
|
|
6627
6638
|
--font-family: var(--wui-typography-label-2-family);
|
|
6628
6639
|
--font-size: var(--wui-typography-label-2-size);
|
|
6629
6640
|
--font-weight: var(--wui-typography-label-2-weight);
|
|
6630
6641
|
--line-height: var(--wui-typography-label-2-line-height);
|
|
6631
6642
|
${labelBoldStyles}
|
|
6632
6643
|
`;
|
|
6633
|
-
var label3TextStyle =
|
|
6644
|
+
var label3TextStyle = import_styled_components31.css`
|
|
6634
6645
|
--font-family: var(--wui-typography-label-3-family);
|
|
6635
6646
|
--font-size: var(--wui-typography-label-3-size);
|
|
6636
6647
|
--font-weight: var(--wui-typography-label-3-weight);
|
|
6637
6648
|
--line-height: var(--wui-typography-label-3-line-height);
|
|
6638
6649
|
${labelBoldStyles}
|
|
6639
6650
|
`;
|
|
6640
|
-
var label4TextStyle =
|
|
6651
|
+
var label4TextStyle = import_styled_components31.css`
|
|
6641
6652
|
--font-family: var(--wui-typography-label-4-family);
|
|
6642
6653
|
--font-size: var(--wui-typography-label-4-size);
|
|
6643
6654
|
--font-weight: var(--wui-typography-label-4-weight);
|
|
6644
6655
|
--line-height: var(--wui-typography-label-4-line-height);
|
|
6645
6656
|
${labelBoldStyles}
|
|
6646
6657
|
`;
|
|
6647
|
-
var body1MonoTextStyle =
|
|
6658
|
+
var body1MonoTextStyle = import_styled_components31.css`
|
|
6648
6659
|
${body1TextStyle};
|
|
6649
6660
|
--font-family: var(--wui-typography-family-mono);
|
|
6650
6661
|
`;
|
|
6651
|
-
var body2MonoTextStyle =
|
|
6662
|
+
var body2MonoTextStyle = import_styled_components31.css`
|
|
6652
6663
|
${body2TextStyle};
|
|
6653
6664
|
--font-family: var(--wui-typography-family-mono);
|
|
6654
6665
|
`;
|
|
6655
|
-
var body3MonoTextStyle =
|
|
6666
|
+
var body3MonoTextStyle = import_styled_components31.css`
|
|
6656
6667
|
${body3TextStyle};
|
|
6657
6668
|
--font-family: var(--wui-typography-family-mono);
|
|
6658
6669
|
`;
|
|
6659
|
-
var body4MonoTextStyle =
|
|
6670
|
+
var body4MonoTextStyle = import_styled_components31.css`
|
|
6660
6671
|
${body4TextStyle};
|
|
6661
6672
|
--font-family: var(--wui-typography-family-mono);
|
|
6662
6673
|
`;
|
|
@@ -6674,13 +6685,13 @@ var variantStyleMap2 = {
|
|
|
6674
6685
|
label3: label3TextStyle,
|
|
6675
6686
|
label4: label4TextStyle
|
|
6676
6687
|
};
|
|
6677
|
-
var highContrastProminenceStyle =
|
|
6688
|
+
var highContrastProminenceStyle = import_styled_components31.css`
|
|
6678
6689
|
--text-color: var(--wui-color-text-high-contrast);
|
|
6679
6690
|
`;
|
|
6680
|
-
var vibrantProminenceStyle =
|
|
6691
|
+
var vibrantProminenceStyle = import_styled_components31.css`
|
|
6681
6692
|
--text-color: var(--wui-color-text);
|
|
6682
6693
|
`;
|
|
6683
|
-
var secondaryProminenceStyle =
|
|
6694
|
+
var secondaryProminenceStyle = import_styled_components31.css`
|
|
6684
6695
|
--text-color: var(--wui-color-text-secondary);
|
|
6685
6696
|
`;
|
|
6686
6697
|
var prominenceMap = {
|
|
@@ -6688,7 +6699,7 @@ var prominenceMap = {
|
|
|
6688
6699
|
vibrant: vibrantProminenceStyle,
|
|
6689
6700
|
secondary: secondaryProminenceStyle
|
|
6690
6701
|
};
|
|
6691
|
-
var StyledText =
|
|
6702
|
+
var StyledText = import_styled_components31.default.div`
|
|
6692
6703
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
6693
6704
|
font-family: var(--font-family);
|
|
6694
6705
|
font-size: var(--font-size);
|
|
@@ -6700,19 +6711,19 @@ var StyledText = import_styled_components30.default.div`
|
|
|
6700
6711
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
6701
6712
|
${({ $prominence }) => prominenceMap[$prominence]}
|
|
6702
6713
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
6703
|
-
${({ $inline }) => $inline &&
|
|
6714
|
+
${({ $inline }) => $inline && import_styled_components31.css`
|
|
6704
6715
|
display: inline-block;
|
|
6705
6716
|
`}
|
|
6706
|
-
${({ $disabled }) => $disabled &&
|
|
6717
|
+
${({ $disabled }) => $disabled && import_styled_components31.css`
|
|
6707
6718
|
--text-color: var(--wui-color-text-disabled);
|
|
6708
6719
|
`}
|
|
6709
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
6720
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components31.css`
|
|
6710
6721
|
user-select: none;
|
|
6711
6722
|
`}
|
|
6712
|
-
${({ $align }) =>
|
|
6723
|
+
${({ $align }) => import_styled_components31.css`
|
|
6713
6724
|
text-align: ${$align};
|
|
6714
6725
|
`}
|
|
6715
|
-
${({ as }) => as === "p" &&
|
|
6726
|
+
${({ as }) => as === "p" && import_styled_components31.css`
|
|
6716
6727
|
display: block;
|
|
6717
6728
|
`}
|
|
6718
6729
|
`;
|
|
@@ -6755,13 +6766,13 @@ var Text = makePolymorphic(TextComponent);
|
|
|
6755
6766
|
var import_react21 = require("react");
|
|
6756
6767
|
|
|
6757
6768
|
// src/components/FormGroup/FormGroup.tsx
|
|
6758
|
-
var
|
|
6769
|
+
var import_styled_components32 = __toESM(require("styled-components"));
|
|
6759
6770
|
var import_react20 = require("react");
|
|
6760
6771
|
var import_jsx_runtime177 = require("react/jsx-runtime");
|
|
6761
|
-
var StyledFieldset =
|
|
6772
|
+
var StyledFieldset = import_styled_components32.default.fieldset`
|
|
6762
6773
|
border: 0;
|
|
6763
6774
|
`;
|
|
6764
|
-
var StyledLegend =
|
|
6775
|
+
var StyledLegend = import_styled_components32.default.legend`
|
|
6765
6776
|
margin-bottom: var(--space-01);
|
|
6766
6777
|
`;
|
|
6767
6778
|
var FormGroup = ({ children, label, ...props }) => {
|
|
@@ -6810,7 +6821,7 @@ CheckboxGroup.displayName = "CheckboxGroup";
|
|
|
6810
6821
|
|
|
6811
6822
|
// src/components/FormField/FormField.tsx
|
|
6812
6823
|
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
6813
|
-
var StyledFormField =
|
|
6824
|
+
var StyledFormField = import_styled_components33.default.div`
|
|
6814
6825
|
--form-field-spacing: var(--wui-space-01);
|
|
6815
6826
|
--form-field-error-color: var(--wui-color-text-error);
|
|
6816
6827
|
|
|
@@ -6818,7 +6829,7 @@ var StyledFormField = import_styled_components32.default.div`
|
|
|
6818
6829
|
flex-direction: column;
|
|
6819
6830
|
gap: var(--form-field-spacing);
|
|
6820
6831
|
`;
|
|
6821
|
-
var StyledErrorList =
|
|
6832
|
+
var StyledErrorList = import_styled_components33.default.ul`
|
|
6822
6833
|
margin: 0;
|
|
6823
6834
|
padding: 0;
|
|
6824
6835
|
padding-left: var(--wui-space-04);
|
|
@@ -6932,114 +6943,7 @@ RadioGroup.displayName = "RadioGroup";
|
|
|
6932
6943
|
// src/components/IconButton/IconButton.tsx
|
|
6933
6944
|
var import_react24 = require("react");
|
|
6934
6945
|
var import_styled_components34 = __toESM(require("styled-components"));
|
|
6935
|
-
|
|
6936
|
-
// src/components/Tooltip/Tooltip.tsx
|
|
6937
|
-
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
6938
|
-
var import_styled_components33 = __toESM(require("styled-components"));
|
|
6939
6946
|
var import_jsx_runtime181 = require("react/jsx-runtime");
|
|
6940
|
-
var CompactTooltipStyles = import_styled_components33.css`
|
|
6941
|
-
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
6942
|
-
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
6943
|
-
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
6944
|
-
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
6945
|
-
--tooltip-vertical-padding: var(--wui-space-03);
|
|
6946
|
-
`;
|
|
6947
|
-
var StyledContent = (0, import_styled_components33.default)(import_react_tooltip2.Content)`
|
|
6948
|
-
--tooltip-font-family: var(--wui-typography-family-default);
|
|
6949
|
-
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
6950
|
-
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
6951
|
-
--tooltip-color: var(--wui-color-text-on-fill);
|
|
6952
|
-
--tooltip-font-size: var(--wui-typography-label-3-size);
|
|
6953
|
-
--tooltip-line-height: var(--wui-typography-label-3-line-height);
|
|
6954
|
-
--tooltip-font-weight: var(--wui-typography-label-3-weight);
|
|
6955
|
-
--tooltip-horizontal-padding: var(--wui-space-03);
|
|
6956
|
-
--tooltip-vertical-padding: var(--wui-space-03);
|
|
6957
|
-
|
|
6958
|
-
${({ $compact }) => Boolean($compact) && CompactTooltipStyles};
|
|
6959
|
-
|
|
6960
|
-
font-family: var(--tooltip-font-family);
|
|
6961
|
-
font-size: var(--tooltip-font-size);
|
|
6962
|
-
border-radius: var(--tooltip-border-radius);
|
|
6963
|
-
padding: var(--tooltip-horizontal-padding) var(--tooltip-vertical-padding);
|
|
6964
|
-
background-color: var(--tooltip-bg);
|
|
6965
|
-
color: var(--tooltip-color);
|
|
6966
|
-
user-select: none;
|
|
6967
|
-
animation-duration: 400ms;
|
|
6968
|
-
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
6969
|
-
will-change: transform, opacity;
|
|
6970
|
-
max-width: 30em;
|
|
6971
|
-
|
|
6972
|
-
&[data-state='delayed-open'][data-side='top'] {
|
|
6973
|
-
animation-name: slideDownAndFade;
|
|
6974
|
-
}
|
|
6975
|
-
|
|
6976
|
-
&[data-state='delayed-open'][data-side='right'] {
|
|
6977
|
-
animation-name: slideLeftAndFade;
|
|
6978
|
-
}
|
|
6979
|
-
|
|
6980
|
-
&[data-state='delayed-open'][data-side='bottom'] {
|
|
6981
|
-
animation-name: slideUpAndFade;
|
|
6982
|
-
}
|
|
6983
|
-
|
|
6984
|
-
&[data-state='delayed-open'][data-side='left'] {
|
|
6985
|
-
animation-name: slideRightAndFade;
|
|
6986
|
-
}
|
|
6987
|
-
`;
|
|
6988
|
-
var VISUAL_OFFSET = 6;
|
|
6989
|
-
var Tooltip = ({
|
|
6990
|
-
delay = 700,
|
|
6991
|
-
direction = "top",
|
|
6992
|
-
content,
|
|
6993
|
-
children,
|
|
6994
|
-
forceOpen,
|
|
6995
|
-
compact = false,
|
|
6996
|
-
hideArrow = false
|
|
6997
|
-
}) => {
|
|
6998
|
-
const rootProps = {};
|
|
6999
|
-
if (content === "" || content === null) {
|
|
7000
|
-
rootProps.open = false;
|
|
7001
|
-
}
|
|
7002
|
-
if (forceOpen === true) {
|
|
7003
|
-
rootProps.open = true;
|
|
7004
|
-
}
|
|
7005
|
-
return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
|
|
7006
|
-
import_react_tooltip2.Root,
|
|
7007
|
-
{
|
|
7008
|
-
delayDuration: delay,
|
|
7009
|
-
...rootProps,
|
|
7010
|
-
children: [
|
|
7011
|
-
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
7012
|
-
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(
|
|
7013
|
-
StyledContent,
|
|
7014
|
-
{
|
|
7015
|
-
$compact: compact,
|
|
7016
|
-
side: direction,
|
|
7017
|
-
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
7018
|
-
children: [
|
|
7019
|
-
content,
|
|
7020
|
-
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
7021
|
-
"svg",
|
|
7022
|
-
{
|
|
7023
|
-
fill: "var(--tooltip-bg)",
|
|
7024
|
-
height: "8",
|
|
7025
|
-
style: { transform: "translateY(-2px)" },
|
|
7026
|
-
viewBox: "0 0 12 8",
|
|
7027
|
-
width: "12",
|
|
7028
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7029
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
|
|
7030
|
-
}
|
|
7031
|
-
) }) : null
|
|
7032
|
-
]
|
|
7033
|
-
}
|
|
7034
|
-
) })
|
|
7035
|
-
]
|
|
7036
|
-
}
|
|
7037
|
-
);
|
|
7038
|
-
};
|
|
7039
|
-
Tooltip.displayName = "Tooltip";
|
|
7040
|
-
|
|
7041
|
-
// src/components/IconButton/IconButton.tsx
|
|
7042
|
-
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
7043
6947
|
var StyledButton2 = (0, import_styled_components34.default)(Button)`
|
|
7044
6948
|
--icon-button-size-sm: 24px;
|
|
7045
6949
|
--icon-button-size-md: 32px;
|
|
@@ -7055,9 +6959,9 @@ var StyledButton2 = (0, import_styled_components34.default)(Button)`
|
|
|
7055
6959
|
line-height: 1;
|
|
7056
6960
|
`;
|
|
7057
6961
|
var IconButton = (0, import_react24.forwardRef)(
|
|
7058
|
-
({ children, label,
|
|
6962
|
+
({ children, label, size = "md", ...props }, ref) => {
|
|
7059
6963
|
const responsiveSize = useResponsiveProp(size);
|
|
7060
|
-
|
|
6964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
7061
6965
|
StyledButton2,
|
|
7062
6966
|
{
|
|
7063
6967
|
...props,
|
|
@@ -7070,10 +6974,6 @@ var IconButton = (0, import_react24.forwardRef)(
|
|
|
7070
6974
|
})
|
|
7071
6975
|
}
|
|
7072
6976
|
);
|
|
7073
|
-
if (disableTooltip) {
|
|
7074
|
-
return button;
|
|
7075
|
-
}
|
|
7076
|
-
return /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(Tooltip, { content: label, children: button });
|
|
7077
6977
|
}
|
|
7078
6978
|
);
|
|
7079
6979
|
IconButton.displayName = "IconButton";
|
|
@@ -7082,7 +6982,7 @@ IconButton.displayName = "IconButton";
|
|
|
7082
6982
|
var import_styled_components35 = __toESM(require("styled-components"));
|
|
7083
6983
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
7084
6984
|
var import_type_guards21 = require("@wistia/type-guards");
|
|
7085
|
-
var
|
|
6985
|
+
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
7086
6986
|
var open = import_styled_components35.keyframes`
|
|
7087
6987
|
from {
|
|
7088
6988
|
opacity: 0;
|
|
@@ -7111,7 +7011,6 @@ var menuContentCss = import_styled_components35.css`
|
|
|
7111
7011
|
--menu-padding: var(--wui-space-03);
|
|
7112
7012
|
--menu-min-width: 120px;
|
|
7113
7013
|
--menu-max-width: 284px;
|
|
7114
|
-
--menu-zindex: 500; /* TODO - need z-index token */
|
|
7115
7014
|
|
|
7116
7015
|
animation: ${open}; /* TODO - need easing tokens */
|
|
7117
7016
|
font-family: var(--menu-font-family);
|
|
@@ -7124,7 +7023,7 @@ var menuContentCss = import_styled_components35.css`
|
|
|
7124
7023
|
overflow: auto;
|
|
7125
7024
|
padding: var(--menu-padding);
|
|
7126
7025
|
transform-origin: var(--radix-dropdown-menu-content-transform-origin);
|
|
7127
|
-
z-index: var(--
|
|
7026
|
+
z-index: var(--wui-zindex-menu);
|
|
7128
7027
|
|
|
7129
7028
|
&[data-state='closed'] {
|
|
7130
7029
|
animation: ${close}; /* TODO - need easing tokens */
|
|
@@ -7156,23 +7055,23 @@ var Menu = ({
|
|
|
7156
7055
|
onInteractOutside,
|
|
7157
7056
|
...props
|
|
7158
7057
|
}) => {
|
|
7159
|
-
return /* @__PURE__ */ (0,
|
|
7058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(
|
|
7160
7059
|
import_react_dropdown_menu.DropdownMenu,
|
|
7161
7060
|
{
|
|
7162
7061
|
modal: false,
|
|
7163
7062
|
...(0, import_type_guards21.isNotNil)(onOpenChange) && (0, import_type_guards21.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {},
|
|
7164
7063
|
children: [
|
|
7165
|
-
/* @__PURE__ */ (0,
|
|
7064
|
+
/* @__PURE__ */ (0, import_jsx_runtime182.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards21.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
|
|
7166
7065
|
Button,
|
|
7167
7066
|
{
|
|
7168
7067
|
"aria-expanded": isOpen,
|
|
7169
7068
|
forceState: isOpen ? "active" : void 0,
|
|
7170
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
7069
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(Icon, { type: "caret-down" }),
|
|
7171
7070
|
...triggerProps,
|
|
7172
7071
|
children: label
|
|
7173
7072
|
}
|
|
7174
7073
|
) }),
|
|
7175
|
-
/* @__PURE__ */ (0,
|
|
7074
|
+
/* @__PURE__ */ (0, import_jsx_runtime182.jsx)(import_react_dropdown_menu.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
|
|
7176
7075
|
MenuContent,
|
|
7177
7076
|
{
|
|
7178
7077
|
...props,
|
|
@@ -7193,17 +7092,17 @@ Menu.displayName = "Menu";
|
|
|
7193
7092
|
// src/components/Menu/MenuLabel.tsx
|
|
7194
7093
|
var import_styled_components36 = __toESM(require("styled-components"));
|
|
7195
7094
|
var import_react_dropdown_menu2 = require("@radix-ui/react-dropdown-menu");
|
|
7196
|
-
var
|
|
7095
|
+
var import_jsx_runtime183 = require("react/jsx-runtime");
|
|
7197
7096
|
var StyledMenuLabel = (0, import_styled_components36.default)(import_react_dropdown_menu2.DropdownMenuLabel)`
|
|
7198
7097
|
padding: var(--wui-space-02);
|
|
7199
7098
|
`;
|
|
7200
7099
|
var MenuLabel = ({ children, ...props }) => {
|
|
7201
|
-
return /* @__PURE__ */ (0,
|
|
7100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
|
|
7202
7101
|
StyledMenuLabel,
|
|
7203
7102
|
{
|
|
7204
7103
|
asChild: true,
|
|
7205
7104
|
...props,
|
|
7206
|
-
children: /* @__PURE__ */ (0,
|
|
7105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
|
|
7207
7106
|
Text,
|
|
7208
7107
|
{
|
|
7209
7108
|
variant: "label3",
|
|
@@ -7225,7 +7124,7 @@ var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
|
7225
7124
|
var import_react25 = require("react");
|
|
7226
7125
|
var import_styled_components37 = __toESM(require("styled-components"));
|
|
7227
7126
|
var import_type_guards22 = require("@wistia/type-guards");
|
|
7228
|
-
var
|
|
7127
|
+
var import_jsx_runtime184 = require("react/jsx-runtime");
|
|
7229
7128
|
var StyledButton3 = (0, import_styled_components37.default)(Button)`
|
|
7230
7129
|
--menu-item-border-radius: var(--wui-border-radius-01);
|
|
7231
7130
|
--menu-item-gap: var(--wui-space-01);
|
|
@@ -7271,9 +7170,9 @@ var MenuItemButton = (0, import_react25.forwardRef)(({ children, appearance, com
|
|
|
7271
7170
|
console.warn("colorScheme prop is ignored when appearance is gated");
|
|
7272
7171
|
}
|
|
7273
7172
|
colorScheme = "purple";
|
|
7274
|
-
badge = /* @__PURE__ */ (0,
|
|
7173
|
+
badge = /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(Icon, { type: "sparkle" });
|
|
7275
7174
|
}
|
|
7276
|
-
return /* @__PURE__ */ (0,
|
|
7175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
|
|
7277
7176
|
StyledButton3,
|
|
7278
7177
|
{
|
|
7279
7178
|
...props,
|
|
@@ -7282,9 +7181,9 @@ var MenuItemButton = (0, import_react25.forwardRef)(({ children, appearance, com
|
|
|
7282
7181
|
colorScheme: colorScheme ?? "default",
|
|
7283
7182
|
fullWidth: true,
|
|
7284
7183
|
variant: "ghost",
|
|
7285
|
-
children: /* @__PURE__ */ (0,
|
|
7184
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)(StyledMenuContent, { children: [
|
|
7286
7185
|
children,
|
|
7287
|
-
(0, import_type_guards22.isNotNil)(badge) || (0, import_type_guards22.isNotNil)(command) ? /* @__PURE__ */ (0,
|
|
7186
|
+
(0, import_type_guards22.isNotNil)(badge) || (0, import_type_guards22.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null
|
|
7288
7187
|
] })
|
|
7289
7188
|
}
|
|
7290
7189
|
);
|
|
@@ -7293,7 +7192,7 @@ MenuItemButton.displayName = "MenuItemButton";
|
|
|
7293
7192
|
|
|
7294
7193
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
7295
7194
|
var import_styled_components38 = __toESM(require("styled-components"));
|
|
7296
|
-
var
|
|
7195
|
+
var import_jsx_runtime185 = require("react/jsx-runtime");
|
|
7297
7196
|
var StyledMenuItemLabel = (0, import_styled_components38.default)(Text).attrs({ variant: "label3" })`
|
|
7298
7197
|
grid-area: label;
|
|
7299
7198
|
`;
|
|
@@ -7305,14 +7204,14 @@ var StyledMenuItemDescription = (0, import_styled_components38.default)(Text).at
|
|
|
7305
7204
|
grid-area: description;
|
|
7306
7205
|
`;
|
|
7307
7206
|
var MenuItemLabel = ({ children }) => {
|
|
7308
|
-
return /* @__PURE__ */ (0,
|
|
7207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(StyledMenuItemLabel, { children });
|
|
7309
7208
|
};
|
|
7310
7209
|
var MenuItemDescription = ({ children }) => {
|
|
7311
|
-
return /* @__PURE__ */ (0,
|
|
7210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(StyledMenuItemDescription, { children });
|
|
7312
7211
|
};
|
|
7313
7212
|
|
|
7314
7213
|
// src/components/Menu/SubMenu.tsx
|
|
7315
|
-
var
|
|
7214
|
+
var import_jsx_runtime186 = require("react/jsx-runtime");
|
|
7316
7215
|
var SubMenuContent = (0, import_styled_components39.default)(import_react_dropdown_menu3.DropdownMenuSubContent)`
|
|
7317
7216
|
${menuContentCss}
|
|
7318
7217
|
width: 298px;
|
|
@@ -7335,11 +7234,11 @@ var StyledSubTrigger = (0, import_styled_components39.default)(import_react_drop
|
|
|
7335
7234
|
var SubMenuTrigger = (props) => {
|
|
7336
7235
|
const { isSmAndUp } = useMq();
|
|
7337
7236
|
const Trigger2 = isSmAndUp ? StyledSubTrigger : import_react_dropdown_menu3.DropdownMenuItem;
|
|
7338
|
-
return /* @__PURE__ */ (0,
|
|
7237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(Trigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
7339
7238
|
MenuItemButton,
|
|
7340
7239
|
{
|
|
7341
7240
|
...props,
|
|
7342
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
7241
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(Icon, { type: "caret-right" })
|
|
7343
7242
|
}
|
|
7344
7243
|
) });
|
|
7345
7244
|
};
|
|
@@ -7352,14 +7251,14 @@ var SubMenu = ({
|
|
|
7352
7251
|
}) => {
|
|
7353
7252
|
const { isSmAndUp } = useMq();
|
|
7354
7253
|
const [isExpanded, setIsExpanded] = (0, import_react26.useState)(false);
|
|
7355
|
-
return isSmAndUp ? /* @__PURE__ */ (0,
|
|
7356
|
-
/* @__PURE__ */ (0,
|
|
7357
|
-
/* @__PURE__ */ (0,
|
|
7358
|
-
/* @__PURE__ */ (0,
|
|
7254
|
+
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
7255
|
+
/* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
7256
|
+
/* @__PURE__ */ (0, import_jsx_runtime186.jsx)(MenuItemLabel, { children: label }),
|
|
7257
|
+
/* @__PURE__ */ (0, import_jsx_runtime186.jsx)(MenuItemDescription, { children: description })
|
|
7359
7258
|
] }),
|
|
7360
|
-
/* @__PURE__ */ (0,
|
|
7361
|
-
] }) : /* @__PURE__ */ (0,
|
|
7362
|
-
/* @__PURE__ */ (0,
|
|
7259
|
+
/* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(SubMenuContent, { children }) })
|
|
7260
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
|
|
7261
|
+
/* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
|
|
7363
7262
|
SubMenuTrigger,
|
|
7364
7263
|
{
|
|
7365
7264
|
...props,
|
|
@@ -7368,12 +7267,12 @@ var SubMenu = ({
|
|
|
7368
7267
|
setIsExpanded((prev) => !prev);
|
|
7369
7268
|
},
|
|
7370
7269
|
children: [
|
|
7371
|
-
/* @__PURE__ */ (0,
|
|
7372
|
-
/* @__PURE__ */ (0,
|
|
7270
|
+
/* @__PURE__ */ (0, import_jsx_runtime186.jsx)(MenuItemLabel, { children: label }),
|
|
7271
|
+
/* @__PURE__ */ (0, import_jsx_runtime186.jsx)(MenuItemDescription, { children: description })
|
|
7373
7272
|
]
|
|
7374
7273
|
}
|
|
7375
7274
|
),
|
|
7376
|
-
/* @__PURE__ */ (0,
|
|
7275
|
+
/* @__PURE__ */ (0, import_jsx_runtime186.jsx)(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
7377
7276
|
] });
|
|
7378
7277
|
};
|
|
7379
7278
|
SubMenu.displayName = "SubMenu";
|
|
@@ -7381,15 +7280,15 @@ SubMenu.displayName = "SubMenu";
|
|
|
7381
7280
|
// src/components/Menu/MenuItem.tsx
|
|
7382
7281
|
var import_react27 = require("react");
|
|
7383
7282
|
var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
|
|
7384
|
-
var
|
|
7283
|
+
var import_jsx_runtime187 = require("react/jsx-runtime");
|
|
7385
7284
|
var MenuItem = (0, import_react27.forwardRef)(
|
|
7386
7285
|
({ onSelect = () => null, ...props }, ref) => {
|
|
7387
|
-
return /* @__PURE__ */ (0,
|
|
7286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
7388
7287
|
import_react_dropdown_menu4.DropdownMenuItem,
|
|
7389
7288
|
{
|
|
7390
7289
|
asChild: true,
|
|
7391
7290
|
onSelect,
|
|
7392
|
-
children: /* @__PURE__ */ (0,
|
|
7291
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
7393
7292
|
MenuItemButton,
|
|
7394
7293
|
{
|
|
7395
7294
|
...props,
|
|
@@ -7405,10 +7304,10 @@ MenuItem.displayName = "MenuItem";
|
|
|
7405
7304
|
|
|
7406
7305
|
// src/components/Menu/MenuRadioGroup.tsx
|
|
7407
7306
|
var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
|
|
7408
|
-
var
|
|
7307
|
+
var import_jsx_runtime188 = require("react/jsx-runtime");
|
|
7409
7308
|
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
7410
|
-
return /* @__PURE__ */ (0,
|
|
7411
|
-
/* @__PURE__ */ (0,
|
|
7309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children: [
|
|
7310
|
+
/* @__PURE__ */ (0, import_jsx_runtime188.jsx)(MenuLabel, { children: label }),
|
|
7412
7311
|
children
|
|
7413
7312
|
] });
|
|
7414
7313
|
};
|
|
@@ -7416,11 +7315,11 @@ MenuRadioGroup.displayName = "MenuRadioGroup";
|
|
|
7416
7315
|
|
|
7417
7316
|
// src/components/Menu/RadioMenuItem.tsx
|
|
7418
7317
|
var import_react_dropdown_menu6 = require("@radix-ui/react-dropdown-menu");
|
|
7419
|
-
var
|
|
7318
|
+
var import_jsx_runtime189 = require("react/jsx-runtime");
|
|
7420
7319
|
var RadioMenuItem = ({
|
|
7421
7320
|
onSelect,
|
|
7422
7321
|
value,
|
|
7423
|
-
indicator = /* @__PURE__ */ (0,
|
|
7322
|
+
indicator = /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
|
|
7424
7323
|
Icon,
|
|
7425
7324
|
{
|
|
7426
7325
|
size: "sm",
|
|
@@ -7430,16 +7329,16 @@ var RadioMenuItem = ({
|
|
|
7430
7329
|
...props
|
|
7431
7330
|
}) => {
|
|
7432
7331
|
const extraProps = onSelect ? { onSelect } : {};
|
|
7433
|
-
return /* @__PURE__ */ (0,
|
|
7332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
|
|
7434
7333
|
import_react_dropdown_menu6.DropdownMenuRadioItem,
|
|
7435
7334
|
{
|
|
7436
7335
|
...extraProps,
|
|
7437
7336
|
value,
|
|
7438
|
-
children: /* @__PURE__ */ (0,
|
|
7337
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
|
|
7439
7338
|
MenuItemButton,
|
|
7440
7339
|
{
|
|
7441
7340
|
...props,
|
|
7442
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
7341
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(import_react_dropdown_menu6.DropdownMenuItemIndicator, { children: indicator })
|
|
7443
7342
|
}
|
|
7444
7343
|
)
|
|
7445
7344
|
}
|
|
@@ -7449,9 +7348,9 @@ RadioMenuItem.displayName = "RadioMenuItem";
|
|
|
7449
7348
|
|
|
7450
7349
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
7451
7350
|
var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
|
|
7452
|
-
var
|
|
7351
|
+
var import_jsx_runtime190 = require("react/jsx-runtime");
|
|
7453
7352
|
var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
7454
|
-
return checked ? /* @__PURE__ */ (0,
|
|
7353
|
+
return checked ? /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(
|
|
7455
7354
|
"svg",
|
|
7456
7355
|
{
|
|
7457
7356
|
...props,
|
|
@@ -7461,21 +7360,21 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
7461
7360
|
width: "16",
|
|
7462
7361
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7463
7362
|
children: [
|
|
7464
|
-
/* @__PURE__ */ (0,
|
|
7363
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
7465
7364
|
"path",
|
|
7466
7365
|
{
|
|
7467
7366
|
d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z",
|
|
7468
7367
|
fill: "#2949E5"
|
|
7469
7368
|
}
|
|
7470
7369
|
),
|
|
7471
|
-
/* @__PURE__ */ (0,
|
|
7370
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
7472
7371
|
"path",
|
|
7473
7372
|
{
|
|
7474
7373
|
d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z",
|
|
7475
7374
|
stroke: "#D9D9DE"
|
|
7476
7375
|
}
|
|
7477
7376
|
),
|
|
7478
|
-
/* @__PURE__ */ (0,
|
|
7377
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
7479
7378
|
"path",
|
|
7480
7379
|
{
|
|
7481
7380
|
d: "M6.47275 11.1931L3.3775 8.08009C3.19155 7.89306 3.19155 7.58982 3.3775 7.40278L4.05092 6.72547C4.23688 6.53842 4.53841 6.53842 4.72436 6.72547L6.80947 8.82254L11.2755 4.33082C11.4615 4.1438 11.763 4.1438 11.949 4.33082L12.6224 5.00813C12.8083 5.19516 12.8083 5.4984 12.6224 5.68544L7.14618 11.1931C6.96021 11.3802 6.6587 11.3802 6.47275 11.1931Z",
|
|
@@ -7484,7 +7383,7 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
7484
7383
|
)
|
|
7485
7384
|
]
|
|
7486
7385
|
}
|
|
7487
|
-
) : /* @__PURE__ */ (0,
|
|
7386
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(
|
|
7488
7387
|
"svg",
|
|
7489
7388
|
{
|
|
7490
7389
|
...props,
|
|
@@ -7494,14 +7393,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
7494
7393
|
width: "16",
|
|
7495
7394
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7496
7395
|
children: [
|
|
7497
|
-
/* @__PURE__ */ (0,
|
|
7396
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
7498
7397
|
"path",
|
|
7499
7398
|
{
|
|
7500
7399
|
d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z",
|
|
7501
7400
|
fill: "#FCFCFD"
|
|
7502
7401
|
}
|
|
7503
7402
|
),
|
|
7504
|
-
/* @__PURE__ */ (0,
|
|
7403
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
7505
7404
|
"path",
|
|
7506
7405
|
{
|
|
7507
7406
|
d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z",
|
|
@@ -7518,17 +7417,17 @@ var CheckboxMenuItem = ({
|
|
|
7518
7417
|
onCheckedChange,
|
|
7519
7418
|
...props
|
|
7520
7419
|
}) => {
|
|
7521
|
-
return /* @__PURE__ */ (0,
|
|
7420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
7522
7421
|
import_react_dropdown_menu7.DropdownMenuCheckboxItem,
|
|
7523
7422
|
{
|
|
7524
7423
|
checked,
|
|
7525
7424
|
onCheckedChange,
|
|
7526
7425
|
onSelect,
|
|
7527
|
-
children: /* @__PURE__ */ (0,
|
|
7426
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
7528
7427
|
MenuItemButton,
|
|
7529
7428
|
{
|
|
7530
7429
|
...props,
|
|
7531
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
7430
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(CheckboxIndicator2, { checked })
|
|
7532
7431
|
}
|
|
7533
7432
|
)
|
|
7534
7433
|
}
|
|
@@ -7536,17 +7435,296 @@ var CheckboxMenuItem = ({
|
|
|
7536
7435
|
};
|
|
7537
7436
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
7538
7437
|
|
|
7539
|
-
// src/components/
|
|
7540
|
-
var
|
|
7438
|
+
// src/components/Modal/Modal.tsx
|
|
7439
|
+
var import_react30 = require("react");
|
|
7440
|
+
var import_styled_components44 = __toESM(require("styled-components"));
|
|
7441
|
+
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
7442
|
+
var import_type_guards25 = require("@wistia/type-guards");
|
|
7443
|
+
|
|
7444
|
+
// src/components/Modal/ModalHeader.tsx
|
|
7445
|
+
var import_styled_components42 = __toESM(require("styled-components"));
|
|
7446
|
+
var import_react_dialog2 = require("@radix-ui/react-dialog");
|
|
7447
|
+
|
|
7448
|
+
// src/components/Modal/ModalCloseButton.tsx
|
|
7541
7449
|
var import_styled_components40 = __toESM(require("styled-components"));
|
|
7450
|
+
var import_react_dialog = require("@radix-ui/react-dialog");
|
|
7451
|
+
var import_jsx_runtime191 = require("react/jsx-runtime");
|
|
7452
|
+
var CloseButton = (0, import_styled_components40.default)(import_react_dialog.Close)`
|
|
7453
|
+
align-self: start;
|
|
7454
|
+
`;
|
|
7455
|
+
var ModalCloseButton = () => {
|
|
7456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(CloseButton, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
7457
|
+
IconButton,
|
|
7458
|
+
{
|
|
7459
|
+
disableTooltip: true,
|
|
7460
|
+
label: "Dismiss modal",
|
|
7461
|
+
size: "sm",
|
|
7462
|
+
variant: "ghost",
|
|
7463
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(Icon, { type: "close" })
|
|
7464
|
+
}
|
|
7465
|
+
) });
|
|
7466
|
+
};
|
|
7467
|
+
|
|
7468
|
+
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
7469
|
+
var import_styled_components41 = __toESM(require("styled-components"));
|
|
7542
7470
|
var import_type_guards23 = require("@wistia/type-guards");
|
|
7543
7471
|
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
7544
|
-
var
|
|
7472
|
+
var VisuallyHidden = import_styled_components41.default.div({ ...visuallyHiddenStyle });
|
|
7473
|
+
var VisuallyHiddenButFocusable = import_styled_components41.default.div({
|
|
7474
|
+
"&:not(:focus-within)": visuallyHiddenStyle
|
|
7475
|
+
});
|
|
7476
|
+
var ScreenReaderOnly = ({
|
|
7477
|
+
text,
|
|
7478
|
+
children,
|
|
7479
|
+
focusable = false,
|
|
7480
|
+
...otherProps
|
|
7481
|
+
}) => {
|
|
7482
|
+
const accessibleText = (0, import_type_guards23.isNotNil)(text) ? text : children;
|
|
7483
|
+
if (focusable) {
|
|
7484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
7485
|
+
}
|
|
7486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
7487
|
+
};
|
|
7488
|
+
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
7489
|
+
|
|
7490
|
+
// src/components/Modal/ModalHeader.tsx
|
|
7491
|
+
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
7492
|
+
var Header = import_styled_components42.default.header`
|
|
7493
|
+
display: flex;
|
|
7494
|
+
order: 1;
|
|
7495
|
+
gap: var(--wui-space-01);
|
|
7496
|
+
margin-bottom: var(--wui-space-03);
|
|
7497
|
+
justify-content: space-between;
|
|
7498
|
+
|
|
7499
|
+
/* DialogTitle creates an h2 element which inherits some margin */
|
|
7500
|
+
h2 {
|
|
7501
|
+
margin-top: 0;
|
|
7502
|
+
}
|
|
7503
|
+
`;
|
|
7504
|
+
var Title = (0, import_styled_components42.default)(import_react_dialog2.Title)`
|
|
7505
|
+
font-family: var(--wui-typography-heading-2-family);
|
|
7506
|
+
line-height: var(--wui-typography-heading-2-line-height);
|
|
7507
|
+
font-size: var(--wui-typography-heading-2-size);
|
|
7508
|
+
font-weight: var(--wui-typography-heading-2-weight);
|
|
7509
|
+
`;
|
|
7510
|
+
var ModalHeader = ({
|
|
7511
|
+
title,
|
|
7512
|
+
hideTitle,
|
|
7513
|
+
hideCloseButton
|
|
7514
|
+
}) => {
|
|
7515
|
+
const TitleWrapper = hideTitle ? ScreenReaderOnly : Title;
|
|
7516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(Header, { children: [
|
|
7517
|
+
/* @__PURE__ */ (0, import_jsx_runtime193.jsx)(TitleWrapper, { children: title }),
|
|
7518
|
+
hideCloseButton ? null : /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(ModalCloseButton, {})
|
|
7519
|
+
] });
|
|
7520
|
+
};
|
|
7521
|
+
|
|
7522
|
+
// src/private/components/Backdrop/Backdrop.tsx
|
|
7523
|
+
var import_react28 = require("react");
|
|
7524
|
+
var import_styled_components43 = __toESM(require("styled-components"));
|
|
7525
|
+
var import_jsx_runtime194 = require("react/jsx-runtime");
|
|
7526
|
+
var backdropAnimationDuration = 150;
|
|
7527
|
+
var alignVerticalMap = {
|
|
7528
|
+
stretch: "normal",
|
|
7529
|
+
top: "start",
|
|
7530
|
+
center: "center",
|
|
7531
|
+
bottom: "end"
|
|
7532
|
+
};
|
|
7533
|
+
var alignHorizontalMap = {
|
|
7534
|
+
left: "start",
|
|
7535
|
+
center: "center",
|
|
7536
|
+
right: "end"
|
|
7537
|
+
};
|
|
7538
|
+
var BackdropComponent = import_styled_components43.default.div`
|
|
7539
|
+
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
7540
|
+
animation-name: backdropShow;
|
|
7541
|
+
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
7542
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
7543
|
+
background: var(--wui-color-backdrop);
|
|
7544
|
+
display: flex;
|
|
7545
|
+
inset: 0;
|
|
7546
|
+
justify-content: ${({ $alignHorizontal }) => alignHorizontalMap[$alignHorizontal]};
|
|
7547
|
+
overflow-y: auto;
|
|
7548
|
+
position: fixed;
|
|
7549
|
+
z-index: var(--wui-zindex-backdrop);
|
|
7550
|
+
|
|
7551
|
+
@keyframes backdropShow {
|
|
7552
|
+
from {
|
|
7553
|
+
opacity: 0;
|
|
7554
|
+
}
|
|
7555
|
+
|
|
7556
|
+
to {
|
|
7557
|
+
opacity: 1;
|
|
7558
|
+
}
|
|
7559
|
+
}
|
|
7560
|
+
`;
|
|
7561
|
+
var Backdrop = (0, import_react28.forwardRef)(
|
|
7562
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
|
|
7563
|
+
BackdropComponent,
|
|
7564
|
+
{
|
|
7565
|
+
ref,
|
|
7566
|
+
$alignHorizontal: alignHorizontal,
|
|
7567
|
+
$alignVertical: alignVertical,
|
|
7568
|
+
...otherProps,
|
|
7569
|
+
children
|
|
7570
|
+
}
|
|
7571
|
+
)
|
|
7572
|
+
);
|
|
7573
|
+
Backdrop.displayName = "Backdrop";
|
|
7574
|
+
|
|
7575
|
+
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
7576
|
+
var import_react29 = require("react");
|
|
7577
|
+
var import_type_guards24 = require("@wistia/type-guards");
|
|
7578
|
+
var useFocusRestore = () => {
|
|
7579
|
+
const previouslyFocusedRef = (0, import_react29.useRef)(null);
|
|
7580
|
+
(0, import_react29.useEffect)(() => {
|
|
7581
|
+
previouslyFocusedRef.current = document.activeElement;
|
|
7582
|
+
}, []);
|
|
7583
|
+
(0, import_react29.useEffect)(() => {
|
|
7584
|
+
return () => {
|
|
7585
|
+
if ((0, import_type_guards24.isNotNil)(previouslyFocusedRef.current)) {
|
|
7586
|
+
setTimeout(() => {
|
|
7587
|
+
previouslyFocusedRef.current?.focus();
|
|
7588
|
+
}, 0);
|
|
7589
|
+
}
|
|
7590
|
+
};
|
|
7591
|
+
}, []);
|
|
7592
|
+
};
|
|
7593
|
+
|
|
7594
|
+
// src/components/Modal/Modal.tsx
|
|
7595
|
+
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
7596
|
+
var StyledModalContent = (0, import_styled_components44.default)(import_react_dialog3.Content)`
|
|
7597
|
+
background-color: var(--wui-color-bg-app);
|
|
7598
|
+
box-sizing: border-box;
|
|
7599
|
+
display: flex;
|
|
7600
|
+
flex-direction: column;
|
|
7601
|
+
height: 100vh;
|
|
7602
|
+
left: 0;
|
|
7603
|
+
overflow: auto;
|
|
7604
|
+
padding: var(--wui-space-05);
|
|
7605
|
+
position: fixed;
|
|
7606
|
+
top: 0;
|
|
7607
|
+
width: 100vw;
|
|
7608
|
+
z-index: var(--wui-zindex-modal);
|
|
7609
|
+
|
|
7610
|
+
${mq.smAndUp} {
|
|
7611
|
+
animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
7612
|
+
border-radius: var(--wui-border-radius-03);
|
|
7613
|
+
left: 50%;
|
|
7614
|
+
margin: var(--wui-space-02);
|
|
7615
|
+
height: ${({ $fullHeight }) => $fullHeight ? "min-content" : "auto"};
|
|
7616
|
+
max-height: 90vh;
|
|
7617
|
+
${({ $fullHeight }) => $fullHeight ? "min-height: calc(100vh - 48px);" : ""}
|
|
7618
|
+
max-width: 90vw;
|
|
7619
|
+
top: 50%;
|
|
7620
|
+
transform: translate(-50%, -50%);
|
|
7621
|
+
min-width: ${({ $width }) => $width ?? "80vw"};
|
|
7622
|
+
}
|
|
7623
|
+
|
|
7624
|
+
@keyframes contentShow {
|
|
7625
|
+
from {
|
|
7626
|
+
opacity: 0;
|
|
7627
|
+
transform: translate(-50%, -48%) scale(0.96);
|
|
7628
|
+
}
|
|
7629
|
+
|
|
7630
|
+
to {
|
|
7631
|
+
opacity: 1;
|
|
7632
|
+
transform: translate(-50%, -50%) scale(1);
|
|
7633
|
+
}
|
|
7634
|
+
}
|
|
7635
|
+
`;
|
|
7636
|
+
var ModalContent = (0, import_react30.forwardRef)(
|
|
7637
|
+
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
7638
|
+
useFocusRestore();
|
|
7639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
|
|
7640
|
+
StyledModalContent,
|
|
7641
|
+
{
|
|
7642
|
+
ref,
|
|
7643
|
+
$fullHeight: fullHeight,
|
|
7644
|
+
$width: width,
|
|
7645
|
+
...otherProps,
|
|
7646
|
+
children
|
|
7647
|
+
}
|
|
7648
|
+
);
|
|
7649
|
+
}
|
|
7650
|
+
);
|
|
7651
|
+
ModalContent.displayName = "ModalContent";
|
|
7652
|
+
var ModalBody = import_styled_components44.default.div`
|
|
7653
|
+
flex-direction: column;
|
|
7654
|
+
display: flex;
|
|
7655
|
+
order: 2;
|
|
7656
|
+
`;
|
|
7657
|
+
var Modal = (0, import_react30.forwardRef)(
|
|
7658
|
+
({
|
|
7659
|
+
children,
|
|
7660
|
+
fullHeight = false,
|
|
7661
|
+
hideCloseButton = false,
|
|
7662
|
+
hideTitle = false,
|
|
7663
|
+
initialFocusRef,
|
|
7664
|
+
isOpen,
|
|
7665
|
+
onRequestClose,
|
|
7666
|
+
title,
|
|
7667
|
+
width,
|
|
7668
|
+
...props
|
|
7669
|
+
}, ref) => {
|
|
7670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
|
|
7671
|
+
import_react_dialog3.Root,
|
|
7672
|
+
{
|
|
7673
|
+
onOpenChange: (open2) => {
|
|
7674
|
+
if (!open2 && (0, import_type_guards25.isNotNil)(onRequestClose)) {
|
|
7675
|
+
onRequestClose();
|
|
7676
|
+
}
|
|
7677
|
+
},
|
|
7678
|
+
open: isOpen,
|
|
7679
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(import_react_dialog3.Portal, { children: [
|
|
7680
|
+
/* @__PURE__ */ (0, import_jsx_runtime195.jsx)(Backdrop, {}),
|
|
7681
|
+
/* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
|
|
7682
|
+
ModalContent,
|
|
7683
|
+
{
|
|
7684
|
+
ref,
|
|
7685
|
+
"aria-describedby": void 0,
|
|
7686
|
+
fullHeight,
|
|
7687
|
+
onOpenAutoFocus: (event) => {
|
|
7688
|
+
if ((0, import_type_guards25.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
7689
|
+
event.preventDefault();
|
|
7690
|
+
requestAnimationFrame(() => {
|
|
7691
|
+
initialFocusRef.current?.focus();
|
|
7692
|
+
});
|
|
7693
|
+
}
|
|
7694
|
+
},
|
|
7695
|
+
width,
|
|
7696
|
+
...props,
|
|
7697
|
+
children: [
|
|
7698
|
+
/* @__PURE__ */ (0, import_jsx_runtime195.jsx)(ModalBody, { children }),
|
|
7699
|
+
/* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
|
|
7700
|
+
ModalHeader,
|
|
7701
|
+
{
|
|
7702
|
+
hideCloseButton,
|
|
7703
|
+
hideTitle,
|
|
7704
|
+
title
|
|
7705
|
+
}
|
|
7706
|
+
)
|
|
7707
|
+
]
|
|
7708
|
+
}
|
|
7709
|
+
)
|
|
7710
|
+
] })
|
|
7711
|
+
}
|
|
7712
|
+
);
|
|
7713
|
+
}
|
|
7714
|
+
);
|
|
7715
|
+
Modal.displayName = "Modal";
|
|
7716
|
+
|
|
7717
|
+
// src/components/Radio/Radio.tsx
|
|
7718
|
+
var import_react31 = require("react");
|
|
7719
|
+
var import_styled_components45 = __toESM(require("styled-components"));
|
|
7720
|
+
var import_type_guards26 = require("@wistia/type-guards");
|
|
7721
|
+
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
7722
|
+
var StyledLabelWrapper2 = import_styled_components45.default.div`
|
|
7545
7723
|
display: flex;
|
|
7546
7724
|
flex-direction: column;
|
|
7547
7725
|
padding-left: var(--wui-space-02);
|
|
7548
7726
|
`;
|
|
7549
|
-
var StyledRadio =
|
|
7727
|
+
var StyledRadio = import_styled_components45.default.input`
|
|
7550
7728
|
box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
|
|
7551
7729
|
appearance: none;
|
|
7552
7730
|
margin: 0;
|
|
@@ -7572,11 +7750,11 @@ var StyledRadio = import_styled_components40.default.input`
|
|
|
7572
7750
|
transform: scale(1);
|
|
7573
7751
|
}
|
|
7574
7752
|
`;
|
|
7575
|
-
var disabledStyle2 =
|
|
7753
|
+
var disabledStyle2 = import_styled_components45.css`
|
|
7576
7754
|
cursor: not-allowed;
|
|
7577
7755
|
opacity: 0.5;
|
|
7578
7756
|
`;
|
|
7579
|
-
var errorStyle =
|
|
7757
|
+
var errorStyle = import_styled_components45.css`
|
|
7580
7758
|
/* TODO Lamp to design error state */
|
|
7581
7759
|
&:hover,
|
|
7582
7760
|
&:focus,
|
|
@@ -7584,11 +7762,11 @@ var errorStyle = import_styled_components40.css`
|
|
|
7584
7762
|
border-color: transparent !important;
|
|
7585
7763
|
}
|
|
7586
7764
|
`;
|
|
7587
|
-
var defaultHoverStyle =
|
|
7765
|
+
var defaultHoverStyle = import_styled_components45.css`
|
|
7588
7766
|
/* TODO Lamp to design hover state */
|
|
7589
7767
|
cursor: pointer;
|
|
7590
7768
|
`;
|
|
7591
|
-
var StyledRadioWrapper =
|
|
7769
|
+
var StyledRadioWrapper = import_styled_components45.default.div`
|
|
7592
7770
|
align-items: baseline;
|
|
7593
7771
|
border: 1px solid transparent;
|
|
7594
7772
|
border-radius: 4px;
|
|
@@ -7611,7 +7789,7 @@ var StyledRadioWrapper = import_styled_components40.default.div`
|
|
|
7611
7789
|
|
|
7612
7790
|
${({ disabled }) => disabled && disabledStyle2};
|
|
7613
7791
|
`;
|
|
7614
|
-
var Radio = (0,
|
|
7792
|
+
var Radio = (0, import_react31.forwardRef)(
|
|
7615
7793
|
({
|
|
7616
7794
|
checked,
|
|
7617
7795
|
disabled = false,
|
|
@@ -7624,15 +7802,15 @@ var Radio = (0, import_react28.forwardRef)(
|
|
|
7624
7802
|
value = "false",
|
|
7625
7803
|
...otherProps
|
|
7626
7804
|
}, ref) => {
|
|
7627
|
-
const generatedId = (0,
|
|
7628
|
-
const computedId = (0,
|
|
7629
|
-
return /* @__PURE__ */ (0,
|
|
7805
|
+
const generatedId = (0, import_react31.useId)();
|
|
7806
|
+
const computedId = (0, import_type_guards26.isNonEmptyString)(id) ? id : `ui-radio-${generatedId}`;
|
|
7807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(
|
|
7630
7808
|
StyledRadioWrapper,
|
|
7631
7809
|
{
|
|
7632
7810
|
"aria-invalid": otherProps["aria-invalid"],
|
|
7633
7811
|
disabled,
|
|
7634
7812
|
children: [
|
|
7635
|
-
/* @__PURE__ */ (0,
|
|
7813
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
7636
7814
|
StyledRadio,
|
|
7637
7815
|
{
|
|
7638
7816
|
ref,
|
|
@@ -7647,8 +7825,8 @@ var Radio = (0, import_react28.forwardRef)(
|
|
|
7647
7825
|
...otherProps
|
|
7648
7826
|
}
|
|
7649
7827
|
),
|
|
7650
|
-
/* @__PURE__ */ (0,
|
|
7651
|
-
/* @__PURE__ */ (0,
|
|
7828
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(StyledLabelWrapper2, { children: [
|
|
7829
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
7652
7830
|
Label,
|
|
7653
7831
|
{
|
|
7654
7832
|
disabled,
|
|
@@ -7657,7 +7835,7 @@ var Radio = (0, import_react28.forwardRef)(
|
|
|
7657
7835
|
children: label
|
|
7658
7836
|
}
|
|
7659
7837
|
),
|
|
7660
|
-
/* @__PURE__ */ (0,
|
|
7838
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsx)(LabelDescription, { children: description })
|
|
7661
7839
|
] })
|
|
7662
7840
|
]
|
|
7663
7841
|
}
|
|
@@ -7666,34 +7844,12 @@ var Radio = (0, import_react28.forwardRef)(
|
|
|
7666
7844
|
);
|
|
7667
7845
|
Radio.displayName = "Radio";
|
|
7668
7846
|
|
|
7669
|
-
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
7670
|
-
var import_styled_components41 = __toESM(require("styled-components"));
|
|
7671
|
-
var import_type_guards24 = require("@wistia/type-guards");
|
|
7672
|
-
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
7673
|
-
var VisuallyHidden = import_styled_components41.default.div({ ...visuallyHiddenStyle });
|
|
7674
|
-
var VisuallyHiddenButFocusable = import_styled_components41.default.div({
|
|
7675
|
-
"&:not(:focus-within)": visuallyHiddenStyle
|
|
7676
|
-
});
|
|
7677
|
-
var ScreenReaderOnly = ({
|
|
7678
|
-
text,
|
|
7679
|
-
children,
|
|
7680
|
-
focusable = false,
|
|
7681
|
-
...otherProps
|
|
7682
|
-
}) => {
|
|
7683
|
-
const accessibleText = (0, import_type_guards24.isNotNil)(text) ? text : children;
|
|
7684
|
-
if (focusable) {
|
|
7685
|
-
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
7686
|
-
}
|
|
7687
|
-
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
7688
|
-
};
|
|
7689
|
-
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
7690
|
-
|
|
7691
7847
|
// src/components/Tag/Tag.tsx
|
|
7692
|
-
var
|
|
7693
|
-
var
|
|
7694
|
-
var
|
|
7695
|
-
var
|
|
7696
|
-
var TagLabel =
|
|
7848
|
+
var import_react32 = require("react");
|
|
7849
|
+
var import_styled_components46 = __toESM(require("styled-components"));
|
|
7850
|
+
var import_type_guards27 = require("@wistia/type-guards");
|
|
7851
|
+
var import_jsx_runtime197 = require("react/jsx-runtime");
|
|
7852
|
+
var TagLabel = import_styled_components46.default.a`
|
|
7697
7853
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7698
7854
|
font-size: var(--wui-typography-label-4-size);
|
|
7699
7855
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -7721,14 +7877,14 @@ var TagLabel = import_styled_components42.default.a`
|
|
|
7721
7877
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
7722
7878
|
}
|
|
7723
7879
|
`;
|
|
7724
|
-
var TagDivider =
|
|
7880
|
+
var TagDivider = import_styled_components46.default.div`
|
|
7725
7881
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7726
7882
|
border-left: 1px solid var(--wui-color-border);
|
|
7727
7883
|
display: flex;
|
|
7728
7884
|
height: 14px;
|
|
7729
7885
|
width: 1px;
|
|
7730
7886
|
`;
|
|
7731
|
-
var StyledRemoveButton =
|
|
7887
|
+
var StyledRemoveButton = import_styled_components46.default.button`
|
|
7732
7888
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7733
7889
|
all: unset;
|
|
7734
7890
|
cursor: pointer;
|
|
@@ -7756,7 +7912,7 @@ var StyledRemoveButton = import_styled_components42.default.button`
|
|
|
7756
7912
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
7757
7913
|
}
|
|
7758
7914
|
`;
|
|
7759
|
-
var StyledTag =
|
|
7915
|
+
var StyledTag = import_styled_components46.default.div`
|
|
7760
7916
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7761
7917
|
align-items: center;
|
|
7762
7918
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -7765,47 +7921,47 @@ var StyledTag = import_styled_components42.default.div`
|
|
|
7765
7921
|
overflow: hidden;
|
|
7766
7922
|
`;
|
|
7767
7923
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
7768
|
-
if ((0,
|
|
7924
|
+
if ((0, import_type_guards27.isNil)(onClickRemove)) {
|
|
7769
7925
|
return null;
|
|
7770
7926
|
}
|
|
7771
|
-
if ((0,
|
|
7927
|
+
if ((0, import_type_guards27.isNil)(onClickRemoveLabel)) {
|
|
7772
7928
|
throw new Error(
|
|
7773
7929
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
7774
7930
|
);
|
|
7775
7931
|
}
|
|
7776
|
-
return /* @__PURE__ */ (0,
|
|
7777
|
-
/* @__PURE__ */ (0,
|
|
7778
|
-
/* @__PURE__ */ (0,
|
|
7932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(import_jsx_runtime197.Fragment, { children: [
|
|
7933
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
7934
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
|
|
7779
7935
|
StyledRemoveButton,
|
|
7780
7936
|
{
|
|
7781
7937
|
$colorScheme: colorScheme,
|
|
7782
7938
|
onClick: onClickRemove,
|
|
7783
7939
|
type: "button",
|
|
7784
7940
|
children: [
|
|
7785
|
-
/* @__PURE__ */ (0,
|
|
7941
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
7786
7942
|
Icon,
|
|
7787
7943
|
{
|
|
7788
7944
|
size: "sm",
|
|
7789
7945
|
type: "close"
|
|
7790
7946
|
}
|
|
7791
7947
|
),
|
|
7792
|
-
/* @__PURE__ */ (0,
|
|
7948
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
7793
7949
|
]
|
|
7794
7950
|
}
|
|
7795
7951
|
)
|
|
7796
7952
|
] });
|
|
7797
7953
|
};
|
|
7798
|
-
var Tag = (0,
|
|
7954
|
+
var Tag = (0, import_react32.forwardRef)(
|
|
7799
7955
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
7800
|
-
const labelProps = (0,
|
|
7801
|
-
return /* @__PURE__ */ (0,
|
|
7956
|
+
const labelProps = (0, import_type_guards27.isNotNil)(href) && (0, import_type_guards27.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
7957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
|
|
7802
7958
|
StyledTag,
|
|
7803
7959
|
{
|
|
7804
7960
|
ref,
|
|
7805
7961
|
$colorScheme: colorScheme,
|
|
7806
7962
|
...otherProps,
|
|
7807
7963
|
children: [
|
|
7808
|
-
/* @__PURE__ */ (0,
|
|
7964
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
7809
7965
|
TagLabel,
|
|
7810
7966
|
{
|
|
7811
7967
|
...labelProps,
|
|
@@ -7813,7 +7969,7 @@ var Tag = (0, import_react29.forwardRef)(
|
|
|
7813
7969
|
children: label
|
|
7814
7970
|
}
|
|
7815
7971
|
),
|
|
7816
|
-
/* @__PURE__ */ (0,
|
|
7972
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
7817
7973
|
RemoveButton,
|
|
7818
7974
|
{
|
|
7819
7975
|
colorScheme,
|
|
@@ -7828,27 +7984,132 @@ var Tag = (0, import_react29.forwardRef)(
|
|
|
7828
7984
|
);
|
|
7829
7985
|
Tag.displayName = "Tag";
|
|
7830
7986
|
|
|
7987
|
+
// src/components/Tooltip/Tooltip.tsx
|
|
7988
|
+
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
7989
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
7990
|
+
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
7991
|
+
var CompactTooltipStyles = import_styled_components47.css`
|
|
7992
|
+
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
7993
|
+
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
7994
|
+
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
7995
|
+
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
7996
|
+
--tooltip-vertical-padding: var(--wui-space-03);
|
|
7997
|
+
`;
|
|
7998
|
+
var StyledContent = (0, import_styled_components47.default)(import_react_tooltip2.Content)`
|
|
7999
|
+
--tooltip-font-family: var(--wui-typography-family-default);
|
|
8000
|
+
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
8001
|
+
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
8002
|
+
--tooltip-color: var(--wui-color-text-on-fill);
|
|
8003
|
+
--tooltip-font-size: var(--wui-typography-label-3-size);
|
|
8004
|
+
--tooltip-line-height: var(--wui-typography-label-3-line-height);
|
|
8005
|
+
--tooltip-font-weight: var(--wui-typography-label-3-weight);
|
|
8006
|
+
--tooltip-horizontal-padding: var(--wui-space-03);
|
|
8007
|
+
--tooltip-vertical-padding: var(--wui-space-03);
|
|
8008
|
+
|
|
8009
|
+
${({ $compact }) => Boolean($compact) && CompactTooltipStyles};
|
|
8010
|
+
|
|
8011
|
+
font-family: var(--tooltip-font-family);
|
|
8012
|
+
font-size: var(--tooltip-font-size);
|
|
8013
|
+
border-radius: var(--tooltip-border-radius);
|
|
8014
|
+
padding: var(--tooltip-horizontal-padding) var(--tooltip-vertical-padding);
|
|
8015
|
+
background-color: var(--tooltip-bg);
|
|
8016
|
+
color: var(--tooltip-color);
|
|
8017
|
+
user-select: none;
|
|
8018
|
+
animation-duration: 400ms;
|
|
8019
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
8020
|
+
will-change: transform, opacity;
|
|
8021
|
+
max-width: 30em;
|
|
8022
|
+
|
|
8023
|
+
&[data-state='delayed-open'][data-side='top'] {
|
|
8024
|
+
animation-name: slideDownAndFade;
|
|
8025
|
+
}
|
|
8026
|
+
|
|
8027
|
+
&[data-state='delayed-open'][data-side='right'] {
|
|
8028
|
+
animation-name: slideLeftAndFade;
|
|
8029
|
+
}
|
|
8030
|
+
|
|
8031
|
+
&[data-state='delayed-open'][data-side='bottom'] {
|
|
8032
|
+
animation-name: slideUpAndFade;
|
|
8033
|
+
}
|
|
8034
|
+
|
|
8035
|
+
&[data-state='delayed-open'][data-side='left'] {
|
|
8036
|
+
animation-name: slideRightAndFade;
|
|
8037
|
+
}
|
|
8038
|
+
`;
|
|
8039
|
+
var VISUAL_OFFSET = 6;
|
|
8040
|
+
var Tooltip = ({
|
|
8041
|
+
delay = 700,
|
|
8042
|
+
direction = "top",
|
|
8043
|
+
content,
|
|
8044
|
+
children,
|
|
8045
|
+
forceOpen,
|
|
8046
|
+
compact = false,
|
|
8047
|
+
hideArrow = false
|
|
8048
|
+
}) => {
|
|
8049
|
+
const rootProps = {};
|
|
8050
|
+
if (content === "" || content === null) {
|
|
8051
|
+
rootProps.open = false;
|
|
8052
|
+
}
|
|
8053
|
+
if (forceOpen === true) {
|
|
8054
|
+
rootProps.open = true;
|
|
8055
|
+
}
|
|
8056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
|
|
8057
|
+
import_react_tooltip2.Root,
|
|
8058
|
+
{
|
|
8059
|
+
delayDuration: delay,
|
|
8060
|
+
...rootProps,
|
|
8061
|
+
children: [
|
|
8062
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
8063
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
|
|
8064
|
+
StyledContent,
|
|
8065
|
+
{
|
|
8066
|
+
$compact: compact,
|
|
8067
|
+
side: direction,
|
|
8068
|
+
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
8069
|
+
children: [
|
|
8070
|
+
content,
|
|
8071
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
8072
|
+
"svg",
|
|
8073
|
+
{
|
|
8074
|
+
fill: "var(--tooltip-bg)",
|
|
8075
|
+
height: "8",
|
|
8076
|
+
style: { transform: "translateY(-2px)" },
|
|
8077
|
+
viewBox: "0 0 12 8",
|
|
8078
|
+
width: "12",
|
|
8079
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8080
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
|
|
8081
|
+
}
|
|
8082
|
+
) }) : null
|
|
8083
|
+
]
|
|
8084
|
+
}
|
|
8085
|
+
) })
|
|
8086
|
+
]
|
|
8087
|
+
}
|
|
8088
|
+
);
|
|
8089
|
+
};
|
|
8090
|
+
Tooltip.displayName = "Tooltip";
|
|
8091
|
+
|
|
7831
8092
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
7832
|
-
var
|
|
7833
|
-
var
|
|
7834
|
-
var
|
|
8093
|
+
var import_styled_components48 = __toESM(require("styled-components"));
|
|
8094
|
+
var import_type_guards28 = require("@wistia/type-guards");
|
|
8095
|
+
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
7835
8096
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
7836
8097
|
if (iconOnly) {
|
|
7837
|
-
return /* @__PURE__ */ (0,
|
|
8098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
7838
8099
|
"g",
|
|
7839
8100
|
{
|
|
7840
8101
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
7841
8102
|
fill: brandmarkColor,
|
|
7842
|
-
children: /* @__PURE__ */ (0,
|
|
8103
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
7843
8104
|
}
|
|
7844
8105
|
);
|
|
7845
8106
|
}
|
|
7846
|
-
return /* @__PURE__ */ (0,
|
|
8107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
7847
8108
|
"g",
|
|
7848
8109
|
{
|
|
7849
8110
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
7850
8111
|
fill: brandmarkColor,
|
|
7851
|
-
children: /* @__PURE__ */ (0,
|
|
8112
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
7852
8113
|
}
|
|
7853
8114
|
);
|
|
7854
8115
|
};
|
|
@@ -7856,12 +8117,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
7856
8117
|
if (iconOnly) {
|
|
7857
8118
|
return null;
|
|
7858
8119
|
}
|
|
7859
|
-
return /* @__PURE__ */ (0,
|
|
8120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
7860
8121
|
"g",
|
|
7861
8122
|
{
|
|
7862
8123
|
"data-testid": "ui-wistia-logo-logotype",
|
|
7863
8124
|
fill: logotypeColor,
|
|
7864
|
-
children: /* @__PURE__ */ (0,
|
|
8125
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
|
|
7865
8126
|
}
|
|
7866
8127
|
);
|
|
7867
8128
|
};
|
|
@@ -7871,7 +8132,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
7871
8132
|
}
|
|
7872
8133
|
return "0 0 144 31.47";
|
|
7873
8134
|
};
|
|
7874
|
-
var WistiaLogoComponent =
|
|
8135
|
+
var WistiaLogoComponent = import_styled_components48.default.svg`
|
|
7875
8136
|
height: ${({ height }) => `${height}px`};
|
|
7876
8137
|
|
|
7877
8138
|
/* ensure it will always fit on mobile */
|
|
@@ -7913,7 +8174,7 @@ var WistiaLogo = ({
|
|
|
7913
8174
|
};
|
|
7914
8175
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
7915
8176
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
7916
|
-
const Logo = /* @__PURE__ */ (0,
|
|
8177
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(
|
|
7917
8178
|
WistiaLogoComponent,
|
|
7918
8179
|
{
|
|
7919
8180
|
$hoverColor: hoverColor,
|
|
@@ -7923,23 +8184,23 @@ var WistiaLogo = ({
|
|
|
7923
8184
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7924
8185
|
...otherProps,
|
|
7925
8186
|
children: [
|
|
7926
|
-
/* @__PURE__ */ (0,
|
|
7927
|
-
(0,
|
|
8187
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsx)("title", { children: title }),
|
|
8188
|
+
(0, import_type_guards28.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("desc", { children: description }) : null,
|
|
7928
8189
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
7929
8190
|
renderLogotype(logotypeColor, iconOnly)
|
|
7930
8191
|
]
|
|
7931
8192
|
}
|
|
7932
8193
|
);
|
|
7933
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
8194
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime199.jsx)("a", { href, children: Logo }) : Logo;
|
|
7934
8195
|
};
|
|
7935
8196
|
WistiaLogo.displayName = "WistiaLogo";
|
|
7936
8197
|
|
|
7937
8198
|
// src/components/Input/Input.tsx
|
|
7938
|
-
var
|
|
7939
|
-
var
|
|
7940
|
-
var
|
|
7941
|
-
var
|
|
7942
|
-
var inputStyles =
|
|
8199
|
+
var import_react33 = require("react");
|
|
8200
|
+
var import_styled_components49 = __toESM(require("styled-components"));
|
|
8201
|
+
var import_type_guards29 = require("@wistia/type-guards");
|
|
8202
|
+
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
8203
|
+
var inputStyles = import_styled_components49.css`
|
|
7943
8204
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
7944
8205
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
7945
8206
|
--wui-input-color-border: var(--wui-color-border);
|
|
@@ -7980,7 +8241,7 @@ var inputStyles = import_styled_components44.css`
|
|
|
7980
8241
|
}
|
|
7981
8242
|
}
|
|
7982
8243
|
`;
|
|
7983
|
-
var StyledInputContainer =
|
|
8244
|
+
var StyledInputContainer = import_styled_components49.default.div`
|
|
7984
8245
|
display: inline-flex;
|
|
7985
8246
|
position: relative;
|
|
7986
8247
|
${inputStyles};
|
|
@@ -8024,7 +8285,7 @@ var StyledInputContainer = import_styled_components44.default.div`
|
|
|
8024
8285
|
padding-right: 32px;
|
|
8025
8286
|
}
|
|
8026
8287
|
`;
|
|
8027
|
-
var Input = (0,
|
|
8288
|
+
var Input = (0, import_react33.forwardRef)(
|
|
8028
8289
|
({
|
|
8029
8290
|
fullWidth = false,
|
|
8030
8291
|
monospace = false,
|
|
@@ -8034,36 +8295,36 @@ var Input = (0, import_react30.forwardRef)(
|
|
|
8034
8295
|
...props
|
|
8035
8296
|
}, ref) => {
|
|
8036
8297
|
let leftIconToDisplay = leftIcon;
|
|
8037
|
-
if ((0,
|
|
8038
|
-
leftIconToDisplay = /* @__PURE__ */ (0,
|
|
8298
|
+
if ((0, import_type_guards29.isNil)(leftIcon) && type === "search") {
|
|
8299
|
+
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Icon, { type: "search" });
|
|
8039
8300
|
}
|
|
8040
|
-
if ((0,
|
|
8041
|
-
leftIconToDisplay = (0,
|
|
8301
|
+
if ((0, import_type_guards29.isNotNil)(leftIconToDisplay)) {
|
|
8302
|
+
leftIconToDisplay = (0, import_react33.cloneElement)(leftIconToDisplay, {
|
|
8042
8303
|
size: "md",
|
|
8043
8304
|
className: "wui-input-left-icon"
|
|
8044
8305
|
});
|
|
8045
8306
|
}
|
|
8046
8307
|
let rightIconToDisplay = rightIcon;
|
|
8047
|
-
if ((0,
|
|
8048
|
-
rightIconToDisplay = (0,
|
|
8308
|
+
if ((0, import_type_guards29.isNotNil)(rightIconToDisplay)) {
|
|
8309
|
+
rightIconToDisplay = (0, import_react33.cloneElement)(rightIconToDisplay, {
|
|
8049
8310
|
size: "md",
|
|
8050
8311
|
className: "wui-input-right-icon"
|
|
8051
8312
|
});
|
|
8052
8313
|
}
|
|
8053
|
-
return /* @__PURE__ */ (0,
|
|
8314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(
|
|
8054
8315
|
StyledInputContainer,
|
|
8055
8316
|
{
|
|
8056
8317
|
$fullWidth: fullWidth,
|
|
8057
8318
|
$monospace: monospace,
|
|
8058
8319
|
children: [
|
|
8059
8320
|
leftIconToDisplay ?? null,
|
|
8060
|
-
type === "multiline" ? /* @__PURE__ */ (0,
|
|
8321
|
+
type === "multiline" ? /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
8061
8322
|
"textarea",
|
|
8062
8323
|
{
|
|
8063
8324
|
...props,
|
|
8064
8325
|
ref
|
|
8065
8326
|
}
|
|
8066
|
-
) : /* @__PURE__ */ (0,
|
|
8327
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
8067
8328
|
"input",
|
|
8068
8329
|
{
|
|
8069
8330
|
...props,
|
|
@@ -8107,6 +8368,7 @@ Input.displayName = "Input";
|
|
|
8107
8368
|
MenuItemLabel,
|
|
8108
8369
|
MenuLabel,
|
|
8109
8370
|
MenuRadioGroup,
|
|
8371
|
+
Modal,
|
|
8110
8372
|
Radio,
|
|
8111
8373
|
RadioGroup,
|
|
8112
8374
|
RadioMenuItem,
|