@devalok/shilp-sutra 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composed/command-palette.d.ts +1 -2
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +27 -33
- package/dist/composed/content-card.d.ts +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts +7 -0
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/calendar-grid.js +92 -72
- package/dist/composed/date-picker/index.d.ts +1 -1
- package/dist/composed/date-picker/index.d.ts.map +1 -1
- package/dist/composed/index.d.ts +6 -1
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +43 -37
- package/dist/composed/page-header.d.ts +1 -1
- package/dist/composed/page-header.d.ts.map +1 -1
- package/dist/composed/page-header.js +63 -59
- package/dist/composed/priority-indicator.d.ts +1 -1
- package/dist/composed/priority-indicator.d.ts.map +1 -1
- package/dist/composed/priority-indicator.js +15 -15
- package/dist/composed/schedule-view.d.ts +26 -0
- package/dist/composed/schedule-view.d.ts.map +1 -0
- package/dist/composed/schedule-view.js +183 -0
- package/dist/composed/simple-tooltip.d.ts +15 -0
- package/dist/composed/simple-tooltip.d.ts.map +1 -0
- package/dist/composed/simple-tooltip.js +17 -0
- package/dist/composed/status-badge.d.ts +2 -1
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +37 -22
- package/dist/shell/app-command-palette.js +87 -87
- package/dist/shell/bottom-navbar.d.ts +1 -3
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +37 -37
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +31 -31
- package/dist/shell/sidebar.d.ts +1 -3
- package/dist/shell/sidebar.d.ts.map +1 -1
- package/dist/shell/sidebar.js +6 -6
- package/dist/ui/alert.d.ts +3 -0
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +56 -31
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +17 -8
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +28 -14
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/sidebar.d.ts +1 -1
- package/dist/ui/stat-card.d.ts +4 -1
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +12 -11
- package/dist/ui/toggle-group.d.ts +2 -2
- package/dist/ui/toggle.d.ts +2 -2
- package/package.json +526 -208
package/dist/shell/sidebar.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
3
|
+
import * as N from "react";
|
|
4
4
|
import { useLink as m } from "./link-context.js";
|
|
5
5
|
import { Sidebar as u, SidebarHeader as S, SidebarSeparator as o, SidebarContent as y, SidebarGroup as w, SidebarGroupLabel as A, SidebarGroupContent as L, SidebarMenu as C, SidebarFooter as M, SidebarMenuItem as j, SidebarMenuButton as k } from "../ui/sidebar.js";
|
|
6
6
|
import { Avatar as G, AvatarImage as F, AvatarFallback as I } from "../ui/avatar.js";
|
|
@@ -24,7 +24,7 @@ function R({ item: t, isActive: a }) {
|
|
|
24
24
|
"aria-label": t.title,
|
|
25
25
|
"aria-current": a ? "page" : void 0,
|
|
26
26
|
children: [
|
|
27
|
-
/* @__PURE__ */ e(
|
|
27
|
+
/* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md shrink-0", "aria-hidden": "true", children: t.icon }),
|
|
28
28
|
/* @__PURE__ */ e("span", { className: "text-ds-base", children: t.title })
|
|
29
29
|
]
|
|
30
30
|
}
|
|
@@ -32,7 +32,7 @@ function R({ item: t, isActive: a }) {
|
|
|
32
32
|
}
|
|
33
33
|
) });
|
|
34
34
|
}
|
|
35
|
-
const z =
|
|
35
|
+
const z = N.forwardRef(
|
|
36
36
|
({
|
|
37
37
|
currentPath: t = "/",
|
|
38
38
|
user: a,
|
|
@@ -43,7 +43,7 @@ const z = g.forwardRef(
|
|
|
43
43
|
...f
|
|
44
44
|
}, b) => {
|
|
45
45
|
var c;
|
|
46
|
-
const
|
|
46
|
+
const v = m(), g = (r, s = !1) => s || r === "/" ? t === r : t.startsWith(r);
|
|
47
47
|
return /* @__PURE__ */ l(
|
|
48
48
|
u,
|
|
49
49
|
{
|
|
@@ -75,7 +75,7 @@ const z = g.forwardRef(
|
|
|
75
75
|
R,
|
|
76
76
|
{
|
|
77
77
|
item: d,
|
|
78
|
-
isActive:
|
|
78
|
+
isActive: g(d.href, d.exact)
|
|
79
79
|
},
|
|
80
80
|
d.href
|
|
81
81
|
)) }) })
|
|
@@ -84,7 +84,7 @@ const z = g.forwardRef(
|
|
|
84
84
|
n.length > 0 && /* @__PURE__ */ e(M, { className: "px-ds-06 py-ds-05", children: /* @__PURE__ */ e("div", { className: "flex items-center justify-start gap-ds-03", children: n.map((r, s) => /* @__PURE__ */ l("div", { className: "flex items-center gap-ds-03", children: [
|
|
85
85
|
s > 0 && /* @__PURE__ */ e("div", { className: "h-[16px] w-px bg-border" }),
|
|
86
86
|
/* @__PURE__ */ e(
|
|
87
|
-
|
|
87
|
+
v,
|
|
88
88
|
{
|
|
89
89
|
className: "text-ds-md text-text-placeholder transition-colors hover:text-interactive",
|
|
90
90
|
href: r.href,
|
package/dist/ui/alert.d.ts
CHANGED
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const alertVariants: (props?: ({
|
|
5
|
+
variant?: "outline" | "filled" | "subtle" | null | undefined;
|
|
5
6
|
color?: "error" | "warning" | "success" | "neutral" | "info" | null | undefined;
|
|
6
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
8
|
/**
|
|
8
9
|
* Props for Alert — an inline message block with a colored icon, optional title, optional body,
|
|
9
10
|
* and an optional dismiss button. Renders with `role="alert"` for screen reader announcements.
|
|
10
11
|
*
|
|
12
|
+
* **Variants:** `subtle` (default, tinted surface) | `filled` (solid colored bg) | `outline` (transparent bg, colored border)
|
|
13
|
+
*
|
|
11
14
|
* **Colors:** `info` (default, blue tones) | `success` | `warning` | `error` | `neutral`
|
|
12
15
|
* The matching icon (info circle, checkmark, triangle, alert circle) is auto-selected by color.
|
|
13
16
|
*
|
package/dist/ui/alert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/ui/alert.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/ui/alert.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,aAAa;;;8EAuClB,CAAA;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,EACzD,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,QAAA,MAAM,KAAK,mFAwBV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
package/dist/ui/alert.js
CHANGED
|
@@ -1,53 +1,78 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { IconInfoCircle as
|
|
4
|
-
import * as
|
|
5
|
-
import { cva as
|
|
2
|
+
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { IconInfoCircle as s, IconAlertCircle as x, IconAlertTriangle as m, IconCircleCheck as u, IconX as f } from "@tabler/icons-react";
|
|
4
|
+
import * as g from "react";
|
|
5
|
+
import { cva as v } from "class-variance-authority";
|
|
6
6
|
import { cn as p } from "./lib/utils.js";
|
|
7
|
-
const
|
|
7
|
+
const N = v(
|
|
8
8
|
"relative flex gap-ds-04 rounded-ds-lg border p-ds-05",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
subtle: "",
|
|
13
|
+
filled: "",
|
|
14
|
+
outline: ""
|
|
15
|
+
},
|
|
11
16
|
color: {
|
|
12
|
-
info: "
|
|
13
|
-
success: "
|
|
14
|
-
warning: "
|
|
15
|
-
error: "
|
|
16
|
-
neutral: "
|
|
17
|
+
info: "",
|
|
18
|
+
success: "",
|
|
19
|
+
warning: "",
|
|
20
|
+
error: "",
|
|
21
|
+
neutral: ""
|
|
17
22
|
}
|
|
18
23
|
},
|
|
19
|
-
|
|
24
|
+
compoundVariants: [
|
|
25
|
+
// subtle (surface bg) — default, matches previous behavior
|
|
26
|
+
{ variant: "subtle", color: "info", className: "bg-info-surface border-info-border text-info-text" },
|
|
27
|
+
{ variant: "subtle", color: "success", className: "bg-success-surface border-success-border text-success-text" },
|
|
28
|
+
{ variant: "subtle", color: "warning", className: "bg-warning-surface border-warning-border text-warning-text" },
|
|
29
|
+
{ variant: "subtle", color: "error", className: "bg-error-surface border-error-border text-error-text" },
|
|
30
|
+
{ variant: "subtle", color: "neutral", className: "bg-layer-02 border-border text-text-primary [&>svg]:text-text-secondary" },
|
|
31
|
+
// filled (solid bg, white text)
|
|
32
|
+
{ variant: "filled", color: "info", className: "bg-info text-text-on-color border-transparent [&>svg]:text-text-on-color" },
|
|
33
|
+
{ variant: "filled", color: "success", className: "bg-success text-text-on-color border-transparent [&>svg]:text-text-on-color" },
|
|
34
|
+
{ variant: "filled", color: "warning", className: "bg-warning text-text-on-color border-transparent [&>svg]:text-text-on-color" },
|
|
35
|
+
{ variant: "filled", color: "error", className: "bg-error text-text-on-color border-transparent [&>svg]:text-text-on-color" },
|
|
36
|
+
{ variant: "filled", color: "neutral", className: "bg-layer-03 text-text-primary border-transparent [&>svg]:text-text-secondary" },
|
|
37
|
+
// outline (transparent bg, colored border)
|
|
38
|
+
{ variant: "outline", color: "info", className: "bg-transparent border-info-border text-info-text" },
|
|
39
|
+
{ variant: "outline", color: "success", className: "bg-transparent border-success-border text-success-text" },
|
|
40
|
+
{ variant: "outline", color: "warning", className: "bg-transparent border-warning-border text-warning-text" },
|
|
41
|
+
{ variant: "outline", color: "error", className: "bg-transparent border-error-border text-error-text" },
|
|
42
|
+
{ variant: "outline", color: "neutral", className: "bg-transparent border-border text-text-primary [&>svg]:text-text-secondary" }
|
|
43
|
+
],
|
|
44
|
+
defaultVariants: { variant: "subtle", color: "info" }
|
|
20
45
|
}
|
|
21
|
-
),
|
|
22
|
-
info:
|
|
23
|
-
success:
|
|
24
|
-
warning:
|
|
25
|
-
error:
|
|
26
|
-
neutral:
|
|
27
|
-
},
|
|
28
|
-
({ className: n, color: e = "info", title:
|
|
29
|
-
const
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */ r(
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
/* @__PURE__ */ r("div", { className: "text-ds-md opacity-[0.9]", children:
|
|
46
|
+
), w = {
|
|
47
|
+
info: s,
|
|
48
|
+
success: u,
|
|
49
|
+
warning: m,
|
|
50
|
+
error: x,
|
|
51
|
+
neutral: s
|
|
52
|
+
}, y = g.forwardRef(
|
|
53
|
+
({ className: n, variant: c = "subtle", color: e = "info", title: t, onDismiss: o, children: i, ...l }, d) => {
|
|
54
|
+
const b = w[e ?? "info"];
|
|
55
|
+
return /* @__PURE__ */ a("div", { ref: d, className: p(N({ variant: c, color: e }), n), role: "alert", ...l, children: [
|
|
56
|
+
/* @__PURE__ */ r(b, { className: "mt-ds-01 h-ico-md w-ico-md shrink-0", "aria-hidden": "true" }),
|
|
57
|
+
/* @__PURE__ */ a("div", { className: "flex-1 min-w-0", children: [
|
|
58
|
+
t && /* @__PURE__ */ r("p", { className: "text-ds-md font-semibold mb-ds-01", children: t }),
|
|
59
|
+
/* @__PURE__ */ r("div", { className: "text-ds-md opacity-[0.9]", children: i })
|
|
35
60
|
] }),
|
|
36
|
-
|
|
61
|
+
o && /* @__PURE__ */ r(
|
|
37
62
|
"button",
|
|
38
63
|
{
|
|
39
64
|
type: "button",
|
|
40
|
-
onClick:
|
|
65
|
+
onClick: o,
|
|
41
66
|
className: "shrink-0 min-h-6 min-w-6 flex items-center justify-center rounded-ds-sm text-icon-secondary transition-colors hover:text-icon-primary hover:bg-field focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",
|
|
42
67
|
"aria-label": "Dismiss",
|
|
43
|
-
children: /* @__PURE__ */ r(
|
|
68
|
+
children: /* @__PURE__ */ r(f, { className: "h-ico-sm w-ico-sm" })
|
|
44
69
|
}
|
|
45
70
|
)
|
|
46
71
|
] });
|
|
47
72
|
}
|
|
48
73
|
);
|
|
49
|
-
|
|
74
|
+
y.displayName = "Alert";
|
|
50
75
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
76
|
+
y as Alert,
|
|
77
|
+
N as alertVariants
|
|
53
78
|
};
|
package/dist/ui/badge.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const badgeVariants: (props?: ({
|
|
5
|
-
variant?: "solid" | "outline" | "subtle" | null | undefined;
|
|
5
|
+
variant?: "solid" | "outline" | "destructive" | "subtle" | "secondary" | null | undefined;
|
|
6
6
|
color?: "accent" | "default" | "error" | "warning" | "success" | "cyan" | "indigo" | "orange" | "teal" | "info" | "brand" | "amber" | "slate" | "emerald" | null | undefined;
|
|
7
7
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
package/dist/ui/badge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,aAAa;;;;
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,aAAa;;;;8EA2FlB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC,EAC1D,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,QAAA,MAAM,KAAK,oFAwBV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
package/dist/ui/badge.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { IconX as
|
|
2
|
+
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { IconX as b } from "@tabler/icons-react";
|
|
4
4
|
import * as g from "react";
|
|
5
5
|
import { cva as x } from "class-variance-authority";
|
|
6
6
|
import { cn as m } from "./lib/utils.js";
|
|
@@ -10,8 +10,12 @@ const u = x(
|
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
12
|
subtle: "",
|
|
13
|
+
secondary: "",
|
|
14
|
+
// alias → subtle
|
|
13
15
|
solid: "",
|
|
14
|
-
outline: ""
|
|
16
|
+
outline: "",
|
|
17
|
+
destructive: ""
|
|
18
|
+
// alias → solid + error
|
|
15
19
|
},
|
|
16
20
|
color: {
|
|
17
21
|
default: "",
|
|
@@ -38,6 +42,11 @@ const u = x(
|
|
|
38
42
|
compoundVariants: [
|
|
39
43
|
// subtle (surface bg)
|
|
40
44
|
{ variant: "subtle", color: "default", className: "bg-field text-text-secondary border-border" },
|
|
45
|
+
// "secondary" alias → same as subtle + default
|
|
46
|
+
{ variant: "secondary", color: "default", className: "bg-field text-text-secondary border-border" },
|
|
47
|
+
// "destructive" alias → solid + error
|
|
48
|
+
{ variant: "destructive", color: "default", className: "bg-error text-text-on-color border-transparent" },
|
|
49
|
+
{ variant: "destructive", color: "error", className: "bg-error text-text-on-color border-transparent" },
|
|
41
50
|
{ variant: "subtle", color: "info", className: "bg-info-surface text-info-text border-info-border" },
|
|
42
51
|
{ variant: "subtle", color: "success", className: "bg-success-surface text-success-text border-success-border" },
|
|
43
52
|
{ variant: "subtle", color: "error", className: "bg-error-surface text-error-text border-error-border" },
|
|
@@ -88,8 +97,8 @@ const u = x(
|
|
|
88
97
|
size: "md"
|
|
89
98
|
}
|
|
90
99
|
}
|
|
91
|
-
),
|
|
92
|
-
({ className: t, variant: a, color: o, size: s, dot: n, onDismiss: e, children: c, ...l }, i) => /* @__PURE__ */
|
|
100
|
+
), v = g.forwardRef(
|
|
101
|
+
({ className: t, variant: a, color: o, size: s, dot: n, onDismiss: e, children: c, ...l }, i) => /* @__PURE__ */ d("span", { ref: i, className: m(u({ variant: a, color: o, size: s }), t), ...l, children: [
|
|
93
102
|
n && /* @__PURE__ */ r(
|
|
94
103
|
"span",
|
|
95
104
|
{
|
|
@@ -105,13 +114,13 @@ const u = x(
|
|
|
105
114
|
onClick: e,
|
|
106
115
|
className: "ml-ds-01 min-h-6 min-w-6 flex items-center justify-center rounded-ds-full text-icon-secondary transition-colors hover:text-icon-primary hover:bg-field focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",
|
|
107
116
|
"aria-label": "Remove",
|
|
108
|
-
children: /* @__PURE__ */ r(
|
|
117
|
+
children: /* @__PURE__ */ r(b, { className: "h-ico-sm w-ico-sm" })
|
|
109
118
|
}
|
|
110
119
|
)
|
|
111
120
|
] })
|
|
112
121
|
);
|
|
113
|
-
|
|
122
|
+
v.displayName = "Badge";
|
|
114
123
|
export {
|
|
115
|
-
|
|
124
|
+
v as Badge,
|
|
116
125
|
u as badgeVariants
|
|
117
126
|
};
|
package/dist/ui/button.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
export declare const buttonVariants: (props?: ({
|
|
5
|
-
variant?: "link" | "solid" | "outline" | "ghost" | null | undefined;
|
|
5
|
+
variant?: "link" | "solid" | "default" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
6
6
|
color?: "default" | "error" | null | undefined;
|
|
7
|
-
size?: "sm" | "md" | "lg" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
|
|
7
|
+
size?: "sm" | "md" | "lg" | "icon" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
9
|
/**
|
|
10
10
|
* Props for Button — the primary action component with a two-axis variant system,
|
package/dist/ui/button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,eAAO,MAAM,cAAc;;;;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,eAAO,MAAM,cAAc;;;;8EAoD1B,CAAA;AAwBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,EAClE,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yFAAyF;IACzF,eAAe,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;IAC5C,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,QAAA,MAAM,MAAM,uFAgHX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
package/dist/ui/button.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cva as B } from "class-variance-authority";
|
|
|
4
4
|
import { Root as R, Slottable as E } from "../primitives/react-slot.js";
|
|
5
5
|
import * as G from "react";
|
|
6
6
|
import { useButtonGroup as M } from "./button-group.js";
|
|
7
|
-
import { cn as
|
|
7
|
+
import { cn as t } from "./lib/utils.js";
|
|
8
8
|
import { Spinner as q } from "./spinner.js";
|
|
9
9
|
const x = B(
|
|
10
10
|
"inline-flex items-center justify-center gap-ds-03 whitespace-nowrap font-sans font-semibold select-none border border-transparent transition-[color,background-color,border-color,box-shadow] duration-fast-01 ease-productive-standard focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-[0.38]",
|
|
@@ -12,8 +12,12 @@ const x = B(
|
|
|
12
12
|
variants: {
|
|
13
13
|
variant: {
|
|
14
14
|
solid: "",
|
|
15
|
+
default: "",
|
|
16
|
+
// alias → solid
|
|
15
17
|
outline: "",
|
|
16
18
|
ghost: "",
|
|
19
|
+
destructive: "",
|
|
20
|
+
// alias → solid + error
|
|
17
21
|
link: "text-text-link underline-offset-4 hover:underline active:opacity-[0.8]"
|
|
18
22
|
},
|
|
19
23
|
color: {
|
|
@@ -24,6 +28,8 @@ const x = B(
|
|
|
24
28
|
sm: "h-ds-sm rounded-ds-md px-ds-04 text-ds-sm",
|
|
25
29
|
md: "h-ds-md rounded-ds-md px-ds-05 text-ds-md",
|
|
26
30
|
lg: "h-ds-lg rounded-ds-lg px-ds-06 text-ds-base",
|
|
31
|
+
icon: "h-ds-md w-ds-md rounded-ds-md",
|
|
32
|
+
// alias → icon-md
|
|
27
33
|
"icon-sm": "h-ds-sm w-ds-sm rounded-ds-md",
|
|
28
34
|
"icon-md": "h-ds-md w-ds-md rounded-ds-md",
|
|
29
35
|
"icon-lg": "h-ds-lg w-ds-lg rounded-ds-lg"
|
|
@@ -32,6 +38,12 @@ const x = B(
|
|
|
32
38
|
compoundVariants: [
|
|
33
39
|
// solid + default (primary)
|
|
34
40
|
{ variant: "solid", color: "default", className: "bg-interactive text-text-on-color hover:bg-interactive-hover active:bg-interactive-active shadow-01 hover:shadow-brand" },
|
|
41
|
+
// "default" alias → same as solid + default
|
|
42
|
+
{ variant: "default", color: "default", className: "bg-interactive text-text-on-color hover:bg-interactive-hover active:bg-interactive-active shadow-01 hover:shadow-brand" },
|
|
43
|
+
{ variant: "default", color: "error", className: "bg-error text-text-on-color hover:bg-error-hover active:bg-error-hover shadow-01" },
|
|
44
|
+
// "destructive" alias → solid + error
|
|
45
|
+
{ variant: "destructive", color: "default", className: "bg-error text-text-on-color hover:bg-error-hover active:bg-error-hover shadow-01" },
|
|
46
|
+
{ variant: "destructive", color: "error", className: "bg-error text-text-on-color hover:bg-error-hover active:bg-error-hover shadow-01" },
|
|
35
47
|
// solid + error
|
|
36
48
|
{ variant: "solid", color: "error", className: "bg-error text-text-on-color hover:bg-error-hover active:bg-error-hover shadow-01" },
|
|
37
49
|
// outline + default (secondary)
|
|
@@ -53,6 +65,7 @@ const x = B(
|
|
|
53
65
|
sm: "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
54
66
|
md: "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
55
67
|
lg: "h-ico-md w-ico-md [&>svg]:h-ico-md [&>svg]:w-ico-md",
|
|
68
|
+
icon: "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
56
69
|
"icon-sm": "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
57
70
|
"icon-md": "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
58
71
|
"icon-lg": "h-ico-md w-ico-md [&>svg]:h-ico-md [&>svg]:w-ico-md"
|
|
@@ -60,6 +73,7 @@ const x = B(
|
|
|
60
73
|
sm: "sm",
|
|
61
74
|
md: "sm",
|
|
62
75
|
lg: "md",
|
|
76
|
+
icon: "sm",
|
|
63
77
|
"icon-sm": "sm",
|
|
64
78
|
"icon-md": "sm",
|
|
65
79
|
"icon-lg": "md"
|
|
@@ -67,46 +81,46 @@ const x = B(
|
|
|
67
81
|
({
|
|
68
82
|
className: c,
|
|
69
83
|
variant: w,
|
|
70
|
-
color:
|
|
71
|
-
size:
|
|
84
|
+
color: N,
|
|
85
|
+
size: y,
|
|
72
86
|
asChild: z = !1,
|
|
73
87
|
startIcon: d,
|
|
74
88
|
endIcon: l,
|
|
75
89
|
loading: e = !1,
|
|
76
|
-
loadingPosition:
|
|
90
|
+
loadingPosition: s = "start",
|
|
77
91
|
fullWidth: m = !1,
|
|
78
92
|
disabled: v,
|
|
79
93
|
children: i,
|
|
80
94
|
...u
|
|
81
|
-
},
|
|
82
|
-
const
|
|
95
|
+
}, h) => {
|
|
96
|
+
const a = M(), b = w ?? a.variant, f = N ?? a.color, o = y ?? a.size ?? "md", g = A[o], S = D[o], n = e ? /* @__PURE__ */ r(q, { size: S }) : null;
|
|
83
97
|
if (z) {
|
|
84
98
|
const V = {
|
|
85
|
-
className:
|
|
86
|
-
x({ variant: b, color:
|
|
99
|
+
className: t(
|
|
100
|
+
x({ variant: b, color: f, size: o }),
|
|
87
101
|
m && "w-full",
|
|
88
102
|
c
|
|
89
103
|
),
|
|
90
|
-
ref:
|
|
104
|
+
ref: h,
|
|
91
105
|
disabled: v || e,
|
|
92
106
|
"aria-busy": e || void 0,
|
|
93
107
|
...u
|
|
94
108
|
};
|
|
95
109
|
return /* @__PURE__ */ r(R, { ...V, children: /* @__PURE__ */ r(E, { children: i }) });
|
|
96
110
|
}
|
|
97
|
-
const j = () => e &&
|
|
111
|
+
const j = () => e && s === "start" ? n : d ? /* @__PURE__ */ r("span", { className: t("inline-flex shrink-0 items-center justify-center", g), children: d }) : null, k = () => e && s === "end" ? n : l ? /* @__PURE__ */ r("span", { className: t("inline-flex shrink-0 items-center justify-center", g), children: l }) : null, C = () => e && s === "center" ? /* @__PURE__ */ p("span", { className: "relative inline-flex items-center justify-center", children: [
|
|
98
112
|
/* @__PURE__ */ r("span", { className: "invisible", children: i }),
|
|
99
|
-
/* @__PURE__ */ r("span", { className: "absolute inset-0 flex items-center justify-center", children:
|
|
113
|
+
/* @__PURE__ */ r("span", { className: "absolute inset-0 flex items-center justify-center", children: n })
|
|
100
114
|
] }) : i;
|
|
101
115
|
return /* @__PURE__ */ p(
|
|
102
116
|
"button",
|
|
103
117
|
{
|
|
104
|
-
className:
|
|
105
|
-
x({ variant: b, color:
|
|
118
|
+
className: t(
|
|
119
|
+
x({ variant: b, color: f, size: o }),
|
|
106
120
|
m && "w-full",
|
|
107
121
|
c
|
|
108
122
|
),
|
|
109
|
-
ref:
|
|
123
|
+
ref: h,
|
|
110
124
|
disabled: v || e,
|
|
111
125
|
"aria-busy": e || void 0,
|
|
112
126
|
...u,
|
package/dist/ui/card.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const cardVariants: (props?: ({
|
|
5
|
-
variant?: "flat" | "
|
|
5
|
+
variant?: "flat" | "default" | "outline" | "elevated" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
/**
|
|
8
8
|
* Props for Card — a general-purpose content container with 4 elevation/style variants and
|
package/dist/ui/sidebar.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ declare const SidebarMenuButton: import('react').ForwardRefExoticComponent<Omit<
|
|
|
46
46
|
isActive?: boolean;
|
|
47
47
|
tooltip?: string | ComponentProps<typeof TooltipContent>;
|
|
48
48
|
} & VariantProps<(props?: ({
|
|
49
|
-
variant?: "
|
|
49
|
+
variant?: "default" | "outline" | null | undefined;
|
|
50
50
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
51
51
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
52
52
|
declare const SidebarMenuAction: import('react').ForwardRefExoticComponent<Omit<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
|
package/dist/ui/stat-card.d.ts
CHANGED
|
@@ -41,7 +41,10 @@ import * as React from 'react';
|
|
|
41
41
|
* // These are just a few ways — feel free to combine props creatively!
|
|
42
42
|
*/
|
|
43
43
|
export interface StatCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
44
|
-
label
|
|
44
|
+
/** Heading text for the metric. `title` is an alias for `label`. */
|
|
45
|
+
label?: string;
|
|
46
|
+
/** Alias for `label` — use whichever feels natural. */
|
|
47
|
+
title?: string;
|
|
45
48
|
value: string | number;
|
|
46
49
|
delta?: {
|
|
47
50
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat-card.d.ts","sourceRoot":"","sources":["../../src/ui/stat-card.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACzE,KAAK,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"stat-card.d.ts","sourceRoot":"","sources":["../../src/ui/stat-card.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACzE,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;QACb,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAAA;KACrC,CAAA;IACD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACpE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,QAAA,MAAM,QAAQ,sFAiEb,CAAA;AAID,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
package/dist/ui/stat-card.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as n, jsx as s } from "react/jsx-runtime";
|
|
3
|
-
import { IconTrendingUp as
|
|
3
|
+
import { IconTrendingUp as h, IconTrendingDown as f, IconMinus as g } from "@tabler/icons-react";
|
|
4
4
|
import * as m from "react";
|
|
5
5
|
import { cn as d } from "./lib/utils.js";
|
|
6
|
-
const
|
|
7
|
-
({ className: o, label: c,
|
|
8
|
-
|
|
6
|
+
const w = m.forwardRef(
|
|
7
|
+
({ className: o, label: c, title: a, value: u, delta: e, icon: r, loading: b, ...t }, i) => {
|
|
8
|
+
const l = a ?? c ?? "";
|
|
9
|
+
if (b)
|
|
9
10
|
return /* @__PURE__ */ n(
|
|
10
11
|
"div",
|
|
11
12
|
{
|
|
@@ -22,7 +23,7 @@ const f = m.forwardRef(
|
|
|
22
23
|
]
|
|
23
24
|
}
|
|
24
25
|
);
|
|
25
|
-
const
|
|
26
|
+
const p = (e == null ? void 0 : e.direction) === "up" ? h : (e == null ? void 0 : e.direction) === "down" ? f : g, x = (e == null ? void 0 : e.direction) === "up" ? "text-success" : (e == null ? void 0 : e.direction) === "down" ? "text-error" : "text-text-secondary";
|
|
26
27
|
return /* @__PURE__ */ n(
|
|
27
28
|
"div",
|
|
28
29
|
{
|
|
@@ -34,12 +35,12 @@ const f = m.forwardRef(
|
|
|
34
35
|
...t,
|
|
35
36
|
children: [
|
|
36
37
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between mb-ds-04", children: [
|
|
37
|
-
/* @__PURE__ */ s("p", { className: "text-ds-md font-medium text-text-secondary", children:
|
|
38
|
+
/* @__PURE__ */ s("p", { className: "text-ds-md font-medium text-text-secondary", children: l }),
|
|
38
39
|
r && /* @__PURE__ */ s("span", { className: "text-text-secondary", "aria-hidden": "true", children: typeof r == "function" ? m.createElement(r, { className: "h-ico-lg w-ico-lg" }) : r })
|
|
39
40
|
] }),
|
|
40
|
-
/* @__PURE__ */ s("p", { className: "text-ds-3xl font-semibold text-text-primary tabular-nums", children:
|
|
41
|
-
e && /* @__PURE__ */ n("div", { className: d("mt-ds-03 flex items-center gap-ds-02 text-ds-sm font-medium",
|
|
42
|
-
/* @__PURE__ */ s(
|
|
41
|
+
/* @__PURE__ */ s("p", { className: "text-ds-3xl font-semibold text-text-primary tabular-nums", children: u }),
|
|
42
|
+
e && /* @__PURE__ */ n("div", { className: d("mt-ds-03 flex items-center gap-ds-02 text-ds-sm font-medium", x), children: [
|
|
43
|
+
/* @__PURE__ */ s(p, { className: "h-ico-sm w-ico-sm", "aria-hidden": "true" }),
|
|
43
44
|
/* @__PURE__ */ s("span", { children: e.value })
|
|
44
45
|
] })
|
|
45
46
|
]
|
|
@@ -47,7 +48,7 @@ const f = m.forwardRef(
|
|
|
47
48
|
);
|
|
48
49
|
}
|
|
49
50
|
);
|
|
50
|
-
|
|
51
|
+
w.displayName = "StatCard";
|
|
51
52
|
export {
|
|
52
|
-
|
|
53
|
+
w as StatCard
|
|
53
54
|
};
|
|
@@ -4,11 +4,11 @@ import { toggleVariants } from './toggle';
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import * as ToggleGroupPrimitive from '../primitives/react-toggle-group';
|
|
6
6
|
declare const ToggleGroup: React.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "default" | "outline" | null | undefined;
|
|
8
8
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
9
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>) & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
11
|
-
variant?: "
|
|
11
|
+
variant?: "default" | "outline" | null | undefined;
|
|
12
12
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
13
13
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
14
14
|
export type ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>;
|
package/dist/ui/toggle.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as TogglePrimitive from '../primitives/react-toggle';
|
|
5
5
|
declare const toggleVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "default" | "outline" | null | undefined;
|
|
7
7
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
9
|
declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
10
|
-
variant?: "
|
|
10
|
+
variant?: "default" | "outline" | null | undefined;
|
|
11
11
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
12
12
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
13
|
export type ToggleProps = React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>;
|