@devalok/shilp-sutra 0.2.1 → 0.3.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 (71) hide show
  1. package/README.md +239 -0
  2. package/dist/composed/content-card.d.ts +2 -2
  3. package/dist/composed/error-boundary.js +1 -1
  4. package/dist/shell/notification-preferences.js +14 -14
  5. package/dist/tailwind/index.cjs +15 -10
  6. package/dist/tailwind/preset.d.ts.map +1 -1
  7. package/dist/tailwind/preset.js +15 -10
  8. package/dist/tokens/index.css +1 -0
  9. package/dist/tokens/semantic.css +3 -3
  10. package/dist/tokens/typography.css +7 -7
  11. package/dist/ui/alert.d.ts +7 -7
  12. package/dist/ui/alert.js +10 -10
  13. package/dist/ui/autocomplete.d.ts +3 -3
  14. package/dist/ui/autocomplete.d.ts.map +1 -1
  15. package/dist/ui/autocomplete.js +1 -1
  16. package/dist/ui/badge.d.ts +10 -7
  17. package/dist/ui/badge.d.ts.map +1 -1
  18. package/dist/ui/badge.js +82 -30
  19. package/dist/ui/banner.d.ts +5 -5
  20. package/dist/ui/banner.js +17 -17
  21. package/dist/ui/button-group.d.ts +8 -5
  22. package/dist/ui/button-group.d.ts.map +1 -1
  23. package/dist/ui/button-group.js +17 -17
  24. package/dist/ui/button.d.ts +10 -8
  25. package/dist/ui/button.d.ts.map +1 -1
  26. package/dist/ui/button.js +65 -47
  27. package/dist/ui/chip.d.ts +5 -5
  28. package/dist/ui/chip.js +10 -10
  29. package/dist/ui/combobox.d.ts +6 -7
  30. package/dist/ui/combobox.d.ts.map +1 -1
  31. package/dist/ui/combobox.js +32 -31
  32. package/dist/ui/dialog.d.ts +5 -11
  33. package/dist/ui/dialog.d.ts.map +1 -1
  34. package/dist/ui/dialog.js +53 -53
  35. package/dist/ui/file-upload.js +34 -34
  36. package/dist/ui/form.d.ts +31 -28
  37. package/dist/ui/form.d.ts.map +1 -1
  38. package/dist/ui/form.js +34 -32
  39. package/dist/ui/icon-button.d.ts +4 -4
  40. package/dist/ui/index.d.ts +3 -3
  41. package/dist/ui/index.d.ts.map +1 -1
  42. package/dist/ui/index.js +69 -69
  43. package/dist/ui/number-input.d.ts +8 -10
  44. package/dist/ui/number-input.d.ts.map +1 -1
  45. package/dist/ui/number-input.js +48 -47
  46. package/dist/ui/progress.d.ts +1 -1
  47. package/dist/ui/search-input.js +8 -8
  48. package/dist/ui/sheet.d.ts +6 -12
  49. package/dist/ui/sheet.d.ts.map +1 -1
  50. package/dist/ui/sheet.js +49 -49
  51. package/dist/ui/sidebar.d.ts +1 -1
  52. package/dist/ui/slider.d.ts +1 -0
  53. package/dist/ui/slider.d.ts.map +1 -1
  54. package/dist/ui/spinner.js +7 -7
  55. package/dist/ui/switch.d.ts +4 -1
  56. package/dist/ui/switch.d.ts.map +1 -1
  57. package/dist/ui/switch.js +13 -12
  58. package/dist/ui/toast.d.ts +3 -3
  59. package/dist/ui/toast.js +22 -22
  60. package/dist/ui/toaster.d.ts +3 -3
  61. package/dist/ui/toggle-group.d.ts +2 -2
  62. package/dist/ui/toggle.d.ts +2 -2
  63. package/fonts/Inter-Italic-Variable.woff2 +0 -0
  64. package/fonts/Inter-Variable.woff2 +0 -0
  65. package/fonts/Ranade-Variable.woff2 +0 -0
  66. package/fonts/Ranade-VariableItalic.woff2 +0 -0
  67. package/package.json +57 -9
  68. package/fonts/GoogleSans-Italic-Variable.ttf +0 -0
  69. package/fonts/GoogleSans-Variable.ttf +0 -0
  70. package/fonts/Ranade-Variable.ttf +0 -0
  71. package/fonts/Ranade-VariableItalic.ttf +0 -0
