@devalok/shilp-sutra 0.6.1 → 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 +1861 -0
  83. package/llms.txt +183 -0
  84. package/package.json +71 -5
@@ -334,6 +334,7 @@ const r = {
334
334
  sticky: "var(--z-sticky)",
335
335
  overlay: "var(--z-overlay)",
336
336
  modal: "var(--z-modal)",
337
+ popover: "var(--z-popover)",
337
338
  toast: "var(--z-toast)",
338
339
  tooltip: "var(--z-tooltip)"
339
340
  }
@@ -1 +1 @@
1
- {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/tailwind/preset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,QAAA,MAAM,MAAM,EAAE,OAAO,CAAC,MAAM,CAuV3B,CAAA;AAED,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/tailwind/preset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,QAAA,MAAM,MAAM,EAAE,OAAO,CAAC,MAAM,CAwV3B,CAAA;AAED,eAAe,MAAM,CAAA"}
@@ -334,6 +334,7 @@ const r = {
334
334
  sticky: "var(--z-sticky)",
335
335
  overlay: "var(--z-overlay)",
336
336
  modal: "var(--z-modal)",
337
+ popover: "var(--z-popover)",
337
338
  toast: "var(--z-toast)",
338
339
  tooltip: "var(--z-tooltip)"
339
340
  }
@@ -226,6 +226,7 @@
226
226
  --z-sticky: 1100;
227
227
  --z-overlay: 1200;
228
228
  --z-modal: 1300;
229
+ --z-popover: 1400;
229
230
  --z-toast: 1500;
230
231
  --z-tooltip: 1600;
231
232
 
@@ -413,6 +414,12 @@
413
414
  --chart-8: var(--orange-400);
414
415
  }
415
416
 
417
+ /* Ensure Radix popper content (Select, Combobox, Popover, etc.)
418
+ renders above Sheet/Dialog overlays */
419
+ [data-radix-popper-content-wrapper] {
420
+ z-index: var(--z-popover) !important;
421
+ }
422
+
416
423
  /* ── Reduced Motion ──────────────────────────────────── */
