@wistia/ui 0.6.11 → 0.6.12-beta.28258a2a.8bdbb6c
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 +109 -94
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.mjs +123 -108
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.6.
|
|
3
|
+
* @license @wistia/ui v0.6.12-beta.28258a2a.8bdbb6c
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -10041,12 +10041,14 @@ var getControlProps = (isOpen, onOpenChange) => {
|
|
|
10041
10041
|
// src/components/Popover/Popover.tsx
|
|
10042
10042
|
var import_jsx_runtime238 = require("react/jsx-runtime");
|
|
10043
10043
|
var StyledContent2 = (0, import_styled_components61.default)(import_react_popover.Content)`
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10044
|
+
${({ $unstyled }) => !$unstyled && import_styled_components61.css`
|
|
10045
|
+
border-radius: var(--wui-border-radius-02);
|
|
10046
|
+
padding: var(--wui-space-04);
|
|
10047
|
+
max-width: 320px;
|
|
10048
|
+
background-color: var(--wui-color-bg-surface);
|
|
10049
|
+
box-shadow: var(--wui-elevation-01);
|
|
10050
|
+
border: 1px solid var(--wui-color-border);
|
|
10051
|
+
`}
|
|
10050
10052
|
|
|
10051
10053
|
[data-wui-popover-close] {
|
|
10052
10054
|
position: absolute;
|
|
@@ -10054,16 +10056,13 @@ var StyledContent2 = (0, import_styled_components61.default)(import_react_popove
|
|
|
10054
10056
|
right: var(--wui-space-02);
|
|
10055
10057
|
}
|
|
10056
10058
|
`;
|
|
10057
|
-
var StyledArrow = (0, import_styled_components61.default)(import_react_popover.Arrow)`
|
|
10058
|
-
fill: white;
|
|
10059
|
-
display: none;
|
|
10060
|
-
`;
|
|
10061
10059
|
var Popover = ({
|
|
10062
10060
|
children,
|
|
10063
10061
|
trigger,
|
|
10064
10062
|
isOpen = false,
|
|
10065
10063
|
hideCloseButton = false,
|
|
10066
10064
|
onOpenChange,
|
|
10065
|
+
unstyled = false,
|
|
10067
10066
|
...props
|
|
10068
10067
|
}) => {
|
|
10069
10068
|
return /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(import_react_popover.Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
@@ -10071,10 +10070,10 @@ var Popover = ({
|
|
|
10071
10070
|
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_react_popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(
|
|
10072
10071
|
StyledContent2,
|
|
10073
10072
|
{
|
|
10074
|
-
sideOffset:
|
|
10073
|
+
sideOffset: 8,
|
|
10075
10074
|
...props,
|
|
10075
|
+
$unstyled: unstyled,
|
|
10076
10076
|
children: [
|
|
10077
|
-
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(StyledArrow, {}),
|
|
10078
10077
|
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(import_react_popover.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10079
10078
|
IconButton,
|
|
10080
10079
|
{
|
|
@@ -10815,6 +10814,7 @@ var TableRow = ({ children, ...props }) => {
|
|
|
10815
10814
|
var import_react59 = require("react");
|
|
10816
10815
|
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
10817
10816
|
var import_type_guards41 = require("@wistia/type-guards");
|
|
10817
|
+
var import_styled_components79 = __toESM(require("styled-components"));
|
|
10818
10818
|
|
|
10819
10819
|
// src/components/Tabs/TabPanel.tsx
|
|
10820
10820
|
var import_styled_components75 = __toESM(require("styled-components"));
|
|
@@ -10844,6 +10844,8 @@ var StyledTabList = (0, import_styled_components76.default)(import_react_tabs2.L
|
|
|
10844
10844
|
${segmentedControlStyles}
|
|
10845
10845
|
|
|
10846
10846
|
margin-bottom: var(--wui-space-04);
|
|
10847
|
+
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
10848
|
+
align-self: ${({ $fullWidth }) => $fullWidth ? "auto" : "flex-start"};
|
|
10847
10849
|
`;
|
|
10848
10850
|
var TabList = ({
|
|
10849
10851
|
children,
|
|
@@ -10998,6 +11000,22 @@ var SelectedItemIndicator2 = () => {
|
|
|
10998
11000
|
|
|
10999
11001
|
// src/components/Tabs/Tabs.tsx
|
|
11000
11002
|
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
11003
|
+
var TabsContainer = import_styled_components79.default.div`
|
|
11004
|
+
display: flex;
|
|
11005
|
+
flex-direction: column;
|
|
11006
|
+
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
11007
|
+
overflow: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
11008
|
+
`;
|
|
11009
|
+
var StickyTabContent = import_styled_components79.default.div`
|
|
11010
|
+
flex: ${({ $stickyHeaders }) => $stickyHeaders ? "1" : "initial"};
|
|
11011
|
+
overflow-y: ${({ $stickyHeaders }) => $stickyHeaders ? "auto" : "visible"};
|
|
11012
|
+
overflow-x: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
11013
|
+
`;
|
|
11014
|
+
var StyledTabsRoot = (0, import_styled_components79.default)(import_react_tabs4.Root)`
|
|
11015
|
+
display: flex;
|
|
11016
|
+
flex-direction: column;
|
|
11017
|
+
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
11018
|
+
`;
|
|
11001
11019
|
var Tabs = (0, import_react59.forwardRef)(
|
|
11002
11020
|
({
|
|
11003
11021
|
children,
|
|
@@ -11006,6 +11024,7 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11006
11024
|
defaultSelectedValue,
|
|
11007
11025
|
selectedValue,
|
|
11008
11026
|
onSelectedValueChange,
|
|
11027
|
+
stickyHeaders = true,
|
|
11009
11028
|
...otherProps
|
|
11010
11029
|
}, ref) => {
|
|
11011
11030
|
const tabItems = extractTabItems(children);
|
|
@@ -11014,86 +11033,82 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11014
11033
|
defaultValue: defaultSelectedValue,
|
|
11015
11034
|
onValueChange: setInternalSelectedValue
|
|
11016
11035
|
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
11017
|
-
|
|
11018
|
-
|
|
11036
|
+
const currentValue = defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue;
|
|
11037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(TabsContainer, { $stickyHeaders: stickyHeaders, children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
11038
|
+
StyledTabsRoot,
|
|
11019
11039
|
{
|
|
11020
11040
|
ref,
|
|
11041
|
+
$stickyHeaders: stickyHeaders,
|
|
11021
11042
|
activationMode: "automatic",
|
|
11022
11043
|
...otherProps,
|
|
11023
11044
|
...modeProps,
|
|
11024
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11029
|
-
|
|
11030
|
-
|
|
11031
|
-
{
|
|
11032
|
-
|
|
11033
|
-
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(SelectedItemMeasurementsProvider, { children: [
|
|
11046
|
+
/* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(
|
|
11047
|
+
TabList,
|
|
11048
|
+
{
|
|
11049
|
+
ariaLabel,
|
|
11050
|
+
fullWidth,
|
|
11051
|
+
children: [
|
|
11052
|
+
/* @__PURE__ */ (0, import_jsx_runtime257.jsx)(SelectedItemIndicator2, {}),
|
|
11053
|
+
tabItems.map((tab) => {
|
|
11054
|
+
const {
|
|
11055
|
+
value,
|
|
11056
|
+
disabled = false,
|
|
11057
|
+
icon,
|
|
11058
|
+
label,
|
|
11059
|
+
"aria-label": ariaLabelForTab
|
|
11060
|
+
} = tab.props;
|
|
11061
|
+
if ((0, import_type_guards41.isNil)(icon)) {
|
|
11062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
11063
|
+
TabItem,
|
|
11064
|
+
{
|
|
11065
|
+
disabled,
|
|
11066
|
+
label,
|
|
11067
|
+
value
|
|
11068
|
+
},
|
|
11069
|
+
value
|
|
11070
|
+
);
|
|
11071
|
+
}
|
|
11072
|
+
if ((0, import_type_guards41.isNotNil)(label)) {
|
|
11073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
11074
|
+
TabItem,
|
|
11075
|
+
{
|
|
11076
|
+
disabled,
|
|
11040
11077
|
icon,
|
|
11041
11078
|
label,
|
|
11042
|
-
|
|
11043
|
-
}
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
icon,
|
|
11074
|
-
value
|
|
11075
|
-
},
|
|
11076
|
-
value
|
|
11077
|
-
);
|
|
11078
|
-
}
|
|
11079
|
-
throw new Error("A `Tab` with an icon must have either label or aria-label");
|
|
11080
|
-
})
|
|
11081
|
-
]
|
|
11082
|
-
}
|
|
11083
|
-
),
|
|
11084
|
-
tabItems.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
11085
|
-
TabPanel,
|
|
11086
|
-
{
|
|
11087
|
-
value: tab.props.value,
|
|
11088
|
-
children: tab.props.children
|
|
11089
|
-
},
|
|
11090
|
-
tab.props.value
|
|
11091
|
-
))
|
|
11092
|
-
] })
|
|
11093
|
-
}
|
|
11094
|
-
)
|
|
11079
|
+
value
|
|
11080
|
+
},
|
|
11081
|
+
value
|
|
11082
|
+
);
|
|
11083
|
+
}
|
|
11084
|
+
if ((0, import_type_guards41.isNotNil)(ariaLabelForTab)) {
|
|
11085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
11086
|
+
TabItem,
|
|
11087
|
+
{
|
|
11088
|
+
"aria-label": ariaLabelForTab,
|
|
11089
|
+
disabled,
|
|
11090
|
+
icon,
|
|
11091
|
+
value
|
|
11092
|
+
},
|
|
11093
|
+
value
|
|
11094
|
+
);
|
|
11095
|
+
}
|
|
11096
|
+
throw new Error("A `Tab` with an icon must have either label or aria-label");
|
|
11097
|
+
})
|
|
11098
|
+
]
|
|
11099
|
+
}
|
|
11100
|
+
),
|
|
11101
|
+
/* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StickyTabContent, { $stickyHeaders: stickyHeaders, children: tabItems.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
|
|
11102
|
+
TabPanel,
|
|
11103
|
+
{
|
|
11104
|
+
value: tab.props.value,
|
|
11105
|
+
children: tab.props.children
|
|
11106
|
+
},
|
|
11107
|
+
tab.props.value
|
|
11108
|
+
)) })
|
|
11109
|
+
] }) })
|
|
11095
11110
|
}
|
|
11096
|
-
);
|
|
11111
|
+
) });
|
|
11097
11112
|
}
|
|
11098
11113
|
);
|
|
11099
11114
|
Tabs.displayName = "Tabs";
|
|
@@ -11108,10 +11123,10 @@ Tab.displayName = "Tab";
|
|
|
11108
11123
|
|
|
11109
11124
|
// src/components/Tag/Tag.tsx
|
|
11110
11125
|
var import_react61 = require("react");
|
|
11111
|
-
var
|
|
11126
|
+
var import_styled_components80 = __toESM(require("styled-components"));
|
|
11112
11127
|
var import_type_guards42 = require("@wistia/type-guards");
|
|
11113
11128
|
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
11114
|
-
var TagLabel =
|
|
11129
|
+
var TagLabel = import_styled_components80.default.a`
|
|
11115
11130
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11116
11131
|
font-size: var(--wui-typography-label-4-size);
|
|
11117
11132
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -11139,14 +11154,14 @@ var TagLabel = import_styled_components79.default.a`
|
|
|
11139
11154
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
11140
11155
|
}
|
|
11141
11156
|
`;
|
|
11142
|
-
var TagDivider =
|
|
11157
|
+
var TagDivider = import_styled_components80.default.div`
|
|
11143
11158
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11144
11159
|
border-left: 1px solid var(--wui-color-border);
|
|
11145
11160
|
display: flex;
|
|
11146
11161
|
height: 14px;
|
|
11147
11162
|
width: 1px;
|
|
11148
11163
|
`;
|
|
11149
|
-
var StyledRemoveButton =
|
|
11164
|
+
var StyledRemoveButton = import_styled_components80.default.button`
|
|
11150
11165
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11151
11166
|
all: unset;
|
|
11152
11167
|
cursor: pointer;
|
|
@@ -11174,7 +11189,7 @@ var StyledRemoveButton = import_styled_components79.default.button`
|
|
|
11174
11189
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
11175
11190
|
}
|
|
11176
11191
|
`;
|
|
11177
|
-
var StyledTag =
|
|
11192
|
+
var StyledTag = import_styled_components80.default.div`
|
|
11178
11193
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11179
11194
|
align-items: center;
|
|
11180
11195
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -11251,7 +11266,7 @@ var Tag = (0, import_react61.forwardRef)(
|
|
|
11251
11266
|
Tag.displayName = "Tag";
|
|
11252
11267
|
|
|
11253
11268
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
11254
|
-
var
|
|
11269
|
+
var import_styled_components81 = __toESM(require("styled-components"));
|
|
11255
11270
|
var import_type_guards43 = require("@wistia/type-guards");
|
|
11256
11271
|
var import_jsx_runtime260 = require("react/jsx-runtime");
|
|
11257
11272
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
@@ -11293,7 +11308,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
11293
11308
|
}
|
|
11294
11309
|
return "0 0 144 31.47";
|
|
11295
11310
|
};
|
|
11296
|
-
var WistiaLogoComponent =
|
|
11311
|
+
var WistiaLogoComponent = import_styled_components81.default.svg`
|
|
11297
11312
|
height: ${({ height }) => `${height}px`};
|
|
11298
11313
|
|
|
11299
11314
|
/* ensure it will always fit on mobile */
|
|
@@ -11309,12 +11324,12 @@ var WistiaLogoComponent = import_styled_components80.default.svg`
|
|
|
11309
11324
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
11310
11325
|
if ($opticallyCentered) {
|
|
11311
11326
|
if ($iconOnly) {
|
|
11312
|
-
return
|
|
11327
|
+
return import_styled_components81.css`
|
|
11313
11328
|
aspect-ratio: 1;
|
|
11314
11329
|
padding: 11.85% 3.12% 13.91%;
|
|
11315
11330
|
`;
|
|
11316
11331
|
}
|
|
11317
|
-
return
|
|
11332
|
+
return import_styled_components81.css`
|
|
11318
11333
|
aspect-ratio: 127 / 32;
|
|
11319
11334
|
`;
|
|
11320
11335
|
}
|