@stackshift-ui/scroll-area 1.0.0-beta.4 → 1.0.0-beta.5
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/package.json +6 -6
- package/dist/chunk-AVVW6RRM.mjs +0 -70
- package/dist/chunk-YKM2RZQ7.mjs +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -2
- package/dist/index.mjs +0 -2
- package/dist/scroll-area.d.ts +0 -11
- package/dist/scroll-area.js +0 -2
- package/dist/scroll-area.mjs +0 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/scroll-area",
|
|
3
3
|
"description": "Augments native scroll functionality for custom, cross-browser styling.",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.5",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
"typescript": "^5.6.2",
|
|
30
30
|
"vite-tsconfig-paths": "^5.0.1",
|
|
31
31
|
"vitest": "^2.1.1",
|
|
32
|
-
"@stackshift-ui/
|
|
33
|
-
"@stackshift-ui/
|
|
32
|
+
"@stackshift-ui/typescript-config": "6.0.10",
|
|
33
|
+
"@stackshift-ui/eslint-config": "6.0.10"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@radix-ui/react-scroll-area": "^1.2.9",
|
|
37
37
|
"classnames": "^2.5.1",
|
|
38
|
-
"@stackshift-ui/scripts": "
|
|
39
|
-
"@stackshift-ui/system": "
|
|
38
|
+
"@stackshift-ui/scripts": "7.0.0-beta.3",
|
|
39
|
+
"@stackshift-ui/system": "7.0.0-beta.4"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@stackshift-ui/system": ">=
|
|
42
|
+
"@stackshift-ui/system": ">=7.0.0-beta.4",
|
|
43
43
|
"@types/react": "16.8 - 19",
|
|
44
44
|
"next": "10 - 14",
|
|
45
45
|
"react": "16.8 - 19",
|
package/dist/chunk-AVVW6RRM.mjs
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
// src/scroll-area.tsx
|
|
2
|
-
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
3
|
-
import { cn, DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
var displayName = "ScrollArea";
|
|
6
|
-
var displayNameScrollbar = "ScrollAreaScrollbar";
|
|
7
|
-
function ScrollArea({
|
|
8
|
-
className,
|
|
9
|
-
children,
|
|
10
|
-
...props
|
|
11
|
-
}) {
|
|
12
|
-
const { [displayName]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
13
|
-
return /* @__PURE__ */ jsxs(
|
|
14
|
-
Component,
|
|
15
|
-
{
|
|
16
|
-
as: ScrollAreaPrimitive.Root,
|
|
17
|
-
"data-slot": "scroll-area",
|
|
18
|
-
className: cn("relative", className),
|
|
19
|
-
...props,
|
|
20
|
-
children: [
|
|
21
|
-
/* @__PURE__ */ jsx(
|
|
22
|
-
ScrollAreaPrimitive.Viewport,
|
|
23
|
-
{
|
|
24
|
-
"data-slot": "scroll-area-viewport",
|
|
25
|
-
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
26
|
-
children
|
|
27
|
-
}
|
|
28
|
-
),
|
|
29
|
-
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
30
|
-
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
ScrollArea.displayName = displayName;
|
|
36
|
-
function ScrollBar({
|
|
37
|
-
className,
|
|
38
|
-
orientation = "vertical",
|
|
39
|
-
...props
|
|
40
|
-
}) {
|
|
41
|
-
const { [displayNameScrollbar]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
42
|
-
return /* @__PURE__ */ jsx(
|
|
43
|
-
Component,
|
|
44
|
-
{
|
|
45
|
-
as: ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
46
|
-
"data-slot": "scroll-area-scrollbar",
|
|
47
|
-
orientation,
|
|
48
|
-
className: cn(
|
|
49
|
-
"flex touch-none p-px transition-colors select-none",
|
|
50
|
-
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
51
|
-
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
52
|
-
className
|
|
53
|
-
),
|
|
54
|
-
...props,
|
|
55
|
-
children: /* @__PURE__ */ jsx(
|
|
56
|
-
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
57
|
-
{
|
|
58
|
-
"data-slot": "scroll-area-thumb",
|
|
59
|
-
className: "bg-border relative flex-1 rounded-full"
|
|
60
|
-
}
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
ScrollBar.displayName = displayNameScrollbar;
|
|
66
|
-
|
|
67
|
-
export {
|
|
68
|
-
ScrollArea,
|
|
69
|
-
ScrollBar
|
|
70
|
-
};
|
package/dist/chunk-YKM2RZQ7.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as r from"@radix-ui/react-scroll-area";import{cn as i,DefaultComponent as c,useStackShiftUIComponents as n}from"@stackshift-ui/system";import{jsx as l,jsxs as u}from"react/jsx-runtime";var s="ScrollArea",m="ScrollAreaScrollbar";function S({className:e,children:o,...a}){let{[s]:t=c}=n();return u(t,{as:r.Root,"data-slot":"scroll-area",className:i("relative",e),...a,children:[l(r.Viewport,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:o}),l(p,{}),l(r.Corner,{})]})}S.displayName=s;function p({className:e,orientation:o="vertical",...a}){let{[m]:t=c}=n();return l(t,{as:r.ScrollAreaScrollbar,"data-slot":"scroll-area-scrollbar",orientation:o,className:i("flex touch-none p-px transition-colors select-none",o==="vertical"&&"h-full w-2.5 border-l border-l-transparent",o==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...a,children:l(r.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}p.displayName=m;export{S as a,p as b};
|
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./scroll-area";
|
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";var f=Object.create;var n=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var P=(r,o)=>{for(var e in o)n(r,e,{get:o[e],enumerable:!0})},m=(r,o,e,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let c of b(o))!A.call(r,c)&&c!==e&&n(r,c,{get:()=>o[c],enumerable:!(i=d(o,c))||i.enumerable});return r};var h=(r,o,e)=>(e=r!=null?f(v(r)):{},m(o||!r||!r.__esModule?n(e,"default",{value:r,enumerable:!0}):e,r)),C=r=>m(n({},"__esModule",{value:!0}),r);var N={};P(N,{ScrollArea:()=>u,ScrollBar:()=>s});module.exports=C(N);var l=h(require("@radix-ui/react-scroll-area")),a=require("@stackshift-ui/system"),t=require("react/jsx-runtime"),p="ScrollArea",S="ScrollAreaScrollbar";function u({className:r,children:o,...e}){let{[p]:i=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,t.jsxs)(i,{as:l.Root,"data-slot":"scroll-area",className:(0,a.cn)("relative",r),...e,children:[(0,t.jsx)(l.Viewport,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:o}),(0,t.jsx)(s,{}),(0,t.jsx)(l.Corner,{})]})}u.displayName=p;function s({className:r,orientation:o="vertical",...e}){let{[S]:i=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,t.jsx)(i,{as:l.ScrollAreaScrollbar,"data-slot":"scroll-area-scrollbar",orientation:o,className:(0,a.cn)("flex touch-none p-px transition-colors select-none",o==="vertical"&&"h-full w-2.5 border-l border-l-transparent",o==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",r),...e,children:(0,t.jsx)(l.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}s.displayName=S;0&&(module.exports={ScrollArea,ScrollBar});
|
package/dist/index.mjs
DELETED
package/dist/scroll-area.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare namespace ScrollArea {
|
|
5
|
-
var displayName: string;
|
|
6
|
-
}
|
|
7
|
-
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare namespace ScrollBar {
|
|
9
|
-
var displayName: string;
|
|
10
|
-
}
|
|
11
|
-
export { ScrollArea, ScrollBar };
|
package/dist/scroll-area.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";var d=Object.create;var n=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var P=(r,o)=>{for(var l in o)n(r,l,{get:o[l],enumerable:!0})},m=(r,o,l,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let c of b(o))!A.call(r,c)&&c!==l&&n(r,c,{get:()=>o[c],enumerable:!(i=f(o,c))||i.enumerable});return r};var h=(r,o,l)=>(l=r!=null?d(v(r)):{},m(o||!r||!r.__esModule?n(l,"default",{value:r,enumerable:!0}):l,r)),C=r=>m(n({},"__esModule",{value:!0}),r);var N={};P(N,{ScrollArea:()=>u,ScrollBar:()=>s});module.exports=C(N);var e=h(require("@radix-ui/react-scroll-area")),a=require("@stackshift-ui/system"),t=require("react/jsx-runtime"),p="ScrollArea",S="ScrollAreaScrollbar";function u({className:r,children:o,...l}){let{[p]:i=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,t.jsxs)(i,{as:e.Root,"data-slot":"scroll-area",className:(0,a.cn)("relative",r),...l,children:[(0,t.jsx)(e.Viewport,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:o}),(0,t.jsx)(s,{}),(0,t.jsx)(e.Corner,{})]})}u.displayName=p;function s({className:r,orientation:o="vertical",...l}){let{[S]:i=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,t.jsx)(i,{as:e.ScrollAreaScrollbar,"data-slot":"scroll-area-scrollbar",orientation:o,className:(0,a.cn)("flex touch-none p-px transition-colors select-none",o==="vertical"&&"h-full w-2.5 border-l border-l-transparent",o==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",r),...l,children:(0,t.jsx)(e.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}s.displayName=S;0&&(module.exports={ScrollArea,ScrollBar});
|
package/dist/scroll-area.mjs
DELETED