@wistia/ui 0.18.14 → 0.18.15-beta.db783a03.0fd487b
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 +69 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +29 -29
- package/dist/index.d.ts +29 -29
- package/dist/index.mjs +68 -29
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.18.
|
|
3
|
+
* @license @wistia/ui v0.18.15-beta.db783a03.0fd487b
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -73,6 +73,7 @@ __export(index_exports, {
|
|
|
73
73
|
ComboboxOption: () => ComboboxOption,
|
|
74
74
|
ContextMenu: () => ContextMenu,
|
|
75
75
|
ContrastControls: () => ContrastControls,
|
|
76
|
+
CustomizableThemeWrapper: () => CustomizableThemeWrapper,
|
|
76
77
|
DataCard: () => DataCard,
|
|
77
78
|
DataCardHoverArrow: () => DataCardHoverArrow,
|
|
78
79
|
DataCardTrend: () => DataCardTrend,
|
|
@@ -208,8 +209,6 @@ var import_styled_components13 = require("styled-components");
|
|
|
208
209
|
// src/css/globalStyleAdjustmentsCss.tsx
|
|
209
210
|
var import_styled_components = require("styled-components");
|
|
210
211
|
var globalStyleAdjustmentsCss = import_styled_components.css`
|
|
211
|
-
/* stylelint-disable property-no-vendor-prefix */
|
|
212
|
-
|
|
213
212
|
/**
|
|
214
213
|
* 1. Change from 'content-box' so that 'width' calculations are unaffected by 'padding' or 'border'
|
|
215
214
|
See: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
|
|
@@ -2575,17 +2574,20 @@ var dateTime = {
|
|
|
2575
2574
|
|
|
2576
2575
|
// src/helpers/mergeRefs/mergeRefs.ts
|
|
2577
2576
|
var import_type_guards5 = require("@wistia/type-guards");
|
|
2578
|
-
var mergeRefs = (
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
}
|
|
2577
|
+
var mergeRefs = (
|
|
2578
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
2579
|
+
(refs) => (value) => {
|
|
2580
|
+
refs.forEach((ref) => {
|
|
2581
|
+
if ((0, import_type_guards5.isFunction)(ref)) {
|
|
2582
|
+
ref(value);
|
|
2583
|
+
return;
|
|
2584
|
+
}
|
|
2585
|
+
if ((0, import_type_guards5.isNotNil)(ref)) {
|
|
2586
|
+
ref.current = value;
|
|
2587
|
+
}
|
|
2588
|
+
});
|
|
2589
|
+
}
|
|
2590
|
+
);
|
|
2589
2591
|
|
|
2590
2592
|
// src/helpers/mq/mq.ts
|
|
2591
2593
|
var import_polished = require("polished");
|
|
@@ -2661,7 +2663,7 @@ var import_react7 = require("react");
|
|
|
2661
2663
|
var import_react6 = require("react");
|
|
2662
2664
|
var useTimedToggle = (initialValue) => {
|
|
2663
2665
|
const [value, setValue] = (0, import_react6.useState)(false);
|
|
2664
|
-
const timeoutRef = (0, import_react6.useRef)();
|
|
2666
|
+
const timeoutRef = (0, import_react6.useRef)(void 0);
|
|
2665
2667
|
const initialValueRef = (0, import_react6.useRef)(initialValue);
|
|
2666
2668
|
const toggleValue = (timeout) => {
|
|
2667
2669
|
clearTimeout(timeoutRef.current);
|
|
@@ -3027,8 +3029,8 @@ var isEventTargetSupported = (eventTarget) => (
|
|
|
3027
3029
|
Boolean(typeof eventTarget === "object" && eventTarget?.addEventListener)
|
|
3028
3030
|
);
|
|
3029
3031
|
var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
|
|
3030
|
-
const savedEventHandler = (0, import_react12.useRef)();
|
|
3031
|
-
const savedEventOptions = (0, import_react12.useRef)();
|
|
3032
|
+
const savedEventHandler = (0, import_react12.useRef)(void 0);
|
|
3033
|
+
const savedEventOptions = (0, import_react12.useRef)(void 0);
|
|
3032
3034
|
(0, import_react12.useEffect)(() => {
|
|
3033
3035
|
savedEventHandler.current = eventHandler;
|
|
3034
3036
|
}, [eventHandler]);
|
|
@@ -3221,7 +3223,7 @@ var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) =
|
|
|
3221
3223
|
// src/hooks/usePreviousValue/usePreviousValue.ts
|
|
3222
3224
|
var import_react18 = require("react");
|
|
3223
3225
|
var usePreviousValue = (value) => {
|
|
3224
|
-
const ref = (0, import_react18.useRef)();
|
|
3226
|
+
const ref = (0, import_react18.useRef)(void 0);
|
|
3225
3227
|
(0, import_react18.useEffect)(() => {
|
|
3226
3228
|
ref.current = value;
|
|
3227
3229
|
});
|
|
@@ -8242,7 +8244,7 @@ var StyledActionButton = (0, import_styled_components24.styled)(Button)`
|
|
|
8242
8244
|
min-width: 96px;
|
|
8243
8245
|
padding: var(--wui-space-03);
|
|
8244
8246
|
background: var(--wui-color-bg-surface-secondary);
|
|
8245
|
-
|
|
8247
|
+
row-gap: var(--wui-space-02);
|
|
8246
8248
|
border-radius: var(--wui-border-radius-03);
|
|
8247
8249
|
flex: 0 0 auto;
|
|
8248
8250
|
transition: background-color var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
@@ -10365,9 +10367,9 @@ var isClickableElement = (element) => {
|
|
|
10365
10367
|
};
|
|
10366
10368
|
var ClickRegion = ({ children, targetRef }) => {
|
|
10367
10369
|
(0, import_react39.useEffect)(() => {
|
|
10368
|
-
if (targetRef.current
|
|
10370
|
+
if (targetRef.current?.tagName === "A") {
|
|
10369
10371
|
targetRef.current.setAttribute("data-click-region-target-link", "");
|
|
10370
|
-
} else if (targetRef.current
|
|
10372
|
+
} else if (targetRef.current?.tagName === "BUTTON") {
|
|
10371
10373
|
targetRef.current.setAttribute("data-click-region-target-button", "");
|
|
10372
10374
|
} else {
|
|
10373
10375
|
}
|
|
@@ -11804,6 +11806,7 @@ var StyledSwitchWrapper = import_styled_components62.styled.div`
|
|
|
11804
11806
|
|
|
11805
11807
|
display: flex;
|
|
11806
11808
|
margin: 0;
|
|
11809
|
+
position: relative;
|
|
11807
11810
|
|
|
11808
11811
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
11809
11812
|
user-select: none;
|
|
@@ -12465,7 +12468,9 @@ var Root = (0, import_styled_components66.styled)(import_react_slider.Root)`
|
|
|
12465
12468
|
var Track = (0, import_styled_components66.styled)(import_react_slider.Track)`
|
|
12466
12469
|
width: 100%;
|
|
12467
12470
|
`;
|
|
12468
|
-
var Thumb = (0, import_styled_components66.styled)(import_react_slider.Thumb)
|
|
12471
|
+
var Thumb = (0, import_styled_components66.styled)(import_react_slider.Thumb)`
|
|
12472
|
+
position: relative;
|
|
12473
|
+
`;
|
|
12469
12474
|
var ThumbInner = import_styled_components66.styled.div`
|
|
12470
12475
|
cursor: pointer;
|
|
12471
12476
|
display: block;
|
|
@@ -13683,8 +13688,12 @@ MenuItemButton.displayName = "MenuItemButton_UI";
|
|
|
13683
13688
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
13684
13689
|
var import_styled_components75 = require("styled-components");
|
|
13685
13690
|
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
13686
|
-
var StyledMenuItemLabel = import_styled_components75.styled.span
|
|
13687
|
-
|
|
13691
|
+
var StyledMenuItemLabel = import_styled_components75.styled.span`
|
|
13692
|
+
/* avoid no-empty-source rule */
|
|
13693
|
+
`;
|
|
13694
|
+
var StyledMenuItemDescription = (0, import_styled_components75.styled)(Text)`
|
|
13695
|
+
/* avoid no-empty-source rule */
|
|
13696
|
+
`;
|
|
13688
13697
|
var MenuItemLabel = ({ children }) => {
|
|
13689
13698
|
return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(StyledMenuItemLabel, { children });
|
|
13690
13699
|
};
|
|
@@ -14816,7 +14825,8 @@ var StyledEditableTextDisplay = import_styled_components85.styled.div`
|
|
|
14816
14825
|
${({ $minLines }) => (0, import_type_guards46.isNotNil)($minLines) && import_styled_components85.css`
|
|
14817
14826
|
min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));
|
|
14818
14827
|
`}
|
|
14819
|
-
word-break:
|
|
14828
|
+
word-break: normal;
|
|
14829
|
+
overflow-wrap: anywhere;
|
|
14820
14830
|
|
|
14821
14831
|
&[data-wui-editable-text-display='placeholder'] {
|
|
14822
14832
|
color: var(--wui-color-text-secondary);
|
|
@@ -14894,6 +14904,7 @@ var EditableTextDisplayComponent = (0, import_react65.forwardRef)(
|
|
|
14894
14904
|
);
|
|
14895
14905
|
EditableTextDisplayComponent.displayName = "EditableTextDisplay_UI";
|
|
14896
14906
|
var EditableTextDisplay = makePolymorphic(
|
|
14907
|
+
// @ts-expect-error makePolymorphic is causing issues with types in R19
|
|
14897
14908
|
EditableTextDisplayComponent
|
|
14898
14909
|
);
|
|
14899
14910
|
|
|
@@ -17755,7 +17766,9 @@ var TableSectionContext = (0, import_react92.createContext)(null);
|
|
|
17755
17766
|
|
|
17756
17767
|
// src/components/Table/TableBody.tsx
|
|
17757
17768
|
var import_jsx_runtime324 = require("react/jsx-runtime");
|
|
17758
|
-
var StyledTableBody = import_styled_components117.styled.tbody
|
|
17769
|
+
var StyledTableBody = import_styled_components117.styled.tbody`
|
|
17770
|
+
width: 100%;
|
|
17771
|
+
`;
|
|
17759
17772
|
var TableBody = ({ children, ...props }) => {
|
|
17760
17773
|
return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(StyledTableBody, { ...props, children }) });
|
|
17761
17774
|
};
|
|
@@ -17792,7 +17805,9 @@ var TableCell = ({ children, ...props }) => {
|
|
|
17792
17805
|
// src/components/Table/TableFoot.tsx
|
|
17793
17806
|
var import_styled_components119 = require("styled-components");
|
|
17794
17807
|
var import_jsx_runtime326 = require("react/jsx-runtime");
|
|
17795
|
-
var StyledTableFoot = import_styled_components119.styled.tfoot
|
|
17808
|
+
var StyledTableFoot = import_styled_components119.styled.tfoot`
|
|
17809
|
+
width: 100%;
|
|
17810
|
+
`;
|
|
17796
17811
|
var TableFoot = ({ children, ...props }) => {
|
|
17797
17812
|
return /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(StyledTableFoot, { ...props, children }) });
|
|
17798
17813
|
};
|
|
@@ -17800,7 +17815,9 @@ var TableFoot = ({ children, ...props }) => {
|
|
|
17800
17815
|
// src/components/Table/TableHead.tsx
|
|
17801
17816
|
var import_styled_components120 = require("styled-components");
|
|
17802
17817
|
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
17803
|
-
var StyledThead = import_styled_components120.styled.thead
|
|
17818
|
+
var StyledThead = import_styled_components120.styled.thead`
|
|
17819
|
+
width: 100%;
|
|
17820
|
+
`;
|
|
17804
17821
|
var TableHead = ({ children, ...props }) => {
|
|
17805
17822
|
return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(StyledThead, { ...props, children }) });
|
|
17806
17823
|
};
|
|
@@ -17808,7 +17825,9 @@ var TableHead = ({ children, ...props }) => {
|
|
|
17808
17825
|
// src/components/Table/TableRow.tsx
|
|
17809
17826
|
var import_styled_components121 = require("styled-components");
|
|
17810
17827
|
var import_jsx_runtime328 = require("react/jsx-runtime");
|
|
17811
|
-
var StyledTableRow = import_styled_components121.styled.tr
|
|
17828
|
+
var StyledTableRow = import_styled_components121.styled.tr`
|
|
17829
|
+
width: 100%;
|
|
17830
|
+
`;
|
|
17812
17831
|
var TableRow = ({ children, ...props }) => {
|
|
17813
17832
|
return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(StyledTableRow, { ...props, children });
|
|
17814
17833
|
};
|
|
@@ -18809,6 +18828,26 @@ var SplitButton = ({
|
|
|
18809
18828
|
] });
|
|
18810
18829
|
};
|
|
18811
18830
|
SplitButton.displayName = "SplitButton_UI";
|
|
18831
|
+
|
|
18832
|
+
// src/components/CustomizableThemeWrapper/CustomizableThemeWrapper.tsx
|
|
18833
|
+
var import_styled_components132 = require("styled-components");
|
|
18834
|
+
var import_jsx_runtime340 = require("react/jsx-runtime");
|
|
18835
|
+
var StyledCustomizableThemeWrapper = import_styled_components132.styled.div(
|
|
18836
|
+
(props) => props.$overrides
|
|
18837
|
+
);
|
|
18838
|
+
var CustomizableThemeWrapper = ({
|
|
18839
|
+
children,
|
|
18840
|
+
overrides,
|
|
18841
|
+
...props
|
|
18842
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(
|
|
18843
|
+
StyledCustomizableThemeWrapper,
|
|
18844
|
+
{
|
|
18845
|
+
...props,
|
|
18846
|
+
$overrides: overrides,
|
|
18847
|
+
children
|
|
18848
|
+
}
|
|
18849
|
+
);
|
|
18850
|
+
CustomizableThemeWrapper.displayName = "CustomizableThemeWrapper_UI";
|
|
18812
18851
|
// Annotate the CommonJS export names for ESM import in node:
|
|
18813
18852
|
0 && (module.exports = {
|
|
18814
18853
|
ActionButton,
|
|
@@ -18845,6 +18884,7 @@ SplitButton.displayName = "SplitButton_UI";
|
|
|
18845
18884
|
ComboboxOption,
|
|
18846
18885
|
ContextMenu,
|
|
18847
18886
|
ContrastControls,
|
|
18887
|
+
CustomizableThemeWrapper,
|
|
18848
18888
|
DataCard,
|
|
18849
18889
|
DataCardHoverArrow,
|
|
18850
18890
|
DataCardTrend,
|