417
424
  @media (prefers-reduced-motion: reduce) {
418
425
  *,
package/dist/ui/alert.js CHANGED
@@ -4,75 +4,54 @@ import { IconInfoCircle as s, IconAlertCircle as x, IconAlertTriangle as m, Icon
4
4
  import * as g from "react";
5
5
  import { cva as v } from "class-variance-authority";
6
6
  import { cn as p } from "./lib/utils.js";
7
- const N = v(
8
- "relative flex gap-ds-04 rounded-ds-lg border p-ds-05",
9
- {
10
- variants: {
11
- variant: {
12
- subtle: "",
13
- filled: "",
14
- outline: ""
15
- },
16
- color: {
17
- info: "",
18
- success: "",
19
- warning: "",
20
- error: "",
21
- neutral: ""
22
- }
7
+ const N = v("relative flex gap-ds-04 rounded-ds-lg border p-ds-05", {
8
+ variants: {
9
+ variant: {
10
+ subtle: "",
11
+ filled: "",
12
+ outline: ""
23
13
  },
24
- compoundVariants: [
25
- // subtle (surface bg) — default, matches previous behavior
26
- { variant: "subtle", color: "info", className: "bg-info-surface border-info-border text-info-text" },
27
- { variant: "subtle", color: "success", className: "bg-success-surface border-success-border text-success-text" },
28
- { variant: "subtle", color: "warning", className: "bg-warning-surface border-warning-border text-warning-text" },
29
- { variant: "subtle", color: "error", className: "bg-error-surface border-error-border text-error-text" },
30
- { variant: "subtle", color: "neutral", className: "bg-layer-02 border-border text-text-primary [&>svg]:text-text-secondary" },
31
- // filled (solid bg, white text)
32
- { variant: "filled", color: "info", className: "bg-info text-text-on-color border-transparent [&>svg]:text-text-on-color" },
33
- { variant: "filled", color: "success", className: "bg-success text-text-on-color border-transparent [&>svg]:text-text-on-color" },
34
- { variant: "filled", color: "warning", className: "bg-warning text-text-on-color border-transparent [&>svg]:text-text-on-color" },
35
- { variant: "filled", color: "error", className: "bg-error text-text-on-color border-transparent [&>svg]:text-text-on-color" },
36
- { variant: "filled", color: "neutral", className: "bg-layer-03 text-text-primary border-transparent [&>svg]:text-text-secondary" },
37
- // outline (transparent bg, colored border)
38
- { variant: "outline", color: "info", className: "bg-transparent border-info-border text-info-text" },
39
- { variant: "outline", color: "success", className: "bg-transparent border-success-border text-success-text" },
40
- { variant: "outline", color: "warning", className: "bg-transparent border-warning-border text-warning-text" },
41
- { variant: "outline", color: "error", className: "bg-transparent border-error-border text-error-text" },
42
- { variant: "outline", color: "neutral", className: "bg-transparent border-border text-text-primary [&>svg]:text-text-secondary" }
43
- ],
44
- defaultVariants: { variant: "subtle", color: "info" }
45
- }
46
- ), w = {
14
+ color: {
15
+ info: "",
16
+ success: "",
17
+ warning: "",
18
+ error: "",
19
+ neutral: ""
20
+ }
21
+ },
22
+ compoundVariants: [
23
+ // subtle (surface bg) — default, matches previous behavior
24
+ { variant: "subtle", color: "info", className: "bg-info-surface border-info-border text-info-text" },
25
+ { variant: "subtle", color: "success", className: "bg-success-surface border-success-border text-success-text" },
26
+ { variant: "subtle", color: "warning", className: "bg-warning-surface border-warning-border text-warning-text" },
27
+ { variant: "subtle", color: "error", className: "bg-error-surface border-error-border text-error-text" },
28
+ { variant: "subtle", color: "neutral", className: "bg-layer-02 border-border text-text-primary [&>svg]:text-text-secondary" },
29
+ // filled (solid bg, white text)
30
+ { variant: "filled", color: "info", className: "bg-info text-text-on-color border-transparent [&>svg]:text-text-on-color" },
31
+ { variant: "filled", color: "success", className: "bg-success text-text-on-color border-transparent [&>svg]:text-text-on-color" },
32
+ { variant: "filled", color: "warning", className: "bg-warning text-text-on-color border-transparent [&>svg]:text-text-on-color" },
33
+ { variant: "filled", color: "error", className: "bg-error text-text-on-color border-transparent [&>svg]:text-text-on-color" },
34
+ { variant: "filled", color: "neutral", className: "bg-layer-03 text-text-primary border-transparent [&>svg]:text-text-secondary" },
35
+ // outline (transparent bg, colored border)
36
+ { variant: "outline", color: "info", className: "bg-transparent border-info-border text-info-text" },
37
+ { variant: "outline", color: "success", className: "bg-transparent border-success-border text-success-text" },
38
+ { variant: "outline", color: "warning", className: "bg-transparent border-warning-border text-warning-text" },
39
+ { variant: "outline", color: "error", className: "bg-transparent border-error-border text-error-text" },
40
+ { variant: "outline", color: "neutral", className: "bg-transparent border-border text-text-primary [&>svg]:text-text-secondary" }
41
+ ],
42
+ defaultVariants: { variant: "subtle", color: "info" }
43
+ }), w = {
47
44
  info: s,
48
45
  success: u,
49
46
  warning: m,
50
47
  error: x,
51
48
  neutral: s
52
- }, y = g.forwardRef(
53
- ({ className: n, variant: c = "subtle", color: e = "info", title: t, onDismiss: o, children: i, ...l }, d) => {
54
- const b = w[e ?? "info"];
55
- return /* @__PURE__ */ a("div", { ref: d, className: p(N({ variant: c, color: e }), n), role: "alert", ...l, children: [
56
- /* @__PURE__ */ r(b, { className: "mt-ds-01 h-ico-md w-ico-md shrink-0", "aria-hidden": "true" }),
57
- /* @__PURE__ */ a("div", { className: "flex-1 min-w-0", children: [
58
- t && /* @__PURE__ */ r("p", { className: "text-ds-md font-semibold mb-ds-01", children: t }),
59
- /* @__PURE__ */ r("div", { className: "text-ds-md opacity-[0.9]", children: i })
60
- ] }),
61
- o && /* @__PURE__ */ r(
62
- "button",
63
- {
64
- type: "button",
65
- onClick: o,
66
- className: "shrink-0 min-h-6 min-w-6 flex items-center justify-center rounded-ds-sm text-icon-secondary transition-colors hover:text-icon-primary hover:bg-field focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",
67
- "aria-label": "Dismiss",
68
- children: /* @__PURE__ */ r(f, { className: "h-ico-sm w-ico-sm" })
69
- }
70
- )
71
- ] });
72
- }
73
- );
74
- y.displayName = "Alert";
49
+ }, h = g.forwardRef(({ className: n, variant: c = "subtle", color: e = "info", title: t, onDismiss: o, children: i, ...l }, d) => {
50
+ const b = w[e ?? "info"];
51
+ return a("div", { ref: d, className: p(N({ variant: c, color: e }), n), role: "alert", ...l, children: [r(b, { className: "mt-ds-01 h-ico-md w-ico-md shrink-0", "aria-hidden": "true" }), a("div", { className: "flex-1 min-w-0", children: [t && r("p", { className: "text-ds-md font-semibold mb-ds-01", children: t }), r("div", { className: "text-ds-md opacity-[0.9]", children: i })] }), o && r("button", { type: "button", onClick: o, 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", "aria-label": "Dismiss", children: r(f, { className: "h-ico-sm w-ico-sm" }) })] });
52
+ });
53
+ h.displayName = "Alert";
75
54
  export {
76
- y as Alert,
55
+ h as Alert,
77
56
  N as alertVariants
78
57
  };
package/dist/ui/avatar.js CHANGED
@@ -4,26 +4,23 @@ import * as i from "react";
4
4
  import { Root as n, Fallback as o, Image as t } from "../primitives/react-avatar.js";
5
5
  import { cva as u } from "class-variance-authority";
6
6
  import { cn as r } from "./lib/utils.js";
7
- const w = u(
8
- "relative flex shrink-0 overflow-hidden",
9
- {
10
- variants: {
11
- size: {
12
- xs: "h-ds-xs w-ds-xs",
13
- sm: "h-ds-sm w-ds-sm",
14
- md: "h-ds-md w-ds-md",
15
- lg: "h-ds-lg w-ds-lg",
16
- xl: "h-ds-xl w-ds-xl"
17
- },
18
- shape: {
19
- circle: "rounded-ds-full",
20
- square: "rounded-ds-none",
21
- rounded: "rounded-ds-md"
22
- }
7
+ const h = u("relative flex shrink-0 overflow-hidden", {
8
+ variants: {
9
+ size: {
10
+ xs: "h-ds-xs w-ds-xs",
11
+ sm: "h-ds-sm w-ds-sm",
12
+ md: "h-ds-md w-ds-md",
13
+ lg: "h-ds-lg w-ds-lg",
14
+ xl: "h-ds-xl w-ds-xl"
23
15
  },
24
- defaultVariants: { size: "md", shape: "circle" }
25
- }
26
- ), h = {
16
+ shape: {
17
+ circle: "rounded-ds-full",
18
+ square: "rounded-ds-none",
19
+ rounded: "rounded-ds-md"
20
+ }
21
+ },
22
+ defaultVariants: { size: "md", shape: "circle" }
23
+ }), w = {
27
24
  online: "bg-success",
28
25
  offline: "bg-layer-03",
29
26
  busy: "bg-error",
@@ -39,54 +36,15 @@ const w = u(
39
36
  md: "h-ds-03 w-ds-03",
40
37
  lg: "h-[12px] w-[12px]",
41
38
  xl: "h-ds-04 w-ds-04"
42
- }, g = i.forwardRef(({ className: a, size: s, shape: e, status: d, children: m, ...f }, c) => /* @__PURE__ */ p("span", { className: "relative inline-flex shrink-0", children: [
43
- /* @__PURE__ */ l(
44
- n,
45
- {
46
- ref: c,
47
- className: r(w({ size: s, shape: e }), a),
48
- ...f,
49
- children: m
50
- }
51
- ),
52
- d && /* @__PURE__ */ l(
53
- "span",
54
- {
55
- className: r(
56
- "absolute bottom-0 right-0 rounded-ds-full ring-2 ring-layer-01",
57
- h[d],
58
- b[s ?? "md"]
59
- ),
60
- role: "img",
61
- "aria-label": x[d]
62
- }
63
- )
64
- ] }));
39
+ }, g = i.forwardRef(({ className: a, size: s, shape: e, status: d, children: m, ...f }, c) => p("span", { className: "relative inline-flex shrink-0", children: [l(n, { ref: c, className: r(h({ size: s, shape: e }), a), ...f, children: m }), d && l("span", { className: r("absolute bottom-0 right-0 rounded-ds-full ring-2 ring-layer-01", w[d], b[s ?? "md"]), role: "img", "aria-label": x[d] })] }));
65
40
  g.displayName = n.displayName;
66
- const y = i.forwardRef(({ className: a, ...s }, e) => /* @__PURE__ */ l(
67
- t,
68
- {
69
- ref: e,
70
- className: r("aspect-square h-full w-full", a),
71
- ...s
72
- }
73
- ));
41
+ const y = i.forwardRef(({ className: a, ...s }, e) => l(t, { ref: e, className: r("aspect-square h-full w-full", a), ...s }));
74
42
  y.displayName = t.displayName;
75
- const v = i.forwardRef(({ className: a, ...s }, e) => /* @__PURE__ */ l(
76
- o,
77
- {
78
- ref: e,
79
- className: r(
80
- "flex h-full w-full items-center justify-center rounded-ds-full bg-interactive-subtle text-interactive",
81
- a
82
- ),
83
- ...s
84
- }
85
- ));
43
+ const v = i.forwardRef(({ className: a, ...s }, e) => l(o, { ref: e, className: r("flex h-full w-full items-center justify-center rounded-ds-full bg-interactive-subtle text-interactive", a), ...s }));
86
44
  v.displayName = o.displayName;
87
45
  export {
88
46
  g as Avatar,
89
47
  v as AvatarFallback,
90
48
  y as AvatarImage,
91
- w as avatarVariants
49
+ h as avatarVariants
92
50
  };
@@ -4,7 +4,7 @@ import * as React from 'react';
4
4
  declare const badgeVariants: (props?: ({
5
5
  variant?: "solid" | "outline" | "destructive" | "subtle" | "secondary" | null | undefined;
6
6
  color?: "accent" | "default" | "error" | "warning" | "success" | "cyan" | "indigo" | "orange" | "teal" | "info" | "brand" | "amber" | "slate" | "emerald" | null | undefined;
7
- size?: "sm" | "md" | "lg" | null | undefined;
7
+ size?: "xs" | "sm" | "md" | "lg" | null | undefined;
8
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
9
  /**
10
10
  * Props for Badge — a compact inline label with a two-axis variant system, an optional
@@ -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;;;;8EA2FlB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC,EAC1D,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;;;;8EA4FlB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC,EAC1D,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
@@ -4,121 +4,97 @@ import { IconX as b } from "@tabler/icons-react";
4
4
  import * as g from "react";
5
5
  import { cva as x } from "class-variance-authority";
6
6
  import { cn as m } from "./lib/utils.js";
7
- const u = x(
8
- "inline-flex items-center gap-ds-02b font-sans font-medium rounded-ds-full border",
9
- {
10
- variants: {
11
- variant: {
12
- subtle: "",
13
- secondary: "",
14
- // alias → subtle
15
- solid: "",
16
- outline: "",
17
- destructive: ""
18
- // alias → solid + error
19
- },
20
- color: {
21
- default: "",
22
- info: "",
23
- success: "",
24
- error: "",
25
- warning: "",
26
- brand: "",
27
- accent: "",
28
- teal: "",
29
- amber: "",
30
- slate: "",
31
- indigo: "",
32
- cyan: "",
33
- orange: "",
34
- emerald: ""
35
- },
36
- size: {
37
- sm: "h-[20px] px-ds-03 text-ds-xs",
38
- md: "h-ds-xs px-ds-03 text-ds-sm",
39
- lg: "h-ds-xs-plus px-ds-04 text-ds-md"
40
- }
7
+ const u = x("inline-flex items-center gap-ds-02b font-sans font-medium rounded-ds-full border", {
8
+ variants: {
9
+ variant: {
10
+ subtle: "",
11
+ secondary: "",
12
+ // alias → subtle
13
+ solid: "",
14
+ outline: "",
15
+ destructive: ""
16
+ // alias → solid + error
41
17
  },
42
- compoundVariants: [
43
- // subtle (surface bg)
44
- { variant: "subtle", color: "default", className: "bg-field text-text-secondary border-border" },
45
- // "secondary" alias → same as subtle + default
46
- { variant: "secondary", color: "default", className: "bg-field text-text-secondary border-border" },
47
- // "destructive" alias → solid + error
48
- { variant: "destructive", color: "default", className: "bg-error text-text-on-color border-transparent" },
49
- { variant: "destructive", color: "error", className: "bg-error text-text-on-color border-transparent" },
50
- { variant: "subtle", color: "info", className: "bg-info-surface text-info-text border-info-border" },
51
- { variant: "subtle", color: "success", className: "bg-success-surface text-success-text border-success-border" },
52
- { variant: "subtle", color: "error", className: "bg-error-surface text-error-text border-error-border" },
53
- { variant: "subtle", color: "warning", className: "bg-warning-surface text-warning-text border-warning-border" },
54
- { variant: "subtle", color: "brand", className: "bg-interactive-subtle text-text-brand border-interactive" },
55
- { variant: "subtle", color: "accent", className: "bg-accent-subtle text-accent border-accent" },
56
- { variant: "subtle", color: "teal", className: "bg-category-teal-surface text-category-teal-text border-category-teal-border" },
57
- { variant: "subtle", color: "amber", className: "bg-category-amber-surface text-category-amber-text border-category-amber-border" },
58
- { variant: "subtle", color: "slate", className: "bg-category-slate-surface text-category-slate-text border-category-slate-border" },
59
- { variant: "subtle", color: "indigo", className: "bg-category-indigo-surface text-category-indigo-text border-category-indigo-border" },
60
- { variant: "subtle", color: "cyan", className: "bg-category-cyan-surface text-category-cyan-text border-category-cyan-border" },
61
- { variant: "subtle", color: "orange", className: "bg-category-orange-surface text-category-orange-text border-category-orange-border" },
62
- { variant: "subtle", color: "emerald", className: "bg-category-emerald-surface text-category-emerald-text border-category-emerald-border" },
63
- // solid (filled bg)
64
- { variant: "solid", color: "default", className: "bg-interactive text-text-on-color border-transparent" },
65
- { variant: "solid", color: "info", className: "bg-info text-text-on-color border-transparent" },
66
- { variant: "solid", color: "success", className: "bg-success text-text-on-color border-transparent" },
67
- { variant: "solid", color: "error", className: "bg-error text-text-on-color border-transparent" },
68
- { variant: "solid", color: "warning", className: "bg-warning text-text-on-color border-transparent" },
69
- { variant: "solid", color: "brand", className: "bg-interactive text-text-on-color border-transparent" },
70
- { variant: "solid", color: "accent", className: "bg-accent text-text-on-color border-transparent" },
71
- { variant: "solid", color: "teal", className: "bg-category-teal text-text-on-color border-transparent" },
72
- { variant: "solid", color: "amber", className: "bg-category-amber text-text-on-color border-transparent" },
73
- { variant: "solid", color: "slate", className: "bg-category-slate text-text-on-color border-transparent" },
74
- { variant: "solid", color: "indigo", className: "bg-category-indigo text-text-on-color border-transparent" },
75
- { variant: "solid", color: "cyan", className: "bg-category-cyan text-text-on-color border-transparent" },
76
- { variant: "solid", color: "orange", className: "bg-category-orange text-text-on-color border-transparent" },
77
- { variant: "solid", color: "emerald", className: "bg-category-emerald text-text-on-color border-transparent" },
78
- // outline (border only)
79
- { variant: "outline", color: "default", className: "bg-transparent text-text-secondary border-border" },
80
- { variant: "outline", color: "info", className: "bg-transparent text-info-text border-info-border" },
81
- { variant: "outline", color: "success", className: "bg-transparent text-success-text border-success-border" },
82
- { variant: "outline", color: "error", className: "bg-transparent text-error-text border-error-border" },
83
- { variant: "outline", color: "warning", className: "bg-transparent text-warning-text border-warning-border" },
84
- { variant: "outline", color: "brand", className: "bg-transparent text-text-brand border-interactive" },
85
- { variant: "outline", color: "accent", className: "bg-transparent text-accent border-accent" },
86
- { variant: "outline", color: "teal", className: "bg-transparent text-category-teal-text border-category-teal-border" },
87
- { variant: "outline", color: "amber", className: "bg-transparent text-category-amber-text border-category-amber-border" },
88
- { variant: "outline", color: "slate", className: "bg-transparent text-category-slate-text border-category-slate-border" },
89
- { variant: "outline", color: "indigo", className: "bg-transparent text-category-indigo-text border-category-indigo-border" },
90
- { variant: "outline", color: "cyan", className: "bg-transparent text-category-cyan-text border-category-cyan-border" },
91
- { variant: "outline", color: "orange", className: "bg-transparent text-category-orange-text border-category-orange-border" },
92
- { variant: "outline", color: "emerald", className: "bg-transparent text-category-emerald-text border-category-emerald-border" }
93
- ],
94
- defaultVariants: {
95
- variant: "subtle",
96
- color: "default",
97
- size: "md"
18
+ color: {
19
+ default: "",
20
+ info: "",
21
+ success: "",
22
+ error: "",
23
+ warning: "",
24
+ brand: "",
25
+ accent: "",
26
+ teal: "",
27
+ amber: "",
28
+ slate: "",
29
+ indigo: "",
30
+ cyan: "",
31
+ orange: "",
32
+ emerald: ""
33
+ },
34
+ size: {
35
+ sm: "h-[20px] px-ds-03 text-ds-xs",
36
+ md: "h-ds-xs px-ds-03 text-ds-sm",
37
+ lg: "h-ds-xs-plus px-ds-04 text-ds-md"
98
38
  }
39
+ },
40
+ compoundVariants: [
41
+ // subtle (surface bg)
42
+ { variant: "subtle", color: "default", className: "bg-field text-text-secondary border-border" },
43
+ // "secondary" alias → same as subtle + default
44
+ { variant: "secondary", color: "default", className: "bg-field text-text-secondary border-border" },
45
+ // "destructive" alias → solid + error
46
+ { variant: "destructive", color: "default", className: "bg-error text-text-on-color border-transparent" },
47
+ { variant: "destructive", color: "error", className: "bg-error text-text-on-color border-transparent" },
48
+ { variant: "subtle", color: "info", className: "bg-info-surface text-info-text border-info-border" },
49
+ { variant: "subtle", color: "success", className: "bg-success-surface text-success-text border-success-border" },
50
+ { variant: "subtle", color: "error", className: "bg-error-surface text-error-text border-error-border" },
51
+ { variant: "subtle", color: "warning", className: "bg-warning-surface text-warning-text border-warning-border" },
52
+ { variant: "subtle", color: "brand", className: "bg-interactive-subtle text-text-brand border-interactive" },
53
+ { variant: "subtle", color: "accent", className: "bg-accent-subtle text-accent border-accent" },
54
+ { variant: "subtle", color: "teal", className: "bg-category-teal-surface text-category-teal-text border-category-teal-border" },
55
+ { variant: "subtle", color: "amber", className: "bg-category-amber-surface text-category-amber-text border-category-amber-border" },
56
+ { variant: "subtle", color: "slate", className: "bg-category-slate-surface text-category-slate-text border-category-slate-border" },
57
+ { variant: "subtle", color: "indigo", className: "bg-category-indigo-surface text-category-indigo-text border-category-indigo-border" },
58
+ { variant: "subtle", color: "cyan", className: "bg-category-cyan-surface text-category-cyan-text border-category-cyan-border" },
59
+ { variant: "subtle", color: "orange", className: "bg-category-orange-surface text-category-orange-text border-category-orange-border" },
60
+ { variant: "subtle", color: "emerald", className: "bg-category-emerald-surface text-category-emerald-text border-category-emerald-border" },
61
+ // solid (filled bg)
62
+ { variant: "solid", color: "default", className: "bg-interactive text-text-on-color border-transparent" },
63
+ { variant: "solid", color: "info", className: "bg-info text-text-on-color border-transparent" },
64
+ { variant: "solid", color: "success", className: "bg-success text-text-on-color border-transparent" },
65
+ { variant: "solid", color: "error", className: "bg-error text-text-on-color border-transparent" },
66
+ { variant: "solid", color: "warning", className: "bg-warning text-text-on-color border-transparent" },
67
+ { variant: "solid", color: "brand", className: "bg-interactive text-text-on-color border-transparent" },
68
+ { variant: "solid", color: "accent", className: "bg-accent text-text-on-color border-transparent" },
69
+ { variant: "solid", color: "teal", className: "bg-category-teal text-text-on-color border-transparent" },
70
+ { variant: "solid", color: "amber", className: "bg-category-amber text-text-on-color border-transparent" },
71
+ { variant: "solid", color: "slate", className: "bg-category-slate text-text-on-color border-transparent" },
72
+ { variant: "solid", color: "indigo", className: "bg-category-indigo text-text-on-color border-transparent" },
73
+ { variant: "solid", color: "cyan", className: "bg-category-cyan text-text-on-color border-transparent" },
74
+ { variant: "solid", color: "orange", className: "bg-category-orange text-text-on-color border-transparent" },
75
+ { variant: "solid", color: "emerald", className: "bg-category-emerald text-text-on-color border-transparent" },
76
+ // outline (border only)
77
+ { variant: "outline", color: "default", className: "bg-transparent text-text-secondary border-border" },
78
+ { variant: "outline", color: "info", className: "bg-transparent text-info-text border-info-border" },
79
+ { variant: "outline", color: "success", className: "bg-transparent text-success-text border-success-border" },
80
+ { variant: "outline", color: "error", className: "bg-transparent text-error-text border-error-border" },
81
+ { variant: "outline", color: "warning", className: "bg-transparent text-warning-text border-warning-border" },
82
+ { variant: "outline", color: "brand", className: "bg-transparent text-text-brand border-interactive" },
83
+ { variant: "outline", color: "accent", className: "bg-transparent text-accent border-accent" },
84
+ { variant: "outline", color: "teal", className: "bg-transparent text-category-teal-text border-category-teal-border" },
85
+ { variant: "outline", color: "amber", className: "bg-transparent text-category-amber-text border-category-amber-border" },
86
+ { variant: "outline", color: "slate", className: "bg-transparent text-category-slate-text border-category-slate-border" },
87
+ { variant: "outline", color: "indigo", className: "bg-transparent text-category-indigo-text border-category-indigo-border" },
88
+ { variant: "outline", color: "cyan", className: "bg-transparent text-category-cyan-text border-category-cyan-border" },
89
+ { variant: "outline", color: "orange", className: "bg-transparent text-category-orange-text border-category-orange-border" },
90
+ { variant: "outline", color: "emerald", className: "bg-transparent text-category-emerald-text border-category-emerald-border" }
91
+ ],
92
+ defaultVariants: {
93
+ variant: "subtle",
94
+ color: "default",
95
+ size: "md"
99
96
  }
100
- ), v = g.forwardRef(
101
- ({ className: t, variant: a, color: o, size: s, dot: n, onDismiss: e, children: c, ...l }, i) => /* @__PURE__ */ d("span", { ref: i, className: m(u({ variant: a, color: o, size: s }), t), ...l, children: [
102
- n && /* @__PURE__ */ r(
103
- "span",
104
- {
105
- className: "h-ds-02b w-ds-02b rounded-ds-full bg-current opacity-[0.7] shrink-0",
106
- "aria-hidden": "true"
107
- }
108
- ),
109
- c,
110
- e && /* @__PURE__ */ r(
111
- "button",
112
- {
113
- type: "button",
114
- onClick: e,
115
- 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",
116
- "aria-label": "Remove",
117
- children: /* @__PURE__ */ r(b, { className: "h-ico-sm w-ico-sm" })
118
- }
119
- )
120
- ] })
121
- );
97
+ }), v = g.forwardRef(({ className: t, variant: a, color: o, size: s, dot: n, onDismiss: e, children: c, ...l }, i) => d("span", { ref: i, className: m(u({ variant: a, color: o, size: s }), t), ...l, children: [n && r("span", { className: "h-ds-02b w-ds-02b rounded-ds-full bg-current opacity-[0.7] shrink-0", "aria-hidden": "true" }), c, e && r("button", { type: "button", onClick: e, 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", "aria-label": "Remove", children: r(b, { className: "h-ico-sm w-ico-sm" }) })] }));
122
98
  v.displayName = "Badge";
123
99
  export {
124
100
  v as Badge,
@@ -6,35 +6,20 @@ const l = o.createContext({});
6
6
  function h() {
7
7
  return o.useContext(l);
8
8
  }
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
- "div",
14
- {
15
- ref: s,
16
- role: "group",
17
- className: a(
18
- "inline-flex",
19
- i === "horizontal" ? [
20
- "flex-row",
21
- "[&>*:not(:first-child)]:rounded-l-none",
22
- "[&>*:not(:last-child)]:rounded-r-none",
23
- "[&>*:not(:first-child)]:-ml-px"
24
- ] : [
25
- "flex-col",
26
- "[&>*:not(:first-child)]:rounded-t-none",
27
- "[&>*:not(:last-child)]:rounded-b-none",
28
- "[&>*:not(:first-child)]:-mt-px"
29
- ],
30
- u
31
- ),
32
- ...c,
33
- children: d
34
- }
35
- ) });
36
- }
37
- );
9
+ const p = o.forwardRef(({ className: i, variant: t, color: n, size: e, orientation: u = "horizontal", children: d, ...c }, s) => {
10
+ const f = o.useMemo(() => ({ variant: t, color: n, size: e }), [t, n, e]);
11
+ return r(l.Provider, { value: f, children: r("div", { ref: s, role: "group", className: a("inline-flex", u === "horizontal" ? [
12
+ "flex-row",
13
+ "[&>*:not(:first-child)]:rounded-l-none",
14
+ "[&>*:not(:last-child)]:rounded-r-none",
15
+ "[&>*:not(:first-child)]:-ml-px"
16
+ ] : [
17
+ "flex-col",
18
+ "[&>*:not(:first-child)]:rounded-t-none",
19
+ "[&>*:not(:last-child)]:rounded-b-none",
20
+ "[&>*:not(:first-child)]:-mt-px"
21
+ ], i), ...c, children: d }) });
22
+ });
38
23
  p.displayName = "ButtonGroup";
39
24
  export {
40
25
  p as ButtonGroup,