@warmio/ui 1.4.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/LICENSES/fluid-functionalism.txt +24 -0
  2. package/README.md +23 -14
  3. package/dist/badge.js +2 -2
  4. package/dist/button.js +4 -1
  5. package/dist/chunks/chunk-A2PN77YE.js +42 -0
  6. package/dist/chunks/chunk-DHV2A22F.js +240 -0
  7. package/dist/chunks/chunk-DOOSH3V6.js +72 -0
  8. package/dist/chunks/chunk-EIEA5RJJ.js +97 -0
  9. package/dist/chunks/chunk-FKGHMPVW.js +875 -0
  10. package/dist/chunks/chunk-K36HD5J5.js +133 -0
  11. package/dist/chunks/chunk-L6L3GVGM.js +130 -0
  12. package/dist/chunks/chunk-MGX6ZL6Q.js +224 -0
  13. package/dist/chunks/chunk-MVUHHKBL.js +492 -0
  14. package/dist/chunks/chunk-PJUNSOJK.js +116 -0
  15. package/dist/chunks/chunk-RVVHR7RY.js +0 -0
  16. package/dist/chunks/chunk-U7D32UN3.js +0 -0
  17. package/dist/chunks/chunk-W24JGQWM.js +65 -0
  18. package/dist/dropdown-menu.js +4 -3
  19. package/dist/entries/badge.css +178 -0
  20. package/dist/entries/button.css +422 -0
  21. package/dist/entries/dropdown-menu.css +167 -0
  22. package/dist/entries/index.css +2789 -0
  23. package/dist/entries/logo.css +147 -0
  24. package/dist/entries/product-header.css +88 -0
  25. package/dist/entries/sheet.css +666 -0
  26. package/dist/entries/sidebar.css +2108 -0
  27. package/dist/entries/text.css +97 -0
  28. package/dist/index.js +17 -13
  29. package/dist/logo.js +2 -2
  30. package/dist/product-header.js +2 -2
  31. package/dist/product-header.types.d.ts +3 -2
  32. package/dist/sheet.js +5 -3
  33. package/dist/sidebar.css +129 -0
  34. package/dist/sidebar.js +7 -3
  35. package/dist/text.css +121 -0
  36. package/dist/text.js +2 -2
  37. package/package.json +15 -5
  38. package/types/badge.d.ts +10 -2
  39. package/types/button.d.ts +65 -9
  40. package/types/sidebar.d.ts +10 -2
  41. package/types/text.d.ts +10 -2
  42. package/dist/chunks/chunk-4RQCHKAW.js +0 -105
  43. package/dist/chunks/chunk-FW2EHGRK.js +0 -748
  44. package/dist/chunks/chunk-GKEYV2XW.js +0 -10
  45. package/dist/chunks/chunk-HDCV4ACN.js +0 -469
  46. package/dist/chunks/chunk-ICC7GQXS.js +0 -74
  47. package/dist/chunks/chunk-KN6WVLCR.js +0 -261
  48. package/dist/chunks/chunk-MIMC4M6W.js +0 -86
  49. package/dist/chunks/chunk-PBWF6BDE.js +0 -88
  50. package/dist/chunks/chunk-VIB7OX7D.js +0 -10
  51. package/dist/chunks/chunk-YTDMREDR.js +0 -201
