@warmio/ui 1.2.0 → 1.3.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 +11 -9
- package/dist/button.js +1 -3
- package/dist/chunks/{chunk-4UZNCKKG.js → chunk-BG6USQSY.js} +3 -3
- package/dist/chunks/{chunk-D25QMXJR.js → chunk-CIYWFBEJ.js} +20 -4
- package/dist/chunks/{chunk-ZEDHNFX6.js → chunk-DHZWXYDX.js} +4 -10
- package/dist/chunks/chunk-GKEYV2XW.js +10 -0
- package/dist/chunks/{chunk-SK7IZUFC.js → chunk-IOUIACNV.js} +9 -9
- package/dist/chunks/{chunk-UB25BRXT.js → chunk-LHHUTDZR.js} +98 -40
- package/dist/chunks/chunk-P3AJ2REZ.js +1083 -0
- package/dist/chunks/chunk-YTDMREDR.js +201 -0
- package/dist/dropdown-menu.js +1 -1
- package/dist/index.js +16 -9
- package/dist/logo.js +7 -1
- package/dist/product-header.js +1 -1
- package/dist/sheet.js +2 -3
- package/dist/sidebar.js +4 -3
- package/dist/text.js +1 -1
- package/package.json +2 -2
- package/types/badge.d.ts +1 -0
- package/types/button.d.ts +9 -48
- package/types/dropdown-menu.d.ts +2 -2
- package/types/logo.d.ts +8 -25
- package/types/sheet.d.ts +1 -4
- package/types/sidebar.d.ts +2 -1
- package/types/text.d.ts +2 -1
- package/dist/chunks/chunk-KCEDMF2I.js +0 -124
- package/dist/chunks/chunk-OWDC2VC6.js +0 -135
- package/dist/chunks/chunk-T2TXMN3G.js +0 -74
- package/dist/chunks/chunk-VNQVIATP.js +0 -91
|
@@ -0,0 +1,201 @@
|
|
|
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
|
+
};
|
package/dist/dropdown-menu.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StackedDisplay,
|
|
3
3
|
Text
|
|
4
|
-
} from "./chunks/chunk-
|
|
4
|
+
} from "./chunks/chunk-CIYWFBEJ.js";
|
|
5
5
|
import {
|
|
6
6
|
Badge
|
|
7
7
|
} from "./chunks/chunk-ICC7GQXS.js";
|
|
8
8
|
import {
|
|
9
9
|
Button,
|
|
10
10
|
ButtonLink
|
|
11
|
-
} from "./chunks/chunk-
|
|
11
|
+
} from "./chunks/chunk-GKEYV2XW.js";
|
|
12
12
|
import {
|
|
13
13
|
DropdownMenu,
|
|
14
14
|
DropdownMenuCheckboxItem,
|
|
@@ -21,15 +21,18 @@ import {
|
|
|
21
21
|
DropdownMenuRadioItem,
|
|
22
22
|
DropdownMenuSeparator,
|
|
23
23
|
DropdownMenuTrigger
|
|
24
|
-
} from "./chunks/chunk-
|
|
24
|
+
} from "./chunks/chunk-IOUIACNV.js";
|
|
25
25
|
import {
|
|
26
26
|
Logo,
|
|
27
|
+
WarmBrandedLogoLink,
|
|
28
|
+
WarmBrandedLogoMark,
|
|
29
|
+
WarmBrandedLogoMarkStatic,
|
|
27
30
|
WarmLogoIcon
|
|
28
|
-
} from "./chunks/chunk-
|
|
31
|
+
} from "./chunks/chunk-P3AJ2REZ.js";
|
|
29
32
|
import {
|
|
30
33
|
ProductHeader,
|
|
31
34
|
ProductHeaderBreadcrumb
|
|
32
|
-
} from "./chunks/chunk-
|
|
35
|
+
} from "./chunks/chunk-BG6USQSY.js";
|
|
33
36
|
import {
|
|
34
37
|
SheetClose,
|
|
35
38
|
SheetContent,
|
|
@@ -38,7 +41,7 @@ import {
|
|
|
38
41
|
SheetHeader,
|
|
39
42
|
SheetTitle,
|
|
40
43
|
SheetTrigger
|
|
41
|
-
} from "./chunks/chunk-
|
|
44
|
+
} from "./chunks/chunk-DHZWXYDX.js";
|
|
42
45
|
import {
|
|
43
46
|
Sidebar,
|
|
44
47
|
SidebarAccountTrigger,
|
|
@@ -55,12 +58,12 @@ import {
|
|
|
55
58
|
SidebarMenuButton,
|
|
56
59
|
SidebarMenuItem,
|
|
57
60
|
SidebarProvider,
|
|
61
|
+
SidebarTrigger,
|
|
58
62
|
useSidebar
|
|
59
|
-
} from "./chunks/chunk-
|
|
63
|
+
} from "./chunks/chunk-LHHUTDZR.js";
|
|
60
64
|
import {
|
|
61
65
|
Sheet
|
|
62
|
-
} from "./chunks/chunk-
|
|
63
|
-
import "./chunks/chunk-T2TXMN3G.js";
|
|
66
|
+
} from "./chunks/chunk-YTDMREDR.js";
|
|
64
67
|
import "./chunks/chunk-VIB7OX7D.js";
|
|
65
68
|
export {
|
|
66
69
|
Badge,
|
|
@@ -103,8 +106,12 @@ export {
|
|
|
103
106
|
SidebarMenuButton,
|
|
104
107
|
SidebarMenuItem,
|
|
105
108
|
SidebarProvider,
|
|
109
|
+
SidebarTrigger,
|
|
106
110
|
StackedDisplay,
|
|
107
111
|
Text,
|
|
112
|
+
WarmBrandedLogoLink,
|
|
113
|
+
WarmBrandedLogoMark,
|
|
114
|
+
WarmBrandedLogoMarkStatic,
|
|
108
115
|
WarmLogoIcon,
|
|
109
116
|
useSidebar
|
|
110
117
|
};
|
package/dist/logo.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Logo,
|
|
3
|
+
WarmBrandedLogoLink,
|
|
4
|
+
WarmBrandedLogoMark,
|
|
5
|
+
WarmBrandedLogoMarkStatic,
|
|
3
6
|
WarmLogoIcon
|
|
4
|
-
} from "./chunks/chunk-
|
|
7
|
+
} from "./chunks/chunk-P3AJ2REZ.js";
|
|
5
8
|
import "./chunks/chunk-VIB7OX7D.js";
|
|
6
9
|
export {
|
|
7
10
|
Logo,
|
|
11
|
+
WarmBrandedLogoLink,
|
|
12
|
+
WarmBrandedLogoMark,
|
|
13
|
+
WarmBrandedLogoMarkStatic,
|
|
8
14
|
WarmLogoIcon
|
|
9
15
|
};
|
package/dist/product-header.js
CHANGED
package/dist/sheet.js
CHANGED
|
@@ -6,11 +6,10 @@ import {
|
|
|
6
6
|
SheetHeader,
|
|
7
7
|
SheetTitle,
|
|
8
8
|
SheetTrigger
|
|
9
|
-
} from "./chunks/chunk-
|
|
9
|
+
} from "./chunks/chunk-DHZWXYDX.js";
|
|
10
10
|
import {
|
|
11
11
|
Sheet
|
|
12
|
-
} from "./chunks/chunk-
|
|
13
|
-
import "./chunks/chunk-T2TXMN3G.js";
|
|
12
|
+
} from "./chunks/chunk-YTDMREDR.js";
|
|
14
13
|
import "./chunks/chunk-VIB7OX7D.js";
|
|
15
14
|
export {
|
|
16
15
|
Sheet,
|
package/dist/sidebar.js
CHANGED
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
SidebarMenuButton,
|
|
15
15
|
SidebarMenuItem,
|
|
16
16
|
SidebarProvider,
|
|
17
|
+
SidebarTrigger,
|
|
17
18
|
useSidebar
|
|
18
|
-
} from "./chunks/chunk-
|
|
19
|
-
import "./chunks/chunk-
|
|
20
|
-
import "./chunks/chunk-T2TXMN3G.js";
|
|
19
|
+
} from "./chunks/chunk-LHHUTDZR.js";
|
|
20
|
+
import "./chunks/chunk-YTDMREDR.js";
|
|
21
21
|
import "./chunks/chunk-VIB7OX7D.js";
|
|
22
22
|
export {
|
|
23
23
|
Sidebar,
|
|
@@ -35,5 +35,6 @@ export {
|
|
|
35
35
|
SidebarMenuButton,
|
|
36
36
|
SidebarMenuItem,
|
|
37
37
|
SidebarProvider,
|
|
38
|
+
SidebarTrigger,
|
|
38
39
|
useSidebar
|
|
39
40
|
};
|
package/dist/text.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warmio/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Portable, sealed React components for Warm products.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@base-ui/react": ">=1.6.0 <2.0.0",
|
|
71
|
-
"@warmio/design": "1.
|
|
71
|
+
"@warmio/design": "1.5.0",
|
|
72
72
|
"class-variance-authority": "^0.7.1",
|
|
73
73
|
"clsx": "^2.1.1",
|
|
74
74
|
"cuelume": "0.1.0",
|
package/types/badge.d.ts
CHANGED
package/types/button.d.ts
CHANGED
|
@@ -1,48 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
| 'default'
|
|
11
|
-
| 'editPill'
|
|
12
|
-
| 'hero'
|
|
13
|
-
| 'menuOption'
|
|
14
|
-
| 'promptCategory'
|
|
15
|
-
| 'promptOption'
|
|
16
|
-
| 'sidebarIcon'
|
|
17
|
-
| 'tableHeader'
|
|
18
|
-
| 'threadMore'
|
|
19
|
-
| 'threadNew'
|
|
20
|
-
| 'touch';
|
|
21
|
-
export type ButtonVariant = 'apple' | 'default' | 'destructive' | 'ghost' | 'outline';
|
|
22
|
-
export type ButtonSize = 'default' | 'icon';
|
|
23
|
-
export type ButtonProps = Omit<ComponentPropsWithRef<'button'>, 'className' | 'style'> & {
|
|
24
|
-
presentation?: ButtonPresentation;
|
|
25
|
-
size?: ButtonSize;
|
|
26
|
-
style?: never;
|
|
27
|
-
variant?: ButtonVariant;
|
|
28
|
-
width?: 'full';
|
|
29
|
-
};
|
|
30
|
-
export type ButtonLinkProps = Omit<
|
|
31
|
-
ComponentPropsWithRef<'a'>,
|
|
32
|
-
'aria-disabled' | 'className' | 'disabled' | 'role' | 'style'
|
|
33
|
-
> & {
|
|
34
|
-
asChild?: never;
|
|
35
|
-
className?: never;
|
|
36
|
-
disabled?: never;
|
|
37
|
-
href: string;
|
|
38
|
-
presentation?: ButtonPresentation;
|
|
39
|
-
render?: never;
|
|
40
|
-
role?: never;
|
|
41
|
-
size?: ButtonSize;
|
|
42
|
-
style?: never;
|
|
43
|
-
variant?: ButtonVariant;
|
|
44
|
-
width?: 'full';
|
|
45
|
-
'aria-disabled'?: never;
|
|
46
|
-
};
|
|
47
|
-
export declare const Button: (props: ButtonProps) => ReactNode;
|
|
48
|
-
export declare const ButtonLink: (props: ButtonLinkProps) => ReactNode;
|
|
1
|
+
export {
|
|
2
|
+
Button,
|
|
3
|
+
ButtonLink,
|
|
4
|
+
type ButtonLinkProps,
|
|
5
|
+
type ButtonPresentation,
|
|
6
|
+
type ButtonProps,
|
|
7
|
+
type ButtonSize,
|
|
8
|
+
type ButtonVariant,
|
|
9
|
+
} from '@warmio/design/button';
|
package/types/dropdown-menu.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Dedicated public declaration entrypoint keeps the ./dropdown-menu npm export independent of private workspace source.
|
|
2
2
|
import type { Menu } from '@base-ui/react/menu';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
4
|
|
|
5
5
|
type WithoutChrome<T> = Omit<T, 'className' | 'style'> & {
|
|
6
6
|
className?: never;
|
|
@@ -8,7 +8,7 @@ type WithoutChrome<T> = Omit<T, 'className' | 'style'> & {
|
|
|
8
8
|
};
|
|
9
9
|
type WithoutStyling<T> = Omit<T, 'asChild' | 'className' | 'render' | 'style'>;
|
|
10
10
|
|
|
11
|
-
export type DropdownMenuSide = 'top' | 'right' | 'bottom' | 'left';
|
|
11
|
+
export type DropdownMenuSide = 'top' | 'right' | 'bottom' | 'left' | 'inline-start' | 'inline-end';
|
|
12
12
|
export type DropdownMenuAlign = 'start' | 'center' | 'end';
|
|
13
13
|
export type DropdownMenuContentSize = 'default' | 'auto' | 'sidebar';
|
|
14
14
|
export type DropdownMenuContentSpacing = 'default' | 'roomy';
|
package/types/logo.d.ts
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
textClass?: never;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type WarmLogoIconProps = StrictLogoProps & {
|
|
13
|
-
size?: WarmLogoSize;
|
|
14
|
-
tone?: WarmLogoTone;
|
|
15
|
-
decorative?: boolean;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export type LogoProps = StrictLogoProps & {
|
|
19
|
-
size?: WarmLogoSize;
|
|
20
|
-
tone?: WarmLogoTone;
|
|
21
|
-
showText?: boolean;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export declare function WarmLogoIcon(props: WarmLogoIconProps): ReactNode;
|
|
25
|
-
export declare function Logo(props: LogoProps): ReactNode;
|
|
1
|
+
export {
|
|
2
|
+
Logo,
|
|
3
|
+
WarmLogoIcon,
|
|
4
|
+
type LogoProps,
|
|
5
|
+
type WarmLogoIconProps,
|
|
6
|
+
type WarmLogoSize,
|
|
7
|
+
type WarmLogoTone,
|
|
8
|
+
} from '@warmio/design/logo';
|
package/types/sheet.d.ts
CHANGED
|
@@ -15,12 +15,9 @@ export type SheetContentProps = Omit<WithoutChrome<Dialog.Popup.Props>, 'overlay
|
|
|
15
15
|
responsive?: 'always' | 'mobileOnly';
|
|
16
16
|
width?: 'default' | 'full' | 'wide';
|
|
17
17
|
};
|
|
18
|
-
export type SheetFooterProps = WithoutChrome<ComponentProps<'div'
|
|
19
|
-
spacing?: 'default' | 'roomy';
|
|
20
|
-
};
|
|
18
|
+
export type SheetFooterProps = WithoutChrome<ComponentProps<'div'>>;
|
|
21
19
|
export type SheetHeaderProps = WithoutChrome<ComponentProps<'div'>> & {
|
|
22
20
|
presentation?: 'navigation';
|
|
23
|
-
spacing?: 'default' | 'roomy';
|
|
24
21
|
};
|
|
25
22
|
export type SheetTitleProps = WithoutChrome<Dialog.Title.Props> & {
|
|
26
23
|
presentation?: 'navigation';
|
package/types/sidebar.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export type SidebarMenuButtonProps = WithoutChrome<ComponentProps<'button'>> & {
|
|
|
59
59
|
tooltip?: string | ReactNode;
|
|
60
60
|
render?: ReactElement;
|
|
61
61
|
variant?: 'default' | 'outline' | null;
|
|
62
|
-
size?: 'default' |
|
|
62
|
+
size?: 'default' | null;
|
|
63
63
|
collapsed?: boolean;
|
|
64
64
|
presentation?: 'account' | 'disabled' | 'navigation' | 'previewCollapsed';
|
|
65
65
|
};
|
|
@@ -92,6 +92,7 @@ export declare function SidebarMenuItem(props: SidebarMenuItemProps): ReactNode;
|
|
|
92
92
|
export declare function SidebarMenuButton(props: SidebarMenuButtonProps): ReactNode;
|
|
93
93
|
export declare function SidebarMenuBadge(props: SidebarMenuBadgeProps): ReactNode;
|
|
94
94
|
export declare function useSidebar(): SidebarContextValue;
|
|
95
|
+
export declare function SidebarTrigger(props: WithoutChrome<ComponentProps<'button'>>): ReactNode;
|
|
95
96
|
|
|
96
97
|
export type SidebarBrandProps = {
|
|
97
98
|
actions?: ReactNode;
|
package/types/text.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type TextVariant =
|
|
|
6
6
|
| 'caption'
|
|
7
7
|
| 'display'
|
|
8
8
|
| 'displayCompact'
|
|
9
|
+
| 'displayHero'
|
|
9
10
|
| 'helper'
|
|
10
11
|
| 'micro'
|
|
11
12
|
| 'microStrong'
|
|
@@ -15,7 +16,7 @@ export type TextTone = 'default' | 'foreground' | 'muted' | 'primary' | 'success
|
|
|
15
16
|
export type TextAlign = 'center' | 'end' | 'start';
|
|
16
17
|
export type TextProps = {
|
|
17
18
|
align?: TextAlign;
|
|
18
|
-
as?: 'div' | 'h2' | 'h3' | 'p' | 'small' | 'span';
|
|
19
|
+
as?: 'div' | 'h1' | 'h2' | 'h3' | 'p' | 'small' | 'span';
|
|
19
20
|
children?: ReactNode;
|
|
20
21
|
className?: never;
|
|
21
22
|
numeric?: boolean;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Button,
|
|
3
|
-
buttonVariants
|
|
4
|
-
} from "./chunk-T2TXMN3G.js";
|
|
5
|
-
import {
|
|
6
|
-
cn
|
|
7
|
-
} from "./chunk-VIB7OX7D.js";
|
|
8
|
-
|
|
9
|
-
// ../ui/src/warmio/button.tsx
|
|
10
|
-
import * as React from "react";
|
|
11
|
-
import { jsx } from "react/jsx-runtime";
|
|
12
|
-
var buttonPresentationSize = {
|
|
13
|
-
assistantIcon: "icon-xs",
|
|
14
|
-
assistantRoundIcon: "icon-round",
|
|
15
|
-
composerIcon: "icon-sm",
|
|
16
|
-
default: "default",
|
|
17
|
-
compact: "sm",
|
|
18
|
-
controlPeer: "default",
|
|
19
|
-
editPill: "sm",
|
|
20
|
-
hero: "lg",
|
|
21
|
-
menuOption: "option",
|
|
22
|
-
promptCategory: "default",
|
|
23
|
-
promptOption: "option",
|
|
24
|
-
sidebarIcon: "icon",
|
|
25
|
-
tableHeader: "default",
|
|
26
|
-
threadMore: "icon-xs",
|
|
27
|
-
threadNew: "sm",
|
|
28
|
-
touch: "default"
|
|
29
|
-
};
|
|
30
|
-
var buttonPresentationClasses = {
|
|
31
|
-
assistantIcon: "size-6 p-1 active:scale-90",
|
|
32
|
-
composerIcon: "size-7 p-1",
|
|
33
|
-
editPill: "rounded-full px-3",
|
|
34
|
-
hero: "h-12 rounded-xl bg-clip-border px-6 py-2 text-base font-bold",
|
|
35
|
-
promptCategory: "h-9 gap-1.5 rounded-full border border-border bg-background px-3.5 text-sm font-normal text-foreground shadow-xs transition-colors hover:bg-muted",
|
|
36
|
-
promptOption: "min-h-16 items-start justify-start gap-2 rounded-xl px-3 py-3 text-sm",
|
|
37
|
-
sidebarIcon: "bg-clip-border text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground dark:hover:bg-white/6 dark:hover:text-sidebar-foreground",
|
|
38
|
-
// Flush with WarmTableHead/Cell edge inset so labels align with row content.
|
|
39
|
-
tableHeader: "h-auto min-h-0 w-full justify-start gap-1 rounded-lg px-0 py-0 font-normal text-muted-foreground hover:bg-transparent hover:text-foreground data-[align=end]:justify-end",
|
|
40
|
-
touch: "min-h-11",
|
|
41
|
-
threadMore: "size-6 p-0",
|
|
42
|
-
threadNew: "h-8 justify-start gap-2 rounded-lg px-2.5 text-sm font-normal hover:bg-muted data-active:bg-muted"
|
|
43
|
-
};
|
|
44
|
-
var buttonVariantBase = {
|
|
45
|
-
apple: "outline",
|
|
46
|
-
default: "default",
|
|
47
|
-
destructive: "destructive",
|
|
48
|
-
ghost: "ghost",
|
|
49
|
-
outline: "outline"
|
|
50
|
-
};
|
|
51
|
-
var buttonVariantClasses = {
|
|
52
|
-
apple: "border-black bg-black text-white hover:bg-black/90 hover:text-white [&_.warm-loader-logo]:invert"
|
|
53
|
-
};
|
|
54
|
-
var buttonInputAlignmentClasses = {
|
|
55
|
-
default: "bg-clip-border py-1"
|
|
56
|
-
};
|
|
57
|
-
function resolveButton(presentation, size, variant) {
|
|
58
|
-
const resolvedSize = size ?? buttonPresentationSize[presentation];
|
|
59
|
-
const presentationClassName = !size && buttonPresentationClasses[presentation] ? buttonPresentationClasses[presentation] : buttonInputAlignmentClasses[resolvedSize];
|
|
60
|
-
return {
|
|
61
|
-
presentationClassName,
|
|
62
|
-
primitiveVariant: buttonVariantBase[variant],
|
|
63
|
-
resolvedSize,
|
|
64
|
-
variantClassName: buttonVariantClasses[variant]
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
var Button2 = React.forwardRef(function Button3({
|
|
68
|
-
className: _className,
|
|
69
|
-
presentation = "default",
|
|
70
|
-
size,
|
|
71
|
-
style: _style,
|
|
72
|
-
variant = "default",
|
|
73
|
-
width,
|
|
74
|
-
...props
|
|
75
|
-
}, ref) {
|
|
76
|
-
const { presentationClassName, primitiveVariant, resolvedSize, variantClassName } = resolveButton(
|
|
77
|
-
presentation,
|
|
78
|
-
size,
|
|
79
|
-
variant
|
|
80
|
-
);
|
|
81
|
-
return /* @__PURE__ */ jsx(
|
|
82
|
-
Button,
|
|
83
|
-
{
|
|
84
|
-
...props,
|
|
85
|
-
ref,
|
|
86
|
-
variant: primitiveVariant,
|
|
87
|
-
size: resolvedSize,
|
|
88
|
-
"data-variant": variant,
|
|
89
|
-
className: cn(presentationClassName, variantClassName, width === "full" && "w-full")
|
|
90
|
-
}
|
|
91
|
-
);
|
|
92
|
-
});
|
|
93
|
-
Button2.displayName = "WarmButton";
|
|
94
|
-
var ButtonLink = React.forwardRef(function ButtonLink2({ children, presentation = "default", size, variant = "default", width, ...props }, ref) {
|
|
95
|
-
const { presentationClassName, primitiveVariant, resolvedSize, variantClassName } = resolveButton(
|
|
96
|
-
presentation,
|
|
97
|
-
size,
|
|
98
|
-
variant
|
|
99
|
-
);
|
|
100
|
-
return /* @__PURE__ */ jsx(
|
|
101
|
-
"a",
|
|
102
|
-
{
|
|
103
|
-
...props,
|
|
104
|
-
ref,
|
|
105
|
-
"data-slot": "button",
|
|
106
|
-
"data-variant": variant,
|
|
107
|
-
"data-size": resolvedSize,
|
|
108
|
-
className: cn(
|
|
109
|
-
buttonVariants({ size: resolvedSize, variant: primitiveVariant }),
|
|
110
|
-
presentationClassName,
|
|
111
|
-
variantClassName,
|
|
112
|
-
"focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2 focus-visible:outline-ring",
|
|
113
|
-
width === "full" && "w-full"
|
|
114
|
-
),
|
|
115
|
-
children
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
|
-
});
|
|
119
|
-
ButtonLink.displayName = "WarmButtonLink";
|
|
120
|
-
|
|
121
|
-
export {
|
|
122
|
-
Button2 as Button,
|
|
123
|
-
ButtonLink
|
|
124
|
-
};
|