@wistia/ui 0.0.24 → 0.1.0
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 +457 -309
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +70 -68
- package/dist/index.d.ts +70 -68
- package/dist/index.mjs +436 -289
- package/dist/index.mjs.map +1 -1
- package/package.json +19 -19
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.0
|
|
3
|
+
* @license @wistia/ui v0.1.0
|
|
4
4
|
*
|
|
5
|
-
* Copyright (c) 2024-
|
|
5
|
+
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
7
7
|
* This source code is unlicensed, all rights reserved.
|
|
8
8
|
*/
|
|
@@ -148,7 +148,7 @@ var globalStyleAdjustmentsCss = css2`
|
|
|
148
148
|
`;
|
|
149
149
|
|
|
150
150
|
// src/css/designTokens/index.tsx
|
|
151
|
-
import { css as
|
|
151
|
+
import { css as css9 } from "styled-components";
|
|
152
152
|
|
|
153
153
|
// src/css/designTokens/colorGlobal.tsx
|
|
154
154
|
import { css as css3 } from "styled-components";
|
|
@@ -1114,7 +1114,7 @@ var colorAliasTokens = css4`
|
|
|
1114
1114
|
--wui-color-bg-fill-white: #ffffff;
|
|
1115
1115
|
--wui-color-focus-color: var(--wui-blue-9);
|
|
1116
1116
|
--wui-color-notification-pill-color: var(--wui-pink-9);
|
|
1117
|
-
--wui-color-
|
|
1117
|
+
--wui-color-backdrop: var(--wui-gray-alpha-9);
|
|
1118
1118
|
--wui-color-segmented-control-checked-background: var(--wui-bg-app);
|
|
1119
1119
|
--wui-color-text-on-fill-white-selected: var(--wui-blue-9);
|
|
1120
1120
|
--wui-color-bg-tooltip: #242528;
|
|
@@ -1276,8 +1276,15 @@ var typographyTokens = css7`
|
|
|
1276
1276
|
--wui-typography-label-4-weight: var(--wui-typography-weight-label);
|
|
1277
1277
|
`;
|
|
1278
1278
|
|
|
1279
|
+
// src/css/designTokens/zIndex.tsx
|
|
1280
|
+
import { css as css8 } from "styled-components";
|
|
1281
|
+
var zIndexTokens = css8`
|
|
1282
|
+
--wui-zindex-backdrop: 100;
|
|
1283
|
+
--wui-zindex-menu: 500;
|
|
1284
|
+
`;
|
|
1285
|
+
|
|
1279
1286
|
// src/css/designTokens/index.tsx
|
|
1280
|
-
var colorTokens =
|
|
1287
|
+
var colorTokens = css9`
|
|
1281
1288
|
${lightGlobalTokens}
|
|
1282
1289
|
/* Dark mode is disabled until we have a more robust plan for supporting it */
|
|
1283
1290
|
|
|
@@ -1286,12 +1293,13 @@ var colorTokens = css8`
|
|
|
1286
1293
|
} */
|
|
1287
1294
|
${colorAliasTokens}
|
|
1288
1295
|
`;
|
|
1289
|
-
var designTokens =
|
|
1296
|
+
var designTokens = css9`
|
|
1290
1297
|
:root {
|
|
1291
1298
|
${colorTokens}
|
|
1292
1299
|
${spacingTokens}
|
|
1293
1300
|
${borderRadiusTokens}
|
|
1294
1301
|
${typographyTokens}
|
|
1302
|
+
${zIndexTokens}
|
|
1295
1303
|
}
|
|
1296
1304
|
`;
|
|
1297
1305
|
|
|
@@ -1534,9 +1542,9 @@ import { isNotNil as isNotNil2 } from "@wistia/type-guards";
|
|
|
1534
1542
|
|
|
1535
1543
|
// src/components/Ellipsis/Ellipsis.tsx
|
|
1536
1544
|
import { isNotNil } from "@wistia/type-guards";
|
|
1537
|
-
import styled, { css as
|
|
1545
|
+
import styled, { css as css10 } from "styled-components";
|
|
1538
1546
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
1539
|
-
var ellipsisStyle =
|
|
1547
|
+
var ellipsisStyle = css10`
|
|
1540
1548
|
overflow: hidden;
|
|
1541
1549
|
text-overflow: ellipsis;
|
|
1542
1550
|
white-space: nowrap;
|
|
@@ -1559,14 +1567,14 @@ var ellipsisStyle = css9`
|
|
|
1559
1567
|
}
|
|
1560
1568
|
}
|
|
1561
1569
|
`;
|
|
1562
|
-
var ellipsisFlexParentStyle =
|
|
1570
|
+
var ellipsisFlexParentStyle = css10`
|
|
1563
1571
|
min-width: 0;
|
|
1564
1572
|
`;
|
|
1565
1573
|
var EllipsisComponent = styled.div`
|
|
1566
1574
|
${ellipsisStyle};
|
|
1567
1575
|
${({ $lines }) => {
|
|
1568
1576
|
if (isNotNil($lines)) {
|
|
1569
|
-
return
|
|
1577
|
+
return css10`
|
|
1570
1578
|
-webkit-box-orient: vertical;
|
|
1571
1579
|
-webkit-line-clamp: ${$lines};
|
|
1572
1580
|
display: -webkit-box;
|
|
@@ -1587,7 +1595,7 @@ var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */ jsx4(
|
|
|
1587
1595
|
Ellipsis.displayName = "Ellipsis";
|
|
1588
1596
|
|
|
1589
1597
|
// src/private/helpers/getColorScheme/getColorScheme.ts
|
|
1590
|
-
import { css as
|
|
1598
|
+
import { css as css11 } from "styled-components";
|
|
1591
1599
|
var colorSchemeSchema = [
|
|
1592
1600
|
{ token: "bg-surface", step: "surface" },
|
|
1593
1601
|
{ token: "bg-surface-hover", step: "3" },
|
|
@@ -1614,7 +1622,7 @@ var colorSchemeSchema = [
|
|
|
1614
1622
|
{ token: "icon-on-fill", step: "contrast" },
|
|
1615
1623
|
{ token: "focus-ring", step: "9" }
|
|
1616
1624
|
];
|
|
1617
|
-
var defaultScheme =
|
|
1625
|
+
var defaultScheme = css11`
|
|
1618
1626
|
--wui-color-bg-surface: var(--wui-gray-surface);
|
|
1619
1627
|
--wui-color-bg-surface-hover: var(--wui-gray-3);
|
|
1620
1628
|
--wui-color-bg-surface-active: var(--wui-gray-4);
|
|
@@ -1640,7 +1648,7 @@ var defaultScheme = css10`
|
|
|
1640
1648
|
--wui-color-icon-on-fill: var(--wui-gray-contrast);
|
|
1641
1649
|
--wui-color-focus-ring: var(--wui-blue-9);
|
|
1642
1650
|
`;
|
|
1643
|
-
var navScheme =
|
|
1651
|
+
var navScheme = css11`
|
|
1644
1652
|
--wui-color-bg-fill-active: var(--wui-blue-5);
|
|
1645
1653
|
--wui-color-bg-fill-hover: var(--wui-blue-4);
|
|
1646
1654
|
--wui-color-bg-fill: var(--wui-blue-1);
|
|
@@ -1691,7 +1699,7 @@ var getColorScheme = (colorScheme) => {
|
|
|
1691
1699
|
if (colorScheme === "default") {
|
|
1692
1700
|
return defaultScheme;
|
|
1693
1701
|
}
|
|
1694
|
-
return
|
|
1702
|
+
return css11`
|
|
1695
1703
|
${colorSchemeSchema.map(({ token, step }) => {
|
|
1696
1704
|
return `--wui-color-${token}: var(--wui-${colorScheme === "info" ? "blue" : colorScheme}-${step});`;
|
|
1697
1705
|
}).join("")}
|
|
@@ -2161,8 +2169,8 @@ import styled9 from "styled-components";
|
|
|
2161
2169
|
import { isNotNil as isNotNil6, isNotUndefined as isNotUndefined3 } from "@wistia/type-guards";
|
|
2162
2170
|
|
|
2163
2171
|
// src/css/buttonResetCss.tsx
|
|
2164
|
-
import { css as
|
|
2165
|
-
var buttonResetCss =
|
|
2172
|
+
import { css as css12 } from "styled-components";
|
|
2173
|
+
var buttonResetCss = css12`
|
|
2166
2174
|
align-items: center;
|
|
2167
2175
|
background-color: transparent;
|
|
2168
2176
|
background-image: none;
|
|
@@ -2207,8 +2215,8 @@ var buttonResetCss = css11`
|
|
|
2207
2215
|
`;
|
|
2208
2216
|
|
|
2209
2217
|
// src/components/Button/buttonStyles.tsx
|
|
2210
|
-
import { css as
|
|
2211
|
-
var buttonSmallStyles =
|
|
2218
|
+
import { css as css13 } from "styled-components";
|
|
2219
|
+
var buttonSmallStyles = css13`
|
|
2212
2220
|
--button-padding-vertical: var(--wui-space-01);
|
|
2213
2221
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2214
2222
|
--button-label-padding-horizontal: var(--wui-space-01);
|
|
@@ -2219,7 +2227,7 @@ var buttonSmallStyles = css12`
|
|
|
2219
2227
|
--button-icon-size: 12px;
|
|
2220
2228
|
--button-label-gap: 4px;
|
|
2221
2229
|
`;
|
|
2222
|
-
var buttonMediumStyles =
|
|
2230
|
+
var buttonMediumStyles = css13`
|
|
2223
2231
|
--button-padding-vertical: var(--wui-space-02);
|
|
2224
2232
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2225
2233
|
--button-label-padding-horizontal: 6px;
|
|
@@ -2230,7 +2238,7 @@ var buttonMediumStyles = css12`
|
|
|
2230
2238
|
--button-icon-size: 16px;
|
|
2231
2239
|
--button-label-gap: 6px;
|
|
2232
2240
|
`;
|
|
2233
|
-
var buttonLargeStyles =
|
|
2241
|
+
var buttonLargeStyles = css13`
|
|
2234
2242
|
--button-padding-vertical: var(--wui-space-02);
|
|
2235
2243
|
--button-padding-horizontal: var(--wui-space-02);
|
|
2236
2244
|
--button-label-padding-horizontal: var(--wui-space-02);
|
|
@@ -2241,7 +2249,7 @@ var buttonLargeStyles = css12`
|
|
|
2241
2249
|
--button-icon-size: 24px;
|
|
2242
2250
|
--button-label-gap: 8px;
|
|
2243
2251
|
`;
|
|
2244
|
-
var buttonExtraLargeStyles =
|
|
2252
|
+
var buttonExtraLargeStyles = css13`
|
|
2245
2253
|
--button-padding-vertical: var(--wui-space-03);
|
|
2246
2254
|
--button-padding-horizontal: var(--wui-space-03);
|
|
2247
2255
|
--button-label-padding-horizontal: var(--wui-space-02);
|
|
@@ -2252,34 +2260,34 @@ var buttonExtraLargeStyles = css12`
|
|
|
2252
2260
|
--button-icon-size: 24px;
|
|
2253
2261
|
--button-label-gap: 8px;
|
|
2254
2262
|
`;
|
|
2255
|
-
var ghostButtonVariant =
|
|
2263
|
+
var ghostButtonVariant = css13`
|
|
2256
2264
|
--button-color-bg: transparent;
|
|
2257
2265
|
--button-color-bg-hover: var(--wui-color-bg-surface-hover);
|
|
2258
2266
|
--button-color-bg-active: var(--wui-color-bg-surface-active);
|
|
2259
2267
|
--button-color-text: var(--wui-color-text);
|
|
2260
2268
|
--button-color-icon: var(--wui-color-icon);
|
|
2261
2269
|
`;
|
|
2262
|
-
var outlineButtonVariant =
|
|
2270
|
+
var outlineButtonVariant = css13`
|
|
2263
2271
|
${ghostButtonVariant};
|
|
2264
2272
|
--button-color-border: var(--wui-color-border);
|
|
2265
2273
|
|
|
2266
2274
|
box-shadow: 0 0 0 2px var(--button-color-border) inset;
|
|
2267
2275
|
`;
|
|
2268
|
-
var softButtonVariant =
|
|
2276
|
+
var softButtonVariant = css13`
|
|
2269
2277
|
--button-color-bg: var(--wui-color-bg-surface-secondary);
|
|
2270
2278
|
--button-color-bg-hover: var(--wui-color-bg-surface-secondary-hover);
|
|
2271
2279
|
--button-color-bg-active: var(--wui-color-bg-surface-secondary-active);
|
|
2272
2280
|
--button-color-text: var(--wui-color-text);
|
|
2273
2281
|
--button-color-icon: var(--wui-color-icon);
|
|
2274
2282
|
`;
|
|
2275
|
-
var solidButtonVariant =
|
|
2283
|
+
var solidButtonVariant = css13`
|
|
2276
2284
|
--button-color-bg: var(--wui-color-bg-fill);
|
|
2277
2285
|
--button-color-bg-hover: var(--wui-color-bg-fill-hover);
|
|
2278
2286
|
--button-color-bg-active: var(--wui-color-bg-fill-active);
|
|
2279
2287
|
--button-color-text: var(--wui-color-text-on-fill);
|
|
2280
2288
|
--button-color-icon: var(--wui-color-icon-on-fill);
|
|
2281
2289
|
`;
|
|
2282
|
-
var disabledButtonVariant =
|
|
2290
|
+
var disabledButtonVariant = css13`
|
|
2283
2291
|
--button-color-bg: var(--wui-color-bg-surface-disabled);
|
|
2284
2292
|
--button-color-bg-hover: var(--wui-color-bg-surface-disabled);
|
|
2285
2293
|
--button-color-bg-active: var(--wui-color-bg-surface-disabled);
|
|
@@ -2287,7 +2295,7 @@ var disabledButtonVariant = css12`
|
|
|
2287
2295
|
--button-color-icon: var(--wui-color-icon-disabled);
|
|
2288
2296
|
--button-color-border: var(--wui-color-border-disabled);
|
|
2289
2297
|
`;
|
|
2290
|
-
var pressedButtonVariant =
|
|
2298
|
+
var pressedButtonVariant = css13`
|
|
2291
2299
|
--button-color-bg: var(--wui-color-bg-surface-selected);
|
|
2292
2300
|
--button-color-bg-hover: var(--wui-color-bg-surface-selected-hover);
|
|
2293
2301
|
--button-color-bg-active: var(--wui-color-bg-surface-selected-active);
|
|
@@ -2295,7 +2303,7 @@ var pressedButtonVariant = css12`
|
|
|
2295
2303
|
--button-color-icon: var(--wui-color-icon-selected);
|
|
2296
2304
|
--button-color-border: var(--wui-color-border-selected);
|
|
2297
2305
|
`;
|
|
2298
|
-
var buttonBaseStyles =
|
|
2306
|
+
var buttonBaseStyles = css13`
|
|
2299
2307
|
border-radius: var(--wui-border-radius-rounded);
|
|
2300
2308
|
font-family: var(--button-typography-family);
|
|
2301
2309
|
font-size: var(--button-typography-size);
|
|
@@ -5908,11 +5916,11 @@ import styled14 from "styled-components";
|
|
|
5908
5916
|
import { isNonEmptyString as isNonEmptyString2 } from "@wistia/type-guards";
|
|
5909
5917
|
|
|
5910
5918
|
// src/components/Label/Label.tsx
|
|
5911
|
-
import styled12, { css as
|
|
5919
|
+
import styled12, { css as css15 } from "styled-components";
|
|
5912
5920
|
|
|
5913
5921
|
// src/components/Heading/Heading.tsx
|
|
5914
5922
|
import { forwardRef as forwardRef4 } from "react";
|
|
5915
|
-
import styled11, { css as
|
|
5923
|
+
import styled11, { css as css14 } from "styled-components";
|
|
5916
5924
|
|
|
5917
5925
|
// src/private/helpers/makePolymorphic/makePolymorphic.tsx
|
|
5918
5926
|
var makePolymorphic = (component) => {
|
|
@@ -5921,43 +5929,43 @@ var makePolymorphic = (component) => {
|
|
|
5921
5929
|
|
|
5922
5930
|
// src/components/Heading/Heading.tsx
|
|
5923
5931
|
import { jsx as jsx168 } from "react/jsx-runtime";
|
|
5924
|
-
var heroStyle =
|
|
5932
|
+
var heroStyle = css14`
|
|
5925
5933
|
--font-family: var(--wui-typography-heading-hero-family);
|
|
5926
5934
|
--font-size: var(--wui-typography-heading-hero-size);
|
|
5927
5935
|
--font-weight: var(--wui-typography-heading-hero-weight);
|
|
5928
5936
|
--line-height: var(--wui-typography-heading-hero-line-height);
|
|
5929
5937
|
`;
|
|
5930
|
-
var heading1TextStyle =
|
|
5938
|
+
var heading1TextStyle = css14`
|
|
5931
5939
|
--font-family: var(--wui-typography-heading-1-family);
|
|
5932
5940
|
--font-size: var(--wui-typography-heading-1-size);
|
|
5933
5941
|
--font-weight: var(--wui-typography-heading-1-weight);
|
|
5934
5942
|
--line-height: var(--wui-typography-heading-1-line-height);
|
|
5935
5943
|
`;
|
|
5936
|
-
var heading2TextStyle =
|
|
5944
|
+
var heading2TextStyle = css14`
|
|
5937
5945
|
--font-family: var(--wui-typography-heading-2-family);
|
|
5938
5946
|
--font-size: var(--wui-typography-heading-2-size);
|
|
5939
5947
|
--font-weight: var(--wui-typography-heading-2-weight);
|
|
5940
5948
|
--line-height: var(--wui-typography-heading-2-line-height);
|
|
5941
5949
|
`;
|
|
5942
|
-
var heading3TextStyle =
|
|
5950
|
+
var heading3TextStyle = css14`
|
|
5943
5951
|
--font-family: var(--wui-typography-heading-3-family);
|
|
5944
5952
|
--font-size: var(--wui-typography-heading-3-size);
|
|
5945
5953
|
--font-weight: var(--wui-typography-heading-3-weight);
|
|
5946
5954
|
--line-height: var(--wui-typography-heading-3-line-height);
|
|
5947
5955
|
`;
|
|
5948
|
-
var heading4TextStyle =
|
|
5956
|
+
var heading4TextStyle = css14`
|
|
5949
5957
|
--font-family: var(--wui-typography-heading-4-family);
|
|
5950
5958
|
--font-size: var(--wui-typography-heading-4-size);
|
|
5951
5959
|
--font-weight: var(--wui-typography-heading-4-weight);
|
|
5952
5960
|
--line-height: var(--wui-typography-heading-4-line-height);
|
|
5953
5961
|
`;
|
|
5954
|
-
var heading5TextStyle =
|
|
5962
|
+
var heading5TextStyle = css14`
|
|
5955
5963
|
--font-family: var(--wui-typography-heading-5-family);
|
|
5956
5964
|
--font-size: var(--wui-typography-heading-5-size);
|
|
5957
5965
|
--font-weight: var(--wui-typography-heading-5-weight);
|
|
5958
5966
|
--line-height: var(--wui-typography-heading-5-line-height);
|
|
5959
5967
|
`;
|
|
5960
|
-
var heading6TextStyle =
|
|
5968
|
+
var heading6TextStyle = css14`
|
|
5961
5969
|
--font-family: var(--wui-typography-heading-6-family);
|
|
5962
5970
|
--font-size: var(--wui-typography-heading-6-size);
|
|
5963
5971
|
--font-weight: var(--wui-typography-heading-6-weight);
|
|
@@ -5982,16 +5990,16 @@ var StyledHeading = styled11.div`
|
|
|
5982
5990
|
color: var(--wui-color-text);
|
|
5983
5991
|
${({ $variant }) => variantStyleMap[$variant]}
|
|
5984
5992
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
5985
|
-
${({ $inline }) => $inline &&
|
|
5993
|
+
${({ $inline }) => $inline && css14`
|
|
5986
5994
|
display: inline-block;
|
|
5987
5995
|
`}
|
|
5988
|
-
${({ $disabled }) => $disabled &&
|
|
5996
|
+
${({ $disabled }) => $disabled && css14`
|
|
5989
5997
|
color: var(--wui-color-text-disabled);
|
|
5990
5998
|
`}
|
|
5991
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
5999
|
+
${({ $preventUserSelect }) => $preventUserSelect && css14`
|
|
5992
6000
|
user-select: none;
|
|
5993
6001
|
`}
|
|
5994
|
-
${({ $align }) =>
|
|
6002
|
+
${({ $align }) => css14`
|
|
5995
6003
|
text-align: ${$align};
|
|
5996
6004
|
`}
|
|
5997
6005
|
margin: 0;
|
|
@@ -6037,7 +6045,7 @@ var Heading = makePolymorphic(HeadingComponent);
|
|
|
6037
6045
|
|
|
6038
6046
|
// src/components/Label/Label.tsx
|
|
6039
6047
|
import { jsx as jsx169 } from "react/jsx-runtime";
|
|
6040
|
-
var requiredStyle =
|
|
6048
|
+
var requiredStyle = css15`
|
|
6041
6049
|
&::after {
|
|
6042
6050
|
color: var(--wui-color-text-error);
|
|
6043
6051
|
display: inline;
|
|
@@ -6045,7 +6053,7 @@ var requiredStyle = css14`
|
|
|
6045
6053
|
content: '*';
|
|
6046
6054
|
}
|
|
6047
6055
|
`;
|
|
6048
|
-
var disabledStyle =
|
|
6056
|
+
var disabledStyle = css15`
|
|
6049
6057
|
color: var(--wui-color-text-disabled);
|
|
6050
6058
|
`;
|
|
6051
6059
|
var StyledLabel = styled12(Heading).attrs({
|
|
@@ -6323,8 +6331,8 @@ import { jsx as jsx174 } from "react/jsx-runtime";
|
|
|
6323
6331
|
var StyledForm = styled17.form`
|
|
6324
6332
|
--form-default-width: 690px;
|
|
6325
6333
|
|
|
6326
|
-
max-width: ${({ fullWidth }) => fullWidth ? "auto" : "var(--form-default-width)"};
|
|
6327
|
-
align-items: ${({ fullWidth }) => fullWidth ? "stretch" : "flex-start"};
|
|
6334
|
+
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
6335
|
+
align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
|
|
6328
6336
|
`;
|
|
6329
6337
|
var FormContext = createContext2({
|
|
6330
6338
|
values: {},
|
|
@@ -6395,8 +6403,8 @@ var FormComponent = ({ children, action, values = {}, validate, fullWidth = fals
|
|
|
6395
6403
|
gap: "space-05",
|
|
6396
6404
|
...props,
|
|
6397
6405
|
ref,
|
|
6406
|
+
$fullWidth: fullWidth,
|
|
6398
6407
|
as: StyledForm,
|
|
6399
|
-
fullWidth,
|
|
6400
6408
|
id,
|
|
6401
6409
|
onBlur: handleBlur,
|
|
6402
6410
|
onReset: handleReset,
|
|
@@ -6490,89 +6498,89 @@ import { isArray as isArray2, isNotNil as isNotNil7, isNotUndefined as isNotUnde
|
|
|
6490
6498
|
|
|
6491
6499
|
// src/components/Text/Text.tsx
|
|
6492
6500
|
import { forwardRef as forwardRef8 } from "react";
|
|
6493
|
-
import styled18, { css as
|
|
6501
|
+
import styled18, { css as css16 } from "styled-components";
|
|
6494
6502
|
import { jsx as jsx176 } from "react/jsx-runtime";
|
|
6495
|
-
var bodyBoldStyles =
|
|
6503
|
+
var bodyBoldStyles = css16`
|
|
6496
6504
|
> strong,
|
|
6497
6505
|
b {
|
|
6498
6506
|
font-weight: var(--wui-typography-weight-body-bold);
|
|
6499
6507
|
}
|
|
6500
6508
|
`;
|
|
6501
|
-
var labelBoldStyles =
|
|
6509
|
+
var labelBoldStyles = css16`
|
|
6502
6510
|
> strong,
|
|
6503
6511
|
b {
|
|
6504
6512
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
6505
6513
|
}
|
|
6506
6514
|
`;
|
|
6507
|
-
var body1TextStyle =
|
|
6515
|
+
var body1TextStyle = css16`
|
|
6508
6516
|
--font-family: var(--wui-typography-body-1-family);
|
|
6509
6517
|
--font-size: var(--wui-typography-body-1-size);
|
|
6510
6518
|
--font-weight: var(--wui-typography-body-1-weight);
|
|
6511
6519
|
--line-height: var(--wui-typography-body-1-line-height);
|
|
6512
6520
|
${bodyBoldStyles}
|
|
6513
6521
|
`;
|
|
6514
|
-
var body2TextStyle =
|
|
6522
|
+
var body2TextStyle = css16`
|
|
6515
6523
|
--font-family: var(--wui-typography-body-2-family);
|
|
6516
6524
|
--font-size: var(--wui-typography-body-2-size);
|
|
6517
6525
|
--font-weight: var(--wui-typography-body-2-weight);
|
|
6518
6526
|
--line-height: var(--wui-typography-body-2-line-height);
|
|
6519
6527
|
${bodyBoldStyles}
|
|
6520
6528
|
`;
|
|
6521
|
-
var body3TextStyle =
|
|
6529
|
+
var body3TextStyle = css16`
|
|
6522
6530
|
--font-family: var(--wui-typography-body-3-family);
|
|
6523
6531
|
--font-size: var(--wui-typography-body-3-size);
|
|
6524
6532
|
--font-weight: var(--wui-typography-body-3-weight);
|
|
6525
6533
|
--line-height: var(--wui-typography-body-3-line-height);
|
|
6526
6534
|
${bodyBoldStyles}
|
|
6527
6535
|
`;
|
|
6528
|
-
var body4TextStyle =
|
|
6536
|
+
var body4TextStyle = css16`
|
|
6529
6537
|
--font-family: var(--wui-typography-body-4-family);
|
|
6530
6538
|
--font-size: var(--wui-typography-body-4-size);
|
|
6531
6539
|
--font-weight: var(--wui-typography-body-4-weight);
|
|
6532
6540
|
--line-height: var(--wui-typography-body-4-line-height);
|
|
6533
6541
|
${bodyBoldStyles}
|
|
6534
6542
|
`;
|
|
6535
|
-
var label1TextStyle =
|
|
6543
|
+
var label1TextStyle = css16`
|
|
6536
6544
|
--font-family: var(--wui-typography-label-1-family);
|
|
6537
6545
|
--font-size: var(--wui-typography-label-1-size);
|
|
6538
6546
|
--font-weight: var(--wui-typography-label-1-weight);
|
|
6539
6547
|
--line-height: var(--wui-typography-label-1-line-height);
|
|
6540
6548
|
${labelBoldStyles}
|
|
6541
6549
|
`;
|
|
6542
|
-
var label2TextStyle =
|
|
6550
|
+
var label2TextStyle = css16`
|
|
6543
6551
|
--font-family: var(--wui-typography-label-2-family);
|
|
6544
6552
|
--font-size: var(--wui-typography-label-2-size);
|
|
6545
6553
|
--font-weight: var(--wui-typography-label-2-weight);
|
|
6546
6554
|
--line-height: var(--wui-typography-label-2-line-height);
|
|
6547
6555
|
${labelBoldStyles}
|
|
6548
6556
|
`;
|
|
6549
|
-
var label3TextStyle =
|
|
6557
|
+
var label3TextStyle = css16`
|
|
6550
6558
|
--font-family: var(--wui-typography-label-3-family);
|
|
6551
6559
|
--font-size: var(--wui-typography-label-3-size);
|
|
6552
6560
|
--font-weight: var(--wui-typography-label-3-weight);
|
|
6553
6561
|
--line-height: var(--wui-typography-label-3-line-height);
|
|
6554
6562
|
${labelBoldStyles}
|
|
6555
6563
|
`;
|
|
6556
|
-
var label4TextStyle =
|
|
6564
|
+
var label4TextStyle = css16`
|
|
6557
6565
|
--font-family: var(--wui-typography-label-4-family);
|
|
6558
6566
|
--font-size: var(--wui-typography-label-4-size);
|
|
6559
6567
|
--font-weight: var(--wui-typography-label-4-weight);
|
|
6560
6568
|
--line-height: var(--wui-typography-label-4-line-height);
|
|
6561
6569
|
${labelBoldStyles}
|
|
6562
6570
|
`;
|
|
6563
|
-
var body1MonoTextStyle =
|
|
6571
|
+
var body1MonoTextStyle = css16`
|
|
6564
6572
|
${body1TextStyle};
|
|
6565
6573
|
--font-family: var(--wui-typography-family-mono);
|
|
6566
6574
|
`;
|
|
6567
|
-
var body2MonoTextStyle =
|
|
6575
|
+
var body2MonoTextStyle = css16`
|
|
6568
6576
|
${body2TextStyle};
|
|
6569
6577
|
--font-family: var(--wui-typography-family-mono);
|
|
6570
6578
|
`;
|
|
6571
|
-
var body3MonoTextStyle =
|
|
6579
|
+
var body3MonoTextStyle = css16`
|
|
6572
6580
|
${body3TextStyle};
|
|
6573
6581
|
--font-family: var(--wui-typography-family-mono);
|
|
6574
6582
|
`;
|
|
6575
|
-
var body4MonoTextStyle =
|
|
6583
|
+
var body4MonoTextStyle = css16`
|
|
6576
6584
|
${body4TextStyle};
|
|
6577
6585
|
--font-family: var(--wui-typography-family-mono);
|
|
6578
6586
|
`;
|
|
@@ -6590,13 +6598,13 @@ var variantStyleMap2 = {
|
|
|
6590
6598
|
label3: label3TextStyle,
|
|
6591
6599
|
label4: label4TextStyle
|
|
6592
6600
|
};
|
|
6593
|
-
var highContrastProminenceStyle =
|
|
6601
|
+
var highContrastProminenceStyle = css16`
|
|
6594
6602
|
--text-color: var(--wui-color-text-high-contrast);
|
|
6595
6603
|
`;
|
|
6596
|
-
var vibrantProminenceStyle =
|
|
6604
|
+
var vibrantProminenceStyle = css16`
|
|
6597
6605
|
--text-color: var(--wui-color-text);
|
|
6598
6606
|
`;
|
|
6599
|
-
var secondaryProminenceStyle =
|
|
6607
|
+
var secondaryProminenceStyle = css16`
|
|
6600
6608
|
--text-color: var(--wui-color-text-secondary);
|
|
6601
6609
|
`;
|
|
6602
6610
|
var prominenceMap = {
|
|
@@ -6616,19 +6624,19 @@ var StyledText = styled18.div`
|
|
|
6616
6624
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
6617
6625
|
${({ $prominence }) => prominenceMap[$prominence]}
|
|
6618
6626
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
6619
|
-
${({ $inline }) => $inline &&
|
|
6627
|
+
${({ $inline }) => $inline && css16`
|
|
6620
6628
|
display: inline-block;
|
|
6621
6629
|
`}
|
|
6622
|
-
${({ $disabled }) => $disabled &&
|
|
6630
|
+
${({ $disabled }) => $disabled && css16`
|
|
6623
6631
|
--text-color: var(--wui-color-text-disabled);
|
|
6624
6632
|
`}
|
|
6625
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
6633
|
+
${({ $preventUserSelect }) => $preventUserSelect && css16`
|
|
6626
6634
|
user-select: none;
|
|
6627
6635
|
`}
|
|
6628
|
-
${({ $align }) =>
|
|
6636
|
+
${({ $align }) => css16`
|
|
6629
6637
|
text-align: ${$align};
|
|
6630
6638
|
`}
|
|
6631
|
-
${({ as }) => as === "p" &&
|
|
6639
|
+
${({ as }) => as === "p" && css16`
|
|
6632
6640
|
display: block;
|
|
6633
6641
|
`}
|
|
6634
6642
|
`;
|
|
@@ -6847,122 +6855,9 @@ RadioGroup.displayName = "RadioGroup";
|
|
|
6847
6855
|
|
|
6848
6856
|
// src/components/IconButton/IconButton.tsx
|
|
6849
6857
|
import { Children as Children3, cloneElement as cloneElement4, forwardRef as forwardRef9 } from "react";
|
|
6850
|
-
import
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
import {
|
|
6854
|
-
Root,
|
|
6855
|
-
Content,
|
|
6856
|
-
Trigger,
|
|
6857
|
-
Portal,
|
|
6858
|
-
Arrow
|
|
6859
|
-
} from "@radix-ui/react-tooltip";
|
|
6860
|
-
import styled21, { css as css16 } from "styled-components";
|
|
6861
|
-
import { jsx as jsx181, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6862
|
-
var CompactTooltipStyles = css16`
|
|
6863
|
-
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
6864
|
-
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
6865
|
-
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
6866
|
-
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
6867
|
-
--tooltip-vertical-padding: var(--wui-space-03);
|
|
6868
|
-
`;
|
|
6869
|
-
var StyledContent = styled21(Content)`
|
|
6870
|
-
--tooltip-font-family: var(--wui-typography-family-default);
|
|
6871
|
-
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
6872
|
-
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
6873
|
-
--tooltip-color: var(--wui-color-text-on-fill);
|
|
6874
|
-
--tooltip-font-size: var(--wui-typography-label-3-size);
|
|
6875
|
-
--tooltip-line-height: var(--wui-typography-label-3-line-height);
|
|
6876
|
-
--tooltip-font-weight: var(--wui-typography-label-3-weight);
|
|
6877
|
-
--tooltip-horizontal-padding: var(--wui-space-03);
|
|
6878
|
-
--tooltip-vertical-padding: var(--wui-space-03);
|
|
6879
|
-
|
|
6880
|
-
${({ $compact }) => Boolean($compact) && CompactTooltipStyles};
|
|
6881
|
-
|
|
6882
|
-
font-family: var(--tooltip-font-family);
|
|
6883
|
-
font-size: var(--tooltip-font-size);
|
|
6884
|
-
border-radius: var(--tooltip-border-radius);
|
|
6885
|
-
padding: var(--tooltip-horizontal-padding) var(--tooltip-vertical-padding);
|
|
6886
|
-
background-color: var(--tooltip-bg);
|
|
6887
|
-
color: var(--tooltip-color);
|
|
6888
|
-
user-select: none;
|
|
6889
|
-
animation-duration: 400ms;
|
|
6890
|
-
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
6891
|
-
will-change: transform, opacity;
|
|
6892
|
-
max-width: 30em;
|
|
6893
|
-
|
|
6894
|
-
&[data-state='delayed-open'][data-side='top'] {
|
|
6895
|
-
animation-name: slideDownAndFade;
|
|
6896
|
-
}
|
|
6897
|
-
|
|
6898
|
-
&[data-state='delayed-open'][data-side='right'] {
|
|
6899
|
-
animation-name: slideLeftAndFade;
|
|
6900
|
-
}
|
|
6901
|
-
|
|
6902
|
-
&[data-state='delayed-open'][data-side='bottom'] {
|
|
6903
|
-
animation-name: slideUpAndFade;
|
|
6904
|
-
}
|
|
6905
|
-
|
|
6906
|
-
&[data-state='delayed-open'][data-side='left'] {
|
|
6907
|
-
animation-name: slideRightAndFade;
|
|
6908
|
-
}
|
|
6909
|
-
`;
|
|
6910
|
-
var VISUAL_OFFSET = 6;
|
|
6911
|
-
var Tooltip = ({
|
|
6912
|
-
delay = 700,
|
|
6913
|
-
direction = "top",
|
|
6914
|
-
content,
|
|
6915
|
-
children,
|
|
6916
|
-
forceOpen,
|
|
6917
|
-
compact = false,
|
|
6918
|
-
hideArrow = false
|
|
6919
|
-
}) => {
|
|
6920
|
-
const rootProps = {};
|
|
6921
|
-
if (content === "" || content === null) {
|
|
6922
|
-
rootProps.open = false;
|
|
6923
|
-
}
|
|
6924
|
-
if (forceOpen === true) {
|
|
6925
|
-
rootProps.open = true;
|
|
6926
|
-
}
|
|
6927
|
-
return /* @__PURE__ */ jsxs11(
|
|
6928
|
-
Root,
|
|
6929
|
-
{
|
|
6930
|
-
delayDuration: delay,
|
|
6931
|
-
...rootProps,
|
|
6932
|
-
children: [
|
|
6933
|
-
/* @__PURE__ */ jsx181(Trigger, { asChild: true, children }),
|
|
6934
|
-
/* @__PURE__ */ jsx181(Portal, { children: /* @__PURE__ */ jsxs11(
|
|
6935
|
-
StyledContent,
|
|
6936
|
-
{
|
|
6937
|
-
$compact: compact,
|
|
6938
|
-
side: direction,
|
|
6939
|
-
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
6940
|
-
children: [
|
|
6941
|
-
content,
|
|
6942
|
-
!hideArrow ? /* @__PURE__ */ jsx181(Arrow, { asChild: true, children: /* @__PURE__ */ jsx181(
|
|
6943
|
-
"svg",
|
|
6944
|
-
{
|
|
6945
|
-
fill: "var(--tooltip-bg)",
|
|
6946
|
-
height: "8",
|
|
6947
|
-
style: { transform: "translateY(-2px)" },
|
|
6948
|
-
viewBox: "0 0 12 8",
|
|
6949
|
-
width: "12",
|
|
6950
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6951
|
-
children: /* @__PURE__ */ jsx181("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" })
|
|
6952
|
-
}
|
|
6953
|
-
) }) : null
|
|
6954
|
-
]
|
|
6955
|
-
}
|
|
6956
|
-
) })
|
|
6957
|
-
]
|
|
6958
|
-
}
|
|
6959
|
-
);
|
|
6960
|
-
};
|
|
6961
|
-
Tooltip.displayName = "Tooltip";
|
|
6962
|
-
|
|
6963
|
-
// src/components/IconButton/IconButton.tsx
|
|
6964
|
-
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
6965
|
-
var StyledButton2 = styled22(Button)`
|
|
6858
|
+
import styled21 from "styled-components";
|
|
6859
|
+
import { jsx as jsx181 } from "react/jsx-runtime";
|
|
6860
|
+
var StyledButton2 = styled21(Button)`
|
|
6966
6861
|
--icon-button-size-sm: 24px;
|
|
6967
6862
|
--icon-button-size-md: 32px;
|
|
6968
6863
|
--icon-button-size-lg: 40px;
|
|
@@ -6977,9 +6872,9 @@ var StyledButton2 = styled22(Button)`
|
|
|
6977
6872
|
line-height: 1;
|
|
6978
6873
|
`;
|
|
6979
6874
|
var IconButton = forwardRef9(
|
|
6980
|
-
({ children, label,
|
|
6875
|
+
({ children, label, size = "md", ...props }, ref) => {
|
|
6981
6876
|
const responsiveSize = useResponsiveProp(size);
|
|
6982
|
-
|
|
6877
|
+
return /* @__PURE__ */ jsx181(
|
|
6983
6878
|
StyledButton2,
|
|
6984
6879
|
{
|
|
6985
6880
|
...props,
|
|
@@ -6992,16 +6887,12 @@ var IconButton = forwardRef9(
|
|
|
6992
6887
|
})
|
|
6993
6888
|
}
|
|
6994
6889
|
);
|
|
6995
|
-
if (disableTooltip) {
|
|
6996
|
-
return button;
|
|
6997
|
-
}
|
|
6998
|
-
return /* @__PURE__ */ jsx182(Tooltip, { content: label, children: button });
|
|
6999
6890
|
}
|
|
7000
6891
|
);
|
|
7001
6892
|
IconButton.displayName = "IconButton";
|
|
7002
6893
|
|
|
7003
6894
|
// src/components/Menu/Menu.tsx
|
|
7004
|
-
import
|
|
6895
|
+
import styled22, { css as css17, keyframes } from "styled-components";
|
|
7005
6896
|
import {
|
|
7006
6897
|
DropdownMenu,
|
|
7007
6898
|
DropdownMenuTrigger,
|
|
@@ -7009,7 +6900,7 @@ import {
|
|
|
7009
6900
|
DropdownMenuContent
|
|
7010
6901
|
} from "@radix-ui/react-dropdown-menu";
|
|
7011
6902
|
import { isNotNil as isNotNil8, isNotUndefined as isNotUndefined7 } from "@wistia/type-guards";
|
|
7012
|
-
import { jsx as
|
|
6903
|
+
import { jsx as jsx182, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
7013
6904
|
var open = keyframes`
|
|
7014
6905
|
from {
|
|
7015
6906
|
opacity: 0;
|
|
@@ -7038,7 +6929,6 @@ var menuContentCss = css17`
|
|
|
7038
6929
|
--menu-padding: var(--wui-space-03);
|
|
7039
6930
|
--menu-min-width: 120px;
|
|
7040
6931
|
--menu-max-width: 284px;
|
|
7041
|
-
--menu-zindex: 500; /* TODO - need z-index token */
|
|
7042
6932
|
|
|
7043
6933
|
animation: ${open}; /* TODO - need easing tokens */
|
|
7044
6934
|
font-family: var(--menu-font-family);
|
|
@@ -7051,7 +6941,7 @@ var menuContentCss = css17`
|
|
|
7051
6941
|
overflow: auto;
|
|
7052
6942
|
padding: var(--menu-padding);
|
|
7053
6943
|
transform-origin: var(--radix-dropdown-menu-content-transform-origin);
|
|
7054
|
-
z-index: var(--
|
|
6944
|
+
z-index: var(--wui-zindex-menu);
|
|
7055
6945
|
|
|
7056
6946
|
&[data-state='closed'] {
|
|
7057
6947
|
animation: ${close}; /* TODO - need easing tokens */
|
|
@@ -7069,7 +6959,7 @@ var menuContentCss = css17`
|
|
|
7069
6959
|
margin: var(--wui-space-02) 0;
|
|
7070
6960
|
}
|
|
7071
6961
|
`;
|
|
7072
|
-
var MenuContent =
|
|
6962
|
+
var MenuContent = styled22(DropdownMenuContent)`
|
|
7073
6963
|
${menuContentCss}
|
|
7074
6964
|
`;
|
|
7075
6965
|
var Menu = ({
|
|
@@ -7083,23 +6973,23 @@ var Menu = ({
|
|
|
7083
6973
|
onInteractOutside,
|
|
7084
6974
|
...props
|
|
7085
6975
|
}) => {
|
|
7086
|
-
return /* @__PURE__ */
|
|
6976
|
+
return /* @__PURE__ */ jsxs11(
|
|
7087
6977
|
DropdownMenu,
|
|
7088
6978
|
{
|
|
7089
6979
|
modal: false,
|
|
7090
6980
|
...isNotNil8(onOpenChange) && isNotNil8(isOpen) ? { open: isOpen, onOpenChange } : {},
|
|
7091
6981
|
children: [
|
|
7092
|
-
/* @__PURE__ */
|
|
6982
|
+
/* @__PURE__ */ jsx182(DropdownMenuTrigger, { asChild: true, children: isNotUndefined7(trigger) ? trigger : /* @__PURE__ */ jsx182(
|
|
7093
6983
|
Button,
|
|
7094
6984
|
{
|
|
7095
6985
|
"aria-expanded": isOpen,
|
|
7096
6986
|
forceState: isOpen ? "active" : void 0,
|
|
7097
|
-
rightIcon: /* @__PURE__ */
|
|
6987
|
+
rightIcon: /* @__PURE__ */ jsx182(Icon, { type: "caret-down" }),
|
|
7098
6988
|
...triggerProps,
|
|
7099
6989
|
children: label
|
|
7100
6990
|
}
|
|
7101
6991
|
) }),
|
|
7102
|
-
/* @__PURE__ */
|
|
6992
|
+
/* @__PURE__ */ jsx182(DropdownMenuPortal, { children: /* @__PURE__ */ jsx182(
|
|
7103
6993
|
MenuContent,
|
|
7104
6994
|
{
|
|
7105
6995
|
...props,
|
|
@@ -7118,19 +7008,19 @@ var Menu = ({
|
|
|
7118
7008
|
Menu.displayName = "Menu";
|
|
7119
7009
|
|
|
7120
7010
|
// src/components/Menu/MenuLabel.tsx
|
|
7121
|
-
import
|
|
7011
|
+
import styled23 from "styled-components";
|
|
7122
7012
|
import { DropdownMenuLabel } from "@radix-ui/react-dropdown-menu";
|
|
7123
|
-
import { jsx as
|
|
7124
|
-
var StyledMenuLabel =
|
|
7013
|
+
import { jsx as jsx183 } from "react/jsx-runtime";
|
|
7014
|
+
var StyledMenuLabel = styled23(DropdownMenuLabel)`
|
|
7125
7015
|
padding: var(--wui-space-02);
|
|
7126
7016
|
`;
|
|
7127
7017
|
var MenuLabel = ({ children, ...props }) => {
|
|
7128
|
-
return /* @__PURE__ */
|
|
7018
|
+
return /* @__PURE__ */ jsx183(
|
|
7129
7019
|
StyledMenuLabel,
|
|
7130
7020
|
{
|
|
7131
7021
|
asChild: true,
|
|
7132
7022
|
...props,
|
|
7133
|
-
children: /* @__PURE__ */
|
|
7023
|
+
children: /* @__PURE__ */ jsx183(
|
|
7134
7024
|
Text,
|
|
7135
7025
|
{
|
|
7136
7026
|
variant: "label3",
|
|
@@ -7145,7 +7035,7 @@ MenuLabel.displayName = "MenuLabel";
|
|
|
7145
7035
|
|
|
7146
7036
|
// src/components/Menu/SubMenu.tsx
|
|
7147
7037
|
import { useState as useState6 } from "react";
|
|
7148
|
-
import
|
|
7038
|
+
import styled26 from "styled-components";
|
|
7149
7039
|
import {
|
|
7150
7040
|
DropdownMenuPortal as DropdownMenuPortal2,
|
|
7151
7041
|
DropdownMenuSub,
|
|
@@ -7157,10 +7047,10 @@ import {
|
|
|
7157
7047
|
|
|
7158
7048
|
// src/components/Menu/MenuItemButton.tsx
|
|
7159
7049
|
import { forwardRef as forwardRef10 } from "react";
|
|
7160
|
-
import
|
|
7050
|
+
import styled24 from "styled-components";
|
|
7161
7051
|
import { isNotNil as isNotNil9, isNotUndefined as isNotUndefined8 } from "@wistia/type-guards";
|
|
7162
|
-
import { jsx as
|
|
7163
|
-
var StyledButton3 =
|
|
7052
|
+
import { jsx as jsx184, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
7053
|
+
var StyledButton3 = styled24(Button)`
|
|
7164
7054
|
--menu-item-border-radius: var(--wui-border-radius-01);
|
|
7165
7055
|
--menu-item-gap: var(--wui-space-01);
|
|
7166
7056
|
--menu-item-inner-gap: var(--wui-space-04);
|
|
@@ -7177,7 +7067,7 @@ var StyledButton3 = styled25(Button)`
|
|
|
7177
7067
|
|
|
7178
7068
|
${({ $isGated }) => isNotUndefined8($isGated) && $isGated ? `color: var(--wui-color-text);` : ""}
|
|
7179
7069
|
`;
|
|
7180
|
-
var StyledMenuContent =
|
|
7070
|
+
var StyledMenuContent = styled24.div`
|
|
7181
7071
|
display: grid;
|
|
7182
7072
|
grid-template-areas:
|
|
7183
7073
|
'label badge'
|
|
@@ -7186,7 +7076,7 @@ var StyledMenuContent = styled25.div`
|
|
|
7186
7076
|
position: relative;
|
|
7187
7077
|
align-content: center;
|
|
7188
7078
|
`;
|
|
7189
|
-
var StyledBadgeContainer =
|
|
7079
|
+
var StyledBadgeContainer = styled24.div`
|
|
7190
7080
|
grid-area: badge;
|
|
7191
7081
|
align-self: start;
|
|
7192
7082
|
justify-self: end;
|
|
@@ -7205,9 +7095,9 @@ var MenuItemButton = forwardRef10(({ children, appearance, command, ...props },
|
|
|
7205
7095
|
console.warn("colorScheme prop is ignored when appearance is gated");
|
|
7206
7096
|
}
|
|
7207
7097
|
colorScheme = "purple";
|
|
7208
|
-
badge = /* @__PURE__ */
|
|
7098
|
+
badge = /* @__PURE__ */ jsx184(Icon, { type: "sparkle" });
|
|
7209
7099
|
}
|
|
7210
|
-
return /* @__PURE__ */
|
|
7100
|
+
return /* @__PURE__ */ jsx184(
|
|
7211
7101
|
StyledButton3,
|
|
7212
7102
|
{
|
|
7213
7103
|
...props,
|
|
@@ -7216,9 +7106,9 @@ var MenuItemButton = forwardRef10(({ children, appearance, command, ...props },
|
|
|
7216
7106
|
colorScheme: colorScheme ?? "default",
|
|
7217
7107
|
fullWidth: true,
|
|
7218
7108
|
variant: "ghost",
|
|
7219
|
-
children: /* @__PURE__ */
|
|
7109
|
+
children: /* @__PURE__ */ jsxs12(StyledMenuContent, { children: [
|
|
7220
7110
|
children,
|
|
7221
|
-
isNotNil9(badge) || isNotNil9(command) ? /* @__PURE__ */
|
|
7111
|
+
isNotNil9(badge) || isNotNil9(command) ? /* @__PURE__ */ jsx184(StyledBadgeContainer, { children: badge ?? command }) : null
|
|
7222
7112
|
] })
|
|
7223
7113
|
}
|
|
7224
7114
|
);
|
|
@@ -7226,12 +7116,12 @@ var MenuItemButton = forwardRef10(({ children, appearance, command, ...props },
|
|
|
7226
7116
|
MenuItemButton.displayName = "MenuItemButton";
|
|
7227
7117
|
|
|
7228
7118
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
7229
|
-
import
|
|
7230
|
-
import { jsx as
|
|
7231
|
-
var StyledMenuItemLabel =
|
|
7119
|
+
import styled25 from "styled-components";
|
|
7120
|
+
import { jsx as jsx185 } from "react/jsx-runtime";
|
|
7121
|
+
var StyledMenuItemLabel = styled25(Text).attrs({ variant: "label3" })`
|
|
7232
7122
|
grid-area: label;
|
|
7233
7123
|
`;
|
|
7234
|
-
var StyledMenuItemDescription =
|
|
7124
|
+
var StyledMenuItemDescription = styled25(Text).attrs({
|
|
7235
7125
|
variant: "label4",
|
|
7236
7126
|
prominence: "secondary"
|
|
7237
7127
|
})`
|
|
@@ -7239,15 +7129,15 @@ var StyledMenuItemDescription = styled26(Text).attrs({
|
|
|
7239
7129
|
grid-area: description;
|
|
7240
7130
|
`;
|
|
7241
7131
|
var MenuItemLabel = ({ children }) => {
|
|
7242
|
-
return /* @__PURE__ */
|
|
7132
|
+
return /* @__PURE__ */ jsx185(StyledMenuItemLabel, { children });
|
|
7243
7133
|
};
|
|
7244
7134
|
var MenuItemDescription = ({ children }) => {
|
|
7245
|
-
return /* @__PURE__ */
|
|
7135
|
+
return /* @__PURE__ */ jsx185(StyledMenuItemDescription, { children });
|
|
7246
7136
|
};
|
|
7247
7137
|
|
|
7248
7138
|
// src/components/Menu/SubMenu.tsx
|
|
7249
|
-
import { jsx as
|
|
7250
|
-
var SubMenuContent =
|
|
7139
|
+
import { jsx as jsx186, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
7140
|
+
var SubMenuContent = styled26(DropdownMenuSubContent)`
|
|
7251
7141
|
${menuContentCss}
|
|
7252
7142
|
width: 298px;
|
|
7253
7143
|
|
|
@@ -7255,10 +7145,10 @@ var SubMenuContent = styled27(DropdownMenuSubContent)`
|
|
|
7255
7145
|
transform: translateX(-100%) !important;
|
|
7256
7146
|
}
|
|
7257
7147
|
`;
|
|
7258
|
-
var StyledMobileSubMenuItems =
|
|
7148
|
+
var StyledMobileSubMenuItems = styled26.div`
|
|
7259
7149
|
margin-left: var(--wui-space-04);
|
|
7260
7150
|
`;
|
|
7261
|
-
var StyledSubTrigger =
|
|
7151
|
+
var StyledSubTrigger = styled26(DropdownMenuSubTrigger)`
|
|
7262
7152
|
outline: none;
|
|
7263
7153
|
|
|
7264
7154
|
&[data-state='open'],
|
|
@@ -7269,11 +7159,11 @@ var StyledSubTrigger = styled27(DropdownMenuSubTrigger)`
|
|
|
7269
7159
|
var SubMenuTrigger = (props) => {
|
|
7270
7160
|
const { isSmAndUp } = useMq();
|
|
7271
7161
|
const Trigger2 = isSmAndUp ? StyledSubTrigger : DropdownMenuItem;
|
|
7272
|
-
return /* @__PURE__ */
|
|
7162
|
+
return /* @__PURE__ */ jsx186(Trigger2, { asChild: true, children: /* @__PURE__ */ jsx186(
|
|
7273
7163
|
MenuItemButton,
|
|
7274
7164
|
{
|
|
7275
7165
|
...props,
|
|
7276
|
-
rightIcon: /* @__PURE__ */
|
|
7166
|
+
rightIcon: /* @__PURE__ */ jsx186(Icon, { type: "caret-right" })
|
|
7277
7167
|
}
|
|
7278
7168
|
) });
|
|
7279
7169
|
};
|
|
@@ -7286,14 +7176,14 @@ var SubMenu = ({
|
|
|
7286
7176
|
}) => {
|
|
7287
7177
|
const { isSmAndUp } = useMq();
|
|
7288
7178
|
const [isExpanded, setIsExpanded] = useState6(false);
|
|
7289
|
-
return isSmAndUp ? /* @__PURE__ */
|
|
7290
|
-
/* @__PURE__ */
|
|
7291
|
-
/* @__PURE__ */
|
|
7292
|
-
/* @__PURE__ */
|
|
7179
|
+
return isSmAndUp ? /* @__PURE__ */ jsxs13(DropdownMenuSub, { onOpenChange, children: [
|
|
7180
|
+
/* @__PURE__ */ jsxs13(SubMenuTrigger, { ...props, children: [
|
|
7181
|
+
/* @__PURE__ */ jsx186(MenuItemLabel, { children: label }),
|
|
7182
|
+
/* @__PURE__ */ jsx186(MenuItemDescription, { children: description })
|
|
7293
7183
|
] }),
|
|
7294
|
-
/* @__PURE__ */
|
|
7295
|
-
] }) : /* @__PURE__ */
|
|
7296
|
-
/* @__PURE__ */
|
|
7184
|
+
/* @__PURE__ */ jsx186(DropdownMenuPortal2, { children: /* @__PURE__ */ jsx186(SubMenuContent, { children }) })
|
|
7185
|
+
] }) : /* @__PURE__ */ jsxs13(DropdownMenuGroup, { children: [
|
|
7186
|
+
/* @__PURE__ */ jsxs13(
|
|
7297
7187
|
SubMenuTrigger,
|
|
7298
7188
|
{
|
|
7299
7189
|
...props,
|
|
@@ -7302,12 +7192,12 @@ var SubMenu = ({
|
|
|
7302
7192
|
setIsExpanded((prev) => !prev);
|
|
7303
7193
|
},
|
|
7304
7194
|
children: [
|
|
7305
|
-
/* @__PURE__ */
|
|
7306
|
-
/* @__PURE__ */
|
|
7195
|
+
/* @__PURE__ */ jsx186(MenuItemLabel, { children: label }),
|
|
7196
|
+
/* @__PURE__ */ jsx186(MenuItemDescription, { children: description })
|
|
7307
7197
|
]
|
|
7308
7198
|
}
|
|
7309
7199
|
),
|
|
7310
|
-
/* @__PURE__ */
|
|
7200
|
+
/* @__PURE__ */ jsx186(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
7311
7201
|
] });
|
|
7312
7202
|
};
|
|
7313
7203
|
SubMenu.displayName = "SubMenu";
|
|
@@ -7315,15 +7205,15 @@ SubMenu.displayName = "SubMenu";
|
|
|
7315
7205
|
// src/components/Menu/MenuItem.tsx
|
|
7316
7206
|
import { forwardRef as forwardRef11 } from "react";
|
|
7317
7207
|
import { DropdownMenuItem as DropdownMenuItem2 } from "@radix-ui/react-dropdown-menu";
|
|
7318
|
-
import { jsx as
|
|
7208
|
+
import { jsx as jsx187 } from "react/jsx-runtime";
|
|
7319
7209
|
var MenuItem = forwardRef11(
|
|
7320
7210
|
({ onSelect = () => null, ...props }, ref) => {
|
|
7321
|
-
return /* @__PURE__ */
|
|
7211
|
+
return /* @__PURE__ */ jsx187(
|
|
7322
7212
|
DropdownMenuItem2,
|
|
7323
7213
|
{
|
|
7324
7214
|
asChild: true,
|
|
7325
7215
|
onSelect,
|
|
7326
|
-
children: /* @__PURE__ */
|
|
7216
|
+
children: /* @__PURE__ */ jsx187(
|
|
7327
7217
|
MenuItemButton,
|
|
7328
7218
|
{
|
|
7329
7219
|
...props,
|
|
@@ -7341,10 +7231,10 @@ MenuItem.displayName = "MenuItem";
|
|
|
7341
7231
|
import {
|
|
7342
7232
|
DropdownMenuRadioGroup
|
|
7343
7233
|
} from "@radix-ui/react-dropdown-menu";
|
|
7344
|
-
import { jsx as
|
|
7234
|
+
import { jsx as jsx188, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
7345
7235
|
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
7346
|
-
return /* @__PURE__ */
|
|
7347
|
-
/* @__PURE__ */
|
|
7236
|
+
return /* @__PURE__ */ jsxs14(DropdownMenuRadioGroup, { ...props, children: [
|
|
7237
|
+
/* @__PURE__ */ jsx188(MenuLabel, { children: label }),
|
|
7348
7238
|
children
|
|
7349
7239
|
] });
|
|
7350
7240
|
};
|
|
@@ -7355,11 +7245,11 @@ import {
|
|
|
7355
7245
|
DropdownMenuItemIndicator,
|
|
7356
7246
|
DropdownMenuRadioItem
|
|
7357
7247
|
} from "@radix-ui/react-dropdown-menu";
|
|
7358
|
-
import { jsx as
|
|
7248
|
+
import { jsx as jsx189 } from "react/jsx-runtime";
|
|
7359
7249
|
var RadioMenuItem = ({
|
|
7360
7250
|
onSelect,
|
|
7361
7251
|
value,
|
|
7362
|
-
indicator = /* @__PURE__ */
|
|
7252
|
+
indicator = /* @__PURE__ */ jsx189(
|
|
7363
7253
|
Icon,
|
|
7364
7254
|
{
|
|
7365
7255
|
size: "sm",
|
|
@@ -7369,16 +7259,16 @@ var RadioMenuItem = ({
|
|
|
7369
7259
|
...props
|
|
7370
7260
|
}) => {
|
|
7371
7261
|
const extraProps = onSelect ? { onSelect } : {};
|
|
7372
|
-
return /* @__PURE__ */
|
|
7262
|
+
return /* @__PURE__ */ jsx189(
|
|
7373
7263
|
DropdownMenuRadioItem,
|
|
7374
7264
|
{
|
|
7375
7265
|
...extraProps,
|
|
7376
7266
|
value,
|
|
7377
|
-
children: /* @__PURE__ */
|
|
7267
|
+
children: /* @__PURE__ */ jsx189(
|
|
7378
7268
|
MenuItemButton,
|
|
7379
7269
|
{
|
|
7380
7270
|
...props,
|
|
7381
|
-
rightIcon: /* @__PURE__ */
|
|
7271
|
+
rightIcon: /* @__PURE__ */ jsx189(DropdownMenuItemIndicator, { children: indicator })
|
|
7382
7272
|
}
|
|
7383
7273
|
)
|
|
7384
7274
|
}
|
|
@@ -7390,9 +7280,9 @@ RadioMenuItem.displayName = "RadioMenuItem";
|
|
|
7390
7280
|
import {
|
|
7391
7281
|
DropdownMenuCheckboxItem
|
|
7392
7282
|
} from "@radix-ui/react-dropdown-menu";
|
|
7393
|
-
import { jsx as
|
|
7283
|
+
import { jsx as jsx190, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
7394
7284
|
var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
7395
|
-
return checked ? /* @__PURE__ */
|
|
7285
|
+
return checked ? /* @__PURE__ */ jsxs15(
|
|
7396
7286
|
"svg",
|
|
7397
7287
|
{
|
|
7398
7288
|
...props,
|
|
@@ -7402,21 +7292,21 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
7402
7292
|
width: "16",
|
|
7403
7293
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7404
7294
|
children: [
|
|
7405
|
-
/* @__PURE__ */
|
|
7295
|
+
/* @__PURE__ */ jsx190(
|
|
7406
7296
|
"path",
|
|
7407
7297
|
{
|
|
7408
7298
|
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",
|
|
7409
7299
|
fill: "#2949E5"
|
|
7410
7300
|
}
|
|
7411
7301
|
),
|
|
7412
|
-
/* @__PURE__ */
|
|
7302
|
+
/* @__PURE__ */ jsx190(
|
|
7413
7303
|
"path",
|
|
7414
7304
|
{
|
|
7415
7305
|
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",
|
|
7416
7306
|
stroke: "#D9D9DE"
|
|
7417
7307
|
}
|
|
7418
7308
|
),
|
|
7419
|
-
/* @__PURE__ */
|
|
7309
|
+
/* @__PURE__ */ jsx190(
|
|
7420
7310
|
"path",
|
|
7421
7311
|
{
|
|
7422
7312
|
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",
|
|
@@ -7425,7 +7315,7 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
7425
7315
|
)
|
|
7426
7316
|
]
|
|
7427
7317
|
}
|
|
7428
|
-
) : /* @__PURE__ */
|
|
7318
|
+
) : /* @__PURE__ */ jsxs15(
|
|
7429
7319
|
"svg",
|
|
7430
7320
|
{
|
|
7431
7321
|
...props,
|
|
@@ -7435,14 +7325,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
7435
7325
|
width: "16",
|
|
7436
7326
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7437
7327
|
children: [
|
|
7438
|
-
/* @__PURE__ */
|
|
7328
|
+
/* @__PURE__ */ jsx190(
|
|
7439
7329
|
"path",
|
|
7440
7330
|
{
|
|
7441
7331
|
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",
|
|
7442
7332
|
fill: "#FCFCFD"
|
|
7443
7333
|
}
|
|
7444
7334
|
),
|
|
7445
|
-
/* @__PURE__ */
|
|
7335
|
+
/* @__PURE__ */ jsx190(
|
|
7446
7336
|
"path",
|
|
7447
7337
|
{
|
|
7448
7338
|
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",
|
|
@@ -7459,17 +7349,17 @@ var CheckboxMenuItem = ({
|
|
|
7459
7349
|
onCheckedChange,
|
|
7460
7350
|
...props
|
|
7461
7351
|
}) => {
|
|
7462
|
-
return /* @__PURE__ */
|
|
7352
|
+
return /* @__PURE__ */ jsx190(
|
|
7463
7353
|
DropdownMenuCheckboxItem,
|
|
7464
7354
|
{
|
|
7465
7355
|
checked,
|
|
7466
7356
|
onCheckedChange,
|
|
7467
7357
|
onSelect,
|
|
7468
|
-
children: /* @__PURE__ */
|
|
7358
|
+
children: /* @__PURE__ */ jsx190(
|
|
7469
7359
|
MenuItemButton,
|
|
7470
7360
|
{
|
|
7471
7361
|
...props,
|
|
7472
|
-
leftIcon: /* @__PURE__ */
|
|
7362
|
+
leftIcon: /* @__PURE__ */ jsx190(CheckboxIndicator2, { checked })
|
|
7473
7363
|
}
|
|
7474
7364
|
)
|
|
7475
7365
|
}
|
|
@@ -7479,15 +7369,15 @@ CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
|
7479
7369
|
|
|
7480
7370
|
// src/components/Radio/Radio.tsx
|
|
7481
7371
|
import { forwardRef as forwardRef12, useId as useId3 } from "react";
|
|
7482
|
-
import
|
|
7372
|
+
import styled27, { css as css18 } from "styled-components";
|
|
7483
7373
|
import { isNonEmptyString as isNonEmptyString3 } from "@wistia/type-guards";
|
|
7484
|
-
import { jsx as
|
|
7485
|
-
var StyledLabelWrapper2 =
|
|
7374
|
+
import { jsx as jsx191, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
7375
|
+
var StyledLabelWrapper2 = styled27.div`
|
|
7486
7376
|
display: flex;
|
|
7487
7377
|
flex-direction: column;
|
|
7488
7378
|
padding-left: var(--wui-space-02);
|
|
7489
7379
|
`;
|
|
7490
|
-
var StyledRadio =
|
|
7380
|
+
var StyledRadio = styled27.input`
|
|
7491
7381
|
box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
|
|
7492
7382
|
appearance: none;
|
|
7493
7383
|
margin: 0;
|
|
@@ -7529,7 +7419,7 @@ var defaultHoverStyle = css18`
|
|
|
7529
7419
|
/* TODO Lamp to design hover state */
|
|
7530
7420
|
cursor: pointer;
|
|
7531
7421
|
`;
|
|
7532
|
-
var StyledRadioWrapper =
|
|
7422
|
+
var StyledRadioWrapper = styled27.div`
|
|
7533
7423
|
align-items: baseline;
|
|
7534
7424
|
border: 1px solid transparent;
|
|
7535
7425
|
border-radius: 4px;
|
|
@@ -7567,13 +7457,13 @@ var Radio = forwardRef12(
|
|
|
7567
7457
|
}, ref) => {
|
|
7568
7458
|
const generatedId = useId3();
|
|
7569
7459
|
const computedId = isNonEmptyString3(id) ? id : `ui-radio-${generatedId}`;
|
|
7570
|
-
return /* @__PURE__ */
|
|
7460
|
+
return /* @__PURE__ */ jsxs16(
|
|
7571
7461
|
StyledRadioWrapper,
|
|
7572
7462
|
{
|
|
7573
7463
|
"aria-invalid": otherProps["aria-invalid"],
|
|
7574
7464
|
disabled,
|
|
7575
7465
|
children: [
|
|
7576
|
-
/* @__PURE__ */
|
|
7466
|
+
/* @__PURE__ */ jsx191(
|
|
7577
7467
|
StyledRadio,
|
|
7578
7468
|
{
|
|
7579
7469
|
ref,
|
|
@@ -7588,8 +7478,8 @@ var Radio = forwardRef12(
|
|
|
7588
7478
|
...otherProps
|
|
7589
7479
|
}
|
|
7590
7480
|
),
|
|
7591
|
-
/* @__PURE__ */
|
|
7592
|
-
/* @__PURE__ */
|
|
7481
|
+
/* @__PURE__ */ jsxs16(StyledLabelWrapper2, { children: [
|
|
7482
|
+
/* @__PURE__ */ jsx191(
|
|
7593
7483
|
Label,
|
|
7594
7484
|
{
|
|
7595
7485
|
disabled,
|
|
@@ -7598,7 +7488,7 @@ var Radio = forwardRef12(
|
|
|
7598
7488
|
children: label
|
|
7599
7489
|
}
|
|
7600
7490
|
),
|
|
7601
|
-
/* @__PURE__ */
|
|
7491
|
+
/* @__PURE__ */ jsx191(LabelDescription, { children: description })
|
|
7602
7492
|
] })
|
|
7603
7493
|
]
|
|
7604
7494
|
}
|
|
@@ -7608,11 +7498,11 @@ var Radio = forwardRef12(
|
|
|
7608
7498
|
Radio.displayName = "Radio";
|
|
7609
7499
|
|
|
7610
7500
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
7611
|
-
import
|
|
7501
|
+
import styled28 from "styled-components";
|
|
7612
7502
|
import { isNotNil as isNotNil10 } from "@wistia/type-guards";
|
|
7613
|
-
import { jsx as
|
|
7614
|
-
var VisuallyHidden =
|
|
7615
|
-
var VisuallyHiddenButFocusable =
|
|
7503
|
+
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
7504
|
+
var VisuallyHidden = styled28.div({ ...visuallyHiddenStyle });
|
|
7505
|
+
var VisuallyHiddenButFocusable = styled28.div({
|
|
7616
7506
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
7617
7507
|
});
|
|
7618
7508
|
var ScreenReaderOnly = ({
|
|
@@ -7623,18 +7513,18 @@ var ScreenReaderOnly = ({
|
|
|
7623
7513
|
}) => {
|
|
7624
7514
|
const accessibleText = isNotNil10(text) ? text : children;
|
|
7625
7515
|
if (focusable) {
|
|
7626
|
-
return /* @__PURE__ */
|
|
7516
|
+
return /* @__PURE__ */ jsx192(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
7627
7517
|
}
|
|
7628
|
-
return /* @__PURE__ */
|
|
7518
|
+
return /* @__PURE__ */ jsx192(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
7629
7519
|
};
|
|
7630
7520
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
7631
7521
|
|
|
7632
7522
|
// src/components/Tag/Tag.tsx
|
|
7633
7523
|
import { forwardRef as forwardRef13 } from "react";
|
|
7634
|
-
import
|
|
7524
|
+
import styled29 from "styled-components";
|
|
7635
7525
|
import { isNil as isNil10, isNotNil as isNotNil11, isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
7636
|
-
import { Fragment as Fragment2, jsx as
|
|
7637
|
-
var TagLabel =
|
|
7526
|
+
import { Fragment as Fragment2, jsx as jsx193, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
7527
|
+
var TagLabel = styled29.a`
|
|
7638
7528
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7639
7529
|
font-size: var(--wui-typography-label-4-size);
|
|
7640
7530
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -7662,14 +7552,14 @@ var TagLabel = styled30.a`
|
|
|
7662
7552
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
7663
7553
|
}
|
|
7664
7554
|
`;
|
|
7665
|
-
var TagDivider =
|
|
7555
|
+
var TagDivider = styled29.div`
|
|
7666
7556
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7667
7557
|
border-left: 1px solid var(--wui-color-border);
|
|
7668
7558
|
display: flex;
|
|
7669
7559
|
height: 14px;
|
|
7670
7560
|
width: 1px;
|
|
7671
7561
|
`;
|
|
7672
|
-
var StyledRemoveButton =
|
|
7562
|
+
var StyledRemoveButton = styled29.button`
|
|
7673
7563
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7674
7564
|
all: unset;
|
|
7675
7565
|
cursor: pointer;
|
|
@@ -7697,7 +7587,7 @@ var StyledRemoveButton = styled30.button`
|
|
|
7697
7587
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
7698
7588
|
}
|
|
7699
7589
|
`;
|
|
7700
|
-
var StyledTag =
|
|
7590
|
+
var StyledTag = styled29.div`
|
|
7701
7591
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7702
7592
|
align-items: center;
|
|
7703
7593
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -7714,23 +7604,23 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
7714
7604
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
7715
7605
|
);
|
|
7716
7606
|
}
|
|
7717
|
-
return /* @__PURE__ */
|
|
7718
|
-
/* @__PURE__ */
|
|
7719
|
-
/* @__PURE__ */
|
|
7607
|
+
return /* @__PURE__ */ jsxs17(Fragment2, { children: [
|
|
7608
|
+
/* @__PURE__ */ jsx193(TagDivider, { $colorScheme: colorScheme }),
|
|
7609
|
+
/* @__PURE__ */ jsxs17(
|
|
7720
7610
|
StyledRemoveButton,
|
|
7721
7611
|
{
|
|
7722
7612
|
$colorScheme: colorScheme,
|
|
7723
7613
|
onClick: onClickRemove,
|
|
7724
7614
|
type: "button",
|
|
7725
7615
|
children: [
|
|
7726
|
-
/* @__PURE__ */
|
|
7616
|
+
/* @__PURE__ */ jsx193(
|
|
7727
7617
|
Icon,
|
|
7728
7618
|
{
|
|
7729
7619
|
size: "sm",
|
|
7730
7620
|
type: "close"
|
|
7731
7621
|
}
|
|
7732
7622
|
),
|
|
7733
|
-
/* @__PURE__ */
|
|
7623
|
+
/* @__PURE__ */ jsx193(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
7734
7624
|
]
|
|
7735
7625
|
}
|
|
7736
7626
|
)
|
|
@@ -7739,14 +7629,14 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
7739
7629
|
var Tag = forwardRef13(
|
|
7740
7630
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
7741
7631
|
const labelProps = isNotNil11(href) && isNonEmptyString4(href) ? { href, as: "a" } : { as: "span" };
|
|
7742
|
-
return /* @__PURE__ */
|
|
7632
|
+
return /* @__PURE__ */ jsxs17(
|
|
7743
7633
|
StyledTag,
|
|
7744
7634
|
{
|
|
7745
7635
|
ref,
|
|
7746
7636
|
$colorScheme: colorScheme,
|
|
7747
7637
|
...otherProps,
|
|
7748
7638
|
children: [
|
|
7749
|
-
/* @__PURE__ */
|
|
7639
|
+
/* @__PURE__ */ jsx193(
|
|
7750
7640
|
TagLabel,
|
|
7751
7641
|
{
|
|
7752
7642
|
...labelProps,
|
|
@@ -7754,7 +7644,7 @@ var Tag = forwardRef13(
|
|
|
7754
7644
|
children: label
|
|
7755
7645
|
}
|
|
7756
7646
|
),
|
|
7757
|
-
/* @__PURE__ */
|
|
7647
|
+
/* @__PURE__ */ jsx193(
|
|
7758
7648
|
RemoveButton,
|
|
7759
7649
|
{
|
|
7760
7650
|
colorScheme,
|
|
@@ -7769,6 +7659,117 @@ var Tag = forwardRef13(
|
|
|
7769
7659
|
);
|
|
7770
7660
|
Tag.displayName = "Tag";
|
|
7771
7661
|
|
|
7662
|
+
// src/components/Tooltip/Tooltip.tsx
|
|
7663
|
+
import {
|
|
7664
|
+
Root,
|
|
7665
|
+
Content,
|
|
7666
|
+
Trigger,
|
|
7667
|
+
Portal,
|
|
7668
|
+
Arrow
|
|
7669
|
+
} from "@radix-ui/react-tooltip";
|
|
7670
|
+
import styled30, { css as css19 } from "styled-components";
|
|
7671
|
+
import { jsx as jsx194, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
7672
|
+
var CompactTooltipStyles = css19`
|
|
7673
|
+
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
7674
|
+
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
7675
|
+
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
7676
|
+
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
7677
|
+
--tooltip-vertical-padding: var(--wui-space-03);
|
|
7678
|
+
`;
|
|
7679
|
+
var StyledContent = styled30(Content)`
|
|
7680
|
+
--tooltip-font-family: var(--wui-typography-family-default);
|
|
7681
|
+
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
7682
|
+
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
7683
|
+
--tooltip-color: var(--wui-color-text-on-fill);
|
|
7684
|
+
--tooltip-font-size: var(--wui-typography-label-3-size);
|
|
7685
|
+
--tooltip-line-height: var(--wui-typography-label-3-line-height);
|
|
7686
|
+
--tooltip-font-weight: var(--wui-typography-label-3-weight);
|
|
7687
|
+
--tooltip-horizontal-padding: var(--wui-space-03);
|
|
7688
|
+
--tooltip-vertical-padding: var(--wui-space-03);
|
|
7689
|
+
|
|
7690
|
+
${({ $compact }) => Boolean($compact) && CompactTooltipStyles};
|
|
7691
|
+
|
|
7692
|
+
font-family: var(--tooltip-font-family);
|
|
7693
|
+
font-size: var(--tooltip-font-size);
|
|
7694
|
+
border-radius: var(--tooltip-border-radius);
|
|
7695
|
+
padding: var(--tooltip-horizontal-padding) var(--tooltip-vertical-padding);
|
|
7696
|
+
background-color: var(--tooltip-bg);
|
|
7697
|
+
color: var(--tooltip-color);
|
|
7698
|
+
user-select: none;
|
|
7699
|
+
animation-duration: 400ms;
|
|
7700
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
7701
|
+
will-change: transform, opacity;
|
|
7702
|
+
max-width: 30em;
|
|
7703
|
+
|
|
7704
|
+
&[data-state='delayed-open'][data-side='top'] {
|
|
7705
|
+
animation-name: slideDownAndFade;
|
|
7706
|
+
}
|
|
7707
|
+
|
|
7708
|
+
&[data-state='delayed-open'][data-side='right'] {
|
|
7709
|
+
animation-name: slideLeftAndFade;
|
|
7710
|
+
}
|
|
7711
|
+
|
|
7712
|
+
&[data-state='delayed-open'][data-side='bottom'] {
|
|
7713
|
+
animation-name: slideUpAndFade;
|
|
7714
|
+
}
|
|
7715
|
+
|
|
7716
|
+
&[data-state='delayed-open'][data-side='left'] {
|
|
7717
|
+
animation-name: slideRightAndFade;
|
|
7718
|
+
}
|
|
7719
|
+
`;
|
|
7720
|
+
var VISUAL_OFFSET = 6;
|
|
7721
|
+
var Tooltip = ({
|
|
7722
|
+
delay = 700,
|
|
7723
|
+
direction = "top",
|
|
7724
|
+
content,
|
|
7725
|
+
children,
|
|
7726
|
+
forceOpen,
|
|
7727
|
+
compact = false,
|
|
7728
|
+
hideArrow = false
|
|
7729
|
+
}) => {
|
|
7730
|
+
const rootProps = {};
|
|
7731
|
+
if (content === "" || content === null) {
|
|
7732
|
+
rootProps.open = false;
|
|
7733
|
+
}
|
|
7734
|
+
if (forceOpen === true) {
|
|
7735
|
+
rootProps.open = true;
|
|
7736
|
+
}
|
|
7737
|
+
return /* @__PURE__ */ jsxs18(
|
|
7738
|
+
Root,
|
|
7739
|
+
{
|
|
7740
|
+
delayDuration: delay,
|
|
7741
|
+
...rootProps,
|
|
7742
|
+
children: [
|
|
7743
|
+
/* @__PURE__ */ jsx194(Trigger, { asChild: true, children }),
|
|
7744
|
+
/* @__PURE__ */ jsx194(Portal, { children: /* @__PURE__ */ jsxs18(
|
|
7745
|
+
StyledContent,
|
|
7746
|
+
{
|
|
7747
|
+
$compact: compact,
|
|
7748
|
+
side: direction,
|
|
7749
|
+
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
7750
|
+
children: [
|
|
7751
|
+
content,
|
|
7752
|
+
!hideArrow ? /* @__PURE__ */ jsx194(Arrow, { asChild: true, children: /* @__PURE__ */ jsx194(
|
|
7753
|
+
"svg",
|
|
7754
|
+
{
|
|
7755
|
+
fill: "var(--tooltip-bg)",
|
|
7756
|
+
height: "8",
|
|
7757
|
+
style: { transform: "translateY(-2px)" },
|
|
7758
|
+
viewBox: "0 0 12 8",
|
|
7759
|
+
width: "12",
|
|
7760
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7761
|
+
children: /* @__PURE__ */ jsx194("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" })
|
|
7762
|
+
}
|
|
7763
|
+
) }) : null
|
|
7764
|
+
]
|
|
7765
|
+
}
|
|
7766
|
+
) })
|
|
7767
|
+
]
|
|
7768
|
+
}
|
|
7769
|
+
);
|
|
7770
|
+
};
|
|
7771
|
+
Tooltip.displayName = "Tooltip";
|
|
7772
|
+
|
|
7772
7773
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
7773
7774
|
import styled31 from "styled-components";
|
|
7774
7775
|
import { isNotNil as isNotNil12 } from "@wistia/type-guards";
|
|
@@ -7874,6 +7875,151 @@ var WistiaLogo = ({
|
|
|
7874
7875
|
return href !== void 0 ? /* @__PURE__ */ jsx195("a", { href, children: Logo }) : Logo;
|
|
7875
7876
|
};
|
|
7876
7877
|
WistiaLogo.displayName = "WistiaLogo";
|
|
7878
|
+
|
|
7879
|
+
// src/components/Input/Input.tsx
|
|
7880
|
+
import { forwardRef as forwardRef14, cloneElement as cloneElement5 } from "react";
|
|
7881
|
+
import styled32, { css as css20 } from "styled-components";
|
|
7882
|
+
import { isNil as isNil11, isNotNil as isNotNil13 } from "@wistia/type-guards";
|
|
7883
|
+
import { jsx as jsx196, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
7884
|
+
var inputStyles = css20`
|
|
7885
|
+
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
7886
|
+
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
7887
|
+
--wui-input-color-border: var(--wui-color-border);
|
|
7888
|
+
--wui-input-color-border-focus: var(--wui-color-border-active);
|
|
7889
|
+
--wui-input-color-border-error: var(--wui-color-border-error);
|
|
7890
|
+
--wui-input-color-border-disabled: var(--wui-color-border-disabled);
|
|
7891
|
+
--wui-input-border-radius: var(--wui-border-radius-rounded);
|
|
7892
|
+
--wui-input-multiline-border-radius: var(--wui-border-radius-02);
|
|
7893
|
+
--wui-input-vertical-padding: var(--wui-space-02);
|
|
7894
|
+
--wui-input-horizontal-padding: var(--wui-space-03);
|
|
7895
|
+
--wui-input-placeholder: var(--wui-gray-10);
|
|
7896
|
+
--wui-input-color-text-error: var(--wui-color-text-error);
|
|
7897
|
+
|
|
7898
|
+
input,
|
|
7899
|
+
textarea {
|
|
7900
|
+
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
7901
|
+
background-color: var(--wui-input-color-bg);
|
|
7902
|
+
border: 1px solid var(--wui-input-color-border);
|
|
7903
|
+
border-radius: var(--wui-input-border-radius);
|
|
7904
|
+
|
|
7905
|
+
&::placeholder {
|
|
7906
|
+
color: var(--wui-input-placeholder);
|
|
7907
|
+
opacity: 1; /* Firefox */
|
|
7908
|
+
}
|
|
7909
|
+
|
|
7910
|
+
&:focus {
|
|
7911
|
+
border-color: var(--wui-input-color-border-focus);
|
|
7912
|
+
}
|
|
7913
|
+
|
|
7914
|
+
&[aria-invalid='true'] {
|
|
7915
|
+
border-color: var(--wui-input-color-border-error);
|
|
7916
|
+
color: var(--wui-input-color-text-error);
|
|
7917
|
+
}
|
|
7918
|
+
|
|
7919
|
+
&:disabled {
|
|
7920
|
+
border-color: var(--wui-color-bg-surface-disabled);
|
|
7921
|
+
background-color: var(--wui-color-bg-surface-disabled);
|
|
7922
|
+
}
|
|
7923
|
+
}
|
|
7924
|
+
`;
|
|
7925
|
+
var StyledInputContainer = styled32.div`
|
|
7926
|
+
display: inline-flex;
|
|
7927
|
+
position: relative;
|
|
7928
|
+
${inputStyles};
|
|
7929
|
+
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
7930
|
+
|
|
7931
|
+
input,
|
|
7932
|
+
textarea {
|
|
7933
|
+
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
7934
|
+
${({ $monospace }) => $monospace && "font-family: var(--wui-typography-family-mono);"}
|
|
7935
|
+
}
|
|
7936
|
+
|
|
7937
|
+
textarea {
|
|
7938
|
+
border-radius: var(--wui-input-multiline-border-radius);
|
|
7939
|
+
}
|
|
7940
|
+
|
|
7941
|
+
.wui-input-left-icon {
|
|
7942
|
+
display: flex;
|
|
7943
|
+
align-items: center;
|
|
7944
|
+
position: absolute;
|
|
7945
|
+
top: 50%;
|
|
7946
|
+
left: var(--wui-input-horizontal-padding);
|
|
7947
|
+
transform: translateY(-50%);
|
|
7948
|
+
}
|
|
7949
|
+
|
|
7950
|
+
:has(.wui-input-left-icon) input,
|
|
7951
|
+
:has(.wui-input-left-icon) textarea {
|
|
7952
|
+
padding-left: 32px;
|
|
7953
|
+
}
|
|
7954
|
+
|
|
7955
|
+
.wui-input-right-icon {
|
|
7956
|
+
display: flex;
|
|
7957
|
+
align-items: center;
|
|
7958
|
+
position: absolute;
|
|
7959
|
+
top: 50%;
|
|
7960
|
+
right: var(--wui-input-horizontal-padding);
|
|
7961
|
+
transform: translateY(-50%);
|
|
7962
|
+
}
|
|
7963
|
+
|
|
7964
|
+
:has(.wui-input-right-icon) input,
|
|
7965
|
+
:has(.wui-input-right-icon) textarea {
|
|
7966
|
+
padding-right: 32px;
|
|
7967
|
+
}
|
|
7968
|
+
`;
|
|
7969
|
+
var Input = forwardRef14(
|
|
7970
|
+
({
|
|
7971
|
+
fullWidth = false,
|
|
7972
|
+
monospace = false,
|
|
7973
|
+
type = "text",
|
|
7974
|
+
leftIcon,
|
|
7975
|
+
rightIcon,
|
|
7976
|
+
...props
|
|
7977
|
+
}, ref) => {
|
|
7978
|
+
let leftIconToDisplay = leftIcon;
|
|
7979
|
+
if (isNil11(leftIcon) && type === "search") {
|
|
7980
|
+
leftIconToDisplay = /* @__PURE__ */ jsx196(Icon, { type: "search" });
|
|
7981
|
+
}
|
|
7982
|
+
if (isNotNil13(leftIconToDisplay)) {
|
|
7983
|
+
leftIconToDisplay = cloneElement5(leftIconToDisplay, {
|
|
7984
|
+
size: "md",
|
|
7985
|
+
className: "wui-input-left-icon"
|
|
7986
|
+
});
|
|
7987
|
+
}
|
|
7988
|
+
let rightIconToDisplay = rightIcon;
|
|
7989
|
+
if (isNotNil13(rightIconToDisplay)) {
|
|
7990
|
+
rightIconToDisplay = cloneElement5(rightIconToDisplay, {
|
|
7991
|
+
size: "md",
|
|
7992
|
+
className: "wui-input-right-icon"
|
|
7993
|
+
});
|
|
7994
|
+
}
|
|
7995
|
+
return /* @__PURE__ */ jsxs20(
|
|
7996
|
+
StyledInputContainer,
|
|
7997
|
+
{
|
|
7998
|
+
$fullWidth: fullWidth,
|
|
7999
|
+
$monospace: monospace,
|
|
8000
|
+
children: [
|
|
8001
|
+
leftIconToDisplay ?? null,
|
|
8002
|
+
type === "multiline" ? /* @__PURE__ */ jsx196(
|
|
8003
|
+
"textarea",
|
|
8004
|
+
{
|
|
8005
|
+
...props,
|
|
8006
|
+
ref
|
|
8007
|
+
}
|
|
8008
|
+
) : /* @__PURE__ */ jsx196(
|
|
8009
|
+
"input",
|
|
8010
|
+
{
|
|
8011
|
+
...props,
|
|
8012
|
+
ref,
|
|
8013
|
+
type
|
|
8014
|
+
}
|
|
8015
|
+
),
|
|
8016
|
+
rightIconToDisplay ?? null
|
|
8017
|
+
]
|
|
8018
|
+
}
|
|
8019
|
+
);
|
|
8020
|
+
}
|
|
8021
|
+
);
|
|
8022
|
+
Input.displayName = "Input";
|
|
7877
8023
|
export {
|
|
7878
8024
|
Avatar,
|
|
7879
8025
|
Badge,
|
|
@@ -7893,6 +8039,7 @@ export {
|
|
|
7893
8039
|
Heading,
|
|
7894
8040
|
Icon,
|
|
7895
8041
|
IconButton,
|
|
8042
|
+
Input,
|
|
7896
8043
|
Label,
|
|
7897
8044
|
Link,
|
|
7898
8045
|
Menu,
|