@devalok/shilp-sutra 0.6.2 → 0.7.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 (84) hide show
  1. package/dist/_virtual/client.js +5 -0
  2. package/dist/_virtual/index.js +5 -0
  3. package/dist/_virtual/react-dom-client.development.js +5 -0
  4. package/dist/_virtual/react-dom-client.production.js +5 -0
  5. package/dist/_virtual/scheduler.development.js +5 -0
  6. package/dist/_virtual/scheduler.production.js +5 -0
  7. package/dist/_virtual/shilp-sutra.js +5 -0
  8. package/dist/_virtual/shilp-sutra2.js +5 -0
  9. package/dist/composed/confirm-dialog.d.ts +27 -0
  10. package/dist/composed/confirm-dialog.d.ts.map +1 -0
  11. package/dist/composed/confirm-dialog.js +45 -0
  12. package/dist/composed/extensions/emoji-suggestion.d.ts +8 -0
  13. package/dist/composed/extensions/emoji-suggestion.d.ts.map +1 -0
  14. package/dist/composed/extensions/emoji-suggestion.js +119 -0
  15. package/dist/composed/extensions/file-attachment.d.ts +3 -0
  16. package/dist/composed/extensions/file-attachment.d.ts.map +1 -0
  17. package/dist/composed/extensions/file-attachment.js +55 -0
  18. package/dist/composed/extensions/mention-suggestion.d.ts +10 -0
  19. package/dist/composed/extensions/mention-suggestion.d.ts.map +1 -0
  20. package/dist/composed/extensions/mention-suggestion.js +79 -0
  21. package/dist/composed/index.d.ts +3 -1
  22. package/dist/composed/index.d.ts.map +1 -1
  23. package/dist/composed/index.js +28 -26
  24. package/dist/composed/rich-text-editor.d.ts +19 -0
  25. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  26. package/dist/composed/rich-text-editor.js +320 -161
  27. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.development.js +17062 -0
  28. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.production.js +9790 -0
  29. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js +20 -0
  30. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js +237 -0
  31. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js +234 -0
  32. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/index.js +11 -0
  33. package/dist/primitives/_internal/react-arrow.js +8 -19
  34. package/dist/primitives/_internal/react-compose-refs.js +14 -14
  35. package/dist/primitives/_internal/react-context.js +41 -39
  36. package/dist/primitives/_internal/react-dismissable-layer.js +62 -90
  37. package/dist/primitives/_internal/react-popper.js +107 -169
  38. package/dist/primitives/_internal/react-portal.js +1 -1
  39. package/dist/primitives/_internal/react-primitive.js +1 -1
  40. package/dist/primitives/_internal/react-use-size.js +8 -8
  41. package/dist/primitives/react-slot.js +12 -12
  42. package/dist/shell/app-command-palette.d.ts +3 -1
  43. package/dist/shell/app-command-palette.d.ts.map +1 -1
  44. package/dist/shell/app-command-palette.js +35 -34
  45. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  46. package/dist/shell/bottom-navbar.js +31 -31
  47. package/dist/shell/index.d.ts +1 -1
  48. package/dist/shell/index.d.ts.map +1 -1
  49. package/dist/shell/notification-center.d.ts +10 -0
  50. package/dist/shell/notification-center.d.ts.map +1 -1
  51. package/dist/shell/notification-center.js +129 -117
  52. package/dist/shell/top-bar.d.ts +20 -0
  53. package/dist/shell/top-bar.d.ts.map +1 -1
  54. package/dist/shell/top-bar.js +100 -70
  55. package/dist/tailwind/index.cjs +1 -0
  56. package/dist/tailwind/preset.d.ts.map +1 -1
  57. package/dist/tailwind/preset.js +1 -0
  58. package/dist/tokens/semantic.css +7 -0
  59. package/dist/ui/alert.js +42 -63
  60. package/dist/ui/avatar.js +20 -62
  61. package/dist/ui/badge.d.ts +1 -1
  62. package/dist/ui/badge.d.ts.map +1 -1
  63. package/dist/ui/badge.js +88 -112
  64. package/dist/ui/button-group.js +14 -29
  65. package/dist/ui/button.js +64 -108
  66. package/dist/ui/card.js +18 -62
  67. package/dist/ui/checkbox.js +1 -21
  68. package/dist/ui/color-input.d.ts +17 -0
  69. package/dist/ui/color-input.d.ts.map +1 -0
  70. package/dist/ui/color-input.js +87 -0
  71. package/dist/ui/index.d.ts +1 -0
  72. package/dist/ui/index.d.ts.map +1 -1
  73. package/dist/ui/index.js +314 -312
  74. package/dist/ui/input.js +25 -51
  75. package/dist/ui/label.js +1 -15
  76. package/dist/ui/popover.js +6 -6
  77. package/dist/ui/separator.js +4 -19
  78. package/dist/ui/spinner.js +1 -36
  79. package/dist/ui/switch.js +1 -20
  80. package/dist/ui/tabs.js +20 -47
  81. package/dist/ui/tooltip.js +6 -17
  82. package/llms-full.txt +117 -9
  83. package/llms.txt +9 -6
  84. package/package.json +592 -528
