@konstructio/ui 0.1.2-alpha.78 → 0.1.2-alpha.79

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 (506) hide show
  1. package/dist/AdditionalOptions-Cx9wU01w.js +37 -0
  2. package/dist/AlertDialogTrigger-C-NMEoDd.js +146 -0
  3. package/dist/Breadcrumb-C95aOsYk.js +77 -0
  4. package/dist/CalendarPanel.css +1 -1
  5. package/dist/Checkbox-Cn0UWlk8.js +239 -0
  6. package/dist/Combination-DUTBK_qM.js +486 -0
  7. package/dist/CommandInput-BKv-EZ7T.js +76 -0
  8. package/dist/Counter-DtQu_T-D.js +191 -0
  9. package/dist/DayPicker-CNWQ1Oyd.js +2884 -0
  10. package/dist/DropdownButton-B2XkEqPt.js +92 -0
  11. package/dist/FlagSelectorList-C17nmEBM.js +597 -0
  12. package/dist/ImageUpload-BzXjGZ2w.js +181 -0
  13. package/dist/Input-GBMxM3Z7.js +188 -0
  14. package/dist/Loading-DKqxR-oV.js +16 -0
  15. package/dist/Modal-DbTe8PVX.js +76 -0
  16. package/dist/Spinner-CyuXAaC8.js +41 -0
  17. package/dist/StepIndicatorContent-D5z1Ziqg.js +30 -0
  18. package/dist/Switch-DjbC0A8y.js +136 -0
  19. package/dist/Toast-C3XjAvtC.js +478 -0
  20. package/dist/Wrapper-BWSOaT1y.js +1056 -0
  21. package/dist/Wrapper-CjUokv72.js +110 -0
  22. package/dist/Wrapper-DEJ-hyar.js +161 -0
  23. package/dist/assets/icons/components/Accounts.js +21 -35
  24. package/dist/assets/icons/components/AddChart.js +17 -25
  25. package/dist/assets/icons/components/AlertOutline.js +18 -26
  26. package/dist/assets/icons/components/AppRepo.js +14 -22
  27. package/dist/assets/icons/components/Apps.js +14 -22
  28. package/dist/assets/icons/components/Archives.js +14 -22
  29. package/dist/assets/icons/components/ArrowDown.js +14 -22
  30. package/dist/assets/icons/components/ArrowLeft.js +17 -25
  31. package/dist/assets/icons/components/ArrowRight.js +18 -26
  32. package/dist/assets/icons/components/ArrowUp.js +18 -26
  33. package/dist/assets/icons/components/BarChart.js +24 -32
  34. package/dist/assets/icons/components/BookOpen.js +18 -26
  35. package/dist/assets/icons/components/CalendarMonth.js +17 -25
  36. package/dist/assets/icons/components/Check.js +17 -25
  37. package/dist/assets/icons/components/CheckCircleFilled.js +25 -26
  38. package/dist/assets/icons/components/CheckCircleOutline.js +14 -22
  39. package/dist/assets/icons/components/CheckboxMarkedCircleOutline.js +14 -20
  40. package/dist/assets/icons/components/ClockAlert.js +17 -25
  41. package/dist/assets/icons/components/ClockOutline.js +17 -25
  42. package/dist/assets/icons/components/Close.js +17 -25
  43. package/dist/assets/icons/components/Cloud.js +14 -19
  44. package/dist/assets/icons/components/CloudLockOutline.js +17 -25
  45. package/dist/assets/icons/components/Clusters.js +27 -41
  46. package/dist/assets/icons/components/CogOutline.js +17 -25
  47. package/dist/assets/icons/components/Copy.js +17 -25
  48. package/dist/assets/icons/components/Cpu.js +22 -36
  49. package/dist/assets/icons/components/Cube.js +14 -22
  50. package/dist/assets/icons/components/Datacenter.js +14 -22
  51. package/dist/assets/icons/components/Delete.js +18 -26
  52. package/dist/assets/icons/components/DollarSign.js +20 -28
  53. package/dist/assets/icons/components/Download.js +17 -25
  54. package/dist/assets/icons/components/Edit.js +17 -25
  55. package/dist/assets/icons/components/Ellipses.js +17 -25
  56. package/dist/assets/icons/components/Environments.js +19 -27
  57. package/dist/assets/icons/components/Error.js +17 -25
  58. package/dist/assets/icons/components/ErrorOutline.js +17 -25
  59. package/dist/assets/icons/components/Exclamation.js +21 -26
  60. package/dist/assets/icons/components/Git.js +17 -25
  61. package/dist/assets/icons/components/GitOpsCatalog.js +21 -35
  62. package/dist/assets/icons/components/GridView.js +11 -16
  63. package/dist/assets/icons/components/Help.js +24 -23
  64. package/dist/assets/icons/components/HideOutline.js +18 -32
  65. package/dist/assets/icons/components/Home.js +17 -25
  66. package/dist/assets/icons/components/Home2.js +20 -25
  67. package/dist/assets/icons/components/Id.js +14 -22
  68. package/dist/assets/icons/components/InfoCircle.js +28 -29
  69. package/dist/assets/icons/components/InformationOutline.js +14 -22
  70. package/dist/assets/icons/components/InvoiceList.js +17 -25
  71. package/dist/assets/icons/components/Key.js +17 -25
  72. package/dist/assets/icons/components/LightBulb.js +24 -38
  73. package/dist/assets/icons/components/Loader.js +15 -23
  74. package/dist/assets/icons/components/Network.js +14 -22
  75. package/dist/assets/icons/components/PagesStack.js +24 -23
  76. package/dist/assets/icons/components/Pageview.js +17 -25
  77. package/dist/assets/icons/components/People.js +17 -25
  78. package/dist/assets/icons/components/PhotoLibrary.js +17 -25
  79. package/dist/assets/icons/components/Pipeline.js +19 -27
  80. package/dist/assets/icons/components/Plus.js +17 -25
  81. package/dist/assets/icons/components/PowerSettings.js +15 -23
  82. package/dist/assets/icons/components/Preview.js +14 -22
  83. package/dist/assets/icons/components/ReceiptLong.js +11 -16
  84. package/dist/assets/icons/components/Refresh.js +14 -22
  85. package/dist/assets/icons/components/ScatterPlot.js +14 -19
  86. package/dist/assets/icons/components/Search.js +26 -26
  87. package/dist/assets/icons/components/Server.js +18 -26
  88. package/dist/assets/icons/components/Start.js +18 -26
  89. package/dist/assets/icons/components/TabNew.js +31 -45
  90. package/dist/assets/icons/components/Teams.js +17 -25
  91. package/dist/assets/icons/components/Upload.js +17 -25
  92. package/dist/assets/icons/components/Warning.js +17 -25
  93. package/dist/assets/icons/components/WarningTriangle.js +17 -25
  94. package/dist/assets/icons/components/X.js +17 -25
  95. package/dist/assets/icons/components/index.js +82 -82
  96. package/dist/assets/icons/index.js +88 -88
  97. package/dist/chevron-down-DgssmYWu.js +8 -0
  98. package/dist/chevron-left-DRJXef9g.js +8 -0
  99. package/dist/chevron-right-BooB_b7g.js +8 -0
  100. package/dist/chevron-up-DuS9MUNr.js +8 -0
  101. package/dist/chunk-D1xtDmiO.js +31 -0
  102. package/dist/{clsx-OuTLNxxd.js → clsx-kDhLfUq2.js} +1 -1
  103. package/dist/components/Alert/Alert.js +53 -57
  104. package/dist/components/Alert/Alert.variants.js +90 -105
  105. package/dist/components/AlertDialog/AlertDialog.js +66 -124
  106. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +2 -6
  107. package/dist/components/AlertDialog/components/index.js +2 -2
  108. package/dist/components/AlertDialog/hooks/useAlertDialog.js +12 -7
  109. package/dist/components/Autocomplete/Autocomplete.js +55 -79
  110. package/dist/components/Autocomplete/Autocomplete.variants.js +7 -3
  111. package/dist/components/Autocomplete/components/List/List.js +30 -42
  112. package/dist/components/Autocomplete/components/List/List.variants.js +7 -7
  113. package/dist/components/Autocomplete/components/index.js +2 -2
  114. package/dist/components/Autocomplete/hooks/useAutocomplete.js +30 -61
  115. package/dist/components/Autocomplete/hooks/useNavigationList.js +42 -54
  116. package/dist/components/Badge/Badge.js +59 -74
  117. package/dist/components/Badge/Badge.variants.js +89 -99
  118. package/dist/components/Breadcrumb/Breadcrumb.js +2 -89
  119. package/dist/components/Breadcrumb/Breadcrumb.variants.js +9 -5
  120. package/dist/components/Breadcrumb/components/Item/Item.js +31 -45
  121. package/dist/components/Breadcrumb/components/Item/Item.variants.js +52 -65
  122. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +2 -2
  123. package/dist/components/Button/Button.js +21 -39
  124. package/dist/components/Button/Button.variants.js +314 -291
  125. package/dist/components/ButtonGroup/ButtonGroup.js +80 -134
  126. package/dist/components/ButtonGroup/ButtonGroup.variants.js +20 -27
  127. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +55 -111
  128. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +88 -101
  129. package/dist/components/ButtonGroup/components/ButtonGroupItem/index.js +2 -2
  130. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +20 -42
  131. package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.js +2 -2
  132. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +13 -32
  133. package/dist/components/ButtonGroup/components/index.js +6 -6
  134. package/dist/components/ButtonGroup/hooks/index.js +2 -2
  135. package/dist/components/ButtonGroup/hooks/useButtonGroup.js +27 -40
  136. package/dist/components/Card/Card.js +20 -32
  137. package/dist/components/Card/Card.variants.js +40 -39
  138. package/dist/components/Checkbox/Checkbox.js +2 -364
  139. package/dist/components/Checkbox/Checkbox.variants.js +54 -64
  140. package/dist/components/Command/Command.js +27 -36
  141. package/dist/components/Command/Command.variants.js +3 -3
  142. package/dist/components/Command/components/Command.js +13 -5
  143. package/dist/components/Command/components/CommandEmpty.js +10 -13
  144. package/dist/components/Command/components/CommandGroup.js +8 -14
  145. package/dist/components/Command/components/CommandInput.js +2 -82
  146. package/dist/components/Command/components/CommandItem.js +16 -25
  147. package/dist/components/Command/components/CommandList.js +9 -12
  148. package/dist/components/Command/components/CommandSeparator.js +9 -12
  149. package/dist/components/Command/components/CommandShortcut.js +8 -17
  150. package/dist/components/Command/components/DialogContent.js +19 -28
  151. package/dist/components/Command/components/DialogOverlay.js +11 -17
  152. package/dist/components/Command/components/index.js +16 -16
  153. package/dist/components/Command/contexts/Command.context.js +1 -1
  154. package/dist/components/Command/contexts/Command.provider.js +15 -21
  155. package/dist/components/Command/contexts/index.js +2 -2
  156. package/dist/components/Counter/Counter.js +3 -209
  157. package/dist/components/Counter/Counter.variants.js +35 -48
  158. package/dist/components/DateRangePicker/DateRangePicker.js +68 -153
  159. package/dist/components/DateRangePicker/DateRangePicker.variants.js +5 -5
  160. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +64 -104
  161. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.variants.js +17 -17
  162. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +5 -17
  163. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +34 -56
  164. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +181 -304
  165. package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +17 -36
  166. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +79 -127
  167. package/dist/components/DateRangePicker/components/CalendarPanel/components/index.js +6 -6
  168. package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +2 -3
  169. package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +10 -147
  170. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +19 -19
  171. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +98 -96
  172. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +75 -60
  173. package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +8 -8
  174. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +54 -97
  175. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.js +13 -8
  176. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +40 -87
  177. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +41 -88
  178. package/dist/components/DateRangePicker/components/DateTimeInputs/components/index.js +2 -2
  179. package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/index.js +2 -2
  180. package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +151 -156
  181. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +37 -61
  182. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.js +2 -2
  183. package/dist/components/DateRangePicker/components/index.js +6 -6
  184. package/dist/components/DateRangePicker/constants/index.js +2 -2
  185. package/dist/components/DateRangePicker/constants/presets.js +21 -6
  186. package/dist/components/DateRangePicker/contexts/date-range-picker.context.js +3 -3
  187. package/dist/components/DateRangePicker/contexts/date-range-picker.hook.js +4 -7
  188. package/dist/components/DateRangePicker/contexts/date-range-picker.provider.js +113 -170
  189. package/dist/components/DateRangePicker/contexts/index.js +6 -6
  190. package/dist/components/DateRangePicker/utils/disabled-dates.js +25 -45
  191. package/dist/components/DateRangePicker/utils/index.js +20 -20
  192. package/dist/components/DateRangePicker/utils/presets.js +6 -8
  193. package/dist/components/DateRangePicker/utils/validation.js +48 -60
  194. package/dist/components/Datepicker/DatePicker.js +45 -133
  195. package/dist/components/Datepicker/DatePicker.variants.js +3 -3
  196. package/dist/components/Divider/Divider.js +6 -6
  197. package/dist/components/Divider/Divider.variants.js +9 -11
  198. package/dist/components/Drawer/Drawer.js +67 -125
  199. package/dist/components/Drawer/Drawer.variants.js +59 -73
  200. package/dist/components/Drawer/components/Body/Body.js +8 -17
  201. package/dist/components/Drawer/components/Body/index.js +2 -2
  202. package/dist/components/Drawer/components/Footer/Footer.js +10 -21
  203. package/dist/components/Drawer/components/Footer/index.js +2 -2
  204. package/dist/components/Drawer/components/Header/Header.js +11 -22
  205. package/dist/components/Drawer/components/Header/index.js +2 -2
  206. package/dist/components/Drawer/components/index.js +6 -6
  207. package/dist/components/Drawer/constants/index.js +1 -1
  208. package/dist/components/Drawer/contexts/Drawer.context.js +4 -4
  209. package/dist/components/Drawer/contexts/index.js +3 -3
  210. package/dist/components/Drawer/hooks/index.js +2 -2
  211. package/dist/components/Drawer/hooks/useDrawer.js +32 -36
  212. package/dist/components/DropdownButton/DropdownButton.js +2 -133
  213. package/dist/components/Filter/Filter.js +23 -20
  214. package/dist/components/Filter/Filter.variants.js +9 -5
  215. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +48 -82
  216. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +71 -143
  217. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +40 -71
  218. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +50 -119
  219. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +35 -57
  220. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +53 -116
  221. package/dist/components/Filter/components/ResetButton/ResetButton.js +19 -30
  222. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +72 -135
  223. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +33 -54
  224. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +72 -143
  225. package/dist/components/Filter/components/index.js +6 -6
  226. package/dist/components/Filter/contexts/filter.context.js +2 -4
  227. package/dist/components/Filter/contexts/filter.hook.js +5 -6
  228. package/dist/components/Filter/contexts/filter.provider.js +6 -3
  229. package/dist/components/Filter/contexts/index.js +4 -4
  230. package/dist/components/Filter/events/index.js +4 -8
  231. package/dist/components/Filter/utils/index.js +2 -2435
  232. package/dist/components/ImageUpload/ImageUpload.js +2 -221
  233. package/dist/components/ImageUpload/ImageUpload.variants.js +78 -95
  234. package/dist/components/Input/Input.js +2 -286
  235. package/dist/components/Input/Input.variants.js +47 -54
  236. package/dist/components/LineChart/LineChart.js +103 -133
  237. package/dist/components/Loading/Loading.js +2 -18
  238. package/dist/components/Loading/Loading.variants.js +2 -2
  239. package/dist/components/Modal/Modal.js +3 -8
  240. package/dist/components/Modal/components/Body/Body.js +8 -5
  241. package/dist/components/Modal/components/Footer/Footer.js +8 -11
  242. package/dist/components/Modal/components/Header/Header.js +8 -11
  243. package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -10
  244. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +2 -2
  245. package/dist/components/Modal/components/index.js +8 -8
  246. package/dist/components/Modal/contexts/Modal.context.js +2 -4
  247. package/dist/components/Modal/contexts/Modal.provider.js +17 -20
  248. package/dist/components/Modal/contexts/index.js +2 -2
  249. package/dist/components/Modal/hooks/useModal.js +10 -10
  250. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +2 -32
  251. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +6 -6
  252. package/dist/components/MultiSelectDropdown/components/Item/Item.js +16 -24
  253. package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +26 -35
  254. package/dist/components/MultiSelectDropdown/components/List/List.js +2 -28
  255. package/dist/components/MultiSelectDropdown/components/List/List.variants.js +3 -3
  256. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +2 -124
  257. package/dist/components/MultiSelectDropdown/components/index.js +4 -5
  258. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +4 -4
  259. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +3 -6
  260. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +100 -131
  261. package/dist/components/MultiSelectDropdown/contexts/index.js +2 -2
  262. package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +12 -21
  263. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +11 -5
  264. package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +31 -38
  265. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +15 -32
  266. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +2 -728
  267. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +22 -54
  268. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +37 -30
  269. package/dist/components/PhoneNumberInput/components/Wrapper.js +2 -650
  270. package/dist/components/PhoneNumberInput/components/index.js +4 -4
  271. package/dist/components/PhoneNumberInput/contexts/index.js +3 -3
  272. package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +1 -1
  273. package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +5 -8
  274. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +2 -6064
  275. package/dist/components/PhoneNumberInput/utils/index.js +7 -8
  276. package/dist/components/PieChart/PieChart.js +40 -66
  277. package/dist/components/ProgressBar/ProgressBar.js +27 -36
  278. package/dist/components/ProgressBar/ProgressBar.variants.js +19 -26
  279. package/dist/components/Radio/Radio.js +51 -95
  280. package/dist/components/Radio/Radio.variants.js +82 -88
  281. package/dist/components/RadioCard/RadioCard.js +14 -31
  282. package/dist/components/RadioCard/RadioCard.variants.js +7 -2
  283. package/dist/components/RadioCardGroup/RadioCardGroup.js +24 -42
  284. package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +8 -12
  285. package/dist/components/RadioGroup/RadioGroup.js +26 -48
  286. package/dist/components/RadioGroup/RadioGroup.variants.js +8 -12
  287. package/dist/components/Range/Range.js +47 -59
  288. package/dist/components/Range/Range.variants.js +35 -44
  289. package/dist/components/Select/Select.js +35 -68
  290. package/dist/components/Select/Select.variants.js +49 -48
  291. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +2 -9
  292. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +3 -24
  293. package/dist/components/Select/components/EmptyList.js +2 -2
  294. package/dist/components/Select/components/List/List.js +126 -180
  295. package/dist/components/Select/components/List/List.variants.js +3 -3
  296. package/dist/components/Select/components/ListItem/ListItem.js +54 -107
  297. package/dist/components/Select/components/ListItem/ListItem.variants.js +3 -3
  298. package/dist/components/Select/components/Wrapper.js +2 -248
  299. package/dist/components/Select/components/index.js +8 -8
  300. package/dist/components/Select/constants/index.js +4 -4
  301. package/dist/components/Select/constants/list.js +2 -2
  302. package/dist/components/Select/constants/pagination.js +2 -2
  303. package/dist/components/Select/contexts/index.js +4 -4
  304. package/dist/components/Select/contexts/select.context.js +2 -2
  305. package/dist/components/Select/contexts/select.hook.js +6 -7
  306. package/dist/components/Select/contexts/select.provider.js +41 -51
  307. package/dist/components/Select/hooks/useNavigationList.js +28 -37
  308. package/dist/components/Select/hooks/useSelect.js +36 -72
  309. package/dist/components/Sidebar/Sidebar.js +22 -21
  310. package/dist/components/Sidebar/Sidebar.variants.js +4 -4
  311. package/dist/components/Sidebar/components/Footer/Footer.js +9 -6
  312. package/dist/components/Sidebar/components/Footer/Footer.variants.js +2 -2
  313. package/dist/components/Sidebar/components/Logo/Logo.js +7 -4
  314. package/dist/components/Sidebar/components/Logo/Logo.variants.js +2 -2
  315. package/dist/components/Sidebar/components/Navigation/Navigation.js +13 -13
  316. package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +8 -3
  317. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +12 -22
  318. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +6 -2
  319. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +12 -23
  320. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +33 -40
  321. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +4 -4
  322. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +2 -2
  323. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +9 -6
  324. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +3 -3
  325. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +31 -77
  326. package/dist/components/Sidebar/components/index.js +14 -14
  327. package/dist/components/Slider/Slider.js +38 -56
  328. package/dist/components/Slider/Slider.variants.js +36 -45
  329. package/dist/components/Spinner/Spinner.js +2 -55
  330. package/dist/components/Spinner/Spinner.variants.js +37 -51
  331. package/dist/components/Stepper/Stepper.js +44 -71
  332. package/dist/components/Stepper/Stepper.variants.js +270 -229
  333. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +119 -196
  334. package/dist/components/Stepper/components/StepConnector/StepConnector.js +14 -26
  335. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +2 -21
  336. package/dist/components/Stepper/components/StepItem/StepItem.js +4 -4
  337. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +69 -111
  338. package/dist/components/Stepper/constants/index.js +1 -1
  339. package/dist/components/Stepper/hooks/index.js +2 -2
  340. package/dist/components/Stepper/hooks/useStepItemLogic.js +15 -18
  341. package/dist/components/Stepper/utils/index.js +4 -5
  342. package/dist/components/Switch/Switch.js +2 -228
  343. package/dist/components/Switch/Switch.variants.js +2 -2
  344. package/dist/components/Table/Table.js +17 -24
  345. package/dist/components/Table/Table.variants.js +18 -25
  346. package/dist/components/Table/components/Body.js +8 -15
  347. package/dist/components/Table/components/Filter.js +13 -7
  348. package/dist/components/Table/components/Head.js +9 -16
  349. package/dist/components/Table/components/Row.js +14 -26
  350. package/dist/components/Table/components/index.js +6 -6
  351. package/dist/components/Tabs/Tabs.js +20 -20
  352. package/dist/components/Tabs/Tabs.variants.js +55 -72
  353. package/dist/components/Tabs/components/Content.js +12 -12
  354. package/dist/components/Tabs/components/List.js +16 -18
  355. package/dist/components/Tabs/components/Trigger.js +13 -15
  356. package/dist/components/Tabs/components/index.js +4 -4
  357. package/dist/components/Tag/Tag.js +25 -16
  358. package/dist/components/Tag/Tag.variants.js +32 -39
  359. package/dist/components/TagSelect/TagSelect.js +13 -7
  360. package/dist/components/TagSelect/TagSelect.variants.js +6 -6
  361. package/dist/components/TagSelect/components/Item/Item.js +13 -16
  362. package/dist/components/TagSelect/components/Item/Item.variants.js +21 -30
  363. package/dist/components/TagSelect/components/List/List.js +15 -7
  364. package/dist/components/TagSelect/components/List/List.variants.js +3 -3
  365. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +2 -85
  366. package/dist/components/TagSelect/components/index.js +6 -6
  367. package/dist/components/TagSelect/contexts/TagSelect.context.js +1 -1
  368. package/dist/components/TagSelect/contexts/TagSelect.hook.js +6 -7
  369. package/dist/components/TagSelect/contexts/TagSelect.provider.js +43 -59
  370. package/dist/components/TagSelect/contexts/index.js +4 -4
  371. package/dist/components/TagSelect/hooks/useTagSelect.js +13 -22
  372. package/dist/components/TextArea/TextArea.js +26 -33
  373. package/dist/components/TextArea/TextArea.variants.js +3 -3
  374. package/dist/components/TimePicker/TimePicker.js +12 -10
  375. package/dist/components/TimePicker/TimePicker.variants.js +2 -2
  376. package/dist/components/TimePicker/components/HoursList/HoursList.js +84 -110
  377. package/dist/components/TimePicker/components/MeridianList/MeridianList.js +53 -88
  378. package/dist/components/TimePicker/components/MinutesList/MinutesList.js +56 -82
  379. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +128 -221
  380. package/dist/components/TimePicker/components/WrapperList/WrapperList.js +34 -71
  381. package/dist/components/TimePicker/components/index.js +2 -2
  382. package/dist/components/TimePicker/contexts/index.js +6 -6
  383. package/dist/components/TimePicker/contexts/time-picker.context.js +1 -1
  384. package/dist/components/TimePicker/contexts/time-picker.hook.js +4 -7
  385. package/dist/components/TimePicker/contexts/time-picker.provider.js +46 -48
  386. package/dist/components/TimePicker/utils/index.js +17 -19
  387. package/dist/components/Toast/Toast.js +3 -511
  388. package/dist/components/Toast/Toast.variants.js +32 -35
  389. package/dist/components/Tooltip/Tooltip.js +15 -34
  390. package/dist/components/Typography/Typography.js +16 -24
  391. package/dist/components/Typography/Typography.variants.js +72 -62
  392. package/dist/components/VirtualizedTable/VirtualizedTable.js +89 -159
  393. package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +1 -1
  394. package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +2 -2
  395. package/dist/components/VirtualizedTable/assets/chevron-down.js +13 -22
  396. package/dist/components/VirtualizedTable/assets/chevron-up.js +13 -22
  397. package/dist/components/VirtualizedTable/assets/index.js +4 -4
  398. package/dist/components/VirtualizedTable/components/Actions/Actions.js +34 -115
  399. package/dist/components/VirtualizedTable/components/Body/Body.js +49 -111
  400. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +91 -157
  401. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +22 -30
  402. package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +27 -47
  403. package/dist/components/VirtualizedTable/components/Filter/Filter.js +99 -164
  404. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +41 -56
  405. package/dist/components/VirtualizedTable/components/Header/Header.js +36 -98
  406. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +28 -62
  407. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +38 -101
  408. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +29 -49
  409. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +9 -23
  410. package/dist/components/VirtualizedTable/components/index.js +10 -10
  411. package/dist/components/VirtualizedTable/constants/index.js +3 -3
  412. package/dist/components/VirtualizedTable/constants/pagination.js +6 -1
  413. package/dist/components/VirtualizedTable/contexts/index.js +6 -6
  414. package/dist/components/VirtualizedTable/contexts/table.context.js +3 -3
  415. package/dist/components/VirtualizedTable/contexts/table.hook.js +7 -8
  416. package/dist/components/VirtualizedTable/contexts/table.provider.js +2 -268
  417. package/dist/components/VirtualizedTable/contexts/table.types.d.ts +1 -1
  418. package/dist/components/VirtualizedTable/events/index.js +19 -24
  419. package/dist/components/index.js +140 -140
  420. package/dist/components-DNFycJGm.js +120 -0
  421. package/dist/constants-D96yCePL.js +31 -0
  422. package/dist/contexts/index.js +6 -6
  423. package/dist/contexts/theme.context.js +2 -2
  424. package/dist/contexts/theme.hook.js +2 -2
  425. package/dist/contexts/theme.provider.js +2 -84
  426. package/dist/createLucideIcon-BVGkzDZC.js +42 -0
  427. package/dist/debounce-CzFlgg9h.js +86 -0
  428. package/dist/dist-B5SlrgYz.js +263 -0
  429. package/dist/{index-BZPx6jYI.js → dist-BL-H4bEw2.js} +5 -2
  430. package/dist/dist-BL8l9uRy.js +361 -0
  431. package/dist/{index-DLcqcWxM.js → dist-ByyYBtbL.js} +9 -11
  432. package/dist/dist-C8r5DW7s.js +10 -0
  433. package/dist/dist-CBnErrr1.js +58 -0
  434. package/dist/dist-COY3FRYC.js +480 -0
  435. package/dist/dist-CSP6X06u.js +1701 -0
  436. package/dist/dist-DNSmoWJp.js +469 -0
  437. package/dist/dist-DRmqW28Z2.js +7479 -0
  438. package/dist/dist-DXJSck4j.js +74 -0
  439. package/dist/dist-DXXHfL7M.js +132 -0
  440. package/dist/dist-DZNdbzbm.js +120 -0
  441. package/dist/dist-DZcOdXgW.js +13 -0
  442. package/dist/dist-DeVdyMHW2.js +31 -0
  443. package/dist/{index-3fEdeexs.js → dist-DpqiA4Yn.js} +25 -28
  444. package/dist/dist-DstQl8xY.js +10 -0
  445. package/dist/dist-DtEbXv47.js +34 -0
  446. package/dist/dist-uVUx9i0a.js +223 -0
  447. package/dist/ellipsis-vertical-My0S9QY5.js +24 -0
  448. package/dist/hooks/index.js +2 -2
  449. package/dist/hooks/useToggle.js +5 -8
  450. package/dist/icons.js +88 -88
  451. package/dist/index.js +150 -149
  452. package/dist/isObject--aYwGuhx.js +62 -0
  453. package/dist/libphonenumber-7uXgv7U8.js +81977 -0
  454. package/dist/package.json +18 -18
  455. package/dist/phone-number.provider-B5TfHi8y.js +6646 -0
  456. package/dist/prop-types-DTnODft1.js +547 -0
  457. package/dist/proxy-uLtw-ZML.js +4690 -0
  458. package/dist/style.css +1 -1
  459. package/dist/styles.css +1 -1
  460. package/dist/{index-CSWGJT-v.js → table.provider-4OQNqxH3.js} +805 -674
  461. package/dist/theme.provider-BgxXUOMP.js +74 -0
  462. package/dist/useBreadcrumb-BBm5lX0U.js +1263 -0
  463. package/dist/utils/index.js +5 -2922
  464. package/dist/utils-CQSRNcoF.js +2022 -0
  465. package/dist/utils-DHuiYnx1.js +1689 -0
  466. package/dist/x-BwIi6Wii.js +63 -0
  467. package/dist/x-a0ouxoIM.js +11 -0
  468. package/package.json +18 -18
  469. package/dist/AdditionalOptions-C2FDVZhu.js +0 -45
  470. package/dist/Combination-BtmnusWq.js +0 -480
  471. package/dist/DayPicker-CaeUXRCF.js +0 -2798
  472. package/dist/Modal-DAWdufZ_.js +0 -120
  473. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
  474. package/dist/chevron-down-BBFYYzZq.js +0 -5
  475. package/dist/chevron-left-BHBf-gQY.js +0 -5
  476. package/dist/chevron-right-DvXGOiS_.js +0 -5
  477. package/dist/chevron-up-DEfvgPCw.js +0 -54
  478. package/dist/chevron-up-IlDPxR7j.js +0 -5
  479. package/dist/createLucideIcon-CP-mMPfa.js +0 -75
  480. package/dist/debounce-DJveWHr_.js +0 -114
  481. package/dist/ellipsis-vertical-Cl3yNtOy.js +0 -9
  482. package/dist/index--l0zux8V.js +0 -200
  483. package/dist/index-0ioNhtNM.js +0 -10
  484. package/dist/index-BKMaItIC.js +0 -13
  485. package/dist/index-BKjcReYh.js +0 -55
  486. package/dist/index-BOE_3f_Z.js +0 -646
  487. package/dist/index-BRXMsxSL.js +0 -27
  488. package/dist/index-BdMNhZnh.js +0 -9
  489. package/dist/index-BmVmDQGH.js +0 -662
  490. package/dist/index-BvEpLnOv.js +0 -144
  491. package/dist/index-BvoZGpli.js +0 -60
  492. package/dist/index-C7zAY3xv.js +0 -139
  493. package/dist/index-CJnS4BVW.js +0 -93
  494. package/dist/index-Cmf-IG4l.js +0 -322
  495. package/dist/index-CrCTywU1.js +0 -314
  496. package/dist/index-D29mdTf5.js +0 -34
  497. package/dist/index-DWyM654o.js +0 -478
  498. package/dist/index-Jr0cra7i.js +0 -431
  499. package/dist/index-mPinF0Ho.js +0 -1885
  500. package/dist/index-qDQP8rW4.js +0 -7281
  501. package/dist/isObject-9XxUefZH.js +0 -97
  502. package/dist/libphonenumber-aZ-2KWIf.js +0 -11581
  503. package/dist/proxy-BGrSEZuV.js +0 -5046
  504. package/dist/useBreadcrumb-C_Wb2cXs.js +0 -1435
  505. package/dist/x-B9bYxG31.js +0 -8
  506. package/dist/x-Eoa9FJjA.js +0 -62
