periplo-ui 4.23.2 → 4.24.0

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 (520) hide show
  1. package/dist/base.css +254 -0
  2. package/dist/components/data-display/Avatar/Avatar.js +8 -9
  3. package/dist/components/data-display/Avatar/Avatar.js.map +1 -1
  4. package/dist/components/data-display/Avatar/index.js +1 -2
  5. package/dist/components/data-display/Badge/Badge.d.ts +1 -1
  6. package/dist/components/data-display/Badge/Badge.js +10 -11
  7. package/dist/components/data-display/Badge/Badge.js.map +1 -1
  8. package/dist/components/data-display/Badge/index.js +1 -2
  9. package/dist/components/data-display/Carousel/Carousel.js +3 -4
  10. package/dist/components/data-display/Carousel/Carousel.js.map +1 -1
  11. package/dist/components/data-display/Carousel/index.js +1 -2
  12. package/dist/components/data-display/Chip/Chip.d.ts +1 -1
  13. package/dist/components/data-display/Chip/Chip.js +29 -33
  14. package/dist/components/data-display/Chip/Chip.js.map +1 -1
  15. package/dist/components/data-display/Chip/index.js +1 -2
  16. package/dist/components/data-display/DataTable/DataTable.js +11 -10
  17. package/dist/components/data-display/DataTable/DataTable.js.map +1 -1
  18. package/dist/components/data-display/DataTable/components/DataTableBody.js +15 -14
  19. package/dist/components/data-display/DataTable/components/DataTableBody.js.map +1 -1
  20. package/dist/components/data-display/DataTable/components/DataTableCell.js +2 -3
  21. package/dist/components/data-display/DataTable/components/DataTableCheckbox.js +2 -3
  22. package/dist/components/data-display/DataTable/components/DataTableCheckbox.js.map +1 -1
  23. package/dist/components/data-display/DataTable/components/DataTableColumnHeader.js +4 -5
  24. package/dist/components/data-display/DataTable/components/DataTableColumnHeader.js.map +1 -1
  25. package/dist/components/data-display/DataTable/components/DataTableGroupRow.js +8 -8
  26. package/dist/components/data-display/DataTable/components/DataTableGroupRow.js.map +1 -1
  27. package/dist/components/data-display/DataTable/components/DataTablePagination.js +9 -10
  28. package/dist/components/data-display/DataTable/components/DataTablePagination.js.map +1 -1
  29. package/dist/components/data-display/DataTable/components/DataTableSelectCells.js +1 -2
  30. package/dist/components/data-display/DataTable/components/DataTableToolbar.js +8 -9
  31. package/dist/components/data-display/DataTable/components/DataTableToolbar.js.map +1 -1
  32. package/dist/components/data-display/DataTable/components/DataTableToolbarButton.js +2 -3
  33. package/dist/components/data-display/DataTable/components/dataTableCellStyles.js +3 -4
  34. package/dist/components/data-display/DataTable/components/dataTableCellStyles.js.map +1 -1
  35. package/dist/components/data-display/DataTable/data.js +1 -2
  36. package/dist/components/data-display/DataTable/hooks/useGroupExpansion.js +1 -2
  37. package/dist/components/data-display/DataTable/hooks/useSelectColumn.js +1 -2
  38. package/dist/components/data-display/DataTable/hooks/useSelection.js +1 -2
  39. package/dist/components/data-display/DataTable/hooks/useSorting.js +1 -2
  40. package/dist/components/data-display/DataTable/index.js +1 -1
  41. package/dist/components/data-display/DataTable/utils.js +1 -2
  42. package/dist/components/data-display/Flag/Flag.js +3 -4
  43. package/dist/components/data-display/Flag/Flag.js.map +1 -1
  44. package/dist/components/data-display/Flag/index.js +1 -2
  45. package/dist/components/data-display/Label/Label.js +2 -3
  46. package/dist/components/data-display/Label/Label.js.map +1 -1
  47. package/dist/components/data-display/Label/index.js +1 -2
  48. package/dist/components/data-display/Marquee/Marquee.js +2 -3
  49. package/dist/components/data-display/Marquee/Marquee.js.map +1 -1
  50. package/dist/components/data-display/Marquee/index.js +1 -2
  51. package/dist/components/data-display/NotificationBadge/NotificationBadge.js +13 -15
  52. package/dist/components/data-display/NotificationBadge/NotificationBadge.js.map +1 -1
  53. package/dist/components/data-display/NotificationBadge/index.js +1 -2
  54. package/dist/components/data-display/Popover/Popover.js +4 -5
  55. package/dist/components/data-display/Popover/Popover.js.map +1 -1
  56. package/dist/components/data-display/Popover/index.js +1 -2
  57. package/dist/components/data-display/Separator/Separator.js +2 -3
  58. package/dist/components/data-display/Separator/Separator.js.map +1 -1
  59. package/dist/components/data-display/Separator/index.js +1 -2
  60. package/dist/components/data-display/Table/Table.js +5 -6
  61. package/dist/components/data-display/Table/Table.js.map +1 -1
  62. package/dist/components/data-display/Table/index.js +1 -2
  63. package/dist/components/data-display/Tooltip/Tooltip.js +22 -6
  64. package/dist/components/data-display/Tooltip/Tooltip.js.map +1 -1
  65. package/dist/components/data-display/Tooltip/index.js +1 -2
  66. package/dist/components/data-display/TruncatedTypographyWithTooltip/TruncatedTypographyWithTooltip.js +2 -3
  67. package/dist/components/data-display/TruncatedTypographyWithTooltip/index.js +1 -2
  68. package/dist/components/data-display/Typography/Typography.d.ts +4 -4
  69. package/dist/components/data-display/Typography/Typography.js +27 -31
  70. package/dist/components/data-display/Typography/Typography.js.map +1 -1
  71. package/dist/components/data-display/Typography/index.js +1 -2
  72. package/dist/components/feedback/Dialog/Dialog.js +8 -9
  73. package/dist/components/feedback/Dialog/Dialog.js.map +1 -1
  74. package/dist/components/feedback/Dialog/index.js +1 -2
  75. package/dist/components/feedback/Progress/Progress.d.ts +2 -2
  76. package/dist/components/feedback/Progress/Progress.js +7 -8
  77. package/dist/components/feedback/Progress/Progress.js.map +1 -1
  78. package/dist/components/feedback/Progress/hooks/useFakeProgress.js +1 -2
  79. package/dist/components/feedback/Progress/index.js +1 -2
  80. package/dist/components/feedback/Skeleton/Skeleton.js +2 -3
  81. package/dist/components/feedback/Skeleton/Skeleton.js.map +1 -1
  82. package/dist/components/feedback/Skeleton/index.js +1 -2
  83. package/dist/components/feedback/Toaster/Toaster.js +11 -12
  84. package/dist/components/feedback/Toaster/Toaster.js.map +1 -1
  85. package/dist/components/feedback/Toaster/index.js +1 -2
  86. package/dist/components/inputs/Button/Button.d.ts +1 -1
  87. package/dist/components/inputs/Button/Button.js +62 -58
  88. package/dist/components/inputs/Button/Button.js.map +1 -1
  89. package/dist/components/inputs/Button/index.js +1 -2
  90. package/dist/components/inputs/Calendar/Calendar.js +38 -36
  91. package/dist/components/inputs/Calendar/Calendar.js.map +1 -1
  92. package/dist/components/inputs/Calendar/index.js +1 -2
  93. package/dist/components/inputs/Checkbox/Checkbox.js +14 -13
  94. package/dist/components/inputs/Checkbox/Checkbox.js.map +1 -1
  95. package/dist/components/inputs/Checkbox/index.js +1 -2
  96. package/dist/components/inputs/Combobox/Combobox.d.ts +1 -1
  97. package/dist/components/inputs/Combobox/Combobox.js +6 -6
  98. package/dist/components/inputs/Combobox/Combobox.js.map +1 -1
  99. package/dist/components/inputs/Combobox/ComboboxOptionWithTooltip.js +1 -2
  100. package/dist/components/inputs/Combobox/ComboboxTrigger.js +7 -5
  101. package/dist/components/inputs/Combobox/ComboboxTrigger.js.map +1 -1
  102. package/dist/components/inputs/Combobox/StaticComboboxList.js +10 -22
  103. package/dist/components/inputs/Combobox/StaticComboboxList.js.map +1 -1
  104. package/dist/components/inputs/Combobox/VirtualizedComboboxList.js +6 -7
  105. package/dist/components/inputs/Combobox/VirtualizedComboboxList.js.map +1 -1
  106. package/dist/components/inputs/Combobox/hooks/index.js +1 -1
  107. package/dist/components/inputs/Combobox/hooks/useComboboxOpenState.js +1 -2
  108. package/dist/components/inputs/Combobox/hooks/useComboboxSelection.js +1 -2
  109. package/dist/components/inputs/Combobox/hooks/useDebouncedState.js +5 -6
  110. package/dist/components/inputs/Combobox/hooks/useDebouncedState.js.map +1 -1
  111. package/dist/components/inputs/Combobox/hooks/useDisplayValue.js +1 -2
  112. package/dist/components/inputs/Combobox/index.js +1 -1
  113. package/dist/components/inputs/Combobox/types.d.ts +1 -1
  114. package/dist/components/inputs/Combobox/useCombobox.js +1 -2
  115. package/dist/components/inputs/Command/Command.js +25 -21
  116. package/dist/components/inputs/Command/Command.js.map +1 -1
  117. package/dist/components/inputs/Command/index.js +1 -2
  118. package/dist/components/inputs/CountrySelect/CountrySelect.js +7 -9
  119. package/dist/components/inputs/CountrySelect/CountrySelect.js.map +1 -1
  120. package/dist/components/inputs/CountrySelect/index.js +1 -2
  121. package/dist/components/inputs/DatePicker/DatePicker.js +7 -8
  122. package/dist/components/inputs/DatePicker/DatePicker.js.map +1 -1
  123. package/dist/components/inputs/DatePicker/hooks/useLocale.js +1 -2
  124. package/dist/components/inputs/DatePicker/index.js +1 -2
  125. package/dist/components/inputs/Field/Field.js +15 -13
  126. package/dist/components/inputs/Field/Field.js.map +1 -1
  127. package/dist/components/inputs/Field/index.js +1 -2
  128. package/dist/components/inputs/Form/Form.d.ts +1 -1
  129. package/dist/components/inputs/Form/Form.js +5 -6
  130. package/dist/components/inputs/Form/Form.js.map +1 -1
  131. package/dist/components/inputs/Form/Page.js +1 -2
  132. package/dist/components/inputs/Form/index.js +1 -2
  133. package/dist/components/inputs/InlineMultiSelect/InlineMultiSelect.d.ts +7 -1
  134. package/dist/components/inputs/InlineMultiSelect/InlineMultiSelect.js +80 -29
  135. package/dist/components/inputs/InlineMultiSelect/InlineMultiSelect.js.map +1 -1
  136. package/dist/components/inputs/InlineMultiSelect/index.js +1 -2
  137. package/dist/components/inputs/Input/Input.js +22 -15
  138. package/dist/components/inputs/Input/Input.js.map +1 -1
  139. package/dist/components/inputs/Input/index.js +1 -2
  140. package/dist/components/inputs/InputDate/InputDate.js +16 -17
  141. package/dist/components/inputs/InputDate/InputDate.js.map +1 -1
  142. package/dist/components/inputs/InputDate/index.js +1 -2
  143. package/dist/components/inputs/InputOTP/InputOTP.js +5 -6
  144. package/dist/components/inputs/InputOTP/InputOTP.js.map +1 -1
  145. package/dist/components/inputs/InputOTP/index.js +1 -2
  146. package/dist/components/inputs/LazyDatePicker/LazyDatePicker.js +14 -14
  147. package/dist/components/inputs/LazyDatePicker/LazyDatePicker.js.map +1 -1
  148. package/dist/components/inputs/LazyDatePicker/index.js +1 -2
  149. package/dist/components/inputs/MultiSelect/MultiSelect.js +9 -14
  150. package/dist/components/inputs/MultiSelect/MultiSelect.js.map +1 -1
  151. package/dist/components/inputs/MultiSelect/Page.js +1 -2
  152. package/dist/components/inputs/MultiSelect/index.js +1 -2
  153. package/dist/components/inputs/PhoneInput/PhoneInput.js +18 -21
  154. package/dist/components/inputs/PhoneInput/PhoneInput.js.map +1 -1
  155. package/dist/components/inputs/PhoneInput/hooks/index.js +1 -2
  156. package/dist/components/inputs/PhoneInput/hooks/usePhoneField.js +7 -8
  157. package/dist/components/inputs/PhoneInput/hooks/usePhoneField.js.map +1 -1
  158. package/dist/components/inputs/PhoneInput/index.js +1 -1
  159. package/dist/components/inputs/PhoneInput/phone.js +1 -2
  160. package/dist/components/inputs/RadioGroup/Page.js +1 -2
  161. package/dist/components/inputs/RadioGroup/RadioGroup.js +14 -14
  162. package/dist/components/inputs/RadioGroup/RadioGroup.js.map +1 -1
  163. package/dist/components/inputs/RadioGroup/index.js +1 -2
  164. package/dist/components/inputs/Select/Select.js +22 -21
  165. package/dist/components/inputs/Select/Select.js.map +1 -1
  166. package/dist/components/inputs/Select/index.js +1 -2
  167. package/dist/components/inputs/StarRating/StarRating.js +10 -11
  168. package/dist/components/inputs/StarRating/StarRating.js.map +1 -1
  169. package/dist/components/inputs/StarRating/index.js +1 -2
  170. package/dist/components/inputs/Textarea/Textarea.js +11 -11
  171. package/dist/components/inputs/Textarea/Textarea.js.map +1 -1
  172. package/dist/components/inputs/Textarea/index.js +1 -2
  173. package/dist/components/inputs/Toggle/Toggle.js +19 -15
  174. package/dist/components/inputs/Toggle/Toggle.js.map +1 -1
  175. package/dist/components/inputs/Toggle/index.js +1 -2
  176. package/dist/components/inputs/ToggleGroup/ToggleGroup.js +2 -3
  177. package/dist/components/inputs/ToggleGroup/index.js +1 -2
  178. package/dist/components/inputs/shared/ClearButton.js +9 -10
  179. package/dist/components/inputs/shared/ClearButton.js.map +1 -1
  180. package/dist/components/inputs/shared/InputGroup.js +15 -12
  181. package/dist/components/inputs/shared/InputGroup.js.map +1 -1
  182. package/dist/components/inputs/shared/calendarDayContext.js +1 -2
  183. package/dist/components/inputs/shared/fieldInvalid.js +1 -2
  184. package/dist/components/navigation/Breadcrumb/Breadcrumb.js +8 -9
  185. package/dist/components/navigation/Breadcrumb/Breadcrumb.js.map +1 -1
  186. package/dist/components/navigation/Breadcrumb/index.js +1 -2
  187. package/dist/components/navigation/DropdownMenu/DropdownMenu.js +31 -35
  188. package/dist/components/navigation/DropdownMenu/DropdownMenu.js.map +1 -1
  189. package/dist/components/navigation/DropdownMenu/index.js +1 -2
  190. package/dist/components/navigation/Pagination/Pagination.js +6 -7
  191. package/dist/components/navigation/Pagination/Pagination.js.map +1 -1
  192. package/dist/components/navigation/Pagination/index.js +1 -2
  193. package/dist/components/navigation/Sheet/Sheet.js +9 -12
  194. package/dist/components/navigation/Sheet/Sheet.js.map +1 -1
  195. package/dist/components/navigation/Sheet/index.js +1 -2
  196. package/dist/components/navigation/Sidebar/Sidebar.d.ts +2 -2
  197. package/dist/components/navigation/Sidebar/Sidebar.js +30 -31
  198. package/dist/components/navigation/Sidebar/Sidebar.js.map +1 -1
  199. package/dist/components/navigation/Sidebar/SidebarMenu.d.ts +5 -5
  200. package/dist/components/navigation/Sidebar/SidebarMenu.js +46 -53
  201. package/dist/components/navigation/Sidebar/SidebarMenu.js.map +1 -1
  202. package/dist/components/navigation/Sidebar/SidebarPage.js +9 -10
  203. package/dist/components/navigation/Sidebar/SidebarPage.js.map +1 -1
  204. package/dist/components/navigation/Sidebar/SidebarUser.js +23 -25
  205. package/dist/components/navigation/Sidebar/SidebarUser.js.map +1 -1
  206. package/dist/components/navigation/Sidebar/context.js +1 -2
  207. package/dist/components/navigation/Sidebar/index.js +1 -1
  208. package/dist/components/navigation/Tabs/Tabs.js +21 -7
  209. package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
  210. package/dist/components/navigation/Tabs/index.js +1 -2
  211. package/dist/components/shared/CloseButton.js +1 -2
  212. package/dist/components/shared/OptionCheck.d.ts +14 -0
  213. package/dist/components/shared/OptionCheck.js +22 -0
  214. package/dist/components/shared/OptionCheck.js.map +1 -0
  215. package/dist/components/shared/Spinner.d.ts +7 -0
  216. package/dist/components/shared/Spinner.js +19 -0
  217. package/dist/components/shared/Spinner.js.map +1 -0
  218. package/dist/components/shared/index.d.ts +2 -0
  219. package/dist/components/shared/index.js +3 -1
  220. package/dist/components/surface/Accordion/Accordion.js +5 -6
  221. package/dist/components/surface/Accordion/Accordion.js.map +1 -1
  222. package/dist/components/surface/Accordion/index.js +1 -2
  223. package/dist/components/surface/Card/Card.js +2 -3
  224. package/dist/components/surface/Card/Card.js.map +1 -1
  225. package/dist/components/surface/Card/index.js +1 -2
  226. package/dist/components/surface/Collapsible/Collapsible.js +1 -2
  227. package/dist/components/surface/Collapsible/index.js +1 -2
  228. package/dist/foundations/shared.d.ts +22 -0
  229. package/dist/foundations/shared.js +63 -0
  230. package/dist/foundations/shared.js.map +1 -0
  231. package/dist/lib/countries.js +1 -2
  232. package/dist/lib/dateUtils.js +1 -2
  233. package/dist/lib/flagSvg.js +1 -2
  234. package/dist/lib/inputModality.js +1 -2
  235. package/dist/lib/marquee.js +1 -2
  236. package/dist/lib/useListScroll.js +1 -2
  237. package/dist/lib/useLocale.js +1 -2
  238. package/dist/lib/useMobile.js +1 -2
  239. package/dist/lib/useSlidingIndicator.js +1 -2
  240. package/dist/lib/useTouchDevice.js +1 -2
  241. package/dist/lib/utils.js +66 -3
  242. package/dist/lib/utils.js.map +1 -1
  243. package/dist/node_modules/country-flag-icons/3x2/AC.js +1 -2
  244. package/dist/node_modules/country-flag-icons/3x2/AD.js +1 -2
  245. package/dist/node_modules/country-flag-icons/3x2/AE.js +1 -2
  246. package/dist/node_modules/country-flag-icons/3x2/AF.js +1 -2
  247. package/dist/node_modules/country-flag-icons/3x2/AG.js +1 -2
  248. package/dist/node_modules/country-flag-icons/3x2/AI.js +1 -2
  249. package/dist/node_modules/country-flag-icons/3x2/AL.js +1 -2
  250. package/dist/node_modules/country-flag-icons/3x2/AM.js +1 -2
  251. package/dist/node_modules/country-flag-icons/3x2/AO.js +1 -2
  252. package/dist/node_modules/country-flag-icons/3x2/AQ.js +1 -2
  253. package/dist/node_modules/country-flag-icons/3x2/AR.js +1 -2
  254. package/dist/node_modules/country-flag-icons/3x2/AS.js +1 -2
  255. package/dist/node_modules/country-flag-icons/3x2/AT.js +1 -2
  256. package/dist/node_modules/country-flag-icons/3x2/AU.js +1 -2
  257. package/dist/node_modules/country-flag-icons/3x2/AW.js +1 -2
  258. package/dist/node_modules/country-flag-icons/3x2/AX.js +1 -2
  259. package/dist/node_modules/country-flag-icons/3x2/AZ.js +1 -2
  260. package/dist/node_modules/country-flag-icons/3x2/BA.js +1 -2
  261. package/dist/node_modules/country-flag-icons/3x2/BB.js +1 -2
  262. package/dist/node_modules/country-flag-icons/3x2/BD.js +1 -2
  263. package/dist/node_modules/country-flag-icons/3x2/BE.js +1 -2
  264. package/dist/node_modules/country-flag-icons/3x2/BF.js +1 -2
  265. package/dist/node_modules/country-flag-icons/3x2/BG.js +1 -2
  266. package/dist/node_modules/country-flag-icons/3x2/BH.js +1 -2
  267. package/dist/node_modules/country-flag-icons/3x2/BI.js +1 -2
  268. package/dist/node_modules/country-flag-icons/3x2/BJ.js +1 -2
  269. package/dist/node_modules/country-flag-icons/3x2/BL.js +1 -2
  270. package/dist/node_modules/country-flag-icons/3x2/BM.js +1 -2
  271. package/dist/node_modules/country-flag-icons/3x2/BN.js +1 -2
  272. package/dist/node_modules/country-flag-icons/3x2/BO.js +1 -2
  273. package/dist/node_modules/country-flag-icons/3x2/BQ-BO.js +1 -2
  274. package/dist/node_modules/country-flag-icons/3x2/BQ-SA.js +1 -2
  275. package/dist/node_modules/country-flag-icons/3x2/BQ-SE.js +1 -2
  276. package/dist/node_modules/country-flag-icons/3x2/BQ.js +1 -2
  277. package/dist/node_modules/country-flag-icons/3x2/BR.js +1 -2
  278. package/dist/node_modules/country-flag-icons/3x2/BS.js +1 -2
  279. package/dist/node_modules/country-flag-icons/3x2/BT.js +1 -2
  280. package/dist/node_modules/country-flag-icons/3x2/BV.js +1 -2
  281. package/dist/node_modules/country-flag-icons/3x2/BW.js +1 -2
  282. package/dist/node_modules/country-flag-icons/3x2/BY.js +1 -2
  283. package/dist/node_modules/country-flag-icons/3x2/BZ.js +1 -2
  284. package/dist/node_modules/country-flag-icons/3x2/CA.js +1 -2
  285. package/dist/node_modules/country-flag-icons/3x2/CC.js +1 -2
  286. package/dist/node_modules/country-flag-icons/3x2/CD.js +1 -2
  287. package/dist/node_modules/country-flag-icons/3x2/CF.js +1 -2
  288. package/dist/node_modules/country-flag-icons/3x2/CG.js +1 -2
  289. package/dist/node_modules/country-flag-icons/3x2/CH.js +1 -2
  290. package/dist/node_modules/country-flag-icons/3x2/CI.js +1 -2
  291. package/dist/node_modules/country-flag-icons/3x2/CK.js +1 -2
  292. package/dist/node_modules/country-flag-icons/3x2/CL.js +1 -2
  293. package/dist/node_modules/country-flag-icons/3x2/CM.js +1 -2
  294. package/dist/node_modules/country-flag-icons/3x2/CN.js +1 -2
  295. package/dist/node_modules/country-flag-icons/3x2/CO.js +1 -2
  296. package/dist/node_modules/country-flag-icons/3x2/CR.js +1 -2
  297. package/dist/node_modules/country-flag-icons/3x2/CU.js +1 -2
  298. package/dist/node_modules/country-flag-icons/3x2/CV.js +1 -2
  299. package/dist/node_modules/country-flag-icons/3x2/CW.js +1 -2
  300. package/dist/node_modules/country-flag-icons/3x2/CX.js +1 -2
  301. package/dist/node_modules/country-flag-icons/3x2/CY.js +1 -2
  302. package/dist/node_modules/country-flag-icons/3x2/CZ.js +1 -2
  303. package/dist/node_modules/country-flag-icons/3x2/DE.js +1 -2
  304. package/dist/node_modules/country-flag-icons/3x2/DJ.js +1 -2
  305. package/dist/node_modules/country-flag-icons/3x2/DK.js +1 -2
  306. package/dist/node_modules/country-flag-icons/3x2/DM.js +1 -2
  307. package/dist/node_modules/country-flag-icons/3x2/DO.js +1 -2
  308. package/dist/node_modules/country-flag-icons/3x2/DZ.js +1 -2
  309. package/dist/node_modules/country-flag-icons/3x2/EC.js +1 -2
  310. package/dist/node_modules/country-flag-icons/3x2/EE.js +1 -2
  311. package/dist/node_modules/country-flag-icons/3x2/EG.js +1 -2
  312. package/dist/node_modules/country-flag-icons/3x2/EH.js +1 -2
  313. package/dist/node_modules/country-flag-icons/3x2/ER.js +1 -2
  314. package/dist/node_modules/country-flag-icons/3x2/ES-CT.js +1 -2
  315. package/dist/node_modules/country-flag-icons/3x2/ES.js +1 -2
  316. package/dist/node_modules/country-flag-icons/3x2/ET.js +1 -2
  317. package/dist/node_modules/country-flag-icons/3x2/EU.js +1 -2
  318. package/dist/node_modules/country-flag-icons/3x2/FI.js +1 -2
  319. package/dist/node_modules/country-flag-icons/3x2/FJ.js +1 -2
  320. package/dist/node_modules/country-flag-icons/3x2/FK.js +1 -2
  321. package/dist/node_modules/country-flag-icons/3x2/FM.js +1 -2
  322. package/dist/node_modules/country-flag-icons/3x2/FO.js +1 -2
  323. package/dist/node_modules/country-flag-icons/3x2/FR.js +1 -2
  324. package/dist/node_modules/country-flag-icons/3x2/GA.js +1 -2
  325. package/dist/node_modules/country-flag-icons/3x2/GB-ENG.js +1 -2
  326. package/dist/node_modules/country-flag-icons/3x2/GB-NIR.js +1 -2
  327. package/dist/node_modules/country-flag-icons/3x2/GB-SCT.js +1 -2
  328. package/dist/node_modules/country-flag-icons/3x2/GB-WLS.js +1 -2
  329. package/dist/node_modules/country-flag-icons/3x2/GB.js +1 -2
  330. package/dist/node_modules/country-flag-icons/3x2/GD.js +1 -2
  331. package/dist/node_modules/country-flag-icons/3x2/GE.js +1 -2
  332. package/dist/node_modules/country-flag-icons/3x2/GF.js +1 -2
  333. package/dist/node_modules/country-flag-icons/3x2/GG.js +1 -2
  334. package/dist/node_modules/country-flag-icons/3x2/GH.js +1 -2
  335. package/dist/node_modules/country-flag-icons/3x2/GI.js +1 -2
  336. package/dist/node_modules/country-flag-icons/3x2/GL.js +1 -2
  337. package/dist/node_modules/country-flag-icons/3x2/GM.js +1 -2
  338. package/dist/node_modules/country-flag-icons/3x2/GN.js +1 -2
  339. package/dist/node_modules/country-flag-icons/3x2/GP.js +1 -2
  340. package/dist/node_modules/country-flag-icons/3x2/GQ.js +1 -2
  341. package/dist/node_modules/country-flag-icons/3x2/GR.js +1 -2
  342. package/dist/node_modules/country-flag-icons/3x2/GS.js +1 -2
  343. package/dist/node_modules/country-flag-icons/3x2/GT.js +1 -2
  344. package/dist/node_modules/country-flag-icons/3x2/GU.js +1 -2
  345. package/dist/node_modules/country-flag-icons/3x2/GW.js +1 -2
  346. package/dist/node_modules/country-flag-icons/3x2/GY.js +1 -2
  347. package/dist/node_modules/country-flag-icons/3x2/HK.js +1 -2
  348. package/dist/node_modules/country-flag-icons/3x2/HM.js +1 -2
  349. package/dist/node_modules/country-flag-icons/3x2/HN.js +1 -2
  350. package/dist/node_modules/country-flag-icons/3x2/HR.js +1 -2
  351. package/dist/node_modules/country-flag-icons/3x2/HT.js +1 -2
  352. package/dist/node_modules/country-flag-icons/3x2/HU.js +1 -2
  353. package/dist/node_modules/country-flag-icons/3x2/IC.js +1 -2
  354. package/dist/node_modules/country-flag-icons/3x2/ID.js +1 -2
  355. package/dist/node_modules/country-flag-icons/3x2/IE.js +1 -2
  356. package/dist/node_modules/country-flag-icons/3x2/IL.js +1 -2
  357. package/dist/node_modules/country-flag-icons/3x2/IM.js +1 -2
  358. package/dist/node_modules/country-flag-icons/3x2/IN.js +1 -2
  359. package/dist/node_modules/country-flag-icons/3x2/IO.js +1 -2
  360. package/dist/node_modules/country-flag-icons/3x2/IQ.js +1 -2
  361. package/dist/node_modules/country-flag-icons/3x2/IR.js +1 -2
  362. package/dist/node_modules/country-flag-icons/3x2/IS.js +1 -2
  363. package/dist/node_modules/country-flag-icons/3x2/IT.js +1 -2
  364. package/dist/node_modules/country-flag-icons/3x2/JE.js +1 -2
  365. package/dist/node_modules/country-flag-icons/3x2/JM.js +1 -2
  366. package/dist/node_modules/country-flag-icons/3x2/JO.js +1 -2
  367. package/dist/node_modules/country-flag-icons/3x2/JP.js +1 -2
  368. package/dist/node_modules/country-flag-icons/3x2/KE.js +1 -2
  369. package/dist/node_modules/country-flag-icons/3x2/KG.js +1 -2
  370. package/dist/node_modules/country-flag-icons/3x2/KH.js +1 -2
  371. package/dist/node_modules/country-flag-icons/3x2/KI.js +1 -2
  372. package/dist/node_modules/country-flag-icons/3x2/KM.js +1 -2
  373. package/dist/node_modules/country-flag-icons/3x2/KN.js +1 -2
  374. package/dist/node_modules/country-flag-icons/3x2/KP.js +1 -2
  375. package/dist/node_modules/country-flag-icons/3x2/KR.js +1 -2
  376. package/dist/node_modules/country-flag-icons/3x2/KW.js +1 -2
  377. package/dist/node_modules/country-flag-icons/3x2/KY.js +1 -2
  378. package/dist/node_modules/country-flag-icons/3x2/KZ.js +1 -2
  379. package/dist/node_modules/country-flag-icons/3x2/LA.js +1 -2
  380. package/dist/node_modules/country-flag-icons/3x2/LB.js +1 -2
  381. package/dist/node_modules/country-flag-icons/3x2/LC.js +1 -2
  382. package/dist/node_modules/country-flag-icons/3x2/LI.js +1 -2
  383. package/dist/node_modules/country-flag-icons/3x2/LK.js +1 -2
  384. package/dist/node_modules/country-flag-icons/3x2/LR.js +1 -2
  385. package/dist/node_modules/country-flag-icons/3x2/LS.js +1 -2
  386. package/dist/node_modules/country-flag-icons/3x2/LT.js +1 -2
  387. package/dist/node_modules/country-flag-icons/3x2/LU.js +1 -2
  388. package/dist/node_modules/country-flag-icons/3x2/LV.js +1 -2
  389. package/dist/node_modules/country-flag-icons/3x2/LY.js +1 -2
  390. package/dist/node_modules/country-flag-icons/3x2/MA.js +1 -2
  391. package/dist/node_modules/country-flag-icons/3x2/MC.js +1 -2
  392. package/dist/node_modules/country-flag-icons/3x2/MD.js +1 -2
  393. package/dist/node_modules/country-flag-icons/3x2/ME.js +1 -2
  394. package/dist/node_modules/country-flag-icons/3x2/MF.js +1 -2
  395. package/dist/node_modules/country-flag-icons/3x2/MG.js +1 -2
  396. package/dist/node_modules/country-flag-icons/3x2/MH.js +1 -2
  397. package/dist/node_modules/country-flag-icons/3x2/MK.js +1 -2
  398. package/dist/node_modules/country-flag-icons/3x2/ML.js +1 -2
  399. package/dist/node_modules/country-flag-icons/3x2/MM.js +1 -2
  400. package/dist/node_modules/country-flag-icons/3x2/MN.js +1 -2
  401. package/dist/node_modules/country-flag-icons/3x2/MO.js +1 -2
  402. package/dist/node_modules/country-flag-icons/3x2/MP.js +1 -2
  403. package/dist/node_modules/country-flag-icons/3x2/MQ.js +1 -2
  404. package/dist/node_modules/country-flag-icons/3x2/MR.js +1 -2
  405. package/dist/node_modules/country-flag-icons/3x2/MS.js +1 -2
  406. package/dist/node_modules/country-flag-icons/3x2/MT.js +1 -2
  407. package/dist/node_modules/country-flag-icons/3x2/MU.js +1 -2
  408. package/dist/node_modules/country-flag-icons/3x2/MV.js +1 -2
  409. package/dist/node_modules/country-flag-icons/3x2/MW.js +1 -2
  410. package/dist/node_modules/country-flag-icons/3x2/MX.js +1 -2
  411. package/dist/node_modules/country-flag-icons/3x2/MY.js +1 -2
  412. package/dist/node_modules/country-flag-icons/3x2/MZ.js +1 -2
  413. package/dist/node_modules/country-flag-icons/3x2/NA.js +1 -2
  414. package/dist/node_modules/country-flag-icons/3x2/NC.js +1 -2
  415. package/dist/node_modules/country-flag-icons/3x2/NE.js +1 -2
  416. package/dist/node_modules/country-flag-icons/3x2/NF.js +1 -2
  417. package/dist/node_modules/country-flag-icons/3x2/NG.js +1 -2
  418. package/dist/node_modules/country-flag-icons/3x2/NI.js +1 -2
  419. package/dist/node_modules/country-flag-icons/3x2/NL.js +1 -2
  420. package/dist/node_modules/country-flag-icons/3x2/NO.js +1 -2
  421. package/dist/node_modules/country-flag-icons/3x2/NP.js +1 -2
  422. package/dist/node_modules/country-flag-icons/3x2/NR.js +1 -2
  423. package/dist/node_modules/country-flag-icons/3x2/NU.js +1 -2
  424. package/dist/node_modules/country-flag-icons/3x2/NZ.js +1 -2
  425. package/dist/node_modules/country-flag-icons/3x2/OM.js +1 -2
  426. package/dist/node_modules/country-flag-icons/3x2/PA.js +1 -2
  427. package/dist/node_modules/country-flag-icons/3x2/PE.js +1 -2
  428. package/dist/node_modules/country-flag-icons/3x2/PF.js +1 -2
  429. package/dist/node_modules/country-flag-icons/3x2/PG.js +1 -2
  430. package/dist/node_modules/country-flag-icons/3x2/PH.js +1 -2
  431. package/dist/node_modules/country-flag-icons/3x2/PK.js +1 -2
  432. package/dist/node_modules/country-flag-icons/3x2/PL.js +1 -2
  433. package/dist/node_modules/country-flag-icons/3x2/PM.js +1 -2
  434. package/dist/node_modules/country-flag-icons/3x2/PN.js +1 -2
  435. package/dist/node_modules/country-flag-icons/3x2/PR.js +1 -2
  436. package/dist/node_modules/country-flag-icons/3x2/PS.js +1 -2
  437. package/dist/node_modules/country-flag-icons/3x2/PT.js +1 -2
  438. package/dist/node_modules/country-flag-icons/3x2/PW.js +1 -2
  439. package/dist/node_modules/country-flag-icons/3x2/PY.js +1 -2
  440. package/dist/node_modules/country-flag-icons/3x2/QA.js +1 -2
  441. package/dist/node_modules/country-flag-icons/3x2/RE.js +1 -2
  442. package/dist/node_modules/country-flag-icons/3x2/RO.js +1 -2
  443. package/dist/node_modules/country-flag-icons/3x2/RS.js +1 -2
  444. package/dist/node_modules/country-flag-icons/3x2/RU.js +1 -2
  445. package/dist/node_modules/country-flag-icons/3x2/RW.js +1 -2
  446. package/dist/node_modules/country-flag-icons/3x2/SA.js +1 -2
  447. package/dist/node_modules/country-flag-icons/3x2/SB.js +1 -2
  448. package/dist/node_modules/country-flag-icons/3x2/SC.js +1 -2
  449. package/dist/node_modules/country-flag-icons/3x2/SD.js +1 -2
  450. package/dist/node_modules/country-flag-icons/3x2/SE.js +1 -2
  451. package/dist/node_modules/country-flag-icons/3x2/SG.js +1 -2
  452. package/dist/node_modules/country-flag-icons/3x2/SH.js +1 -2
  453. package/dist/node_modules/country-flag-icons/3x2/SI.js +1 -2
  454. package/dist/node_modules/country-flag-icons/3x2/SJ.js +1 -2
  455. package/dist/node_modules/country-flag-icons/3x2/SK.js +1 -2
  456. package/dist/node_modules/country-flag-icons/3x2/SL.js +1 -2
  457. package/dist/node_modules/country-flag-icons/3x2/SM.js +1 -2
  458. package/dist/node_modules/country-flag-icons/3x2/SN.js +1 -2
  459. package/dist/node_modules/country-flag-icons/3x2/SO.js +1 -2
  460. package/dist/node_modules/country-flag-icons/3x2/SR.js +1 -2
  461. package/dist/node_modules/country-flag-icons/3x2/SS.js +1 -2
  462. package/dist/node_modules/country-flag-icons/3x2/ST.js +1 -2
  463. package/dist/node_modules/country-flag-icons/3x2/SV.js +1 -2
  464. package/dist/node_modules/country-flag-icons/3x2/SX.js +1 -2
  465. package/dist/node_modules/country-flag-icons/3x2/SY.js +1 -2
  466. package/dist/node_modules/country-flag-icons/3x2/SZ.js +1 -2
  467. package/dist/node_modules/country-flag-icons/3x2/TA.js +1 -2
  468. package/dist/node_modules/country-flag-icons/3x2/TC.js +1 -2
  469. package/dist/node_modules/country-flag-icons/3x2/TD.js +1 -2
  470. package/dist/node_modules/country-flag-icons/3x2/TF.js +1 -2
  471. package/dist/node_modules/country-flag-icons/3x2/TG.js +1 -2
  472. package/dist/node_modules/country-flag-icons/3x2/TH.js +1 -2
  473. package/dist/node_modules/country-flag-icons/3x2/TJ.js +1 -2
  474. package/dist/node_modules/country-flag-icons/3x2/TK.js +1 -2
  475. package/dist/node_modules/country-flag-icons/3x2/TL.js +1 -2
  476. package/dist/node_modules/country-flag-icons/3x2/TM.js +1 -2
  477. package/dist/node_modules/country-flag-icons/3x2/TN.js +1 -2
  478. package/dist/node_modules/country-flag-icons/3x2/TO.js +1 -2
  479. package/dist/node_modules/country-flag-icons/3x2/TR.js +1 -2
  480. package/dist/node_modules/country-flag-icons/3x2/TT.js +1 -2
  481. package/dist/node_modules/country-flag-icons/3x2/TV.js +1 -2
  482. package/dist/node_modules/country-flag-icons/3x2/TW.js +1 -2
  483. package/dist/node_modules/country-flag-icons/3x2/TZ.js +1 -2
  484. package/dist/node_modules/country-flag-icons/3x2/UA.js +1 -2
  485. package/dist/node_modules/country-flag-icons/3x2/UG.js +1 -2
  486. package/dist/node_modules/country-flag-icons/3x2/UM.js +1 -2
  487. package/dist/node_modules/country-flag-icons/3x2/US.js +1 -2
  488. package/dist/node_modules/country-flag-icons/3x2/UY.js +1 -2
  489. package/dist/node_modules/country-flag-icons/3x2/UZ.js +1 -2
  490. package/dist/node_modules/country-flag-icons/3x2/VA.js +1 -2
  491. package/dist/node_modules/country-flag-icons/3x2/VC.js +1 -2
  492. package/dist/node_modules/country-flag-icons/3x2/VE.js +1 -2
  493. package/dist/node_modules/country-flag-icons/3x2/VG.js +1 -2
  494. package/dist/node_modules/country-flag-icons/3x2/VI.js +1 -2
  495. package/dist/node_modules/country-flag-icons/3x2/VN.js +1 -2
  496. package/dist/node_modules/country-flag-icons/3x2/VU.js +1 -2
  497. package/dist/node_modules/country-flag-icons/3x2/WF.js +1 -2
  498. package/dist/node_modules/country-flag-icons/3x2/WS.js +1 -2
  499. package/dist/node_modules/country-flag-icons/3x2/XA.js +1 -2
  500. package/dist/node_modules/country-flag-icons/3x2/XC.js +1 -2
  501. package/dist/node_modules/country-flag-icons/3x2/XK.js +1 -2
  502. package/dist/node_modules/country-flag-icons/3x2/XO.js +1 -2
  503. package/dist/node_modules/country-flag-icons/3x2/YE.js +1 -2
  504. package/dist/node_modules/country-flag-icons/3x2/YT.js +1 -2
  505. package/dist/node_modules/country-flag-icons/3x2/ZA.js +1 -2
  506. package/dist/node_modules/country-flag-icons/3x2/ZM.js +1 -2
  507. package/dist/node_modules/country-flag-icons/3x2/ZW.js +1 -2
  508. package/dist/theme.css +3 -336
  509. package/dist/tokens.css +491 -0
  510. package/dist/utilities.css +642 -0
  511. package/package.json +86 -85
  512. package/dist/theme/control.css +0 -94
  513. package/dist/theme/fade-text.css +0 -7
  514. package/dist/theme/hit-area.css +0 -42
  515. package/dist/theme/motion.css +0 -3
  516. package/dist/theme/press.css +0 -22
  517. package/dist/theme/scrollbar.css +0 -3
  518. package/dist/theme/sliding-indicator.css +0 -7
  519. package/dist/theme/sticky-column.css +0 -11
  520. package/dist/theme/surface.css +0 -18
