@devalok/shilp-sutra 0.12.0 → 0.13.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/dist/_chunks/button.js +5 -5
- package/dist/_chunks/card.js +5 -5
- package/dist/_chunks/checkbox.js +3 -3
- package/dist/composed/empty-state.d.ts +3 -1
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/empty-state.js +38 -39
- package/dist/shell/bottom-navbar.js +22 -22
- package/dist/shell/notification-center.d.ts +10 -0
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +107 -92
- package/dist/shell/sidebar.d.ts +17 -1
- package/dist/shell/sidebar.d.ts.map +1 -1
- package/dist/shell/sidebar.js +198 -139
- package/dist/tailwind/index.cjs +128 -1
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +128 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +28 -26
- package/dist/ui/badge.js +2 -2
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +23 -21
- package/dist/ui/button.js +9 -9
- package/dist/ui/card.js +4 -4
- package/dist/ui/checkbox.js +4 -4
- package/dist/ui/chip.js +2 -2
- package/dist/ui/collapsible.js +12 -12
- package/dist/ui/context-menu.js +6 -6
- package/dist/ui/dropdown-menu.js +3 -3
- package/dist/ui/index.js +352 -350
- package/dist/ui/menubar.js +3 -3
- package/dist/ui/progress.js +22 -22
- package/dist/ui/slider.js +8 -8
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +14 -14
- package/dist/ui/stepper.js +2 -2
- package/dist/ui/switch.js +1 -1
- package/dist/ui/tabs.js +14 -14
- package/dist/ui/toggle.js +1 -1
- package/llms-full.txt +15 -5
- package/llms.txt +12 -3
- package/package.json +1 -1
package/dist/_chunks/button.js
CHANGED
|
@@ -5,7 +5,7 @@ import { S as R, a as E } from "./primitives.js";
|
|
|
5
5
|
import * as G from "react";
|
|
6
6
|
import { u as M, S as q } from "./spinner.js";
|
|
7
7
|
import { c as s } from "./utils.js";
|
|
8
|
-
const p = V("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]", {
|
|
8
|
+
const p = V("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,transform] duration-fast-01 ease-productive-standard active:translate-y-px 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]", {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
solid: "",
|
|
@@ -73,8 +73,8 @@ const p = V("inline-flex items-center justify-center gap-ds-03 whitespace-nowrap
|
|
|
73
73
|
"icon-sm": "sm",
|
|
74
74
|
"icon-md": "sm",
|
|
75
75
|
"icon-lg": "md"
|
|
76
|
-
}, F = G.forwardRef(({ className: c, variant: w, color: N, size: y, asChild: S = !1, startIcon: d, endIcon: l, loading: e = !1, loadingPosition: t = "start", fullWidth: m = !1, disabled: v, children:
|
|
77
|
-
const
|
|
76
|
+
}, F = G.forwardRef(({ className: c, variant: w, color: N, size: y, asChild: S = !1, startIcon: d, endIcon: l, loading: e = !1, loadingPosition: t = "start", fullWidth: m = !1, disabled: v, children: a, ...u }, h) => {
|
|
77
|
+
const i = M(), b = w ?? i.variant, f = N ?? i.color, o = y ?? i.size ?? "md", g = A[o], z = D[o], n = e ? r(q, { size: z }) : null;
|
|
78
78
|
if (S) {
|
|
79
79
|
const C = {
|
|
80
80
|
className: s(p({ variant: b, color: f, size: o }), m && "w-full", c),
|
|
@@ -83,9 +83,9 @@ const p = V("inline-flex items-center justify-center gap-ds-03 whitespace-nowrap
|
|
|
83
83
|
"aria-busy": e || void 0,
|
|
84
84
|
...u
|
|
85
85
|
};
|
|
86
|
-
return r(R, { ...C, children: r(E, { children:
|
|
86
|
+
return r(R, { ...C, children: r(E, { children: a }) });
|
|
87
87
|
}
|
|
88
|
-
const j = () => e && t === "start" ? n : d ? r("span", { className: s("inline-flex shrink-0 items-center justify-center", g), children: d }) : null, k = () => e && t === "end" ? n : l ? r("span", { className: s("inline-flex shrink-0 items-center justify-center", g), children: l }) : null, B = () => e && t === "center" ? x("span", { className: "relative inline-flex items-center justify-center", children: [r("span", { className: "invisible", children:
|
|
88
|
+
const j = () => e && t === "start" ? n : d ? r("span", { className: s("inline-flex shrink-0 items-center justify-center", g), children: d }) : null, k = () => e && t === "end" ? n : l ? r("span", { className: s("inline-flex shrink-0 items-center justify-center", g), children: l }) : null, B = () => e && t === "center" ? x("span", { className: "relative inline-flex items-center justify-center", children: [r("span", { className: "invisible", children: a }), r("span", { className: "absolute inset-0 flex items-center justify-center", children: n })] }) : a;
|
|
89
89
|
return x("button", { className: s(p({ variant: b, color: f, size: o }), m && "w-full", c), ref: h, disabled: v || e, "aria-busy": e || void 0, ...u, children: [j(), B(), k()] });
|
|
90
90
|
});
|
|
91
91
|
F.displayName = "Button";
|
package/dist/_chunks/card.js
CHANGED
|
@@ -4,7 +4,7 @@ import * as o from "react";
|
|
|
4
4
|
import { bj as n, bk as c } from "./primitives.js";
|
|
5
5
|
import { c as s } from "./utils.js";
|
|
6
6
|
import { e as l } from "./vendor-utils.js";
|
|
7
|
-
const f = o.forwardRef(({ className: e, error: r, ...a }, d) => t(n, { className: s("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-ds-full border-2 border-transparent shadow-01 transition-colors duration-fast-01 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-[0.38] data-[state=checked]:bg-interactive data-[state=unchecked]:bg-border-strong", r && "border-border-error data-[state=checked]:bg-error", e), ...a, ref: d, children: t(c, { className: s("pointer-events-none block h-ico-md w-ico-md rounded-ds-full bg-text-on-color shadow-02 ring-0 transition-transform duration-
|
|
7
|
+
const f = o.forwardRef(({ className: e, error: r, ...a }, d) => t(n, { className: s("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-ds-full border-2 border-transparent shadow-01 transition-colors duration-fast-01 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-[0.38] data-[state=checked]:bg-interactive data-[state=unchecked]:bg-border-strong", r && "border-border-error data-[state=checked]:bg-error", e), ...a, ref: d, children: t(c, { className: s("pointer-events-none block h-ico-md w-ico-md rounded-ds-full bg-text-on-color shadow-02 ring-0 transition-transform duration-moderate-01 ease-bounce data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") }) }));
|
|
8
8
|
f.displayName = n.displayName;
|
|
9
9
|
const b = l("rounded-ds-lg text-text-primary", {
|
|
10
10
|
variants: {
|
|
@@ -16,7 +16,7 @@ const b = l("rounded-ds-lg text-text-primary", {
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
defaultVariants: { variant: "default" }
|
|
19
|
-
}), m = o.forwardRef(({ className: e, variant: r, interactive: a, ...d }, i) => t("div", { ref: i, className: s(b({ variant: r }), a && "hover:shadow-02 hover:border-border-strong cursor-pointer transition-
|
|
19
|
+
}), m = o.forwardRef(({ className: e, variant: r, interactive: a, ...d }, i) => t("div", { ref: i, className: s(b({ variant: r }), a && "hover:shadow-02 hover:border-border-strong hover:-translate-y-px active:scale-[0.98] cursor-pointer transition-all duration-fast-02 ease-productive-standard", e), ...d }));
|
|
20
20
|
m.displayName = "Card";
|
|
21
21
|
const p = o.forwardRef(({ className: e, ...r }, a) => t("div", { ref: a, className: s("flex flex-col space-y-ds-02b p-ds-06", e), ...r }));
|
|
22
22
|
p.displayName = "CardHeader";
|
|
@@ -26,8 +26,8 @@ const h = o.forwardRef(({ className: e, ...r }, a) => t("div", { ref: a, classNa
|
|
|
26
26
|
h.displayName = "CardDescription";
|
|
27
27
|
const v = o.forwardRef(({ className: e, ...r }, a) => t("div", { ref: a, className: s("p-ds-06 pt-0", e), ...r }));
|
|
28
28
|
v.displayName = "CardContent";
|
|
29
|
-
const
|
|
30
|
-
|
|
29
|
+
const g = o.forwardRef(({ className: e, ...r }, a) => t("div", { ref: a, className: s("flex items-center p-ds-06 pt-0", e), ...r }));
|
|
30
|
+
g.displayName = "CardFooter";
|
|
31
31
|
export {
|
|
32
32
|
m as C,
|
|
33
33
|
f as S,
|
|
@@ -35,6 +35,6 @@ export {
|
|
|
35
35
|
u as b,
|
|
36
36
|
v as c,
|
|
37
37
|
h as d,
|
|
38
|
-
|
|
38
|
+
g as e,
|
|
39
39
|
b as f
|
|
40
40
|
};
|
package/dist/_chunks/checkbox.js
CHANGED
|
@@ -4,9 +4,9 @@ import { C as r, b as d } from "./primitives.js";
|
|
|
4
4
|
import { IconMinus as m, IconCheck as l } from "@tabler/icons-react";
|
|
5
5
|
import * as f from "react";
|
|
6
6
|
import { c as b } from "./utils.js";
|
|
7
|
-
const h = f.forwardRef(({ className: i, error: o, indeterminate: a, checked:
|
|
8
|
-
const t = a ? "indeterminate" :
|
|
9
|
-
return e(r, { ref: n, checked: t, className: b("peer flex items-center justify-center h-ico-md w-ico-md shrink-0 rounded-ds-sm", "border border-border-strong", "bg-field", "transition-colors duration-fast-01", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2", "disabled:cursor-not-allowed disabled:opacity-[0.38]", "data-[state=checked]:bg-interactive data-[state=checked]:border-interactive data-[state=checked]:text-text-on-color", "data-[state=indeterminate]:bg-interactive data-[state=indeterminate]:border-interactive data-[state=indeterminate]:text-text-on-color", o && "border-border-error", i), ...
|
|
7
|
+
const h = f.forwardRef(({ className: i, error: o, indeterminate: a, checked: c, ...s }, n) => {
|
|
8
|
+
const t = a ? "indeterminate" : c;
|
|
9
|
+
return e(r, { ref: n, checked: t, className: b("peer flex items-center justify-center h-ico-md w-ico-md shrink-0 rounded-ds-sm", "border border-border-strong", "bg-field", "transition-colors duration-fast-01", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2", "disabled:cursor-not-allowed disabled:opacity-[0.38]", "data-[state=checked]:bg-interactive data-[state=checked]:border-interactive data-[state=checked]:text-text-on-color", "data-[state=indeterminate]:bg-interactive data-[state=indeterminate]:border-interactive data-[state=indeterminate]:text-text-on-color", o && "border-border-error", i), ...s, children: e(d, { className: "flex items-center justify-center text-current animate-check-pop", children: t === "indeterminate" ? e(m, { className: "h-ico-sm w-ico-sm" }) : e(l, { className: "h-3 w-3" }) }) });
|
|
10
10
|
});
|
|
11
11
|
h.displayName = r.displayName;
|
|
12
12
|
export {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
icon?: React.ReactNode
|
|
3
|
+
icon?: React.ReactNode | React.ComponentType<{
|
|
4
|
+
className?: string;
|
|
5
|
+
}>;
|
|
4
6
|
title: string;
|
|
5
7
|
description?: string;
|
|
6
8
|
action?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../src/composed/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../src/composed/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACpE,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAcD,QAAA,MAAM,UAAU,wFAwEf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,85 +1,84 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { c } from "../_chunks/utils.js";
|
|
4
|
-
const h = ({ className:
|
|
1
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import { c as s } from "../_chunks/utils.js";
|
|
4
|
+
const h = ({ className: e }) => /* @__PURE__ */ t(
|
|
5
5
|
"svg",
|
|
6
6
|
{
|
|
7
7
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8
8
|
viewBox: "0 0 32 32",
|
|
9
9
|
fill: "currentColor",
|
|
10
|
-
className:
|
|
10
|
+
className: e,
|
|
11
11
|
"aria-hidden": "true",
|
|
12
|
-
children: /* @__PURE__ */
|
|
12
|
+
children: /* @__PURE__ */ t("path", { d: "M25.97,21.39c-0.9-1.85,0.08-3.95-1.72-5.39c1.76-1.44,0.8-3.55,1.69-5.39c0.05-0.12,0.04-0.25-0.02-0.35c-0.06-0.1-0.16-0.18-0.29-0.19c-2.05-0.15-3.35-2.04-5.5-1.21c-0.39-2.21-2.7-2.44-3.84-4.13c-0.08-0.1-0.19-0.16-0.31-0.16c-0.12,0-0.23,0.05-0.31,0.16c-1.14,1.69-3.43,1.92-3.82,4.13c-2.14-0.83-3.47,1.07-5.52,1.21c-0.13,0.01-0.23,0.09-0.29,0.19c-0.06,0.1-0.07,0.23-0.02,0.35c0.9,1.85-0.08,3.95,1.72,5.39c-1.76,1.44-0.8,3.55-1.69,5.39C6,21.51,6.02,21.64,6.07,21.74c0.06,0.1,0.16,0.18,0.29,0.19c2.05,0.15,3.38,2.06,5.52,1.23c0.39,2.21,2.67,2.43,3.82,4.12c0.08,0.1,0.19,0.16,0.31,0.16c0.12,0,0.23-0.05,0.31-0.16c1.14-1.69,3.42-1.92,3.81-4.13c2.14,0.83,3.48-1.07,5.53-1.22c0.13-0.01,0.23-0.09,0.29-0.19C26.01,21.64,26.02,21.51,25.97,21.39z" })
|
|
13
13
|
}
|
|
14
|
-
),
|
|
14
|
+
), y = c.forwardRef(
|
|
15
15
|
({
|
|
16
|
-
icon:
|
|
17
|
-
title:
|
|
16
|
+
icon: e,
|
|
17
|
+
title: o,
|
|
18
18
|
description: d,
|
|
19
|
-
action:
|
|
20
|
-
compact:
|
|
19
|
+
action: a,
|
|
20
|
+
compact: l = !1,
|
|
21
21
|
className: i,
|
|
22
|
-
...
|
|
23
|
-
},
|
|
24
|
-
const
|
|
22
|
+
...n
|
|
23
|
+
}, x) => {
|
|
24
|
+
const r = l ? "h-ico-md w-ico-md" : "h-ico-lg w-ico-lg", f = e != null && !c.isValidElement(e) && (typeof e == "function" || typeof e == "object" && "$$typeof" in e), p = e ? f ? c.createElement(e, {
|
|
25
|
+
className: s("text-text-placeholder", r)
|
|
26
|
+
}) : e : /* @__PURE__ */ t(
|
|
25
27
|
h,
|
|
26
28
|
{
|
|
27
|
-
className:
|
|
28
|
-
"text-text-placeholder",
|
|
29
|
-
s ? "h-ico-md w-ico-md" : "h-ico-lg w-ico-lg"
|
|
30
|
-
)
|
|
29
|
+
className: s("text-text-placeholder", r)
|
|
31
30
|
}
|
|
32
31
|
);
|
|
33
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ m(
|
|
34
33
|
"div",
|
|
35
34
|
{
|
|
36
|
-
ref:
|
|
37
|
-
className:
|
|
35
|
+
ref: x,
|
|
36
|
+
className: s(
|
|
38
37
|
"flex flex-col items-center justify-center text-center",
|
|
39
|
-
|
|
38
|
+
l ? "gap-ds-04 py-ds-07" : "gap-ds-05 py-ds-10",
|
|
40
39
|
i
|
|
41
40
|
),
|
|
42
|
-
...
|
|
41
|
+
...n,
|
|
43
42
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ t(
|
|
45
44
|
"div",
|
|
46
45
|
{
|
|
47
|
-
className:
|
|
48
|
-
"flex items-center justify-center rounded-ds-xl bg-layer-02",
|
|
49
|
-
|
|
46
|
+
className: s(
|
|
47
|
+
"flex items-center justify-center rounded-ds-xl bg-layer-02 animate-float",
|
|
48
|
+
l ? "h-ds-md w-ds-md" : "h-ds-lg w-ds-lg"
|
|
50
49
|
),
|
|
51
|
-
children:
|
|
50
|
+
children: p
|
|
52
51
|
}
|
|
53
52
|
),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ m("div", { className: "flex max-w-[280px] flex-col gap-ds-02", children: [
|
|
54
|
+
/* @__PURE__ */ t(
|
|
56
55
|
"h3",
|
|
57
56
|
{
|
|
58
|
-
className:
|
|
57
|
+
className: s(
|
|
59
58
|
"text-text-primary",
|
|
60
|
-
|
|
59
|
+
l ? "text-ds-md font-semibold" : "text-ds-base font-semibold"
|
|
61
60
|
),
|
|
62
|
-
children:
|
|
61
|
+
children: o
|
|
63
62
|
}
|
|
64
63
|
),
|
|
65
|
-
d && /* @__PURE__ */
|
|
64
|
+
d && /* @__PURE__ */ t(
|
|
66
65
|
"p",
|
|
67
66
|
{
|
|
68
|
-
className:
|
|
67
|
+
className: s(
|
|
69
68
|
"text-text-placeholder",
|
|
70
|
-
|
|
69
|
+
l ? "text-ds-sm" : "text-ds-md"
|
|
71
70
|
),
|
|
72
71
|
children: d
|
|
73
72
|
}
|
|
74
73
|
)
|
|
75
74
|
] }),
|
|
76
|
-
|
|
75
|
+
a && /* @__PURE__ */ t("div", { className: "mt-ds-02", children: a })
|
|
77
76
|
]
|
|
78
77
|
}
|
|
79
78
|
);
|
|
80
79
|
}
|
|
81
80
|
);
|
|
82
|
-
|
|
81
|
+
y.displayName = "EmptyState";
|
|
83
82
|
export {
|
|
84
|
-
|
|
83
|
+
y as EmptyState
|
|
85
84
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as a, Fragment as v, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import * as g from "react";
|
|
4
4
|
import { useState as N } from "react";
|
|
5
5
|
import { useLink as p } from "./link-context.js";
|
|
6
6
|
import { IconX as y, IconDots as w } from "@tabler/icons-react";
|
|
7
7
|
import { c as r } from "../_chunks/utils.js";
|
|
8
8
|
function k({
|
|
9
|
-
item:
|
|
9
|
+
item: s,
|
|
10
10
|
isActive: n,
|
|
11
11
|
onClick: d
|
|
12
12
|
}) {
|
|
@@ -14,45 +14,45 @@ function k({
|
|
|
14
14
|
return /* @__PURE__ */ t(
|
|
15
15
|
i,
|
|
16
16
|
{
|
|
17
|
-
href:
|
|
17
|
+
href: s.href,
|
|
18
18
|
onClick: d,
|
|
19
|
-
"aria-label":
|
|
19
|
+
"aria-label": s.title,
|
|
20
20
|
"aria-current": n ? "page" : void 0,
|
|
21
21
|
className: r(
|
|
22
|
-
"flex h-16 max-w-[70px] flex-1 cursor-pointer flex-col items-center gap-ds-02 p-ds-02 pt-0 text-ds-sm",
|
|
22
|
+
"flex h-16 max-w-[70px] flex-1 cursor-pointer flex-col items-center gap-ds-02 p-ds-02 pt-0 text-ds-sm active:animate-subtle-bounce",
|
|
23
23
|
n ? "font-semibold text-interactive" : "text-text-helper"
|
|
24
24
|
),
|
|
25
|
-
children: /* @__PURE__ */
|
|
25
|
+
children: /* @__PURE__ */ a("div", { className: "relative flex w-full flex-col items-center gap-ds-02", children: [
|
|
26
26
|
/* @__PURE__ */ t(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
29
29
|
className: r(
|
|
30
|
-
"absolute top-0 h-[3px] w-full rounded-b-ds-sm bg-interactive p-0 transition-opacity duration-
|
|
31
|
-
n ? "opacity-100" : "opacity-0"
|
|
30
|
+
"absolute top-0 h-[3px] w-full rounded-b-ds-sm bg-interactive p-0 transition-[opacity,transform] duration-moderate-01",
|
|
31
|
+
n ? "opacity-100 animate-tab-indicator" : "opacity-0 scale-x-0"
|
|
32
32
|
),
|
|
33
33
|
"aria-hidden": "true"
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
|
-
/* @__PURE__ */ t("div", { className: "p-ds-03", children: /* @__PURE__ */ t("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md", "aria-hidden": "true", children:
|
|
37
|
-
/* @__PURE__ */ t("span", { className: "text-center", children:
|
|
36
|
+
/* @__PURE__ */ t("div", { className: "p-ds-03", children: /* @__PURE__ */ t("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md", "aria-hidden": "true", children: s.icon }) }),
|
|
37
|
+
/* @__PURE__ */ t("span", { className: "text-center", children: s.title })
|
|
38
38
|
] })
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
const M = g.forwardRef(
|
|
43
43
|
({
|
|
44
|
-
currentPath:
|
|
44
|
+
currentPath: s = "/",
|
|
45
45
|
user: n,
|
|
46
46
|
primaryItems: d = [],
|
|
47
47
|
moreItems: i = [],
|
|
48
48
|
className: f,
|
|
49
49
|
...x
|
|
50
50
|
}, h) => {
|
|
51
|
-
const b = p(), [o, l] = N(!1), c = (e, u = !1) => u || e === "/" ?
|
|
51
|
+
const b = p(), [o, l] = N(!1), c = (e, u = !1) => u || e === "/" ? s === e : s.startsWith(e), m = i.some(
|
|
52
52
|
(e) => c(e.href, e.exact)
|
|
53
53
|
);
|
|
54
|
-
return /* @__PURE__ */
|
|
55
|
-
o && /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ a(v, { children: [
|
|
55
|
+
o && /* @__PURE__ */ a(
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
58
58
|
role: "button",
|
|
@@ -64,14 +64,14 @@ const M = g.forwardRef(
|
|
|
64
64
|
},
|
|
65
65
|
children: [
|
|
66
66
|
/* @__PURE__ */ t("div", { className: "absolute inset-0 bg-overlay" }),
|
|
67
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ a(
|
|
68
68
|
"div",
|
|
69
69
|
{
|
|
70
70
|
className: "absolute bottom-[72px] left-0 right-0 rounded-t-ds-2xl border-t border-border bg-layer-01 p-ds-05 pb-ds-03",
|
|
71
71
|
onClick: (e) => e.stopPropagation(),
|
|
72
72
|
onKeyDown: (e) => e.stopPropagation(),
|
|
73
73
|
children: [
|
|
74
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ a("div", { className: "mb-ds-04 flex items-center justify-between", children: [
|
|
75
75
|
/* @__PURE__ */ t("span", { className: "text-ds-md font-semibold text-text-primary", children: "More" }),
|
|
76
76
|
/* @__PURE__ */ t(
|
|
77
77
|
"button",
|
|
@@ -83,7 +83,7 @@ const M = g.forwardRef(
|
|
|
83
83
|
}
|
|
84
84
|
)
|
|
85
85
|
] }),
|
|
86
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-ds-03", children: i.map((e) => /* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-ds-03", children: i.map((e) => /* @__PURE__ */ a(
|
|
87
87
|
b,
|
|
88
88
|
{
|
|
89
89
|
href: e.href,
|
|
@@ -105,7 +105,7 @@ const M = g.forwardRef(
|
|
|
105
105
|
]
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ a(
|
|
109
109
|
"nav",
|
|
110
110
|
{
|
|
111
111
|
...x,
|
|
@@ -132,16 +132,16 @@ const M = g.forwardRef(
|
|
|
132
132
|
"aria-label": "More navigation options",
|
|
133
133
|
"aria-expanded": o,
|
|
134
134
|
className: r(
|
|
135
|
-
"flex h-16 max-w-[70px] flex-1 cursor-pointer flex-col items-center gap-ds-02 p-ds-02 pt-0 text-ds-sm",
|
|
135
|
+
"flex h-16 max-w-[70px] flex-1 cursor-pointer flex-col items-center gap-ds-02 p-ds-02 pt-0 text-ds-sm active:animate-subtle-bounce",
|
|
136
136
|
o || m ? "font-semibold text-interactive" : "text-text-helper"
|
|
137
137
|
),
|
|
138
|
-
children: /* @__PURE__ */
|
|
138
|
+
children: /* @__PURE__ */ a("div", { className: "relative flex w-full flex-col items-center gap-ds-02", children: [
|
|
139
139
|
/* @__PURE__ */ t(
|
|
140
140
|
"div",
|
|
141
141
|
{
|
|
142
142
|
className: r(
|
|
143
|
-
"absolute top-0 h-[3px] w-full rounded-b-ds-sm bg-interactive p-0 transition-opacity duration-
|
|
144
|
-
o || m ? "opacity-100" : "opacity-0"
|
|
143
|
+
"absolute top-0 h-[3px] w-full rounded-b-ds-sm bg-interactive p-0 transition-[opacity,transform] duration-moderate-01",
|
|
144
|
+
o || m ? "opacity-100 animate-tab-indicator" : "opacity-0 scale-x-0"
|
|
145
145
|
),
|
|
146
146
|
"aria-hidden": "true"
|
|
147
147
|
}
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
* reading from Zustand stores or using Remix useNavigate.
|
|
7
7
|
*/
|
|
8
8
|
import * as React from 'react';
|
|
9
|
+
export interface NotificationAction {
|
|
10
|
+
/** Button label */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Visual style — 'primary' is filled, 'default' is ghost, 'danger' is red ghost */
|
|
13
|
+
variant?: 'primary' | 'default' | 'danger';
|
|
14
|
+
/** Called when the action button is clicked. Receives the notification id. */
|
|
15
|
+
onClick: (id: string) => void;
|
|
16
|
+
}
|
|
9
17
|
export interface Notification {
|
|
10
18
|
id: string;
|
|
11
19
|
title: string;
|
|
@@ -19,6 +27,8 @@ export interface Notification {
|
|
|
19
27
|
project?: {
|
|
20
28
|
title: string;
|
|
21
29
|
} | null;
|
|
30
|
+
/** Inline action buttons (e.g. Approve / Deny). Max 2–3 recommended. */
|
|
31
|
+
actions?: NotificationAction[];
|
|
22
32
|
}
|
|
23
33
|
export interface NotificationCenterProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
24
34
|
/** List of notifications to display */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-center.d.ts","sourceRoot":"","sources":["../../src/shell/notification-center.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,CAAA;IACvC,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"notification-center.d.ts","sourceRoot":"","sources":["../../src/shell/notification-center.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B,MAAM,WAAW,kBAAkB;IACjC,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,oFAAoF;IACpF,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;IAC1C,8EAA8E;IAC9E,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,CAAA;IACvC,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAClC,wEAAwE;IACxE,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAC/B;AAED,MAAM,WAAW,uBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,uCAAuC;IACvC,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,iDAAiD;IACjD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,mDAAmD;IACnD,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,+CAA+C;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,iFAAiF;IACjF,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,MAAM,GAAG,IAAI,CAAA;IACpE,wEAAwE;IACxE,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,oEAAoE;IACpE,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,+DAA+D;IAC/D,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,gGAAgG;IAChG,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA8LD,QAAA,MAAM,kBAAkB,mGA+LvB,CAAA;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|