@@ -1,261 +0,0 @@
1
- import {
2
- cn
3
- } from "./chunk-VIB7OX7D.js";
4
-
5
- // ../ui/src/warmio/dropdown-menu.tsx
6
- import * as React from "react";
7
- import { Menu as MenuPrimitive } from "@base-ui/react/menu";
8
- import { CheckIcon } from "lucide-react";
9
- import { jsx, jsxs } from "react/jsx-runtime";
10
- function DropdownMenu(props) {
11
- return /* @__PURE__ */ jsx(MenuPrimitive.Root, { ...props });
12
- }
13
- function DropdownMenuTrigger({
14
- asChild = false,
15
- children,
16
- render,
17
- className: _className,
18
- style: _style,
19
- ...props
20
- }) {
21
- const resolvedRender = render ?? (asChild && React.isValidElement(children) ? children : void 0);
22
- return /* @__PURE__ */ jsx(MenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", render: resolvedRender, ...props, children: resolvedRender ? void 0 : children });
23
- }
24
- var dropdownMenuContentSizeClasses = {
25
- default: "w-(--anchor-width) min-w-32",
26
- auto: "w-auto min-w-[14rem]",
27
- sidebar: "w-(--sidebar-width)"
28
- };
29
- var dropdownMenuContentSpacingClasses = {
30
- default: "",
31
- roomy: "flex flex-col gap-2"
32
- };
33
- function DropdownMenuContent({
34
- align = "start",
35
- alignOffset = 0,
36
- side = "bottom",
37
- sideOffset = 4,
38
- portal = true,
39
- size = "default",
40
- spacing = "default",
41
- children,
42
- ref,
43
- className: _className,
44
- style: _style,
45
- ...props
46
- }) {
47
- const content = /* @__PURE__ */ jsx(
48
- MenuPrimitive.Positioner,
49
- {
50
- align,
51
- alignOffset,
52
- side,
53
- sideOffset,
54
- className: "isolate z-50 outline-none",
55
- children: /* @__PURE__ */ jsx(
56
- MenuPrimitive.Popup,
57
- {
58
- ref,
59
- "data-slot": "dropdown-menu-content",
60
- className: cn(
61
- "z-[var(--z-popover)] max-h-(--available-height) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-2 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none",
62
- dropdownMenuContentSizeClasses[size],
63
- dropdownMenuContentSpacingClasses[spacing],
64
- "data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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",
65
- "data-open:animate-in data-open:fade-in-0 data-open:zoom-in-90 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none"
66
- ),
67
- ...props,
68
- children
69
- }
70
- )
71
- }
72
- );
73
- return portal ? /* @__PURE__ */ jsx(MenuPrimitive.Portal, { children: content }) : content;
74
- }
75
- function DropdownMenuGroup({
76
- className: _className,
77
- style: _style,
78
- ...props
79
- }) {
80
- return /* @__PURE__ */ jsx(MenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
81
- }
82
- function DropdownMenuItem({
83
- className: _className,
84
- inset,
85
- variant = "default",
86
- ref,
87
- style: _style,
88
- ...props
89
- }) {
90
- return /* @__PURE__ */ jsx(
91
- MenuPrimitive.Item,
92
- {
93
- ref,
94
- "data-slot": "dropdown-menu-item",
95
- "data-inset": inset,
96
- "data-variant": variant,
97
- className: "group/dropdown-menu-item relative flex w-full cursor-default items-center gap-2 rounded-lg px-2 py-2 text-sm outline-hidden select-none not-data-[variant=destructive]:focus:bg-sidebar-accent not-data-[variant=destructive]:focus:text-sidebar-accent-foreground not-data-[variant=destructive]:focus:**:text-sidebar-accent-foreground data-inset:pl-4 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
98
- ...props
99
- }
100
- );
101
- }
102
- function DropdownMenuLinkItem({
103
- className: _className,
104
- children,
105
- href,
106
- inset,
107
- variant = "default",
108
- ref,
109
- style: _style,
110
- ...props
111
- }) {
112
- return /* @__PURE__ */ jsx(
113
- MenuPrimitive.Item,
114
- {
115
- ref,
116
- "data-slot": "dropdown-menu-item",
117
- "data-inset": inset,
118
- "data-variant": variant,
119
- className: "group/dropdown-menu-item relative flex w-full cursor-default items-center gap-2 rounded-lg px-2 py-2 text-sm outline-hidden select-none not-data-[variant=destructive]:focus:bg-sidebar-accent not-data-[variant=destructive]:focus:text-sidebar-accent-foreground not-data-[variant=destructive]:focus:**:text-sidebar-accent-foreground data-inset:pl-4 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
120
- render: /* @__PURE__ */ jsx("a", { href, children }),
121
- ...props
122
- }
123
- );
124
- }
125
- function DropdownMenuCheckboxItem({
126
- children,
127
- checked,
128
- inset,
129
- className: _className,
130
- ref,
131
- style: _style,
132
- onCheckedChange,
133
- ...props
134
- }) {
135
- const handleCheckedChange = (nextChecked, eventDetails) => {
136
- onCheckedChange?.(nextChecked, eventDetails);
137
- };
138
- return /* @__PURE__ */ jsxs(
139
- MenuPrimitive.CheckboxItem,
140
- {
141
- ref,
142
- "data-slot": "dropdown-menu-checkbox-item",
143
- "data-inset": inset,
144
- className: "relative flex cursor-default items-center gap-2 rounded-lg py-2 pr-4 pl-2 text-sm outline-hidden select-none focus:bg-sidebar-accent focus:text-sidebar-accent-foreground focus:**:text-sidebar-accent-foreground data-inset:pl-4 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
145
- checked,
146
- onCheckedChange: handleCheckedChange,
147
- ...props,
148
- children: [
149
- /* @__PURE__ */ jsx(
150
- "span",
151
- {
152
- className: "pointer-events-none absolute right-2 flex items-center justify-center",
153
- "data-slot": "dropdown-menu-checkbox-item-indicator",
154
- children: /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
155
- }
156
- ),
157
- children
158
- ]
159
- }
160
- );
161
- }
162
- function DropdownMenuRadioGroup({
163
- className: _className,
164
- onValueChange,
165
- style: _style,
166
- ...props
167
- }) {
168
- const handleValueChange = (value, eventDetails) => {
169
- onValueChange?.(value, eventDetails);
170
- };
171
- return /* @__PURE__ */ jsx(
172
- MenuPrimitive.RadioGroup,
173
- {
174
- "data-slot": "dropdown-menu-radio-group",
175
- onValueChange: handleValueChange,
176
- ...props
177
- }
178
- );
179
- }
180
- function DropdownMenuRadioItem({
181
- children,
182
- inset,
183
- className: _className,
184
- presentation,
185
- ref,
186
- style: _style,
187
- ...props
188
- }) {
189
- return /* @__PURE__ */ jsxs(
190
- MenuPrimitive.RadioItem,
191
- {
192
- ref,
193
- "data-slot": "dropdown-menu-radio-item",
194
- "data-inset": inset,
195
- className: cn(
196
- "relative flex cursor-default items-center gap-2 rounded-lg py-2 pr-4 pl-2 text-sm outline-hidden select-none focus:bg-sidebar-accent focus:text-sidebar-accent-foreground focus:**:text-sidebar-accent-foreground data-inset:pl-4 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
197
- presentation === "selectMenu" && "min-h-12 text-base"
198
- ),
199
- ...props,
200
- children: [
201
- /* @__PURE__ */ jsx(
202
- "span",
203
- {
204
- className: "pointer-events-none absolute right-2 flex items-center justify-center",
205
- "data-slot": "dropdown-menu-radio-item-indicator",
206
- children: /* @__PURE__ */ jsx(MenuPrimitive.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
207
- }
208
- ),
209
- children
210
- ]
211
- }
212
- );
213
- }
214
- function DropdownMenuLabel({
215
- className: _className,
216
- inset,
217
- ref,
218
- style: _style,
219
- ...props
220
- }) {
221
- return /* @__PURE__ */ jsx(
222
- MenuPrimitive.GroupLabel,
223
- {
224
- ref,
225
- "data-slot": "dropdown-menu-label",
226
- "data-inset": inset,
227
- className: "px-2 py-2 text-xs font-bold text-muted-foreground data-inset:pl-4",
228
- ...props
229
- }
230
- );
231
- }
232
- function DropdownMenuSeparator({
233
- className: _className,
234
- ref,
235
- style: _style,
236
- ...props
237
- }) {
238
- return /* @__PURE__ */ jsx(
239
- MenuPrimitive.Separator,
240
- {
241
- ref,
242
- "data-slot": "dropdown-menu-separator",
243
- className: "mx-0 my-0 h-px bg-border",
244
- ...props
245
- }
246
- );
247
- }
248
-
249
- export {
250
- DropdownMenu,
251
- DropdownMenuTrigger,
252
- DropdownMenuContent,
253
- DropdownMenuGroup,
254
- DropdownMenuItem,
255
- DropdownMenuLinkItem,
256
- DropdownMenuCheckboxItem,
257
- DropdownMenuRadioGroup,
258
- DropdownMenuRadioItem,
259
- DropdownMenuLabel,
260
- DropdownMenuSeparator
261
- };
@@ -1,86 +0,0 @@
1
- import {
2
- SheetClose,
3
- SheetContent,
4
- SheetDescription,
5
- SheetFooter,
6
- SheetHeader,
7
- SheetTitle,
8
- SheetTrigger
9
- } from "./chunk-YTDMREDR.js";
10
-
11
- // ../ui/src/warmio/sheet.tsx
12
- import { jsx } from "react/jsx-runtime";
13
- function SheetTrigger2({
14
- className: _className,
15
- style: _style,
16
- ...props
17
- }) {
18
- return /* @__PURE__ */ jsx(SheetTrigger, { ...props });
19
- }
20
- function SheetClose2({ className: _className, style: _style, ...props }) {
21
- return /* @__PURE__ */ jsx(SheetClose, { ...props });
22
- }
23
- function SheetContent2({
24
- className: _className,
25
- overlayClassName: _overlayClassName,
26
- presentation,
27
- responsive = "always",
28
- style: _style,
29
- width = "default",
30
- ...props
31
- }) {
32
- const navigationClassName = presentation === "navigation" ? `w-[var(--sidebar-width-mobile)] gap-0 overflow-hidden border-border bg-sidebar p-0 text-foreground duration-200 ease-in-out data-open:fade-in-100 data-closed:fade-out-100${responsive === "mobileOnly" ? " md:hidden" : ""}` : void 0;
33
- const widthClassName = width === "full" ? "w-full data-[side=left]:sm:max-w-none data-[side=right]:sm:max-w-none" : width === "wide" ? "w-full data-[side=left]:sm:max-w-lg data-[side=right]:sm:max-w-lg" : void 0;
34
- const contentClassName = presentation === "scroll" ? `overflow-y-auto${widthClassName ? ` ${widthClassName}` : ""}` : navigationClassName ?? widthClassName;
35
- return /* @__PURE__ */ jsx(
36
- SheetContent,
37
- {
38
- ...props,
39
- className: contentClassName,
40
- ...presentation === "navigation" ? { overlayClassName: "duration-200 ease-in-out" } : {}
41
- }
42
- );
43
- }
44
- function SheetFooter2({ className: _className, style: _style, ...props }) {
45
- return /* @__PURE__ */ jsx(SheetFooter, { ...props });
46
- }
47
- function SheetHeader2({
48
- className: _className,
49
- presentation,
50
- style: _style,
51
- ...props
52
- }) {
53
- const className = presentation === "navigation" ? "border-b border-border bg-background p-0" : void 0;
54
- return /* @__PURE__ */ jsx(SheetHeader, { ...props, className });
55
- }
56
- function SheetTitle2({
57
- className: _className,
58
- presentation,
59
- style: _style,
60
- ...props
61
- }) {
62
- return /* @__PURE__ */ jsx(
63
- SheetTitle,
64
- {
65
- ...props,
66
- className: presentation === "navigation" ? "min-w-0 truncate text-left text-base font-bold text-foreground" : void 0
67
- }
68
- );
69
- }
70
- function SheetDescription2({
71
- className: _className,
72
- style: _style,
73
- ...props
74
- }) {
75
- return /* @__PURE__ */ jsx(SheetDescription, { ...props });
76
- }
77
-
78
- export {
79
- SheetTrigger2 as SheetTrigger,
80
- SheetClose2 as SheetClose,
81
- SheetContent2 as SheetContent,
82
- SheetFooter2 as SheetFooter,
83
- SheetHeader2 as SheetHeader,
84
- SheetTitle2 as SheetTitle,
85
- SheetDescription2 as SheetDescription
86
- };
@@ -1,88 +0,0 @@
1
- import {
2
- cn
3
- } from "./chunk-VIB7OX7D.js";
4
-
5
- // ../ui/src/warmio/product-header.tsx
6
- import { Fragment, memo } from "react";
7
- import { ChevronRight } from "lucide-react";
8
- import { Fragment as Fragment2, jsx, jsxs } from "react/jsx-runtime";
9
- function getTitleSegments(pageTitle, productName) {
10
- return pageTitle?.split(">").reduce((segments, rawSegment) => {
11
- const segment = rawSegment.trim();
12
- if (!segment || segments.length === 0 && segment === productName) return segments;
13
- segments.push(segment);
14
- return segments;
15
- }, []);
16
- }
17
- function ProductHeaderBreadcrumb({
18
- pageTitle,
19
- productName = "Warm"
20
- }) {
21
- const titleSegments = getTitleSegments(pageTitle, productName);
22
- return /* @__PURE__ */ jsxs(Fragment2, { children: [
23
- /* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: productName }),
24
- titleSegments?.map((segment, index) => {
25
- const isLast = index === titleSegments.length - 1;
26
- return /* @__PURE__ */ jsxs(Fragment, { children: [
27
- /* @__PURE__ */ jsx(ChevronRight, { className: "size-4 text-foreground" }),
28
- isLast ? /* @__PURE__ */ jsx("h1", { "aria-current": "page", children: segment }) : /* @__PURE__ */ jsx("span", { className: "text-sm text-foreground", children: segment })
29
- ] }, `${segment}-${index}`);
30
- })
31
- ] });
32
- }
33
- var ProductHeader = memo(function ProductHeader2({
34
- actions,
35
- actionsTargetRef,
36
- desktopShell = false,
37
- hideBreadcrumb = false,
38
- leading,
39
- pageTitle,
40
- productName,
41
- titleTargetRef,
42
- visibility = "desktop"
43
- }) {
44
- return /* @__PURE__ */ jsxs(
45
- "header",
46
- {
47
- className: cn(
48
- "sticky top-0 z-20 h-[var(--header-height)] shrink-0 items-center border-b border-border bg-sidebar",
49
- visibility === "always" ? "flex" : visibility === "container" ? "hidden @3xl/main:flex" : "hidden md:flex",
50
- desktopShell && "select-none bg-sidebar/95 supports-[backdrop-filter]:bg-sidebar/85 supports-[backdrop-filter]:backdrop-blur"
51
- ),
52
- "data-tauri-drag-region": desktopShell ? "deep" : void 0,
53
- children: [
54
- /* @__PURE__ */ jsxs(
55
- "div",
56
- {
57
- ref: titleTargetRef,
58
- className: "flex min-w-0 items-center gap-2 px-4 [&_h1]:text-sm [&_h1]:text-foreground [&:has(>[data-page-chrome-content])>[data-page-chrome-fallback]]:hidden",
59
- children: [
60
- leading,
61
- hideBreadcrumb ? null : /* @__PURE__ */ jsx("div", { "data-page-chrome-fallback": true, className: "contents", children: /* @__PURE__ */ jsx(
62
- ProductHeaderBreadcrumb,
63
- {
64
- ...pageTitle !== void 0 ? { pageTitle } : {},
65
- ...productName !== void 0 ? { productName } : {}
66
- }
67
- ) })
68
- ]
69
- }
70
- ),
71
- /* @__PURE__ */ jsx(
72
- "div",
73
- {
74
- ref: actionsTargetRef,
75
- className: "ml-auto flex items-center gap-2 px-4 [&:has(>[data-page-chrome-content])>[data-page-chrome-fallback]]:hidden",
76
- children: actions ? /* @__PURE__ */ jsx("div", { "data-page-chrome-fallback": true, className: "contents", children: actions }) : null
77
- }
78
- )
79
- ]
80
- }
81
- );
82
- });
83
- ProductHeader.displayName = "ProductHeader";
84
-
85
- export {
86
- ProductHeaderBreadcrumb,
87
- ProductHeader
88
- };
@@ -1,10 +0,0 @@
1
- // ../ui/src/lib/utils.ts
2
- import { clsx } from "clsx";
3
- import { twMerge } from "tailwind-merge";
4
- function cn(...inputs) {
5
- return twMerge(clsx(inputs));
6
- }
7
-
8
- export {
9
- cn
10
- };
@@ -1,201 +0,0 @@
1
- import {
2
- cn
3
- } from "./chunk-VIB7OX7D.js";
4
-
5
- // ../ui/src/components/sheet.tsx
6
- import * as React2 from "react";
7
- import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
8
-
9
- // ../ui/src/lib/modal-backdrop.ts
10
- var MODAL_BACKDROP_CLASS_NAME = "bg-black/50 supports-backdrop-filter:backdrop-blur-[2px]";
11
-
12
- // ../ui/src/components/button.tsx
13
- import * as React from "react";
14
- import { Button as ButtonPrimitive } from "@base-ui/react/button";
15
-
16
- // ../ui/src/components/button.variants.ts
17
- import { cva } from "class-variance-authority";
18
- var buttonVariants = cva(
19
- "group/button inline-flex box-border shrink-0 items-center justify-center rounded-full bg-clip-padding text-sm font-normal whitespace-nowrap transition-[color,background-color,box-shadow,border-color,transform] duration-200 ease-out outline-none select-none focus-visible:ring-3 focus-visible:ring-inset focus-visible:ring-ring/50 active:not-aria-[haspopup]:scale-[0.97] motion-reduce:transition-none motion-reduce:active:scale-100 disabled:pointer-events-none disabled:opacity-50 aria-invalid:ring-3 aria-invalid:ring-inset aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
20
- {
21
- variants: {
22
- variant: {
23
- default: "bg-[var(--button-primary-bg)] bg-[image:var(--button-primary-gradient)] text-[color:var(--button-primary-foreground)] shadow-[var(--button-primary-shadow)] hover:bg-[var(--button-primary-hover)] hover:bg-[image:var(--button-primary-gradient-hover)] active:bg-[var(--button-primary-active)]",
24
- outline: "bg-background shadow-[var(--button-outline-shadow)] hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-[var(--warm-surface-raised-dark,var(--input))] dark:[--button-outline-shadow:inset_0_1px_0_rgb(255_255_255_/_0.1)] dark:hover:bg-[var(--warm-surface-raised-hover-dark,var(--muted))]",
25
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
26
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
27
- destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
28
- link: "underline-offset-4 decoration-current hover:underline"
29
- },
30
- size: {
31
- default: "h-9 gap-2 rounded-full px-4 in-data-[slot=button-group]:rounded-full has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
32
- xs: "h-6 gap-2 rounded-full px-2 text-xs in-data-[slot=button-group]:rounded-full has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",
33
- sm: "h-8 gap-2 rounded-full px-2 in-data-[slot=button-group]:rounded-full has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
34
- md: "h-9 gap-2 rounded-full px-4 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
35
- lg: "h-11 gap-2 rounded-full px-4 text-base has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
36
- xl: "h-12 gap-2 rounded-full px-4 text-base has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
37
- jumbo: "h-14 gap-2 rounded-full px-4 text-lg font-bold has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4 [&_svg:not([class*='size-'])]:size-5",
38
- option: "h-auto min-h-16 items-start justify-start gap-2 whitespace-normal rounded-full px-4 py-4 text-sm",
39
- icon: "size-9",
40
- "icon-round": "size-9 rounded-full",
41
- "icon-xs": "size-6 rounded-full in-data-[slot=button-group]:rounded-full [&_svg:not([class*='size-'])]:size-3",
42
- "icon-sm": "size-8 rounded-full in-data-[slot=button-group]:rounded-full",
43
- "icon-lg": "size-10",
44
- "icon-xl": "size-11 rounded-full",
45
- "input-icon": "h-full w-10 rounded-l-none"
46
- }
47
- },
48
- defaultVariants: {
49
- variant: "default",
50
- size: "default"
51
- }
52
- }
53
- );
54
-
55
- // ../ui/src/components/button.tsx
56
- import { jsx } from "react/jsx-runtime";
57
- function Button({
58
- className,
59
- variant = "default",
60
- size = "default",
61
- asChild = false,
62
- render,
63
- children,
64
- ...props
65
- }) {
66
- const resolvedRender = render ?? (asChild && React.isValidElement(children) ? children : void 0);
67
- return /* @__PURE__ */ jsx(
68
- ButtonPrimitive,
69
- {
70
- "data-slot": "button",
71
- "data-variant": variant,
72
- "data-size": size,
73
- className: cn(buttonVariants({ variant, size }), className),
74
- ...props,
75
- render: resolvedRender,
76
- children: resolvedRender ? void 0 : children
77
- }
78
- );
79
- }
80
-
81
- // ../ui/src/components/sheet.tsx
82
- import { XIcon } from "lucide-react";
83
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
84
- function Sheet(props) {
85
- return /* @__PURE__ */ jsx2(SheetPrimitive.Root, { ...props });
86
- }
87
- function SheetTrigger({ asChild = false, children, render, ...props }) {
88
- const resolvedRender = render ?? (asChild && React2.isValidElement(children) ? children : void 0);
89
- return /* @__PURE__ */ jsx2(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", render: resolvedRender, ...props, children: resolvedRender ? void 0 : children });
90
- }
91
- function SheetClose({ asChild = false, children, render, ...props }) {
92
- const resolvedRender = render ?? (asChild && React2.isValidElement(children) ? children : void 0);
93
- return /* @__PURE__ */ jsx2(SheetPrimitive.Close, { "data-slot": "sheet-close", render: resolvedRender, ...props, children: resolvedRender ? void 0 : children });
94
- }
95
- function SheetPortal({ ...props }) {
96
- return /* @__PURE__ */ jsx2(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
97
- }
98
- function SheetOverlay({ className, ...props }) {
99
- return /* @__PURE__ */ jsx2(
100
- SheetPrimitive.Backdrop,
101
- {
102
- "data-slot": "sheet-overlay",
103
- className: cn(
104
- "fixed inset-0 z-[var(--z-overlay-backdrop)] duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
105
- MODAL_BACKDROP_CLASS_NAME,
106
- className
107
- ),
108
- ...props
109
- }
110
- );
111
- }
112
- function SheetContent({
113
- className,
114
- children,
115
- side = "right",
116
- showCloseButton = true,
117
- overlayClassName,
118
- ...props
119
- }) {
120
- return /* @__PURE__ */ jsxs(SheetPortal, { children: [
121
- /* @__PURE__ */ jsx2(SheetOverlay, { className: overlayClassName }),
122
- /* @__PURE__ */ jsxs(
123
- SheetPrimitive.Popup,
124
- {
125
- "data-slot": "sheet-content",
126
- "data-side": side,
127
- className: cn(
128
- "fixed z-[calc(var(--z-overlay-backdrop)+1)] flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:max-h-[calc(100dvh-var(--safe-area-inset-top)-var(--safe-area-inset-bottom))] data-[side=bottom]:overflow-y-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:max-h-[calc(100dvh-var(--safe-area-inset-top)-var(--safe-area-inset-bottom))] data-[side=top]:overflow-y-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10 motion-reduce:animate-none motion-reduce:transition-none",
129
- className
130
- ),
131
- ...props,
132
- children: [
133
- children,
134
- showCloseButton && /* @__PURE__ */ jsxs(
135
- SheetPrimitive.Close,
136
- {
137
- "data-slot": "sheet-close",
138
- render: /* @__PURE__ */ jsx2(
139
- Button,
140
- {
141
- variant: "ghost",
142
- className: "absolute top-[max(1rem,var(--safe-area-inset-top))] right-[max(1rem,var(--safe-area-inset-right))]",
143
- size: "icon-sm"
144
- }
145
- ),
146
- children: [
147
- /* @__PURE__ */ jsx2(XIcon, {}),
148
- /* @__PURE__ */ jsx2("span", { className: "sr-only", children: "Close" })
149
- ]
150
- }
151
- )
152
- ]
153
- }
154
- )
155
- ] });
156
- }
157
- function SheetHeader({ className, ...props }) {
158
- return /* @__PURE__ */ jsx2("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-2 p-4", className), ...props });
159
- }
160
- function SheetFooter({ className, ...props }) {
161
- return /* @__PURE__ */ jsx2(
162
- "div",
163
- {
164
- "data-slot": "sheet-footer",
165
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
166
- ...props
167
- }
168
- );
169
- }
170
- function SheetTitle({ className, ...props }) {
171
- return /* @__PURE__ */ jsx2(
172
- SheetPrimitive.Title,
173
- {
174
- "data-slot": "sheet-title",
175
- className: cn("font-heading font-bold text-foreground", className),
176
- ...props
177
- }
178
- );
179
- }
180
- function SheetDescription({ className, ...props }) {
181
- return /* @__PURE__ */ jsx2(
182
- SheetPrimitive.Description,
183
- {
184
- "data-slot": "sheet-description",
185
- className: cn("text-sm text-muted-foreground", className),
186
- ...props
187
- }
188
- );
189
- }
190
-
191
- export {
192
- Button,
193
- Sheet,
194
- SheetTrigger,
195
- SheetClose,
196
- SheetContent,
197
- SheetHeader,
198
- SheetFooter,
199
- SheetTitle,
200
- SheetDescription
201
- };