@warmio/ui 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/dist/button.js +10 -0
- package/dist/chunks/chunk-D25QMXJR.js +85 -0
- package/dist/chunks/chunk-KCEDMF2I.js +124 -0
- package/dist/chunks/chunk-OWDC2VC6.js +135 -0
- package/dist/chunks/{chunk-EJ2CNGRW.js → chunk-PBTUB66J.js} +135 -242
- package/dist/chunks/chunk-SK7IZUFC.js +333 -0
- package/dist/chunks/chunk-T2TXMN3G.js +74 -0
- package/dist/chunks/{chunk-HMXXCKZG.js → chunk-VNQVIATP.js} +4 -4
- package/dist/chunks/chunk-ZEDHNFX6.js +92 -0
- package/dist/dropdown-menu.js +28 -0
- package/dist/index.js +63 -2
- package/dist/logo.js +1 -1
- package/dist/sheet.js +24 -0
- package/dist/sidebar.js +7 -1
- package/dist/text.js +9 -0
- package/package.json +23 -2
- package/types/button.d.ts +48 -0
- package/types/dropdown-menu.d.ts +54 -0
- package/types/index.d.ts +4 -0
- package/types/sheet.d.ts +40 -0
- package/types/sidebar.d.ts +26 -3
- package/types/text.d.ts +36 -0
|
@@ -0,0 +1,333 @@
|
|
|
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
|
+
|
|
10
|
+
// ../ui/src/lib/interaction-feedback.ts
|
|
11
|
+
import { play, setEnabled } from "cuelume";
|
|
12
|
+
|
|
13
|
+
// ../ui/src/lib/haptic.ts
|
|
14
|
+
var supportsHaptic = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(pointer: coarse)").matches : false;
|
|
15
|
+
function getWarmCapacitor(win) {
|
|
16
|
+
return win?.Capacitor;
|
|
17
|
+
}
|
|
18
|
+
function isIosCapacitorApp(win = typeof window === "undefined" ? void 0 : window) {
|
|
19
|
+
const capacitor = getWarmCapacitor(win);
|
|
20
|
+
return capacitor?.getPlatform?.() === "ios" && capacitor?.isNativePlatform?.() === true;
|
|
21
|
+
}
|
|
22
|
+
function hasVibrate(nav) {
|
|
23
|
+
return "vibrate" in nav && typeof nav.vibrate === "function";
|
|
24
|
+
}
|
|
25
|
+
function triggerIosCapacitorHaptic() {
|
|
26
|
+
const haptics = getWarmCapacitor(typeof window === "undefined" ? void 0 : window)?.Plugins?.Haptics;
|
|
27
|
+
void haptics?.impact?.({ style: "LIGHT" }).catch(() => {
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function haptic(pattern = 50) {
|
|
31
|
+
try {
|
|
32
|
+
if (isIosCapacitorApp()) {
|
|
33
|
+
triggerIosCapacitorHaptic();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (!supportsHaptic) return;
|
|
37
|
+
if (hasVibrate(navigator)) {
|
|
38
|
+
navigator.vibrate(pattern);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const label = document.createElement("label");
|
|
42
|
+
label.ariaHidden = "true";
|
|
43
|
+
label.style.display = "none";
|
|
44
|
+
const input = document.createElement("input");
|
|
45
|
+
input.type = "checkbox";
|
|
46
|
+
input.setAttribute("switch", "");
|
|
47
|
+
label.appendChild(input);
|
|
48
|
+
try {
|
|
49
|
+
document.head.appendChild(label);
|
|
50
|
+
label.click();
|
|
51
|
+
} finally {
|
|
52
|
+
document.head.removeChild(label);
|
|
53
|
+
}
|
|
54
|
+
} catch {
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ../ui/src/lib/interaction-feedback.ts
|
|
59
|
+
var soundByIntent = {
|
|
60
|
+
press: "press",
|
|
61
|
+
selection: "tick",
|
|
62
|
+
toggle: "toggle"
|
|
63
|
+
};
|
|
64
|
+
var soundsEnabled = false;
|
|
65
|
+
setEnabled(false);
|
|
66
|
+
function triggerInteractionFeedback(intent, options = {}) {
|
|
67
|
+
if (options.haptic) {
|
|
68
|
+
haptic();
|
|
69
|
+
}
|
|
70
|
+
if (!soundsEnabled) return;
|
|
71
|
+
if (typeof document !== "undefined" && document.hidden) return;
|
|
72
|
+
try {
|
|
73
|
+
play(soundByIntent[intent]);
|
|
74
|
+
} catch {
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// ../ui/src/warmio/dropdown-menu.tsx
|
|
79
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
80
|
+
function DropdownMenu(props) {
|
|
81
|
+
return /* @__PURE__ */ jsx(MenuPrimitive.Root, { ...props });
|
|
82
|
+
}
|
|
83
|
+
function DropdownMenuTrigger({
|
|
84
|
+
asChild = false,
|
|
85
|
+
children,
|
|
86
|
+
render,
|
|
87
|
+
className: _className,
|
|
88
|
+
style: _style,
|
|
89
|
+
...props
|
|
90
|
+
}) {
|
|
91
|
+
const resolvedRender = render ?? (asChild && React.isValidElement(children) ? children : void 0);
|
|
92
|
+
return /* @__PURE__ */ jsx(MenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", render: resolvedRender, ...props, children: resolvedRender ? void 0 : children });
|
|
93
|
+
}
|
|
94
|
+
var dropdownMenuContentSizeClasses = {
|
|
95
|
+
default: "w-(--anchor-width) min-w-32",
|
|
96
|
+
auto: "w-auto min-w-[14rem]",
|
|
97
|
+
sidebar: "w-(--sidebar-width)"
|
|
98
|
+
};
|
|
99
|
+
var dropdownMenuContentSpacingClasses = {
|
|
100
|
+
default: "",
|
|
101
|
+
roomy: "flex flex-col gap-2"
|
|
102
|
+
};
|
|
103
|
+
function DropdownMenuContent({
|
|
104
|
+
align = "start",
|
|
105
|
+
alignOffset = 0,
|
|
106
|
+
side = "bottom",
|
|
107
|
+
sideOffset = 4,
|
|
108
|
+
portal = true,
|
|
109
|
+
size = "default",
|
|
110
|
+
spacing = "default",
|
|
111
|
+
children,
|
|
112
|
+
ref,
|
|
113
|
+
className: _className,
|
|
114
|
+
style: _style,
|
|
115
|
+
...props
|
|
116
|
+
}) {
|
|
117
|
+
const content = /* @__PURE__ */ jsx(
|
|
118
|
+
MenuPrimitive.Positioner,
|
|
119
|
+
{
|
|
120
|
+
align,
|
|
121
|
+
alignOffset,
|
|
122
|
+
side,
|
|
123
|
+
sideOffset,
|
|
124
|
+
className: "isolate z-50 outline-none",
|
|
125
|
+
children: /* @__PURE__ */ jsx(
|
|
126
|
+
MenuPrimitive.Popup,
|
|
127
|
+
{
|
|
128
|
+
ref,
|
|
129
|
+
"data-slot": "dropdown-menu-content",
|
|
130
|
+
className: cn(
|
|
131
|
+
"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",
|
|
132
|
+
dropdownMenuContentSizeClasses[size],
|
|
133
|
+
dropdownMenuContentSpacingClasses[spacing],
|
|
134
|
+
"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",
|
|
135
|
+
"data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none"
|
|
136
|
+
),
|
|
137
|
+
...props,
|
|
138
|
+
children
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
return portal ? /* @__PURE__ */ jsx(MenuPrimitive.Portal, { children: content }) : content;
|
|
144
|
+
}
|
|
145
|
+
function DropdownMenuGroup({
|
|
146
|
+
className: _className,
|
|
147
|
+
style: _style,
|
|
148
|
+
...props
|
|
149
|
+
}) {
|
|
150
|
+
return /* @__PURE__ */ jsx(MenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
151
|
+
}
|
|
152
|
+
function DropdownMenuItem({
|
|
153
|
+
className: _className,
|
|
154
|
+
inset,
|
|
155
|
+
variant = "default",
|
|
156
|
+
ref,
|
|
157
|
+
style: _style,
|
|
158
|
+
...props
|
|
159
|
+
}) {
|
|
160
|
+
return /* @__PURE__ */ jsx(
|
|
161
|
+
MenuPrimitive.Item,
|
|
162
|
+
{
|
|
163
|
+
ref,
|
|
164
|
+
"data-slot": "dropdown-menu-item",
|
|
165
|
+
"data-inset": inset,
|
|
166
|
+
"data-variant": variant,
|
|
167
|
+
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-6 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",
|
|
168
|
+
...props
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
function DropdownMenuLinkItem({
|
|
173
|
+
className: _className,
|
|
174
|
+
children,
|
|
175
|
+
href,
|
|
176
|
+
inset,
|
|
177
|
+
variant = "default",
|
|
178
|
+
ref,
|
|
179
|
+
style: _style,
|
|
180
|
+
...props
|
|
181
|
+
}) {
|
|
182
|
+
return /* @__PURE__ */ jsx(
|
|
183
|
+
MenuPrimitive.Item,
|
|
184
|
+
{
|
|
185
|
+
ref,
|
|
186
|
+
"data-slot": "dropdown-menu-item",
|
|
187
|
+
"data-inset": inset,
|
|
188
|
+
"data-variant": variant,
|
|
189
|
+
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-6 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",
|
|
190
|
+
render: /* @__PURE__ */ jsx("a", { href, children }),
|
|
191
|
+
...props
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
function DropdownMenuCheckboxItem({
|
|
196
|
+
children,
|
|
197
|
+
checked,
|
|
198
|
+
inset,
|
|
199
|
+
className: _className,
|
|
200
|
+
ref,
|
|
201
|
+
style: _style,
|
|
202
|
+
onCheckedChange,
|
|
203
|
+
...props
|
|
204
|
+
}) {
|
|
205
|
+
const handleCheckedChange = (nextChecked, eventDetails) => {
|
|
206
|
+
triggerInteractionFeedback("toggle");
|
|
207
|
+
onCheckedChange?.(nextChecked, eventDetails);
|
|
208
|
+
};
|
|
209
|
+
return /* @__PURE__ */ jsxs(
|
|
210
|
+
MenuPrimitive.CheckboxItem,
|
|
211
|
+
{
|
|
212
|
+
ref,
|
|
213
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
214
|
+
"data-inset": inset,
|
|
215
|
+
className: "relative flex cursor-default items-center gap-2 rounded-lg py-2 pr-6 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-6 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
216
|
+
checked,
|
|
217
|
+
onCheckedChange: handleCheckedChange,
|
|
218
|
+
...props,
|
|
219
|
+
children: [
|
|
220
|
+
/* @__PURE__ */ jsx(
|
|
221
|
+
"span",
|
|
222
|
+
{
|
|
223
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
224
|
+
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
225
|
+
children: /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
226
|
+
}
|
|
227
|
+
),
|
|
228
|
+
children
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
function DropdownMenuRadioGroup({
|
|
234
|
+
className: _className,
|
|
235
|
+
onValueChange,
|
|
236
|
+
style: _style,
|
|
237
|
+
...props
|
|
238
|
+
}) {
|
|
239
|
+
const handleValueChange = (value, eventDetails) => {
|
|
240
|
+
triggerInteractionFeedback("selection");
|
|
241
|
+
onValueChange?.(value, eventDetails);
|
|
242
|
+
};
|
|
243
|
+
return /* @__PURE__ */ jsx(
|
|
244
|
+
MenuPrimitive.RadioGroup,
|
|
245
|
+
{
|
|
246
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
247
|
+
onValueChange: handleValueChange,
|
|
248
|
+
...props
|
|
249
|
+
}
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
function DropdownMenuRadioItem({
|
|
253
|
+
children,
|
|
254
|
+
inset,
|
|
255
|
+
className: _className,
|
|
256
|
+
presentation,
|
|
257
|
+
ref,
|
|
258
|
+
style: _style,
|
|
259
|
+
...props
|
|
260
|
+
}) {
|
|
261
|
+
return /* @__PURE__ */ jsxs(
|
|
262
|
+
MenuPrimitive.RadioItem,
|
|
263
|
+
{
|
|
264
|
+
ref,
|
|
265
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
266
|
+
"data-inset": inset,
|
|
267
|
+
className: cn(
|
|
268
|
+
"relative flex cursor-default items-center gap-2 rounded-lg py-2 pr-6 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-6 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
269
|
+
presentation === "selectMenu" && "min-h-12 text-base"
|
|
270
|
+
),
|
|
271
|
+
...props,
|
|
272
|
+
children: [
|
|
273
|
+
/* @__PURE__ */ jsx(
|
|
274
|
+
"span",
|
|
275
|
+
{
|
|
276
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
277
|
+
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
278
|
+
children: /* @__PURE__ */ jsx(MenuPrimitive.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
279
|
+
}
|
|
280
|
+
),
|
|
281
|
+
children
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
function DropdownMenuLabel({
|
|
287
|
+
className: _className,
|
|
288
|
+
inset,
|
|
289
|
+
ref,
|
|
290
|
+
style: _style,
|
|
291
|
+
...props
|
|
292
|
+
}) {
|
|
293
|
+
return /* @__PURE__ */ jsx(
|
|
294
|
+
MenuPrimitive.GroupLabel,
|
|
295
|
+
{
|
|
296
|
+
ref,
|
|
297
|
+
"data-slot": "dropdown-menu-label",
|
|
298
|
+
"data-inset": inset,
|
|
299
|
+
className: "px-2 py-2 text-xs font-bold text-muted-foreground data-inset:pl-6",
|
|
300
|
+
...props
|
|
301
|
+
}
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
function DropdownMenuSeparator({
|
|
305
|
+
className: _className,
|
|
306
|
+
ref,
|
|
307
|
+
style: _style,
|
|
308
|
+
...props
|
|
309
|
+
}) {
|
|
310
|
+
return /* @__PURE__ */ jsx(
|
|
311
|
+
MenuPrimitive.Separator,
|
|
312
|
+
{
|
|
313
|
+
ref,
|
|
314
|
+
"data-slot": "dropdown-menu-separator",
|
|
315
|
+
className: "mx-0 my-0 h-px bg-border",
|
|
316
|
+
...props
|
|
317
|
+
}
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export {
|
|
322
|
+
DropdownMenu,
|
|
323
|
+
DropdownMenuTrigger,
|
|
324
|
+
DropdownMenuContent,
|
|
325
|
+
DropdownMenuGroup,
|
|
326
|
+
DropdownMenuItem,
|
|
327
|
+
DropdownMenuLinkItem,
|
|
328
|
+
DropdownMenuCheckboxItem,
|
|
329
|
+
DropdownMenuRadioGroup,
|
|
330
|
+
DropdownMenuRadioItem,
|
|
331
|
+
DropdownMenuLabel,
|
|
332
|
+
DropdownMenuSeparator
|
|
333
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-VIB7OX7D.js";
|
|
4
|
+
|
|
5
|
+
// ../ui/src/components/button.variants.ts
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
var buttonVariants = cva(
|
|
8
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-inset focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-inset aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "border-[color:var(--button-primary-border)] 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)] active:bg-[var(--button-primary-active)]",
|
|
13
|
+
outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
14
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
15
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
16
|
+
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",
|
|
17
|
+
link: "underline-offset-4 decoration-current hover:underline"
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
default: "h-9 gap-2 rounded-lg px-3 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",
|
|
21
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
22
|
+
sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
23
|
+
md: "h-9 gap-2 rounded-lg px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",
|
|
24
|
+
lg: "h-11 gap-2 rounded-xl px-5 text-base has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
|
|
25
|
+
xl: "h-12 gap-2 rounded-xl px-6 text-base has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5",
|
|
26
|
+
option: "h-auto min-h-16 items-start justify-start gap-2 whitespace-normal rounded-xl px-3 py-3 text-sm",
|
|
27
|
+
icon: "size-9",
|
|
28
|
+
"icon-round": "size-9 rounded-full",
|
|
29
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
30
|
+
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
31
|
+
"icon-lg": "size-10",
|
|
32
|
+
"icon-xl": "size-11 rounded-lg",
|
|
33
|
+
"input-icon": "h-full w-10 rounded-l-none"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
variant: "default",
|
|
38
|
+
size: "default"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
// ../ui/src/components/button.tsx
|
|
44
|
+
import * as React from "react";
|
|
45
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
46
|
+
import { jsx } from "react/jsx-runtime";
|
|
47
|
+
function Button({
|
|
48
|
+
className,
|
|
49
|
+
variant = "default",
|
|
50
|
+
size = "default",
|
|
51
|
+
asChild = false,
|
|
52
|
+
render,
|
|
53
|
+
children,
|
|
54
|
+
...props
|
|
55
|
+
}) {
|
|
56
|
+
const resolvedRender = render ?? (asChild && React.isValidElement(children) ? children : void 0);
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
58
|
+
ButtonPrimitive,
|
|
59
|
+
{
|
|
60
|
+
"data-slot": "button",
|
|
61
|
+
"data-variant": variant,
|
|
62
|
+
"data-size": size,
|
|
63
|
+
className: cn(buttonVariants({ variant, size }), className),
|
|
64
|
+
...props,
|
|
65
|
+
render: resolvedRender,
|
|
66
|
+
children: resolvedRender ? void 0 : children
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export {
|
|
72
|
+
buttonVariants,
|
|
73
|
+
Button
|
|
74
|
+
};
|
|
@@ -25,21 +25,21 @@ var WarmLogoIcon = ({
|
|
|
25
25
|
"path",
|
|
26
26
|
{
|
|
27
27
|
d: "M 33.500 40.660 C 20.206 42.744, 0 48.560, -0 50.302 C -0 51.759, 123.955 348.889, 127.738 356.500 C 142.182 385.561, 169.450 410.275, 198.946 421.040 C 218.922 428.330, 243.683 430.825, 264.526 427.648 C 277.151 425.724, 294.628 420.011, 294.194 417.952 C 293.790 416.040, 172.732 124.599, 168.522 115.405 C 161.779 100.679, 149.168 84.171, 135.093 71.646 C 119.358 57.644, 98.880 47.362, 77 42.478 C 69.645 40.836, 40.220 39.606, 33.500 40.660",
|
|
28
|
-
fill: "
|
|
28
|
+
fill: "currentColor"
|
|
29
29
|
}
|
|
30
30
|
),
|
|
31
31
|
/* @__PURE__ */ jsx(
|
|
32
32
|
"path",
|
|
33
33
|
{
|
|
34
34
|
d: "M 229.651 41.597 C 217.916 43.718, 202.443 49.144, 202.744 51.035 C 203.418 55.268, 329.689 356.584, 333.687 363.500 C 340.525 375.327, 345.293 381.483, 355.408 391.538 C 374.603 410.619, 398.878 423.014, 425.907 427.533 C 439.649 429.831, 463.594 429.132, 476 426.072 C 489.892 422.645, 497.188 419.815, 496.703 418.043 C 495.416 413.331, 371.058 116.094, 367.406 109 C 349.467 74.149, 313.008 47.875, 273.752 41.509 C 262.281 39.648, 240.195 39.693, 229.651 41.597",
|
|
35
|
-
fill: "
|
|
35
|
+
fill: "currentColor"
|
|
36
36
|
}
|
|
37
37
|
),
|
|
38
38
|
/* @__PURE__ */ jsx(
|
|
39
39
|
"path",
|
|
40
40
|
{
|
|
41
41
|
d: "M 463 40.593 C 451.670 42.545, 447.288 43.569, 439 46.203 C 433.775 47.864, 429.338 49.372, 429.140 49.555 C 428.942 49.737, 434.670 64.021, 441.868 81.297 C 455.574 114.190, 462.215 131.660, 468.447 151.208 C 475.360 172.892, 486.124 186.213, 503.834 194.997 C 530.956 208.450, 564.982 201.679, 583.654 179.112 C 604.399 154.041, 605.407 121.944, 586.291 95.155 C 567.827 69.280, 539.107 50.114, 508 42.907 C 500.680 41.212, 494.713 40.644, 482 40.434 C 472.925 40.284, 464.375 40.356, 463 40.593",
|
|
42
|
-
fill: "
|
|
42
|
+
fill: "currentColor"
|
|
43
43
|
}
|
|
44
44
|
)
|
|
45
45
|
]
|
|
@@ -81,7 +81,7 @@ var Logo = ({
|
|
|
81
81
|
}) => {
|
|
82
82
|
return /* @__PURE__ */ jsxs2("div", { className: "inline-flex items-center gap-2", children: [
|
|
83
83
|
/* @__PURE__ */ jsx2(WarmLogoIcon2, { size, tone, decorative: showText }),
|
|
84
|
-
showText ? /* @__PURE__ */ jsx2("span", { className: "text-sm font-bold tracking-wide
|
|
84
|
+
showText ? /* @__PURE__ */ jsx2("span", { className: cn("text-sm font-bold tracking-wide", toneClasses[tone]), children: "Warm" }) : null
|
|
85
85
|
] });
|
|
86
86
|
};
|
|
87
87
|
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SheetClose,
|
|
3
|
+
SheetContent,
|
|
4
|
+
SheetDescription,
|
|
5
|
+
SheetFooter,
|
|
6
|
+
SheetHeader,
|
|
7
|
+
SheetTitle,
|
|
8
|
+
SheetTrigger
|
|
9
|
+
} from "./chunk-OWDC2VC6.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
|
+
overlayClassName: presentation === "navigation" ? "duration-200 ease-in-out" : void 0
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
function SheetFooter2({
|
|
45
|
+
className: _className,
|
|
46
|
+
spacing = "default",
|
|
47
|
+
style: _style,
|
|
48
|
+
...props
|
|
49
|
+
}) {
|
|
50
|
+
return /* @__PURE__ */ jsx(SheetFooter, { ...props, className: spacing === "roomy" ? "gap-4 p-6" : void 0 });
|
|
51
|
+
}
|
|
52
|
+
function SheetHeader2({
|
|
53
|
+
className: _className,
|
|
54
|
+
presentation,
|
|
55
|
+
spacing = "default",
|
|
56
|
+
style: _style,
|
|
57
|
+
...props
|
|
58
|
+
}) {
|
|
59
|
+
const className = presentation === "navigation" ? "border-b border-border bg-background p-0" : spacing === "roomy" ? "gap-2 p-6" : void 0;
|
|
60
|
+
return /* @__PURE__ */ jsx(SheetHeader, { ...props, className });
|
|
61
|
+
}
|
|
62
|
+
function SheetTitle2({
|
|
63
|
+
className: _className,
|
|
64
|
+
presentation,
|
|
65
|
+
style: _style,
|
|
66
|
+
...props
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
SheetTitle,
|
|
70
|
+
{
|
|
71
|
+
...props,
|
|
72
|
+
className: presentation === "navigation" ? "min-w-0 truncate text-left text-base font-bold text-foreground" : void 0
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
function SheetDescription2({
|
|
77
|
+
className: _className,
|
|
78
|
+
style: _style,
|
|
79
|
+
...props
|
|
80
|
+
}) {
|
|
81
|
+
return /* @__PURE__ */ jsx(SheetDescription, { ...props });
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export {
|
|
85
|
+
SheetTrigger2 as SheetTrigger,
|
|
86
|
+
SheetClose2 as SheetClose,
|
|
87
|
+
SheetContent2 as SheetContent,
|
|
88
|
+
SheetFooter2 as SheetFooter,
|
|
89
|
+
SheetHeader2 as SheetHeader,
|
|
90
|
+
SheetTitle2 as SheetTitle,
|
|
91
|
+
SheetDescription2 as SheetDescription
|
|
92
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
DropdownMenu,
|
|
4
|
+
DropdownMenuCheckboxItem,
|
|
5
|
+
DropdownMenuContent,
|
|
6
|
+
DropdownMenuGroup,
|
|
7
|
+
DropdownMenuItem,
|
|
8
|
+
DropdownMenuLabel,
|
|
9
|
+
DropdownMenuLinkItem,
|
|
10
|
+
DropdownMenuRadioGroup,
|
|
11
|
+
DropdownMenuRadioItem,
|
|
12
|
+
DropdownMenuSeparator,
|
|
13
|
+
DropdownMenuTrigger
|
|
14
|
+
} from "./chunks/chunk-SK7IZUFC.js";
|
|
15
|
+
import "./chunks/chunk-VIB7OX7D.js";
|
|
16
|
+
export {
|
|
17
|
+
DropdownMenu,
|
|
18
|
+
DropdownMenuCheckboxItem,
|
|
19
|
+
DropdownMenuContent,
|
|
20
|
+
DropdownMenuGroup,
|
|
21
|
+
DropdownMenuItem,
|
|
22
|
+
DropdownMenuLabel,
|
|
23
|
+
DropdownMenuLinkItem,
|
|
24
|
+
DropdownMenuRadioGroup,
|
|
25
|
+
DropdownMenuRadioItem,
|
|
26
|
+
DropdownMenuSeparator,
|
|
27
|
+
DropdownMenuTrigger
|
|
28
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,40 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Badge
|
|
3
3
|
} from "./chunks/chunk-ICC7GQXS.js";
|
|
4
|
+
import {
|
|
5
|
+
Button,
|
|
6
|
+
ButtonLink
|
|
7
|
+
} from "./chunks/chunk-KCEDMF2I.js";
|
|
8
|
+
import {
|
|
9
|
+
DropdownMenu,
|
|
10
|
+
DropdownMenuCheckboxItem,
|
|
11
|
+
DropdownMenuContent,
|
|
12
|
+
DropdownMenuGroup,
|
|
13
|
+
DropdownMenuItem,
|
|
14
|
+
DropdownMenuLabel,
|
|
15
|
+
DropdownMenuLinkItem,
|
|
16
|
+
DropdownMenuRadioGroup,
|
|
17
|
+
DropdownMenuRadioItem,
|
|
18
|
+
DropdownMenuSeparator,
|
|
19
|
+
DropdownMenuTrigger
|
|
20
|
+
} from "./chunks/chunk-SK7IZUFC.js";
|
|
4
21
|
import {
|
|
5
22
|
Logo,
|
|
6
23
|
WarmLogoIcon
|
|
7
|
-
} from "./chunks/chunk-
|
|
24
|
+
} from "./chunks/chunk-VNQVIATP.js";
|
|
25
|
+
import {
|
|
26
|
+
SheetClose,
|
|
27
|
+
SheetContent,
|
|
28
|
+
SheetDescription,
|
|
29
|
+
SheetFooter,
|
|
30
|
+
SheetHeader,
|
|
31
|
+
SheetTitle,
|
|
32
|
+
SheetTrigger
|
|
33
|
+
} from "./chunks/chunk-ZEDHNFX6.js";
|
|
8
34
|
import {
|
|
9
35
|
Sidebar,
|
|
36
|
+
SidebarAccountTrigger,
|
|
37
|
+
SidebarBrand,
|
|
10
38
|
SidebarContent,
|
|
11
39
|
SidebarFooter,
|
|
12
40
|
SidebarGroup,
|
|
@@ -20,12 +48,43 @@ import {
|
|
|
20
48
|
SidebarMenuItem,
|
|
21
49
|
SidebarProvider,
|
|
22
50
|
useSidebar
|
|
23
|
-
} from "./chunks/chunk-
|
|
51
|
+
} from "./chunks/chunk-PBTUB66J.js";
|
|
52
|
+
import {
|
|
53
|
+
Sheet
|
|
54
|
+
} from "./chunks/chunk-OWDC2VC6.js";
|
|
55
|
+
import "./chunks/chunk-T2TXMN3G.js";
|
|
56
|
+
import {
|
|
57
|
+
StackedDisplay,
|
|
58
|
+
Text
|
|
59
|
+
} from "./chunks/chunk-D25QMXJR.js";
|
|
24
60
|
import "./chunks/chunk-VIB7OX7D.js";
|
|
25
61
|
export {
|
|
26
62
|
Badge,
|
|
63
|
+
Button,
|
|
64
|
+
ButtonLink,
|
|
65
|
+
DropdownMenu,
|
|
66
|
+
DropdownMenuCheckboxItem,
|
|
67
|
+
DropdownMenuContent,
|
|
68
|
+
DropdownMenuGroup,
|
|
69
|
+
DropdownMenuItem,
|
|
70
|
+
DropdownMenuLabel,
|
|
71
|
+
DropdownMenuLinkItem,
|
|
72
|
+
DropdownMenuRadioGroup,
|
|
73
|
+
DropdownMenuRadioItem,
|
|
74
|
+
DropdownMenuSeparator,
|
|
75
|
+
DropdownMenuTrigger,
|
|
27
76
|
Logo,
|
|
77
|
+
Sheet,
|
|
78
|
+
SheetClose,
|
|
79
|
+
SheetContent,
|
|
80
|
+
SheetDescription,
|
|
81
|
+
SheetFooter,
|
|
82
|
+
SheetHeader,
|
|
83
|
+
SheetTitle,
|
|
84
|
+
SheetTrigger,
|
|
28
85
|
Sidebar,
|
|
86
|
+
SidebarAccountTrigger,
|
|
87
|
+
SidebarBrand,
|
|
29
88
|
SidebarContent,
|
|
30
89
|
SidebarFooter,
|
|
31
90
|
SidebarGroup,
|
|
@@ -38,6 +97,8 @@ export {
|
|
|
38
97
|
SidebarMenuButton,
|
|
39
98
|
SidebarMenuItem,
|
|
40
99
|
SidebarProvider,
|
|
100
|
+
StackedDisplay,
|
|
101
|
+
Text,
|
|
41
102
|
WarmLogoIcon,
|
|
42
103
|
useSidebar
|
|
43
104
|
};
|
package/dist/logo.js
CHANGED
package/dist/sheet.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SheetClose,
|
|
3
|
+
SheetContent,
|
|
4
|
+
SheetDescription,
|
|
5
|
+
SheetFooter,
|
|
6
|
+
SheetHeader,
|
|
7
|
+
SheetTitle,
|
|
8
|
+
SheetTrigger
|
|
9
|
+
} from "./chunks/chunk-ZEDHNFX6.js";
|
|
10
|
+
import {
|
|
11
|
+
Sheet
|
|
12
|
+
} from "./chunks/chunk-OWDC2VC6.js";
|
|
13
|
+
import "./chunks/chunk-T2TXMN3G.js";
|
|
14
|
+
import "./chunks/chunk-VIB7OX7D.js";
|
|
15
|
+
export {
|
|
16
|
+
Sheet,
|
|
17
|
+
SheetClose,
|
|
18
|
+
SheetContent,
|
|
19
|
+
SheetDescription,
|
|
20
|
+
SheetFooter,
|
|
21
|
+
SheetHeader,
|
|
22
|
+
SheetTitle,
|
|
23
|
+
SheetTrigger
|
|
24
|
+
};
|