@codefast/ui 0.3.9 → 0.3.10
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 +11 -0
- package/dist/components/accordion.cjs +97 -1
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.js +51 -1
- package/dist/components/alert-dialog.cjs +155 -1
- package/dist/components/alert-dialog.d.ts +11 -11
- package/dist/components/alert-dialog.js +94 -1
- package/dist/components/alert.cjs +84 -1
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.js +41 -1
- package/dist/components/aspect-ratio.cjs +43 -1
- package/dist/components/aspect-ratio.d.ts +2 -2
- package/dist/components/aspect-ratio.js +9 -1
- package/dist/components/avatar.cjs +65 -1
- package/dist/components/avatar.d.ts +2 -2
- package/dist/components/avatar.js +25 -1
- package/dist/components/badge.cjs +66 -1
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.js +29 -1
- package/dist/components/breadcrumb.cjs +126 -1
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +74 -1
- package/dist/components/button-group.cjs +86 -1
- package/dist/components/button-group.d.ts +5 -5
- package/dist/components/button-group.js +43 -1
- package/dist/components/button.cjs +92 -1
- package/dist/components/button.d.ts +6 -6
- package/dist/components/button.js +55 -1
- package/dist/components/calendar.cjs +150 -1
- package/dist/components/calendar.d.ts +12 -19
- package/dist/components/calendar.js +113 -1
- package/dist/components/card.cjs +105 -1
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.js +53 -1
- package/dist/components/carousel.cjs +210 -1
- package/dist/components/carousel.d.ts +10 -10
- package/dist/components/carousel.js +151 -1
- package/dist/components/chart.cjs +250 -3
- package/dist/components/chart.d.ts +9 -9
- package/dist/components/chart.js +198 -3
- package/dist/components/checkbox-cards.cjs +69 -1
- package/dist/components/checkbox-cards.d.ts +2 -2
- package/dist/components/checkbox-cards.js +32 -1
- package/dist/components/checkbox-group.cjs +63 -1
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +26 -1
- package/dist/components/checkbox.cjs +53 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +19 -1
- package/dist/components/collapsible.cjs +61 -1
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/collapsible.js +21 -1
- package/dist/components/command.cjs +167 -1
- package/dist/components/command.d.ts +4 -4
- package/dist/components/command.js +106 -1
- package/dist/components/context-menu.cjs +218 -1
- package/dist/components/context-menu.d.ts +4 -4
- package/dist/components/context-menu.js +142 -1
- package/dist/components/dialog.cjs +164 -1
- package/dist/components/dialog.d.ts +10 -10
- package/dist/components/dialog.js +106 -1
- package/dist/components/drawer.cjs +143 -1
- package/dist/components/drawer.d.ts +9 -9
- package/dist/components/drawer.js +85 -1
- package/dist/components/dropdown-menu.cjs +221 -1
- package/dist/components/dropdown-menu.d.ts +4 -4
- package/dist/components/dropdown-menu.js +145 -1
- package/dist/components/empty.cjs +113 -1
- package/dist/components/empty.d.ts +9 -9
- package/dist/components/empty.js +61 -1
- package/dist/components/field.cjs +193 -1
- package/dist/components/field.d.ts +14 -14
- package/dist/components/field.js +129 -1
- package/dist/components/form.cjs +151 -1
- package/dist/components/form.d.ts +10 -10
- package/dist/components/form.js +96 -1
- package/dist/components/hover-card.cjs +77 -1
- package/dist/components/hover-card.d.ts +2 -2
- package/dist/components/hover-card.js +34 -1
- package/dist/components/input-group.cjs +155 -1
- package/dist/components/input-group.d.ts +15 -15
- package/dist/components/input-group.js +97 -1
- package/dist/components/input-number.cjs +98 -1
- package/dist/components/input-number.d.ts +2 -2
- package/dist/components/input-number.js +64 -1
- package/dist/components/input-otp.cjs +101 -1
- package/dist/components/input-otp.d.ts +6 -6
- package/dist/components/input-otp.js +49 -1
- package/dist/components/input-password.cjs +71 -1
- package/dist/components/input-password.d.ts +3 -3
- package/dist/components/input-password.js +37 -1
- package/dist/components/input-search.cjs +80 -1
- package/dist/components/input-search.d.ts +3 -3
- package/dist/components/input-search.js +46 -1
- package/dist/components/input.cjs +45 -1
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +11 -1
- package/dist/components/item.cjs +186 -1
- package/dist/components/item.d.ts +12 -12
- package/dist/components/item.js +119 -1
- package/dist/components/kbd.cjs +54 -1
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/kbd.js +17 -1
- package/dist/components/label.cjs +45 -1
- package/dist/components/label.d.ts +2 -2
- package/dist/components/label.js +11 -1
- package/dist/components/menubar.cjs +232 -1
- package/dist/components/menubar.d.ts +4 -4
- package/dist/components/menubar.js +153 -1
- package/dist/components/native-select.cjs +75 -1
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/native-select.js +35 -1
- package/dist/components/navigation-menu.cjs +146 -2
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +94 -2
- package/dist/components/pagination.cjs +138 -1
- package/dist/components/pagination.d.ts +10 -10
- package/dist/components/pagination.js +86 -1
- package/dist/components/popover.cjs +86 -1
- package/dist/components/popover.d.ts +3 -3
- package/dist/components/popover.js +40 -1
- package/dist/components/progress-circle.cjs +184 -1
- package/dist/components/progress-circle.d.ts +5 -5
- package/dist/components/progress-circle.js +147 -1
- package/dist/components/progress.cjs +52 -1
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +18 -1
- package/dist/components/radio-cards.cjs +66 -1
- package/dist/components/radio-cards.d.ts +2 -2
- package/dist/components/radio-cards.js +29 -1
- package/dist/components/radio-group.cjs +59 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +22 -1
- package/dist/components/radio.cjs +47 -1
- package/dist/components/radio.d.ts +2 -2
- package/dist/components/radio.js +13 -1
- package/dist/components/resizable.cjs +71 -1
- package/dist/components/resizable.d.ts +8 -8
- package/dist/components/resizable.js +31 -1
- package/dist/components/scroll-area.cjs +140 -1
- package/dist/components/scroll-area.d.ts +5 -5
- package/dist/components/scroll-area.js +100 -1
- package/dist/components/select.cjs +180 -1
- package/dist/components/select.d.ts +5 -5
- package/dist/components/select.js +119 -1
- package/dist/components/separator.cjs +82 -1
- package/dist/components/separator.d.ts +5 -5
- package/dist/components/separator.js +42 -1
- package/dist/components/sheet.cjs +184 -1
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sheet.js +123 -1
- package/dist/components/sidebar.cjs +506 -1
- package/dist/components/sidebar.d.ts +31 -31
- package/dist/components/sidebar.js +400 -1
- package/dist/components/skeleton.cjs +44 -1
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +10 -1
- package/dist/components/slider.cjs +79 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +45 -1
- package/dist/components/sonner.cjs +57 -1
- package/dist/components/sonner.d.ts +3 -3
- package/dist/components/sonner.js +17 -1
- package/dist/components/spinner.cjs +75 -1
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/spinner.js +41 -1
- package/dist/components/switch.cjs +49 -1
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +15 -1
- package/dist/components/table.cjs +118 -1
- package/dist/components/table.d.ts +9 -9
- package/dist/components/table.js +63 -1
- package/dist/components/tabs.cjs +75 -1
- package/dist/components/tabs.d.ts +3 -3
- package/dist/components/tabs.js +32 -1
- package/dist/components/textarea.cjs +44 -1
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +10 -1
- package/dist/components/toggle-group.cjs +90 -1
- package/dist/components/toggle-group.d.ts +10 -12
- package/dist/components/toggle-group.js +53 -1
- package/dist/components/toggle.cjs +71 -1
- package/dist/components/toggle.d.ts +10 -12
- package/dist/components/toggle.js +34 -1
- package/dist/components/tooltip.cjs +90 -1
- package/dist/components/tooltip.d.ts +3 -3
- package/dist/components/tooltip.js +44 -1
- package/dist/css/amber.css +95 -1
- package/dist/css/blue.css +95 -1
- package/dist/css/cyan.css +95 -1
- package/dist/css/emerald.css +95 -1
- package/dist/css/fuchsia.css +95 -1
- package/dist/css/gray.css +95 -1
- package/dist/css/green.css +95 -1
- package/dist/css/indigo.css +95 -1
- package/dist/css/lime.css +95 -1
- package/dist/css/neutral.css +95 -1
- package/dist/css/orange.css +95 -1
- package/dist/css/pink.css +95 -1
- package/dist/css/preset.css +118 -1
- package/dist/css/purple.css +95 -1
- package/dist/css/red.css +95 -1
- package/dist/css/rose.css +95 -1
- package/dist/css/sky.css +95 -1
- package/dist/css/slate.css +95 -1
- package/dist/css/stone.css +95 -1
- package/dist/css/style.css +3 -1
- package/dist/css/teal.css +95 -1
- package/dist/css/violet.css +95 -1
- package/dist/css/yellow.css +95 -1
- package/dist/css/zinc.css +95 -1
- package/dist/hooks/use-animated-value.cjs +74 -1
- package/dist/hooks/use-animated-value.d.ts +9 -10
- package/dist/hooks/use-animated-value.js +40 -1
- package/dist/hooks/use-copy-to-clipboard.cjs +57 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +18 -1
- package/dist/hooks/use-copy-to-clipboard.js +23 -1
- package/dist/hooks/use-is-mobile.cjs +39 -1
- package/dist/hooks/use-is-mobile.d.ts +15 -6
- package/dist/hooks/use-is-mobile.js +5 -1
- package/dist/hooks/use-media-query.cjs +56 -1
- package/dist/hooks/use-media-query.d.ts +11 -3
- package/dist/hooks/use-media-query.js +22 -1
- package/dist/hooks/use-mutation-observer.cjs +56 -1
- package/dist/hooks/use-mutation-observer.d.ts +8 -12
- package/dist/hooks/use-mutation-observer.js +22 -1
- package/dist/hooks/use-pagination.cjs +92 -1
- package/dist/hooks/use-pagination.d.ts +12 -10
- package/dist/hooks/use-pagination.js +55 -1
- package/dist/index.cjs +1081 -1
- package/dist/index.d.ts +130 -131
- package/dist/index.js +69 -1
- package/dist/primitives/checkbox-group.cjs +151 -1
- package/dist/primitives/checkbox-group.d.ts +11 -11
- package/dist/primitives/checkbox-group.js +99 -1
- package/dist/primitives/input-number.cjs +439 -1
- package/dist/primitives/input-number.d.ts +8 -8
- package/dist/primitives/input-number.js +381 -1
- package/dist/primitives/input.cjs +99 -1
- package/dist/primitives/input.d.ts +4 -4
- package/dist/primitives/input.js +53 -1
- package/dist/primitives/progress-circle.cjs +198 -1
- package/dist/primitives/progress-circle.d.ts +7 -7
- package/dist/primitives/progress-circle.js +128 -1
- package/package.json +385 -38
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as ResizablePrimitive from
|
|
3
|
-
type
|
|
4
|
-
declare function
|
|
1
|
+
import type { ComponentProps, JSX } from 'react';
|
|
2
|
+
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
3
|
+
type ResizableGroupProps = ComponentProps<typeof ResizablePrimitive.Group>;
|
|
4
|
+
declare function ResizableGroup({ className, ...props }: ResizableGroupProps): JSX.Element;
|
|
5
5
|
type ResizablePanelProps = ComponentProps<typeof ResizablePrimitive.Panel>;
|
|
6
6
|
declare function ResizablePanel({ ...props }: ResizablePanelProps): JSX.Element;
|
|
7
|
-
interface
|
|
7
|
+
interface ResizableSeparatorProps extends ComponentProps<typeof ResizablePrimitive.Separator> {
|
|
8
8
|
withHandle?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare function
|
|
11
|
-
export {
|
|
12
|
-
export type {
|
|
10
|
+
declare function ResizableSeparator({ className, withHandle, ...props }: ResizableSeparatorProps): JSX.Element;
|
|
11
|
+
export { ResizableGroup, ResizablePanel, ResizableSeparator };
|
|
12
|
+
export type { ResizableGroupProps, ResizablePanelProps, ResizableSeparatorProps };
|
|
@@ -1,2 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@codefast/tailwind-variants";
|
|
4
|
+
import { GripVerticalIcon } from "lucide-react";
|
|
5
|
+
import { Group, Panel, Separator } from "react-resizable-panels";
|
|
6
|
+
function ResizableGroup({ className, ...props }) {
|
|
7
|
+
return /*#__PURE__*/ jsx(Group, {
|
|
8
|
+
className: cn('flex size-full', className),
|
|
9
|
+
"data-slot": "resizable-group",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function ResizablePanel({ ...props }) {
|
|
14
|
+
return /*#__PURE__*/ jsx(Panel, {
|
|
15
|
+
"data-slot": "resizable-panel",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function ResizableSeparator({ className, withHandle, ...props }) {
|
|
20
|
+
return /*#__PURE__*/ jsx(Separator, {
|
|
21
|
+
className: cn('bg-border focus-visible:bg-ring focus-visible:ring-ring/50 flex items-center justify-center outline-hidden focus-visible:ring-3', 'aria-[orientation=vertical]:w-px', 'aria-[orientation=horizontal]:h-px', className),
|
|
22
|
+
"data-slot": "resizable-separator",
|
|
23
|
+
...props,
|
|
24
|
+
children: withHandle ? /*#__PURE__*/ jsx("div", {
|
|
25
|
+
className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border",
|
|
26
|
+
children: /*#__PURE__*/ jsx(GripVerticalIcon, {
|
|
27
|
+
className: "size-2.5"
|
|
28
|
+
})
|
|
29
|
+
}) : null
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export { ResizableGroup, ResizablePanel, ResizableSeparator };
|
|
@@ -1,2 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
"use client";
|
|
2
|
-
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
ScrollAreaScrollbar: ()=>ScrollAreaScrollbar,
|
|
29
|
+
scrollAreaScrollbarVariants: ()=>scrollAreaScrollbarVariants,
|
|
30
|
+
ScrollArea: ()=>ScrollArea
|
|
31
|
+
});
|
|
32
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
33
|
+
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
34
|
+
const react_context_namespaceObject = require("@radix-ui/react-context");
|
|
35
|
+
const react_scroll_area_namespaceObject = require("@radix-ui/react-scroll-area");
|
|
36
|
+
const scrollAreaScrollbarVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
37
|
+
base: 'flex touch-none select-none p-px transition-colors',
|
|
38
|
+
compoundVariants: [
|
|
39
|
+
{
|
|
40
|
+
className: 'w-1.5',
|
|
41
|
+
orientation: 'vertical',
|
|
42
|
+
size: 'sm'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
className: 'w-2',
|
|
46
|
+
orientation: 'vertical',
|
|
47
|
+
size: 'md'
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
className: 'w-2.5',
|
|
51
|
+
orientation: 'vertical',
|
|
52
|
+
size: 'lg'
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
className: 'h-1.5',
|
|
56
|
+
orientation: 'horizontal',
|
|
57
|
+
size: 'sm'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
className: 'h-2',
|
|
61
|
+
orientation: 'horizontal',
|
|
62
|
+
size: 'md'
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
className: 'h-2.5',
|
|
66
|
+
orientation: 'horizontal',
|
|
67
|
+
size: 'lg'
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
defaultVariants: {
|
|
71
|
+
orientation: 'vertical',
|
|
72
|
+
size: 'md'
|
|
73
|
+
},
|
|
74
|
+
variants: {
|
|
75
|
+
orientation: {
|
|
76
|
+
horizontal: 'w-full flex-col border-t border-t-transparent',
|
|
77
|
+
vertical: 'h-full flex-row border-l border-l-transparent'
|
|
78
|
+
},
|
|
79
|
+
size: {
|
|
80
|
+
none: '',
|
|
81
|
+
sm: '',
|
|
82
|
+
md: '',
|
|
83
|
+
lg: ''
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
const SCROLL_AREA_NAME = 'ScrollArea';
|
|
88
|
+
const [createScrollAreaContext] = (0, react_context_namespaceObject.createContextScope)(SCROLL_AREA_NAME);
|
|
89
|
+
const [ScrollAreaContextProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
|
|
90
|
+
function ScrollArea({ __scopeScrollArea, children, className, size, ...props }) {
|
|
91
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ScrollAreaContextProvider, {
|
|
92
|
+
scope: __scopeScrollArea,
|
|
93
|
+
size: size,
|
|
94
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_scroll_area_namespaceObject.Root, {
|
|
95
|
+
className: (0, tailwind_variants_namespaceObject.cn)('relative', className),
|
|
96
|
+
"data-slot": "scroll-area",
|
|
97
|
+
...props,
|
|
98
|
+
children: [
|
|
99
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_scroll_area_namespaceObject.Viewport, {
|
|
100
|
+
className: "outline-ring ring-ring/50 size-full rounded-[inherit] transition focus-visible:ring-4 focus-visible:outline-1",
|
|
101
|
+
"data-slot": "scroll-area-viewport",
|
|
102
|
+
children: children
|
|
103
|
+
}),
|
|
104
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ScrollAreaScrollbar, {
|
|
105
|
+
orientation: "vertical"
|
|
106
|
+
}),
|
|
107
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ScrollAreaScrollbar, {
|
|
108
|
+
orientation: "horizontal"
|
|
109
|
+
}),
|
|
110
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_scroll_area_namespaceObject.Corner, {})
|
|
111
|
+
]
|
|
112
|
+
})
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function ScrollAreaScrollbar({ __scopeScrollArea, className, orientation, ...props }) {
|
|
116
|
+
const { size } = useScrollAreaContext(SCROLL_AREA_NAME, __scopeScrollArea);
|
|
117
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_scroll_area_namespaceObject.Scrollbar, {
|
|
118
|
+
className: scrollAreaScrollbarVariants({
|
|
119
|
+
className,
|
|
120
|
+
orientation,
|
|
121
|
+
size
|
|
122
|
+
}),
|
|
123
|
+
"data-slot": "scroll-area-scrollbar",
|
|
124
|
+
orientation: orientation,
|
|
125
|
+
...props,
|
|
126
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_scroll_area_namespaceObject.ScrollAreaThumb, {
|
|
127
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
exports.ScrollArea = __webpack_exports__.ScrollArea;
|
|
132
|
+
exports.ScrollAreaScrollbar = __webpack_exports__.ScrollAreaScrollbar;
|
|
133
|
+
exports.scrollAreaScrollbarVariants = __webpack_exports__.scrollAreaScrollbarVariants;
|
|
134
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
135
|
+
"ScrollArea",
|
|
136
|
+
"ScrollAreaScrollbar",
|
|
137
|
+
"scrollAreaScrollbarVariants"
|
|
138
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
139
|
+
Object.defineProperty(exports, '__esModule', {
|
|
140
|
+
value: true
|
|
141
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import * as ScrollAreaPrimitive from
|
|
1
|
+
import type { VariantProps } from '@codefast/tailwind-variants';
|
|
2
|
+
import type { Scope } from '@radix-ui/react-context';
|
|
3
|
+
import type { ComponentProps, JSX } from 'react';
|
|
4
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
5
5
|
declare const scrollAreaScrollbarVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
6
6
|
orientation: {
|
|
7
7
|
horizontal: string;
|
|
@@ -17,7 +17,7 @@ declare const scrollAreaScrollbarVariants: import("@codefast/tailwind-variants")
|
|
|
17
17
|
type ScopedProps<P> = P & {
|
|
18
18
|
__scopeScrollArea?: Scope;
|
|
19
19
|
};
|
|
20
|
-
type ScrollAreaContextValue = Pick<VariantProps<typeof scrollAreaScrollbarVariants>,
|
|
20
|
+
type ScrollAreaContextValue = Pick<VariantProps<typeof scrollAreaScrollbarVariants>, 'size'>;
|
|
21
21
|
type ScrollAreaProps = ScopedProps<ComponentProps<typeof ScrollAreaPrimitive.Root> & ScrollAreaContextValue>;
|
|
22
22
|
declare function ScrollArea({ __scopeScrollArea, children, className, size, ...props }: ScrollAreaProps): JSX.Element;
|
|
23
23
|
type ScrollAreaScrollbarProps = ScopedProps<ComponentProps<typeof ScrollAreaPrimitive.Scrollbar>>;
|
|
@@ -1,2 +1,101 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn, tv } from "@codefast/tailwind-variants";
|
|
4
|
+
import { createContextScope } from "@radix-ui/react-context";
|
|
5
|
+
import { Corner, Root, ScrollAreaThumb, Scrollbar, Viewport } from "@radix-ui/react-scroll-area";
|
|
6
|
+
const scrollAreaScrollbarVariants = tv({
|
|
7
|
+
base: 'flex touch-none select-none p-px transition-colors',
|
|
8
|
+
compoundVariants: [
|
|
9
|
+
{
|
|
10
|
+
className: 'w-1.5',
|
|
11
|
+
orientation: 'vertical',
|
|
12
|
+
size: 'sm'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
className: 'w-2',
|
|
16
|
+
orientation: 'vertical',
|
|
17
|
+
size: 'md'
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
className: 'w-2.5',
|
|
21
|
+
orientation: 'vertical',
|
|
22
|
+
size: 'lg'
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
className: 'h-1.5',
|
|
26
|
+
orientation: 'horizontal',
|
|
27
|
+
size: 'sm'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
className: 'h-2',
|
|
31
|
+
orientation: 'horizontal',
|
|
32
|
+
size: 'md'
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
className: 'h-2.5',
|
|
36
|
+
orientation: 'horizontal',
|
|
37
|
+
size: 'lg'
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
orientation: 'vertical',
|
|
42
|
+
size: 'md'
|
|
43
|
+
},
|
|
44
|
+
variants: {
|
|
45
|
+
orientation: {
|
|
46
|
+
horizontal: 'w-full flex-col border-t border-t-transparent',
|
|
47
|
+
vertical: 'h-full flex-row border-l border-l-transparent'
|
|
48
|
+
},
|
|
49
|
+
size: {
|
|
50
|
+
none: '',
|
|
51
|
+
sm: '',
|
|
52
|
+
md: '',
|
|
53
|
+
lg: ''
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
const SCROLL_AREA_NAME = 'ScrollArea';
|
|
58
|
+
const [createScrollAreaContext] = createContextScope(SCROLL_AREA_NAME);
|
|
59
|
+
const [ScrollAreaContextProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
|
|
60
|
+
function ScrollArea({ __scopeScrollArea, children, className, size, ...props }) {
|
|
61
|
+
return /*#__PURE__*/ jsx(ScrollAreaContextProvider, {
|
|
62
|
+
scope: __scopeScrollArea,
|
|
63
|
+
size: size,
|
|
64
|
+
children: /*#__PURE__*/ jsxs(Root, {
|
|
65
|
+
className: cn('relative', className),
|
|
66
|
+
"data-slot": "scroll-area",
|
|
67
|
+
...props,
|
|
68
|
+
children: [
|
|
69
|
+
/*#__PURE__*/ jsx(Viewport, {
|
|
70
|
+
className: "outline-ring ring-ring/50 size-full rounded-[inherit] transition focus-visible:ring-4 focus-visible:outline-1",
|
|
71
|
+
"data-slot": "scroll-area-viewport",
|
|
72
|
+
children: children
|
|
73
|
+
}),
|
|
74
|
+
/*#__PURE__*/ jsx(ScrollAreaScrollbar, {
|
|
75
|
+
orientation: "vertical"
|
|
76
|
+
}),
|
|
77
|
+
/*#__PURE__*/ jsx(ScrollAreaScrollbar, {
|
|
78
|
+
orientation: "horizontal"
|
|
79
|
+
}),
|
|
80
|
+
/*#__PURE__*/ jsx(Corner, {})
|
|
81
|
+
]
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function ScrollAreaScrollbar({ __scopeScrollArea, className, orientation, ...props }) {
|
|
86
|
+
const { size } = useScrollAreaContext(SCROLL_AREA_NAME, __scopeScrollArea);
|
|
87
|
+
return /*#__PURE__*/ jsx(Scrollbar, {
|
|
88
|
+
className: scrollAreaScrollbarVariants({
|
|
89
|
+
className,
|
|
90
|
+
orientation,
|
|
91
|
+
size
|
|
92
|
+
}),
|
|
93
|
+
"data-slot": "scroll-area-scrollbar",
|
|
94
|
+
orientation: orientation,
|
|
95
|
+
...props,
|
|
96
|
+
children: /*#__PURE__*/ jsx(ScrollAreaThumb, {
|
|
97
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
export { ScrollArea, ScrollAreaScrollbar, scrollAreaScrollbarVariants };
|
|
@@ -1,2 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
"use client";
|
|
2
|
-
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
SelectItem: ()=>SelectItem,
|
|
29
|
+
SelectGroup: ()=>SelectGroup,
|
|
30
|
+
SelectLabel: ()=>SelectLabel,
|
|
31
|
+
SelectContent: ()=>SelectContent,
|
|
32
|
+
Select: ()=>Select,
|
|
33
|
+
SelectSeparator: ()=>SelectSeparator,
|
|
34
|
+
SelectTrigger: ()=>SelectTrigger,
|
|
35
|
+
SelectScrollUpButton: ()=>SelectScrollUpButton,
|
|
36
|
+
SelectScrollDownButton: ()=>SelectScrollDownButton,
|
|
37
|
+
SelectValue: ()=>SelectValue
|
|
38
|
+
});
|
|
39
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
40
|
+
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
41
|
+
const react_select_namespaceObject = require("@radix-ui/react-select");
|
|
42
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
43
|
+
const external_button_cjs_namespaceObject = require("./button.cjs");
|
|
44
|
+
function Select({ ...props }) {
|
|
45
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Root, {
|
|
46
|
+
"data-slot": "select",
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function SelectGroup({ ...props }) {
|
|
51
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Group, {
|
|
52
|
+
"data-slot": "select-group",
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function SelectValue({ ...props }) {
|
|
57
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Value, {
|
|
58
|
+
"data-slot": "select-value",
|
|
59
|
+
...props
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function SelectTrigger({ children, className, size, ...props }) {
|
|
63
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Trigger, {
|
|
64
|
+
className: (0, external_button_cjs_namespaceObject.buttonVariants)({
|
|
65
|
+
className: [
|
|
66
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground focus:ring-ring/50 focus:border-ring w-fit justify-between px-3 font-normal focus:ring-3 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:truncate",
|
|
67
|
+
className
|
|
68
|
+
],
|
|
69
|
+
size,
|
|
70
|
+
variant: 'outline'
|
|
71
|
+
}),
|
|
72
|
+
"data-size": size,
|
|
73
|
+
"data-slot": "select-trigger",
|
|
74
|
+
...props,
|
|
75
|
+
children: [
|
|
76
|
+
children,
|
|
77
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Icon, {
|
|
78
|
+
asChild: true,
|
|
79
|
+
className: "size-4 shrink-0 opacity-50",
|
|
80
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon, {})
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
86
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ScrollUpButton, {
|
|
87
|
+
className: (0, tailwind_variants_namespaceObject.cn)('text-muted-foreground flex items-center justify-center py-1', className),
|
|
88
|
+
"data-slot": "select-scroll-up-button",
|
|
89
|
+
...props,
|
|
90
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronUpIcon, {
|
|
91
|
+
size: 16
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
96
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ScrollDownButton, {
|
|
97
|
+
className: (0, tailwind_variants_namespaceObject.cn)('text-muted-foreground flex items-center justify-center py-1', className),
|
|
98
|
+
"data-slot": "select-scroll-down-button",
|
|
99
|
+
...props,
|
|
100
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon, {
|
|
101
|
+
size: 16
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function SelectContent({ children, className, position = 'popper', ...props }) {
|
|
106
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Portal, {
|
|
107
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Content, {
|
|
108
|
+
className: (0, tailwind_variants_namespaceObject.cn)('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 ease-ui relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-hidden rounded-lg border shadow-lg', 'popper' === position && 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className),
|
|
109
|
+
"data-slot": "select-content",
|
|
110
|
+
position: position,
|
|
111
|
+
...props,
|
|
112
|
+
children: [
|
|
113
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SelectScrollUpButton, {}),
|
|
114
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Viewport, {
|
|
115
|
+
className: (0, tailwind_variants_namespaceObject.cn)('p-1', 'popper' === position && 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1'),
|
|
116
|
+
children: children
|
|
117
|
+
}),
|
|
118
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SelectScrollDownButton, {})
|
|
119
|
+
]
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function SelectLabel({ className, ...props }) {
|
|
124
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Label, {
|
|
125
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold', className),
|
|
126
|
+
"data-slot": "select-label",
|
|
127
|
+
...props
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function SelectItem({ children, className, ...props }) {
|
|
131
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Item, {
|
|
132
|
+
className: (0, tailwind_variants_namespaceObject.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
133
|
+
"data-slot": "select-item",
|
|
134
|
+
...props,
|
|
135
|
+
children: [
|
|
136
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
137
|
+
className: "absolute right-2 flex items-center justify-center",
|
|
138
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ItemIndicator, {
|
|
139
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CheckIcon, {
|
|
140
|
+
className: "size-4"
|
|
141
|
+
})
|
|
142
|
+
})
|
|
143
|
+
}),
|
|
144
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ItemText, {
|
|
145
|
+
children: children
|
|
146
|
+
})
|
|
147
|
+
]
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function SelectSeparator({ className, ...props }) {
|
|
151
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Separator, {
|
|
152
|
+
className: (0, tailwind_variants_namespaceObject.cn)('bg-border mx-2 my-1 h-px', className),
|
|
153
|
+
"data-slot": "select-separator",
|
|
154
|
+
...props
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
exports.Select = __webpack_exports__.Select;
|
|
158
|
+
exports.SelectContent = __webpack_exports__.SelectContent;
|
|
159
|
+
exports.SelectGroup = __webpack_exports__.SelectGroup;
|
|
160
|
+
exports.SelectItem = __webpack_exports__.SelectItem;
|
|
161
|
+
exports.SelectLabel = __webpack_exports__.SelectLabel;
|
|
162
|
+
exports.SelectScrollDownButton = __webpack_exports__.SelectScrollDownButton;
|
|
163
|
+
exports.SelectScrollUpButton = __webpack_exports__.SelectScrollUpButton;
|
|
164
|
+
exports.SelectSeparator = __webpack_exports__.SelectSeparator;
|
|
165
|
+
exports.SelectTrigger = __webpack_exports__.SelectTrigger;
|
|
166
|
+
exports.SelectValue = __webpack_exports__.SelectValue;
|
|
167
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
168
|
+
"Select",
|
|
169
|
+
"SelectContent",
|
|
170
|
+
"SelectGroup",
|
|
171
|
+
"SelectItem",
|
|
172
|
+
"SelectLabel",
|
|
173
|
+
"SelectScrollDownButton",
|
|
174
|
+
"SelectScrollUpButton",
|
|
175
|
+
"SelectSeparator",
|
|
176
|
+
"SelectTrigger",
|
|
177
|
+
"SelectValue"
|
|
178
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
179
|
+
Object.defineProperty(exports, '__esModule', {
|
|
180
|
+
value: true
|
|
181
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import type { VariantProps } from '@codefast/tailwind-variants';
|
|
2
|
+
import type { ComponentProps, JSX } from 'react';
|
|
3
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
4
|
+
import { buttonVariants } from './button';
|
|
5
5
|
type SelectProps = ComponentProps<typeof SelectPrimitive.Root>;
|
|
6
6
|
declare function Select({ ...props }: SelectProps): JSX.Element;
|
|
7
7
|
type SelectGroupProps = ComponentProps<typeof SelectPrimitive.Group>;
|
|
@@ -9,7 +9,7 @@ declare function SelectGroup({ ...props }: SelectGroupProps): JSX.Element;
|
|
|
9
9
|
type SelectValueProps = ComponentProps<typeof SelectPrimitive.Value>;
|
|
10
10
|
declare function SelectValue({ ...props }: SelectValueProps): JSX.Element;
|
|
11
11
|
interface SelectTriggerProps extends ComponentProps<typeof SelectPrimitive.Trigger> {
|
|
12
|
-
size?: VariantProps<typeof buttonVariants>[
|
|
12
|
+
size?: VariantProps<typeof buttonVariants>['size'];
|
|
13
13
|
}
|
|
14
14
|
declare function SelectTrigger({ children, className, size, ...props }: SelectTriggerProps): JSX.Element;
|
|
15
15
|
type SelectScrollUpButtonProps = ComponentProps<typeof SelectPrimitive.ScrollUpButton>;
|