lizaui 14.0.5 → 14.0.7

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 (127) hide show
  1. package/dist/area-chart/index.js.map +1 -1
  2. package/dist/autocomplete/index.js.map +1 -1
  3. package/dist/bar-chart/index.js.map +1 -1
  4. package/dist/calendar/index.js +1 -1
  5. package/dist/calendar/index.js.map +1 -1
  6. package/dist/carousel/index.js.map +1 -1
  7. package/dist/chip/index.js.map +1 -1
  8. package/dist/chunks/action-bar-BT-a9Hsn.js.map +1 -1
  9. package/dist/chunks/app-layout-BbLbxmUo.js.map +1 -1
  10. package/dist/chunks/badge-Dcd_FpIu.js.map +1 -1
  11. package/dist/chunks/button-group-BH3jFPGn.js.map +1 -1
  12. package/dist/chunks/button-p-1aXUrQ.js.map +1 -1
  13. package/dist/chunks/card-CvDGWsvp.js.map +1 -1
  14. package/dist/chunks/cell-color-picker-rJArTiCY.js.map +1 -1
  15. package/dist/chunks/cell-select-CJT8C7uL.js.map +1 -1
  16. package/dist/chunks/cell-slider-D6GNeeKU.js.map +1 -1
  17. package/dist/chunks/cell-switch-C7VjCDD6.js.map +1 -1
  18. package/dist/chunks/chart-tooltip-content-C2etpYAf.js.map +1 -1
  19. package/dist/chunks/checkbox-5mCIeL2B.js.map +1 -1
  20. package/dist/chunks/checkbox-button-group-CxXUsVI1.js.map +1 -1
  21. package/dist/chunks/checkbox-group-Dr04ek8H.js.map +1 -1
  22. package/dist/chunks/chip-v2-kuRrkjTe.js.map +1 -1
  23. package/dist/chunks/close-button-Dq9x5f6j.js.map +1 -1
  24. package/dist/chunks/collection-prop-injection-BE4mNsQf.js.map +1 -1
  25. package/dist/chunks/color-area-BLInEy4T.js.map +1 -1
  26. package/dist/chunks/color-field-DKsnI6uH.js.map +1 -1
  27. package/dist/chunks/color-input-group-D3RY2F7j.js.map +1 -1
  28. package/dist/chunks/color-picker-d3aCxqMh.js.map +1 -1
  29. package/dist/chunks/color-slider-CKJj-lH2.js.map +1 -1
  30. package/dist/chunks/color-swatch-CFqG38pB.js.map +1 -1
  31. package/dist/chunks/color-swatch-picker-D2KeKAJF.js.map +1 -1
  32. package/dist/chunks/combo-box-input-Dv0f3byt.js.map +1 -1
  33. package/dist/chunks/compose-D2oTSeds.js.map +1 -1
  34. package/dist/chunks/context-menu--rdOrjJS.js.map +1 -1
  35. package/dist/chunks/data-grid-Bhfhl-2Z.js.map +1 -1
  36. package/dist/chunks/data-table-QHYQ0tEJ.js.map +1 -1
  37. package/dist/chunks/description-obuPoeAz.js.map +1 -1
  38. package/dist/chunks/dropdown-ByqbG4eQ.js.map +1 -1
  39. package/dist/chunks/emoji-picker-6t_M942m.js.map +1 -1
  40. package/dist/chunks/empty-state-CymD1lU3.js.map +1 -1
  41. package/dist/chunks/field-error-DKvMS2jC.js.map +1 -1
  42. package/dist/chunks/field-slots-gate-1kC6-1HI.js.map +1 -1
  43. package/dist/chunks/form-BNUdlt38.js.map +1 -1
  44. package/dist/chunks/header-0cLiFVAG.js.map +1 -1
  45. package/dist/chunks/icons-Bz6-asmS.js.map +1 -1
  46. package/dist/chunks/inline-select-trq230mZ.js.map +1 -1
  47. package/dist/chunks/input-asA4nB7s.js.map +1 -1
  48. package/dist/chunks/input-group-C8Lz9G21.js.map +1 -1
  49. package/dist/chunks/input-otp-H7Ad0gAL.js.map +1 -1
  50. package/dist/chunks/item-card-BpQeSXlo.js.map +1 -1
  51. package/dist/chunks/item-card-group-BexoP2s0.js.map +1 -1
  52. package/dist/chunks/kanban-z1Nm_Wu6.js.map +1 -1
  53. package/dist/chunks/kbd-C-jzdlfc.js.map +1 -1
  54. package/dist/chunks/label-BTE4EkmO.js.map +1 -1
  55. package/dist/chunks/label-error-DKclJevr.js.map +1 -1
  56. package/dist/chunks/list-box-Debpbfpy.js.map +1 -1
  57. package/dist/chunks/list-box-item-CwklMSR0.js.map +1 -1
  58. package/dist/chunks/list-box-section-bJy-e6Tv.js.map +1 -1
  59. package/dist/chunks/list-view-B3jk0z_O.js.map +1 -1
  60. package/dist/chunks/loader-circle-NA7_l7qX.js.map +1 -1
  61. package/dist/chunks/menu-DfBLebet.js.map +1 -1
  62. package/dist/chunks/menu-item-DXrOKDUL.js.map +1 -1
  63. package/dist/chunks/menu-section-DWiBZc5K.js.map +1 -1
  64. package/dist/chunks/meter-CYvypY50.js.map +1 -1
  65. package/dist/chunks/modal-Cg9kNnY4.js.map +1 -1
  66. package/dist/chunks/navbar-CCXmApzt.js.map +1 -1
  67. package/dist/chunks/number-stepper-CbXwrOmO.js.map +1 -1
  68. package/dist/chunks/popover-sqvL55rI.js.map +1 -1
  69. package/dist/chunks/pressable-feedback-D4-MrlBW.js.map +1 -1
  70. package/dist/chunks/pro-icons-IjML13tv.js.map +1 -1
  71. package/dist/chunks/progress-bar-CPKtlB_g.js.map +1 -1
  72. package/dist/chunks/radio-B4sj5Mf0.js.map +1 -1
  73. package/dist/chunks/radio-button-group-BPS0TVsj.js.map +1 -1
  74. package/dist/chunks/radio-group-D1uCY5MA.js.map +1 -1
  75. package/dist/chunks/resizable-D1tP70kJ.js.map +1 -1
  76. package/dist/chunks/scroll-area-CKy_iFv5.js.map +1 -1
  77. package/dist/chunks/scroll-shadow-B_WbCLvr.js.map +1 -1
  78. package/dist/chunks/search-field-BqlzjHlC.js.map +1 -1
  79. package/dist/chunks/segment-CsZAuTFy.js.map +1 -1
  80. package/dist/chunks/select-B-LIGRoC.js.map +1 -1
  81. package/dist/chunks/separator-WatO7Ntd.js.map +1 -1
  82. package/dist/chunks/sheet-FK4NWjIP.js.map +1 -1
  83. package/dist/chunks/sidebar-BMs3NcCp.js.map +1 -1
  84. package/dist/chunks/slider-fhXDdDby.js.map +1 -1
  85. package/dist/chunks/spinner-TLZ-bfCZ.js.map +1 -1
  86. package/dist/chunks/switch-ULpfBjJS.js.map +1 -1
  87. package/dist/chunks/switch-group-v2-F1ZYPEky.js.map +1 -1
  88. package/dist/chunks/textarea-DBdy-b5r.js.map +1 -1
  89. package/dist/chunks/textfield-BaALNRyW.js.map +1 -1
  90. package/dist/chunks/{tiny-popover-BctnQwx5.js → tiny-popover-x8sF0vwr.js} +363 -153
  91. package/dist/chunks/tiny-popover-x8sF0vwr.js.map +1 -0
  92. package/dist/chunks/toggle-button-9t9CN0Nj.js.map +1 -1
  93. package/dist/chunks/toggle-button-group-DjbuUsFo.js.map +1 -1
  94. package/dist/chunks/toggle-switch-BAzQgvT5.js.map +1 -1
  95. package/dist/chunks/toolbar-BkGtukAA.js.map +1 -1
  96. package/dist/chunks/trend-chip-RKD1AjtS.js.map +1 -1
  97. package/dist/chunks/use-overlay-fhyQG6gN.js.map +1 -1
  98. package/dist/chunks/use-popover-exit-hold-CBYW6ra5.js.map +1 -1
  99. package/dist/chunks/use-ripple-9uGDvsxR.js.map +1 -1
  100. package/dist/chunks/widget-CdB3I1el.js.map +1 -1
  101. package/dist/composed-chart/index.js.map +1 -1
  102. package/dist/divider/index.js.map +1 -1
  103. package/dist/drawer/index.js.map +1 -1
  104. package/dist/form-tabs/index.js.map +1 -1
  105. package/dist/index.js.map +1 -1
  106. package/dist/line-chart/index.js.map +1 -1
  107. package/dist/map/index.js +595 -380
  108. package/dist/map/index.js.map +1 -1
  109. package/dist/pagination/index.js +71 -46
  110. package/dist/pagination/index.js.map +1 -1
  111. package/dist/phone-input/index.js.map +1 -1
  112. package/dist/pie-chart/index.js.map +1 -1
  113. package/dist/radar-chart/index.js.map +1 -1
  114. package/dist/radial-chart/index.js.map +1 -1
  115. package/dist/rich-text-editor/index.js.map +1 -1
  116. package/dist/select-input/index.js.map +1 -1
  117. package/dist/table/index.d.ts +48 -2
  118. package/dist/table/index.js +827 -442
  119. package/dist/table/index.js.map +1 -1
  120. package/dist/tabs/index.js.map +1 -1
  121. package/dist/time-input/index.js.map +1 -1
  122. package/dist/tiny-popover/index.js +1 -1
  123. package/dist/travel-calendar/index.js +1 -1
  124. package/dist/travel-calendar/index.js.map +1 -1
  125. package/dist/ui/index.js.map +1 -1
  126. package/package.json +22 -22
  127. package/dist/chunks/tiny-popover-BctnQwx5.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["height = 300","margin = { bottom: 0, left: 0, right: 8, top: 8 }","width = \"100%\"","{\n\tchildren,\n\tclassName,\n\tdata,\n\theight = 300,\n\tmargin = { bottom: 0, left: 0, right: 8, top: 8 },\n\twidth = \"100%\",\n\t...props\n}: AreaChartRootProps","areaChartVariants()","useMemo(() => areaChartVariants(), [])","composeSlotClassName(slots?.base, className)","<RechartsAreaChart data={data} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsAreaChart>","<ResponsiveContainer height={height} width={width}>\n\t\t\t\t<RechartsAreaChart data={data} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsAreaChart>\n\t\t\t</ResponsiveContainer>","<div className={composeSlotClassName(slots?.base, className)} data-slot=\"area-chart\" {...props}>\n\t\t\t<ResponsiveContainer height={height} width={width}>\n\t\t\t\t<RechartsAreaChart data={data} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsAreaChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>","_c","RechartsAreaChart","AreaChartArea","AreaChartGrid","AreaChartTooltip","AreaChartTooltipContent","AreaChartXAxis","AreaChartYAxis"],"sources":["../../src/components/area-chart/area-chart.styles.ts","../../src/components/area-chart/area-chart.tsx","../../src/components/area-chart/index.ts"],"sourcesContent":["import type { VariantProps } from \"tailwind-variants\";\n\nimport { tv } from \"tailwind-variants\";\n\nexport const areaChartVariants = tv({\n\tslots: {\n\t\tbase: \"area-chart\",\n\t},\n});\n\nexport type AreaChartVariants = VariantProps<typeof areaChartVariants>;\n","\"use client\";\n\nimport \"./area-chart.css\";\nimport type { ComponentPropsWithRef, ReactNode } from \"react\";\n\nimport { useMemo } from \"react\";\nimport { Area, AreaChart as RechartsAreaChart, CartesianGrid, ResponsiveContainer, Tooltip, XAxis, YAxis } from \"recharts\";\n\nimport { composeSlotClassName } from \"@/lib/utils/compose\";\nimport { ChartTooltipContent } from \"../chart-tooltip/chart-tooltip-content\";\n\nimport { areaChartVariants } from \"./area-chart.styles\";\n\n/* -------------------------------------------------------------------------------------------------\n * Area Chart Root\n * -----------------------------------------------------------------------------------------------*/\ninterface AreaChartRootProps extends ComponentPropsWithRef<\"div\"> {\n\tchildren: ReactNode;\n\t/** Chart data — array of objects with numeric/string fields for each series. `null` renders a gap. */\n\tdata: Record<string, number | string | null>[];\n\t/** Chart height in pixels. @default 300 */\n\theight?: number;\n\t/** Recharts margin. @default { top: 8, right: 8, bottom: 0, left: 0 } */\n\tmargin?: {\n\t\tbottom?: number;\n\t\tleft?: number;\n\t\tright?: number;\n\t\ttop?: number;\n\t};\n\t/** Chart width in pixels or percentage string like \"100%\". @default \"100%\" */\n\twidth?: number | `${number}%`;\n}\n\n// Children are Recharts parts (Area, XAxis, Tooltip…) rendered inside the responsive chart\nconst AreaChartRoot = ({\n\tchildren,\n\tclassName,\n\tdata,\n\theight = 300,\n\tmargin = { bottom: 0, left: 0, right: 8, top: 8 },\n\twidth = \"100%\",\n\t...props\n}: AreaChartRootProps) => {\n\tconst slots = useMemo(() => areaChartVariants(), []);\n\n\treturn (\n\t\t<div className={composeSlotClassName(slots?.base, className)} data-slot=\"area-chart\" {...props}>\n\t\t\t<ResponsiveContainer height={height} width={width}>\n\t\t\t\t<RechartsAreaChart data={data} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsAreaChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>\n\t);\n};\n\n(AreaChartRoot as { displayName?: string }).displayName = \"LizaUI.AreaChart\";\n\n/* -------------------------------------------------------------------------------------------------\n * Exports\n * -----------------------------------------------------------------------------------------------*/\nexport { AreaChartRoot };\n\nexport type { AreaChartRootProps };\n\n// The other parts are Recharts primitives re-exported under chart-specific names\nexport {\n\tArea as AreaChartArea,\n\tCartesianGrid as AreaChartGrid,\n\tTooltip as AreaChartTooltip,\n\tXAxis as AreaChartXAxis,\n\tYAxis as AreaChartYAxis,\n\tChartTooltipContent as AreaChartTooltipContent,\n};\n","import type { ComponentProps } from \"react\";\n\nimport { AreaChartArea, AreaChartGrid, AreaChartRoot, AreaChartTooltip, AreaChartTooltipContent, AreaChartXAxis, AreaChartYAxis } from \"./area-chart\";\n\n/* -------------------------------------------------------------------------------------------------\n * Compound Component\n * -----------------------------------------------------------------------------------------------*/\nexport const AreaChart = Object.assign(AreaChartRoot, {\n\tArea: AreaChartArea,\n\tGrid: AreaChartGrid,\n\tRoot: AreaChartRoot,\n\tTooltip: AreaChartTooltip,\n\tTooltipContent: AreaChartTooltipContent,\n\tXAxis: AreaChartXAxis,\n\tYAxis: AreaChartYAxis,\n});\n\nexport type AreaChart = {\n\tAreaProps: ComponentProps<typeof AreaChartArea>;\n\tGridProps: ComponentProps<typeof AreaChartGrid>;\n\tProps: ComponentProps<typeof AreaChartRoot>;\n\tRootProps: ComponentProps<typeof AreaChartRoot>;\n\tTooltipContentProps: ComponentProps<typeof AreaChartTooltipContent>;\n\tTooltipProps: ComponentProps<typeof AreaChartTooltip>;\n\tXAxisProps: ComponentProps<typeof AreaChartXAxis>;\n\tYAxisProps: ComponentProps<typeof AreaChartYAxis>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Named Component\n * -----------------------------------------------------------------------------------------------*/\nexport { AreaChartArea, AreaChartGrid, AreaChartRoot, AreaChartTooltip, AreaChartTooltipContent, AreaChartXAxis, AreaChartYAxis };\n\nexport type { AreaChartRootProps } from \"./area-chart\";\n\n/* -------------------------------------------------------------------------------------------------\n * Variants\n * -----------------------------------------------------------------------------------------------*/\nexport { areaChartVariants } from \"./area-chart.styles\";\n\nexport type { AreaChartVariants } from \"./area-chart.styles\";\n"],"mappings":";;;;;;;AAIA,IAAa,oBAAoB,GAAG,EACnC,OAAO,EACN,MAAM,aACP,EACD,CAAC;;AC0BD,IAAM,iBAAA,OAQoB;;CAPzB,IAAA;CACA,IAAA;CACA,IAAA;CAIG,I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C,cAAc;;ACjD1D,IAAa,YAAY,OAAO,OAAO,eAAe;CAC/CG;CACN,MAAMC;CACN,MAAM;CACGC;CACT,gBAAgBC;CACTC;CACAC;AACR,CAAC"}
