@cjlapao/ui-kit 0.2.5 → 0.2.6
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 +283 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +91 -2
- package/dist/index.d.ts +91 -2
- package/dist/index.js +280 -36
- package/dist/index.js.map +1 -1
- package/dist/markdown.cjs +14 -2
- package/dist/markdown.cjs.map +1 -1
- package/dist/markdown.js +14 -2
- package/dist/markdown.js.map +1 -1
- package/package.json +1 -1
package/dist/markdown.cjs
CHANGED
|
@@ -10164,12 +10164,23 @@ var ScrollArea = ({
|
|
|
10164
10164
|
mask = false,
|
|
10165
10165
|
tabIndex = 0,
|
|
10166
10166
|
contentClassName,
|
|
10167
|
+
viewportClassName,
|
|
10168
|
+
viewportRef: viewportRefProp,
|
|
10167
10169
|
children,
|
|
10168
10170
|
className = "",
|
|
10169
10171
|
...rest
|
|
10170
10172
|
}) => {
|
|
10171
10173
|
const viewportId = (0, import_react157.useId)();
|
|
10172
10174
|
const viewportRef = (0, import_react157.useRef)(null);
|
|
10175
|
+
const setViewportRef = (0, import_react157.useCallback)(
|
|
10176
|
+
(el) => {
|
|
10177
|
+
viewportRef.current = el;
|
|
10178
|
+
if (typeof viewportRefProp === "function") viewportRefProp(el);
|
|
10179
|
+
else if (viewportRefProp)
|
|
10180
|
+
viewportRefProp.current = el;
|
|
10181
|
+
},
|
|
10182
|
+
[viewportRefProp]
|
|
10183
|
+
);
|
|
10173
10184
|
const contentRef = (0, import_react157.useRef)(null);
|
|
10174
10185
|
const yTrackRef = (0, import_react157.useRef)(null);
|
|
10175
10186
|
const xTrackRef = (0, import_react157.useRef)(null);
|
|
@@ -10311,7 +10322,7 @@ var ScrollArea = ({
|
|
|
10311
10322
|
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|
|
10312
10323
|
"div",
|
|
10313
10324
|
{
|
|
10314
|
-
ref:
|
|
10325
|
+
ref: setViewportRef,
|
|
10315
10326
|
id: viewportId,
|
|
10316
10327
|
"data-slot": "scrollarea-viewport",
|
|
10317
10328
|
tabIndex: overflow.x || overflow.y ? tabIndex : -1,
|
|
@@ -10326,7 +10337,8 @@ var ScrollArea = ({
|
|
|
10326
10337
|
// and the viewport would simply grow past the frame's cap, get
|
|
10327
10338
|
// clipped by `overflow-hidden` and never learn it was scrollable.
|
|
10328
10339
|
"[scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
|
|
10329
|
-
"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400"
|
|
10340
|
+
"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400",
|
|
10341
|
+
viewportClassName
|
|
10330
10342
|
),
|
|
10331
10343
|
children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|
|
10332
10344
|
"div",
|