@cfx-dev/ui-components 4.5.22 → 5.0.2

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 (354) hide show
  1. package/dist/DropdownContent-BMfQCuaP.js +964 -0
  2. package/dist/Table.module-CMz5ENmI.js +17 -0
  3. package/dist/assets/all_css.css +1 -1
  4. package/dist/assets/css/Accordion.css +1 -1
  5. package/dist/assets/css/AccordionShowcase.css +1 -1
  6. package/dist/assets/css/Avatar.css +1 -1
  7. package/dist/assets/css/Badge.css +1 -1
  8. package/dist/assets/css/BurgerMenu.css +1 -1
  9. package/dist/assets/css/Button.css +1 -1
  10. package/dist/assets/css/Checkbox.css +1 -1
  11. package/dist/assets/css/ControlBox.css +1 -1
  12. package/dist/assets/css/CountryFlag.css +1 -1
  13. package/dist/assets/css/DataTable.css +1 -1
  14. package/dist/assets/css/Dot.css +1 -1
  15. package/dist/assets/css/DropdownContent.css +1 -1
  16. package/dist/assets/css/DropdownSelect.css +1 -1
  17. package/dist/assets/css/FlexShowcase.css +1 -1
  18. package/dist/assets/css/Flyout.css +1 -1
  19. package/dist/assets/css/FormField.css +1 -0
  20. package/dist/assets/css/Icon.css +1 -1
  21. package/dist/assets/css/IconButton.css +1 -1
  22. package/dist/assets/css/InfoPanel.css +1 -1
  23. package/dist/assets/css/Input.css +1 -1
  24. package/dist/assets/css/InputDropzone.css +1 -1
  25. package/dist/assets/css/Island.css +1 -1
  26. package/dist/assets/css/ItemPreview.css +1 -1
  27. package/dist/assets/css/Link.css +1 -1
  28. package/dist/assets/css/Loaf.css +1 -1
  29. package/dist/assets/css/Modal.css +1 -1
  30. package/dist/assets/css/NavList.css +1 -1
  31. package/dist/assets/css/Page.css +1 -1
  32. package/dist/assets/css/Popover.css +1 -1
  33. package/dist/assets/css/Prose.css +1 -1
  34. package/dist/assets/css/Radio.css +1 -1
  35. package/dist/assets/css/Range.css +1 -1
  36. package/dist/assets/css/RangeInput.css +1 -1
  37. package/dist/assets/css/RichInput.css +1 -1
  38. package/dist/assets/css/Select.css +1 -1
  39. package/dist/assets/css/Separator.css +1 -1
  40. package/dist/assets/css/Skeleton.css +1 -1
  41. package/dist/assets/css/Slider.css +1 -1
  42. package/dist/assets/css/StyledInput.css +1 -1
  43. package/dist/assets/css/StyledTextarea.css +1 -1
  44. package/dist/assets/css/Switch.css +1 -1
  45. package/dist/assets/css/Table.css +1 -1
  46. package/dist/assets/css/Tabular.css +1 -1
  47. package/dist/assets/css/Text.css +1 -1
  48. package/dist/assets/css/TextShowcase.css +1 -1
  49. package/dist/assets/css/Textarea.css +1 -1
  50. package/dist/assets/css/Title.css +1 -1
  51. package/dist/assets/css/ToggleGroup.css +1 -1
  52. package/dist/assets/general/global.css +1 -1
  53. package/dist/cfxIcons-0xD_EEXT.js +110 -0
  54. package/dist/cfxIconsXLarge-D0vz6Yd_.js +110 -0
  55. package/dist/components/Accordion/Accordion.d.ts +0 -3
  56. package/dist/components/Accordion/Accordion.js +117 -121
  57. package/dist/components/Accordion/AccordionShowcase.js +22 -26
  58. package/dist/components/Avatar/Avatar.d.ts +1 -1
  59. package/dist/components/Avatar/Avatar.js +12 -12
  60. package/dist/components/Avatar/AvatarShowcase.js +4 -4
  61. package/dist/components/Badge/Badge.d.ts +1 -1
  62. package/dist/components/Badge/Badge.js +7 -7
  63. package/dist/components/Badge/BadgeShowcase.js +20 -20
  64. package/dist/components/BurgerMenu/BurgerMenu.js +7 -7
  65. package/dist/components/BurgerMenu/BurgerMenuShowcase.js +8 -8
  66. package/dist/components/Button/Button.d.ts +1 -1
  67. package/dist/components/Button/Button.js +15 -15
  68. package/dist/components/Button/ButtonShowcase.js +80 -57
  69. package/dist/components/Checkbox/Checkbox.d.ts +4 -1
  70. package/dist/components/Checkbox/Checkbox.js +276 -191
  71. package/dist/components/Checkbox/CheckboxShowcase.js +170 -29
  72. package/dist/components/ControlBox/ControlBox.d.ts +1 -1
  73. package/dist/components/ControlBox/ControlBox.js +17 -17
  74. package/dist/components/DataTable/DataTableShowcase.js +5 -5
  75. package/dist/components/Dot/Dot.d.ts +1 -1
  76. package/dist/components/Dot/Dot.js +15 -15
  77. package/dist/components/DropdownContent/DropdownContent.d.ts +1 -5
  78. package/dist/components/DropdownContent/DropdownContent.js +2 -3
  79. package/dist/components/DropdownContent/index.d.ts +1 -1
  80. package/dist/components/DropdownContent/index.js +2 -3
  81. package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -2
  82. package/dist/components/DropdownMenu/DropdownMenu.js +17 -19
  83. package/dist/components/DropdownSelect/DropdownSelect.d.ts +0 -5
  84. package/dist/components/DropdownSelect/DropdownSelect.js +47 -55
  85. package/dist/components/DropdownSelect/DropdownSelectShowcase.js +10 -11
  86. package/dist/components/Flyout/Flyout.d.ts +1 -1
  87. package/dist/components/Flyout/Flyout.js +10 -10
  88. package/dist/components/FormField/FormField.d.ts +20 -0
  89. package/dist/components/FormField/FormField.js +68 -0
  90. package/dist/components/FormField/FormFieldShowcase.d.ts +5 -0
  91. package/dist/components/FormField/FormFieldShowcase.js +59 -0
  92. package/dist/components/FormField/index.d.ts +1 -0
  93. package/dist/components/FormField/index.js +4 -0
  94. package/dist/components/Icon/Icon.d.ts +6 -2
  95. package/dist/components/Icon/Icon.js +33 -32
  96. package/dist/components/IconButton/IconButton.js +1 -1
  97. package/dist/components/Icons/Icons.types.d.ts +1 -3
  98. package/dist/components/Icons/IconsShowcase.js +224 -92
  99. package/dist/components/Icons/cfx-icons/Cart.js +17 -33
  100. package/dist/components/Icons/cfx-icons/Close.js +7 -8
  101. package/dist/components/Icons/cfx-icons/Controller.js +13 -20
  102. package/dist/components/Icons/cfx-icons/Copy.js +6 -7
  103. package/dist/components/Icons/cfx-icons/DownArrow.js +4 -5
  104. package/dist/components/Icons/cfx-icons/DownChevron.js +4 -5
  105. package/dist/components/Icons/cfx-icons/Download.js +6 -7
  106. package/dist/components/Icons/cfx-icons/Expand.js +1 -1
  107. package/dist/components/Icons/cfx-icons/ExternalLink.js +9 -10
  108. package/dist/components/Icons/cfx-icons/Filter.js +9 -9
  109. package/dist/components/Icons/cfx-icons/Folder.d.ts +5 -0
  110. package/dist/components/Icons/cfx-icons/Folder.js +24 -0
  111. package/dist/components/Icons/cfx-icons/Heart.js +9 -10
  112. package/dist/components/Icons/cfx-icons/HeartFilled.js +3 -4
  113. package/dist/components/Icons/cfx-icons/Help.js +9 -10
  114. package/dist/components/Icons/cfx-icons/LeftArrow.js +9 -10
  115. package/dist/components/Icons/cfx-icons/LeftChevron.js +7 -8
  116. package/dist/components/Icons/cfx-icons/Map.js +14 -30
  117. package/dist/components/Icons/cfx-icons/Menu.js +17 -40
  118. package/dist/components/Icons/cfx-icons/Minus.js +2 -3
  119. package/dist/components/Icons/cfx-icons/More.js +4 -5
  120. package/dist/components/Icons/cfx-icons/MoreInfo.js +6 -7
  121. package/dist/components/Icons/cfx-icons/Pencil.js +3 -3
  122. package/dist/components/Icons/cfx-icons/Play.js +6 -6
  123. package/dist/components/Icons/cfx-icons/Plus.js +4 -5
  124. package/dist/components/Icons/cfx-icons/Radio.js +15 -25
  125. package/dist/components/Icons/cfx-icons/Refresh.js +10 -11
  126. package/dist/components/Icons/cfx-icons/RightArrow.js +9 -10
  127. package/dist/components/Icons/cfx-icons/RightChevron.js +4 -5
  128. package/dist/components/Icons/cfx-icons/Search.js +9 -10
  129. package/dist/components/Icons/cfx-icons/ServerList.d.ts +5 -0
  130. package/dist/components/Icons/cfx-icons/ServerList.js +24 -0
  131. package/dist/components/Icons/cfx-icons/ServerReconnect.d.ts +5 -0
  132. package/dist/components/Icons/cfx-icons/ServerReconnect.js +24 -0
  133. package/dist/components/Icons/cfx-icons/Sort.js +6 -7
  134. package/dist/components/Icons/cfx-icons/Square.js +8 -9
  135. package/dist/components/Icons/cfx-icons/SquareFilled.d.ts +5 -0
  136. package/dist/components/Icons/cfx-icons/SquareFilled.js +23 -0
  137. package/dist/components/Icons/cfx-icons/SquareTick.d.ts +5 -0
  138. package/dist/components/Icons/cfx-icons/SquareTick.js +26 -0
  139. package/dist/components/Icons/cfx-icons/Stop.js +7 -8
  140. package/dist/components/Icons/cfx-icons/Success.d.ts +5 -0
  141. package/dist/components/Icons/cfx-icons/Success.js +26 -0
  142. package/dist/components/Icons/cfx-icons/Tick.js +4 -5
  143. package/dist/components/Icons/cfx-icons/Transfer.js +7 -8
  144. package/dist/components/Icons/cfx-icons/Trash.js +6 -6
  145. package/dist/components/Icons/cfx-icons/Undo.js +5 -6
  146. package/dist/components/Icons/cfx-icons/UpArrow.js +9 -10
  147. package/dist/components/Icons/cfx-icons/UpChevron.js +4 -5
  148. package/dist/components/Icons/cfx-icons/Upload.js +7 -8
  149. package/dist/components/Icons/cfx-icons/UpvotesBurst.js +10 -10
  150. package/dist/components/Icons/cfx-icons/UpvotesRecurring.js +10 -11
  151. package/dist/components/Icons/cfx-icons/User.js +13 -20
  152. package/dist/components/Icons/cfx-icons/Users.js +13 -32
  153. package/dist/components/Icons/cfx-icons/Verified.js +1 -1
  154. package/dist/components/Icons/cfx-icons/Visibility.js +8 -8
  155. package/dist/components/Icons/cfx-icons/VisibilityOff.js +1 -1
  156. package/dist/components/Icons/cfx-icons/Warning.js +9 -10
  157. package/dist/components/Icons/cfx-iconsXLarge/Cart.d.ts +5 -0
  158. package/dist/components/Icons/cfx-iconsXLarge/Cart.js +26 -0
  159. package/dist/components/Icons/cfx-iconsXLarge/Close.d.ts +5 -0
  160. package/dist/components/Icons/cfx-iconsXLarge/Close.js +26 -0
  161. package/dist/components/Icons/cfx-iconsXLarge/Controller.d.ts +5 -0
  162. package/dist/components/Icons/cfx-iconsXLarge/Controller.js +24 -0
  163. package/dist/components/Icons/cfx-iconsXLarge/Copy.d.ts +5 -0
  164. package/dist/components/Icons/cfx-iconsXLarge/Copy.js +26 -0
  165. package/dist/components/Icons/cfx-iconsXLarge/DownArrow.d.ts +5 -0
  166. package/dist/components/Icons/cfx-iconsXLarge/DownArrow.js +26 -0
  167. package/dist/components/Icons/cfx-iconsXLarge/DownChevron.d.ts +5 -0
  168. package/dist/components/Icons/cfx-iconsXLarge/DownChevron.js +26 -0
  169. package/dist/components/Icons/cfx-iconsXLarge/Download.d.ts +5 -0
  170. package/dist/components/Icons/cfx-iconsXLarge/Download.js +26 -0
  171. package/dist/components/Icons/cfx-iconsXLarge/Expand.d.ts +5 -0
  172. package/dist/components/Icons/cfx-iconsXLarge/Expand.js +26 -0
  173. package/dist/components/Icons/cfx-iconsXLarge/ExternalLink.d.ts +5 -0
  174. package/dist/components/Icons/cfx-iconsXLarge/ExternalLink.js +26 -0
  175. package/dist/components/Icons/cfx-iconsXLarge/Filter.d.ts +5 -0
  176. package/dist/components/Icons/cfx-iconsXLarge/Filter.js +23 -0
  177. package/dist/components/Icons/cfx-iconsXLarge/Folder.d.ts +5 -0
  178. package/dist/components/Icons/cfx-iconsXLarge/Folder.js +24 -0
  179. package/dist/components/Icons/cfx-iconsXLarge/Heart.d.ts +5 -0
  180. package/dist/components/Icons/cfx-iconsXLarge/Heart.js +24 -0
  181. package/dist/components/Icons/cfx-iconsXLarge/HeartFilled.d.ts +5 -0
  182. package/dist/components/Icons/cfx-iconsXLarge/HeartFilled.js +24 -0
  183. package/dist/components/Icons/cfx-iconsXLarge/Help.d.ts +5 -0
  184. package/dist/components/Icons/cfx-iconsXLarge/Help.js +26 -0
  185. package/dist/components/Icons/cfx-iconsXLarge/LeftArrow.d.ts +5 -0
  186. package/dist/components/Icons/cfx-iconsXLarge/LeftArrow.js +26 -0
  187. package/dist/components/Icons/cfx-iconsXLarge/LeftChevron.d.ts +5 -0
  188. package/dist/components/Icons/cfx-iconsXLarge/LeftChevron.js +26 -0
  189. package/dist/components/Icons/cfx-iconsXLarge/Map.d.ts +5 -0
  190. package/dist/components/Icons/cfx-iconsXLarge/Map.js +23 -0
  191. package/dist/components/Icons/cfx-iconsXLarge/Menu.d.ts +5 -0
  192. package/dist/components/Icons/cfx-iconsXLarge/Menu.js +26 -0
  193. package/dist/components/Icons/cfx-iconsXLarge/Minus.d.ts +5 -0
  194. package/dist/components/Icons/{cfx-icons-big/Upload.js → cfx-iconsXLarge/Minus.js} +2 -3
  195. package/dist/components/Icons/cfx-iconsXLarge/More.d.ts +5 -0
  196. package/dist/components/Icons/cfx-iconsXLarge/More.js +26 -0
  197. package/dist/components/Icons/cfx-iconsXLarge/MoreInfo.d.ts +5 -0
  198. package/dist/components/Icons/cfx-iconsXLarge/MoreInfo.js +26 -0
  199. package/dist/components/Icons/cfx-iconsXLarge/Pencil.d.ts +5 -0
  200. package/dist/components/Icons/cfx-iconsXLarge/Pencil.js +25 -0
  201. package/dist/components/Icons/cfx-iconsXLarge/Play.d.ts +5 -0
  202. package/dist/components/Icons/cfx-iconsXLarge/Play.js +25 -0
  203. package/dist/components/Icons/cfx-iconsXLarge/Plus.d.ts +5 -0
  204. package/dist/components/Icons/cfx-iconsXLarge/Plus.js +26 -0
  205. package/dist/components/Icons/cfx-iconsXLarge/Radio.d.ts +5 -0
  206. package/dist/components/Icons/cfx-iconsXLarge/Radio.js +26 -0
  207. package/dist/components/Icons/cfx-iconsXLarge/Refresh.d.ts +5 -0
  208. package/dist/components/Icons/cfx-iconsXLarge/Refresh.js +26 -0
  209. package/dist/components/Icons/cfx-iconsXLarge/RightArrow.d.ts +5 -0
  210. package/dist/components/Icons/cfx-iconsXLarge/RightArrow.js +26 -0
  211. package/dist/components/Icons/cfx-iconsXLarge/RightChevron.d.ts +5 -0
  212. package/dist/components/Icons/cfx-iconsXLarge/RightChevron.js +26 -0
  213. package/dist/components/Icons/cfx-iconsXLarge/Search.d.ts +5 -0
  214. package/dist/components/Icons/cfx-iconsXLarge/Search.js +26 -0
  215. package/dist/components/Icons/cfx-iconsXLarge/ServerList.d.ts +5 -0
  216. package/dist/components/Icons/cfx-iconsXLarge/ServerList.js +24 -0
  217. package/dist/components/Icons/cfx-iconsXLarge/ServerReconnect.d.ts +5 -0
  218. package/dist/components/Icons/cfx-iconsXLarge/ServerReconnect.js +24 -0
  219. package/dist/components/Icons/cfx-iconsXLarge/Sort.d.ts +5 -0
  220. package/dist/components/Icons/cfx-iconsXLarge/Sort.js +26 -0
  221. package/dist/components/Icons/cfx-iconsXLarge/Square.d.ts +5 -0
  222. package/dist/components/Icons/cfx-iconsXLarge/Square.js +23 -0
  223. package/dist/components/Icons/cfx-iconsXLarge/SquareFilled.d.ts +5 -0
  224. package/dist/components/Icons/cfx-iconsXLarge/SquareFilled.js +26 -0
  225. package/dist/components/Icons/cfx-iconsXLarge/SquareTick.d.ts +5 -0
  226. package/dist/components/Icons/cfx-iconsXLarge/SquareTick.js +26 -0
  227. package/dist/components/Icons/cfx-iconsXLarge/Stop.d.ts +5 -0
  228. package/dist/components/Icons/cfx-iconsXLarge/Stop.js +26 -0
  229. package/dist/components/Icons/cfx-iconsXLarge/Success.d.ts +5 -0
  230. package/dist/components/Icons/cfx-iconsXLarge/Success.js +26 -0
  231. package/dist/components/Icons/cfx-iconsXLarge/Tick.d.ts +5 -0
  232. package/dist/components/Icons/cfx-iconsXLarge/Tick.js +26 -0
  233. package/dist/components/Icons/cfx-iconsXLarge/Transfer.d.ts +5 -0
  234. package/dist/components/Icons/cfx-iconsXLarge/Transfer.js +26 -0
  235. package/dist/components/Icons/cfx-iconsXLarge/Trash.d.ts +5 -0
  236. package/dist/components/Icons/cfx-iconsXLarge/Trash.js +23 -0
  237. package/dist/components/Icons/cfx-iconsXLarge/Undo.d.ts +5 -0
  238. package/dist/components/Icons/cfx-iconsXLarge/Undo.js +26 -0
  239. package/dist/components/Icons/cfx-iconsXLarge/UpArrow.d.ts +5 -0
  240. package/dist/components/Icons/cfx-iconsXLarge/UpArrow.js +26 -0
  241. package/dist/components/Icons/cfx-iconsXLarge/UpChevron.d.ts +5 -0
  242. package/dist/components/Icons/cfx-iconsXLarge/UpChevron.js +26 -0
  243. package/dist/components/Icons/cfx-iconsXLarge/Upload.js +26 -0
  244. package/dist/components/Icons/cfx-iconsXLarge/UpvotesBurst.d.ts +5 -0
  245. package/dist/components/Icons/cfx-iconsXLarge/UpvotesBurst.js +26 -0
  246. package/dist/components/Icons/cfx-iconsXLarge/UpvotesRecurring.d.ts +5 -0
  247. package/dist/components/Icons/cfx-iconsXLarge/UpvotesRecurring.js +26 -0
  248. package/dist/components/Icons/cfx-iconsXLarge/User.d.ts +5 -0
  249. package/dist/components/Icons/cfx-iconsXLarge/User.js +24 -0
  250. package/dist/components/Icons/cfx-iconsXLarge/Users.d.ts +5 -0
  251. package/dist/components/Icons/cfx-iconsXLarge/Users.js +24 -0
  252. package/dist/components/Icons/cfx-iconsXLarge/Verified.d.ts +5 -0
  253. package/dist/components/Icons/cfx-iconsXLarge/Verified.js +23 -0
  254. package/dist/components/Icons/cfx-iconsXLarge/Visibility.d.ts +5 -0
  255. package/dist/components/Icons/cfx-iconsXLarge/Visibility.js +23 -0
  256. package/dist/components/Icons/cfx-iconsXLarge/VisibilityOff.d.ts +5 -0
  257. package/dist/components/Icons/cfx-iconsXLarge/VisibilityOff.js +23 -0
  258. package/dist/components/Icons/cfx-iconsXLarge/Warning.js +26 -0
  259. package/dist/components/Icons/cfxIcons.d.ts +6 -1
  260. package/dist/components/Icons/cfxIcons.js +88 -78
  261. package/dist/components/Icons/cfxIconsXLarge.d.ts +52 -0
  262. package/dist/components/Icons/cfxIconsXLarge.js +106 -0
  263. package/dist/components/Icons/index.d.ts +2 -2
  264. package/dist/components/Icons/index.js +3 -3
  265. package/dist/components/InfoPanel/InfoPanel.d.ts +1 -1
  266. package/dist/components/InfoPanel/InfoPanel.js +10 -10
  267. package/dist/components/InfoPanel/InfoPanelShowcase.js +30 -30
  268. package/dist/components/Input/Input.d.ts +3 -3
  269. package/dist/components/Input/Input.js +94 -107
  270. package/dist/components/Input/Input.types.d.ts +1 -1
  271. package/dist/components/Input/InputShowcase.js +80 -64
  272. package/dist/components/Input/RichInput.js +48 -62
  273. package/dist/components/InputDropzone/InputDropzone.js +52 -43
  274. package/dist/components/InputDropzone/ItemPreview.js +23 -21
  275. package/dist/components/Layout/Pad/Pad.d.ts +2 -2
  276. package/dist/components/Layout/Pad/Pad.js +1 -1
  277. package/dist/components/Link/LinkShowcase.js +39 -39
  278. package/dist/components/Loaf/Loaf.d.ts +2 -2
  279. package/dist/components/Loaf/Loaf.js +15 -15
  280. package/dist/components/Modal/Modal.d.ts +3 -3
  281. package/dist/components/Modal/Modal.js +26 -26
  282. package/dist/components/Modal/ModalShowcase.js +13 -13
  283. package/dist/components/Pagination/Pagination.js +5 -5
  284. package/dist/components/RSC/Flex/Flex.d.ts +2 -2
  285. package/dist/components/RSC/Flex/Flex.js +17 -17
  286. package/dist/components/Radio/Radio.d.ts +1 -1
  287. package/dist/components/Radio/Radio.js +19 -19
  288. package/dist/components/Range/RangeShowcase.js +10 -10
  289. package/dist/components/Select/Select.d.ts +0 -3
  290. package/dist/components/Select/Select.js +372 -391
  291. package/dist/components/Select/SelectShowcase.js +20 -47
  292. package/dist/components/Separator/Separator.d.ts +1 -2
  293. package/dist/components/Separator/Separator.js +29 -42
  294. package/dist/components/Skeleton/SkeletonShowcase.js +12 -12
  295. package/dist/components/Slider/SliderShowcase.js +6 -6
  296. package/dist/components/StyledInput/StyledInput.d.ts +3 -3
  297. package/dist/components/StyledInput/StyledInput.js +16 -32
  298. package/dist/components/Switch/Switch.d.ts +6 -0
  299. package/dist/components/Switch/Switch.js +99 -85
  300. package/dist/components/Table/TableBody.js +1 -1
  301. package/dist/components/Table/TableCell.js +1 -1
  302. package/dist/components/Table/TableCellCheckbox.js +1 -1
  303. package/dist/components/Table/TableHeader.js +1 -1
  304. package/dist/components/Table/TableIconButton.js +1 -1
  305. package/dist/components/Table/TableRoot.js +1 -1
  306. package/dist/components/Table/TableRow.d.ts +1 -1
  307. package/dist/components/Table/TableRow.js +8 -8
  308. package/dist/components/TableResponsiveText/TableResponsiveText.js +4 -4
  309. package/dist/components/Tabular/TabularShowcase.js +22 -22
  310. package/dist/components/Text/BodyShowcase.js +261 -48
  311. package/dist/components/Text/HeadingShowcase.js +179 -24
  312. package/dist/components/Text/Text.d.ts +1 -0
  313. package/dist/components/Text/Text.js +62 -57
  314. package/dist/components/Text/Text.types.d.ts +6 -4
  315. package/dist/components/Text/TextShowcase.d.ts +15 -6
  316. package/dist/components/Text/TextShowcase.js +63 -38
  317. package/dist/components/Title/TitleShowcase.js +97 -17
  318. package/dist/components/ToggleGroup/ToggleGroup.d.ts +1 -1
  319. package/dist/components/ToggleGroup/ToggleGroup.js +22 -22
  320. package/dist/components/ToggleGroup/ToggleGroupShowcase.js +76 -40
  321. package/dist/main.d.ts +5 -6
  322. package/dist/main.js +87 -87
  323. package/dist/styles-scss/_ui.scss +94 -14
  324. package/dist/styles-scss/global.scss +17 -15
  325. package/dist/styles-scss/tokens.scss +158 -53
  326. package/dist/utils/ui/index.d.ts +2 -2
  327. package/dist/utils/ui/index.js +12 -10
  328. package/dist/utils/ui/ui.d.ts +7 -2
  329. package/dist/utils/ui/ui.js +64 -46
  330. package/dist/utils/ui/ui.types.d.ts +67 -22
  331. package/dist/utils/ui/ui.types.js +10 -7
  332. package/package.json +1 -1
  333. package/dist/DropdownContent-MvHlrWi6.js +0 -989
  334. package/dist/Table.module-DffST69u.js +0 -17
  335. package/dist/assets/css/IconBig.css +0 -1
  336. package/dist/cfxIcons-B4SQ4Ljd.js +0 -100
  337. package/dist/cfxIconsBig-BLJjMT-Y.js +0 -16
  338. package/dist/components/IconBig/IconBig.d.ts +0 -13
  339. package/dist/components/IconBig/IconBig.js +0 -78
  340. package/dist/components/IconBig/index.d.ts +0 -2
  341. package/dist/components/IconBig/index.js +0 -4
  342. package/dist/components/Icons/cfx-icons/SquareCheck.d.ts +0 -5
  343. package/dist/components/Icons/cfx-icons/SquareCheck.js +0 -27
  344. package/dist/components/Icons/cfx-icons-big/Confirm.d.ts +0 -5
  345. package/dist/components/Icons/cfx-icons-big/Confirm.js +0 -39
  346. package/dist/components/Icons/cfx-icons-big/Like.d.ts +0 -5
  347. package/dist/components/Icons/cfx-icons-big/Like.js +0 -25
  348. package/dist/components/Icons/cfx-icons-big/Subscriptions.d.ts +0 -5
  349. package/dist/components/Icons/cfx-icons-big/Subscriptions.js +0 -33
  350. package/dist/components/Icons/cfx-icons-big/Warning.js +0 -27
  351. package/dist/components/Icons/cfxIconsBig.d.ts +0 -5
  352. package/dist/components/Icons/cfxIconsBig.js +0 -12
  353. /package/dist/components/Icons/{cfx-icons-big → cfx-iconsXLarge}/Upload.d.ts +0 -0
  354. /package/dist/components/Icons/{cfx-icons-big → cfx-iconsXLarge}/Warning.d.ts +0 -0