@@ -1,1435 +0,0 @@
1
- import * as i from "react";
2
- function w(e, t) {
3
- if (e === !1 || e === null || typeof e > "u")
4
- throw new Error(t);
5
- }
6
- function P(e, t) {
7
- if (!e) {
8
- typeof console < "u" && console.warn(t);
9
- try {
10
- throw new Error(t);
11
- } catch {
12
- }
13
- }
14
- }
15
- function q({
16
- pathname: e = "/",
17
- search: t = "",
18
- hash: r = ""
19
- }) {
20
- return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), r && r !== "#" && (e += r.charAt(0) === "#" ? r : "#" + r), e;
21
- }
22
- function Y(e) {
23
- let t = {};
24
- if (e) {
25
- let r = e.indexOf("#");
26
- r >= 0 && (t.hash = e.substring(r), e = e.substring(0, r));
27
- let n = e.indexOf("?");
28
- n >= 0 && (t.search = e.substring(n), e = e.substring(0, n)), e && (t.pathname = e);
29
- }
30
- return t;
31
- }
32
- function ce(e, t, r = "/") {
33
- return Te(e, t, r, !1);
34
- }
35
- function Te(e, t, r, n) {
36
- let a = typeof t == "string" ? Y(t) : t, o = F(a.pathname || "/", r);
37
- if (o == null)
38
- return null;
39
- let l = fe(e);
40
- De(l);
41
- let c = null;
42
- for (let s = 0; c == null && s < l.length; ++s) {
43
- let d = He(o);
44
- c = Ue(
45
- l[s],
46
- d,
47
- n
48
- );
49
- }
50
- return c;
51
- }
52
- function fe(e, t = [], r = [], n = "", a = !1) {
53
- let o = (l, c, s = a, d) => {
54
- let f = {
55
- relativePath: d === void 0 ? l.path || "" : d,
56
- caseSensitive: l.caseSensitive === !0,
57
- childrenIndex: c,
58
- route: l
59
- };
60
- if (f.relativePath.startsWith("/")) {
61
- if (!f.relativePath.startsWith(n) && s)
62
- return;
63
- w(
64
- f.relativePath.startsWith(n),
65
- `Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
66
- ), f.relativePath = f.relativePath.slice(n.length);
67
- }
68
- let u = b([n, f.relativePath]), h = r.concat(f);
69
- l.children && l.children.length > 0 && (w(
70
- // Our types know better, but runtime JS may not!
71
- // @ts-expect-error
72
- l.index !== !0,
73
- `Index routes must not have child routes. Please remove all child routes from route path "${u}".`
74
- ), fe(
75
- l.children,
76
- t,
77
- h,
78
- u,
79
- s
80
- )), !(l.path == null && !l.index) && t.push({
81
- path: u,
82
- score: Ae(u, l.index),
83
- routesMeta: h
84
- });
85
- };
86
- return e.forEach((l, c) => {
87
- if (l.path === "" || !l.path?.includes("?"))
88
- o(l, c);
89
- else
90
- for (let s of de(l.path))
91
- o(l, c, !0, s);
92
- }), t;
93
- }
94
- function de(e) {
95
- let t = e.split("/");
96
- if (t.length === 0) return [];
97
- let [r, ...n] = t, a = r.endsWith("?"), o = r.replace(/\?$/, "");
98
- if (n.length === 0)
99
- return a ? [o, ""] : [o];
100
- let l = de(n.join("/")), c = [];
101
- return c.push(
102
- ...l.map(
103
- (s) => s === "" ? o : [o, s].join("/")
104
- )
105
- ), a && c.push(...l), c.map(
106
- (s) => e.startsWith("/") && s === "" ? "/" : s
107
- );
108
- }
109
- function De(e) {
110
- e.sort(
111
- (t, r) => t.score !== r.score ? r.score - t.score : Be(
112
- t.routesMeta.map((n) => n.childrenIndex),
113
- r.routesMeta.map((n) => n.childrenIndex)
114
- )
115
- );
116
- }
117
- var Fe = /^:[\w-]+$/, Ie = 3, Ne = 2, Oe = 1, Me = 10, _e = -2, le = (e) => e === "*";
118
- function Ae(e, t) {
119
- let r = e.split("/"), n = r.length;
120
- return r.some(le) && (n += _e), t && (n += Ne), r.filter((a) => !le(a)).reduce(
121
- (a, o) => a + (Fe.test(o) ? Ie : o === "" ? Oe : Me),
122
- n
123
- );
124
- }
125
- function Be(e, t) {
126
- return e.length === t.length && e.slice(0, -1).every((n, a) => n === t[a]) ? (
127
- // If two routes are siblings, we should try to match the earlier sibling
128
- // first. This allows people to have fine-grained control over the matching
129
- // behavior by simply putting routes with identical paths in the order they
130
- // want them tried.
131
- e[e.length - 1] - t[t.length - 1]
132
- ) : (
133
- // Otherwise, it doesn't really make sense to rank non-siblings by index,
134
- // so they sort equally.
135
- 0
136
- );
137
- }
138
- function Ue(e, t, r = !1) {
139
- let { routesMeta: n } = e, a = {}, o = "/", l = [];
140
- for (let c = 0; c < n.length; ++c) {
141
- let s = n[c], d = c === n.length - 1, f = o === "/" ? t : t.slice(o.length) || "/", u = W(
142
- { path: s.relativePath, caseSensitive: s.caseSensitive, end: d },
143
- f
144
- ), h = s.route;
145
- if (!u && d && r && !n[n.length - 1].route.index && (u = W(
146
- {
147
- path: s.relativePath,
148
- caseSensitive: s.caseSensitive,
149
- end: !1
150
- },
151
- f
152
- )), !u)
153
- return null;
154
- Object.assign(a, u.params), l.push({
155
- // TODO: Can this as be avoided?
156
- params: a,
157
- pathname: b([o, u.pathname]),
158
- pathnameBase: Je(
159
- b([o, u.pathnameBase])
160
- ),
161
- route: h
162
- }), u.pathnameBase !== "/" && (o = b([o, u.pathnameBase]));
163
- }
164
- return l;
165
- }
166
- function W(e, t) {
167
- typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
168
- let [r, n] = We(
169
- e.path,
170
- e.caseSensitive,
171
- e.end
172
- ), a = t.match(r);
173
- if (!a) return null;
174
- let o = a[0], l = o.replace(/(.)\/+$/, "$1"), c = a.slice(1);
175
- return {
176
- params: n.reduce(
177
- (d, { paramName: f, isOptional: u }, h) => {
178
- if (f === "*") {
179
- let p = c[h] || "";
180
- l = o.slice(0, o.length - p.length).replace(/(.)\/+$/, "$1");
181
- }
182
- const g = c[h];
183
- return u && !g ? d[f] = void 0 : d[f] = (g || "").replace(/%2F/g, "/"), d;
184
- },
185
- {}
186
- ),
187
- pathname: o,
188
- pathnameBase: l,
189
- pattern: e
190
- };
191
- }
192
- function We(e, t = !1, r = !0) {
193
- P(
194
- e === "*" || !e.endsWith("*") || e.endsWith("/*"),
195
- `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`
196
- );
197
- let n = [], a = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
198
- /\/:([\w-]+)(\?)?/g,
199
- (l, c, s, d, f) => {
200
- if (n.push({ paramName: c, isOptional: s != null }), s) {
201
- let u = f.charAt(d + l.length);
202
- return u && u !== "/" ? "/([^\\/]*)" : "(?:/([^\\/]*))?";
203
- }
204
- return "/([^\\/]+)";
205
- }
206
- ).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
207
- return e.endsWith("*") ? (n.push({ paramName: "*" }), a += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? a += "\\/*$" : e !== "" && e !== "/" && (a += "(?:(?=\\/|$))"), [new RegExp(a, t ? void 0 : "i"), n];
208
- }
209
- function He(e) {
210
- try {
211
- return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
212
- } catch (t) {
213
- return P(
214
- !1,
215
- `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
216
- ), e;
217
- }
218
- }
219
- function F(e, t) {
220
- if (t === "/") return e;
221
- if (!e.toLowerCase().startsWith(t.toLowerCase()))
222
- return null;
223
- let r = t.endsWith("/") ? t.length - 1 : t.length, n = e.charAt(r);
224
- return n && n !== "/" ? null : e.slice(r) || "/";
225
- }
226
- var je = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
227
- function ze(e, t = "/") {
228
- let {
229
- pathname: r,
230
- search: n = "",
231
- hash: a = ""
232
- } = typeof e == "string" ? Y(e) : e, o;
233
- return r ? (r = r.replace(/\/\/+/g, "/"), r.startsWith("/") ? o = ie(r.substring(1), "/") : o = ie(r, t)) : o = t, {
234
- pathname: o,
235
- search: Ke(n),
236
- hash: Ge(a)
237
- };
238
- }
239
- function ie(e, t) {
240
- let r = t.replace(/\/+$/, "").split("/");
241
- return e.split("/").forEach((a) => {
242
- a === ".." ? r.length > 1 && r.pop() : a !== "." && r.push(a);
243
- }), r.length > 1 ? r.join("/") : "/";
244
- }
245
- function J(e, t, r, n) {
246
- return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
247
- n
248
- )}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
249
- }
250
- function Ve(e) {
251
- return e.filter(
252
- (t, r) => r === 0 || t.route.path && t.route.path.length > 0
253
- );
254
- }
255
- function he(e) {
256
- let t = Ve(e);
257
- return t.map(
258
- (r, n) => n === t.length - 1 ? r.pathname : r.pathnameBase
259
- );
260
- }
261
- function X(e, t, r, n = !1) {
262
- let a;
263
- typeof e == "string" ? a = Y(e) : (a = { ...e }, w(
264
- !a.pathname || !a.pathname.includes("?"),
265
- J("?", "pathname", "search", a)
266
- ), w(
267
- !a.pathname || !a.pathname.includes("#"),
268
- J("#", "pathname", "hash", a)
269
- ), w(
270
- !a.search || !a.search.includes("#"),
271
- J("#", "search", "hash", a)
272
- ));
273
- let o = e === "" || a.pathname === "", l = o ? "/" : a.pathname, c;
274
- if (l == null)
275
- c = r;
276
- else {
277
- let u = t.length - 1;
278
- if (!n && l.startsWith("..")) {
279
- let h = l.split("/");
280
- for (; h[0] === ".."; )
281
- h.shift(), u -= 1;
282
- a.pathname = h.join("/");
283
- }
284
- c = u >= 0 ? t[u] : "/";
285
- }
286
- let s = ze(a, c), d = l && l !== "/" && l.endsWith("/"), f = (o || l === ".") && r.endsWith("/");
287
- return !s.pathname.endsWith("/") && (d || f) && (s.pathname += "/"), s;
288
- }
289
- var b = (e) => e.join("/").replace(/\/\/+/g, "/"), Je = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), Ke = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Ge = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, qe = class {
290
- constructor(e, t, r, n = !1) {
291
- this.status = e, this.statusText = t || "", this.internal = n, r instanceof Error ? (this.data = r.toString(), this.error = r) : this.data = r;
292
- }
293
- };
294
- function Ye(e) {
295
- return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
296
- }
297
- function Xe(e) {
298
- return e.map((t) => t.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/";
299
- }
300
- var me = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
301
- function pe(e, t) {
302
- let r = e;
303
- if (typeof r != "string" || !je.test(r))
304
- return {
305
- absoluteURL: void 0,
306
- isExternal: !1,
307
- to: r
308
- };
309
- let n = r, a = !1;
310
- if (me)
311
- try {
312
- let o = new URL(window.location.href), l = r.startsWith("//") ? new URL(o.protocol + r) : new URL(r), c = F(l.pathname, t);
313
- l.origin === o.origin && c != null ? r = c + l.search + l.hash : a = !0;
314
- } catch {
315
- P(
316
- !1,
317
- `<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
318
- );
319
- }
320
- return {
321
- absoluteURL: n,
322
- isExternal: a,
323
- to: r
324
- };
325
- }
326
- Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
327
- var ge = [
328
- "POST",
329
- "PUT",
330
- "PATCH",
331
- "DELETE"
332
- ];
333
- new Set(
334
- ge
335
- );
336
- var Qe = [
337
- "GET",
338
- ...ge
339
- ];
340
- new Set(Qe);
341
- var N = i.createContext(null);
342
- N.displayName = "DataRouter";
343
- var H = i.createContext(null);
344
- H.displayName = "DataRouterState";
345
- var Ze = i.createContext(!1), ye = i.createContext({
346
- isTransitioning: !1
347
- });
348
- ye.displayName = "ViewTransition";
349
- var et = i.createContext(
350
- /* @__PURE__ */ new Map()
351
- );
352
- et.displayName = "Fetchers";
353
- var tt = i.createContext(null);
354
- tt.displayName = "Await";
355
- var C = i.createContext(
356
- null
357
- );
358
- C.displayName = "Navigation";
359
- var Q = i.createContext(
360
- null
361
- );
362
- Q.displayName = "Location";
363
- var L = i.createContext({
364
- outlet: null,
365
- matches: [],
366
- isDataRoute: !1
367
- });
368
- L.displayName = "Route";
369
- var Z = i.createContext(null);
370
- Z.displayName = "RouteError";
371
- var ve = "REACT_ROUTER_ERROR", rt = "REDIRECT", nt = "ROUTE_ERROR_RESPONSE";
372
- function at(e) {
373
- if (e.startsWith(`${ve}:${rt}:{`))
374
- try {
375
- let t = JSON.parse(e.slice(28));
376
- if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean")
377
- return t;
378
- } catch {
379
- }
380
- }
381
- function ot(e) {
382
- if (e.startsWith(
383
- `${ve}:${nt}:{`
384
- ))
385
- try {
386
- let t = JSON.parse(e.slice(40));
387
- if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string")
388
- return new qe(
389
- t.status,
390
- t.statusText,
391
- t.data
392
- );
393
- } catch {
394
- }
395
- }
396
- function lt(e, { relative: t } = {}) {
397
- w(
398
- j(),
399
- // TODO: This error is probably because they somehow have 2 versions of the
400
- // router loaded. We can help them understand how to avoid that.
401
- "useHref() may be used only in the context of a <Router> component."
402
- );
403
- let { basename: r, navigator: n } = i.useContext(C), { hash: a, pathname: o, search: l } = _(e, { relative: t }), c = o;
404
- return r !== "/" && (c = o === "/" ? r : b([r, o])), n.createHref({ pathname: c, search: l, hash: a });
405
- }
406
- function j() {
407
- return i.useContext(Q) != null;
408
- }
409
- function $() {
410
- return w(
411
- j(),
412
- // TODO: This error is probably because they somehow have 2 versions of the
413
- // router loaded. We can help them understand how to avoid that.
414
- "useLocation() may be used only in the context of a <Router> component."
415
- ), i.useContext(Q).location;
416
- }
417
- var Re = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
418
- function Ee(e) {
419
- i.useContext(C).static || i.useLayoutEffect(e);
420
- }
421
- function it() {
422
- let { isDataRoute: e } = i.useContext(L);
423
- return e ? Et() : ut();
424
- }
425
- function ut() {
426
- w(
427
- j(),
428
- // TODO: This error is probably because they somehow have 2 versions of the
429
- // router loaded. We can help them understand how to avoid that.
430
- "useNavigate() may be used only in the context of a <Router> component."
431
- );
432
- let e = i.useContext(N), { basename: t, navigator: r } = i.useContext(C), { matches: n } = i.useContext(L), { pathname: a } = $(), o = JSON.stringify(he(n)), l = i.useRef(!1);
433
- return Ee(() => {
434
- l.current = !0;
435
- }), i.useCallback(
436
- (s, d = {}) => {
437
- if (P(l.current, Re), !l.current) return;
438
- if (typeof s == "number") {
439
- r.go(s);
440
- return;
441
- }
442
- let f = X(
443
- s,
444
- JSON.parse(o),
445
- a,
446
- d.relative === "path"
447
- );
448
- e == null && t !== "/" && (f.pathname = f.pathname === "/" ? t : b([t, f.pathname])), (d.replace ? r.replace : r.push)(
449
- f,
450
- d.state,
451
- d
452
- );
453
- },
454
- [
455
- t,
456
- r,
457
- o,
458
- a,
459
- e
460
- ]
461
- );
462
- }
463
- i.createContext(null);
464
- function _(e, { relative: t } = {}) {
465
- let { matches: r } = i.useContext(L), { pathname: n } = $(), a = JSON.stringify(he(r));
466
- return i.useMemo(
467
- () => X(
468
- e,
469
- JSON.parse(a),
470
- n,
471
- t === "path"
472
- ),
473
- [e, a, n, t]
474
- );
475
- }
476
- function st(e, t, r) {
477
- w(
478
- j(),
479
- // TODO: This error is probably because they somehow have 2 versions of the
480
- // router loaded. We can help them understand how to avoid that.
481
- "useRoutes() may be used only in the context of a <Router> component."
482
- );
483
- let { navigator: n } = i.useContext(C), { matches: a } = i.useContext(L), o = a[a.length - 1], l = o ? o.params : {}, c = o ? o.pathname : "/", s = o ? o.pathnameBase : "/", d = o && o.route;
484
- {
485
- let m = d && d.path || "";
486
- xe(
487
- c,
488
- !d || m.endsWith("*") || m.endsWith("*?"),
489
- `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${m}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
490
-
491
- Please change the parent <Route path="${m}"> to <Route path="${m === "/" ? "*" : `${m}/*`}">.`
492
- );
493
- }
494
- let f = $(), u;
495
- u = f;
496
- let h = u.pathname || "/", g = h;
497
- if (s !== "/") {
498
- let m = s.replace(/^\//, "").split("/");
499
- g = "/" + h.replace(/^\//, "").split("/").slice(m.length).join("/");
500
- }
501
- let p = ce(e, { pathname: g });
502
- return P(
503
- d || p != null,
504
- `No routes matched location "${u.pathname}${u.search}${u.hash}" `
505
- ), P(
506
- p == null || p[p.length - 1].route.element !== void 0 || p[p.length - 1].route.Component !== void 0 || p[p.length - 1].route.lazy !== void 0,
507
- `Matched leaf route at location "${u.pathname}${u.search}${u.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
508
- ), mt(
509
- p && p.map(
510
- (m) => Object.assign({}, m, {
511
- params: Object.assign({}, l, m.params),
512
- pathname: b([
513
- s,
514
- // Re-encode pathnames that were decoded inside matchRoutes.
515
- // Pre-encode `?` and `#` ahead of `encodeLocation` because it uses
516
- // `new URL()` internally and we need to prevent it from treating
517
- // them as separators
518
- n.encodeLocation ? n.encodeLocation(
519
- m.pathname.replace(/\?/g, "%3F").replace(/#/g, "%23")
520
- ).pathname : m.pathname
521
- ]),
522
- pathnameBase: m.pathnameBase === "/" ? s : b([
523
- s,
524
- // Re-encode pathnames that were decoded inside matchRoutes
525
- // Pre-encode `?` and `#` ahead of `encodeLocation` because it uses
526
- // `new URL()` internally and we need to prevent it from treating
527
- // them as separators
528
- n.encodeLocation ? n.encodeLocation(
529
- m.pathnameBase.replace(/\?/g, "%3F").replace(/#/g, "%23")
530
- ).pathname : m.pathnameBase
531
- ])
532
- })
533
- ),
534
- a,
535
- r
536
- );
537
- }
538
- function ct() {
539
- let e = Rt(), t = Ye(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, n = "rgba(200,200,200, 0.5)", a = { padding: "0.5rem", backgroundColor: n }, o = { padding: "2px 4px", backgroundColor: n }, l = null;
540
- return console.error(
541
- "Error handled by React Router default ErrorBoundary:",
542
- e
543
- ), l = /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ i.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ i.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ i.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ i.createElement("h3", { style: { fontStyle: "italic" } }, t), r ? /* @__PURE__ */ i.createElement("pre", { style: a }, r) : null, l);
544
- }
545
- var ft = /* @__PURE__ */ i.createElement(ct, null), we = class extends i.Component {
546
- constructor(e) {
547
- super(e), this.state = {
548
- location: e.location,
549
- revalidation: e.revalidation,
550
- error: e.error
551
- };
552
- }
553
- static getDerivedStateFromError(e) {
554
- return { error: e };
555
- }
556
- static getDerivedStateFromProps(e, t) {
557
- return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
558
- error: e.error,
559
- location: e.location,
560
- revalidation: e.revalidation
561
- } : {
562
- error: e.error !== void 0 ? e.error : t.error,
563
- location: t.location,
564
- revalidation: e.revalidation || t.revalidation
565
- };
566
- }
567
- componentDidCatch(e, t) {
568
- this.props.onError ? this.props.onError(e, t) : console.error(
569
- "React Router caught the following error during render",
570
- e
571
- );
572
- }
573
- render() {
574
- let e = this.state.error;
575
- if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
576
- const r = ot(e.digest);
577
- r && (e = r);
578
- }
579
- let t = e !== void 0 ? /* @__PURE__ */ i.createElement(L.Provider, { value: this.props.routeContext }, /* @__PURE__ */ i.createElement(
580
- Z.Provider,
581
- {
582
- value: e,
583
- children: this.props.component
584
- }
585
- )) : this.props.children;
586
- return this.context ? /* @__PURE__ */ i.createElement(dt, { error: e }, t) : t;
587
- }
588
- };
589
- we.contextType = Ze;
590
- var K = /* @__PURE__ */ new WeakMap();
591
- function dt({
592
- children: e,
593
- error: t
594
- }) {
595
- let { basename: r } = i.useContext(C);
596
- if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
597
- let n = at(t.digest);
598
- if (n) {
599
- let a = K.get(t);
600
- if (a) throw a;
601
- let o = pe(n.location, r);
602
- if (me && !K.get(t))
603
- if (o.isExternal || n.reloadDocument)
604
- window.location.href = o.absoluteURL || o.to;
605
- else {
606
- const l = Promise.resolve().then(
607
- () => window.__reactRouterDataRouter.navigate(o.to, {
608
- replace: n.replace
609
- })
610
- );
611
- throw K.set(t, l), l;
612
- }
613
- return /* @__PURE__ */ i.createElement(
614
- "meta",
615
- {
616
- httpEquiv: "refresh",
617
- content: `0;url=${o.absoluteURL || o.to}`
618
- }
619
- );
620
- }
621
- }
622
- return e;
623
- }
624
- function ht({ routeContext: e, match: t, children: r }) {
625
- let n = i.useContext(N);
626
- return n && n.static && n.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (n.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ i.createElement(L.Provider, { value: e }, r);
627
- }
628
- function mt(e, t = [], r) {
629
- let n = r?.state;
630
- if (e == null) {
631
- if (!n)
632
- return null;
633
- if (n.errors)
634
- e = n.matches;
635
- else if (t.length === 0 && !n.initialized && n.matches.length > 0)
636
- e = n.matches;
637
- else
638
- return null;
639
- }
640
- let a = e, o = n?.errors;
641
- if (o != null) {
642
- let f = a.findIndex(
643
- (u) => u.route.id && o?.[u.route.id] !== void 0
644
- );
645
- w(
646
- f >= 0,
647
- `Could not find a matching route for errors on route IDs: ${Object.keys(
648
- o
649
- ).join(",")}`
650
- ), a = a.slice(
651
- 0,
652
- Math.min(a.length, f + 1)
653
- );
654
- }
655
- let l = !1, c = -1;
656
- if (r && n) {
657
- l = n.renderFallback;
658
- for (let f = 0; f < a.length; f++) {
659
- let u = a[f];
660
- if ((u.route.HydrateFallback || u.route.hydrateFallbackElement) && (c = f), u.route.id) {
661
- let { loaderData: h, errors: g } = n, p = u.route.loader && !h.hasOwnProperty(u.route.id) && (!g || g[u.route.id] === void 0);
662
- if (u.route.lazy || p) {
663
- r.isStatic && (l = !0), c >= 0 ? a = a.slice(0, c + 1) : a = [a[0]];
664
- break;
665
- }
666
- }
667
- }
668
- }
669
- let s = r?.onError, d = n && s ? (f, u) => {
670
- s(f, {
671
- location: n.location,
672
- params: n.matches?.[0]?.params ?? {},
673
- unstable_pattern: Xe(n.matches),
674
- errorInfo: u
675
- });
676
- } : void 0;
677
- return a.reduceRight(
678
- (f, u, h) => {
679
- let g, p = !1, y = null, m = null;
680
- n && (g = o && u.route.id ? o[u.route.id] : void 0, y = u.route.errorElement || ft, l && (c < 0 && h === 0 ? (xe(
681
- "route-fallback",
682
- !1,
683
- "No `HydrateFallback` element provided to render during initial hydration"
684
- ), p = !0, m = null) : c === h && (p = !0, m = u.route.hydrateFallbackElement || null)));
685
- let R = t.concat(a.slice(0, h + 1)), E = () => {
686
- let v;
687
- return g ? v = y : p ? v = m : u.route.Component ? v = /* @__PURE__ */ i.createElement(u.route.Component, null) : u.route.element ? v = u.route.element : v = f, /* @__PURE__ */ i.createElement(
688
- ht,
689
- {
690
- match: u,
691
- routeContext: {
692
- outlet: f,
693
- matches: R,
694
- isDataRoute: n != null
695
- },
696
- children: v
697
- }
698
- );
699
- };
700
- return n && (u.route.ErrorBoundary || u.route.errorElement || h === 0) ? /* @__PURE__ */ i.createElement(
701
- we,
702
- {
703
- location: n.location,
704
- revalidation: n.revalidation,
705
- component: y,
706
- error: g,
707
- children: E(),
708
- routeContext: { outlet: null, matches: R, isDataRoute: !0 },
709
- onError: d
710
- }
711
- ) : E();
712
- },
713
- null
714
- );
715
- }
716
- function ee(e) {
717
- return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
718
- }
719
- function pt(e) {
720
- let t = i.useContext(N);
721
- return w(t, ee(e)), t;
722
- }
723
- function gt(e) {
724
- let t = i.useContext(H);
725
- return w(t, ee(e)), t;
726
- }
727
- function yt(e) {
728
- let t = i.useContext(L);
729
- return w(t, ee(e)), t;
730
- }
731
- function te(e) {
732
- let t = yt(e), r = t.matches[t.matches.length - 1];
733
- return w(
734
- r.route.id,
735
- `${e} can only be used on routes that contain a unique "id"`
736
- ), r.route.id;
737
- }
738
- function vt() {
739
- return te(
740
- "useRouteId"
741
- /* UseRouteId */
742
- );
743
- }
744
- function Rt() {
745
- let e = i.useContext(Z), t = gt(
746
- "useRouteError"
747
- /* UseRouteError */
748
- ), r = te(
749
- "useRouteError"
750
- /* UseRouteError */
751
- );
752
- return e !== void 0 ? e : t.errors?.[r];
753
- }
754
- function Et() {
755
- let { router: e } = pt(
756
- "useNavigate"
757
- /* UseNavigateStable */
758
- ), t = te(
759
- "useNavigate"
760
- /* UseNavigateStable */
761
- ), r = i.useRef(!1);
762
- return Ee(() => {
763
- r.current = !0;
764
- }), i.useCallback(
765
- async (a, o = {}) => {
766
- P(r.current, Re), r.current && (typeof a == "number" ? await e.navigate(a) : await e.navigate(a, { fromRouteId: t, ...o }));
767
- },
768
- [e, t]
769
- );
770
- }
771
- var ue = {};
772
- function xe(e, t, r) {
773
- !t && !ue[e] && (ue[e] = !0, P(!1, r));
774
- }
775
- i.memo(wt);
776
- function wt({
777
- routes: e,
778
- future: t,
779
- state: r,
780
- isStatic: n,
781
- onError: a
782
- }) {
783
- return st(e, void 0, { state: r, isStatic: n, onError: a });
784
- }
785
- var B = "get", U = "application/x-www-form-urlencoded";
786
- function z(e) {
787
- return typeof HTMLElement < "u" && e instanceof HTMLElement;
788
- }
789
- function xt(e) {
790
- return z(e) && e.tagName.toLowerCase() === "button";
791
- }
792
- function Ct(e) {
793
- return z(e) && e.tagName.toLowerCase() === "form";
794
- }
795
- function bt(e) {
796
- return z(e) && e.tagName.toLowerCase() === "input";
797
- }
798
- function St(e) {
799
- return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
800
- }
801
- function Pt(e, t) {
802
- return e.button === 0 && // Ignore everything but left clicks
803
- (!t || t === "_self") && // Let browser handle "target=_blank" etc.
804
- !St(e);
805
- }
806
- var A = null;
807
- function Lt() {
808
- if (A === null)
809
- try {
810
- new FormData(
811
- document.createElement("form"),
812
- // @ts-expect-error if FormData supports the submitter parameter, this will throw
813
- 0
814
- ), A = !1;
815
- } catch {
816
- A = !0;
817
- }
818
- return A;
819
- }
820
- var $t = /* @__PURE__ */ new Set([
821
- "application/x-www-form-urlencoded",
822
- "multipart/form-data",
823
- "text/plain"
824
- ]);
825
- function G(e) {
826
- return e != null && !$t.has(e) ? (P(
827
- !1,
828
- `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${U}"`
829
- ), null) : e;
830
- }
831
- function kt(e, t) {
832
- let r, n, a, o, l;
833
- if (Ct(e)) {
834
- let c = e.getAttribute("action");
835
- n = c ? F(c, t) : null, r = e.getAttribute("method") || B, a = G(e.getAttribute("enctype")) || U, o = new FormData(e);
836
- } else if (xt(e) || bt(e) && (e.type === "submit" || e.type === "image")) {
837
- let c = e.form;
838
- if (c == null)
839
- throw new Error(
840
- 'Cannot submit a <button> or <input type="submit"> without a <form>'
841
- );
842
- let s = e.getAttribute("formaction") || c.getAttribute("action");
843
- if (n = s ? F(s, t) : null, r = e.getAttribute("formmethod") || c.getAttribute("method") || B, a = G(e.getAttribute("formenctype")) || G(c.getAttribute("enctype")) || U, o = new FormData(c, e), !Lt()) {
844
- let { name: d, type: f, value: u } = e;
845
- if (f === "image") {
846
- let h = d ? `${d}.` : "";
847
- o.append(`${h}x`, "0"), o.append(`${h}y`, "0");
848
- } else d && o.append(d, u);
849
- }
850
- } else {
851
- if (z(e))
852
- throw new Error(
853
- 'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
854
- );
855
- r = B, n = null, a = U, l = e;
856
- }
857
- return o && a === "text/plain" && (l = o, o = void 0), { action: n, method: r.toLowerCase(), encType: a, formData: o, body: l };
858
- }
859
- Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
860
- function re(e, t) {
861
- if (e === !1 || e === null || typeof e > "u")
862
- throw new Error(t);
863
- }
864
- function Tt(e, t, r, n) {
865
- let a = typeof e == "string" ? new URL(
866
- e,
867
- // This can be called during the SSR flow via PrefetchPageLinksImpl so
868
- // don't assume window is available
869
- typeof window > "u" ? "server://singlefetch/" : window.location.origin
870
- ) : e;
871
- return r ? a.pathname.endsWith("/") ? a.pathname = `${a.pathname}_.${n}` : a.pathname = `${a.pathname}.${n}` : a.pathname === "/" ? a.pathname = `_root.${n}` : t && F(a.pathname, t) === "/" ? a.pathname = `${t.replace(/\/$/, "")}/_root.${n}` : a.pathname = `${a.pathname.replace(/\/$/, "")}.${n}`, a;
872
- }
873
- async function Dt(e, t) {
874
- if (e.id in t)
875
- return t[e.id];
876
- try {
877
- let r = await import(
878
- /* @vite-ignore */
879
- /* webpackIgnore: true */
880
- e.module
881
- );
882
- return t[e.id] = r, r;
883
- } catch (r) {
884
- return console.error(
885
- `Error loading route module \`${e.module}\`, reloading page...`
886
- ), console.error(r), window.location.reload(), new Promise(() => {
887
- });
888
- }
889
- }
890
- function Ft(e) {
891
- return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
892
- }
893
- async function It(e, t, r) {
894
- let n = await Promise.all(
895
- e.map(async (a) => {
896
- let o = t.routes[a.route.id];
897
- if (o) {
898
- let l = await Dt(o, r);
899
- return l.links ? l.links() : [];
900
- }
901
- return [];
902
- })
903
- );
904
- return _t(
905
- n.flat(1).filter(Ft).filter((a) => a.rel === "stylesheet" || a.rel === "preload").map(
906
- (a) => a.rel === "stylesheet" ? { ...a, rel: "prefetch", as: "style" } : { ...a, rel: "prefetch" }
907
- )
908
- );
909
- }
910
- function se(e, t, r, n, a, o) {
911
- let l = (s, d) => r[d] ? s.route.id !== r[d].route.id : !0, c = (s, d) => (
912
- // param change, /users/123 -> /users/456
913
- r[d].pathname !== s.pathname || // splat param changed, which is not present in match.path
914
- // e.g. /files/images/avatar.jpg -> files/finances.xls
915
- r[d].route.path?.endsWith("*") && r[d].params["*"] !== s.params["*"]
916
- );
917
- return o === "assets" ? t.filter(
918
- (s, d) => l(s, d) || c(s, d)
919
- ) : o === "data" ? t.filter((s, d) => {
920
- let f = n.routes[s.route.id];
921
- if (!f || !f.hasLoader)
922
- return !1;
923
- if (l(s, d) || c(s, d))
924
- return !0;
925
- if (s.route.shouldRevalidate) {
926
- let u = s.route.shouldRevalidate({
927
- currentUrl: new URL(
928
- a.pathname + a.search + a.hash,
929
- window.origin
930
- ),
931
- currentParams: r[0]?.params || {},
932
- nextUrl: new URL(e, window.origin),
933
- nextParams: s.params,
934
- defaultShouldRevalidate: !0
935
- });
936
- if (typeof u == "boolean")
937
- return u;
938
- }
939
- return !0;
940
- }) : [];
941
- }
942
- function Nt(e, t, { includeHydrateFallback: r } = {}) {
943
- return Ot(
944
- e.map((n) => {
945
- let a = t.routes[n.route.id];
946
- if (!a) return [];
947
- let o = [a.module];
948
- return a.clientActionModule && (o = o.concat(a.clientActionModule)), a.clientLoaderModule && (o = o.concat(a.clientLoaderModule)), r && a.hydrateFallbackModule && (o = o.concat(a.hydrateFallbackModule)), a.imports && (o = o.concat(a.imports)), o;
949
- }).flat(1)
950
- );
951
- }
952
- function Ot(e) {
953
- return [...new Set(e)];
954
- }
955
- function Mt(e) {
956
- let t = {}, r = Object.keys(e).sort();
957
- for (let n of r)
958
- t[n] = e[n];
959
- return t;
960
- }
961
- function _t(e, t) {
962
- let r = /* @__PURE__ */ new Set();
963
- return new Set(t), e.reduce((n, a) => {
964
- let o = JSON.stringify(Mt(a));
965
- return r.has(o) || (r.add(o), n.push({ key: o, link: a })), n;
966
- }, []);
967
- }
968
- function Ce() {
969
- let e = i.useContext(N);
970
- return re(
971
- e,
972
- "You must render this element inside a <DataRouterContext.Provider> element"
973
- ), e;
974
- }
975
- function At() {
976
- let e = i.useContext(H);
977
- return re(
978
- e,
979
- "You must render this element inside a <DataRouterStateContext.Provider> element"
980
- ), e;
981
- }
982
- var ne = i.createContext(void 0);
983
- ne.displayName = "FrameworkContext";
984
- function be() {
985
- let e = i.useContext(ne);
986
- return re(
987
- e,
988
- "You must render this element inside a <HydratedRouter> element"
989
- ), e;
990
- }
991
- function Bt(e, t) {
992
- let r = i.useContext(ne), [n, a] = i.useState(!1), [o, l] = i.useState(!1), { onFocus: c, onBlur: s, onMouseEnter: d, onMouseLeave: f, onTouchStart: u } = t, h = i.useRef(null);
993
- i.useEffect(() => {
994
- if (e === "render" && l(!0), e === "viewport") {
995
- let y = (R) => {
996
- R.forEach((E) => {
997
- l(E.isIntersecting);
998
- });
999
- }, m = new IntersectionObserver(y, { threshold: 0.5 });
1000
- return h.current && m.observe(h.current), () => {
1001
- m.disconnect();
1002
- };
1003
- }
1004
- }, [e]), i.useEffect(() => {
1005
- if (n) {
1006
- let y = setTimeout(() => {
1007
- l(!0);
1008
- }, 100);
1009
- return () => {
1010
- clearTimeout(y);
1011
- };
1012
- }
1013
- }, [n]);
1014
- let g = () => {
1015
- a(!0);
1016
- }, p = () => {
1017
- a(!1), l(!1);
1018
- };
1019
- return r ? e !== "intent" ? [o, h, {}] : [
1020
- o,
1021
- h,
1022
- {
1023
- onFocus: M(c, g),
1024
- onBlur: M(s, p),
1025
- onMouseEnter: M(d, g),
1026
- onMouseLeave: M(f, p),
1027
- onTouchStart: M(u, g)
1028
- }
1029
- ] : [!1, h, {}];
1030
- }
1031
- function M(e, t) {
1032
- return (r) => {
1033
- e && e(r), r.defaultPrevented || t(r);
1034
- };
1035
- }
1036
- function Ut({ page: e, ...t }) {
1037
- let { router: r } = Ce(), n = i.useMemo(
1038
- () => ce(r.routes, e, r.basename),
1039
- [r.routes, e, r.basename]
1040
- );
1041
- return n ? /* @__PURE__ */ i.createElement(Ht, { page: e, matches: n, ...t }) : null;
1042
- }
1043
- function Wt(e) {
1044
- let { manifest: t, routeModules: r } = be(), [n, a] = i.useState([]);
1045
- return i.useEffect(() => {
1046
- let o = !1;
1047
- return It(e, t, r).then(
1048
- (l) => {
1049
- o || a(l);
1050
- }
1051
- ), () => {
1052
- o = !0;
1053
- };
1054
- }, [e, t, r]), n;
1055
- }
1056
- function Ht({
1057
- page: e,
1058
- matches: t,
1059
- ...r
1060
- }) {
1061
- let n = $(), { future: a, manifest: o, routeModules: l } = be(), { basename: c } = Ce(), { loaderData: s, matches: d } = At(), f = i.useMemo(
1062
- () => se(
1063
- e,
1064
- t,
1065
- d,
1066
- o,
1067
- n,
1068
- "data"
1069
- ),
1070
- [e, t, d, o, n]
1071
- ), u = i.useMemo(
1072
- () => se(
1073
- e,
1074
- t,
1075
- d,
1076
- o,
1077
- n,
1078
- "assets"
1079
- ),
1080
- [e, t, d, o, n]
1081
- ), h = i.useMemo(() => {
1082
- if (e === n.pathname + n.search + n.hash)
1083
- return [];
1084
- let y = /* @__PURE__ */ new Set(), m = !1;
1085
- if (t.forEach((E) => {
1086
- let v = o.routes[E.route.id];
1087
- !v || !v.hasLoader || (!f.some((S) => S.route.id === E.route.id) && E.route.id in s && l[E.route.id]?.shouldRevalidate || v.hasClientLoader ? m = !0 : y.add(E.route.id));
1088
- }), y.size === 0)
1089
- return [];
1090
- let R = Tt(
1091
- e,
1092
- c,
1093
- a.unstable_trailingSlashAwareDataRequests,
1094
- "data"
1095
- );
1096
- return m && y.size > 0 && R.searchParams.set(
1097
- "_routes",
1098
- t.filter((E) => y.has(E.route.id)).map((E) => E.route.id).join(",")
1099
- ), [R.pathname + R.search];
1100
- }, [
1101
- c,
1102
- a.unstable_trailingSlashAwareDataRequests,
1103
- s,
1104
- n,
1105
- o,
1106
- f,
1107
- t,
1108
- e,
1109
- l
1110
- ]), g = i.useMemo(
1111
- () => Nt(u, o),
1112
- [u, o]
1113
- ), p = Wt(u);
1114
- return /* @__PURE__ */ i.createElement(i.Fragment, null, h.map((y) => /* @__PURE__ */ i.createElement("link", { key: y, rel: "prefetch", as: "fetch", href: y, ...r })), g.map((y) => /* @__PURE__ */ i.createElement("link", { key: y, rel: "modulepreload", href: y, ...r })), p.map(({ key: y, link: m }) => (
1115
- // these don't spread `linkProps` because they are full link descriptors
1116
- // already with their own props
1117
- /* @__PURE__ */ i.createElement(
1118
- "link",
1119
- {
1120
- key: y,
1121
- nonce: r.nonce,
1122
- ...m,
1123
- crossOrigin: m.crossOrigin ?? r.crossOrigin
1124
- }
1125
- )
1126
- )));
1127
- }
1128
- function jt(...e) {
1129
- return (t) => {
1130
- e.forEach((r) => {
1131
- typeof r == "function" ? r(t) : r != null && (r.current = t);
1132
- });
1133
- };
1134
- }
1135
- var zt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
1136
- try {
1137
- zt && (window.__reactRouterVersion = // @ts-expect-error
1138
- "7.13.1");
1139
- } catch {
1140
- }
1141
- var Se = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Pe = i.forwardRef(
1142
- function({
1143
- onClick: t,
1144
- discover: r = "render",
1145
- prefetch: n = "none",
1146
- relative: a,
1147
- reloadDocument: o,
1148
- replace: l,
1149
- unstable_mask: c,
1150
- state: s,
1151
- target: d,
1152
- to: f,
1153
- preventScrollReset: u,
1154
- viewTransition: h,
1155
- unstable_defaultShouldRevalidate: g,
1156
- ...p
1157
- }, y) {
1158
- let { basename: m, navigator: R, unstable_useTransitions: E } = i.useContext(C), v = typeof f == "string" && Se.test(f), S = pe(f, m);
1159
- f = S.to;
1160
- let x = lt(f, { relative: a }), k = $(), T = null;
1161
- if (c) {
1162
- let D = X(
1163
- c,
1164
- [],
1165
- k.unstable_mask ? k.unstable_mask.pathname : "/",
1166
- !0
1167
- );
1168
- m !== "/" && (D.pathname = D.pathname === "/" ? m : b([m, D.pathname])), T = R.createHref(D);
1169
- }
1170
- let [I, O, V] = Bt(
1171
- n,
1172
- p
1173
- ), $e = Gt(f, {
1174
- replace: l,
1175
- unstable_mask: c,
1176
- state: s,
1177
- target: d,
1178
- preventScrollReset: u,
1179
- relative: a,
1180
- viewTransition: h,
1181
- unstable_defaultShouldRevalidate: g,
1182
- unstable_useTransitions: E
1183
- });
1184
- function ke(D) {
1185
- t && t(D), D.defaultPrevented || $e(D);
1186
- }
1187
- let ae = !(S.isExternal || o), oe = (
1188
- // eslint-disable-next-line jsx-a11y/anchor-has-content
1189
- /* @__PURE__ */ i.createElement(
1190
- "a",
1191
- {
1192
- ...p,
1193
- ...V,
1194
- href: (ae ? T : void 0) || S.absoluteURL || x,
1195
- onClick: ae ? ke : t,
1196
- ref: jt(y, O),
1197
- target: d,
1198
- "data-discover": !v && r === "render" ? "true" : void 0
1199
- }
1200
- )
1201
- );
1202
- return I && !v ? /* @__PURE__ */ i.createElement(i.Fragment, null, oe, /* @__PURE__ */ i.createElement(Ut, { page: x })) : oe;
1203
- }
1204
- );
1205
- Pe.displayName = "Link";
1206
- var Vt = i.forwardRef(
1207
- function({
1208
- "aria-current": t = "page",
1209
- caseSensitive: r = !1,
1210
- className: n = "",
1211
- end: a = !1,
1212
- style: o,
1213
- to: l,
1214
- viewTransition: c,
1215
- children: s,
1216
- ...d
1217
- }, f) {
1218
- let u = _(l, { relative: d.relative }), h = $(), g = i.useContext(H), { navigator: p, basename: y } = i.useContext(C), m = g != null && // Conditional usage is OK here because the usage of a data router is static
1219
- // eslint-disable-next-line react-hooks/rules-of-hooks
1220
- Zt(u) && c === !0, R = p.encodeLocation ? p.encodeLocation(u).pathname : u.pathname, E = h.pathname, v = g && g.navigation && g.navigation.location ? g.navigation.location.pathname : null;
1221
- r || (E = E.toLowerCase(), v = v ? v.toLowerCase() : null, R = R.toLowerCase()), v && y && (v = F(v, y) || v);
1222
- const S = R !== "/" && R.endsWith("/") ? R.length - 1 : R.length;
1223
- let x = E === R || !a && E.startsWith(R) && E.charAt(S) === "/", k = v != null && (v === R || !a && v.startsWith(R) && v.charAt(R.length) === "/"), T = {
1224
- isActive: x,
1225
- isPending: k,
1226
- isTransitioning: m
1227
- }, I = x ? t : void 0, O;
1228
- typeof n == "function" ? O = n(T) : O = [
1229
- n,
1230
- x ? "active" : null,
1231
- k ? "pending" : null,
1232
- m ? "transitioning" : null
1233
- ].filter(Boolean).join(" ");
1234
- let V = typeof o == "function" ? o(T) : o;
1235
- return /* @__PURE__ */ i.createElement(
1236
- Pe,
1237
- {
1238
- ...d,
1239
- "aria-current": I,
1240
- className: O,
1241
- ref: f,
1242
- style: V,
1243
- to: l,
1244
- viewTransition: c
1245
- },
1246
- typeof s == "function" ? s(T) : s
1247
- );
1248
- }
1249
- );
1250
- Vt.displayName = "NavLink";
1251
- var Jt = i.forwardRef(
1252
- ({
1253
- discover: e = "render",
1254
- fetcherKey: t,
1255
- navigate: r,
1256
- reloadDocument: n,
1257
- replace: a,
1258
- state: o,
1259
- method: l = B,
1260
- action: c,
1261
- onSubmit: s,
1262
- relative: d,
1263
- preventScrollReset: f,
1264
- viewTransition: u,
1265
- unstable_defaultShouldRevalidate: h,
1266
- ...g
1267
- }, p) => {
1268
- let { unstable_useTransitions: y } = i.useContext(C), m = Xt(), R = Qt(c, { relative: d }), E = l.toLowerCase() === "get" ? "get" : "post", v = typeof c == "string" && Se.test(c), S = (x) => {
1269
- if (s && s(x), x.defaultPrevented) return;
1270
- x.preventDefault();
1271
- let k = x.nativeEvent.submitter, T = k?.getAttribute("formmethod") || l, I = () => m(k || x.currentTarget, {
1272
- fetcherKey: t,
1273
- method: T,
1274
- navigate: r,
1275
- replace: a,
1276
- state: o,
1277
- relative: d,
1278
- preventScrollReset: f,
1279
- viewTransition: u,
1280
- unstable_defaultShouldRevalidate: h
1281
- });
1282
- y && r !== !1 ? i.startTransition(() => I()) : I();
1283
- };
1284
- return /* @__PURE__ */ i.createElement(
1285
- "form",
1286
- {
1287
- ref: p,
1288
- method: E,
1289
- action: R,
1290
- onSubmit: n ? s : S,
1291
- ...g,
1292
- "data-discover": !v && e === "render" ? "true" : void 0
1293
- }
1294
- );
1295
- }
1296
- );
1297
- Jt.displayName = "Form";
1298
- function Kt(e) {
1299
- return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1300
- }
1301
- function Le(e) {
1302
- let t = i.useContext(N);
1303
- return w(t, Kt(e)), t;
1304
- }
1305
- function Gt(e, {
1306
- target: t,
1307
- replace: r,
1308
- unstable_mask: n,
1309
- state: a,
1310
- preventScrollReset: o,
1311
- relative: l,
1312
- viewTransition: c,
1313
- unstable_defaultShouldRevalidate: s,
1314
- unstable_useTransitions: d
1315
- } = {}) {
1316
- let f = it(), u = $(), h = _(e, { relative: l });
1317
- return i.useCallback(
1318
- (g) => {
1319
- if (Pt(g, t)) {
1320
- g.preventDefault();
1321
- let p = r !== void 0 ? r : q(u) === q(h), y = () => f(e, {
1322
- replace: p,
1323
- unstable_mask: n,
1324
- state: a,
1325
- preventScrollReset: o,
1326
- relative: l,
1327
- viewTransition: c,
1328
- unstable_defaultShouldRevalidate: s
1329
- });
1330
- d ? i.startTransition(() => y()) : y();
1331
- }
1332
- },
1333
- [
1334
- u,
1335
- f,
1336
- h,
1337
- r,
1338
- n,
1339
- a,
1340
- t,
1341
- e,
1342
- o,
1343
- l,
1344
- c,
1345
- s,
1346
- d
1347
- ]
1348
- );
1349
- }
1350
- var qt = 0, Yt = () => `__${String(++qt)}__`;
1351
- function Xt() {
1352
- let { router: e } = Le(
1353
- "useSubmit"
1354
- /* UseSubmit */
1355
- ), { basename: t } = i.useContext(C), r = vt(), n = e.fetch, a = e.navigate;
1356
- return i.useCallback(
1357
- async (o, l = {}) => {
1358
- let { action: c, method: s, encType: d, formData: f, body: u } = kt(
1359
- o,
1360
- t
1361
- );
1362
- if (l.navigate === !1) {
1363
- let h = l.fetcherKey || Yt();
1364
- await n(h, r, l.action || c, {
1365
- unstable_defaultShouldRevalidate: l.unstable_defaultShouldRevalidate,
1366
- preventScrollReset: l.preventScrollReset,
1367
- formData: f,
1368
- body: u,
1369
- formMethod: l.method || s,
1370
- formEncType: l.encType || d,
1371
- flushSync: l.flushSync
1372
- });
1373
- } else
1374
- await a(l.action || c, {
1375
- unstable_defaultShouldRevalidate: l.unstable_defaultShouldRevalidate,
1376
- preventScrollReset: l.preventScrollReset,
1377
- formData: f,
1378
- body: u,
1379
- formMethod: l.method || s,
1380
- formEncType: l.encType || d,
1381
- replace: l.replace,
1382
- state: l.state,
1383
- fromRouteId: r,
1384
- flushSync: l.flushSync,
1385
- viewTransition: l.viewTransition
1386
- });
1387
- },
1388
- [n, a, t, r]
1389
- );
1390
- }
1391
- function Qt(e, { relative: t } = {}) {
1392
- let { basename: r } = i.useContext(C), n = i.useContext(L);
1393
- w(n, "useFormAction must be used inside a RouteContext");
1394
- let [a] = n.matches.slice(-1), o = { ..._(e || ".", { relative: t }) }, l = $();
1395
- if (e == null) {
1396
- o.search = l.search;
1397
- let c = new URLSearchParams(o.search), s = c.getAll("index");
1398
- if (s.some((f) => f === "")) {
1399
- c.delete("index"), s.filter((u) => u).forEach((u) => c.append("index", u));
1400
- let f = c.toString();
1401
- o.search = f ? `?${f}` : "";
1402
- }
1403
- }
1404
- return (!e || e === ".") && a.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (o.pathname = o.pathname === "/" ? r : b([r, o.pathname])), q(o);
1405
- }
1406
- function Zt(e, { relative: t } = {}) {
1407
- let r = i.useContext(ye);
1408
- w(
1409
- r != null,
1410
- "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
1411
- );
1412
- let { basename: n } = Le(
1413
- "useViewTransitionState"
1414
- /* useViewTransitionState */
1415
- ), a = _(e, { relative: t });
1416
- if (!r.isTransitioning)
1417
- return !1;
1418
- let o = F(r.currentLocation.pathname, n) || r.currentLocation.pathname, l = F(r.nextLocation.pathname, n) || r.nextLocation.pathname;
1419
- return W(a.pathname, l) != null || W(a.pathname, o) != null;
1420
- }
1421
- const er = () => {
1422
- try {
1423
- return $(), {
1424
- isInsideRouter: !0
1425
- };
1426
- } catch {
1427
- return {
1428
- isInsideRouter: !1
1429
- };
1430
- }
1431
- };
1432
- export {
1433
- Pe as L,
1434
- er as u
1435
- };