@devalok/shilp-sutra 0.20.1 → 0.22.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 (101) hide show
  1. package/dist/_chunks/primitives.js +2 -2
  2. package/dist/_chunks/use-calendar.js +115 -115
  3. package/dist/_chunks/vendor-utils.js +1230 -1178
  4. package/dist/composed/activity-feed.d.ts.map +1 -1
  5. package/dist/composed/activity-feed.js +78 -78
  6. package/dist/composed/avatar-group.d.ts +13 -1
  7. package/dist/composed/avatar-group.d.ts.map +1 -1
  8. package/dist/composed/avatar-group.js +127 -50
  9. package/dist/composed/command-palette.js +50 -50
  10. package/dist/composed/content-card.js +10 -10
  11. package/dist/composed/empty-state.d.ts.map +1 -1
  12. package/dist/composed/empty-state.js +58 -48
  13. package/dist/composed/global-loading.d.ts.map +1 -1
  14. package/dist/composed/global-loading.js +11 -10
  15. package/dist/composed/loading-skeleton.d.ts.map +1 -1
  16. package/dist/composed/loading-skeleton.js +32 -29
  17. package/dist/composed/member-picker.d.ts.map +1 -1
  18. package/dist/composed/member-picker.js +28 -17
  19. package/dist/composed/page-header.js +25 -25
  20. package/dist/composed/priority-indicator.d.ts.map +1 -1
  21. package/dist/composed/priority-indicator.js +60 -36
  22. package/dist/composed/rich-text-editor.js +104 -104
  23. package/dist/composed/schedule-view.d.ts.map +1 -1
  24. package/dist/composed/schedule-view.js +53 -45
  25. package/dist/composed/status-badge.js +16 -16
  26. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  27. package/dist/shell/bottom-navbar.js +35 -31
  28. package/dist/shell/notification-center.d.ts.map +1 -1
  29. package/dist/shell/notification-center.js +119 -111
  30. package/dist/shell/sidebar.js +2 -2
  31. package/dist/shell/top-bar.js +9 -9
  32. package/dist/tailwind/index.cjs +30 -3
  33. package/dist/tailwind/preset.d.ts.map +1 -1
  34. package/dist/tailwind/preset.js +30 -3
  35. package/dist/tokens/semantic.css +10 -10
  36. package/dist/tokens/typography-semantic.css +3 -3
  37. package/dist/ui/accordion.js +22 -22
  38. package/dist/ui/alert.js +8 -8
  39. package/dist/ui/avatar.d.ts +23 -1
  40. package/dist/ui/avatar.d.ts.map +1 -1
  41. package/dist/ui/avatar.js +124 -60
  42. package/dist/ui/badge.js +5 -5
  43. package/dist/ui/banner.js +18 -18
  44. package/dist/ui/breadcrumb.js +23 -23
  45. package/dist/ui/button.js +22 -22
  46. package/dist/ui/card.js +16 -16
  47. package/dist/ui/checkbox.d.ts.map +1 -1
  48. package/dist/ui/checkbox.js +72 -25
  49. package/dist/ui/chip.js +14 -14
  50. package/dist/ui/code.js +9 -9
  51. package/dist/ui/combobox.d.ts.map +1 -1
  52. package/dist/ui/combobox.js +46 -45
  53. package/dist/ui/dialog.js +17 -17
  54. package/dist/ui/dropdown-menu.js +22 -22
  55. package/dist/ui/form.d.ts.map +1 -1
  56. package/dist/ui/form.js +35 -29
  57. package/dist/ui/index.d.ts +1 -1
  58. package/dist/ui/index.d.ts.map +1 -1
  59. package/dist/ui/input.js +20 -20
  60. package/dist/ui/label.js +15 -15
  61. package/dist/ui/lib/motion.d.ts.map +1 -1
  62. package/dist/ui/lib/motion.js +2 -2
  63. package/dist/ui/link.js +14 -14
  64. package/dist/ui/number-input.js +36 -36
  65. package/dist/ui/pagination.js +14 -14
  66. package/dist/ui/progress.js +6 -6
  67. package/dist/ui/radio.d.ts.map +1 -1
  68. package/dist/ui/radio.js +24 -12
  69. package/dist/ui/search-input.d.ts.map +1 -1
  70. package/dist/ui/search-input.js +25 -19
  71. package/dist/ui/select.js +15 -15
  72. package/dist/ui/separator.d.ts +10 -2
  73. package/dist/ui/separator.d.ts.map +1 -1
  74. package/dist/ui/separator.js +16 -15
  75. package/dist/ui/sheet.js +7 -7
  76. package/dist/ui/sidebar.d.ts +1 -1
  77. package/dist/ui/sidebar.d.ts.map +1 -1
  78. package/dist/ui/sidebar.js +22 -22
  79. package/dist/ui/skeleton.js +5 -5
  80. package/dist/ui/slider.js +7 -7
  81. package/dist/ui/stat-card.js +19 -19
  82. package/dist/ui/switch.d.ts.map +1 -1
  83. package/dist/ui/switch.js +14 -13
  84. package/dist/ui/tabs.d.ts.map +1 -1
  85. package/dist/ui/tabs.js +60 -51
  86. package/dist/ui/textarea.js +15 -15
  87. package/dist/ui/toast.js +1 -1
  88. package/dist/ui/toggle.js +5 -5
  89. package/dist/ui/tooltip.d.ts +1 -1
  90. package/dist/ui/tooltip.d.ts.map +1 -1
  91. package/dist/ui/tooltip.js +49 -41
  92. package/docs/components/composed/avatar-group.md +29 -4
  93. package/docs/components/ui/avatar.md +23 -5
  94. package/docs/components/ui/button.md +5 -0
  95. package/docs/components/ui/checkbox.md +5 -0
  96. package/docs/components/ui/dropdown-menu.md +3 -0
  97. package/docs/components/ui/separator.md +3 -0
  98. package/docs/components/ui/tooltip.md +5 -0
  99. package/llms-full.txt +74 -10
  100. package/llms.txt +22 -2
  101. package/package.json +1 -1