@@ -2,15 +2,18 @@
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import * as React from 'react';
4
4
  declare const badgeVariants: (props?: ({
5
- variant?: "accent" | "error" | "warning" | "success" | "cyan" | "indigo" | "orange" | "teal" | "solid" | "info" | "neutral" | "brand" | "amber" | "slate" | "emerald" | null | undefined;
5
+ variant?: "solid" | "outline" | "subtle" | null | undefined;
6
+ color?: "accent" | "default" | "error" | "warning" | "success" | "cyan" | "indigo" | "orange" | "teal" | "info" | "brand" | "amber" | "slate" | "emerald" | null | undefined;
6
7
  size?: "sm" | "md" | "lg" | null | undefined;
7
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
9
  /**
9
- * Props for Badge — a compact inline label with 15 semantic + categorical variants, an optional
10
+ * Props for Badge — a compact inline label with a two-axis variant system, an optional
10
11
  * leading dot indicator, and a dismissible close button.
11
12
  *
12
- * **15 variants:** `neutral` (default) | `solid` (brand fill) | `info` | `success` | `error` |
13
- * `warning` | `brand` | `accent` | `teal` | `amber` | `slate` | `indigo` | `cyan` | `orange` | `emerald`
13
+ * **Two axes:**
14
+ * - `variant` controls **visual style**: `"subtle"` (default, surface bg) | `"solid"` (filled) | `"outline"` (border only)
15
+ * - `color` controls **semantic intent/category**: `"default"` | `"info"` | `"success"` | `"error"` |
16
+ * `"warning"` | `"brand"` | `"accent"` | `"teal"` | `"amber"` | `"slate"` | `"indigo"` | `"cyan"` | `"orange"` | `"emerald"`
14
17
  *
15
18
  * **Comparison with Chip:** Badge is a pure display label (no onClick, no delete handler).
16
19
  * Chip (`<Chip>`) is interactive — use Chip when users can click or dismiss the tag.
@@ -20,7 +23,7 @@ declare const badgeVariants: (props?: ({
20
23
  *
21
24
  * @example
22
25
  * // Status badge in a table cell:
23
- * <Badge variant="success">Active</Badge>
26
+ * <Badge color="success">Active</Badge>
24
27
  *
25
28
  * @example
26
29
  * // Notification count with dot indicator (solid fill for high contrast):
@@ -28,11 +31,11 @@ declare const badgeVariants: (props?: ({
28
31
  *
29
32
  * @example
30
33
  * // Dismissible category filter (e.g. in a filter bar):
31
- * <Badge variant="teal" onDismiss={() => removeFilter('teal')}>Teal team</Badge>
34
+ * <Badge color="teal" onDismiss={() => removeFilter('teal')}>Teal team</Badge>
32
35
  *
33
36
  * @example
34
37
  * // Error badge for a failed job in a pipeline view:
35
- * <Badge variant="error" size="lg">Build failed</Badge>
38
+ * <Badge color="error" size="lg">Build failed</Badge>
36
39
  * // These are just a few ways — feel free to combine props creatively!
37
40
  */
38
41
  export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,aAAa;;;8EA+ClB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAC3C,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,QAAA,MAAM,KAAK,oFAwBV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,aAAa;;;;8EAoFlB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAC3C,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,QAAA,MAAM,KAAK,oFAwBV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
package/dist/ui/badge.js CHANGED
@@ -1,29 +1,33 @@
1
1
  "use client";
2
- import { jsxs as i, jsx as e } from "react/jsx-runtime";
3
- import { IconX as b } from "@tabler/icons-react";
2
+ import { jsxs as b, jsx as r } from "react/jsx-runtime";
3
+ import { IconX as d } from "@tabler/icons-react";
4
4
  import * as g from "react";
5
- import { cva as l } from "class-variance-authority";
6
- import { cn as x } from "./lib/utils.js";
7
- const u = l(
5
+ import { cva as x } from "class-variance-authority";
6
+ import { cn as m } from "./lib/utils.js";
7
+ const u = x(
8
8
  "inline-flex items-center gap-ds-02b font-sans font-medium rounded-ds-full border",
9
9
  {
10
10
  variants: {
11
11
  variant: {
12
- neutral: "bg-field text-text-secondary border-border",
13
- solid: "bg-interactive text-text-on-interactive border-transparent",
14
- info: "bg-info-surface text-info-text border-info-border",
15
- success: "bg-success-surface text-success-text border-success-border",
16
- error: "bg-error-surface text-error-text border-error-border",
17
- warning: "bg-warning-surface text-warning-text border-warning-border",
18
- brand: "bg-interactive-subtle text-text-brand border-interactive",
19
- accent: "bg-accent-subtle text-accent border-accent",
20
- teal: "bg-category-teal-surface text-category-teal-text border-category-teal-border",
21
- amber: "bg-category-amber-surface text-category-amber-text border-category-amber-border",
22
- slate: "bg-category-slate-surface text-category-slate-text border-category-slate-border",
23
- indigo: "bg-category-indigo-surface text-category-indigo-text border-category-indigo-border",
24
- cyan: "bg-category-cyan-surface text-category-cyan-text border-category-cyan-border",
25
- orange: "bg-category-orange-surface text-category-orange-text border-category-orange-border",
26
- emerald: "bg-category-emerald-surface text-category-emerald-text border-category-emerald-border"
12
+ subtle: "",
13
+ solid: "",
14
+ outline: ""
15
+ },
16
+ color: {
17
+ default: "",
18
+ info: "",
19
+ success: "",
20
+ error: "",
21
+ warning: "",
22
+ brand: "",
23
+ accent: "",
24
+ teal: "",
25
+ amber: "",
26
+ slate: "",
27
+ indigo: "",
28
+ cyan: "",
29
+ orange: "",
30
+ emerald: ""
27
31
  },
28
32
  size: {
29
33
  sm: "h-[20px] px-ds-03 text-ds-xs",
@@ -31,14 +35,62 @@ const u = l(
31
35
  lg: "h-ds-xs-plus px-ds-04 text-ds-md"
32
36
  }
33
37
  },
38
+ compoundVariants: [
39
+ // subtle (surface bg)
40
+ { variant: "subtle", color: "default", className: "bg-field text-text-secondary border-border" },
41
+ { variant: "subtle", color: "info", className: "bg-info-surface text-info-text border-info-border" },
42
+ { variant: "subtle", color: "success", className: "bg-success-surface text-success-text border-success-border" },
43
+ { variant: "subtle", color: "error", className: "bg-error-surface text-error-text border-error-border" },
44
+ { variant: "subtle", color: "warning", className: "bg-warning-surface text-warning-text border-warning-border" },
45
+ { variant: "subtle", color: "brand", className: "bg-interactive-subtle text-text-brand border-interactive" },
46
+ { variant: "subtle", color: "accent", className: "bg-accent-subtle text-accent border-accent" },
47
+ { variant: "subtle", color: "teal", className: "bg-category-teal-surface text-category-teal-text border-category-teal-border" },
48
+ { variant: "subtle", color: "amber", className: "bg-category-amber-surface text-category-amber-text border-category-amber-border" },
49
+ { variant: "subtle", color: "slate", className: "bg-category-slate-surface text-category-slate-text border-category-slate-border" },
50
+ { variant: "subtle", color: "indigo", className: "bg-category-indigo-surface text-category-indigo-text border-category-indigo-border" },
51
+ { variant: "subtle", color: "cyan", className: "bg-category-cyan-surface text-category-cyan-text border-category-cyan-border" },
52
+ { variant: "subtle", color: "orange", className: "bg-category-orange-surface text-category-orange-text border-category-orange-border" },
53
+ { variant: "subtle", color: "emerald", className: "bg-category-emerald-surface text-category-emerald-text border-category-emerald-border" },
54
+ // solid (filled bg)
55
+ { variant: "solid", color: "default", className: "bg-interactive text-text-on-color border-transparent" },
56
+ { variant: "solid", color: "info", className: "bg-info text-text-on-color border-transparent" },
57
+ { variant: "solid", color: "success", className: "bg-success text-text-on-color border-transparent" },
58
+ { variant: "solid", color: "error", className: "bg-error text-text-on-color border-transparent" },
59
+ { variant: "solid", color: "warning", className: "bg-warning text-text-on-color border-transparent" },
60
+ { variant: "solid", color: "brand", className: "bg-interactive text-text-on-color border-transparent" },
61
+ { variant: "solid", color: "accent", className: "bg-accent text-text-on-color border-transparent" },
62
+ { variant: "solid", color: "teal", className: "bg-category-teal text-text-on-color border-transparent" },
63
+ { variant: "solid", color: "amber", className: "bg-category-amber text-text-on-color border-transparent" },
64
+ { variant: "solid", color: "slate", className: "bg-category-slate text-text-on-color border-transparent" },
65
+ { variant: "solid", color: "indigo", className: "bg-category-indigo text-text-on-color border-transparent" },
66
+ { variant: "solid", color: "cyan", className: "bg-category-cyan text-text-on-color border-transparent" },
67
+ { variant: "solid", color: "orange", className: "bg-category-orange text-text-on-color border-transparent" },
68
+ { variant: "solid", color: "emerald", className: "bg-category-emerald text-text-on-color border-transparent" },
69
+ // outline (border only)
70
+ { variant: "outline", color: "default", className: "bg-transparent text-text-secondary border-border" },
71
+ { variant: "outline", color: "info", className: "bg-transparent text-info-text border-info-border" },
72
+ { variant: "outline", color: "success", className: "bg-transparent text-success-text border-success-border" },
73
+ { variant: "outline", color: "error", className: "bg-transparent text-error-text border-error-border" },
74
+ { variant: "outline", color: "warning", className: "bg-transparent text-warning-text border-warning-border" },
75
+ { variant: "outline", color: "brand", className: "bg-transparent text-text-brand border-interactive" },
76
+ { variant: "outline", color: "accent", className: "bg-transparent text-accent border-accent" },
77
+ { variant: "outline", color: "teal", className: "bg-transparent text-category-teal-text border-category-teal-border" },
78
+ { variant: "outline", color: "amber", className: "bg-transparent text-category-amber-text border-category-amber-border" },
79
+ { variant: "outline", color: "slate", className: "bg-transparent text-category-slate-text border-category-slate-border" },
80
+ { variant: "outline", color: "indigo", className: "bg-transparent text-category-indigo-text border-category-indigo-border" },
81
+ { variant: "outline", color: "cyan", className: "bg-transparent text-category-cyan-text border-category-cyan-border" },
82
+ { variant: "outline", color: "orange", className: "bg-transparent text-category-orange-text border-category-orange-border" },
83
+ { variant: "outline", color: "emerald", className: "bg-transparent text-category-emerald-text border-category-emerald-border" }
84
+ ],
34
85
  defaultVariants: {
35
- variant: "neutral",
86
+ variant: "subtle",
87
+ color: "default",
36
88
  size: "md"
37
89
  }
38
90
  }
39
- ), f = g.forwardRef(
40
- ({ className: t, variant: a, size: o, dot: s, onDismiss: r, children: c, ...d }, n) => /* @__PURE__ */ i("span", { ref: n, className: x(u({ variant: a, size: o }), t), ...d, children: [
41
- s && /* @__PURE__ */ e(
91
+ ), y = g.forwardRef(
92
+ ({ className: t, variant: a, color: o, size: s, dot: n, onDismiss: e, children: c, ...l }, i) => /* @__PURE__ */ b("span", { ref: i, className: m(u({ variant: a, color: o, size: s }), t), ...l, children: [
93
+ n && /* @__PURE__ */ r(
42
94
  "span",
43
95
  {
44
96
  className: "h-ds-02b w-ds-02b rounded-ds-full bg-current opacity-[0.7] shrink-0",
@@ -46,20 +98,20 @@ const u = l(
46
98
  }
47
99
  ),
48
100
  c,
49
- r && /* @__PURE__ */ e(
101
+ e && /* @__PURE__ */ r(
50
102
  "button",
51
103
  {
52
104
  type: "button",
53
- onClick: r,
54
- className: "ml-ds-01 rounded-ds-full text-icon-secondary transition-colors hover:text-icon-primary hover:bg-field focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",
105
+ onClick: e,
106
+ className: "ml-ds-01 min-h-6 min-w-6 flex items-center justify-center rounded-ds-full text-icon-secondary transition-colors hover:text-icon-primary hover:bg-field focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",
55
107
  "aria-label": "Remove",
56
- children: /* @__PURE__ */ e(b, { className: "h-ico-sm w-ico-sm" })
108
+ children: /* @__PURE__ */ r(d, { className: "h-ico-sm w-ico-sm" })
57
109
  }
58
110
  )
59
111
  ] })
60
112
  );
61
- f.displayName = "Badge";
113
+ y.displayName = "Badge";
62
114
  export {
63
- f as Badge,
115
+ y as Badge,
64
116
  u as badgeVariants
65
117
  };
@@ -2,13 +2,13 @@
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import * as React from 'react';
4
4
  declare const bannerVariants: (props?: ({
5
- variant?: "error" | "warning" | "success" | "info" | "neutral" | null | undefined;
5
+ color?: "error" | "warning" | "success" | "info" | "neutral" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  /**
8
8
  * Props for Banner — a full-width notification strip with a colored icon, message, optional
9
9
  * action slot, and an optional dismiss button. Renders with `role="alert"`.
10
10
  *
11
- * **Variants:** `info` (default) | `success` | `warning` | `error` | `neutral`
11
+ * **Colors:** `info` (default) | `success` | `warning` | `error` | `neutral`
12
12
  *
13
13
  * **Banner vs Alert:** Banner spans the full width of its container (e.g., top of a page or section).
14
14
  * Alert is an inline block inside page content. Use Banner for system-level announcements.
@@ -18,19 +18,19 @@ declare const bannerVariants: (props?: ({
18
18
  *
19
19
  * @example
20
20
  * // Maintenance warning at top of the dashboard:
21
- * <Banner variant="warning">
21
+ * <Banner color="warning">
22
22
  * Scheduled maintenance on Sunday 2am–4am UTC. Expect brief downtime.
23
23
  * </Banner>
24
24
  *
25
25
  * @example
26
26
  * // Success banner with a CTA action button:
27
- * <Banner variant="success" action={<Button variant="ghost" size="sm">View report</Button>}>
27
+ * <Banner color="success" action={<Button variant="ghost" size="sm">View report</Button>}>
28
28
  * Your export is ready.
29
29
  * </Banner>
30
30
  *
31
31
  * @example
32
32
  * // Dismissible info banner for a new feature announcement:
33
- * <Banner variant="info" onDismiss={() => markAsSeen('feature-x')}>
33
+ * <Banner color="info" onDismiss={() => markAsSeen('feature-x')}>
34
34
  * New: You can now assign tasks directly from the calendar view.
35
35
  * </Banner>
36
36
  * // These are just a few ways — feel free to combine props creatively!
package/dist/ui/banner.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { jsxs as l, jsx as r } from "react/jsx-runtime";
3
- import { IconInfoCircle as n, IconAlertCircle as f, IconAlertTriangle as m, IconCircleCheck as b, IconX as u } from "@tabler/icons-react";
2
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
3
+ import { IconInfoCircle as s, IconAlertCircle as f, IconAlertTriangle as m, IconCircleCheck as b, IconX as u } from "@tabler/icons-react";
4
4
  import * as x from "react";
5
5
  import { cva as g } from "class-variance-authority";
6
6
  import { cn as p } from "./lib/utils.js";
@@ -8,7 +8,7 @@ const h = g(
8
8
  "flex items-center gap-ds-04 px-ds-06 py-ds-04 text-ds-md font-medium border-b",
9
9
  {
10
10
  variants: {
11
- variant: {
11
+ color: {
12
12
  info: "bg-info-surface border-info-border text-info-text",
13
13
  success: "bg-success-surface border-success-border text-success-text",
14
14
  warning: "bg-warning-surface border-warning-border text-warning-text",
@@ -16,27 +16,27 @@ const h = g(
16
16
  neutral: "bg-layer-02 border-border text-text-primary [&>svg]:text-text-secondary"
17
17
  }
18
18
  },
19
- defaultVariants: { variant: "info" }
19
+ defaultVariants: { color: "info" }
20
20
  }
21
- ), v = {
22
- info: n,
21
+ ), N = {
22
+ info: s,
23
23
  success: b,
24
24
  warning: m,
25
25
  error: f,
26
- neutral: n
27
- }, N = x.forwardRef(
28
- ({ className: t, variant: e = "info", action: o, onDismiss: s, children: i, ...a }, c) => {
29
- const d = v[e ?? "info"];
30
- return /* @__PURE__ */ l("div", { ref: c, className: p(h({ variant: e }), t), role: "alert", ...a, children: [
31
- /* @__PURE__ */ r(d, { className: "h-ico-md w-ico-md shrink-0", "aria-hidden": "true" }),
26
+ neutral: s
27
+ }, v = x.forwardRef(
28
+ ({ className: t, color: e = "info", action: o, onDismiss: n, children: i, ...c }, a) => {
29
+ const l = N[e ?? "info"];
30
+ return /* @__PURE__ */ d("div", { ref: a, className: p(h({ color: e }), t), role: "alert", ...c, children: [
31
+ /* @__PURE__ */ r(l, { className: "h-ico-md w-ico-md shrink-0", "aria-hidden": "true" }),
32
32
  /* @__PURE__ */ r("span", { className: "flex-1", children: i }),
33
33
  o && /* @__PURE__ */ r("span", { className: "shrink-0", children: o }),
34
- s && /* @__PURE__ */ r(
34
+ n && /* @__PURE__ */ r(
35
35
  "button",
36
36
  {
37
37
  type: "button",
38
- onClick: s,
39
- className: "shrink-0 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",
38
+ onClick: n,
39
+ 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",
40
40
  "aria-label": "Dismiss",
41
41
  children: /* @__PURE__ */ r(u, { className: "h-ico-sm w-ico-sm" })
42
42
  }
@@ -44,8 +44,8 @@ const h = g(
44
44
  ] });
45
45
  }
46
46
  );
47
- N.displayName = "Banner";
47
+ v.displayName = "Banner";
48
48
  export {
49
- N as Banner,
49
+ v as Banner,
50
50
  h as bannerVariants
51
51
  };
@@ -3,6 +3,7 @@ import { ButtonProps } from './button';
3
3
  import * as React from 'react';
4
4
  interface ButtonGroupContextValue {
5
5
  variant?: ButtonProps['variant'];
6
+ color?: ButtonProps['color'];
6
7
  size?: ButtonProps['size'];
7
8
  }
8
9
  export declare function useButtonGroup(): ButtonGroupContextValue;
@@ -16,8 +17,8 @@ export declare function useButtonGroup(): ButtonGroupContextValue;
16
17
  * **Visual joining:** Adjacent button borders are merged with negative margins and border-radius overrides.
17
18
  *
18
19
  * @example
19
- * // Horizontal toolbar action group (secondary variant shared):
20
- * <ButtonGroup variant="secondary" size="sm">
20
+ * // Horizontal toolbar action group (outline variant shared):
21
+ * <ButtonGroup variant="outline" size="sm">
21
22
  * <Button startIcon={<IconBold />}>Bold</Button>
22
23
  * <Button startIcon={<IconItalic />}>Italic</Button>
23
24
  * <Button startIcon={<IconUnderline />}>Underline</Button>
@@ -28,12 +29,12 @@ export declare function useButtonGroup(): ButtonGroupContextValue;
28
29
  * <ButtonGroup orientation="vertical" variant="ghost" size="md">
29
30
  * <Button>Profile</Button>
30
31
  * <Button>Settings</Button>
31
- * <Button variant="error-ghost">Danger zone</Button>
32
+ * <Button variant="ghost" color="error">Danger zone</Button>
32
33
  * </ButtonGroup>
33
34
  *
34
35
  * @example
35
- * // Split button pattern (primary action + dropdown trigger):
36
- * <ButtonGroup variant="primary" size="md">
36
+ * // Split button pattern (solid action + dropdown trigger):
37
+ * <ButtonGroup variant="solid" size="md">
37
38
  * <Button onClick={handlePublish}>Publish</Button>
38
39
  * <Button size="icon-md" aria-label="More publish options"><IconChevronDown /></Button>
39
40
  * </ButtonGroup>
@@ -42,6 +43,8 @@ export declare function useButtonGroup(): ButtonGroupContextValue;
42
43
  export interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
43
44
  /** Shared variant applied to all child Buttons (children can override) */
44
45
  variant?: ButtonProps['variant'];
46
+ /** Shared color applied to all child Buttons (children can override) */
47
+ color?: ButtonProps['color'];
45
48
  /** Shared size applied to all child Buttons (children can override) */
46
49
  size?: ButtonProps['size'];
47
50
  /** Layout direction. Default: 'horizontal' */
@@ -1 +1 @@
1
- {"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../src/ui/button-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3C,UAAU,uBAAuB;IAC/B,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAChC,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAC3B;AAID,wBAAgB,cAAc,4BAE7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5E,0EAA0E;IAC1E,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAChC,uEAAuE;IACvE,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC1B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;CACxC;AAED,QAAA,MAAM,WAAW,yFAiChB,CAAA;AAGD,OAAO,EAAE,WAAW,EAAE,CAAA"}
1
+ {"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../src/ui/button-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3C,UAAU,uBAAuB;IAC/B,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC5B,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAC3B;AAID,wBAAgB,cAAc,4BAE7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5E,0EAA0E;IAC1E,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAChC,wEAAwE;IACxE,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC5B,uEAAuE;IACvE,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC1B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;CACxC;AAED,QAAA,MAAM,WAAW,yFAiChB,CAAA;AAGD,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -1,22 +1,22 @@
1
1
  "use client";
2
2
  import { jsx as r } from "react/jsx-runtime";
3
3
  import * as o from "react";
4
- import { cn as f } from "./lib/utils.js";
5
- const e = o.createContext({});
6
- function x() {
7
- return o.useContext(e);
4
+ import { cn as a } from "./lib/utils.js";
5
+ const l = o.createContext({});
6
+ function h() {
7
+ return o.useContext(l);
8
8
  }
9
- const a = o.forwardRef(
10
- ({ className: l, variant: t, size: n, orientation: u = "horizontal", children: i, ...d }, c) => {
11
- const s = o.useMemo(() => ({ variant: t, size: n }), [t, n]);
12
- return /* @__PURE__ */ r(e.Provider, { value: s, children: /* @__PURE__ */ r(
9
+ const p = o.forwardRef(
10
+ ({ className: u, variant: t, color: n, size: e, orientation: i = "horizontal", children: d, ...c }, s) => {
11
+ const f = o.useMemo(() => ({ variant: t, color: n, size: e }), [t, n, e]);
12
+ return /* @__PURE__ */ r(l.Provider, { value: f, children: /* @__PURE__ */ r(
13
13
  "div",
14
14
  {
15
- ref: c,
15
+ ref: s,
16
16
  role: "group",
17
- className: f(
17
+ className: a(
18
18
  "inline-flex",
19
- u === "horizontal" ? [
19
+ i === "horizontal" ? [
20
20
  "flex-row",
21
21
  "[&>*:not(:first-child)]:rounded-l-none",
22
22
  "[&>*:not(:last-child)]:rounded-r-none",
@@ -27,16 +27,16 @@ const a = o.forwardRef(
27
27
  "[&>*:not(:last-child)]:rounded-b-none",
28
28
  "[&>*:not(:first-child)]:-mt-px"
29
29
  ],
30
- l
30
+ u
31
31
  ),
32
- ...d,
33
- children: i
32
+ ...c,
33
+ children: d
34
34
  }
35
35
  ) });
36
36
  }
37
37
  );
38
- a.displayName = "ButtonGroup";
38
+ p.displayName = "ButtonGroup";
39
39
  export {
40
- a as ButtonGroup,
41
- x as useButtonGroup
40
+ p as ButtonGroup,
41
+ h as useButtonGroup
42
42
  };
@@ -2,16 +2,18 @@
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import * as React from 'react';
4
4
  export declare const buttonVariants: (props?: ({
5
- variant?: "link" | "primary" | "secondary" | "ghost" | "error" | "error-ghost" | null | undefined;
5
+ variant?: "link" | "solid" | "outline" | "ghost" | null | undefined;
6
+ color?: "default" | "error" | null | undefined;
6
7
  size?: "sm" | "md" | "lg" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
7
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
9
  /**
9
- * Props for Button — the primary action component with 6 variants, 6 size options, icon slots,
10
- * and a built-in loading state that disables interaction and shows a spinner.
10
+ * Props for Button — the primary action component with a two-axis variant system,
11
+ * 6 size options, icon slots, and a built-in loading state.
11
12
  *
12
- * **Variants:** `primary` (pink brand glow, default) | `secondary` (outlined interactive) |
13
- * `ghost` (transparent, for toolbars) | `error` (destructive fill) | `error-ghost` (outlined error) |
14
- * `link` (underline, inline text actions)
13
+ * **Two axes:**
14
+ * - `variant` controls **visual style**: `"solid"` (default, filled brand) | `"outline"` (bordered) |
15
+ * `"ghost"` (transparent, for toolbars) | `"link"` (underline, inline text actions)
16
+ * - `color` controls **semantic intent**: `"default"` (brand interactive) | `"error"` (destructive)
15
17
  *
16
18
  * **Sizes:** `sm` | `md` (default) | `lg` for text buttons;
17
19
  * `icon-sm` | `icon-md` | `icon-lg` for square icon-only buttons (prefer `IconButton` for icon-only).
@@ -20,12 +22,12 @@ export declare const buttonVariants: (props?: ({
20
22
  * Use `loadingPosition` to control where the spinner appears.
21
23
  *
22
24
  * @example
23
- * // Primary save action (default variant):
25
+ * // Primary save action (default variant + color):
24
26
  * <Button onClick={handleSave}>Save changes</Button>
25
27
  *
26
28
  * @example
27
29
  * // Destructive delete with confirmation icon and loading state:
28
- * <Button variant="error" startIcon={<IconTrash />} loading={isDeleting}>
30
+ * <Button variant="solid" color="error" startIcon={<IconTrash />} loading={isDeleting}>
29
31
  * Delete project
30
32
  * </Button>
31
33
  *
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,eAAO,MAAM,cAAc;;;8EA+B1B,CAAA;AAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yFAAyF;IACzF,eAAe,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;IAC5C,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,QAAA,MAAM,MAAM,uFA4GX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,CAAA"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,eAAO,MAAM,cAAc;;;;8EA2C1B,CAAA;AAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yFAAyF;IACzF,eAAe,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;IAC5C,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,QAAA,MAAM,MAAM,uFA8GX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,CAAA"}