kuzenbo 0.0.1
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/LICENSE +21 -0
- package/README.md +185 -0
- package/dist/accordion-trigger-D5XnBMS6.d.ts +24 -0
- package/dist/accordion-trigger-TjAe8JHy.js +53 -0
- package/dist/alert-dialog-trigger-BV0BsaVU.d.ts +638 -0
- package/dist/alert-dialog-trigger-D5BRoizR.js +98 -0
- package/dist/alert-title-CISzcj0X.js +28 -0
- package/dist/alert-title-CVC9G-Xf.d.ts +22 -0
- package/dist/announcement-title-CCZuGB1O.d.ts +18 -0
- package/dist/announcement-title-CIwzt9Wl.js +18 -0
- package/dist/autocomplete-value-BhyszIrf.d.ts +111 -0
- package/dist/autocomplete-value-DNJ3sAIH.js +141 -0
- package/dist/avatar-image-BKgKyzVw.d.ts +35 -0
- package/dist/avatar-image-Bw3G-Bl6.js +45 -0
- package/dist/breadcrumb-separator-D66-B1DA.d.ts +44 -0
- package/dist/breadcrumb-separator-Do-19Uow.js +74 -0
- package/dist/button-group-text-D98w78rH.js +25 -0
- package/dist/calendar-week-number-6AXvZ4Ij.js +72 -0
- package/dist/calendar-week-number-in2gpvA_.d.ts +36 -0
- package/dist/card-title-CbRPAh3M.js +52 -0
- package/dist/card-title-DSDluDoy.d.ts +40 -0
- package/dist/carousel-previous-B_jysGv_.js +89 -0
- package/dist/chart-tooltip-content-h5oLtil-.js +144 -0
- package/dist/collapsible-trigger-DcQWODN-.js +20 -0
- package/dist/collapsible-trigger-aZF7_mPR.d.ts +15 -0
- package/dist/command-shortcut-DoWM7Mnm.js +97 -0
- package/dist/context-menu-trigger-CYBhdcpg.js +147 -0
- package/dist/context-menu-trigger-Du2vcTco.d.ts +103 -0
- package/dist/dialog-trigger-CR23tYql.js +97 -0
- package/dist/dialog-trigger-xeE4e96-.d.ts +74 -0
- package/dist/drawer-trigger-7jI4Zmqs.js +79 -0
- package/dist/drawer-trigger-H_Wv5R00.d.ts +67 -0
- package/dist/dropdown-menu-trigger-CFdruqOk.d.ts +108 -0
- package/dist/dropdown-menu-trigger-IKeAoU_a.js +152 -0
- package/dist/dropzone-context-BRX1K7nw.d.ts +45 -0
- package/dist/dropzone-status-CW-3AXuh.js +33 -0
- package/dist/emoji-picker-skin-tone-selector-Cmv-1vDO.js +117 -0
- package/dist/emoji-picker-skin-tone-selector-yMYxt4oJ.d.ts +67 -0
- package/dist/empty-title-CH3DhcfT.d.ts +53 -0
- package/dist/empty-title-CHNBH7WJ.js +53 -0
- package/dist/form-field-title-CNrq8v88.js +101 -0
- package/dist/hooks/use-isomorphic-effect.d.ts +7 -0
- package/dist/hooks/use-isomorphic-effect.js +7 -0
- package/dist/hooks/use-mobile.d.ts +4 -0
- package/dist/hooks/use-mobile.js +20 -0
- package/dist/hover-card-trigger-B9jf3FEB.js +31 -0
- package/dist/hover-card-trigger-BqVoZ7h4.d.ts +20 -0
- package/dist/index.d.ts +122 -0
- package/dist/index.js +130 -0
- package/dist/input-group-textarea-voYOV11-.js +79 -0
- package/dist/input-otp-slot-DWbXhUmU.js +45 -0
- package/dist/input-otp-slot-eVdOjx8C.d.ts +24 -0
- package/dist/item-title-BYrYJZpa.js +89 -0
- package/dist/kbd-group-CT-Xtgug.js +12 -0
- package/dist/kbd-group-D3yVrb2D.d.ts +10 -0
- package/dist/marquee-item-BGJ5NSiz.js +29 -0
- package/dist/marquee-item-DD6JuLJ4.d.ts +32 -0
- package/dist/menubar-trigger-BLg3XdRv.d.ts +104 -0
- package/dist/menubar-trigger-aKMWAxdz.js +146 -0
- package/dist/meter-value-BmxUICOA.js +37 -0
- package/dist/meter-value-DYkZLCtx.d.ts +30 -0
- package/dist/navigation-menu-trigger-Bf60DnIz.d.ts +53 -0
- package/dist/navigation-menu-trigger-D80wiliM.js +82 -0
- package/dist/number-field-scrub-area-CXSyafBE.js +80 -0
- package/dist/optional-portal-C7TpYnOc.js +15 -0
- package/dist/pagination-previous-DPZrRgiD.js +88 -0
- package/dist/pagination-previous-qJeZZTou.d.ts +45 -0
- package/dist/pill-status-CD9XXuE7.js +74 -0
- package/dist/pill-status-rg-3AMSI.d.ts +77 -0
- package/dist/popover-trigger-B9PVErig.d.ts +39 -0
- package/dist/popover-trigger-C8dP_u7N.js +52 -0
- package/dist/progress-value-CFlgP0nv.d.ts +28 -0
- package/dist/progress-value-CfCodKnX.js +37 -0
- package/dist/radio-group-item-09fw05Va.d.ts +10 -0
- package/dist/radio-group-item-CQjCazjw.js +24 -0
- package/dist/rating-star-6ov3lbpn.d.ts +57 -0
- package/dist/rating-star-BuLQfAnZ.js +110 -0
- package/dist/resizable-panel-B4lAr8Vb.d.ts +19 -0
- package/dist/resizable-panel-BO97wcPj.js +21 -0
- package/dist/scroll-bar-BQzpb5hF.js +19 -0
- package/dist/scroll-bar-vYvxEOph.d.ts +11 -0
- package/dist/select-value-BUnWentK.js +117 -0
- package/dist/select-value-DG31IHy3.d.ts +70 -0
- package/dist/sheet-trigger-CLgKANrf.d.ts +64 -0
- package/dist/sheet-trigger-CUU7xwUn.js +95 -0
- package/dist/sidebar-trigger-BCjVuIqi.js +366 -0
- package/dist/styles.css +145 -0
- package/dist/table-row-BxhKJPfE.d.ts +46 -0
- package/dist/table-row-D63xalkM.js +60 -0
- package/dist/tabs-trigger-B2mBxFgq.js +38 -0
- package/dist/tabs-trigger-BGo2XGvh.d.ts +41 -0
- package/dist/timeline-title-BH8JxX2n.js +389 -0
- package/dist/toggle-group-item-Bz_ohmnY.d.ts +53 -0
- package/dist/toggle-group-item-aggwtgam.js +34 -0
- package/dist/toolbar-separator-7CgKz2aX.d.ts +40 -0
- package/dist/toolbar-separator-Bre5OtBI.js +41 -0
- package/dist/tooltip-trigger-CrAGfaqr.d.ts +27 -0
- package/dist/tooltip-trigger-Z-aPDRog.js +37 -0
- package/dist/ui/accordion.d.ts +27 -0
- package/dist/ui/accordion.js +17 -0
- package/dist/ui/affix.d.ts +49 -0
- package/dist/ui/affix.js +57 -0
- package/dist/ui/alert-dialog.d.ts +123 -0
- package/dist/ui/alert-dialog.js +23 -0
- package/dist/ui/alert.d.ts +58 -0
- package/dist/ui/alert.js +59 -0
- package/dist/ui/announcement.d.ts +27 -0
- package/dist/ui/announcement.js +16 -0
- package/dist/ui/aspect-ratio.d.ts +13 -0
- package/dist/ui/aspect-ratio.js +13 -0
- package/dist/ui/autocomplete.d.ts +67 -0
- package/dist/ui/autocomplete.js +30 -0
- package/dist/ui/avatar.d.ts +37 -0
- package/dist/ui/avatar.js +22 -0
- package/dist/ui/badge.d.ts +54 -0
- package/dist/ui/badge.js +33 -0
- package/dist/ui/breadcrumb.d.ts +41 -0
- package/dist/ui/breadcrumb.js +20 -0
- package/dist/ui/button-group.d.ts +94 -0
- package/dist/ui/button-group.js +24 -0
- package/dist/ui/button.d.ts +91 -0
- package/dist/ui/button.js +64 -0
- package/dist/ui/calendar.d.ts +52 -0
- package/dist/ui/calendar.js +64 -0
- package/dist/ui/card.d.ts +40 -0
- package/dist/ui/card.js +20 -0
- package/dist/ui/carousel.d.ts +100 -0
- package/dist/ui/carousel.js +76 -0
- package/dist/ui/chart.d.ts +61 -0
- package/dist/ui/chart.js +34 -0
- package/dist/ui/checkbox-group.d.ts +12 -0
- package/dist/ui/checkbox-group.js +13 -0
- package/dist/ui/checkbox.d.ts +12 -0
- package/dist/ui/checkbox.js +27 -0
- package/dist/ui/collapsible.d.ts +19 -0
- package/dist/ui/collapsible.js +16 -0
- package/dist/ui/combobox.d.ts +95 -0
- package/dist/ui/combobox.js +31 -0
- package/dist/ui/command.d.ts +146 -0
- package/dist/ui/command.js +24 -0
- package/dist/ui/context-menu.d.ts +83 -0
- package/dist/ui/context-menu.js +26 -0
- package/dist/ui/country-flag.d.ts +18 -0
- package/dist/ui/country-flag.js +36 -0
- package/dist/ui/dialog.d.ts +53 -0
- package/dist/ui/dialog.js +23 -0
- package/dist/ui/drawer.d.ts +52 -0
- package/dist/ui/drawer.js +24 -0
- package/dist/ui/dropdown-menu.d.ts +88 -0
- package/dist/ui/dropdown-menu.js +26 -0
- package/dist/ui/dropzone.d.ts +233 -0
- package/dist/ui/dropzone.js +180 -0
- package/dist/ui/emoji-picker.d.ts +46 -0
- package/dist/ui/emoji-picker.js +23 -0
- package/dist/ui/empty.d.ts +50 -0
- package/dist/ui/empty.js +18 -0
- package/dist/ui/form-field.d.ts +134 -0
- package/dist/ui/form-field.js +33 -0
- package/dist/ui/google-logo.d.ts +13 -0
- package/dist/ui/google-logo.js +36 -0
- package/dist/ui/hover-card.d.ts +24 -0
- package/dist/ui/hover-card.js +16 -0
- package/dist/ui/input-group.d.ts +141 -0
- package/dist/ui/input-group.js +21 -0
- package/dist/ui/input-otp.d.ts +31 -0
- package/dist/ui/input-otp.js +19 -0
- package/dist/ui/input.d.ts +12 -0
- package/dist/ui/input.js +14 -0
- package/dist/ui/item.d.ts +158 -0
- package/dist/ui/item.js +50 -0
- package/dist/ui/kbd.d.ts +18 -0
- package/dist/ui/kbd.js +14 -0
- package/dist/ui/label.d.ts +12 -0
- package/dist/ui/label.js +15 -0
- package/dist/ui/marquee.d.ts +30 -0
- package/dist/ui/marquee.js +17 -0
- package/dist/ui/menubar.d.ts +228 -0
- package/dist/ui/menubar.js +29 -0
- package/dist/ui/meter.d.ts +29 -0
- package/dist/ui/meter.js +19 -0
- package/dist/ui/navigation-menu.d.ts +12 -0
- package/dist/ui/navigation-menu.js +15 -0
- package/dist/ui/number-field.d.ts +41 -0
- package/dist/ui/number-field.js +33 -0
- package/dist/ui/pagination.d.ts +38 -0
- package/dist/ui/pagination.js +20 -0
- package/dist/ui/pill.d.ts +49 -0
- package/dist/ui/pill.js +21 -0
- package/dist/ui/popover.d.ts +37 -0
- package/dist/ui/popover.js +19 -0
- package/dist/ui/portal.d.ts +29 -0
- package/dist/ui/portal.js +52 -0
- package/dist/ui/progress.d.ts +31 -0
- package/dist/ui/progress.js +22 -0
- package/dist/ui/qr-code.d.ts +20 -0
- package/dist/ui/qr-code.js +78 -0
- package/dist/ui/radio-group.d.ts +18 -0
- package/dist/ui/radio-group.js +15 -0
- package/dist/ui/rating.d.ts +80 -0
- package/dist/ui/rating.js +59 -0
- package/dist/ui/resizable.d.ts +25 -0
- package/dist/ui/resizable.js +18 -0
- package/dist/ui/scroll-area.d.ts +19 -0
- package/dist/ui/scroll-area.js +24 -0
- package/dist/ui/select.d.ts +65 -0
- package/dist/ui/select.js +23 -0
- package/dist/ui/separator.d.ts +12 -0
- package/dist/ui/separator.js +14 -0
- package/dist/ui/sheet.d.ts +54 -0
- package/dist/ui/sheet.js +23 -0
- package/dist/ui/sidebar.d.ts +247 -0
- package/dist/ui/sidebar.js +83 -0
- package/dist/ui/skeleton.d.ts +11 -0
- package/dist/ui/skeleton.js +12 -0
- package/dist/ui/slider.d.ts +15 -0
- package/dist/ui/slider.js +47 -0
- package/dist/ui/spacer.d.ts +18 -0
- package/dist/ui/spacer.js +25 -0
- package/dist/ui/spinner.d.ts +12 -0
- package/dist/ui/spinner.js +17 -0
- package/dist/ui/surface.d.ts +41 -0
- package/dist/ui/surface.js +31 -0
- package/dist/ui/switch.d.ts +14 -0
- package/dist/ui/switch.js +20 -0
- package/dist/ui/table.d.ts +41 -0
- package/dist/ui/table.js +34 -0
- package/dist/ui/tabs.d.ts +43 -0
- package/dist/ui/tabs.js +20 -0
- package/dist/ui/textarea.d.ts +13 -0
- package/dist/ui/textarea.js +14 -0
- package/dist/ui/theme-icon.d.ts +77 -0
- package/dist/ui/theme-icon.js +56 -0
- package/dist/ui/timeline.d.ts +96 -0
- package/dist/ui/timeline.js +88 -0
- package/dist/ui/toast.d.ts +50 -0
- package/dist/ui/toast.js +23 -0
- package/dist/ui/toggle-group.d.ts +31 -0
- package/dist/ui/toggle-group.js +31 -0
- package/dist/ui/toggle.d.ts +46 -0
- package/dist/ui/toggle.js +34 -0
- package/dist/ui/toolbar.d.ts +33 -0
- package/dist/ui/toolbar.js +19 -0
- package/dist/ui/tooltip.d.ts +29 -0
- package/dist/ui/tooltip.js +17 -0
- package/dist/ui/video-player.d.ts +48 -0
- package/dist/ui/video-player.js +37 -0
- package/dist/use-chart-BRpzPrMJ.d.ts +77 -0
- package/dist/use-combobox-anchor-2KUf_cBk.js +198 -0
- package/dist/use-combobox-anchor-ByuqnpKH.d.ts +120 -0
- package/dist/use-number-field-Dzl9JLNK.d.ts +55 -0
- package/dist/use-timeline-BRlmxoQ7.d.ts +81 -0
- package/dist/use-toast-BGG4leSx.d.ts +118 -0
- package/dist/use-toast-DjRKuQG6.js +129 -0
- package/dist/video-player-volume-range-D971L6mz.d.ts +65 -0
- package/dist/video-player-volume-range-V7x0b1-r.js +66 -0
- package/package.json +128 -0
package/dist/ui/table.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { t as ScrollBar } from "../scroll-bar-BQzpb5hF.js";
|
|
2
|
+
import { a as TableCell, i as TableFooter, n as TableHeader, o as TableCaption, r as TableHead, s as TableBody, t as TableRow } from "../table-row-D63xalkM.js";
|
|
3
|
+
import { cn } from "tailwind-variants";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
6
|
+
|
|
7
|
+
//#region src/components/table/table.tsx
|
|
8
|
+
const Table = ({ className, ...props }) => /* @__PURE__ */ jsxs(ScrollArea.Root, {
|
|
9
|
+
className: "relative w-full rounded-lg border bg-card",
|
|
10
|
+
"data-slot": "table-container",
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ jsx(ScrollArea.Viewport, {
|
|
13
|
+
className: "size-full rounded-[inherit]",
|
|
14
|
+
children: /* @__PURE__ */ jsx("table", {
|
|
15
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
16
|
+
"data-slot": "table",
|
|
17
|
+
...props
|
|
18
|
+
})
|
|
19
|
+
}),
|
|
20
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
21
|
+
/* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" }),
|
|
22
|
+
/* @__PURE__ */ jsx(ScrollArea.Corner, {})
|
|
23
|
+
]
|
|
24
|
+
});
|
|
25
|
+
Table.Body = TableBody;
|
|
26
|
+
Table.Caption = TableCaption;
|
|
27
|
+
Table.Cell = TableCell;
|
|
28
|
+
Table.Footer = TableFooter;
|
|
29
|
+
Table.Head = TableHead;
|
|
30
|
+
Table.Header = TableHeader;
|
|
31
|
+
Table.Row = TableRow;
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { n as TabsList, r as TabsContent, t as TabsTrigger } from "../tabs-trigger-BGo2XGvh.js";
|
|
2
|
+
import * as tailwind_variants0 from "tailwind-variants";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
5
|
+
|
|
6
|
+
//#region src/components/tabs/tabs.d.ts
|
|
7
|
+
declare const Tabs: {
|
|
8
|
+
({
|
|
9
|
+
className,
|
|
10
|
+
orientation,
|
|
11
|
+
...props
|
|
12
|
+
}: Tabs$1.Root.Props): react_jsx_runtime0.JSX.Element;
|
|
13
|
+
Content: ({
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
}: Tabs$1.Panel.Props) => react_jsx_runtime0.JSX.Element;
|
|
17
|
+
List: ({
|
|
18
|
+
className,
|
|
19
|
+
variant,
|
|
20
|
+
...props
|
|
21
|
+
}: Tabs$1.List.Props & tailwind_variants0.VariantProps<tailwind_variants0.TVReturnType<{
|
|
22
|
+
variant: {
|
|
23
|
+
default: string;
|
|
24
|
+
line: string;
|
|
25
|
+
};
|
|
26
|
+
}, undefined, "group/tabs-list inline-flex w-fit items-center justify-center rounded-md p-1 text-muted-foreground data-[variant=line]:rounded-none group-data-[orientation=vertical]/tabs:h-fit group-data-horizontal/tabs:h-8 group-data-[orientation=vertical]/tabs:flex-col", {
|
|
27
|
+
variant: {
|
|
28
|
+
default: string;
|
|
29
|
+
line: string;
|
|
30
|
+
};
|
|
31
|
+
}, undefined, tailwind_variants0.TVReturnType<{
|
|
32
|
+
variant: {
|
|
33
|
+
default: string;
|
|
34
|
+
line: string;
|
|
35
|
+
};
|
|
36
|
+
}, undefined, "group/tabs-list inline-flex w-fit items-center justify-center rounded-md p-1 text-muted-foreground data-[variant=line]:rounded-none group-data-[orientation=vertical]/tabs:h-fit group-data-horizontal/tabs:h-8 group-data-[orientation=vertical]/tabs:flex-col", unknown, unknown, undefined>>>) => react_jsx_runtime0.JSX.Element;
|
|
37
|
+
Trigger: ({
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
}: Tabs$1.Tab.Props) => react_jsx_runtime0.JSX.Element;
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
package/dist/ui/tabs.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { n as TabsList, r as TabsContent, t as TabsTrigger } from "../tabs-trigger-B2mBxFgq.js";
|
|
4
|
+
import { cn } from "tailwind-variants";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
7
|
+
|
|
8
|
+
//#region src/components/tabs/tabs.tsx
|
|
9
|
+
const Tabs = ({ className, orientation = "horizontal", ...props }) => /* @__PURE__ */ jsx(Tabs$1.Root, {
|
|
10
|
+
className: cn("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col", className),
|
|
11
|
+
"data-orientation": orientation,
|
|
12
|
+
"data-slot": "tabs",
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
Tabs.Content = TabsContent;
|
|
16
|
+
Tabs.List = TabsList;
|
|
17
|
+
Tabs.Trigger = TabsTrigger;
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import TextareaAutosize from "react-textarea-autosize";
|
|
4
|
+
|
|
5
|
+
//#region src/components/textarea/textarea.d.ts
|
|
6
|
+
type TextareaProps = ComponentProps<typeof TextareaAutosize>;
|
|
7
|
+
declare const Textarea: ({
|
|
8
|
+
className,
|
|
9
|
+
rows,
|
|
10
|
+
...props
|
|
11
|
+
}: TextareaProps) => react_jsx_runtime0.JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Textarea, TextareaProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cn } from "tailwind-variants";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import TextareaAutosize from "react-textarea-autosize";
|
|
4
|
+
|
|
5
|
+
//#region src/components/textarea/textarea.tsx
|
|
6
|
+
const Textarea = ({ className, rows = 3, ...props }) => /* @__PURE__ */ jsx(TextareaAutosize, {
|
|
7
|
+
className: cn("field-sizing-content flex min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs outline-none transition-colors placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:disabled:bg-input/80", className),
|
|
8
|
+
"data-slot": "textarea",
|
|
9
|
+
minRows: rows,
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Textarea };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as tailwind_variants0 from "tailwind-variants";
|
|
2
|
+
import { VariantProps } from "tailwind-variants";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import * as react from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/theme-icon/theme-icon.d.ts
|
|
7
|
+
declare const themeIconVariants: tailwind_variants0.TVReturnType<{
|
|
8
|
+
variant: {
|
|
9
|
+
default: string[];
|
|
10
|
+
destructive: string[];
|
|
11
|
+
outline: string[];
|
|
12
|
+
secondary: string[];
|
|
13
|
+
ghost: never[];
|
|
14
|
+
link: string[];
|
|
15
|
+
warning: string[];
|
|
16
|
+
danger: string[];
|
|
17
|
+
info: string[];
|
|
18
|
+
success: string[];
|
|
19
|
+
};
|
|
20
|
+
size: {
|
|
21
|
+
default: string[];
|
|
22
|
+
sm: string[];
|
|
23
|
+
lg: string[];
|
|
24
|
+
xl: string[];
|
|
25
|
+
};
|
|
26
|
+
}, undefined, string[], {
|
|
27
|
+
variant: {
|
|
28
|
+
default: string[];
|
|
29
|
+
destructive: string[];
|
|
30
|
+
outline: string[];
|
|
31
|
+
secondary: string[];
|
|
32
|
+
ghost: never[];
|
|
33
|
+
link: string[];
|
|
34
|
+
warning: string[];
|
|
35
|
+
danger: string[];
|
|
36
|
+
info: string[];
|
|
37
|
+
success: string[];
|
|
38
|
+
};
|
|
39
|
+
size: {
|
|
40
|
+
default: string[];
|
|
41
|
+
sm: string[];
|
|
42
|
+
lg: string[];
|
|
43
|
+
xl: string[];
|
|
44
|
+
};
|
|
45
|
+
}, undefined, tailwind_variants0.TVReturnType<{
|
|
46
|
+
variant: {
|
|
47
|
+
default: string[];
|
|
48
|
+
destructive: string[];
|
|
49
|
+
outline: string[];
|
|
50
|
+
secondary: string[];
|
|
51
|
+
ghost: never[];
|
|
52
|
+
link: string[];
|
|
53
|
+
warning: string[];
|
|
54
|
+
danger: string[];
|
|
55
|
+
info: string[];
|
|
56
|
+
success: string[];
|
|
57
|
+
};
|
|
58
|
+
size: {
|
|
59
|
+
default: string[];
|
|
60
|
+
sm: string[];
|
|
61
|
+
lg: string[];
|
|
62
|
+
xl: string[];
|
|
63
|
+
};
|
|
64
|
+
}, undefined, string[], unknown, unknown, undefined>>;
|
|
65
|
+
type ThemeIconVariants = VariantProps<typeof themeIconVariants>;
|
|
66
|
+
type ThemeIconProps = ThemeIconVariants & useRender.ComponentProps<"div"> & {
|
|
67
|
+
"data-slot"?: string;
|
|
68
|
+
};
|
|
69
|
+
declare const ThemeIcon: ({
|
|
70
|
+
className,
|
|
71
|
+
variant,
|
|
72
|
+
size,
|
|
73
|
+
render,
|
|
74
|
+
...props
|
|
75
|
+
}: ThemeIconProps) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
76
|
+
//#endregion
|
|
77
|
+
export { ThemeIcon, ThemeIconProps, themeIconVariants };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { tv } from "tailwind-variants";
|
|
4
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
|
|
7
|
+
//#region src/components/theme-icon/theme-icon.tsx
|
|
8
|
+
const themeIconVariants = tv({
|
|
9
|
+
base: [
|
|
10
|
+
"inline-flex shrink-0 items-center justify-center",
|
|
11
|
+
"rounded-md text-sm",
|
|
12
|
+
"outline-none transition-all",
|
|
13
|
+
"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
14
|
+
],
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
default: ["bg-primary text-primary-foreground shadow-xs"],
|
|
18
|
+
destructive: ["bg-destructive text-white shadow-xs", "dark:bg-destructive/60"],
|
|
19
|
+
outline: ["border bg-background shadow-xs", "dark:border-input dark:bg-input/30"],
|
|
20
|
+
secondary: ["bg-secondary text-secondary-foreground shadow-xs"],
|
|
21
|
+
ghost: [],
|
|
22
|
+
link: ["text-primary"],
|
|
23
|
+
warning: ["border-warning-border", "bg-warning text-warning-foreground shadow-xs"],
|
|
24
|
+
danger: ["border-danger-border", "bg-danger text-danger-foreground shadow-xs"],
|
|
25
|
+
info: ["border-info-border", "bg-info text-info-foreground shadow-xs"],
|
|
26
|
+
success: ["border-success-border", "bg-success text-success-foreground shadow-xs"]
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
default: ["size-9"],
|
|
30
|
+
sm: ["size-8"],
|
|
31
|
+
lg: ["size-10"],
|
|
32
|
+
xl: ["size-12"]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
variant: "default",
|
|
37
|
+
size: "default"
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const ThemeIcon = ({ className, variant, size, render, ...props }) => {
|
|
41
|
+
return useRender({
|
|
42
|
+
defaultTagName: "div",
|
|
43
|
+
render,
|
|
44
|
+
props: mergeProps({ className: themeIconVariants({
|
|
45
|
+
variant,
|
|
46
|
+
size,
|
|
47
|
+
className
|
|
48
|
+
}) }, {
|
|
49
|
+
"data-slot": "theme-icon",
|
|
50
|
+
...props
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
export { ThemeIcon, themeIconVariants };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { _ as TimelineConnectorProps, a as TimelineTimeProps, c as TimelineHeader, d as TimelineDotProps, f as TimelineDescription, g as TimelineConnector, h as TimelineContentProps, i as TimelineTime, l as TimelineHeaderProps, m as TimelineContent, n as TimelineTitle, o as TimelineItem, p as TimelineDescriptionProps, r as TimelineTitleProps, s as TimelineItemProps, t as Direction, u as TimelineDot } from "../use-timeline-BRlmxoQ7.js";
|
|
2
|
+
import * as tailwind_variants0 from "tailwind-variants";
|
|
3
|
+
import { VariantProps } from "tailwind-variants";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import * as react from "react";
|
|
6
|
+
import { ComponentProps, ReactNode } from "react";
|
|
7
|
+
|
|
8
|
+
//#region src/components/timeline/timeline.d.ts
|
|
9
|
+
declare const timelineVariants: tailwind_variants0.TVReturnType<{
|
|
10
|
+
orientation: {
|
|
11
|
+
vertical: string;
|
|
12
|
+
horizontal: string;
|
|
13
|
+
};
|
|
14
|
+
variant: {
|
|
15
|
+
default: string;
|
|
16
|
+
alternate: string;
|
|
17
|
+
};
|
|
18
|
+
}, undefined, string[], {
|
|
19
|
+
orientation: {
|
|
20
|
+
vertical: string;
|
|
21
|
+
horizontal: string;
|
|
22
|
+
};
|
|
23
|
+
variant: {
|
|
24
|
+
default: string;
|
|
25
|
+
alternate: string;
|
|
26
|
+
};
|
|
27
|
+
}, undefined, tailwind_variants0.TVReturnType<{
|
|
28
|
+
orientation: {
|
|
29
|
+
vertical: string;
|
|
30
|
+
horizontal: string;
|
|
31
|
+
};
|
|
32
|
+
variant: {
|
|
33
|
+
default: string;
|
|
34
|
+
alternate: string;
|
|
35
|
+
};
|
|
36
|
+
}, undefined, string[], unknown, unknown, undefined>>;
|
|
37
|
+
interface TimelineProps extends ComponentProps<"ol">, VariantProps<typeof timelineVariants> {
|
|
38
|
+
dir?: Direction;
|
|
39
|
+
activeIndex?: number;
|
|
40
|
+
children?: ReactNode;
|
|
41
|
+
}
|
|
42
|
+
declare const Timeline: {
|
|
43
|
+
({
|
|
44
|
+
orientation,
|
|
45
|
+
variant,
|
|
46
|
+
dir,
|
|
47
|
+
activeIndex,
|
|
48
|
+
className,
|
|
49
|
+
children,
|
|
50
|
+
...props
|
|
51
|
+
}: TimelineProps): react_jsx_runtime0.JSX.Element;
|
|
52
|
+
Connector: ({
|
|
53
|
+
className,
|
|
54
|
+
render,
|
|
55
|
+
forceMount,
|
|
56
|
+
...props
|
|
57
|
+
}: TimelineConnectorProps) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
58
|
+
Content: ({
|
|
59
|
+
className,
|
|
60
|
+
render,
|
|
61
|
+
...props
|
|
62
|
+
}: TimelineContentProps) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
63
|
+
Description: ({
|
|
64
|
+
className,
|
|
65
|
+
render,
|
|
66
|
+
...props
|
|
67
|
+
}: TimelineDescriptionProps) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
68
|
+
Dot: ({
|
|
69
|
+
className,
|
|
70
|
+
render,
|
|
71
|
+
...props
|
|
72
|
+
}: TimelineDotProps) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
73
|
+
Header: ({
|
|
74
|
+
className,
|
|
75
|
+
render,
|
|
76
|
+
...props
|
|
77
|
+
}: TimelineHeaderProps) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
78
|
+
Item: ({
|
|
79
|
+
index,
|
|
80
|
+
className,
|
|
81
|
+
children,
|
|
82
|
+
...props
|
|
83
|
+
}: TimelineItemProps) => react_jsx_runtime0.JSX.Element;
|
|
84
|
+
Time: ({
|
|
85
|
+
className,
|
|
86
|
+
render,
|
|
87
|
+
...props
|
|
88
|
+
}: TimelineTimeProps) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
89
|
+
Title: ({
|
|
90
|
+
className,
|
|
91
|
+
render,
|
|
92
|
+
...props
|
|
93
|
+
}: TimelineTitleProps) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
export { Timeline, TimelineConnector, TimelineContent, TimelineDescription, TimelineDot, TimelineHeader, TimelineItem, type TimelineProps, TimelineTime, TimelineTitle, timelineVariants };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { a as TimelineDot, c as TimelineConnector, i as TimelineHeader, l as TimelineContext, n as TimelineTime, o as TimelineDescription, r as TimelineItem, s as TimelineContent, t as TimelineTitle } from "../timeline-title-BH8JxX2n.js";
|
|
2
|
+
import { cn, tv } from "tailwind-variants";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/timeline/timeline.tsx
|
|
7
|
+
const timelineVariants = tv({
|
|
8
|
+
base: [
|
|
9
|
+
"group/timeline relative flex",
|
|
10
|
+
"[--timeline-connector-thickness:0.125rem]",
|
|
11
|
+
"[--timeline-dot-size:0.875rem]"
|
|
12
|
+
],
|
|
13
|
+
variants: {
|
|
14
|
+
orientation: {
|
|
15
|
+
vertical: "flex-col",
|
|
16
|
+
horizontal: "flex-row items-start"
|
|
17
|
+
},
|
|
18
|
+
variant: {
|
|
19
|
+
default: "",
|
|
20
|
+
alternate: ""
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
compoundVariants: [
|
|
24
|
+
{
|
|
25
|
+
orientation: "vertical",
|
|
26
|
+
variant: "default",
|
|
27
|
+
className: "gap-0"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
orientation: "horizontal",
|
|
31
|
+
variant: "default",
|
|
32
|
+
className: "gap-0"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
orientation: "vertical",
|
|
36
|
+
variant: "alternate",
|
|
37
|
+
className: "relative w-full gap-0"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
orientation: "horizontal",
|
|
41
|
+
variant: "alternate",
|
|
42
|
+
className: "items-center gap-0"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
defaultVariants: {
|
|
46
|
+
orientation: "vertical",
|
|
47
|
+
variant: "default"
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
const Timeline = ({ orientation = "vertical", variant = "default", dir = "ltr", activeIndex, className, children, ...props }) => {
|
|
51
|
+
const contextValue = useMemo(() => ({
|
|
52
|
+
orientation,
|
|
53
|
+
variant,
|
|
54
|
+
dir,
|
|
55
|
+
activeIndex
|
|
56
|
+
}), [
|
|
57
|
+
orientation,
|
|
58
|
+
variant,
|
|
59
|
+
dir,
|
|
60
|
+
activeIndex
|
|
61
|
+
]);
|
|
62
|
+
return /* @__PURE__ */ jsx(TimelineContext.Provider, {
|
|
63
|
+
value: contextValue,
|
|
64
|
+
children: /* @__PURE__ */ jsx("ol", {
|
|
65
|
+
className: cn(timelineVariants({
|
|
66
|
+
orientation,
|
|
67
|
+
variant
|
|
68
|
+
}), className),
|
|
69
|
+
"data-orientation": orientation,
|
|
70
|
+
"data-slot": "timeline",
|
|
71
|
+
"data-variant": variant,
|
|
72
|
+
dir,
|
|
73
|
+
...props,
|
|
74
|
+
children
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
Timeline.Connector = TimelineConnector;
|
|
79
|
+
Timeline.Content = TimelineContent;
|
|
80
|
+
Timeline.Description = TimelineDescription;
|
|
81
|
+
Timeline.Dot = TimelineDot;
|
|
82
|
+
Timeline.Header = TimelineHeader;
|
|
83
|
+
Timeline.Item = TimelineItem;
|
|
84
|
+
Timeline.Time = TimelineTime;
|
|
85
|
+
Timeline.Title = TimelineTitle;
|
|
86
|
+
|
|
87
|
+
//#endregion
|
|
88
|
+
export { Timeline, TimelineConnector, TimelineContent, TimelineDescription, TimelineDot, TimelineHeader, TimelineItem, TimelineTime, TimelineTitle, timelineVariants };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { _ as ToastAction, a as ToastTitle, c as ToastRootProps, d as ToastDescription, f as ToastDescriptionProps, g as ToastCloseProps, h as ToastClose, i as ToastViewportProps, l as ToastPortal, m as ToastContentProps, n as ToastProvider, o as ToastTitleProps, p as ToastContent, r as ToastViewport, s as ToastRoot, t as useToast, u as ToastPortalProps, v as ToastActionProps } from "../use-toast-BGG4leSx.js";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import * as react from "react";
|
|
4
|
+
import { ComponentProps } from "react";
|
|
5
|
+
import { Toast as Toast$1 } from "@base-ui/react/toast";
|
|
6
|
+
|
|
7
|
+
//#region src/components/toast/toast.d.ts
|
|
8
|
+
type ToastProps = ComponentProps<typeof Toast$1.Provider>;
|
|
9
|
+
declare const Toast: {
|
|
10
|
+
(props: ToastProps): react_jsx_runtime0.JSX.Element;
|
|
11
|
+
Action: ({
|
|
12
|
+
className,
|
|
13
|
+
...props
|
|
14
|
+
}: ToastActionProps) => react_jsx_runtime0.JSX.Element;
|
|
15
|
+
Close: ({
|
|
16
|
+
className,
|
|
17
|
+
children,
|
|
18
|
+
...props
|
|
19
|
+
}: ToastCloseProps) => react_jsx_runtime0.JSX.Element;
|
|
20
|
+
Content: ({
|
|
21
|
+
className,
|
|
22
|
+
...props
|
|
23
|
+
}: ToastContentProps) => react_jsx_runtime0.JSX.Element;
|
|
24
|
+
Description: ({
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: ToastDescriptionProps) => react_jsx_runtime0.JSX.Element;
|
|
28
|
+
Portal: (props: ToastPortalProps) => react_jsx_runtime0.JSX.Element;
|
|
29
|
+
Root: ({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}: ToastRootProps) => react_jsx_runtime0.JSX.Element;
|
|
33
|
+
Title: ({
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}: ToastTitleProps) => react_jsx_runtime0.JSX.Element;
|
|
37
|
+
Viewport: ({
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
}: ToastViewportProps) => react_jsx_runtime0.JSX.Element;
|
|
41
|
+
Provider: ({
|
|
42
|
+
children
|
|
43
|
+
}: {
|
|
44
|
+
children: react.ReactNode;
|
|
45
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
46
|
+
};
|
|
47
|
+
declare const useToastManager: typeof Toast$1.useToastManager;
|
|
48
|
+
declare const createToastManager: typeof Toast$1.createToastManager;
|
|
49
|
+
//#endregion
|
|
50
|
+
export { Toast, ToastAction, type ToastActionProps, ToastClose, type ToastCloseProps, ToastContent, type ToastContentProps, ToastDescription, type ToastDescriptionProps, ToastPortal, type ToastPortalProps, ToastProps, ToastProvider, ToastRoot, type ToastRootProps, ToastTitle, type ToastTitleProps, ToastViewport, type ToastViewportProps, createToastManager, useToast, useToastManager };
|
package/dist/ui/toast.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { a as ToastRoot, c as ToastContent, i as ToastTitle, l as ToastClose, n as ToastProvider, o as ToastPortal, r as ToastViewport, s as ToastDescription, t as useToast, u as ToastAction } from "../use-toast-DjRKuQG6.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Toast as Toast$1 } from "@base-ui/react/toast";
|
|
4
|
+
|
|
5
|
+
//#region src/components/toast/toast.tsx
|
|
6
|
+
const Toast = (props) => /* @__PURE__ */ jsx(Toast$1.Provider, {
|
|
7
|
+
"data-slot": "toast",
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
10
|
+
Toast.Action = ToastAction;
|
|
11
|
+
Toast.Close = ToastClose;
|
|
12
|
+
Toast.Content = ToastContent;
|
|
13
|
+
Toast.Description = ToastDescription;
|
|
14
|
+
Toast.Portal = ToastPortal;
|
|
15
|
+
Toast.Root = ToastRoot;
|
|
16
|
+
Toast.Title = ToastTitle;
|
|
17
|
+
Toast.Viewport = ToastViewport;
|
|
18
|
+
Toast.Provider = ToastProvider;
|
|
19
|
+
const { useToastManager } = Toast$1;
|
|
20
|
+
const { createToastManager } = Toast$1;
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastRoot, ToastTitle, ToastViewport, createToastManager, useToast, useToastManager };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { toggleVariants } from "./toggle.js";
|
|
2
|
+
import { n as ToggleGroupContext, t as ToggleGroupItem } from "../toggle-group-item-Bz_ohmnY.js";
|
|
3
|
+
import { VariantProps } from "tailwind-variants";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import * as _base_ui_react0 from "@base-ui/react";
|
|
6
|
+
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
7
|
+
|
|
8
|
+
//#region src/components/toggle-group/toggle-group.d.ts
|
|
9
|
+
declare const ToggleGroup: {
|
|
10
|
+
({
|
|
11
|
+
className,
|
|
12
|
+
variant,
|
|
13
|
+
size,
|
|
14
|
+
spacing,
|
|
15
|
+
orientation,
|
|
16
|
+
children,
|
|
17
|
+
...props
|
|
18
|
+
}: ToggleGroup$1.Props & VariantProps<typeof toggleVariants> & {
|
|
19
|
+
spacing?: number;
|
|
20
|
+
orientation?: "horizontal" | "vertical";
|
|
21
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
22
|
+
Item: ({
|
|
23
|
+
className,
|
|
24
|
+
children,
|
|
25
|
+
variant,
|
|
26
|
+
size,
|
|
27
|
+
...props
|
|
28
|
+
}: _base_ui_react0.Toggle.Props & VariantProps<typeof toggleVariants>) => react_jsx_runtime0.JSX.Element;
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { ToggleGroup, ToggleGroupContext, ToggleGroupItem };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { n as ToggleGroupContext, t as ToggleGroupItem } from "../toggle-group-item-aggwtgam.js";
|
|
4
|
+
import { cn } from "tailwind-variants";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
7
|
+
|
|
8
|
+
//#region src/components/toggle-group/toggle-group.tsx
|
|
9
|
+
const ToggleGroup = ({ className, variant, size, spacing = 0, orientation = "horizontal", children, ...props }) => /* @__PURE__ */ jsx(ToggleGroup$1, {
|
|
10
|
+
className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=0]:data-[variant=outline]:shadow-xs data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch", className),
|
|
11
|
+
"data-orientation": orientation,
|
|
12
|
+
"data-size": size,
|
|
13
|
+
"data-slot": "toggle-group",
|
|
14
|
+
"data-spacing": spacing,
|
|
15
|
+
"data-variant": variant,
|
|
16
|
+
style: { "--gap": spacing },
|
|
17
|
+
...props,
|
|
18
|
+
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
|
|
19
|
+
value: {
|
|
20
|
+
variant,
|
|
21
|
+
size,
|
|
22
|
+
spacing,
|
|
23
|
+
orientation
|
|
24
|
+
},
|
|
25
|
+
children
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
ToggleGroup.Item = ToggleGroupItem;
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { ToggleGroup, ToggleGroupContext, ToggleGroupItem };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as tailwind_variants0 from "tailwind-variants";
|
|
2
|
+
import { VariantProps } from "tailwind-variants";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
5
|
+
|
|
6
|
+
//#region src/components/toggle/toggle.d.ts
|
|
7
|
+
declare const toggleVariants: tailwind_variants0.TVReturnType<{
|
|
8
|
+
variant: {
|
|
9
|
+
default: string;
|
|
10
|
+
outline: string;
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
default: string;
|
|
14
|
+
sm: string;
|
|
15
|
+
lg: string;
|
|
16
|
+
};
|
|
17
|
+
}, undefined, "group/toggle inline-flex cursor-pointer items-center justify-center gap-1 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-all 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-pressed:bg-muted aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
18
|
+
variant: {
|
|
19
|
+
default: string;
|
|
20
|
+
outline: string;
|
|
21
|
+
};
|
|
22
|
+
size: {
|
|
23
|
+
default: string;
|
|
24
|
+
sm: string;
|
|
25
|
+
lg: string;
|
|
26
|
+
};
|
|
27
|
+
}, undefined, tailwind_variants0.TVReturnType<{
|
|
28
|
+
variant: {
|
|
29
|
+
default: string;
|
|
30
|
+
outline: string;
|
|
31
|
+
};
|
|
32
|
+
size: {
|
|
33
|
+
default: string;
|
|
34
|
+
sm: string;
|
|
35
|
+
lg: string;
|
|
36
|
+
};
|
|
37
|
+
}, undefined, "group/toggle inline-flex cursor-pointer items-center justify-center gap-1 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-all 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-pressed:bg-muted aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", unknown, unknown, undefined>>;
|
|
38
|
+
type ToggleProps = Toggle$1.Props & VariantProps<typeof toggleVariants>;
|
|
39
|
+
declare const Toggle: ({
|
|
40
|
+
className,
|
|
41
|
+
variant,
|
|
42
|
+
size,
|
|
43
|
+
...props
|
|
44
|
+
}: ToggleProps) => react_jsx_runtime0.JSX.Element;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { Toggle, ToggleProps, toggleVariants };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { cn, tv } from "tailwind-variants";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
4
|
+
|
|
5
|
+
//#region src/components/toggle/toggle.tsx
|
|
6
|
+
const toggleVariants = tv({
|
|
7
|
+
base: "group/toggle inline-flex cursor-pointer items-center justify-center gap-1 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-all 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-pressed:bg-muted aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-transparent",
|
|
11
|
+
outline: "border border-input bg-transparent hover:bg-muted"
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
default: "h-8 min-w-8 px-2",
|
|
15
|
+
sm: "h-7 min-w-7 rounded-[min(var(--radius-md),10px)] px-1.5",
|
|
16
|
+
lg: "h-9 min-w-9 px-2.5"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "default",
|
|
21
|
+
size: "default"
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const Toggle = ({ className, variant = "default", size = "default", ...props }) => /* @__PURE__ */ jsx(Toggle$1, {
|
|
25
|
+
className: cn(toggleVariants({
|
|
26
|
+
variant,
|
|
27
|
+
size
|
|
28
|
+
}), className),
|
|
29
|
+
"data-slot": "toggle",
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { Toggle, toggleVariants };
|