@@ -1,10 +1,10 @@
1
+ import { OptionCheck } from "../../shared/OptionCheck.js";
1
2
  import { Checkbox } from "../Checkbox/Checkbox.js";
2
3
  import { CommandEmpty, CommandGroup, CommandItem, CommandList, CommandSeparator } from "../Command/Command.js";
3
4
  import { ComboboxOptionWithTooltip } from "./ComboboxOptionWithTooltip.js";
4
5
  import { useMemo } from "react";
5
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import { CheckIcon } from "@phosphor-icons/react/dist/ssr/Check";
7
- //#region src/components/inputs/Combobox/StaticComboboxList.tsx
7
+ // src/components/inputs/Combobox/StaticComboboxList.tsx
8
8
  var StaticComboboxList = ({ filteredOptions, loading, loadingPlaceholder, emptyMessage, multiple, value, getOptionValue, getOptionLabel, handleSelect, renderOption, maxHeight, selectedMultiplePlaceholder, multipleOptionsPlaceholder, options, specialOptions, specialOptionsTitle, listRef }) => {
9
9
  const isArrayValue = Array.isArray(value);
10
10
  const selectedValues = useMemo(() => multiple && isArrayValue ? value : [], [
@@ -47,35 +47,24 @@ var StaticComboboxList = ({ filteredOptions, loading, loadingPlaceholder, emptyM
47
47
  const renderListOption = (option) => {
48
48
  const optionValue = getOptionValue(option);
49
49
  const selected = isOptionSelected(optionValue);
50
- const renderSelectionIndicator = () => {
51
- if (multiple) return /* @__PURE__ */ jsx(Checkbox, {
52
- checked: selected,
53
- tabIndex: -1,
54
- "aria-hidden": true,
55
- className: "pointer-events-none mr-2 shrink-0"
56
- });
57
- return /* @__PURE__ */ jsx("span", {
58
- "aria-hidden": true,
59
- className: "mr-1 flex h-6! w-6! shrink-0 items-center justify-end",
60
- children: selected && /* @__PURE__ */ jsx(CheckIcon, {
61
- weight: "bold",
62
- className: "h-4! w-4!"
63
- })
64
- });
65
- };
66
50
  return /* @__PURE__ */ jsx(CommandItem, {
67
51
  value: optionValue,
68
52
  onSelect: handleSelect,
69
- children: renderOption ? renderOption(option, selected) : /* @__PURE__ */ jsxs(Fragment, { children: [renderSelectionIndicator(), /* @__PURE__ */ jsx(ComboboxOptionWithTooltip, { label: getOptionLabel(option) })] })
53
+ children: renderOption ? renderOption(option, selected) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ComboboxOptionWithTooltip, { label: getOptionLabel(option) }), multiple ? /* @__PURE__ */ jsx(Checkbox, {
54
+ checked: selected,
55
+ tabIndex: -1,
56
+ "aria-hidden": true,
57
+ className: "pointer-events-none ml-auto shrink-0"
58
+ }) : /* @__PURE__ */ jsx(OptionCheck, { selected })] })
70
59
  }, optionValue);
71
60
  };
72
61
  return /* @__PURE__ */ jsx(CommandList, {
73
62
  ref: listRef,
74
63
  style: { maxHeight },
75
- className: "scrollbar-subtle overflow-auto overscroll-contain",
64
+ className: "\n scroll-fade scroll-py-(--control-option-height,max(var(--control-height-md),var(--control-touch-height)))\n scrollbar-subtle overflow-auto overscroll-contain\n ",
76
65
  onWheel: (event) => event.stopPropagation(),
77
66
  children: loading ? /* @__PURE__ */ jsx("div", {
78
- className: "flex items-center justify-center py-6 text-sm text-neutral-400",
67
+ className: "flex items-center justify-center py-6 text-body-md text-tertiary",
79
68
  children: loadingPlaceholder
80
69
  }) : /* @__PURE__ */ jsxs(Fragment, { children: [
81
70
  filteredOptions.length === 0 && regularOptions.length === 0 && (!specialOptions || specialOptions.length === 0) && /* @__PURE__ */ jsx(CommandEmpty, { children: emptyMessage }),
@@ -94,7 +83,6 @@ var StaticComboboxList = ({ filteredOptions, loading, loadingPlaceholder, emptyM
94
83
  ] })
95
84
  });
96
85
  };
97
- //#endregion
98
86
  export { StaticComboboxList };
99
87
 
100
88
  //# sourceMappingURL=StaticComboboxList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StaticComboboxList.js","names":["_Fragment"],"sources":["../../../../src/components/inputs/Combobox/StaticComboboxList.tsx"],"sourcesContent":["import { CheckIcon } from '@phosphor-icons/react/dist/ssr/Check'\nimport { useMemo } from 'react'\n\nimport { Checkbox } from '../Checkbox'\nimport { CommandEmpty, CommandGroup, CommandItem, CommandList, CommandSeparator } from '../Command'\n\nimport { ComboboxOptionWithTooltip } from './ComboboxOptionWithTooltip'\nimport type { StaticComboboxListProps } from './types'\n\nexport const StaticComboboxList = <T extends object>({\n filteredOptions,\n loading,\n loadingPlaceholder,\n emptyMessage,\n multiple,\n value,\n getOptionValue,\n getOptionLabel,\n handleSelect,\n renderOption,\n maxHeight,\n selectedMultiplePlaceholder,\n multipleOptionsPlaceholder,\n options,\n specialOptions,\n specialOptionsTitle,\n listRef,\n}: Readonly<StaticComboboxListProps<T>>) => {\n const isArrayValue = Array.isArray(value)\n const selectedValues = useMemo(() => (multiple && isArrayValue ? value : []), [multiple, isArrayValue, value])\n\n const isOptionSelected = (optionValue: string) =>\n multiple ? selectedValues.includes(optionValue) : value === optionValue\n\n const regularOptions = useMemo(() => {\n return filteredOptions.filter(\n (option) => !specialOptions?.some((special) => getOptionValue(special) === getOptionValue(option)),\n )\n }, [filteredOptions, specialOptions, getOptionValue])\n\n const regularSelectedOptions = useMemo(() => {\n if (!multiple || !isArrayValue) return []\n\n return options.filter(\n (option) =>\n selectedValues.includes(getOptionValue(option)) &&\n !specialOptions?.some((special) => getOptionValue(special) === getOptionValue(option)),\n )\n }, [options, selectedValues, specialOptions, getOptionValue, multiple, isArrayValue])\n\n const optionsToShow = useMemo(() => {\n if (specialOptions) return regularOptions\n\n if (!multiple || !isArrayValue) return regularOptions\n\n return regularOptions.filter((option) => !selectedValues.includes(getOptionValue(option)))\n }, [regularOptions, specialOptions, selectedValues, getOptionValue, multiple, isArrayValue])\n\n const groupHeading = !specialOptions && multiple ? multipleOptionsPlaceholder : undefined\n\n const renderListOption = (option: T) => {\n const optionValue = getOptionValue(option)\n const selected = isOptionSelected(optionValue)\n\n const renderSelectionIndicator = () => {\n if (multiple) {\n return <Checkbox checked={selected} tabIndex={-1} aria-hidden className=\"pointer-events-none mr-2 shrink-0\" />\n }\n\n return (\n <span aria-hidden className=\"mr-1 flex h-6! w-6! shrink-0 items-center justify-end\">\n {selected && <CheckIcon weight=\"bold\" className=\"h-4! w-4!\" />}\n </span>\n )\n }\n\n return (\n <CommandItem key={optionValue} value={optionValue} onSelect={handleSelect}>\n {renderOption ? (\n renderOption(option, selected)\n ) : (\n <>\n {renderSelectionIndicator()}\n <ComboboxOptionWithTooltip label={getOptionLabel(option)} />\n </>\n )}\n </CommandItem>\n )\n }\n\n return (\n <CommandList\n ref={listRef}\n style={{ maxHeight }}\n className=\"scrollbar-subtle overflow-auto overscroll-contain\"\n onWheel={(event) => event.stopPropagation()}\n >\n {loading ? (\n <div className=\"flex items-center justify-center py-6 text-sm text-neutral-400\">{loadingPlaceholder}</div>\n ) : (\n <>\n {filteredOptions.length === 0 &&\n regularOptions.length === 0 &&\n (!specialOptions || specialOptions.length === 0) && <CommandEmpty>{emptyMessage}</CommandEmpty>}\n\n {specialOptions?.length ? (\n <>\n <CommandGroup heading={specialOptionsTitle}>{specialOptions.map(renderListOption)}</CommandGroup>\n\n {optionsToShow.length > 0 && <CommandSeparator className=\"mx-1\" />}\n </>\n ) : null}\n\n {!specialOptions && multiple && isArrayValue && regularSelectedOptions.length > 0 && (\n <CommandGroup heading={selectedMultiplePlaceholder}>\n {regularSelectedOptions.map(renderListOption)}\n </CommandGroup>\n )}\n\n {optionsToShow.length > 0 && (\n <CommandGroup heading={groupHeading}>{optionsToShow.map(renderListOption)}</CommandGroup>\n )}\n </>\n )}\n </CommandList>\n )\n}\n"],"mappings":";;;;;;;AASA,IAAa,sBAAwC,EACnD,iBACA,SACA,oBACA,cACA,UACA,OACA,gBACA,gBACA,cACA,cACA,WACA,6BACA,4BACA,SACA,gBACA,qBACA,cAC0C;CAC1C,MAAM,eAAe,MAAM,QAAQ,KAAK;CACxC,MAAM,iBAAiB,cAAe,YAAY,eAAe,QAAQ,CAAC,GAAI;EAAC;EAAU;EAAc;CAAK,CAAC;CAE7G,MAAM,oBAAoB,gBACxB,WAAW,eAAe,SAAS,WAAW,IAAI,UAAU;CAE9D,MAAM,iBAAiB,cAAc;EACnC,OAAO,gBAAgB,QACpB,WAAW,CAAC,g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EO,GATK,WASL;CAEjB;CAEA,OACE,oBAAC,aAAD;EACE,KAAK;EACL,OAAO,EAAE,UAAU;EACnB,WAAU;EACV,UAAU,UAAU,MAAM,gBAAgB;EAEzC,UAAA,UACC,oBAAC,OAAD;GAAK,WAAU;GAAkE,UAAA;EAAwB,CAAA,IAEzG,qBAAAA,UAAA,EAAA,UAAA;GACG,gBAAgB,WAAW,KAC1B,eAAe,WAAW,MACzB,CAAC,kBAAkB,eAAe,WAAW,MAAM,oBAAC,cAAD,EAAA,UAAe,aAA2B,CAAA;GAE/F,gBAAgB,SACf,qBAAAA,UAAA,EAAA,UAAA,CACE,oBAAC,cAAD;IAAc,SAAS;IAAsB,UAAA,eAAe,IAAI,gBAAgB;GAAgB,CAAA,GAE/F,cAAc,SAAS,KAAK,oBAAC,kBAAD,EAAkB,WAAU,OAAQ,CAAA,CACjE,EAAA,CAAA,IACA;GAEH,CAAC,kBAAkB,YAAY,gBAAgB,uBAAuB,SAAS,KAC9E,oBAAC,cAAD;IAAc,SAAS;IACpB,UAAA,uBAAuB,IAAI,gBAAgB;GAChC,CAAA;GAGf,cAAc,SAAS,KACtB,oBAAC,cAAD;IAAc,SAAS;IAAe,UAAA,cAAc,IAAI,gBAAgB;GAAgB,CAAA;EAE1F,EAAA,CAAA;CAEO,CAAA;AAEjB"}
1
+ {"version":3,"file":"StaticComboboxList.js","names":["_Fragment"],"sources":["../../../../src/components/inputs/Combobox/StaticComboboxList.tsx"],"sourcesContent":["import { useMemo } from 'react'\n\nimport { OptionCheck } from '../../shared'\nimport { Checkbox } from '../Checkbox'\nimport { CommandEmpty, CommandGroup, CommandItem, CommandList, CommandSeparator } from '../Command'\n\nimport { ComboboxOptionWithTooltip } from './ComboboxOptionWithTooltip'\nimport type { StaticComboboxListProps } from './types'\n\nexport const StaticComboboxList = <T extends object>({\n filteredOptions,\n loading,\n loadingPlaceholder,\n emptyMessage,\n multiple,\n value,\n getOptionValue,\n getOptionLabel,\n handleSelect,\n renderOption,\n maxHeight,\n selectedMultiplePlaceholder,\n multipleOptionsPlaceholder,\n options,\n specialOptions,\n specialOptionsTitle,\n listRef,\n}: Readonly<StaticComboboxListProps<T>>) => {\n const isArrayValue = Array.isArray(value)\n const selectedValues = useMemo(() => (multiple && isArrayValue ? value : []), [multiple, isArrayValue, value])\n\n const isOptionSelected = (optionValue: string) =>\n multiple ? selectedValues.includes(optionValue) : value === optionValue\n\n const regularOptions = useMemo(() => {\n return filteredOptions.filter(\n (option) => !specialOptions?.some((special) => getOptionValue(special) === getOptionValue(option)),\n )\n }, [filteredOptions, specialOptions, getOptionValue])\n\n const regularSelectedOptions = useMemo(() => {\n if (!multiple || !isArrayValue) return []\n\n return options.filter(\n (option) =>\n selectedValues.includes(getOptionValue(option)) &&\n !specialOptions?.some((special) => getOptionValue(special) === getOptionValue(option)),\n )\n }, [options, selectedValues, specialOptions, getOptionValue, multiple, isArrayValue])\n\n const optionsToShow = useMemo(() => {\n if (specialOptions) return regularOptions\n\n if (!multiple || !isArrayValue) return regularOptions\n\n return regularOptions.filter((option) => !selectedValues.includes(getOptionValue(option)))\n }, [regularOptions, specialOptions, selectedValues, getOptionValue, multiple, isArrayValue])\n\n const groupHeading = !specialOptions && multiple ? multipleOptionsPlaceholder : undefined\n\n const renderListOption = (option: T) => {\n const optionValue = getOptionValue(option)\n const selected = isOptionSelected(optionValue)\n\n return (\n <CommandItem key={optionValue} value={optionValue} onSelect={handleSelect}>\n {renderOption ? (\n renderOption(option, selected)\n ) : (\n <>\n <ComboboxOptionWithTooltip label={getOptionLabel(option)} />\n {multiple ? (\n <Checkbox checked={selected} tabIndex={-1} aria-hidden className=\"pointer-events-none ml-auto shrink-0\" />\n ) : (\n <OptionCheck selected={selected} />\n )}\n </>\n )}\n </CommandItem>\n )\n }\n\n return (\n <CommandList\n ref={listRef}\n style={{ maxHeight }}\n className=\"\n scroll-fade scroll-py-(--control-option-height,max(var(--control-height-md),var(--control-touch-height)))\n scrollbar-subtle overflow-auto overscroll-contain\n \"\n onWheel={(event) => event.stopPropagation()}\n >\n {loading ? (\n <div className=\"flex items-center justify-center py-6 text-body-md text-tertiary\">{loadingPlaceholder}</div>\n ) : (\n <>\n {filteredOptions.length === 0 &&\n regularOptions.length === 0 &&\n (!specialOptions || specialOptions.length === 0) && <CommandEmpty>{emptyMessage}</CommandEmpty>}\n\n {specialOptions?.length ? (\n <>\n <CommandGroup heading={specialOptionsTitle}>{specialOptions.map(renderListOption)}</CommandGroup>\n\n {optionsToShow.length > 0 && <CommandSeparator className=\"mx-1\" />}\n </>\n ) : null}\n\n {!specialOptions && multiple && isArrayValue && regularSelectedOptions.length > 0 && (\n <CommandGroup heading={selectedMultiplePlaceholder}>\n {regularSelectedOptions.map(renderListOption)}\n </CommandGroup>\n )}\n\n {optionsToShow.length > 0 && (\n <CommandGroup heading={groupHeading}>{optionsToShow.map(renderListOption)}</CommandGroup>\n )}\n </>\n )}\n </CommandList>\n )\n}\n"],"mappings":";;;;;;;AASA,IAAa,sBAAwC,EACnD,iBACA,SACA,oBACA,cACA,UACA,OACA,gBACA,gBACA,cACA,cACA,WACA,6BACA,4BACA,SACA,gBACA,qBACA,cAC0C;CAC1C,MAAM,eAAe,MAAM,QAAQ,KAAK;CACxC,MAAM,iBAAiB,cAAe,YAAY,eAAe,QAAQ,CAAC,GAAI;EAAC;EAAU;EAAc;CAAK,CAAC;CAE7G,MAAM,oBAAoB,gBACxB,WAAW,eAAe,SAAS,WAAW,IAAI,UAAU;CAE9D,MAAM,iBAAiB,cAAc;EACnC,OAAO,gBAAgB,QACpB,WAAW,CAAC,gBAAgB,MAAM,YAAY,eAAe,OAAO,MAAM,eAAe,MAAM,CAAC,CACnG;CACF,GAAG;EAAC;EAAiB;EAAgB;CAAc,CAAC;CAEpD,MAAM,yBAAyB,cAAc;EAC3C,IAAI,CAAC,YAAY,CAAC,cAAc,OAAO,CAAC;EAExC,OAAO,QAAQ,QACZ,WACC,eAAe,SAAS,eAAe,MAAM,CAAC,KAC9C,CAAC,gB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AC,cAAD;IAAc,SAAS;IAAsB,UAAA,eAAe,IAAI,gBAAgB;GAAgB,CAAA,GAE/F,cAAc,SAAS,KAAK,oBAAC,kBAAD,EAAkB,WAAU,OAAQ,CAAA,CACjE,EAAA,CAAA,IACA;GAEH,CAAC,kBAAkB,YAAY,gBAAgB,uBAAuB,SAAS,KAC9E,oBAAC,cAAD;IAAc,SAAS;IACpB,UAAA,uBAAuB,IAAI,gBAAgB;GAChC,CAAA;GAGf,cAAc,SAAS,KACtB,oBAAC,cAAD;IAAc,SAAS;IAAe,UAAA,cAAc,IAAI,gBAAgB;GAAgB,CAAA;EAE1F,EAAA,CAAA;CAEO,CAAA;AAEjB"}
@@ -1,10 +1,10 @@
1
+ import { OptionCheck } from "../../shared/OptionCheck.js";
1
2
  import { CommandEmpty, CommandGroup, CommandItem, CommandList, CommandSeparator } from "../Command/Command.js";
2
3
  import { ComboboxOptionWithTooltip } from "./ComboboxOptionWithTooltip.js";
3
4
  import { useEffect, useRef, useState } from "react";
4
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
- import { CheckIcon } from "@phosphor-icons/react/dist/ssr/Check";
6
6
  import { useVirtualizer } from "@tanstack/react-virtual";
7
- //#region src/components/inputs/Combobox/VirtualizedComboboxList.tsx
7
+ // src/components/inputs/Combobox/VirtualizedComboboxList.tsx
8
8
  var DEFAULT_ESTIMATED_ROW_HEIGHT = 40;
9
9
  var VirtualizedComboboxList = ({ localOptions, loading, loadingPlaceholder, emptyMessage, value, getOptionValue, getOptionLabel, handleSelect, renderOption, maxHeight, hasNextPage = false, loadingMore = false, onLoadMore = () => {}, estimateSize = DEFAULT_ESTIMATED_ROW_HEIGHT, listRef, specialOptions, specialOptionsTitle }) => {
10
10
  const ownRef = useRef(null);
@@ -59,7 +59,7 @@ var VirtualizedComboboxList = ({ localOptions, loading, loadingPlaceholder, empt
59
59
  onLoadMore
60
60
  ]);
61
61
  if (loading && localOptions.length === 0) return /* @__PURE__ */ jsx("div", {
62
- className: "flex items-center justify-center py-6 text-sm text-neutral-400",
62
+ className: "flex items-center justify-center py-6 text-body-md text-tertiary",
63
63
  children: loadingPlaceholder
64
64
  });
65
65
  if (localOptions.length === 0 && !specialOptions?.length && !loading && !loadingMore) return /* @__PURE__ */ jsx(CommandEmpty, { children: emptyMessage });
@@ -70,12 +70,12 @@ var VirtualizedComboboxList = ({ localOptions, loading, loadingPlaceholder, empt
70
70
  value: optionValue,
71
71
  "data-checked": isSelected || void 0,
72
72
  onSelect: handleSelect,
73
- children: renderOption ? renderOption(option, isSelected) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CheckIcon, { className: "mr-2 h-4 w-4 opacity-0 in-data-checked:opacity-100" }), /* @__PURE__ */ jsx(ComboboxOptionWithTooltip, { label: getOptionLabel(option) })] })
73
+ children: renderOption ? renderOption(option, isSelected) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ComboboxOptionWithTooltip, { label: getOptionLabel(option) }), /* @__PURE__ */ jsx(OptionCheck, {})] })
74
74
  }, optionValue);
