@goliapkg/gds 0.9.4 → 0.9.6

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 (96) hide show
  1. package/dist/avatar-By0U5Vts.js +74 -0
  2. package/dist/avatar-By0U5Vts.js.map +1 -0
  3. package/dist/badge-DTJq6AXr.js +59 -0
  4. package/dist/badge-DTJq6AXr.js.map +1 -0
  5. package/dist/button-avu-rQU4.js +99 -0
  6. package/dist/button-avu-rQU4.js.map +1 -0
  7. package/dist/dom-17XgfxMq.js +20 -0
  8. package/dist/dom-17XgfxMq.js.map +1 -0
  9. package/dist/gesture-BCGijGek.js +104 -0
  10. package/dist/gesture-BCGijGek.js.map +1 -0
  11. package/dist/gesture-system-v-bjvnCe.js +56 -0
  12. package/dist/gesture-system-v-bjvnCe.js.map +1 -0
  13. package/dist/glass-CQTlX7IO.js +1702 -0
  14. package/dist/glass-CQTlX7IO.js.map +1 -0
  15. package/dist/highlight-BAGZc-4h.js +28 -0
  16. package/dist/highlight-BAGZc-4h.js.map +1 -0
  17. package/dist/hooks-BE-_EmDI.js +87 -0
  18. package/dist/hooks-BE-_EmDI.js.map +1 -0
  19. package/dist/icon-button-YatlVZnz.js +44 -0
  20. package/dist/icon-button-YatlVZnz.js.map +1 -0
  21. package/dist/index.d.ts +8 -2
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +32 -18495
  24. package/dist/l0-tokens/deps.d.ts +5 -0
  25. package/dist/l0-tokens/deps.d.ts.map +1 -1
  26. package/dist/l0-tokens/index.js +4 -0
  27. package/dist/l0-tokens-DZkyVlac.js +296 -0
  28. package/dist/l0-tokens-DZkyVlac.js.map +1 -0
  29. package/dist/l1-systems/index.js +2 -0
  30. package/dist/l2-primitives/index.js +11 -0
  31. package/dist/l2-primitives/screen-overlay.d.ts.map +1 -1
  32. package/dist/l2-primitives/truncate.d.ts +2 -1
  33. package/dist/l2-primitives/truncate.d.ts.map +1 -1
  34. package/dist/l2-primitives-CqrezrJ4.js +482 -0
  35. package/dist/l2-primitives-CqrezrJ4.js.map +1 -0
  36. package/dist/l3-atoms/index.js +6 -0
  37. package/dist/l3-atoms/keyboard-shortcut.d.ts +1 -1
  38. package/dist/l3-atoms/keyboard-shortcut.d.ts.map +1 -1
  39. package/dist/l3-atoms/sparkle.d.ts +1 -1
  40. package/dist/l3-atoms/sparkle.d.ts.map +1 -1
  41. package/dist/l3-atoms-CsN9IA9J.js +1794 -0
  42. package/dist/l3-atoms-CsN9IA9J.js.map +1 -0
  43. package/dist/l4-molecules/dialog.d.ts.map +1 -1
  44. package/dist/l4-molecules/index.js +4 -0
  45. package/dist/l4-molecules-DCc074MJ.js +4048 -0
  46. package/dist/l4-molecules-DCc074MJ.js.map +1 -0
  47. package/dist/l5-organisms/command-palette.d.ts.map +1 -1
  48. package/dist/l5-organisms/confetti.d.ts.map +1 -1
  49. package/dist/l5-organisms/cookie-banner.d.ts.map +1 -1
  50. package/dist/l5-organisms/image-preview.d.ts.map +1 -1
  51. package/dist/l5-organisms/index.js +2 -0
  52. package/dist/l5-organisms/notification-toast.d.ts.map +1 -1
  53. package/dist/l5-organisms-8KB_8a-H.js +3798 -0
  54. package/dist/l5-organisms-8KB_8a-H.js.map +1 -0
  55. package/dist/l6-charts/candlestick-chart.d.ts.map +1 -1
  56. package/dist/l6-charts/index.js +2 -0
  57. package/dist/l6-charts-DYnr5B9X.js +1743 -0
  58. package/dist/l6-charts-DYnr5B9X.js.map +1 -0
  59. package/dist/l7-patterns/index.js +2 -0
  60. package/dist/l7-patterns-DZXveS4Y.js +1826 -0
  61. package/dist/l7-patterns-DZXveS4Y.js.map +1 -0
  62. package/dist/loading-dots-fB4X_Zh0.js +24 -0
  63. package/dist/loading-dots-fB4X_Zh0.js.map +1 -0
  64. package/dist/motion-DUPegem-.js +22 -0
  65. package/dist/motion-DUPegem-.js.map +1 -0
  66. package/dist/portal-Bbl6F_Wj.js +9 -0
  67. package/dist/portal-Bbl6F_Wj.js.map +1 -0
  68. package/dist/progress-wAKN3Czz.js +44 -0
  69. package/dist/progress-wAKN3Czz.js.map +1 -0
  70. package/dist/resize-handle-CktEYqwi.js +77 -0
  71. package/dist/resize-handle-CktEYqwi.js.map +1 -0
  72. package/dist/scales-C80FTPsL.js +1299 -0
  73. package/dist/scales-C80FTPsL.js.map +1 -0
  74. package/dist/separator-Dqs23A9D.js +65 -0
  75. package/dist/separator-Dqs23A9D.js.map +1 -0
  76. package/dist/skeleton-C9FFZSYN.js +43 -0
  77. package/dist/skeleton-C9FFZSYN.js.map +1 -0
  78. package/dist/spinner-D8Ti-TFe.js +101 -0
  79. package/dist/spinner-D8Ti-TFe.js.map +1 -0
  80. package/dist/stepper-DhpGORX8.js +140 -0
  81. package/dist/stepper-DhpGORX8.js.map +1 -0
  82. package/dist/switch-DC85Os9r.js +130 -0
  83. package/dist/switch-DC85Os9r.js.map +1 -0
  84. package/dist/textarea-BJCl_aH2.js +40 -0
  85. package/dist/textarea-BJCl_aH2.js.map +1 -0
  86. package/dist/toast-DN5xANLM.js +442 -0
  87. package/dist/toast-DN5xANLM.js.map +1 -0
  88. package/dist/use-theme-C0aWVw70.js +203 -0
  89. package/dist/use-theme-C0aWVw70.js.map +1 -0
  90. package/dist/utils/index.d.ts +1 -0
  91. package/dist/utils/index.d.ts.map +1 -1
  92. package/dist/utils/index.js +7 -0
  93. package/dist/utils/portal.d.ts +3 -0
  94. package/dist/utils/portal.d.ts.map +1 -0
  95. package/package.json +37 -1
  96. package/dist/index.js.map +0 -1
