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
|
@@ -0,0 +1,41 @@
|
|
|
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 { Tabs } from "@base-ui/react/tabs";
|
|
5
|
+
|
|
6
|
+
//#region src/components/tabs/tabs-content.d.ts
|
|
7
|
+
declare const TabsContent: ({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: Tabs.Panel.Props) => react_jsx_runtime0.JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/components/tabs/tabs-list.d.ts
|
|
13
|
+
declare const tabsListVariants: tailwind_variants0.TVReturnType<{
|
|
14
|
+
variant: {
|
|
15
|
+
default: string;
|
|
16
|
+
line: string;
|
|
17
|
+
};
|
|
18
|
+
}, 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", {
|
|
19
|
+
variant: {
|
|
20
|
+
default: string;
|
|
21
|
+
line: string;
|
|
22
|
+
};
|
|
23
|
+
}, undefined, tailwind_variants0.TVReturnType<{
|
|
24
|
+
variant: {
|
|
25
|
+
default: string;
|
|
26
|
+
line: string;
|
|
27
|
+
};
|
|
28
|
+
}, 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>>;
|
|
29
|
+
declare const TabsList: ({
|
|
30
|
+
className,
|
|
31
|
+
variant,
|
|
32
|
+
...props
|
|
33
|
+
}: Tabs.List.Props & VariantProps<typeof tabsListVariants>) => react_jsx_runtime0.JSX.Element;
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/components/tabs/tabs-trigger.d.ts
|
|
36
|
+
declare const TabsTrigger: ({
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}: Tabs.Tab.Props) => react_jsx_runtime0.JSX.Element;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { TabsList as n, TabsContent as r, TabsTrigger as t };
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
import { cn, tv } from "tailwind-variants";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
+
import { createContext, useContext, useMemo } from "react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/timeline/use-timeline.ts
|
|
8
|
+
const TimelineContext = createContext(null);
|
|
9
|
+
const useTimeline = () => {
|
|
10
|
+
const context = useContext(TimelineContext);
|
|
11
|
+
if (!context) throw new Error("useTimeline must be used within a <Timeline />");
|
|
12
|
+
return context;
|
|
13
|
+
};
|
|
14
|
+
const TimelineItemContext = createContext(null);
|
|
15
|
+
const useTimelineItem = () => {
|
|
16
|
+
const context = useContext(TimelineItemContext);
|
|
17
|
+
if (!context) throw new Error("useTimelineItem must be used within a <TimelineItem />");
|
|
18
|
+
return context;
|
|
19
|
+
};
|
|
20
|
+
const getItemStatus = (itemIndex, activeIndex) => {
|
|
21
|
+
if (activeIndex === void 0) return "pending";
|
|
22
|
+
if (itemIndex < activeIndex) return "completed";
|
|
23
|
+
if (itemIndex === activeIndex) return "active";
|
|
24
|
+
return "pending";
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/components/timeline/timeline-connector.tsx
|
|
29
|
+
const timelineConnectorVariants = tv({
|
|
30
|
+
base: ["absolute z-0", "group-last/timeline-item:hidden"],
|
|
31
|
+
variants: {
|
|
32
|
+
status: {
|
|
33
|
+
completed: "bg-primary",
|
|
34
|
+
active: "bg-border",
|
|
35
|
+
pending: "bg-border"
|
|
36
|
+
},
|
|
37
|
+
orientation: {
|
|
38
|
+
vertical: "",
|
|
39
|
+
horizontal: ""
|
|
40
|
+
},
|
|
41
|
+
variant: {
|
|
42
|
+
default: "",
|
|
43
|
+
alternate: ""
|
|
44
|
+
},
|
|
45
|
+
isAlternateRight: {
|
|
46
|
+
true: "",
|
|
47
|
+
false: ""
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
compoundVariants: [
|
|
51
|
+
{
|
|
52
|
+
orientation: "vertical",
|
|
53
|
+
variant: "default",
|
|
54
|
+
className: [
|
|
55
|
+
"start-[calc(var(--timeline-dot-size)/2-var(--timeline-connector-thickness)/2)]",
|
|
56
|
+
"top-[var(--timeline-dot-size)]",
|
|
57
|
+
"h-[calc(100%-var(--timeline-dot-size))]",
|
|
58
|
+
"w-[var(--timeline-connector-thickness)]"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
orientation: "horizontal",
|
|
63
|
+
variant: "default",
|
|
64
|
+
className: [
|
|
65
|
+
"start-[var(--timeline-dot-size)]",
|
|
66
|
+
"top-[calc(var(--timeline-dot-size)/2-var(--timeline-connector-thickness)/2)]",
|
|
67
|
+
"h-[var(--timeline-connector-thickness)]",
|
|
68
|
+
"w-[calc(100%-var(--timeline-dot-size))]"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
orientation: "vertical",
|
|
73
|
+
variant: "alternate",
|
|
74
|
+
isAlternateRight: false,
|
|
75
|
+
className: [
|
|
76
|
+
"top-0",
|
|
77
|
+
"-right-[var(--timeline-connector-thickness)/2]",
|
|
78
|
+
"h-full",
|
|
79
|
+
"w-[var(--timeline-connector-thickness)]"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
orientation: "vertical",
|
|
84
|
+
variant: "alternate",
|
|
85
|
+
isAlternateRight: true,
|
|
86
|
+
className: [
|
|
87
|
+
"top-0",
|
|
88
|
+
"-left-[var(--timeline-connector-thickness)/2]",
|
|
89
|
+
"h-full",
|
|
90
|
+
"w-[var(--timeline-connector-thickness)]"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
orientation: "horizontal",
|
|
95
|
+
variant: "alternate",
|
|
96
|
+
className: [
|
|
97
|
+
"top-[calc(var(--timeline-dot-size)/2-var(--timeline-connector-thickness)/2)]",
|
|
98
|
+
"left-[var(--timeline-dot-size)]",
|
|
99
|
+
"row-start-2",
|
|
100
|
+
"h-[var(--timeline-connector-thickness)]",
|
|
101
|
+
"w-[calc(100%-var(--timeline-dot-size))]"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
defaultVariants: {
|
|
106
|
+
status: "pending",
|
|
107
|
+
orientation: "vertical",
|
|
108
|
+
variant: "default",
|
|
109
|
+
isAlternateRight: false
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const TimelineConnector = ({ className, render, forceMount, ...props }) => {
|
|
113
|
+
const { orientation, variant } = useTimeline();
|
|
114
|
+
const { status, isAlternateRight } = useTimelineItem();
|
|
115
|
+
return useRender({
|
|
116
|
+
defaultTagName: "div",
|
|
117
|
+
props: mergeProps({
|
|
118
|
+
"aria-hidden": true,
|
|
119
|
+
className: cn(timelineConnectorVariants({
|
|
120
|
+
status,
|
|
121
|
+
orientation,
|
|
122
|
+
variant,
|
|
123
|
+
isAlternateRight
|
|
124
|
+
}), forceMount && "group-last/timeline-item:block", className)
|
|
125
|
+
}, props),
|
|
126
|
+
render,
|
|
127
|
+
state: {
|
|
128
|
+
slot: "timeline-connector",
|
|
129
|
+
status,
|
|
130
|
+
orientation
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region src/components/timeline/timeline-content.tsx
|
|
137
|
+
const timelineContentVariants = tv({
|
|
138
|
+
base: "flex-1",
|
|
139
|
+
variants: {
|
|
140
|
+
orientation: {
|
|
141
|
+
vertical: "",
|
|
142
|
+
horizontal: ""
|
|
143
|
+
},
|
|
144
|
+
variant: {
|
|
145
|
+
default: "",
|
|
146
|
+
alternate: ""
|
|
147
|
+
},
|
|
148
|
+
isAlternateRight: {
|
|
149
|
+
true: "",
|
|
150
|
+
false: ""
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
compoundVariants: [
|
|
154
|
+
{
|
|
155
|
+
variant: "alternate",
|
|
156
|
+
orientation: "vertical",
|
|
157
|
+
isAlternateRight: false,
|
|
158
|
+
className: "text-right"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
variant: "alternate",
|
|
162
|
+
orientation: "horizontal",
|
|
163
|
+
isAlternateRight: false,
|
|
164
|
+
className: "row-start-3 pt-2"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
variant: "alternate",
|
|
168
|
+
orientation: "horizontal",
|
|
169
|
+
isAlternateRight: true,
|
|
170
|
+
className: "row-start-1 pb-2"
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
defaultVariants: {
|
|
174
|
+
orientation: "vertical",
|
|
175
|
+
variant: "default",
|
|
176
|
+
isAlternateRight: false
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
const TimelineContent = ({ className, render, ...props }) => {
|
|
180
|
+
const { orientation, variant } = useTimeline();
|
|
181
|
+
const { status, isAlternateRight } = useTimelineItem();
|
|
182
|
+
return useRender({
|
|
183
|
+
defaultTagName: "div",
|
|
184
|
+
props: mergeProps({ className: cn(timelineContentVariants({
|
|
185
|
+
orientation,
|
|
186
|
+
variant,
|
|
187
|
+
isAlternateRight
|
|
188
|
+
}), className) }, props),
|
|
189
|
+
render,
|
|
190
|
+
state: {
|
|
191
|
+
slot: "timeline-content",
|
|
192
|
+
status
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/components/timeline/timeline-description.tsx
|
|
199
|
+
const TimelineDescription = ({ className, render, ...props }) => useRender({
|
|
200
|
+
defaultTagName: "div",
|
|
201
|
+
props: mergeProps({ className: cn("text-muted-foreground text-sm", className) }, props),
|
|
202
|
+
render,
|
|
203
|
+
state: { slot: "timeline-description" }
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region src/components/timeline/timeline-dot.tsx
|
|
208
|
+
const timelineDotVariants = tv({
|
|
209
|
+
base: ["relative z-10 flex shrink-0 items-center justify-center rounded-full border-2 bg-background", "size-[var(--timeline-dot-size)]"],
|
|
210
|
+
variants: {
|
|
211
|
+
status: {
|
|
212
|
+
completed: "border-primary bg-primary",
|
|
213
|
+
active: "border-primary bg-background",
|
|
214
|
+
pending: "border-border bg-background"
|
|
215
|
+
},
|
|
216
|
+
orientation: {
|
|
217
|
+
vertical: "",
|
|
218
|
+
horizontal: ""
|
|
219
|
+
},
|
|
220
|
+
variant: {
|
|
221
|
+
default: "",
|
|
222
|
+
alternate: ""
|
|
223
|
+
},
|
|
224
|
+
isAlternateRight: {
|
|
225
|
+
true: "",
|
|
226
|
+
false: ""
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
compoundVariants: [
|
|
230
|
+
{
|
|
231
|
+
variant: "alternate",
|
|
232
|
+
orientation: "vertical",
|
|
233
|
+
isAlternateRight: false,
|
|
234
|
+
className: "absolute -right-[calc(var(--timeline-dot-size)/2+var(--timeline-connector-thickness)/2)]"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
variant: "alternate",
|
|
238
|
+
orientation: "vertical",
|
|
239
|
+
isAlternateRight: true,
|
|
240
|
+
className: "absolute -left-[calc(var(--timeline-dot-size)/2+var(--timeline-connector-thickness)/2)]"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
variant: "alternate",
|
|
244
|
+
orientation: "horizontal",
|
|
245
|
+
className: "row-start-2"
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
defaultVariants: {
|
|
249
|
+
status: "pending",
|
|
250
|
+
orientation: "vertical",
|
|
251
|
+
variant: "default",
|
|
252
|
+
isAlternateRight: false
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
const TimelineDot = ({ className, render, ...props }) => {
|
|
256
|
+
const { orientation, variant } = useTimeline();
|
|
257
|
+
const { status, isAlternateRight } = useTimelineItem();
|
|
258
|
+
return useRender({
|
|
259
|
+
defaultTagName: "div",
|
|
260
|
+
props: mergeProps({ className: cn(timelineDotVariants({
|
|
261
|
+
status,
|
|
262
|
+
orientation,
|
|
263
|
+
variant,
|
|
264
|
+
isAlternateRight
|
|
265
|
+
}), className) }, props),
|
|
266
|
+
render,
|
|
267
|
+
state: {
|
|
268
|
+
slot: "timeline-dot",
|
|
269
|
+
status,
|
|
270
|
+
orientation
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region src/components/timeline/timeline-header.tsx
|
|
277
|
+
const TimelineHeader = ({ className, render, ...props }) => useRender({
|
|
278
|
+
defaultTagName: "div",
|
|
279
|
+
props: mergeProps({ className: cn("flex flex-col gap-1", className) }, props),
|
|
280
|
+
render,
|
|
281
|
+
state: { slot: "timeline-header" }
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
//#endregion
|
|
285
|
+
//#region src/components/timeline/timeline-item.tsx
|
|
286
|
+
const timelineItemVariants = tv({
|
|
287
|
+
base: "group/timeline-item relative flex",
|
|
288
|
+
variants: {
|
|
289
|
+
orientation: {
|
|
290
|
+
vertical: "",
|
|
291
|
+
horizontal: ""
|
|
292
|
+
},
|
|
293
|
+
variant: {
|
|
294
|
+
default: "",
|
|
295
|
+
alternate: ""
|
|
296
|
+
},
|
|
297
|
+
isAlternateRight: {
|
|
298
|
+
true: "",
|
|
299
|
+
false: ""
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
compoundVariants: [
|
|
303
|
+
{
|
|
304
|
+
orientation: "vertical",
|
|
305
|
+
variant: "default",
|
|
306
|
+
className: "gap-3 pb-8 last:pb-0"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
orientation: "horizontal",
|
|
310
|
+
variant: "default",
|
|
311
|
+
className: "flex-col gap-3"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
orientation: "vertical",
|
|
315
|
+
variant: "alternate",
|
|
316
|
+
isAlternateRight: false,
|
|
317
|
+
className: "w-1/2 gap-3 pr-6 pb-8 last:pb-0"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
orientation: "vertical",
|
|
321
|
+
variant: "alternate",
|
|
322
|
+
isAlternateRight: true,
|
|
323
|
+
className: "ml-auto w-1/2 flex-row-reverse gap-3 pb-8 pl-6 last:pb-0"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
orientation: "horizontal",
|
|
327
|
+
variant: "alternate",
|
|
328
|
+
className: "grid min-w-0 grid-rows-[1fr_auto_1fr] gap-3"
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
defaultVariants: {
|
|
332
|
+
orientation: "vertical",
|
|
333
|
+
variant: "default",
|
|
334
|
+
isAlternateRight: false
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
const TimelineItem = ({ index, className, children, ...props }) => {
|
|
338
|
+
const { orientation, variant, dir, activeIndex } = useTimeline();
|
|
339
|
+
const status = getItemStatus(index, activeIndex);
|
|
340
|
+
const isAlternateRight = variant === "alternate" && index % 2 === 1;
|
|
341
|
+
const itemContextValue = useMemo(() => ({
|
|
342
|
+
index,
|
|
343
|
+
status,
|
|
344
|
+
isAlternateRight
|
|
345
|
+
}), [
|
|
346
|
+
index,
|
|
347
|
+
status,
|
|
348
|
+
isAlternateRight
|
|
349
|
+
]);
|
|
350
|
+
return /* @__PURE__ */ jsx(TimelineItemContext.Provider, {
|
|
351
|
+
value: itemContextValue,
|
|
352
|
+
children: /* @__PURE__ */ jsx("li", {
|
|
353
|
+
"aria-current": status === "active" ? "step" : void 0,
|
|
354
|
+
className: cn(timelineItemVariants({
|
|
355
|
+
orientation,
|
|
356
|
+
variant,
|
|
357
|
+
isAlternateRight
|
|
358
|
+
}), className),
|
|
359
|
+
"data-alternate-right": isAlternateRight ? "" : void 0,
|
|
360
|
+
"data-orientation": orientation,
|
|
361
|
+
"data-slot": "timeline-item",
|
|
362
|
+
"data-status": status,
|
|
363
|
+
dir,
|
|
364
|
+
...props,
|
|
365
|
+
children
|
|
366
|
+
})
|
|
367
|
+
});
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
//#endregion
|
|
371
|
+
//#region src/components/timeline/timeline-time.tsx
|
|
372
|
+
const TimelineTime = ({ className, render, ...props }) => useRender({
|
|
373
|
+
defaultTagName: "time",
|
|
374
|
+
props: mergeProps({ className: cn("text-muted-foreground text-xs", className) }, props),
|
|
375
|
+
render,
|
|
376
|
+
state: { slot: "timeline-time" }
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
//#endregion
|
|
380
|
+
//#region src/components/timeline/timeline-title.tsx
|
|
381
|
+
const TimelineTitle = ({ className, render, ...props }) => useRender({
|
|
382
|
+
defaultTagName: "div",
|
|
383
|
+
props: mergeProps({ className: cn("font-semibold leading-none", className) }, props),
|
|
384
|
+
render,
|
|
385
|
+
state: { slot: "timeline-title" }
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
//#endregion
|
|
389
|
+
export { TimelineDot as a, TimelineConnector as c, TimelineHeader as i, TimelineContext as l, TimelineTime as n, TimelineDescription as o, TimelineItem as r, TimelineContent as s, TimelineTitle as t };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { toggleVariants } from "./ui/toggle.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 { Toggle } from "@base-ui/react/toggle";
|
|
7
|
+
|
|
8
|
+
//#region src/components/toggle-group/toggle-group-context.d.ts
|
|
9
|
+
declare const ToggleGroupContext: react.Context<VariantProps<tailwind_variants0.TVReturnType<{
|
|
10
|
+
variant: {
|
|
11
|
+
default: string;
|
|
12
|
+
outline: string;
|
|
13
|
+
};
|
|
14
|
+
size: {
|
|
15
|
+
default: string;
|
|
16
|
+
sm: string;
|
|
17
|
+
lg: string;
|
|
18
|
+
};
|
|
19
|
+
}, 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", {
|
|
20
|
+
variant: {
|
|
21
|
+
default: string;
|
|
22
|
+
outline: string;
|
|
23
|
+
};
|
|
24
|
+
size: {
|
|
25
|
+
default: string;
|
|
26
|
+
sm: string;
|
|
27
|
+
lg: string;
|
|
28
|
+
};
|
|
29
|
+
}, undefined, tailwind_variants0.TVReturnType<{
|
|
30
|
+
variant: {
|
|
31
|
+
default: string;
|
|
32
|
+
outline: string;
|
|
33
|
+
};
|
|
34
|
+
size: {
|
|
35
|
+
default: string;
|
|
36
|
+
sm: string;
|
|
37
|
+
lg: string;
|
|
38
|
+
};
|
|
39
|
+
}, 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>>> & {
|
|
40
|
+
spacing?: number;
|
|
41
|
+
orientation?: "horizontal" | "vertical";
|
|
42
|
+
}>;
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/components/toggle-group/toggle-group-item.d.ts
|
|
45
|
+
declare const ToggleGroupItem: ({
|
|
46
|
+
className,
|
|
47
|
+
children,
|
|
48
|
+
variant,
|
|
49
|
+
size,
|
|
50
|
+
...props
|
|
51
|
+
}: Toggle.Props & VariantProps<typeof toggleVariants>) => react_jsx_runtime0.JSX.Element;
|
|
52
|
+
//#endregion
|
|
53
|
+
export { ToggleGroupContext as n, ToggleGroupItem as t };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { toggleVariants } from "./ui/toggle.js";
|
|
2
|
+
import { cn } from "tailwind-variants";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { createContext, useContext } from "react";
|
|
5
|
+
import { Toggle } from "@base-ui/react/toggle";
|
|
6
|
+
|
|
7
|
+
//#region src/components/toggle-group/toggle-group-context.tsx
|
|
8
|
+
const ToggleGroupContext = createContext({
|
|
9
|
+
size: "default",
|
|
10
|
+
variant: "default",
|
|
11
|
+
spacing: 0,
|
|
12
|
+
orientation: "horizontal"
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/toggle-group/toggle-group-item.tsx
|
|
17
|
+
const ToggleGroupItem = ({ className, children, variant = "default", size = "default", ...props }) => {
|
|
18
|
+
const context = useContext(ToggleGroupContext);
|
|
19
|
+
return /* @__PURE__ */ jsx(Toggle, {
|
|
20
|
+
className: cn("shrink-0 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:rounded-none 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]:border-l-0 group-data-[spacing=0]/toggle-group:px-2 group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md", toggleVariants({
|
|
21
|
+
variant: context.variant || variant,
|
|
22
|
+
size: context.size || size
|
|
23
|
+
}), className),
|
|
24
|
+
"data-size": context.size || size,
|
|
25
|
+
"data-slot": "toggle-group-item",
|
|
26
|
+
"data-spacing": context.spacing,
|
|
27
|
+
"data-variant": context.variant || variant,
|
|
28
|
+
...props,
|
|
29
|
+
children
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { ToggleGroupContext as n, ToggleGroupItem as t };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { buttonVariants } from "./ui/button.js";
|
|
2
|
+
import { VariantProps } from "tailwind-variants";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import { Toolbar } from "@base-ui/react/toolbar";
|
|
5
|
+
|
|
6
|
+
//#region src/components/toolbar/toolbar-button.d.ts
|
|
7
|
+
type ToolbarButtonProps = Toolbar.Button.Props & VariantProps<typeof buttonVariants>;
|
|
8
|
+
declare const ToolbarButton: ({
|
|
9
|
+
className,
|
|
10
|
+
variant,
|
|
11
|
+
size,
|
|
12
|
+
...props
|
|
13
|
+
}: ToolbarButtonProps) => react_jsx_runtime0.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/toolbar/toolbar-group.d.ts
|
|
16
|
+
type ToolbarGroupProps = Toolbar.Group.Props;
|
|
17
|
+
declare const ToolbarGroup: ({
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}: ToolbarGroupProps) => react_jsx_runtime0.JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/toolbar/toolbar-input.d.ts
|
|
23
|
+
type ToolbarInputProps = Toolbar.Input.Props;
|
|
24
|
+
declare const ToolbarInput: (props: ToolbarInputProps) => react_jsx_runtime0.JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/toolbar/toolbar-link.d.ts
|
|
27
|
+
type ToolbarLinkProps = Toolbar.Link.Props;
|
|
28
|
+
declare const ToolbarLink: ({
|
|
29
|
+
className,
|
|
30
|
+
...props
|
|
31
|
+
}: ToolbarLinkProps) => react_jsx_runtime0.JSX.Element;
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/toolbar/toolbar-separator.d.ts
|
|
34
|
+
type ToolbarSeparatorProps = Toolbar.Separator.Props;
|
|
35
|
+
declare const ToolbarSeparator: ({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}: ToolbarSeparatorProps) => react_jsx_runtime0.JSX.Element;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { ToolbarInput as a, ToolbarGroupProps as c, ToolbarLinkProps as i, ToolbarButton as l, ToolbarSeparatorProps as n, ToolbarInputProps as o, ToolbarLink as r, ToolbarGroup as s, ToolbarSeparator as t, ToolbarButtonProps as u };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { buttonVariants } from "./ui/button.js";
|
|
2
|
+
import { cn } from "tailwind-variants";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Toolbar } from "@base-ui/react/toolbar";
|
|
5
|
+
|
|
6
|
+
//#region src/components/toolbar/toolbar-button.tsx
|
|
7
|
+
const ToolbarButton = ({ className, variant = "ghost", size = "default", ...props }) => /* @__PURE__ */ jsx(Toolbar.Button, {
|
|
8
|
+
className: cn(buttonVariants({
|
|
9
|
+
variant,
|
|
10
|
+
size
|
|
11
|
+
}), "shrink-0", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/toolbar/toolbar-group.tsx
|
|
17
|
+
const ToolbarGroup = ({ className, ...props }) => /* @__PURE__ */ jsx(Toolbar.Group, {
|
|
18
|
+
className: cn("flex items-center gap-1", className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/components/toolbar/toolbar-input.tsx
|
|
24
|
+
const ToolbarInput = (props) => /* @__PURE__ */ jsx(Toolbar.Input, { ...props });
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/components/toolbar/toolbar-link.tsx
|
|
28
|
+
const ToolbarLink = ({ className, ...props }) => /* @__PURE__ */ jsx(Toolbar.Link, {
|
|
29
|
+
className: cn("inline-flex h-9 shrink-0 items-center gap-2 rounded-lg px-4 text-muted-foreground text-sm no-underline transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/components/toolbar/toolbar-separator.tsx
|
|
35
|
+
const ToolbarSeparator = ({ className, ...props }) => /* @__PURE__ */ jsx(Toolbar.Separator, {
|
|
36
|
+
className: cn("h-6 w-px shrink-0 bg-border", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { ToolbarButton as a, ToolbarGroup as i, ToolbarLink as n, ToolbarInput as r, ToolbarSeparator as t };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip } from "@base-ui/react/tooltip";
|
|
3
|
+
|
|
4
|
+
//#region src/components/tooltip/tooltip-content.d.ts
|
|
5
|
+
declare const TooltipContent: ({
|
|
6
|
+
className,
|
|
7
|
+
side,
|
|
8
|
+
sideOffset,
|
|
9
|
+
align,
|
|
10
|
+
alignOffset,
|
|
11
|
+
children,
|
|
12
|
+
...props
|
|
13
|
+
}: Tooltip.Popup.Props & Pick<Tooltip.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">) => react_jsx_runtime0.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/tooltip/tooltip-provider.d.ts
|
|
16
|
+
declare const TooltipProvider: ({
|
|
17
|
+
delay,
|
|
18
|
+
...props
|
|
19
|
+
}: Tooltip.Provider.Props) => react_jsx_runtime0.JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/components/tooltip/tooltip-trigger.d.ts
|
|
22
|
+
declare const TooltipTrigger: ({
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
}: Tooltip.Trigger.Props) => react_jsx_runtime0.JSX.Element;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { TooltipProvider as n, TooltipContent as r, TooltipTrigger as t };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { cn } from "tailwind-variants";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Tooltip } from "@base-ui/react/tooltip";
|
|
4
|
+
|
|
5
|
+
//#region src/components/tooltip/tooltip-content.tsx
|
|
6
|
+
const TooltipContent = ({ className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props }) => /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
7
|
+
align,
|
|
8
|
+
alignOffset,
|
|
9
|
+
className: "isolate z-50",
|
|
10
|
+
side,
|
|
11
|
+
sideOffset,
|
|
12
|
+
children: /* @__PURE__ */ jsxs(Tooltip.Popup, {
|
|
13
|
+
className: cn("data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md bg-foreground px-3 py-1.5 text-background text-xs data-[state=delayed-open]:animate-in data-closed:animate-out data-open:animate-in", className),
|
|
14
|
+
"data-slot": "tooltip-content",
|
|
15
|
+
...props,
|
|
16
|
+
children: [children, /* @__PURE__ */ jsx(Tooltip.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=right]:top-1/2! data-[side=left]:-right-1 data-[side=top]:-bottom-2.5 data-[side=right]:-left-1 data-[side=left]:-translate-y-1/2 data-[side=right]:-translate-y-1/2" })]
|
|
17
|
+
})
|
|
18
|
+
}) });
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/components/tooltip/tooltip-provider.tsx
|
|
22
|
+
const TooltipProvider = ({ delay = 0, ...props }) => /* @__PURE__ */ jsx(Tooltip.Provider, {
|
|
23
|
+
"data-slot": "tooltip-provider",
|
|
24
|
+
delay,
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/components/tooltip/tooltip-trigger.tsx
|
|
30
|
+
const TooltipTrigger = ({ className, ...props }) => /* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
31
|
+
className: cn("cursor-pointer", className),
|
|
32
|
+
"data-slot": "tooltip-trigger",
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { TooltipProvider as n, TooltipContent as r, TooltipTrigger as t };
|