@goliapkg/gds 2.1.2 → 2.2.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.
- package/dist/a11y-CoNNB_xa.js +6 -0
- package/dist/a11y-CoNNB_xa.js.map +1 -0
- package/dist/{avatar-Ct8OOGx6.js → avatar-oCar1zX6.js} +2 -2
- package/dist/{avatar-Ct8OOGx6.js.map → avatar-oCar1zX6.js.map} +1 -1
- package/dist/{badge-BCvi5RVF.js → badge-B3ijD3ch.js} +2 -2
- package/dist/{badge-BCvi5RVF.js.map → badge-B3ijD3ch.js.map} +1 -1
- package/dist/{button-BD3VHhwq.js → button-fRpdsI_4.js} +15 -41
- package/dist/button-fRpdsI_4.js.map +1 -0
- package/dist/dist-qdXk1a7h.js +35 -0
- package/dist/dist-qdXk1a7h.js.map +1 -0
- package/dist/{dom-17XgfxMq.js → dom-DkPgnDHP.js} +1 -1
- package/dist/{dom-17XgfxMq.js.map → dom-DkPgnDHP.js.map} +1 -1
- package/dist/editor/index.d.ts +11 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/index.js +1250 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/email-composer-field-UoKh5XMX.js +178 -0
- package/dist/email-composer-field-UoKh5XMX.js.map +1 -0
- package/dist/{gesture-I79dlTuS.js → gesture-CVcSA-iZ.js} +1 -1
- package/dist/{gesture-I79dlTuS.js.map → gesture-CVcSA-iZ.js.map} +1 -1
- package/dist/{highlight-BAGZc-4h.js → highlight-pgwGrmcq.js} +1 -1
- package/dist/{highlight-BAGZc-4h.js.map → highlight-pgwGrmcq.js.map} +1 -1
- package/dist/{hooks-BE-_EmDI.js → hooks-CejfTXVD.js} +1 -1
- package/dist/{hooks-BE-_EmDI.js.map → hooks-CejfTXVD.js.map} +1 -1
- package/dist/{icon-button-Bns79124.js → icon-button-CR2GECEZ.js} +3 -3
- package/dist/{icon-button-Bns79124.js.map → icon-button-CR2GECEZ.js.map} +1 -1
- package/dist/index.js +30 -27
- package/dist/l2-primitives/index.js +11 -11
- package/dist/{l2-primitives-Cn0KNxbB.js → l2-primitives-D503ozjH.js} +4 -4
- package/dist/{l2-primitives-Cn0KNxbB.js.map → l2-primitives-D503ozjH.js.map} +1 -1
- package/dist/l3-atoms/index.js +6 -5
- package/dist/{l3-atoms-BCJNqPHk.js → l3-atoms-CumlHlnP.js} +54 -53
- package/dist/{l3-atoms-BCJNqPHk.js.map → l3-atoms-CumlHlnP.js.map} +1 -1
- package/dist/l4-molecules/index.js +5 -4
- package/dist/{l4-molecules-DtNnQaFU.js → l4-molecules-CWwgFWmO.js} +125 -124
- package/dist/{l4-molecules-DtNnQaFU.js.map → l4-molecules-CWwgFWmO.js.map} +1 -1
- package/dist/l5-organisms/index.d.ts +0 -10
- package/dist/l5-organisms/index.d.ts.map +1 -1
- package/dist/l5-organisms/index.js +2 -2
- package/dist/{l5-organisms-Bu2Z8LSj.js → l5-organisms-QcvIAoHr.js} +1310 -2548
- package/dist/l5-organisms-QcvIAoHr.js.map +1 -0
- package/dist/l6-charts/index.js +1 -1
- package/dist/{l6-charts-uSpVyFWS.js → l6-charts-DKNVGuo0.js} +1 -1
- package/dist/{l6-charts-uSpVyFWS.js.map → l6-charts-DKNVGuo0.js.map} +1 -1
- package/dist/l7-patterns/index.js +1 -1
- package/dist/{l7-patterns-CwonNW9o.js → l7-patterns-CM3FUxjA.js} +34 -34
- package/dist/{l7-patterns-CwonNW9o.js.map → l7-patterns-CM3FUxjA.js.map} +1 -1
- package/dist/loading-dots-CjzCz938.js +24 -0
- package/dist/loading-dots-CjzCz938.js.map +1 -0
- package/dist/motion-CKB1OKVd.js +22 -0
- package/dist/motion-CKB1OKVd.js.map +1 -0
- package/dist/{portal-Bbl6F_Wj.js → portal-B7bfstxv.js} +1 -1
- package/dist/{portal-Bbl6F_Wj.js.map → portal-B7bfstxv.js.map} +1 -1
- package/dist/{progress-dZIQEiTw.js → progress-B81FKPw5.js} +2 -2
- package/dist/{progress-dZIQEiTw.js.map → progress-B81FKPw5.js.map} +1 -1
- package/dist/{resize-handle-BjSNhgJK.js → resize-handle-BFffbhyG.js} +2 -2
- package/dist/{resize-handle-BjSNhgJK.js.map → resize-handle-BFffbhyG.js.map} +1 -1
- package/dist/{sanitize-BF45M9xp.js → sanitize-CO5dRqZX.js} +1 -1
- package/dist/{sanitize-BF45M9xp.js.map → sanitize-CO5dRqZX.js.map} +1 -1
- package/dist/{separator-CRll1Ycp.js → separator-wAUWmxji.js} +2 -2
- package/dist/{separator-CRll1Ycp.js.map → separator-wAUWmxji.js.map} +1 -1
- package/dist/{skeleton-C9FFZSYN.js → skeleton-DhqLfA7r.js} +1 -1
- package/dist/{skeleton-C9FFZSYN.js.map → skeleton-DhqLfA7r.js.map} +1 -1
- package/dist/{spinner-C15eER04.js → spinner-BimzKtfC.js} +3 -3
- package/dist/{spinner-C15eER04.js.map → spinner-BimzKtfC.js.map} +1 -1
- package/dist/{stepper-DJ8pn-9D.js → stepper-BINbai2f.js} +4 -4
- package/dist/{stepper-DJ8pn-9D.js.map → stepper-BINbai2f.js.map} +1 -1
- package/dist/{switch-BAS-GXJV.js → switch-COzaggYE.js} +3 -3
- package/dist/{switch-BAS-GXJV.js.map → switch-COzaggYE.js.map} +1 -1
- package/dist/{textarea-Btdu41rY.js → textarea-DD1huKel.js} +3 -3
- package/dist/{textarea-Btdu41rY.js.map → textarea-DD1huKel.js.map} +1 -1
- package/dist/toast-BujeTn1T.js +442 -0
- package/dist/toast-BujeTn1T.js.map +1 -0
- package/dist/{loading-dots-C1LPHGa0.js → tooltip-BlvhLCp0.js} +2 -17
- package/dist/tooltip-BlvhLCp0.js.map +1 -0
- package/dist/utils/index.js +8 -7
- package/package.json +5 -1
- package/dist/button-BD3VHhwq.js.map +0 -1
- package/dist/l5-organisms-Bu2Z8LSj.js.map +0 -1
- package/dist/loading-dots-C1LPHGa0.js.map +0 -1
- package/dist/motion-DUPegem-.js +0 -22
- package/dist/motion-DUPegem-.js.map +0 -1
- package/dist/toast-QxCZG0Oy.js +0 -614
- package/dist/toast-QxCZG0Oy.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loading-dots-C1LPHGa0.js","names":[],"sources":["../src/l3-atoms/tooltip.tsx","../src/l3-atoms/loading-dots.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { forwardRef, useCallback, useRef, useState } from 'react'\n\nimport { cx } from '../utils/cx'\nimport { glassClass } from '../utils/glass'\n\nconst positionClasses: Record<string, string> = {\n bottom: 'top-full left-1/2 -translate-x-1/2 mt-2',\n left: 'right-full top-1/2 -translate-y-1/2 mr-2',\n right: 'left-full top-1/2 -translate-y-1/2 ml-2',\n top: 'bottom-full left-1/2 -translate-x-1/2 mb-2',\n}\n\nconst arrowClasses: Record<string, string> = {\n bottom:\n 'bottom-full left-1/2 -translate-x-1/2 border-b-bg-tertiary border-x-transparent border-t-transparent border-4',\n left: 'left-full top-1/2 -translate-y-1/2 border-l-bg-tertiary border-y-transparent border-r-transparent border-4',\n right:\n 'right-full top-1/2 -translate-y-1/2 border-r-bg-tertiary border-y-transparent border-l-transparent border-4',\n top: 'top-full left-1/2 -translate-x-1/2 border-t-bg-tertiary border-x-transparent border-b-transparent border-4',\n}\n\ntype TooltipProps = React.HTMLAttributes<HTMLDivElement> & {\n content: ReactNode\n delay?: number\n glass?: boolean\n interactive?: boolean\n maxWidth?: number\n placement?: 'bottom' | 'left' | 'right' | 'top'\n}\n\nexport const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(\n function Tooltip(\n {\n children,\n className,\n content,\n delay = 300,\n glass,\n interactive = false,\n maxWidth,\n placement = 'top',\n ...props\n },\n ref\n ) {\n const [open, setOpen] = useState(false)\n const enterTimer = useRef<ReturnType<typeof setTimeout>>(undefined)\n const leaveTimer = useRef<ReturnType<typeof setTimeout>>(undefined)\n\n const handleEnter = useCallback(() => {\n clearTimeout(leaveTimer.current)\n enterTimer.current = setTimeout(() => setOpen(true), delay)\n }, [delay])\n\n const handleLeave = useCallback(() => {\n clearTimeout(enterTimer.current)\n if (interactive) {\n leaveTimer.current = setTimeout(() => setOpen(false), 150)\n } else {\n setOpen(false)\n }\n }, [interactive])\n\n return (\n <div\n className={cx('relative inline-flex', className)}\n data-component=\"tooltip\"\n data-state={open ? 'open' : 'closed'}\n onMouseEnter={handleEnter}\n onMouseLeave={handleLeave}\n ref={ref}\n {...props}\n >\n {children}\n {open && (\n <div\n className={cx(\n 'animate-popup gds-radius-tooltip gds-pad-x-sm gds-pad-y-sm gds-text-label text-fg pointer-events-none absolute z-50 whitespace-nowrap',\n interactive && 'pointer-events-auto',\n glass === true ? glassClass(glass) : 'bg-bg-tertiary',\n glass === true && 'border border-white/10'\n )}\n onMouseEnter={interactive ? handleEnter : undefined}\n onMouseLeave={interactive ? handleLeave : undefined}\n style={\n maxWidth !== undefined\n ? { maxWidth, whiteSpace: 'normal' }\n : undefined\n }\n >\n <span className={cx('absolute', arrowClasses[placement])} />\n <span className={positionClasses[placement] ? '' : ''}>\n {content}\n </span>\n </div>\n )}\n </div>\n )\n }\n)\n\nexport type { TooltipProps }\n","import { forwardRef } from 'react'\n\nimport { cx } from '../utils/cx'\n\ntype LoadingDotsProps = React.HTMLAttributes<HTMLSpanElement> & {\n count?: number\n size?: 'default' | 'sm'\n}\n\nconst sizeMap = {\n default: 'h-1.5 w-1.5',\n sm: 'h-1 w-1',\n}\n\nexport const LoadingDots = forwardRef<HTMLSpanElement, LoadingDotsProps>(\n function LoadingDots(\n { className, count = 3, size = 'default', ...props },\n ref\n ) {\n return (\n <span\n className={cx('gds-gap-xs inline-flex items-center', className)}\n data-component=\"loading-dots\"\n ref={ref}\n role=\"status\"\n {...props}\n >\n {Array.from({ length: count }, (_, i) => (\n <span\n className={cx(\n 'gds-radius-badge bg-fg-muted/40 animate-pulse',\n sizeMap[size]\n )}\n key={i}\n style={{ animationDelay: `${i * 150}ms` }}\n />\n ))}\n </span>\n )\n }\n)\n\nexport type { LoadingDotsProps }\n"],"mappings":";;;;AAMA,IAAM,IAA0C;CAC9C,QAAQ;CACR,MAAM;CACN,OAAO;CACP,KAAK;CACN,EAEK,IAAuC;CAC3C,QACE;CACF,MAAM;CACN,OACE;CACF,KAAK;CACN,EAWY,IAAU,EACrB,SACE,EACE,aACA,cACA,YACA,WAAQ,KACR,UACA,iBAAc,IACd,aACA,eAAY,OACZ,GAAG,KAEL,GACA;CACA,IAAM,CAAC,GAAM,KAAW,EAAS,GAAM,EACjC,IAAa,EAAsC,KAAA,EAAU,EAC7D,IAAa,EAAsC,KAAA,EAAU,EAE7D,IAAc,QAAkB;AAEpC,EADA,aAAa,EAAW,QAAQ,EAChC,EAAW,UAAU,iBAAiB,EAAQ,GAAK,EAAE,EAAM;IAC1D,CAAC,EAAM,CAAC,EAEL,IAAc,QAAkB;AAEpC,EADA,aAAa,EAAW,QAAQ,EAC5B,IACF,EAAW,UAAU,iBAAiB,EAAQ,GAAM,EAAE,IAAI,GAE1D,EAAQ,GAAM;IAEf,CAAC,EAAY,CAAC;AAEjB,QACE,kBAAC,OAAD;EACE,WAAW,EAAG,wBAAwB,EAAU;EAChD,kBAAe;EACf,cAAY,IAAO,SAAS;EAC5B,cAAc;EACd,cAAc;EACT;EACL,GAAI;YAPN,CASG,GACA,KACC,kBAAC,OAAD;GACE,WAAW,EACT,yIACA,KAAe,uBACf,MAAU,KAAO,EAAW,EAAM,GAAG,kBACrC,MAAU,MAAQ,yBACnB;GACD,cAAc,IAAc,IAAc,KAAA;GAC1C,cAAc,IAAc,IAAc,KAAA;GAC1C,OACE,MAAa,KAAA,IAET,KAAA,IADA;IAAE;IAAU,YAAY;IAAU;aAX1C,CAeE,kBAAC,QAAD,EAAM,WAAW,EAAG,YAAY,EAAa,GAAW,EAAI,CAAA,EAC5D,kBAAC,QAAD;IAAM,YAAW,EAAgB,IAAa;cAC3C;IACI,CAAA,CACH;KAEJ;;EAGX,EC3FK,IAAU;CACd,SAAS;CACT,IAAI;CACL,EAEY,IAAc,EACzB,SACE,EAAE,cAAW,WAAQ,GAAG,UAAO,WAAW,GAAG,KAC7C,GACA;AACA,QACE,kBAAC,QAAD;EACE,WAAW,EAAG,uCAAuC,EAAU;EAC/D,kBAAe;EACV;EACL,MAAK;EACL,GAAI;YAEH,MAAM,KAAK,EAAE,QAAQ,GAAO,GAAG,GAAG,MACjC,kBAAC,QAAD;GACE,WAAW,EACT,iDACA,EAAQ,GACT;GAED,OAAO,EAAE,gBAAgB,GAAG,IAAI,IAAI,KAAK;GACzC,EAFK,EAEL,CACF;EACG,CAAA;EAGZ"}
|
package/dist/motion-DUPegem-.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//#region src/utils/a11y.ts
|
|
2
|
-
var e = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg", t = "absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0 [clip:rect(0,0,0,0)]", n = {
|
|
3
|
-
fadeIn: "animate-fade-in",
|
|
4
|
-
fadeOut: "animate-fade-out",
|
|
5
|
-
scaleIn: "animate-scale-in",
|
|
6
|
-
scaleOut: "animate-scale-out",
|
|
7
|
-
slideUp: "animate-slide-up",
|
|
8
|
-
slideDown: "animate-slide-down",
|
|
9
|
-
slideLeft: "animate-slide-left",
|
|
10
|
-
slideRight: "animate-slide-right"
|
|
11
|
-
};
|
|
12
|
-
function r(e) {
|
|
13
|
-
return e === void 0 ? "" : n[e] ?? "";
|
|
14
|
-
}
|
|
15
|
-
function i(e, t) {
|
|
16
|
-
let n = r(e);
|
|
17
|
-
return n === "" ? "" : t === "fast" ? `${n} animate-fast` : t === "slow" ? `${n} animate-slow` : n;
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
export { t as i, i as n, e as r, r as t };
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=motion-DUPegem-.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"motion-DUPegem-.js","names":[],"sources":["../src/utils/a11y.ts","../src/utils/motion.ts"],"sourcesContent":["// a11y utilities — used by all layers from L2+\n// values reference L0 tokens via Tailwind classes\n\n// focus-visible ring for all interactive elements\n// uses --gds-focus-ring-color (= --gds-accent), 2px ring, 1px offset\nexport const focusCls =\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg'\n\n// screen reader only — visually hidden but accessible to assistive tech\nexport const srOnly =\n 'absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0 [clip:rect(0,0,0,0)]'\n","// L-dep — motion helper\n// converts a motion prop value to a CSS class name\n// this is the bridge between component props and the CSS animation system\n// zero friction: <Card motion=\"scaleIn\"> → className=\"animate-scale-in\"\n\nconst PRESET_TO_CLASS: Record<string, string> = {\n fadeIn: 'animate-fade-in',\n fadeOut: 'animate-fade-out',\n scaleIn: 'animate-scale-in',\n scaleOut: 'animate-scale-out',\n slideUp: 'animate-slide-up',\n slideDown: 'animate-slide-down',\n slideLeft: 'animate-slide-left',\n slideRight: 'animate-slide-right',\n}\n\n// convert motion prop to className — returns empty string if no motion\nexport function motionClass(motion?: string): string {\n if (motion === undefined) return ''\n return PRESET_TO_CLASS[motion] ?? ''\n}\n\n// convert motion prop with speed variant\nexport function motionClassWithSpeed(\n motion?: string,\n speed?: 'fast' | 'slow'\n): string {\n const base = motionClass(motion)\n if (base === '') return ''\n if (speed === 'fast') return `${base} animate-fast`\n if (speed === 'slow') return `${base} animate-slow`\n return base\n}\n"],"mappings":";AAKA,IAAa,IACX,sIAGW,IACX,0FCLI,IAA0C;CAC9C,QAAQ;CACR,SAAS;CACT,SAAS;CACT,UAAU;CACV,SAAS;CACT,WAAW;CACX,WAAW;CACX,YAAY;CACb;AAGD,SAAgB,EAAY,GAAyB;AAEnD,QADI,MAAW,KAAA,IAAkB,KAC1B,EAAgB,MAAW;;AAIpC,SAAgB,EACd,GACA,GACQ;CACR,IAAM,IAAO,EAAY,EAAO;AAIhC,QAHI,MAAS,KAAW,KACpB,MAAU,SAAe,GAAG,EAAK,iBACjC,MAAU,SAAe,GAAG,EAAK,iBAC9B"}
|
package/dist/toast-QxCZG0Oy.js
DELETED
|
@@ -1,614 +0,0 @@
|
|
|
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, useEffect as a, useRef as o, useState as s } from "react";
|
|
4
|
-
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
|
-
//#region src/l4-molecules/audit-entry.tsx
|
|
6
|
-
var u = {
|
|
7
|
-
default: "text-fg",
|
|
8
|
-
success: "text-success",
|
|
9
|
-
warning: "text-warning",
|
|
10
|
-
danger: "text-danger"
|
|
11
|
-
}, d = r(function({ action: t, className: n, target: r, timestamp: i, user: a, variant: o = "default", ...s }, d) {
|
|
12
|
-
return /* @__PURE__ */ l("div", {
|
|
13
|
-
className: e("gds-gap gds-text flex items-center justify-between", n),
|
|
14
|
-
"data-component": "audit-entry",
|
|
15
|
-
ref: d,
|
|
16
|
-
...s,
|
|
17
|
-
children: [/* @__PURE__ */ c("span", {
|
|
18
|
-
className: "text-fg-muted shrink-0 text-xs",
|
|
19
|
-
children: i
|
|
20
|
-
}), /* @__PURE__ */ l("span", {
|
|
21
|
-
className: "flex-1 truncate",
|
|
22
|
-
children: [
|
|
23
|
-
/* @__PURE__ */ c("span", {
|
|
24
|
-
className: "text-fg font-medium",
|
|
25
|
-
children: a
|
|
26
|
-
}),
|
|
27
|
-
" ",
|
|
28
|
-
/* @__PURE__ */ c("span", {
|
|
29
|
-
className: u[o],
|
|
30
|
-
children: t
|
|
31
|
-
}),
|
|
32
|
-
r !== void 0 && /* @__PURE__ */ l("span", {
|
|
33
|
-
className: "text-fg-muted",
|
|
34
|
-
children: [" ", r]
|
|
35
|
-
})
|
|
36
|
-
]
|
|
37
|
-
})]
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region src/l4-molecules/email-composer-field.tsx
|
|
42
|
-
function f(e) {
|
|
43
|
-
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
|
|
44
|
-
}
|
|
45
|
-
function p(e) {
|
|
46
|
-
let t = 0;
|
|
47
|
-
for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t);
|
|
48
|
-
let n = [
|
|
49
|
-
"bg-palette-0/20 text-palette-0",
|
|
50
|
-
"bg-palette-1/20 text-palette-1",
|
|
51
|
-
"bg-palette-2/20 text-palette-2",
|
|
52
|
-
"bg-palette-3/20 text-palette-3",
|
|
53
|
-
"bg-palette-4/20 text-palette-4",
|
|
54
|
-
"bg-palette-5/20 text-palette-5",
|
|
55
|
-
"bg-palette-6/20 text-palette-6",
|
|
56
|
-
"bg-palette-7/20 text-palette-7"
|
|
57
|
-
];
|
|
58
|
-
return n[Math.abs(t) % n.length];
|
|
59
|
-
}
|
|
60
|
-
function m({ contact: t, onRemove: n }) {
|
|
61
|
-
let r = t.name ?? t.email;
|
|
62
|
-
return /* @__PURE__ */ l("span", {
|
|
63
|
-
className: e("gds-text-label inline-flex items-center gap-1 rounded-full px-2 py-0.5 select-none", p(t.email)),
|
|
64
|
-
"data-component": "contact-chip",
|
|
65
|
-
children: [/* @__PURE__ */ c("span", {
|
|
66
|
-
className: "max-w-[160px] truncate",
|
|
67
|
-
children: r
|
|
68
|
-
}), /* @__PURE__ */ c("button", {
|
|
69
|
-
type: "button",
|
|
70
|
-
className: "shrink-0 rounded-full p-0.5 transition-colors hover:bg-white/10",
|
|
71
|
-
onClick: n,
|
|
72
|
-
"aria-label": `Remove ${r}`,
|
|
73
|
-
tabIndex: -1,
|
|
74
|
-
children: /* @__PURE__ */ c("svg", {
|
|
75
|
-
width: "10",
|
|
76
|
-
height: "10",
|
|
77
|
-
viewBox: "0 0 10 10",
|
|
78
|
-
fill: "none",
|
|
79
|
-
stroke: "currentColor",
|
|
80
|
-
strokeWidth: "2",
|
|
81
|
-
strokeLinecap: "round",
|
|
82
|
-
children: /* @__PURE__ */ c("path", { d: "M2 2l6 6M8 2l-6 6" })
|
|
83
|
-
})
|
|
84
|
-
})]
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
function h({ results: t, activeIndex: n, onSelect: r }) {
|
|
88
|
-
return t.length === 0 ? null : /* @__PURE__ */ c("div", {
|
|
89
|
-
className: "border-border bg-bg-secondary absolute top-full right-0 left-0 z-50 mt-1 max-h-48 overflow-hidden overflow-y-auto rounded-lg border shadow-lg",
|
|
90
|
-
role: "listbox",
|
|
91
|
-
id: "email-composer-suggestions",
|
|
92
|
-
children: t.map((t, i) => /* @__PURE__ */ l("button", {
|
|
93
|
-
type: "button",
|
|
94
|
-
className: e("gds-text-body flex w-full items-center gap-2 px-3 py-2 text-left transition-colors", i === n ? "bg-accent/10 text-accent" : "text-fg hover:bg-white/[0.04]"),
|
|
95
|
-
onClick: () => r(t),
|
|
96
|
-
"data-active": i === n,
|
|
97
|
-
role: "option",
|
|
98
|
-
"aria-selected": i === n,
|
|
99
|
-
children: [/* @__PURE__ */ c("span", {
|
|
100
|
-
className: e("gds-text-caption flex h-6 w-6 shrink-0 items-center justify-center rounded-full font-medium", p(t.email)),
|
|
101
|
-
children: (t.name ?? t.email).charAt(0).toUpperCase()
|
|
102
|
-
}), /* @__PURE__ */ l("div", {
|
|
103
|
-
className: "min-w-0 flex-1",
|
|
104
|
-
children: [t.name !== void 0 && /* @__PURE__ */ c("div", {
|
|
105
|
-
className: "text-fg truncate",
|
|
106
|
-
children: t.name
|
|
107
|
-
}), /* @__PURE__ */ c("div", {
|
|
108
|
-
className: "text-fg-muted gds-text-label truncate",
|
|
109
|
-
children: t.email
|
|
110
|
-
})]
|
|
111
|
-
})]
|
|
112
|
-
}, t.email))
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
var g = r(function({ value: n, onChange: r, onSearch: u, suggestions: d, label: p, placeholder: g, glass: _, className: v, ...y }, b) {
|
|
116
|
-
let [x, S] = s(""), [C, w] = s([]), [T, E] = s(0), [D, O] = s(!1), k = o(null), A = o(void 0), j = o(0), M = o(void 0);
|
|
117
|
-
a(() => () => {
|
|
118
|
-
M.current !== void 0 && clearTimeout(M.current);
|
|
119
|
-
}, []), a(() => {
|
|
120
|
-
if (x.length < 1) {
|
|
121
|
-
w(d ?? []);
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
A.current !== void 0 && clearTimeout(A.current);
|
|
125
|
-
let e = ++j.current;
|
|
126
|
-
return A.current = setTimeout(async () => {
|
|
127
|
-
let t = await u(x);
|
|
128
|
-
e === j.current && (w(t.filter((e) => !n.some((t) => t.email === e.email))), E(0));
|
|
129
|
-
}, 200), () => {
|
|
130
|
-
A.current !== void 0 && clearTimeout(A.current);
|
|
131
|
-
};
|
|
132
|
-
}, [
|
|
133
|
-
x,
|
|
134
|
-
u,
|
|
135
|
-
d,
|
|
136
|
-
n
|
|
137
|
-
]);
|
|
138
|
-
let N = i((e) => {
|
|
139
|
-
n.some((t) => t.email === e.email) || (r([...n, e]), S(""), w([]), O(!1), k.current?.focus());
|
|
140
|
-
}, [n, r]), P = i((e) => {
|
|
141
|
-
let t = e.trim();
|
|
142
|
-
if (t === "") return;
|
|
143
|
-
let i = t.split(/[,;\n]+/).map((e) => e.trim()).filter((e) => e !== ""), a = [];
|
|
144
|
-
for (let e of i) f(e) && !n.some((t) => t.email === e) && a.push({ email: e });
|
|
145
|
-
a.length > 0 && (r([...n, ...a]), S(""));
|
|
146
|
-
}, [n, r]), F = i((e) => {
|
|
147
|
-
let t = [...n];
|
|
148
|
-
t.splice(e, 1), r(t);
|
|
149
|
-
}, [n, r]), I = i((e) => {
|
|
150
|
-
e.key === "ArrowDown" && D ? (e.preventDefault(), E((e) => (e + 1) % Math.max(C.length, 1))) : e.key === "ArrowUp" && D ? (e.preventDefault(), E((e) => (e - 1 + C.length) % Math.max(C.length, 1))) : e.key === "Enter" && D && C[T] !== void 0 ? (e.preventDefault(), N(C[T])) : e.key === "Enter" || e.key === "Tab" || e.key === "," ? x.trim() !== "" && (e.preventDefault(), P(x)) : e.key === "Backspace" && x === "" && n.length > 0 && F(n.length - 1);
|
|
151
|
-
}, [
|
|
152
|
-
D,
|
|
153
|
-
C,
|
|
154
|
-
T,
|
|
155
|
-
x,
|
|
156
|
-
n,
|
|
157
|
-
N,
|
|
158
|
-
P,
|
|
159
|
-
F
|
|
160
|
-
]), L = i((e) => {
|
|
161
|
-
let t = e.clipboardData.getData("text");
|
|
162
|
-
(t.includes(",") || t.includes(";") || t.includes("\n")) && (e.preventDefault(), P(t));
|
|
163
|
-
}, [P]);
|
|
164
|
-
return /* @__PURE__ */ l("div", {
|
|
165
|
-
...y,
|
|
166
|
-
ref: b,
|
|
167
|
-
className: e("relative", v),
|
|
168
|
-
"data-component": "email-composer-field",
|
|
169
|
-
children: [/* @__PURE__ */ l("div", {
|
|
170
|
-
className: e("border-border gds-radius-input bg-bg flex min-h-[36px] flex-wrap items-center gap-1 border px-2 py-1 transition-colors", "focus-within:ring-accent/30 focus-within:ring-2", _ === !0 && t(_), _ === !0 && "bg-bg/60 border-white/10"),
|
|
171
|
-
onClick: () => k.current?.focus(),
|
|
172
|
-
children: [
|
|
173
|
-
/* @__PURE__ */ c("span", {
|
|
174
|
-
className: "gds-text-label text-fg-muted w-6 shrink-0 select-none",
|
|
175
|
-
children: p
|
|
176
|
-
}),
|
|
177
|
-
n.map((e, t) => /* @__PURE__ */ c(m, {
|
|
178
|
-
contact: e,
|
|
179
|
-
onRemove: () => F(t)
|
|
180
|
-
}, e.email)),
|
|
181
|
-
/* @__PURE__ */ c("input", {
|
|
182
|
-
ref: k,
|
|
183
|
-
type: "text",
|
|
184
|
-
value: x,
|
|
185
|
-
onChange: (e) => {
|
|
186
|
-
S(e.target.value), O(!0);
|
|
187
|
-
},
|
|
188
|
-
onKeyDown: I,
|
|
189
|
-
onPaste: L,
|
|
190
|
-
onFocus: () => O(!0),
|
|
191
|
-
role: "combobox",
|
|
192
|
-
"aria-expanded": D && C.length > 0,
|
|
193
|
-
"aria-autocomplete": "list",
|
|
194
|
-
"aria-controls": "email-composer-suggestions",
|
|
195
|
-
"aria-label": `${p} recipients`,
|
|
196
|
-
onBlur: () => {
|
|
197
|
-
M.current !== void 0 && clearTimeout(M.current), M.current = setTimeout(() => {
|
|
198
|
-
M.current = void 0, O(!1), x.trim() !== "" && P(x);
|
|
199
|
-
}, 200);
|
|
200
|
-
},
|
|
201
|
-
placeholder: n.length === 0 ? g ?? `${p.toLowerCase()}@example.com` : "",
|
|
202
|
-
className: "gds-text-body text-fg placeholder:text-fg-muted/30 min-w-[120px] flex-1 bg-transparent outline-none"
|
|
203
|
-
})
|
|
204
|
-
]
|
|
205
|
-
}), D && C.length > 0 && /* @__PURE__ */ c(h, {
|
|
206
|
-
results: C,
|
|
207
|
-
activeIndex: T,
|
|
208
|
-
onSelect: N
|
|
209
|
-
})]
|
|
210
|
-
});
|
|
211
|
-
}), _ = /* @__PURE__ */ c("svg", {
|
|
212
|
-
width: "14",
|
|
213
|
-
height: "14",
|
|
214
|
-
viewBox: "0 0 14 14",
|
|
215
|
-
fill: "none",
|
|
216
|
-
stroke: "currentColor",
|
|
217
|
-
strokeWidth: "2",
|
|
218
|
-
strokeLinecap: "round",
|
|
219
|
-
strokeLinejoin: "round",
|
|
220
|
-
children: /* @__PURE__ */ c("path", { d: "M2.5 7.5l3 3 6-6.5" })
|
|
221
|
-
}), v = /* @__PURE__ */ c("svg", {
|
|
222
|
-
width: "14",
|
|
223
|
-
height: "14",
|
|
224
|
-
viewBox: "0 0 14 14",
|
|
225
|
-
fill: "none",
|
|
226
|
-
stroke: "currentColor",
|
|
227
|
-
strokeWidth: "2",
|
|
228
|
-
strokeLinecap: "round",
|
|
229
|
-
children: /* @__PURE__ */ c("path", { d: "M3 3l8 8M11 3l-8 8" })
|
|
230
|
-
}), y = /* @__PURE__ */ c("svg", {
|
|
231
|
-
width: "12",
|
|
232
|
-
height: "12",
|
|
233
|
-
viewBox: "0 0 12 12",
|
|
234
|
-
fill: "none",
|
|
235
|
-
stroke: "currentColor",
|
|
236
|
-
strokeWidth: "1.5",
|
|
237
|
-
strokeLinecap: "round",
|
|
238
|
-
strokeLinejoin: "round",
|
|
239
|
-
children: /* @__PURE__ */ c("path", { d: "M7 2l3 3-7 7H0V9z" })
|
|
240
|
-
}), b = r(function({ value: t, onSave: r, onCancel: a, validate: o, placeholder: u = "Click to edit", disabled: d, className: f }, p) {
|
|
241
|
-
let [m, h] = s(!1), [g, b] = s(t), [x, S] = s(null), C = i(() => {
|
|
242
|
-
d !== !0 && (b(t), S(null), h(!0));
|
|
243
|
-
}, [d, t]), w = i(() => {
|
|
244
|
-
if (o !== void 0) {
|
|
245
|
-
let e = o(g);
|
|
246
|
-
if (e !== null) {
|
|
247
|
-
S(e);
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
h(!1), S(null), r(g);
|
|
252
|
-
}, [
|
|
253
|
-
g,
|
|
254
|
-
r,
|
|
255
|
-
o
|
|
256
|
-
]), T = i(() => {
|
|
257
|
-
h(!1), b(t), S(null), a !== void 0 && a();
|
|
258
|
-
}, [a, t]), E = i((e) => {
|
|
259
|
-
e.key === "Enter" && w(), e.key === "Escape" && T();
|
|
260
|
-
}, [w, T]);
|
|
261
|
-
if (m) return /* @__PURE__ */ l("div", {
|
|
262
|
-
ref: p,
|
|
263
|
-
className: e("inline-flex flex-col", f),
|
|
264
|
-
"data-component": "inline-edit",
|
|
265
|
-
"data-state": "editing",
|
|
266
|
-
children: [/* @__PURE__ */ l("div", {
|
|
267
|
-
className: "flex items-center gap-1",
|
|
268
|
-
children: [
|
|
269
|
-
/* @__PURE__ */ c("input", {
|
|
270
|
-
autoFocus: !0,
|
|
271
|
-
className: e("gds-text-body text-fg border-accent/50 border-b bg-transparent px-0.5 outline-none", x !== null && "border-danger/50", n),
|
|
272
|
-
onChange: (e) => {
|
|
273
|
-
b(e.target.value), S(null);
|
|
274
|
-
},
|
|
275
|
-
onKeyDown: E,
|
|
276
|
-
type: "text",
|
|
277
|
-
value: g
|
|
278
|
-
}),
|
|
279
|
-
/* @__PURE__ */ c("button", {
|
|
280
|
-
type: "button",
|
|
281
|
-
onClick: w,
|
|
282
|
-
className: e("text-success hover:text-success/80 shrink-0 p-0.5", n),
|
|
283
|
-
"aria-label": "Save",
|
|
284
|
-
children: _
|
|
285
|
-
}),
|
|
286
|
-
/* @__PURE__ */ c("button", {
|
|
287
|
-
type: "button",
|
|
288
|
-
onClick: T,
|
|
289
|
-
className: e("text-fg-muted hover:text-fg shrink-0 p-0.5", n),
|
|
290
|
-
"aria-label": "Cancel",
|
|
291
|
-
children: v
|
|
292
|
-
})
|
|
293
|
-
]
|
|
294
|
-
}), x !== null && /* @__PURE__ */ c("span", {
|
|
295
|
-
className: "text-danger mt-0.5 text-[10px]",
|
|
296
|
-
children: x
|
|
297
|
-
})]
|
|
298
|
-
});
|
|
299
|
-
let D = t === "";
|
|
300
|
-
return /* @__PURE__ */ l("div", {
|
|
301
|
-
ref: p,
|
|
302
|
-
className: e("group inline-flex cursor-pointer items-center gap-1", d === !0 && "pointer-events-none opacity-50", f),
|
|
303
|
-
"data-component": "inline-edit",
|
|
304
|
-
"data-state": "display",
|
|
305
|
-
onClick: C,
|
|
306
|
-
onKeyDown: (e) => {
|
|
307
|
-
(e.key === "Enter" || e.key === " ") && C();
|
|
308
|
-
},
|
|
309
|
-
role: "button",
|
|
310
|
-
tabIndex: d === !0 ? -1 : 0,
|
|
311
|
-
children: [/* @__PURE__ */ c("span", {
|
|
312
|
-
className: e("gds-text-body", D ? "text-fg-muted" : "text-fg", n),
|
|
313
|
-
children: D ? u : t
|
|
314
|
-
}), /* @__PURE__ */ c("span", {
|
|
315
|
-
className: "text-fg-muted/0 group-hover:text-fg-muted/60 transition-colors",
|
|
316
|
-
children: y
|
|
317
|
-
})]
|
|
318
|
-
});
|
|
319
|
-
}), x = r(function({ icon: t, title: n, description: r, trailing: i, onClick: a, active: o, disabled: s, className: u }, d) {
|
|
320
|
-
let f = a !== void 0 && s !== !0;
|
|
321
|
-
return /* @__PURE__ */ l("div", {
|
|
322
|
-
ref: d,
|
|
323
|
-
role: f ? "button" : void 0,
|
|
324
|
-
tabIndex: f ? 0 : void 0,
|
|
325
|
-
onClick: f ? a : void 0,
|
|
326
|
-
onKeyDown: f ? (e) => {
|
|
327
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
|
|
328
|
-
} : void 0,
|
|
329
|
-
className: e("gds-pad-x gds-pad-y-sm gds-text-body flex items-center gap-3 select-none", f && "hover:bg-bg-tertiary cursor-pointer", o === !0 && "border-l-accent bg-accent/5 border-l-2", s === !0 && "pointer-events-none opacity-50", u),
|
|
330
|
-
"data-component": "list-item",
|
|
331
|
-
"data-state": o === !0 ? "active" : void 0,
|
|
332
|
-
children: [
|
|
333
|
-
t !== void 0 && /* @__PURE__ */ c("span", {
|
|
334
|
-
className: "text-fg-muted shrink-0",
|
|
335
|
-
children: t
|
|
336
|
-
}),
|
|
337
|
-
/* @__PURE__ */ l("div", {
|
|
338
|
-
className: "min-w-0 flex-1",
|
|
339
|
-
children: [/* @__PURE__ */ c("div", {
|
|
340
|
-
className: "text-fg font-medium",
|
|
341
|
-
children: n
|
|
342
|
-
}), r !== void 0 && /* @__PURE__ */ c("div", {
|
|
343
|
-
className: "text-fg-muted gds-text-caption mt-0.5",
|
|
344
|
-
children: r
|
|
345
|
-
})]
|
|
346
|
-
}),
|
|
347
|
-
i !== void 0 && /* @__PURE__ */ c("span", {
|
|
348
|
-
className: "shrink-0",
|
|
349
|
-
children: i
|
|
350
|
-
})
|
|
351
|
-
]
|
|
352
|
-
});
|
|
353
|
-
}), S = {
|
|
354
|
-
info: "border-l-accent",
|
|
355
|
-
success: "border-l-success",
|
|
356
|
-
warning: "border-l-warning",
|
|
357
|
-
danger: "border-l-danger"
|
|
358
|
-
}, C = {
|
|
359
|
-
info: "bg-accent/5",
|
|
360
|
-
success: "bg-success/5",
|
|
361
|
-
warning: "bg-warning/5",
|
|
362
|
-
danger: "bg-danger/5"
|
|
363
|
-
}, w = {
|
|
364
|
-
info: "text-accent",
|
|
365
|
-
success: "text-success",
|
|
366
|
-
warning: "text-warning",
|
|
367
|
-
danger: "text-danger"
|
|
368
|
-
}, T = {
|
|
369
|
-
info: /* @__PURE__ */ l("svg", {
|
|
370
|
-
width: "16",
|
|
371
|
-
height: "16",
|
|
372
|
-
viewBox: "0 0 16 16",
|
|
373
|
-
fill: "none",
|
|
374
|
-
stroke: "currentColor",
|
|
375
|
-
strokeWidth: "1.5",
|
|
376
|
-
strokeLinecap: "round",
|
|
377
|
-
children: [/* @__PURE__ */ c("circle", {
|
|
378
|
-
cx: "8",
|
|
379
|
-
cy: "8",
|
|
380
|
-
r: "6.5"
|
|
381
|
-
}), /* @__PURE__ */ c("path", { d: "M8 5.5h.01M8 7.5v3" })]
|
|
382
|
-
}),
|
|
383
|
-
success: /* @__PURE__ */ l("svg", {
|
|
384
|
-
width: "16",
|
|
385
|
-
height: "16",
|
|
386
|
-
viewBox: "0 0 16 16",
|
|
387
|
-
fill: "none",
|
|
388
|
-
stroke: "currentColor",
|
|
389
|
-
strokeWidth: "1.5",
|
|
390
|
-
strokeLinecap: "round",
|
|
391
|
-
strokeLinejoin: "round",
|
|
392
|
-
children: [/* @__PURE__ */ c("circle", {
|
|
393
|
-
cx: "8",
|
|
394
|
-
cy: "8",
|
|
395
|
-
r: "6.5"
|
|
396
|
-
}), /* @__PURE__ */ c("path", { d: "M5.5 8l2 2 3-3.5" })]
|
|
397
|
-
}),
|
|
398
|
-
warning: /* @__PURE__ */ l("svg", {
|
|
399
|
-
width: "16",
|
|
400
|
-
height: "16",
|
|
401
|
-
viewBox: "0 0 16 16",
|
|
402
|
-
fill: "none",
|
|
403
|
-
stroke: "currentColor",
|
|
404
|
-
strokeWidth: "1.5",
|
|
405
|
-
strokeLinecap: "round",
|
|
406
|
-
children: [/* @__PURE__ */ c("path", { d: "M7.13 2.5l-5.5 10h11l-5.5-10z" }), /* @__PURE__ */ c("path", { d: "M7.63 6.5v2.5M7.63 11h.01" })]
|
|
407
|
-
}),
|
|
408
|
-
danger: /* @__PURE__ */ l("svg", {
|
|
409
|
-
width: "16",
|
|
410
|
-
height: "16",
|
|
411
|
-
viewBox: "0 0 16 16",
|
|
412
|
-
fill: "none",
|
|
413
|
-
stroke: "currentColor",
|
|
414
|
-
strokeWidth: "1.5",
|
|
415
|
-
strokeLinecap: "round",
|
|
416
|
-
children: [/* @__PURE__ */ c("circle", {
|
|
417
|
-
cx: "8",
|
|
418
|
-
cy: "8",
|
|
419
|
-
r: "6.5"
|
|
420
|
-
}), /* @__PURE__ */ c("path", { d: "M5.5 5.5l5 5M10.5 5.5l-5 5" })]
|
|
421
|
-
})
|
|
422
|
-
}, E = r(function({ title: n, description: r, variant: i = "info", action: a, onClose: o, glass: s, className: u, ...d }, f) {
|
|
423
|
-
let p = i ?? "info";
|
|
424
|
-
return /* @__PURE__ */ l("div", {
|
|
425
|
-
ref: f,
|
|
426
|
-
className: e("gds-gap gds-radius-popover border-border gds-pad-x gds-pad-y flex w-full items-start border border-l-2", S[p], C[p], s === !0 && t(s), u),
|
|
427
|
-
"data-component": "notification",
|
|
428
|
-
"data-variant": p,
|
|
429
|
-
role: "alert",
|
|
430
|
-
...d,
|
|
431
|
-
children: [
|
|
432
|
-
/* @__PURE__ */ c("span", {
|
|
433
|
-
className: e("mt-px shrink-0", w[p]),
|
|
434
|
-
children: T[p]
|
|
435
|
-
}),
|
|
436
|
-
/* @__PURE__ */ l("div", {
|
|
437
|
-
className: "min-w-0 flex-1",
|
|
438
|
-
children: [/* @__PURE__ */ c("p", {
|
|
439
|
-
className: "gds-text-body text-fg font-medium",
|
|
440
|
-
children: n
|
|
441
|
-
}), r !== void 0 && /* @__PURE__ */ c("p", {
|
|
442
|
-
className: "gds-text-label text-fg-muted mt-0.5",
|
|
443
|
-
children: r
|
|
444
|
-
})]
|
|
445
|
-
}),
|
|
446
|
-
a !== void 0 && /* @__PURE__ */ c("div", {
|
|
447
|
-
className: "shrink-0",
|
|
448
|
-
children: a
|
|
449
|
-
}),
|
|
450
|
-
o !== void 0 && /* @__PURE__ */ c("button", {
|
|
451
|
-
type: "button",
|
|
452
|
-
onClick: o,
|
|
453
|
-
className: e("gds-radius-button text-fg-muted shrink-0 p-0.5 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"),
|
|
454
|
-
"aria-label": "Dismiss",
|
|
455
|
-
children: /* @__PURE__ */ c("svg", {
|
|
456
|
-
width: "12",
|
|
457
|
-
height: "12",
|
|
458
|
-
viewBox: "0 0 12 12",
|
|
459
|
-
fill: "none",
|
|
460
|
-
stroke: "currentColor",
|
|
461
|
-
strokeWidth: "2",
|
|
462
|
-
strokeLinecap: "round",
|
|
463
|
-
children: /* @__PURE__ */ c("path", { d: "M2 2l8 8M10 2l-8 8" })
|
|
464
|
-
})
|
|
465
|
-
})
|
|
466
|
-
]
|
|
467
|
-
});
|
|
468
|
-
}), D = {
|
|
469
|
-
low: "bg-success/15 text-success",
|
|
470
|
-
medium: "bg-warning/15 text-warning",
|
|
471
|
-
high: "bg-danger/15 text-danger",
|
|
472
|
-
critical: "bg-danger text-white"
|
|
473
|
-
}, O = r(function({ className: t, completed: n = !1, dueDate: r, onToggle: i, priority: a, title: o, ...s }, u) {
|
|
474
|
-
return /* @__PURE__ */ l("div", {
|
|
475
|
-
className: e("flex items-center gap-2 rounded px-2 py-1.5 text-sm", t),
|
|
476
|
-
"data-component": "task-item",
|
|
477
|
-
"data-completed": n,
|
|
478
|
-
ref: u,
|
|
479
|
-
...s,
|
|
480
|
-
children: [
|
|
481
|
-
/* @__PURE__ */ c("input", {
|
|
482
|
-
checked: n,
|
|
483
|
-
className: "accent-accent shrink-0",
|
|
484
|
-
onChange: i,
|
|
485
|
-
type: "checkbox"
|
|
486
|
-
}),
|
|
487
|
-
/* @__PURE__ */ c("span", {
|
|
488
|
-
className: e("flex-1 truncate", n && "text-fg-muted line-through"),
|
|
489
|
-
children: o
|
|
490
|
-
}),
|
|
491
|
-
a !== void 0 && /* @__PURE__ */ c("span", {
|
|
492
|
-
className: e("rounded px-1.5 py-0.5 text-[10px] font-medium uppercase", D[a]),
|
|
493
|
-
children: a
|
|
494
|
-
}),
|
|
495
|
-
r !== void 0 && /* @__PURE__ */ c("span", {
|
|
496
|
-
className: "text-fg-muted shrink-0 text-xs",
|
|
497
|
-
children: r
|
|
498
|
-
})
|
|
499
|
-
]
|
|
500
|
-
});
|
|
501
|
-
}), k = {
|
|
502
|
-
default: "border-l-accent",
|
|
503
|
-
success: "border-l-success",
|
|
504
|
-
warning: "border-l-warning",
|
|
505
|
-
danger: "border-l-danger"
|
|
506
|
-
}, A = {
|
|
507
|
-
default: /* @__PURE__ */ l("svg", {
|
|
508
|
-
width: "16",
|
|
509
|
-
height: "16",
|
|
510
|
-
viewBox: "0 0 16 16",
|
|
511
|
-
fill: "none",
|
|
512
|
-
stroke: "currentColor",
|
|
513
|
-
strokeWidth: "1.5",
|
|
514
|
-
strokeLinecap: "round",
|
|
515
|
-
children: [/* @__PURE__ */ c("circle", {
|
|
516
|
-
cx: "8",
|
|
517
|
-
cy: "8",
|
|
518
|
-
r: "6.5"
|
|
519
|
-
}), /* @__PURE__ */ c("path", { d: "M8 5.5h.01M8 7.5v3" })]
|
|
520
|
-
}),
|
|
521
|
-
success: /* @__PURE__ */ l("svg", {
|
|
522
|
-
width: "16",
|
|
523
|
-
height: "16",
|
|
524
|
-
viewBox: "0 0 16 16",
|
|
525
|
-
fill: "none",
|
|
526
|
-
stroke: "currentColor",
|
|
527
|
-
strokeWidth: "1.5",
|
|
528
|
-
strokeLinecap: "round",
|
|
529
|
-
strokeLinejoin: "round",
|
|
530
|
-
children: [/* @__PURE__ */ c("circle", {
|
|
531
|
-
cx: "8",
|
|
532
|
-
cy: "8",
|
|
533
|
-
r: "6.5"
|
|
534
|
-
}), /* @__PURE__ */ c("path", { d: "M5.5 8l2 2 3-3.5" })]
|
|
535
|
-
}),
|
|
536
|
-
warning: /* @__PURE__ */ l("svg", {
|
|
537
|
-
width: "16",
|
|
538
|
-
height: "16",
|
|
539
|
-
viewBox: "0 0 16 16",
|
|
540
|
-
fill: "none",
|
|
541
|
-
stroke: "currentColor",
|
|
542
|
-
strokeWidth: "1.5",
|
|
543
|
-
strokeLinecap: "round",
|
|
544
|
-
children: [/* @__PURE__ */ c("path", { d: "M7.13 2.5l-5.5 10h11l-5.5-10z" }), /* @__PURE__ */ c("path", { d: "M7.63 6.5v2.5M7.63 11h.01" })]
|
|
545
|
-
}),
|
|
546
|
-
danger: /* @__PURE__ */ l("svg", {
|
|
547
|
-
width: "16",
|
|
548
|
-
height: "16",
|
|
549
|
-
viewBox: "0 0 16 16",
|
|
550
|
-
fill: "none",
|
|
551
|
-
stroke: "currentColor",
|
|
552
|
-
strokeWidth: "1.5",
|
|
553
|
-
strokeLinecap: "round",
|
|
554
|
-
children: [/* @__PURE__ */ c("circle", {
|
|
555
|
-
cx: "8",
|
|
556
|
-
cy: "8",
|
|
557
|
-
r: "6.5"
|
|
558
|
-
}), /* @__PURE__ */ c("path", { d: "M5.5 5.5l5 5M10.5 5.5l-5 5" })]
|
|
559
|
-
})
|
|
560
|
-
}, j = {
|
|
561
|
-
default: "text-accent",
|
|
562
|
-
success: "text-success",
|
|
563
|
-
warning: "text-warning",
|
|
564
|
-
danger: "text-danger"
|
|
565
|
-
}, M = r(function({ title: t, description: n, variant: r = "default", onClose: i, action: a, className: o, ...s }, u) {
|
|
566
|
-
return /* @__PURE__ */ l("div", {
|
|
567
|
-
ref: u,
|
|
568
|
-
className: e("gds-gap gds-radius-popover border-border bg-surface gds-pad-x gds-pad-y gds-shadow-lg flex items-start border border-l-4", k[r], o),
|
|
569
|
-
"data-component": "toast",
|
|
570
|
-
"data-variant": r,
|
|
571
|
-
role: "status",
|
|
572
|
-
...s,
|
|
573
|
-
children: [
|
|
574
|
-
/* @__PURE__ */ c("span", {
|
|
575
|
-
className: e("mt-px shrink-0", j[r]),
|
|
576
|
-
children: A[r]
|
|
577
|
-
}),
|
|
578
|
-
/* @__PURE__ */ l("div", {
|
|
579
|
-
className: "min-w-0 flex-1",
|
|
580
|
-
children: [/* @__PURE__ */ c("p", {
|
|
581
|
-
className: "gds-text-body text-fg font-medium",
|
|
582
|
-
children: t
|
|
583
|
-
}), n !== void 0 && /* @__PURE__ */ c("p", {
|
|
584
|
-
className: "gds-text-label text-fg-muted mt-0.5",
|
|
585
|
-
children: n
|
|
586
|
-
})]
|
|
587
|
-
}),
|
|
588
|
-
a !== void 0 && /* @__PURE__ */ c("div", {
|
|
589
|
-
className: "shrink-0",
|
|
590
|
-
children: a
|
|
591
|
-
}),
|
|
592
|
-
i !== void 0 && /* @__PURE__ */ c("button", {
|
|
593
|
-
type: "button",
|
|
594
|
-
onClick: i,
|
|
595
|
-
className: e("gds-radius-button text-fg-muted shrink-0 p-0.5 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"),
|
|
596
|
-
"aria-label": "Dismiss",
|
|
597
|
-
children: /* @__PURE__ */ c("svg", {
|
|
598
|
-
width: "12",
|
|
599
|
-
height: "12",
|
|
600
|
-
viewBox: "0 0 12 12",
|
|
601
|
-
fill: "none",
|
|
602
|
-
stroke: "currentColor",
|
|
603
|
-
strokeWidth: "2",
|
|
604
|
-
strokeLinecap: "round",
|
|
605
|
-
children: /* @__PURE__ */ c("path", { d: "M2 2l8 8M10 2l-8 8" })
|
|
606
|
-
})
|
|
607
|
-
})
|
|
608
|
-
]
|
|
609
|
-
});
|
|
610
|
-
});
|
|
611
|
-
//#endregion
|
|
612
|
-
export { b as a, x as i, O as n, g as o, E as r, d as s, M as t };
|
|
613
|
-
|
|
614
|
-
//# sourceMappingURL=toast-QxCZG0Oy.js.map
|