@@ -1,24 +1,23 @@
1
- import { jsx as i, jsxs as $, Fragment as Pe } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as $, Fragment as be } from "react/jsx-runtime";
2
2
  import * as l from "react";
3
3
  import q from "react";
4
4
  import { R as ft, r as De } from "../../index-Cl_RnsqN.js";
5
- import { c as Ee } from "../../index-rKs9bXHr.js";
6
- import { e as K, P as N, u as Oe, c as mt, b as B, a as P, f as ht } from "../../index-CfQtbUfi.js";
7
- import { u as gt, c as vt } from "../../index-9LBuZ7x4.js";
8
- import { c as Le, d as _t, u as Ne, A as St, a as wt, h as xt, b as yt, R as Ct, F as It, D as Tt, C as bt, e as Pt } from "../../Combination-CcTTSYNP.js";
5
+ import { c as Re } from "../../index-rKs9bXHr.js";
6
+ import { e as z, P as N, u as Oe, c as mt, b as V, a as b, f as ht } from "../../index-CfQtbUfi.js";
7
+ import { u as vt, c as gt } from "../../index-9LBuZ7x4.js";
8
+ import { c as Le, d as St, u as Ne, A as wt, a as yt, h as Ct, b as xt, R as _t, F as It, D as Tt, C as Pt, e as bt } from "../../Combination-CcTTSYNP.js";
9
9
  import { u as Nt } from "../../index-BZPx6jYI.js";
