@admin-layout/tailwind-ui 10.1.1-alpha.9 → 12.0.16-alpha.14
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/lib/components/Button/Button.d.ts +13 -0
- package/lib/components/Button/Button.d.ts.map +1 -0
- package/lib/components/Button/Button.js +50 -0
- package/lib/components/Button/Button.js.map +1 -0
- package/lib/components/DatePicker/DatePicker.d.ts +5 -0
- package/lib/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/lib/components/DatePicker/DatePicker.js +218 -0
- package/lib/components/DatePicker/DatePicker.js.map +1 -0
- package/lib/components/DatePicker/index.d.ts +3 -0
- package/lib/components/DatePicker/index.d.ts.map +1 -0
- package/lib/components/DatePicker/machine.d.ts +3 -0
- package/lib/components/DatePicker/machine.d.ts.map +1 -0
- package/lib/components/DatePicker/machine.js +95 -0
- package/lib/components/DatePicker/machine.js.map +1 -0
- package/lib/components/DatePicker/types.d.ts +34 -0
- package/lib/components/DatePicker/types.d.ts.map +1 -0
- package/lib/components/DatePicker/utils.d.ts +25 -0
- package/lib/components/DatePicker/utils.d.ts.map +1 -0
- package/lib/components/DatePicker/utils.js +28 -0
- package/lib/components/DatePicker/utils.js.map +1 -0
- package/lib/components/ReactTable/Table.d.ts.map +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.d.ts +14 -0
- package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +1 -0
- package/lib/components/ThemeProvider/ThemeProvider.js +96 -0
- package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -0
- package/lib/components/ThemeProvider/ThemeToggle.d.ts +7 -0
- package/lib/components/ThemeProvider/ThemeToggle.d.ts.map +1 -0
- package/lib/components/ThemeProvider/ThemeToggle.js +50 -0
- package/lib/components/ThemeProvider/ThemeToggle.js.map +1 -0
- package/lib/components/ThemeProvider/index.d.ts +4 -0
- package/lib/components/ThemeProvider/index.d.ts.map +1 -0
- package/lib/components/ThemeProvider/types.d.ts +25 -0
- package/lib/components/ThemeProvider/types.d.ts.map +1 -0
- package/lib/components/index.d.ts +3 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/useTheme.d.ts +2 -0
- package/lib/hooks/useTheme.d.ts.map +1 -0
- package/lib/hooks/useTheme.js +7 -0
- package/lib/hooks/useTheme.js.map +1 -0
- package/lib/hooks/useWindowSize.d.ts +5 -0
- package/lib/hooks/useWindowSize.d.ts.map +1 -0
- package/lib/hooks/useWindowSize.js +20 -0
- package/lib/hooks/useWindowSize.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/shardui/accordion.d.ts +8 -0
- package/lib/shardui/accordion.d.ts.map +1 -0
- package/lib/shardui/accordion.js +40 -0
- package/lib/shardui/accordion.js.map +1 -0
- package/lib/shardui/alert-dialog.d.ts +21 -0
- package/lib/shardui/alert-dialog.d.ts.map +1 -0
- package/lib/shardui/alert-dialog.js +77 -0
- package/lib/shardui/alert-dialog.js.map +1 -0
- package/lib/shardui/alert.d.ts +9 -0
- package/lib/shardui/alert.d.ts.map +1 -0
- package/lib/shardui/alert.js +42 -0
- package/lib/shardui/alert.js.map +1 -0
- package/lib/shardui/aspect-ratio.d.ts +4 -0
- package/lib/shardui/aspect-ratio.d.ts.map +1 -0
- package/lib/shardui/aspect-ratio.js +1 -0
- package/lib/shardui/aspect-ratio.js.map +1 -0
- package/lib/shardui/avatar.d.ts +7 -0
- package/lib/shardui/avatar.d.ts.map +1 -0
- package/lib/shardui/avatar.js +27 -0
- package/lib/shardui/avatar.js.map +1 -0
- package/lib/shardui/badge.d.ts +10 -0
- package/lib/shardui/badge.d.ts.map +1 -0
- package/lib/shardui/badge.js +25 -0
- package/lib/shardui/badge.js.map +1 -0
- package/lib/shardui/breadcrumb.d.ts +20 -0
- package/lib/shardui/breadcrumb.d.ts.map +1 -0
- package/lib/shardui/breadcrumb.js +79 -0
- package/lib/shardui/breadcrumb.js.map +1 -0
- package/lib/shardui/button.d.ts +12 -0
- package/lib/shardui/button.d.ts.map +1 -0
- package/lib/shardui/button.js +41 -0
- package/lib/shardui/button.js.map +1 -0
- package/lib/shardui/calendar.d.ts +9 -0
- package/lib/shardui/calendar.d.ts.map +1 -0
- package/lib/shardui/calendar.js +53 -0
- package/lib/shardui/calendar.js.map +1 -0
- package/lib/shardui/card.d.ts +9 -0
- package/lib/shardui/card.d.ts.map +1 -0
- package/lib/shardui/card.js +54 -0
- package/lib/shardui/card.js.map +1 -0
- package/lib/shardui/carousel.d.ts +19 -0
- package/lib/shardui/carousel.d.ts.map +1 -0
- package/lib/shardui/carousel.js +176 -0
- package/lib/shardui/carousel.js.map +1 -0
- package/lib/shardui/chart.d.ts +63 -0
- package/lib/shardui/chart.d.ts.map +1 -0
- package/lib/shardui/chart.js +197 -0
- package/lib/shardui/chart.js.map +1 -0
- package/lib/shardui/checkbox.d.ts +5 -0
- package/lib/shardui/checkbox.d.ts.map +1 -0
- package/lib/shardui/checkbox.js +15 -0
- package/lib/shardui/checkbox.js.map +1 -0
- package/lib/shardui/collapsible.d.ts +6 -0
- package/lib/shardui/collapsible.d.ts.map +1 -0
- package/lib/shardui/collapsible.js +3 -0
- package/lib/shardui/collapsible.js.map +1 -0
- package/lib/shardui/command.d.ts +83 -0
- package/lib/shardui/command.d.ts.map +1 -0
- package/lib/shardui/command.js +91 -0
- package/lib/shardui/command.js.map +1 -0
- package/lib/shardui/context-menu.d.ts +28 -0
- package/lib/shardui/context-menu.d.ts.map +1 -0
- package/lib/shardui/context-menu.js +117 -0
- package/lib/shardui/context-menu.js.map +1 -0
- package/lib/shardui/dialog.d.ts +20 -0
- package/lib/shardui/dialog.d.ts.map +1 -0
- package/lib/shardui/dialog.js +67 -0
- package/lib/shardui/dialog.js.map +1 -0
- package/lib/shardui/drawer.d.ts +23 -0
- package/lib/shardui/drawer.d.ts.map +1 -0
- package/lib/shardui/drawer.js +69 -0
- package/lib/shardui/drawer.js.map +1 -0
- package/lib/shardui/dropdown-menu.d.ts +28 -0
- package/lib/shardui/dropdown-menu.d.ts.map +1 -0
- package/lib/shardui/dropdown-menu.js +119 -0
- package/lib/shardui/dropdown-menu.js.map +1 -0
- package/lib/shardui/form.d.ts +24 -0
- package/lib/shardui/form.d.ts.map +1 -0
- package/lib/shardui/form.js +126 -0
- package/lib/shardui/form.js.map +1 -0
- package/lib/shardui/hover-card.d.ts +7 -0
- package/lib/shardui/hover-card.d.ts.map +1 -0
- package/lib/shardui/hover-card.js +15 -0
- package/lib/shardui/hover-card.js.map +1 -0
- package/lib/shardui/index.d.ts +50 -0
- package/lib/shardui/index.d.ts.map +1 -0
- package/lib/shardui/index.js +1 -0
- package/lib/shardui/index.js.map +1 -0
- package/lib/shardui/input-otp.d.ts +35 -0
- package/lib/shardui/input-otp.d.ts.map +1 -0
- package/lib/shardui/input-otp.js +53 -0
- package/lib/shardui/input-otp.js.map +1 -0
- package/lib/shardui/input.d.ts +4 -0
- package/lib/shardui/input.d.ts.map +1 -0
- package/lib/shardui/input.js +13 -0
- package/lib/shardui/input.js.map +1 -0
- package/lib/shardui/label.d.ts +6 -0
- package/lib/shardui/label.d.ts.map +1 -0
- package/lib/shardui/label.js +10 -0
- package/lib/shardui/label.js.map +1 -0
- package/lib/shardui/menubar.d.ts +34 -0
- package/lib/shardui/menubar.d.ts.map +1 -0
- package/lib/shardui/menubar.js +140 -0
- package/lib/shardui/menubar.js.map +1 -0
- package/lib/shardui/navigation-menu.d.ts +13 -0
- package/lib/shardui/navigation-menu.d.ts.map +1 -0
- package/lib/shardui/navigation-menu.js +70 -0
- package/lib/shardui/navigation-menu.js.map +1 -0
- package/lib/shardui/pagination.d.ts +29 -0
- package/lib/shardui/pagination.d.ts.map +1 -0
- package/lib/shardui/pagination.js +87 -0
- package/lib/shardui/pagination.js.map +1 -0
- package/lib/shardui/popover.d.ts +7 -0
- package/lib/shardui/popover.d.ts.map +1 -0
- package/lib/shardui/popover.js +17 -0
- package/lib/shardui/popover.js.map +1 -0
- package/lib/shardui/progress.d.ts +5 -0
- package/lib/shardui/progress.d.ts.map +1 -0
- package/lib/shardui/progress.js +16 -0
- package/lib/shardui/progress.js.map +1 -0
- package/lib/shardui/radio-group.d.ts +6 -0
- package/lib/shardui/radio-group.d.ts.map +1 -0
- package/lib/shardui/radio-group.js +28 -0
- package/lib/shardui/radio-group.js.map +1 -0
- package/lib/shardui/resizable.d.ts +24 -0
- package/lib/shardui/resizable.d.ts.map +1 -0
- package/lib/shardui/resizable.js +22 -0
- package/lib/shardui/resizable.js.map +1 -0
- package/lib/shardui/scroll-area.d.ts +6 -0
- package/lib/shardui/scroll-area.d.ts.map +1 -0
- package/lib/shardui/scroll-area.js +28 -0
- package/lib/shardui/scroll-area.js.map +1 -0
- package/lib/shardui/select.d.ts +14 -0
- package/lib/shardui/select.d.ts.map +1 -0
- package/lib/shardui/select.js +99 -0
- package/lib/shardui/select.js.map +1 -0
- package/lib/shardui/separator.d.ts +5 -0
- package/lib/shardui/separator.d.ts.map +1 -0
- package/lib/shardui/separator.js +13 -0
- package/lib/shardui/separator.js.map +1 -0
- package/lib/shardui/sheet.d.ts +26 -0
- package/lib/shardui/sheet.d.ts.map +1 -0
- package/lib/shardui/sheet.js +84 -0
- package/lib/shardui/sheet.js.map +1 -0
- package/lib/shardui/sidebar.d.ts +67 -0
- package/lib/shardui/sidebar.d.ts.map +1 -0
- package/lib/shardui/sidebar.js +490 -0
- package/lib/shardui/sidebar.js.map +1 -0
- package/lib/shardui/skeleton.d.ts +3 -0
- package/lib/shardui/skeleton.d.ts.map +1 -0
- package/lib/shardui/skeleton.js +9 -0
- package/lib/shardui/skeleton.js.map +1 -0
- package/lib/shardui/slider.d.ts +5 -0
- package/lib/shardui/slider.d.ts.map +1 -0
- package/lib/shardui/slider.js +17 -0
- package/lib/shardui/slider.js.map +1 -0
- package/lib/shardui/sonner.d.ts +5 -0
- package/lib/shardui/sonner.d.ts.map +1 -0
- package/lib/shardui/sonner.js +20 -0
- package/lib/shardui/sonner.js.map +1 -0
- package/lib/shardui/switch.d.ts +5 -0
- package/lib/shardui/switch.d.ts.map +1 -0
- package/lib/shardui/switch.js +12 -0
- package/lib/shardui/switch.js.map +1 -0
- package/lib/shardui/table.d.ts +11 -0
- package/lib/shardui/table.d.ts.map +1 -0
- package/lib/shardui/table.js +75 -0
- package/lib/shardui/table.js.map +1 -0
- package/lib/shardui/tabs.d.ts +8 -0
- package/lib/shardui/tabs.d.ts.map +1 -0
- package/lib/shardui/tabs.js +28 -0
- package/lib/shardui/tabs.js.map +1 -0
- package/lib/shardui/textarea.d.ts +6 -0
- package/lib/shardui/textarea.d.ts.map +1 -0
- package/lib/shardui/textarea.js +11 -0
- package/lib/shardui/textarea.js.map +1 -0
- package/lib/shardui/toast.d.ts +16 -0
- package/lib/shardui/toast.d.ts.map +1 -0
- package/lib/shardui/toast.js +75 -0
- package/lib/shardui/toast.js.map +1 -0
- package/lib/shardui/toaster.d.ts +2 -0
- package/lib/shardui/toaster.d.ts.map +1 -0
- package/lib/shardui/toaster.js +26 -0
- package/lib/shardui/toaster.js.map +1 -0
- package/lib/shardui/toggle-group.d.ts +13 -0
- package/lib/shardui/toggle-group.d.ts.map +1 -0
- package/lib/shardui/toggle-group.js +42 -0
- package/lib/shardui/toggle-group.js.map +1 -0
- package/lib/shardui/toggle.d.ts +13 -0
- package/lib/shardui/toggle.d.ts.map +1 -0
- package/lib/shardui/toggle.js +32 -0
- package/lib/shardui/toggle.js.map +1 -0
- package/lib/shardui/tooltip.d.ts +8 -0
- package/lib/shardui/tooltip.d.ts.map +1 -0
- package/lib/shardui/tooltip.js +14 -0
- package/lib/shardui/tooltip.js.map +1 -0
- package/lib/shardui/use-toast.d.ts +3 -0
- package/lib/shardui/use-toast.d.ts.map +1 -0
- package/lib/utils/hooks/use-mobile.d.ts +2 -0
- package/lib/utils/hooks/use-mobile.d.ts.map +1 -0
- package/lib/utils/hooks/use-mobile.js +14 -0
- package/lib/utils/hooks/use-mobile.js.map +1 -0
- package/lib/utils/hooks/use-toast.d.ts +45 -0
- package/lib/utils/hooks/use-toast.d.ts.map +1 -0
- package/lib/utils/hooks/use-toast.js +133 -0
- package/lib/utils/hooks/use-toast.js.map +1 -0
- package/lib/utils/index.d.ts +7 -1
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/isBrowser/index.js +1 -0
- package/lib/utils/isBrowser/index.js.map +1 -0
- package/lib/utils/util.d.ts +3 -0
- package/lib/utils/util.d.ts.map +1 -0
- package/lib/utils/util.js +3 -0
- package/lib/utils/util.js.map +1 -0
- package/package.json +50 -3
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';import*as React from'react';import {Slot}from'@radix-ui/react-slot';import {MoreHorizontal,ChevronRight}from'lucide-react';import'../utils/isBrowser/index.js';import {cn}from'../utils/util.js';import'fast-deep-equal/react.js';const Breadcrumb = React.forwardRef(({
|
|
2
|
+
...props
|
|
3
|
+
}, ref) => jsx("nav", {
|
|
4
|
+
ref: ref,
|
|
5
|
+
"aria-label": "breadcrumb",
|
|
6
|
+
...props
|
|
7
|
+
}));
|
|
8
|
+
Breadcrumb.displayName = 'Breadcrumb';
|
|
9
|
+
const BreadcrumbList = React.forwardRef(({
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}, ref) => jsx("ol", {
|
|
13
|
+
ref: ref,
|
|
14
|
+
className: cn('flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5', className),
|
|
15
|
+
...props
|
|
16
|
+
}));
|
|
17
|
+
BreadcrumbList.displayName = 'BreadcrumbList';
|
|
18
|
+
const BreadcrumbItem = React.forwardRef(({
|
|
19
|
+
className,
|
|
20
|
+
...props
|
|
21
|
+
}, ref) => jsx("li", {
|
|
22
|
+
ref: ref,
|
|
23
|
+
className: cn('inline-flex items-center gap-1.5', className),
|
|
24
|
+
...props
|
|
25
|
+
}));
|
|
26
|
+
BreadcrumbItem.displayName = 'BreadcrumbItem';
|
|
27
|
+
const BreadcrumbLink = React.forwardRef(({
|
|
28
|
+
asChild,
|
|
29
|
+
className,
|
|
30
|
+
...props
|
|
31
|
+
}, ref) => {
|
|
32
|
+
const Comp = asChild ? Slot : 'a';
|
|
33
|
+
return jsx(Comp, {
|
|
34
|
+
ref: ref,
|
|
35
|
+
className: cn('transition-colors hover:text-foreground', className),
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
BreadcrumbLink.displayName = 'BreadcrumbLink';
|
|
40
|
+
const BreadcrumbPage = React.forwardRef(({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}, ref) => jsx("span", {
|
|
44
|
+
ref: ref,
|
|
45
|
+
role: "link",
|
|
46
|
+
"aria-disabled": "true",
|
|
47
|
+
"aria-current": "page",
|
|
48
|
+
className: cn('font-normal text-foreground', className),
|
|
49
|
+
...props
|
|
50
|
+
}));
|
|
51
|
+
BreadcrumbPage.displayName = 'BreadcrumbPage';
|
|
52
|
+
const BreadcrumbSeparator = ({
|
|
53
|
+
children,
|
|
54
|
+
className,
|
|
55
|
+
...props
|
|
56
|
+
}) => jsx("li", {
|
|
57
|
+
role: "presentation",
|
|
58
|
+
"aria-hidden": "true",
|
|
59
|
+
className: cn('[&>svg]:size-3.5', className),
|
|
60
|
+
...props,
|
|
61
|
+
children: children ?? jsx(ChevronRight, {})
|
|
62
|
+
});
|
|
63
|
+
BreadcrumbSeparator.displayName = 'BreadcrumbSeparator';
|
|
64
|
+
const BreadcrumbEllipsis = ({
|
|
65
|
+
className,
|
|
66
|
+
...props
|
|
67
|
+
}) => jsxs("span", {
|
|
68
|
+
role: "presentation",
|
|
69
|
+
"aria-hidden": "true",
|
|
70
|
+
className: cn('flex h-9 w-9 items-center justify-center', className),
|
|
71
|
+
...props,
|
|
72
|
+
children: [jsx(MoreHorizontal, {
|
|
73
|
+
className: "h-4 w-4"
|
|
74
|
+
}), jsx("span", {
|
|
75
|
+
className: "sr-only",
|
|
76
|
+
children: "More"
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
79
|
+
BreadcrumbEllipsis.displayName = 'BreadcrumbElipssis';export{Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator};//# sourceMappingURL=breadcrumb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","sources":["../../src/shardui/breadcrumb.tsx"],"sourcesContent":[null],"names":[],"mappings":"2QA4BA,MAAA,UAAoB,GAAA,KAAA,CAAA,UAAA,CAAA,CAAA;AAOpB,EAAA,GAAA;cAGyB,CAAA,KAAA,EAAA;;AASzB,EAAA,YAAM,EAAc,YAAA;AAcpB,EAAA,GAAA;AAAgE,CAAA,CAAA;;AAI9D,MAAA,cAAA,GAAA,KAAA,CAAA,UAAA,CAAA,CAAA;AAGF,EAAA;AAAqD,EAAA,GAAA;;EAUnD,GAAA,EAAA,GAAA;AAGF,EAAA,SACI,EAAA,EAAA,CAAA,0FAMA,EAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const buttonVariants: (props?: {
|
|
4
|
+
variant?: "default" | "link" | "secondary" | "outline" | "ghost" | "destructive";
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants };
|
|
12
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/shardui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;iEAwBnB,CAAC;AAEF,MAAM,WAAW,WACb,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACjD,YAAY,CAAC,OAAO,cAAc,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,MAAM,uFAKX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import*as React from'react';import {Slot}from'@radix-ui/react-slot';import {cva}from'class-variance-authority';import'../utils/isBrowser/index.js';import {cn}from'../utils/util.js';import'fast-deep-equal/react.js';const buttonVariants = cva('inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', {
|
|
2
|
+
variants: {
|
|
3
|
+
variant: {
|
|
4
|
+
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
5
|
+
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
|
|
6
|
+
outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
|
|
7
|
+
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
8
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
|
9
|
+
link: 'text-primary underline-offset-4 hover:underline'
|
|
10
|
+
},
|
|
11
|
+
size: {
|
|
12
|
+
default: 'h-10 px-4 py-2',
|
|
13
|
+
sm: 'h-9 rounded-md px-3',
|
|
14
|
+
lg: 'h-11 rounded-md px-8',
|
|
15
|
+
icon: 'h-10 w-10'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
variant: 'default',
|
|
20
|
+
size: 'default'
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const Button = React.forwardRef(({
|
|
24
|
+
className,
|
|
25
|
+
variant,
|
|
26
|
+
size,
|
|
27
|
+
asChild = false,
|
|
28
|
+
...props
|
|
29
|
+
}, ref) => {
|
|
30
|
+
const Comp = asChild ? Slot : 'button';
|
|
31
|
+
return jsx(Comp, {
|
|
32
|
+
className: cn(buttonVariants({
|
|
33
|
+
variant,
|
|
34
|
+
size,
|
|
35
|
+
className
|
|
36
|
+
})),
|
|
37
|
+
ref: ref,
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
Button.displayName = 'Button';export{Button,buttonVariants};//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../src/shardui/button.tsx"],"sourcesContent":[null],"names":[],"mappings":"+mBA8BE,EAAA;AAEF,EAAA,QAAiB,EAAA;IAGb,OAAO,EAAG;AACb,MAAA,OAAA,EAAA,wDAAA;AAED,MAAA,WAAY,EAAA,oEAAA;AAQZ,MAAA,OAAS,EAAM,gFAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DayPicker } from 'react-day-picker';
|
|
3
|
+
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
4
|
+
declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare namespace Calendar {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
export { Calendar };
|
|
9
|
+
//# sourceMappingURL=calendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/shardui/calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAEnE,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,eAAsB,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CAyC3F;kBAzCQ,QAAQ;;;AA4CjB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import {ChevronRight,ChevronLeft}from'lucide-react';import {DayPicker}from'react-day-picker';import'../utils/isBrowser/index.js';import {cn}from'../utils/util.js';import'react';import'fast-deep-equal/react.js';import {buttonVariants}from'./button.js';function Calendar({
|
|
2
|
+
className,
|
|
3
|
+
classNames,
|
|
4
|
+
showOutsideDays = true,
|
|
5
|
+
...props
|
|
6
|
+
}) {
|
|
7
|
+
return jsx(DayPicker, {
|
|
8
|
+
showOutsideDays: showOutsideDays,
|
|
9
|
+
className: cn('p-3', className),
|
|
10
|
+
classNames: {
|
|
11
|
+
months: 'flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0',
|
|
12
|
+
month: 'space-y-4',
|
|
13
|
+
caption: 'flex justify-center pt-1 relative items-center',
|
|
14
|
+
caption_label: 'text-sm font-medium',
|
|
15
|
+
nav: 'space-x-1 flex items-center',
|
|
16
|
+
nav_button: cn(buttonVariants({
|
|
17
|
+
variant: 'outline'
|
|
18
|
+
}), 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100'),
|
|
19
|
+
nav_button_previous: 'absolute left-1',
|
|
20
|
+
nav_button_next: 'absolute right-1',
|
|
21
|
+
table: 'w-full border-collapse space-y-1',
|
|
22
|
+
head_row: 'flex',
|
|
23
|
+
head_cell: 'text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]',
|
|
24
|
+
row: 'flex w-full mt-2',
|
|
25
|
+
cell: 'h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20',
|
|
26
|
+
day: cn(buttonVariants({
|
|
27
|
+
variant: 'ghost'
|
|
28
|
+
}), 'h-9 w-9 p-0 font-normal aria-selected:opacity-100'),
|
|
29
|
+
day_range_end: 'day-range-end',
|
|
30
|
+
day_selected: 'bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground',
|
|
31
|
+
day_today: 'bg-accent text-accent-foreground',
|
|
32
|
+
day_outside: 'day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30',
|
|
33
|
+
day_disabled: 'text-muted-foreground opacity-50',
|
|
34
|
+
day_range_middle: 'aria-selected:bg-accent aria-selected:text-accent-foreground',
|
|
35
|
+
day_hidden: 'invisible',
|
|
36
|
+
...classNames
|
|
37
|
+
},
|
|
38
|
+
components: {
|
|
39
|
+
IconLeft: ({
|
|
40
|
+
..._props
|
|
41
|
+
}) => jsx(ChevronLeft, {
|
|
42
|
+
className: "h-4 w-4"
|
|
43
|
+
}),
|
|
44
|
+
IconRight: ({
|
|
45
|
+
..._props
|
|
46
|
+
}) => jsx(ChevronRight, {
|
|
47
|
+
className: "h-4 w-4"
|
|
48
|
+
})
|
|
49
|
+
},
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
Calendar.displayName = 'Calendar';export{Calendar};//# sourceMappingURL=calendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.js","sources":["../../src/shardui/calendar.tsx"],"sourcesContent":[null],"names":[],"mappings":";;AAqDA,EAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
5
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
6
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
9
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/shardui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,IAAI,6GAER,CAAC;AAGH,QAAA,MAAM,UAAU,6GAIf,CAAC;AAGF,QAAA,MAAM,SAAS,uHAId,CAAC;AAGF,QAAA,MAAM,eAAe,yHAIpB,CAAC;AAGF,QAAA,MAAM,WAAW,6GAEhB,CAAC;AAGF,QAAA,MAAM,UAAU,6GAIf,CAAC;AAGF,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import*as React from'react';import'../utils/isBrowser/index.js';import {cn}from'../utils/util.js';import'fast-deep-equal/react.js';const Card = React.forwardRef(({
|
|
2
|
+
className,
|
|
3
|
+
...props
|
|
4
|
+
}, ref) => jsx("div", {
|
|
5
|
+
ref: ref,
|
|
6
|
+
className: cn('rounded-lg border bg-card text-card-foreground shadow-sm', className),
|
|
7
|
+
...props
|
|
8
|
+
}));
|
|
9
|
+
Card.displayName = 'Card';
|
|
10
|
+
const CardHeader = React.forwardRef(({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}, ref) => jsx("div", {
|
|
14
|
+
ref: ref,
|
|
15
|
+
className: cn('flex flex-col space-y-1.5 p-6', className),
|
|
16
|
+
...props
|
|
17
|
+
}));
|
|
18
|
+
CardHeader.displayName = 'CardHeader';
|
|
19
|
+
const CardTitle = React.forwardRef(({
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
}, ref) => jsx("h3", {
|
|
23
|
+
ref: ref,
|
|
24
|
+
className: cn('text-2xl font-semibold leading-none tracking-tight', className),
|
|
25
|
+
...props
|
|
26
|
+
}));
|
|
27
|
+
CardTitle.displayName = 'CardTitle';
|
|
28
|
+
const CardDescription = React.forwardRef(({
|
|
29
|
+
className,
|
|
30
|
+
...props
|
|
31
|
+
}, ref) => jsx("p", {
|
|
32
|
+
ref: ref,
|
|
33
|
+
className: cn('text-sm text-muted-foreground', className),
|
|
34
|
+
...props
|
|
35
|
+
}));
|
|
36
|
+
CardDescription.displayName = 'CardDescription';
|
|
37
|
+
const CardContent = React.forwardRef(({
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
}, ref) => jsx("div", {
|
|
41
|
+
ref: ref,
|
|
42
|
+
className: cn('p-6 pt-0', className),
|
|
43
|
+
...props
|
|
44
|
+
}));
|
|
45
|
+
CardContent.displayName = 'CardContent';
|
|
46
|
+
const CardFooter = React.forwardRef(({
|
|
47
|
+
className,
|
|
48
|
+
...props
|
|
49
|
+
}, ref) => jsx("div", {
|
|
50
|
+
ref: ref,
|
|
51
|
+
className: cn('flex items-center p-6 pt-0', className),
|
|
52
|
+
...props
|
|
53
|
+
}));
|
|
54
|
+
CardFooter.displayName = 'CardFooter';export{Card,CardContent,CardDescription,CardFooter,CardHeader,CardTitle};//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","sources":["../../src/shardui/card.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"uKAgBA,MAAA,IAAA,GAAA,KAAe,CAAA,UAAA,CAAA,CAAA;AAOf,EAAA,SAAA;AAOA,EAAA,GAAA;AAKA,CAAA,EAAA,GAAA,KAAAA,GAAgB,CAAA,KAAA,EAAA;AAOhB,EAAA,GAAA,EAAO,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';
|
|
3
|
+
type CarouselApi = UseEmblaCarouselType[1];
|
|
4
|
+
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
5
|
+
type CarouselOptions = UseCarouselParameters[0];
|
|
6
|
+
type CarouselPlugin = UseCarouselParameters[1];
|
|
7
|
+
type CarouselProps = {
|
|
8
|
+
opts?: CarouselOptions;
|
|
9
|
+
plugins?: CarouselPlugin;
|
|
10
|
+
orientation?: 'horizontal' | 'vertical';
|
|
11
|
+
setApi?: (api: CarouselApi) => void;
|
|
12
|
+
};
|
|
13
|
+
declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import("./button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import("./button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext };
|
|
19
|
+
//# sourceMappingURL=carousel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/shardui/carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,gBAAgB,EAAE,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAMnF,KAAK,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACjE,KAAK,eAAe,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAChD,KAAK,cAAc,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAE/C,KAAK,aAAa,GAAG;IACjB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;CACvC,CAAC;AAuBF,QAAA,MAAM,QAAQ,6HA0Fb,CAAC;AAGF,QAAA,MAAM,eAAe,6GAcpB,CAAC;AAGF,QAAA,MAAM,YAAY,6GAkBjB,CAAC;AAGF,QAAA,MAAM,gBAAgB,gKAyBrB,CAAC;AAGF,QAAA,MAAM,YAAY,gKAyBjB,CAAC;AAGF,OAAO,EAAE,KAAK,WAAW,EAAE,QAAQ,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';import*as React from'react';import useEmblaCarousel from'embla-carousel-react';import {ArrowLeft,ArrowRight}from'lucide-react';import'../utils/isBrowser/index.js';import {cn}from'../utils/util.js';import'fast-deep-equal/react.js';import {Button}from'./button.js';const CarouselContext = React.createContext(null);
|
|
2
|
+
function useCarousel() {
|
|
3
|
+
const context = React.useContext(CarouselContext);
|
|
4
|
+
if (!context) {
|
|
5
|
+
throw new Error('useCarousel must be used within a <Carousel />');
|
|
6
|
+
}
|
|
7
|
+
return context;
|
|
8
|
+
}
|
|
9
|
+
const Carousel = React.forwardRef(({
|
|
10
|
+
orientation = 'horizontal',
|
|
11
|
+
opts,
|
|
12
|
+
setApi,
|
|
13
|
+
plugins,
|
|
14
|
+
className,
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
}, ref) => {
|
|
18
|
+
const [carouselRef, api] = useEmblaCarousel({
|
|
19
|
+
...opts,
|
|
20
|
+
axis: orientation === 'horizontal' ? 'x' : 'y'
|
|
21
|
+
}, plugins);
|
|
22
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
23
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
24
|
+
const onSelect = React.useCallback(api => {
|
|
25
|
+
if (!api) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
setCanScrollPrev(api.canScrollPrev());
|
|
29
|
+
setCanScrollNext(api.canScrollNext());
|
|
30
|
+
}, []);
|
|
31
|
+
const scrollPrev = React.useCallback(() => {
|
|
32
|
+
api?.scrollPrev();
|
|
33
|
+
}, [api]);
|
|
34
|
+
const scrollNext = React.useCallback(() => {
|
|
35
|
+
api?.scrollNext();
|
|
36
|
+
}, [api]);
|
|
37
|
+
const handleKeyDown = React.useCallback(event => {
|
|
38
|
+
if (event.key === 'ArrowLeft') {
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
scrollPrev();
|
|
41
|
+
} else if (event.key === 'ArrowRight') {
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
scrollNext();
|
|
44
|
+
}
|
|
45
|
+
}, [scrollPrev, scrollNext]);
|
|
46
|
+
React.useEffect(() => {
|
|
47
|
+
if (!api || !setApi) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
setApi(api);
|
|
51
|
+
}, [api, setApi]);
|
|
52
|
+
React.useEffect(() => {
|
|
53
|
+
if (!api) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
onSelect(api);
|
|
57
|
+
api.on('reInit', onSelect);
|
|
58
|
+
api.on('select', onSelect);
|
|
59
|
+
return () => {
|
|
60
|
+
api?.off('select', onSelect);
|
|
61
|
+
};
|
|
62
|
+
}, [api, onSelect]);
|
|
63
|
+
return jsx(CarouselContext.Provider, {
|
|
64
|
+
value: {
|
|
65
|
+
carouselRef,
|
|
66
|
+
api: api,
|
|
67
|
+
opts,
|
|
68
|
+
orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),
|
|
69
|
+
scrollPrev,
|
|
70
|
+
scrollNext,
|
|
71
|
+
canScrollPrev,
|
|
72
|
+
canScrollNext
|
|
73
|
+
},
|
|
74
|
+
children: jsx("div", {
|
|
75
|
+
ref: ref,
|
|
76
|
+
onKeyDownCapture: handleKeyDown,
|
|
77
|
+
className: cn('relative', className),
|
|
78
|
+
role: "region",
|
|
79
|
+
"aria-roledescription": "carousel",
|
|
80
|
+
...props,
|
|
81
|
+
children: children
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
Carousel.displayName = 'Carousel';
|
|
86
|
+
const CarouselContent = React.forwardRef(({
|
|
87
|
+
className,
|
|
88
|
+
...props
|
|
89
|
+
}, ref) => {
|
|
90
|
+
const {
|
|
91
|
+
carouselRef,
|
|
92
|
+
orientation
|
|
93
|
+
} = useCarousel();
|
|
94
|
+
return jsx("div", {
|
|
95
|
+
ref: carouselRef,
|
|
96
|
+
className: "overflow-hidden",
|
|
97
|
+
children: jsx("div", {
|
|
98
|
+
ref: ref,
|
|
99
|
+
className: cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className),
|
|
100
|
+
...props
|
|
101
|
+
})
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
CarouselContent.displayName = 'CarouselContent';
|
|
105
|
+
const CarouselItem = React.forwardRef(({
|
|
106
|
+
className,
|
|
107
|
+
...props
|
|
108
|
+
}, ref) => {
|
|
109
|
+
const {
|
|
110
|
+
orientation
|
|
111
|
+
} = useCarousel();
|
|
112
|
+
return jsx("div", {
|
|
113
|
+
ref: ref,
|
|
114
|
+
role: "group",
|
|
115
|
+
"aria-roledescription": "slide",
|
|
116
|
+
className: cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className),
|
|
117
|
+
...props
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
CarouselItem.displayName = 'CarouselItem';
|
|
121
|
+
const CarouselPrevious = React.forwardRef(({
|
|
122
|
+
className,
|
|
123
|
+
variant = 'outline',
|
|
124
|
+
size = 'icon',
|
|
125
|
+
...props
|
|
126
|
+
}, ref) => {
|
|
127
|
+
const {
|
|
128
|
+
orientation,
|
|
129
|
+
scrollPrev,
|
|
130
|
+
canScrollPrev
|
|
131
|
+
} = useCarousel();
|
|
132
|
+
return jsxs(Button, {
|
|
133
|
+
ref: ref,
|
|
134
|
+
variant: variant,
|
|
135
|
+
size: size,
|
|
136
|
+
className: cn('absolute h-8 w-8 rounded-full', orientation === 'horizontal' ? '-left-12 top-1/2 -translate-y-1/2' : '-top-12 left-1/2 -translate-x-1/2 rotate-90', className),
|
|
137
|
+
disabled: !canScrollPrev,
|
|
138
|
+
onClick: scrollPrev,
|
|
139
|
+
...props,
|
|
140
|
+
children: [jsx(ArrowLeft, {
|
|
141
|
+
className: "h-4 w-4"
|
|
142
|
+
}), jsx("span", {
|
|
143
|
+
className: "sr-only",
|
|
144
|
+
children: "Previous slide"
|
|
145
|
+
})]
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
CarouselPrevious.displayName = 'CarouselPrevious';
|
|
149
|
+
const CarouselNext = React.forwardRef(({
|
|
150
|
+
className,
|
|
151
|
+
variant = 'outline',
|
|
152
|
+
size = 'icon',
|
|
153
|
+
...props
|
|
154
|
+
}, ref) => {
|
|
155
|
+
const {
|
|
156
|
+
orientation,
|
|
157
|
+
scrollNext,
|
|
158
|
+
canScrollNext
|
|
159
|
+
} = useCarousel();
|
|
160
|
+
return jsxs(Button, {
|
|
161
|
+
ref: ref,
|
|
162
|
+
variant: variant,
|
|
163
|
+
size: size,
|
|
164
|
+
className: cn('absolute h-8 w-8 rounded-full', orientation === 'horizontal' ? '-right-12 top-1/2 -translate-y-1/2' : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90', className),
|
|
165
|
+
disabled: !canScrollNext,
|
|
166
|
+
onClick: scrollNext,
|
|
167
|
+
...props,
|
|
168
|
+
children: [jsx(ArrowRight, {
|
|
169
|
+
className: "h-4 w-4"
|
|
170
|
+
}), jsx("span", {
|
|
171
|
+
className: "sr-only",
|
|
172
|
+
children: "Next slide"
|
|
173
|
+
})]
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
CarouselNext.displayName = 'CarouselNext';export{Carousel,CarouselContent,CarouselItem,CarouselNext,CarouselPrevious};//# sourceMappingURL=carousel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousel.js","sources":["../../src/shardui/carousel.tsx"],"sourcesContent":[null],"names":[],"mappings":"gTAYA,qBAAqB,GAAA,KAAA,CAAA,aAAA,CAAA,IAAA,CAAA;SACZ,WAAE,GAAA;QACA,OAAG,GAAA,KAAA,CAAA,UAAe,CAAA,eAAA,CAAA;AACzB,EAAA,IAAA,CAAA,OAAA,EAAY;IACZ,MAAM,IAAI,KAAK,CAAW,gDAAU,CAAA;;AAwBxC,EAAA,OAAA,OAAc;AA6Fd;AAiBA,MAAA,QAAM,GAAY,KAAA,CAAA,UAAA,CAAA,CAAA;AAqBlB,EAAA,WAAA,GAAsB,YAAA;AA4BtB,EAAA,IAAA;AA4BA,EAAA,MAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RechartsPrimitive from 'recharts';
|
|
3
|
+
declare const THEMES: {
|
|
4
|
+
readonly light: "";
|
|
5
|
+
readonly dark: ".dark";
|
|
6
|
+
};
|
|
7
|
+
export type ChartConfig = {
|
|
8
|
+
[k in string]: {
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
icon?: React.ComponentType;
|
|
11
|
+
} & ({
|
|
12
|
+
color?: string;
|
|
13
|
+
theme?: never;
|
|
14
|
+
} | {
|
|
15
|
+
color?: never;
|
|
16
|
+
theme: Record<keyof typeof THEMES, string>;
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
20
|
+
config: ChartConfig;
|
|
21
|
+
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
22
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const ChartStyle: ({ id, config }: {
|
|
24
|
+
id: string;
|
|
25
|
+
config: ChartConfig;
|
|
26
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
28
|
+
declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<RechartsPrimitive.DefaultTooltipContentProps<import("recharts/types/component/DefaultTooltipContent").ValueType, import("recharts/types/component/DefaultTooltipContent").NameType> & {
|
|
29
|
+
accessibilityLayer?: boolean;
|
|
30
|
+
active?: boolean | undefined;
|
|
31
|
+
includeHidden?: boolean | undefined;
|
|
32
|
+
allowEscapeViewBox?: import("recharts/types/util/types").AllowInDimension;
|
|
33
|
+
animationDuration?: import("recharts/types/util/types").AnimationDuration;
|
|
34
|
+
animationEasing?: import("recharts/types/util/types").AnimationTiming;
|
|
35
|
+
content?: import("recharts/types/component/Tooltip").ContentType<import("recharts/types/component/DefaultTooltipContent").ValueType, import("recharts/types/component/DefaultTooltipContent").NameType>;
|
|
36
|
+
coordinate?: Partial<import("recharts/types/util/types").Coordinate>;
|
|
37
|
+
cursor?: boolean | React.ReactElement | React.SVGProps<SVGElement>;
|
|
38
|
+
filterNull?: boolean;
|
|
39
|
+
defaultIndex?: number;
|
|
40
|
+
isAnimationActive?: boolean;
|
|
41
|
+
offset?: number;
|
|
42
|
+
payloadUniqBy?: import("recharts/types/util/payload/getUniqPayload").UniqueOption<import("recharts/types/component/DefaultTooltipContent").Payload<import("recharts/types/component/DefaultTooltipContent").ValueType, import("recharts/types/component/DefaultTooltipContent").NameType>>;
|
|
43
|
+
position?: Partial<import("recharts/types/util/types").Coordinate>;
|
|
44
|
+
reverseDirection?: import("recharts/types/util/types").AllowInDimension;
|
|
45
|
+
shared?: boolean;
|
|
46
|
+
trigger?: "hover" | "click";
|
|
47
|
+
useTranslate3d?: boolean;
|
|
48
|
+
viewBox?: import("recharts/types/util/types").CartesianViewBox;
|
|
49
|
+
wrapperStyle?: React.CSSProperties;
|
|
50
|
+
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
51
|
+
hideLabel?: boolean;
|
|
52
|
+
hideIndicator?: boolean;
|
|
53
|
+
indicator?: "line" | "dot" | "dashed";
|
|
54
|
+
nameKey?: string;
|
|
55
|
+
labelKey?: string;
|
|
56
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
+
declare const ChartLegend: typeof RechartsPrimitive.Legend;
|
|
58
|
+
declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
|
|
59
|
+
hideIcon?: boolean;
|
|
60
|
+
nameKey?: string;
|
|
61
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
+
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle };
|
|
63
|
+
//# sourceMappingURL=chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/shardui/chart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,UAAU,CAAC;AAK9C,QAAA,MAAM,MAAM;;;CAAwC,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG;KACrB,CAAC,IAAI,MAAM,GAAG;QACX,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACxB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC9B,GAAG,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,GAAG;QAAE,KAAK,CAAC,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,OAAO,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;CAC1G,CAAC;AAkBF,QAAA,MAAM,cAAc;YAGJ,WAAW;cACT,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,mBAAmB,CAAC,CAAC,UAAU,CAAC;gDAsB9F,CAAC;AAGH,QAAA,MAAM,UAAU,GAAI,gBAAgB;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,4CA2BtE,CAAC;AAEF,QAAA,MAAM,YAAY,kCAA4B,CAAC;AAE/C,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;gBAID,OAAO;oBACH,OAAO;gBACX,MAAM,GAAG,KAAK,GAAG,QAAQ;cAC3B,MAAM;eACL,MAAM;gDAmI5B,CAAC;AAGF,QAAA,MAAM,WAAW,iCAA2B,CAAC;AAE7C,QAAA,MAAM,kBAAkB;eAID,OAAO;cACR,MAAM;gDA6C1B,CAAC;AA6BH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC"}
|