75
75
  };
76
76
  return /* @__PURE__ */ jsxs(CommandList, {
77
77
  ref: parentRef,
78
- className: "scrollbar-subtle overflow-auto overscroll-contain",
78
+ className: "\n scroll-fade scroll-py-(--control-option-height,max(var(--control-height-md),var(--control-touch-height)))\n scrollbar-subtle overflow-auto overscroll-contain\n ",
79
79
  style: { maxHeight },
80
80
  onWheel: (event) => event.stopPropagation(),
81
81
  children: [/* @__PURE__ */ jsxs("div", {
@@ -103,12 +103,11 @@ var VirtualizedComboboxList = ({ localOptions, loading, loadingPlaceholder, empt
103
103
  children: renderOptionRow(localOptions[virtualRow.index])
104
104
  }, getOptionValue(localOptions[virtualRow.index])))]
105
105
  }), loadingMore && /* @__PURE__ */ jsx("div", {
106
- className: "flex items-center justify-center py-2 text-sm text-neutral-500",
106
+ className: "flex items-center justify-center py-2 text-body-md text-tertiary",
107
107
  children: loadingPlaceholder
108
108
  })]
109
109
  });
110
110
  };
111
- //#endregion
112
111
  export { VirtualizedComboboxList };
113
112
 
114
113
  //# sourceMappingURL=VirtualizedComboboxList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualizedComboboxList.js","names":["_Fragment"],"sources":["../../../../src/components/inputs/Combobox/VirtualizedComboboxList.tsx"],"sourcesContent":["import { CheckIcon } from '@phosphor-icons/react/dist/ssr/Check'\nimport { useVirtualizer } from '@tanstack/react-virtual'\nimport { useRef, useEffect, useState } from 'react'\n\nimport { CommandEmpty, CommandGroup, CommandItem, CommandList, CommandSeparator } from '../Command'\n\nimport { ComboboxOptionWithTooltip } from './ComboboxOptionWithTooltip'\nimport type { VirtualizedComboboxListProps } from './types'\n\nconst DEFAULT_ESTIMATED_ROW_HEIGHT = 40\n\nexport const VirtualizedComboboxList = <T extends object>({\n localOptions,\n loading,\n loadingPlaceholder,\n emptyMessage,\n value,\n getOptionValue,\n getOptionLabel,\n handleSelect,\n renderOption,\n maxHeight,\n hasNextPage = false,\n loadingMore = false,\n onLoadMore = () => {},\n estimateSize = DEFAULT_ESTIMATED_ROW_HEIGHT,\n listRef,\n specialOptions,\n specialOptionsTitle,\n}: Readonly<VirtualizedComboboxListProps<T>>) => {\n const ownRef = useRef<HTMLDivElement>(null)\n const parentRef = listRef ?? ownRef\n const hasTriggeredRef = useRef(false)\n\n const totalCount = localOptions.length\n const PREFETCH_THRESHOLD = 25\n\n // scrollMargin accounts for the special group's height so scrollToIndex still centers correctly.\n const specialGroupRef = useRef<HTMLDivElement>(null)\n const [specialGroupHeight, setSpecialGroupHeight] = useState(0)\n useEffect(() => {\n setSpecialGroupHeight(specialGroupRef.current?.offsetHeight ?? 0)\n }, [specialOptions])\n\n // eslint-disable-next-line react-hooks/incompatible-library -- TanStack returns functions the React Compiler can't memoize, so it skips this component either way\n const rowVirtualizer = useVirtualizer({\n count: totalCount,\n getScrollElement: () => parentRef.current,\n estimateSize: () => estimateSize,\n overscan: 10,\n useAnimationFrameWithResizeObserver: true,\n scrollMargin: specialGroupHeight,\n })\n\n useEffect(() => {\n hasTriggeredRef.current = false\n }, [totalCount, loadingMore])\n\n const hasCenteredRef = useRef(false)\n useEffect(() => {\n if (hasCenteredRef.current || !value) return\n const index = localOptions.findIndex((option) => getOptionValue(option) === value)\n if (index === -1) return\n hasCenteredRef.current = true\n if (!parentRef.current?.scrollTop) rowVirtualizer.scrollToIndex(index, { align: 'center' })\n }, [value, localOptions, getOptionValue, rowVirtualizer, parentRef])\n\n const virtualItems = rowVirtualizer.getVirtualItems()\n\n useEffect(() => {\n if (virtualItems.length === 0 || !hasNextPage || loadingMore || loading || hasTriggeredRef.current) {\n return\n }\n\n const lastVisibleItem = virtualItems.at(-1)\n const itemsFromEnd = totalCount - (lastVisibleItem?.index ?? 0)\n\n if (itemsFromEnd <= PREFETCH_THRESHOLD) {\n hasTriggeredRef.current = true\n onLoadMore()\n }\n }, [virtualItems, totalCount, hasNextPage, loadingMore, loading, onLoadMore])\n\n if (loading && localOptions.length === 0) {\n return <div className=\"flex items-center justify-center py-6 text-sm text-neutral-400\">{loadingPlaceholder}</div>\n }\n\n if (localOptions.length === 0 && !specialOptions?.length && !loading && !loadingMore) {\n return <CommandEmpty>{emptyMessage}</CommandEmpty>\n }\n\n const renderOptionRow = (option: T) => {\n const optionValue = getOptionValue(option)\n const isSelected = value === optionValue\n return (\n <CommandItem key={optionValue} value={optionValue} data-checked={isSelected || undefined} onSelect={handleSelect}>\n {renderOption ? (\n renderOption(option, isSelected)\n ) : (\n <>\n <CheckIcon className=\"mr-2 h-4 w-4 opacity-0 in-data-checked:opacity-100\" />\n <ComboboxOptionWithTooltip label={getOptionLabel(option)} />\n </>\n )}\n </CommandItem>\n )\n }\n\n return (\n <CommandList\n ref={parentRef}\n className=\"scrollbar-subtle overflow-auto overscroll-contain\"\n style={{ maxHeight }}\n onWheel={(event) => event.stopPropagation()}\n >\n <div style={{ height: `${specialGroupHeight + rowVirtualizer.getTotalSize()}px`, position: 'relative' }}>\n {specialOptions?.length ? (\n <div ref={specialGroupRef} data-testid=\"combobox-special-group\">\n <CommandGroup heading={specialOptionsTitle}>{specialOptions.map(renderOptionRow)}</CommandGroup>\n {localOptions.length > 0 && <CommandSeparator className=\"mx-1\" />}\n </div>\n ) : null}\n\n {rowVirtualizer.getVirtualItems().map((virtualRow) => (\n <div\n key={getOptionValue(localOptions[virtualRow.index])}\n data-index={virtualRow.index}\n ref={(el) => rowVirtualizer.measureElement(el)}\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n transform: `translateY(${virtualRow.start}px)`,\n }}\n >\n {renderOptionRow(localOptions[virtualRow.index])}\n </div>\n ))}\n </div>\n {loadingMore && (\n <div className=\"flex items-center justify-center py-2 text-sm text-neutral-500\">{loadingPlaceholder}</div>\n )}\n </CommandList>\n )\n}\n"],"mappings":";;;;;;;AASA,IAAM,+BAA+B;AAErC,IAAa,2BAA6C,EACxD,cACA,SACA,oBACA,cACA,OACA,gBACA,gBACA,cACA,cACA,WACA,cAAc,OACd,cAAc,OACd,mBAAmB,CAAC,GACpB,eAAe,8BACf,SACA,gBACA,0BAC+C;CAC/C,MAAM,SAAS,OAAuB,IAAI;CAC1C,MAAM,YAAY,WAAW;CAC7B,MAAM,kBAAkB,OAAO,KAAK;CAEpC,MAAM,aAAa,aAAa;CAChC,MAAM,qBAAqB;CAG3B,MAAM,kBAAkB,OAAuB,IAAI;CACnD,MAAM,CAAC,oBAAoB,yBAAyB,SAAS,CAAC;CAC9D,gBAAgB;EACd,sBAAsB,gBAAgB,SAAS,gBAAgB,CAAC;CAClE,GAAG,CAAC,cAAc,CAAC;CAGnB,MAAM,iBAAiB,eAAe;EACpC,OAAO;EACP,wBAAwB,UAAU;EAClC,oBAAoB;EACpB,UAAU;EACV,qCAAqC;EACrC,cAAc;CAChB,CAAC;CAED,gBAAgB;EACd,gBAAgB,UAAU;CAC5B,GAAG,CAAC,YAAY,WAAW,CAAC;CAE5B,MAAM,iBAAiB,OAAO,KAAK;CACnC,gBAA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UAAU;EACnB,UAAU,UAAU,MAAM,gBAAgB;EAJ5C,UAAA,CAME,qBAAC,OAAD;GAAK,OAAO;IAAE,QAAQ,GAAG,qBAAqB,eAAe,aAAa,EAAE;IAAK,UAAU;GAAW;GAAtG,UAAA,CACG,gBAAgB,SACf,qBAAC,OAAD;IAAK,KAAK;IAAiB,eAAY;IAAvC,UAAA,CACE,oBAAC,cAAD;KAAc,SAAS;KAAsB,UAAA,eAAe,IAAI,eAAe;IAAgB,CAAA,GAC9F,aAAa,SAAS,KAAK,oBAAC,kBAAD,EAAkB,WAAU,OAAQ,CAAA,CAC7D;GACH,CAAA,IAAA,MAEH,eAAe,gBAAgB,CAAC,CAAC,KAAK,eACrC,oBAAC,OAAD;IAEE,cAAY,WAAW;IACvB,MAAM,OAAO,eAAe,eAAe,EAAE;IAC7C,OAAO;KACL,UAAU;KACV,KAAK;KACL,MAAM;KACN,OAAO;KACP,WAAW,cAAc,WAAW,MAAM;IAC5C;IAEC,UAAA,gBAAgB,aAAa,WAAW,MAAM;GAC5C,GAZE,eAAe,aAAa,WAAW,MAAM,CAY/C,CACN,CACE;EACJ,CAAA,GAAA,eACC,oBAAC,OAAD;GAAK,WAAU;GAAkE,UAAA;EAAwB,CAAA,CAEhG;;AAEjB"}
