asterui 0.12.45 → 0.12.48

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 (57) hide show
  1. package/dist/components/Button.d.ts +0 -1
  2. package/dist/components/Button.js +8 -9
  3. package/dist/components/Button.js.map +1 -1
  4. package/dist/components/Checkbox.d.ts +4 -1
  5. package/dist/components/Checkbox.js +106 -77
  6. package/dist/components/Checkbox.js.map +1 -1
  7. package/dist/components/ConfigProvider.d.ts +59 -0
  8. package/dist/components/ConfigProvider.js +46 -0
  9. package/dist/components/ConfigProvider.js.map +1 -0
  10. package/dist/components/CopyButton.d.ts +3 -0
  11. package/dist/components/CopyButton.js +90 -64
  12. package/dist/components/CopyButton.js.map +1 -1
  13. package/dist/components/Descriptions.d.ts +24 -6
  14. package/dist/components/Descriptions.js +203 -116
  15. package/dist/components/Descriptions.js.map +1 -1
  16. package/dist/components/Notification.js +6 -6
  17. package/dist/components/Notification.js.map +1 -1
  18. package/dist/components/QRCode.js +48 -50
  19. package/dist/components/QRCode.js.map +1 -1
  20. package/dist/contexts/IconSizeContext.d.ts +2 -0
  21. package/dist/contexts/IconSizeContext.js +6 -0
  22. package/dist/contexts/IconSizeContext.js.map +1 -0
  23. package/dist/index.d.ts +10 -4
  24. package/dist/index.js +235 -208
  25. package/dist/index.js.map +1 -1
  26. package/dist/locale/de-DE.d.ts +3 -0
  27. package/dist/locale/de-DE.js +100 -0
  28. package/dist/locale/de-DE.js.map +1 -0
  29. package/dist/locale/en-CA.d.ts +3 -0
  30. package/dist/locale/en-CA.js +11 -0
  31. package/dist/locale/en-CA.js.map +1 -0
  32. package/dist/locale/en-GB.d.ts +3 -0
  33. package/dist/locale/en-GB.js +11 -0
  34. package/dist/locale/en-GB.js.map +1 -0
  35. package/dist/locale/en-US.d.ts +3 -0
  36. package/dist/locale/en-US.js +100 -0
  37. package/dist/locale/en-US.js.map +1 -0
  38. package/dist/locale/es-ES.d.ts +3 -0
  39. package/dist/locale/es-ES.js +100 -0
  40. package/dist/locale/es-ES.js.map +1 -0
  41. package/dist/locale/fr-FR.d.ts +3 -0
  42. package/dist/locale/fr-FR.js +100 -0
  43. package/dist/locale/fr-FR.js.map +1 -0
  44. package/dist/locale/index.d.ts +107 -0
  45. package/dist/locale/ja-JP.d.ts +3 -0
  46. package/dist/locale/ja-JP.js +100 -0
  47. package/dist/locale/ja-JP.js.map +1 -0
  48. package/dist/locale/ko-KR.d.ts +3 -0
  49. package/dist/locale/ko-KR.js +100 -0
  50. package/dist/locale/ko-KR.js.map +1 -0
  51. package/dist/locale/pt-BR.d.ts +3 -0
  52. package/dist/locale/pt-BR.js +100 -0
  53. package/dist/locale/pt-BR.js.map +1 -0
  54. package/dist/locale/zh-CN.d.ts +3 -0
  55. package/dist/locale/zh-CN.js +100 -0
  56. package/dist/locale/zh-CN.js.map +1 -0
  57. package/package.json +1 -1
