@warmio/ui 1.5.2 → 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.
- package/README.md +18 -13
- package/dist/badge.js +2 -2
- package/dist/button.js +4 -1
- package/dist/chunks/chunk-A2PN77YE.js +42 -0
- package/dist/chunks/{chunk-F74Y4WRX.js → chunk-DHV2A22F.js} +14 -13
- package/dist/chunks/chunk-DOOSH3V6.js +72 -0
- package/dist/chunks/chunk-EIEA5RJJ.js +97 -0
- package/dist/chunks/{chunk-HQTC542T.js → chunk-FKGHMPVW.js} +141 -345
- package/dist/chunks/{chunk-JXSJTIX7.js → chunk-K36HD5J5.js} +4 -4
- package/dist/chunks/{chunk-GY4XJ6EX.js → chunk-L6L3GVGM.js} +2 -1
- package/dist/chunks/{chunk-2CO2BZLI.js → chunk-MGX6ZL6Q.js} +9 -53
- package/dist/chunks/{chunk-B47G2BJV.js → chunk-MVUHHKBL.js} +37 -79
- package/dist/chunks/chunk-PJUNSOJK.js +116 -0
- package/dist/chunks/chunk-RVVHR7RY.js +0 -0
- package/dist/chunks/chunk-U7D32UN3.js +0 -0
- package/dist/chunks/chunk-W24JGQWM.js +65 -0
- package/dist/dropdown-menu.js +4 -5
- package/dist/entries/badge.css +178 -0
- package/dist/entries/button.css +422 -0
- package/dist/entries/dropdown-menu.css +167 -0
- package/dist/entries/index.css +2789 -0
- package/dist/entries/logo.css +147 -0
- package/dist/entries/product-header.css +88 -0
- package/dist/entries/sheet.css +666 -0
- package/dist/entries/sidebar.css +2108 -0
- package/dist/entries/text.css +97 -0
- package/dist/index.js +17 -15
- package/dist/logo.js +2 -2
- package/dist/product-header.js +2 -2
- package/dist/sheet.js +5 -4
- package/dist/sidebar.css +129 -0
- package/dist/sidebar.js +7 -5
- package/dist/text.css +121 -0
- package/dist/text.js +2 -2
- package/package.json +12 -4
- package/types/button.d.ts +65 -9
- package/types/sidebar.d.ts +9 -2
- package/types/text.d.ts +8 -2
- package/dist/chunks/chunk-3AVFUXCV.js +0 -76
- package/dist/chunks/chunk-6V6K5G72.js +0 -80
- package/dist/chunks/chunk-A2NLFM6R.js +0 -227
- package/dist/chunks/chunk-IK5RHPN3.js +0 -93
- package/dist/chunks/chunk-OU7YQUU2.js +0 -84
- package/dist/chunks/chunk-VIB7OX7D.js +0 -10
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-VIB7OX7D.js";
|
|
4
|
-
|
|
5
|
-
// ../ui/src/warmio/badge.tsx
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
var badgeToneClassNameByTone = {
|
|
8
|
-
default: "border-border bg-muted text-foreground",
|
|
9
|
-
info: "border-info-border bg-info-bg-subtle text-info-text",
|
|
10
|
-
success: "border-success-border bg-success/10 text-success",
|
|
11
|
-
warning: "border-warning-border bg-warning/10 text-warning",
|
|
12
|
-
destructive: "border-destructive/20 bg-destructive/10 text-destructive"
|
|
13
|
-
};
|
|
14
|
-
var solidBadgeToneClassNameByTone = {
|
|
15
|
-
default: "border-foreground bg-foreground text-background",
|
|
16
|
-
info: "border-info bg-info text-background",
|
|
17
|
-
success: "border-success bg-success text-background",
|
|
18
|
-
warning: "border-warning bg-warning text-background",
|
|
19
|
-
destructive: "border-destructive bg-destructive text-destructive-foreground"
|
|
20
|
-
};
|
|
21
|
-
var badgeSizeClassNameBySize = {
|
|
22
|
-
sm: "h-5 px-2 py-0",
|
|
23
|
-
default: "h-6 px-2 py-0"
|
|
24
|
-
};
|
|
25
|
-
var badgeCircleClassNameBySize = {
|
|
26
|
-
sm: "size-5 px-0 py-0",
|
|
27
|
-
default: "size-6 px-0 py-0"
|
|
28
|
-
};
|
|
29
|
-
function Badge({
|
|
30
|
-
tone,
|
|
31
|
-
size = "default",
|
|
32
|
-
shape = "pill",
|
|
33
|
-
surface = "default",
|
|
34
|
-
placement = "inline",
|
|
35
|
-
emphasis = "subtle",
|
|
36
|
-
width = "auto",
|
|
37
|
-
truncate = false,
|
|
38
|
-
numeric = false,
|
|
39
|
-
children,
|
|
40
|
-
id,
|
|
41
|
-
"aria-label": ariaLabel
|
|
42
|
-
}) {
|
|
43
|
-
const resolvedTone = tone ?? "default";
|
|
44
|
-
return /* @__PURE__ */ jsx(
|
|
45
|
-
"span",
|
|
46
|
-
{
|
|
47
|
-
"data-slot": "badge",
|
|
48
|
-
"data-tone": resolvedTone,
|
|
49
|
-
"data-shape": shape,
|
|
50
|
-
"data-surface": surface,
|
|
51
|
-
"data-placement": placement,
|
|
52
|
-
"data-size": size,
|
|
53
|
-
id,
|
|
54
|
-
"aria-label": ariaLabel,
|
|
55
|
-
className: cn(
|
|
56
|
-
"inline-flex w-fit max-w-full items-center justify-center gap-2 overflow-hidden rounded-full border whitespace-nowrap transition-colors",
|
|
57
|
-
emphasis === "solid" ? solidBadgeToneClassNameByTone[resolvedTone] : badgeToneClassNameByTone[resolvedTone],
|
|
58
|
-
badgeSizeClassNameBySize[size],
|
|
59
|
-
shape === "circle" && badgeCircleClassNameBySize[size],
|
|
60
|
-
surface === "floating" && "border-background ring-2 ring-background",
|
|
61
|
-
placement === "inline" && "align-middle",
|
|
62
|
-
placement === "top-end" && "pointer-events-none absolute -right-2 -top-2 z-10",
|
|
63
|
-
width === "metric" && "w-12",
|
|
64
|
-
width === "compact" && "min-w-6",
|
|
65
|
-
truncate ? "min-w-0 shrink truncate" : "shrink-0",
|
|
66
|
-
numeric && "tabular-nums",
|
|
67
|
-
"[&>svg]:shrink-0 [&>svg:not([class*=size-])]:size-3"
|
|
68
|
-
),
|
|
69
|
-
children: truncate ? /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children }) : children
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export {
|
|
75
|
-
Badge
|
|
76
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SheetClose,
|
|
3
|
-
SheetContent,
|
|
4
|
-
SheetDescription,
|
|
5
|
-
SheetFooter,
|
|
6
|
-
SheetHeader,
|
|
7
|
-
SheetTitle,
|
|
8
|
-
SheetTrigger
|
|
9
|
-
} from "./chunk-A2NLFM6R.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" ? `max-lg:w-auto lg:w-[var(--sidebar-width-mobile)] gap-0 overflow-hidden border-border bg-sidebar p-0 text-foreground${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 data-[side=responsive]:lg:max-w-none" : width === "wide" ? "w-full data-[side=left]:sm:max-w-lg data-[side=right]:sm:max-w-lg data-[side=responsive]:lg:max-w-lg" : void 0;
|
|
34
|
-
const contentClassName = presentation === "scroll" ? widthClassName : navigationClassName ?? widthClassName;
|
|
35
|
-
return /* @__PURE__ */ jsx(SheetContent, { ...props, className: contentClassName });
|
|
36
|
-
}
|
|
37
|
-
function SheetFooter2({ className: _className, style: _style, ...props }) {
|
|
38
|
-
return /* @__PURE__ */ jsx(SheetFooter, { ...props });
|
|
39
|
-
}
|
|
40
|
-
function SheetHeader2({
|
|
41
|
-
className: _className,
|
|
42
|
-
presentation,
|
|
43
|
-
style: _style,
|
|
44
|
-
...props
|
|
45
|
-
}) {
|
|
46
|
-
const className = presentation === "navigation" ? "border-b border-border bg-background p-0" : void 0;
|
|
47
|
-
return /* @__PURE__ */ jsx(SheetHeader, { ...props, className });
|
|
48
|
-
}
|
|
49
|
-
function SheetTitle2({
|
|
50
|
-
className: _className,
|
|
51
|
-
presentation,
|
|
52
|
-
style: _style,
|
|
53
|
-
...props
|
|
54
|
-
}) {
|
|
55
|
-
return /* @__PURE__ */ jsx(
|
|
56
|
-
SheetTitle,
|
|
57
|
-
{
|
|
58
|
-
...props,
|
|
59
|
-
"data-presentation": presentation,
|
|
60
|
-
className: presentation === "navigation" ? "min-w-0 truncate text-left text-foreground" : void 0
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
function SheetDescription2({
|
|
65
|
-
className: _className,
|
|
66
|
-
style: _style,
|
|
67
|
-
...props
|
|
68
|
-
}) {
|
|
69
|
-
return /* @__PURE__ */ jsx(SheetDescription, { ...props });
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export {
|
|
73
|
-
SheetTrigger2 as SheetTrigger,
|
|
74
|
-
SheetClose2 as SheetClose,
|
|
75
|
-
SheetContent2 as SheetContent,
|
|
76
|
-
SheetFooter2 as SheetFooter,
|
|
77
|
-
SheetHeader2 as SheetHeader,
|
|
78
|
-
SheetTitle2 as SheetTitle,
|
|
79
|
-
SheetDescription2 as SheetDescription
|
|
80
|
-
};
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FluidOverlay
|
|
3
|
-
} from "./chunk-JXSJTIX7.js";
|
|
4
|
-
import {
|
|
5
|
-
cn
|
|
6
|
-
} from "./chunk-VIB7OX7D.js";
|
|
7
|
-
|
|
8
|
-
// ../ui/src/components/sheet.tsx
|
|
9
|
-
import * as React2 from "react";
|
|
10
|
-
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
11
|
-
|
|
12
|
-
// ../ui/src/lib/modal-backdrop.ts
|
|
13
|
-
var MODAL_BACKDROP_CLASS_NAME = "bg-black/50 supports-backdrop-filter:backdrop-blur-[2px]";
|
|
14
|
-
|
|
15
|
-
// ../ui/src/components/button.tsx
|
|
16
|
-
import * as React from "react";
|
|
17
|
-
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
18
|
-
|
|
19
|
-
// ../ui/src/components/button.variants.ts
|
|
20
|
-
import { cva } from "class-variance-authority";
|
|
21
|
-
var buttonVariants = cva(
|
|
22
|
-
"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",
|
|
23
|
-
{
|
|
24
|
-
variants: {
|
|
25
|
-
variant: {
|
|
26
|
-
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)]",
|
|
27
|
-
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:hover:bg-[var(--warm-surface-raised-hover-dark,var(--muted))]",
|
|
28
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
29
|
-
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
30
|
-
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",
|
|
31
|
-
link: "decoration-current hover:underline"
|
|
32
|
-
},
|
|
33
|
-
size: {
|
|
34
|
-
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",
|
|
35
|
-
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",
|
|
36
|
-
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",
|
|
37
|
-
md: "h-9 gap-2 rounded-full px-4 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
38
|
-
lg: "h-11 gap-2 rounded-full px-4 text-sm has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
|
|
39
|
-
xl: "h-12 gap-2 rounded-full px-4 text-sm has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
|
|
40
|
-
jumbo: "h-14 gap-2 rounded-full px-4 text-sm font-medium has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4 [&_svg:not([class*='size-'])]:size-5",
|
|
41
|
-
option: "h-auto min-h-16 items-start justify-start gap-2 whitespace-normal rounded-full px-4 py-4 text-sm",
|
|
42
|
-
icon: "size-9",
|
|
43
|
-
"icon-round": "size-9 rounded-full",
|
|
44
|
-
"icon-xs": "size-6 rounded-full in-data-[slot=button-group]:rounded-full [&_svg:not([class*='size-'])]:size-3",
|
|
45
|
-
"icon-sm": "size-8 rounded-full in-data-[slot=button-group]:rounded-full",
|
|
46
|
-
"icon-lg": "size-10",
|
|
47
|
-
"icon-xl": "size-11 rounded-full",
|
|
48
|
-
"input-icon": "h-full w-10 rounded-l-none"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
defaultVariants: {
|
|
52
|
-
variant: "default",
|
|
53
|
-
size: "default"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
// ../ui/src/components/button.tsx
|
|
59
|
-
import { jsx } from "react/jsx-runtime";
|
|
60
|
-
function Button({
|
|
61
|
-
className,
|
|
62
|
-
variant = "default",
|
|
63
|
-
size = "default",
|
|
64
|
-
asChild = false,
|
|
65
|
-
render,
|
|
66
|
-
children,
|
|
67
|
-
...props
|
|
68
|
-
}) {
|
|
69
|
-
const resolvedRender = render ?? (asChild && React.isValidElement(children) ? children : void 0);
|
|
70
|
-
return /* @__PURE__ */ jsx(
|
|
71
|
-
ButtonPrimitive,
|
|
72
|
-
{
|
|
73
|
-
"data-slot": "button",
|
|
74
|
-
"data-variant": variant,
|
|
75
|
-
"data-size": size,
|
|
76
|
-
className: cn(buttonVariants({ variant, size }), className),
|
|
77
|
-
...props,
|
|
78
|
-
render: resolvedRender,
|
|
79
|
-
children: resolvedRender ? void 0 : children
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// ../ui/src/components/sheet.tsx
|
|
85
|
-
import { XIcon } from "lucide-react";
|
|
86
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
87
|
-
var SheetCloseSlotContext = React2.createContext(null);
|
|
88
|
-
function Sheet(props) {
|
|
89
|
-
return /* @__PURE__ */ jsx2(SheetPrimitive.Root, { ...props });
|
|
90
|
-
}
|
|
91
|
-
function SheetTrigger({ asChild = false, children, render, ...props }) {
|
|
92
|
-
const resolvedRender = render ?? (asChild && React2.isValidElement(children) ? children : void 0);
|
|
93
|
-
return /* @__PURE__ */ jsx2(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", render: resolvedRender, ...props, children: resolvedRender ? void 0 : children });
|
|
94
|
-
}
|
|
95
|
-
function SheetClose({ asChild = false, children, render, ...props }) {
|
|
96
|
-
const resolvedRender = render ?? (asChild && React2.isValidElement(children) ? children : void 0);
|
|
97
|
-
return /* @__PURE__ */ jsx2(SheetPrimitive.Close, { "data-slot": "sheet-close", render: resolvedRender, ...props, children: resolvedRender ? void 0 : children });
|
|
98
|
-
}
|
|
99
|
-
function SheetPortal({ ...props }) {
|
|
100
|
-
return /* @__PURE__ */ jsx2(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
101
|
-
}
|
|
102
|
-
function SheetOverlay({ className, ...props }) {
|
|
103
|
-
return /* @__PURE__ */ jsx2(
|
|
104
|
-
SheetPrimitive.Backdrop,
|
|
105
|
-
{
|
|
106
|
-
"data-slot": "sheet-overlay",
|
|
107
|
-
className: cn(
|
|
108
|
-
"fixed inset-0 z-[var(--z-overlay-backdrop)]",
|
|
109
|
-
MODAL_BACKDROP_CLASS_NAME,
|
|
110
|
-
className
|
|
111
|
-
),
|
|
112
|
-
...props,
|
|
113
|
-
render: (props2, state) => /* @__PURE__ */ jsx2(FluidOverlay, { props: props2, state, motion: "backdrop", tier: "moderate" })
|
|
114
|
-
}
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
function SheetContent({
|
|
118
|
-
className,
|
|
119
|
-
children,
|
|
120
|
-
side = "responsive",
|
|
121
|
-
showCloseButton = true,
|
|
122
|
-
overlayClassName,
|
|
123
|
-
render,
|
|
124
|
-
...props
|
|
125
|
-
}) {
|
|
126
|
-
const closeButton = showCloseButton ? /* @__PURE__ */ jsxs(
|
|
127
|
-
SheetPrimitive.Close,
|
|
128
|
-
{
|
|
129
|
-
"data-slot": "sheet-close",
|
|
130
|
-
render: /* @__PURE__ */ jsx2(Button, { variant: "ghost", className: "border border-border", size: "icon-sm" }),
|
|
131
|
-
children: [
|
|
132
|
-
/* @__PURE__ */ jsx2(XIcon, {}),
|
|
133
|
-
/* @__PURE__ */ jsx2("span", { className: "sr-only", children: "Close" })
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
) : null;
|
|
137
|
-
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
138
|
-
/* @__PURE__ */ jsx2(SheetOverlay, { className: overlayClassName }),
|
|
139
|
-
/* @__PURE__ */ jsx2(
|
|
140
|
-
SheetPrimitive.Popup,
|
|
141
|
-
{
|
|
142
|
-
"data-slot": "sheet-content",
|
|
143
|
-
"data-side": side,
|
|
144
|
-
className: cn(
|
|
145
|
-
"fixed z-[calc(var(--z-overlay-backdrop)+1)] flex min-h-0 flex-col gap-0 rounded-xl border border-border bg-popover bg-clip-padding text-popover-foreground shadow-lg data-[side=left]:w-3/4 data-[side=right]:w-3/4 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-[side=responsive]:lg:w-3/4 data-[side=responsive]:lg:max-w-sm",
|
|
146
|
-
className
|
|
147
|
-
),
|
|
148
|
-
...props,
|
|
149
|
-
render: (props2, state) => /* @__PURE__ */ jsx2(
|
|
150
|
-
FluidOverlay,
|
|
151
|
-
{
|
|
152
|
-
props: props2,
|
|
153
|
-
state,
|
|
154
|
-
render,
|
|
155
|
-
motion: "sheet",
|
|
156
|
-
side,
|
|
157
|
-
tier: "moderate"
|
|
158
|
-
}
|
|
159
|
-
),
|
|
160
|
-
children: /* @__PURE__ */ jsx2(SheetCloseSlotContext.Provider, { value: closeButton, children })
|
|
161
|
-
}
|
|
162
|
-
)
|
|
163
|
-
] });
|
|
164
|
-
}
|
|
165
|
-
function SheetHeader({ className, children, ...props }) {
|
|
166
|
-
const closeButton = React2.useContext(SheetCloseSlotContext);
|
|
167
|
-
return /* @__PURE__ */ jsxs(
|
|
168
|
-
"div",
|
|
169
|
-
{
|
|
170
|
-
"data-slot": "sheet-header",
|
|
171
|
-
className: cn(
|
|
172
|
-
"grid grid-cols-[minmax(0,1fr)_auto] items-start gap-x-4 gap-y-2 p-4",
|
|
173
|
-
className
|
|
174
|
-
),
|
|
175
|
-
...props,
|
|
176
|
-
children: [
|
|
177
|
-
children,
|
|
178
|
-
closeButton
|
|
179
|
-
]
|
|
180
|
-
}
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
function SheetFooter({ className, ...props }) {
|
|
184
|
-
return /* @__PURE__ */ jsx2(
|
|
185
|
-
"div",
|
|
186
|
-
{
|
|
187
|
-
"data-slot": "sheet-footer",
|
|
188
|
-
className: cn(
|
|
189
|
-
"mt-auto flex w-full flex-row flex-wrap items-center justify-end gap-2 border-t border-border p-4 [&>:first-child]:me-auto [&>:only-child]:me-0",
|
|
190
|
-
className
|
|
191
|
-
),
|
|
192
|
-
...props
|
|
193
|
-
}
|
|
194
|
-
);
|
|
195
|
-
}
|
|
196
|
-
function SheetTitle({ className, ...props }) {
|
|
197
|
-
return /* @__PURE__ */ jsx2(
|
|
198
|
-
SheetPrimitive.Title,
|
|
199
|
-
{
|
|
200
|
-
"data-slot": "sheet-title",
|
|
201
|
-
className: cn("text-foreground", className),
|
|
202
|
-
...props
|
|
203
|
-
}
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
function SheetDescription({ className, ...props }) {
|
|
207
|
-
return /* @__PURE__ */ jsx2(
|
|
208
|
-
SheetPrimitive.Description,
|
|
209
|
-
{
|
|
210
|
-
"data-slot": "sheet-description",
|
|
211
|
-
className: cn("text-muted-foreground", className),
|
|
212
|
-
...props
|
|
213
|
-
}
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export {
|
|
218
|
-
Button,
|
|
219
|
-
Sheet,
|
|
220
|
-
SheetTrigger,
|
|
221
|
-
SheetClose,
|
|
222
|
-
SheetContent,
|
|
223
|
-
SheetHeader,
|
|
224
|
-
SheetFooter,
|
|
225
|
-
SheetTitle,
|
|
226
|
-
SheetDescription
|
|
227
|
-
};
|
|
@@ -1,93 +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
|
-
homeHref
|
|
21
|
-
}) {
|
|
22
|
-
const titleSegments = getTitleSegments(pageTitle, productName);
|
|
23
|
-
const productNameNode = homeHref ? /* @__PURE__ */ jsx("a", { "data-slot": "product-header-title", href: homeHref, className: "text-foreground", children: productName }) : /* @__PURE__ */ jsx("span", { "data-slot": "product-header-title", className: "text-foreground", children: productName });
|
|
24
|
-
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
25
|
-
productNameNode,
|
|
26
|
-
titleSegments?.map((segment, index) => {
|
|
27
|
-
const isLast = index === titleSegments.length - 1;
|
|
28
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29
|
-
/* @__PURE__ */ jsx(ChevronRight, { className: "size-4 text-foreground" }),
|
|
30
|
-
isLast ? /* @__PURE__ */ jsx("h1", { "data-slot": "product-header-title", "aria-current": "page", children: segment }) : /* @__PURE__ */ jsx("span", { "data-slot": "product-header-title", className: "text-foreground", children: segment })
|
|
31
|
-
] }, `${segment}-${index}`);
|
|
32
|
-
})
|
|
33
|
-
] });
|
|
34
|
-
}
|
|
35
|
-
var ProductHeader = memo(function ProductHeader2({
|
|
36
|
-
actions,
|
|
37
|
-
actionsTargetRef,
|
|
38
|
-
desktopShell = false,
|
|
39
|
-
hideBreadcrumb = false,
|
|
40
|
-
homeHref,
|
|
41
|
-
leading,
|
|
42
|
-
pageTitle,
|
|
43
|
-
productName,
|
|
44
|
-
titleTargetRef,
|
|
45
|
-
visibility = "desktop"
|
|
46
|
-
}) {
|
|
47
|
-
return /* @__PURE__ */ jsxs(
|
|
48
|
-
"header",
|
|
49
|
-
{
|
|
50
|
-
"data-slot": "product-header",
|
|
51
|
-
className: cn(
|
|
52
|
-
"sticky top-0 z-20 relative flex h-[var(--header-height)] shrink-0 flex-nowrap items-center overflow-visible",
|
|
53
|
-
visibility === "always" ? "flex" : visibility === "container" ? "hidden @3xl/main:flex" : "hidden md:flex",
|
|
54
|
-
desktopShell && "select-none supports-[backdrop-filter]:backdrop-blur"
|
|
55
|
-
),
|
|
56
|
-
"data-tauri-drag-region": desktopShell ? "deep" : void 0,
|
|
57
|
-
children: [
|
|
58
|
-
/* @__PURE__ */ jsxs(
|
|
59
|
-
"div",
|
|
60
|
-
{
|
|
61
|
-
ref: titleTargetRef,
|
|
62
|
-
className: "flex shrink-0 items-center gap-2 whitespace-nowrap px-4 [&:has(>[data-page-chrome-content])>[data-page-chrome-fallback]]:hidden",
|
|
63
|
-
children: [
|
|
64
|
-
leading,
|
|
65
|
-
hideBreadcrumb ? null : /* @__PURE__ */ jsx("div", { "data-page-chrome-fallback": true, className: "contents", children: /* @__PURE__ */ jsx(
|
|
66
|
-
ProductHeaderBreadcrumb,
|
|
67
|
-
{
|
|
68
|
-
...pageTitle !== void 0 ? { pageTitle } : {},
|
|
69
|
-
...productName !== void 0 ? { productName } : {},
|
|
70
|
-
...homeHref !== void 0 ? { homeHref } : {}
|
|
71
|
-
}
|
|
72
|
-
) })
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
/* @__PURE__ */ jsx(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
ref: actionsTargetRef,
|
|
80
|
-
className: "ml-auto flex min-w-0 shrink items-center gap-2 overflow-visible px-4 [&:has(>[data-page-chrome-content])>[data-page-chrome-fallback]]:hidden",
|
|
81
|
-
children: actions ? /* @__PURE__ */ jsx("div", { "data-page-chrome-fallback": true, className: "contents", children: actions }) : null
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
]
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
});
|
|
88
|
-
ProductHeader.displayName = "ProductHeader";
|
|
89
|
-
|
|
90
|
-
export {
|
|
91
|
-
ProductHeaderBreadcrumb,
|
|
92
|
-
ProductHeader
|
|
93
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-VIB7OX7D.js";
|
|
4
|
-
|
|
5
|
-
// ../ui/src/warmio/text.tsx
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
var textClassNameByVariant = {
|
|
9
|
-
heading: "",
|
|
10
|
-
metric: "",
|
|
11
|
-
body: "",
|
|
12
|
-
caption: ""
|
|
13
|
-
};
|
|
14
|
-
var defaultTextElementByVariant = {
|
|
15
|
-
heading: "h3",
|
|
16
|
-
metric: "span",
|
|
17
|
-
body: "p",
|
|
18
|
-
caption: "span"
|
|
19
|
-
};
|
|
20
|
-
var textClassNameByTone = {
|
|
21
|
-
default: "",
|
|
22
|
-
muted: "text-muted-foreground",
|
|
23
|
-
foreground: "text-foreground",
|
|
24
|
-
primary: "text-primary",
|
|
25
|
-
success: "text-success",
|
|
26
|
-
warning: "text-warning",
|
|
27
|
-
financeCash: "text-finance-cash",
|
|
28
|
-
financeDebt: "text-finance-debt",
|
|
29
|
-
financeInvestment: "text-finance-investment"
|
|
30
|
-
};
|
|
31
|
-
var textClassNameByAlign = {
|
|
32
|
-
start: "text-left",
|
|
33
|
-
center: "text-center",
|
|
34
|
-
end: "text-right"
|
|
35
|
-
};
|
|
36
|
-
function Text({
|
|
37
|
-
as,
|
|
38
|
-
variant = "caption",
|
|
39
|
-
tone = "default",
|
|
40
|
-
align,
|
|
41
|
-
numeric = false,
|
|
42
|
-
mono = false,
|
|
43
|
-
truncate = false,
|
|
44
|
-
animateNumber = false,
|
|
45
|
-
className: _className,
|
|
46
|
-
style: _style,
|
|
47
|
-
...props
|
|
48
|
-
}) {
|
|
49
|
-
const Component = as ?? defaultTextElementByVariant[variant];
|
|
50
|
-
return React.createElement(Component, {
|
|
51
|
-
...props,
|
|
52
|
-
"data-animate-number": animateNumber || void 0,
|
|
53
|
-
"data-text-variant": variant,
|
|
54
|
-
"data-text-element": Component,
|
|
55
|
-
"data-mono": mono || void 0,
|
|
56
|
-
className: cn(
|
|
57
|
-
textClassNameByVariant[variant],
|
|
58
|
-
textClassNameByTone[tone],
|
|
59
|
-
align && textClassNameByAlign[align],
|
|
60
|
-
numeric && "tabular-nums",
|
|
61
|
-
truncate && "truncate"
|
|
62
|
-
) || void 0
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
Text.displayName = "WarmText";
|
|
66
|
-
function StackedDisplay({
|
|
67
|
-
align = "start",
|
|
68
|
-
firstLine,
|
|
69
|
-
presentation = "dashboard",
|
|
70
|
-
secondLine
|
|
71
|
-
}) {
|
|
72
|
-
const firstLineClassName = presentation === "welcome" ? "block text-muted-foreground" : "block text-foreground";
|
|
73
|
-
const secondLineClassName = presentation === "welcome" ? "block text-foreground" : "block text-muted-foreground";
|
|
74
|
-
return /* @__PURE__ */ jsxs(Text, { as: "h2", variant: "heading", align, children: [
|
|
75
|
-
/* @__PURE__ */ jsx("span", { className: firstLineClassName, children: firstLine }),
|
|
76
|
-
/* @__PURE__ */ jsx("span", { className: secondLineClassName, children: secondLine })
|
|
77
|
-
] });
|
|
78
|
-
}
|
|
79
|
-
StackedDisplay.displayName = "WarmStackedDisplay";
|
|
80
|
-
|
|
81
|
-
export {
|
|
82
|
-
Text,
|
|
83
|
-
StackedDisplay
|
|
84
|
-
};
|