@admin-layout/tailwind-ui 12.0.16-alpha.93 → 12.2.1-alpha.0
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 +1 -1
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +6 -7
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/DatePicker/DatePicker.js +139 -157
- package/lib/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts +2 -1
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.js +2 -2
- package/lib/components/ErrorHandlers/ErrorBoundary.d.ts +2 -1
- package/lib/components/ErrorHandlers/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/ErrorBoundary.js +28 -35
- package/lib/components/ErrorHandlers/ErrorBoundary.js.map +1 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts +2 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.js +15 -20
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.js.map +1 -1
- package/lib/components/ErrorPages/403.d.ts +2 -1
- package/lib/components/ErrorPages/403.d.ts.map +1 -1
- package/lib/components/ErrorPages/403.js +18 -26
- package/lib/components/ErrorPages/403.js.map +1 -1
- package/lib/components/ErrorPages/404.d.ts +2 -1
- package/lib/components/ErrorPages/404.d.ts.map +1 -1
- package/lib/components/ErrorPages/404.js +18 -26
- package/lib/components/ErrorPages/404.js.map +1 -1
- package/lib/components/ErrorPages/500.d.ts +2 -1
- package/lib/components/ErrorPages/500.d.ts.map +1 -1
- package/lib/components/ErrorPages/500.js +18 -26
- package/lib/components/ErrorPages/500.js.map +1 -1
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts +2 -1
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts.map +1 -1
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js +19 -24
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js.map +1 -1
- package/lib/components/OTP/OTPInput.js +30 -32
- package/lib/components/OTP/OTPInput.js.map +1 -1
- package/lib/components/OTP/OTPVerification.js +55 -75
- package/lib/components/OTP/OTPVerification.js.map +1 -1
- package/lib/components/OTP/SingleInput.js +2 -2
- package/lib/components/OTP/SingleInput.js.map +1 -1
- package/lib/components/PageContainer/PageContainer.js +22 -29
- package/lib/components/PageContainer/PageContainer.js.map +1 -1
- package/lib/components/PageLoading/index.js +7 -8
- package/lib/components/PageLoading/index.js.map +1 -1
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts +2 -1
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts.map +1 -1
- package/lib/components/ReactTable/Table.d.ts +2 -1
- package/lib/components/ReactTable/Table.d.ts.map +1 -1
- package/lib/components/ReactTable/Table.js +71 -92
- package/lib/components/ReactTable/Table.js.map +1 -1
- package/lib/components/ReactTable/TableFilters.d.ts +3 -2
- package/lib/components/ReactTable/TableFilters.d.ts.map +1 -1
- package/lib/components/ReactTable/TableFilters.js +34 -40
- package/lib/components/ReactTable/TableFilters.js.map +1 -1
- package/lib/components/Search/SearchInput.d.ts +2 -1
- package/lib/components/Search/SearchInput.d.ts.map +1 -1
- package/lib/components/Search/SearchInput.js +13 -14
- package/lib/components/Search/SearchInput.js.map +1 -1
- package/lib/components/Select/Select.d.ts +6 -6
- package/lib/components/Select/Select.d.ts.map +1 -1
- package/lib/components/Select/Select.js +45 -60
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/Spin/index.js +11 -14
- package/lib/components/Spin/index.js.map +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.js +4 -5
- package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -1
- package/lib/components/ThemeProvider/ThemeToggle.js +24 -27
- package/lib/components/ThemeProvider/ThemeToggle.js.map +1 -1
- package/lib/hooks/useToast.d.ts +1 -1
- package/lib/hooks/useToast.d.ts.map +1 -1
- package/lib/hooks/useToast.js +37 -46
- package/lib/hooks/useToast.js.map +1 -1
- package/lib/shardui/accordion.js +16 -20
- package/lib/shardui/accordion.js.map +1 -1
- package/lib/shardui/alert-dialog.d.ts +2 -2
- package/lib/shardui/alert-dialog.js +13 -15
- package/lib/shardui/alert-dialog.js.map +1 -1
- package/lib/shardui/alert.d.ts +1 -1
- package/lib/shardui/alert.d.ts.map +1 -1
- package/lib/shardui/alert.js +4 -4
- package/lib/shardui/alert.js.map +1 -1
- package/lib/shardui/avatar.js +4 -4
- package/lib/shardui/avatar.js.map +1 -1
- package/lib/shardui/badge.d.ts +2 -2
- package/lib/shardui/badge.d.ts.map +1 -1
- package/lib/shardui/badge.js +2 -2
- package/lib/shardui/badge.js.map +1 -1
- package/lib/shardui/breadcrumb.d.ts +2 -2
- package/lib/shardui/breadcrumb.js +16 -19
- package/lib/shardui/breadcrumb.js.map +1 -1
- package/lib/shardui/button.d.ts +1 -1
- package/lib/shardui/button.d.ts.map +1 -1
- package/lib/shardui/button.js +2 -2
- package/lib/shardui/button.js.map +1 -1
- package/lib/shardui/calendar.d.ts +1 -1
- package/lib/shardui/calendar.d.ts.map +1 -1
- package/lib/shardui/calendar.js +4 -4
- package/lib/shardui/card.js +7 -7
- package/lib/shardui/card.js.map +1 -1
- package/lib/shardui/carousel.js +33 -40
- package/lib/shardui/carousel.js.map +1 -1
- package/lib/shardui/chart.d.ts +1 -1
- package/lib/shardui/chart.d.ts.map +1 -1
- package/lib/shardui/chart.js +66 -81
- package/lib/shardui/chart.js.map +1 -1
- package/lib/shardui/checkbox.js +8 -10
- package/lib/shardui/checkbox.js.map +1 -1
- package/lib/shardui/command.d.ts +2 -2
- package/lib/shardui/command.d.ts.map +1 -1
- package/lib/shardui/command.js +24 -28
- package/lib/shardui/command.js.map +1 -1
- package/lib/shardui/context-menu.d.ts +1 -1
- package/lib/shardui/context-menu.js +30 -41
- package/lib/shardui/context-menu.js.map +1 -1
- package/lib/shardui/dialog.d.ts +2 -2
- package/lib/shardui/dialog.js +17 -22
- package/lib/shardui/dialog.js.map +1 -1
- package/lib/shardui/drawer.d.ts +3 -3
- package/lib/shardui/drawer.js +14 -17
- package/lib/shardui/drawer.js.map +1 -1
- package/lib/shardui/dropdown-menu.d.ts +1 -1
- package/lib/shardui/dropdown-menu.js +31 -42
- package/lib/shardui/dropdown-menu.js.map +1 -1
- package/lib/shardui/form.d.ts +1 -1
- package/lib/shardui/form.d.ts.map +1 -1
- package/lib/shardui/form.js +19 -22
- package/lib/shardui/form.js.map +1 -1
- package/lib/shardui/hover-card.js +2 -2
- package/lib/shardui/hover-card.js.map +1 -1
- package/lib/shardui/input-otp.js +13 -16
- package/lib/shardui/input-otp.js.map +1 -1
- package/lib/shardui/input.js +2 -2
- package/lib/shardui/input.js.map +1 -1
- package/lib/shardui/label.d.ts +1 -1
- package/lib/shardui/label.d.ts.map +1 -1
- package/lib/shardui/label.js +2 -2
- package/lib/shardui/label.js.map +1 -1
- package/lib/shardui/menubar.d.ts +1 -1
- package/lib/shardui/menubar.js +35 -46
- package/lib/shardui/menubar.js.map +1 -1
- package/lib/shardui/navigation-menu.d.ts +1 -1
- package/lib/shardui/navigation-menu.d.ts.map +1 -1
- package/lib/shardui/navigation-menu.js +24 -28
- package/lib/shardui/navigation-menu.js.map +1 -1
- package/lib/shardui/pagination.d.ts +5 -5
- package/lib/shardui/pagination.js +22 -30
- package/lib/shardui/pagination.js.map +1 -1
- package/lib/shardui/popover.js +8 -10
- package/lib/shardui/popover.js.map +1 -1
- package/lib/shardui/progress.js +9 -10
- package/lib/shardui/progress.js.map +1 -1
- package/lib/shardui/radio-group.js +9 -11
- package/lib/shardui/radio-group.js.map +1 -1
- package/lib/shardui/resizable.d.ts +5 -4
- package/lib/shardui/resizable.d.ts.map +1 -1
- package/lib/shardui/resizable.js +9 -11
- package/lib/shardui/resizable.js.map +1 -1
- package/lib/shardui/scroll-area.js +11 -14
- package/lib/shardui/scroll-area.js.map +1 -1
- package/lib/shardui/select.js +35 -49
- package/lib/shardui/select.js.map +1 -1
- package/lib/shardui/separator.js +2 -2
- package/lib/shardui/separator.js.map +1 -1
- package/lib/shardui/sheet.d.ts +3 -3
- package/lib/shardui/sheet.d.ts.map +1 -1
- package/lib/shardui/sheet.js +19 -24
- package/lib/shardui/sheet.js.map +1 -1
- package/lib/shardui/sidebar.d.ts +1 -1
- package/lib/shardui/sidebar.d.ts.map +1 -1
- package/lib/shardui/sidebar.js +88 -104
- package/lib/shardui/sidebar.js.map +1 -1
- package/lib/shardui/skeleton.d.ts +2 -1
- package/lib/shardui/skeleton.d.ts.map +1 -1
- package/lib/shardui/skeleton.js +2 -2
- package/lib/shardui/skeleton.js.map +1 -1
- package/lib/shardui/slider.js +10 -12
- package/lib/shardui/slider.js.map +1 -1
- package/lib/shardui/sonner.d.ts +2 -1
- package/lib/shardui/sonner.d.ts.map +1 -1
- package/lib/shardui/sonner.js +2 -2
- package/lib/shardui/sonner.js.map +1 -1
- package/lib/shardui/switch.js +6 -7
- package/lib/shardui/switch.js.map +1 -1
- package/lib/shardui/table.js +15 -16
- package/lib/shardui/table.js.map +1 -1
- package/lib/shardui/tabs.js +4 -4
- package/lib/shardui/tabs.js.map +1 -1
- package/lib/shardui/textarea.js +2 -2
- package/lib/shardui/textarea.js.map +1 -1
- package/lib/shardui/toast.d.ts +1 -1
- package/lib/shardui/toast.d.ts.map +1 -1
- package/lib/shardui/toast.js +11 -12
- package/lib/shardui/toast.js.map +1 -1
- package/lib/shardui/toaster.d.ts +2 -1
- package/lib/shardui/toaster.d.ts.map +1 -1
- package/lib/shardui/toaster.js +14 -21
- package/lib/shardui/toaster.js.map +1 -1
- package/lib/shardui/toggle-group.d.ts +2 -2
- package/lib/shardui/toggle-group.d.ts.map +1 -1
- package/lib/shardui/toggle-group.js +12 -15
- package/lib/shardui/toggle-group.js.map +1 -1
- package/lib/shardui/toggle.d.ts +2 -2
- package/lib/shardui/toggle.d.ts.map +1 -1
- package/lib/shardui/toggle.js +2 -2
- package/lib/shardui/toggle.js.map +1 -1
- package/lib/shardui/tooltip.js +2 -2
- package/lib/shardui/tooltip.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
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
2
|
...props
|
|
3
|
-
}, ref) =>
|
|
3
|
+
}, ref) => React.createElement("nav", {
|
|
4
4
|
ref: ref,
|
|
5
5
|
"aria-label": "breadcrumb",
|
|
6
6
|
...props
|
|
@@ -9,7 +9,7 @@ Breadcrumb.displayName = 'Breadcrumb';
|
|
|
9
9
|
const BreadcrumbList = React.forwardRef(({
|
|
10
10
|
className,
|
|
11
11
|
...props
|
|
12
|
-
}, ref) =>
|
|
12
|
+
}, ref) => React.createElement("ol", {
|
|
13
13
|
ref: ref,
|
|
14
14
|
className: cn('flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5', className),
|
|
15
15
|
...props
|
|
@@ -18,7 +18,7 @@ BreadcrumbList.displayName = 'BreadcrumbList';
|
|
|
18
18
|
const BreadcrumbItem = React.forwardRef(({
|
|
19
19
|
className,
|
|
20
20
|
...props
|
|
21
|
-
}, ref) =>
|
|
21
|
+
}, ref) => React.createElement("li", {
|
|
22
22
|
ref: ref,
|
|
23
23
|
className: cn('inline-flex items-center gap-1.5', className),
|
|
24
24
|
...props
|
|
@@ -30,7 +30,7 @@ const BreadcrumbLink = React.forwardRef(({
|
|
|
30
30
|
...props
|
|
31
31
|
}, ref) => {
|
|
32
32
|
const Comp = asChild ? Slot : 'a';
|
|
33
|
-
return
|
|
33
|
+
return React.createElement(Comp, {
|
|
34
34
|
ref: ref,
|
|
35
35
|
className: cn('transition-colors hover:text-foreground', className),
|
|
36
36
|
...props
|
|
@@ -40,7 +40,7 @@ BreadcrumbLink.displayName = 'BreadcrumbLink';
|
|
|
40
40
|
const BreadcrumbPage = React.forwardRef(({
|
|
41
41
|
className,
|
|
42
42
|
...props
|
|
43
|
-
}, ref) =>
|
|
43
|
+
}, ref) => React.createElement("span", {
|
|
44
44
|
ref: ref,
|
|
45
45
|
role: "link",
|
|
46
46
|
"aria-disabled": "true",
|
|
@@ -53,27 +53,24 @@ const BreadcrumbSeparator = ({
|
|
|
53
53
|
children,
|
|
54
54
|
className,
|
|
55
55
|
...props
|
|
56
|
-
}) =>
|
|
56
|
+
}) => React.createElement("li", {
|
|
57
57
|
role: "presentation",
|
|
58
58
|
"aria-hidden": "true",
|
|
59
59
|
className: cn('[&>svg]:size-3.5', className),
|
|
60
|
-
...props
|
|
61
|
-
|
|
62
|
-
});
|
|
60
|
+
...props
|
|
61
|
+
}, children ?? React.createElement(ChevronRight, null));
|
|
63
62
|
BreadcrumbSeparator.displayName = 'BreadcrumbSeparator';
|
|
64
63
|
const BreadcrumbEllipsis = ({
|
|
65
64
|
className,
|
|
66
65
|
...props
|
|
67
|
-
}) =>
|
|
66
|
+
}) => React.createElement("span", {
|
|
68
67
|
role: "presentation",
|
|
69
68
|
"aria-hidden": "true",
|
|
70
69
|
className: cn('flex h-9 w-9 items-center justify-center', className),
|
|
71
|
-
...props
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
})]
|
|
78
|
-
});
|
|
70
|
+
...props
|
|
71
|
+
}, React.createElement(MoreHorizontal, {
|
|
72
|
+
className: "h-4 w-4"
|
|
73
|
+
}), React.createElement("span", {
|
|
74
|
+
className: "sr-only"
|
|
75
|
+
}, "More"));
|
|
79
76
|
BreadcrumbEllipsis.displayName = 'BreadcrumbElipssis';export{Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator};//# sourceMappingURL=breadcrumb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.js","sources":["../../src/shardui/breadcrumb.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","sources":["../../src/shardui/breadcrumb.tsx"],"sourcesContent":[null],"names":[],"mappings":"kOAcA,MAAA,UAAM,GAAA,KAAA,CAAA,UAAc,CAAA,CAAA;AAcpB,EAAA,GAAA;AAOA,CAAA,EAAA,GAAA,UAAM,CAAA,aAAc,CAAA,KAAA,EAAA;;;AAYpB,EAAA,GAAA;AAcA,CAAA,CAAA;AAAgE,UAAA,CAAA,WAAA,GAAA,YAAA;;EAI9D,SAAA;AAGF,EAAA,GAAA;AAAqD,CAAA,EAAA,GAAA,KAAA,KAAA,CAAA,aAAA,CAAA,IAAK,EAAC;;EAUzD,SAAA,EAAA,EAAA,CAAA,0FAAA,EAAA,SAAA,CAAA;AAGF,EAAA,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/shardui/button.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
declare const buttonVariants: (props?: {
|
|
4
4
|
variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive";
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon";
|
|
6
|
-
} & import("class-variance-authority/types").ClassProp) => string;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
|
9
9
|
}
|
|
@@ -1 +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;;;
|
|
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;;;sEAwBnB,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"}
|
package/lib/shardui/button.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
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
2
|
variants: {
|
|
3
3
|
variant: {
|
|
4
4
|
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
@@ -28,7 +28,7 @@ const Button = React.forwardRef(({
|
|
|
28
28
|
...props
|
|
29
29
|
}, ref) => {
|
|
30
30
|
const Comp = asChild ? Slot : 'button';
|
|
31
|
-
return
|
|
31
|
+
return React.createElement(Comp, {
|
|
32
32
|
className: cn(buttonVariants({
|
|
33
33
|
variant,
|
|
34
34
|
size,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../src/shardui/button.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../src/shardui/button.tsx"],"sourcesContent":[null],"names":[],"mappings":";;AAgCA,IAAA,OAAM,EAAA;MAGF,OAAQ,EAAE,wDAAQ;AACrB,MAAA,WAAA,EAAA,oEAAA;AAED,MAAA,OAAA,EAAM,gFAAM;AAQZ,MAAA,SAAe,EAAE,8DAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DayPicker } from 'react-day-picker';
|
|
3
3
|
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
4
|
-
declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps):
|
|
4
|
+
declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): React.JSX.Element;
|
|
5
5
|
declare namespace Calendar {
|
|
6
6
|
var displayName: string;
|
|
7
7
|
}
|
|
@@ -1 +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,
|
|
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,qBAyC3F;kBAzCQ,QAAQ;;;AA4CjB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/lib/shardui/calendar.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as React from'react';import {ChevronRight,ChevronLeft}from'lucide-react';import {DayPicker}from'react-day-picker';import'../utils/isBrowser/index.js';import {cn}from'../utils/util.js';import'fast-deep-equal/react.js';import {buttonVariants}from'./button.js';function Calendar({
|
|
2
2
|
className,
|
|
3
3
|
classNames,
|
|
4
4
|
showOutsideDays = true,
|
|
5
5
|
...props
|
|
6
6
|
}) {
|
|
7
|
-
return
|
|
7
|
+
return React.createElement(DayPicker, {
|
|
8
8
|
showOutsideDays: showOutsideDays,
|
|
9
9
|
className: cn('p-3', className),
|
|
10
10
|
classNames: {
|
|
@@ -38,12 +38,12 @@ import {jsx}from'react/jsx-runtime';import {ChevronRight,ChevronLeft}from'lucide
|
|
|
38
38
|
components: {
|
|
39
39
|
IconLeft: ({
|
|
40
40
|
..._props
|
|
41
|
-
}) =>
|
|
41
|
+
}) => React.createElement(ChevronLeft, {
|
|
42
42
|
className: "h-4 w-4"
|
|
43
43
|
}),
|
|
44
44
|
IconRight: ({
|
|
45
45
|
..._props
|
|
46
|
-
}) =>
|
|
46
|
+
}) => React.createElement(ChevronRight, {
|
|
47
47
|
className: "h-4 w-4"
|
|
48
48
|
})
|
|
49
49
|
},
|
package/lib/shardui/card.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
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
2
|
className,
|
|
3
3
|
...props
|
|
4
|
-
}, ref) =>
|
|
4
|
+
}, ref) => React.createElement("div", {
|
|
5
5
|
ref: ref,
|
|
6
6
|
className: cn('rounded-lg border bg-card text-card-foreground shadow-sm', className),
|
|
7
7
|
...props
|
|
@@ -10,7 +10,7 @@ Card.displayName = 'Card';
|
|
|
10
10
|
const CardHeader = React.forwardRef(({
|
|
11
11
|
className,
|
|
12
12
|
...props
|
|
13
|
-
}, ref) =>
|
|
13
|
+
}, ref) => React.createElement("div", {
|
|
14
14
|
ref: ref,
|
|
15
15
|
className: cn('flex flex-col space-y-1.5 p-6', className),
|
|
16
16
|
...props
|
|
@@ -19,7 +19,7 @@ CardHeader.displayName = 'CardHeader';
|
|
|
19
19
|
const CardTitle = React.forwardRef(({
|
|
20
20
|
className,
|
|
21
21
|
...props
|
|
22
|
-
}, ref) =>
|
|
22
|
+
}, ref) => React.createElement("h3", {
|
|
23
23
|
ref: ref,
|
|
24
24
|
className: cn('text-2xl font-semibold leading-none tracking-tight', className),
|
|
25
25
|
...props
|
|
@@ -28,7 +28,7 @@ CardTitle.displayName = 'CardTitle';
|
|
|
28
28
|
const CardDescription = React.forwardRef(({
|
|
29
29
|
className,
|
|
30
30
|
...props
|
|
31
|
-
}, ref) =>
|
|
31
|
+
}, ref) => React.createElement("p", {
|
|
32
32
|
ref: ref,
|
|
33
33
|
className: cn('text-sm text-muted-foreground', className),
|
|
34
34
|
...props
|
|
@@ -37,7 +37,7 @@ CardDescription.displayName = 'CardDescription';
|
|
|
37
37
|
const CardContent = React.forwardRef(({
|
|
38
38
|
className,
|
|
39
39
|
...props
|
|
40
|
-
}, ref) =>
|
|
40
|
+
}, ref) => React.createElement("div", {
|
|
41
41
|
ref: ref,
|
|
42
42
|
className: cn('p-6 pt-0', className),
|
|
43
43
|
...props
|
|
@@ -46,7 +46,7 @@ CardContent.displayName = 'CardContent';
|
|
|
46
46
|
const CardFooter = React.forwardRef(({
|
|
47
47
|
className,
|
|
48
48
|
...props
|
|
49
|
-
}, ref) =>
|
|
49
|
+
}, ref) => React.createElement("div", {
|
|
50
50
|
ref: ref,
|
|
51
51
|
className: cn('flex items-center p-6 pt-0', className),
|
|
52
52
|
...props
|
package/lib/shardui/card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sources":["../../src/shardui/card.tsx"],"sourcesContent":[null],"names":[
|
|
1
|
+
{"version":3,"file":"card.js","sources":["../../src/shardui/card.tsx"],"sourcesContent":[null],"names":[],"mappings":"mIASA,MAAA,IAAA,GAAA,KAAM,CAAA,UAAU,CAAA,CAAA;AAOhB,EAAA,SAAA;AAOA,EAAA,GAAA;AAOA,CAAA,EAAA,GAAA,KAAA,KAAM,CAAA,aAAW,CAAA,KAAA,EAAA;AAKjB,EAAA,GAAA,EAAA,GAAA;AAOA,EAAA,SAAS,EAAI,EAAE,CAAA,0DAAoD,EAAA,SAAc,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/shardui/carousel.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
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
2
|
function useCarousel() {
|
|
3
3
|
const context = React.useContext(CarouselContext);
|
|
4
4
|
if (!context) {
|
|
@@ -60,7 +60,7 @@ const Carousel = React.forwardRef(({
|
|
|
60
60
|
api?.off('select', onSelect);
|
|
61
61
|
};
|
|
62
62
|
}, [api, onSelect]);
|
|
63
|
-
return
|
|
63
|
+
return React.createElement(CarouselContext.Provider, {
|
|
64
64
|
value: {
|
|
65
65
|
carouselRef,
|
|
66
66
|
api: api,
|
|
@@ -70,17 +70,15 @@ const Carousel = React.forwardRef(({
|
|
|
70
70
|
scrollNext,
|
|
71
71
|
canScrollPrev,
|
|
72
72
|
canScrollNext
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
})
|
|
83
|
-
});
|
|
73
|
+
}
|
|
74
|
+
}, React.createElement("div", {
|
|
75
|
+
ref: ref,
|
|
76
|
+
onKeyDownCapture: handleKeyDown,
|
|
77
|
+
className: cn('relative', className),
|
|
78
|
+
role: "region",
|
|
79
|
+
"aria-roledescription": "carousel",
|
|
80
|
+
...props
|
|
81
|
+
}, children));
|
|
84
82
|
});
|
|
85
83
|
Carousel.displayName = 'Carousel';
|
|
86
84
|
const CarouselContent = React.forwardRef(({
|
|
@@ -91,15 +89,14 @@ const CarouselContent = React.forwardRef(({
|
|
|
91
89
|
carouselRef,
|
|
92
90
|
orientation
|
|
93
91
|
} = useCarousel();
|
|
94
|
-
return
|
|
92
|
+
return React.createElement("div", {
|
|
95
93
|
ref: carouselRef,
|
|
96
|
-
className: "overflow-hidden"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
});
|
|
94
|
+
className: "overflow-hidden"
|
|
95
|
+
}, React.createElement("div", {
|
|
96
|
+
ref: ref,
|
|
97
|
+
className: cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className),
|
|
98
|
+
...props
|
|
99
|
+
}));
|
|
103
100
|
});
|
|
104
101
|
CarouselContent.displayName = 'CarouselContent';
|
|
105
102
|
const CarouselItem = React.forwardRef(({
|
|
@@ -109,7 +106,7 @@ const CarouselItem = React.forwardRef(({
|
|
|
109
106
|
const {
|
|
110
107
|
orientation
|
|
111
108
|
} = useCarousel();
|
|
112
|
-
return
|
|
109
|
+
return React.createElement("div", {
|
|
113
110
|
ref: ref,
|
|
114
111
|
role: "group",
|
|
115
112
|
"aria-roledescription": "slide",
|
|
@@ -129,21 +126,19 @@ const CarouselPrevious = React.forwardRef(({
|
|
|
129
126
|
scrollPrev,
|
|
130
127
|
canScrollPrev
|
|
131
128
|
} = useCarousel();
|
|
132
|
-
return
|
|
129
|
+
return React.createElement(Button, {
|
|
133
130
|
ref: ref,
|
|
134
131
|
variant: variant,
|
|
135
132
|
size: size,
|
|
136
133
|
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
134
|
disabled: !canScrollPrev,
|
|
138
135
|
onClick: scrollPrev,
|
|
139
|
-
...props
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
})]
|
|
146
|
-
});
|
|
136
|
+
...props
|
|
137
|
+
}, React.createElement(ArrowLeft, {
|
|
138
|
+
className: "h-4 w-4"
|
|
139
|
+
}), React.createElement("span", {
|
|
140
|
+
className: "sr-only"
|
|
141
|
+
}, "Previous slide"));
|
|
147
142
|
});
|
|
148
143
|
CarouselPrevious.displayName = 'CarouselPrevious';
|
|
149
144
|
const CarouselNext = React.forwardRef(({
|
|
@@ -157,20 +152,18 @@ const CarouselNext = React.forwardRef(({
|
|
|
157
152
|
scrollNext,
|
|
158
153
|
canScrollNext
|
|
159
154
|
} = useCarousel();
|
|
160
|
-
return
|
|
155
|
+
return React.createElement(Button, {
|
|
161
156
|
ref: ref,
|
|
162
157
|
variant: variant,
|
|
163
158
|
size: size,
|
|
164
159
|
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
160
|
disabled: !canScrollNext,
|
|
166
161
|
onClick: scrollNext,
|
|
167
|
-
...props
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
})]
|
|
174
|
-
});
|
|
162
|
+
...props
|
|
163
|
+
}, React.createElement(ArrowRight, {
|
|
164
|
+
className: "h-4 w-4"
|
|
165
|
+
}), React.createElement("span", {
|
|
166
|
+
className: "sr-only"
|
|
167
|
+
}, "Next slide"));
|
|
175
168
|
});
|
|
176
169
|
CarouselNext.displayName = 'CarouselNext';export{Carousel,CarouselContent,CarouselItem,CarouselNext,CarouselPrevious};//# sourceMappingURL=carousel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.js","sources":["../../src/shardui/carousel.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"carousel.js","sources":["../../src/shardui/carousel.tsx"],"sourcesContent":[null],"names":[],"mappings":"uQAUA,qBAAmB,GAAG,KAAA,CAAA,aAAqB,CAAC,IAAG,CAAA;AAE/C,oBAAkB,GAAG;QACb,OAAG,GAAA,KAAA,CAAA,UAAgB,CAAA,eAAA,CAAA;MACvB,CAAA,OAAU,EAAA;AACV,IAAA,MAAA,IAAA,KAAc,CAAA,gDAA0B,CAAA;;EAE1C,OAAA,OAAA;AAuBF;AA6FA,MAAA,QAAM,GAAA,KAAA,CAAA,UAAe,CAAA,CAAA;AAiBrB,EAAA,WAAA,GAAM,YAAY;AAqBlB,EAAA,IAAA;AA4BA,EAAA,MAAA;AA4BA,EAAA,OAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/shardui/chart.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAt
|
|
|
23
23
|
declare const ChartStyle: ({ id, config }: {
|
|
24
24
|
id: string;
|
|
25
25
|
config: ChartConfig;
|
|
26
|
-
}) =>
|
|
26
|
+
}) => React.JSX.Element;
|
|
27
27
|
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
28
28
|
declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<RechartsPrimitive.DefaultTooltipContentProps<import("recharts/types/component/DefaultTooltipContent").ValueType, import("recharts/types/component/DefaultTooltipContent").NameType> & {
|
|
29
29
|
accessibilityLayer?: boolean;
|
|
@@ -1 +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,
|
|
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,sBA2BtE,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"}
|
package/lib/shardui/chart.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as React from'react';import*as RechartsPrimitive from'recharts';import'../utils/isBrowser/index.js';import {cn}from'../utils/util.js';import'fast-deep-equal/react.js';// Format: { THEME_NAME: CSS_SELECTOR }
|
|
2
2
|
const THEMES = {
|
|
3
3
|
light: '',
|
|
4
4
|
dark: '.dark'
|
|
@@ -20,23 +20,19 @@ const ChartContainer = React.forwardRef(({
|
|
|
20
20
|
}, ref) => {
|
|
21
21
|
const uniqueId = React.useId();
|
|
22
22
|
const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;
|
|
23
|
-
return
|
|
23
|
+
return React.createElement(ChartContext.Provider, {
|
|
24
24
|
value: {
|
|
25
25
|
config
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
children: children
|
|
37
|
-
})]
|
|
38
|
-
})
|
|
39
|
-
});
|
|
26
|
+
}
|
|
27
|
+
}, React.createElement("div", {
|
|
28
|
+
"data-chart": chartId,
|
|
29
|
+
ref: ref,
|
|
30
|
+
className: cn("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none", className),
|
|
31
|
+
...props
|
|
32
|
+
}, React.createElement(ChartStyle, {
|
|
33
|
+
id: chartId,
|
|
34
|
+
config: config
|
|
35
|
+
}), React.createElement(RechartsPrimitive.ResponsiveContainer, null, children)));
|
|
40
36
|
});
|
|
41
37
|
ChartContainer.displayName = 'Chart';
|
|
42
38
|
const ChartStyle = ({
|
|
@@ -47,7 +43,7 @@ const ChartStyle = ({
|
|
|
47
43
|
if (!colorConfig.length) {
|
|
48
44
|
return null;
|
|
49
45
|
}
|
|
50
|
-
return
|
|
46
|
+
return React.createElement("style", {
|
|
51
47
|
dangerouslySetInnerHTML: {
|
|
52
48
|
__html: Object.entries(THEMES).map(([theme, prefix]) => `
|
|
53
49
|
${prefix} [data-chart=${id}] {
|
|
@@ -88,64 +84,54 @@ const ChartTooltipContent = React.forwardRef(({
|
|
|
88
84
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
89
85
|
const value = !labelKey && typeof label === 'string' ? config[label]?.label || label : itemConfig?.label;
|
|
90
86
|
if (labelFormatter) {
|
|
91
|
-
return
|
|
92
|
-
className: cn('font-medium', labelClassName)
|
|
93
|
-
|
|
94
|
-
});
|
|
87
|
+
return React.createElement("div", {
|
|
88
|
+
className: cn('font-medium', labelClassName)
|
|
89
|
+
}, labelFormatter(value, payload));
|
|
95
90
|
}
|
|
96
91
|
if (!value) {
|
|
97
92
|
return null;
|
|
98
93
|
}
|
|
99
|
-
return
|
|
100
|
-
className: cn('font-medium', labelClassName)
|
|
101
|
-
|
|
102
|
-
});
|
|
94
|
+
return React.createElement("div", {
|
|
95
|
+
className: cn('font-medium', labelClassName)
|
|
96
|
+
}, value);
|
|
103
97
|
}, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
|
|
104
98
|
if (!active || !payload?.length) {
|
|
105
99
|
return null;
|
|
106
100
|
}
|
|
107
101
|
const nestLabel = payload.length === 1 && indicator !== 'dot';
|
|
108
|
-
return
|
|
102
|
+
return React.createElement("div", {
|
|
109
103
|
ref: ref,
|
|
110
|
-
className: cn('grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl', className)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
children: item.value.toLocaleString()
|
|
142
|
-
})]
|
|
143
|
-
})]
|
|
144
|
-
})
|
|
145
|
-
}, item.dataKey);
|
|
146
|
-
})
|
|
147
|
-
})]
|
|
148
|
-
});
|
|
104
|
+
className: cn('grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl', className)
|
|
105
|
+
}, !nestLabel ? tooltipLabel : null, React.createElement("div", {
|
|
106
|
+
className: "grid gap-1.5"
|
|
107
|
+
}, payload.map((item, index) => {
|
|
108
|
+
const key = `${nameKey || item.name || item.dataKey || 'value'}`;
|
|
109
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
110
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
111
|
+
return React.createElement("div", {
|
|
112
|
+
key: item.dataKey,
|
|
113
|
+
className: cn('flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground', indicator === 'dot' && 'items-center')
|
|
114
|
+
}, formatter && item?.value !== undefined && item.name ? formatter(item.value, item.name, item, index, item.payload) : React.createElement(React.Fragment, null, itemConfig?.icon ? React.createElement(itemConfig.icon, null) : !hideIndicator && React.createElement("div", {
|
|
115
|
+
className: cn('shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]', {
|
|
116
|
+
'h-2.5 w-2.5': indicator === 'dot',
|
|
117
|
+
'w-1': indicator === 'line',
|
|
118
|
+
'w-0 border-[1.5px] border-dashed bg-transparent': indicator === 'dashed',
|
|
119
|
+
'my-0.5': nestLabel && indicator === 'dashed'
|
|
120
|
+
}),
|
|
121
|
+
style: {
|
|
122
|
+
'--color-bg': indicatorColor,
|
|
123
|
+
'--color-border': indicatorColor
|
|
124
|
+
}
|
|
125
|
+
}), React.createElement("div", {
|
|
126
|
+
className: cn('flex flex-1 justify-between leading-none', nestLabel ? 'items-end' : 'items-center')
|
|
127
|
+
}, React.createElement("div", {
|
|
128
|
+
className: "grid gap-1.5"
|
|
129
|
+
}, nestLabel ? tooltipLabel : null, React.createElement("span", {
|
|
130
|
+
className: "text-muted-foreground"
|
|
131
|
+
}, itemConfig?.label || item.name)), item.value && React.createElement("span", {
|
|
132
|
+
className: "font-mono font-medium tabular-nums text-foreground"
|
|
133
|
+
}, item.value.toLocaleString()))));
|
|
134
|
+
})));
|
|
149
135
|
});
|
|
150
136
|
ChartTooltipContent.displayName = 'ChartTooltip';
|
|
151
137
|
const ChartLegend = RechartsPrimitive.Legend;
|
|
@@ -162,23 +148,22 @@ const ChartLegendContent = React.forwardRef(({
|
|
|
162
148
|
if (!payload?.length) {
|
|
163
149
|
return null;
|
|
164
150
|
}
|
|
165
|
-
return
|
|
151
|
+
return React.createElement("div", {
|
|
166
152
|
ref: ref,
|
|
167
|
-
className: cn('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className)
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
});
|
|
153
|
+
className: cn('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className)
|
|
154
|
+
}, payload.map(item => {
|
|
155
|
+
const key = `${nameKey || item.dataKey || 'value'}`;
|
|
156
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
157
|
+
return React.createElement("div", {
|
|
158
|
+
key: item.value,
|
|
159
|
+
className: cn('flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground')
|
|
160
|
+
}, itemConfig?.icon && !hideIcon ? React.createElement(itemConfig.icon, null) : React.createElement("div", {
|
|
161
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
162
|
+
style: {
|
|
163
|
+
backgroundColor: item.color
|
|
164
|
+
}
|
|
165
|
+
}), itemConfig?.label);
|
|
166
|
+
}));
|
|
182
167
|
});
|
|
183
168
|
ChartLegendContent.displayName = 'ChartLegend';
|
|
184
169
|
// Helper to extract item config from a payload.
|
package/lib/shardui/chart.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.js","sources":["../../src/shardui/chart.tsx"],"sourcesContent":[null],"names":[
|
|
1
|
+
{"version":3,"file":"chart.js","sources":["../../src/shardui/chart.tsx"],"sourcesContent":[null],"names":[],"mappings":";;EAMqD,KAAA,EAAA,EAAA;AAErD,EAAA,IAAM,EAAA;;AAEE,MAAA,YAAQ,GAAK,mBAAW,CAAA,IAAA,CAAA;AACxB,SAAA,QAAO,GAAK;AACf,EAAA,MAAG,OAAC,GAAA,KAAA,CAAA,UAAA,CAAA,YAAA,CAAA;cAAQ,EAAE;UAAQ,IAAM,KAAE,CAAA,mDAAK,CAAA;;SAAO,OAAQ;;AAAmD,MAAC,cAAA,GAAA,KAAA,CAAA,UAAA,CAAA,CAAA;EACzG,EAAA;AAkBF,EAAA;;;;AA6BA,CAAA,EAAA,GAAA,KAAA;QAA0C,QAAO,GAAA,KAAA,CAAA,KAAA,EAAA;QAAC,iBAAmB,EAAA,EAAA,IAAA,QAAA,CAAA,OAAA,CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,CAAA;AAAE,EAAA,OAAA,KAAA,CAAA,aA2BrE,CAAA,YAAA,CAAA,QAAA,EAAA;AAEF,IAAA,KAAA,EAAA;AAEA,MAAA;;;;;;;;;;;;;;;;;;;;;;;oBAIwB,CAAA,OAAO,CAAA,MAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAAA,MAAA,CAAA,KAAA;sBACH,EAAA,EAAA,CAAO;iBACX,CAAA,CAAA,CAAA,GAAM,EAAG,UAAQ,CAAA,KAAQ;cAC3B,KAAA,GAAM,UAAA,CAAA,KAAA,GAAA,KAAA,CAAA,IAAA,UAAA,CAAA,KAAA;eACL,KAAA,GAAM,CAAA,UAAA,EAAA,GAAA,CAAA,EAAA,EAAA,KAAA,CAAA,CAAA,CAAA,GAAA,IAAA;;AAsI7B;AAEA,CAAA,CAAA,CAAA,IAAA,CAAA;;;;AA+EA,MAAA,YAAS,GAAA,iBAA4B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/shardui/checkbox.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as React from'react';import*as CheckboxPrimitive from'@radix-ui/react-checkbox';import {Check}from'lucide-react';import'../utils/isBrowser/index.js';import {cn}from'../utils/util.js';import'fast-deep-equal/react.js';const Checkbox = React.forwardRef(({
|
|
2
2
|
className,
|
|
3
3
|
...props
|
|
4
|
-
}, ref) =>
|
|
4
|
+
}, ref) => React.createElement(CheckboxPrimitive.Root, {
|
|
5
5
|
ref: ref,
|
|
6
6
|
className: cn('peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground', className),
|
|
7
|
-
...props
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
14
|
-
}));
|
|
7
|
+
...props
|
|
8
|
+
}, React.createElement(CheckboxPrimitive.Indicator, {
|
|
9
|
+
className: cn('flex items-center justify-center text-current')
|
|
10
|
+
}, React.createElement(Check, {
|
|
11
|
+
className: "h-4 w-4"
|
|
12
|
+
}))));
|
|
15
13
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;export{Checkbox};//# sourceMappingURL=checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkbox.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|