@foundrykit/primitives 1.0.11 → 1.0.13
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/CHANGELOG.md +12 -0
- package/dist/chunk-4GPFVBO2.js +62 -0
- package/dist/components/badge/index.d.cts +1 -1
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/button/index.d.cts +1 -1
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/scroll-area/index.cjs +98 -0
- package/dist/components/scroll-area/index.d.cts +8 -0
- package/dist/components/scroll-area/index.d.ts +8 -0
- package/dist/components/scroll-area/index.js +9 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -5
- package/dist/index.d.ts +3 -5
- package/dist/index.js +16 -70
- package/package.json +1 -1
- package/src/components/scroll-area/config.ts +1 -1
- package/src/components/scroll-area/index.tsx +1 -1
- package/tsup.config.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @foundrykit/primitives
|
|
2
2
|
|
|
3
|
+
## 1.0.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update to show query result in input after selection
|
|
8
|
+
|
|
9
|
+
## 1.0.12
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updating wrapper and scroll functionality
|
|
14
|
+
|
|
3
15
|
## 1.0.11
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// src/components/scroll-area/index.tsx
|
|
2
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
3
|
+
import { cn } from "@foundrykit/utils";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
function ScrollArea({
|
|
6
|
+
className,
|
|
7
|
+
children,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ jsxs(
|
|
11
|
+
ScrollAreaPrimitive.Root,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "scroll-area",
|
|
14
|
+
className: cn("relative", className),
|
|
15
|
+
...props,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx(
|
|
18
|
+
ScrollAreaPrimitive.Viewport,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "scroll-area-viewport",
|
|
21
|
+
className: "focus-visible:ring-ring/50 size-full h-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px]",
|
|
22
|
+
children
|
|
23
|
+
}
|
|
24
|
+
),
|
|
25
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
26
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function ScrollBar({
|
|
32
|
+
className,
|
|
33
|
+
orientation = "vertical",
|
|
34
|
+
...props
|
|
35
|
+
}) {
|
|
36
|
+
return /* @__PURE__ */ jsx(
|
|
37
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
38
|
+
{
|
|
39
|
+
"data-slot": "scroll-area-scrollbar",
|
|
40
|
+
orientation,
|
|
41
|
+
className: cn(
|
|
42
|
+
"flex touch-none select-none p-px transition-colors",
|
|
43
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
44
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
...props,
|
|
48
|
+
children: /* @__PURE__ */ jsx(
|
|
49
|
+
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
50
|
+
{
|
|
51
|
+
"data-slot": "scroll-area-thumb",
|
|
52
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
ScrollArea,
|
|
61
|
+
ScrollBar
|
|
62
|
+
};
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "
|
|
7
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
10
10
|
asChild?: boolean;
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "
|
|
7
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
10
10
|
asChild?: boolean;
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "
|
|
7
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "link" | "ghost" | null | undefined;
|
|
8
8
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "
|
|
7
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "link" | "ghost" | null | undefined;
|
|
8
8
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/components/scroll-area/index.tsx
|
|
32
|
+
var scroll_area_exports = {};
|
|
33
|
+
__export(scroll_area_exports, {
|
|
34
|
+
ScrollArea: () => ScrollArea,
|
|
35
|
+
ScrollBar: () => ScrollBar
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(scroll_area_exports);
|
|
38
|
+
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
39
|
+
var import_utils = require("@foundrykit/utils");
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
+
function ScrollArea({
|
|
42
|
+
className,
|
|
43
|
+
children,
|
|
44
|
+
...props
|
|
45
|
+
}) {
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
47
|
+
ScrollAreaPrimitive.Root,
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "scroll-area",
|
|
50
|
+
className: (0, import_utils.cn)("relative", className),
|
|
51
|
+
...props,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
ScrollAreaPrimitive.Viewport,
|
|
55
|
+
{
|
|
56
|
+
"data-slot": "scroll-area-viewport",
|
|
57
|
+
className: "focus-visible:ring-ring/50 size-full h-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px]",
|
|
58
|
+
children
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollBar, {}),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function ScrollBar({
|
|
68
|
+
className,
|
|
69
|
+
orientation = "vertical",
|
|
70
|
+
...props
|
|
71
|
+
}) {
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
73
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
74
|
+
{
|
|
75
|
+
"data-slot": "scroll-area-scrollbar",
|
|
76
|
+
orientation,
|
|
77
|
+
className: (0, import_utils.cn)(
|
|
78
|
+
"flex touch-none select-none p-px transition-colors",
|
|
79
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
80
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
81
|
+
className
|
|
82
|
+
),
|
|
83
|
+
...props,
|
|
84
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
+
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
86
|
+
{
|
|
87
|
+
"data-slot": "scroll-area-thumb",
|
|
88
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
95
|
+
0 && (module.exports = {
|
|
96
|
+
ScrollArea,
|
|
97
|
+
ScrollBar
|
|
98
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
4
|
+
|
|
5
|
+
declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
|
|
8
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
4
|
+
|
|
5
|
+
declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
|
|
8
|
+
export { ScrollArea, ScrollBar };
|
package/dist/index.cjs
CHANGED
|
@@ -1443,7 +1443,7 @@ function ScrollArea({
|
|
|
1443
1443
|
ScrollAreaPrimitive.Viewport,
|
|
1444
1444
|
{
|
|
1445
1445
|
"data-slot": "scroll-area-viewport",
|
|
1446
|
-
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px]",
|
|
1446
|
+
className: "focus-visible:ring-ring/50 size-full h-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px]",
|
|
1447
1447
|
children
|
|
1448
1448
|
}
|
|
1449
1449
|
),
|
package/dist/index.d.cts
CHANGED
|
@@ -22,7 +22,7 @@ export { Skeleton } from './components/skeleton/index.cjs';
|
|
|
22
22
|
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from './components/popover/index.cjs';
|
|
23
23
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
24
24
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
25
|
-
|
|
25
|
+
export { ScrollArea, ScrollBar } from './components/scroll-area/index.cjs';
|
|
26
26
|
export { cn } from '@foundrykit/utils';
|
|
27
27
|
import '@radix-ui/react-avatar';
|
|
28
28
|
import '@radix-ui/react-checkbox';
|
|
@@ -34,6 +34,7 @@ import '@radix-ui/react-separator';
|
|
|
34
34
|
import '@radix-ui/react-switch';
|
|
35
35
|
import '@radix-ui/react-tabs';
|
|
36
36
|
import '@radix-ui/react-popover';
|
|
37
|
+
import '@radix-ui/react-scroll-area';
|
|
37
38
|
|
|
38
39
|
declare const toggleVariants: (props?: ({
|
|
39
40
|
variant?: "default" | "outline" | null | undefined;
|
|
@@ -68,7 +69,4 @@ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimit
|
|
|
68
69
|
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
69
70
|
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
70
71
|
|
|
71
|
-
|
|
72
|
-
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
|
|
73
|
-
|
|
74
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, ScrollArea, ScrollBar, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, toggleVariants };
|
|
72
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, toggleVariants };
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export { Skeleton } from './components/skeleton/index.js';
|
|
|
22
22
|
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from './components/popover/index.js';
|
|
23
23
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
24
24
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
25
|
-
|
|
25
|
+
export { ScrollArea, ScrollBar } from './components/scroll-area/index.js';
|
|
26
26
|
export { cn } from '@foundrykit/utils';
|
|
27
27
|
import '@radix-ui/react-avatar';
|
|
28
28
|
import '@radix-ui/react-checkbox';
|
|
@@ -34,6 +34,7 @@ import '@radix-ui/react-separator';
|
|
|
34
34
|
import '@radix-ui/react-switch';
|
|
35
35
|
import '@radix-ui/react-tabs';
|
|
36
36
|
import '@radix-ui/react-popover';
|
|
37
|
+
import '@radix-ui/react-scroll-area';
|
|
37
38
|
|
|
38
39
|
declare const toggleVariants: (props?: ({
|
|
39
40
|
variant?: "default" | "outline" | null | undefined;
|
|
@@ -68,7 +69,4 @@ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimit
|
|
|
68
69
|
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
69
70
|
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
70
71
|
|
|
71
|
-
|
|
72
|
-
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
|
|
73
|
-
|
|
74
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, ScrollArea, ScrollBar, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, toggleVariants };
|
|
72
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, toggleVariants };
|
package/dist/index.js
CHANGED
|
@@ -8,8 +8,10 @@ import {
|
|
|
8
8
|
Textarea
|
|
9
9
|
} from "./chunk-I44GXEPN.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Avatar,
|
|
12
|
+
AvatarFallback,
|
|
13
|
+
AvatarImage
|
|
14
|
+
} from "./chunk-VVNIYCKH.js";
|
|
13
15
|
import {
|
|
14
16
|
Label
|
|
15
17
|
} from "./chunk-QL4XJD7Y.js";
|
|
@@ -23,6 +25,10 @@ import {
|
|
|
23
25
|
RadioGroup,
|
|
24
26
|
RadioGroupItem
|
|
25
27
|
} from "./chunk-XQAJQKO7.js";
|
|
28
|
+
import {
|
|
29
|
+
ScrollArea,
|
|
30
|
+
ScrollBar
|
|
31
|
+
} from "./chunk-4GPFVBO2.js";
|
|
26
32
|
import {
|
|
27
33
|
Select,
|
|
28
34
|
SelectContent,
|
|
@@ -44,11 +50,6 @@ import {
|
|
|
44
50
|
import {
|
|
45
51
|
Switch
|
|
46
52
|
} from "./chunk-U2EIVYWP.js";
|
|
47
|
-
import {
|
|
48
|
-
Avatar,
|
|
49
|
-
AvatarFallback,
|
|
50
|
-
AvatarImage
|
|
51
|
-
} from "./chunk-VVNIYCKH.js";
|
|
52
53
|
import {
|
|
53
54
|
Badge,
|
|
54
55
|
badgeVariants
|
|
@@ -66,9 +67,6 @@ import {
|
|
|
66
67
|
Button,
|
|
67
68
|
buttonVariants
|
|
68
69
|
} from "./chunk-YTUI6MCB.js";
|
|
69
|
-
import {
|
|
70
|
-
Checkbox
|
|
71
|
-
} from "./chunk-A3U73FA7.js";
|
|
72
70
|
import {
|
|
73
71
|
Card,
|
|
74
72
|
CardContent,
|
|
@@ -77,6 +75,9 @@ import {
|
|
|
77
75
|
CardHeader,
|
|
78
76
|
CardTitle
|
|
79
77
|
} from "./chunk-UZIMC7AQ.js";
|
|
78
|
+
import {
|
|
79
|
+
Checkbox
|
|
80
|
+
} from "./chunk-A3U73FA7.js";
|
|
80
81
|
import {
|
|
81
82
|
DropdownMenu,
|
|
82
83
|
DropdownMenuCheckboxItem,
|
|
@@ -94,6 +95,9 @@ import {
|
|
|
94
95
|
DropdownMenuSubTrigger,
|
|
95
96
|
DropdownMenuTrigger
|
|
96
97
|
} from "./chunk-PHMEWMFS.js";
|
|
98
|
+
import {
|
|
99
|
+
Input
|
|
100
|
+
} from "./chunk-KZMSLRLW.js";
|
|
97
101
|
|
|
98
102
|
// src/components/toggle/index.tsx
|
|
99
103
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
@@ -431,66 +435,8 @@ function TooltipContent({
|
|
|
431
435
|
) });
|
|
432
436
|
}
|
|
433
437
|
|
|
434
|
-
// src/components/scroll-area/index.tsx
|
|
435
|
-
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
436
|
-
import { cn as cn5 } from "@foundrykit/utils";
|
|
437
|
-
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
438
|
-
function ScrollArea({
|
|
439
|
-
className,
|
|
440
|
-
children,
|
|
441
|
-
...props
|
|
442
|
-
}) {
|
|
443
|
-
return /* @__PURE__ */ jsxs4(
|
|
444
|
-
ScrollAreaPrimitive.Root,
|
|
445
|
-
{
|
|
446
|
-
"data-slot": "scroll-area",
|
|
447
|
-
className: cn5("relative", className),
|
|
448
|
-
...props,
|
|
449
|
-
children: [
|
|
450
|
-
/* @__PURE__ */ jsx5(
|
|
451
|
-
ScrollAreaPrimitive.Viewport,
|
|
452
|
-
{
|
|
453
|
-
"data-slot": "scroll-area-viewport",
|
|
454
|
-
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px]",
|
|
455
|
-
children
|
|
456
|
-
}
|
|
457
|
-
),
|
|
458
|
-
/* @__PURE__ */ jsx5(ScrollBar, {}),
|
|
459
|
-
/* @__PURE__ */ jsx5(ScrollAreaPrimitive.Corner, {})
|
|
460
|
-
]
|
|
461
|
-
}
|
|
462
|
-
);
|
|
463
|
-
}
|
|
464
|
-
function ScrollBar({
|
|
465
|
-
className,
|
|
466
|
-
orientation = "vertical",
|
|
467
|
-
...props
|
|
468
|
-
}) {
|
|
469
|
-
return /* @__PURE__ */ jsx5(
|
|
470
|
-
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
471
|
-
{
|
|
472
|
-
"data-slot": "scroll-area-scrollbar",
|
|
473
|
-
orientation,
|
|
474
|
-
className: cn5(
|
|
475
|
-
"flex touch-none select-none p-px transition-colors",
|
|
476
|
-
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
477
|
-
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
478
|
-
className
|
|
479
|
-
),
|
|
480
|
-
...props,
|
|
481
|
-
children: /* @__PURE__ */ jsx5(
|
|
482
|
-
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
483
|
-
{
|
|
484
|
-
"data-slot": "scroll-area-thumb",
|
|
485
|
-
className: "bg-border relative flex-1 rounded-full"
|
|
486
|
-
}
|
|
487
|
-
)
|
|
488
|
-
}
|
|
489
|
-
);
|
|
490
|
-
}
|
|
491
|
-
|
|
492
438
|
// src/index.ts
|
|
493
|
-
import { cn as
|
|
439
|
+
import { cn as cn5 } from "@foundrykit/utils";
|
|
494
440
|
export {
|
|
495
441
|
Avatar,
|
|
496
442
|
AvatarFallback,
|
|
@@ -577,6 +523,6 @@ export {
|
|
|
577
523
|
TooltipTrigger,
|
|
578
524
|
badgeVariants,
|
|
579
525
|
buttonVariants,
|
|
580
|
-
|
|
526
|
+
cn5 as cn,
|
|
581
527
|
toggleVariants
|
|
582
528
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentConfig } from '@foundrykit/types';
|
|
2
2
|
|
|
3
3
|
export const scrollAreaConfig: ComponentConfig = {
|
|
4
|
-
name: '
|
|
4
|
+
name: 'Scroll Area',
|
|
5
5
|
description:
|
|
6
6
|
'ScrollArea component for displaying content in a scrollable area',
|
|
7
7
|
category: 'primitives',
|
|
@@ -18,7 +18,7 @@ function ScrollArea({
|
|
|
18
18
|
>
|
|
19
19
|
<ScrollAreaPrimitive.Viewport
|
|
20
20
|
data-slot='scroll-area-viewport'
|
|
21
|
-
className='focus-visible:ring-ring/50 size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px]'
|
|
21
|
+
className='focus-visible:ring-ring/50 size-full h-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px]'
|
|
22
22
|
>
|
|
23
23
|
{children}
|
|
24
24
|
</ScrollAreaPrimitive.Viewport>
|
package/tsup.config.ts
CHANGED