1
+ {"version":3,"file":"VirtualizedComboboxList.js","names":["_Fragment"],"sources":["../../../../src/components/inputs/Combobox/VirtualizedComboboxList.tsx"],"sourcesContent":["import { useVirtualizer } from '@tanstack/react-virtual'\nimport { useRef, useEffect, useState } from 'react'\n\nimport { OptionCheck } from '../../shared'\nimport { CommandEmpty, CommandGroup, CommandItem, CommandList, CommandSeparator } from '../Command'\n\nimport { ComboboxOptionWithTooltip } from './ComboboxOptionWithTooltip'\nimport type { VirtualizedComboboxListProps } from './types'\n\nconst DEFAULT_ESTIMATED_ROW_HEIGHT = 40\n\nexport const VirtualizedComboboxList = <T extends object>({\n localOptions,\n loading,\n loadingPlaceholder,\n emptyMessage,\n value,\n getOptionValue,\n getOptionLabel,\n handleSelect,\n renderOption,\n maxHeight,\n hasNextPage = false,\n loadingMore = false,\n onLoadMore = () => {},\n estimateSize = DEFAULT_ESTIMATED_ROW_HEIGHT,\n listRef,\n specialOptions,\n specialOptionsTitle,\n}: Readonly<VirtualizedComboboxListProps<T>>) => {\n const ownRef = useRef<HTMLDivElement>(null)\n const parentRef = listRef ?? ownRef\n const hasTriggeredRef = useRef(false)\n\n const totalCount = localOptions.length\n const PREFETCH_THRESHOLD = 25\n\n // scrollMargin accounts for the special group's height so scrollToIndex still centers correctly.\n const specialGroupRef = useRef<HTMLDivElement>(null)\n const [specialGroupHeight, setSpecialGroupHeight] = useState(0)\n useEffect(() => {\n setSpecialGroupHeight(specialGroupRef.current?.offsetHeight ?? 0)\n }, [specialOptions])\n\n // eslint-disable-next-line react-hooks/incompatible-library -- TanStack returns functions the React Compiler can't memoize, so it skips this component either way\n const rowVirtualizer = useVirtualizer({\n count: totalCount,\n getScrollElement: () => parentRef.current,\n estimateSize: () => estimateSize,\n overscan: 10,\n useAnimationFrameWithResizeObserver: true,\n scrollMargin: specialGroupHeight,\n })\n\n useEffect(() => {\n hasTriggeredRef.current = false\n }, [totalCount, loadingMore])\n\n const hasCenteredRef = useRef(false)\n useEffect(() => {\n if (hasCenteredRef.current || !value) return\n const index = localOptions.findIndex((option) => getOptionValue(option) === value)\n if (index === -1) return\n hasCenteredRef.current = true\n if (!parentRef.current?.scrollTop) rowVirtualizer.scrollToIndex(index, { align: 'center' })\n }, [value, localOptions, getOptionValue, rowVirtualizer, parentRef])\n\n const virtualItems = rowVirtualizer.getVirtualItems()\n\n useEffect(() => {\n if (virtualItems.length === 0 || !hasNextPage || loadingMore || loading || hasTriggeredRef.current) {\n return\n }\n\n const lastVisibleItem = virtualItems.at(-1)\n const itemsFromEnd = totalCount - (lastVisibleItem?.index ?? 0)\n\n if (itemsFromEnd <= PREFETCH_THRESHOLD) {\n hasTriggeredRef.current = true\n onLoadMore()\n }\n }, [virtualItems, totalCount, hasNextPage, loadingMore, loading, onLoadMore])\n\n if (loading && localOptions.length === 0) {\n return <div className=\"flex items-center justify-center py-6 text-body-md text-tertiary\">{loadingPlaceholder}</div>\n }\n\n if (localOptions.length === 0 && !specialOptions?.length && !loading && !loadingMore) {\n return <CommandEmpty>{emptyMessage}</CommandEmpty>\n }\n\n const renderOptionRow = (option: T) => {\n const optionValue = getOptionValue(option)\n const isSelected = value === optionValue\n return (\n <CommandItem key={optionValue} value={optionValue} data-checked={isSelected || undefined} onSelect={handleSelect}>\n {renderOption ? (\n renderOption(option, isSelected)\n ) : (\n <>\n <ComboboxOptionWithTooltip label={getOptionLabel(option)} />\n <OptionCheck />\n </>\n )}\n </CommandItem>\n )\n }\n\n return (\n <CommandList\n ref={parentRef}\n className=\"\n scroll-fade scroll-py-(--control-option-height,max(var(--control-height-md),var(--control-touch-height)))\n scrollbar-subtle overflow-auto overscroll-contain\n \"\n style={{ maxHeight }}\n onWheel={(event) => event.stopPropagation()}\n >\n <div style={{ height: `${specialGroupHeight + rowVirtualizer.getTotalSize()}px`, position: 'relative' }}>\n {specialOptions?.length ? (\n <div ref={specialGroupRef} data-testid=\"combobox-special-group\">\n <CommandGroup heading={specialOptionsTitle}>{specialOptions.map(renderOptionRow)}</CommandGroup>\n {localOptions.length > 0 && <CommandSeparator className=\"mx-1\" />}\n </div>\n ) : null}\n\n {rowVirtualizer.getVirtualItems().map((virtualRow) => (\n <div\n key={getOptionValue(localOptions[virtualRow.index])}\n data-index={virtualRow.index}\n ref={(el) => rowVirtualizer.measureElement(el)}\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n transform: `translateY(${virtualRow.start}px)`,\n }}\n >\n {renderOptionRow(localOptions[virtualRow.index])}\n </div>\n ))}\n </div>\n {loadingMore && (\n <div className=\"flex items-center justify-center py-2 text-body-md text-tertiary\">{loadingPlaceholder}</div>\n )}\n </CommandList>\n )\n}\n"],"mappings":";;;;;;;AASA,IAAM,+BAA+B;AAErC,IAAa,2BAA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AW,cAAc,WAAW,MAAM;IAC5C;IAEC,UAAA,gBAAgB,aAAa,WAAW,MAAM;GAC5C,GAZE,eAAe,aAAa,WAAW,MAAM,CAY/C,CACN,CACE;EACJ,CAAA,GAAA,eACC,oBAAC,OAAD;GAAK,WAAU;GAAoE,UAAA;EAAwB,CAAA,CAElG;;AAEjB"}
@@ -1,5 +1,5 @@
1
- import { useDebouncedState } from "./useDebouncedState.js";
2
1
  import { useComboboxOpenState } from "./useComboboxOpenState.js";
