@wistia/ui 0.18.14 → 0.18.15
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 +68 -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 +67 -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
|
|
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
|
}
|
|
@@ -12465,7 +12467,9 @@ var Root = (0, import_styled_components66.styled)(import_react_slider.Root)`
|
|
|
12465
12467
|
var Track = (0, import_styled_components66.styled)(import_react_slider.Track)`
|
|
12466
12468
|
width: 100%;
|
|
12467
12469
|
`;
|
|
12468
|
-
var Thumb = (0, import_styled_components66.styled)(import_react_slider.Thumb)
|
|
12470
|
+
var Thumb = (0, import_styled_components66.styled)(import_react_slider.Thumb)`
|
|
12471
|
+
position: relative;
|
|
12472
|
+
`;
|
|
12469
12473
|
var ThumbInner = import_styled_components66.styled.div`
|
|
12470
12474
|
cursor: pointer;
|
|
12471
12475
|
display: block;
|
|
@@ -13683,8 +13687,12 @@ MenuItemButton.displayName = "MenuItemButton_UI";
|
|
|
13683
13687
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
13684
13688
|
var import_styled_components75 = require("styled-components");
|
|
13685
13689
|
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
13686
|
-
var StyledMenuItemLabel = import_styled_components75.styled.span
|
|
13687
|
-
|
|
13690
|
+
var StyledMenuItemLabel = import_styled_components75.styled.span`
|
|
13691
|
+
/* avoid no-empty-source rule */
|
|
13692
|
+
`;
|
|
13693
|
+
var StyledMenuItemDescription = (0, import_styled_components75.styled)(Text)`
|
|
13694
|
+
/* avoid no-empty-source rule */
|
|
13695
|
+
`;
|
|
13688
13696
|
var MenuItemLabel = ({ children }) => {
|
|
13689
13697
|
return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(StyledMenuItemLabel, { children });
|
|
13690
13698
|
};
|
|
@@ -14816,7 +14824,8 @@ var StyledEditableTextDisplay = import_styled_components85.styled.div`
|
|
|
14816
14824
|
${({ $minLines }) => (0, import_type_guards46.isNotNil)($minLines) && import_styled_components85.css`
|
|
14817
14825
|
min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));
|
|
14818
14826
|
`}
|
|
14819
|
-
word-break:
|
|
14827
|
+
word-break: normal;
|
|
14828
|
+
overflow-wrap: anywhere;
|
|
14820
14829
|
|
|
14821
14830
|
&[data-wui-editable-text-display='placeholder'] {
|
|
14822
14831
|
color: var(--wui-color-text-secondary);
|
|
@@ -14894,6 +14903,7 @@ var EditableTextDisplayComponent = (0, import_react65.forwardRef)(
|
|
|
14894
14903
|
);
|
|
14895
14904
|
EditableTextDisplayComponent.displayName = "EditableTextDisplay_UI";
|
|
14896
14905
|
var EditableTextDisplay = makePolymorphic(
|
|
14906
|
+
// @ts-expect-error makePolymorphic is causing issues with types in R19
|
|
14897
14907
|
EditableTextDisplayComponent
|
|
14898
14908
|
);
|
|
14899
14909
|
|
|
@@ -17755,7 +17765,9 @@ var TableSectionContext = (0, import_react92.createContext)(null);
|
|
|
17755
17765
|
|
|
17756
17766
|
// src/components/Table/TableBody.tsx
|
|
17757
17767
|
var import_jsx_runtime324 = require("react/jsx-runtime");
|
|
17758
|
-
var StyledTableBody = import_styled_components117.styled.tbody
|
|
17768
|
+
var StyledTableBody = import_styled_components117.styled.tbody`
|
|
17769
|
+
width: 100%;
|
|
17770
|
+
`;
|
|
17759
17771
|
var TableBody = ({ children, ...props }) => {
|
|
17760
17772
|
return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(StyledTableBody, { ...props, children }) });
|
|
17761
17773
|
};
|
|
@@ -17792,7 +17804,9 @@ var TableCell = ({ children, ...props }) => {
|
|
|
17792
17804
|
// src/components/Table/TableFoot.tsx
|
|
17793
17805
|
var import_styled_components119 = require("styled-components");
|
|
17794
17806
|
var import_jsx_runtime326 = require("react/jsx-runtime");
|
|
17795
|
-
var StyledTableFoot = import_styled_components119.styled.tfoot
|
|
17807
|
+
var StyledTableFoot = import_styled_components119.styled.tfoot`
|
|
17808
|
+
width: 100%;
|
|
17809
|
+
`;
|
|
17796
17810
|
var TableFoot = ({ children, ...props }) => {
|
|
17797
17811
|
return /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(StyledTableFoot, { ...props, children }) });
|
|
17798
17812
|
};
|
|
@@ -17800,7 +17814,9 @@ var TableFoot = ({ children, ...props }) => {
|
|
|
17800
17814
|
// src/components/Table/TableHead.tsx
|
|
17801
17815
|
var import_styled_components120 = require("styled-components");
|
|
17802
17816
|
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
17803
|
-
var StyledThead = import_styled_components120.styled.thead
|
|
17817
|
+
var StyledThead = import_styled_components120.styled.thead`
|
|
17818
|
+
width: 100%;
|
|
17819
|
+
`;
|
|
17804
17820
|
var TableHead = ({ children, ...props }) => {
|
|
17805
17821
|
return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(StyledThead, { ...props, children }) });
|
|
17806
17822
|
};
|
|
@@ -17808,7 +17824,9 @@ var TableHead = ({ children, ...props }) => {
|
|
|
17808
17824
|
// src/components/Table/TableRow.tsx
|
|
17809
17825
|
var import_styled_components121 = require("styled-components");
|
|
17810
17826
|
var import_jsx_runtime328 = require("react/jsx-runtime");
|
|
17811
|
-
var StyledTableRow = import_styled_components121.styled.tr
|
|
17827
|
+
var StyledTableRow = import_styled_components121.styled.tr`
|
|
17828
|
+
width: 100%;
|
|
17829
|
+
`;
|
|
17812
17830
|
var TableRow = ({ children, ...props }) => {
|
|
17813
17831
|
return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(StyledTableRow, { ...props, children });
|
|
17814
17832
|
};
|
|
@@ -18809,6 +18827,26 @@ var SplitButton = ({
|
|
|
18809
18827
|
] });
|
|
18810
18828
|
};
|
|
18811
18829
|
SplitButton.displayName = "SplitButton_UI";
|
|
18830
|
+
|
|
18831
|
+
// src/components/CustomizableThemeWrapper/CustomizableThemeWrapper.tsx
|
|
18832
|
+
var import_styled_components132 = require("styled-components");
|
|
18833
|
+
var import_jsx_runtime340 = require("react/jsx-runtime");
|
|
18834
|
+
var StyledCustomizableThemeWrapper = import_styled_components132.styled.div(
|
|
18835
|
+
(props) => props.$overrides
|
|
18836
|
+
);
|
|
18837
|
+
var CustomizableThemeWrapper = ({
|
|
18838
|
+
children,
|
|
18839
|
+
overrides,
|
|
18840
|
+
...props
|
|
18841
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(
|
|
18842
|
+
StyledCustomizableThemeWrapper,
|
|
18843
|
+
{
|
|
18844
|
+
...props,
|
|
18845
|
+
$overrides: overrides,
|
|
18846
|
+
children
|
|
18847
|
+
}
|
|
18848
|
+
);
|
|
18849
|
+
CustomizableThemeWrapper.displayName = "CustomizableThemeWrapper_UI";
|
|
18812
18850
|
// Annotate the CommonJS export names for ESM import in node:
|
|
18813
18851
|
0 && (module.exports = {
|
|
18814
18852
|
ActionButton,
|
|
@@ -18845,6 +18883,7 @@ SplitButton.displayName = "SplitButton_UI";
|
|
|
18845
18883
|
ComboboxOption,
|
|
18846
18884
|
ContextMenu,
|
|
18847
18885
|
ContrastControls,
|
|
18886
|
+
CustomizableThemeWrapper,
|
|
18848
18887
|
DataCard,
|
|
18849
18888
|
DataCardHoverArrow,
|
|
18850
18889
|
DataCardTrend,
|