asterui 0.12.21 → 0.12.22

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 (62) hide show
  1. package/dist/components/VirtualList.d.ts +29 -0
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.js +46 -44
  4. package/dist/index.js.map +1 -1
  5. package/dist/index10.js +1 -1
  6. package/dist/index100.js +32 -5
  7. package/dist/index100.js.map +1 -1
  8. package/dist/index101.js +5 -13
  9. package/dist/index101.js.map +1 -1
  10. package/dist/index102.js +11 -43
  11. package/dist/index102.js.map +1 -1
  12. package/dist/index103.js +44 -11
  13. package/dist/index103.js.map +1 -1
  14. package/dist/index104.js +10 -12
  15. package/dist/index104.js.map +1 -1
  16. package/dist/index105.js +14 -7
  17. package/dist/index105.js.map +1 -1
  18. package/dist/index106.js +7 -12
  19. package/dist/index106.js.map +1 -1
  20. package/dist/index107.js +11 -29
  21. package/dist/index107.js.map +1 -1
  22. package/dist/index108.js +29 -16
  23. package/dist/index108.js.map +1 -1
  24. package/dist/index109.js +21 -0
  25. package/dist/index109.js.map +1 -0
  26. package/dist/index11.js +14 -14
  27. package/dist/index110.js +36 -0
  28. package/dist/index110.js.map +1 -0
  29. package/dist/index111.js +523 -0
  30. package/dist/index111.js.map +1 -0
  31. package/dist/index112.js +53 -0
  32. package/dist/index112.js.map +1 -0
  33. package/dist/index20.js +8 -8
  34. package/dist/index23.js +13 -13
  35. package/dist/index28.js +2 -2
  36. package/dist/index36.js +5 -5
  37. package/dist/index40.js +6 -6
  38. package/dist/index41.js +30 -30
  39. package/dist/index45.js +5 -5
  40. package/dist/index47.js +15 -15
  41. package/dist/index51.js +18 -18
  42. package/dist/index51.js.map +1 -1
  43. package/dist/index55.js +4 -4
  44. package/dist/index55.js.map +1 -1
  45. package/dist/index58.js +22 -22
  46. package/dist/index62.js +12 -12
  47. package/dist/index64.js +13 -13
  48. package/dist/index68.js +12 -12
  49. package/dist/index71.js +19 -19
  50. package/dist/index76.js +2 -2
  51. package/dist/index77.js +21 -21
  52. package/dist/index8.js +18 -18
  53. package/dist/index80.js +13 -13
  54. package/dist/index82.js +23 -23
  55. package/dist/index88.js +2 -2
  56. package/dist/index97.js +61 -121
  57. package/dist/index97.js.map +1 -1
  58. package/dist/index98.js +126 -14
  59. package/dist/index98.js.map +1 -1
  60. package/dist/index99.js +12 -31
  61. package/dist/index99.js.map +1 -1
  62. package/package.json +6 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index51.js","sources":["../src/components/Masonry.tsx"],"sourcesContent":["import React, { useRef, useState, useLayoutEffect, useCallback } from 'react'\n\nexport interface MasonryProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode\n columns?:\n | number\n | {\n xs?: number\n sm?: number\n md?: number\n lg?: number\n xl?: number\n '2xl'?: number\n }\n gap?: number\n}\n\n// Tailwind breakpoints in pixels\nconst BREAKPOINTS = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n}\n\nfunction getColumnsForWidth(\n columns: MasonryProps['columns'],\n width: number\n): number {\n if (typeof columns === 'number') {\n return columns\n }\n\n if (!columns) return 3\n\n // Find the appropriate column count for current width\n // Start from largest breakpoint and work down\n if (columns['2xl'] !== undefined && width >= BREAKPOINTS['2xl']) {\n return columns['2xl']\n }\n if (columns.xl !== undefined && width >= BREAKPOINTS.xl) {\n return columns.xl\n }\n if (columns.lg !== undefined && width >= BREAKPOINTS.lg) {\n return columns.lg\n }\n if (columns.md !== undefined && width >= BREAKPOINTS.md) {\n return columns.md\n }\n if (columns.sm !== undefined && width >= BREAKPOINTS.sm) {\n return columns.sm\n }\n if (columns.xs !== undefined) {\n return columns.xs\n }\n\n // Default fallback\n return 3\n}\n\nexport const Masonry: React.FC<MasonryProps> = ({\n children,\n columns = 3,\n gap = 16,\n className = '',\n style,\n ...rest\n}) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [positions, setPositions] = useState<\n Array<{ left: number; top: number }>\n >([])\n const [containerHeight, setContainerHeight] = useState(0)\n const itemRefs = useRef<(HTMLDivElement | null)[]>([])\n\n const childArray = React.Children.toArray(children)\n\n const calculateLayout = useCallback(() => {\n const container = containerRef.current\n if (!container || childArray.length === 0) return\n\n const containerWidth = container.offsetWidth\n // Use viewport width for responsive breakpoints (matches Tailwind behavior)\n const viewportWidth = typeof window !== 'undefined' ? window.innerWidth : containerWidth\n const numColumns = getColumnsForWidth(columns, viewportWidth)\n const columnWidth = (containerWidth - gap * (numColumns - 1)) / numColumns\n\n // Track height of each column\n const columnHeights = new Array(numColumns).fill(0)\n const newPositions: Array<{ left: number; top: number }> = []\n\n // Place each item in the shortest column\n childArray.forEach((_, index) => {\n const itemEl = itemRefs.current[index]\n if (!itemEl) return\n\n // Find shortest column\n let shortestColumn = 0\n let minHeight = columnHeights[0]\n for (let i = 1; i < numColumns; i++) {\n if (columnHeights[i] < minHeight) {\n minHeight = columnHeights[i]\n shortestColumn = i\n }\n }\n\n // Calculate position\n const left = shortestColumn * (columnWidth + gap)\n const top = columnHeights[shortestColumn]\n\n newPositions[index] = { left, top }\n\n // Update column height\n const itemHeight = itemEl.offsetHeight\n columnHeights[shortestColumn] += itemHeight + gap\n })\n\n setPositions(newPositions)\n setContainerHeight(Math.max(...columnHeights) - gap)\n }, [children, columns, gap, childArray.length])\n\n // Calculate layout after render and on resize\n useLayoutEffect(() => {\n calculateLayout()\n\n const handleResize = () => {\n calculateLayout()\n }\n\n window.addEventListener('resize', handleResize)\n return () => window.removeEventListener('resize', handleResize)\n }, [calculateLayout])\n\n // Recalculate when children change\n useLayoutEffect(() => {\n // Small delay to ensure refs are populated\n const timer = setTimeout(calculateLayout, 0)\n return () => clearTimeout(timer)\n }, [children, calculateLayout])\n\n const containerWidth = containerRef.current?.offsetWidth ?? 0\n const viewportWidth = typeof window !== 'undefined' ? window.innerWidth : containerWidth\n const numColumns = getColumnsForWidth(columns, viewportWidth)\n const columnWidth =\n containerWidth > 0\n ? (containerWidth - gap * (numColumns - 1)) / numColumns\n : 0\n\n return (\n <div\n ref={containerRef}\n className={className}\n style={{\n position: 'relative',\n height: containerHeight > 0 ? containerHeight : undefined,\n ...style,\n }}\n {...rest}\n >\n {childArray.map((child, index) => (\n <div\n key={index}\n ref={(el) => {\n itemRefs.current[index] = el\n }}\n style={{\n position: positions.length > 0 ? 'absolute' : 'relative',\n left: positions[index]?.left ?? 0,\n top: positions[index]?.top ?? 0,\n width: columnWidth > 0 ? columnWidth : '100%',\n visibility: positions.length > 0 ? 'visible' : 'hidden',\n }}\n >\n {child}\n </div>\n ))}\n </div>\n )\n}\n\nMasonry.displayName = 'Masonry'\n\nexport default Masonry\n"],"names":["BREAKPOINTS","getColumnsForWidth","columns","width","Masonry","children","gap","className","style","rest","containerRef","useRef","positions","setPositions","useState","containerHeight","setContainerHeight","itemRefs","childArray","React","calculateLayout","useCallback","container","containerWidth","viewportWidth","numColumns","columnWidth","columnHeights","newPositions","index","itemEl","shortestColumn","minHeight","i","left","top","itemHeight","useLayoutEffect","handleResize","timer","jsx","child","el"],"mappings":";;AAkBA,MAAMA,IAAc;AAAA,EAClB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AACT;AAEA,SAASC,EACPC,GACAC,GACQ;AACR,SAAI,OAAOD,KAAY,WACdA,IAGJA,IAIDA,EAAQ,KAAK,MAAM,UAAaC,KAASH,EAAY,KAAK,IACrDE,EAAQ,KAAK,IAElBA,EAAQ,OAAO,UAAaC,KAASH,EAAY,KAC5CE,EAAQ,KAEbA,EAAQ,OAAO,UAAaC,KAASH,EAAY,KAC5CE,EAAQ,KAEbA,EAAQ,OAAO,UAAaC,KAASH,EAAY,KAC5CE,EAAQ,KAEbA,EAAQ,OAAO,UAAaC,KAASH,EAAY,KAC5CE,EAAQ,KAEbA,EAAQ,OAAO,SACVA,EAAQ,KAIV,IAxBc;AAyBvB;AAEO,MAAME,IAAkC,CAAC;AAAA,EAC9C,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AAY;AAAA,UAAA;AAAA,UAGhD,UAAA6B;AAAA,QAAA;AAAA,QAZIZ;AAAA,MAAA,CAcR;AAAA,IAAA;AAAA,EAAA;AAGP;AAEAzB,EAAQ,cAAc;"}
