@devalok/shilp-sutra 0.5.0 → 0.6.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.
Files changed (36) hide show
  1. package/dist/composed/command-palette.d.ts +1 -2
  2. package/dist/composed/command-palette.d.ts.map +1 -1
  3. package/dist/composed/command-palette.js +27 -33
  4. package/dist/composed/date-picker/calendar-grid.d.ts +7 -0
  5. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  6. package/dist/composed/date-picker/calendar-grid.js +92 -72
  7. package/dist/composed/date-picker/index.d.ts +1 -1
  8. package/dist/composed/date-picker/index.d.ts.map +1 -1
  9. package/dist/composed/index.d.ts +5 -1
  10. package/dist/composed/index.d.ts.map +1 -1
  11. package/dist/composed/index.js +42 -38
  12. package/dist/composed/page-header.d.ts +1 -1
  13. package/dist/composed/page-header.d.ts.map +1 -1
  14. package/dist/composed/page-header.js +63 -59
  15. package/dist/composed/schedule-view.d.ts +26 -0
  16. package/dist/composed/schedule-view.d.ts.map +1 -0
  17. package/dist/composed/schedule-view.js +183 -0
  18. package/dist/composed/simple-tooltip.d.ts +15 -0
  19. package/dist/composed/simple-tooltip.d.ts.map +1 -0
  20. package/dist/composed/simple-tooltip.js +17 -0
  21. package/dist/composed/status-badge.d.ts +2 -1
  22. package/dist/composed/status-badge.d.ts.map +1 -1
  23. package/dist/composed/status-badge.js +37 -22
  24. package/dist/shell/app-command-palette.js +87 -87
  25. package/dist/shell/bottom-navbar.d.ts +1 -3
  26. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  27. package/dist/shell/bottom-navbar.js +37 -37
  28. package/dist/shell/notification-preferences.d.ts.map +1 -1
  29. package/dist/shell/notification-preferences.js +31 -31
  30. package/dist/shell/sidebar.d.ts +1 -3
  31. package/dist/shell/sidebar.d.ts.map +1 -1
  32. package/dist/shell/sidebar.js +6 -6
  33. package/dist/ui/alert.d.ts +3 -0
  34. package/dist/ui/alert.d.ts.map +1 -1
  35. package/dist/ui/alert.js +56 -31
  36. package/package.json +210 -208
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
3
- import * as g from "react";
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(t.icon, { className: "h-ico-md w-ico-md shrink-0", "aria-hidden": "true" }),
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 = g.forwardRef(
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 N = m(), v = (r, s = !1) => s || r === "/" ? t === r : t.startsWith(r);
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: v(d.href, d.exact)
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
- N,
87
+ v,
88
88
  {
89
89
  className: "text-ds-md text-text-placeholder transition-colors hover:text-interactive",
90
90
  href: r.href,
@@ -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
  *
@@ -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;;8EAmBlB,CAAA;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;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"}
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 t, jsx as r } from "react/jsx-runtime";
3
- import { IconInfoCircle as i, IconAlertCircle as m, IconAlertTriangle as f, IconCircleCheck as b, IconX as u } from "@tabler/icons-react";
4
- import * as x from "react";
5
- import { cva as g } from "class-variance-authority";
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 h = g(
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: "bg-info-surface border-info-border text-info-text",
13
- success: "bg-success-surface border-success-border text-success-text",
14
- warning: "bg-warning-surface border-warning-border text-warning-text",
15
- error: "bg-error-surface border-error-border text-error-text",
16
- neutral: "bg-layer-02 border-border text-text-primary [&>svg]:text-text-secondary"
17
+ info: "",
18
+ success: "",
19
+ warning: "",
20
+ error: "",
21
+ neutral: ""
17
22
  }
18
23
  },
19
- defaultVariants: { color: "info" }
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
- ), v = {
22
- info: i,
23
- success: b,
24
- warning: f,
25
- error: m,
26
- neutral: i
27
- }, w = x.forwardRef(
28
- ({ className: n, color: e = "info", title: o, onDismiss: s, children: c, ...a }, d) => {
29
- const l = v[e ?? "info"];
30
- return /* @__PURE__ */ t("div", { ref: d, className: p(h({ color: e }), n), role: "alert", ...a, children: [
31
- /* @__PURE__ */ r(l, { className: "mt-ds-01 h-ico-md w-ico-md shrink-0", "aria-hidden": "true" }),
32
- /* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
33
- o && /* @__PURE__ */ r("p", { className: "text-ds-md font-semibold mb-ds-01", children: o }),
34
- /* @__PURE__ */ r("div", { className: "text-ds-md opacity-[0.9]", children: c })
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
- s && /* @__PURE__ */ r(
61
+ o && /* @__PURE__ */ r(
37
62
  "button",
38
63
  {
39
64
  type: "button",
40
- onClick: s,
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(u, { className: "h-ico-sm w-ico-sm" })
68
+ children: /* @__PURE__ */ r(f, { className: "h-ico-sm w-ico-sm" })
44
69
  }
45
70
  )
46
71
  ] });
47
72
  }
48
73
  );
49
- w.displayName = "Alert";
74
+ y.displayName = "Alert";
50
75
  export {
51
- w as Alert,
52
- h as alertVariants
76
+ y as Alert,
77
+ N as alertVariants
53
78
  };