3
2
  import { useComboboxSelection } from "./useComboboxSelection.js";
3
+ import { useDebouncedState } from "./useDebouncedState.js";
4
4
  import { useDisplayValue } from "./useDisplayValue.js";
5
5
  export { useComboboxOpenState, useComboboxSelection, useDebouncedState, useDisplayValue };
@@ -1,6 +1,6 @@
1
1
  import { useDebouncedState } from "./useDebouncedState.js";
2
2
  import { useCallback, useState } from "react";
3
- //#region src/components/inputs/Combobox/hooks/useComboboxOpenState.ts
3
+ // src/components/inputs/Combobox/hooks/useComboboxOpenState.ts
4
4
  function useComboboxOpenState() {
5
5
  const [isOpen, setIsOpen] = useState(false);
6
6
  const { value: searchTerm, debouncedValue: debouncedSearchTerm, setValue: setSearchTerm } = useDebouncedState("");
@@ -15,7 +15,6 @@ function useComboboxOpenState() {
15
15
  setSearchTerm
16
16
  };
17
17
  }
18
- //#endregion
19
18
  export { useComboboxOpenState };
20
19
 
21
20
  //# sourceMappingURL=useComboboxOpenState.js.map
@@ -1,5 +1,5 @@
1
1
  import { useMemo } from "react";
