prometeo-design-system 2.8.8 → 2.8.9

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 (308) hide show
  1. package/dist/{components/Avatar/Avatar.js → Avatar.es.js} +24 -24
  2. package/dist/{components/Button/Button.js → Button.es.js} +55 -55
  3. package/dist/{components/CardProfile/CardProfile.js → CardProfile-CsytJlKZ.js} +94 -68
  4. package/dist/CardProfile.es.js +5 -0
  5. package/dist/{components/CheckBox/CheckBox.js → CheckBox.es.js} +25 -25
  6. package/dist/DatePicker.es.js +3441 -0
  7. package/dist/DialogModal.es.js +75 -0
  8. package/dist/DrawerDesktop.es.js +192 -0
  9. package/dist/DrawerMobile.es.js +242 -0
  10. package/dist/DropZone.es.js +87 -0
  11. package/dist/{components/FAB/FAButton.js → FAButton.es.js} +5 -5
  12. package/dist/Header.es.js +32 -0
  13. package/dist/HelperComponent-g_xuKWzK.js +24 -0
  14. package/dist/Icons-DtFC5DJ7.js +1079 -0
  15. package/dist/Icons.es.js +5 -0
  16. package/dist/{components/Image/Image.js → Image.es.js} +32 -32
  17. package/dist/ImageGallery-Ckxg9OIC.js +317 -0
  18. package/dist/{components/Image/useImageGallery.js → ImageGallery.es.js} +2 -0
  19. package/dist/Input-Cck37DpG.js +240 -0
  20. package/dist/Input.es.js +4 -0
  21. package/dist/InputMultiple.es.js +263 -0
  22. package/dist/LayoutGeneric-CbaoatQB.js +26 -0
  23. package/dist/LayoutGeneric.es.js +4 -0
  24. package/dist/Logo.es.js +9 -0
  25. package/dist/{components/Menu/MenuComposable.js → Menu.es.js} +13 -12
  26. package/dist/OtpInput.es.js +301 -0
  27. package/dist/{components/Pagination/Pagination.js → Pagination.es.js} +32 -32
  28. package/dist/{components/ProfilePictureUpload/ProfilePictureUpload.js → ProfilePictureUpload.es.js} +57 -56
  29. package/dist/ProgressBar.es.js +70 -0
  30. package/dist/{components/RadioButton/RadioButton.js → RadioButton.es.js} +36 -35
  31. package/dist/{components/SegmentedButton/SegmentedButton.js → SegmentedButton.es.js} +38 -37
  32. package/dist/Select-BD5FTxVw.js +1100 -0
  33. package/dist/Select.es.js +4 -0
  34. package/dist/SelectSearch.es.js +237 -0
  35. package/dist/{components/Skeleton/Skeleton.js → Skeleton.es.js} +18 -16
  36. package/dist/Spinner.es.js +52 -0
  37. package/dist/{components/Steps/Steps.js → Steps.es.js} +62 -61
  38. package/dist/{components/SwipeContainer/SwipeContainer.js → SwipeContainer.es.js} +68 -68
  39. package/dist/{components/Switch/Switch.js → Switch.es.js} +18 -17
  40. package/dist/{components/TabLinks/TabLinks.js → TabLinks.es.js} +11 -11
  41. package/dist/{components/Table/Table.js → Table.es.js} +41 -38
  42. package/dist/{components/TextArea/TextArea.js → TextArea.es.js} +26 -24
  43. package/dist/{components/Toaster/Toaster.js → Toast.es.js} +48 -48
  44. package/dist/ToastProvider.es.js +6 -0
  45. package/dist/Tooltip.es.js +62 -0
  46. package/dist/{lib/cn.js → cn-B6yFEsav.js} +2 -2
  47. package/dist/{node_modules/class-variance-authority/dist/index.js → index-BOQuZ0gG.js} +9 -10
  48. package/dist/index.d.ts +12 -16
  49. package/dist/jsx-runtime-DKDX3adD.js +281 -0
  50. package/dist/prometeo-design-system.css +1 -1
  51. package/dist/prometeo-design-system.es.js +1002 -0
  52. package/dist/{hooks/useDragScroll.js → useDragScroll-CHN9OMwn.js} +1 -1
  53. package/package.json +120 -116
  54. package/dist/Avatar.js +0 -4
  55. package/dist/Button.js +0 -4
  56. package/dist/CardProfile.js +0 -5
  57. package/dist/CheckBox.js +0 -4
  58. package/dist/DatePicker.js +0 -5
  59. package/dist/DialogModal.js +0 -6
  60. package/dist/DrawerDesktop.js +0 -6
  61. package/dist/DrawerMobile.js +0 -6
  62. package/dist/DropZone.js +0 -5
  63. package/dist/FAButton.js +0 -4
  64. package/dist/Header.js +0 -4
  65. package/dist/Icons/Icons.js +0 -1055
  66. package/dist/Icons.js +0 -5
  67. package/dist/Image.js +0 -4
  68. package/dist/ImageGallery.js +0 -6
  69. package/dist/Input.js +0 -4
  70. package/dist/InputMultiple.js +0 -5
  71. package/dist/LayoutGeneric.js +0 -4
  72. package/dist/Logo.js +0 -4
  73. package/dist/Menu.js +0 -5
  74. package/dist/OtpInput.js +0 -4
  75. package/dist/Pagination.js +0 -4
  76. package/dist/ProfilePictureUpload.js +0 -5
  77. package/dist/ProgressBar.js +0 -4
  78. package/dist/RadioButton.js +0 -5
  79. package/dist/SegmentedButton.js +0 -5
  80. package/dist/Select.js +0 -4
  81. package/dist/SelectSearch.js +0 -4
  82. package/dist/Skeleton.js +0 -5
  83. package/dist/Spinner.js +0 -4
  84. package/dist/Steps.js +0 -5
  85. package/dist/SwipeContainer.js +0 -4
  86. package/dist/Switch.js +0 -5
  87. package/dist/TabLinks.js +0 -4
  88. package/dist/Table.js +0 -11
  89. package/dist/TextArea.js +0 -4
  90. package/dist/Toast.js +0 -5
  91. package/dist/ToastProvider.js +0 -4
  92. package/dist/Tooltip.js +0 -4
  93. package/dist/components/Autocomplete/useAutocomplete.js +0 -143
  94. package/dist/components/DatePicker/DatePicker.js +0 -396
  95. package/dist/components/Dialog/Dialog.js +0 -60
  96. package/dist/components/Dialog/useDialogControl.js +0 -18
  97. package/dist/components/Drawer/DrawerDesktop.js +0 -179
  98. package/dist/components/Drawer/DrawerMobile.js +0 -219
  99. package/dist/components/Drawer/useDrawerDesktop.js +0 -18
  100. package/dist/components/Drawer/useDrawerMobile.js +0 -27
  101. package/dist/components/DropZone/DropZone.js +0 -86
  102. package/dist/components/DropZone/useFileDropzone.js +0 -24
  103. package/dist/components/Header/Header.js +0 -32
  104. package/dist/components/Image/GalleryPreview.js +0 -40
  105. package/dist/components/Image/ImageGallery.js +0 -68
  106. package/dist/components/Image/LightBox.js +0 -223
  107. package/dist/components/Input/Input.js +0 -219
  108. package/dist/components/InputMultiple/InputMultiple.js +0 -262
  109. package/dist/components/Layout/LayoutGeneric.js +0 -13
  110. package/dist/components/Logo/Logo.js +0 -9
  111. package/dist/components/OtpInput/OtpInput.js +0 -112
  112. package/dist/components/ProgressBar/ProgressBar.js +0 -70
  113. package/dist/components/Select/Select.js +0 -1005
  114. package/dist/components/SelectSearch/SelectSearch.js +0 -101
  115. package/dist/components/Shared/Chip.js +0 -55
  116. package/dist/components/Shared/HelperComponent.js +0 -24
  117. package/dist/components/Sidebar/SecondaryBar/SecondaryBar.js +0 -62
  118. package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.js +0 -59
  119. package/dist/components/Sidebar/SidebarComposable.js +0 -84
  120. package/dist/components/Sidebar/components/NavigationLink.js +0 -34
  121. package/dist/components/Sidebar/components/badge.js +0 -33
  122. package/dist/components/Sidebar/components/changue-account.js +0 -31
  123. package/dist/components/Sidebar/components/collapse-button.js +0 -18
  124. package/dist/components/Sidebar/components/company-logo.js +0 -12
  125. package/dist/components/Sidebar/components/nav-actions.js +0 -98
  126. package/dist/components/Sidebar/components/nav-links.js +0 -100
  127. package/dist/components/Sidebar/context/SidebarContext.js +0 -19
  128. package/dist/components/Sidebar/hooks/SidebarProvider.js +0 -33
  129. package/dist/components/Sidebar/hooks/useNavBarActions.js +0 -9
  130. package/dist/components/Sidebar/hooks/useNavBarCollapse.js +0 -11
  131. package/dist/components/Sidebar/hooks/useSidebarHook.js +0 -13
  132. package/dist/components/Sidebar/ui/useNavbarAnimation.js +0 -326
  133. package/dist/components/Spinner/Spinner.js +0 -52
  134. package/dist/components/TabSwitch/TabSwitch.js +0 -57
  135. package/dist/components/Toaster/ToastProvider.js +0 -6
  136. package/dist/components/Tooltip/Tootip.js +0 -62
  137. package/dist/hooks/useClickOutside.js +0 -24
  138. package/dist/hooks/useLabelBackground.js +0 -25
  139. package/dist/index.js +0 -127
  140. package/dist/lib/utils.js +0 -54
  141. package/dist/node_modules/@date-fns/tz/date/index.js +0 -61
  142. package/dist/node_modules/@date-fns/tz/date/mini.js +0 -69
  143. package/dist/node_modules/@date-fns/tz/tzName/index.js +0 -11
  144. package/dist/node_modules/@date-fns/tz/tzOffset/index.js +0 -22
  145. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +0 -7
  146. package/dist/node_modules/date-fns/_lib/defaultOptions.js +0 -7
  147. package/dist/node_modules/date-fns/_lib/format/formatters.js +0 -583
  148. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +0 -59
  149. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +0 -52
  150. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -18
  151. package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -11
  152. package/dist/node_modules/date-fns/_lib/normalizeInterval.js +0 -8
  153. package/dist/node_modules/date-fns/_lib/protectedTokens.js +0 -20
  154. package/dist/node_modules/date-fns/addDays.js +0 -10
  155. package/dist/node_modules/date-fns/addMonths.js +0 -20
  156. package/dist/node_modules/date-fns/addWeeks.js +0 -8
  157. package/dist/node_modules/date-fns/addYears.js +0 -8
  158. package/dist/node_modules/date-fns/constants.js +0 -6
  159. package/dist/node_modules/date-fns/constructFrom.js +0 -8
  160. package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -16
  161. package/dist/node_modules/date-fns/differenceInCalendarMonths.js +0 -13
  162. package/dist/node_modules/date-fns/eachMonthOfInterval.js +0 -17
  163. package/dist/node_modules/date-fns/eachYearOfInterval.js +0 -17
  164. package/dist/node_modules/date-fns/endOfISOWeek.js +0 -8
  165. package/dist/node_modules/date-fns/endOfMonth.js +0 -9
  166. package/dist/node_modules/date-fns/endOfWeek.js +0 -10
  167. package/dist/node_modules/date-fns/endOfYear.js +0 -9
  168. package/dist/node_modules/date-fns/format.js +0 -58
  169. package/dist/node_modules/date-fns/getDayOfYear.js +0 -11
  170. package/dist/node_modules/date-fns/getDaysInMonth.js +0 -10
  171. package/dist/node_modules/date-fns/getISOWeek.js +0 -12
  172. package/dist/node_modules/date-fns/getISOWeekYear.js +0 -15
  173. package/dist/node_modules/date-fns/getMonth.js +0 -8
  174. package/dist/node_modules/date-fns/getWeek.js +0 -12
  175. package/dist/node_modules/date-fns/getWeekYear.js +0 -16
  176. package/dist/node_modules/date-fns/getYear.js +0 -8
  177. package/dist/node_modules/date-fns/isAfter.js +0 -8
  178. package/dist/node_modules/date-fns/isBefore.js +0 -8
  179. package/dist/node_modules/date-fns/isDate.js +0 -7
  180. package/dist/node_modules/date-fns/isSameDay.js +0 -14
  181. package/dist/node_modules/date-fns/isSameMonth.js +0 -13
  182. package/dist/node_modules/date-fns/isSameYear.js +0 -13
  183. package/dist/node_modules/date-fns/isValid.js +0 -9
  184. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -9
  185. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -18
  186. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -31
  187. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -15
  188. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -70
  189. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -33
  190. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -11
  191. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -155
  192. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -110
  193. package/dist/node_modules/date-fns/locale/en-US.js +0 -21
  194. package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +0 -70
  195. package/dist/node_modules/date-fns/locale/es/_lib/formatLong.js +0 -33
  196. package/dist/node_modules/date-fns/locale/es/_lib/formatRelative.js +0 -18
  197. package/dist/node_modules/date-fns/locale/es/_lib/localize.js +0 -143
  198. package/dist/node_modules/date-fns/locale/es/_lib/match.js +0 -116
  199. package/dist/node_modules/date-fns/locale/es.js +0 -21
  200. package/dist/node_modules/date-fns/max.js +0 -14
  201. package/dist/node_modules/date-fns/min.js +0 -14
  202. package/dist/node_modules/date-fns/setMonth.js +0 -13
  203. package/dist/node_modules/date-fns/setYear.js +0 -10
  204. package/dist/node_modules/date-fns/startOfDay.js +0 -9
  205. package/dist/node_modules/date-fns/startOfISOWeek.js +0 -8
  206. package/dist/node_modules/date-fns/startOfISOWeekYear.js +0 -11
  207. package/dist/node_modules/date-fns/startOfMonth.js +0 -9
  208. package/dist/node_modules/date-fns/startOfWeek.js +0 -10
  209. package/dist/node_modules/date-fns/startOfWeekYear.js +0 -12
  210. package/dist/node_modules/date-fns/startOfYear.js +0 -9
  211. package/dist/node_modules/date-fns/toDate.js +0 -8
  212. package/dist/node_modules/input-otp/dist/index.js +0 -194
  213. package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +0 -227
  214. package/dist/node_modules/react-day-picker/dist/esm/UI.js +0 -22
  215. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +0 -19
  216. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +0 -8
  217. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +0 -8
  218. package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +0 -147
  219. package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +0 -7
  220. package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +0 -7
  221. package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +0 -18
  222. package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +0 -8
  223. package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +0 -10
  224. package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +0 -19
  225. package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +0 -7
  226. package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +0 -7
  227. package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +0 -8
  228. package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +0 -8
  229. package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +0 -7
  230. package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +0 -7
  231. package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +0 -9
  232. package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +0 -27
  233. package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +0 -9
  234. package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +0 -7
  235. package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +0 -9
  236. package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +0 -8
  237. package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +0 -7
  238. package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +0 -8
  239. package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +0 -8
  240. package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +0 -7
  241. package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +0 -7
  242. package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +0 -11
  243. package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +0 -7
  244. package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +0 -9
  245. package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +0 -54
  246. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +0 -9
  247. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +0 -7
  248. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +0 -7
  249. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +0 -7
  250. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +0 -6
  251. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +0 -7
  252. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +0 -9
  253. package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +0 -18
  254. package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +0 -19
  255. package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +0 -42
  256. package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +0 -9
  257. package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +0 -7
  258. package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +0 -7
  259. package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +0 -10
  260. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +0 -16
  261. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +0 -21
  262. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +0 -10
  263. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +0 -16
  264. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +0 -13
  265. package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +0 -15
  266. package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +0 -10
  267. package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +0 -13
  268. package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +0 -13
  269. package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +0 -24
  270. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +0 -13
  271. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +0 -12
  272. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +0 -12
  273. package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +0 -12
  274. package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +0 -13
  275. package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +0 -11
  276. package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +0 -7
  277. package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +0 -16
  278. package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +0 -7
  279. package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +0 -8
  280. package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +0 -26
  281. package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +0 -10
  282. package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +0 -9
  283. package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +0 -8
  284. package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +0 -6
  285. package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +0 -6
  286. package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +0 -6
  287. package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +0 -6
  288. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +0 -6
  289. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +0 -6
  290. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +0 -7
  291. package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +0 -6
  292. package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +0 -21
  293. package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +0 -18
  294. package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +0 -15
  295. package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +0 -56
  296. package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +0 -44
  297. package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +0 -12
  298. package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +0 -23
  299. package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +0 -19
  300. package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +0 -32
  301. package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +0 -26
  302. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +0 -15
  303. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +0 -28
  304. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +0 -9
  305. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +0 -8
  306. package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +0 -26
  307. package/dist/useDevice.js +0 -4
  308. /package/dist/{hooks/useDevice.js → useDevice.es.js} +0 -0