@@ -1,48 +1,68 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { useClipboard as z } from "../hooks/useClipboard.js";
3
- const W = () => /* @__PURE__ */ n(
4
- "svg",
5
- {
6
- className: "w-4 h-4",
7
- fill: "none",
8
- viewBox: "0 0 24 24",
9
- stroke: "currentColor",
10
- children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" })
11
- }
12
- ), E = () => /* @__PURE__ */ n(
13
- "svg",
14
- {
15
- className: "w-4 h-4",
16
- fill: "none",
17
- viewBox: "0 0 24 24",
18
- stroke: "currentColor",
19
- children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "m4.5 12.75 6 6 9-13.5" })
20
- }
21
- ), F = ({
22
- text: l,
23
- timeout: u = 2e3,
24
- color: t,
25
- variant: o,
26
- size: d = "md",
27
- shape: e,
28
- icon: b,
29
- copiedIcon: p,
30
- children: h,
31
- copiedChildren: m,
32
- onCopy: f,
33
- onError: C,
34
- showTooltip: k = !1,
35
- tooltipText: c = "Copy",
36
- copiedTooltipText: r = "Copied!",
37
- className: y = "",
38
- disabled: a,
39
- onClick: g,
40
- ...v
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { useContext as f } from "react";
3
+ import { useClipboard as M } from "../hooks/useClipboard.js";
4
+ import { IconSizeContext as r } from "../contexts/IconSizeContext.js";
5
+ const C = {
6
+ xs: "w-3.5 h-3.5",
7
+ sm: "w-3.5 h-3.5",
8
+ md: "w-4 h-4",
9
+ lg: "w-5 h-5",
10
+ xl: "w-6 h-6"
11
+ }, P = () => {
12
+ const o = f(r) ?? "md";
13
+ return /* @__PURE__ */ t(
14
+ "svg",
15
+ {
16
+ className: C[o],
17
+ fill: "none",
18
+ viewBox: "0 0 24 24",
19
+ stroke: "currentColor",
20
+ children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" })
21
+ }
22
+ );
23
+ }, V = () => {
24
+ const o = f(r) ?? "md";
25
+ return /* @__PURE__ */ t(
26
+ "svg",
27
+ {
28
+ className: C[o],
29
+ fill: "none",
30
+ viewBox: "0 0 24 24",
31
+ stroke: "currentColor",
32
+ children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "m4.5 12.75 6 6 9-13.5" })
33
+ }
34
+ );
35
+ }, p = {
36
+ "top-right": "absolute top-2 right-2",
37
+ "top-left": "absolute top-2 left-2",
38
+ "bottom-right": "absolute bottom-2 right-2",
39
+ "bottom-left": "absolute bottom-2 left-2"
40
+ }, A = ({
41
+ text: o,
42
+ timeout: g = 2e3,
43
+ color: c,
44
+ variant: a,
45
+ size: l = "md",
46
+ shape: i,
47
+ position: s,
48
+ icon: k,
49
+ copiedIcon: y,
50
+ children: v,
51
+ copiedChildren: w,
52
+ onCopy: x,
53
+ onError: I,
54
+ showTooltip: u = !1,
55
+ tooltipText: b = "Copy",
56
+ copiedTooltipText: d = "Copied!",
57
+ className: B = "",
58
+ disabled: m,
59
+ onClick: j,
60
+ ...z
41
61
  }) => {
42
- const { copy: w, copied: s } = z(u), x = async (q) => {
43
- if (g?.(q), a) return;
44
- await w(l) ? f?.() : C?.(new Error("Failed to copy to clipboard"));
45
- }, I = {
62
+ const { copy: N, copied: n } = M(g), L = async (e) => {
63
+ if (j?.(e), m) return;
64
+ await N(o) ? x?.() : I?.(new Error("Failed to copy to clipboard"));
65
+ }, q = {
46
66
  primary: "btn-primary",
47
67
  secondary: "btn-secondary",
48
68
  accent: "btn-accent",
@@ -51,46 +71,52 @@ const W = () => /* @__PURE__ */ n(
51
71
  warning: "btn-warning",
52
72
  error: "btn-error",
53
73
  neutral: "btn-neutral"
54
- }, B = {
74
+ }, S = {
55
75
  solid: "",
56
76
  outline: "btn-outline",
57
77
  dash: "btn-dash",
58
78
  soft: "btn-soft",
59
79
  ghost: "btn-ghost",
60
80
  link: "btn-link"
61
- }, N = {
81
+ }, W = {
62
82
  xs: "btn-xs",
63
83
  sm: "btn-sm",
64
84
  md: "",
65
85
  lg: "btn-lg",
66
86
  xl: "btn-xl"
67
- }, j = {
87
+ }, E = {
68
88
  square: "btn-square",
69
89
  circle: "btn-circle"
70
- }, L = [
90
+ }, F = [
71
91
  "btn",
72
- t && I[t],
73
- s && "btn-success",
74
- o && B[o],
75
- N[d],
76
- e && j[e],
77
- y
78
- ].filter(Boolean).join(" "), i = /* @__PURE__ */ n(
92
+ c && q[c],
93
+ n && "btn-success",
94
+ a && S[a],
95
+ W[l],
96
+ i && E[i],
97
+ // Only add position classes if not using tooltip (tooltip wrapper gets them instead)
98
+ !u && s && p[s],
99
+ B
100
+ ].filter(Boolean).join(" "), H = n ? w ?? (y ?? /* @__PURE__ */ t(V, {})) : v ?? (k ?? /* @__PURE__ */ t(P, {})), h = /* @__PURE__ */ t(
79
101
  "button",
80
102
  {
81
103
  type: "button",
82
- className: L,
83
- onClick: x,
84
- disabled: a,
85
- "aria-label": s ? r : c,
86
- ...v,
87
- children: s ? m ?? (p ?? /* @__PURE__ */ n(E, {})) : h ?? (b ?? /* @__PURE__ */ n(W, {}))
104
+ className: F,
105
+ onClick: L,
106
+ disabled: m,
107
+ "aria-label": n ? d : b,
108
+ ...z,
109
+ children: /* @__PURE__ */ t(r.Provider, { value: l, children: H })
88
110
  }
89
111
  );
90
- return k ? /* @__PURE__ */ n("div", { className: "tooltip", "data-tip": s ? r : c, children: i }) : i;
112
+ if (u) {
113
+ const e = ["tooltip", s && p[s]].filter(Boolean).join(" ");
114
+ return /* @__PURE__ */ t("div", { className: e, "data-tip": n ? d : b, children: h });
115
+ }
116
+ return h;
91
117
  };
92
- F.displayName = "CopyButton";
118
+ A.displayName = "CopyButton";
93
119
  export {
94
- F as CopyButton
120
+ A as CopyButton
95
121
  };
96
122
  //# sourceMappingURL=CopyButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CopyButton.js","sources":["../../src/components/CopyButton.tsx"],"sourcesContent":["import React from 'react'\nimport { useClipboard } from '../hooks/useClipboard'\n\nexport interface CopyButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onError'> {\n /** Text to copy to clipboard */\n text: string\n /** Duration in ms to show copied state */\n timeout?: number\n /** Button color */\n color?: 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'neutral'\n /** Button style variant */\n variant?: 'solid' | 'outline' | 'dash' | 'soft' | 'ghost' | 'link'\n /** Button size */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n /** Button shape */\n shape?: 'square' | 'circle'\n /** Custom icon for default state */\n icon?: React.ReactNode\n /** Custom icon for copied state */\n copiedIcon?: React.ReactNode\n /** Custom content for default state (overrides icon) */\n children?: React.ReactNode\n /** Custom content for copied state */\n copiedChildren?: React.ReactNode\n /** Callback when copy succeeds */\n onCopy?: () => void\n /** Callback when copy fails */\n onError?: (error: Error) => void\n /** Show tooltip with copy status */\n showTooltip?: boolean\n /** Tooltip text for default state */\n tooltipText?: string\n /** Tooltip text for copied state */\n copiedTooltipText?: string\n}\n\nconst CopyIcon: React.FC = () => (\n <svg\n className=\"w-4 h-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\" />\n </svg>\n)\n\nconst CheckIcon: React.FC = () => (\n <svg\n className=\"w-4 h-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth=\"2\" d=\"m4.5 12.75 6 6 9-13.5\" />\n </svg>\n)\n\nexport const CopyButton: React.FC<CopyButtonProps> = ({\n text,\n timeout = 2000,\n color,\n variant,\n size = 'md',\n shape,\n icon,\n copiedIcon,\n children,\n copiedChildren,\n onCopy,\n onError,\n showTooltip = false,\n tooltipText = 'Copy',\n copiedTooltipText = 'Copied!',\n className = '',\n disabled,\n onClick,\n ...rest\n}) => {\n const { copy, copied } = useClipboard(timeout)\n\n const handleClick = async (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e)\n if (disabled) return\n\n const success = await copy(text)\n if (success) {\n onCopy?.()\n } else {\n onError?.(new Error('Failed to copy to clipboard'))\n }\n }\n\n const colorClasses = {\n primary: 'btn-primary',\n secondary: 'btn-secondary',\n accent: 'btn-accent',\n info: 'btn-info',\n success: 'btn-success',\n warning: 'btn-warning',\n error: 'btn-error',\n neutral: 'btn-neutral',\n }\n\n const variantClasses = {\n solid: '',\n outline: 'btn-outline',\n dash: 'btn-dash',\n soft: 'btn-soft',\n ghost: 'btn-ghost',\n link: 'btn-link',\n }\n\n const sizeClasses = {\n xs: 'btn-xs',\n sm: 'btn-sm',\n md: '',\n lg: 'btn-lg',\n xl: 'btn-xl',\n }\n\n const shapeClasses = {\n square: 'btn-square',\n circle: 'btn-circle',\n }\n\n const classes = [\n 'btn',\n color && colorClasses[color],\n copied && 'btn-success',\n variant && variantClasses[variant],\n sizeClasses[size],\n shape && shapeClasses[shape],\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n const defaultIcon = icon ?? <CopyIcon />\n const successIcon = copiedIcon ?? <CheckIcon />\n\n const content = copied\n ? (copiedChildren ?? successIcon)\n : (children ?? defaultIcon)\n\n const button = (\n <button\n type=\"button\"\n className={classes}\n onClick={handleClick}\n disabled={disabled}\n aria-label={copied ? copiedTooltipText : tooltipText}\n {...rest}\n >\n {content}\n </button>\n )\n\n if (showTooltip) {\n return (\n <div className=\"tooltip\" data-tip={copied ? copiedTooltipText : tooltipText}>\n {button}\n </div>\n )\n }\n\n return button\n}\n\nCopyButton.displayName = 'CopyButton'\n"],"names":["CopyIcon","jsx","CheckIcon","CopyButton","text","timeout","color","variant","size","shape","icon","copiedIcon","children","copiedChildren","onCopy","onError","showTooltip","tooltipText","copiedTooltipText","className","disabled","onClick","rest","copy","copied","useClipboard","handleClick","e","colorClasses","variantClasses","sizeClasses","shapeClasses","classes","button"],"mappings":";;AAoCA,MAAMA,IAAqB,MACzB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAU;AAAA,IACV,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,QAAO;AAAA,IAEP,UAAA,gBAAAA,EAAC,UAAK,eAAc,SAAQ,gBAAe,SAAQ,aAAY,KAAI,GAAE,wHAAA,CAAwH;AAAA,EAAA;AAC/L,GAGIC,IAAsB,MAC1B,gBAAAD;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAU;AAAA,IACV,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,QAAO;AAAA,IAEP,UAAA,gBAAAA,EAAC,UAAK,eAAc,SAAQ,gBAAe,SAAQ,aAAY,KAAI,GAAE,wBAAA,CAAwB;AAAA,EAAA;AAC/F,GAGWE,IAAwC,CAAC;AAAA,EACpD,MAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,aAAAC,IAAc;AAAA,EACd,mBAAAC,IAAoB;AAAA,EACpB,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAM,EAAE,MAAAC,GAAM,QAAAC,MAAWC,EAAapB,CAAO,GAEvCqB,IAAc,OAAOC,MAA2C;AAEpE,QADAN,IAAUM,CAAC,GACPP,EAAU;AAGd,IADgB,MAAMG,EAAKnB,CAAI,IAE7BU,IAAA,IAEAC,IAAU,IAAI,MAAM,6BAA6B,CAAC;AAAA,EAEtD,GAEMa,IAAe;AAAA,IACnB,SAAS;AAAA,IACT,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,IACP,SAAS;AAAA,EAAA,GAGLC,IAAiB;AAAA,IACrB,OAAO;AAAA,IACP,SAAS;AAAA,IACT,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,EAAA,GAGFC,IAAc;AAAA,IAClB,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,GAGAC,IAAe;AAAA,IACnB,QAAQ;AAAA,IACR,QAAQ;AAAA,EAAA,GAGJC,IAAU;AAAA,IACd;AAAA,IACA1B,KAASsB,EAAatB,CAAK;AAAA,IAC3BkB,KAAU;AAAA,IACVjB,KAAWsB,EAAetB,CAAO;AAAA,IACjCuB,EAAYtB,CAAI;AAAA,IAChBC,KAASsB,EAAatB,CAAK;AAAA,IAC3BU;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,GASLc,IACJ,gBAAAhC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAW+B;AAAA,MACX,SAASN;AAAA,MACT,UAAAN;AAAA,MACA,cAAYI,IAASN,IAAoBD;AAAA,MACxC,GAAGK;AAAA,MAEH,UAbWE,IACXX,MAHeF,KAAc,gBAAAV,EAACC,GAAA,CAAA,CAAU,KAIxCU,MALeF,KAAQ,gBAAAT,EAACD,GAAA,CAAA,CAAS;AAAA,IAgBjC;AAAA,EAAA;AAIL,SAAIgB,IAEA,gBAAAf,EAAC,SAAI,WAAU,WAAU,YAAUuB,IAASN,IAAoBD,GAC7D,UAAAgB,EAAA,CACH,IAIGA;AACT;AAEA9B,EAAW,cAAc;"}
1
+ {"version":3,"file":"CopyButton.js","sources":["../../src/components/CopyButton.tsx"],"sourcesContent":["import React, { useContext } from 'react'\nimport { useClipboard } from '../hooks/useClipboard'\nimport { IconSizeContext } from '../contexts/IconSizeContext'\n\nconst iconSizeClasses = {\n xs: 'w-3.5 h-3.5',\n sm: 'w-3.5 h-3.5',\n md: 'w-4 h-4',\n lg: 'w-5 h-5',\n xl: 'w-6 h-6',\n}\n\nexport type CopyButtonPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'\n\nexport interface CopyButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onError'> {\n /** Text to copy to clipboard */\n text: string\n /** Duration in ms to show copied state */\n timeout?: number\n /** Button color */\n color?: 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'neutral'\n /** Button style variant */\n variant?: 'solid' | 'outline' | 'dash' | 'soft' | 'ghost' | 'link'\n /** Button size */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n /** Button shape */\n shape?: 'square' | 'circle'\n /** Absolute position within parent (parent must have position: relative) */\n position?: CopyButtonPosition\n /** Custom icon for default state */\n icon?: React.ReactNode\n /** Custom icon for copied state */\n copiedIcon?: React.ReactNode\n /** Custom content for default state (overrides icon) */\n children?: React.ReactNode\n /** Custom content for copied state */\n copiedChildren?: React.ReactNode\n /** Callback when copy succeeds */\n onCopy?: () => void\n /** Callback when copy fails */\n onError?: (error: Error) => void\n /** Show tooltip with copy status */\n showTooltip?: boolean\n /** Tooltip text for default state */\n tooltipText?: string\n /** Tooltip text for copied state */\n copiedTooltipText?: string\n}\n\nconst CopyIcon: React.FC = () => {\n const size = useContext(IconSizeContext) ?? 'md'\n return (\n <svg\n className={iconSizeClasses[size]}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\" />\n </svg>\n )\n}\n\nconst CheckIcon: React.FC = () => {\n const size = useContext(IconSizeContext) ?? 'md'\n return (\n <svg\n className={iconSizeClasses[size]}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth=\"2\" d=\"m4.5 12.75 6 6 9-13.5\" />\n </svg>\n )\n}\n\nconst positionClasses: Record<CopyButtonPosition, string> = {\n 'top-right': 'absolute top-2 right-2',\n 'top-left': 'absolute top-2 left-2',\n 'bottom-right': 'absolute bottom-2 right-2',\n 'bottom-left': 'absolute bottom-2 left-2',\n}\n\nexport const CopyButton: React.FC<CopyButtonProps> = ({\n text,\n timeout = 2000,\n color,\n variant,\n size = 'md',\n shape,\n position,\n icon,\n copiedIcon,\n children,\n copiedChildren,\n onCopy,\n onError,\n showTooltip = false,\n tooltipText = 'Copy',\n copiedTooltipText = 'Copied!',\n className = '',\n disabled,\n onClick,\n ...rest\n}) => {\n const { copy, copied } = useClipboard(timeout)\n\n const handleClick = async (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e)\n if (disabled) return\n\n const success = await copy(text)\n if (success) {\n onCopy?.()\n } else {\n onError?.(new Error('Failed to copy to clipboard'))\n }\n }\n\n const colorClasses = {\n primary: 'btn-primary',\n secondary: 'btn-secondary',\n accent: 'btn-accent',\n info: 'btn-info',\n success: 'btn-success',\n warning: 'btn-warning',\n error: 'btn-error',\n neutral: 'btn-neutral',\n }\n\n const variantClasses = {\n solid: '',\n outline: 'btn-outline',\n dash: 'btn-dash',\n soft: 'btn-soft',\n ghost: 'btn-ghost',\n link: 'btn-link',\n }\n\n const sizeClasses = {\n xs: 'btn-xs',\n sm: 'btn-sm',\n md: '',\n lg: 'btn-lg',\n xl: 'btn-xl',\n }\n\n const shapeClasses = {\n square: 'btn-square',\n circle: 'btn-circle',\n }\n\n const classes = [\n 'btn',\n color && colorClasses[color],\n copied && 'btn-success',\n variant && variantClasses[variant],\n sizeClasses[size],\n shape && shapeClasses[shape],\n // Only add position classes if not using tooltip (tooltip wrapper gets them instead)\n !showTooltip && position && positionClasses[position],\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n const defaultIcon = icon ?? <CopyIcon />\n const successIcon = copiedIcon ?? <CheckIcon />\n\n const content = copied\n ? (copiedChildren ?? successIcon)\n : (children ?? defaultIcon)\n\n const button = (\n <button\n type=\"button\"\n className={classes}\n onClick={handleClick}\n disabled={disabled}\n aria-label={copied ? copiedTooltipText : tooltipText}\n {...rest}\n >\n <IconSizeContext.Provider value={size}>\n {content}\n </IconSizeContext.Provider>\n </button>\n )\n\n if (showTooltip) {\n const tooltipClasses = ['tooltip', position && positionClasses[position]].filter(Boolean).join(' ')\n return (\n <div className={tooltipClasses} data-tip={copied ? copiedTooltipText : tooltipText}>\n {button}\n </div>\n )\n }\n\n return button\n}\n\nCopyButton.displayName = 'CopyButton'\n"],"names":["iconSizeClasses","CopyIcon","size","useContext","IconSizeContext","jsx","CheckIcon","positionClasses","CopyButton","text","timeout","color","variant","shape","position","icon","copiedIcon","children","copiedChildren","onCopy","onError","showTooltip","tooltipText","copiedTooltipText","className","disabled","onClick","rest","copy","copied","useClipboard","handleClick","colorClasses","variantClasses","sizeClasses","shapeClasses","classes","content","button","tooltipClasses"],"mappings":"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"}
@@ -2,30 +2,44 @@ import { default as React } from 'react';
2
2
  export type DescriptionsSize = 'sm' | 'md' | 'lg';
3
3
  export type DescriptionsLayout = 'horizontal' | 'vertical';
4
4
  export interface DescriptionsItemProps {
5
+ /** Unique key for the item */
6
+ itemKey?: string;
5
7
  /** Label for the item */
6
8
  label?: React.ReactNode;
7
- /** Number of columns to span */
8
- span?: number;
9
+ /** Number of columns to span, or 'filled' to fill remaining space */
10
+ span?: number | 'filled';
9
11
  /** Content of the item */
10
12
  children?: React.ReactNode;
11
13
  /** Custom label styles */
12
14
  labelStyle?: React.CSSProperties;
13
15
  /** Custom content styles */
14
16
  contentStyle?: React.CSSProperties;
17
+ /** Custom label class */
18
+ labelClassName?: string;
19
+ /** Custom content class */
20
+ contentClassName?: string;
15
21
  }
16
22
  /** Item configuration for the items prop */
17
23
  export interface DescriptionsItemConfig {
24
+ /** Unique key for the item (used for test IDs and React keys) */
25
+ key?: string;
18
26
  /** Label for the item */
19
27
  label: React.ReactNode;
20
28
  /** Content of the item */
21
29
  children: React.ReactNode;
22
- /** Number of columns to span */
23
- span?: number;
30
+ /** Number of columns to span, or 'filled' to fill remaining space */
31
+ span?: number | 'filled';
24
32
  /** Custom label styles */
25
33
  labelStyle?: React.CSSProperties;
26
34
  /** Custom content styles */
27
35
  contentStyle?: React.CSSProperties;
36
+ /** Custom label class */
37
+ labelClassName?: string;
38
+ /** Custom content class */
39
+ contentClassName?: string;
28
40
  }
41
+ /** Semantic DOM structure for styles/classNames */
42
+ export type DescriptionsSemanticDOM = 'root' | 'header' | 'title' | 'extra' | 'table' | 'label' | 'content';
29
43
  export interface DescriptionsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
30
44
  /** Title of the descriptions block */
31
45
  title?: React.ReactNode;
@@ -48,10 +62,14 @@ export interface DescriptionsProps extends Omit<React.HTMLAttributes<HTMLDivElem
48
62
  layout?: DescriptionsLayout;
49
63
  /** Show colon after labels */
50
64
  colon?: boolean;
51
- /** Default label styles */
65
+ /** Default label styles (deprecated, use styles.label) */
52
66
  labelStyle?: React.CSSProperties;
53
- /** Default content styles */
67
+ /** Default content styles (deprecated, use styles.content) */
54
68
  contentStyle?: React.CSSProperties;
69
+ /** Semantic styles for component parts */
70
+ styles?: Partial<Record<DescriptionsSemanticDOM, React.CSSProperties>>;
71
+ /** Semantic classNames for component parts */
72
+ classNames?: Partial<Record<DescriptionsSemanticDOM, string>>;
55
73
  /** Item configurations (alternative to children) */
56
74
  items?: DescriptionsItemConfig[];
57
75
  /** Children (Descriptions.Item elements) */
@@ -1,134 +1,221 @@
1
- import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
- import y, { forwardRef as B } from "react";
3
- function H(c) {
1
+ import { jsxs as y, jsx as r } from "react/jsx-runtime";
2
+ import g, { forwardRef as q, useId as G, useState as J, useEffect as Q } from "react";
3
+ function T(n) {
4
4
  return null;
5
5
  }
6
- const O = {
6
+ const U = {
7
7
  sm: "text-sm",
8
8
  md: "text-base",
9
9
  lg: "text-lg"
10
- }, N = B(
10
+ }, S = {
11
+ xs: 0,
12
+ sm: 640,
13
+ md: 768,
14
+ lg: 1024,
15
+ xl: 1280,
16
+ "2xl": 1536
17
+ };
18
+ function X(n) {
19
+ const [h, i] = J(() => typeof n == "number" ? n : n.md ?? n.sm ?? n.xs ?? 3);
20
+ return Q(() => {
21
+ if (typeof n == "number") {
22
+ i(n);
23
+ return;
24
+ }
25
+ const $ = () => {
26
+ const k = window.innerWidth, u = Object.keys(S).filter((c) => n[c] !== void 0).sort((c, m) => S[m] - S[c]);
27
+ for (const c of u)
28
+ if (k >= S[c]) {
29
+ i(n[c]);
30
+ return;
31
+ }
32
+ const C = u[u.length - 1];
33
+ i(C ? n[C] : 3);
34
+ };
35
+ return $(), window.addEventListener("resize", $), () => window.removeEventListener("resize", $);
36
+ }, [n]), h;
37
+ }
38
+ const R = q(
11
39
  ({
12
- title: c,
13
- extra: S,
14
- bordered: d = !1,
15
- column: b = 3,
16
- size: $ = "md",
17
- layout: j = "horizontal",
18
- colon: g = !0,
19
- labelStyle: x,
20
- contentStyle: v,
21
- items: C,
22
- className: M = "",
23
- style: R,
40
+ title: n,
41
+ extra: h,
42
+ bordered: i = !1,
43
+ column: $ = 3,
44
+ size: k = "md",
45
+ layout: u = "horizontal",
46
+ colon: C = !0,
47
+ labelStyle: c,
48
+ contentStyle: m,
49
+ styles: d,
50
+ classNames: b,
51
+ items: x,
52
+ className: z = "",
53
+ style: B,
24
54
  children: D,
25
- "data-testid": u = "descriptions",
26
- ...L
27
- }, z) => {
28
- const w = C || y.Children.toArray(D).filter(
29
- (t) => y.isValidElement(t)
55
+ "data-testid": s = "descriptions",
56
+ ...E
57
+ }, M) => {
58
+ const w = G(), f = X($), F = { ...c, ...d?.label }, O = { ...m, ...d?.content }, V = (x || g.Children.toArray(D).filter(
59
+ (t) => g.isValidElement(t)
30
60
  ).map((t) => ({
61
+ key: t.props.itemKey ?? t.key?.toString().replace(/^\.\$/, ""),
31
62
  label: t.props.label,
32
63
  children: t.props.children,
33
64
  span: t.props.span,
34
65
  labelStyle: t.props.labelStyle,
35
- contentStyle: t.props.contentStyle
36
- })), r = typeof b == "number" ? b : b.md || b.sm || b.xs || 3, E = () => {
37
- const t = [];
38
- let s = [], l = 0;
39
- return w.forEach((n) => {
40
- const o = n.span || 1, e = Math.min(o, r);
41
- l + e > r ? (t.push(s), s = [n], l = e) : (s.push(n), l += e);
42
- }), s.length > 0 && t.push(s), t.map((n, o) => /* @__PURE__ */ i(y.Fragment, { children: [
43
- /* @__PURE__ */ a("tr", { children: n.map((e, f) => {
44
- const h = e.span || 1, p = Math.min(h, r), m = e.labelStyle || x;
45
- return /* @__PURE__ */ i(
46
- "th",
47
- {
48
- className: `${d ? "border border-base-content/10" : ""} bg-base-200/50 font-semibold text-left px-4 py-2`,
49
- style: m,
50
- colSpan: p,
51
- scope: "col",
52
- children: [
53
- e.label,
54
- g && e.label && ":"
55
- ]
56
- },
57
- f
58
- );
59
- }) }),
60
- /* @__PURE__ */ a("tr", { children: n.map((e, f) => {
61
- const h = e.span || 1, p = Math.min(h, r), m = e.contentStyle || v;
62
- return /* @__PURE__ */ a(
63
- "td",
64
- {
65
- className: `${d ? "border border-base-content/10" : ""} bg-base-100 px-4 py-2`,
66
- style: m,
67
- colSpan: p,
68
- children: e.children
69
- },
70
- f
71
- );
72
- }) })
73
- ] }, o));
74
- }, F = () => {
66
+ contentStyle: t.props.contentStyle,
67
+ labelClassName: t.props.labelClassName,
68
+ contentClassName: t.props.contentClassName
69
+ }))).map((t, a) => ({
70
+ ...t,
71
+ _key: t.key ?? `item-${a}`,
72
+ _index: a
73
+ })), v = (() => {
75
74
  const t = [];
76
- let s = [], l = 0;
77
- return w.forEach((n) => {
78
- const o = n.span || 1, e = Math.min(o, r);
79
- l + e > r ? (t.push(s), s = [n], l = e) : (s.push(n), l += e);
80
- }), s.length > 0 && t.push(s), t.map((n, o) => /* @__PURE__ */ a("tr", { children: n.map((e, f) => {
81
- const h = e.span || 1, p = Math.min(h, r), m = e.labelStyle || x, A = e.contentStyle || v;
82
- return /* @__PURE__ */ i(y.Fragment, { children: [
83
- /* @__PURE__ */ i(
84
- "th",
75
+ let a = [], e = 0;
76
+ return V.forEach((l) => {
77
+ if (l.span === "filled")
78
+ a.length > 0 ? (a.push({ ...l, span: f - e }), t.push(a), a = [], e = 0) : t.push([{ ...l, span: f }]);
79
+ else {
80
+ const p = l.span ?? 1, o = Math.min(p, f);
81
+ e + o > f ? (t.push(a), a = [l], e = o) : (a.push(l), e += o);
82
+ }
83
+ }), a.length > 0 && t.push(a), t;
84
+ })(), _ = (t) => [
85
+ i ? "border border-base-content/10" : "",
86
+ "bg-base-200/50 font-semibold text-base-content/70 text-left px-4 py-2",
87
+ u === "horizontal" ? "whitespace-nowrap" : "",
88
+ b?.label ?? "",
89
+ t.labelClassName ?? ""
90
+ ].filter(Boolean).join(" "), j = (t) => [
91
+ i ? "border border-base-content/10" : "",
92
+ "bg-base-100 text-base-content px-4 py-2",
93
+ b?.content ?? "",
94
+ t.contentClassName ?? ""
95
+ ].filter(Boolean).join(" "), N = (t) => ({
96
+ ...F,
97
+ ...t.labelStyle
98
+ }), L = (t) => ({
99
+ ...O,
100
+ ...t.contentStyle
101
+ }), A = () => v.map((t, a) => /* @__PURE__ */ y(g.Fragment, { children: [
102
+ /* @__PURE__ */ r("tr", { "data-testid": `${s}-row-${a}-labels`, children: t.map((e) => {
103
+ const l = typeof e.span == "number" ? e.span : 1, p = Math.min(l, f), o = `${w}-${e._key}-label`;
104
+ return /* @__PURE__ */ y(
105
+ "th",
106
+ {
107
+ id: o,
108
+ className: _(e),
109
+ style: N(e),
110
+ colSpan: p,
111
+ scope: "col",
112
+ "data-testid": `${s}-${e._key}-label`,
113
+ children: [
114
+ e.label,
115
+ C && e.label && /* @__PURE__ */ r("span", { "aria-hidden": "true", children: ":" })
116
+ ]
117
+ },
118
+ e._key
119
+ );
120
+ }) }),
121
+ /* @__PURE__ */ r("tr", { "data-testid": `${s}-row-${a}-values`, children: t.map((e) => {
122
+ const l = typeof e.span == "number" ? e.span : 1, p = Math.min(l, f), o = `${w}-${e._key}-label`;
123
+ return /* @__PURE__ */ r(
124
+ "td",
125
+ {
126
+ className: j(e),
127
+ style: L(e),
128
+ colSpan: p,
129
+ "aria-labelledby": o,
130
+ "data-testid": `${s}-${e._key}-content`,
131
+ children: e.children
132
+ },
133
+ e._key
134
+ );
135
+ }) })
136
+ ] }, t.map((e) => e._key).join("-"))), H = () => v.map((t, a) => /* @__PURE__ */ r("tr", { "data-testid": `${s}-row-${a}`, children: t.map((e) => {
137
+ const l = typeof e.span == "number" ? e.span : 1, p = Math.min(l, f), o = `${w}-${e._key}-label`;
138
+ return /* @__PURE__ */ y(g.Fragment, { children: [
139
+ /* @__PURE__ */ y(
140
+ "th",
141
+ {
142
+ id: o,
143
+ className: _(e),
144
+ style: N(e),
145
+ scope: "row",
146
+ "data-testid": `${s}-${e._key}-label`,
147
+ children: [
148
+ e.label,
149
+ C && e.label && /* @__PURE__ */ r("span", { "aria-hidden": "true", children: ":" })
150
+ ]
151
+ }
152
+ ),
153
+ /* @__PURE__ */ r(
154
+ "td",
155
+ {
156
+ className: j(e),
157
+ style: L(e),
158
+ colSpan: p > 1 ? p * 2 - 1 : 1,
159
+ "aria-labelledby": o,
160
+ "data-testid": `${s}-${e._key}-content`,
161
+ children: e.children
162
+ }
163
+ )
164
+ ] }, e._key);
165
+ }) }, t.map((e) => e._key).join("-"))), K = [
166
+ "w-full",
167
+ i && "border-collapse",
168
+ U[k],
169
+ b?.table ?? "",
170
+ z
171
+ ].filter(Boolean).join(" "), W = [b?.root ?? ""].filter(Boolean).join(" ");
172
+ return /* @__PURE__ */ y(
173
+ "div",
174
+ {
175
+ ref: M,
176
+ className: W || void 0,
177
+ style: { ...d?.root, ...B },
178
+ "data-testid": s,
179
+ ...E,
180
+ children: [
181
+ (n || h) && /* @__PURE__ */ y(
182
+ "div",
85
183
  {
86
- className: `${d ? "border border-base-content/10" : ""} bg-base-200/50 font-semibold text-left px-4 py-2 whitespace-nowrap`,
87
- style: m,
88
- scope: "row",
184
+ className: `flex items-center justify-between mb-4 ${b?.header ?? ""}`,
185
+ style: d?.header,
186
+ "data-testid": `${s}-header`,
89
187
  children: [
90
- e.label,
91
- g && e.label && ":"
188
+ n && /* @__PURE__ */ r(
189
+ "div",
190
+ {
191
+ className: `text-lg font-semibold ${b?.title ?? ""}`,
192
+ style: d?.title,
193
+ "data-testid": `${s}-title`,
194
+ children: n
195
+ }
196
+ ),
197
+ h && /* @__PURE__ */ r(
198
+ "div",
199
+ {
200
+ className: b?.extra ?? "",
201
+ style: d?.extra,
202
+ "data-testid": `${s}-extra`,
203
+ children: h
204
+ }
205
+ )
92
206
  ]
93
207
  }
94
208
  ),
95
- /* @__PURE__ */ a(
96
- "td",
97
- {
98
- className: `${d ? "border border-base-content/10" : ""} bg-base-100 px-4 py-2`,
99
- style: A,
100
- colSpan: p > 1 ? p * 2 - 1 : 1,
101
- children: e.children
102
- }
103
- )
104
- ] }, f);
105
- }) }, o));
106
- }, V = [
107
- "w-full",
108
- d && "border-collapse",
109
- O[$],
110
- M
111
- ].filter(Boolean).join(" ");
112
- return /* @__PURE__ */ i(
113
- "div",
114
- {
115
- ref: z,
116
- style: R,
117
- "data-testid": u,
118
- ...L,
119
- children: [
120
- (c || S) && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4", "data-testid": `${u}-header`, children: [
121
- c && /* @__PURE__ */ a("div", { className: "text-lg font-semibold", children: c }),
122
- S && /* @__PURE__ */ a("div", { "data-testid": `${u}-extra`, children: S })
123
- ] }),
124
- /* @__PURE__ */ a(
209
+ /* @__PURE__ */ y(
125
210
  "table",
126
211
  {
127
- className: V,
128
- role: "table",
129
- "aria-label": typeof c == "string" ? c : void 0,
130
- "data-testid": `${u}-table`,
131
- children: /* @__PURE__ */ a("tbody", { children: j === "vertical" ? E() : F() })
212
+ className: K,
213
+ style: d?.table,
214
+ "data-testid": `${s}-table`,
215
+ children: [
216
+ n && /* @__PURE__ */ r("caption", { className: "sr-only", children: typeof n == "string" ? n : "Description list" }),
217
+ /* @__PURE__ */ r("tbody", { children: u === "vertical" ? A() : H() })
218
+ ]
132
219
  }
133
220
  )
134
221
  ]
@@ -136,12 +223,12 @@ const O = {
136
223
  );
137
224
  }
138
225
  );
139
- N.displayName = "Descriptions";
140
- const G = Object.assign(N, {
141
- Item: H
226
+ R.displayName = "Descriptions";
227
+ const I = Object.assign(R, {
228
+ Item: T
142
229
  });
143
230
  export {
144
- G as Descriptions,
145
- G as default
231
+ I as Descriptions,
232
+ I as default
146
233
  };
147
234
  //# sourceMappingURL=Descriptions.js.map