@inspirare/design-system 0.0.23 → 0.0.24
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/README.md +82 -61
- package/dist/book-logo-filled.svg +55 -0
- package/dist/components/ui/accessibility-improvements.js +26 -23
- package/dist/components/ui/accordion.js +34 -24
- package/dist/components/ui/alert-dialog.js +91 -57
- package/dist/components/ui/alert.js +38 -26
- package/dist/components/ui/aspect-ratio.js +11 -3
- package/dist/components/ui/avatar.js +30 -8
- package/dist/components/ui/badge.js +20 -14
- package/dist/components/ui/breadcrumb.js +69 -56
- package/dist/components/ui/button-group.js +17 -13
- package/dist/components/ui/button.js +19 -15
- package/dist/components/ui/calendar.js +63 -59
- package/dist/components/ui/card.js +11 -9
- package/dist/components/ui/carousel.js +70 -75
- package/dist/components/ui/chart.js +75 -72
- package/dist/components/ui/checkbox.js +4 -5
- package/dist/components/ui/collapsible.js +12 -14
- package/dist/components/ui/color-picker.js +60 -80
- package/dist/components/ui/combobox.js +153 -33
- package/dist/components/ui/command.js +50 -48
- package/dist/components/ui/context-menu.js +129 -68
- package/dist/components/ui/dialog.js +65 -60
- package/dist/components/ui/drawer.js +81 -40
- package/dist/components/ui/dropdown-menu.js +100 -87
- package/dist/components/ui/empty.js +7 -6
- package/dist/components/ui/field.js +44 -47
- package/dist/components/ui/form.js +22 -23
- package/dist/components/ui/hover-card.js +14 -11
- package/dist/components/ui/input-group.js +16 -13
- package/dist/components/ui/input-otp.js +37 -32
- package/dist/components/ui/input.js +9 -7
- package/dist/components/ui/item.js +42 -36
- package/dist/components/ui/kbd.js +2 -1
- package/dist/components/ui/label.js +6 -7
- package/dist/components/ui/menubar.js +124 -93
- package/dist/components/ui/navigation-menu.js +79 -54
- package/dist/components/ui/pagination.js +78 -58
- package/dist/components/ui/popover.js +35 -16
- package/dist/components/ui/progress.js +37 -13
- package/dist/components/ui/radio-group.js +14 -14
- package/dist/components/ui/resizable.js +24 -15
- package/dist/components/ui/scroll-area.js +29 -11
- package/dist/components/ui/select.js +98 -56
- package/dist/components/ui/separator.js +5 -7
- package/dist/components/ui/sheet.js +47 -42
- package/dist/components/ui/sidebar.js +279 -248
- package/dist/components/ui/skeleton.js +4 -40
- package/dist/components/ui/slider.js +27 -29
- package/dist/components/ui/sonner.js +27 -10
- package/dist/components/ui/spinner.js +2 -0
- package/dist/components/ui/switch.js +3 -4
- package/dist/components/ui/table.js +6 -6
- package/dist/components/ui/tabs.js +45 -22
- package/dist/components/ui/textarea.js +3 -2
- package/dist/components/ui/theme-toggle.js +38 -41
- package/dist/components/ui/toggle-group.js +30 -21
- package/dist/components/ui/toggle.js +8 -9
- package/dist/components/ui/tooltip.js +28 -23
- package/dist/index.css +1 -1
- package/dist/index.d.ts +446 -468
- package/dist/index.js +58 -58
- package/package.json +38 -37
- package/src/App.tsx +28 -34
- package/src/components/branding/assets/book-logo-filled.svg +55 -0
- package/src/components/branding/logo/logo.tsx +56 -0
- package/src/components/ui/accessibility-improvements.stories.tsx +18 -0
- package/src/components/ui/accessibility-improvements.test.tsx +13 -0
- package/src/components/ui/accessibility-improvements.tsx +16 -6
- package/src/components/ui/accordion.stories.tsx +19 -0
- package/src/components/ui/accordion.test.tsx +14 -0
- package/src/components/ui/accordion.tsx +28 -20
- package/src/components/ui/alert-dialog.stories.tsx +19 -0
- package/src/components/ui/alert-dialog.test.tsx +14 -0
- package/src/components/ui/alert-dialog.tsx +159 -123
- package/src/components/ui/alert.stories.tsx +19 -0
- package/src/components/ui/alert.test.tsx +14 -0
- package/src/components/ui/alert.tsx +60 -41
- package/src/components/ui/aspect-ratio.stories.tsx +19 -0
- package/src/components/ui/aspect-ratio.test.tsx +14 -0
- package/src/components/ui/aspect-ratio.tsx +19 -2
- package/src/components/ui/attachment.stories.tsx +19 -0
- package/src/components/ui/attachment.test.tsx +14 -0
- package/src/components/ui/attachment.tsx +209 -0
- package/src/components/ui/avatar.stories.tsx +19 -0
- package/src/components/ui/avatar.test.tsx +14 -0
- package/src/components/ui/avatar.tsx +73 -17
- package/src/components/ui/badge.stories.tsx +19 -0
- package/src/components/ui/badge.test.tsx +14 -0
- package/src/components/ui/badge.tsx +33 -25
- package/src/components/ui/breadcrumb.stories.tsx +19 -0
- package/src/components/ui/breadcrumb.test.tsx +14 -0
- package/src/components/ui/breadcrumb.tsx +98 -86
- package/src/components/ui/bubble.stories.tsx +19 -0
- package/src/components/ui/bubble.test.tsx +14 -0
- package/src/components/ui/bubble.tsx +130 -0
- package/src/components/ui/button-group.stories.tsx +19 -0
- package/src/components/ui/button-group.test.tsx +14 -0
- package/src/components/ui/button-group.tsx +26 -20
- package/src/components/ui/button.stories.tsx +19 -0
- package/src/components/ui/button.test.tsx +14 -0
- package/src/components/ui/button.tsx +30 -31
- package/src/components/ui/calendar.stories.tsx +19 -0
- package/src/components/ui/calendar.test.tsx +14 -0
- package/src/components/ui/calendar.tsx +28 -26
- package/src/components/ui/card.stories.tsx +19 -0
- package/src/components/ui/card.test.tsx +14 -0
- package/src/components/ui/card.tsx +30 -17
- package/src/components/ui/carousel.stories.tsx +19 -0
- package/src/components/ui/carousel.test.tsx +14 -0
- package/src/components/ui/carousel.tsx +115 -135
- package/src/components/ui/chart.stories.tsx +18 -0
- package/src/components/ui/chart.test.tsx +13 -0
- package/src/components/ui/chart.tsx +220 -216
- package/src/components/ui/checkbox.stories.tsx +19 -0
- package/src/components/ui/checkbox.test.tsx +14 -0
- package/src/components/ui/checkbox.tsx +7 -10
- package/src/components/ui/collapsible.stories.tsx +19 -0
- package/src/components/ui/collapsible.test.tsx +14 -0
- package/src/components/ui/collapsible.tsx +11 -26
- package/src/components/ui/color-picker.stories.tsx +19 -0
- package/src/components/ui/color-picker.test.tsx +14 -0
- package/src/components/ui/color-picker.tsx +36 -26
- package/src/components/ui/combobox.stories.tsx +19 -0
- package/src/components/ui/combobox.test.tsx +14 -0
- package/src/components/ui/combobox.tsx +281 -96
- package/src/components/ui/command.stories.tsx +19 -0
- package/src/components/ui/command.test.tsx +14 -0
- package/src/components/ui/command.tsx +59 -47
- package/src/components/ui/context-menu.stories.tsx +19 -0
- package/src/components/ui/context-menu.test.tsx +14 -0
- package/src/components/ui/context-menu.tsx +231 -160
- package/src/components/ui/dialog.stories.tsx +19 -0
- package/src/components/ui/dialog.test.tsx +14 -0
- package/src/components/ui/dialog.tsx +81 -72
- package/src/components/ui/direction.stories.tsx +19 -0
- package/src/components/ui/direction.test.tsx +14 -0
- package/src/components/ui/direction.tsx +6 -0
- package/src/components/ui/drawer.stories.tsx +19 -0
- package/src/components/ui/drawer.test.tsx +14 -0
- package/src/components/ui/drawer.tsx +143 -64
- package/src/components/ui/dropdown-menu.stories.tsx +19 -0
- package/src/components/ui/dropdown-menu.test.tsx +14 -0
- package/src/components/ui/dropdown-menu.tsx +199 -153
- package/src/components/ui/empty.stories.tsx +18 -0
- package/src/components/ui/empty.test.tsx +13 -0
- package/src/components/ui/empty.tsx +11 -9
- package/src/components/ui/field.stories.tsx +18 -0
- package/src/components/ui/field.test.tsx +13 -0
- package/src/components/ui/field.tsx +26 -32
- package/src/components/ui/form.stories.tsx +22 -0
- package/src/components/ui/form.test.tsx +15 -0
- package/src/components/ui/form.tsx +1 -2
- package/src/components/ui/hover-card.stories.tsx +19 -0
- package/src/components/ui/hover-card.test.tsx +14 -0
- package/src/components/ui/hover-card.tsx +34 -32
- package/src/components/ui/input-group.stories.tsx +18 -0
- package/src/components/ui/input-group.test.tsx +13 -0
- package/src/components/ui/input-group.tsx +21 -28
- package/src/components/ui/input-otp.stories.tsx +19 -0
- package/src/components/ui/input-otp.test.tsx +14 -0
- package/src/components/ui/input-otp.tsx +58 -42
- package/src/components/ui/input.stories.tsx +19 -0
- package/src/components/ui/input.test.tsx +14 -0
- package/src/components/ui/input.tsx +9 -8
- package/src/components/ui/item.stories.tsx +18 -0
- package/src/components/ui/item.test.tsx +13 -0
- package/src/components/ui/item.tsx +38 -28
- package/src/components/ui/kbd.stories.tsx +18 -0
- package/src/components/ui/kbd.test.tsx +13 -0
- package/src/components/ui/kbd.tsx +3 -3
- package/src/components/ui/label.stories.tsx +18 -0
- package/src/components/ui/label.test.tsx +13 -0
- package/src/components/ui/label.tsx +7 -11
- package/src/components/ui/marker.stories.tsx +19 -0
- package/src/components/ui/marker.test.tsx +14 -0
- package/src/components/ui/marker.tsx +73 -0
- package/src/components/ui/menubar.stories.tsx +19 -0
- package/src/components/ui/menubar.test.tsx +14 -0
- package/src/components/ui/menubar.tsx +226 -202
- package/src/components/ui/message-scroller.stories.tsx +19 -0
- package/src/components/ui/message-scroller.test.tsx +14 -0
- package/src/components/ui/message-scroller.tsx +131 -0
- package/src/components/ui/message.stories.tsx +19 -0
- package/src/components/ui/message.test.tsx +14 -0
- package/src/components/ui/message.tsx +94 -0
- package/src/components/ui/native-select.stories.tsx +18 -0
- package/src/components/ui/native-select.test.tsx +13 -0
- package/src/components/ui/native-select.tsx +63 -0
- package/src/components/ui/navigation-menu.stories.tsx +19 -0
- package/src/components/ui/navigation-menu.test.tsx +14 -0
- package/src/components/ui/navigation-menu.tsx +145 -103
- package/src/components/ui/pagination.stories.tsx +19 -0
- package/src/components/ui/pagination.test.tsx +14 -0
- package/src/components/ui/pagination.tsx +114 -83
- package/src/components/ui/popover.stories.tsx +19 -0
- package/src/components/ui/popover.test.tsx +14 -0
- package/src/components/ui/popover.tsx +68 -33
- package/src/components/ui/progress.stories.tsx +19 -0
- package/src/components/ui/progress.test.tsx +14 -0
- package/src/components/ui/progress.tsx +67 -15
- package/src/components/ui/questionnaire.stories.tsx +19 -0
- package/src/components/ui/questionnaire.test.tsx +14 -0
- package/src/components/ui/questionnaire.tsx +324 -0
- package/src/components/ui/radio-group.stories.tsx +19 -0
- package/src/components/ui/radio-group.test.tsx +14 -0
- package/src/components/ui/radio-group.tsx +15 -20
- package/src/components/ui/resizable.stories.tsx +19 -0
- package/src/components/ui/resizable.test.tsx +14 -0
- package/src/components/ui/resizable.tsx +37 -30
- package/src/components/ui/scroll-area.stories.tsx +19 -0
- package/src/components/ui/scroll-area.test.tsx +14 -0
- package/src/components/ui/scroll-area.tsx +41 -19
- package/src/components/ui/select.stories.tsx +19 -0
- package/src/components/ui/select.test.tsx +14 -0
- package/src/components/ui/select.tsx +145 -78
- package/src/components/ui/separator.stories.tsx +19 -0
- package/src/components/ui/separator.test.tsx +14 -0
- package/src/components/ui/separator.tsx +8 -11
- package/src/components/ui/sheet.stories.tsx +19 -0
- package/src/components/ui/sheet.test.tsx +14 -0
- package/src/components/ui/sheet.tsx +56 -71
- package/src/components/ui/sidebar.stories.tsx +18 -0
- package/src/components/ui/sidebar.test.tsx +13 -0
- package/src/components/ui/sidebar.tsx +469 -513
- package/src/components/ui/skeleton.stories.tsx +19 -0
- package/src/components/ui/skeleton.test.tsx +14 -0
- package/src/components/ui/skeleton.tsx +8 -114
- package/src/components/ui/slider.stories.tsx +19 -0
- package/src/components/ui/slider.test.tsx +14 -0
- package/src/components/ui/slider.tsx +31 -40
- package/src/components/ui/sonner.stories.tsx +19 -0
- package/src/components/ui/sonner.test.tsx +14 -0
- package/src/components/ui/sonner.tsx +39 -7
- package/src/components/ui/spinner.stories.tsx +18 -0
- package/src/components/ui/spinner.test.tsx +13 -0
- package/src/components/ui/spinner.tsx +3 -7
- package/src/components/ui/switch.stories.tsx +19 -0
- package/src/components/ui/switch.test.tsx +14 -0
- package/src/components/ui/switch.tsx +4 -7
- package/src/components/ui/table.stories.tsx +19 -0
- package/src/components/ui/table.test.tsx +14 -0
- package/src/components/ui/table.tsx +17 -17
- package/src/components/ui/tabs.stories.tsx +19 -0
- package/src/components/ui/tabs.test.tsx +14 -0
- package/src/components/ui/tabs.tsx +71 -31
- package/src/components/ui/textarea.stories.tsx +19 -0
- package/src/components/ui/textarea.test.tsx +14 -0
- package/src/components/ui/textarea.tsx +7 -5
- package/src/components/ui/theme-toggle.stories.tsx +18 -0
- package/src/components/ui/theme-toggle.test.tsx +13 -0
- package/src/components/ui/theme-toggle.tsx +35 -37
- package/src/components/ui/toggle-group.stories.tsx +19 -0
- package/src/components/ui/toggle-group.test.tsx +14 -0
- package/src/components/ui/toggle-group.tsx +41 -25
- package/src/components/ui/toggle.stories.tsx +19 -0
- package/src/components/ui/toggle.test.tsx +14 -0
- package/src/components/ui/toggle.tsx +17 -19
- package/src/components/ui/tooltip.stories.tsx +19 -0
- package/src/components/ui/tooltip.test.tsx +14 -0
- package/src/components/ui/tooltip.tsx +53 -44
- package/src/demo/AIDemo.tsx +50 -0
- package/src/demo/ButtonsDemo.tsx +41 -18
- package/src/demo/CalendarDemo.tsx +1 -1
- package/src/demo/FeedbackDemo.tsx +4 -6
- package/src/demo/FormsDemo.tsx +34 -11
- package/src/demo/NavigationDemo.tsx +38 -13
- package/src/demo/OverlaysDemo.tsx +22 -36
- package/src/demo/update-demos.js +82 -0
- package/src/index.css +66 -46
- package/src/lib/utils.ts +3 -3
- package/src/stories/Button.stories.ts +54 -0
- package/src/stories/Button.tsx +36 -0
- package/src/stories/Configure.mdx +388 -0
- package/src/stories/Header.stories.ts +34 -0
- package/src/stories/Header.tsx +55 -0
- package/src/stories/Page.stories.ts +33 -0
- package/src/stories/Page.tsx +73 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +68 -0
|
@@ -1,49 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn as e } from "../../lib/utils.js";
|
|
2
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/ui/skeleton.tsx
|
|
4
5
|
function n({ className: n, ...r }) {
|
|
5
6
|
return /* @__PURE__ */ t("div", {
|
|
6
|
-
|
|
7
|
+
"data-slot": "skeleton",
|
|
8
|
+
className: e("animate-pulse rounded-md bg-muted", n),
|
|
7
9
|
...r
|
|
8
10
|
});
|
|
9
11
|
}
|
|
10
|
-
function r({ className: r, variant: i = "default", ...a }) {
|
|
11
|
-
return /* @__PURE__ */ t(n, {
|
|
12
|
-
className: e({
|
|
13
|
-
default: "h-4",
|
|
14
|
-
title: "h-6",
|
|
15
|
-
subtitle: "h-5",
|
|
16
|
-
caption: "h-3"
|
|
17
|
-
}[i], "bg-gradient-to-r from-muted via-primary/10 to-muted", r),
|
|
18
|
-
...a
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
function i({ className: r, size: i = "default", ...a }) {
|
|
22
|
-
return /* @__PURE__ */ t(n, {
|
|
23
|
-
className: e("rounded-full", {
|
|
24
|
-
sm: "h-6 w-6",
|
|
25
|
-
default: "h-8 w-8",
|
|
26
|
-
lg: "h-12 w-12"
|
|
27
|
-
}[i], "bg-gradient-to-br from-primary/20 via-muted to-primary/10", r),
|
|
28
|
-
...a
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function a({ className: r, variant: i = "default", ...a }) {
|
|
32
|
-
return /* @__PURE__ */ t(n, {
|
|
33
|
-
className: e("rounded-md", {
|
|
34
|
-
sm: "h-7 w-16",
|
|
35
|
-
default: "h-9 w-20",
|
|
36
|
-
lg: "h-11 w-24"
|
|
37
|
-
}[i], "bg-gradient-to-r from-primary/10 via-muted to-primary/5", r),
|
|
38
|
-
...a
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function o({ className: n, children: r, ...i }) {
|
|
42
|
-
return /* @__PURE__ */ t("div", {
|
|
43
|
-
className: e("rounded-lg border border-border/50 p-4 space-y-3", "bg-gradient-to-br from-background via-background/95 to-primary/5", "shadow-sm", n),
|
|
44
|
-
...i,
|
|
45
|
-
children: r
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
12
|
//#endregion
|
|
49
|
-
export { n as Skeleton
|
|
13
|
+
export { n as Skeleton };
|
|
@@ -1,36 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import * as i from "@radix-ui/react-slider";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { Slider as r } from "@base-ui/react/slider";
|
|
6
5
|
//#region src/components/ui/slider.tsx
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
c,
|
|
12
|
-
l
|
|
13
|
-
]);
|
|
14
|
-
return /* @__PURE__ */ r(i.Root, {
|
|
6
|
+
function i({ className: i, defaultValue: a, value: o, min: s = 0, max: c = 100, ...l }) {
|
|
7
|
+
let u = Array.isArray(o) ? o : Array.isArray(a) ? a : [s, c];
|
|
8
|
+
return /* @__PURE__ */ t(r.Root, {
|
|
9
|
+
className: e("data-horizontal:w-full data-vertical:h-full", i),
|
|
15
10
|
"data-slot": "slider",
|
|
16
|
-
defaultValue:
|
|
17
|
-
value:
|
|
18
|
-
min:
|
|
19
|
-
max:
|
|
20
|
-
|
|
21
|
-
...
|
|
22
|
-
children:
|
|
23
|
-
"data-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"data-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
11
|
+
defaultValue: a,
|
|
12
|
+
value: o,
|
|
13
|
+
min: s,
|
|
14
|
+
max: c,
|
|
15
|
+
thumbAlignment: "edge",
|
|
16
|
+
...l,
|
|
17
|
+
children: /* @__PURE__ */ n(r.Control, {
|
|
18
|
+
className: "relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",
|
|
19
|
+
children: [/* @__PURE__ */ t(r.Track, {
|
|
20
|
+
"data-slot": "slider-track",
|
|
21
|
+
className: "relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
|
|
22
|
+
children: /* @__PURE__ */ t(r.Indicator, {
|
|
23
|
+
"data-slot": "slider-range",
|
|
24
|
+
className: "bg-primary select-none data-horizontal:h-full data-vertical:w-full"
|
|
25
|
+
})
|
|
26
|
+
}), Array.from({ length: u.length }, (e, n) => /* @__PURE__ */ t(r.Thumb, {
|
|
27
|
+
"data-slot": "slider-thumb",
|
|
28
|
+
className: "relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50"
|
|
29
|
+
}, n))]
|
|
30
|
+
})
|
|
33
31
|
});
|
|
34
32
|
}
|
|
35
33
|
//#endregion
|
|
36
|
-
export {
|
|
34
|
+
export { i as Slider };
|
|
@@ -1,20 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { CircleCheckIcon as e, InfoIcon as t, Loader2Icon as n, OctagonXIcon as r, TriangleAlertIcon as i } from "lucide-react";
|
|
3
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
4
|
+
import { useTheme as o } from "next-themes";
|
|
5
|
+
import { Toaster as s, toast as c } from "sonner";
|
|
5
6
|
//#region src/components/ui/sonner.tsx
|
|
6
|
-
var
|
|
7
|
-
let { theme:
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
theme:
|
|
7
|
+
var l = ({ ...c }) => {
|
|
8
|
+
let { theme: l = "system" } = o();
|
|
9
|
+
return /* @__PURE__ */ a(s, {
|
|
10
|
+
theme: l,
|
|
10
11
|
className: "toaster group",
|
|
12
|
+
icons: {
|
|
13
|
+
success: /* @__PURE__ */ a(e, { className: "size-4" }),
|
|
14
|
+
info: /* @__PURE__ */ a(t, { className: "size-4" }),
|
|
15
|
+
warning: /* @__PURE__ */ a(i, { className: "size-4" }),
|
|
16
|
+
error: /* @__PURE__ */ a(r, { className: "size-4" }),
|
|
17
|
+
loading: /* @__PURE__ */ a(n, { className: "size-4 animate-spin" })
|
|
18
|
+
},
|
|
11
19
|
style: {
|
|
12
20
|
"--normal-bg": "var(--popover)",
|
|
13
21
|
"--normal-text": "var(--popover-foreground)",
|
|
14
|
-
"--normal-border": "var(--border)"
|
|
22
|
+
"--normal-border": "var(--border)",
|
|
23
|
+
"--border-radius": "var(--radius)"
|
|
15
24
|
},
|
|
16
|
-
|
|
25
|
+
toastOptions: { classNames: {
|
|
26
|
+
toast: "group toast group-[.toaster]:bg-card group-[.toaster]:text-card-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
27
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
28
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
29
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
|
30
|
+
success: "group-[.toaster]:border-primary/30 group-[.toaster]:bg-primary/5 group-[.toaster]:text-foreground",
|
|
31
|
+
error: "group-[.toaster]:border-destructive/30 group-[.toaster]:bg-destructive/5 group-[.toaster]:text-destructive"
|
|
32
|
+
} },
|
|
33
|
+
...c
|
|
17
34
|
});
|
|
18
35
|
};
|
|
19
36
|
//#endregion
|
|
20
|
-
export {
|
|
37
|
+
export { l as Toaster, c as toast };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn as e } from "../../lib/utils.js";
|
|
2
3
|
import { Loader2Icon as t } from "lucide-react";
|
|
3
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/ui/spinner.tsx
|
|
5
6
|
function r({ className: r, ...i }) {
|
|
6
7
|
return /* @__PURE__ */ n(t, {
|
|
8
|
+
"data-slot": "spinner",
|
|
7
9
|
role: "status",
|
|
8
10
|
"aria-label": "Loading",
|
|
9
11
|
className: e("size-4 animate-spin", r),
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import "react";
|
|
4
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
-
import { Switch as n } from "
|
|
4
|
+
import { Switch as n } from "@base-ui/react/switch";
|
|
6
5
|
//#region src/components/ui/switch.tsx
|
|
7
6
|
function r({ className: r, size: i = "default", ...a }) {
|
|
8
7
|
return /* @__PURE__ */ t(n.Root, {
|
|
9
8
|
"data-slot": "switch",
|
|
10
9
|
"data-size": i,
|
|
11
|
-
className: e("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent
|
|
10
|
+
className: e("peer group/switch relative inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", r),
|
|
12
11
|
...a,
|
|
13
12
|
children: /* @__PURE__ */ t(n.Thumb, {
|
|
14
13
|
"data-slot": "switch-thumb",
|
|
15
|
-
className:
|
|
14
|
+
className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
16
15
|
})
|
|
17
16
|
});
|
|
18
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import "react";
|
|
4
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import "react";
|
|
5
5
|
//#region src/components/ui/table.tsx
|
|
6
6
|
function n({ className: n, ...r }) {
|
|
7
7
|
return /* @__PURE__ */ t("div", {
|
|
@@ -31,35 +31,35 @@ function i({ className: n, ...r }) {
|
|
|
31
31
|
function a({ className: n, ...r }) {
|
|
32
32
|
return /* @__PURE__ */ t("tfoot", {
|
|
33
33
|
"data-slot": "table-footer",
|
|
34
|
-
className: e("bg-muted/50
|
|
34
|
+
className: e("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", n),
|
|
35
35
|
...r
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
function o({ className: n, ...r }) {
|
|
39
39
|
return /* @__PURE__ */ t("tr", {
|
|
40
40
|
"data-slot": "table-row",
|
|
41
|
-
className: e("hover:bg-muted/50 data-[state=selected]:bg-muted
|
|
41
|
+
className: e("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", n),
|
|
42
42
|
...r
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
function s({ className: n, ...r }) {
|
|
46
46
|
return /* @__PURE__ */ t("th", {
|
|
47
47
|
"data-slot": "table-head",
|
|
48
|
-
className: e("
|
|
48
|
+
className: e("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", n),
|
|
49
49
|
...r
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
function c({ className: n, ...r }) {
|
|
53
53
|
return /* @__PURE__ */ t("td", {
|
|
54
54
|
"data-slot": "table-cell",
|
|
55
|
-
className: e("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0
|
|
55
|
+
className: e("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", n),
|
|
56
56
|
...r
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
function l({ className: n, ...r }) {
|
|
60
60
|
return /* @__PURE__ */ t("caption", {
|
|
61
61
|
"data-slot": "table-caption",
|
|
62
|
-
className: e("
|
|
62
|
+
className: e("mt-4 text-sm text-muted-foreground", n),
|
|
63
63
|
...r
|
|
64
64
|
});
|
|
65
65
|
}
|
|
@@ -1,36 +1,59 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import { cva as i } from "class-variance-authority";
|
|
6
|
+
import { Tabs as a } from "@base-ui/react/tabs";
|
|
6
7
|
//#region src/components/ui/tabs.tsx
|
|
7
|
-
function
|
|
8
|
-
return /* @__PURE__ */ t(
|
|
8
|
+
function o({ className: n, orientation: r = "horizontal", ...i }) {
|
|
9
|
+
return /* @__PURE__ */ t(a.Root, {
|
|
9
10
|
"data-slot": "tabs",
|
|
10
|
-
|
|
11
|
+
"data-orientation": r,
|
|
12
|
+
className: e("group/tabs flex gap-2 data-horizontal:flex-col", n),
|
|
11
13
|
...i
|
|
12
14
|
});
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
var s = i("group/tabs-list relative inline-flex items-center justify-center p-1 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", {
|
|
17
|
+
variants: { variant: {
|
|
18
|
+
default: "bg-background/50 border border-border/40 rounded-lg backdrop-blur-md shadow-sm text-muted-foreground",
|
|
19
|
+
line: "gap-1 bg-transparent text-muted-foreground"
|
|
20
|
+
} },
|
|
21
|
+
defaultVariants: { variant: "default" }
|
|
22
|
+
});
|
|
23
|
+
function c({ className: r, variant: i = "default", ...o }) {
|
|
24
|
+
return /* @__PURE__ */ n(a.List, {
|
|
16
25
|
"data-slot": "tabs-list",
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
"data-variant": i,
|
|
27
|
+
className: e(s({ variant: i }), r),
|
|
28
|
+
...o,
|
|
29
|
+
children: [/* @__PURE__ */ t(a.Indicator, {
|
|
30
|
+
className: "absolute rounded-md bg-primary shadow-md transition-all duration-300 ease-[cubic-bezier(0.65,0,0.35,1)]",
|
|
31
|
+
style: {
|
|
32
|
+
left: "var(--active-tab-left)",
|
|
33
|
+
top: "var(--active-tab-top)",
|
|
34
|
+
width: "var(--active-tab-width)",
|
|
35
|
+
height: "var(--active-tab-height)"
|
|
36
|
+
}
|
|
37
|
+
}), o.children]
|
|
19
38
|
});
|
|
20
39
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
var l = r.forwardRef(({ className: n, children: r, ...i }, o) => /* @__PURE__ */ t(a.Tab, {
|
|
41
|
+
ref: o,
|
|
42
|
+
"data-slot": "tabs-trigger",
|
|
43
|
+
className: e("relative inline-flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-md px-3 sm:px-6 py-2.5 text-xs sm:text-sm font-semibold font-[family-name:var(--font-sans)] whitespace-nowrap transition-colors duration-300 z-10 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50", "text-muted-foreground hover:text-foreground hover:bg-muted/50", "data-active:text-primary-foreground data-active:hover:bg-transparent", "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring", n),
|
|
44
|
+
...i,
|
|
45
|
+
children: /* @__PURE__ */ t("span", {
|
|
46
|
+
className: "relative z-20 flex items-center justify-center gap-1.5",
|
|
47
|
+
children: r
|
|
48
|
+
})
|
|
49
|
+
}));
|
|
50
|
+
l.displayName = "TabsTrigger";
|
|
51
|
+
function u({ className: n, ...r }) {
|
|
52
|
+
return /* @__PURE__ */ t(a.Panel, {
|
|
30
53
|
"data-slot": "tabs-content",
|
|
31
|
-
className: e("flex-1 outline-none",
|
|
32
|
-
...
|
|
54
|
+
className: e("flex-1 text-sm outline-none", n),
|
|
55
|
+
...r
|
|
33
56
|
});
|
|
34
57
|
}
|
|
35
58
|
//#endregion
|
|
36
|
-
export {
|
|
59
|
+
export { o as Tabs, u as TabsContent, c as TabsList, l as TabsTrigger, s as tabsListVariants };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import "react";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import "react";
|
|
4
5
|
//#region src/components/ui/textarea.tsx
|
|
5
6
|
function n({ className: n, ...r }) {
|
|
6
7
|
return /* @__PURE__ */ t("textarea", {
|
|
7
8
|
"data-slot": "textarea",
|
|
8
|
-
className: e("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:
|
|
9
|
+
className: e("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", n),
|
|
9
10
|
...r
|
|
10
11
|
});
|
|
11
12
|
}
|
|
@@ -1,56 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
3
|
import { Button as t } from "./button.js";
|
|
4
|
-
import {
|
|
5
|
-
import { Moon as
|
|
6
|
-
import { jsx as
|
|
7
|
-
import {
|
|
4
|
+
import { Tooltip as n, TooltipContent as r, TooltipTrigger as i } from "./tooltip.js";
|
|
5
|
+
import { Moon as a, Sun as o } from "lucide-react";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
import { memo as l, useCallback as u, useEffect as d, useState as f } from "react";
|
|
8
|
+
import { useTheme as p } from "next-themes";
|
|
8
9
|
//#region src/components/ui/theme-toggle.tsx
|
|
9
|
-
var
|
|
10
|
-
let { theme:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, [])
|
|
10
|
+
var m = l(function({ className: l, showLabel: m }) {
|
|
11
|
+
let { theme: h, setTheme: g } = p(), [_, v] = f(!1);
|
|
12
|
+
d(() => {
|
|
13
|
+
v(!0);
|
|
14
|
+
}, []);
|
|
15
|
+
let y = u(() => {
|
|
16
|
+
g(h === "light" ? "dark" : "light");
|
|
17
|
+
}, [h, g]), b = () => {
|
|
18
|
+
if (!_) return /* @__PURE__ */ s(a, { className: "h-4 w-4" });
|
|
19
|
+
switch (h) {
|
|
20
|
+
case "light": return /* @__PURE__ */ s(o, { className: "h-4 w-4" });
|
|
21
|
+
default: return /* @__PURE__ */ s(a, { className: "h-4 w-4" });
|
|
22
|
+
}
|
|
23
|
+
}, x = () => {
|
|
24
|
+
if (!_) return "Alternar tema";
|
|
25
|
+
switch (h) {
|
|
26
|
+
case "light": return "Ativar tema escuro";
|
|
27
|
+
default: return "Ativar tema claro";
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ s("div", {
|
|
14
31
|
className: "relative",
|
|
15
|
-
children: /* @__PURE__ */ c(t, {
|
|
32
|
+
children: /* @__PURE__ */ c(n, { children: [/* @__PURE__ */ s(i, { render: /* @__PURE__ */ s(t, {
|
|
16
33
|
variant: "ghost",
|
|
17
34
|
size: "sm",
|
|
18
|
-
onClick:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
case "light": return "Mudar para tema escuro";
|
|
26
|
-
default: return "Mudar para tema claro";
|
|
27
|
-
}
|
|
28
|
-
})(),
|
|
29
|
-
"aria-label": (() => {
|
|
30
|
-
if (!m) return "Tema escuro";
|
|
31
|
-
switch (f) {
|
|
32
|
-
case "light": return "Tema claro";
|
|
33
|
-
default: return "Tema escuro";
|
|
34
|
-
}
|
|
35
|
-
})(),
|
|
36
|
-
children: /* @__PURE__ */ l("div", {
|
|
37
|
-
className: e("flex items-center gap-1.5", !d && "justify-center"),
|
|
38
|
-
children: [/* @__PURE__ */ c("div", {
|
|
35
|
+
onClick: y,
|
|
36
|
+
className: e("h-11 p-0 text-primary transition-all duration-300 rounded-lg md:h-9", "hover:bg-accent/50 active:scale-95", m ? "px-3 w-auto" : "w-11 md:w-9", l),
|
|
37
|
+
"aria-label": x(),
|
|
38
|
+
"aria-live": "polite",
|
|
39
|
+
children: /* @__PURE__ */ c("div", {
|
|
40
|
+
className: e("flex items-center gap-1.5", !m && "justify-center"),
|
|
41
|
+
children: [/* @__PURE__ */ s("div", {
|
|
39
42
|
className: "transition-transform duration-300 hover:rotate-12",
|
|
40
|
-
children: (
|
|
41
|
-
|
|
42
|
-
switch (f) {
|
|
43
|
-
case "light": return /* @__PURE__ */ c(s, { className: "h-4 w-4" });
|
|
44
|
-
default: return /* @__PURE__ */ c(o, { className: "h-4 w-4" });
|
|
45
|
-
}
|
|
46
|
-
})()
|
|
47
|
-
}), d && /* @__PURE__ */ c("span", {
|
|
43
|
+
children: b()
|
|
44
|
+
}), m && /* @__PURE__ */ s("span", {
|
|
48
45
|
className: "text-sm font-medium hidden lg:inline",
|
|
49
46
|
children: "Tema"
|
|
50
47
|
})]
|
|
51
48
|
})
|
|
52
|
-
})
|
|
49
|
+
}) }), /* @__PURE__ */ s(r, { children: x() })] })
|
|
53
50
|
});
|
|
54
51
|
});
|
|
55
52
|
//#endregion
|
|
56
|
-
export {
|
|
53
|
+
export { m as ThemeToggle };
|
|
@@ -1,44 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
3
|
import { toggleVariants as t } from "./toggle.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import * as r from "react";
|
|
6
6
|
import "class-variance-authority";
|
|
7
|
-
import
|
|
7
|
+
import { Toggle as i } from "@base-ui/react/toggle";
|
|
8
|
+
import { ToggleGroup as a } from "@base-ui/react/toggle-group";
|
|
8
9
|
//#region src/components/ui/toggle-group.tsx
|
|
9
|
-
var
|
|
10
|
+
var o = r.createContext({
|
|
10
11
|
size: "default",
|
|
11
|
-
variant: "default"
|
|
12
|
+
variant: "default",
|
|
13
|
+
spacing: 2,
|
|
14
|
+
orientation: "horizontal"
|
|
12
15
|
});
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */
|
|
16
|
+
function s({ className: t, variant: r, size: i, spacing: s = 2, orientation: c = "horizontal", children: l, ...u }) {
|
|
17
|
+
return /* @__PURE__ */ n(a, {
|
|
15
18
|
"data-slot": "toggle-group",
|
|
16
|
-
"data-variant":
|
|
17
|
-
"data-size":
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
"data-variant": r,
|
|
20
|
+
"data-size": i,
|
|
21
|
+
"data-spacing": s,
|
|
22
|
+
"data-orientation": c,
|
|
23
|
+
style: { "--gap": s },
|
|
24
|
+
className: e("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch", t),
|
|
25
|
+
...u,
|
|
26
|
+
children: /* @__PURE__ */ n(o.Provider, {
|
|
21
27
|
value: {
|
|
22
|
-
variant:
|
|
23
|
-
size:
|
|
28
|
+
variant: r,
|
|
29
|
+
size: i,
|
|
30
|
+
spacing: s,
|
|
31
|
+
orientation: c
|
|
24
32
|
},
|
|
25
|
-
children:
|
|
33
|
+
children: l
|
|
26
34
|
})
|
|
27
35
|
});
|
|
28
36
|
}
|
|
29
|
-
function
|
|
30
|
-
let d =
|
|
31
|
-
return /* @__PURE__ */
|
|
37
|
+
function c({ className: a, children: s, variant: c = "default", size: l = "default", ...u }) {
|
|
38
|
+
let d = r.useContext(o);
|
|
39
|
+
return /* @__PURE__ */ n(i, {
|
|
32
40
|
"data-slot": "toggle-group-item",
|
|
33
41
|
"data-variant": d.variant || c,
|
|
34
42
|
"data-size": d.size || l,
|
|
35
|
-
|
|
43
|
+
"data-spacing": d.spacing,
|
|
44
|
+
className: e("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", t({
|
|
36
45
|
variant: d.variant || c,
|
|
37
46
|
size: d.size || l
|
|
38
|
-
}),
|
|
47
|
+
}), a),
|
|
39
48
|
...u,
|
|
40
49
|
children: s
|
|
41
50
|
});
|
|
42
51
|
}
|
|
43
52
|
//#endregion
|
|
44
|
-
export {
|
|
53
|
+
export { s as ToggleGroup, c as ToggleGroupItem };
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import "react";
|
|
4
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
5
4
|
import { cva as n } from "class-variance-authority";
|
|
6
|
-
import
|
|
5
|
+
import { Toggle as r } from "@base-ui/react/toggle";
|
|
7
6
|
//#region src/components/ui/toggle.tsx
|
|
8
|
-
var i = n("inline-flex items-center justify-center gap-
|
|
7
|
+
var i = n("group/toggle inline-flex items-center justify-center cursor-pointer gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none cursor-pointer hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
9
8
|
variants: {
|
|
10
9
|
variant: {
|
|
11
10
|
default: "bg-transparent",
|
|
12
|
-
outline: "border border-input bg-transparent
|
|
11
|
+
outline: "border border-input bg-transparent hover:bg-muted"
|
|
13
12
|
},
|
|
14
13
|
size: {
|
|
15
|
-
default: "h-
|
|
16
|
-
sm: "h-
|
|
17
|
-
lg: "h-
|
|
14
|
+
default: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
15
|
+
sm: "h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
16
|
+
lg: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"
|
|
18
17
|
}
|
|
19
18
|
},
|
|
20
19
|
defaultVariants: {
|
|
@@ -22,8 +21,8 @@ var i = n("inline-flex items-center justify-center gap-2 rounded-md text-sm font
|
|
|
22
21
|
size: "default"
|
|
23
22
|
}
|
|
24
23
|
});
|
|
25
|
-
function a({ className: n, variant: a, size: o, ...s }) {
|
|
26
|
-
return /* @__PURE__ */ t(r
|
|
24
|
+
function a({ className: n, variant: a = "default", size: o = "default", ...s }) {
|
|
25
|
+
return /* @__PURE__ */ t(r, {
|
|
27
26
|
"data-slot": "toggle",
|
|
28
27
|
className: e(i({
|
|
29
28
|
variant: a,
|