@@ -0,0 +1,1100 @@
1
+ import { j as s } from "./jsx-runtime-DKDX3adD.js";
2
+ import { a as Qe, i as Xe, f as Ue, S as Ye } from "./Icons-DtFC5DJ7.js";
3
+ import { c as f } from "./cn-B6yFEsav.js";
4
+ import Ne, { memo as Z, useState as De, useRef as ce, useMemo as oe, useCallback as U, useEffect as ve, useImperativeHandle as Ze } from "react";
5
+ import et from "./Spinner.es.js";
6
+ import { createPortal as tt } from "react-dom";
7
+ import { u as nt } from "./useDragScroll-CHN9OMwn.js";
8
+ import { u as rt, I as lt } from "./Input-Cck37DpG.js";
9
+ import { H as ot } from "./HelperComponent-g_xuKWzK.js";
10
+ import st from "./CheckBox.es.js";
11
+ import Ke from "./Skeleton.es.js";
12
+ const at = {
13
+ default: {
14
+ container: "text-neutral-default-default border-neutral-default-default ",
15
+ icon: ""
16
+ },
17
+ error: {
18
+ container: "",
19
+ icon: ""
20
+ },
21
+ success: {
22
+ container: "",
23
+ icon: ""
24
+ }
25
+ }, Fe = {
26
+ icon: " text-neutral-default-disabled",
27
+ container: " border-neutral-strong-default text-neutral-default-disabled"
28
+ }, Ve = ({ id: e, label: n, onRemove: m, className: i, disabled: u, variant: v = "default", tabIndex: h }) => /* @__PURE__ */ s.jsxs(
29
+ "div",
30
+ {
31
+ tabIndex: h,
32
+ className: f(
33
+ "inline-flex max-w-[calc(50%-0.25rem)] items-center gap-1 px-2 py-1 bg-inherit text-xs rounded-lg border h-[30px]",
34
+ at[v].container,
35
+ u && Fe.container
36
+ ),
37
+ children: [
38
+ /* @__PURE__ */ s.jsx("span", { className: "truncate w-max ", children: n }),
39
+ m && /* @__PURE__ */ s.jsx(
40
+ "button",
41
+ {
42
+ onMouseDown: (j) => {
43
+ u || (j.stopPropagation(), j.preventDefault(), m?.(e));
44
+ },
45
+ className: f(
46
+ "shrink-0 p-0.5 transition-all duration-200 hover:text-neutral-default-hover cursor-pointer z-50 text-neutral-default-default hover:scale-105",
47
+ u && "cursor-default hover:scale-100",
48
+ i
49
+ ),
50
+ type: "button",
51
+ tabIndex: h,
52
+ children: /* @__PURE__ */ s.jsx(Qe, { size: 18, className: f(u && Fe.icon) })
53
+ }
54
+ )
55
+ ]
56
+ }
57
+ );
58
+ Ve.displayName = "Chip";
59
+ const it = Z(Ve);
60
+ function G(e, n) {
61
+ if (typeof n == "function")
62
+ return n(e);
63
+ const m = n?.split(".");
64
+ let i = e;
65
+ for (const u of m)
66
+ if (i && typeof i == "object" && u in i)
67
+ i = i[u];
68
+ else
69
+ return;
70
+ return i;
71
+ }
72
+ const qe = (e, n) => {
73
+ if (!n) return !0;
74
+ const m = 0.1, i = String(e).toLowerCase(), u = String(n).toLowerCase().trim();
75
+ if (i.includes(u)) return !0;
76
+ const v = u.split(/\s+/).filter(Boolean), h = v.filter((b) => /^\d+$/.test(b));
77
+ if (v.length > 1 || h.length > 0) {
78
+ for (const b of h)
79
+ if (!new RegExp(`(^|\\D)${b}(\\D|$)`).test(i)) return !1;
80
+ for (const b of v)
81
+ if (!/^\d+$/.test(b) && !i.includes(b))
82
+ return !1;
83
+ return !0;
84
+ }
85
+ if (u.length > i.length) return !1;
86
+ const j = Math.floor(u.length * m);
87
+ if (j <= 0) return !1;
88
+ const p = (b, k) => {
89
+ const I = b.length, W = k.length;
90
+ if (I === 0) return W;
91
+ if (W === 0) return I;
92
+ const A = new Array(W + 1);
93
+ for (let x = 0; x <= W; x++) A[x] = x;
94
+ for (let x = 1; x <= I; x++) {
95
+ let S = x - 1;
96
+ A[0] = x;
97
+ for (let M = 1; M <= W; M++) {
98
+ const se = A[M], K = b.charCodeAt(x - 1) === k.charCodeAt(M - 1) ? 0 : 1, V = A[M] + 1, z = A[M - 1] + 1, N = S + K;
99
+ A[M] = V < z ? V < N ? V : N : z < N ? z : N, S = se;
100
+ }
101
+ }
102
+ return A[W];
103
+ };
104
+ for (let b = 0; b <= i.length - u.length; b++) {
105
+ const k = i.slice(b, b + u.length);
106
+ if (p(k, u) <= j) return !0;
107
+ }
108
+ return !1;
109
+ }, ut = (e) => {
110
+ const n = [], m = (i) => {
111
+ i.forEach((u) => {
112
+ const h = u.options;
113
+ Array.isArray(h) && h.length > 0 ? m(h) : n.push(u);
114
+ });
115
+ };
116
+ return m(e), n;
117
+ }, _e = {
118
+ default: {
119
+ container: "",
120
+ input: f(
121
+ "border-neutral-default-default text-neutral-default-default",
122
+ "focus:ring-primary-default-default focus:ring-[1px] focus:border-primary-default-default ",
123
+ "hover:border-primary-default-default"
124
+ ),
125
+ label: f(
126
+ "text-neutral-medium-default",
127
+ "peer-focus:text-primary-default-default"
128
+ ),
129
+ icon: f(
130
+ "text-neutral-medium-default",
131
+ "peer-focus:text-primary-default-default"
132
+ )
133
+ },
134
+ error: {
135
+ container: "",
136
+ input: f(
137
+ "border-error-default-default text-neutral-default-default hover:border-error-default-hover",
138
+ "focus:border-error-default focus:border-2",
139
+ "focus:ring-0 focus:ring-error-default/20"
140
+ ),
141
+ label: f("text-error-light", "peer-focus:text-error-light"),
142
+ icon: f("text-error-medium-default", "peer-focus:text-error-light")
143
+ },
144
+ success: {
145
+ container: "",
146
+ input: f(
147
+ "border-success-default-default text-neutral-default-default",
148
+ "focus:border-success-default focus:border-2",
149
+ "focus:ring-0 focus:ring-success-default/20"
150
+ ),
151
+ label: f("text-success", "peer-focus:text-success-light"),
152
+ icon: f("text-success-medium-default", "peer-focus:text-success-light")
153
+ }
154
+ }, Re = {
155
+ input: f(
156
+ "border-neutral-strong-default text-neutral-default-default pointer-events-none",
157
+ "focus:ring-0 focus:border-primary-default-disabled ",
158
+ "hover:border-neutral-default-disabled"
159
+ ),
160
+ label: f(
161
+ "text-neutral-medium-disabled",
162
+ "peer-focus:text-primary-default-default"
163
+ ),
164
+ icon: f(
165
+ "text-neutral-medium-disabled",
166
+ "peer-focus:text-primary-default-default"
167
+ )
168
+ };
169
+ function ct(e) {
170
+ const [n, m] = De(!1), [i, u] = De([]), [v, h] = De(""), j = ce(null), p = ce(null), b = ce(null), k = ce(null), I = ce(
171
+ () => {
172
+ }
173
+ ), W = ce(null), A = ce(/* @__PURE__ */ new Set()), {
174
+ id: x,
175
+ name: S,
176
+ label: M,
177
+ height: se,
178
+ options: K,
179
+ controls: V,
180
+ className: z,
181
+ placeholder: N,
182
+ optionValue: E,
183
+ optionLabel: de,
184
+ renderOption: J,
185
+ renderOptionGroupHeader: fe,
186
+ renderSelection: je,
187
+ renderOptionContext: Ie,
188
+ buttonClassName: He,
189
+ dropdownClassName: ae,
190
+ containerClassName: Q,
191
+ dropdownOptions: O,
192
+ helperComponent: ee,
193
+ errorComponent: Ce,
194
+ onRemoveOption: Ee,
195
+ onOptionClick: X,
196
+ onClose: Se,
197
+ onClear: me,
198
+ disabled: te = !1,
199
+ overflow: We = "wrap",
200
+ variant: F = "default",
201
+ isLoading: he = !1,
202
+ attachToParent: Ae = !1,
203
+ displayMode: we = "compact",
204
+ labelVariant: ie = "default",
205
+ disableOpenOnFocus: Me = !1,
206
+ emptyMessage: ke = "No hay opciones disponibles"
207
+ } = e, { ref: Oe } = rt(), { bind: ne, ref: ze } = nt({
208
+ axis: "x",
209
+ cursor: { idle: "default", dragging: "grabbing" }
210
+ }), pe = e.multiple ? Array.isArray(e.value) && e.value.length > 0 : e.value !== void 0 && e.value !== null && e.value !== "", Le = {}, Te = oe(() => ie === "static" && N ? N : "", [ie, N]), Ge = oe(
211
+ () => O?.controledSearchValue || v,
212
+ [O?.controledSearchValue, v]
213
+ ), $e = () => {
214
+ const t = {
215
+ static: {
216
+ active: "relative prometeo-fonts-label-large",
217
+ default: "relative prometeo-fonts-label-large"
218
+ },
219
+ default: {
220
+ active: "absolute top-0 -translate-y-1/2 left-3 px-1 prometeo-fonts-body-small",
221
+ default: "absolute top-1/2 -translate-y-1/2 "
222
+ }
223
+ }, a = n || pe ? "active" : "default";
224
+ return t[ie][a];
225
+ }, T = U(
226
+ (t) => ({
227
+ id: G(t, E),
228
+ value: G(t, E),
229
+ label: G(t, de)
230
+ }),
231
+ [E, de]
232
+ ), Y = oe(() => ut(K), [K]), ge = oe(
233
+ () => Y.map(T),
234
+ [Y, T]
235
+ ), r = oe(() => {
236
+ const t = [];
237
+ if (e.multiple)
238
+ e.value?.forEach((a) => {
239
+ const l = Y?.find(
240
+ (g) => G(g, E) === a
241
+ );
242
+ l && t.push(l);
243
+ });
244
+ else {
245
+ const a = Y?.find(
246
+ (l) => G(l, E) === e.value
247
+ );
248
+ a && t.push(a);
249
+ }
250
+ return t;
251
+ }, [e.value, E, Y, e.multiple]), o = oe(
252
+ () => r.map(T),
253
+ [r, T]
254
+ ), c = oe(
255
+ () => new Set(o.map((t) => t.id)),
256
+ [o]
257
+ ), d = oe(() => {
258
+ const t = [];
259
+ return K.forEach((a, l) => {
260
+ const g = a, H = g.options;
261
+ if (Array.isArray(H) && H.length > 0) {
262
+ const $ = g.label, P = G(a, E), le = `__group-${String(P ?? l)}`, xe = {
263
+ id: le,
264
+ value: le,
265
+ label: typeof $ == "string" ? $ : String(P ?? `Grupo ${l + 1}`),
266
+ isGroupHeader: !0,
267
+ groupLabelNode: $,
268
+ originalOption: a,
269
+ groupData: {
270
+ groupOptions: H
271
+ }
272
+ };
273
+ t.push(xe), H.forEach((ye) => {
274
+ J ? t.push(ye) : t.push(T(ye));
275
+ });
276
+ } else
277
+ J ? t.push(a) : t.push(T(a));
278
+ }), t;
279
+ }, [K, E, J, T]), w = U(
280
+ (t, a) => {
281
+ if (!t || t.length === 0) return;
282
+ const l = t.map(
283
+ (C) => T(C)
284
+ );
285
+ if (!e.multiple) {
286
+ const C = l[0];
287
+ if (!C) return;
288
+ const D = c.has(C.id), B = a ?? "toggle";
289
+ let Pe;
290
+ B === "select" || B === "toggle" && !D ? Pe = C : Pe = void 0, e.onChange?.(Pe, S);
291
+ return;
292
+ }
293
+ const g = e.value || [], H = [];
294
+ g.forEach((C) => {
295
+ const D = ge.find((B) => B.value === C);
296
+ D && H.push(D);
297
+ });
298
+ const $ = new Set(H.map((C) => C.id)), P = new Set(l.map((C) => C.id)), le = l.every(
299
+ (C) => $.has(C.id)
300
+ ), xe = a ?? "toggle", ye = xe === "select" || xe === "toggle" && !le;
301
+ let _;
302
+ if (!ye)
303
+ _ = H.filter((C) => !P.has(C.id));
304
+ else {
305
+ const C = new Map(
306
+ H.map((D) => [D.id, D])
307
+ );
308
+ l.forEach((D) => {
309
+ C.set(D.id, D);
310
+ }), _ = Array.from(C.values());
311
+ }
312
+ e.onChange?.(_, S);
313
+ },
314
+ [
315
+ e.multiple,
316
+ e.value,
317
+ e.onChange,
318
+ ge,
319
+ c,
320
+ T,
321
+ S
322
+ ]
323
+ ), L = U(() => {
324
+ m((t) => !t);
325
+ }, []);
326
+ I.current = (t) => {
327
+ if (!e.multiple)
328
+ e.onChange?.(t, S);
329
+ else {
330
+ const a = e.value || [], l = [], g = a.includes(t.value);
331
+ a.forEach(($) => {
332
+ const P = ge.find(
333
+ (le) => le.value === $
334
+ );
335
+ P && l.push(P);
336
+ });
337
+ const H = g ? l.filter(($) => $.value !== t.value) : [...l, t];
338
+ e.onChange?.(H, S);
339
+ }
340
+ };
341
+ const y = U(
342
+ (t, a = !1) => {
343
+ X?.(t, S), I.current?.(t), a && (m(!1), Se?.());
344
+ },
345
+ [X, Se, S]
346
+ ), R = (t) => {
347
+ t.preventDefault(), t.stopPropagation(), t.target.blur(), me?.(), e.multiple ? e.onChange?.([], S) : e.onChange?.(void 0, S);
348
+ }, q = U(
349
+ (t) => {
350
+ e.multiple || e.onChange?.(void 0, S);
351
+ const a = Y.find(
352
+ (g) => G(g, E) === t
353
+ );
354
+ if (!a) return;
355
+ const l = T(a);
356
+ X?.(l, S), I.current?.(l), Ee?.(a);
357
+ },
358
+ [
359
+ X,
360
+ Ee,
361
+ Y,
362
+ S,
363
+ e.multiple,
364
+ e.onChange,
365
+ T,
366
+ E
367
+ ]
368
+ ), re = U(
369
+ (t) => {
370
+ q(t);
371
+ },
372
+ [q]
373
+ );
374
+ ve(() => {
375
+ if (!n) return;
376
+ const t = (a) => {
377
+ const l = a.target;
378
+ if (a.type === "mousedown") {
379
+ if (j.current?.contains(l) || p.current?.contains(l)) return;
380
+ m(!1);
381
+ }
382
+ if (a.type === "scroll") {
383
+ if (p.current?.contains(l)) return;
384
+ m(!1);
385
+ }
386
+ a.type === "resize" && m(!1);
387
+ };
388
+ return document.addEventListener("mousedown", t), window.addEventListener("scroll", t, !0), window.addEventListener("resize", t, !0), () => {
389
+ document.removeEventListener("mousedown", t), window.removeEventListener("scroll", t, !0), window.removeEventListener("resize", t, !0);
390
+ };
391
+ }, [n]), ve(() => {
392
+ A.current.forEach((t) => {
393
+ try {
394
+ t(n);
395
+ } catch {
396
+ }
397
+ });
398
+ }, [n]), Ze(
399
+ V,
400
+ () => ({
401
+ open: () => {
402
+ !n && m(!0);
403
+ },
404
+ close: () => {
405
+ n && m(!1);
406
+ },
407
+ toggle: () => m((t) => !t),
408
+ handleOptionSelect: y,
409
+ subscribeOpenChange: (t) => (A.current.add(t), () => {
410
+ A.current.delete(t);
411
+ }),
412
+ searchInputRef: b
413
+ }),
414
+ [n, y]
415
+ );
416
+ const be = (t) => {
417
+ t.preventDefault(), t.stopPropagation(), t.target.matches(":focus-visible") && !Me && !n && (m(!0), setTimeout(() => {
418
+ b.current?.focus();
419
+ }, 10));
420
+ }, ue = (t) => {
421
+ t.key === "Tab" && n && m(!1), (t.keyCode === 32 || t.key === "ArrowDown") && (m(!0), setTimeout(() => {
422
+ b.current?.focus();
423
+ }, 10));
424
+ };
425
+ return /* @__PURE__ */ s.jsxs(
426
+ "div",
427
+ {
428
+ className: f("relative bg-inherit select-none w-full", z),
429
+ ref: j,
430
+ draggable: !1,
431
+ style: Le,
432
+ children: [
433
+ /* @__PURE__ */ s.jsxs("div", { className: f("relative bg-inherit ", Q), children: [
434
+ /* @__PURE__ */ s.jsx(
435
+ "label",
436
+ {
437
+ htmlFor: x,
438
+ ref: Oe,
439
+ className: f(
440
+ "left-3 pointer-events-none bg-inherit z-10",
441
+ ie === "default" && "transition-all duration-200 ease-in-out",
442
+ $e(),
443
+ pe || n ? _e[F].label : "text-neutral-medium-default",
444
+ te && Re.label
445
+ ),
446
+ children: M
447
+ }
448
+ ),
449
+ /* @__PURE__ */ s.jsxs(
450
+ "div",
451
+ {
452
+ id: x,
453
+ tabIndex: 0,
454
+ role: "button",
455
+ ref: k,
456
+ onFocus: be,
457
+ onKeyDown: ue,
458
+ onClick: (t) => {
459
+ t.preventDefault(), t.stopPropagation(), L();
460
+ },
461
+ className: f(
462
+ "w-full px-2 text-left border rounded-lg transition-all duration-200 ease-in-out",
463
+ "flex items-center justify-start bg-inherit ",
464
+ "focus:outline-none",
465
+ we === "chips" && e.multiple && pe ? "min-h-12 py-2 " : !se && "h-12 min-h-12",
466
+ _e[F].input,
467
+ te && Re.input,
468
+ He
469
+ ),
470
+ children: [
471
+ /* @__PURE__ */ s.jsx(
472
+ "div",
473
+ {
474
+ className: f(
475
+ "flex-1 overflow-x-auto overflow-y-hidden px-1 prometeo-scrollbar-none "
476
+ ),
477
+ ref: ze,
478
+ onPointerUp: ne.onPointerUp,
479
+ onPointerDown: ne.onPointerDown,
480
+ onPointerMove: ne.onPointerMove,
481
+ onPointerLeave: ne.onPointerLeave,
482
+ onPointerCancel: ne.onPointerCancel,
483
+ onClickCapture: ne.onClickCapture,
484
+ children: je ? Ne.createElement(
485
+ Z(
486
+ je,
487
+ (t, a) => t.disabled === a.disabled && t.multiple === a.multiple
488
+ ),
489
+ {
490
+ disabled: te,
491
+ multiple: e.multiple || !1,
492
+ placeholder: N,
493
+ selectedOptions: r,
494
+ onRemoveOption: re
495
+ }
496
+ ) : /* @__PURE__ */ s.jsx(
497
+ Je,
498
+ {
499
+ displayMode: we,
500
+ selectedOptions: o,
501
+ placeholder: Te,
502
+ onRemoveOption: q,
503
+ multiple: e.multiple || !1,
504
+ className: f(
505
+ We === "scroll" ? "flex-nowrap" : "flex-wrap"
506
+ ),
507
+ disabled: te
508
+ }
509
+ )
510
+ }
511
+ ),
512
+ /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2", children: [
513
+ he && /* @__PURE__ */ s.jsx(
514
+ et,
515
+ {
516
+ size: "small",
517
+ variant: "clip",
518
+ className: " translate-y-1",
519
+ speedMultiplier: 0.7
520
+ }
521
+ ),
522
+ pe && me && /* @__PURE__ */ s.jsx(
523
+ "button",
524
+ {
525
+ onMouseDown: (t) => {
526
+ t.preventDefault(), t.stopPropagation(), R(t);
527
+ },
528
+ type: "button",
529
+ tabIndex: -1,
530
+ children: /* @__PURE__ */ s.jsx(
531
+ Xe,
532
+ {
533
+ size: 20,
534
+ className: f(
535
+ " cursor-pointer transition-all",
536
+ _e[F].icon
537
+ )
538
+ }
539
+ )
540
+ }
541
+ ),
542
+ /* @__PURE__ */ s.jsx(
543
+ Ue,
544
+ {
545
+ size: 20,
546
+ className: f(
547
+ "transition-transform text-neutral-default-default",
548
+ n ? "rotate-180" : "",
549
+ te && Re.icon
550
+ )
551
+ }
552
+ )
553
+ ] })
554
+ ]
555
+ }
556
+ )
557
+ ] }),
558
+ n && /* @__PURE__ */ s.jsx(
559
+ mt,
560
+ {
561
+ label: M,
562
+ isOpen: n,
563
+ disabled: te,
564
+ optionValue: E,
565
+ optionLabel: de,
566
+ emptyMessage: ke,
567
+ labelVariant: ie,
568
+ renderOption: J,
569
+ renderOptionGroupHeader: fe,
570
+ attachToParent: Ae,
571
+ filteredOptions: i,
572
+ multiple: e.multiple || !1,
573
+ dropdownClassName: ae,
574
+ selectedOptionsIds: c,
575
+ setFilteredOptions: u,
576
+ renderOptionContext: Ie,
577
+ options: d,
578
+ selectRef: j,
579
+ dropdownRef: p,
580
+ selectButtonRef: k,
581
+ helperComponentRef: W,
582
+ onOptionClick: y,
583
+ onCloseDropdown: () => m(!1),
584
+ searchValue: Ge,
585
+ setSearchValue: h,
586
+ searchInputRef: b,
587
+ isLoading: O?.isLoading,
588
+ onSearchClear: O?.onSearchClear,
589
+ hideSearchBar: O?.hideSearchBar,
590
+ dropdownHeight: O?.dropdownHeight,
591
+ onSearchValueChange: O?.onSearchValueChange,
592
+ inputSearchPlaceholder: O?.inputSearchPlaceholder,
593
+ footer: O?.footer,
594
+ loadingComponent: O?.loadingComponent,
595
+ inputProps: O?.inputProps,
596
+ enableGroupToggle: O?.enableGroupToggle,
597
+ onGroupSelectChange: w
598
+ }
599
+ ),
600
+ (Ce || ee) && /* @__PURE__ */ s.jsx("div", { className: "min-h-6", children: /* @__PURE__ */ s.jsx(
601
+ ot,
602
+ {
603
+ ref: W,
604
+ variant: F,
605
+ className: "absolute bottom-0 h-5 overflow-visible ",
606
+ children: Ce || ee
607
+ }
608
+ ) })
609
+ ]
610
+ }
611
+ );
612
+ }
613
+ const dt = Z(ct, (e, n) => e.value === n.value && e.options === n.options && e.isLoading === n.isLoading && e.disabled === n.disabled && e.errorComponent === n.errorComponent && e.helperComponent === n.helperComponent && e.variant === n.variant && e.label === n.label && e.id === n.id && e.name === n.name && e.placeholder === n.placeholder && e.renderOptionContext === n.renderOptionContext && e.dropdownOptions?.controledSearchValue === n.dropdownOptions?.controledSearchValue && e.dropdownOptions?.isLoading === n.dropdownOptions?.isLoading), Dt = dt;
614
+ function ft({
615
+ footer: e,
616
+ isOpen: n,
617
+ label: m,
618
+ options: i,
619
+ multiple: u,
620
+ disabled: v,
621
+ selectRef: h,
622
+ inputProps: j,
623
+ dropdownRef: p,
624
+ optionLabel: b,
625
+ optionValue: k,
626
+ searchValue: I,
627
+ labelVariant: W,
628
+ emptyMessage: A,
629
+ renderOption: x,
630
+ renderOptionContext: S,
631
+ renderOptionGroupHeader: M,
632
+ onOptionClick: se,
633
+ onSearchClear: K,
634
+ searchInputRef: V,
635
+ setSearchValue: z,
636
+ dropdownHeight: N,
637
+ attachToParent: E,
638
+ filteredOptions: de,
639
+ selectButtonRef: J,
640
+ onCloseDropdown: fe,
641
+ loadingComponent: je,
642
+ dropdownClassName: Ie,
643
+ helperComponentRef: He,
644
+ selectedOptionsIds: ae,
645
+ setFilteredOptions: Q,
646
+ onSearchValueChange: O,
647
+ isLoading: ee = !1,
648
+ hideSearchBar: Ce = !1,
649
+ inputSearchPlaceholder: Ee = "Buscar opciones",
650
+ enableGroupToggle: X = !0,
651
+ onGroupSelectChange: Se
652
+ }) {
653
+ const me = e ? 380 : 320, te = W === "static" ? m !== "" ? -20 : 4 : 7, F = U(() => N ? N.endsWith("px") ? Number(N.replace("px", "")) : N.endsWith("vh") ? window.innerHeight * Number(N.replace("vh", "")) / 100 : N.endsWith("%") ? window.innerHeight * Number(N.replace("%", "")) / 100 : me : me, [N, me])(), [he, Ae] = De({
654
+ direction: "down",
655
+ height: F
656
+ }), [we, ie] = De(
657
+ () => /* @__PURE__ */ new Set()
658
+ ), Me = U(
659
+ (r) => !we.has(r),
660
+ [we]
661
+ ), ke = U(
662
+ (r, o) => {
663
+ ie((c) => {
664
+ const d = new Set(c), w = d.has(r);
665
+ return (o === void 0 ? !w : !o) ? d.add(r) : d.delete(r), d;
666
+ });
667
+ },
668
+ []
669
+ ), Oe = (r) => {
670
+ if (!p.current || !h.current) return;
671
+ const o = h.current.getBoundingClientRect();
672
+ switch (r || he.direction) {
673
+ case "down":
674
+ p.current.style.top = `${o.top + o.height - (He?.current?.offsetHeight ? He?.current?.offsetHeight + 4 : 0)}px`;
675
+ break;
676
+ case "up":
677
+ p.current.style.top = "auto", p.current.style.bottom = `${window.innerHeight - o.top + te}px`;
678
+ break;
679
+ }
680
+ p.current.style.left = `${o.left}px`, p.current.style.width = `${o.width}px`;
681
+ }, ne = (r) => {
682
+ p.current && (p.current.style.maxHeight = `${r}px`);
683
+ }, ze = () => {
684
+ if (!p.current || !h.current) return he;
685
+ const r = h.current.getBoundingClientRect(), o = window.innerHeight - (window.innerHeight - r.top), c = window.innerHeight - r.bottom, d = c >= F, w = o >= F;
686
+ let L = "down", y;
687
+ return d ? (L = "down", y = F) : w ? (L = "up", y = F) : c > o ? (L = "down", y = c - 16) : (L = "up", y = o - 16), { direction: L, height: y };
688
+ }, pe = (r) => {
689
+ if (!(!p.current || !h.current)) {
690
+ if (p.current.style.transition = "max-height 0.2s ease,opacity 0.2s ease", !r) {
691
+ p.current.style.maxHeight = "0", p.current.style.opacity = "0", p.current.style.pointerEvents = "none";
692
+ return;
693
+ }
694
+ if (!E) {
695
+ const o = ze();
696
+ Ae(o), Oe(o.direction), ne(o.height);
697
+ }
698
+ p.current.style.opacity = "1", p.current.style.pointerEvents = "auto";
699
+ }
700
+ };
701
+ ve(() => {
702
+ E || !h.current || !n || Oe();
703
+ }, [ae]), ve(() => {
704
+ pe(n);
705
+ }, [n]), ve(() => {
706
+ i && Q(i);
707
+ }, [i]), ve(() => {
708
+ if (ee || !I) return;
709
+ const r = Le(i, I);
710
+ Q(r);
711
+ }, [i]);
712
+ const Le = (r, o) => {
713
+ if (!o) return r;
714
+ if (x) {
715
+ const y = [];
716
+ let R = null, q = [];
717
+ const re = () => {
718
+ R && q.length > 0 && y.push(R, ...q), R = null, q = [];
719
+ };
720
+ return r.forEach((be) => {
721
+ const ue = be;
722
+ if (!!ue.isGroupHeader) {
723
+ re(), R = ue;
724
+ return;
725
+ }
726
+ const a = be, l = G(
727
+ a,
728
+ b
729
+ ), g = qe(String(l ?? ""), o);
730
+ R ? g && q.push(a) : g && y.push(a);
731
+ }), re(), y;
732
+ }
733
+ const c = [];
734
+ let d = null, w = [];
735
+ const L = () => {
736
+ d && w.length > 0 && c.push(d, ...w), d = null, w = [];
737
+ };
738
+ return r.forEach((y) => {
739
+ if (y.isGroupHeader) {
740
+ L(), d = y;
741
+ return;
742
+ }
743
+ const R = qe(y.label, o);
744
+ d ? R && w.push(y) : R && c.push(y);
745
+ }), L(), c;
746
+ }, Te = (r) => {
747
+ const o = Le(i, r);
748
+ if (Q(o), O) {
749
+ if (r === "") {
750
+ Ge();
751
+ return;
752
+ }
753
+ O(r);
754
+ return;
755
+ }
756
+ z && i && z(r);
757
+ }, Ge = U(() => {
758
+ if (K) {
759
+ K(), Q(
760
+ i.filter((r) => {
761
+ const o = x ? G(r, k) : r.id;
762
+ return ae.has(o);
763
+ })
764
+ );
765
+ return;
766
+ }
767
+ z && (z(""), Q(i));
768
+ }, [
769
+ i,
770
+ ae,
771
+ k,
772
+ K,
773
+ Q,
774
+ z,
775
+ x
776
+ ]), $e = (r) => {
777
+ r.key === "ArrowDown" ? (r.preventDefault(), p.current?.querySelector(
778
+ "[role=listitem]"
779
+ )?.focus()) : (r.key === "Tab" || r.key === "Escape") && setTimeout(() => {
780
+ J.current?.focus(), fe();
781
+ }, 10);
782
+ }, T = (r, o) => {
783
+ const c = Array.from(
784
+ p.current?.querySelectorAll("[role=listitem]") || []
785
+ ), d = c.indexOf(r.currentTarget);
786
+ if (r.key === "ArrowDown") {
787
+ r.preventDefault();
788
+ const w = d < c.length - 1 ? d + 1 : d;
789
+ c[w]?.focus();
790
+ } else if (r.key === "ArrowUp")
791
+ if (r.preventDefault(), d === 0)
792
+ V && V.current?.focus();
793
+ else {
794
+ const w = d - 1;
795
+ c[w]?.focus();
796
+ }
797
+ else if (r.key === "Enter" || r.key === " ") {
798
+ if (r.preventDefault(), o.isGroupHeader || v) return;
799
+ se(o, !u), u || setTimeout(() => {
800
+ J.current?.focus(), fe();
801
+ }, 10);
802
+ } else r.key === "Escape" ? (r.preventDefault(), setTimeout(() => {
803
+ J.current?.focus(), fe();
804
+ }, 10)) : r.key === "Tab" && setTimeout(() => {
805
+ J.current?.focus(), fe();
806
+ }, 10);
807
+ }, Y = Array.from({ length: 5 }).map(
808
+ (r, o) => x ? Ne.createElement(
809
+ Z(x, (c, d) => c.isSelected === d.isSelected && c.option === d.option && c.disabled === d.disabled && c.multiple === d.multiple && c.renderContext === d.renderContext),
810
+ {
811
+ key: `skeleton-option-${o}`,
812
+ option: { id: o, label: "", value: "" },
813
+ isSelected: !1,
814
+ multiple: !1,
815
+ onSelect: () => {
816
+ },
817
+ disabled: !1,
818
+ isLoading: !0,
819
+ renderContext: S
820
+ }
821
+ ) : /* @__PURE__ */ s.jsx(
822
+ Be,
823
+ {
824
+ multiple: !1,
825
+ isLoading: !0,
826
+ onSelect: () => {
827
+ },
828
+ isSelected: !1,
829
+ option: { id: o, label: "", value: "" }
830
+ },
831
+ `skeleton-option-${// biome-ignore lint/suspicious/noArrayIndexKey: <>
832
+ o}`
833
+ )
834
+ ), ge = /* @__PURE__ */ s.jsx(
835
+ "div",
836
+ {
837
+ tabIndex: 0,
838
+ ref: p,
839
+ style: { opacity: "0" },
840
+ className: f(
841
+ " z-100! w-full mt-1 bg-neutral-default-default border border-neutral-default-default rounded-lg shadow-lg",
842
+ " overflow-hidden focus-visible:bg-neutral-default-hover ",
843
+ E ? "absolute z-50 " : "fixed z-100 top-0 left-0",
844
+ he.direction === "up" ? "h-auto" : " h-max",
845
+ Ie
846
+ ),
847
+ children: /* @__PURE__ */ s.jsxs(
848
+ "div",
849
+ {
850
+ className: f(
851
+ "flex flex-col ",
852
+ Ce ? "p-0" : "p-2 pt-0 gap-2"
853
+ ),
854
+ style: {
855
+ height: "auto",
856
+ maxHeight: he.height
857
+ },
858
+ children: [
859
+ !Ce && /* @__PURE__ */ s.jsx(
860
+ lt,
861
+ {
862
+ name: "",
863
+ label: "",
864
+ size: "small",
865
+ tabIndex: 0,
866
+ value: I,
867
+ disabled: v,
868
+ ref: V,
869
+ labelVariant: "static",
870
+ icon: /* @__PURE__ */ s.jsx(Ye, {}),
871
+ isFetching: ee,
872
+ onKeyDown: $e,
873
+ onClear: Ge,
874
+ onChange: (r) => Te(r.target.value),
875
+ placeholder: Ee,
876
+ className: " bg-neutral-medium-pressed",
877
+ ...j
878
+ }
879
+ ),
880
+ /* @__PURE__ */ s.jsx("div", { className: " overflow-y-auto flex-1 max-h-max ", children: de.length === 0 ? ee ? /* @__PURE__ */ s.jsx("div", { className: "flex flex-col gap-1 overflow-hidden w-full", children: je || Y }) : /* @__PURE__ */ s.jsx("div", { className: "px-3 py-2 text-neutral-medium-default", children: I ? `No se encontraron resultados para "${I}"` : A }) : (() => {
881
+ let r = !0;
882
+ return de.map((o) => {
883
+ const c = o, d = !!c.isGroupHeader, w = x && !d ? G(o, k) : c.id, L = ae.has(w), y = (l) => !x || d ? l : {
884
+ id: w,
885
+ label: String(G(l, b)),
886
+ value: G(l, k)
887
+ }, R = (l) => {
888
+ d || se(
889
+ y(o),
890
+ l === void 0 ? !u : l
891
+ );
892
+ }, q = (l) => {
893
+ if (se(l, !u), !u) {
894
+ if (!z) return;
895
+ z(""), Q(i);
896
+ }
897
+ }, re = (l, g) => {
898
+ const H = !!g.isGroupHeader;
899
+ return (
900
+ // biome-ignore lint/a11y/useSemanticElements: <>
901
+ /* @__PURE__ */ s.jsx(
902
+ "div",
903
+ {
904
+ tabIndex: 0,
905
+ role: "listitem",
906
+ onKeyDown: ($) => T($, g),
907
+ className: f(
908
+ !H && !v && "focus-visible:bg-neutral-medium-hover outline-none hover:bg-neutral-medium-hover",
909
+ L && "bg-neutral-medium-selected",
910
+ v && "cursor-default pointer-events-none"
911
+ ),
912
+ children: l
913
+ },
914
+ g.id
915
+ )
916
+ );
917
+ };
918
+ if (d) {
919
+ const l = c.groupLabelNode ?? c.label, g = String(c.id), H = X === !1 ? !0 : Me(g);
920
+ r = H;
921
+ const $ = c.originalOption, P = c.groupData?.groupOptions ?? [], le = (_) => {
922
+ X && ke(g, _);
923
+ }, xe = (_) => {
924
+ !P || P.length === 0 || Se && Se(P, _);
925
+ }, ye = P.filter(
926
+ (_) => ae.has(G(_, k))
927
+ ).map((_) => String(G(_, k)));
928
+ if (M) {
929
+ const _ = Z(
930
+ M,
931
+ (D, B) => D.label === B.label && D.group === B.group && D.groupOptions === B.groupOptions && D.disabled === B.disabled && D.multiple === B.multiple && D.expanded === B.expanded && D.renderContext === B.renderContext
932
+ ), C = Ne.createElement(_, {
933
+ group: $,
934
+ label: l,
935
+ groupOptions: P,
936
+ multiple: u,
937
+ disabled: v,
938
+ expanded: H,
939
+ toggleGroup: le,
940
+ selectGroup: xe,
941
+ renderContext: S,
942
+ groupSelectedIds: ye
943
+ });
944
+ return re(C, c);
945
+ }
946
+ return re(
947
+ /* @__PURE__ */ s.jsxs("div", { className: "px-3 py-2 text-neutral-medium-default font-medium text-sm w-full flex justify-between", children: [
948
+ /* @__PURE__ */ s.jsx("div", { children: l }),
949
+ X && /* @__PURE__ */ s.jsx(
950
+ "div",
951
+ {
952
+ className: "cursor-pointer",
953
+ onClick: () => ke(g),
954
+ children: /* @__PURE__ */ s.jsx(
955
+ Ue,
956
+ {
957
+ className: f(
958
+ "transition-transform duration-300 ease-out",
959
+ H ? "rotate-180" : "rotate-0"
960
+ )
961
+ }
962
+ )
963
+ }
964
+ )
965
+ ] }),
966
+ c
967
+ );
968
+ }
969
+ const be = x ? Ne.createElement(
970
+ Z(
971
+ x,
972
+ (l, g) => l.isSelected === g.isSelected && l.option === g.option && l.disabled === g.disabled && l.multiple === g.multiple && l.renderContext === g.renderContext
973
+ ),
974
+ {
975
+ key: w,
976
+ option: o,
977
+ isSelected: L,
978
+ multiple: u,
979
+ onSelect: R,
980
+ disabled: v,
981
+ isLoading: ee,
982
+ renderContext: S
983
+ }
984
+ ) : /* @__PURE__ */ s.jsx(
985
+ Be,
986
+ {
987
+ disabled: v,
988
+ multiple: u,
989
+ isLoading: ee,
990
+ isSelected: L,
991
+ onSelect: q,
992
+ option: o
993
+ },
994
+ w
995
+ ), ue = re(
996
+ be,
997
+ y(o)
998
+ );
999
+ if (!X)
1000
+ return ue;
1001
+ const t = !r, a = ue;
1002
+ return Ne.cloneElement(a, {
1003
+ className: f(
1004
+ a.props.className,
1005
+ "overflow-hidden transition-[max-height] duration-300 ease-out",
1006
+ t ? "max-h-0" : "max-h-[999px]"
1007
+ )
1008
+ });
1009
+ });
1010
+ })() }),
1011
+ e && /* @__PURE__ */ s.jsx("div", { className: "border-t border-neutral-strong-default p-2", children: e })
1012
+ ]
1013
+ }
1014
+ )
1015
+ }
1016
+ );
1017
+ return E ? ge : tt(ge, document.body);
1018
+ }
1019
+ const mt = Z(
1020
+ ft,
1021
+ (e, n) => e.options === n.options && e.selectedOptionsIds === n.selectedOptionsIds && e.multiple === n.multiple && e.disabled === n.disabled && e.emptyMessage === n.emptyMessage && e.renderOption === n.renderOption && e.renderOptionContext === n.renderOptionContext && e.isOpen === n.isOpen && e.attachToParent === n.attachToParent && e.optionValue === n.optionValue && e.optionLabel === n.optionLabel && e.filteredOptions === n.filteredOptions && e.isLoading === n.isLoading
1022
+ ), Be = Z(
1023
+ ({
1024
+ option: e,
1025
+ isSelected: n,
1026
+ onSelect: m,
1027
+ multiple: i,
1028
+ disabled: u,
1029
+ isLoading: v
1030
+ }) => {
1031
+ const h = e.isGroupHeader;
1032
+ if (v)
1033
+ return /* @__PURE__ */ s.jsxs(
1034
+ "div",
1035
+ {
1036
+ className: "flex gap-2 w-full px-3 py-2 cursor-wait",
1037
+ children: [
1038
+ /* @__PURE__ */ s.jsx(Ke, { className: "size-6 aspect-square" }),
1039
+ /* @__PURE__ */ s.jsx(Ke, { className: "flex-1 h-6" })
1040
+ ]
1041
+ },
1042
+ e.id
1043
+ );
1044
+ const j = (b) => {
1045
+ b.preventDefault(), b.stopPropagation(), !(u || h) && m?.(e);
1046
+ }, p = h && e.groupLabelNode ? e.groupLabelNode : e.label;
1047
+ return (
1048
+ // biome-ignore lint/a11y/noStaticElementInteractions: no keyboard interaction needed
1049
+ /* @__PURE__ */ s.jsxs(
1050
+ "div",
1051
+ {
1052
+ onMouseDown: j,
1053
+ className: f(
1054
+ "px-3 py-2 flex items-center transition-colors text-neutral-default-default ",
1055
+ h ? "cursor-default text-neutral-medium-default" : "cursor-pointer",
1056
+ !h && (n ? " text-primary-default-default" : "hover:bg-neutral-medium-hover text-neutral-default-hover"),
1057
+ u && !h && "text-neutral-default-disabled hover:bg-neutral-default-default"
1058
+ ),
1059
+ children: [
1060
+ i && !h && /* @__PURE__ */ s.jsx(st, { checked: n, disabled: u }),
1061
+ /* @__PURE__ */ s.jsx("span", { children: p })
1062
+ ]
1063
+ },
1064
+ e.id
1065
+ )
1066
+ );
1067
+ },
1068
+ (e, n) => e.isSelected === n.isSelected && e.disabled === n.disabled
1069
+ );
1070
+ Be.displayName = "DefaultOptionRenderer";
1071
+ const Je = Z(
1072
+ ({
1073
+ selectedOptions: e,
1074
+ placeholder: n,
1075
+ onRemoveOption: m,
1076
+ displayMode: i,
1077
+ multiple: u,
1078
+ className: v,
1079
+ disabled: h
1080
+ }) => e?.length === 0 ? n ? /* @__PURE__ */ s.jsx("span", { className: "text-neutral-medium-default opacity-50", children: n }) : null : i === "chips" && u ? /* @__PURE__ */ s.jsx("div", { className: f("flex items-center gap-1 ", v), children: e.map((j) => /* @__PURE__ */ s.jsx(
1081
+ it,
1082
+ {
1083
+ tabIndex: -1,
1084
+ id: j.id,
1085
+ label: j.label,
1086
+ onRemove: m,
1087
+ disabled: h
1088
+ },
1089
+ j.id
1090
+ )) }) : e?.length === 1 ? /* @__PURE__ */ s.jsx("span", { children: e[0].label }) : /* @__PURE__ */ s.jsxs("span", { children: [
1091
+ e?.length,
1092
+ " seleccionados"
1093
+ ] }),
1094
+ (e, n) => e.selectedOptions === n.selectedOptions && e.disabled === n.disabled
1095
+ );
1096
+ Je.displayName = "DefaultSelectionDisplay";
1097
+ export {
1098
+ Dt as S,
1099
+ G as g
1100
+ };