package/dist/ui/input.js CHANGED
@@ -1,57 +1,31 @@
1
1
  "use client";
2
2
  import { jsx as i, jsxs as c } from "react/jsx-runtime";
3
- import * as u from "react";
4
- import { cva as f } from "class-variance-authority";
3
+ import * as f from "react";
4
+ import { cva as u } from "class-variance-authority";
5
5
  import { cn as m } from "./lib/utils.js";
6
- const b = f(
7
- [
8
- "flex w-full font-sans",
9
- "bg-field text-text-primary",
10
- "border border-border rounded-ds-md",
11
- "placeholder:text-text-placeholder",
12
- "hover:bg-field-hover",
13
- "transition-colors duration-fast-01",
14
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:border-border-interactive",
15
- "disabled:cursor-not-allowed disabled:opacity-[0.38]",
16
- "read-only:bg-layer-02 read-only:cursor-default"
17
- ],
18
- {
19
- variants: {
20
- size: {
21
- sm: "h-ds-sm text-ds-sm px-ds-03",
22
- md: "h-ds-md text-ds-base px-ds-04",
23
- lg: "h-ds-lg text-ds-lg px-ds-05"
24
- }
25
- },
26
- defaultVariants: { size: "md" }
27
- }
28
- ), p = u.forwardRef(
29
- ({ className: t, type: d, state: e, size: l, startIcon: r, endIcon: s, ...n }, a) => {
30
- const o = /* @__PURE__ */ i(
31
- "input",
32
- {
33
- type: d,
34
- className: m(
35
- b({ size: l }),
36
- r && "pl-ds-08",
37
- s && "pr-ds-08",
38
- e === "error" && "border-border-error focus-visible:ring-error",
39
- e === "warning" && "border-border-warning focus-visible:ring-warning",
40
- e === "success" && "border-border-success focus-visible:ring-success",
41
- t
42
- ),
43
- "aria-invalid": e === "error" || void 0,
44
- ref: a,
45
- ...n
46
- }
47
- );
48
- return !r && !s ? o : /* @__PURE__ */ c("div", { className: "relative flex items-center w-full", children: [
49
- r && /* @__PURE__ */ i("span", { className: "absolute left-ds-03 flex items-center text-text-secondary pointer-events-none [&>svg]:h-ico-sm [&>svg]:w-ico-sm", children: r }),
50
- o,
51
- s && /* @__PURE__ */ i("span", { className: "absolute right-ds-03 flex items-center text-text-secondary pointer-events-none [&>svg]:h-ico-sm [&>svg]:w-ico-sm", children: s })
52
- ] });
53
- }
54
- );
6
+ const b = u([
7
+ "flex w-full font-sans",
8
+ "bg-field text-text-primary",
9
+ "border border-border rounded-ds-md",
10
+ "placeholder:text-text-placeholder",
11
+ "hover:bg-field-hover",
12
+ "transition-colors duration-fast-01",
13
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:border-border-interactive",
14
+ "disabled:cursor-not-allowed disabled:opacity-[0.38]",
15
+ "read-only:bg-layer-02 read-only:cursor-default"
16
+ ], {
17
+ variants: {
18
+ size: {
19
+ sm: "h-ds-sm text-ds-sm px-ds-03",
20
+ md: "h-ds-md text-ds-base px-ds-04",
21
+ lg: "h-ds-lg text-ds-lg px-ds-05"
22
+ }
23
+ },
24
+ defaultVariants: { size: "md" }
25
+ }), p = f.forwardRef(({ className: t, type: d, state: e, size: l, startIcon: r, endIcon: s, ...n }, a) => {
26
+ const o = i("input", { type: d, className: m(b({ size: l }), r && "pl-ds-08", s && "pr-ds-08", e === "error" && "border-border-error focus-visible:ring-error", e === "warning" && "border-border-warning focus-visible:ring-warning", e === "success" && "border-border-success focus-visible:ring-success", t), "aria-invalid": e === "error" || void 0, ref: a, ...n });
27
+ return !r && !s ? o : c("div", { className: "relative flex items-center w-full", children: [r && i("span", { className: "absolute left-ds-03 flex items-center text-text-secondary pointer-events-none [&>svg]:h-ico-sm [&>svg]:w-ico-sm", children: r }), o, s && i("span", { className: "absolute right-ds-03 flex items-center text-text-secondary pointer-events-none [&>svg]:h-ico-sm [&>svg]:w-ico-sm", children: s })] });
28
+ });
55
29
  p.displayName = "Input";