package/dist/ui/switch.js CHANGED
@@ -1,35 +1,36 @@
1
1
  "use client";
2
- import { jsx as o } from "react/jsx-runtime";
3
- import * as t from "react";
4
- import { am as i, an as u } from "../_chunks/primitives.js";
2
+ import { jsx as s } from "react/jsx-runtime";
3
+ import * as a from "react";
4
+ import { am as i, an as p } from "../_chunks/primitives.js";
5
5
  import { springs as g } from "./lib/motion.js";
6
6
  import { cn as h } from "./lib/utils.js";
7
7
  import { m as w } from "../_chunks/framer.js";
8
- const v = t.forwardRef(({ className: n, error: d, checked: r, defaultChecked: e, onCheckedChange: s, ...c }, l) => {
9
- const [m, f] = t.useState(e ?? !1), b = r !== void 0 ? r : m, p = t.useCallback(
10
- (a) => {
11
- r === void 0 && f(a), s == null || s(a);
8
+ const v = a.forwardRef(({ className: n, error: d, checked: r, defaultChecked: t, onCheckedChange: e, ...c }, l) => {
9
+ const [m, f] = a.useState(t ?? !1), b = r !== void 0 ? r : m, u = a.useCallback(
10
+ (o) => {
11
+ r === void 0 && f(o), e == null || e(o);
12
12
  },
13
- [r, s]
13
+ [r, e]
14
14
  );
15
- return /* @__PURE__ */ o(
15
+ return /* @__PURE__ */ s(
16
16
  i,
17
17
  {
18
18
  className: h(
19
- "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-ds-full border-2 border-surface-border-strong shadow-01 transition-colors duration-fast-01 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-action-disabled data-[state=checked]:border-transparent data-[state=checked]:bg-accent-9 data-[state=unchecked]:bg-surface-border-strong",
19
+ "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-ds-full border-2 border-surface-border-strong shadow-01 transition-colors duration-fast-01 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-action-disabled data-[state=checked]:border-transparent data-[state=checked]:bg-accent-9 data-[state=unchecked]:bg-surface-border-strong data-[state=unchecked]:hover:bg-surface-4",
20
20
  d && "border-error-7 data-[state=checked]:bg-error-9",
21
21
  n
22
22
  ),
23
23
  checked: r,
24
- defaultChecked: e,
25
- onCheckedChange: p,
24
+ defaultChecked: t,
25
+ onCheckedChange: u,
26
26
  ...c,
27
27
  ref: l,
28
- children: /* @__PURE__ */ o(u, { asChild: !0, children: /* @__PURE__ */ o(
28
+ children: /* @__PURE__ */ s(p, { asChild: !0, children: /* @__PURE__ */ s(
29
29
  w.span,
30
30
  {
31
31
  className: "pointer-events-none block h-ico-md w-ico-md rounded-ds-full bg-accent-fg shadow-02 ring-0",
32
32
  animate: { x: b ? 20 : 0 },
33
+ whileTap: { scale: 0.85 },
33
34
  transition: g.snappy
34
35
  }
35
36
  ) })
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/ui/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,QAAA,MAAM,IAAI,mJAgCR,CAAA;AAGF,0EAA0E;AAC1E,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,CAAA;AAQjF,QAAA,MAAM,gBAAgB;;8EASpB,CAAA;AAEF,QAAA,MAAM,mBAAmB;;8EAmBxB,CAAA;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,EAC/D,YAAY,CAAC,OAAO,gBAAgB,CAAC;CAAG;AAE5C,QAAA,MAAM,QAAQ,sFAqBZ,CAAA;AAGF,MAAM,WAAW,gBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,EAClE,YAAY,CAAC,OAAO,mBAAmB,CAAC;CAAG;AAE/C,QAAA,MAAM,WAAW,4FAmCf,CAAA;AAGF,QAAA,MAAM,WAAW,0JAYf,CAAA;AAGF,kFAAkF;AAClF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,CAAA;AAE3F,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAA"}
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/ui/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,QAAA,MAAM,IAAI,mJAgCR,CAAA;AAGF,0EAA0E;AAC1E,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,CAAA;AAQjF,QAAA,MAAM,gBAAgB;;8EASpB,CAAA;AAEF,QAAA,MAAM,mBAAmB;;8EAmBxB,CAAA;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,EAC/D,YAAY,CAAC,OAAO,gBAAgB,CAAC;CAAG;AAE5C,QAAA,MAAM,QAAQ,sFAqBZ,CAAA;AAGF,MAAM,WAAW,gBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,EAClE,YAAY,CAAC,OAAO,mBAAmB,CAAC;CAAG;AAE/C,QAAA,MAAM,WAAW,4FAmCf,CAAA;AAGF,QAAA,MAAM,WAAW,0JAoBf,CAAA;AAGF,kFAAkF;AAClF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,CAAA;AAE3F,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAA"}
package/dist/ui/tabs.js CHANGED
@@ -1,30 +1,30 @@
1
1
  "use client";
2
2
  import { jsx as s, jsxs as N } from "react/jsx-runtime";
3
- import { aS as T, aT as v, aU as b, aV as g } from "../_chunks/primitives.js";
3
+ import { aS as h, aT as v, aU as b, aV as p } from "../_chunks/primitives.js";
4
4
  import * as t from "react";
5
- import { ag as p } from "../_chunks/vendor-utils.js";
6
- import { cn as f } from "./lib/utils.js";
7
- import { springs as u } from "./lib/motion.js";
8
- import { L as h, m } from "../_chunks/framer.js";
9
- const x = t.createContext(void 0), I = t.forwardRef(({ value: e, defaultValue: i, onValueChange: a, ...r }, o) => {
10
- const [n, c] = t.useState(e ?? i ?? "");
5
+ import { ag as g } from "../_chunks/vendor-utils.js";
6
+ import { cn as u } from "./lib/utils.js";
7
+ import { springs as m, tweens as T } from "./lib/motion.js";
8
+ import { L as w, m as f } from "../_chunks/framer.js";
9
+ const x = t.createContext(void 0), I = t.forwardRef(({ value: a, defaultValue: i, onValueChange: e, ...n }, r) => {
10
+ const [o, c] = t.useState(a ?? i ?? "");
11
11
  t.useEffect(() => {
12
- e !== void 0 && c(e);
13
- }, [e]);
12
+ a !== void 0 && c(a);
13
+ }, [a]);
14
14
  const d = t.useCallback(
15
15
  (l) => {
16
- c(l), a == null || a(l);
16
+ c(l), e == null || e(l);
17
17
  },
18
- [a]
18
+ [e]
19
19
  );
20
- return /* @__PURE__ */ s(x.Provider, { value: n, children: /* @__PURE__ */ s(
21
- T,
20
+ return /* @__PURE__ */ s(x.Provider, { value: o, children: /* @__PURE__ */ s(
21
+ h,
22
22
  {
23
- ref: o,
24
- value: e,
25
- defaultValue: e === void 0 ? i : void 0,
23
+ ref: r,
24
+ value: a,
25
+ defaultValue: a === void 0 ? i : void 0,
26
26
  onValueChange: d,
27
- ...r
27
+ ...n
28
28
  }
29
29
  ) });
30
30
  });
@@ -32,7 +32,7 @@ I.displayName = "Tabs";
32
32
  const y = t.createContext({
33
33
  variant: "line",
34
34
  layoutId: "tab-indicator"
35
- }), w = p("inline-flex items-center", {
35
+ }), C = g("inline-flex items-center", {
36
36
  variants: {
37
37
  variant: {
38
38
  line: "border-b border-surface-border-strong w-full gap-0",
@@ -40,7 +40,7 @@ const y = t.createContext({
40
40
  }
41
41
  },
42
42
  defaultVariants: { variant: "line" }
43
- }), C = p(
43
+ }), L = g(
44
44
  "relative inline-flex items-center justify-center gap-ds-02 whitespace-nowrap font-sans text-ds-md font-medium transition-colors duration-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-action-disabled",
45
45
  {
46
46
  variants: {
@@ -59,67 +59,76 @@ const y = t.createContext({
59
59
  },
60
60
  defaultVariants: { variant: "line" }
61
61
  }
62
- ), L = t.forwardRef(({ className: e, variant: i, ...a }, r) => {
63
- const o = i ?? "line", n = t.useId(), c = t.useMemo(
64
- () => ({ variant: o, layoutId: `tab-indicator-${n}` }),
65
- [o, n]
62
+ ), R = t.forwardRef(({ className: a, variant: i, ...e }, n) => {
63
+ const r = i ?? "line", o = t.useId(), c = t.useMemo(
64
+ () => ({ variant: r, layoutId: `tab-indicator-${o}` }),
65
+ [r, o]
66
66
  );
67
- return /* @__PURE__ */ s(y.Provider, { value: c, children: /* @__PURE__ */ s(h, { children: /* @__PURE__ */ s(
67
+ return /* @__PURE__ */ s(y.Provider, { value: c, children: /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s(
68
68
  v,
69
69
  {
70
- ref: r,
71
- className: f(w({ variant: o }), e),
72
- ...a
70
+ ref: n,
71
+ className: u(C({ variant: r }), a),
72
+ ...e
73
73
  }
74
74
  ) }) });
75
75
  });
76
- L.displayName = v.displayName;
77
- const R = t.forwardRef(({ className: e, variant: i, children: a, ...r }, o) => {
78
- const n = t.useContext(y), c = t.useContext(x), d = i ?? n.variant, l = r.value === c;
76
+ R.displayName = v.displayName;
77
+ const V = t.forwardRef(({ className: a, variant: i, children: e, ...n }, r) => {
78
+ const o = t.useContext(y), c = t.useContext(x), d = i ?? o.variant, l = n.value === c;
79
79
  return /* @__PURE__ */ N(
80
80
  b,
81
81
  {
82
- ref: o,
83
- className: f(C({ variant: d }), e),
84
- ...r,
82
+ ref: r,
83
+ className: u(L({ variant: d }), a),
84
+ ...n,
85
85
  children: [
86
86
  d === "contained" && l && /* @__PURE__ */ s(
87
- m.span,
87
+ f.span,
88
88
  {
89
- layoutId: `${n.layoutId}-contained`,
89
+ layoutId: `${o.layoutId}-contained`,
90
90
  className: "absolute inset-0 rounded-ds-md bg-surface-1 shadow-01",
91
- transition: u.smooth
91
+ transition: m.smooth
92
92
  }
93
93
  ),
94
- /* @__PURE__ */ s("span", { className: "relative z-[1] inline-flex items-center gap-ds-02", children: a }),
94
+ /* @__PURE__ */ s("span", { className: "relative z-[1] inline-flex items-center gap-ds-02", children: e }),
95
95
  d === "line" && l && /* @__PURE__ */ s(
96
- m.span,
96
+ f.span,
97
97
  {
98
- layoutId: `${n.layoutId}-line`,
98
+ layoutId: `${o.layoutId}-line`,
99
99
  className: "absolute bottom-0 left-0 right-0 h-0.5 bg-accent-9",
100
- transition: u.smooth
100
+ transition: m.smooth
101
101
  }
102
102
  )
103
103
  ]
104
104
  }
105
105
  );
106
106
  });
107
- R.displayName = b.displayName;
108
- const V = t.forwardRef(({ className: e, ...i }, a) => /* @__PURE__ */ s(
109
- g,
107
+ V.displayName = b.displayName;
108
+ const j = t.forwardRef(({ className: a, children: i, ...e }, n) => /* @__PURE__ */ s(
109
+ p,
110
110
  {
111
- ref: a,
112
- className: f(
111
+ ref: n,
112
+ className: u(
113
113
  "mt-ds-05 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2",
114
- e
114
+ a
115
115
  ),
116
- ...i
116
+ ...e,
117
+ children: /* @__PURE__ */ s(
118
+ f.div,
119
+ {
120
+ initial: { opacity: 0 },
121
+ animate: { opacity: 1 },
122
+ transition: T.fade,
123
+ children: i
124
+ }
125
+ )
117
126
  }
118
127
  ));
119
- V.displayName = g.displayName;
128
+ j.displayName = p.displayName;
120
129
  export {
121
130
  I as Tabs,
122
- V as TabsContent,
123
- L as TabsList,
124
- R as TabsTrigger
131
+ j as TabsContent,
132
+ R as TabsList,
133
+ V as TabsTrigger
125
134
  };
@@ -1,19 +1,19 @@
1
1
  "use client";
2
2
  import { jsx as c } from "react/jsx-runtime";
3
- import * as l from "react";
4
- import { ag as f } from "../_chunks/vendor-utils.js";
5
- import { cn as u } from "./lib/utils.js";
3
+ import * as u from "react";
4
+ import { ag as l } from "../_chunks/vendor-utils.js";
5
+ import { cn as f } from "./lib/utils.js";
6
6
  import { motionProps as m } from "./lib/motion.js";
7
7
  import { useFormField as b } from "./form.js";
8
- import { m as x } from "../_chunks/framer.js";
9
- const p = f(
8
+ import { m as p } from "../_chunks/framer.js";
9
+ const x = l(
10
10
  [
11
- "flex w-full font-sans resize-y",
11
+ "flex w-full font-sans resize-y cursor-ns-resize",
12
12
  "bg-surface-3 text-surface-fg",
13
13
  "border border-surface-border-strong rounded-ds-md",
14
14
  "placeholder:text-surface-fg-subtle",
15
15
  "hover:bg-surface-4",
16
- "transition-colors duration-fast-01",
16
+ "transition-colors duration-fast-01 ease-productive-standard",
17
17
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:border-accent-7",
18
18
  "disabled:cursor-not-allowed disabled:opacity-action-disabled",
19
19
  "read-only:bg-surface-2 read-only:cursor-default"
@@ -28,21 +28,21 @@ const p = f(
28
28
  },
29
29
  defaultVariants: { size: "md" }
30
30
  }
31
- ), g = l.forwardRef(
32
- ({ className: i, state: a, size: o, ...s }, t) => {
33
- const r = b(), e = a ?? (r.state === "helper" ? void 0 : r.state), d = s["aria-describedby"] ?? r.helperTextId, n = s["aria-required"] ?? r.required;
31
+ ), g = u.forwardRef(
32
+ ({ className: a, state: i, size: o, ...s }, t) => {
33
+ const r = b(), e = i ?? (r.state === "helper" ? void 0 : r.state), d = s["aria-describedby"] ?? r.helperTextId, n = s["aria-required"] ?? r.required;
34
34
  return /* @__PURE__ */ c(
35
- x.textarea,
35
+ p.textarea,
36
36
  {
37
37
  "aria-invalid": e === "error" || void 0,
38
38
  "aria-describedby": d,
39
39
  "aria-required": n || void 0,
40
- className: u(
41
- p({ size: o }),
40
+ className: f(
41
+ x({ size: o }),
42
42
  e === "error" && "border-error-7 focus-visible:ring-error-7",
43
43
  e === "warning" && "border-warning-7 focus-visible:ring-warning-7",
44
44
  e === "success" && "border-success-7 focus-visible:ring-success-7",
45
- i
45
+ a
46
46
  ),
47
47
  ref: t,
48
48
  ...m(s)
@@ -53,5 +53,5 @@ const p = f(
53
53
  g.displayName = "Textarea";
54
54
  export {
55
55
  g as Textarea,
56
- p as textareaVariants
56
+ x as textareaVariants
57
57
  };
package/dist/ui/toast.js CHANGED
@@ -149,7 +149,7 @@ function I({
149
149
  {
150
150
  type: "button",
151
151
  onClick: r.onClick,
152
- className: "text-ds-sm font-medium text-accent-11 underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:rounded-ds-sm",
152
+ className: "text-ds-sm font-medium text-accent-11 underline-offset-2 hover:underline hover:bg-surface-3 rounded-ds-sm px-ds-02 py-ds-01 transition-[color,background-color] duration-fast-01 ease-productive-standard focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:rounded-ds-sm",
153
153
  children: r.label
154
154
  }
155
155
  ),
package/dist/ui/toggle.js CHANGED
@@ -7,12 +7,12 @@ import { springs as m, motionProps as c } from "./lib/motion.js";
7
7
  import { cn as f } from "./lib/utils.js";
8
8
  import { m as l } from "../_chunks/framer.js";
9
9
  const p = l.create(t), g = d(
10
- "inline-flex items-center justify-center gap-ds-03 rounded-ds-md font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-action-disabled data-[state=on]:bg-accent-2 data-[state=on]:text-accent-11",
10
+ "inline-flex items-center justify-center gap-ds-03 rounded-ds-md font-medium transition-colors duration-fast-01 ease-productive-standard focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-action-disabled data-[state=on]:bg-accent-2 data-[state=on]:text-accent-11",
11
11
  {
12
12
  variants: {
13
13
  variant: {
14
14
  default: "bg-transparent hover:bg-surface-3 text-surface-fg-muted",
15
- outline: "border border-surface-border-strong bg-transparent hover:bg-surface-3"
15
+ outline: "border border-surface-border-strong bg-transparent hover:bg-surface-3 hover:border-surface-border-strong"
16
16
  },
17
17
  size: {
18
18
  sm: "h-ds-sm px-ds-03 text-ds-sm",
@@ -25,14 +25,14 @@ const p = l.create(t), g = d(
25
25
  size: "md"
26
26
  }
27
27
  }
28
- ), u = n.forwardRef(({ className: e, variant: s, size: a, ...o }, r) => /* @__PURE__ */ i(
28
+ ), u = n.forwardRef(({ className: e, variant: s, size: o, ...a }, r) => /* @__PURE__ */ i(
29
29
  p,
30
30
  {
31
31
  ref: r,
32
32
  whileTap: { scale: 0.95 },
33
33
  transition: m.snappy,
34
- className: f(g({ variant: s, size: a }), e),
35
- ...c(o)
34
+ className: f(g({ variant: s, size: o }), e),
35
+ ...c(a)
36
36
  }
37
37
  ));
38
38
  u.displayName = t.displayName;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import * as React from 'react';
3
3
  import * as TooltipPrimitive from '../primitives/react-tooltip';
4
- declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
4
+ declare const TooltipProvider: React.FC<React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>>;
5
5
  declare const Tooltip: React.FC<React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>>;
6
6
  declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
7
7
  declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/ui/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;AAM7D,QAAA,MAAM,eAAe,iDAA4B,CAAA;AAOjD,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAyBnF,CAAA;AAGD,QAAA,MAAM,cAAc,gHAA2B,CAAA;AAW/C,QAAA,MAAM,cAAc,gKAkClB,CAAA;AAGF,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAA;AAEjG,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/ui/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;AAU7D,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAS/F,CAAA;AAmBD,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CA2BnF,CAAA;AAGD,QAAA,MAAM,cAAc,gHAA2B,CAAA;AAW/C,QAAA,MAAM,cAAc,gKAoClB,CAAA;AAGF,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAA;AAEjG,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
@@ -1,61 +1,69 @@
1
1
  "use client";
2
- import { jsx as e } from "react/jsx-runtime";
3
- import * as s from "react";
4
- import { aK as x, aL as p, aM as y, aN as T, aO as v } from "../_chunks/primitives.js";
5
- import { cn as g } from "./lib/utils.js";
6
- import { tweens as h, springs as C } from "./lib/motion.js";
7
- import { A as N, m as b } from "../_chunks/framer.js";
8
- const k = y, f = s.createContext({ open: !1 }), w = ({
9
- open: i,
10
- defaultOpen: a,
11
- onOpenChange: t,
12
- ...r
2
+ import { jsx as t, Fragment as y } from "react/jsx-runtime";
3
+ import * as o from "react";
4
+ import { aK as h, aL as f, aM as P, aN as u, aO as T } from "../_chunks/primitives.js";
5
+ import { cn as C } from "./lib/utils.js";
6
+ import { tweens as g, springs as N } from "./lib/motion.js";
7
+ import { A as b, m as w } from "../_chunks/framer.js";
8
+ const d = o.createContext(!1), F = ({
9
+ children: e,
10
+ ...s
11
+ }) => /* @__PURE__ */ t(d.Provider, { value: !0, children: /* @__PURE__ */ t(u, { ...s, children: e }) });
12
+ function M({ children: e }) {
13
+ return o.useContext(d) ? /* @__PURE__ */ t(y, { children: e }) : /* @__PURE__ */ t(d.Provider, { value: !0, children: /* @__PURE__ */ t(u, { delayDuration: 300, children: e }) });
14
+ }
15
+ const m = o.createContext({ open: !1 }), A = ({
16
+ open: e,
17
+ defaultOpen: s,
18
+ onOpenChange: r,
19
+ ...n
13
20
  }) => {
14
- const [n, c] = s.useState(a ?? !1), o = i !== void 0, l = o ? i : n, m = s.useCallback(
15
- (d) => {
16
- o || c(d), t == null || t(d);
21
+ const [l, c] = o.useState(s ?? !1), a = e !== void 0, i = a ? e : l, v = o.useCallback(
22
+ (p) => {
23
+ a || c(p), r == null || r(p);
17
24
  },
18
- [o, t]
19
- ), u = s.useMemo(() => ({ open: l }), [l]);
20
- return /* @__PURE__ */ e(f.Provider, { value: u, children: /* @__PURE__ */ e(v, { open: l, onOpenChange: m, ...r }) });
25
+ [a, r]
26
+ ), x = o.useMemo(() => ({ open: i }), [i]);
27
+ return /* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(m.Provider, { value: x, children: /* @__PURE__ */ t(T, { open: i, onOpenChange: v, ...n }) }) });
21
28
  };
22
- w.displayName = "Tooltip";
23
- const z = T, M = {
29
+ A.displayName = "Tooltip";
30
+ const K = P, R = {
24
31
  top: { y: 4 },
25
32
  bottom: { y: -4 },
26
33
  left: { x: 4 },
27
34
  right: { x: -4 }
28
- }, P = s.forwardRef(({ className: i, sideOffset: a = 4, side: t = "top", ...r }, n) => {
29
- const { open: c } = s.useContext(f), o = M[t] ?? {};
30
- return /* @__PURE__ */ e(N, { children: c && /* @__PURE__ */ e(x, { forceMount: !0, children: /* @__PURE__ */ e(
31
- p,
35
+ }, I = o.forwardRef(({ className: e, sideOffset: s = 4, side: r = "top", children: n, ...l }, c) => {
36
+ const { open: a } = o.useContext(m), i = R[r] ?? {};
37
+ return /* @__PURE__ */ t(b, { children: a && /* @__PURE__ */ t(h, { forceMount: !0, children: /* @__PURE__ */ t(
38
+ f,
32
39
  {
33
- ref: n,
40
+ ref: c,
34
41
  forceMount: !0,
42
+ sideOffset: s,
43
+ side: r,
44
+ ...l,
35
45
  asChild: !0,
36
- sideOffset: a,
37
- side: t,
38
- ...r,
39
- children: /* @__PURE__ */ e(
40
- b.div,
46
+ children: /* @__PURE__ */ t(
47
+ w.div,
41
48
  {
42
- initial: { opacity: 0, scale: 0.95, ...o },
49
+ initial: { opacity: 0, scale: 0.95, ...i },
43
50
  animate: { opacity: 1, scale: 1, x: 0, y: 0 },
44
- exit: { opacity: 0, scale: 0.95, ...o },
45
- transition: { ...C.snappy, opacity: h.fade },
46
- className: g(
47
- "z-tooltip overflow-hidden rounded-ds-md bg-surface-fg px-ds-04 py-ds-02b text-ds-sm text-accent-fg shadow-02",
48
- i
49
- )
51
+ exit: { opacity: 0, scale: 0.95, ...i },
52
+ transition: { ...N.snappy, opacity: g.fade },
53
+ className: C(
54
+ "z-tooltip overflow-hidden rounded-ds-md bg-surface-fg px-ds-04 py-ds-02b text-ds-sm text-surface-1 shadow-02",
55
+ e
56
+ ),
57
+ children: n
50
58
  }
51
59
  )
52
60
  }
53
61
  ) }) });
54
62
  });
55
- P.displayName = p.displayName;
63
+ I.displayName = f.displayName;
56
64
  export {
57
- w as Tooltip,
58
- P as TooltipContent,
59
- k as TooltipProvider,
60
- z as TooltipTrigger
65
+ A as Tooltip,
66
+ I as TooltipContent,
67
+ F as TooltipProvider,
68
+ K as TooltipTrigger
61
69
  };
@@ -5,20 +5,35 @@
5
5
  - Category: composed
6
6
 
7
7
  ## Props
8
- users: AvatarUser[] (REQUIRED) — { name: string, image?: string | null }
8
+ users: AvatarUser[] (REQUIRED) — { name: string, image?: string | null, ring?: AvatarRing }
9
9
  max: number (default: 4, overflow shows "+N" badge)
10
- size: "sm" | "md" | "lg"
10
+ size: "xs" | "sm" | "md" | "lg" | "xl"
11
11
  showTooltip: boolean (default: true)
12
+ borderColor: "surface-1" | "surface-2" (default: "surface-2") — overlap border color
13
+ onOverflowClick: () => void — makes the "+N" badge interactive (button)
14
+ renderAvatar: (user: AvatarUser, index: number) => ReactNode — custom avatar render
15
+ expandDirection: "left" | "right" (default: "right") — direction group expands on hover
16
+ expandAmount: "compact" | "default" | "wide" (default: "default") — how far group spreads
17
+
18
+ ## AvatarUser Type
19
+ name: string (REQUIRED)
20
+ image?: string | null
21
+ ring?: "none" | "lead" | "admin" | "client" — role ring per user in group
12
22
 
13
23
  ## Defaults
14
- size="md", max=4, showTooltip=true
24
+ size="md", max=4, showTooltip=true, borderColor="surface-2", expandDirection="right", expandAmount="default"
15
25
 
16
26
  ## Example
17
27
  ```jsx
18
28
  <AvatarGroup
19
- users={[{ name: 'Alice', image: '/alice.jpg' }, { name: 'Bob' }]}
29
+ users={[
30
+ { name: 'Alice', image: '/alice.jpg', ring: 'lead' },
31
+ { name: 'Bob', ring: 'admin' },
32
+ ]}
20
33
  max={3}
21
34
  size="md"
35
+ borderColor="surface-1"
36
+ onOverflowClick={() => setShowAll(true)}
22
37
  />
23
38
  ```
24
39
 
@@ -26,7 +41,17 @@
26
41
  - Wraps TooltipProvider internally — no need to add one yourself
27
42
  - Users beyond `max` are collapsed into a "+N" overflow badge
28
43
  - Missing `image` falls back to initials derived from `name`
44
+ - Hover expand animation uses CSS `group-hover` — parent must not clip overflow
45
+ - `borderColor` should match the surface context the group sits on (e.g., `surface-1` on cards)
29
46
 
30
47
  ## Changes
48
+ ### v0.21.0
49
+ - **Added** `xs` and `xl` size variants
50
+ - **Added** `borderColor` prop for overlap border matching surface context
51
+ - **Added** `onOverflowClick` prop making the overflow badge an interactive button
52
+ - **Added** `overflowContent` prop for popover content on overflow click
53
+ - **Added** `renderAvatar` prop for custom per-avatar rendering
54
+ - **Added** `AvatarUser.ring` field for per-user role rings in groups
55
+
31
56
  ### v0.1.0
32
57
  - **Added** Initial release
@@ -8,27 +8,45 @@
8
8
  size: "xs" | "sm" | "md" | "lg" | "xl"
9
9
  shape: "circle" | "square" | "rounded"
10
10
  status: "online" | "offline" | "busy" | "away"
11
+ ring: "none" | "lead" | "admin" | "client" (default: "none") — Role ring with semantic colors
12
+ badge: number | "dot" | ReactNode — Badge overlay at top-right
13
+ loading: boolean (default: false) — Skeleton shimmer state
11
14
 
12
15
  ## Compound Components
13
- Avatar (root with size/shape/status)
16
+ Avatar (root with size/shape/status/ring/badge/loading)
14
17
  AvatarImage (src, alt)
15
- AvatarFallback (children = initials text)
18
+ AvatarFallback (children = initials text, colorSeed?: string)
19
+
20
+ ## AvatarFallback Props
21
+ colorSeed: string — Deterministic color seed for consistent background color across renders
16
22
 
17
23
  ## Defaults
18
- size="md", shape="circle"
24
+ size="md", shape="circle", ring="none", loading=false
19
25
 
20
26
  ## Example
21
27
  ```jsx
22
- <Avatar size="lg" status="online">
28
+ <Avatar size="lg" status="online" ring="lead" badge={3}>
23
29
  <AvatarImage src={user.photoUrl} alt={user.name} />
24
- <AvatarFallback>JD</AvatarFallback>
30
+ <AvatarFallback colorSeed={user.id}>JD</AvatarFallback>
25
31
  </Avatar>
26
32
  ```
27
33
 
28
34
  ## Gotchas
29
35
  - Status dot renders with role="img" and aria-label (accessible, not decorative)
30
36
  - Dot size scales automatically with avatar size
37
+ - Ring offset color matches the surface context — ensure it sits on the expected background
38
+ - Badge is hidden when value is `0` (falsy); use `"dot"` for presence without a count
39
+ - Online status dot pulses with a CSS animation
31
40
 
32
41
  ## Changes
42
+ ### v0.22.0
43
+ - **Fixed** Fallback always rendered `rounded-ds-full` regardless of `shape` prop. Now uses `AvatarShapeContext` to inherit the correct border-radius from `shape="square"` or `shape="rounded"`.
44
+
45
+ ### v0.21.0
46
+ - **Added** `ring` prop with semantic role colors (`lead`, `admin`, `client`)
47
+ - **Added** `badge` prop for numeric, dot, or custom ReactNode overlay at top-right
48
+ - **Added** `loading` prop for skeleton shimmer placeholder state
49
+ - **Added** `AvatarFallback.colorSeed` for deterministic fallback background colors
50
+
33
51
  ### v0.1.0
34
52
  - **Added** Initial release with CVA size variants (xs-xl) and status indicator badge
@@ -36,6 +36,11 @@
36
36
  - onClickAsync overrides onClick and loading when active
37
37
 
38
38
  ## Changes
39
+ ### v0.22.0
40
+ - **Changed** Active/pressed scale from `0.97` to `0.95` for snappier press feedback.
41
+ - **Fixed** Ghost/outline hover not fading — `transition-transform` in base overrode `transition-colors` from variant. Combined into single `transition-[color,background-color,border-color,box-shadow,transform]`.
42
+ - **Added** `disabled:cursor-not-allowed` to button base (was missing).
43
+
39
44
  ### v0.18.0
40
45
  - **Added** `onClickAsync` prop — promise-driven loading -> success/error state machine
41
46
  - **Added** `asyncFeedbackDuration` prop (default 1500ms)
@@ -23,6 +23,11 @@
23
23
  - indeterminate overrides checked visually
24
24
 
25
25
  ## Changes
26
+ ### v0.22.0
27
+ - **Changed** Check indicator animation from scale-bounce to path-draw (stroke draws progressively). Indeterminate dash also draws in.
28
+ - **Fixed** Uncontrolled checkbox never showed checkmark — `checked` from props was `undefined`, so `isActive` was always `false`. Now tracks internal state.
29
+ - **Added** Hover state on unchecked checkbox (subtle background highlight).
30
+
26
31
  ### v0.18.0
27
32
  - **Changed** Bouncy check indicator animation migrated to Framer Motion
28
33
  - **Fixed** Icon sizing uses design tokens consistently
@@ -35,6 +35,9 @@
35
35
  - Use `asChild` on DropdownMenuTrigger to render your own button element
36
36
 
37
37
  ## Changes
38
+ ### v0.22.0
39
+ - **Added** Hover state on `DropdownMenuItem` — was completely missing. Items now show `bg-surface-3` on hover with `ease-productive-standard` transition.
40
+
38
41
  ### v0.18.0
39
42
  - **Added** `DropdownMenuContentProps`, `DropdownMenuItemProps` type exports
40
43
 
@@ -22,6 +22,9 @@
22
22
  - When decorative is true, the separator is hidden from screen readers
23
23
 
24
24
  ## Changes
25
+ ### v0.22.0
26
+ - **Added** `variant` prop: `"gradient"` (fades both edges), `"gradient-left"` (fades left), `"gradient-right"` (fades right). Default behavior unchanged.
27
+
25
28
  ### v0.4.2
26
29
  - **Added** `SeparatorProps` type export
27
30
 
@@ -24,6 +24,11 @@
24
24
  - TooltipProvider is REQUIRED — without it, tooltips won't show
25
25
 
26
26
  ## Changes
27
+ ### v0.22.0
28
+ - **Added** Auto-provider: `<Tooltip>` now auto-wraps with `<TooltipProvider>` when no ancestor provider exists. No more "tooltip doesn't appear" issues.
29
+ - **Fixed** Content children not rendering — `motion.div` was self-closing (`/>`), so children were never passed through.
30
+ - **Fixed** Text invisible in dark mode — `text-accent-fg` resolves to same value as `bg-surface-fg` in dark mode. Changed to `text-surface-1`.
31
+
27
32
  ### v0.18.0
28
33
  - **Changed** Migrated to Framer Motion for enter/exit animations
29
34
  - **Added** `TooltipContentProps` type export