@@ -0,0 +1,130 @@
1
+ import { r as e, t } from "./glass-CQTlX7IO.js";
2
+ import { r as n } from "./button-avu-rQU4.js";
3
+ import { r } from "./motion-DUPegem-.js";
4
+ import { forwardRef as i, useMemo as a } from "react";
5
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
+ //#region src/l3-atoms/chip.tsx
7
+ var c = n("inline-flex select-none items-center gds-gap-xs gds-radius-badge gds-pad-x-sm gds-pad-y-sm gds-text-label font-medium", {
8
+ defaultVariants: { variant: "default" },
9
+ variants: { variant: {
10
+ accent: "bg-accent/10 text-accent",
11
+ danger: "bg-danger/10 text-danger",
12
+ default: "bg-fg-muted/10 text-fg-muted",
13
+ success: "bg-success/10 text-success",
14
+ warning: "bg-warning/10 text-warning"
15
+ } }
16
+ });
17
+ function l() {
18
+ return /* @__PURE__ */ o("svg", {
19
+ className: "h-3 w-3",
20
+ fill: "none",
21
+ stroke: "currentColor",
22
+ strokeWidth: 2,
23
+ viewBox: "0 0 24 24",
24
+ children: /* @__PURE__ */ o("path", {
25
+ d: "M18 6L6 18M6 6l12 12",
26
+ strokeLinecap: "round",
27
+ strokeLinejoin: "round"
28
+ })
29
+ });
30
+ }
31
+ var u = i(function({ className: n, glass: r, icon: i, label: a, onRemove: u, removeIcon: d, variant: f, ...p }, m) {
32
+ return /* @__PURE__ */ s("span", {
33
+ className: e(c({ variant: f }), t(r), r === !0 && "border border-white/10 bg-white/5", n),
34
+ "data-component": "chip",
35
+ "data-variant": f ?? "default",
36
+ ref: m,
37
+ ...p,
38
+ children: [
39
+ i !== void 0 && /* @__PURE__ */ o("span", {
40
+ className: "gds-icon-child-sm",
41
+ children: i
42
+ }),
43
+ a,
44
+ u !== void 0 && /* @__PURE__ */ o("button", {
45
+ className: e("ml-0.5 gds-radius-badge p-0.5 transition-colors hover:bg-current/10", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg"),
46
+ onClick: u,
47
+ tabIndex: -1,
48
+ type: "button",
49
+ children: d ?? /* @__PURE__ */ o(l, {})
50
+ })
51
+ ]
52
+ });
53
+ }), d = i(function({ className: t, disabled: n = !1, max: i = 100, min: c = 0, onChange: l, showValue: u = !1, step: d = 1, value: f, ...p }, m) {
54
+ let h = a(() => {
55
+ let e = i - c;
56
+ return e <= 0 ? 0 : (f - c) / e * 100;
57
+ }, [
58
+ f,
59
+ c,
60
+ i
61
+ ]);
62
+ return /* @__PURE__ */ s("div", {
63
+ className: e("relative flex items-center select-none", n && "cursor-not-allowed opacity-50", t),
64
+ "data-component": "range-slider",
65
+ "data-state": n ? "disabled" : "enabled",
66
+ children: [u && /* @__PURE__ */ o("span", {
67
+ className: "absolute -top-5 text-[10px] font-medium text-fg-muted transition-[left]",
68
+ style: {
69
+ left: `${h}%`,
70
+ transform: "translateX(-50%)"
71
+ },
72
+ children: f
73
+ }), /* @__PURE__ */ o("input", {
74
+ className: e("gds-range-slider h-1.5 w-full cursor-pointer appearance-none rounded-full bg-bg-tertiary", r, n && "pointer-events-none"),
75
+ disabled: n,
76
+ max: i,
77
+ min: c,
78
+ onChange: (e) => l(Number(e.target.value)),
79
+ ref: m,
80
+ step: d,
81
+ style: { background: `linear-gradient(to right, var(--gds-accent) 0%, var(--gds-accent) ${h}%, var(--gds-bg-tertiary) ${h}%, var(--gds-bg-tertiary) 100%)` },
82
+ type: "range",
83
+ value: f,
84
+ ...p
85
+ })]
86
+ });
87
+ }), f = n("relative inline-flex shrink-0 cursor-pointer select-none items-center gds-radius-badge transition-colors " + r, {
88
+ defaultVariants: { size: "default" },
89
+ variants: { size: {
90
+ default: "h-5 w-9",
91
+ sm: "h-4 w-7"
92
+ } }
93
+ }), p = {
94
+ default: "gds-icon",
95
+ sm: "h-3 w-3"
96
+ }, m = {
97
+ default: {
98
+ off: "translate-x-0.5",
99
+ on: "translate-x-4"
100
+ },
101
+ sm: {
102
+ off: "translate-x-0.5",
103
+ on: "translate-x-3.5"
104
+ }
105
+ }, h = i(function({ checked: t = !1, className: n, disabled: r = !1, label: i, onChange: a, size: c = "default", ...l }, u) {
106
+ let d = c ?? "default";
107
+ return /* @__PURE__ */ s("label", {
108
+ className: e("inline-flex select-none items-center gds-gap-sm", r && "cursor-not-allowed opacity-50", n),
109
+ "data-component": "switch",
110
+ "data-state": t ? "on" : "off",
111
+ children: [/* @__PURE__ */ o("button", {
112
+ "aria-checked": t,
113
+ className: e(f({ size: c }), t ? "bg-accent" : "bg-bg-tertiary", r && "cursor-not-allowed"),
114
+ disabled: r,
115
+ onClick: () => a?.(!t),
116
+ ref: u,
117
+ role: "switch",
118
+ type: "button",
119
+ ...l,
120
+ children: /* @__PURE__ */ o("span", { className: e("gds-radius-badge bg-fg gds-shadow-sm transition-transform", p[d], t ? m[d].on : m[d].off) })
121
+ }), i !== void 0 && /* @__PURE__ */ o("span", {
122
+ className: "gds-text-body text-fg",
123
+ children: i
124
+ })]
125
+ });
126
+ });
127
+ //#endregion
128
+ export { c as a, u as i, f as n, d as r, h as t };
129
+
130
+ //# sourceMappingURL=switch-DC85Os9r.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch-DC85Os9r.js","names":[],"sources":["../src/l3-atoms/chip.tsx","../src/l3-atoms/range-slider.tsx","../src/l3-atoms/switch.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority'\nimport type { ReactNode } from 'react'\nimport { forwardRef } from 'react'\n\nimport { focusCls } from '../utils/a11y'\nimport { cx } from '../utils/cx'\nimport { glassClass } from '../utils/glass'\nimport type { VariantProps } from '../utils/types'\n\nconst chipVariants = cva(\n 'inline-flex select-none items-center gds-gap-xs gds-radius-badge gds-pad-x-sm gds-pad-y-sm gds-text-label font-medium',\n {\n defaultVariants: { variant: 'default' },\n variants: {\n variant: {\n accent: 'bg-accent/10 text-accent',\n danger: 'bg-danger/10 text-danger',\n default: 'bg-fg-muted/10 text-fg-muted',\n success: 'bg-success/10 text-success',\n warning: 'bg-warning/10 text-warning',\n },\n },\n },\n)\n\ntype ChipProps = React.HTMLAttributes<HTMLSpanElement> &\n VariantProps<typeof chipVariants> & {\n glass?: boolean\n icon?: ReactNode\n label: string\n onRemove?: () => void\n removeIcon?: ReactNode\n }\n\n// default X SVG\nfunction DefaultRemoveIcon() {\n return (\n <svg className=\"h-3 w-3\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} viewBox=\"0 0 24 24\">\n <path d=\"M18 6L6 18M6 6l12 12\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n )\n}\n\nexport const Chip = forwardRef<HTMLSpanElement, ChipProps>(\n function Chip(\n { className, glass, icon, label, onRemove, removeIcon, variant, ...props },\n ref,\n ) {\n return (\n <span\n className={cx(\n chipVariants({ variant }),\n glassClass(glass),\n glass === true && 'border border-white/10 bg-white/5',\n className,\n )}\n data-component=\"chip\"\n data-variant={variant ?? 'default'}\n ref={ref}\n {...props}\n >\n {icon !== undefined && (\n <span className=\"gds-icon-child-sm\">{icon}</span>\n )}\n {label}\n {onRemove !== undefined && (\n <button\n className={cx(\n 'ml-0.5 gds-radius-badge p-0.5 transition-colors hover:bg-current/10',\n focusCls,\n )}\n onClick={onRemove}\n tabIndex={-1}\n type=\"button\"\n >\n {removeIcon ?? <DefaultRemoveIcon />}\n </button>\n )}\n </span>\n )\n },\n)\n\nexport { chipVariants }\nexport type { ChipProps }\n","// range-slider — styled native range input with optional value label\nimport { forwardRef, useMemo } from 'react'\n\nimport { focusCls } from '../utils/a11y'\nimport { cx } from '../utils/cx'\n\ntype RangeSliderProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'type' | 'value'> & {\n disabled?: boolean\n max?: number\n min?: number\n onChange: (value: number) => void\n showValue?: boolean\n step?: number\n value: number\n}\n\nexport const RangeSlider = forwardRef<HTMLInputElement, RangeSliderProps>(\n function RangeSlider(\n {\n className,\n disabled = false,\n max = 100,\n min = 0,\n onChange,\n showValue = false,\n step = 1,\n value,\n ...props\n },\n ref,\n ) {\n const percent = useMemo(() => {\n const range = max - min\n if (range <= 0) return 0\n return ((value - min) / range) * 100\n }, [value, min, max])\n\n return (\n <div\n className={cx(\n 'relative flex items-center select-none',\n disabled && 'cursor-not-allowed opacity-50',\n className,\n )}\n data-component=\"range-slider\"\n data-state={disabled ? 'disabled' : 'enabled'}\n >\n {showValue && (\n <span\n className=\"absolute -top-5 text-[10px] font-medium text-fg-muted transition-[left]\"\n style={{ left: `${percent}%`, transform: 'translateX(-50%)' }}\n >\n {value}\n </span>\n )}\n <input\n className={cx(\n 'gds-range-slider h-1.5 w-full cursor-pointer appearance-none rounded-full bg-bg-tertiary',\n focusCls,\n disabled && 'pointer-events-none',\n )}\n disabled={disabled}\n max={max}\n min={min}\n onChange={(e) => onChange(Number(e.target.value))}\n ref={ref}\n step={step}\n style={{\n background: `linear-gradient(to right, var(--gds-accent) 0%, var(--gds-accent) ${percent}%, var(--gds-bg-tertiary) ${percent}%, var(--gds-bg-tertiary) 100%)`,\n }}\n type=\"range\"\n value={value}\n {...props}\n />\n </div>\n )\n },\n)\n\nexport type { RangeSliderProps }\n","import { cva } from 'class-variance-authority'\nimport { forwardRef } from 'react'\n\nimport { focusCls } from '../utils/a11y'\nimport { cx } from '../utils/cx'\nimport type { VariantProps } from '../utils/types'\n\nconst switchVariants = cva(\n 'relative inline-flex shrink-0 cursor-pointer select-none items-center gds-radius-badge transition-colors ' +\n focusCls,\n {\n defaultVariants: { size: 'default' },\n variants: {\n size: {\n default: 'h-5 w-9',\n sm: 'h-4 w-7',\n },\n },\n },\n)\n\nconst thumbSizeMap = {\n default: 'gds-icon',\n sm: 'h-3 w-3',\n}\n\nconst thumbTranslateMap = {\n default: { off: 'translate-x-0.5', on: 'translate-x-4' },\n sm: { off: 'translate-x-0.5', on: 'translate-x-3.5' },\n}\n\ntype SwitchProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> &\n VariantProps<typeof switchVariants> & {\n checked?: boolean\n label?: string\n onChange?: (checked: boolean) => void\n }\n\nexport const Switch = forwardRef<HTMLButtonElement, SwitchProps>(\n function Switch(\n { checked = false, className, disabled = false, label, onChange, size = 'default', ...props },\n ref,\n ) {\n const sizeKey = size ?? 'default'\n\n return (\n <label\n className={cx(\n 'inline-flex select-none items-center gds-gap-sm',\n disabled && 'cursor-not-allowed opacity-50',\n className,\n )}\n data-component=\"switch\"\n data-state={checked ? 'on' : 'off'}\n >\n <button\n aria-checked={checked}\n className={cx(\n switchVariants({ size }),\n checked ? 'bg-accent' : 'bg-bg-tertiary',\n disabled && 'cursor-not-allowed',\n )}\n disabled={disabled}\n onClick={() => onChange?.(!checked)}\n ref={ref}\n role=\"switch\"\n type=\"button\"\n {...props}\n >\n <span\n className={cx(\n 'gds-radius-badge bg-fg gds-shadow-sm transition-transform',\n thumbSizeMap[sizeKey],\n checked ? thumbTranslateMap[sizeKey].on : thumbTranslateMap[sizeKey].off,\n )}\n />\n </button>\n {label !== undefined && (\n <span className=\"gds-text-body text-fg\">{label}</span>\n )}\n </label>\n )\n },\n)\n\nexport { switchVariants }\nexport type { SwitchProps }\n"],"mappings":";;;;;;AASA,IAAM,IAAe,EACnB,yHACA;CACE,iBAAiB,EAAE,SAAS,WAAW;CACvC,UAAU,EACR,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,SAAS;EACT,SAAS;EACT,SAAS;EACV,EACF;CACF,CACF;AAYD,SAAS,IAAoB;AAC3B,QACE,kBAAC,OAAD;EAAK,WAAU;EAAU,MAAK;EAAO,QAAO;EAAe,aAAa;EAAG,SAAQ;YACjF,kBAAC,QAAD;GAAM,GAAE;GAAuB,eAAc;GAAQ,gBAAe;GAAU,CAAA;EAC1E,CAAA;;AAIV,IAAa,IAAO,EAClB,SACE,EAAE,cAAW,UAAO,SAAM,UAAO,aAAU,eAAY,YAAS,GAAG,KACnE,GACA;AACA,QACE,kBAAC,QAAD;EACE,WAAW,EACT,EAAa,EAAE,YAAS,CAAC,EACzB,EAAW,EAAM,EACjB,MAAU,MAAQ,qCAClB,EACD;EACD,kBAAe;EACf,gBAAc,KAAW;EACpB;EACL,GAAI;YAVN;GAYG,MAAS,KAAA,KACR,kBAAC,QAAD;IAAM,WAAU;cAAqB;IAAY,CAAA;GAElD;GACA,MAAa,KAAA,KACZ,kBAAC,UAAD;IACE,WAAW,EACT,uEAAA,qIAED;IACD,SAAS;IACT,UAAU;IACV,MAAK;cAEJ,KAAc,kBAAC,GAAD,EAAqB,CAAA;IAC7B,CAAA;GAEN;;EAGZ,ECjEY,IAAc,EACzB,SACE,EACE,cACA,cAAW,IACX,SAAM,KACN,SAAM,GACN,aACA,eAAY,IACZ,UAAO,GACP,UACA,GAAG,KAEL,GACA;CACA,IAAM,IAAU,QAAc;EAC5B,IAAM,IAAQ,IAAM;AAEpB,SADI,KAAS,IAAU,KACd,IAAQ,KAAO,IAAS;IAChC;EAAC;EAAO;EAAK;EAAI,CAAC;AAErB,QACE,kBAAC,OAAD;EACE,WAAW,EACT,0CACA,KAAY,iCACZ,EACD;EACD,kBAAe;EACf,cAAY,IAAW,aAAa;YAPtC,CASG,KACC,kBAAC,QAAD;GACE,WAAU;GACV,OAAO;IAAE,MAAM,GAAG,EAAQ;IAAI,WAAW;IAAoB;aAE5D;GACI,CAAA,EAET,kBAAC,SAAD;GACE,WAAW,EACT,4FACA,GACA,KAAY,sBACb;GACS;GACL;GACA;GACL,WAAW,MAAM,EAAS,OAAO,EAAE,OAAO,MAAM,CAAC;GAC5C;GACC;GACN,OAAO,EACL,YAAY,qEAAqE,EAAQ,4BAA4B,EAAQ,kCAC9H;GACD,MAAK;GACE;GACP,GAAI;GACJ,CAAA,CACE;;EAGX,ECtEK,IAAiB,EACrB,8GACE,GACF;CACE,iBAAiB,EAAE,MAAM,WAAW;CACpC,UAAU,EACR,MAAM;EACJ,SAAS;EACT,IAAI;EACL,EACF;CACF,CACF,EAEK,IAAe;CACnB,SAAS;CACT,IAAI;CACL,EAEK,IAAoB;CACxB,SAAS;EAAE,KAAK;EAAmB,IAAI;EAAiB;CACxD,IAAI;EAAE,KAAK;EAAmB,IAAI;EAAmB;CACtD,EASY,IAAS,EACpB,SACE,EAAE,aAAU,IAAO,cAAW,cAAW,IAAO,UAAO,aAAU,UAAO,WAAW,GAAG,KACtF,GACA;CACA,IAAM,IAAU,KAAQ;AAExB,QACE,kBAAC,SAAD;EACE,WAAW,EACT,mDACA,KAAY,iCACZ,EACD;EACD,kBAAe;EACf,cAAY,IAAU,OAAO;YAP/B,CASE,kBAAC,UAAD;GACE,gBAAc;GACd,WAAW,EACT,EAAe,EAAE,SAAM,CAAC,EACxB,IAAU,cAAc,kBACxB,KAAY,qBACb;GACS;GACV,eAAe,IAAW,CAAC,EAAQ;GAC9B;GACL,MAAK;GACL,MAAK;GACL,GAAI;aAEJ,kBAAC,QAAD,EACE,WAAW,EACT,6DACA,EAAa,IACb,IAAU,EAAkB,GAAS,KAAK,EAAkB,GAAS,IACtE,EACD,CAAA;GACK,CAAA,EACR,MAAU,KAAA,KACT,kBAAC,QAAD;GAAM,WAAU;aAAyB;GAAa,CAAA,CAElD;;EAGb"}
@@ -0,0 +1,40 @@
1
+ import { r as e, t } from "./glass-CQTlX7IO.js";
2
+ import { r as n } from "./button-avu-rQU4.js";
3
+ import { r } from "./motion-DUPegem-.js";
4
+ import { forwardRef as i } from "react";
5
+ import { jsx as a } from "react/jsx-runtime";
6
+ //#region src/l2-primitives/kbd.tsx
7
+ var o = i(function({ children: n, className: r, glass: i, ...o }, s) {
8
+ return /* @__PURE__ */ a("kbd", {
9
+ className: e("inline-flex select-none items-center gds-radius-button border border-border/60 bg-bg-tertiary gds-pad-x-sm gds-pad-y-sm font-mono gds-text-label text-fg-muted", t(i), i === !0 && "border-white/10 bg-bg/60", r),
10
+ "data-component": "kbd",
11
+ ref: s,
12
+ ...o,
13
+ children: n
14
+ });
15
+ }), s = n("w-full gds-radius-input border bg-bg gds-pad-x gds-pad-y text-fg gds-text-body placeholder:text-fg-muted/50 outline-none disabled:cursor-not-allowed disabled:opacity-50 " + r, {
16
+ compoundVariants: [{
17
+ error: !0,
18
+ className: "focus-visible:ring-danger"
19
+ }],
20
+ defaultVariants: { error: !1 },
21
+ variants: { error: {
22
+ false: "border-border hover:border-border-strong",
23
+ true: "border-danger"
24
+ } }
25
+ }), c = {
26
+ both: "resize",
27
+ none: "resize-none",
28
+ vertical: "resize-y"
29
+ }, l = i(function({ autoGrow: n = !1, className: r, error: i, glass: o, resize: l = "vertical", ...u }, d) {
30
+ return /* @__PURE__ */ a("textarea", {
31
+ className: e(s({ error: i }), c[l], n && "[field-sizing:content] overflow-hidden", t(o), o === !0 && "border-white/10 bg-bg/60", r),
32
+ "data-component": "textarea",
33
+ ref: d,
34
+ ...u
35
+ });
36
+ });
37
+ //#endregion
38
+ export { s as n, o as r, l as t };
39
+
40
+ //# sourceMappingURL=textarea-BJCl_aH2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea-BJCl_aH2.js","names":[],"sources":["../src/l2-primitives/kbd.tsx","../src/l2-primitives/textarea.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { forwardRef } from 'react'\n\nimport { cx } from '../utils/cx'\nimport { glassClass } from '../utils/glass'\n\ntype KbdProps = React.HTMLAttributes<HTMLElement> & {\n children: ReactNode\n glass?: boolean\n}\n\nexport const Kbd = forwardRef<HTMLElement, KbdProps>(\n function Kbd({ children, className, glass, ...props }, ref) {\n return (\n <kbd\n className={cx(\n 'inline-flex select-none items-center gds-radius-button border border-border/60 bg-bg-tertiary gds-pad-x-sm gds-pad-y-sm font-mono gds-text-label text-fg-muted',\n glassClass(glass),\n glass === true && 'border-white/10 bg-bg/60',\n className,\n )}\n data-component=\"kbd\"\n ref={ref}\n {...props}\n >\n {children}\n </kbd>\n )\n },\n)\n\nexport type { KbdProps }\n","import { cva } from 'class-variance-authority'\nimport { forwardRef } from 'react'\n\nimport { focusCls } from '../utils/a11y'\nimport { cx } from '../utils/cx'\nimport { glassClass } from '../utils/glass'\nimport type { VariantProps } from '../utils/types'\n\ntype TextareaResize = 'both' | 'none' | 'vertical'\n\nconst textareaVariants = cva(\n 'w-full gds-radius-input border bg-bg gds-pad-x gds-pad-y text-fg gds-text-body placeholder:text-fg-muted/50 outline-none disabled:cursor-not-allowed disabled:opacity-50 ' +\n focusCls,\n {\n compoundVariants: [\n {\n error: true,\n className: 'focus-visible:ring-danger',\n },\n ],\n defaultVariants: {\n error: false,\n },\n variants: {\n error: {\n false: 'border-border hover:border-border-strong',\n true: 'border-danger',\n },\n },\n },\n)\n\nconst resizeClasses: Record<TextareaResize, string> = {\n both: 'resize',\n none: 'resize-none',\n vertical: 'resize-y',\n}\n\ntype TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> &\n VariantProps<typeof textareaVariants> & {\n autoGrow?: boolean\n glass?: boolean\n resize?: TextareaResize\n }\n\nexport const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(\n function Textarea(\n {\n autoGrow = false,\n className,\n error,\n glass,\n resize = 'vertical',\n ...props\n },\n ref,\n ) {\n return (\n <textarea\n className={cx(\n textareaVariants({ error }),\n resizeClasses[resize],\n autoGrow && '[field-sizing:content] overflow-hidden',\n glassClass(glass),\n glass === true && 'border-white/10 bg-bg/60',\n className,\n )}\n data-component=\"textarea\"\n ref={ref}\n {...props}\n />\n )\n },\n)\n\nexport { textareaVariants }\nexport type { TextareaProps, TextareaResize }\n"],"mappings":";;;;;;AAWA,IAAa,IAAM,EACjB,SAAa,EAAE,aAAU,cAAW,UAAO,GAAG,KAAS,GAAK;AAC1D,QACE,kBAAC,OAAD;EACE,WAAW,EACT,kKACA,EAAW,EAAM,EACjB,MAAU,MAAQ,4BAClB,EACD;EACD,kBAAe;EACV;EACL,GAAI;EAEH;EACG,CAAA;EAGX,ECnBK,IAAmB,EACvB,8KACE,GACF;CACE,kBAAkB,CAChB;EACE,OAAO;EACP,WAAW;EACZ,CACF;CACD,iBAAiB,EACf,OAAO,IACR;CACD,UAAU,EACR,OAAO;EACL,OAAO;EACP,MAAM;EACP,EACF;CACF,CACF,EAEK,IAAgD;CACpD,MAAM;CACN,MAAM;CACN,UAAU;CACX,EASY,IAAW,EACtB,SACE,EACE,cAAW,IACX,cACA,UACA,UACA,YAAS,YACT,GAAG,KAEL,GACA;AACA,QACE,kBAAC,YAAD;EACE,WAAW,EACT,EAAiB,EAAE,UAAO,CAAC,EAC3B,EAAc,IACd,KAAY,0CACZ,EAAW,EAAM,EACjB,MAAU,MAAQ,4BAClB,EACD;EACD,kBAAe;EACV;EACL,GAAI;EACJ,CAAA;EAGP"}
@@ -0,0 +1,442 @@
1
+ import { r as e, t } from "./glass-CQTlX7IO.js";
2
+ import { r as n } from "./motion-DUPegem-.js";
3
+ import { forwardRef as r, useCallback as i, useState as a } from "react";
4
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
+ //#region src/l4-molecules/audit-entry.tsx
6
+ var c = {
7
+ default: "text-fg",
8
+ success: "text-success",
9
+ warning: "text-warning",
10
+ danger: "text-danger"
11
+ }, l = r(function({ action: t, className: n, target: r, timestamp: i, user: a, variant: l = "default", ...u }, d) {
12
+ return /* @__PURE__ */ s("div", {
13
+ className: e("flex items-center justify-between gds-gap gds-text", n),
14
+ "data-component": "audit-entry",
15
+ ref: d,
16
+ ...u,
17
+ children: [/* @__PURE__ */ o("span", {
18
+ className: "shrink-0 text-xs text-fg-muted",
19
+ children: i
20
+ }), /* @__PURE__ */ s("span", {
21
+ className: "flex-1 truncate",
22
+ children: [
23
+ /* @__PURE__ */ o("span", {
24
+ className: "font-medium text-fg",
25
+ children: a
26
+ }),
27
+ " ",
28
+ /* @__PURE__ */ o("span", {
29
+ className: c[l],
30
+ children: t
31
+ }),
32
+ r !== void 0 && /* @__PURE__ */ s("span", {
33
+ className: "text-fg-muted",
34
+ children: [" ", r]
35
+ })
36
+ ]
37
+ })]
38
+ });
39
+ }), u = /* @__PURE__ */ o("svg", {
40
+ width: "14",
41
+ height: "14",
42
+ viewBox: "0 0 14 14",
43
+ fill: "none",
44
+ stroke: "currentColor",
45
+ strokeWidth: "2",
46
+ strokeLinecap: "round",
47
+ strokeLinejoin: "round",
48
+ children: /* @__PURE__ */ o("path", { d: "M2.5 7.5l3 3 6-6.5" })
49
+ }), d = /* @__PURE__ */ o("svg", {
50
+ width: "14",
51
+ height: "14",
52
+ viewBox: "0 0 14 14",
53
+ fill: "none",
54
+ stroke: "currentColor",
55
+ strokeWidth: "2",
56
+ strokeLinecap: "round",
57
+ children: /* @__PURE__ */ o("path", { d: "M3 3l8 8M11 3l-8 8" })
58
+ }), f = /* @__PURE__ */ o("svg", {
59
+ width: "12",
60
+ height: "12",
61
+ viewBox: "0 0 12 12",
62
+ fill: "none",
63
+ stroke: "currentColor",
64
+ strokeWidth: "1.5",
65
+ strokeLinecap: "round",
66
+ strokeLinejoin: "round",
67
+ children: /* @__PURE__ */ o("path", { d: "M7 2l3 3-7 7H0V9z" })
68
+ }), p = r(function({ value: t, onSave: r, onCancel: c, validate: l, placeholder: p = "Click to edit", disabled: m, className: h }, g) {
69
+ let [_, v] = a(!1), [y, b] = a(t), [x, S] = a(null), C = i(() => {
70
+ m !== !0 && (b(t), S(null), v(!0));
71
+ }, [m, t]), w = i(() => {
72
+ if (l !== void 0) {
73
+ let e = l(y);
74
+ if (e !== null) {
75
+ S(e);
76
+ return;
77
+ }
78
+ }
79
+ v(!1), S(null), r(y);
80
+ }, [
81
+ y,
82
+ r,
83
+ l
84
+ ]), T = i(() => {
85
+ v(!1), b(t), S(null), c !== void 0 && c();
86
+ }, [c, t]), E = i((e) => {
87
+ e.key === "Enter" && w(), e.key === "Escape" && T();
88
+ }, [w, T]);
89
+ if (_) return /* @__PURE__ */ s("div", {
90
+ ref: g,
91
+ className: e("inline-flex flex-col", h),
92
+ "data-component": "inline-edit",
93
+ "data-state": "editing",
94
+ children: [/* @__PURE__ */ s("div", {
95
+ className: "flex items-center gap-1",
96
+ children: [
97
+ /* @__PURE__ */ o("input", {
98
+ autoFocus: !0,
99
+ className: e("bg-transparent gds-text-body text-fg outline-none border-b border-accent/50 px-0.5", x !== null && "border-danger/50", n),
100
+ onChange: (e) => {
101
+ b(e.target.value), S(null);
102
+ },
103
+ onKeyDown: E,
104
+ type: "text",
105
+ value: y
106
+ }),
107
+ /* @__PURE__ */ o("button", {
108
+ type: "button",
109
+ onClick: w,
110
+ className: e("shrink-0 p-0.5 text-success hover:text-success/80", n),
111
+ "aria-label": "Save",
112
+ children: u
113
+ }),
114
+ /* @__PURE__ */ o("button", {
115
+ type: "button",
116
+ onClick: T,
117
+ className: e("shrink-0 p-0.5 text-fg-muted hover:text-fg", n),
118
+ "aria-label": "Cancel",
119
+ children: d
120
+ })
121
+ ]
122
+ }), x !== null && /* @__PURE__ */ o("span", {
123
+ className: "mt-0.5 text-[10px] text-danger",
124
+ children: x
125
+ })]
126
+ });
127
+ let D = t === "";
128
+ return /* @__PURE__ */ s("div", {
129
+ ref: g,
130
+ className: e("group inline-flex cursor-pointer items-center gap-1", m === !0 && "pointer-events-none opacity-50", h),
131
+ "data-component": "inline-edit",
132
+ "data-state": "display",
133
+ onClick: C,
134
+ onKeyDown: (e) => {
135
+ (e.key === "Enter" || e.key === " ") && C();
136
+ },
137
+ role: "button",
138
+ tabIndex: m === !0 ? -1 : 0,
139
+ children: [/* @__PURE__ */ o("span", {
140
+ className: e("gds-text-body", D ? "text-fg-muted" : "text-fg", n),
141
+ children: D ? p : t
142
+ }), /* @__PURE__ */ o("span", {
143
+ className: "text-fg-muted/0 transition-colors group-hover:text-fg-muted/60",
144
+ children: f
145
+ })]
146
+ });
147
+ }), m = r(function({ icon: t, title: n, description: r, trailing: i, onClick: a, active: c, disabled: l, className: u }, d) {
148
+ let f = a !== void 0 && l !== !0;
149
+ return /* @__PURE__ */ s("div", {
150
+ ref: d,
151
+ role: f ? "button" : void 0,
152
+ tabIndex: f ? 0 : void 0,
153
+ onClick: f ? a : void 0,
154
+ onKeyDown: f ? (e) => {
155
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
156
+ } : void 0,
157
+ className: e("flex items-center gap-3 gds-pad-x gds-pad-y-sm gds-text-body select-none", f && "cursor-pointer hover:bg-bg-tertiary", c === !0 && "border-l-2 border-l-accent bg-accent/5", l === !0 && "pointer-events-none opacity-50", u),
158
+ "data-component": "list-item",
159
+ "data-state": c === !0 ? "active" : void 0,
160
+ children: [
161
+ t !== void 0 && /* @__PURE__ */ o("span", {
162
+ className: "shrink-0 text-fg-muted",
163
+ children: t
164
+ }),
165
+ /* @__PURE__ */ s("div", {
166
+ className: "min-w-0 flex-1",
167
+ children: [/* @__PURE__ */ o("div", {
168
+ className: "font-medium text-fg",
169
+ children: n
170
+ }), r !== void 0 && /* @__PURE__ */ o("div", {
171
+ className: "mt-0.5 text-fg-muted gds-text-caption",
172
+ children: r
173
+ })]
174
+ }),
175
+ i !== void 0 && /* @__PURE__ */ o("span", {
176
+ className: "shrink-0",
177
+ children: i
178
+ })
179
+ ]
180
+ });
181
+ }), h = {
182
+ info: "border-l-accent",
183
+ success: "border-l-success",
184
+ warning: "border-l-warning",
185
+ danger: "border-l-danger"
186
+ }, g = {
187
+ info: "bg-accent/5",
188
+ success: "bg-success/5",
189
+ warning: "bg-warning/5",
190
+ danger: "bg-danger/5"
191
+ }, _ = {
192
+ info: "text-accent",
193
+ success: "text-success",
194
+ warning: "text-warning",
195
+ danger: "text-danger"
196
+ }, v = {
197
+ info: /* @__PURE__ */ s("svg", {
198
+ width: "16",
199
+ height: "16",
200
+ viewBox: "0 0 16 16",
201
+ fill: "none",
202
+ stroke: "currentColor",
203
+ strokeWidth: "1.5",
204
+ strokeLinecap: "round",
205
+ children: [/* @__PURE__ */ o("circle", {
206
+ cx: "8",
207
+ cy: "8",
208
+ r: "6.5"
209
+ }), /* @__PURE__ */ o("path", { d: "M8 5.5h.01M8 7.5v3" })]
210
+ }),
211
+ success: /* @__PURE__ */ s("svg", {
212
+ width: "16",
213
+ height: "16",
214
+ viewBox: "0 0 16 16",
215
+ fill: "none",
216
+ stroke: "currentColor",
217
+ strokeWidth: "1.5",
218
+ strokeLinecap: "round",
219
+ strokeLinejoin: "round",
220
+ children: [/* @__PURE__ */ o("circle", {
221
+ cx: "8",
222
+ cy: "8",
223
+ r: "6.5"
224
+ }), /* @__PURE__ */ o("path", { d: "M5.5 8l2 2 3-3.5" })]
225
+ }),
226
+ warning: /* @__PURE__ */ s("svg", {
227
+ width: "16",
228
+ height: "16",
229
+ viewBox: "0 0 16 16",
230
+ fill: "none",
231
+ stroke: "currentColor",
232
+ strokeWidth: "1.5",
233
+ strokeLinecap: "round",
234
+ children: [/* @__PURE__ */ o("path", { d: "M7.13 2.5l-5.5 10h11l-5.5-10z" }), /* @__PURE__ */ o("path", { d: "M7.63 6.5v2.5M7.63 11h.01" })]
235
+ }),
236
+ danger: /* @__PURE__ */ s("svg", {
237
+ width: "16",
238
+ height: "16",
239
+ viewBox: "0 0 16 16",
240
+ fill: "none",
241
+ stroke: "currentColor",
242
+ strokeWidth: "1.5",
243
+ strokeLinecap: "round",
244
+ children: [/* @__PURE__ */ o("circle", {
245
+ cx: "8",
246
+ cy: "8",
247
+ r: "6.5"
248
+ }), /* @__PURE__ */ o("path", { d: "M5.5 5.5l5 5M10.5 5.5l-5 5" })]
249
+ })
250
+ }, y = r(function({ title: n, description: r, variant: i = "info", action: a, onClose: c, glass: l, className: u, ...d }, f) {
251
+ let p = i ?? "info";
252
+ return /* @__PURE__ */ s("div", {
253
+ ref: f,
254
+ className: e("flex w-full items-start gds-gap gds-radius-popover border border-border border-l-2 gds-pad-x gds-pad-y", h[p], g[p], l === !0 && t(l), u),
255
+ "data-component": "notification",
256
+ "data-variant": p,
257
+ role: "alert",
258
+ ...d,
259
+ children: [
260
+ /* @__PURE__ */ o("span", {
261
+ className: e("mt-px shrink-0", _[p]),
262
+ children: v[p]
263
+ }),
264
+ /* @__PURE__ */ s("div", {
265
+ className: "min-w-0 flex-1",
266
+ children: [/* @__PURE__ */ o("p", {
267
+ className: "gds-text-body font-medium text-fg",
268
+ children: n
269
+ }), r !== void 0 && /* @__PURE__ */ o("p", {
270
+ className: "mt-0.5 gds-text-label text-fg-muted",
271
+ children: r
272
+ })]
273
+ }),
274
+ a !== void 0 && /* @__PURE__ */ o("div", {
275
+ className: "shrink-0",
276
+ children: a
277
+ }),
278
+ c !== void 0 && /* @__PURE__ */ o("button", {
279
+ type: "button",
280
+ onClick: c,
281
+ className: e("shrink-0 gds-radius-button p-0.5 text-fg-muted opacity-60 hover:opacity-100", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg"),
282
+ "aria-label": "Dismiss",
283
+ children: /* @__PURE__ */ o("svg", {
284
+ width: "12",
285
+ height: "12",
286
+ viewBox: "0 0 12 12",
287
+ fill: "none",
288
+ stroke: "currentColor",
289
+ strokeWidth: "2",
290
+ strokeLinecap: "round",
291
+ children: /* @__PURE__ */ o("path", { d: "M2 2l8 8M10 2l-8 8" })
292
+ })
293
+ })
294
+ ]
295
+ });
296
+ }), b = {
297
+ low: "bg-success/15 text-success",
298
+ medium: "bg-warning/15 text-warning",
299
+ high: "bg-danger/15 text-danger",
300
+ critical: "bg-danger text-white"
301
+ }, x = r(function({ className: t, completed: n = !1, dueDate: r, onToggle: i, priority: a, title: c, ...l }, u) {
302
+ return /* @__PURE__ */ s("div", {
303
+ className: e("flex items-center gap-2 rounded px-2 py-1.5 text-sm", t),
304
+ "data-component": "task-item",
305
+ "data-completed": n,
306
+ ref: u,
307
+ ...l,
308
+ children: [
309
+ /* @__PURE__ */ o("input", {
310
+ checked: n,
311
+ className: "shrink-0 accent-accent",
312
+ onChange: i,
313
+ type: "checkbox"
314
+ }),
315
+ /* @__PURE__ */ o("span", {
316
+ className: e("flex-1 truncate", n && "line-through text-fg-muted"),
317
+ children: c
318
+ }),
319
+ a !== void 0 && /* @__PURE__ */ o("span", {
320
+ className: e("rounded px-1.5 py-0.5 text-[10px] font-medium uppercase", b[a]),
321
+ children: a
322
+ }),
323
+ r !== void 0 && /* @__PURE__ */ o("span", {
324
+ className: "shrink-0 text-xs text-fg-muted",
325
+ children: r
326
+ })
327
+ ]
328
+ });
329
+ }), S = {
330
+ default: "border-l-accent",
331
+ success: "border-l-success",
332
+ warning: "border-l-warning",
333
+ danger: "border-l-danger"
334
+ }, C = {
335
+ default: /* @__PURE__ */ s("svg", {
336
+ width: "16",
337
+ height: "16",
338
+ viewBox: "0 0 16 16",
339
+ fill: "none",
340
+ stroke: "currentColor",
341
+ strokeWidth: "1.5",
342
+ strokeLinecap: "round",
343
+ children: [/* @__PURE__ */ o("circle", {
344
+ cx: "8",
345
+ cy: "8",
346
+ r: "6.5"
347
+ }), /* @__PURE__ */ o("path", { d: "M8 5.5h.01M8 7.5v3" })]
348
+ }),
349
+ success: /* @__PURE__ */ s("svg", {
350
+ width: "16",
351
+ height: "16",
352
+ viewBox: "0 0 16 16",
353
+ fill: "none",
354
+ stroke: "currentColor",
355
+ strokeWidth: "1.5",
356
+ strokeLinecap: "round",
357
+ strokeLinejoin: "round",
358
+ children: [/* @__PURE__ */ o("circle", {
359
+ cx: "8",
360
+ cy: "8",
361
+ r: "6.5"
362
+ }), /* @__PURE__ */ o("path", { d: "M5.5 8l2 2 3-3.5" })]
363
+ }),
364
+ warning: /* @__PURE__ */ s("svg", {
365
+ width: "16",
366
+ height: "16",
367
+ viewBox: "0 0 16 16",
368
+ fill: "none",
369
+ stroke: "currentColor",
370
+ strokeWidth: "1.5",
371
+ strokeLinecap: "round",
372
+ children: [/* @__PURE__ */ o("path", { d: "M7.13 2.5l-5.5 10h11l-5.5-10z" }), /* @__PURE__ */ o("path", { d: "M7.63 6.5v2.5M7.63 11h.01" })]
373
+ }),
374
+ danger: /* @__PURE__ */ s("svg", {
375
+ width: "16",
376
+ height: "16",
377
+ viewBox: "0 0 16 16",
378
+ fill: "none",
379
+ stroke: "currentColor",
380
+ strokeWidth: "1.5",
381
+ strokeLinecap: "round",
382
+ children: [/* @__PURE__ */ o("circle", {
383
+ cx: "8",
384
+ cy: "8",
385
+ r: "6.5"
386
+ }), /* @__PURE__ */ o("path", { d: "M5.5 5.5l5 5M10.5 5.5l-5 5" })]
387
+ })
388
+ }, w = {
389
+ default: "text-accent",
390
+ success: "text-success",
391
+ warning: "text-warning",
392
+ danger: "text-danger"
393
+ }, T = r(function({ title: t, description: n, variant: r = "default", onClose: i, action: a, className: c, ...l }, u) {
394
+ return /* @__PURE__ */ s("div", {
395
+ ref: u,
396
+ className: e("flex items-start gds-gap gds-radius-popover border border-border border-l-4 bg-surface gds-pad-x gds-pad-y gds-shadow-lg", S[r], c),
397
+ "data-component": "toast",
398
+ "data-variant": r,
399
+ role: "status",
400
+ ...l,
401
+ children: [
402
+ /* @__PURE__ */ o("span", {
403
+ className: e("mt-px shrink-0", w[r]),
404
+ children: C[r]
405
+ }),
406
+ /* @__PURE__ */ s("div", {
407
+ className: "min-w-0 flex-1",
408
+ children: [/* @__PURE__ */ o("p", {
409
+ className: "gds-text-body font-medium text-fg",
410
+ children: t
411
+ }), n !== void 0 && /* @__PURE__ */ o("p", {
412
+ className: "mt-0.5 gds-text-label text-fg-muted",
413
+ children: n
414
+ })]
415
+ }),
416
+ a !== void 0 && /* @__PURE__ */ o("div", {
417
+ className: "shrink-0",
418
+ children: a
419
+ }),
420
+ i !== void 0 && /* @__PURE__ */ o("button", {
421
+ type: "button",
422
+ onClick: i,
423
+ className: e("shrink-0 gds-radius-button p-0.5 text-fg-muted opacity-60 hover:opacity-100", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg"),
424
+ "aria-label": "Dismiss",
425
+ children: /* @__PURE__ */ o("svg", {
426
+ width: "12",
427
+ height: "12",
428
+ viewBox: "0 0 12 12",
429
+ fill: "none",
430
+ stroke: "currentColor",
431
+ strokeWidth: "2",
432
+ strokeLinecap: "round",
433
+ children: /* @__PURE__ */ o("path", { d: "M2 2l8 8M10 2l-8 8" })
434
+ })
435
+ })
436
+ ]
437
+ });
438
+ });
439
+ //#endregion
440
+ export { p as a, m as i, x as n, l as o, y as r, T as t };
441
+
442
+ //# sourceMappingURL=toast-DN5xANLM.js.map