1
+ {"version":3,"file":"index51.js","sources":["../src/components/Masonry.tsx"],"sourcesContent":["import React, { useRef, useState, useLayoutEffect, useCallback } from 'react'\n\nexport interface MasonryProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode\n columns?:\n | number\n | {\n xs?: number\n sm?: number\n md?: number\n lg?: number\n xl?: number\n '2xl'?: number\n }\n gap?: number\n}\n\n// Tailwind breakpoints in pixels\nconst BREAKPOINTS = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n}\n\nfunction getColumnsForWidth(\n columns: MasonryProps['columns'],\n width: number\n): number {\n if (typeof columns === 'number') {\n return columns\n }\n\n if (!columns) return 3\n\n // Find the appropriate column count for current width\n // Start from largest breakpoint and work down\n if (columns['2xl'] !== undefined && width >= BREAKPOINTS['2xl']) {\n return columns['2xl']\n }\n if (columns.xl !== undefined && width >= BREAKPOINTS.xl) {\n return columns.xl\n }\n if (columns.lg !== undefined && width >= BREAKPOINTS.lg) {\n return columns.lg\n }\n if (columns.md !== undefined && width >= BREAKPOINTS.md) {\n return columns.md\n }\n if (columns.sm !== undefined && width >= BREAKPOINTS.sm) {\n return columns.sm\n }\n if (columns.xs !== undefined) {\n return columns.xs\n }\n\n // Default fallback\n return 3\n}\n\nexport const Masonry: React.FC<MasonryProps> = ({\n children,\n columns = 3,\n gap = 16,\n className = '',\n style,\n ...rest\n}) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [positions, setPositions] = useState<\n Array<{ left: number; top: number }>\n >([])\n const [containerHeight, setContainerHeight] = useState(0)\n const itemRefs = useRef<(HTMLDivElement | null)[]>([])\n\n const childArray = React.Children.toArray(children)\n\n const calculateLayout = useCallback(() => {\n const container = containerRef.current\n if (!container || childArray.length === 0) return\n\n const containerWidth = container.offsetWidth\n // Use viewport width for responsive breakpoints (matches Tailwind behavior)\n const viewportWidth = typeof window !== 'undefined' ? window.innerWidth : containerWidth\n const numColumns = getColumnsForWidth(columns, viewportWidth)\n const columnWidth = (containerWidth - gap * (numColumns - 1)) / numColumns\n\n // Track height of each column\n const columnHeights = new Array(numColumns).fill(0)\n const newPositions: Array<{ left: number; top: number }> = []\n\n // Place each item in the shortest column\n childArray.forEach((_, index) => {\n const itemEl = itemRefs.current[index]\n if (!itemEl) return\n\n // Find shortest column\n let shortestColumn = 0\n let minHeight = columnHeights[0]\n for (let i = 1; i < numColumns; i++) {\n if (columnHeights[i] < minHeight) {\n minHeight = columnHeights[i]\n shortestColumn = i\n }\n }\n\n // Calculate position\n const left = shortestColumn * (columnWidth + gap)\n const top = columnHeights[shortestColumn]\n\n newPositions[index] = { left, top }\n\n // Update column height\n const itemHeight = itemEl.offsetHeight\n columnHeights[shortestColumn] += itemHeight + gap\n })\n\n setPositions(newPositions)\n setContainerHeight(Math.max(...columnHeights) - gap)\n }, [children, columns, gap, childArray.length])\n\n // Calculate layout after render and on resize\n useLayoutEffect(() => {\n calculateLayout()\n\n const handleResize = () => {\n calculateLayout()\n }\n\n window.addEventListener('resize', handleResize)\n return () => window.removeEventListener('resize', handleResize)\n }, [calculateLayout])\n\n // Recalculate when children change\n useLayoutEffect(() => {\n // Small delay to ensure refs are populated\n const timer = setTimeout(calculateLayout, 0)\n return () => clearTimeout(timer)\n }, [children, calculateLayout])\n\n const containerWidth = containerRef.current?.offsetWidth ?? 0\n const viewportWidth = typeof window !== 'undefined' ? window.innerWidth : containerWidth\n const numColumns = getColumnsForWidth(columns, viewportWidth)\n const columnWidth =\n containerWidth > 0\n ? (containerWidth - gap * (numColumns - 1)) / numColumns\n : 0\n\n return (\n <div\n ref={containerRef}\n className={className}\n style={{\n position: 'relative',\n height: containerHeight > 0 ? containerHeight : undefined,\n ...style,\n }}\n {...rest}\n >\n {childArray.map((child, index) => (\n <div\n key={index}\n ref={(el) => {\n itemRefs.current[index] = el\n }}\n style={{\n position: positions.length > 0 ? 'absolute' : 'relative',\n left: positions[index]?.left ?? 0,\n top: positions[index]?.top ?? 0,\n width: columnWidth > 0 ? columnWidth : '100%',\n visibility: positions.length > 0 ? 'visible' : 'hidden',\n }}\n >\n {child}\n </div>\n ))}\n </div>\n )\n}\n\nMasonry.displayName = 'Masonry'\n\nexport default Masonry\n"],"names":["BREAKPOINTS","getColumnsForWidth","columns","width","Masonry","children","gap","className","style","rest","containerRef","useRef","positions","setPositions","useState","containerHeight","setContainerHeight","itemRefs","childArray","React","calculateLayout","useCallback","container","containerWidth","viewportWidth","numColumns","columnWidth","columnHeights","newPositions","_","index","itemEl","shortestColumn","minHeight","i","left","top","itemHeight","useLayoutEffect","handleResize","timer","jsx","child","el"],"mappings":";;AAkBA,MAAMA,IAAc;AAAA,EAClB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AACT;AAEA,SAASC,EACPC,GACAC,GACQ;AACR,SAAI,OAAOD,KAAY,WACdA,IAGJA,IAIDA,EAAQ,KAAK,MAAM,UAAaC,KAASH,EAAY,KAAK,IACrDE,EAAQ,KAAK,IAElBA,EAAQ,OAAO,UAAaC,KAASH,EAAY,KAC5CE,EAAQ,KAEbA,EAAQ,OAAO,UAAaC,KAASH,EAAY,KAC5CE,EAAQ,KAEbA,EAAQ,OAAO,UAAaC,KAASH,EAAY,KAC5CE,EAAQ,KAEbA,EAAQ,OAAO,UAAaC,KAASH,EAAY,KAC5CE,EAAQ,KAEbA,EAAQ,OAAO,SACVA,EAAQ,KAIV,IAxBc;AAyBvB;AAEO,MAAME,IAAkC,CAAC;AAAA,EAC9C,UAAAC;AAAA,EACA,SAAAH,IAAU;AAAA,EACV,KAAAI,IAAM;AAAA,EACN,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAeC,EAA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.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
2
  import p from "react";
3
- import { CopyButton as c } from "./index10.js";
4
- const a = ({
3
+ import { CopyButton as a } from "./index10.js";
4
+ const c = ({
5
5
  children: e,
6
6
  prefix: o = "$",
7
7
  highlight: t = !1,
@@ -41,7 +41,7 @@ const a = ({
41
41
  children: [
42
42
  e,
43
43
  s !== null && /* @__PURE__ */ r("div", { style: { position: "absolute", top: 8, right: 8 }, children: /* @__PURE__ */ r(
44
- c,
44
+ a,
45
45
  {
46
46
  text: s,
47
47
  size: "xs",
@@ -53,7 +53,7 @@ const a = ({
53
53
  }
54
54
  );
55
55
  };
56
- f.Line = a;
56
+ f.Line = c;
57
57
  export {
58
58
  f as Code
59
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index55.js","sources":["../src/components/Code.tsx"],"sourcesContent":["import React from 'react'\nimport { CopyButton } from './CopyButton'\n\nexport interface CodeLineProps extends React.HTMLAttributes<HTMLPreElement> {\n children: React.ReactNode\n prefix?: string\n highlight?: boolean\n}\n\nconst Line: React.FC<CodeLineProps> = ({\n children,\n prefix = '$',\n highlight = false,\n className = '',\n ...rest\n}) => {\n return (\n <pre\n data-prefix={prefix}\n className={`${highlight ? 'bg-warning text-warning-content' : ''} ${className}`}\n {...rest}\n >\n <code>{children}</code>\n </pre>\n )\n}\n\nexport interface CodeProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode\n /** Show copy button. Pass true to auto-extract text, or a string to specify custom copy text */\n copyable?: boolean | string\n}\n\nconst extractTextFromChildren = (children: React.ReactNode): string => {\n const lines: string[] = []\n React.Children.forEach(children, (child) => {\n if (React.isValidElement<{ children?: React.ReactNode }>(child) && child.props?.children) {\n const text = typeof child.props.children === 'string'\n ? child.props.children\n : ''\n if (text) lines.push(text)\n }\n })\n return lines.join('\\n')\n}\n\nexport const Code: React.FC<CodeProps> & { Line: typeof Line } = ({\n children,\n className = '',\n copyable,\n style,\n ...rest\n}) => {\n const copyText = typeof copyable === 'string'\n ? copyable\n : copyable\n ? extractTextFromChildren(children)\n : null\n\n return (\n <div\n className={`mockup-code ${className}`}\n style={{ position: 'relative', overflow: 'hidden', ...style }}\n {...rest}\n >\n {children}\n {copyText !== null && (\n <div style={{ position: 'absolute', top: 8, right: 8 }}>\n <CopyButton\n text={copyText}\n size=\"xs\"\n variant=\"ghost\"\n showTooltip\n />\n </div>\n )}\n </div>\n )\n}\n\nCode.Line = Line\n"],"names":["Line","children","prefix","highlight","className","rest","jsx","extractTextFromChildren","lines","React","child","text","Code","copyable","style","copyText","jsxs","CopyButton"],"mappings":";;;AASA,MAAMA,IAAgC,CAAC;AAAA,EACrC,UAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,eAAaJ;AAAA,IACb,WAAW,GAAGC,IAAY,oCAAoC,EAAE,IAAIC,CAAS;AAAA,IAC5E,GAAGC;AAAA,IAEJ,UAAA,gBAAAC,EAAC,UAAM,UAAAL,EAAA,CAAS;AAAA,EAAA;AAAA,GAWhBM,IAA0B,CAACN,MAAsC;AACrE,QAAMO,IAAkB,CAAA;AACxB,SAAAC,EAAM,SAAS,QAAQR,GAAU,CAACS,MAAU;AAC1C,QAAID,EAAM,eAA+CC,CAAK,KAAKA,EAAM,OAAO,UAAU;AACxF,YAAMC,IAAO,OAAOD,EAAM,MAAM,YAAa,WACzCA,EAAM,MAAM,WACZ;AACJ,MAAIC,KAAMH,EAAM,KAAKG,CAAI;AAAA,IAC3B;AAAA,EACF,CAAC,GACMH,EAAM,KAAK;AAAA,CAAI;AACxB,GAEaI,IAAoD,CAAC;AAAA,EAChE,UAAAX;AAAA,EACA,WAAAG,IAAY;AAAA,EACZ,UAAAS;AAAA,EACA,OAAAC;AAAA,EACA,GAAGT;AACL,MAAM;AACJ,QAAMU,IAAW,OAAOF,KAAa,WACjCA,IACAA,IACEN,EAAwBN,CAAQ,IAChC;AAEN,SACE,gBAAAe;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,eAAeZ,CAAS;AAAA,MACnC,OAAO,EAAE,UAAU,YAAY,UAAU,UAAU,GAAGU,EAAA;AAAA,MACrD,GAAGT;AAAA,MAEH,UAAA;AAAA,QAAAJ;AAAA,QACAc,MAAa,QACZ,gBAAAT,EAAC,OAAA,EAAI,OAAO,EAAE,UAAU,YAAY,KAAK,GAAG,OAAO,EAAA,GACjD,UAAA,gBAAAA;AAAA,UAACW;AAAA,UAAA;AAAA,YACC,MAAMF;AAAA,YACN,MAAK;AAAA,YACL,SAAQ;AAAA,YACR,aAAW;AAAA,UAAA;AAAA,QAAA,EACb,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;AAEAH,EAAK,OAAOZ;"}
1
+ {"version":3,"file":"index55.js","sources":["../src/components/Code.tsx"],"sourcesContent":["import React from 'react'\nimport { CopyButton } from './CopyButton'\n\nexport interface CodeLineProps extends React.HTMLAttributes<HTMLPreElement> {\n children: React.ReactNode\n prefix?: string\n highlight?: boolean\n}\n\nconst Line: React.FC<CodeLineProps> = ({\n children,\n prefix = '$',\n highlight = false,\n className = '',\n ...rest\n}) => {\n return (\n <pre\n data-prefix={prefix}\n className={`${highlight ? 'bg-warning text-warning-content' : ''} ${className}`}\n {...rest}\n >\n <code>{children}</code>\n </pre>\n )\n}\n\nexport interface CodeProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode\n /** Show copy button. Pass true to auto-extract text, or a string to specify custom copy text */\n copyable?: boolean | string\n}\n\nconst extractTextFromChildren = (children: React.ReactNode): string => {\n const lines: string[] = []\n React.Children.forEach(children, (child) => {\n if (React.isValidElement<{ children?: React.ReactNode }>(child) && child.props?.children) {\n const text = typeof child.props.children === 'string'\n ? child.props.children\n : ''\n if (text) lines.push(text)\n }\n })\n return lines.join('\\n')\n}\n\nexport const Code: React.FC<CodeProps> & { Line: typeof Line } = ({\n children,\n className = '',\n copyable,\n style,\n ...rest\n}) => {\n const copyText = typeof copyable === 'string'\n ? copyable\n : copyable\n ? extractTextFromChildren(children)\n : null\n\n return (\n <div\n className={`mockup-code ${className}`}\n style={{ position: 'relative', overflow: 'hidden', ...style }}\n {...rest}\n >\n {children}\n {copyText !== null && (\n <div style={{ position: 'absolute', top: 8, right: 8 }}>\n <CopyButton\n text={copyText}\n size=\"xs\"\n variant=\"ghost\"\n showTooltip\n />\n </div>\n )}\n </div>\n )\n}\n\nCode.Line = Line\n"],"names":["Line","children","prefix","highlight","className","rest","jsx","extractTextFromChildren","lines","React","child","text","Code","copyable","style","copyText","jsxs","CopyButton"],"mappings":";;;AASA,MAAMA,IAAgC,CAAC;AAAA,EACrC,UAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,eAAaJ;AAAA,IACb,WAAW,GAAGC,IAAY,oCAAoC,EAAE,IAAIC,CAAS;AAAA,IAC5E,GAAGC;AAAA,IAEJ,UAAA,gBAAAC,EAAC,UAAM,UAAAL,EAAA,CAAS;AAAA,EAAA;AAAA,GAWhBM,IAA0B,CAACN,MAAsC;AACrE,QAAMO,IAAkB,CAAA;AACxBC,SAAAA,EAAM,SAAS,QAAQR,GAAU,CAACS,MAAU;AAC1C,QAAID,EAAM,eAA+CC,CAAK,KAAKA,EAAM,OAAO,UAAU;AACxF,YAAMC,IAAO,OAAOD,EAAM,MAAM,YAAa,WACzCA,EAAM,MAAM,WACZ;AACJ,MAAIC,KAAMH,EAAM,KAAKG,CAAI;AAAA,IAC3B;AAAA,EACF,CAAC,GACMH,EAAM,KAAK;AAAA,CAAI;AACxB,GAEaI,IAAoD,CAAC;AAAA,EAChE,UAAAX;AAAA,EACA,WAAAG,IAAY;AAAA,EACZ,UAAAS;AAAA,EACA,OAAAC;AAAA,EACA,GAAGT;AACL,MAAM;AACJ,QAAMU,IAAW,OAAOF,KAAa,WACjCA,IACAA,IACEN,EAAwBN,CAAQ,IAChC;AAEN,SACE,gBAAAe;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,eAAeZ,CAAS;AAAA,MACnC,OAAO,EAAE,UAAU,YAAY,UAAU,UAAU,GAAGU,EAAA;AAAA,MACrD,GAAGT;AAAA,MAEH,UAAA;AAAA,QAAAJ;AAAA,QACAc,MAAa,QACZ,gBAAAT,EAAC,OAAA,EAAI,OAAO,EAAE,UAAU,YAAY,KAAK,GAAG,OAAO,EAAA,GACjD,UAAA,gBAAAA;AAAA,UAACW;AAAA,UAAA;AAAA,YACC,MAAMF;AAAA,YACN,MAAK;AAAA,YACL,SAAQ;AAAA,YACR,aAAW;AAAA,UAAA;AAAA,QAAA,EACb,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;AAEAH,EAAK,OAAOZ;"}
package/dist/index58.js CHANGED
@@ -1,6 +1,6 @@
1
- import { jsxs as m, jsx as t, Fragment as V } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as t, Fragment as U } from "react/jsx-runtime";
2
2
  import M, { useRef as f, useId as I, useEffect as S } from "react";
3
- import { createRoot as X } from "react-dom/client";
3
+ import { createRoot as V } from "react-dom/client";
4
4
  function u({
5
5
  children: e,
6
6
  title: r,
@@ -83,10 +83,10 @@ function u({
83
83
  middle: "2xl:modal-middle",
84
84
  bottom: "2xl:modal-bottom"
85
85
  }
86
- }, F = {
86
+ }, _ = {
87
87
  start: "modal-start",
88
88
  end: "modal-end"
89
- }, H = [
89
+ }, F = [
90
90
  "modal",
91
91
  ...(() => {
92
92
  if (C)
@@ -100,9 +100,9 @@ function u({
100
100
  z && o.push(P[x][z]);
101
101
  return o;
102
102
  })(),
103
- b && F[b],
103
+ b && _[b],
104
104
  D
105
- ].filter(Boolean).join(" "), q = async () => {
105
+ ].filter(Boolean).join(" "), H = async () => {
106
106
  if (a) {
107
107
  B(!0);
108
108
  try {
@@ -111,41 +111,41 @@ function u({
111
111
  throw B(!1), o;
112
112
  }
113
113
  }
114
- }, G = () => {
114
+ }, q = () => {
115
115
  h && v && v();
116
- }, J = i ? { width: typeof i == "number" ? `${i}px` : i, maxWidth: "90vw" } : {}, Q = !s && (a || d), U = s != null;
116
+ }, G = i ? { width: typeof i == "number" ? `${i}px` : i, maxWidth: "90vw" } : {}, J = !s && (a || d), Q = s != null;
117
117
  return /* @__PURE__ */ m(
118
118
  "dialog",
119
119
  {
120
120
  ref: N,
121
121
  role: A ? "alertdialog" : "dialog",
122
122
  "aria-modal": "true",
123
- className: H,
123
+ className: F,
124
124
  "data-state": l ? "open" : "closed",
125
125
  "aria-labelledby": r ? $ : void 0,
126
126
  "aria-describedby": E,
127
127
  ...K,
128
128
  children: [
129
- /* @__PURE__ */ m("div", { className: "modal-box", style: J, children: [
129
+ /* @__PURE__ */ m("div", { className: "modal-box", style: G, children: [
130
130
  r && /* @__PURE__ */ t("h3", { id: $, className: "text-lg font-bold mb-4", children: r }),
131
131
  /* @__PURE__ */ t("div", { id: E, className: "py-4", children: e }),
132
- Q && /* @__PURE__ */ m("div", { className: "modal-action", children: [
132
+ J && /* @__PURE__ */ m("div", { className: "modal-action", children: [
133
133
  d && /* @__PURE__ */ t("button", { ref: T, className: "btn", onClick: d, children: c }),
134
134
  a && /* @__PURE__ */ t(
135
135
  "button",
136
136
  {
137
137
  ref: R,
138
138
  className: `btn btn-primary ${L ? "loading" : ""}`,
139
- onClick: q,
139
+ onClick: H,
140
140
  disabled: L,
141
141
  "aria-busy": L || void 0,
142
142
  children: y
143
143
  }
144
144
  )
145
145
  ] }),
146
- U && /* @__PURE__ */ t("div", { className: "modal-action", children: s })
146
+ Q && /* @__PURE__ */ t("div", { className: "modal-action", children: s })
147
147
  ] }),
148
- p && h && /* @__PURE__ */ t("form", { method: "dialog", className: "modal-backdrop", children: /* @__PURE__ */ t("button", { ref: j, onClick: G, children: /* @__PURE__ */ t("span", { className: "sr-only", children: "Close modal" }) }) })
148
+ p && h && /* @__PURE__ */ t("form", { method: "dialog", className: "modal-backdrop", children: /* @__PURE__ */ t("button", { ref: j, onClick: q, children: /* @__PURE__ */ t("span", { className: "sr-only", children: "Close modal" }) }) })
149
149
  ]
150
150
  }
151
151
  );
@@ -153,7 +153,7 @@ function u({
153
153
  function w(e) {
154
154
  const r = document.createElement("div");
155
155
  document.body.appendChild(r);
156
- const s = X(r), l = () => {
156
+ const s = V(r), l = () => {
157
157
  s.unmount(), r.parentNode && r.parentNode.removeChild(r);
158
158
  }, a = () => {
159
159
  const [d, y] = M.useState(!0), [c, h] = M.useState(!1), p = () => {
@@ -280,7 +280,7 @@ function w(e) {
280
280
  ] }) : e.title,
281
281
  okText: e.okText,
282
282
  cancelText: e.cancelText,
283
- footer: e.showCancel ? /* @__PURE__ */ m(V, { children: [
283
+ footer: e.showCancel ? /* @__PURE__ */ m(U, { children: [
284
284
  /* @__PURE__ */ t("button", { className: "btn", onClick: b, children: e.cancelText || "Cancel" }),
285
285
  /* @__PURE__ */ t(
286
286
  "button",
@@ -311,13 +311,13 @@ function w(e) {
311
311
  destroy: l
312
312
  };
313
313
  }
314
- function Y(e) {
314
+ function X(e) {
315
315
  return w({ ...e, showCancel: !0 });
316
316
  }
317
- function Z(e) {
317
+ function Y(e) {
318
318
  return w({ ...e, type: "info", showCancel: !1 });
319
319
  }
320
- function _(e) {
320
+ function Z(e) {
321
321
  return w({ ...e, type: "success", showCancel: !1 });
322
322
  }
323
323
  function ee(e) {
@@ -326,9 +326,9 @@ function ee(e) {
326
326
  function te(e) {
327
327
  return w({ ...e, type: "error", showCancel: !1 });
328
328
  }
329
- u.confirm = Y;
330
- u.info = Z;
331
- u.success = _;
329
+ u.confirm = X;
330
+ u.info = Y;
331
+ u.success = Z;
332
332
  u.warning = ee;
333
333
  u.error = te;
334
334
  export {
package/dist/index62.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs as o, jsx as i } from "react/jsx-runtime";
2
2
  import f from "react";
3
- const q = ({
3
+ const R = ({
4
4
  current: p,
5
5
  defaultCurrent: P = 1,
6
6
  total: m,
@@ -18,17 +18,17 @@ const q = ({
18
18
  className: b = "",
19
19
  ...N
20
20
  }) => {
21
- const [w, v] = f.useState(P), [J, D] = f.useState(C), [x, $] = f.useState(""), t = p !== void 0 ? p : w, u = h !== void 0 ? h : J, n = Math.ceil(m / u), r = (e) => {
21
+ const [w, v] = f.useState(P), [J, _] = f.useState(C), [x, $] = f.useState(""), t = p !== void 0 ? p : w, u = h !== void 0 ? h : J, n = Math.ceil(m / u), r = (e) => {
22
22
  e < 1 || e > n || a || (p === void 0 && v(e), g?.(e, u));
23
- }, E = (e) => {
23
+ }, D = (e) => {
24
24
  const c = Math.ceil(m / e), s = t > c ? c : t;
25
- h === void 0 && D(e), p === void 0 && s !== t && v(s), k?.(s, e), g?.(s, e);
26
- }, F = (e) => {
25
+ h === void 0 && _(e), p === void 0 && s !== t && v(s), k?.(s, e), g?.(s, e);
26
+ }, E = (e) => {
27
27
  if (e.key === "Enter") {
28
28
  const c = parseInt(x);
29
29
  !isNaN(c) && c >= 1 && c <= n && (r(c), $(""));
30
30
  }
31
- }, G = () => {
31
+ }, F = () => {
32
32
  const e = [];
33
33
  if (n <= 7)
34
34
  for (let s = 1; s <= n; s++)
@@ -53,7 +53,7 @@ const q = ({
53
53
  sm: "btn-sm",
54
54
  md: "",
55
55
  lg: "btn-lg"
56
- }[M], K = [
56
+ }[M], G = [
57
57
  (t - 1) * u + 1,
58
58
  Math.min(t * u, m)
59
59
  ];
@@ -82,13 +82,13 @@ const q = ({
82
82
  }
83
83
  )
84
84
  ] }) : /* @__PURE__ */ o("div", { className: `flex flex-wrap items-center gap-4 ${b}`, ...N, children: [
85
- d && /* @__PURE__ */ i("div", { className: "text-sm text-base-content/70", children: typeof d == "function" ? d(m, K) : `Total ${m} items` }),
85
+ d && /* @__PURE__ */ i("div", { className: "text-sm text-base-content/70", children: typeof d == "function" ? d(m, G) : `Total ${m} items` }),
86
86
  y && /* @__PURE__ */ i(
87
87
  "select",
88
88
  {
89
89
  className: `select select-bordered ${l}`,
90
90
  value: u,
91
- onChange: (e) => E(Number(e.target.value)),
91
+ onChange: (e) => D(Number(e.target.value)),
92
92
  disabled: a,
93
93
  children: j.map((e) => /* @__PURE__ */ o("option", { value: e, children: [
94
94
  e,
@@ -117,7 +117,7 @@ const q = ({
117
117
  children: "‹"
118
118
  }
119
119
  ),
120
- G().map((e, c) => e === "ellipsis" ? /* @__PURE__ */ i("button", { className: `join-item btn btn-disabled ${l}`, children: "..." }, `ellipsis-${c}`) : /* @__PURE__ */ i(
120
+ F().map((e, c) => e === "ellipsis" ? /* @__PURE__ */ i("button", { className: `join-item btn btn-disabled ${l}`, children: "..." }, `ellipsis-${c}`) : /* @__PURE__ */ i(
121
121
  "button",
122
122
  {
123
123
  className: `join-item btn ${l} ${t === e ? "btn-active" : ""}`,
@@ -159,7 +159,7 @@ const q = ({
159
159
  max: n,
160
160
  value: x,
161
161
  onChange: (e) => $(e.target.value),
162
- onKeyDown: F,
162
+ onKeyDown: E,
163
163
  disabled: a,
164
164
  placeholder: String(t)
165
165
  }
@@ -168,6 +168,6 @@ const q = ({
168
168
  ] });
169
169
  };
170
170
  export {
171
- q as Pagination
171
+ R as Pagination
172
172
  };
173
173
  //# sourceMappingURL=index62.js.map
package/dist/index64.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
- import K, { useState as g, useRef as h, useEffect as M } from "react";
3
- const W = ({
2
+ import A, { useState as g, useRef as h, useEffect as K } from "react";
3
+ const T = ({
4
4
  children: c,
5
5
  title: x,
6
6
  description: d,
7
- onConfirm: m,
7
+ onConfirm: f,
8
8
  onCancel: v,
9
9
  okText: C = "OK",
10
10
  cancelText: w = "Cancel",
11
11
  okType: N = "primary",
12
12
  cancelType: k = "ghost",
13
- placement: f = "top",
13
+ placement: m = "top",
14
14
  disabled: y = !1,
15
15
  icon: p,
16
16
  showCancel: L = !0,
@@ -18,7 +18,7 @@ const W = ({
18
18
  ...O
19
19
  }) => {
20
20
  const [a, o] = g(!1), [l, u] = g(!1), r = h(null), i = h(null);
21
- M(() => {
21
+ K(() => {
22
22
  const t = (s) => {
23
23
  r.current && !r.current.contains(s.target) && i.current && !i.current.contains(s.target) && o(!1);
24
24
  };
@@ -28,10 +28,10 @@ const W = ({
28
28
  const j = (t) => {
29
29
  y || (t.stopPropagation(), o(!a));
30
30
  }, E = async () => {
31
- if (m) {
31
+ if (f) {
32
32
  u(!0);
33
33
  try {
34
- await m(), o(!1);
34
+ await f(), o(!1);
35
35
  } finally {
36
36
  u(!1);
37
37
  }
@@ -44,12 +44,12 @@ const W = ({
44
44
  bottom: "top-full left-1/2 -translate-x-1/2 mt-3",
45
45
  left: "right-full top-1/2 -translate-y-1/2 mr-3",
46
46
  right: "left-full top-1/2 -translate-y-1/2 ml-3"
47
- }[f]}`, z = () => "bg-base-100 rounded-lg p-4 min-w-[200px] max-w-[300px] shadow-lg", B = () => `absolute w-2.5 h-2.5 bg-base-100 rotate-45 shadow-lg ${{
47
+ }[m]}`, z = () => "bg-base-100 rounded-lg p-4 min-w-[200px] max-w-[300px] shadow-lg", B = () => `absolute w-2.5 h-2.5 bg-base-100 rotate-45 shadow-lg ${{
48
48
  top: "bottom-[-5px] left-1/2 -translate-x-1/2",
49
49
  bottom: "top-[-5px] left-1/2 -translate-x-1/2",
50
50
  left: "right-[-5px] top-1/2 -translate-y-1/2",
51
51
  right: "left-[-5px] top-1/2 -translate-y-1/2"
52
- }[f]}`, I = {
52
+ }[m]}`, I = {
53
53
  primary: "btn-primary",
54
54
  secondary: "btn-secondary",
55
55
  accent: "btn-accent",
@@ -58,7 +58,7 @@ const W = ({
58
58
  error: "btn-error",
59
59
  info: "btn-info",
60
60
  ghost: "btn-ghost"
61
- }, b = (t) => I[t], A = /* @__PURE__ */ e(
61
+ }, b = (t) => I[t], _ = /* @__PURE__ */ e(
62
62
  "svg",
63
63
  {
64
64
  className: "w-5 h-5 text-warning",
@@ -77,7 +77,7 @@ const W = ({
77
77
  }
78
78
  );
79
79
  return /* @__PURE__ */ n("div", { ref: r, className: `relative inline-block ${$ || ""}`, "data-state": a ? "open" : "closed", ...O, children: [
80
- K.cloneElement(c, {
80
+ A.cloneElement(c, {
81
81
  onClick: (t) => {
82
82
  j(t);
83
83
  const s = c.props?.onClick;
@@ -86,7 +86,7 @@ const W = ({
86
86
  }),
87
87
  a && /* @__PURE__ */ e("div", { className: R(), children: /* @__PURE__ */ n("div", { ref: i, className: z(), children: [
88
88
  /* @__PURE__ */ n("div", { className: "flex gap-3 relative z-10", children: [
89
- /* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: p !== void 0 ? p : A }),
89
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5", children: p !== void 0 ? p : _ }),
90
90
  /* @__PURE__ */ n("div", { className: "flex-1", children: [
91
91
  /* @__PURE__ */ e("div", { className: "font-semibold text-base-content mb-1", children: x }),
92
92
  d && /* @__PURE__ */ e("div", { className: "text-sm text-base-content/70 mb-3", children: d }),
@@ -120,6 +120,6 @@ const W = ({
120
120
  ] });
121
121
  };
122
122
  export {
123
- W as Popconfirm
123
+ T as Popconfirm
124
124
  };
125
125
  //# sourceMappingURL=index64.js.map
package/dist/index68.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { jsx as r, jsxs as N } from "react/jsx-runtime";
2
2
  import S, { forwardRef as b, useContext as G, createContext as V } from "react";
3
- const g = V(null);
4
- function w({ children: n, value: e, defaultValue: i, onChange: o, name: t, className: c = "" }) {
5
- const [d, s] = S.useState(i), l = e !== void 0 ? e : d, u = (a) => {
3
+ const f = V(null);
4
+ function w({ children: n, value: e, defaultValue: i, onChange: o, name: t, className: d = "" }) {
5
+ const [c, s] = S.useState(i), l = e !== void 0 ? e : c, u = (a) => {
6
6
  e === void 0 && s(a), o?.({ target: { value: a, name: t } });
7
7
  };
8
- return /* @__PURE__ */ r(g.Provider, { value: { value: l, onChange: u, name: t }, children: /* @__PURE__ */ r("div", { role: "radiogroup", className: c, children: n }) });
8
+ return /* @__PURE__ */ r(f.Provider, { value: { value: l, onChange: u, name: t }, children: /* @__PURE__ */ r("div", { role: "radiogroup", className: d, children: n }) });
9
9
  }
10
- const f = b(
11
- ({ size: n, color: e, className: i = "", value: o, checked: t, onChange: c, name: d, children: s, ...l }, u) => {
12
- const a = G(g), h = {
10
+ const g = b(
11
+ ({ size: n, color: e, className: i = "", value: o, checked: t, onChange: d, name: c, children: s, ...l }, u) => {
12
+ const a = G(f), h = {
13
13
  xs: "radio-xs",
14
14
  sm: "radio-sm",
15
15
  md: "radio-md",
@@ -29,8 +29,8 @@ const f = b(
29
29
  const j = typeof o == "string" || typeof o == "number" ? o : String(o);
30
30
  a.onChange?.(j);
31
31
  }
32
- c?.(k);
33
- }, R = a?.name || d, m = /* @__PURE__ */ r(
32
+ d?.(k);
33
+ }, R = a?.name || c, m = /* @__PURE__ */ r(
34
34
  "input",
35
35
  {
36
36
  ref: u,
@@ -50,11 +50,11 @@ const f = b(
50
50
  ] }) : m;
51
51
  }
52
52
  );
53
- f.displayName = "Radio";
54
- const I = Object.assign(f, {
53
+ g.displayName = "Radio";
54
+ const B = Object.assign(g, {
55
55
  Group: w
56
56
  });
57
57
  export {
58
- I as Radio
58
+ B as Radio
59
59
  };
60
60
  //# sourceMappingURL=index68.js.map
package/dist/index71.js CHANGED
@@ -1,6 +1,6 @@
1
- import { jsxs as G, Fragment as _, jsx as t } from "react/jsx-runtime";
2
- import L, { useState as M, useId as O, createContext as P, useContext as S } from "react";
3
- const N = P(null);
1
+ import { jsxs as G, Fragment as F, jsx as t } from "react/jsx-runtime";
2
+ import L, { useState as _, useId as O, createContext as P, useContext as S } from "react";
3
+ const M = P(null);
4
4
  function q({
5
5
  children: n,
6
6
  value: i,
@@ -11,16 +11,16 @@ function q({
11
11
  size: e,
12
12
  gap: l = "md",
13
13
  color: o = "bg-warning",
14
- mask: h = "star-2",
15
- allowClear: u = !0,
14
+ mask: u = "star-2",
15
+ allowClear: h = !0,
16
16
  allowHalf: s = !1,
17
17
  disabled: m = !1,
18
18
  className: f = "",
19
19
  ...C
20
20
  }) {
21
- const [j, R] = M(v), [p, k] = M(0), V = i !== void 0 ? i : j, $ = O(), A = (r) => {
21
+ const [j, R] = _(v), [p, k] = _(0), V = i !== void 0 ? i : j, N = O(), $ = (r) => {
22
22
  if (m) return;
23
- const a = u && r === V ? 0 : r;
23
+ const a = h && r === V ? 0 : r;
24
24
  i === void 0 && R(a), k(0), x?.(a);
25
25
  }, I = (r) => {
26
26
  m || (k(r), g?.(r));
@@ -30,20 +30,20 @@ function q({
30
30
  md: "rating-md",
31
31
  lg: "rating-lg",
32
32
  xl: "rating-xl"
33
- }, B = {
33
+ }, A = {
34
34
  none: "gap-0",
35
35
  xs: "gap-0.5",
36
36
  sm: "gap-1",
37
37
  md: "gap-2",
38
38
  lg: "gap-3"
39
- }, E = [
39
+ }, B = [
40
40
  "rating",
41
41
  // Half-star mode requires a size class to render correctly, default to md
42
42
  s ? y[e || "md"] : e && y[e],
43
- s ? "rating-half" : l && B[l],
43
+ s ? "rating-half" : l && A[l],
44
44
  f
45
- ].filter(Boolean).join(" "), b = s ? "star-2" : h, F = n || /* @__PURE__ */ G(_, { children: [
46
- u && /* @__PURE__ */ t(c, { value: 0, hidden: !0 }),
45
+ ].filter(Boolean).join(" "), b = s ? "star-2" : u, E = n || /* @__PURE__ */ G(F, { children: [
46
+ h && /* @__PURE__ */ t(c, { value: 0, hidden: !0 }),
47
47
  s ? (
48
48
  // Half-star mode: each star is two inputs
49
49
  Array.from({ length: d }, (r, a) => /* @__PURE__ */ G(L.Fragment, { children: [
@@ -55,24 +55,24 @@ function q({
55
55
  Array.from({ length: d }, (r, a) => /* @__PURE__ */ t(c, { value: a + 1, mask: b, color: o }, a + 1))
56
56
  )
57
57
  ] });
58
- return /* @__PURE__ */ t(N.Provider, { value: { name: $, currentValue: V, hoverValue: p, onChange: A, onHover: I, size: e, disabled: m, halfGap: s ? l : void 0 }, children: /* @__PURE__ */ t(
58
+ return /* @__PURE__ */ t(M.Provider, { value: { name: N, currentValue: V, hoverValue: p, onChange: $, onHover: I, size: e, disabled: m, halfGap: s ? l : void 0 }, children: /* @__PURE__ */ t(
59
59
  "div",
60
60
  {
61
61
  role: "radiogroup",
62
62
  "aria-label": "Rating",
63
- className: E,
63
+ className: B,
64
64
  "data-value": V,
65
65
  onMouseLeave: () => I(0),
66
66
  ...C,
67
- children: F
67
+ children: E
68
68
  }
69
69
  ) });
70
70
  }
71
71
  function c({ value: n, mask: i = "star-2", color: v = "bg-warning", hidden: x = !1, half: g, className: d = "" }) {
72
- const e = S(N);
72
+ const e = S(M);
73
73
  if (!e)
74
74
  throw new Error("Rating.Item must be used within Rating");
75
- const { name: l, currentValue: o, hoverValue: h, onChange: u, onHover: s, disabled: m, halfGap: f } = e, C = {
75
+ const { name: l, currentValue: o, hoverValue: u, onChange: h, onHover: s, disabled: m, halfGap: f } = e, C = {
76
76
  star: "mask-star",
77
77
  "star-2": "mask-star-2",
78
78
  heart: "mask-heart"
@@ -101,7 +101,7 @@ function c({ value: n, mask: i = "star-2", color: v = "bg-warning", hidden: x =
101
101
  "aria-label": `Rating ${n}`
102
102
  }
103
103
  );
104
- const k = h > 0 ? h : o;
104
+ const k = u > 0 ? u : o;
105
105
  return /* @__PURE__ */ t(
106
106
  "input",
107
107
  {
@@ -111,7 +111,7 @@ function c({ value: n, mask: i = "star-2", color: v = "bg-warning", hidden: x =
111
111
  checked: k === n,
112
112
  onChange: () => {
113
113
  },
114
- onClick: () => u(n),
114
+ onClick: () => h(n),
115
115
  onMouseEnter: () => s(n),
116
116
  "aria-label": `Rating ${n}`
117
117
  }
package/dist/index76.js CHANGED
@@ -19,7 +19,7 @@ const w = {
19
19
  between: "justify-between",
20
20
  around: "justify-around",
21
21
  evenly: "justify-evenly"
22
- }, z = ({
22
+ }, k = ({
23
23
  direction: f = "horizontal",
24
24
  size: s = "md",
25
25
  align: r,
@@ -56,6 +56,6 @@ const w = {
56
56
  })() });
57
57
  };
58
58
  export {
59
- z as Space
59
+ k as Space
60
60
  };
61
61
  //# sourceMappingURL=index76.js.map