1
+ {"version":3,"file":"index.js","names":["height = 300","margin = { bottom: 0, left: 0, right: 8, top: 8 }","width = \"100%\"","{\n\tchildren,\n\tclassName,\n\tdata,\n\theight = 300,\n\tmargin = { bottom: 0, left: 0, right: 8, top: 8 },\n\twidth = \"100%\",\n\t...props\n}: AreaChartRootProps","...props","areaChartVariants()","useMemo(() => areaChartVariants(), [])","composeSlotClassName(slots?.base, className)","<RechartsAreaChart data={data} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsAreaChart>","<ResponsiveContainer height={height} width={width}>\n\t\t\t\t<RechartsAreaChart data={data} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsAreaChart>\n\t\t\t</ResponsiveContainer>","<div className={composeSlotClassName(slots?.base, className)} data-slot=\"area-chart\" {...props}>\n\t\t\t<ResponsiveContainer height={height} width={width}>\n\t\t\t\t<RechartsAreaChart data={data} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsAreaChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>","RechartsAreaChart","AreaChartArea","AreaChartGrid","AreaChartTooltip","AreaChartTooltipContent","AreaChartXAxis","AreaChartYAxis"],"sources":["../../src/components/area-chart/area-chart.styles.ts","../../src/components/area-chart/area-chart.tsx","../../src/components/area-chart/index.ts"],"sourcesContent":["import type { VariantProps } from \"tailwind-variants\";\n\nimport { tv } from \"tailwind-variants\";\n\nexport const areaChartVariants = tv({\n\tslots: {\n\t\tbase: \"area-chart\",\n\t},\n});\n\nexport type AreaChartVariants = VariantProps<typeof areaChartVariants>;\n","\"use client\";\n\nimport \"./area-chart.css\";\nimport type { ComponentPropsWithRef, ReactNode } from \"react\";\n\nimport { useMemo } from \"react\";\nimport { Area, AreaChart as RechartsAreaChart, CartesianGrid, ResponsiveContainer, Tooltip, XAxis, YAxis } from \"recharts\";\n\nimport { composeSlotClassName } from \"@/lib/utils/compose\";\nimport { ChartTooltipContent } from \"../chart-tooltip/chart-tooltip-content\";\n\nimport { areaChartVariants } from \"./area-chart.styles\";\n\n/* -------------------------------------------------------------------------------------------------\n * Area Chart Root\n * -----------------------------------------------------------------------------------------------*/\ninterface AreaChartRootProps extends ComponentPropsWithRef<\"div\"> {\n\tchildren: ReactNode;\n\t/** Chart data — array of objects with numeric/string fields for each series. `null` renders a gap. */\n\tdata: Record<string, number | string | null>[];\n\t/** Chart height in pixels. @default 300 */\n\theight?: number;\n\t/** Recharts margin. @default { top: 8, right: 8, bottom: 0, left: 0 } */\n\tmargin?: {\n\t\tbottom?: number;\n\t\tleft?: number;\n\t\tright?: number;\n\t\ttop?: number;\n\t};\n\t/** Chart width in pixels or percentage string like \"100%\". @default \"100%\" */\n\twidth?: number | `${number}%`;\n}\n\n// Children are Recharts parts (Area, XAxis, Tooltip…) rendered inside the responsive chart\nconst AreaChartRoot = ({\n\tchildren,\n\tclassName,\n\tdata,\n\theight = 300,\n\tmargin = { bottom: 0, left: 0, right: 8, top: 8 },\n\twidth = \"100%\",\n\t...props\n}: AreaChartRootProps) => {\n\tconst slots = useMemo(() => areaChartVariants(), []);\n\n\treturn (\n\t\t<div className={composeSlotClassName(slots?.base, className)} data-slot=\"area-chart\" {...props}>\n\t\t\t<ResponsiveContainer height={height} width={width}>\n\t\t\t\t<RechartsAreaChart data={data} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsAreaChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>\n\t);\n};\n\n(AreaChartRoot as { displayName?: string }).displayName = \"LizaUI.AreaChart\";\n\n/* -------------------------------------------------------------------------------------------------\n * Exports\n * -----------------------------------------------------------------------------------------------*/\nexport { AreaChartRoot };\n\nexport type { AreaChartRootProps };\n\n// The other parts are Recharts primitives re-exported under chart-specific names\nexport {\n\tArea as AreaChartArea,\n\tCartesianGrid as AreaChartGrid,\n\tTooltip as AreaChartTooltip,\n\tXAxis as AreaChartXAxis,\n\tYAxis as AreaChartYAxis,\n\tChartTooltipContent as AreaChartTooltipContent,\n};\n","import type { ComponentProps } from \"react\";\n\nimport { AreaChartArea, AreaChartGrid, AreaChartRoot, AreaChartTooltip, AreaChartTooltipContent, AreaChartXAxis, AreaChartYAxis } from \"./area-chart\";\n\n/* -------------------------------------------------------------------------------------------------\n * Compound Component\n * -----------------------------------------------------------------------------------------------*/\nexport const AreaChart = Object.assign(AreaChartRoot, {\n\tArea: AreaChartArea,\n\tGrid: AreaChartGrid,\n\tRoot: AreaChartRoot,\n\tTooltip: AreaChartTooltip,\n\tTooltipContent: AreaChartTooltipContent,\n\tXAxis: AreaChartXAxis,\n\tYAxis: AreaChartYAxis,\n});\n\nexport type AreaChart = {\n\tAreaProps: ComponentProps<typeof AreaChartArea>;\n\tGridProps: ComponentProps<typeof AreaChartGrid>;\n\tProps: ComponentProps<typeof AreaChartRoot>;\n\tRootProps: ComponentProps<typeof AreaChartRoot>;\n\tTooltipContentProps: ComponentProps<typeof AreaChartTooltipContent>;\n\tTooltipProps: ComponentProps<typeof AreaChartTooltip>;\n\tXAxisProps: ComponentProps<typeof AreaChartXAxis>;\n\tYAxisProps: ComponentProps<typeof AreaChartYAxis>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Named Component\n * -----------------------------------------------------------------------------------------------*/\nexport { AreaChartArea, AreaChartGrid, AreaChartRoot, AreaChartTooltip, AreaChartTooltipContent, AreaChartXAxis, AreaChartYAxis };\n\nexport type { AreaChartRootProps } from \"./area-chart\";\n\n/* -------------------------------------------------------------------------------------------------\n * Variants\n * -----------------------------------------------------------------------------------------------*/\nexport { areaChartVariants } from \"./area-chart.styles\";\n\nexport type { AreaChartVariants } from \"./area-chart.styles\";\n"],"mappings":";;;;;;;AAIA,IAAa,oBAAoB,GAAG,EACnC,OAAO,EACN,MAAM,aACP,EACD,CAAC;;AC0BD,IAAM,iBAAA,O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MAAA;EAAzEF,EAAAA,MAAAA;EACfE,EAAAA,MAAAA;;;CAFF,OACCC;AAQF;AAEC,cAA2C,cAAc;;ACjD1D,IAAa,YAAY,OAAO,OAAO,eAAe;CAC/CE;CACN,MAAMC;CACN,MAAM;CACGC;CACT,gBAAgBC;CACTC;CACAC;AACR,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["<path d=\"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z\" fill=\"currentColor\" />","<svg viewBox=\"0 0 24 24\" width={16} height={16} aria-hidden=\"true\" {...props}>\r\n\t\t<path d=\"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z\" fill=\"currentColor\" />\r\n\t</svg>","{\r\n\t\tel,\r\n\t\tactive,\r\n\t\tonClick,\r\n\t\tisHoverIndex,\r\n\t\tsetHoverIndex,\r\n\t\tindex,\r\n\t\tdisplayField = \"name\",\r\n\t\tstartOptionIcon,\r\n\t}: AutocompleteOptionItemProps<T>","displayField = \"name\"","createRef<HTMLLIElement>()","() => {\r\n\t\t\t!isHoverIndex && setHoverIndex(index);\r\n\t\t}","() => {\r\n\t\t\tif (isHoverIndex && itemRef.current) {\r\n\t\t\t\titemRef.current.scrollIntoView({ behavior: \"auto\", block: \"nearest\" });\r\n\t\t\t}\r\n\t\t}","[isHoverIndex]","cn(\r\n\t\t\t\t\t\"d-flex w-full cursor-pointer rounded-md p-2 items-center gap-2 mb-0.5\",\r\n\t\t\t\t\tisHoverIndex ? \"bg-default-100\" : \"\",\r\n\t\t\t\t\tisSelected ? \"bg-default-200 font-semibold active-option-list\" : \"font-normal hover:bg-default-100 text-default-800\",\r\n\t\t\t\t)","isHoverIndex ? \"bg-default-100\" : \"\"","isSelected ? \"bg-default-200 font-semibold active-option-list\" : \"font-normal hover:bg-default-100 text-default-800\"","(e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tonClick({ e: undefined, el });\r\n\t\t\t\t}","el.children && <div className=\"flex-shrink-0\">{el.children}</div>","children","!el.children && (\r\n\t\t\t\t\t<div className=\"flex items-center justify-between gap-2 w-full\">\r\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\r\n\t\t\t\t\t\t\t{startOptionIcon ?? null}\r\n\t\t\t\t\t\t\t<div>{(el as any)[displayField as string]}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<CheckIcon className={cn(\"ml-auto\", isSelected ? \"visible \" : \"invisible\")} />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)","el.children","<li\r\n\t\t\t\tref={itemRef}\r\n\t\t\t\taria-selected={!!isSelected}\r\n\t\t\t\tclassName={cn(\r\n\t\t\t\t\t\"d-flex w-full cursor-pointer rounded-md p-2 items-center gap-2 mb-0.5\",\r\n\t\t\t\t\tisHoverIndex ? \"bg-default-100\" : \"\",\r\n\t\t\t\t\tisSelected ? \"bg-default-200 font-semibold active-option-list\" : \"font-normal hover:bg-default-100 text-default-800\",\r\n\t\t\t\t)}\r\n\t\t\t\trole=\"option\"\r\n\t\t\t\ttranslate=\"no\"\r\n\t\t\t\tonClick={(e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tonClick({ e: undefined, el });\r\n\t\t\t\t}}\r\n\t\t\t\tonMouseEnter={handleMouseEnterItem}\r\n\t\t\t>\r\n\t\t\t\t{el.children && <div className=\"flex-shrink-0\">{el.children}</div>}\r\n\t\t\t\t{!el.children && (\r\n\t\t\t\t\t<div className=\"flex items-center justify-between gap-2 w-full\">\r\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\r\n\t\t\t\t\t\t\t{startOptionIcon ?? null}\r\n\t\t\t\t\t\t\t<div>{(el as any)[displayField as string]}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<CheckIcon className={cn(\"ml-auto\", isSelected ? \"visible \" : \"invisible\")} />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)}\r\n\t\t\t</li>","!!isSelected","CheckIcon","_c","{ targetKey }: Props","() => {\r\n\t\tconst downHandler = ({ key }: KeyboardEvent) => {\r\n\t\t\tif (key === targetKey) setKeyPressed(true);\r\n\t\t};\r\n\t\tconst upHandler = ({ key }: KeyboardEvent) => {\r\n\t\t\tif (key === targetKey) setKeyPressed(false);\r\n\t\t};\r\n\r\n\t\twindow.addEventListener(\"keydown\", downHandler);\r\n\t\twindow.addEventListener(\"keyup\", upHandler);\r\n\r\n\t\treturn () => {\r\n\t\t\twindow.removeEventListener(\"keydown\", downHandler);\r\n\t\t\twindow.removeEventListener(\"keyup\", upHandler);\r\n\t\t};\r\n\t}","[targetKey]","{ key }: KeyboardEvent","key","_c","{\r\n\tdataValue,\r\n\tactive,\r\n\tonClick,\r\n\tmultiple,\r\n\ttextNoData,\r\n\thoverIndex,\r\n\tsetHoverIndex,\r\n\tshowTextNoData = true,\r\n\temptyContentChildren,\r\n\tdisplayField = \"name\",\r\n startOptionIcon,\r\n}: OptionListProps<any>","showTextNoData = true","displayField = \"name\"","{ targetKey: \"ArrowUp\" }","{ targetKey: \"ArrowDown\" }","() => {\r\n\t\tif (arrowUpPressed && hoverIndex !== null && hoverIndex > 0) {\r\n\t\t\tsetHoverIndex((previous) => (previous || 0) - 1);\r\n\t\t}\r\n\t}","(previous) => (previous || 0) - 1","[arrowUpPressed]","() => {\r\n\t\tif (arrowDownPressed && hoverIndex !== null && hoverIndex + 1 < dataValue.length) {\r\n\t\t\tsetHoverIndex((previous) => (previous || 0) + 1);\r\n\t\t}\r\n\t}","length","(previous) => (previous || 0) + 1","[arrowDownPressed]","<div className=\"d-flex w-full cursor-pointer rounded-md p-2 items-center gap-2\">\r\n\t\t\t\t<div>{textNoData}</div>\r\n\t\t\t</div>","dataValue.map((el, index) =>\r\n\t\t\t\tmultiple ? (\r\n\t\t\t\t\t<div key={`autocomplete-multi-${(el as any).id}-${index}`} />\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<AutocompleteOptionItem\r\n\t\t\t\t\t\tkey={`autocomplete-item-${(el as any).id}-${index}`}\r\n\t\t\t\t\t\tactive={active as any}\r\n\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\tel={el as any}\r\n\t\t\t\t\t\tindex={index}\r\n\t\t\t\t\t\tisHoverIndex={hoverIndex === index}\r\n\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\tonClick={onClick as any}\r\n startOptionIcon={startOptionIcon}\r\n\t\t\t\t\t/>\r\n\t\t\t\t),\r\n\t\t\t)","(el, index) =>\r\n\t\t\t\tmultiple ? (\r\n\t\t\t\t\t<div key={`autocomplete-multi-${(el as any).id}-${index}`} />\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<AutocompleteOptionItem\r\n\t\t\t\t\t\tkey={`autocomplete-item-${(el as any).id}-${index}`}\r\n\t\t\t\t\t\tactive={active as any}\r\n\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\tel={el as any}\r\n\t\t\t\t\t\tindex={index}\r\n\t\t\t\t\t\tisHoverIndex={hoverIndex === index}\r\n\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\tonClick={onClick as any}\r\n startOptionIcon={startOptionIcon}\r\n\t\t\t\t\t/>\r\n\t\t\t\t)","emptyContentChildren ? <div className=\"mt-2\">{emptyContentChildren}</div> : null","<>\r\n\t\t\t{dataValue.map((el, index) =>\r\n\t\t\t\tmultiple ? (\r\n\t\t\t\t\t<div key={`autocomplete-multi-${(el as any).id}-${index}`} />\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<AutocompleteOptionItem\r\n\t\t\t\t\t\tkey={`autocomplete-item-${(el as any).id}-${index}`}\r\n\t\t\t\t\t\tactive={active as any}\r\n\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\tel={el as any}\r\n\t\t\t\t\t\tindex={index}\r\n\t\t\t\t\t\tisHoverIndex={hoverIndex === index}\r\n\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\tonClick={onClick as any}\r\n startOptionIcon={startOptionIcon}\r\n\t\t\t\t\t/>\r\n\t\t\t\t),\r\n\t\t\t)}\r\n\t\t\t{emptyContentChildren ? <div className=\"mt-2\">{emptyContentChildren}</div> : null}\r\n\t\t</>","previous","_c","_temp","_Fragment","size = 24","{ size = 24, width, height, ...props }: IconSvgProps","<g fillRule=\"evenodd\" transform=\"translate(-448 -544)\">\r\n\t\t\t\t<g fillRule=\"nonzero\">\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M10.743 2.257a6 6 0 1 1-8.485 8.486 6 6 0 0 1 8.485-8.486zm-1.06 1.06a4.5 4.5 0 1 0-6.365 6.364 4.5 4.5 0 0 0 6.364-6.363z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M10.39 8.75a2.94 2.94 0 0 0-.199.432c-.155.417-.23.849-.172 1.284.055.415.232.794.54 1.103a.75.75 0 0 0 1.112-1.004l-.051-.057a.39.39 0 0 1-.114-.24c-.021-.155.014-.356.09-.563.031-.081.06-.145.08-.182l.012-.022a.75.75 0 1 0-1.299-.752z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M9.557 11.659c.038-.018.09-.04.15-.064.207-.077.408-.112.562-.092.08.01.143.034.198.077l.041.036a.75.75 0 0 0 1.06-1.06 1.881 1.881 0 0 0-1.103-.54c-.435-.058-.867.018-1.284.175-.189.07-.336.143-.433.2a.75.75 0 0 0 .624 1.356l.066-.027.12-.061z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"m13.463 15.142-.04-.044-3.574-4.192c-.599-.703.355-1.656 1.058-1.057l4.191 3.574.044.04c.058.059.122.137.182.24.249.425.249.96-.154 1.41l-.057.057c-.45.403-.986.403-1.411.154a1.182 1.182 0 0 1-.24-.182zm.617-.616.444-.444a.31.31 0 0 0-.063-.052c-.093-.055-.263-.055-.35.024l.208.232.207-.206.006.007-.22.257-.026-.024.033-.034.025.027-.257.22-.007-.007zm-.027-.415c-.078.088-.078.257-.023.35a.31.31 0 0 0 .051.063l.205-.204-.233-.209z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</g>\r\n\t\t\t</g>","<svg fill=\"currentColor\" height={size || height} viewBox=\"0 0 16 16\" width={size || width} {...props}>\r\n\t\t\t<g fillRule=\"evenodd\" transform=\"translate(-448 -544)\">\r\n\t\t\t\t<g fillRule=\"nonzero\">\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M10.743 2.257a6 6 0 1 1-8.485 8.486 6 6 0 0 1 8.485-8.486zm-1.06 1.06a4.5 4.5 0 1 0-6.365 6.364 4.5 4.5 0 0 0 6.364-6.363z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M10.39 8.75a2.94 2.94 0 0 0-.199.432c-.155.417-.23.849-.172 1.284.055.415.232.794.54 1.103a.75.75 0 0 0 1.112-1.004l-.051-.057a.39.39 0 0 1-.114-.24c-.021-.155.014-.356.09-.563.031-.081.06-.145.08-.182l.012-.022a.75.75 0 1 0-1.299-.752z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M9.557 11.659c.038-.018.09-.04.15-.064.207-.077.408-.112.562-.092.08.01.143.034.198.077l.041.036a.75.75 0 0 0 1.06-1.06 1.881 1.881 0 0 0-1.103-.54c-.435-.058-.867.018-1.284.175-.189.07-.336.143-.433.2a.75.75 0 0 0 .624 1.356l.066-.027.12-.061z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"m13.463 15.142-.04-.044-3.574-4.192c-.599-.703.355-1.656 1.058-1.057l4.191 3.574.044.04c.058.059.122.137.182.24.249.425.249.96-.154 1.41l-.057.057c-.45.403-.986.403-1.411.154a1.182 1.182 0 0 1-.24-.182zm.617-.616.444-.444a.31.31 0 0 0-.063-.052c-.093-.055-.263-.055-.35.024l.208.232.207-.206.006.007-.22.257-.026-.024.033-.034.025.027-.257.22-.007-.007zm-.027-.415c-.078.088-.078.257-.023.35a.31.31 0 0 0 .051.063l.205-.204-.233-.209z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</g>\r\n\t\t\t</g>\r\n\t\t</svg>","size || height","size || width","{\r\n\t\t\t\tdata,\r\n\t\t\t\tname,\r\n\t\t\t\theight = 160,\r\n\t\t\t\tonClick,\r\n\t\t\t\tactive,\r\n\t\t\t\trefPartner,\r\n\t\t\t\ttextNoData = \"No encontramos un resultado que coincida con tu búsqueda\",\r\n\t\t\t\tisSearch = true,\r\n\t\t\t\tmultiple = false,\r\n\t\t\t\twidthList,\r\n\t\t\t\tfixed = false,\r\n\t\t\t\tisLoading = false,\r\n\t\t\t\tisEnter = true,\r\n\t\t\t\temptyContentChildren,\r\n\t\t\t\tdisplayField = \"name\",\r\n\t\t\t\tstartOptionIcon,\r\n\t\t\t}","height = 160","textNoData = \"No encontramos un resultado que coincida con tu búsqueda\"","isSearch = true","multiple = false","fixed = false","isLoading = false","isEnter = true","displayField = \"name\"","[]","getInitialActiveIndex(data, active)","{ targetKey: \"Enter\" }","() => {\r\n\t\t\t\tsetDropdownPosition({ dropdownRef: ref as any, anchorRef: refPartner as any, height, width: widthList, fixed });\r\n\t\t\t}","useCallback(() => {\r\n\t\t\t\tsetDropdownPosition({ dropdownRef: ref as any, anchorRef: refPartner as any, height, width: widthList, fixed });\r\n\t\t\t}, [ref, refPartner, widthList, height, fixed])","() => {\r\n\t\t\t\thandleSetPositionSelect();\r\n\t\t\t}","[handleSetPositionSelect]","() => {\r\n\t\t\t\tsetDataValue(data);\r\n\t\t\t}","[data]","() => {\r\n\t\t\t\tif (isEnter && keyEnterPressed && dataValue.length > 0) {\r\n\t\t\t\t\tif (hoverIndex !== null && data[hoverIndex]) {\r\n\t\t\t\t\t\tonClick({ e: undefined, el: data[hoverIndex || 0] });\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}","[keyEnterPressed, isEnter, hoverIndex, data, dataValue, onClick]","dataValue.length","function handleSearchItem(e: React.ChangeEvent<HTMLInputElement>) {\r\n\t\t\t\tconst current = e.target.value;\r\n\r\n\t\t\t\tsetValue(current);\r\n\t\t\t\tif (current === \"\") {\r\n\t\t\t\t\tsetDataValue(data);\r\n\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tconst upper = current.trim().toUpperCase();\r\n\t\t\t\tconst result = data.filter((el: any) => el?.[displayField as string]?.toString().trim().toUpperCase().includes(upper));\r\n\r\n\t\t\t\tsetDataValue(result);\r\n\t\t\t}","(node: HTMLElement | null) => {\r\n\t\t\t\t(ref as any).current = node;\r\n\t\t\t\tlocalRef.current = node;\r\n\t\t\t}","{ opacity: 0, y: 4 }","{ opacity: 1, y: 0, transition: { duration: 0.14, ease: \"easeOut\" } }","{\r\n\t\t\t\thidden: { opacity: 0, y: 4 },\r\n\t\t\t\tshow: { opacity: 1, y: 0, transition: { duration: 0.14, ease: \"easeOut\" } },\r\n\t\t\t\texit: { opacity: 0, y: 4, transition: { duration: 0.1, ease: \"easeIn\" } },\r\n\t\t\t}","{\r\n\t\t\t\t\t\tmaxHeight: height,\r\n\t\t\t\t\t\twidth: widthList || \"auto\",\r\n\t\t\t\t\t\tposition: fixed ? \"fixed\" : \"absolute\",\r\n\t\t\t\t\t\tzIndex: 10,\r\n\t\t\t\t\t}","widthList || \"auto\"","fixed ? \"fixed\" : \"absolute\"","isLoading ? (\r\n\t\t\t\t\t\t<div translate=\"no\">\r\n\t\t\t\t\t\t\t<div>{\"Loading...\"}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t{isSearch && (\r\n\t\t\t\t\t\t\t\t<div className=\"mb-2 \">\r\n\t\t\t\t\t\t\t\t\t<Input endContent={<SearchIcon size={18} />} placeholder=\"Buscar...\" value={value} onChange={handleSearchItem} />\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t<AutocompleteOptionList\r\n\t\t\t\t\t\t\t\tactive={active}\r\n\t\t\t\t\t\t\t\tdataValue={dataValue}\r\n\t\t\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\t\t\temptyContentChildren={emptyContentChildren}\r\n\t\t\t\t\t\t\t\thoverIndex={hoverIndex}\r\n\t\t\t\t\t\t\t\tmultiple={multiple}\r\n\t\t\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\t\t\ttextNoData={textNoData}\r\n\t\t\t\t\t\t\t\tonClick={onClick}\r\n\t\t\t\t\t\t\t\tstartOptionIcon={startOptionIcon}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t)","<motion.div\r\n\t\t\t\t\tref={setRefs}\r\n\t\t\t\t\tkey=\"dropdown-motion-root\"\r\n\t\t\t\t\tvariants={variants}\r\n\t\t\t\t\tinitial=\"hidden\"\r\n\t\t\t\t\tanimate=\"show\"\r\n\t\t\t\t\texit=\"exit\"\r\n\t\t\t\t\taria-activedescendant={hoverIndex !== null ? String((dataValue[hoverIndex] as any)?.id) : undefined}\r\n\t\t\t\t\tclassName=\"container-dropdown-list bg-content1 shadow-large rounded-md p-2 overflow-y-auto origin-top\"\r\n\t\t\t\t\tdata-name={name}\r\n\t\t\t\t\trole=\"listbox\"\r\n\t\t\t\t\tstyle={{\r\n\t\t\t\t\t\tmaxHeight: height,\r\n\t\t\t\t\t\twidth: widthList || \"auto\",\r\n\t\t\t\t\t\tposition: fixed ? \"fixed\" : \"absolute\",\r\n\t\t\t\t\t\tzIndex: 10,\r\n\t\t\t\t\t}}\r\n\t\t\t\t>\r\n\t\t\t\t\t{isLoading ? (\r\n\t\t\t\t\t\t<div translate=\"no\">\r\n\t\t\t\t\t\t\t<div>{\"Loading...\"}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t{isSearch && (\r\n\t\t\t\t\t\t\t\t<div className=\"mb-2 \">\r\n\t\t\t\t\t\t\t\t\t<Input endContent={<SearchIcon size={18} />} placeholder=\"Buscar...\" value={value} onChange={handleSearchItem} />\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t<AutocompleteOptionList\r\n\t\t\t\t\t\t\t\tactive={active}\r\n\t\t\t\t\t\t\t\tdataValue={dataValue}\r\n\t\t\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\t\t\temptyContentChildren={emptyContentChildren}\r\n\t\t\t\t\t\t\t\thoverIndex={hoverIndex}\r\n\t\t\t\t\t\t\t\tmultiple={multiple}\r\n\t\t\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\t\t\ttextNoData={textNoData}\r\n\t\t\t\t\t\t\t\tonClick={onClick}\r\n\t\t\t\t\t\t\t\tstartOptionIcon={startOptionIcon}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</motion.div>","hoverIndex !== null ? String((dataValue[hoverIndex] as any)?.id) : undefined","motion.div","SearchIcon","_c","_Fragment","AutocompleteOptionList","{ containerRef, dropdownRef, onCloseDropDown }: DropdownControllerProps","(event: OutsideEvent) => {\r\n\t\t\tif (!isOpen) return;\r\n\t\t\tconst target = event.target as Node | null;\r\n\r\n\t\t\tif (!target) return;\r\n\t\t\tconst containerEl = containerRef.current;\r\n\t\t\tconst dropdownEl = dropdownRef.current;\r\n\t\t\tconst clickOutside = !!target && containerEl && !containerEl.contains(target) && dropdownEl && !dropdownEl.contains(target);\r\n\r\n\t\t\tif (clickOutside) {\r\n\t\t\t\tsetIsOpen(false);\r\n\t\t\t\tonCloseDropDown?.();\r\n\t\t\t}\r\n\t\t}","containerRef.current","dropdownRef.current","useCallback(\r\n\t\t(event: OutsideEvent) => {\r\n\t\t\tif (!isOpen) return;\r\n\t\t\tconst target = event.target as Node | null;\r\n\r\n\t\t\tif (!target) return;\r\n\t\t\tconst containerEl = containerRef.current;\r\n\t\t\tconst dropdownEl = dropdownRef.current;\r\n\t\t\tconst clickOutside = !!target && containerEl && !containerEl.contains(target) && dropdownEl && !dropdownEl.contains(target);\r\n\r\n\t\t\tif (clickOutside) {\r\n\t\t\t\tsetIsOpen(false);\r\n\t\t\t\tonCloseDropDown?.();\r\n\t\t\t}\r\n\t\t},\r\n\t\t[isOpen, dropdownRef, containerRef, onCloseDropDown],\r\n\t)","useCallback(() => document.getElementById(\"modal-root\"), [])","() => {\r\n\t\tdocument.addEventListener(\"click\", handleEventsOutside);\r\n\t\tdocument.addEventListener(\"wheel\", handleEventsOutside);\r\n\t\tconst modalElem = modalRef();\r\n\r\n\t\tmodalElem?.addEventListener(\"click\", handleEventsOutside);\r\n\t\tmodalElem?.addEventListener(\"wheel\", handleEventsOutside);\r\n\r\n\t\treturn () => {\r\n\t\t\tdocument.removeEventListener(\"click\", handleEventsOutside);\r\n\t\t\tdocument.removeEventListener(\"wheel\", handleEventsOutside);\r\n\t\t\tconst modalElemCleanup = modalRef();\r\n\r\n\t\t\tmodalElemCleanup?.removeEventListener(\"click\", handleEventsOutside);\r\n\t\t\tmodalElemCleanup?.removeEventListener(\"wheel\", handleEventsOutside);\r\n\t\t};\r\n\t}","[handleEventsOutside, modalRef]","[isOpen, setIsOpen]","_c"],"sources":["../../src/components/autocomplete/autocomplete-option-item.tsx","../../src/components/autocomplete/use-key-press.ts","../../src/components/autocomplete/autocomplete-option-list.tsx","../../src/components/autocomplete/autocomplete-utils.ts","../../src/components/autocomplete/autocomplete-dropdown.tsx","../../src/components/autocomplete/use-autocomplete-dropdown.ts","../../src/components/autocomplete/input-autocomplete-form.tsx"],"sourcesContent":["\r\nimport { cn } from \"@/lib/utils\";\r\nimport type { DataValueListItem } from \"./autocomplete-types\";\r\n\r\nimport React, { createRef, memo, useEffect } from \"react\";\r\n\r\ninterface AutocompleteOptionItemProps<T extends DataValueListItem = DataValueListItem> {\r\n\tel: T;\r\n\tactive: number | string | T[];\r\n\tonClick: (args: { e?: React.MouseEvent<HTMLLIElement>; el: T }) => void;\r\n\tisHoverIndex: boolean;\r\n\tsetHoverIndex: React.Dispatch<React.SetStateAction<number | null>>;\r\n\tindex: number;\r\n\tdisplayField?: keyof T | string;\r\n\tstartOptionIcon?: React.ReactNode;\r\n}\r\n\r\nconst CheckIcon = (props: React.SVGProps<SVGSVGElement>) => (\r\n\t<svg viewBox=\"0 0 24 24\" width={16} height={16} aria-hidden=\"true\" {...props}>\r\n\t\t<path d=\"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z\" fill=\"currentColor\" />\r\n\t</svg>\r\n);\r\n\r\nexport const AutocompleteOptionItem = memo(\r\n\t<T extends DataValueListItem>({\r\n\t\tel,\r\n\t\tactive,\r\n\t\tonClick,\r\n\t\tisHoverIndex,\r\n\t\tsetHoverIndex,\r\n\t\tindex,\r\n\t\tdisplayField = \"name\",\r\n\t\tstartOptionIcon,\r\n\t}: AutocompleteOptionItemProps<T>) => {\r\n\t\tconst itemRef = createRef<HTMLLIElement>();\r\n\t\tconst isSelected = active === el.id;\r\n\r\n\t\tconst handleMouseEnterItem = () => {\r\n\t\t\t!isHoverIndex && setHoverIndex(index);\r\n\t\t};\r\n\r\n\t\tuseEffect(() => {\r\n\t\t\tif (isHoverIndex && itemRef.current) {\r\n\t\t\t\titemRef.current.scrollIntoView({ behavior: \"auto\", block: \"nearest\" });\r\n\t\t\t}\r\n\t\t}, [isHoverIndex]);\r\n\r\n\t\treturn (\r\n\t\t\t<li\r\n\t\t\t\tref={itemRef}\r\n\t\t\t\taria-selected={!!isSelected}\r\n\t\t\t\tclassName={cn(\r\n\t\t\t\t\t\"d-flex w-full cursor-pointer rounded-md p-2 items-center gap-2 mb-0.5\",\r\n\t\t\t\t\tisHoverIndex ? \"bg-default-100\" : \"\",\r\n\t\t\t\t\tisSelected ? \"bg-default-200 font-semibold active-option-list\" : \"font-normal hover:bg-default-100 text-default-800\",\r\n\t\t\t\t)}\r\n\t\t\t\trole=\"option\"\r\n\t\t\t\ttranslate=\"no\"\r\n\t\t\t\tonClick={(e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tonClick({ e: undefined, el });\r\n\t\t\t\t}}\r\n\t\t\t\tonMouseEnter={handleMouseEnterItem}\r\n\t\t\t>\r\n\t\t\t\t{el.children && <div className=\"flex-shrink-0\">{el.children}</div>}\r\n\t\t\t\t{!el.children && (\r\n\t\t\t\t\t<div className=\"flex items-center justify-between gap-2 w-full\">\r\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\r\n\t\t\t\t\t\t\t{startOptionIcon ?? null}\r\n\t\t\t\t\t\t\t<div>{(el as any)[displayField as string]}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<CheckIcon className={cn(\"ml-auto\", isSelected ? \"visible \" : \"invisible\")} />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)}\r\n\t\t\t</li>\r\n\t\t);\r\n\t},\r\n);\r\n\r\nAutocompleteOptionItem.displayName = \"AutocompleteOptionItem\";\r\n","import { useEffect, useState } from \"react\";\r\n\r\ninterface Props {\r\n\ttargetKey: string;\r\n}\r\nexport const useKeyPress = ({ targetKey }: Props) => {\r\n\tconst [keyPressed, setKeyPressed] = useState(false);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst downHandler = ({ key }: KeyboardEvent) => {\r\n\t\t\tif (key === targetKey) setKeyPressed(true);\r\n\t\t};\r\n\t\tconst upHandler = ({ key }: KeyboardEvent) => {\r\n\t\t\tif (key === targetKey) setKeyPressed(false);\r\n\t\t};\r\n\r\n\t\twindow.addEventListener(\"keydown\", downHandler);\r\n\t\twindow.addEventListener(\"keyup\", upHandler);\r\n\r\n\t\treturn () => {\r\n\t\t\twindow.removeEventListener(\"keydown\", downHandler);\r\n\t\t\twindow.removeEventListener(\"keyup\", upHandler);\r\n\t\t};\r\n\t}, [targetKey]);\r\n\r\n\treturn keyPressed;\r\n};\r\n","import type { OptionListProps } from \"./autocomplete-types\";\r\n\r\nimport { memo, useEffect } from \"react\";\r\n\r\nimport { AutocompleteOptionItem } from \"./autocomplete-option-item\";\r\nimport { useKeyPress } from \"./use-key-press\";\r\n\r\nconst AutocompleteOptionList = ({\r\n\tdataValue,\r\n\tactive,\r\n\tonClick,\r\n\tmultiple,\r\n\ttextNoData,\r\n\thoverIndex,\r\n\tsetHoverIndex,\r\n\tshowTextNoData = true,\r\n\temptyContentChildren,\r\n\tdisplayField = \"name\",\r\n startOptionIcon,\r\n}: OptionListProps<any>) => {\r\n\tconst arrowUpPressed = useKeyPress({ targetKey: \"ArrowUp\" });\r\n\tconst arrowDownPressed = useKeyPress({ targetKey: \"ArrowDown\" });\r\n\r\n\tuseEffect(() => {\r\n\t\tif (arrowUpPressed && hoverIndex !== null && hoverIndex > 0) {\r\n\t\t\tsetHoverIndex((previous) => (previous || 0) - 1);\r\n\t\t}\r\n\t}, [arrowUpPressed]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (arrowDownPressed && hoverIndex !== null && hoverIndex + 1 < dataValue.length) {\r\n\t\t\tsetHoverIndex((previous) => (previous || 0) + 1);\r\n\t\t}\r\n\t}, [arrowDownPressed]);\r\n\r\n\tif (dataValue.length === 0 && showTextNoData) {\r\n\t\tif (emptyContentChildren) return emptyContentChildren;\r\n\r\n\t\treturn (\r\n\t\t\t<div className=\"d-flex w-full cursor-pointer rounded-md p-2 items-center gap-2\">\r\n\t\t\t\t<div>{textNoData}</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{dataValue.map((el, index) =>\r\n\t\t\t\tmultiple ? (\r\n\t\t\t\t\t<div key={`autocomplete-multi-${(el as any).id}-${index}`} />\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<AutocompleteOptionItem\r\n\t\t\t\t\t\tkey={`autocomplete-item-${(el as any).id}-${index}`}\r\n\t\t\t\t\t\tactive={active as any}\r\n\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\tel={el as any}\r\n\t\t\t\t\t\tindex={index}\r\n\t\t\t\t\t\tisHoverIndex={hoverIndex === index}\r\n\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\tonClick={onClick as any}\r\n startOptionIcon={startOptionIcon}\r\n\t\t\t\t\t/>\r\n\t\t\t\t),\r\n\t\t\t)}\r\n\t\t\t{emptyContentChildren ? <div className=\"mt-2\">{emptyContentChildren}</div> : null}\r\n\t\t</>\r\n\t);\r\n};\r\n\r\nexport default memo(AutocompleteOptionList);\r\n","import type { RefObject } from \"react\";\r\nimport type { DataValueListItem } from \"./autocomplete-types\";\r\n\r\nexport const hideAllSelectLists = (name: string | undefined) => {\r\n\tconst dropdowns = document.querySelectorAll<HTMLElement>(\".container-dropdown-list[data-name]\");\r\n\r\n\tdropdowns.forEach((dropdown) => {\r\n\t\tconst dropdownName = dropdown.getAttribute(\"data-name\");\r\n\r\n\t\tif (dropdownName === name) return; // es el activo, no cerrar\r\n\t\tconst isVisible = dropdown.offsetParent !== null || dropdown.style.visibility === \"visible\";\r\n\r\n\t\tif (!isVisible) return;\r\n\t\tconst root = dropdown.closest(\".main-container-autocomplete-form\");\r\n\t\tconst input = root?.querySelector<HTMLInputElement>(\".input-autocomplete-form-search\");\r\n\r\n\t\tif (input) {\r\n\t\t\tinput.dispatchEvent(new MouseEvent(\"click\", { bubbles: true }));\r\n\t\t}\r\n\t});\r\n};\r\n\r\nexport const hideAllPortalSelectLists = (name: string | undefined) => {\r\n\tconst parentElement: Element | null = document.querySelector(\".react-tiny-popover-container\");\r\n\r\n\tif (!parentElement) return;\r\n\tconst dropdowns = parentElement.querySelectorAll<HTMLElement>(\".container-dropdown-list[data-name]\");\r\n\r\n\tdropdowns.forEach((dropdown) => {\r\n\t\tconst dropdownName = dropdown.getAttribute(\"data-name\");\r\n\r\n\t\tif (dropdownName === name) return;\r\n\t\tconst isVisible = dropdown.offsetParent !== null || dropdown.style.visibility === \"visible\";\r\n\r\n\t\tif (!isVisible) return;\r\n\t\tconst root = dropdown.closest(\".main-container-autocomplete-form\");\r\n\t\tconst input = root?.querySelector<HTMLInputElement>(\".input-autocomplete-form-search\");\r\n\r\n\t\tif (input) {\r\n\t\t\tinput.dispatchEvent(new MouseEvent(\"click\", { bubbles: true }));\r\n\t\t}\r\n\t});\r\n};\r\n\r\nexport function getInitialActiveIndex(data: DataValueListItem[], active: string | number | DataValueListItem[]) {\r\n\tif (!data) return 0;\r\n\tlet index = 0;\r\n\r\n\tif (typeof active === \"string\" || typeof active === \"number\") {\r\n\t\tindex = data.findIndex((item) => item?.id?.toString() === active?.toString());\r\n\r\n\t\treturn index === -1 ? 0 : index;\r\n\t}\r\n\tif (active.length === 0) return 0;\r\n\tindex = data.findIndex((item) => item.id?.toString() === active[active.length - 1].id?.toString());\r\n\r\n\treturn index === -1 ? 0 : index;\r\n}\r\n\r\ninterface SetDropdownPositionArgs {\r\n\tdropdownRef: RefObject<HTMLElement> | { current: HTMLElement | null };\r\n\tanchorRef: RefObject<HTMLElement> | { current: HTMLElement | null };\r\n\theight: number;\r\n\twidth?: number | \"auto\";\r\n\tfixed?: boolean;\r\n}\r\n\r\nexport const setDropdownPosition = ({ dropdownRef, anchorRef, height, width, fixed = true }: SetDropdownPositionArgs) => {\r\n\tconst listEl = dropdownRef?.current;\r\n\tconst anchorEl = anchorRef?.current;\r\n\r\n\tif (!listEl || !anchorEl) return;\r\n\tconst gap = 8;\r\n\tconst inputRect = anchorEl.getBoundingClientRect();\r\n\tconst optionsContainerHeight = height || listEl.offsetHeight;\r\n\tconst overflowBottom = inputRect.bottom + optionsContainerHeight + gap > window.innerHeight;\r\n\r\n\tif (overflowBottom) {\r\n\t\tlistEl.style.bottom = fixed ? `${window.innerHeight - inputRect.top + gap}px` : `32px`;\r\n\t\tlistEl.style.top = \"auto\";\r\n\t} else {\r\n\t\tif (fixed) {\r\n\t\t\tlistEl.style.top = `${inputRect.bottom + gap}px`;\r\n\t\t}\r\n\t\tlistEl.style.bottom = \"auto\";\r\n\t}\r\n\tlistEl.style.left = fixed ? `${inputRect.left}px` : \"0\";\r\n\r\n\t// Cálculo de ancho: por defecto igual al input; si se pasa width numérico actúa como mínimo.\r\n\tconst inputWidth = inputRect.width;\r\n\tif (typeof width === \"number\") {\r\n\t\tconst finalWidth = Math.max(inputWidth, width);\r\n\t\tlistEl.style.minWidth = `${width}px`;\r\n\t\tlistEl.style.width = `${finalWidth}px`;\r\n\t} else {\r\n\t\tlistEl.style.width = `${inputWidth}px`;\r\n\t}\r\n\r\n\tlistEl.style.visibility = \"visible\";\r\n};\r\n","import type { DataValueListItem, DropdownContainerProps } from \"./autocomplete-types\";\r\n\r\nimport { motion } from \"motion/react\";\r\nimport { forwardRef, memo, useCallback, useEffect, useRef, useState } from \"react\";\r\n\r\nimport AutocompleteOptionList from \"./autocomplete-option-list\";\r\nimport { getInitialActiveIndex, setDropdownPosition } from \"./autocomplete-utils\";\r\nimport { useKeyPress } from \"./use-key-press\";\r\nimport type { IconSvgProps } from \"@/types\";\r\nimport { Input } from \"../ui\";\r\n\r\nconst SearchIcon = ({ size = 24, width, height, ...props }: IconSvgProps) => {\r\n\treturn (\r\n\t\t<svg fill=\"currentColor\" height={size || height} viewBox=\"0 0 16 16\" width={size || width} {...props}>\r\n\t\t\t<g fillRule=\"evenodd\" transform=\"translate(-448 -544)\">\r\n\t\t\t\t<g fillRule=\"nonzero\">\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M10.743 2.257a6 6 0 1 1-8.485 8.486 6 6 0 0 1 8.485-8.486zm-1.06 1.06a4.5 4.5 0 1 0-6.365 6.364 4.5 4.5 0 0 0 6.364-6.363z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M10.39 8.75a2.94 2.94 0 0 0-.199.432c-.155.417-.23.849-.172 1.284.055.415.232.794.54 1.103a.75.75 0 0 0 1.112-1.004l-.051-.057a.39.39 0 0 1-.114-.24c-.021-.155.014-.356.09-.563.031-.081.06-.145.08-.182l.012-.022a.75.75 0 1 0-1.299-.752z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M9.557 11.659c.038-.018.09-.04.15-.064.207-.077.408-.112.562-.092.08.01.143.034.198.077l.041.036a.75.75 0 0 0 1.06-1.06 1.881 1.881 0 0 0-1.103-.54c-.435-.058-.867.018-1.284.175-.189.07-.336.143-.433.2a.75.75 0 0 0 .624 1.356l.066-.027.12-.061z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"m13.463 15.142-.04-.044-3.574-4.192c-.599-.703.355-1.656 1.058-1.057l4.191 3.574.044.04c.058.059.122.137.182.24.249.425.249.96-.154 1.41l-.057.057c-.45.403-.986.403-1.411.154a1.182 1.182 0 0 1-.24-.182zm.617-.616.444-.444a.31.31 0 0 0-.063-.052c-.093-.055-.263-.055-.35.024l.208.232.207-.206.006.007-.22.257-.026-.024.033-.034.025.027-.257.22-.007-.007zm-.027-.415c-.078.088-.078.257-.023.35a.31.31 0 0 0 .051.063l.205-.204-.233-.209z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</g>\r\n\t\t\t</g>\r\n\t\t</svg>\r\n\t);\r\n};\r\n\r\nexport const AutocompleteDropdown = memo(\r\n\tforwardRef<HTMLElement, DropdownContainerProps>(\r\n\t\t(\r\n\t\t\t{\r\n\t\t\t\tdata,\r\n\t\t\t\tname,\r\n\t\t\t\theight = 160,\r\n\t\t\t\tonClick,\r\n\t\t\t\tactive,\r\n\t\t\t\trefPartner,\r\n\t\t\t\ttextNoData = \"No encontramos un resultado que coincida con tu búsqueda\",\r\n\t\t\t\tisSearch = true,\r\n\t\t\t\tmultiple = false,\r\n\t\t\t\twidthList,\r\n\t\t\t\tfixed = false,\r\n\t\t\t\tisLoading = false,\r\n\t\t\t\tisEnter = true,\r\n\t\t\t\temptyContentChildren,\r\n\t\t\t\tdisplayField = \"name\",\r\n\t\t\t\tstartOptionIcon,\r\n\t\t\t},\r\n\t\t\tref,\r\n\t\t) => {\r\n\t\t\tconst [value, setValue] = useState(\"\");\r\n\t\t\tconst [dataValue, setDataValue] = useState<Array<DataValueListItem>>([]);\r\n\t\t\tconst [hoverIndex, setHoverIndex] = useState<number | null>(getInitialActiveIndex(data, active));\r\n\t\t\tconst keyEnterPressed = useKeyPress({ targetKey: \"Enter\" });\r\n\r\n\t\t\tconst handleSetPositionSelect = useCallback(() => {\r\n\t\t\t\tsetDropdownPosition({ dropdownRef: ref as any, anchorRef: refPartner as any, height, width: widthList, fixed });\r\n\t\t\t}, [ref, refPartner, widthList, height, fixed]);\r\n\r\n\t\t\tuseEffect(() => {\r\n\t\t\t\thandleSetPositionSelect();\r\n\t\t\t}, [handleSetPositionSelect]);\r\n\r\n\t\t\tuseEffect(() => {\r\n\t\t\t\tsetDataValue(data);\r\n\t\t\t}, [data]);\r\n\r\n\t\t\tuseEffect(() => {\r\n\t\t\t\tif (isEnter && keyEnterPressed && dataValue.length > 0) {\r\n\t\t\t\t\tif (hoverIndex !== null && data[hoverIndex]) {\r\n\t\t\t\t\t\tonClick({ e: undefined, el: data[hoverIndex || 0] });\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, [keyEnterPressed, isEnter, hoverIndex, data, dataValue, onClick]);\r\n\r\n\t\t\tfunction handleSearchItem(e: React.ChangeEvent<HTMLInputElement>) {\r\n\t\t\t\tconst current = e.target.value;\r\n\r\n\t\t\t\tsetValue(current);\r\n\t\t\t\tif (current === \"\") {\r\n\t\t\t\t\tsetDataValue(data);\r\n\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tconst upper = current.trim().toUpperCase();\r\n\t\t\t\tconst result = data.filter((el: any) => el?.[displayField as string]?.toString().trim().toUpperCase().includes(upper));\r\n\r\n\t\t\t\tsetDataValue(result);\r\n\t\t\t}\r\n\r\n\t\t\tconst localRef = useRef<HTMLElement | null>(null);\r\n\t\t\tconst setRefs = (node: HTMLElement | null) => {\r\n\t\t\t\t(ref as any).current = node;\r\n\t\t\t\tlocalRef.current = node;\r\n\t\t\t};\r\n\r\n\t\t\tconst variants = {\r\n\t\t\t\thidden: { opacity: 0, y: 4 },\r\n\t\t\t\tshow: { opacity: 1, y: 0, transition: { duration: 0.14, ease: \"easeOut\" } },\r\n\t\t\t\texit: { opacity: 0, y: 4, transition: { duration: 0.1, ease: \"easeIn\" } },\r\n\t\t\t} as const;\r\n\r\n\t\t\treturn (\r\n\t\t\t\t<motion.div\r\n\t\t\t\t\tref={setRefs}\r\n\t\t\t\t\tkey=\"dropdown-motion-root\"\r\n\t\t\t\t\tvariants={variants}\r\n\t\t\t\t\tinitial=\"hidden\"\r\n\t\t\t\t\tanimate=\"show\"\r\n\t\t\t\t\texit=\"exit\"\r\n\t\t\t\t\taria-activedescendant={hoverIndex !== null ? String((dataValue[hoverIndex] as any)?.id) : undefined}\r\n\t\t\t\t\tclassName=\"container-dropdown-list bg-content1 shadow-large rounded-md p-2 overflow-y-auto origin-top\"\r\n\t\t\t\t\tdata-name={name}\r\n\t\t\t\t\trole=\"listbox\"\r\n\t\t\t\t\tstyle={{\r\n\t\t\t\t\t\tmaxHeight: height,\r\n\t\t\t\t\t\twidth: widthList || \"auto\",\r\n\t\t\t\t\t\tposition: fixed ? \"fixed\" : \"absolute\",\r\n\t\t\t\t\t\tzIndex: 10,\r\n\t\t\t\t\t}}\r\n\t\t\t\t>\r\n\t\t\t\t\t{isLoading ? (\r\n\t\t\t\t\t\t<div translate=\"no\">\r\n\t\t\t\t\t\t\t<div>{\"Loading...\"}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t{isSearch && (\r\n\t\t\t\t\t\t\t\t<div className=\"mb-2 \">\r\n\t\t\t\t\t\t\t\t\t<Input endContent={<SearchIcon size={18} />} placeholder=\"Buscar...\" value={value} onChange={handleSearchItem} />\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t<AutocompleteOptionList\r\n\t\t\t\t\t\t\t\tactive={active}\r\n\t\t\t\t\t\t\t\tdataValue={dataValue}\r\n\t\t\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\t\t\temptyContentChildren={emptyContentChildren}\r\n\t\t\t\t\t\t\t\thoverIndex={hoverIndex}\r\n\t\t\t\t\t\t\t\tmultiple={multiple}\r\n\t\t\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\t\t\ttextNoData={textNoData}\r\n\t\t\t\t\t\t\t\tonClick={onClick}\r\n\t\t\t\t\t\t\t\tstartOptionIcon={startOptionIcon}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</motion.div>\r\n\t\t\t);\r\n\t\t},\r\n\t),\r\n);\r\n\r\nAutocompleteDropdown.displayName = \"AutocompleteDropdown\";\r\n","import { useCallback, useEffect, useState, type RefObject } from \"react\";\r\n\r\ninterface DropdownControllerProps {\r\n\tcontainerRef: RefObject<HTMLElement>;\r\n\tdropdownRef: RefObject<HTMLElement>;\r\n\tonCloseDropDown?: () => void;\r\n}\r\n\r\ntype OutsideEvent = MouseEvent | WheelEvent;\r\n\r\nexport function useAutocompleteDropdown({ containerRef, dropdownRef, onCloseDropDown }: DropdownControllerProps) {\r\n\tconst [isOpen, setIsOpen] = useState<boolean>(false);\r\n\r\n\tconst handleEventsOutside = useCallback(\r\n\t\t(event: OutsideEvent) => {\r\n\t\t\tif (!isOpen) return;\r\n\t\t\tconst target = event.target as Node | null;\r\n\r\n\t\t\tif (!target) return;\r\n\t\t\tconst containerEl = containerRef.current;\r\n\t\t\tconst dropdownEl = dropdownRef.current;\r\n\t\t\tconst clickOutside = !!target && containerEl && !containerEl.contains(target) && dropdownEl && !dropdownEl.contains(target);\r\n\r\n\t\t\tif (clickOutside) {\r\n\t\t\t\tsetIsOpen(false);\r\n\t\t\t\tonCloseDropDown?.();\r\n\t\t\t}\r\n\t\t},\r\n\t\t[isOpen, dropdownRef, containerRef, onCloseDropDown],\r\n\t);\r\n\r\n\tconst modalRef = useCallback(() => document.getElementById(\"modal-root\"), []);\r\n\r\n\tuseEffect(() => {\r\n\t\tdocument.addEventListener(\"click\", handleEventsOutside);\r\n\t\tdocument.addEventListener(\"wheel\", handleEventsOutside);\r\n\t\tconst modalElem = modalRef();\r\n\r\n\t\tmodalElem?.addEventListener(\"click\", handleEventsOutside);\r\n\t\tmodalElem?.addEventListener(\"wheel\", handleEventsOutside);\r\n\r\n\t\treturn () => {\r\n\t\t\tdocument.removeEventListener(\"click\", handleEventsOutside);\r\n\t\t\tdocument.removeEventListener(\"wheel\", handleEventsOutside);\r\n\t\t\tconst modalElemCleanup = modalRef();\r\n\r\n\t\t\tmodalElemCleanup?.removeEventListener(\"click\", handleEventsOutside);\r\n\t\t\tmodalElemCleanup?.removeEventListener(\"wheel\", handleEventsOutside);\r\n\t\t};\r\n\t}, [handleEventsOutside, modalRef]);\r\n\r\n\treturn [isOpen, setIsOpen] as const;\r\n}\r\n","import type { DataValueListItem, InputAutocompleteFormProps } from \"./autocomplete-types\";\r\nimport { RefreshCwIcon } from \"lucide-react\";\r\nimport { forwardRef, memo, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\r\nimport { useOnClickOutside } from \"usehooks-ts\";\r\n\r\nimport { AnimatePresence } from \"motion/react\";\r\nimport { AutocompleteDropdown } from \"./autocomplete-dropdown\";\r\nimport { hideAllPortalSelectLists, hideAllSelectLists } from \"./autocomplete-utils\";\r\nimport { useAutocompleteDropdown } from \"./use-autocomplete-dropdown\";\r\nimport { Input } from \"../ui\";\r\n\r\nexport const InputAutocompleteForm = memo(\r\n\tforwardRef<HTMLDivElement, InputAutocompleteFormProps>(\r\n\t\t(\r\n\t\t\t{\r\n\t\t\t\tdata,\r\n\t\t\t\tid,\r\n\t\t\t\tname,\r\n\t\t\t\terrors,\r\n\t\t\t\ttouched,\r\n\t\t\t\tvalue,\r\n\t\t\t\tplaceholder = \"Buscar ...\",\r\n\t\t\t\treadOnly,\r\n\t\t\t\tstyle,\r\n\t\t\t\theight = 220,\r\n\t\t\t\tisSearch = false,\r\n\t\t\t\twidthList,\r\n\t\t\t\tloading = false,\r\n\t\t\t\ticonLeft,\r\n\t\t\t\ticonRight,\r\n\t\t\t\tautoFocus = false,\r\n\t\t\t\tinputId = \"\",\r\n\t\t\t\tonChange,\r\n\t\t\t\tonBlur,\r\n\t\t\t\tonClickItem,\r\n\t\t\t\tonResetInput,\r\n\t\t\t\tonMouseLeave,\r\n\t\t\t\tonMouseOver,\r\n\t\t\t\tonMouseEnter,\r\n\t\t\t\tinputClassName,\r\n\t\t\t\tfixed = true,\r\n\t\t\t\tinputRef,\r\n\t\t\t\tdefaultValue,\r\n\t\t\t\ttype = \"text\",\r\n\t\t\t\tisInsidePopover = false,\r\n\t\t\t\tcloseClickOutside = true,\r\n\t\t\t\ttextNoData,\r\n\t\t\t\tisEnter = true,\r\n\t\t\t\tmaxLength,\r\n\t\t\t\tstyleInput,\r\n\t\t\t\temptyContentChildren,\r\n\t\t\t\tstartOptionIcon,\r\n\t\t\t},\r\n\t\t\tref,\r\n\t\t) => {\r\n\t\t\tconst [valueField, setValueField] = useState<string>(\"\");\r\n\r\n\t\t\tconst internalInputRef = useRef<HTMLInputElement | null>(null);\r\n\t\t\tconst safeInputRef = (inputRef as any) ?? internalInputRef;\r\n\t\t\tconst selectListRef = useRef<HTMLUListElement>(null);\r\n\t\t\tconst containerRefAutocomplete = useRef<HTMLElement>(null);\r\n\r\n\t\t\tconst [isOpenDropdown, setIsOpenDropdown] = useAutocompleteDropdown({\r\n\t\t\t\tcontainerRef: safeInputRef as any,\r\n\t\t\t\tdropdownRef: selectListRef as any,\r\n\t\t\t\tonCloseDropDown: () => {\r\n\t\t\t\t\tif (defaultValue) {\r\n\t\t\t\t\t\tsetValueField(defaultValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t});\r\n\r\n\t\t\tuseOnClickOutside(containerRefAutocomplete as any, () => {\r\n\t\t\t\tif (closeClickOutside) {\r\n\t\t\t\t\tsetIsOpenDropdown(false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tuseEffect(() => {\r\n\t\t\t\tsetValueField(value);\r\n\t\t\t}, [value]);\r\n\r\n\t\t\tconst handleClickItem = useCallback(\r\n\t\t\t\t({ el }: { e?: React.MouseEvent<HTMLLIElement | HTMLLabelElement>; el: DataValueListItem }) => {\r\n\t\t\t\t\tsetIsOpenDropdown(false);\r\n\t\t\t\t\tonClickItem && onClickItem(el);\r\n\t\t\t\t},\r\n\t\t\t\t[onClickItem],\r\n\t\t\t);\r\n\r\n\t\t\tconst handleSearchText = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n\t\t\t\tsetIsOpenDropdown(true);\r\n\t\t\t\tonChange && onChange(e);\r\n\t\t\t};\r\n\r\n\t\t\tconst endIcon = useMemo(() => {\r\n\t\t\t\tif (loading) {\r\n\t\t\t\t\treturn (\r\n\t\t\t\t\t\t<div aria-label=\"loading\" role=\"status\">\r\n\t\t\t\t\t\t\t<RefreshCwIcon className=\"h-4 w-4 animate-spin\" width={18} />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\tif (valueField !== \"\" && !readOnly) {\r\n\t\t\t\t\treturn (\r\n\t\t\t\t\t\t<button\r\n\t\t\t\t\t\t\taria-label=\"Limpiar\"\r\n\t\t\t\t\t\t\tclassName=\"p-0 m-0 bg-transparent border-0 cursor-pointer text-default-500 hover:text-default-700\"\r\n\t\t\t\t\t\t\tstyle={{ lineHeight: 0, display: \"flex\" }}\r\n\t\t\t\t\t\t\ttype=\"button\"\r\n\t\t\t\t\t\t\tonClick={(e) => {\r\n\t\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\t\tonResetInput?.();\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<svg aria-hidden=\"true\" focusable=\"false\" height={18} role=\"img\" viewBox=\"0 0 24 24\" width={18}>\r\n\t\t\t\t\t\t\t\t<path\r\n\t\t\t\t\t\t\t\t\td=\"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z\"\r\n\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</svg>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn iconRight?.icon ?? null;\r\n\t\t\t}, [loading, valueField, readOnly, iconRight, onResetInput]);\r\n\r\n\t\t\tconst handleClick = (e: React.MouseEvent<HTMLInputElement>) => {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tisInsidePopover ? hideAllPortalSelectLists(name) : hideAllSelectLists(name);\r\n\t\t\t\tsetIsOpenDropdown(!isOpenDropdown);\r\n\t\t\t};\r\n\r\n\t\t\tconst handleOnFocus = (e: React.FocusEvent<HTMLInputElement>) => {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tisInsidePopover ? hideAllPortalSelectLists(name) : hideAllSelectLists(name);\r\n\t\t\t};\r\n\r\n\t\t\treturn (\r\n\t\t\t\t<div\r\n\t\t\t\t\tref={containerRefAutocomplete as any}\r\n\t\t\t\t\tclassName=\"main-container-autocomplete-form w-full\"\r\n\t\t\t\t\tstyle={style}\r\n\t\t\t\t\tonClick={(e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t}}\r\n\t\t\t\t>\r\n\t\t\t\t\t<div ref={ref} className=\"input-autocomplete-form-container w-full relative\" id={String(id)}>\r\n\t\t\t\t\t\t<Input\r\n\t\t\t\t\t\t\tref={safeInputRef}\r\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\r\n\t\t\t\t\t\t\taria-controls={`autocomplete-list-${id}`}\r\n\t\t\t\t\t\t\taria-expanded={isOpenDropdown}\r\n\t\t\t\t\t\t\tautoComplete=\"off\"\r\n\t\t\t\t\t\t\tautoFocus={autoFocus}\r\n\t\t\t\t\t\t\tclassName={`${inputClassName ?? \"input-autocomplete-form-search\"} w-full`}\r\n\t\t\t\t\t\t\tdefaultValue={defaultValue || value}\r\n\t\t\t\t\t\t\tendContent={endIcon}\r\n\t\t\t\t\t\t\terror={typeof errors === \"string\" && touched ? errors : undefined}\r\n\t\t\t\t\t\t\tid={inputId}\r\n\t\t\t\t\t\t\tmaxLength={maxLength}\r\n\t\t\t\t\t\t\tname={name}\r\n\t\t\t\t\t\t\tplaceholder={placeholder}\r\n\t\t\t\t\t\t\treadOnly={readOnly}\r\n\t\t\t\t\t\t\tstartContent={iconLeft?.icon}\r\n\t\t\t\t\t\t\tstyle={styleInput}\r\n\t\t\t\t\t\t\ttouched={touched as any}\r\n\t\t\t\t\t\t\ttranslate=\"no\"\r\n\t\t\t\t\t\t\ttype={type}\r\n\t\t\t\t\t\t\tvalue={valueField}\r\n\t\t\t\t\t\t\tonBlur={onBlur as any}\r\n\t\t\t\t\t\t\tonChange={handleSearchText}\r\n\t\t\t\t\t\t\tonClick={handleClick}\r\n\t\t\t\t\t\t\tonFocus={handleOnFocus}\r\n\t\t\t\t\t\t\tonMouseEnter={onMouseEnter}\r\n\t\t\t\t\t\t\tonMouseLeave={onMouseLeave}\r\n\t\t\t\t\t\t\tonMouseOver={onMouseOver}\r\n\t\t\t\t\t\t/>\r\n\r\n\t\t\t\t\t\t<AnimatePresence>\r\n\t\t\t\t\t\t\t{!loading && isOpenDropdown && !readOnly && (\r\n\t\t\t\t\t\t\t\t<AutocompleteDropdown\r\n\t\t\t\t\t\t\t\t\tref={selectListRef as any}\r\n\t\t\t\t\t\t\t\t\tkey=\"autocomplete-dropdown\"\r\n\t\t\t\t\t\t\t\t\tactive={id}\r\n\t\t\t\t\t\t\t\t\tdata={data}\r\n\t\t\t\t\t\t\t\t\temptyContentChildren={emptyContentChildren}\r\n\t\t\t\t\t\t\t\t\tfixed={fixed}\r\n\t\t\t\t\t\t\t\t\theight={height}\r\n\t\t\t\t\t\t\t\t\tisEnter={isEnter}\r\n\t\t\t\t\t\t\t\t\tisSearch={isSearch}\r\n\t\t\t\t\t\t\t\t\tname={name}\r\n\t\t\t\t\t\t\t\t\trefPartner={safeInputRef as any}\r\n\t\t\t\t\t\t\t\t\ttextNoData={textNoData}\r\n\t\t\t\t\t\t\t\t\twidthList={widthList}\r\n\t\t\t\t\t\t\t\t\tonClick={handleClickItem}\r\n\t\t\t\t\t\t\t\t\tstartOptionIcon={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OAAO,WAAW,YAAY,UAAU,SAAS,KAAA;IACxD,IAAI;IACO;IACL;IACO;IACH;IACV,cAAc,UAAU;IACxB,OAAO;IACE;IACT,WAAU;IACJ;IACN,OAAO;IACC;IACR,UAAU;IACV,SAAS;IACT,SAAS;IACK;IACA;IACD;GACb,CAAA,GAED,oBAAC,iBAAD,EAAA,UACE,CAAC,WAAW,kBAAkB,CAAC,YAC/B,oBAAC,sBAAD;IACC,KAAK;IAEL,QAAQ;IACF;IACgB;IACf;IACC;IACC;IACC;IACJ;IACN,YAAY;IACA;IACD;IACX,SAAS;IACQ;GACjB,GAdI,uBAcJ,EAEc,CAAA,CACb;;CACD,CAAA;AAEP,CACD,CACD;AAEA,sBAAsB,cAAc"}
1
+ {"version":3,"file":"index.js","names":["<path d=\"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z\" fill=\"currentColor\" />","<svg viewBox=\"0 0 24 24\" width={16} height={16} aria-hidden=\"true\" {...props}>\r\n\t\t<path d=\"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z\" fill=\"currentColor\" />\r\n\t</svg>","displayField = \"name\"","{\r\n\t\tel,\r\n\t\tactive,\r\n\t\tonClick,\r\n\t\tisHoverIndex,\r\n\t\tsetHoverIndex,\r\n\t\tindex,\r\n\t\tdisplayField = \"name\",\r\n\t\tstartOptionIcon,\r\n\t}: AutocompleteOptionItemProps<T>","createRef<HTMLLIElement>()","() => {\r\n\t\t\t!isHoverIndex && setHoverIndex(index);\r\n\t\t}","() => {\r\n\t\t\tif (isHoverIndex && itemRef.current) {\r\n\t\t\t\titemRef.current.scrollIntoView({ behavior: \"auto\", block: \"nearest\" });\r\n\t\t\t}\r\n\t\t}","[isHoverIndex]","!!isSelected","isHoverIndex ? \"bg-default-100\" : \"\"","isSelected ? \"bg-default-200 font-semibold active-option-list\" : \"font-normal hover:bg-default-100 text-default-800\"","cn(\r\n\t\t\t\t\t\"d-flex w-full cursor-pointer rounded-md p-2 items-center gap-2 mb-0.5\",\r\n\t\t\t\t\tisHoverIndex ? \"bg-default-100\" : \"\",\r\n\t\t\t\t\tisSelected ? \"bg-default-200 font-semibold active-option-list\" : \"font-normal hover:bg-default-100 text-default-800\",\r\n\t\t\t\t)","(e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tonClick({ e: undefined, el });\r\n\t\t\t\t}","el.children && <div className=\"flex-shrink-0\">{el.children}</div>","children","!el.children && (\r\n\t\t\t\t\t<div className=\"flex items-center justify-between gap-2 w-full\">\r\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\r\n\t\t\t\t\t\t\t{startOptionIcon ?? null}\r\n\t\t\t\t\t\t\t<div>{(el as any)[displayField as string]}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<CheckIcon className={cn(\"ml-auto\", isSelected ? \"visible \" : \"invisible\")} />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)","el.children","<li\r\n\t\t\t\tref={itemRef}\r\n\t\t\t\taria-selected={!!isSelected}\r\n\t\t\t\tclassName={cn(\r\n\t\t\t\t\t\"d-flex w-full cursor-pointer rounded-md p-2 items-center gap-2 mb-0.5\",\r\n\t\t\t\t\tisHoverIndex ? \"bg-default-100\" : \"\",\r\n\t\t\t\t\tisSelected ? \"bg-default-200 font-semibold active-option-list\" : \"font-normal hover:bg-default-100 text-default-800\",\r\n\t\t\t\t)}\r\n\t\t\t\trole=\"option\"\r\n\t\t\t\ttranslate=\"no\"\r\n\t\t\t\tonClick={(e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tonClick({ e: undefined, el });\r\n\t\t\t\t}}\r\n\t\t\t\tonMouseEnter={handleMouseEnterItem}\r\n\t\t\t>\r\n\t\t\t\t{el.children && <div className=\"flex-shrink-0\">{el.children}</div>}\r\n\t\t\t\t{!el.children && (\r\n\t\t\t\t\t<div className=\"flex items-center justify-between gap-2 w-full\">\r\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\r\n\t\t\t\t\t\t\t{startOptionIcon ?? null}\r\n\t\t\t\t\t\t\t<div>{(el as any)[displayField as string]}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<CheckIcon className={cn(\"ml-auto\", isSelected ? \"visible \" : \"invisible\")} />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)}\r\n\t\t\t</li>","CheckIcon","{ targetKey }: Props","() => {\r\n\t\tconst downHandler = ({ key }: KeyboardEvent) => {\r\n\t\t\tif (key === targetKey) setKeyPressed(true);\r\n\t\t};\r\n\t\tconst upHandler = ({ key }: KeyboardEvent) => {\r\n\t\t\tif (key === targetKey) setKeyPressed(false);\r\n\t\t};\r\n\r\n\t\twindow.addEventListener(\"keydown\", downHandler);\r\n\t\twindow.addEventListener(\"keyup\", upHandler);\r\n\r\n\t\treturn () => {\r\n\t\t\twindow.removeEventListener(\"keydown\", downHandler);\r\n\t\t\twindow.removeEventListener(\"keyup\", upHandler);\r\n\t\t};\r\n\t}","[targetKey]","{ key }: KeyboardEvent","key","showTextNoData = true","displayField = \"name\"","{\r\n\tdataValue,\r\n\tactive,\r\n\tonClick,\r\n\tmultiple,\r\n\ttextNoData,\r\n\thoverIndex,\r\n\tsetHoverIndex,\r\n\tshowTextNoData = true,\r\n\temptyContentChildren,\r\n\tdisplayField = \"name\",\r\n startOptionIcon,\r\n}: OptionListProps<any>","{ targetKey: \"ArrowUp\" }","{ targetKey: \"ArrowDown\" }","() => {\r\n\t\tif (arrowUpPressed && hoverIndex !== null && hoverIndex > 0) {\r\n\t\t\tsetHoverIndex((previous) => (previous || 0) - 1);\r\n\t\t}\r\n\t}","(previous) => (previous || 0) - 1","[arrowUpPressed]","() => {\r\n\t\tif (arrowDownPressed && hoverIndex !== null && hoverIndex + 1 < dataValue.length) {\r\n\t\t\tsetHoverIndex((previous) => (previous || 0) + 1);\r\n\t\t}\r\n\t}","length","(previous) => (previous || 0) + 1","[arrowDownPressed]","<div className=\"d-flex w-full cursor-pointer rounded-md p-2 items-center gap-2\">\r\n\t\t\t\t<div>{textNoData}</div>\r\n\t\t\t</div>","dataValue.map((el, index) =>\r\n\t\t\t\tmultiple ? (\r\n\t\t\t\t\t<div key={`autocomplete-multi-${(el as any).id}-${index}`} />\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<AutocompleteOptionItem\r\n\t\t\t\t\t\tkey={`autocomplete-item-${(el as any).id}-${index}`}\r\n\t\t\t\t\t\tactive={active as any}\r\n\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\tel={el as any}\r\n\t\t\t\t\t\tindex={index}\r\n\t\t\t\t\t\tisHoverIndex={hoverIndex === index}\r\n\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\tonClick={onClick as any}\r\n startOptionIcon={startOptionIcon}\r\n\t\t\t\t\t/>\r\n\t\t\t\t),\r\n\t\t\t)","(el, index) =>\r\n\t\t\t\tmultiple ? (\r\n\t\t\t\t\t<div key={`autocomplete-multi-${(el as any).id}-${index}`} />\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<AutocompleteOptionItem\r\n\t\t\t\t\t\tkey={`autocomplete-item-${(el as any).id}-${index}`}\r\n\t\t\t\t\t\tactive={active as any}\r\n\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\tel={el as any}\r\n\t\t\t\t\t\tindex={index}\r\n\t\t\t\t\t\tisHoverIndex={hoverIndex === index}\r\n\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\tonClick={onClick as any}\r\n startOptionIcon={startOptionIcon}\r\n\t\t\t\t\t/>\r\n\t\t\t\t)","emptyContentChildren ? <div className=\"mt-2\">{emptyContentChildren}</div> : null","<>\r\n\t\t\t{dataValue.map((el, index) =>\r\n\t\t\t\tmultiple ? (\r\n\t\t\t\t\t<div key={`autocomplete-multi-${(el as any).id}-${index}`} />\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<AutocompleteOptionItem\r\n\t\t\t\t\t\tkey={`autocomplete-item-${(el as any).id}-${index}`}\r\n\t\t\t\t\t\tactive={active as any}\r\n\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\tel={el as any}\r\n\t\t\t\t\t\tindex={index}\r\n\t\t\t\t\t\tisHoverIndex={hoverIndex === index}\r\n\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\tonClick={onClick as any}\r\n startOptionIcon={startOptionIcon}\r\n\t\t\t\t\t/>\r\n\t\t\t\t),\r\n\t\t\t)}\r\n\t\t\t{emptyContentChildren ? <div className=\"mt-2\">{emptyContentChildren}</div> : null}\r\n\t\t</>","previous","size = 24","{ size = 24, width, height, ...props }: IconSvgProps","...props","size || height","size || width","<g fillRule=\"evenodd\" transform=\"translate(-448 -544)\">\r\n\t\t\t\t<g fillRule=\"nonzero\">\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M10.743 2.257a6 6 0 1 1-8.485 8.486 6 6 0 0 1 8.485-8.486zm-1.06 1.06a4.5 4.5 0 1 0-6.365 6.364 4.5 4.5 0 0 0 6.364-6.363z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M10.39 8.75a2.94 2.94 0 0 0-.199.432c-.155.417-.23.849-.172 1.284.055.415.232.794.54 1.103a.75.75 0 0 0 1.112-1.004l-.051-.057a.39.39 0 0 1-.114-.24c-.021-.155.014-.356.09-.563.031-.081.06-.145.08-.182l.012-.022a.75.75 0 1 0-1.299-.752z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M9.557 11.659c.038-.018.09-.04.15-.064.207-.077.408-.112.562-.092.08.01.143.034.198.077l.041.036a.75.75 0 0 0 1.06-1.06 1.881 1.881 0 0 0-1.103-.54c-.435-.058-.867.018-1.284.175-.189.07-.336.143-.433.2a.75.75 0 0 0 .624 1.356l.066-.027.12-.061z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"m13.463 15.142-.04-.044-3.574-4.192c-.599-.703.355-1.656 1.058-1.057l4.191 3.574.044.04c.058.059.122.137.182.24.249.425.249.96-.154 1.41l-.057.057c-.45.403-.986.403-1.411.154a1.182 1.182 0 0 1-.24-.182zm.617-.616.444-.444a.31.31 0 0 0-.063-.052c-.093-.055-.263-.055-.35.024l.208.232.207-.206.006.007-.22.257-.026-.024.033-.034.025.027-.257.22-.007-.007zm-.027-.415c-.078.088-.078.257-.023.35a.31.31 0 0 0 .051.063l.205-.204-.233-.209z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</g>\r\n\t\t\t</g>","<svg fill=\"currentColor\" height={size || height} viewBox=\"0 0 16 16\" width={size || width} {...props}>\r\n\t\t\t<g fillRule=\"evenodd\" transform=\"translate(-448 -544)\">\r\n\t\t\t\t<g fillRule=\"nonzero\">\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M10.743 2.257a6 6 0 1 1-8.485 8.486 6 6 0 0 1 8.485-8.486zm-1.06 1.06a4.5 4.5 0 1 0-6.365 6.364 4.5 4.5 0 0 0 6.364-6.363z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M10.39 8.75a2.94 2.94 0 0 0-.199.432c-.155.417-.23.849-.172 1.284.055.415.232.794.54 1.103a.75.75 0 0 0 1.112-1.004l-.051-.057a.39.39 0 0 1-.114-.24c-.021-.155.014-.356.09-.563.031-.081.06-.145.08-.182l.012-.022a.75.75 0 1 0-1.299-.752z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M9.557 11.659c.038-.018.09-.04.15-.064.207-.077.408-.112.562-.092.08.01.143.034.198.077l.041.036a.75.75 0 0 0 1.06-1.06 1.881 1.881 0 0 0-1.103-.54c-.435-.058-.867.018-1.284.175-.189.07-.336.143-.433.2a.75.75 0 0 0 .624 1.356l.066-.027.12-.061z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"m13.463 15.142-.04-.044-3.574-4.192c-.599-.703.355-1.656 1.058-1.057l4.191 3.574.044.04c.058.059.122.137.182.24.249.425.249.96-.154 1.41l-.057.057c-.45.403-.986.403-1.411.154a1.182 1.182 0 0 1-.24-.182zm.617-.616.444-.444a.31.31 0 0 0-.063-.052c-.093-.055-.263-.055-.35.024l.208.232.207-.206.006.007-.22.257-.026-.024.033-.034.025.027-.257.22-.007-.007zm-.027-.415c-.078.088-.078.257-.023.35a.31.31 0 0 0 .051.063l.205-.204-.233-.209z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</g>\r\n\t\t\t</g>\r\n\t\t</svg>","height = 160","textNoData = \"No encontramos un resultado que coincida con tu búsqueda\"","isSearch = true","multiple = false","fixed = false","isLoading = false","isEnter = true","displayField = \"name\"","{\r\n\t\t\t\tdata,\r\n\t\t\t\tname,\r\n\t\t\t\theight = 160,\r\n\t\t\t\tonClick,\r\n\t\t\t\tactive,\r\n\t\t\t\trefPartner,\r\n\t\t\t\ttextNoData = \"No encontramos un resultado que coincida con tu búsqueda\",\r\n\t\t\t\tisSearch = true,\r\n\t\t\t\tmultiple = false,\r\n\t\t\t\twidthList,\r\n\t\t\t\tfixed = false,\r\n\t\t\t\tisLoading = false,\r\n\t\t\t\tisEnter = true,\r\n\t\t\t\temptyContentChildren,\r\n\t\t\t\tdisplayField = \"name\",\r\n\t\t\t\tstartOptionIcon,\r\n\t\t\t}","[]","getInitialActiveIndex(data, active)","{ targetKey: \"Enter\" }","() => {\r\n\t\t\t\tsetDropdownPosition({ dropdownRef: ref as any, anchorRef: refPartner as any, height, width: widthList, fixed });\r\n\t\t\t}","useCallback(() => {\r\n\t\t\t\tsetDropdownPosition({ dropdownRef: ref as any, anchorRef: refPartner as any, height, width: widthList, fixed });\r\n\t\t\t}, [ref, refPartner, widthList, height, fixed])","() => {\r\n\t\t\t\thandleSetPositionSelect();\r\n\t\t\t}","[handleSetPositionSelect]","() => {\r\n\t\t\t\tsetDataValue(data);\r\n\t\t\t}","[data]","() => {\r\n\t\t\t\tif (isEnter && keyEnterPressed && dataValue.length > 0) {\r\n\t\t\t\t\tif (hoverIndex !== null && data[hoverIndex]) {\r\n\t\t\t\t\t\tonClick({ e: undefined, el: data[hoverIndex || 0] });\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}","[keyEnterPressed, isEnter, hoverIndex, data, dataValue, onClick]","dataValue.length","function handleSearchItem(e: React.ChangeEvent<HTMLInputElement>) {\r\n\t\t\t\tconst current = e.target.value;\r\n\r\n\t\t\t\tsetValue(current);\r\n\t\t\t\tif (current === \"\") {\r\n\t\t\t\t\tsetDataValue(data);\r\n\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tconst upper = current.trim().toUpperCase();\r\n\t\t\t\tconst result = data.filter((el: any) => el?.[displayField as string]?.toString().trim().toUpperCase().includes(upper));\r\n\r\n\t\t\t\tsetDataValue(result);\r\n\t\t\t}","(node: HTMLElement | null) => {\r\n\t\t\t\t(ref as any).current = node;\r\n\t\t\t\tlocalRef.current = node;\r\n\t\t\t}","{ opacity: 0, y: 4 }","{ opacity: 1, y: 0, transition: { duration: 0.14, ease: \"easeOut\" } }","{\r\n\t\t\t\thidden: { opacity: 0, y: 4 },\r\n\t\t\t\tshow: { opacity: 1, y: 0, transition: { duration: 0.14, ease: \"easeOut\" } },\r\n\t\t\t\texit: { opacity: 0, y: 4, transition: { duration: 0.1, ease: \"easeIn\" } },\r\n\t\t\t}","hoverIndex !== null ? String((dataValue[hoverIndex] as any)?.id) : undefined","widthList || \"auto\"","fixed ? \"fixed\" : \"absolute\"","{\r\n\t\t\t\t\t\tmaxHeight: height,\r\n\t\t\t\t\t\twidth: widthList || \"auto\",\r\n\t\t\t\t\t\tposition: fixed ? \"fixed\" : \"absolute\",\r\n\t\t\t\t\t\tzIndex: 10,\r\n\t\t\t\t\t}","isLoading ? (\r\n\t\t\t\t\t\t<div translate=\"no\">\r\n\t\t\t\t\t\t\t<div>{\"Loading...\"}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t{isSearch && (\r\n\t\t\t\t\t\t\t\t<div className=\"mb-2 \">\r\n\t\t\t\t\t\t\t\t\t<Input endContent={<SearchIcon size={18} />} placeholder=\"Buscar...\" value={value} onChange={handleSearchItem} />\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t<AutocompleteOptionList\r\n\t\t\t\t\t\t\t\tactive={active}\r\n\t\t\t\t\t\t\t\tdataValue={dataValue}\r\n\t\t\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\t\t\temptyContentChildren={emptyContentChildren}\r\n\t\t\t\t\t\t\t\thoverIndex={hoverIndex}\r\n\t\t\t\t\t\t\t\tmultiple={multiple}\r\n\t\t\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\t\t\ttextNoData={textNoData}\r\n\t\t\t\t\t\t\t\tonClick={onClick}\r\n\t\t\t\t\t\t\t\tstartOptionIcon={startOptionIcon}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t)","<motion.div\r\n\t\t\t\t\tref={setRefs}\r\n\t\t\t\t\tkey=\"dropdown-motion-root\"\r\n\t\t\t\t\tvariants={variants}\r\n\t\t\t\t\tinitial=\"hidden\"\r\n\t\t\t\t\tanimate=\"show\"\r\n\t\t\t\t\texit=\"exit\"\r\n\t\t\t\t\taria-activedescendant={hoverIndex !== null ? String((dataValue[hoverIndex] as any)?.id) : undefined}\r\n\t\t\t\t\tclassName=\"container-dropdown-list bg-content1 shadow-large rounded-md p-2 overflow-y-auto origin-top\"\r\n\t\t\t\t\tdata-name={name}\r\n\t\t\t\t\trole=\"listbox\"\r\n\t\t\t\t\tstyle={{\r\n\t\t\t\t\t\tmaxHeight: height,\r\n\t\t\t\t\t\twidth: widthList || \"auto\",\r\n\t\t\t\t\t\tposition: fixed ? \"fixed\" : \"absolute\",\r\n\t\t\t\t\t\tzIndex: 10,\r\n\t\t\t\t\t}}\r\n\t\t\t\t>\r\n\t\t\t\t\t{isLoading ? (\r\n\t\t\t\t\t\t<div translate=\"no\">\r\n\t\t\t\t\t\t\t<div>{\"Loading...\"}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t{isSearch && (\r\n\t\t\t\t\t\t\t\t<div className=\"mb-2 \">\r\n\t\t\t\t\t\t\t\t\t<Input endContent={<SearchIcon size={18} />} placeholder=\"Buscar...\" value={value} onChange={handleSearchItem} />\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t<AutocompleteOptionList\r\n\t\t\t\t\t\t\t\tactive={active}\r\n\t\t\t\t\t\t\t\tdataValue={dataValue}\r\n\t\t\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\t\t\temptyContentChildren={emptyContentChildren}\r\n\t\t\t\t\t\t\t\thoverIndex={hoverIndex}\r\n\t\t\t\t\t\t\t\tmultiple={multiple}\r\n\t\t\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\t\t\ttextNoData={textNoData}\r\n\t\t\t\t\t\t\t\tonClick={onClick}\r\n\t\t\t\t\t\t\t\tstartOptionIcon={startOptionIcon}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</motion.div>","motion.div","SearchIcon","_Fragment","AutocompleteOptionList","{ containerRef, dropdownRef, onCloseDropDown }: DropdownControllerProps","(event: OutsideEvent) => {\r\n\t\t\tif (!isOpen) return;\r\n\t\t\tconst target = event.target as Node | null;\r\n\r\n\t\t\tif (!target) return;\r\n\t\t\tconst containerEl = containerRef.current;\r\n\t\t\tconst dropdownEl = dropdownRef.current;\r\n\t\t\tconst clickOutside = !!target && containerEl && !containerEl.contains(target) && dropdownEl && !dropdownEl.contains(target);\r\n\r\n\t\t\tif (clickOutside) {\r\n\t\t\t\tsetIsOpen(false);\r\n\t\t\t\tonCloseDropDown?.();\r\n\t\t\t}\r\n\t\t}","containerRef.current","dropdownRef.current","useCallback(\r\n\t\t(event: OutsideEvent) => {\r\n\t\t\tif (!isOpen) return;\r\n\t\t\tconst target = event.target as Node | null;\r\n\r\n\t\t\tif (!target) return;\r\n\t\t\tconst containerEl = containerRef.current;\r\n\t\t\tconst dropdownEl = dropdownRef.current;\r\n\t\t\tconst clickOutside = !!target && containerEl && !containerEl.contains(target) && dropdownEl && !dropdownEl.contains(target);\r\n\r\n\t\t\tif (clickOutside) {\r\n\t\t\t\tsetIsOpen(false);\r\n\t\t\t\tonCloseDropDown?.();\r\n\t\t\t}\r\n\t\t},\r\n\t\t[isOpen, dropdownRef, containerRef, onCloseDropDown],\r\n\t)","useCallback(() => document.getElementById(\"modal-root\"), [])","() => {\r\n\t\tdocument.addEventListener(\"click\", handleEventsOutside);\r\n\t\tdocument.addEventListener(\"wheel\", handleEventsOutside);\r\n\t\tconst modalElem = modalRef();\r\n\r\n\t\tmodalElem?.addEventListener(\"click\", handleEventsOutside);\r\n\t\tmodalElem?.addEventListener(\"wheel\", handleEventsOutside);\r\n\r\n\t\treturn () => {\r\n\t\t\tdocument.removeEventListener(\"click\", handleEventsOutside);\r\n\t\t\tdocument.removeEventListener(\"wheel\", handleEventsOutside);\r\n\t\t\tconst modalElemCleanup = modalRef();\r\n\r\n\t\t\tmodalElemCleanup?.removeEventListener(\"click\", handleEventsOutside);\r\n\t\t\tmodalElemCleanup?.removeEventListener(\"wheel\", handleEventsOutside);\r\n\t\t};\r\n\t}","[handleEventsOutside, modalRef]","[isOpen, setIsOpen]","() => document.getElementById(\"modal-root\")"],"sources":["../../src/components/autocomplete/autocomplete-option-item.tsx","../../src/components/autocomplete/use-key-press.ts","../../src/components/autocomplete/autocomplete-option-list.tsx","../../src/components/autocomplete/autocomplete-utils.ts","../../src/components/autocomplete/autocomplete-dropdown.tsx","../../src/components/autocomplete/use-autocomplete-dropdown.ts","../../src/components/autocomplete/input-autocomplete-form.tsx"],"sourcesContent":["\r\nimport { cn } from \"@/lib/utils\";\r\nimport type { DataValueListItem } from \"./autocomplete-types\";\r\n\r\nimport React, { createRef, memo, useEffect } from \"react\";\r\n\r\ninterface AutocompleteOptionItemProps<T extends DataValueListItem = DataValueListItem> {\r\n\tel: T;\r\n\tactive: number | string | T[];\r\n\tonClick: (args: { e?: React.MouseEvent<HTMLLIElement>; el: T }) => void;\r\n\tisHoverIndex: boolean;\r\n\tsetHoverIndex: React.Dispatch<React.SetStateAction<number | null>>;\r\n\tindex: number;\r\n\tdisplayField?: keyof T | string;\r\n\tstartOptionIcon?: React.ReactNode;\r\n}\r\n\r\nconst CheckIcon = (props: React.SVGProps<SVGSVGElement>) => (\r\n\t<svg viewBox=\"0 0 24 24\" width={16} height={16} aria-hidden=\"true\" {...props}>\r\n\t\t<path d=\"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z\" fill=\"currentColor\" />\r\n\t</svg>\r\n);\r\n\r\nexport const AutocompleteOptionItem = memo(\r\n\t<T extends DataValueListItem>({\r\n\t\tel,\r\n\t\tactive,\r\n\t\tonClick,\r\n\t\tisHoverIndex,\r\n\t\tsetHoverIndex,\r\n\t\tindex,\r\n\t\tdisplayField = \"name\",\r\n\t\tstartOptionIcon,\r\n\t}: AutocompleteOptionItemProps<T>) => {\r\n\t\tconst itemRef = createRef<HTMLLIElement>();\r\n\t\tconst isSelected = active === el.id;\r\n\r\n\t\tconst handleMouseEnterItem = () => {\r\n\t\t\t!isHoverIndex && setHoverIndex(index);\r\n\t\t};\r\n\r\n\t\tuseEffect(() => {\r\n\t\t\tif (isHoverIndex && itemRef.current) {\r\n\t\t\t\titemRef.current.scrollIntoView({ behavior: \"auto\", block: \"nearest\" });\r\n\t\t\t}\r\n\t\t}, [isHoverIndex]);\r\n\r\n\t\treturn (\r\n\t\t\t<li\r\n\t\t\t\tref={itemRef}\r\n\t\t\t\taria-selected={!!isSelected}\r\n\t\t\t\tclassName={cn(\r\n\t\t\t\t\t\"d-flex w-full cursor-pointer rounded-md p-2 items-center gap-2 mb-0.5\",\r\n\t\t\t\t\tisHoverIndex ? \"bg-default-100\" : \"\",\r\n\t\t\t\t\tisSelected ? \"bg-default-200 font-semibold active-option-list\" : \"font-normal hover:bg-default-100 text-default-800\",\r\n\t\t\t\t)}\r\n\t\t\t\trole=\"option\"\r\n\t\t\t\ttranslate=\"no\"\r\n\t\t\t\tonClick={(e) => {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\tonClick({ e: undefined, el });\r\n\t\t\t\t}}\r\n\t\t\t\tonMouseEnter={handleMouseEnterItem}\r\n\t\t\t>\r\n\t\t\t\t{el.children && <div className=\"flex-shrink-0\">{el.children}</div>}\r\n\t\t\t\t{!el.children && (\r\n\t\t\t\t\t<div className=\"flex items-center justify-between gap-2 w-full\">\r\n\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\r\n\t\t\t\t\t\t\t{startOptionIcon ?? null}\r\n\t\t\t\t\t\t\t<div>{(el as any)[displayField as string]}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<CheckIcon className={cn(\"ml-auto\", isSelected ? \"visible \" : \"invisible\")} />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)}\r\n\t\t\t</li>\r\n\t\t);\r\n\t},\r\n);\r\n\r\nAutocompleteOptionItem.displayName = \"AutocompleteOptionItem\";\r\n","import { useEffect, useState } from \"react\";\r\n\r\ninterface Props {\r\n\ttargetKey: string;\r\n}\r\nexport const useKeyPress = ({ targetKey }: Props) => {\r\n\tconst [keyPressed, setKeyPressed] = useState(false);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst downHandler = ({ key }: KeyboardEvent) => {\r\n\t\t\tif (key === targetKey) setKeyPressed(true);\r\n\t\t};\r\n\t\tconst upHandler = ({ key }: KeyboardEvent) => {\r\n\t\t\tif (key === targetKey) setKeyPressed(false);\r\n\t\t};\r\n\r\n\t\twindow.addEventListener(\"keydown\", downHandler);\r\n\t\twindow.addEventListener(\"keyup\", upHandler);\r\n\r\n\t\treturn () => {\r\n\t\t\twindow.removeEventListener(\"keydown\", downHandler);\r\n\t\t\twindow.removeEventListener(\"keyup\", upHandler);\r\n\t\t};\r\n\t}, [targetKey]);\r\n\r\n\treturn keyPressed;\r\n};\r\n","import type { OptionListProps } from \"./autocomplete-types\";\r\n\r\nimport { memo, useEffect } from \"react\";\r\n\r\nimport { AutocompleteOptionItem } from \"./autocomplete-option-item\";\r\nimport { useKeyPress } from \"./use-key-press\";\r\n\r\nconst AutocompleteOptionList = ({\r\n\tdataValue,\r\n\tactive,\r\n\tonClick,\r\n\tmultiple,\r\n\ttextNoData,\r\n\thoverIndex,\r\n\tsetHoverIndex,\r\n\tshowTextNoData = true,\r\n\temptyContentChildren,\r\n\tdisplayField = \"name\",\r\n startOptionIcon,\r\n}: OptionListProps<any>) => {\r\n\tconst arrowUpPressed = useKeyPress({ targetKey: \"ArrowUp\" });\r\n\tconst arrowDownPressed = useKeyPress({ targetKey: \"ArrowDown\" });\r\n\r\n\tuseEffect(() => {\r\n\t\tif (arrowUpPressed && hoverIndex !== null && hoverIndex > 0) {\r\n\t\t\tsetHoverIndex((previous) => (previous || 0) - 1);\r\n\t\t}\r\n\t}, [arrowUpPressed]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (arrowDownPressed && hoverIndex !== null && hoverIndex + 1 < dataValue.length) {\r\n\t\t\tsetHoverIndex((previous) => (previous || 0) + 1);\r\n\t\t}\r\n\t}, [arrowDownPressed]);\r\n\r\n\tif (dataValue.length === 0 && showTextNoData) {\r\n\t\tif (emptyContentChildren) return emptyContentChildren;\r\n\r\n\t\treturn (\r\n\t\t\t<div className=\"d-flex w-full cursor-pointer rounded-md p-2 items-center gap-2\">\r\n\t\t\t\t<div>{textNoData}</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{dataValue.map((el, index) =>\r\n\t\t\t\tmultiple ? (\r\n\t\t\t\t\t<div key={`autocomplete-multi-${(el as any).id}-${index}`} />\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<AutocompleteOptionItem\r\n\t\t\t\t\t\tkey={`autocomplete-item-${(el as any).id}-${index}`}\r\n\t\t\t\t\t\tactive={active as any}\r\n\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\tel={el as any}\r\n\t\t\t\t\t\tindex={index}\r\n\t\t\t\t\t\tisHoverIndex={hoverIndex === index}\r\n\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\tonClick={onClick as any}\r\n startOptionIcon={startOptionIcon}\r\n\t\t\t\t\t/>\r\n\t\t\t\t),\r\n\t\t\t)}\r\n\t\t\t{emptyContentChildren ? <div className=\"mt-2\">{emptyContentChildren}</div> : null}\r\n\t\t</>\r\n\t);\r\n};\r\n\r\nexport default memo(AutocompleteOptionList);\r\n","import type { RefObject } from \"react\";\r\nimport type { DataValueListItem } from \"./autocomplete-types\";\r\n\r\nexport const hideAllSelectLists = (name: string | undefined) => {\r\n\tconst dropdowns = document.querySelectorAll<HTMLElement>(\".container-dropdown-list[data-name]\");\r\n\r\n\tdropdowns.forEach((dropdown) => {\r\n\t\tconst dropdownName = dropdown.getAttribute(\"data-name\");\r\n\r\n\t\tif (dropdownName === name) return; // es el activo, no cerrar\r\n\t\tconst isVisible = dropdown.offsetParent !== null || dropdown.style.visibility === \"visible\";\r\n\r\n\t\tif (!isVisible) return;\r\n\t\tconst root = dropdown.closest(\".main-container-autocomplete-form\");\r\n\t\tconst input = root?.querySelector<HTMLInputElement>(\".input-autocomplete-form-search\");\r\n\r\n\t\tif (input) {\r\n\t\t\tinput.dispatchEvent(new MouseEvent(\"click\", { bubbles: true }));\r\n\t\t}\r\n\t});\r\n};\r\n\r\nexport const hideAllPortalSelectLists = (name: string | undefined) => {\r\n\tconst parentElement: Element | null = document.querySelector(\".react-tiny-popover-container\");\r\n\r\n\tif (!parentElement) return;\r\n\tconst dropdowns = parentElement.querySelectorAll<HTMLElement>(\".container-dropdown-list[data-name]\");\r\n\r\n\tdropdowns.forEach((dropdown) => {\r\n\t\tconst dropdownName = dropdown.getAttribute(\"data-name\");\r\n\r\n\t\tif (dropdownName === name) return;\r\n\t\tconst isVisible = dropdown.offsetParent !== null || dropdown.style.visibility === \"visible\";\r\n\r\n\t\tif (!isVisible) return;\r\n\t\tconst root = dropdown.closest(\".main-container-autocomplete-form\");\r\n\t\tconst input = root?.querySelector<HTMLInputElement>(\".input-autocomplete-form-search\");\r\n\r\n\t\tif (input) {\r\n\t\t\tinput.dispatchEvent(new MouseEvent(\"click\", { bubbles: true }));\r\n\t\t}\r\n\t});\r\n};\r\n\r\nexport function getInitialActiveIndex(data: DataValueListItem[], active: string | number | DataValueListItem[]) {\r\n\tif (!data) return 0;\r\n\tlet index = 0;\r\n\r\n\tif (typeof active === \"string\" || typeof active === \"number\") {\r\n\t\tindex = data.findIndex((item) => item?.id?.toString() === active?.toString());\r\n\r\n\t\treturn index === -1 ? 0 : index;\r\n\t}\r\n\tif (active.length === 0) return 0;\r\n\tindex = data.findIndex((item) => item.id?.toString() === active[active.length - 1].id?.toString());\r\n\r\n\treturn index === -1 ? 0 : index;\r\n}\r\n\r\ninterface SetDropdownPositionArgs {\r\n\tdropdownRef: RefObject<HTMLElement> | { current: HTMLElement | null };\r\n\tanchorRef: RefObject<HTMLElement> | { current: HTMLElement | null };\r\n\theight: number;\r\n\twidth?: number | \"auto\";\r\n\tfixed?: boolean;\r\n}\r\n\r\nexport const setDropdownPosition = ({ dropdownRef, anchorRef, height, width, fixed = true }: SetDropdownPositionArgs) => {\r\n\tconst listEl = dropdownRef?.current;\r\n\tconst anchorEl = anchorRef?.current;\r\n\r\n\tif (!listEl || !anchorEl) return;\r\n\tconst gap = 8;\r\n\tconst inputRect = anchorEl.getBoundingClientRect();\r\n\tconst optionsContainerHeight = height || listEl.offsetHeight;\r\n\tconst overflowBottom = inputRect.bottom + optionsContainerHeight + gap > window.innerHeight;\r\n\r\n\tif (overflowBottom) {\r\n\t\tlistEl.style.bottom = fixed ? `${window.innerHeight - inputRect.top + gap}px` : `32px`;\r\n\t\tlistEl.style.top = \"auto\";\r\n\t} else {\r\n\t\tif (fixed) {\r\n\t\t\tlistEl.style.top = `${inputRect.bottom + gap}px`;\r\n\t\t}\r\n\t\tlistEl.style.bottom = \"auto\";\r\n\t}\r\n\tlistEl.style.left = fixed ? `${inputRect.left}px` : \"0\";\r\n\r\n\t// Cálculo de ancho: por defecto igual al input; si se pasa width numérico actúa como mínimo.\r\n\tconst inputWidth = inputRect.width;\r\n\tif (typeof width === \"number\") {\r\n\t\tconst finalWidth = Math.max(inputWidth, width);\r\n\t\tlistEl.style.minWidth = `${width}px`;\r\n\t\tlistEl.style.width = `${finalWidth}px`;\r\n\t} else {\r\n\t\tlistEl.style.width = `${inputWidth}px`;\r\n\t}\r\n\r\n\tlistEl.style.visibility = \"visible\";\r\n};\r\n","import type { DataValueListItem, DropdownContainerProps } from \"./autocomplete-types\";\r\n\r\nimport { motion } from \"motion/react\";\r\nimport { forwardRef, memo, useCallback, useEffect, useRef, useState } from \"react\";\r\n\r\nimport AutocompleteOptionList from \"./autocomplete-option-list\";\r\nimport { getInitialActiveIndex, setDropdownPosition } from \"./autocomplete-utils\";\r\nimport { useKeyPress } from \"./use-key-press\";\r\nimport type { IconSvgProps } from \"@/types\";\r\nimport { Input } from \"../ui\";\r\n\r\nconst SearchIcon = ({ size = 24, width, height, ...props }: IconSvgProps) => {\r\n\treturn (\r\n\t\t<svg fill=\"currentColor\" height={size || height} viewBox=\"0 0 16 16\" width={size || width} {...props}>\r\n\t\t\t<g fillRule=\"evenodd\" transform=\"translate(-448 -544)\">\r\n\t\t\t\t<g fillRule=\"nonzero\">\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M10.743 2.257a6 6 0 1 1-8.485 8.486 6 6 0 0 1 8.485-8.486zm-1.06 1.06a4.5 4.5 0 1 0-6.365 6.364 4.5 4.5 0 0 0 6.364-6.363z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M10.39 8.75a2.94 2.94 0 0 0-.199.432c-.155.417-.23.849-.172 1.284.055.415.232.794.54 1.103a.75.75 0 0 0 1.112-1.004l-.051-.057a.39.39 0 0 1-.114-.24c-.021-.155.014-.356.09-.563.031-.081.06-.145.08-.182l.012-.022a.75.75 0 1 0-1.299-.752z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"M9.557 11.659c.038-.018.09-.04.15-.064.207-.077.408-.112.562-.092.08.01.143.034.198.077l.041.036a.75.75 0 0 0 1.06-1.06 1.881 1.881 0 0 0-1.103-.54c-.435-.058-.867.018-1.284.175-.189.07-.336.143-.433.2a.75.75 0 0 0 .624 1.356l.066-.027.12-.061z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<path\r\n\t\t\t\t\t\td=\"m13.463 15.142-.04-.044-3.574-4.192c-.599-.703.355-1.656 1.058-1.057l4.191 3.574.044.04c.058.059.122.137.182.24.249.425.249.96-.154 1.41l-.057.057c-.45.403-.986.403-1.411.154a1.182 1.182 0 0 1-.24-.182zm.617-.616.444-.444a.31.31 0 0 0-.063-.052c-.093-.055-.263-.055-.35.024l.208.232.207-.206.006.007-.22.257-.026-.024.033-.034.025.027-.257.22-.007-.007zm-.027-.415c-.078.088-.078.257-.023.35a.31.31 0 0 0 .051.063l.205-.204-.233-.209z\"\r\n\t\t\t\t\t\ttransform=\"translate(448 544)\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</g>\r\n\t\t\t</g>\r\n\t\t</svg>\r\n\t);\r\n};\r\n\r\nexport const AutocompleteDropdown = memo(\r\n\tforwardRef<HTMLElement, DropdownContainerProps>(\r\n\t\t(\r\n\t\t\t{\r\n\t\t\t\tdata,\r\n\t\t\t\tname,\r\n\t\t\t\theight = 160,\r\n\t\t\t\tonClick,\r\n\t\t\t\tactive,\r\n\t\t\t\trefPartner,\r\n\t\t\t\ttextNoData = \"No encontramos un resultado que coincida con tu búsqueda\",\r\n\t\t\t\tisSearch = true,\r\n\t\t\t\tmultiple = false,\r\n\t\t\t\twidthList,\r\n\t\t\t\tfixed = false,\r\n\t\t\t\tisLoading = false,\r\n\t\t\t\tisEnter = true,\r\n\t\t\t\temptyContentChildren,\r\n\t\t\t\tdisplayField = \"name\",\r\n\t\t\t\tstartOptionIcon,\r\n\t\t\t},\r\n\t\t\tref,\r\n\t\t) => {\r\n\t\t\tconst [value, setValue] = useState(\"\");\r\n\t\t\tconst [dataValue, setDataValue] = useState<Array<DataValueListItem>>([]);\r\n\t\t\tconst [hoverIndex, setHoverIndex] = useState<number | null>(getInitialActiveIndex(data, active));\r\n\t\t\tconst keyEnterPressed = useKeyPress({ targetKey: \"Enter\" });\r\n\r\n\t\t\tconst handleSetPositionSelect = useCallback(() => {\r\n\t\t\t\tsetDropdownPosition({ dropdownRef: ref as any, anchorRef: refPartner as any, height, width: widthList, fixed });\r\n\t\t\t}, [ref, refPartner, widthList, height, fixed]);\r\n\r\n\t\t\tuseEffect(() => {\r\n\t\t\t\thandleSetPositionSelect();\r\n\t\t\t}, [handleSetPositionSelect]);\r\n\r\n\t\t\tuseEffect(() => {\r\n\t\t\t\tsetDataValue(data);\r\n\t\t\t}, [data]);\r\n\r\n\t\t\tuseEffect(() => {\r\n\t\t\t\tif (isEnter && keyEnterPressed && dataValue.length > 0) {\r\n\t\t\t\t\tif (hoverIndex !== null && data[hoverIndex]) {\r\n\t\t\t\t\t\tonClick({ e: undefined, el: data[hoverIndex || 0] });\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, [keyEnterPressed, isEnter, hoverIndex, data, dataValue, onClick]);\r\n\r\n\t\t\tfunction handleSearchItem(e: React.ChangeEvent<HTMLInputElement>) {\r\n\t\t\t\tconst current = e.target.value;\r\n\r\n\t\t\t\tsetValue(current);\r\n\t\t\t\tif (current === \"\") {\r\n\t\t\t\t\tsetDataValue(data);\r\n\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tconst upper = current.trim().toUpperCase();\r\n\t\t\t\tconst result = data.filter((el: any) => el?.[displayField as string]?.toString().trim().toUpperCase().includes(upper));\r\n\r\n\t\t\t\tsetDataValue(result);\r\n\t\t\t}\r\n\r\n\t\t\tconst localRef = useRef<HTMLElement | null>(null);\r\n\t\t\tconst setRefs = (node: HTMLElement | null) => {\r\n\t\t\t\t(ref as any).current = node;\r\n\t\t\t\tlocalRef.current = node;\r\n\t\t\t};\r\n\r\n\t\t\tconst variants = {\r\n\t\t\t\thidden: { opacity: 0, y: 4 },\r\n\t\t\t\tshow: { opacity: 1, y: 0, transition: { duration: 0.14, ease: \"easeOut\" } },\r\n\t\t\t\texit: { opacity: 0, y: 4, transition: { duration: 0.1, ease: \"easeIn\" } },\r\n\t\t\t} as const;\r\n\r\n\t\t\treturn (\r\n\t\t\t\t<motion.div\r\n\t\t\t\t\tref={setRefs}\r\n\t\t\t\t\tkey=\"dropdown-motion-root\"\r\n\t\t\t\t\tvariants={variants}\r\n\t\t\t\t\tinitial=\"hidden\"\r\n\t\t\t\t\tanimate=\"show\"\r\n\t\t\t\t\texit=\"exit\"\r\n\t\t\t\t\taria-activedescendant={hoverIndex !== null ? String((dataValue[hoverIndex] as any)?.id) : undefined}\r\n\t\t\t\t\tclassName=\"container-dropdown-list bg-content1 shadow-large rounded-md p-2 overflow-y-auto origin-top\"\r\n\t\t\t\t\tdata-name={name}\r\n\t\t\t\t\trole=\"listbox\"\r\n\t\t\t\t\tstyle={{\r\n\t\t\t\t\t\tmaxHeight: height,\r\n\t\t\t\t\t\twidth: widthList || \"auto\",\r\n\t\t\t\t\t\tposition: fixed ? \"fixed\" : \"absolute\",\r\n\t\t\t\t\t\tzIndex: 10,\r\n\t\t\t\t\t}}\r\n\t\t\t\t>\r\n\t\t\t\t\t{isLoading ? (\r\n\t\t\t\t\t\t<div translate=\"no\">\r\n\t\t\t\t\t\t\t<div>{\"Loading...\"}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t{isSearch && (\r\n\t\t\t\t\t\t\t\t<div className=\"mb-2 \">\r\n\t\t\t\t\t\t\t\t\t<Input endContent={<SearchIcon size={18} />} placeholder=\"Buscar...\" value={value} onChange={handleSearchItem} />\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t<AutocompleteOptionList\r\n\t\t\t\t\t\t\t\tactive={active}\r\n\t\t\t\t\t\t\t\tdataValue={dataValue}\r\n\t\t\t\t\t\t\t\tdisplayField={displayField as string}\r\n\t\t\t\t\t\t\t\temptyContentChildren={emptyContentChildren}\r\n\t\t\t\t\t\t\t\thoverIndex={hoverIndex}\r\n\t\t\t\t\t\t\t\tmultiple={multiple}\r\n\t\t\t\t\t\t\t\tsetHoverIndex={setHoverIndex}\r\n\t\t\t\t\t\t\t\ttextNoData={textNoData}\r\n\t\t\t\t\t\t\t\tonClick={onClick}\r\n\t\t\t\t\t\t\t\tstartOptionIcon={startOptionIcon}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</motion.div>\r\n\t\t\t);\r\n\t\t},\r\n\t),\r\n);\r\n\r\nAutocompleteDropdown.displayName = \"AutocompleteDropdown\";\r\n","import { useCallback, useEffect, useState, type RefObject } from \"react\";\r\n\r\ninterface DropdownControllerProps {\r\n\tcontainerRef: RefObject<HTMLElement>;\r\n\tdropdownRef: RefObject<HTMLElement>;\r\n\tonCloseDropDown?: () => void;\r\n}\r\n\r\ntype OutsideEvent = MouseEvent | WheelEvent;\r\n\r\nexport function useAutocompleteDropdown({ containerRef, dropdownRef, onCloseDropDown }: DropdownControllerProps) {\r\n\tconst [isOpen, setIsOpen] = useState<boolean>(false);\r\n\r\n\tconst handleEventsOutside = useCallback(\r\n\t\t(event: OutsideEvent) => {\r\n\t\t\tif (!isOpen) return;\r\n\t\t\tconst target = event.target as Node | null;\r\n\r\n\t\t\tif (!target) return;\r\n\t\t\tconst containerEl = containerRef.current;\r\n\t\t\tconst dropdownEl = dropdownRef.current;\r\n\t\t\tconst clickOutside = !!target && containerEl && !containerEl.contains(target) && dropdownEl && !dropdownEl.contains(target);\r\n\r\n\t\t\tif (clickOutside) {\r\n\t\t\t\tsetIsOpen(false);\r\n\t\t\t\tonCloseDropDown?.();\r\n\t\t\t}\r\n\t\t},\r\n\t\t[isOpen, dropdownRef, containerRef, onCloseDropDown],\r\n\t);\r\n\r\n\tconst modalRef = useCallback(() => document.getElementById(\"modal-root\"), []);\r\n\r\n\tuseEffect(() => {\r\n\t\tdocument.addEventListener(\"click\", handleEventsOutside);\r\n\t\tdocument.addEventListener(\"wheel\", handleEventsOutside);\r\n\t\tconst modalElem = modalRef();\r\n\r\n\t\tmodalElem?.addEventListener(\"click\", handleEventsOutside);\r\n\t\tmodalElem?.addEventListener(\"wheel\", handleEventsOutside);\r\n\r\n\t\treturn () => {\r\n\t\t\tdocument.removeEventListener(\"click\", handleEventsOutside);\r\n\t\t\tdocument.removeEventListener(\"wheel\", handleEventsOutside);\r\n\t\t\tconst modalElemCleanup = modalRef();\r\n\r\n\t\t\tmodalElemCleanup?.removeEventListener(\"click\", handleEventsOutside);\r\n\t\t\tmodalElemCleanup?.removeEventListener(\"wheel\", handleEventsOutside);\r\n\t\t};\r\n\t}, [handleEventsOutside, modalRef]);\r\n\r\n\treturn [isOpen, setIsOpen] as const;\r\n}\r\n","import type { DataValueListItem, InputAutocompleteFormProps } from \"./autocomplete-types\";\r\nimport { RefreshCwIcon } from \"lucide-react\";\r\nimport { forwardRef, memo, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\r\nimport { useOnClickOutside } from \"usehooks-ts\";\r\n\r\nimport { AnimatePresence } from \"motion/react\";\r\nimport { AutocompleteDropdown } from \"./autocomplete-dropdown\";\r\nimport { hideAllPortalSelectLists, hideAllSelectLists } from \"./autocomplete-utils\";\r\nimport { useAutocompleteDropdown } from \"./use-autocomplete-dropdown\";\r\nimport { Input } from \"../ui\";\r\n\r\nexport const InputAutocompleteForm = memo(\r\n\tforwardRef<HTMLDivElement, InputAutocompleteFormProps>(\r\n\t\t(\r\n\t\t\t{\r\n\t\t\t\tdata,\r\n\t\t\t\tid,\r\n\t\t\t\tname,\r\n\t\t\t\terrors,\r\n\t\t\t\ttouched,\r\n\t\t\t\tvalue,\r\n\t\t\t\tplaceholder = \"Buscar ...\",\r\n\t\t\t\treadOnly,\r\n\t\t\t\tstyle,\r\n\t\t\t\theight = 220,\r\n\t\t\t\tisSearch = false,\r\n\t\t\t\twidthList,\r\n\t\t\t\tloading = false,\r\n\t\t\t\ticonLeft,\r\n\t\t\t\ticonRight,\r\n\t\t\t\tautoFocus = false,\r\n\t\t\t\tinputId = \"\",\r\n\t\t\t\tonChange,\r\n\t\t\t\tonBlur,\r\n\t\t\t\tonClickItem,\r\n\t\t\t\tonResetInput,\r\n\t\t\t\tonMouseLeave,\r\n\t\t\t\tonMouseOver,\r\n\t\t\t\tonMouseEnter,\r\n\t\t\t\tinputClassName,\r\n\t\t\t\tfixed = true,\r\n\t\t\t\tinputRef,\r\n\t\t\t\tdefaultValue,\r\n\t\t\t\ttype = \"text\",\r\n\t\t\t\tisInsidePopover = false,\r\n\t\t\t\tcloseClickOutside = true,\r\n\t\t\t\ttextNoData,\r\n\t\t\t\tisEnter = true,\r\n\t\t\t\tmaxLength,\r\n\t\t\t\tstyleInput,\r\n\t\t\t\temptyContentChildren,\r\n\t\t\t\tstartOptionIcon,\r\n\t\t\t},\r\n\t\t\tref,\r\n\t\t) => {\r\n\t\t\tconst [valueField, setValueField] = useState<string>(\"\");\r\n\r\n\t\t\tconst internalInputRef = useRef<HTMLInputElement | null>(null);\r\n\t\t\tconst safeInputRef = (inputRef as any) ?? internalInputRef;\r\n\t\t\tconst selectListRef = useRef<HTMLUListElement>(null);\r\n\t\t\tconst containerRefAutocomplete = useRef<HTMLElement>(null);\r\n\r\n\t\t\tconst [isOpenDropdown, setIsOpenDropdown] = useAutocompleteDropdown({\r\n\t\t\t\tcontainerRef: safeInputRef as any,\r\n\t\t\t\tdropdownRef: selectListRef as any,\r\n\t\t\t\tonCloseDropDown: () => {\r\n\t\t\t\t\tif (defaultValue) {\r\n\t\t\t\t\t\tsetValueField(defaultValue);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t});\r\n\r\n\t\t\tuseOnClickOutside(containerRefAutocomplete as any, () => {\r\n\t\t\t\tif (closeClickOutside) {\r\n\t\t\t\t\tsetIsOpenDropdown(false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tuseEffect(() => {\r\n\t\t\t\tsetValueField(value);\r\n\t\t\t}, [value]);\r\n\r\n\t\t\tconst handleClickItem = useCallback(\r\n\t\t\t\t({ el }: { e?: React.MouseEvent<HTMLLIElement | HTMLLabelElement>; el: DataValueListItem }) => {\r\n\t\t\t\t\tsetIsOpenDropdown(false);\r\n\t\t\t\t\tonClickItem && onClickItem(el);\r\n\t\t\t\t},\r\n\t\t\t\t[onClickItem],\r\n\t\t\t);\r\n\r\n\t\t\tconst handleSearchText = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n\t\t\t\tsetIsOpenDropdown(true);\r\n\t\t\t\tonChange && onChange(e);\r\n\t\t\t};\r\n\r\n\t\t\tconst endIcon = useMemo(() => {\r\n\t\t\t\tif (loading) {\r\n\t\t\t\t\treturn (\r\n\t\t\t\t\t\t<div aria-label=\"loading\" role=\"status\">\r\n\t\t\t\t\t\t\t<RefreshCwIcon className=\"h-4 w-4 animate-spin\" width={18} />\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\tif (valueField !== \"\" && !readOnly) {\r\n\t\t\t\t\treturn (\r\n\t\t\t\t\t\t<button\r\n\t\t\t\t\t\t\taria-label=\"Limpiar\"\r\n\t\t\t\t\t\t\tclassName=\"p-0 m-0 bg-transparent border-0 cursor-pointer text-default-500 hover:text-default-700\"\r\n\t\t\t\t\t\t\tstyle={{ lineHeight: 0, display: \"flex\" }}\r\n\t\t\t\t\t\t\ttype=\"button\"\r\n\t\t\t\t\t\t\tonClick={(e) => {\r\n\t\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t\t\t\tonResetInput?.();\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<svg aria-hidden=\"true\" focusable=\"false\" height={18} role=\"img\" viewBox=\"0 0 24 24\" width={18}>\r\n\t\t\t\t\t\t\t\t<path\r\n\t\t\t\t\t\t\t\t\td=\"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z\"\r\n\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</svg>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn iconRight?.icon ?? null;\r\n\t\t\t}, [loading, valueField, readOnly, iconRight, onResetInput]);\r\n\r\n\t\t\tconst handleClick = (e: React.MouseEvent<HTMLInputElement>) => {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tisInsidePopover ? hideAllPortalSelectLists(name) : hideAllSelectLists(name);\r\n\t\t\t\tsetIsOpenDropdown(!isOpenDropdown);\r\n\t\t\t};\r\n\r\n\t\t\tconst handleOnFocus = (e: React.FocusEvent<HTMLInputElement>) => {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tisInsidePopover ? hideAllPortalSelectLists(name) : hideAllSelectLists(name);\r\n\t\t\t};\r\n\r\n\t\t\treturn (\r\n\t\t\t\t<div\r\n\t\t\t\t\tref={containerRefAutocomplete as any}\r\n\t\t\t\t\tclassName=\"main-container-autocomplete-form w-full\"\r\n\t\t\t\t\tstyle={style}\r\n\t\t\t\t\tonClick={(e) => {\r\n\t\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t}}\r\n\t\t\t\t>\r\n\t\t\t\t\t<div ref={ref} className=\"input-autocomplete-form-container w-full relative\" id={String(id)}>\r\n\t\t\t\t\t\t<Input\r\n\t\t\t\t\t\t\tref={safeInputRef}\r\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\r\n\t\t\t\t\t\t\taria-controls={`autocomplete-list-${id}`}\r\n\t\t\t\t\t\t\taria-expanded={isOpenDropdown}\r\n\t\t\t\t\t\t\tautoComplete=\"off\"\r\n\t\t\t\t\t\t\tautoFocus={autoFocus}\r\n\t\t\t\t\t\t\tclassName={`${inputClassName ?? \"input-autocomplete-form-search\"} w-full`}\r\n\t\t\t\t\t\t\tdefaultValue={defaultValue || value}\r\n\t\t\t\t\t\t\tendContent={endIcon}\r\n\t\t\t\t\t\t\terror={typeof errors === \"string\" && touched ? errors : undefined}\r\n\t\t\t\t\t\t\tid={inputId}\r\n\t\t\t\t\t\t\tmaxLength={maxLength}\r\n\t\t\t\t\t\t\tname={name}\r\n\t\t\t\t\t\t\tplaceholder={placeholder}\r\n\t\t\t\t\t\t\treadOnly={readOnly}\r\n\t\t\t\t\t\t\tstartContent={iconLeft?.icon}\r\n\t\t\t\t\t\t\tstyle={styleInput}\r\n\t\t\t\t\t\t\ttouched={touched as any}\r\n\t\t\t\t\t\t\ttranslate=\"no\"\r\n\t\t\t\t\t\t\ttype={type}\r\n\t\t\t\t\t\t\tvalue={valueField}\r\n\t\t\t\t\t\t\tonBlur={onBlur as any}\r\n\t\t\t\t\t\t\tonChange={handleSearchText}\r\n\t\t\t\t\t\t\tonClick={handleClick}\r\n\t\t\t\t\t\t\tonFocus={handleOnFocus}\r\n\t\t\t\t\t\t\tonMouseEnter={onMouseEnter}\r\n\t\t\t\t\t\t\tonMouseLeave={onMouseLeave}\r\n\t\t\t\t\t\t\tonMouseOver={onMouseOver}\r\n\t\t\t\t\t\t/>\r\n\r\n\t\t\t\t\t\t<AnimatePresence>\r\n\t\t\t\t\t\t\t{!loading && isOpenDropdown && !readOnly && (\r\n\t\t\t\t\t\t\t\t<AutocompleteDropdown\r\n\t\t\t\t\t\t\t\t\tref={selectListRef as any}\r\n\t\t\t\t\t\t\t\t\tkey=\"autocomplete-dropdown\"\r\n\t\t\t\t\t\t\t\t\tactive={id}\r\n\t\t\t\t\t\t\t\t\tdata={data}\r\n\t\t\t\t\t\t\t\t\temptyContentChildren={emptyContentChildren}\r\n\t\t\t\t\t\t\t\t\tfixed={fixed}\r\n\t\t\t\t\t\t\t\t\theight={height}\r\n\t\t\t\t\t\t\t\t\tisEnter={isEnter}\r\n\t\t\t\t\t\t\t\t\tisSearch={isSearch}\r\n\t\t\t\t\t\t\t\t\tname={name}\r\n\t\t\t\t\t\t\t\t\trefPartner={safeInputRef as any}\r\n\t\t\t\t\t\t\t\t\ttextNoData={textNoData}\r\n\t\t\t\t\t\t\t\t\twidthList={widthList}\r\n\t\t\t\t\t\t\t\t\tonClick={handleClickItem}\r\n\t\t\t\t\t\t\t\t\tstartOptionIcon={startOptionIcon}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t</AnimatePresence>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t},\r\n\t),\r\n);\r\n\r\nInputAutocompleteForm.displayName = \"InputAutocompleteForm\";\r\n"],"mappings":";;;;;;;;;AAiBA,IAAMkB,eAAa,UAAA;;CAEjBlB,IAAAA;;EAAC,KAAA,oBAAA,QAAD;GAAM,GAAE;GAA8C,MAAK;EAAgB,CAAA;;;CAD5EC,IAAAA;CAAuE,IAAA,EAAA,OAAA,OAAA;EAAvEA,KAAAA,oBAAC,OAAD;GAAK,SAAQ;GAAY,OAAO;GAAI,QAAQ;GAAI,eAAY;GAAO,GAAI;GACtED,UAAAA;EACI,CAAA;EAFkE,EAAA,KAAA;;;CAAvEC,OAAAA;;AAKD,IAAa,yBAAyB,MAAA,OAUC;;CATR,MAAA,EAC7B,IACA,QACA,SACA,cACA,eACA,OACAC,cAAAA,IACA,oBAR6BC;CAO7BD,MAAAA,eAAAA,OAAAA,KAAAA,IAAe,SAAfA;CAGgBE,IAAAA;;EAAyB,KAAA,UAAA;;;CAAzC,MAAM,UAAUA;CAChB,MAAM,aAAa,WAAW,GAAG;CAEJC,IAAAA;CACG,IAAA,EAAA,OAAA,SAAA,EAAA,OAA9B,gBAAA,EAAA,OAAgB,eAAA;EADWA,WAAM;GAClC,CAAC,gBAAgB,cAAc,KAAK;EACrC;EADgC,EAAA,KAAA;EAA9B,EAAA,KAAA;EAAgB,EAAA,KAAA;;;CADlB,MAAM,uBA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iBAAiB,MAA0C;EAChE,EAAE,eAAe;EACjB,kBAAkB,yBAAyB,IAAI,IAAI,mBAAmB,IAAI;CAC3E;CAEA,OACC,oBAAC,OAAD;EACC,KAAK;EACL,WAAU;EACH;EACP,UAAU,MAAM;GACf,EAAE,gBAAgB;EACnB;EAEA,UAAA,qBAAC,OAAD;GAAU;GAAK,WAAU;GAAoD,IAAI,OAAO,EAAE;GAA1F,UAAA,CACC,oBAAC,OAAD;IACC,KAAK;IACL,qBAAkB;IAClB,iBAAe,qBAAqB;IACpC,iBAAe;IACf,cAAa;IACF;IACX,WAAW,GAAG,kBAAkB,iCAAiC;IACjE,cAAc,gBAAgB;IAC9B,YAAY;IACZ,OAAO,OAAO,WAAW,YAAY,UAAU,SAAS,KAAA;IACxD,IAAI;IACO;IACL;IACO;IACH;IACV,cAAc,UAAU;IACxB,OAAO;IACE;IACT,WAAU;IACJ;IACN,OAAO;IACC;IACR,UAAU;IACV,SAAS;IACT,SAAS;IACK;IACA;IACD;GACb,CAAA,GAED,oBAAC,iBAAD,EAAA,UACE,CAAC,WAAW,kBAAkB,CAAC,YAC/B,oBAAC,sBAAD;IACC,KAAK;IAEL,QAAQ;IACF;IACgB;IACf;IACC;IACC;IACC;IACJ;IACN,YAAY;IACA;IACD;IACX,SAAS;IACQ;GACjB,GAdI,uBAcJ,EAEc,CAAA,CACb;;CACD,CAAA;AAEP,CACD,CACD;AAEA,sBAAsB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["height = 300","margin = { bottom: 0, left: 0, right: 8, top: 8 }","width = \"100%\"","{\n\tchildren,\n\tclassName,\n\tdata,\n\theight = 300,\n\tlayout,\n\tmargin = { bottom: 0, left: 0, right: 8, top: 8 },\n\twidth = \"100%\",\n\t...props\n}: BarChartRootProps","barChartVariants()","useMemo(() => barChartVariants(), [])","composeSlotClassName(slots?.base, className)","<RechartsBarChart data={data} layout={layout} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsBarChart>","<ResponsiveContainer height={height} width={width}>\n\t\t\t\t<RechartsBarChart data={data} layout={layout} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsBarChart>\n\t\t\t</ResponsiveContainer>","<div className={composeSlotClassName(slots?.base, className)} data-slot=\"bar-chart\" {...props}>\n\t\t\t<ResponsiveContainer height={height} width={width}>\n\t\t\t\t<RechartsBarChart data={data} layout={layout} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsBarChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>","_c","RechartsBarChart","BarChartBar","BarChartGrid","BarChartTooltip","BarChartTooltipContent","BarChartXAxis","BarChartYAxis"],"sources":["../../src/components/bar-chart/bar-chart.styles.ts","../../src/components/bar-chart/bar-chart.tsx","../../src/components/bar-chart/index.ts"],"sourcesContent":["import type { VariantProps } from \"tailwind-variants\";\n\nimport { tv } from \"tailwind-variants\";\n\nexport const barChartVariants = tv({\n\tslots: {\n\t\tbase: \"bar-chart\",\n\t},\n});\n\nexport type BarChartVariants = VariantProps<typeof barChartVariants>;\n","\"use client\";\n\nimport \"./bar-chart.css\";\nimport type { ComponentPropsWithRef, ReactNode } from \"react\";\n\nimport { useMemo } from \"react\";\nimport { Bar, BarChart as RechartsBarChart, CartesianGrid, ResponsiveContainer, Tooltip, XAxis, YAxis } from \"recharts\";\n\nimport { composeSlotClassName } from \"@/lib/utils/compose\";\nimport { ChartTooltipContent } from \"../chart-tooltip/chart-tooltip-content\";\n\nimport { barChartVariants } from \"./bar-chart.styles\";\n\n/* -------------------------------------------------------------------------------------------------\n * Bar Chart Root\n * -----------------------------------------------------------------------------------------------*/\ninterface BarChartRootProps extends ComponentPropsWithRef<\"div\"> {\n\tchildren: ReactNode;\n\t/** Chart data — array of objects with numeric/string fields for each series. */\n\tdata: Record<string, number | string>[];\n\t/** Chart height in pixels. @default 300 */\n\theight?: number;\n\t/** Bar layout direction. Use \"vertical\" for horizontal bar charts. @default \"horizontal\" */\n\tlayout?: \"horizontal\" | \"vertical\";\n\t/** Recharts margin. @default { top: 8, right: 8, bottom: 0, left: 0 } */\n\tmargin?: {\n\t\tbottom?: number;\n\t\tleft?: number;\n\t\tright?: number;\n\t\ttop?: number;\n\t};\n\t/** Chart width in pixels or percentage string like \"100%\". @default \"100%\" */\n\twidth?: number | `${number}%`;\n}\n\n// Children are Recharts parts (Bar, XAxis, Tooltip…) rendered inside the responsive chart.\n// `layout` has no default here: undefined lets Recharts use its own \"horizontal\".\nconst BarChartRoot = ({\n\tchildren,\n\tclassName,\n\tdata,\n\theight = 300,\n\tlayout,\n\tmargin = { bottom: 0, left: 0, right: 8, top: 8 },\n\twidth = \"100%\",\n\t...props\n}: BarChartRootProps) => {\n\tconst slots = useMemo(() => barChartVariants(), []);\n\n\treturn (\n\t\t<div className={composeSlotClassName(slots?.base, className)} data-slot=\"bar-chart\" {...props}>\n\t\t\t<ResponsiveContainer height={height} width={width}>\n\t\t\t\t<RechartsBarChart data={data} layout={layout} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsBarChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>\n\t);\n};\n\n(BarChartRoot as { displayName?: string }).displayName = \"LizaUI.BarChart\";\n\n/* -------------------------------------------------------------------------------------------------\n * Exports\n * -----------------------------------------------------------------------------------------------*/\nexport { BarChartRoot };\n\nexport type { BarChartRootProps };\n\n// The other parts are Recharts primitives re-exported under chart-specific names\nexport {\n\tBar as BarChartBar,\n\tCartesianGrid as BarChartGrid,\n\tTooltip as BarChartTooltip,\n\tXAxis as BarChartXAxis,\n\tYAxis as BarChartYAxis,\n\tChartTooltipContent as BarChartTooltipContent,\n};\n","import type { ComponentProps } from \"react\";\n\nimport { BarChartBar, BarChartGrid, BarChartRoot, BarChartTooltip, BarChartTooltipContent, BarChartXAxis, BarChartYAxis } from \"./bar-chart\";\n\n/* -------------------------------------------------------------------------------------------------\n * Compound Component\n * -----------------------------------------------------------------------------------------------*/\nexport const BarChart = Object.assign(BarChartRoot, {\n\tBar: BarChartBar,\n\tGrid: BarChartGrid,\n\tRoot: BarChartRoot,\n\tTooltip: BarChartTooltip,\n\tTooltipContent: BarChartTooltipContent,\n\tXAxis: BarChartXAxis,\n\tYAxis: BarChartYAxis,\n});\n\nexport type BarChart = {\n\tBarProps: ComponentProps<typeof BarChartBar>;\n\tGridProps: ComponentProps<typeof BarChartGrid>;\n\tProps: ComponentProps<typeof BarChartRoot>;\n\tRootProps: ComponentProps<typeof BarChartRoot>;\n\tTooltipContentProps: ComponentProps<typeof BarChartTooltipContent>;\n\tTooltipProps: ComponentProps<typeof BarChartTooltip>;\n\tXAxisProps: ComponentProps<typeof BarChartXAxis>;\n\tYAxisProps: ComponentProps<typeof BarChartYAxis>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Named Component\n * -----------------------------------------------------------------------------------------------*/\nexport { BarChartBar, BarChartGrid, BarChartRoot, BarChartTooltip, BarChartTooltipContent, BarChartXAxis, BarChartYAxis };\n\nexport type { BarChartRootProps } from \"./bar-chart\";\n\n/* -------------------------------------------------------------------------------------------------\n * Variants\n * -----------------------------------------------------------------------------------------------*/\nexport { barChartVariants } from \"./bar-chart.styles\";\n\nexport type { BarChartVariants } from \"./bar-chart.styles\";\n"],"mappings":";;;;;;;AAIA,IAAa,mBAAmB,GAAG,EAClC,OAAO,EACN,MAAM,YACP,EACD,CAAC;;AC6BD,IAAM,gBAAA,OASmB;;CARxB,IAAA;CACA,IAAA;CACA,IAAA;CAEA,IAAA;CAGG,IAAA;CAJHA,IAAAA;CAEAC,IAAAA;CACAC,IAAAA;CAPqBC,IAAAA,EAAAA,OAAAA,IAAAA;EACrB,CAAA,CAAA,UACA,WACA,MACA,QAAA,IACA,QACA,QAAA,IACA,OAAA,IACA,GAAA,SARqBA;;;;;;;;;;;;;;;;;;;;CAIrB,MAAA,SAAA,OAAA,KAAA,IAAS,MAATH;CAEAC,IAAAA;;EAAS,KAAA,OAAA,KAAA,IAAA;GAAE,QAAQ;GAAG,MAAM;GAAG,OAAO;GAAG,KAAK;EAAE,IAAhDA;;;;;CACA,MAAA,QAAA,OAAA,KAAA,IAAQ,SAARC;CAG4BE,IAAAA;;EAAiB,KAAA,iBAAA;;;CAA7C,MAAM,QAAQC;CAGGC,IAAAA;CAAkC,IAAA,EAAA,QAAA,WAAA;EAAlC,KAAA,qBAAqB,OAAO,MAAM,SAAS;EAAT,EAAA,MAAA;;;CAEhDC,IAAAA;CACE,IAAA,EAAA,QAAA,YAAA,EAAA,QADsB,QAAA,EAAA,QAAc,UAAA,EAAA,QAAgB,QAAA;EAAtD,KAAA,oBAACI,YAAD;GAAwB;GAAc;GAAgB;GACpD;EACgB,CAAA;EADhB,EAAA,MAAA;EADsB,EAAA,MAAA;EAAc,EAAA,MAAA;EAAgB,EAAA,MAAA;;;CADvDH,IAAAA;CAA6B,IAAA,EAAA,QAAA,UAAA,EAAA,QAC5BD,MAAAA,EAAAA,QAD2C,OAAA;EAA5C,KAAA,oBAAC,qBAAD;GAA6B;GAAe;GAC3CA,UAAAA;EAGoB,CAAA;EAJQ,EAAA,MAAA;EAC5BA,EAAAA,MAAAA;EAD2C,EAAA,MAAA;;;CAD7CE,IAAAA;CAAwF,IAAA,EAAA,QAAA,SAAA,EAAA,QAAxEH,MAAAA,EAAAA,QACfE,IAAAA;EADD,KAAA,oBAAC,OAAD;GAAK,WAAWF;GAA8C,aAAU;GAAY,GAAI;GACvFE,UAAAA;EAKI,CAAA;EANmF,EAAA,MAAA;EAAxEF,EAAAA,MAAAA;EACfE,EAAAA,MAAAA;;;CAFF,OACCC;AAQF;AAEA,aAA2C,cAAc;;ACrDzD,IAAa,WAAW,OAAO,OAAO,cAAc;CAC9CG;CACL,MAAMC;CACN,MAAM;CACGC;CACT,gBAAgBC;CACTC;CACAC;AACR,CAAC"}
1
+ {"version":3,"file":"index.js","names":["height = 300","margin = { bottom: 0, left: 0, right: 8, top: 8 }","width = \"100%\"","{\n\tchildren,\n\tclassName,\n\tdata,\n\theight = 300,\n\tlayout,\n\tmargin = { bottom: 0, left: 0, right: 8, top: 8 },\n\twidth = \"100%\",\n\t...props\n}: BarChartRootProps","...props","barChartVariants()","useMemo(() => barChartVariants(), [])","composeSlotClassName(slots?.base, className)","<RechartsBarChart data={data} layout={layout} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsBarChart>","<ResponsiveContainer height={height} width={width}>\n\t\t\t\t<RechartsBarChart data={data} layout={layout} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsBarChart>\n\t\t\t</ResponsiveContainer>","<div className={composeSlotClassName(slots?.base, className)} data-slot=\"bar-chart\" {...props}>\n\t\t\t<ResponsiveContainer height={height} width={width}>\n\t\t\t\t<RechartsBarChart data={data} layout={layout} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsBarChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>","RechartsBarChart","BarChartBar","BarChartGrid","BarChartTooltip","BarChartTooltipContent","BarChartXAxis","BarChartYAxis"],"sources":["../../src/components/bar-chart/bar-chart.styles.ts","../../src/components/bar-chart/bar-chart.tsx","../../src/components/bar-chart/index.ts"],"sourcesContent":["import type { VariantProps } from \"tailwind-variants\";\n\nimport { tv } from \"tailwind-variants\";\n\nexport const barChartVariants = tv({\n\tslots: {\n\t\tbase: \"bar-chart\",\n\t},\n});\n\nexport type BarChartVariants = VariantProps<typeof barChartVariants>;\n","\"use client\";\n\nimport \"./bar-chart.css\";\nimport type { ComponentPropsWithRef, ReactNode } from \"react\";\n\nimport { useMemo } from \"react\";\nimport { Bar, BarChart as RechartsBarChart, CartesianGrid, ResponsiveContainer, Tooltip, XAxis, YAxis } from \"recharts\";\n\nimport { composeSlotClassName } from \"@/lib/utils/compose\";\nimport { ChartTooltipContent } from \"../chart-tooltip/chart-tooltip-content\";\n\nimport { barChartVariants } from \"./bar-chart.styles\";\n\n/* -------------------------------------------------------------------------------------------------\n * Bar Chart Root\n * -----------------------------------------------------------------------------------------------*/\ninterface BarChartRootProps extends ComponentPropsWithRef<\"div\"> {\n\tchildren: ReactNode;\n\t/** Chart data — array of objects with numeric/string fields for each series. */\n\tdata: Record<string, number | string>[];\n\t/** Chart height in pixels. @default 300 */\n\theight?: number;\n\t/** Bar layout direction. Use \"vertical\" for horizontal bar charts. @default \"horizontal\" */\n\tlayout?: \"horizontal\" | \"vertical\";\n\t/** Recharts margin. @default { top: 8, right: 8, bottom: 0, left: 0 } */\n\tmargin?: {\n\t\tbottom?: number;\n\t\tleft?: number;\n\t\tright?: number;\n\t\ttop?: number;\n\t};\n\t/** Chart width in pixels or percentage string like \"100%\". @default \"100%\" */\n\twidth?: number | `${number}%`;\n}\n\n// Children are Recharts parts (Bar, XAxis, Tooltip…) rendered inside the responsive chart.\n// `layout` has no default here: undefined lets Recharts use its own \"horizontal\".\nconst BarChartRoot = ({\n\tchildren,\n\tclassName,\n\tdata,\n\theight = 300,\n\tlayout,\n\tmargin = { bottom: 0, left: 0, right: 8, top: 8 },\n\twidth = \"100%\",\n\t...props\n}: BarChartRootProps) => {\n\tconst slots = useMemo(() => barChartVariants(), []);\n\n\treturn (\n\t\t<div className={composeSlotClassName(slots?.base, className)} data-slot=\"bar-chart\" {...props}>\n\t\t\t<ResponsiveContainer height={height} width={width}>\n\t\t\t\t<RechartsBarChart data={data} layout={layout} margin={margin}>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsBarChart>\n\t\t\t</ResponsiveContainer>\n\t\t</div>\n\t);\n};\n\n(BarChartRoot as { displayName?: string }).displayName = \"LizaUI.BarChart\";\n\n/* -------------------------------------------------------------------------------------------------\n * Exports\n * -----------------------------------------------------------------------------------------------*/\nexport { BarChartRoot };\n\nexport type { BarChartRootProps };\n\n// The other parts are Recharts primitives re-exported under chart-specific names\nexport {\n\tBar as BarChartBar,\n\tCartesianGrid as BarChartGrid,\n\tTooltip as BarChartTooltip,\n\tXAxis as BarChartXAxis,\n\tYAxis as BarChartYAxis,\n\tChartTooltipContent as BarChartTooltipContent,\n};\n","import type { ComponentProps } from \"react\";\n\nimport { BarChartBar, BarChartGrid, BarChartRoot, BarChartTooltip, BarChartTooltipContent, BarChartXAxis, BarChartYAxis } from \"./bar-chart\";\n\n/* -------------------------------------------------------------------------------------------------\n * Compound Component\n * -----------------------------------------------------------------------------------------------*/\nexport const BarChart = Object.assign(BarChartRoot, {\n\tBar: BarChartBar,\n\tGrid: BarChartGrid,\n\tRoot: BarChartRoot,\n\tTooltip: BarChartTooltip,\n\tTooltipContent: BarChartTooltipContent,\n\tXAxis: BarChartXAxis,\n\tYAxis: BarChartYAxis,\n});\n\nexport type BarChart = {\n\tBarProps: ComponentProps<typeof BarChartBar>;\n\tGridProps: ComponentProps<typeof BarChartGrid>;\n\tProps: ComponentProps<typeof BarChartRoot>;\n\tRootProps: ComponentProps<typeof BarChartRoot>;\n\tTooltipContentProps: ComponentProps<typeof BarChartTooltipContent>;\n\tTooltipProps: ComponentProps<typeof BarChartTooltip>;\n\tXAxisProps: ComponentProps<typeof BarChartXAxis>;\n\tYAxisProps: ComponentProps<typeof BarChartYAxis>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Named Component\n * -----------------------------------------------------------------------------------------------*/\nexport { BarChartBar, BarChartGrid, BarChartRoot, BarChartTooltip, BarChartTooltipContent, BarChartXAxis, BarChartYAxis };\n\nexport type { BarChartRootProps } from \"./bar-chart\";\n\n/* -------------------------------------------------------------------------------------------------\n * Variants\n * -----------------------------------------------------------------------------------------------*/\nexport { barChartVariants } from \"./bar-chart.styles\";\n\nexport type { BarChartVariants } from \"./bar-chart.styles\";\n"],"mappings":";;;;;;;AAIA,IAAa,mBAAmB,GAAG,EAClC,OAAO,EACN,MAAM,YACP,EACD,CAAC;;AC6BD,IAAM,gBAAA,OASmB;;CARxB,IAAA;CACA,IAAA;CACA,IAAA;CAEA,IAAA;CAGG,IAAA;CAJHA,IAAAA;CAEAC,IAAAA;CACAC,IAAAA;CAPqBC,IAAAA,EAAAA,OAAAA,IAAAA;EACrB,CAAA,CAA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rDzD,IAAa,WAAW,OAAO,OAAO,cAAc;CAC9CE;CACL,MAAMC;CACN,MAAM;CACGC;CACT,gBAAgBC;CACTC;CACAC;AACR,CAAC"}
@@ -1,4 +1,4 @@
1
- import { t as Popover } from "../chunks/tiny-popover-BctnQwx5.js";
1
+ import { t as Popover } from "../chunks/tiny-popover-x8sF0vwr.js";
2
2
  import { t as LabelError } from "../chunks/label-error-DKclJevr.js";
3
3
  import { t as cn } from "../chunks/utils-DWGjSd5x.js";
4
4
  import { c } from "react/compiler-runtime";