56
30
  export {
57
31
  p as Input,
package/dist/ui/label.js CHANGED
@@ -3,21 +3,7 @@ import { jsxs as s, jsx as i } from "react/jsx-runtime";
3
3
  import * as d from "react";
4
4
  import { Root as e } from "../primitives/react-label.js";
5
5
  import { cn as n } from "./lib/utils.js";
6
- const p = d.forwardRef(({ className: t, required: r, children: a, ...o }, m) => /* @__PURE__ */ s(
7
- e,
8
- {
9
- ref: m,
10
- className: n(
11
- "font-sans text-ds-md font-medium text-text-primary leading-none peer-disabled:opacity-[0.38]",
12
- t
13
- ),
14
- ...o,
15
- children: [
16
- a,
17
- r && /* @__PURE__ */ i("span", { className: "text-text-error ml-ds-01", "aria-hidden": "true", children: "*" })
18
- ]
19
- }
20
- ));
6
+ const p = d.forwardRef(({ className: r, required: t, children: a, ...o }, m) => s(e, { ref: m, className: n("font-sans text-ds-md font-medium text-text-primary leading-none peer-disabled:opacity-[0.38]", r), ...o, children: [a, t && i("span", { className: "text-text-error ml-ds-01", "aria-hidden": "true", children: "*" })] }));
21
7
  p.displayName = e.displayName;
22
8
  export {
23
9
  p as Label
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import { jsx as o } from "react/jsx-runtime";
3
- import * as s from "react";
3
+ import * as n from "react";
4
4
  import { Root as i, Anchor as m, Trigger as p, Portal as l, Content as t } from "../primitives/react-popover.js";
5
5
  import { cn as c } from "./lib/utils.js";
6
- const u = i, P = p, v = m, f = s.forwardRef(({ className: e, align: a = "center", sideOffset: r = 4, ...d }, n) => /* @__PURE__ */ o(l, { children: /* @__PURE__ */ o(
6
+ const u = i, v = p, P = m, f = n.forwardRef(({ className: e, align: a = "center", sideOffset: r = 4, ...d }, s) => /* @__PURE__ */ o(l, { children: /* @__PURE__ */ o(
7
7
  t,
8
8
  {
9
- ref: n,
9
+ ref: s,
10
10
  align: a,
11
11
  sideOffset: r,
12
12
  className: c(
13
- "z-dropdown w-72 rounded-ds-lg border border-border bg-layer-01 p-ds-05 text-text-primary shadow-03 outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
13
+ "z-popover w-72 rounded-ds-lg border border-border bg-layer-01 p-ds-05 text-text-primary shadow-03 outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
14
14
  e
15
15
  ),
16
16
  ...d
@@ -19,7 +19,7 @@ const u = i, P = p, v = m, f = s.forwardRef(({ className: e, align: a = "center"
19
19
  f.displayName = t.displayName;
20
20
  export {
21
21
  u as Popover,
22
- v as PopoverAnchor,
22
+ P as PopoverAnchor,
23
23
  f as PopoverContent,
24
- P as PopoverTrigger
24
+ v as PopoverTrigger
25
25
  };
@@ -1,24 +1,9 @@
1
1
  "use client";
2
- import { jsx as p } from "react/jsx-runtime";
3
- import * as e from "react";
2
+ import { jsx as i } from "react/jsx-runtime";
3
+ import * as l from "react";
4
4
  import { Root as o } from "../primitives/react-separator.js";
5
- import { cn as s } from "./lib/utils.js";
6
- const f = e.forwardRef(
7
- ({ className: a, orientation: r = "horizontal", decorative: m = !0, ...t }, l) => /* @__PURE__ */ p(
8
- o,
9
- {
10
- ref: l,
11
- decorative: m,
12
- orientation: r,
13
- className: s(
14
- "shrink-0 bg-border-subtle",
15
- r === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
16
- a
17
- ),
18
- ...t
19
- }
20
- )
21
- );
5
+ import { cn as p } from "./lib/utils.js";
6
+ const f = l.forwardRef(({ className: a, orientation: r = "horizontal", decorative: t = !0, ...e }, m) => i(o, { ref: m, decorative: t, orientation: r, className: p("shrink-0 bg-border-subtle", r === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", a), ...e }));
22
7
  f.displayName = o.displayName;
23
8
  export {
24
9
  f as Separator
@@ -5,42 +5,7 @@ const l = {
5
5
  sm: "h-ico-sm w-ico-sm",
6
6
  md: "h-ico-md w-ico-md",
7
7
  lg: "h-ico-lg w-ico-lg"
8
- }, t = a.forwardRef(
9
- ({ size: e = "md", className: s, ...i }, n) => /* @__PURE__ */ r("span", { role: "status", children: [
10
- /* @__PURE__ */ r(
11
- "svg",
12
- {
13
- ref: n,
14
- className: c("animate-spin motion-reduce:animate-none", l[e], s),
15
- viewBox: "0 0 24 24",
16
- fill: "none",
17
- xmlns: "http://www.w3.org/2000/svg",
18
- ...i,
19
- children: [
20
- /* @__PURE__ */ o(
21
- "circle",
22
- {
23
- cx: "12",
24
- cy: "12",
25
- r: "10",
26
- stroke: "var(--color-border-subtle)",
27
- strokeWidth: "4",
28
- fill: "none"
29
- }
30
- ),
31
- /* @__PURE__ */ o(
32
- "path",
33
- {
34
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z",
35
- fill: "var(--color-interactive)"
36
- }
37
- )
38
- ]
39
- }
40
- ),
41
- /* @__PURE__ */ o("span", { className: "sr-only", children: "Loading..." })
42
- ] })
43
- );
8
+ }, t = a.forwardRef(({ size: e = "md", className: s, ...i }, n) => r("span", { role: "status", children: [r("svg", { ref: n, className: c("animate-spin motion-reduce:animate-none", l[e], s), viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...i, children: [o("circle", { cx: "12", cy: "12", r: "10", stroke: "var(--color-border-subtle)", strokeWidth: "4", fill: "none" }), o("path", { d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z", fill: "var(--color-interactive)" })] }), o("span", { className: "sr-only", children: "Loading..." })] }));
44
9
  t.displayName = "Spinner";
45
10
  export {
46
11
  t as Spinner
package/dist/ui/switch.js CHANGED
@@ -3,26 +3,7 @@ import { jsx as e } from "react/jsx-runtime";
3
3
  import * as n from "react";
4
4
  import { Root as o, Thumb as d } from "../primitives/react-switch.js";
5
5
  import { cn as r } from "./lib/utils.js";
6
- const c = n.forwardRef(({ className: t, error: a, ...s }, i) => /* @__PURE__ */ e(
7
- o,
8
- {
9
- className: r(
10
- "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",
11
- a && "border-border-error data-[state=checked]:bg-error",
12
- t
13
- ),
14
- ...s,
15
- ref: i,
16
- children: /* @__PURE__ */ e(
17
- d,
18
- {
19
- className: r(
20
- "pointer-events-none block h-ico-md w-ico-md rounded-ds-full bg-text-on-color shadow-02 ring-0 transition-transform duration-fast-01 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
21
- )
22
- }
23
- )
24
- }
25
- ));
6
+ const c = n.forwardRef(({ className: t, error: a, ...s }, i) => e(o, { className: r("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", a && "border-border-error data-[state=checked]:bg-error", t), ...s, ref: i, children: e(d, { className: r("pointer-events-none block h-ico-md w-ico-md rounded-ds-full bg-text-on-color shadow-02 ring-0 transition-transform duration-fast-01 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") }) }));
26
7
  c.displayName = o.displayName;
27
8
  export {
28
9
  c as Switch
package/dist/ui/tabs.js CHANGED
@@ -12,60 +12,33 @@ const R = m, v = r.createContext({ variant: "line" }), p = f("inline-flex items-
12
12
  }
13
13
  },
14
14
  defaultVariants: { variant: "line" }
15
- }), u = f(
16
- "inline-flex items-center justify-center whitespace-nowrap font-sans text-ds-md font-medium transition-[color,background-color,border-color,box-shadow] duration-fast-01 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-[0.38]",
17
- {
18
- variants: {
19
- variant: {
20
- line: [
21
- "px-ds-05 py-ds-03 -mb-px border-b-2 border-transparent",
22
- "text-text-secondary hover:text-text-primary",
23
- "data-[state=active]:border-interactive data-[state=active]:text-interactive"
24
- ],
25
- contained: [
26
- "px-ds-05 py-ds-02b rounded-ds-md",
27
- "text-text-secondary hover:text-text-primary",
28
- "data-[state=active]:bg-layer-01 data-[state=active]:shadow-01 data-[state=active]:text-text-primary"
29
- ]
30
- }
31
- },
32
- defaultVariants: { variant: "line" }
33
- }
34
- ), x = r.forwardRef(({ className: t, variant: e, ...a }, n) => {
35
- const i = e ?? "line";
36
- return /* @__PURE__ */ s(v.Provider, { value: { variant: i }, children: /* @__PURE__ */ s(
37
- c,
38
- {
39
- ref: n,
40
- className: o(p({ variant: i }), t),
41
- ...a
15
+ }), u = f("inline-flex items-center justify-center whitespace-nowrap font-sans text-ds-md font-medium transition-[color,background-color,border-color,box-shadow] duration-fast-01 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-[0.38]", {
16
+ variants: {
17
+ variant: {
18
+ line: [
19
+ "px-ds-05 py-ds-03 -mb-px border-b-2 border-transparent",
20
+ "text-text-secondary hover:text-text-primary",
21
+ "data-[state=active]:border-interactive data-[state=active]:text-interactive"
22
+ ],
23
+ contained: [
24
+ "px-ds-05 py-ds-02b rounded-ds-md",
25
+ "text-text-secondary hover:text-text-primary",
26
+ "data-[state=active]:bg-layer-01 data-[state=active]:shadow-01 data-[state=active]:text-text-primary"
27
+ ]
42
28
  }
43
- ) });
29
+ },
30
+ defaultVariants: { variant: "line" }
31
+ }), x = r.forwardRef(({ className: t, variant: e, ...a }, n) => {
32
+ const i = e ?? "line";
33
+ return s(v.Provider, { value: { variant: i }, children: s(c, { ref: n, className: o(p({ variant: i }), t), ...a }) });
44
34
  });
45
35
  x.displayName = c.displayName;
46
36
  const g = r.forwardRef(({ className: t, variant: e, ...a }, n) => {
47
37
  const i = r.useContext(v), b = e ?? i.variant;
48
- return /* @__PURE__ */ s(
49
- l,
50
- {
51
- ref: n,
52
- className: o(u({ variant: b }), t),
53
- ...a
54
- }
55
- );
38
+ return s(l, { ref: n, className: o(u({ variant: b }), t), ...a });
56
39
  });
57
40
  g.displayName = l.displayName;
58
- const y = r.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ s(
59
- d,
60
- {
61
- ref: a,
62
- className: o(
63
- "mt-ds-05 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2",
64
- t
65
- ),
66
- ...e
67
- }
68
- ));
41
+ const y = r.forwardRef(({ className: t, ...e }, a) => s(d, { ref: a, className: o("mt-ds-05 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2", t), ...e }));
69
42
  y.displayName = d.displayName;
70
43
  export {
71
44
  R as Tabs,
@@ -1,24 +1,13 @@
1
1
  "use client";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
- import * as r from "react";
4
- import { Root as s, Provider as n, Trigger as m, Portal as l, Content as o } from "../primitives/react-tooltip.js";
5
- import { cn as p } from "./lib/utils.js";
6
- const u = n, T = s, h = m, f = r.forwardRef(({ className: e, sideOffset: a = 4, ...i }, d) => /* @__PURE__ */ t(l, { children: /* @__PURE__ */ t(
7
- o,
8
- {
9
- ref: d,
10
- sideOffset: a,
11
- className: p(
12
- "z-tooltip overflow-hidden rounded-ds-md bg-text-primary px-ds-04 py-ds-02b text-ds-sm text-text-inverse shadow-02 duration-fast-02 ease-productive-entrance animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
13
- e
14
- ),
15
- ...i
16
- }
17
- ) }));
18
- f.displayName = o.displayName;
3
+ import * as s from "react";
4
+ import { Root as r, Provider as n, Trigger as m, Portal as l, Content as o } from "../primitives/react-tooltip.js";
5
+ import { cn as f } from "./lib/utils.js";
6
+ const u = n, T = r, h = m, p = s.forwardRef(({ className: e, sideOffset: a = 4, ...i }, d) => t(l, { children: t(o, { ref: d, sideOffset: a, className: f("z-tooltip overflow-hidden rounded-ds-md bg-text-primary px-ds-04 py-ds-02b text-ds-sm text-text-inverse shadow-02 duration-fast-02 ease-productive-entrance animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", e), ...i }) }));
7
+ p.displayName = o.displayName;
19
8
  export {
20
9
  T as Tooltip,
21
- f as TooltipContent,
10
+ p as TooltipContent,
22
11
  u as TooltipProvider,
23
12
  h as TooltipTrigger
24
13
  };
package/llms-full.txt CHANGED
@@ -197,7 +197,7 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
197
197
  - Props:
198
198
  variant: "subtle" | "solid" | "outline" | "secondary" (alias->subtle) | "destructive" (alias->solid+error)
199
199
  color: "default" | "info" | "success" | "error" | "warning" | "brand" | "accent" | "teal" | "amber" | "slate" | "indigo" | "cyan" | "orange" | "emerald"
200
- size: "sm" | "md" | "lg"
200
+ size: "xs" | "sm" | "md" | "lg"
201
201
  dot: boolean (shows leading dot indicator)
202
202
  onDismiss: () => void (shows X button when provided)
203
203
  children: ReactNode
@@ -353,6 +353,24 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
353
353
  <Code variant="block">{`const x = 1;\nconsole.log(x);`}</Code>
354
354
  - Gotchas: "block" renders as <pre><code>, "inline" renders as <code>
355
355
 
356
+ ## ColorInput
357
+ - Import: @devalok/shilp-sutra/ui/color-input
358
+ - Server-safe: No
359
+ - Props:
360
+ value: string (hex color, e.g. "#d33163")
361
+ onChange: (value: string) => void
362
+ presets: string[] (optional preset color swatches)
363
+ disabled: boolean
364
+ className: string
365
+ - Defaults: value="#000000", disabled=false
366
+ - Example:
367
+ <ColorInput
368
+ value={color}
369
+ onChange={setColor}
370
+ presets={['#d33163', '#2563eb', '#16a34a']}
371
+ />
372
+ - Gotchas: Uses native color picker under the hood; value must be a valid hex string
373
+
356
374
  ## Collapsible
357
375
  - Import: @devalok/shilp-sutra/ui/collapsible
358
376
  - Server-safe: No
@@ -1302,6 +1320,36 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
1302
1320
  />
1303
1321
  - Gotchas: Opens with Ctrl+K / Cmd+K by default
1304
1322
 
1323
+ ## ConfirmDialog
1324
+ - Import: @devalok/shilp-sutra/composed/confirm-dialog
1325
+ - Server-safe: No
1326
+ - Props:
1327
+ open: boolean (REQUIRED, controlled)
1328
+ onOpenChange: (open: boolean) => void (REQUIRED)
1329
+ title: string (REQUIRED)
1330
+ description: string (REQUIRED)
1331
+ confirmText: string (default: "Confirm")
1332
+ cancelText: string (default: "Cancel")
1333
+ color: "default" | "error" (controls confirm button color)
1334
+ loading: boolean (default: false, disables buttons and shows spinner)
1335
+ onConfirm: () => void | Promise<void> (REQUIRED)
1336
+ - Defaults: confirmText="Confirm", cancelText="Cancel", color="default", loading=false
1337
+ - Example:
1338
+ const [open, setOpen] = useState(false)
1339
+ <ConfirmDialog
1340
+ open={open}
1341
+ onOpenChange={setOpen}
1342
+ title="Delete project?"
1343
+ description="This action cannot be undone."
1344
+ color="error"
1345
+ confirmText="Delete"
1346
+ loading={isDeleting}
1347
+ onConfirm={async () => { await deleteProject(); setOpen(false) }}
1348
+ />
1349
+ - Gotchas:
1350
+ - Dialog stays open after confirm — consumer must close it via onOpenChange
1351
+ - Built on AlertDialog internally
1352
+
1305
1353
  ## ContentCard
1306
1354
  - Import: @devalok/shilp-sutra/composed/content-card
1307
1355
  - Server-safe: Yes
@@ -1486,13 +1534,41 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
1486
1534
  onChange: (html: string) => void
1487
1535
  className: string
1488
1536
  editable: boolean (default: true)
1537
+ onImageUpload?: (file: File) => Promise<string> — return URL. If omitted, images paste as base64
1538
+ onFileUpload?: (file: File) => Promise<{ url: string; name: string; size: number }> — enables file attachments. If omitted, non-image files ignored
1539
+ mentions?: MentionItem[] — static list for @mention autocomplete
1540
+ onMentionSearch?: (query: string) => Promise<MentionItem[]> — async search, takes precedence over static mentions
1541
+ onMentionSelect?: (item: MentionItem) => void — callback when mention selected
1542
+ - MentionItem: { id: string; label: string; avatar?: string }
1489
1543
  - Props (RichTextViewer):
1490
1544
  content: string (REQUIRED, HTML string)
1491
1545
  className: string
1546
+ - Features:
1547
+ Formatting: bold, italic, underline, strikethrough, highlight, headings (H2/H3), blockquote
1548
+ Lists: bullet, ordered, task lists (checkboxes)
1549
+ Code: inline code, code blocks
1550
+ Links: auto-link, inline URL editor popover
1551
+ Images: paste/drop/toolbar upload, base64 fallback or custom upload callback
1552
+ File attachments: drop/paste/toolbar, renders as download card [icon filename (size)]
1553
+ Mentions: type @ for autocomplete dropdown (static or async)
1554
+ Emoji: toolbar picker (emoji-mart, lazy loaded) + :shortcode: inline suggestions
1555
+ Text alignment: left/center/right
1556
+ Horizontal rule
1492
1557
  - Example:
1493
1558
  <RichTextEditor content={html} onChange={setHtml} placeholder="Write your message..." />
1559
+ <RichTextEditor
1560
+ content={html}
1561
+ onChange={setHtml}
1562
+ mentions={[{ id: '1', label: 'Aarav' }]}
1563
+ onImageUpload={async (file) => uploadAndReturnUrl(file)}
1564
+ onFileUpload={async (file) => ({ url: uploadUrl, name: file.name, size: file.size })}
1565
+ />
1494
1566
  <RichTextViewer content={savedHtml} />
1495
- - Gotchas: Requires @tiptap/react, @tiptap/starter-kit, @tiptap/extension-placeholder as peer deps
1567
+ - Gotchas:
1568
+ Requires Tiptap peer deps: @tiptap/react, @tiptap/starter-kit, @tiptap/extension-placeholder, plus extension-specific peers (image, link, underline, highlight, task-list, task-item, text-align, mention, suggestion)
1569
+ Emoji picker requires @emoji-mart/react + @emoji-mart/data peers
1570
+ Images without onImageUpload are stored as base64 in HTML — large images bloat content
1571
+ Mention rendering in viewer always works (no mention props needed, just the HTML)
1496
1572
 
1497
1573
  ## ScheduleView
1498
1574
  - Import: @devalok/shilp-sutra/composed/schedule-view
@@ -1558,17 +1634,20 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
1558
1634
  - Server-safe: No
1559
1635
  - Props:
1560
1636
  user: AppCommandPaletteUser | null — { name, role? }
1637
+ isAdmin: boolean (shows admin command groups regardless of user.role; takes precedence over role-based detection)
1561
1638
  extraGroups: CommandGroup[]
1562
1639
  onNavigate: (path: string) => void
1563
1640
  onSearch: (query: string) => void
1564
1641
  searchResults: SearchResult[] — { id, title, snippet?, entityType, projectId?, metadata? }
1565
- onSelectResult: (result: SearchResult) => void
1642
+ isSearching: boolean (shows loading state while search is in progress)
1643
+ onSearchResultSelect: (result: SearchResult) => void
1566
1644
  - Example:
1567
1645
  <AppCommandPalette
1568
1646
  user={{ name: 'John', role: 'admin' }}
1647
+ isAdmin={true}
1569
1648
  onNavigate={(path) => router.push(path)}
1570
1649
  searchResults={results}
1571
- onSelectResult={(r) => router.push(`/${r.entityType}/${r.id}`)}
1650
+ onSearchResultSelect={(r) => router.push(`/${r.entityType}/${r.id}`)}
1572
1651
  />
1573
1652
 
1574
1653
  ## AppSidebar
@@ -1601,7 +1680,7 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
1601
1680
  - Server-safe: No
1602
1681
  - Props:
1603
1682
  currentPath: string
1604
- user: BottomNavbarUser | null — { name, role? }
1683
+ user: BottomNavbarUser | null (optional) — { name, role? }. Not required to render.
1605
1684
  primaryItems: BottomNavItem[] (max 4 recommended) — { title, href, icon, exact? }
1606
1685
  moreItems: BottomNavItem[] (overflow items in "More" menu)
1607
1686
  className: string
@@ -1642,13 +1721,25 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
1642
1721
  onFetchMore: () => void
1643
1722
  onMarkRead: (id: string) => void
1644
1723
  onMarkAllRead: () => void
1645
- onNotificationClick: (notification: Notification) => void
1724
+ onNavigate: (path: string) => void — called when a notification with a route is clicked
1725
+ getNotificationRoute: (notification: Notification) => string | null — returns route for a notification; defaults to () => null when not provided (no hardcoded routes)
1726
+ footerSlot: ReactNode — content rendered in a sticky footer below the scroll area (e.g., "View all" link)
1727
+ emptyState: ReactNode — replaces the default empty state UI when there are no notifications
1728
+ headerActions: ReactNode — extra action buttons rendered after the "Mark all read" button in the header
1729
+ popoverClassName: string — override default popover dimensions via className
1730
+ onDismiss: (id: string) => void — when provided, each notification shows a dismiss/close button; called with the notification id
1646
1731
  - Example:
1647
1732
  <NotificationCenter
1648
1733
  notifications={notifications}
1649
1734
  onMarkRead={markAsRead}
1650
1735
  onMarkAllRead={markAllAsRead}
1651
- onNotificationClick={(n) => router.push(`/notifications/${n.id}`)}
1736
+ onNavigate={(path) => router.push(path)}
1737
+ getNotificationRoute={(n) => n.entityType === 'task' ? `/tasks/${n.entityId}` : null}
1738
+ onDismiss={(id) => dismissNotification(id)}
1739
+ footerSlot={<Link href="/notifications">View all notifications</Link>}
1740
+ emptyState={<p>You're all caught up!</p>}
1741
+ headerActions={<Button variant="ghost" size="sm">Settings</Button>}
1742
+ popoverClassName="w-[480px]"
1652
1743
  />
1653
1744
 
1654
1745
  ## NotificationPreferences
@@ -1658,13 +1749,18 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
1658
1749
  preferences: NotificationPreference[] — { id, userId?, projectId, channel, minTier, muted }
1659
1750
  projects: NotificationProject[] — { id, title }
1660
1751
  isLoading: boolean
1661
- onSave: (preference: { projectId, channel, minTier, muted }) => void
1662
- onDelete: (id: string) => void
1752
+ onSave: (preference: { projectId, channel, minTier, muted }) => void | Promise<void>
1753
+ onToggleMute: (preference: NotificationPreference) => void | Promise<void>
1754
+ onUpdateTier: (preference: NotificationPreference, newTier: string) => void | Promise<void>
1755
+ onDelete: (preferenceId: string) => void | Promise<void>
1756
+ className: string
1663
1757
  - Example:
1664
1758
  <NotificationPreferences
1665
1759
  preferences={prefs}
1666
1760
  projects={projectList}
1667
1761
  onSave={handleSavePref}
1762
+ onToggleMute={handleToggleMute}
1763
+ onUpdateTier={handleUpdateTier}
1668
1764
  onDelete={handleDeletePref}
1669
1765
  />
1670
1766
 
@@ -1680,7 +1776,15 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
1680
1776
  onAiChatClick: () => void
1681
1777
  mobileLogo: ReactNode
1682
1778
  notificationSlot: ReactNode (render NotificationCenter here)
1779
+ userMenuItems?: UserMenuItem[] — custom items between Profile and Dark/Light Mode toggle
1683
1780
  className: string
1781
+ - UserMenuItem: { label: string, icon?: ReactNode, href?: string, onClick?: () => void, separator?: boolean, color?: string, badge?: string | boolean, disabled?: boolean }
1782
+ href — navigates via onNavigate callback
1783
+ onClick — custom action (takes precedence over href)
1784
+ separator — renders a DropdownMenuSeparator before this item
1785
+ color — semantic text color (e.g. "error" → text-error)
1786
+ badge — string for count badge, true for dot indicator
1787
+ disabled — greys out the item
1684
1788
  - Example:
1685
1789
  <TopBar
1686
1790
  pageTitle="Dashboard"
@@ -1688,6 +1792,10 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
1688
1792
  onNavigate={(p) => router.push(p)}
1689
1793
  onLogout={handleLogout}
1690
1794
  notificationSlot={<NotificationCenter notifications={notifications} />}
1795
+ userMenuItems={[
1796
+ { label: 'Changelog', icon: <IconNews />, href: '/changelog', badge: '3' },
1797
+ { label: 'Shortcuts', icon: <IconKeyboard />, onClick: () => openModal() },
1798
+ ]}
1691
1799
  />
1692
1800
 
1693
1801
  ---
package/llms.txt CHANGED
@@ -65,6 +65,7 @@ Components with two-axis system: Button, Badge, Alert, Chip, Toast, Banner, Prog
65
65
  - SearchInput: size(sm|md|lg) + loading, onClear
66
66
  - NumberInput: value + onValueChange, min, max, step (controlled only)
67
67
  - Textarea: size(sm|md|lg) state(default|error|warning|success)
68
+ - ColorInput: value(hex string) onChange(value) presets(string[]) disabled
68
69
  - Checkbox: checked, onCheckedChange, error(boolean), indeterminate(boolean)
69
70
  - Switch: checked, onCheckedChange, error(boolean)
70
71
  - RadioGroup > RadioGroupItem(value)
@@ -87,7 +88,7 @@ NOTIFICATION SELECTION GUIDE:
87
88
  - Toast: transient notification triggered by user action (needs Toaster + useToast)
88
89
 
89
90
  ### Data Display
90
- - Badge: variant(subtle|solid|outline) color(default|info|success|error|warning|brand|accent + 7 category colors) size(sm|md|lg) + onDismiss
91
+ - Badge: variant(subtle|solid|outline) color(default|info|success|error|warning|brand|accent + 7 category colors) size(xs|sm|md|lg) + onDismiss
91
92
  - Chip: variant(subtle|outline) color(default|primary|success|error|warning|info + 7 category) size(sm|md|lg) label(string, REQUIRED) + onDismiss, onClick
92
93
  - Avatar: size(xs|sm|md|lg|xl) shape(circle|square|rounded) status(online|offline|busy|away) > AvatarImage + AvatarFallback
93
94
  - Card: variant(default|elevated|outline|flat) interactive(boolean) > CardHeader > CardTitle, CardDescription; CardContent; CardFooter
@@ -128,6 +129,7 @@ NOTIFICATION SELECTION GUIDE:
128
129
  - Wire accessibility: const { state, helperTextId } = useFormField(); then aria-describedby={helperTextId}, aria-invalid={state === 'error'}
129
130
 
130
131
  ### Composed Components
132
+ - ConfirmDialog: open, onOpenChange, title, description, onConfirm + confirmText, cancelText, color(default|error), loading
131
133
  - PageHeader: title, subtitle, breadcrumbs[], actions(ReactNode)
132
134
  - AvatarGroup: users[], max(number), size(sm|md|lg), showTooltip
133
135
  - StatusBadge: status(active|pending|approved|rejected|completed|blocked|cancelled|draft) color(success|warning|error|info|neutral) size(sm|md)
@@ -136,17 +138,18 @@ NOTIFICATION SELECTION GUIDE:
136
138
  - PriorityIndicator: priority(LOW|MEDIUM|HIGH|URGENT) display(compact|full)
137
139
  - SimpleTooltip: wraps Tooltip compound into single component
138
140
  - DatePicker, DateRangePicker, DateTimePicker, TimePicker
139
- - RichTextEditor, RichTextViewer
141
+ - RichTextEditor: Tiptap editor — bold/italic/underline/strike/highlight, headings, blockquote, lists (bullet/ordered/task), code, links, images (paste/drop/upload), file attachments, @mentions, emoji picker + :shortcode:, text alignment, HR. Props: onImageUpload?, onFileUpload?, mentions?, onMentionSearch?, onMentionSelect?
142
+ - RichTextViewer: read-only renderer for RichTextEditor HTML content (renders all above content types)
140
143
  - CommandPalette, MemberPicker
141
144
  - ErrorDisplay, GlobalLoading
142
145
  - Loading skeletons: CardSkeleton, TableSkeleton, BoardSkeleton, ListSkeleton, DashboardSkeleton, etc.
143
146
 
144
147
  ### Shell Components (app-level layout)
145
- - TopBar: pageTitle, user, onNavigate, onLogout, notificationSlot, mobileLogo
148
+ - TopBar: pageTitle, user, onNavigate, onLogout, notificationSlot, mobileLogo, userMenuItems?(UserMenuItem[] — custom items between Profile and theme toggle, supports icon, href, onClick, separator, badge, disabled, color)
146
149
  - AppSidebar: navigation tree with NavItem[], NavGroup[]
147
- - BottomNavbar: mobile navigation
148
- - NotificationCenter: notifications[], onDismiss, onRead
149
- - AppCommandPalette: search results, user info
150
+ - BottomNavbar: mobile navigation, user is optional (not required to render)
151
+ - NotificationCenter: notifications[], onMarkRead, onMarkAllRead, onNavigate, getNotificationRoute?(returns string|null, fallback null), footerSlot?, emptyState?, headerActions?, popoverClassName?, onDismiss?(id)
152
+ - AppCommandPalette: user, isAdmin, onNavigate, onSearch, searchResults, isSearching, onSearchResultSelect
150
153
 
151
154
  ### Hooks
152
155
  - useToast(): returns { toast, toasts, dismiss } — toast({ title, description, color })