@wistia/ui 0.14.27-beta.00a6ea3c.ab8f0ad → 0.14.27-beta.d2fb2564.e1cb0bf
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 +8 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +15 -13
- 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.14.27-beta.
|
|
3
|
+
* @license @wistia/ui v0.14.27-beta.d2fb2564.e1cb0bf
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -16012,15 +16012,16 @@ var import_throttle_debounce2 = require("throttle-debounce");
|
|
|
16012
16012
|
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
16013
16013
|
var SHADOW_SIZE_PX = 8;
|
|
16014
16014
|
var Container10 = import_styled_components105.default.div`
|
|
16015
|
-
width: fit-content;
|
|
16016
|
-
height: fit-content;
|
|
16017
16015
|
overflow: hidden;
|
|
16018
16016
|
position: relative;
|
|
16017
|
+
flex: 1 1 auto;
|
|
16019
16018
|
`;
|
|
16020
16019
|
var ScrollContainer = import_styled_components105.default.div`
|
|
16021
16020
|
contain: layout;
|
|
16022
16021
|
overflow: auto;
|
|
16023
16022
|
position: relative;
|
|
16023
|
+
height: 100%;
|
|
16024
|
+
width: 100%;
|
|
16024
16025
|
`;
|
|
16025
16026
|
var Shadow = import_styled_components105.default.div`
|
|
16026
16027
|
pointer-events: none;
|
|
@@ -16058,7 +16059,7 @@ var ShadowAtRight = (0, import_styled_components105.default)(Shadow)`
|
|
|
16058
16059
|
width: 0;
|
|
16059
16060
|
`;
|
|
16060
16061
|
var ScrollArea = (0, import_react85.forwardRef)(
|
|
16061
|
-
({ children, onScroll, ...props }, forwardedRef) => {
|
|
16062
|
+
({ children, onScroll, style, ...props }, forwardedRef) => {
|
|
16062
16063
|
const scrollContainerRefInternal = (0, import_react85.useRef)(null);
|
|
16063
16064
|
const [shadowState, setShadowState] = (0, import_react85.useState)({
|
|
16064
16065
|
canScrollUp: false,
|
|
@@ -16079,18 +16080,18 @@ var ScrollArea = (0, import_react85.forwardRef)(
|
|
|
16079
16080
|
canScrollRight: scrollContainer.scrollLeft + scrollContainer.clientWidth < scrollContainer.scrollWidth
|
|
16080
16081
|
});
|
|
16081
16082
|
}, []);
|
|
16083
|
+
const throttledUpdateShadows = (0, import_react85.useMemo)(() => (0, import_throttle_debounce2.throttle)(100, updateShadows), [updateShadows]);
|
|
16082
16084
|
const onScrollScrollContainer = (0, import_react85.useCallback)(
|
|
16083
16085
|
(event) => {
|
|
16084
16086
|
onScroll?.(event);
|
|
16085
|
-
const throttledUpdateShadows = (0, import_throttle_debounce2.throttle)(100, updateShadows);
|
|
16086
16087
|
throttledUpdateShadows();
|
|
16087
16088
|
},
|
|
16088
|
-
[onScroll,
|
|
16089
|
+
[onScroll, throttledUpdateShadows]
|
|
16089
16090
|
);
|
|
16090
16091
|
(0, import_react85.useEffect)(() => {
|
|
16091
16092
|
updateShadows();
|
|
16092
16093
|
}, [updateShadows]);
|
|
16093
|
-
return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(Container10, { children: [
|
|
16094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(Container10, { style, children: [
|
|
16094
16095
|
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ShadowAtTop, { $isVisible: shadowState.canScrollUp }),
|
|
16095
16096
|
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ShadowAtBottom, { $isVisible: shadowState.canScrollDown }),
|
|
16096
16097
|
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ShadowAtLeft, { $isVisible: shadowState.canScrollLeft }),
|