2
- //#region src/components/inputs/Combobox/hooks/useComboboxSelection.ts
2
+ // src/components/inputs/Combobox/hooks/useComboboxSelection.ts
3
3
  function useComboboxSelection(props, setOpen) {
4
4
  const { multiple, clearable = true, onClear, specialOptions } = props;
5
5
  const closeOnSelect = props.closeOnSelect ?? !props.multiple;
@@ -45,7 +45,6 @@ function useComboboxSelection(props, setOpen) {
45
45
  }, [props.value, multiple])
46
46
  };
47
47
  }
48
- //#endregion
49
48
  export { useComboboxSelection };
50
49
 
51
50
  //# sourceMappingURL=useComboboxSelection.js.map
@@ -1,11 +1,11 @@
1
1
  import { useCallback, useEffect, useRef, useState } from "react";
2
- //#region src/components/inputs/Combobox/hooks/useDebouncedState.ts
2
+ // src/components/inputs/Combobox/hooks/useDebouncedState.ts
3
3
  function useDebouncedState(initial, delay = 300) {
4
- const [value, setImmediateValue] = useState(initial);
4
+ const [value, setValue] = useState(initial);
5
5
  const [debouncedValue, setDebouncedValue] = useState(initial);
6
6
  const timerRef = useRef(null);
7
- const setValue = useCallback((next) => {
8
- setImmediateValue(next);
7
+ const updateValue = useCallback((next) => {
8
+ setValue(next);
9
9
  if (timerRef.current) clearTimeout(timerRef.current);
10
10
  timerRef.current = setTimeout(() => setDebouncedValue(next), delay);
11
11
  }, [delay]);
@@ -15,10 +15,9 @@ function useDebouncedState(initial, delay = 300) {
15
15
  return {
16
16
  value,
17
17
  debouncedValue,
18
- setValue
18
+ setValue: updateValue
19
19
  };
20
20
  }
21
- //#endregion
22
21
  export { useDebouncedState };
23
22
 
24
23
  //# sourceMappingURL=useDebouncedState.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDebouncedState.js","names":[],"sources":["../../../../../src/components/inputs/Combobox/hooks/useDebouncedState.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\nexport function useDebouncedState<T>(initial: T, delay: number = 300) {\n const [value, setImmediateValue] = useState<T>(initial)\n const [debouncedValue, setDebouncedValue] = useState<T>(initial)\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n const setValue = useCallback(\n (next: T) => {\n setImmediateValue(next)\n if (timerRef.current) clearTimeout(timerRef.current)\n timerRef.current = setTimeout(() => setDebouncedValue(next), delay)\n },\n [delay],\n )\n\n useEffect(\n () => () => {\n if (timerRef.current) clearTimeout(timerRef.current)\n },\n [],\n )\n\n return { value, debouncedValue, setValue }\n}\n"],"mappings":";;AAEA,SAAgB,kBAAqB,SAAY,QAAgB,KAAK;CACpE,MAAM,CAAC,OAAO,qBAAqB,SAAY,OAAO;CACtD,MAAM,CAAC,gBAAgB,qBAAqB,SAAY,OAAO;CAC/D,MAAM,WAAW,OAA6C,IAAI;CAElE,MAAM,WAAW,aACd,SAAY;EACX,kBAAkB,IAAI;EACtB,IAAI,SAAS,SAAS,aAAa,SAAS,OAAO;EACnD,SAAS,UAAU,iBAAiB,kBAAkB,IAAI,GAAG,KAAK;CACpE,GACA,CAAC,KAAK,CACR;CAEA,sBACc;EACV,IAAI,SAAS,SAAS,aAAa,SAAS,OAAO;CACrD,GACA,CAAC,CACH;CAEA,OAAO;EAAE;EAAO;EAAgB;CAAS;AAC3C"}
1
+ {"version":3,"file":"useDebouncedState.js","names":[],"sources":["../../../../../src/components/inputs/Combobox/hooks/useDebouncedState.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\nexport function useDebouncedState<T>(initial: T, delay: number = 300) {\n const [value, setValue] = useState<T>(initial)\n const [debouncedValue, setDebouncedValue] = useState<T>(initial)\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n const updateValue = useCallback(\n (next: T) => {\n setValue(next)\n if (timerRef.current) clearTimeout(timerRef.current)\n timerRef.current = setTimeout(() => setDebouncedValue(next), delay)\n },\n [delay],\n )\n\n useEffect(\n () => () => {\n if (timerRef.current) clearTimeout(timerRef.current)\n },\n [],\n )\n\n return { value, debouncedValue, setValue: updateValue }\n}\n"],"mappings":";;AAEA,SAAgB,kBAAqB,SAAY,QAAgB,KAAK;CACpE,MAAM,CAAC,OAAO,YAAY,SAAY,OAAO;CAC7C,MAAM,CAAC,gBAAgB,qBAAqB,SAAY,OAAO;CAC/D,MAAM,WAAW,OAA6C,IAAI;CAElE,MAAM,cAAc,aACjB,SAAY;EACX,SAAS,IAAI;EACb,IAAI,SAAS,SAAS,aAAa,SAAS,OAAO;EACnD,SAAS,UAAU,iBAAiB,kBAAkB,IAAI,GAAG,KAAK;CACpE,GACA,CAAC,KAAK,CACR;CAEA,sBACc;EACV,IAAI,SAAS,SAAS,aAAa,SAAS,OAAO;CACrD,GACA,CAAC,CACH;CAEA,OAAO;EAAE;EAAO;EAAgB,UAAU;CAAY;AACxD"}
@@ -1,5 +1,5 @@
1
1
  import { useMemo } from "react";
2
- //#region src/components/inputs/Combobox/hooks/useDisplayValue.ts
2
+ // src/components/inputs/Combobox/hooks/useDisplayValue.ts
3
3
  function getMultipleDisplayValue(props, lookup, getOptionLabel, placeholder, handleRemove) {
4
4
  const { renderLabel } = props;
5
5
  const value = Array.isArray(props.value) ? props.value : [];
@@ -31,7 +31,6 @@ function useDisplayValue({ props, handleRemove }) {
31
31
  specialOptions
32
32
  ]);
33
33
  }
34
- //#endregion
35
34
  export { useDisplayValue };
36
35
 
37
36
  //# sourceMappingURL=useDisplayValue.js.map
@@ -1,6 +1,6 @@
1
+ import { Combobox } from "./Combobox.js";
1
2
  import { ComboboxOptionWithTooltip } from "./ComboboxOptionWithTooltip.js";
2
3
  import { StaticComboboxList } from "./StaticComboboxList.js";
3
4
  import { useCombobox } from "./useCombobox.js";
4
5
  import { VirtualizedComboboxList } from "./VirtualizedComboboxList.js";
5
- import { Combobox } from "./Combobox.js";
6
6
  export { Combobox, ComboboxOptionWithTooltip, StaticComboboxList, VirtualizedComboboxList, useCombobox };
@@ -6,7 +6,7 @@ export type ComboboxListBaseProps<T> = {
6
6
  getOptionLabel: (option: T) => string;
7
7
  handleSelect: (value: string) => void;
8
8
  renderOption?: (option: T, isSelected: boolean) => React.ReactNode;
9
- maxHeight: string | number;
9
+ maxHeight?: string | number;
10
10
  listRef?: React.RefObject<HTMLDivElement | null>;
11
11
  };
12
12
  export type VirtualizedComboboxListProps<T> = ComboboxListBaseProps<T> & {
@@ -3,7 +3,7 @@ import { useComboboxOpenState } from "./hooks/useComboboxOpenState.js";
3
3
  import { useComboboxSelection } from "./hooks/useComboboxSelection.js";
4
4
  import { useDisplayValue } from "./hooks/useDisplayValue.js";
5
5
  import { useCallback, useEffect, useMemo, useRef } from "react";
6
- //#region src/components/inputs/Combobox/useCombobox.ts
6
+ // src/components/inputs/Combobox/useCombobox.ts
7
7
  var EMPTY_ARRAY = [];
8
8
  var useCombobox = (props) => {
9
9
  const { getOptionLabel, filterOptions, specialOptions } = props;
@@ -62,7 +62,6 @@ var useCombobox = (props) => {
62
62
  loadNextPage
63
63
  };
64
64
  };
65
- //#endregion
66
65
  export { useCombobox };
67
66
 
68
67
  //# sourceMappingURL=useCombobox.js.map
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  "use client";
3
- import { cn } from "../../../lib/utils.js";
4
3
  import { Dialog, DialogContent } from "../../feedback/Dialog/Dialog.js";
4
+ import { cn } from "../../../lib/utils.js";
5
5
  import * as React$1 from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { MagnifyingGlassIcon } from "@phosphor-icons/react/dist/ssr/MagnifyingGlass";
8
8
  import { Command as Command$1 } from "cmdk";
9
- //#region src/components/inputs/Command/Command.tsx
9
+ // src/components/inputs/Command/Command.tsx
10
10
  var Command = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1, {
11
11
  ref,
12
- className: cn("flex h-full w-full flex-col overflow-hidden bg-white text-popover-foreground", className),
12
+ className: cn("flex size-full flex-col overflow-hidden bg-surface-primary text-primary", className),
13
13
  ...props
14
14
  }));
15
15
  Command.displayName = Command$1.displayName;
@@ -19,24 +19,25 @@ var CommandDialog = ({ children, ...props }) => {
19
19
  children: /* @__PURE__ */ jsx(DialogContent, {
20
20
  className: "overflow-hidden surface p-0 surface-list",
21
21
  children: /* @__PURE__ */ jsx(Command, {
22
- className: "\n **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium\n **:[[cmdk-group-heading]]:text-neutral-400\n **:[[cmdk-group]]:px-2\n **:[[cmdk-input]]:h-12\n **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3\n [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0\n [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5\n [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\n ",
22
+ className: "\n **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-tertiary\n **:[[cmdk-group]]:px-2\n **:[[cmdk-input]]:h-12\n **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3\n [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0\n [&_[cmdk-input-wrapper]_svg]:icon-md\n [&_[cmdk-item]_svg]:icon-md\n ",
23
23
  children
24
24
  })
25
25
  })
26
26
  });