10
- import { Icon as Rt } from "../Icon/Icon.js";
11
- import { clsx as xe } from "../../utils/clsx.js";
12
- import { ui as Et } from "../../utils/ui/ui.js";
13
- var Ot = "Portal", ke = l.forwardRef((t, o) => {
14
- var a;
10
+ import { Icon as Et } from "../Icon/Icon.js";
11
+ import { clsx as Ce } from "../../utils/clsx.js";
12
+ var Rt = "Portal", ke = l.forwardRef((t, o) => {
13
+ var s;
15
14
  const { container: e, ...r } = t, [n, d] = l.useState(!1);
16
- K(() => d(!0), []);
17
- const c = e || n && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
18
- return c ? ft.createPortal(/* @__PURE__ */ i(N.div, { ...r, ref: o }), c) : null;
15
+ z(() => d(!0), []);
16
+ const a = e || n && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
17
+ return a ? ft.createPortal(/* @__PURE__ */ i(N.div, { ...r, ref: o }), a) : null;
19
18
  });
20
- ke.displayName = Ot;
21
- var ze = Object.freeze({
19
+ ke.displayName = Rt;
20
+ var Be = Object.freeze({
22
21
  // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
23
22
  position: "absolute",
24
23
  border: 0,
@@ -30,54 +29,54 @@ var ze = Object.freeze({
30
29
  clip: "rect(0, 0, 0, 0)",
31
30
  whiteSpace: "nowrap",
32
31
  wordWrap: "normal"
33
- }), Mt = "VisuallyHidden", At = l.forwardRef(
32
+ }), Ot = "VisuallyHidden", Mt = l.forwardRef(
34
33
  (t, o) => /* @__PURE__ */ i(
35
34
  N.span,
36
35
  {
37
36
  ...t,
38
37
  ref: o,
39
- style: { ...ze, ...t.style }
38
+ style: { ...Be, ...t.style }
40
39
  }
41
40
  )
42
41
  );
43
- At.displayName = Mt;
44
- var Dt = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = [" ", "Enter"], oe = "Select", [pe, fe, kt] = vt(oe), [le, Bo] = mt(oe, [
45
- kt,
42
+ Mt.displayName = Ot;
43
+ var At = [" ", "Enter", "ArrowUp", "ArrowDown"], Dt = [" ", "Enter"], oe = "Select", [pe, fe, Lt] = gt(oe), [le, Lo] = mt(oe, [
44
+ Lt,
46
45
  Le
47
- ]), me = Le(), [zt, Z] = le(oe), [Bt, Vt] = le(oe), Be = (t) => {
46
+ ]), me = Le(), [kt, Z] = le(oe), [Bt, Vt] = le(oe), Ve = (t) => {
48
47
  const {
49
48
  __scopeSelect: o,
50
49
  children: e,
51
50
  open: r,
52
51
  defaultOpen: n,
53
52
  onOpenChange: d,
54
- value: c,
55
- defaultValue: a,
56
- onValueChange: s,
53
+ value: a,
54
+ defaultValue: s,
55
+ onValueChange: c,
57
56
  dir: p,
58
- name: v,
59
- autoComplete: _,
60
- disabled: T,
61
- required: b,
62
- form: S
63
- } = t, u = me(o), [g, y] = l.useState(null), [f, h] = l.useState(null), [M, A] = l.useState(!1), se = gt(p), [R, k] = Oe({
57
+ name: g,
58
+ autoComplete: S,
59
+ disabled: _,
60
+ required: P,
61
+ form: T
62
+ } = t, u = me(o), [v, C] = l.useState(null), [f, h] = l.useState(null), [M, A] = l.useState(!1), ce = vt(p), [E, L] = Oe({
64
63
  prop: r,
65
64
  defaultProp: n ?? !1,
66
65
  onChange: d,
67
66
  caller: oe
68
67
  }), [j, Q] = Oe({
69
- prop: c,
70
- defaultProp: a,
71
- onChange: s,
68
+ prop: a,
69
+ defaultProp: s,
70
+ onChange: c,
72
71
  caller: oe
73
- }), V = l.useRef(null), H = g ? S || !!g.closest("form") : !0, [G, W] = l.useState(/* @__PURE__ */ new Set()), F = Array.from(G).map((E) => E.props.value).join(";");
74
- return /* @__PURE__ */ i(_t, { ...u, children: /* @__PURE__ */ $(
75
- zt,
72
+ }), H = l.useRef(null), W = v ? T || !!v.closest("form") : !0, [G, U] = l.useState(/* @__PURE__ */ new Set()), F = Array.from(G).map((R) => R.props.value).join(";");
73
+ return /* @__PURE__ */ i(St, { ...u, children: /* @__PURE__ */ $(
74
+ kt,
76
75
  {
77
- required: b,
76
+ required: P,
78
77
  scope: o,
79
- trigger: g,
80
- onTriggerChange: y,
78
+ trigger: v,
79
+ onTriggerChange: C,
81
80
  valueNode: f,
82
81
  onValueNodeChange: h,
83
82
  valueNodeHasChildren: M,
@@ -85,40 +84,40 @@ var Dt = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = [" ", "Enter"], oe = "Sele
85
84
  contentId: Ne(),
86
85
  value: j,
87
86
  onValueChange: Q,
88
- open: R,
89
- onOpenChange: k,
90
- dir: se,
91
- triggerPointerDownPosRef: V,
92
- disabled: T,
87
+ open: E,
88
+ onOpenChange: L,
89
+ dir: ce,
90
+ triggerPointerDownPosRef: H,
91
+ disabled: _,
93
92
  children: [
94
93
  /* @__PURE__ */ i(pe.Provider, { scope: o, children: /* @__PURE__ */ i(
95
94
  Bt,
96
95
  {
97
96
  scope: t.__scopeSelect,
98
- onNativeOptionAdd: l.useCallback((E) => {
99
- W((z) => new Set(z).add(E));
97
+ onNativeOptionAdd: l.useCallback((R) => {
98
+ U((k) => new Set(k).add(R));
100
99
  }, []),
101
- onNativeOptionRemove: l.useCallback((E) => {
102
- W((z) => {
103
- const U = new Set(z);
104
- return U.delete(E), U;
100
+ onNativeOptionRemove: l.useCallback((R) => {
101
+ U((k) => {
102
+ const K = new Set(k);
103
+ return K.delete(R), K;
105
104
  });
106
105
  }, []),
107
106
  children: e
108
107
  }
109
108
  ) }),
110
- H ? /* @__PURE__ */ $(
111
- st,
109
+ W ? /* @__PURE__ */ $(
110
+ ct,
112
111
  {
113
112
  "aria-hidden": !0,
114
- required: b,
113
+ required: P,
115
114
  tabIndex: -1,
116
- name: v,
117
- autoComplete: _,
115
+ name: g,
116
+ autoComplete: S,
118
117
  value: j,
119
- onChange: (E) => Q(E.target.value),
120
- disabled: T,
121
- form: S,
118
+ onChange: (R) => Q(R.target.value),
119
+ disabled: _,
120
+ form: T,
122
121
  children: [
123
122
  j === void 0 ? /* @__PURE__ */ i("option", { value: "" }) : null,
124
123
  Array.from(G)
@@ -130,81 +129,81 @@ var Dt = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = [" ", "Enter"], oe = "Sele
130
129
  }
131
130
  ) });
132
131
  };
133
- Be.displayName = oe;
134
- var Ve = "SelectTrigger", He = l.forwardRef(
132
+ Ve.displayName = oe;
133
+ var He = "SelectTrigger", We = l.forwardRef(
135
134
  (t, o) => {
136
- const { __scopeSelect: e, disabled: r = !1, ...n } = t, d = me(e), c = Z(Ve, e), a = c.disabled || r, s = B(o, c.onTriggerChange), p = fe(e), v = l.useRef("touch"), [_, T, b] = at((u) => {
137
- const g = p().filter((h) => !h.disabled), y = g.find((h) => h.value === c.value), f = it(g, u, y);
138
- f !== void 0 && c.onValueChange(f.value);
139
- }), S = (u) => {
140
- a || (c.onOpenChange(!0), b()), u && (c.triggerPointerDownPosRef.current = {
135
+ const { __scopeSelect: e, disabled: r = !1, ...n } = t, d = me(e), a = Z(He, e), s = a.disabled || r, c = V(o, a.onTriggerChange), p = fe(e), g = l.useRef("touch"), [S, _, P] = at((u) => {
136
+ const v = p().filter((h) => !h.disabled), C = v.find((h) => h.value === a.value), f = it(v, u, C);
137
+ f !== void 0 && a.onValueChange(f.value);
138
+ }), T = (u) => {
139
+ s || (a.onOpenChange(!0), P()), u && (a.triggerPointerDownPosRef.current = {
141
140
  x: Math.round(u.pageX),
142
141
  y: Math.round(u.pageY)
143
142
  });
144
143
  };
145
- return /* @__PURE__ */ i(St, { asChild: !0, ...d, children: /* @__PURE__ */ i(
144
+ return /* @__PURE__ */ i(wt, { asChild: !0, ...d, children: /* @__PURE__ */ i(
146
145
  N.button,
147
146
  {
148
147
  type: "button",
149
148
  role: "combobox",
150
- "aria-controls": c.contentId,
151
- "aria-expanded": c.open,
152
- "aria-required": c.required,
149
+ "aria-controls": a.contentId,
150
+ "aria-expanded": a.open,
151
+ "aria-required": a.required,
153
152
  "aria-autocomplete": "none",
154
- dir: c.dir,
155
- "data-state": c.open ? "open" : "closed",
156
- disabled: a,
157
- "data-disabled": a ? "" : void 0,
158
- "data-placeholder": ct(c.value) ? "" : void 0,
153
+ dir: a.dir,
154
+ "data-state": a.open ? "open" : "closed",
155
+ disabled: s,
156
+ "data-disabled": s ? "" : void 0,
157
+ "data-placeholder": st(a.value) ? "" : void 0,
159
158
  ...n,
160
- ref: s,
161
- onClick: P(n.onClick, (u) => {
162
- u.currentTarget.focus(), v.current !== "mouse" && S(u);
159
+ ref: c,
160
+ onClick: b(n.onClick, (u) => {
161
+ u.currentTarget.focus(), g.current !== "mouse" && T(u);
163
162
  }),
164
- onPointerDown: P(n.onPointerDown, (u) => {
165
- v.current = u.pointerType;
166
- const g = u.target;
167
- g.hasPointerCapture(u.pointerId) && g.releasePointerCapture(u.pointerId), u.button === 0 && u.ctrlKey === !1 && u.pointerType === "mouse" && (S(u), u.preventDefault());
163
+ onPointerDown: b(n.onPointerDown, (u) => {
164
+ g.current = u.pointerType;
165
+ const v = u.target;
166
+ v.hasPointerCapture(u.pointerId) && v.releasePointerCapture(u.pointerId), u.button === 0 && u.ctrlKey === !1 && u.pointerType === "mouse" && (T(u), u.preventDefault());
168
167
  }),
169
- onKeyDown: P(n.onKeyDown, (u) => {
170
- const g = _.current !== "";
171
- !(u.ctrlKey || u.altKey || u.metaKey) && u.key.length === 1 && T(u.key), !(g && u.key === " ") && Dt.includes(u.key) && (S(), u.preventDefault());
168
+ onKeyDown: b(n.onKeyDown, (u) => {
169
+ const v = S.current !== "";
170
+ !(u.ctrlKey || u.altKey || u.metaKey) && u.key.length === 1 && _(u.key), !(v && u.key === " ") && At.includes(u.key) && (T(), u.preventDefault());
172
171
  })
173
172
  }
174
173
  ) });
175
174
  }
176
175
  );
177
- He.displayName = Ve;
178
- var We = "SelectValue", Fe = l.forwardRef(
176
+ We.displayName = He;
177
+ var Ue = "SelectValue", Fe = l.forwardRef(
179
178
  (t, o) => {
180
- const { __scopeSelect: e, className: r, style: n, children: d, placeholder: c = "", ...a } = t, s = Z(We, e), { onValueNodeHasChildrenChange: p } = s, v = d !== void 0, _ = B(o, s.onValueNodeChange);
181
- return K(() => {
182
- p(v);
183
- }, [p, v]), /* @__PURE__ */ i(
179
+ const { __scopeSelect: e, className: r, style: n, children: d, placeholder: a = "", ...s } = t, c = Z(Ue, e), { onValueNodeHasChildrenChange: p } = c, g = d !== void 0, S = V(o, c.onValueNodeChange);
180
+ return z(() => {
181
+ p(g);
182
+ }, [p, g]), /* @__PURE__ */ i(
184
183
  N.span,
185
184
  {
186
- ...a,
187
- ref: _,
185
+ ...s,
186
+ ref: S,
188
187
  style: { pointerEvents: "none" },
189
- children: ct(s.value) ? /* @__PURE__ */ i(Pe, { children: c }) : d
188
+ children: st(c.value) ? /* @__PURE__ */ i(be, { children: a }) : d
190
189
  }
191
190
  );
192
191
  }
193
192
  );
194
- Fe.displayName = We;
195
- var Ht = "SelectIcon", Ue = l.forwardRef(
193
+ Fe.displayName = Ue;
194
+ var Ht = "SelectIcon", Ke = l.forwardRef(
196
195
  (t, o) => {
197
196
  const { __scopeSelect: e, children: r, ...n } = t;
198
197
  return /* @__PURE__ */ i(N.span, { "aria-hidden": !0, ...n, ref: o, children: r || "▼" });
199
198
  }
200
199
  );
201
- Ue.displayName = Ht;
202
- var Wt = "SelectPortal", Ke = (t) => /* @__PURE__ */ i(ke, { asChild: !0, ...t });
203
- Ke.displayName = Wt;
200
+ Ke.displayName = Ht;
201
+ var Wt = "SelectPortal", ze = (t) => /* @__PURE__ */ i(ke, { asChild: !0, ...t });
202
+ ze.displayName = Wt;
204
203
  var ne = "SelectContent", je = l.forwardRef(
205
204
  (t, o) => {
206
205
  const e = Z(ne, t.__scopeSelect), [r, n] = l.useState();
207
- if (K(() => {
206
+ if (z(() => {
208
207
  n(new DocumentFragment());
209
208
  }, []), !e.open) {
210
209
  const d = r;
@@ -217,97 +216,97 @@ var ne = "SelectContent", je = l.forwardRef(
217
216
  }
218
217
  );
219
218
  je.displayName = ne;
220
- var L = 10, [Ge, J] = le(ne), Ft = "SelectContentImpl", Ut = ht("SelectContent.RemoveScroll"), Ye = l.forwardRef(
219
+ var D = 10, [Ge, J] = le(ne), Ut = "SelectContentImpl", Ft = ht("SelectContent.RemoveScroll"), Ye = l.forwardRef(
221
220
  (t, o) => {
222
221
  const {
223
222
  __scopeSelect: e,
224
223
  position: r = "item-aligned",
225
224
  onCloseAutoFocus: n,
226
225
  onEscapeKeyDown: d,
227
- onPointerDownOutside: c,
226
+ onPointerDownOutside: a,
228
227
  //
229
228
  // PopperContent props
230
- side: a,
231
- sideOffset: s,
229
+ side: s,
230
+ sideOffset: c,
232
231
  align: p,
233
- alignOffset: v,
234
- arrowPadding: _,
235
- collisionBoundary: T,
236
- collisionPadding: b,
237
- sticky: S,
232
+ alignOffset: g,
233
+ arrowPadding: S,
234
+ collisionBoundary: _,
235
+ collisionPadding: P,
236
+ sticky: T,
238
237
  hideWhenDetached: u,
239
- avoidCollisions: g,
238
+ avoidCollisions: v,
240
239
  //
241
- ...y
242
- } = t, f = Z(ne, e), [h, M] = l.useState(null), [A, se] = l.useState(null), R = B(o, (m) => M(m)), [k, j] = l.useState(null), [Q, V] = l.useState(
240
+ ...C
241
+ } = t, f = Z(ne, e), [h, M] = l.useState(null), [A, ce] = l.useState(null), E = V(o, (m) => M(m)), [L, j] = l.useState(null), [Q, H] = l.useState(
243
242
  null
244
- ), H = fe(e), [G, W] = l.useState(!1), F = l.useRef(!1);
243
+ ), W = fe(e), [G, U] = l.useState(!1), F = l.useRef(!1);
245
244
  l.useEffect(() => {
246
- if (h) return xt(h);
247
- }, [h]), yt();
248
- const E = l.useCallback(
245
+ if (h) return Ct(h);
246
+ }, [h]), xt();
247
+ const R = l.useCallback(
249
248
  (m) => {
250
- const [I, ...O] = H().map((x) => x.ref.current), [C] = O.slice(-1), w = document.activeElement;
251
- for (const x of m)
252
- if (x === w || (x == null || x.scrollIntoView({ block: "nearest" }), x === I && A && (A.scrollTop = 0), x === C && A && (A.scrollTop = A.scrollHeight), x == null || x.focus(), document.activeElement !== w)) return;
249
+ const [I, ...O] = W().map((y) => y.ref.current), [x] = O.slice(-1), w = document.activeElement;
250
+ for (const y of m)
251
+ if (y === w || (y == null || y.scrollIntoView({ block: "nearest" }), y === I && A && (A.scrollTop = 0), y === x && A && (A.scrollTop = A.scrollHeight), y == null || y.focus(), document.activeElement !== w)) return;
253
252
  },
254
- [H, A]
255
- ), z = l.useCallback(
256
- () => E([k, h]),
257
- [E, k, h]
253
+ [W, A]
254
+ ), k = l.useCallback(
255
+ () => R([L, h]),
256
+ [R, L, h]
258
257
  );
259
258
  l.useEffect(() => {
260
- G && z();
261
- }, [G, z]);
262
- const { onOpenChange: U, triggerPointerDownPosRef: Y } = f;
259
+ G && k();
260
+ }, [G, k]);
261
+ const { onOpenChange: K, triggerPointerDownPosRef: Y } = f;
263
262
  l.useEffect(() => {
264
263
  if (h) {
265
264
  let m = { x: 0, y: 0 };
266
- const I = (C) => {
267
- var w, x;
265
+ const I = (x) => {
266
+ var w, y;
268
267
  m = {
269
- x: Math.abs(Math.round(C.pageX) - (((w = Y.current) == null ? void 0 : w.x) ?? 0)),
270
- y: Math.abs(Math.round(C.pageY) - (((x = Y.current) == null ? void 0 : x.y) ?? 0))
268
+ x: Math.abs(Math.round(x.pageX) - (((w = Y.current) == null ? void 0 : w.x) ?? 0)),
269
+ y: Math.abs(Math.round(x.pageY) - (((y = Y.current) == null ? void 0 : y.y) ?? 0))
271
270
  };
272
- }, O = (C) => {
273
- m.x <= 10 && m.y <= 10 ? C.preventDefault() : h.contains(C.target) || U(!1), document.removeEventListener("pointermove", I), Y.current = null;
271
+ }, O = (x) => {
272
+ m.x <= 10 && m.y <= 10 ? x.preventDefault() : h.contains(x.target) || K(!1), document.removeEventListener("pointermove", I), Y.current = null;
274
273
  };
275
274
  return Y.current !== null && (document.addEventListener("pointermove", I), document.addEventListener("pointerup", O, { capture: !0, once: !0 })), () => {
276
275
  document.removeEventListener("pointermove", I), document.removeEventListener("pointerup", O, { capture: !0 });
277
276
  };
278
277
  }
279
- }, [h, U, Y]), l.useEffect(() => {
280
- const m = () => U(!1);
278
+ }, [h, K, Y]), l.useEffect(() => {
279
+ const m = () => K(!1);
281
280
  return window.addEventListener("blur", m), window.addEventListener("resize", m), () => {
282
281
  window.removeEventListener("blur", m), window.removeEventListener("resize", m);
283
282
  };
284
- }, [U]);
283
+ }, [K]);
285
284
  const [he, ie] = at((m) => {
286
- const I = H().filter((w) => !w.disabled), O = I.find((w) => w.ref.current === document.activeElement), C = it(I, m, O);
287
- C && setTimeout(() => C.ref.current.focus());
288
- }), ge = l.useCallback(
285
+ const I = W().filter((w) => !w.disabled), O = I.find((w) => w.ref.current === document.activeElement), x = it(I, m, O);
286
+ x && setTimeout(() => x.ref.current.focus());
287
+ }), ve = l.useCallback(
289
288
  (m, I, O) => {
290
- const C = !F.current && !O;
291
- (f.value !== void 0 && f.value === I || C) && (j(m), C && (F.current = !0));
289
+ const x = !F.current && !O;
290
+ (f.value !== void 0 && f.value === I || x) && (j(m), x && (F.current = !0));
292
291
  },
293
292
  [f.value]
294
- ), ve = l.useCallback(() => h == null ? void 0 : h.focus(), [h]), re = l.useCallback(
293
+ ), ge = l.useCallback(() => h == null ? void 0 : h.focus(), [h]), re = l.useCallback(
295
294
  (m, I, O) => {
296
- const C = !F.current && !O;
297
- (f.value !== void 0 && f.value === I || C) && V(m);
295
+ const x = !F.current && !O;
296
+ (f.value !== void 0 && f.value === I || x) && H(m);
298
297
  },
299
298
  [f.value]
300
- ), de = r === "popper" ? ye : $e, ce = de === ye ? {
301
- side: a,
302
- sideOffset: s,
299
+ ), de = r === "popper" ? xe : $e, se = de === xe ? {
300
+ side: s,
301
+ sideOffset: c,
303
302
  align: p,
304
- alignOffset: v,
305
- arrowPadding: _,
306
- collisionBoundary: T,
307
- collisionPadding: b,
308
- sticky: S,
303
+ alignOffset: g,
304
+ arrowPadding: S,
305
+ collisionBoundary: _,
306
+ collisionPadding: P,
307
+ sticky: T,
309
308
  hideWhenDetached: u,
310
- avoidCollisions: g
309
+ avoidCollisions: v
311
310
  } : {};
312
311
  return /* @__PURE__ */ i(
313
312
  Ge,
@@ -315,17 +314,17 @@ var L = 10, [Ge, J] = le(ne), Ft = "SelectContentImpl", Ut = ht("SelectContent.R
315
314
  scope: e,
316
315
  content: h,
317
316
  viewport: A,
318
- onViewportChange: se,
319
- itemRefCallback: ge,
320
- selectedItem: k,
321
- onItemLeave: ve,
317
+ onViewportChange: ce,
318
+ itemRefCallback: ve,
319
+ selectedItem: L,
320
+ onItemLeave: ge,
322
321
  itemTextRefCallback: re,
323
- focusSelectedItem: z,
322
+ focusSelectedItem: k,
324
323
  selectedItemText: Q,
325
324
  position: r,
326
325
  isPositioned: G,
327
326
  searchRef: he,
328
- children: /* @__PURE__ */ i(Ct, { as: Ut, allowPinchZoom: !0, children: /* @__PURE__ */ i(
327
+ children: /* @__PURE__ */ i(_t, { as: Ft, allowPinchZoom: !0, children: /* @__PURE__ */ i(
329
328
  It,
330
329
  {
331
330
  asChild: !0,
@@ -333,7 +332,7 @@ var L = 10, [Ge, J] = le(ne), Ft = "SelectContentImpl", Ut = ht("SelectContent.R
333
332
  onMountAutoFocus: (m) => {
334
333
  m.preventDefault();
335
334
  },
336
- onUnmountAutoFocus: P(n, (m) => {
335
+ onUnmountAutoFocus: b(n, (m) => {
337
336
  var I;
338
337
  (I = f.trigger) == null || I.focus({ preventScroll: !0 }), m.preventDefault();
339
338
  }),
@@ -343,7 +342,7 @@ var L = 10, [Ge, J] = le(ne), Ft = "SelectContentImpl", Ut = ht("SelectContent.R
343
342
  asChild: !0,
344
343
  disableOutsidePointerEvents: !0,
345
344
  onEscapeKeyDown: d,
346
- onPointerDownOutside: c,
345
+ onPointerDownOutside: a,
347
346
  onFocusOutside: (m) => m.preventDefault(),
348
347
  onDismiss: () => f.onOpenChange(!1),
349
348
  children: /* @__PURE__ */ i(
@@ -354,27 +353,27 @@ var L = 10, [Ge, J] = le(ne), Ft = "SelectContentImpl", Ut = ht("SelectContent.R
354
353
  "data-state": f.open ? "open" : "closed",
355
354
  dir: f.dir,
356
355
  onContextMenu: (m) => m.preventDefault(),
357
- ...y,
358
- ...ce,
359
- onPlaced: () => W(!0),
360
- ref: R,
356
+ ...C,
357
+ ...se,
358
+ onPlaced: () => U(!0),
359
+ ref: E,
361
360
  style: {
362
361
  // flex layout so we can place the scroll buttons properly
363
362
  display: "flex",
364
363
  flexDirection: "column",
365
364
  // reset the outline by default as the content MAY get focused
366
365
  outline: "none",
367
- ...y.style
366
+ ...C.style
368
367
  },
369
- onKeyDown: P(y.onKeyDown, (m) => {
368
+ onKeyDown: b(C.onKeyDown, (m) => {
370
369
  const I = m.ctrlKey || m.altKey || m.metaKey;
371
370
  if (m.key === "Tab" && m.preventDefault(), !I && m.key.length === 1 && ie(m.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(m.key)) {
372
- let C = H().filter((w) => !w.disabled).map((w) => w.ref.current);
373
- if (["ArrowUp", "End"].includes(m.key) && (C = C.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(m.key)) {
374
- const w = m.target, x = C.indexOf(w);
375
- C = C.slice(x + 1);
371
+ let x = W().filter((w) => !w.disabled).map((w) => w.ref.current);
372
+ if (["ArrowUp", "End"].includes(m.key) && (x = x.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(m.key)) {
373
+ const w = m.target, y = x.indexOf(w);
374
+ x = x.slice(y + 1);
376
375
  }
377
- setTimeout(() => E(C)), m.preventDefault();
376
+ setTimeout(() => R(x)), m.preventDefault();
378
377
  }
379
378
  })
380
379
  }
@@ -387,85 +386,85 @@ var L = 10, [Ge, J] = le(ne), Ft = "SelectContentImpl", Ut = ht("SelectContent.R
387
386
  );
388
387
  }
389
388
  );
390
- Ye.displayName = Ft;
389
+ Ye.displayName = Ut;
391
390
  var Kt = "SelectItemAlignedPosition", $e = l.forwardRef((t, o) => {
392
- const { __scopeSelect: e, onPlaced: r, ...n } = t, d = Z(ne, e), c = J(ne, e), [a, s] = l.useState(null), [p, v] = l.useState(null), _ = B(o, (R) => v(R)), T = fe(e), b = l.useRef(!1), S = l.useRef(!0), { viewport: u, selectedItem: g, selectedItemText: y, focusSelectedItem: f } = c, h = l.useCallback(() => {
393
- if (d.trigger && d.valueNode && a && p && u && g && y) {
394
- const R = d.trigger.getBoundingClientRect(), k = p.getBoundingClientRect(), j = d.valueNode.getBoundingClientRect(), Q = y.getBoundingClientRect();
391
+ const { __scopeSelect: e, onPlaced: r, ...n } = t, d = Z(ne, e), a = J(ne, e), [s, c] = l.useState(null), [p, g] = l.useState(null), S = V(o, (E) => g(E)), _ = fe(e), P = l.useRef(!1), T = l.useRef(!0), { viewport: u, selectedItem: v, selectedItemText: C, focusSelectedItem: f } = a, h = l.useCallback(() => {
392
+ if (d.trigger && d.valueNode && s && p && u && v && C) {
393
+ const E = d.trigger.getBoundingClientRect(), L = p.getBoundingClientRect(), j = d.valueNode.getBoundingClientRect(), Q = C.getBoundingClientRect();
395
394
  if (d.dir !== "rtl") {
396
- const w = Q.left - k.left, x = j.left - w, ee = R.left - x, te = R.width + ee, _e = Math.max(te, k.width), Se = window.innerWidth - L, we = Ee(x, [
397
- L,
395
+ const w = Q.left - L.left, y = j.left - w, ee = E.left - y, te = E.width + ee, Se = Math.max(te, L.width), we = window.innerWidth - D, ye = Re(y, [
396
+ D,
398
397
  // Prevents the content from going off the starting edge of the
399
398
  // viewport. It may still go off the ending edge, but this can be
400
399
  // controlled by the user since they may want to manage overflow in a
401
400
  // specific way.
402
401
  // https://github.com/radix-ui/primitives/issues/2049
403
- Math.max(L, Se - _e)
402
+ Math.max(D, we - Se)
404
403
  ]);
405
- a.style.minWidth = te + "px", a.style.left = we + "px";
404
+ s.style.minWidth = te + "px", s.style.left = ye + "px";
406
405
  } else {
407
- const w = k.right - Q.right, x = window.innerWidth - j.right - w, ee = window.innerWidth - R.right - x, te = R.width + ee, _e = Math.max(te, k.width), Se = window.innerWidth - L, we = Ee(x, [
408
- L,
409
- Math.max(L, Se - _e)
406
+ const w = L.right - Q.right, y = window.innerWidth - j.right - w, ee = window.innerWidth - E.right - y, te = E.width + ee, Se = Math.max(te, L.width), we = window.innerWidth - D, ye = Re(y, [
407
+ D,
408
+ Math.max(D, we - Se)
410
409
  ]);
411
- a.style.minWidth = te + "px", a.style.right = we + "px";
410
+ s.style.minWidth = te + "px", s.style.right = ye + "px";
412
411
  }
413
- const V = T(), H = window.innerHeight - L * 2, G = u.scrollHeight, W = window.getComputedStyle(p), F = parseInt(W.borderTopWidth, 10), E = parseInt(W.paddingTop, 10), z = parseInt(W.borderBottomWidth, 10), U = parseInt(W.paddingBottom, 10), Y = F + E + G + U + z, he = Math.min(g.offsetHeight * 5, Y), ie = window.getComputedStyle(u), ge = parseInt(ie.paddingTop, 10), ve = parseInt(ie.paddingBottom, 10), re = R.top + R.height / 2 - L, de = H - re, ce = g.offsetHeight / 2, m = g.offsetTop + ce, I = F + E + m, O = Y - I;
412
+ const H = _(), W = window.innerHeight - D * 2, G = u.scrollHeight, U = window.getComputedStyle(p), F = parseInt(U.borderTopWidth, 10), R = parseInt(U.paddingTop, 10), k = parseInt(U.borderBottomWidth, 10), K = parseInt(U.paddingBottom, 10), Y = F + R + G + K + k, he = Math.min(v.offsetHeight * 5, Y), ie = window.getComputedStyle(u), ve = parseInt(ie.paddingTop, 10), ge = parseInt(ie.paddingBottom, 10), re = E.top + E.height / 2 - D, de = W - re, se = v.offsetHeight / 2, m = v.offsetTop + se, I = F + R + m, O = Y - I;
414
413
  if (I <= re) {
415
- const w = V.length > 0 && g === V[V.length - 1].ref.current;
416
- a.style.bottom = "0px";
417
- const x = p.clientHeight - u.offsetTop - u.offsetHeight, ee = Math.max(
414
+ const w = H.length > 0 && v === H[H.length - 1].ref.current;
415
+ s.style.bottom = "0px";
416
+ const y = p.clientHeight - u.offsetTop - u.offsetHeight, ee = Math.max(
418
417
  de,
419
- ce + // viewport might have padding bottom, include it to avoid a scrollable viewport
420
- (w ? ve : 0) + x + z
418
+ se + // viewport might have padding bottom, include it to avoid a scrollable viewport
419
+ (w ? ge : 0) + y + k
421
420
  ), te = I + ee;
422
- a.style.height = te + "px";
421
+ s.style.height = te + "px";
423
422
  } else {
424
- const w = V.length > 0 && g === V[0].ref.current;
425
- a.style.top = "0px";
423
+ const w = H.length > 0 && v === H[0].ref.current;
424
+ s.style.top = "0px";
426
425
  const ee = Math.max(
427
426
  re,
428
427
  F + u.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
429
- (w ? ge : 0) + ce
428
+ (w ? ve : 0) + se
430
429
  ) + O;
431
- a.style.height = ee + "px", u.scrollTop = I - re + u.offsetTop;
430
+ s.style.height = ee + "px", u.scrollTop = I - re + u.offsetTop;
432
431
  }
433
- a.style.margin = `${L}px 0`, a.style.minHeight = he + "px", a.style.maxHeight = H + "px", r == null || r(), requestAnimationFrame(() => b.current = !0);
432
+ s.style.margin = `${D}px 0`, s.style.minHeight = he + "px", s.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() => P.current = !0);
434
433
  }
435
434
  }, [
436
- T,
435
+ _,
437
436
  d.trigger,
438
437
  d.valueNode,
439
- a,
438
+ s,
440
439
  p,
441
440
  u,
442
- g,
443
- y,
441
+ v,
442
+ C,
444
443
  d.dir,
445
444
  r
446
445
  ]);
447
- K(() => h(), [h]);
446
+ z(() => h(), [h]);
448
447
  const [M, A] = l.useState();
449
- K(() => {
448
+ z(() => {
450
449
  p && A(window.getComputedStyle(p).zIndex);
451
450
  }, [p]);
452
- const se = l.useCallback(
453
- (R) => {
454
- R && S.current === !0 && (h(), f == null || f(), S.current = !1);
451
+ const ce = l.useCallback(
452
+ (E) => {
453
+ E && T.current === !0 && (h(), f == null || f(), T.current = !1);
455
454
  },
456
455
  [h, f]
457
456
  );
458
457
  return /* @__PURE__ */ i(
459
- Gt,
458
+ jt,
460
459
  {
461
460
  scope: e,
462
- contentWrapper: a,
463
- shouldExpandOnScrollRef: b,
464
- onScrollButtonChange: se,
461
+ contentWrapper: s,
462
+ shouldExpandOnScrollRef: P,
463
+ onScrollButtonChange: ce,
465
464
  children: /* @__PURE__ */ i(
466
465
  "div",
467
466
  {
468
- ref: s,
467
+ ref: c,
469
468
  style: {
470
469
  display: "flex",
471
470
  flexDirection: "column",
@@ -476,7 +475,7 @@ var Kt = "SelectItemAlignedPosition", $e = l.forwardRef((t, o) => {
476
475
  N.div,
477
476
  {
478
477
  ...n,
479
- ref: _,
478
+ ref: S,
480
479
  style: {
481
480
  // When we get the height of the content, it includes borders. If we were to set
482
481
  // the height without having `boxSizing: 'border-box'` it would be too big.
@@ -493,17 +492,17 @@ var Kt = "SelectItemAlignedPosition", $e = l.forwardRef((t, o) => {
493
492
  );
494
493
  });
495
494
  $e.displayName = Kt;
496
- var jt = "SelectPopperPosition", ye = l.forwardRef((t, o) => {
495
+ var zt = "SelectPopperPosition", xe = l.forwardRef((t, o) => {
497
496
  const {
498
497
  __scopeSelect: e,
499
498
  align: r = "start",
500
- collisionPadding: n = L,
499
+ collisionPadding: n = D,
501
500
  ...d
502
- } = t, c = me(e);
501
+ } = t, a = me(e);
503
502
  return /* @__PURE__ */ i(
504
- bt,
503
+ Pt,
505
504
  {
506
- ...c,
505
+ ...a,
507
506
  ...d,
508
507
  ref: o,
509
508
  align: r,
@@ -521,11 +520,11 @@ var jt = "SelectPopperPosition", ye = l.forwardRef((t, o) => {
521
520
  }
522
521
  );
523
522
  });
524
- ye.displayName = jt;
525
- var [Gt, Re] = le(ne, {}), Ce = "SelectViewport", qe = l.forwardRef(
523
+ xe.displayName = zt;
524
+ var [jt, Ee] = le(ne, {}), _e = "SelectViewport", qe = l.forwardRef(
526
525
  (t, o) => {
527
- const { __scopeSelect: e, nonce: r, ...n } = t, d = J(Ce, e), c = Re(Ce, e), a = B(o, d.onViewportChange), s = l.useRef(0);
528
- return /* @__PURE__ */ $(Pe, { children: [
526
+ const { __scopeSelect: e, nonce: r, ...n } = t, d = J(_e, e), a = Ee(_e, e), s = V(o, d.onViewportChange), c = l.useRef(0);
527
+ return /* @__PURE__ */ $(be, { children: [
529
528
  /* @__PURE__ */ i(
530
529
  "style",
531
530
  {
@@ -541,7 +540,7 @@ var [Gt, Re] = le(ne, {}), Ce = "SelectViewport", qe = l.forwardRef(
541
540
  "data-radix-select-viewport": "",
542
541
  role: "presentation",
543
542
  ...n,
544
- ref: a,
543
+ ref: s,
545
544
  style: {
546
545
  // we use position: 'relative' here on the `viewport` so that when we call
547
546
  // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
@@ -555,63 +554,63 @@ var [Gt, Re] = le(ne, {}), Ce = "SelectViewport", qe = l.forwardRef(
555
554
  overflow: "hidden auto",
556
555
  ...n.style
557
556
  },
558
- onScroll: P(n.onScroll, (p) => {
559
- const v = p.currentTarget, { contentWrapper: _, shouldExpandOnScrollRef: T } = c;
560
- if (T != null && T.current && _) {
561
- const b = Math.abs(s.current - v.scrollTop);
562
- if (b > 0) {
563
- const S = window.innerHeight - L * 2, u = parseFloat(_.style.minHeight), g = parseFloat(_.style.height), y = Math.max(u, g);
564
- if (y < S) {
565
- const f = y + b, h = Math.min(S, f), M = f - h;
566
- _.style.height = h + "px", _.style.bottom === "0px" && (v.scrollTop = M > 0 ? M : 0, _.style.justifyContent = "flex-end");
557
+ onScroll: b(n.onScroll, (p) => {
558
+ const g = p.currentTarget, { contentWrapper: S, shouldExpandOnScrollRef: _ } = a;
559
+ if (_ != null && _.current && S) {
560
+ const P = Math.abs(c.current - g.scrollTop);
561
+ if (P > 0) {
562
+ const T = window.innerHeight - D * 2, u = parseFloat(S.style.minHeight), v = parseFloat(S.style.height), C = Math.max(u, v);
563
+ if (C < T) {
564
+ const f = C + P, h = Math.min(T, f), M = f - h;
565
+ S.style.height = h + "px", S.style.bottom === "0px" && (g.scrollTop = M > 0 ? M : 0, S.style.justifyContent = "flex-end");
567
566
  }
568
567
  }
569
568
  }
570
- s.current = v.scrollTop;
569
+ c.current = g.scrollTop;
571
570
  })
572
571
  }
573
572
  ) })
574
573
  ] });
575
574
  }
576
575
  );
577
- qe.displayName = Ce;
578
- var Xe = "SelectGroup", [Yt, $t] = le(Xe), qt = l.forwardRef(
576
+ qe.displayName = _e;
577
+ var Xe = "SelectGroup", [Gt, Yt] = le(Xe), $t = l.forwardRef(
579
578
  (t, o) => {
580
579
  const { __scopeSelect: e, ...r } = t, n = Ne();
581
- return /* @__PURE__ */ i(Yt, { scope: e, id: n, children: /* @__PURE__ */ i(N.div, { role: "group", "aria-labelledby": n, ...r, ref: o }) });
580
+ return /* @__PURE__ */ i(Gt, { scope: e, id: n, children: /* @__PURE__ */ i(N.div, { role: "group", "aria-labelledby": n, ...r, ref: o }) });
582
581
  }
583
582
  );
584
- qt.displayName = Xe;
585
- var Ze = "SelectLabel", Xt = l.forwardRef(
583
+ $t.displayName = Xe;
584
+ var Ze = "SelectLabel", qt = l.forwardRef(
586
585
  (t, o) => {
587
- const { __scopeSelect: e, ...r } = t, n = $t(Ze, e);
586
+ const { __scopeSelect: e, ...r } = t, n = Yt(Ze, e);
588
587
  return /* @__PURE__ */ i(N.div, { id: n.id, ...r, ref: o });
589
588
  }
590
589
  );
591
- Xt.displayName = Ze;
592
- var ue = "SelectItem", [Zt, Je] = le(ue), Qe = l.forwardRef(
590
+ qt.displayName = Ze;
591
+ var ue = "SelectItem", [Xt, Je] = le(ue), Qe = l.forwardRef(
593
592
  (t, o) => {
594
593
  const {
595
594
  __scopeSelect: e,
596
595
  value: r,
597
596
  disabled: n = !1,
598
597
  textValue: d,
599
- ...c
600
- } = t, a = Z(ue, e), s = J(ue, e), p = a.value === r, [v, _] = l.useState(d ?? ""), [T, b] = l.useState(!1), S = B(
598
+ ...a
599
+ } = t, s = Z(ue, e), c = J(ue, e), p = s.value === r, [g, S] = l.useState(d ?? ""), [_, P] = l.useState(!1), T = V(
601
600
  o,
602
601
  (f) => {
603
602
  var h;
604
- return (h = s.itemRefCallback) == null ? void 0 : h.call(s, f, r, n);
603
+ return (h = c.itemRefCallback) == null ? void 0 : h.call(c, f, r, n);
605
604
  }
606
- ), u = Ne(), g = l.useRef("touch"), y = () => {
607
- n || (a.onValueChange(r), a.onOpenChange(!1));
605
+ ), u = Ne(), v = l.useRef("touch"), C = () => {
606
+ n || (s.onValueChange(r), s.onOpenChange(!1));
608
607
  };
609
608
  if (r === "")
610
609
  throw new Error(
611
610
  "A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
612
611
  );
613
612
  return /* @__PURE__ */ i(
614
- Zt,
613
+ Xt,
615
614
  {
616
615
  scope: e,
617
616
  value: r,
@@ -619,7 +618,7 @@ var ue = "SelectItem", [Zt, Je] = le(ue), Qe = l.forwardRef(
619
618
  textId: u,
620
619
  isSelected: p,
621
620
  onItemTextChange: l.useCallback((f) => {
622
- _((h) => h || ((f == null ? void 0 : f.textContent) ?? "").trim());
621
+ S((h) => h || ((f == null ? void 0 : f.textContent) ?? "").trim());
623
622
  }, []),
624
623
  children: /* @__PURE__ */ i(
625
624
  pe.ItemSlot,
@@ -627,42 +626,42 @@ var ue = "SelectItem", [Zt, Je] = le(ue), Qe = l.forwardRef(
627
626
  scope: e,
628
627
  value: r,
629
628
  disabled: n,
630
- textValue: v,
629
+ textValue: g,
631
630
  children: /* @__PURE__ */ i(
632
631
  N.div,
633
632
  {
634
633
  role: "option",
635
634
  "aria-labelledby": u,
636
- "data-highlighted": T ? "" : void 0,
637
- "aria-selected": p && T,
635
+ "data-highlighted": _ ? "" : void 0,
636
+ "aria-selected": p && _,
638
637
  "data-state": p ? "checked" : "unchecked",
639
638
  "aria-disabled": n || void 0,
640
639
  "data-disabled": n ? "" : void 0,
641
640
  tabIndex: n ? void 0 : -1,
642
- ...c,
643
- ref: S,
644
- onFocus: P(c.onFocus, () => b(!0)),
645
- onBlur: P(c.onBlur, () => b(!1)),
646
- onClick: P(c.onClick, () => {
647
- g.current !== "mouse" && y();
641
+ ...a,
642
+ ref: T,
643
+ onFocus: b(a.onFocus, () => P(!0)),
644
+ onBlur: b(a.onBlur, () => P(!1)),
645
+ onClick: b(a.onClick, () => {
646
+ v.current !== "mouse" && C();
648
647
  }),
649
- onPointerUp: P(c.onPointerUp, () => {
650
- g.current === "mouse" && y();
648
+ onPointerUp: b(a.onPointerUp, () => {
649
+ v.current === "mouse" && C();
651
650
  }),
652
- onPointerDown: P(c.onPointerDown, (f) => {
653
- g.current = f.pointerType;
651
+ onPointerDown: b(a.onPointerDown, (f) => {
652
+ v.current = f.pointerType;
654
653
  }),
655
- onPointerMove: P(c.onPointerMove, (f) => {
654
+ onPointerMove: b(a.onPointerMove, (f) => {
656
655
  var h;
657
- g.current = f.pointerType, n ? (h = s.onItemLeave) == null || h.call(s) : g.current === "mouse" && f.currentTarget.focus({ preventScroll: !0 });
656
+ v.current = f.pointerType, n ? (h = c.onItemLeave) == null || h.call(c) : v.current === "mouse" && f.currentTarget.focus({ preventScroll: !0 });
658
657
  }),
659
- onPointerLeave: P(c.onPointerLeave, (f) => {
658
+ onPointerLeave: b(a.onPointerLeave, (f) => {
660
659
  var h;
661
- f.currentTarget === document.activeElement && ((h = s.onItemLeave) == null || h.call(s));
660
+ f.currentTarget === document.activeElement && ((h = c.onItemLeave) == null || h.call(c));
662
661
  }),
663
- onKeyDown: P(c.onKeyDown, (f) => {
662
+ onKeyDown: b(a.onKeyDown, (f) => {
664
663
  var M;
665
- ((M = s.searchRef) == null ? void 0 : M.current) !== "" && f.key === " " || (Lt.includes(f.key) && y(), f.key === " " && f.preventDefault());
664
+ ((M = c.searchRef) == null ? void 0 : M.current) !== "" && f.key === " " || (Dt.includes(f.key) && C(), f.key === " " && f.preventDefault());
666
665
  })
667
666
  }
668
667
  )
@@ -675,21 +674,21 @@ var ue = "SelectItem", [Zt, Je] = le(ue), Qe = l.forwardRef(
675
674
  Qe.displayName = ue;
676
675
  var ae = "SelectItemText", et = l.forwardRef(
677
676
  (t, o) => {
678
- const { __scopeSelect: e, className: r, style: n, ...d } = t, c = Z(ae, e), a = J(ae, e), s = Je(ae, e), p = Vt(ae, e), [v, _] = l.useState(null), T = B(
677
+ const { __scopeSelect: e, className: r, style: n, ...d } = t, a = Z(ae, e), s = J(ae, e), c = Je(ae, e), p = Vt(ae, e), [g, S] = l.useState(null), _ = V(
679
678
  o,
680
- (y) => _(y),
681
- s.onItemTextChange,
682
- (y) => {
679
+ (C) => S(C),
680
+ c.onItemTextChange,
681
+ (C) => {
683
682
  var f;
684
- return (f = a.itemTextRefCallback) == null ? void 0 : f.call(a, y, s.value, s.disabled);
683
+ return (f = s.itemTextRefCallback) == null ? void 0 : f.call(s, C, c.value, c.disabled);
685
684
  }
686
- ), b = v == null ? void 0 : v.textContent, S = l.useMemo(
687
- () => /* @__PURE__ */ i("option", { value: s.value, disabled: s.disabled, children: b }, s.value),
688
- [s.disabled, s.value, b]
689
- ), { onNativeOptionAdd: u, onNativeOptionRemove: g } = p;
690
- return K(() => (u(S), () => g(S)), [u, g, S]), /* @__PURE__ */ $(Pe, { children: [
691
- /* @__PURE__ */ i(N.span, { id: s.textId, ...d, ref: T }),
692
- s.isSelected && c.valueNode && !c.valueNodeHasChildren ? De.createPortal(d.children, c.valueNode) : null
685
+ ), P = g == null ? void 0 : g.textContent, T = l.useMemo(
686
+ () => /* @__PURE__ */ i("option", { value: c.value, disabled: c.disabled, children: P }, c.value),
687
+ [c.disabled, c.value, P]
688
+ ), { onNativeOptionAdd: u, onNativeOptionRemove: v } = p;
689
+ return z(() => (u(T), () => v(T)), [u, v, T]), /* @__PURE__ */ $(be, { children: [
690
+ /* @__PURE__ */ i(N.span, { id: c.textId, ...d, ref: _ }),
691
+ c.isSelected && a.valueNode && !a.valueNodeHasChildren ? De.createPortal(d.children, a.valueNode) : null
693
692
  ] });
694
693
  }
695
694
  );
@@ -702,130 +701,130 @@ var tt = "SelectItemIndicator", ot = l.forwardRef(
702
701
  );
703
702
  ot.displayName = tt;
704
703
  var Ie = "SelectScrollUpButton", nt = l.forwardRef((t, o) => {
705
- const e = J(Ie, t.__scopeSelect), r = Re(Ie, t.__scopeSelect), [n, d] = l.useState(!1), c = B(o, r.onScrollButtonChange);
706
- return K(() => {
704
+ const e = J(Ie, t.__scopeSelect), r = Ee(Ie, t.__scopeSelect), [n, d] = l.useState(!1), a = V(o, r.onScrollButtonChange);
705
+ return z(() => {
707
706
  if (e.viewport && e.isPositioned) {
708
- let a = function() {
709
- const p = s.scrollTop > 0;
707
+ let s = function() {
708
+ const p = c.scrollTop > 0;
710
709
  d(p);
711
710
  };
712
- const s = e.viewport;
713
- return a(), s.addEventListener("scroll", a), () => s.removeEventListener("scroll", a);
711
+ const c = e.viewport;
712
+ return s(), c.addEventListener("scroll", s), () => c.removeEventListener("scroll", s);
714
713
  }
715
714
  }, [e.viewport, e.isPositioned]), n ? /* @__PURE__ */ i(
716
715
  lt,
717
716
  {
718
717
  ...t,
719
- ref: c,
718
+ ref: a,
720
719
  onAutoScroll: () => {
721
- const { viewport: a, selectedItem: s } = e;
722
- a && s && (a.scrollTop = a.scrollTop - s.offsetHeight);
720
+ const { viewport: s, selectedItem: c } = e;
721
+ s && c && (s.scrollTop = s.scrollTop - c.offsetHeight);
723
722
  }
724
723
  }
725
724
  ) : null;
726
725
  });
727
726
  nt.displayName = Ie;
728
727
  var Te = "SelectScrollDownButton", rt = l.forwardRef((t, o) => {
729
- const e = J(Te, t.__scopeSelect), r = Re(Te, t.__scopeSelect), [n, d] = l.useState(!1), c = B(o, r.onScrollButtonChange);
730
- return K(() => {
728
+ const e = J(Te, t.__scopeSelect), r = Ee(Te, t.__scopeSelect), [n, d] = l.useState(!1), a = V(o, r.onScrollButtonChange);
729
+ return z(() => {
731
730
  if (e.viewport && e.isPositioned) {
732
- let a = function() {
733
- const p = s.scrollHeight - s.clientHeight, v = Math.ceil(s.scrollTop) < p;
734
- d(v);
731
+ let s = function() {
732
+ const p = c.scrollHeight - c.clientHeight, g = Math.ceil(c.scrollTop) < p;
733
+ d(g);
735
734
  };
736
- const s = e.viewport;
737
- return a(), s.addEventListener("scroll", a), () => s.removeEventListener("scroll", a);
735
+ const c = e.viewport;
736
+ return s(), c.addEventListener("scroll", s), () => c.removeEventListener("scroll", s);
738
737
  }
739
738
  }, [e.viewport, e.isPositioned]), n ? /* @__PURE__ */ i(
740
739
  lt,
741
740
  {
742
741
  ...t,
743
- ref: c,
742
+ ref: a,
744
743
  onAutoScroll: () => {
745
- const { viewport: a, selectedItem: s } = e;
746
- a && s && (a.scrollTop = a.scrollTop + s.offsetHeight);
744
+ const { viewport: s, selectedItem: c } = e;
745
+ s && c && (s.scrollTop = s.scrollTop + c.offsetHeight);
747
746
  }
748
747
  }
749
748
  ) : null;
750
749
  });
751
750
  rt.displayName = Te;
752
751
  var lt = l.forwardRef((t, o) => {
753
- const { __scopeSelect: e, onAutoScroll: r, ...n } = t, d = J("SelectScrollButton", e), c = l.useRef(null), a = fe(e), s = l.useCallback(() => {
754
- c.current !== null && (window.clearInterval(c.current), c.current = null);
752
+ const { __scopeSelect: e, onAutoScroll: r, ...n } = t, d = J("SelectScrollButton", e), a = l.useRef(null), s = fe(e), c = l.useCallback(() => {
753
+ a.current !== null && (window.clearInterval(a.current), a.current = null);
755
754
  }, []);
756
- return l.useEffect(() => () => s(), [s]), K(() => {
757
- var v;
758
- const p = a().find((_) => _.ref.current === document.activeElement);
759
- (v = p == null ? void 0 : p.ref.current) == null || v.scrollIntoView({ block: "nearest" });
760
- }, [a]), /* @__PURE__ */ i(
755
+ return l.useEffect(() => () => c(), [c]), z(() => {
756
+ var g;
757
+ const p = s().find((S) => S.ref.current === document.activeElement);
758
+ (g = p == null ? void 0 : p.ref.current) == null || g.scrollIntoView({ block: "nearest" });
759
+ }, [s]), /* @__PURE__ */ i(
761
760
  N.div,
762
761
  {
763
762
  "aria-hidden": !0,
764
763
  ...n,
765
764
  ref: o,
766
765
  style: { flexShrink: 0, ...n.style },
767
- onPointerDown: P(n.onPointerDown, () => {
768
- c.current === null && (c.current = window.setInterval(r, 50));
766
+ onPointerDown: b(n.onPointerDown, () => {
767
+ a.current === null && (a.current = window.setInterval(r, 50));
769
768
  }),
770
- onPointerMove: P(n.onPointerMove, () => {
769
+ onPointerMove: b(n.onPointerMove, () => {
771
770
  var p;
772
- (p = d.onItemLeave) == null || p.call(d), c.current === null && (c.current = window.setInterval(r, 50));
771
+ (p = d.onItemLeave) == null || p.call(d), a.current === null && (a.current = window.setInterval(r, 50));
773
772
  }),
774
- onPointerLeave: P(n.onPointerLeave, () => {
775
- s();
773
+ onPointerLeave: b(n.onPointerLeave, () => {
774
+ c();
776
775
  })
777
776
  }
778
777
  );
779
- }), Jt = "SelectSeparator", Qt = l.forwardRef(
778
+ }), Zt = "SelectSeparator", Jt = l.forwardRef(
780
779
  (t, o) => {
781
780
  const { __scopeSelect: e, ...r } = t;
782
781
  return /* @__PURE__ */ i(N.div, { "aria-hidden": !0, ...r, ref: o });
783
782
  }
784
783
  );
785
- Qt.displayName = Jt;
786
- var be = "SelectArrow", eo = l.forwardRef(
784
+ Jt.displayName = Zt;
785
+ var Pe = "SelectArrow", Qt = l.forwardRef(
787
786
  (t, o) => {
788
- const { __scopeSelect: e, ...r } = t, n = me(e), d = Z(be, e), c = J(be, e);
789
- return d.open && c.position === "popper" ? /* @__PURE__ */ i(Pt, { ...n, ...r, ref: o }) : null;
787
+ const { __scopeSelect: e, ...r } = t, n = me(e), d = Z(Pe, e), a = J(Pe, e);
788
+ return d.open && a.position === "popper" ? /* @__PURE__ */ i(bt, { ...n, ...r, ref: o }) : null;
790
789
  }
791
790
  );
792
- eo.displayName = be;
793
- var to = "SelectBubbleInput", st = l.forwardRef(
791
+ Qt.displayName = Pe;
792
+ var eo = "SelectBubbleInput", ct = l.forwardRef(
794
793
  ({ __scopeSelect: t, value: o, ...e }, r) => {
795
- const n = l.useRef(null), d = B(r, n), c = Nt(o);
794
+ const n = l.useRef(null), d = V(r, n), a = Nt(o);
796
795
  return l.useEffect(() => {
797
- const a = n.current;
798
- if (!a) return;
799
- const s = window.HTMLSelectElement.prototype, v = Object.getOwnPropertyDescriptor(
800
- s,
796
+ const s = n.current;
797
+ if (!s) return;
798
+ const c = window.HTMLSelectElement.prototype, g = Object.getOwnPropertyDescriptor(
799
+ c,
801
800
  "value"
802
801
  ).set;
803
- if (c !== o && v) {
804
- const _ = new Event("change", { bubbles: !0 });
805
- v.call(a, o), a.dispatchEvent(_);
802
+ if (a !== o && g) {
803
+ const S = new Event("change", { bubbles: !0 });
804
+ g.call(s, o), s.dispatchEvent(S);
806
805
  }
807
- }, [c, o]), /* @__PURE__ */ i(
806
+ }, [a, o]), /* @__PURE__ */ i(
808
807
  N.select,
809
808
  {
810
809
  ...e,
811
- style: { ...ze, ...e.style },
810
+ style: { ...Be, ...e.style },
812
811
  ref: d,
813
812
  defaultValue: o
814
813
  }
815
814
  );
816
815
  }
817
816
  );
818
- st.displayName = to;
819
- function ct(t) {
817
+ ct.displayName = eo;
818
+ function st(t) {
820
819
  return t === "" || t === void 0;
821
820
  }
822
821
  function at(t) {
823
- const o = wt(t), e = l.useRef(""), r = l.useRef(0), n = l.useCallback(
824
- (c) => {
825
- const a = e.current + c;
826
- o(a), function s(p) {
827
- e.current = p, window.clearTimeout(r.current), p !== "" && (r.current = window.setTimeout(() => s(""), 1e3));
828
- }(a);
822
+ const o = yt(t), e = l.useRef(""), r = l.useRef(0), n = l.useCallback(
823
+ (a) => {
824
+ const s = e.current + a;
825
+ o(s), function c(p) {
826
+ e.current = p, window.clearTimeout(r.current), p !== "" && (r.current = window.setTimeout(() => c(""), 1e3));
827
+ }(s);
829
828
  },
830
829
  [o]
831
830
  ), d = l.useCallback(() => {
@@ -835,17 +834,17 @@ function at(t) {
835
834
  }
836
835
  function it(t, o, e) {
837
836
  const n = o.length > 1 && Array.from(o).every((p) => p === o[0]) ? o[0] : o, d = e ? t.indexOf(e) : -1;
838
- let c = oo(t, Math.max(d, 0));
839
- n.length === 1 && (c = c.filter((p) => p !== e));
840
- const s = c.find(
837
+ let a = to(t, Math.max(d, 0));
838
+ n.length === 1 && (a = a.filter((p) => p !== e));
839
+ const c = a.find(
841
840
  (p) => p.textValue.toLowerCase().startsWith(n.toLowerCase())
842
841
  );
843
- return s !== e ? s : void 0;
842
+ return c !== e ? c : void 0;
844
843
  }
845
- function oo(t, o) {
844
+ function to(t, o) {
846
845
  return t.map((e, r) => t[(o + r) % t.length]);
847
846
  }
848
- var no = Be, ro = He, lo = Fe, so = Ue, co = Ke, ao = je, io = qe, uo = Qe, po = et, fo = ot, mo = nt, ho = rt, dt = {
847
+ var oo = Ve, no = We, ro = Fe, lo = Ke, co = ze, so = je, ao = qe, io = Qe, uo = et, po = ot, fo = nt, mo = rt, dt = {
849
848
  color: void 0,
850
849
  size: void 0,
851
850
  className: void 0,
@@ -859,7 +858,7 @@ var no = Be, ro = He, lo = Fe, so = Ue, co = Ke, ao = je, io = qe, uo = Qe, po =
859
858
  }
860
859
  return t;
861
860
  }, X.apply(this, arguments);
862
- }, go = function(t, o) {
861
+ }, ho = function(t, o) {
863
862
  var e = {};
864
863
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && o.indexOf(r) < 0 && (e[r] = t[r]);
865
864
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var n = 0, r = Object.getOwnPropertySymbols(t); n < r.length; n++)
@@ -882,18 +881,18 @@ function pt(t) {
882
881
  }
883
882
  function vo(t) {
884
883
  var o = function(e) {
885
- var r = t.attr, n = t.size, d = t.title, c = go(t, ["attr", "size", "title"]), a = n || e.size || "1em", s;
886
- return e.className && (s = e.className), t.className && (s = (s ? s + " " : "") + t.className), q.createElement("svg", X({
884
+ var r = t.attr, n = t.size, d = t.title, a = ho(t, ["attr", "size", "title"]), s = n || e.size || "1em", c;
885
+ return e.className && (c = e.className), t.className && (c = (c ? c + " " : "") + t.className), q.createElement("svg", X({
887
886
  stroke: "currentColor",
888
887
  fill: "currentColor",
889
888
  strokeWidth: "0"
890
- }, e.attr, r, c, {
891
- className: s,
889
+ }, e.attr, r, a, {
890
+ className: c,
892
891
  style: X(X({
893
892
  color: t.color || e.color
894
893
  }, e.style), t.style),
895
- height: a,
896
- width: a,
894
+ height: s,
895
+ width: s,
897
896
  xmlns: "http://www.w3.org/2000/svg"
898
897
  }), d && q.createElement("title", null, d), t.children);
899
898
  };
@@ -904,70 +903,52 @@ function vo(t) {
904
903
  function Ae(t) {
905
904
  return pt({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z" } }] })(t);
906
905
  }
907
- function _o(t) {
906
+ function go(t) {
908
907
  return pt({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z" } }] })(t);
909
908
  }
910
- const So = "cfxui__Select__trigger__232e4", wo = "cfxui__Select__fullWidth__739d7", xo = "cfxui__Select__icon__36b6c", yo = "cfxui__Select__content__067da", Co = "cfxui__Select__app__e0114", Io = "cfxui__Select__arrow__8e7eb", To = "cfxui__Select__option__2de5d", bo = "cfxui__Select__tickIcon__71e80", D = {
909
+ const So = "cfxui__Select__trigger__232e4", wo = "cfxui__Select__fullWidth__739d7", yo = "cfxui__Select__icon__36b6c", Co = "cfxui__Select__content__067da", xo = "cfxui__Select__arrow__8e7eb", _o = "cfxui__Select__option__2de5d", Io = "cfxui__Select__tickIcon__71e80", B = {
911
910
  trigger: So,
912
911
  fullWidth: wo,
913
- icon: xo,
914
- content: yo,
915
- app: Co,
916
- arrow: Io,
917
- option: To,
918
- tickIcon: bo,
919
- "select-size-initial-large": "cfxui__Select__select-size-initial-large__5e47d",
920
- "select-size-initial-small": "cfxui__Select__select-size-initial-small__5ae12",
921
- "select-size-small-large": "cfxui__Select__select-size-small-large__79811",
922
- "select-size-small-small": "cfxui__Select__select-size-small-small__1c10c",
923
- "select-size-small-medium-large": "cfxui__Select__select-size-small-medium-large__0bc35",
924
- "select-size-small-medium-small": "cfxui__Select__select-size-small-medium-small__82515",
925
- "select-size-medium-large": "cfxui__Select__select-size-medium-large__e0eb0",
926
- "select-size-medium-small": "cfxui__Select__select-size-medium-small__2c904",
927
- "select-size-medium-large-large": "cfxui__Select__select-size-medium-large-large__a66c1",
928
- "select-size-medium-large-small": "cfxui__Select__select-size-medium-large-small__7dce3",
929
- "select-size-large-large": "cfxui__Select__select-size-large-large__88062",
930
- "select-size-large-small": "cfxui__Select__select-size-large-small__fb50b",
931
- "select-size-xlarge-large": "cfxui__Select__select-size-xlarge-large__5abb1",
932
- "select-size-xlarge-small": "cfxui__Select__select-size-xlarge-small__5ddbb"
912
+ icon: yo,
913
+ content: Co,
914
+ arrow: xo,
915
+ option: _o,
916
+ tickIcon: Io
933
917
  };
934
- function Vo(t) {
918
+ function ko(t) {
935
919
  const {
936
920
  value: o,
937
921
  options: e,
938
922
  onChange: r,
939
- size: n = "normal",
940
- placeholder: d,
941
- disabled: c = !1,
923
+ placeholder: n,
924
+ disabled: d = !1,
942
925
  fullWidth: a = !1,
943
926
  className: s
944
- } = t, [p, v] = q.useState(!1), _ = Et.getResponsiveFlatClassnames("select-size", n).map((S) => D[S]), T = xe(
927
+ } = t, [c, p] = q.useState(!1), g = Ce(
945
928
  s,
946
- D.trigger,
947
- _,
929
+ B.trigger,
948
930
  {
949
- [D.disabled]: c,
950
- [D.fullWidth]: a
931
+ [B.disabled]: d,
932
+ [B.fullWidth]: a
951
933
  }
952
- ), b = xe(
953
- D.content,
954
- _
934
+ ), S = Ce(
935
+ B.content
955
936
  );
956
- return /* @__PURE__ */ $(no, { value: o, onValueChange: r, onOpenChange: v, open: p, children: [
957
- /* @__PURE__ */ $(ro, { disabled: c, className: T, children: [
958
- /* @__PURE__ */ i(lo, { placeholder: d }),
959
- /* @__PURE__ */ i(so, { className: D.icon, children: /* @__PURE__ */ i(Ae, {}) })
937
+ return /* @__PURE__ */ $(oo, { value: o, onValueChange: r, onOpenChange: p, open: c, children: [
938
+ /* @__PURE__ */ $(no, { disabled: d, className: g, children: [
939
+ /* @__PURE__ */ i(ro, { placeholder: n }),
940
+ /* @__PURE__ */ i(lo, { className: B.icon, children: /* @__PURE__ */ i(Ae, {}) })
960
941
  ] }),
961
- /* @__PURE__ */ i(co, { children: /* @__PURE__ */ $(ao, { className: b, children: [
962
- /* @__PURE__ */ i(mo, { className: D.arrow, children: /* @__PURE__ */ i(_o, {}) }),
963
- /* @__PURE__ */ i(io, { children: e.map((S) => /* @__PURE__ */ $(uo, { value: S.value, className: xe(D.option), children: [
964
- /* @__PURE__ */ i(po, { children: S.label }),
965
- /* @__PURE__ */ i(fo, { className: D.indicator, children: /* @__PURE__ */ i(Rt, { name: "Tick", className: D.tickIcon }) })
966
- ] }, S.value)) }),
967
- /* @__PURE__ */ i(ho, { className: D.arrow, children: /* @__PURE__ */ i(Ae, {}) })
942
+ /* @__PURE__ */ i(co, { children: /* @__PURE__ */ $(so, { className: S, children: [
943
+ /* @__PURE__ */ i(fo, { className: B.arrow, children: /* @__PURE__ */ i(go, {}) }),
944
+ /* @__PURE__ */ i(ao, { children: e.map((_) => /* @__PURE__ */ $(io, { value: _.value, className: Ce(B.option), children: [
945
+ /* @__PURE__ */ i(uo, { children: _.label }),
946
+ /* @__PURE__ */ i(po, { className: B.indicator, children: /* @__PURE__ */ i(Et, { name: "Tick", className: B.tickIcon }) })
947
+ ] }, _.value)) }),
948
+ /* @__PURE__ */ i(mo, { className: B.arrow, children: /* @__PURE__ */ i(Ae, {}) })
968
949
  ] }) })
969
950
  ] });
970
951
  }
971
952
  export {
972
- Vo as Select
953
+ ko as Select
973
954
  };