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