27
27
  };
28
28
  var CommandInput = React$1.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs("div", {
29
- className: "\n m-[calc(var(--surface-inset)*2)] flex\n h-(--control-option-height,max(var(--control-height-md),var(--control-touch-height))) items-center rounded-lg\n border border-neutral-200 px-3 transition-colors\n focus-within:border-neutral-950\n ",
29
+ "data-cmdk-search": true,
30
+ className: "\n mx-[calc(var(--surface-inset)*2)] mt-[calc(var(--surface-inset)*2)] mb-(--surface-inset) flex\n h-(--control-option-height,max(var(--control-height-md),var(--control-touch-height))) items-center rounded-lg\n border border-input px-3 motion-hover\n focus-within:border-focused focus-within:outline-1 focus-within:-outline-offset-2 focus-within:outline-focused\n focus-within:hover:border-focused\n hover:border-control\n ",
30
31
  children: [
31
- /* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
32
+ /* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "mr-2 icon-md shrink-0 text-tertiary" }),
32
33
  /* @__PURE__ */ jsx(Command$1.Input, {
33
34
  ref,
34
35
  className: cn(`
35
- flex h-full w-full rounded-md bg-transparent py-3 text-(length:--control-option-text,0.875rem)
36
+ flex size-full rounded-lg bg-transparent py-3 text-(length:--control-option-text,0.875rem)
36
37
  leading-(--control-option-leading,1.25rem)
37
- placeholder:text-neutral-500
38
- disabled:cursor-not-allowed disabled:opacity-50
39
- pointer-coarse:text-base
38
+ placeholder:text-tertiary
39
+ disabled:cursor-not-allowed disabled:text-tertiary
40
+ pointer-coarse:text-body-lg
40
41
  `, className),
41
42
  ...props
42
43
  }),
@@ -49,29 +50,33 @@ var CommandInput = React$1.forwardRef(({ className, children, ...props }, ref) =
49
50
  CommandInput.displayName = Command$1.Input.displayName;
50
51
  var CommandList = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1.List, {
51
52
  ref,
52
- className: cn("relative max-h-75 scrollbar-subtle overflow-x-hidden overflow-y-auto px-(--surface-inset) pb-(--surface-inset)", className),
53
+ className: cn(`
54
+ relative mb-(--surface-inset)
55
+ max-h-[calc(var(--control-option-height,max(var(--control-height-md),var(--control-touch-height)))*6)]
56
+ scrollbar-subtle overflow-x-hidden overflow-y-auto px-(--surface-inset)
57
+ `, className),
53
58
  ...props
54
59
  }));
55
60
  CommandList.displayName = Command$1.List.displayName;
56
61
  var CommandEmpty = React$1.forwardRef((props, ref) => /* @__PURE__ */ jsx(Command$1.Empty, {
57
62
  ref,
58
- className: "py-6 text-center text-sm",
63
+ className: "py-6 text-center text-body-md",
59
64
  ...props
60
65
  }));
61
66
  CommandEmpty.displayName = Command$1.Empty.displayName;
62
67
  var CommandGroup = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1.Group, {
63
68
  ref,
64
69
  className: cn(`
65
- overflow-hidden text-left text-foreground
66
- **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-sm
67
- **:[[cmdk-group-heading]]:font-normal **:[[cmdk-group-heading]]:text-neutral-400
70
+ overflow-hidden text-left text-primary
71
+ **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-body-md
72
+ **:[[cmdk-group-heading]]:font-normal **:[[cmdk-group-heading]]:text-tertiary
68
73
  `, className),
69
74
  ...props
70
75
  }));
71
76
  CommandGroup.displayName = Command$1.Group.displayName;
72
77
  var CommandSeparator = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1.Separator, {
73
78
  ref,
74
- className: cn("my-1 h-px bg-border", className),
79
+ className: cn("my-1 h-px bg-surface-tertiary", className),
75
80
  ...props
76
81
  }));
77
82
  CommandSeparator.displayName = Command$1.Separator.displayName;
@@ -81,21 +86,20 @@ var CommandItem = React$1.forwardRef(({ className, ...props }, ref) => /* @__PUR
81
86
  relative flex min-h-(--control-option-height,max(var(--control-height-md),var(--control-touch-height)))
82
87
  items-center gap-2 surface-item press-fill-strong px-3 py-1.5 text-(length:--control-option-text,0.875rem)
83
88
  leading-(--control-option-leading,1.25rem) outline-hidden select-none
84
- data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50
85
- data-[selected=true]:bg-neutral-100
86
- [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0
89
+ data-[disabled=true]:pointer-events-none data-[disabled=true]:text-tertiary
90
+ data-[selected=true]:bg-surface-tertiary
91
+ [&_svg]:pointer-events-none [&_svg]:icon-md [&_svg]:shrink-0
87
92
  `, className),
88
93
  ...props
89
94
  }));
90
95
  CommandItem.displayName = Command$1.Item.displayName;
91
96
  var CommandShortcut = ({ className, ...props }) => {
92
97
  return /* @__PURE__ */ jsx("span", {
93
- className: cn("ml-auto text-xs tracking-widest text-neutral-400", className),
98
+ className: cn("ml-auto text-body-sm tracking-widest text-tertiary", className),
94
99
  ...props
95
100
  });
96
101
  };
97
102
  CommandShortcut.displayName = "CommandShortcut";
98
- //#endregion
99
103
  export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
100
104
 
101
105
  //# sourceMappingURL=Command.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Command.js","names":["React","CommandPrimitive"],"sources":["../../../../src/components/inputs/Command/Command.tsx"],"sourcesContent":["'use client'\n\nimport { MagnifyingGlassIcon } from '@phosphor-icons/react/dist/ssr/MagnifyingGlass'\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport * as React from 'react'\n\nimport { Dialog, DialogContent } from '../../feedback/Dialog'\n\nimport { cn } from '@/lib/utils'\n\nconst Command = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive>>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn('flex h-full w-full flex-col overflow-hidden bg-white text-popover-foreground', className)}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\nconst CommandDialog = ({ children, ...props }: Readonly<DialogProps>) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden surface p-0 surface-list\">\n <Command\n className=\"\n **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium\n **:[[cmdk-group-heading]]:text-neutral-400\n **:[[cmdk-group]]:px-2\n **:[[cmdk-input]]:h-12\n **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3\n [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0\n [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5\n [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\n \"\n >\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Input>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>>\n>(({ className, children, ...props }, ref) => (\n <div\n className=\"\n m-[calc(var(--surface-inset)*2)] flex\n h-(--control-option-height,max(var(--control-height-md),var(--control-touch-height))) items-center rounded-lg\n border border-neutral-200 px-3 transition-colors\n focus-within:border-neutral-950\n \"\n >\n <MagnifyingGlassIcon className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n `\n flex h-full w-full rounded-md bg-transparent py-3 text-(length:--control-option-text,0.875rem)\n leading-(--control-option-leading,1.25rem)\n placeholder:text-neutral-500\n disabled:cursor-not-allowed disabled:opacity-50\n pointer-coarse:text-base\n `,\n className,\n )}\n {...props}\n />\n {children && <div className=\"ml-2\">{children}</div>}\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.List>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\n 'relative max-h-75 scrollbar-subtle overflow-x-hidden overflow-y-auto px-(--surface-inset) pb-(--surface-inset)',\n className,\n )}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Empty>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>>\n>((props, ref) => <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />)\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Group>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n `\n overflow-hidden text-left text-foreground\n **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-sm\n **:[[cmdk-group-heading]]:font-normal **:[[cmdk-group-heading]]:text-neutral-400\n `,\n className,\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Separator>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator ref={ref} className={cn('my-1 h-px bg-border', className)} {...props} />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Item>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n `\n relative flex min-h-(--control-option-height,max(var(--control-height-md),var(--control-touch-height)))\n items-center gap-2 surface-item press-fill-strong px-3 py-1.5 text-(length:--control-option-text,0.875rem)\n leading-(--control-option-leading,1.25rem) outline-hidden select-none\n data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50\n data-[selected=true]:bg-neutral-100\n [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\n `,\n className,\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({ className, ...props }: Readonly<React.HTMLAttributes<HTMLSpanElement>>) => {\n return <span className={cn('ml-auto text-xs tracking-widest text-neutral-400', className)} {...props} />\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n"],"mappings":";;;;;;;;;AAWA,IAAA,UAAA,QAAA,YAAA,EAAA,WAAA,GAAA,SAAA,QAAA,oBAAA,WAAA;CAKS;CACL,WAAA,GAAA,gFAAA,SAAA;CACA,GAAA;AACD,CAAA,CAAA;AAEH,QAAA,cAAA,UAAA;AAEA,IAAA,iBAAA,EAAA,UAAA,GAAA,YAAA;CACE,OAAA,oBAAA,QAAA;EACU,GAAA;EACN,UAAA,oBAAA,eAAA;GAAe,WAAA;GACb,UAAA,oBAAA,SAAA;IACE,WAAA;IAWC;GACM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AAEA,IAAA,mBAAA,EAAA,WAAA,GAAA,YAAA;CACE,OAAA,oBAAA,QAAA;EAAa,WAAA,GAAA,oDAAA,SAAA;EAA8E,GAAA;CAAY,CAAA;AACzG;AACA,gBAAA,cAAA"}
1
+ {"version":3,"file":"Command.js","names":["React","CommandPrimitive"],"sources":["../../../../src/components/inputs/Command/Command.tsx"],"sourcesContent":["'use client'\n\nimport { MagnifyingGlassIcon } from '@phosphor-icons/react/dist/ssr/MagnifyingGlass'\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport * as React from 'react'\n\nimport { Dialog, DialogContent } from '../../feedback/Dialog'\n\nimport { cn } from '@/lib/utils'\n\nconst Command = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive>>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn('flex size-full flex-col overflow-hidden bg-surface-primary text-primary', className)}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\nconst CommandDialog = ({ children, ...props }: Readonly<DialogProps>) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden surface p-0 surface-list\">\n <Command\n className=\"\n **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-tertiary\n **:[[cmdk-group]]:px-2\n **:[[cmdk-input]]:h-12\n **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3\n [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0\n [&_[cmdk-input-wrapper]_svg]:icon-md\n [&_[cmdk-item]_svg]:icon-md\n \"\n >\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Input>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>>\n>(({ className, children, ...props }, ref) => (\n <div\n data-cmdk-search\n className=\"\n mx-[calc(var(--surface-inset)*2)] mt-[calc(var(--surface-inset)*2)] mb-(--surface-inset) flex\n h-(--control-option-height,max(var(--control-height-md),var(--control-touch-height))) items-center rounded-lg\n border border-input px-3 motion-hover\n focus-within:border-focused focus-within:outline-1 focus-within:-outline-offset-2 focus-within:outline-focused\n focus-within:hover:border-focused\n hover:border-control\n \"\n >\n <MagnifyingGlassIcon className=\"mr-2 icon-md shrink-0 text-tertiary\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n `\n flex size-full rounded-lg bg-transparent py-3 text-(length:--control-option-text,0.875rem)\n leading-(--control-option-leading,1.25rem)\n placeholder:text-tertiary\n disabled:cursor-not-allowed disabled:text-tertiary\n pointer-coarse:text-body-lg\n `,\n className,\n )}\n {...props}\n />\n {children && <div className=\"ml-2\">{children}</div>}\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.List>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\n `\n relative mb-(--surface-inset)\n max-h-[calc(var(--control-option-height,max(var(--control-height-md),var(--control-touch-height)))*6)]\n scrollbar-subtle overflow-x-hidden overflow-y-auto px-(--surface-inset)\n `,\n className,\n )}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Empty>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>>\n>((props, ref) => <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-body-md\" {...props} />)\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Group>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n `\n overflow-hidden text-left text-primary\n **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-body-md\n **:[[cmdk-group-heading]]:font-normal **:[[cmdk-group-heading]]:text-tertiary\n `,\n className,\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Separator>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator ref={ref} className={cn('my-1 h-px bg-surface-tertiary', className)} {...props} />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Item>,\n Readonly<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n `\n relative flex min-h-(--control-option-height,max(var(--control-height-md),var(--control-touch-height)))\n items-center gap-2 surface-item press-fill-strong px-3 py-1.5 text-(length:--control-option-text,0.875rem)\n leading-(--control-option-leading,1.25rem) outline-hidden select-none\n data-[disabled=true]:pointer-events-none data-[disabled=true]:text-tertiary\n data-[selected=true]:bg-surface-tertiary\n [&_svg]:pointer-events-none [&_svg]:icon-md [&_svg]:shrink-0\n `,\n className,\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({ className, ...props }: Readonly<React.HTMLAttributes<HTMLSpanElement>>) => {\n return <span className={cn('ml-auto text-body-sm tracking-widest text-tertiary', className)} {...props} />\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n"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IAAA,mBAAA,QAAA,YAAA,EAAA,WAAA,GAAA,SAAA,QAAA,oBAAA,UAAA,WAAA;CAImC;CAAK,WAAA,GAAA,iCAAA,SAAA;CAA2D,GAAA;AAAY,CAAA,CAAA;AAE/G,iBAAA,cAAA,UAAA,UAAA;AAEA,IAAA,cAAA,QAAA,YAAA,EAAA,WAAA,GAAA,SAAA,QAAA,oBAAA,UAAA,MAAA;CAKS;CACL,WAAA,GAAA;;;;;;;SASE,SAAA;CAEF,GAAA;AACD,CAAA,CAAA;AAGH,YAAA,cAAA,UAAA,KAAA;AAEA,IAAA,mBAAA,EAAA,WAAA,GAAA,YAAA;CACE,OAAA,oBAAA,QAAA;EAAa,WAAA,GAAA,sDAAA,SAAA;EAAgF,GAAA;CAAY,CAAA;AAC3G;AACA,gBAAA,cAAA"}
@@ -1,2 +1 @@
1
- import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "./Command.js";
2
- export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
1
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "./Command.js";
@@ -1,11 +1,11 @@
1
- import { cn, createSearchMatcher } from "../../../lib/utils.js";
2
- import { Combobox } from "../Combobox/Combobox.js";
3
1
  import { Flag } from "../../data-display/Flag/Flag.js";
2
+ import { OptionCheck } from "../../shared/OptionCheck.js";
3
+ import { Combobox } from "../Combobox/Combobox.js";
4
4
  import { buildCountries, regionName, resolveIso, splitByPriority } from "../../../lib/countries.js";
5
+ import { cn, createSearchMatcher } from "../../../lib/utils.js";
5
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import { CheckIcon } from "@phosphor-icons/react/dist/ssr/Check";
7
7
  import { GlobeIcon } from "@phosphor-icons/react/dist/ssr/Globe";
8
- //#region src/components/inputs/CountrySelect/CountrySelect.tsx
8
+ // src/components/inputs/CountrySelect/CountrySelect.tsx
9
9
  function CountrySelect(props) {
10
10
  const { countries, locale = "en", priorityCountries, onChange, renderFlag, getCountryValue, getCountryIsoCode, getCountryName, getCountrySearchTerms, className, disabled = false, placeholder = "Select country", ...comboboxProps } = props;
11
11
  const options = countries ?? buildCountries(locale);
@@ -43,7 +43,7 @@ function CountrySelect(props) {
43
43
  placeholder: /* @__PURE__ */ jsxs("span", {
44
44
  className: "flex items-center gap-2",
45
45
  children: [/* @__PURE__ */ jsx(GlobeIcon, {
46
- className: "h-5 w-5 shrink-0",
46
+ className: "icon-control shrink-0",
47
47
  "aria-hidden": true
48
48
  }), /* @__PURE__ */ jsx("span", {
49
49
  className: "truncate",
@@ -63,15 +63,13 @@ function CountrySelect(props) {
63
63
  if (country) onChange?.(value, country);
64
64
  },
65
65
  renderLabel: renderCountry,
66
- renderOption: (option, isSelected) => /* @__PURE__ */ jsxs(Fragment, { children: [renderCountry(option), isSelected && /* @__PURE__ */ jsx(CheckIcon, {
66
+ renderOption: (option, isSelected) => /* @__PURE__ */ jsxs(Fragment, { children: [renderCountry(option), isSelected && /* @__PURE__ */ jsx(OptionCheck, {
67
67
  "data-testid": "selected-check",
68
- weight: "bold",
69
- className: "ml-auto h-4 w-4 shrink-0 text-neutral-950"
68
+ className: "ml-auto"
70
69
  })] })
71
70
  });
72
71
  }
73
72
  CountrySelect.displayName = "CountrySelect";
74
- //#endregion
75
73
  export { CountrySelect };
76
74
 
77
75
  //# sourceMappingURL=CountrySelect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CountrySelect.js","names":["_Fragment"],"sources":["../../../../src/components/inputs/CountrySelect/CountrySelect.tsx"],"sourcesContent":["import { CheckIcon } from '@phosphor-icons/react/dist/ssr/Check'\nimport { GlobeIcon } from '@phosphor-icons/react/dist/ssr/Globe'\nimport type * as React from 'react'\n\nimport { Flag } from '../../data-display/Flag'\nimport { Combobox, type ComboboxSingleProps } from '../Combobox'\n\nimport type { Country, CountrySelectAccessors } from './types'\n\nimport { buildCountries, regionName, resolveIso, splitByPriority } from '@/lib/countries'\nimport { cn, createSearchMatcher } from '@/lib/utils'\n\ntype CountrySelectComboboxProps = Pick<\n ComboboxSingleProps<object>,\n | 'id'\n | 'className'\n | 'disabled'\n | 'error'\n | 'size'\n | 'value'\n | 'placeholder'\n | 'searchPlaceholder'\n | 'emptyMessage'\n | 'aria-invalid'\n | 'aria-describedby'\n>\n\ntype CountrySelectBaseProps<T> = CountrySelectComboboxProps & {\n /** ISO codes pinned above the list, in order. */\n priorityCountries?: Array<string>\n onChange?: (value: string, country: T) => void\n /** Replaces the default `Flag` in the trigger and the options. */\n renderFlag?: (country: T) => React.ReactNode\n}\n\ntype ResolvedCountrySelectProps<T extends object> = CountrySelectBaseProps<T> &\n Partial<CountrySelectAccessors<T>> & {\n /** Defaults to the generated list. */\n countries?: Array<T>\n /** Ignored when `countries` is passed. */\n locale?: string\n }\n\nexport type CountrySelectDefaultProps = ResolvedCountrySelectProps<Country>\n\nexport type CountrySelectCustomProps<T extends object> = CountrySelectBaseProps<T> &\n CountrySelectAccessors<T> & {\n countries: Array<T>\n }\n\nexport type CountrySelectProps<T extends object = Country> = CountrySelectDefaultProps | CountrySelectCustomProps<T>\n\nexport function CountrySelect(props: Readonly<CountrySelectDefaultProps>): React.ReactElement\nexport function CountrySelect<T extends object>(props: Readonly<CountrySelectCustomProps<T>>): React.ReactElement\nexport function CountrySelect<T extends object>(props: Readonly<ResolvedCountrySelectProps<T>>): React.ReactElement {\n const {\n countries,\n locale = 'en',\n priorityCountries,\n onChange,\n renderFlag,\n getCountryValue,\n getCountryIsoCode,\n getCountryName,\n getCountrySearchTerms,\n className,\n disabled = false,\n placeholder = 'Select country',\n ...comboboxProps\n } = props\n\n const options = countries ?? (buildCountries(locale) as unknown as Array<T>)\n const valueOf = getCountryValue ?? ((option: T) => (option as unknown as Country).isoCode)\n const nameOf = getCountryName ?? ((option: T) => (option as unknown as Country).name)\n const isoOf = (option: T) => resolveIso(valueOf(option), getCountryIsoCode?.(option))\n\n const { priority, rest } = splitByPriority(options, priorityCountries, isoOf)\n\n const filterOptions = (list: Array<T>, search: string) => {\n const matches = createSearchMatcher(search)\n return list.filter((option) => {\n const iso = isoOf(option)\n const terms = [nameOf(option), iso ?? '', ...(getCountrySearchTerms?.(option) ?? [])]\n if (!countries && iso && locale !== 'en') terms.push(regionName(iso))\n return matches(terms)\n })\n }\n\n const renderCountry = (option: T) => {\n const iso = isoOf(option)\n return (\n <span className=\"flex min-w-0 items-center gap-2\">\n {renderFlag ? renderFlag(option) : iso && <Flag iso={iso} />}\n <span className=\"truncate\">{nameOf(option)}</span>\n </span>\n )\n }\n\n return (\n <Combobox<T>\n {...comboboxProps}\n className={cn('w-full', className)}\n disabled={disabled || (options.length <= 1 && !!comboboxProps.value)}\n placeholder={\n <span className=\"flex items-center gap-2\">\n <GlobeIcon className=\"h-5 w-5 shrink-0\" aria-hidden />\n <span className=\"truncate\">{placeholder}</span>\n </span>\n }\n virtualized\n options={rest}\n specialOptions={priority}\n getOptionValue={valueOf}\n getOptionLabel={nameOf}\n filterOptions={filterOptions}\n clearable={false}\n onOpenAutoFocus\n onChange={(value) => {\n const country = options.find((option) => valueOf(option) === value)\n if (country) onChange?.(value, country)\n }}\n renderLabel={renderCountry}\n renderOption={(option, isSelected) => (\n <>\n {renderCountry(option)}\n {isSelected && (\n <CheckIcon\n data-testid=\"selected-check\"\n weight=\"bold\"\n className=\"ml-auto h-4 w-4 shrink-0 text-neutral-950\"\n />\n )}\n </>\n )}\n />\n )\n}\n\nCountrySelect.displayName = 'CountrySelect'\n"],"mappings":";;;;;;;;AAsDA,SAAgB,cAAgC,OAAoE;CAClH,MAAM,EACJ,WACA,SAAS,MACT,mBACA,UACA,YACA,iBACA,mBACA,gBACA,uBACA,WACA,WAAW,OACX,cAAc,kBACd,GAAG,kBACD;CAEJ,MAAM,UAAU,aAAc,eAAe,MAAM;CACnD,MAAM,UAAU,qBAAqB,WAAe,OAA8B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ClE,IAAI,SAAS,WAAW,OAAO,OAAO;EACxC;EACA,aAAa;EACb,eAAe,QAAQ,eACrB,qBAAAA,UAAA,EAAA,UAAA,CACG,cAAc,MAAM,GACpB,cACC,oBAAC,WAAD;GACE,eAAY;GACZ,QAAO;GACP,WAAU;EACX,CAAA,CAEH,EAAA,CAAA;CAEL,CAAA;AAEL;AAEA,cAAc,cAAc"}
1
+ {"version":3,"file":"CountrySelect.js","names":["_Fragment"],"sources":["../../../../src/components/inputs/CountrySelect/CountrySelect.tsx"],"sourcesContent":["import { GlobeIcon } from '@phosphor-icons/react/dist/ssr/Globe'\nimport type * as React from 'react'\n\nimport { Flag } from '../../data-display/Flag'\nimport { OptionCheck } from '../../shared'\nimport { Combobox, type ComboboxSingleProps } from '../Combobox'\n\nimport type { Country, CountrySelectAccessors } from './types'\n\nimport { buildCountries, regionName, resolveIso, splitByPriority } from '@/lib/countries'\nimport { cn, createSearchMatcher } from '@/lib/utils'\n\ntype CountrySelectComboboxProps = Pick<\n ComboboxSingleProps<object>,\n | 'id'\n | 'className'\n | 'disabled'\n | 'error'\n | 'size'\n | 'value'\n | 'placeholder'\n | 'searchPlaceholder'\n | 'emptyMessage'\n | 'aria-invalid'\n | 'aria-describedby'\n>\n\ntype CountrySelectBaseProps<T> = CountrySelectComboboxProps & {\n /** ISO codes pinned above the list, in order. */\n priorityCountries?: Array<string>\n onChange?: (value: string, country: T) => void\n /** Replaces the default `Flag` in the trigger and the options. */\n renderFlag?: (country: T) => React.ReactNode\n}\n\ntype ResolvedCountrySelectProps<T extends object> = CountrySelectBaseProps<T> &\n Partial<CountrySelectAccessors<T>> & {\n /** Defaults to the generated list. */\n countries?: Array<T>\n /** Ignored when `countries` is passed. */\n locale?: string\n }\n\nexport type CountrySelectDefaultProps = ResolvedCountrySelectProps<Country>\n\nexport type CountrySelectCustomProps<T extends object> = CountrySelectBaseProps<T> &\n CountrySelectAccessors<T> & {\n countries: Array<T>\n }\n\nexport type CountrySelectProps<T extends object = Country> = CountrySelectDefaultProps | CountrySelectCustomProps<T>\n\nexport function CountrySelect(props: Readonly<CountrySelectDefaultProps>): React.ReactElement\nexport function CountrySelect<T extends object>(props: Readonly<CountrySelectCustomProps<T>>): React.ReactElement\nexport function CountrySelect<T extends object>(props: Readonly<ResolvedCountrySelectProps<T>>): React.ReactElement {\n const {\n countries,\n locale = 'en',\n priorityCountries,\n onChange,\n renderFlag,\n getCountryValue,\n getCountryIsoCode,\n getCountryName,\n getCountrySearchTerms,\n className,\n disabled = false,\n placeholder = 'Select country',\n ...comboboxProps\n } = props\n\n const options = countries ?? (buildCountries(locale) as unknown as Array<T>)\n const valueOf = getCountryValue ?? ((option: T) => (option as unknown as Country).isoCode)\n const nameOf = getCountryName ?? ((option: T) => (option as unknown as Country).name)\n const isoOf = (option: T) => resolveIso(valueOf(option), getCountryIsoCode?.(option))\n\n const { priority, rest } = splitByPriority(options, priorityCountries, isoOf)\n\n const filterOptions = (list: Array<T>, search: string) => {\n const matches = createSearchMatcher(search)\n return list.filter((option) => {\n const iso = isoOf(option)\n const terms = [nameOf(option), iso ?? '', ...(getCountrySearchTerms?.(option) ?? [])]\n if (!countries && iso && locale !== 'en') terms.push(regionName(iso))\n return matches(terms)\n })\n }\n\n const renderCountry = (option: T) => {\n const iso = isoOf(option)\n return (\n <span className=\"flex min-w-0 items-center gap-2\">\n {renderFlag ? renderFlag(option) : iso && <Flag iso={iso} />}\n <span className=\"truncate\">{nameOf(option)}</span>\n </span>\n )\n }\n\n return (\n <Combobox<T>\n {...comboboxProps}\n className={cn('w-full', className)}\n disabled={disabled || (options.length <= 1 && !!comboboxProps.value)}\n placeholder={\n <span className=\"flex items-center gap-2\">\n <GlobeIcon className=\"icon-control shrink-0\" aria-hidden />\n <span className=\"truncate\">{placeholder}</span>\n </span>\n }\n virtualized\n options={rest}\n specialOptions={priority}\n getOptionValue={valueOf}\n getOptionLabel={nameOf}\n filterOptions={filterOptions}\n clearable={false}\n onOpenAutoFocus\n onChange={(value) => {\n const country = options.find((option) => valueOf(option) === value)\n if (country) onChange?.(value, country)\n }}\n renderLabel={renderCountry}\n renderOption={(option, isSelected) => (\n <>\n {renderCountry(option)}\n {isSelected && <OptionCheck data-testid=\"selected-check\" className=\"ml-auto\" />}\n </>\n )}\n />\n )\n}\n\nCountrySelect.displayName = 'CountrySelect'\n"],"mappings":";;;;;;;;AAsDA,SAAgB,cAAgC,OAAoE;CAClH,MAAM,EACJ,WACA,SAAS,MACT,mBACA,UACA,YACA,iBACA,mBACA,gBACA,uBACA,WACA,WAAW,OACX,cAAc,kBACd,GAAG,kBACD;CAEJ,MAAM,UAAU,aAAc,eAAe,MAAM;CACnD,MAAM,UAAU,qBAAqB,WAAe,OAA8B;CAClF,MAAM,SAAS,oBAAoB,WAAe,OAA8B;CAChF,MAAM,SAAS,WAAc,WAAW,QAAQ,MAAM,GAAG,oBAAoB,MAAM,CAAC;CAEpF,MAAM,EAAE,UAAU,SAAS,gBAAgB,SAAS,mBAAmB,KAAK;CAE5E,MAAM,iBAAiB,MAAgB,WAAmB;EACxD,MAAM,UAAU,oBAAoB,MAAM;EAC1C,OAAO,KAAK,QAAQ,WAAW;GAC7B,MAAM,MAAM,MAAM,MAAM;GACxB,MAAM,QAAQ;IAAC,OAAO,MAAM;IAAG,OAAO;IAAI,GAAI,wBAAwB,MAAM,KAAK,CAAC;GAAE;GACpF,IAAI,CAAC,aAAa,OAAO,WAAW,MAAM,MAAM,KAAK,WAAW,GAAG,CAAC;GACpE,OAAO,QAAQ,KAAK;EACtB,CAAC;CACH;CAEA,MAAM,iBAAiB,WAAc;EACnC,MAAM,MAAM,MAAM,MAAM;EACxB,OACE,qBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA,CACG,aAAa,WAAW,MAAM,IAAI,OAAO,oBAAC,MAAD,EAAW,IAAM,CAAA,GAC3D,oBAAC,QAAD;IAAM,WAAU;IAAY,UAAA,OAAO,MAAM;GAAQ,CAAA,CAC7C;;CAEV;CAEA,OACE,oBAAC,UAAD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