@fanvue/ui 3.52.0 → 3.54.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 (189) hide show
  1. package/dist/cjs/components/AudioPlayer/AudioPlayer.cjs +4 -2
  2. package/dist/cjs/components/AudioPlayer/AudioPlayer.cjs.map +1 -1
  3. package/dist/cjs/components/Autocomplete/Autocomplete.cjs +34 -10
  4. package/dist/cjs/components/Autocomplete/Autocomplete.cjs.map +1 -1
  5. package/dist/cjs/components/Autocomplete/AutocompleteOptionItem.cjs +13 -1
  6. package/dist/cjs/components/Autocomplete/AutocompleteOptionItem.cjs.map +1 -1
  7. package/dist/cjs/components/Badge/Badge.cjs +7 -6
  8. package/dist/cjs/components/Badge/Badge.cjs.map +1 -1
  9. package/dist/cjs/components/BottomNavigation/BottomNavigation.cjs +2 -2
  10. package/dist/cjs/components/BottomNavigation/BottomNavigation.cjs.map +1 -1
  11. package/dist/cjs/components/Button/Button.cjs +2 -1
  12. package/dist/cjs/components/Button/Button.cjs.map +1 -1
  13. package/dist/cjs/components/Card/Card.cjs +6 -3
  14. package/dist/cjs/components/Card/Card.cjs.map +1 -1
  15. package/dist/cjs/components/Chart/ChartCard.cjs +2 -1
  16. package/dist/cjs/components/Chart/ChartCard.cjs.map +1 -1
  17. package/dist/cjs/components/Chart/ChartLoadingOverlay.cjs +1 -1
  18. package/dist/cjs/components/Chart/ChartLoadingOverlay.cjs.map +1 -1
  19. package/dist/cjs/components/ChatInput/ChatInput.cjs +2 -2
  20. package/dist/cjs/components/ChatInput/ChatInput.cjs.map +1 -1
  21. package/dist/cjs/components/ChatMessage/ChatMessage.cjs +4 -2
  22. package/dist/cjs/components/ChatMessage/ChatMessage.cjs.map +1 -1
  23. package/dist/cjs/components/Chip/Chip.cjs +10 -9
  24. package/dist/cjs/components/Chip/Chip.cjs.map +1 -1
  25. package/dist/cjs/components/CreatorCard/CreatorCard.cjs +3 -5
  26. package/dist/cjs/components/CreatorCard/CreatorCard.cjs.map +1 -1
  27. package/dist/cjs/components/CreatorCover/CreatorCover.cjs +11 -7
  28. package/dist/cjs/components/CreatorCover/CreatorCover.cjs.map +1 -1
  29. package/dist/cjs/components/DatePicker/DatePicker.cjs +37 -16
  30. package/dist/cjs/components/DatePicker/DatePicker.cjs.map +1 -1
  31. package/dist/cjs/components/DatePicker/DateRangePanel.cjs +143 -0
  32. package/dist/cjs/components/DatePicker/DateRangePanel.cjs.map +1 -0
  33. package/dist/cjs/components/DatePicker/DateRangePicker.cjs +33 -0
  34. package/dist/cjs/components/DatePicker/DateRangePicker.cjs.map +1 -0
  35. package/dist/cjs/components/DropdownMenu/DropdownMenuItem.cjs +33 -10
  36. package/dist/cjs/components/DropdownMenu/DropdownMenuItem.cjs.map +1 -1
  37. package/dist/cjs/components/DropdownMenu/DropdownMenuReorderItem.cjs +2 -1
  38. package/dist/cjs/components/DropdownMenu/DropdownMenuReorderItem.cjs.map +1 -1
  39. package/dist/cjs/components/DropdownMenu/DropdownMenuRoot.cjs +18 -13
  40. package/dist/cjs/components/DropdownMenu/DropdownMenuRoot.cjs.map +1 -1
  41. package/dist/cjs/components/DropdownMenu/DropdownMenuSelectionItems.cjs +56 -40
  42. package/dist/cjs/components/DropdownMenu/DropdownMenuSelectionItems.cjs.map +1 -1
  43. package/dist/cjs/components/FilterMenu/FilterMenu.cjs +45 -0
  44. package/dist/cjs/components/FilterMenu/FilterMenu.cjs.map +1 -0
  45. package/dist/cjs/components/IconButton/IconButton.cjs +7 -3
  46. package/dist/cjs/components/IconButton/IconButton.cjs.map +1 -1
  47. package/dist/cjs/components/Icons/MenuRowIcon.cjs +9 -2
  48. package/dist/cjs/components/Icons/MenuRowIcon.cjs.map +1 -1
  49. package/dist/cjs/components/Icons/ReorganiseIcon.cjs +65 -0
  50. package/dist/cjs/components/Icons/ReorganiseIcon.cjs.map +1 -0
  51. package/dist/cjs/components/Icons/VerifiedIcon.cjs +9 -15
  52. package/dist/cjs/components/Icons/VerifiedIcon.cjs.map +1 -1
  53. package/dist/cjs/components/Pagination/Pagination.cjs +3 -2
  54. package/dist/cjs/components/Pagination/Pagination.cjs.map +1 -1
  55. package/dist/cjs/components/PhoneField/PhoneField.cjs +21 -17
  56. package/dist/cjs/components/PhoneField/PhoneField.cjs.map +1 -1
  57. package/dist/cjs/components/Popover/Popover.cjs +69 -0
  58. package/dist/cjs/components/Popover/Popover.cjs.map +1 -0
  59. package/dist/cjs/components/Select/Select.cjs +49 -12
  60. package/dist/cjs/components/Select/Select.cjs.map +1 -1
  61. package/dist/cjs/components/Slider/SliderThumb.cjs +3 -2
  62. package/dist/cjs/components/Slider/SliderThumb.cjs.map +1 -1
  63. package/dist/cjs/components/Snackbar/Snackbar.cjs +1 -1
  64. package/dist/cjs/components/Snackbar/Snackbar.cjs.map +1 -1
  65. package/dist/cjs/components/Switch/Switch.cjs +1 -1
  66. package/dist/cjs/components/Switch/Switch.cjs.map +1 -1
  67. package/dist/cjs/components/Table/Table.cjs +104 -38
  68. package/dist/cjs/components/Table/Table.cjs.map +1 -1
  69. package/dist/cjs/components/Table/TableToolbarSearchFilters.cjs +152 -0
  70. package/dist/cjs/components/Table/TableToolbarSearchFilters.cjs.map +1 -0
  71. package/dist/cjs/components/Table/useFittingCount.cjs +51 -0
  72. package/dist/cjs/components/Table/useFittingCount.cjs.map +1 -0
  73. package/dist/cjs/components/Tag/Tag.cjs +99 -0
  74. package/dist/cjs/components/Tag/Tag.cjs.map +1 -0
  75. package/dist/cjs/components/TextArea/TextArea.cjs +5 -4
  76. package/dist/cjs/components/TextArea/TextArea.cjs.map +1 -1
  77. package/dist/cjs/components/TextField/TextField.cjs +30 -15
  78. package/dist/cjs/components/TextField/TextField.cjs.map +1 -1
  79. package/dist/cjs/date-picker.cjs +4 -0
  80. package/dist/cjs/date-picker.cjs.map +1 -1
  81. package/dist/cjs/index.cjs +12 -0
  82. package/dist/cjs/index.cjs.map +1 -1
  83. package/dist/cjs/utils/floatingContentSurface.cjs +8 -0
  84. package/dist/cjs/utils/floatingContentSurface.cjs.map +1 -0
  85. package/dist/cjs/utils/inputFieldClasses.cjs +8 -0
  86. package/dist/cjs/utils/inputFieldClasses.cjs.map +1 -0
  87. package/dist/cjs/utils/pointerCapture.cjs +20 -0
  88. package/dist/cjs/utils/pointerCapture.cjs.map +1 -0
  89. package/dist/cjs/utils/useDragToDismiss.cjs +3 -2
  90. package/dist/cjs/utils/useDragToDismiss.cjs.map +1 -1
  91. package/dist/cjs/utils/useSuppressClickAfterDrag.cjs +2 -1
  92. package/dist/cjs/utils/useSuppressClickAfterDrag.cjs.map +1 -1
  93. package/dist/components/AudioPlayer/AudioPlayer.mjs +4 -2
  94. package/dist/components/AudioPlayer/AudioPlayer.mjs.map +1 -1
  95. package/dist/components/Autocomplete/Autocomplete.mjs +34 -10
  96. package/dist/components/Autocomplete/Autocomplete.mjs.map +1 -1
  97. package/dist/components/Autocomplete/AutocompleteOptionItem.mjs +13 -1
  98. package/dist/components/Autocomplete/AutocompleteOptionItem.mjs.map +1 -1
  99. package/dist/components/Badge/Badge.mjs +7 -6
  100. package/dist/components/Badge/Badge.mjs.map +1 -1
  101. package/dist/components/BottomNavigation/BottomNavigation.mjs +2 -2
  102. package/dist/components/BottomNavigation/BottomNavigation.mjs.map +1 -1
  103. package/dist/components/Button/Button.mjs +2 -1
  104. package/dist/components/Button/Button.mjs.map +1 -1
  105. package/dist/components/Card/Card.mjs +6 -3
  106. package/dist/components/Card/Card.mjs.map +1 -1
  107. package/dist/components/Chart/ChartCard.mjs +2 -1
  108. package/dist/components/Chart/ChartCard.mjs.map +1 -1
  109. package/dist/components/Chart/ChartLoadingOverlay.mjs +1 -1
  110. package/dist/components/Chart/ChartLoadingOverlay.mjs.map +1 -1
  111. package/dist/components/ChatInput/ChatInput.mjs +2 -2
  112. package/dist/components/ChatInput/ChatInput.mjs.map +1 -1
  113. package/dist/components/ChatMessage/ChatMessage.mjs +4 -2
  114. package/dist/components/ChatMessage/ChatMessage.mjs.map +1 -1
  115. package/dist/components/Chip/Chip.mjs +10 -9
  116. package/dist/components/Chip/Chip.mjs.map +1 -1
  117. package/dist/components/CreatorCard/CreatorCard.mjs +3 -5
  118. package/dist/components/CreatorCard/CreatorCard.mjs.map +1 -1
  119. package/dist/components/CreatorCover/CreatorCover.mjs +11 -7
  120. package/dist/components/CreatorCover/CreatorCover.mjs.map +1 -1
  121. package/dist/components/DatePicker/DatePicker.mjs +39 -18
  122. package/dist/components/DatePicker/DatePicker.mjs.map +1 -1
  123. package/dist/components/DatePicker/DateRangePanel.mjs +126 -0
  124. package/dist/components/DatePicker/DateRangePanel.mjs.map +1 -0
  125. package/dist/components/DatePicker/DateRangePicker.mjs +33 -0
  126. package/dist/components/DatePicker/DateRangePicker.mjs.map +1 -0
  127. package/dist/components/DropdownMenu/DropdownMenuItem.mjs +33 -10
  128. package/dist/components/DropdownMenu/DropdownMenuItem.mjs.map +1 -1
  129. package/dist/components/DropdownMenu/DropdownMenuReorderItem.mjs +2 -1
  130. package/dist/components/DropdownMenu/DropdownMenuReorderItem.mjs.map +1 -1
  131. package/dist/components/DropdownMenu/DropdownMenuRoot.mjs +18 -13
  132. package/dist/components/DropdownMenu/DropdownMenuRoot.mjs.map +1 -1
  133. package/dist/components/DropdownMenu/DropdownMenuSelectionItems.mjs +56 -40
  134. package/dist/components/DropdownMenu/DropdownMenuSelectionItems.mjs.map +1 -1
  135. package/dist/components/FilterMenu/FilterMenu.mjs +28 -0
  136. package/dist/components/FilterMenu/FilterMenu.mjs.map +1 -0
  137. package/dist/components/IconButton/IconButton.mjs +7 -3
  138. package/dist/components/IconButton/IconButton.mjs.map +1 -1
  139. package/dist/components/Icons/MenuRowIcon.mjs +9 -2
  140. package/dist/components/Icons/MenuRowIcon.mjs.map +1 -1
  141. package/dist/components/Icons/ReorganiseIcon.mjs +48 -0
  142. package/dist/components/Icons/ReorganiseIcon.mjs.map +1 -0
  143. package/dist/components/Icons/VerifiedIcon.mjs +9 -15
  144. package/dist/components/Icons/VerifiedIcon.mjs.map +1 -1
  145. package/dist/components/Pagination/Pagination.mjs +3 -2
  146. package/dist/components/Pagination/Pagination.mjs.map +1 -1
  147. package/dist/components/PhoneField/PhoneField.mjs +21 -17
  148. package/dist/components/PhoneField/PhoneField.mjs.map +1 -1
  149. package/dist/components/Popover/Popover.mjs +51 -0
  150. package/dist/components/Popover/Popover.mjs.map +1 -0
  151. package/dist/components/Select/Select.mjs +49 -12
  152. package/dist/components/Select/Select.mjs.map +1 -1
  153. package/dist/components/Slider/SliderThumb.mjs +3 -2
  154. package/dist/components/Slider/SliderThumb.mjs.map +1 -1
  155. package/dist/components/Snackbar/Snackbar.mjs +1 -1
  156. package/dist/components/Snackbar/Snackbar.mjs.map +1 -1
  157. package/dist/components/Switch/Switch.mjs +1 -1
  158. package/dist/components/Switch/Switch.mjs.map +1 -1
  159. package/dist/components/Table/Table.mjs +104 -38
  160. package/dist/components/Table/Table.mjs.map +1 -1
  161. package/dist/components/Table/TableToolbarSearchFilters.mjs +135 -0
  162. package/dist/components/Table/TableToolbarSearchFilters.mjs.map +1 -0
  163. package/dist/components/Table/useFittingCount.mjs +34 -0
  164. package/dist/components/Table/useFittingCount.mjs.map +1 -0
  165. package/dist/components/Tag/Tag.mjs +82 -0
  166. package/dist/components/Tag/Tag.mjs.map +1 -0
  167. package/dist/components/TextArea/TextArea.mjs +5 -4
  168. package/dist/components/TextArea/TextArea.mjs.map +1 -1
  169. package/dist/components/TextField/TextField.mjs +30 -15
  170. package/dist/components/TextField/TextField.mjs.map +1 -1
  171. package/dist/date-picker.d.ts +109 -0
  172. package/dist/date-picker.mjs +5 -1
  173. package/dist/date-picker.mjs.map +1 -1
  174. package/dist/index.d.ts +317 -20
  175. package/dist/index.mjs +12 -0
  176. package/dist/index.mjs.map +1 -1
  177. package/dist/styles/base.css +51 -4
  178. package/dist/styles/theme.css +1217 -1
  179. package/dist/utils/floatingContentSurface.mjs +8 -0
  180. package/dist/utils/floatingContentSurface.mjs.map +1 -0
  181. package/dist/utils/inputFieldClasses.mjs +8 -0
  182. package/dist/utils/inputFieldClasses.mjs.map +1 -0
  183. package/dist/utils/pointerCapture.mjs +20 -0
  184. package/dist/utils/pointerCapture.mjs.map +1 -0
  185. package/dist/utils/useDragToDismiss.mjs +3 -2
  186. package/dist/utils/useDragToDismiss.mjs.map +1 -1
  187. package/dist/utils/useSuppressClickAfterDrag.mjs +2 -1
  188. package/dist/utils/useSuppressClickAfterDrag.mjs.map +1 -1
  189. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"VerifiedIcon.mjs","sources":["../../../src/components/Icons/VerifiedIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { BaseIcon } from \"./BaseIcon\";\nimport type { BaseIconProps, IconVariants } from \"./types\";\n\nconst VARIANTS: IconVariants = {\n 16: {\n outlined: [\n {\n d: \"M14.1051 9.4044C14.8084 8.6002 14.8084 7.3998 14.1051 6.5956L13.9891 6.4629C13.8087 6.2567 13.7209 5.9856 13.746 5.7128L13.7618 5.5419C13.8599 4.4763 13.1535 3.5029 12.11 3.2658L11.947 3.2288C11.6787 3.1679 11.4474 2.9991 11.3075 2.7622L11.221 2.6158C10.6753 1.6919 9.5283 1.3171 8.5423 1.7404L8.3946 1.8039C8.1427 1.9121 7.8573 1.9121 7.6054 1.8039L7.4553 1.7394C6.4703 1.3165 5.3245 1.69 4.7781 2.6122L4.6934 2.7552C4.553 2.9923 4.3209 3.1609 4.052 3.2212L3.8955 3.2563C2.8495 3.491 2.1401 4.4656 2.2382 5.5331L2.2542 5.7074C2.2792 5.9794 2.1918 6.2499 2.0123 6.4558L1.8902 6.5959C1.1893 7.4003 1.1903 8.5988 1.8927 9.4019L2.011 9.5372C2.1913 9.7433 2.2792 10.0143 2.2541 10.287L2.2377 10.4652C2.1398 11.5306 2.8462 12.5037 3.8896 12.7407L4.0538 12.7781C4.3216 12.8389 4.5526 13.0072 4.6926 13.2435L4.7757 13.3837C5.3231 14.3077 6.472 14.6807 7.4577 14.2545L7.6045 14.191C7.8569 14.0819 8.1432 14.0815 8.3959 14.19L8.5447 14.2539C9.5297 14.6769 10.6755 14.3033 11.2219 13.3811L11.3074 13.2368C11.4473 13.0005 11.6784 12.8322 11.9462 12.7714L12.11 12.7342C13.1535 12.4971 13.8599 11.5237 13.7618 10.4581L13.746 10.2871C13.7209 10.0144 13.8087 9.7433 13.9891 9.5371L14.1051 9.4044Z\",\n sw: 1,\n },\n {\n d: \"M6.9627 10.91C6.8325 11.0406 6.6209 11.0406 6.4906 10.91L4.4284 8.8424C4.2985 8.7121 4.2987 8.5013 4.4287 8.3713L4.9438 7.8562C5.0742 7.7259 5.2856 7.7261 5.4157 7.8567L6.7267 9.1733L10.3909 5.4965C10.5211 5.366 10.7325 5.3658 10.8628 5.4961L11.3779 6.0113C11.508 6.1413 11.5081 6.3521 11.3783 6.4824L6.9627 10.91Z\",\n },\n ],\n filled: [\n {\n d: \"M14.1051 9.4044C14.8084 8.6002 14.8084 7.3998 14.1051 6.5956L13.9891 6.4629C13.8087 6.2567 13.7209 5.9856 13.746 5.7128L13.7618 5.5419C13.8599 4.4763 13.1535 3.5029 12.11 3.2658L11.947 3.2288C11.6787 3.1679 11.4474 2.9991 11.3075 2.7622L11.221 2.6158C10.6753 1.6919 9.5283 1.3171 8.5423 1.7404L8.3946 1.8039C8.1427 1.9121 7.8573 1.9121 7.6054 1.8039L7.4553 1.7394C6.4703 1.3165 5.3245 1.69 4.7781 2.6122L4.6934 2.7552C4.553 2.9923 4.3209 3.1609 4.052 3.2212L3.8955 3.2563C2.8495 3.491 2.1401 4.4656 2.2382 5.5331L2.2542 5.7074C2.2792 5.9794 2.1918 6.2499 2.0123 6.4558L1.8902 6.5959C1.1893 7.4003 1.1903 8.5988 1.8927 9.4019L2.011 9.5372C2.1913 9.7433 2.2792 10.0143 2.2541 10.287L2.2377 10.4652C2.1398 11.5306 2.8462 12.5037 3.8896 12.7407L4.0538 12.7781C4.3216 12.8389 4.5526 13.0072 4.6926 13.2435L4.7757 13.3837C5.3231 14.3077 6.472 14.6807 7.4577 14.2545L7.6045 14.191C7.8569 14.0819 8.1432 14.0815 8.3959 14.19L8.5447 14.2539C9.5297 14.6769 10.6755 14.3033 11.2219 13.3811L11.3074 13.2368C11.4473 13.0005 11.6784 12.8322 11.9462 12.7714L12.11 12.7342C13.1535 12.4971 13.8599 11.5237 13.7618 10.4581L13.746 10.2871C13.7209 10.0144 13.8087 9.7433 13.9891 9.5371L14.1051 9.4044ZM6.9627 10.91C6.8325 11.0406 6.6209 11.0406 6.4906 10.91L4.4284 8.8424C4.2985 8.7121 4.2987 8.5013 4.4287 8.3713L4.9438 7.8562C5.0742 7.7259 5.2856 7.7261 5.4157 7.8567L6.7267 9.1733L10.3909 5.4965C10.5211 5.366 10.7325 5.3658 10.8628 5.4961L11.3779 6.0113C11.508 6.1413 11.5081 6.3521 11.3783 6.4824L6.9627 10.91Z\",\n eo: true,\n },\n ],\n },\n 24: {\n outlined: [\n {\n d: \"M21.158 14.107a3.2 3.2 0 0 0 0-4.214l-.174-.199a1.5 1.5 0 0 1-.365-1.125l.024-.256a3.2 3.2 0 0 0-2.478-3.414l-.244-.056a1.5 1.5 0 0 1-.96-.7l-.13-.22a3.2 3.2 0 0 0-4.017-1.312l-.222.095a1.5 1.5 0 0 1-1.184 0l-.225-.097a3.2 3.2 0 0 0-4.016 1.31l-.127.214a1.5 1.5 0 0 1-.962.699l-.235.052A3.2 3.2 0 0 0 3.357 8.3l.024.261a1.5 1.5 0 0 1-.363 1.123l-.183.21a3.2 3.2 0 0 0 .004 4.209l.178.203c.27.309.402.716.364 1.125l-.024.267a3.2 3.2 0 0 0 2.477 3.413l.247.056a1.5 1.5 0 0 1 .958.698l.125.21a3.2 3.2 0 0 0 4.023 1.307l.22-.096a1.5 1.5 0 0 1 1.187-.001l.223.096a3.2 3.2 0 0 0 4.016-1.31l.128-.216a1.5 1.5 0 0 1 .958-.698l.246-.056a3.2 3.2 0 0 0 2.478-3.414l-.024-.256a1.5 1.5 0 0 1 .365-1.125z\",\n sw: 1.5,\n },\n {\n d: \"M10.444 16.365a.5.5 0 0 1-.708 0l-3.093-3.101a.5.5 0 0 1 0-.707l.773-.773a.5.5 0 0 1 .708.001l1.966 1.975 5.496-5.515a.5.5 0 0 1 .708 0l.773.772a.5.5 0 0 1 0 .707z\",\n },\n ],\n filled: [\n {\n d: \"M21.158 14.107a3.2 3.2 0 0 0 0-4.214l-.174-.199a1.5 1.5 0 0 1-.365-1.125l.024-.256a3.2 3.2 0 0 0-2.478-3.414l-.244-.056a1.5 1.5 0 0 1-.96-.7l-.13-.22a3.2 3.2 0 0 0-4.017-1.312l-.222.095a1.5 1.5 0 0 1-1.184 0l-.225-.097a3.2 3.2 0 0 0-4.016 1.31l-.127.214a1.5 1.5 0 0 1-.962.699l-.235.052A3.2 3.2 0 0 0 3.357 8.3l.024.261a1.5 1.5 0 0 1-.363 1.123l-.183.21a3.2 3.2 0 0 0 .004 4.209l.178.203c.27.309.402.716.364 1.125l-.024.267a3.2 3.2 0 0 0 2.477 3.413l.247.056a1.5 1.5 0 0 1 .958.698l.125.21a3.2 3.2 0 0 0 4.023 1.307l.22-.096a1.5 1.5 0 0 1 1.187-.001l.223.096a3.2 3.2 0 0 0 4.016-1.31l.128-.216a1.5 1.5 0 0 1 .958-.698l.246-.056a3.2 3.2 0 0 0 2.478-3.414l-.024-.256a1.5 1.5 0 0 1 .365-1.125zm-10.714 2.258a.5.5 0 0 1-.708 0l-3.093-3.101a.5.5 0 0 1 0-.707l.773-.773a.5.5 0 0 1 .708.001l1.966 1.975 5.496-5.515a.5.5 0 0 1 .708 0l.773.772a.5.5 0 0 1 0 .707z\",\n eo: true,\n },\n ],\n },\n 32: {\n outlined: [\n {\n d: \"M28.2103 18.8088C29.6168 17.2004 29.6168 14.7996 28.2103 13.1912L27.9781 12.9258C27.6175 12.5134 27.4417 11.9712 27.492 11.4257L27.5236 11.0838C27.7199 8.9526 26.3071 7.0057 24.22 6.5317L23.894 6.4576C23.3575 6.3357 22.8948 5.9982 22.6149 5.5244L22.442 5.2316C21.3507 3.3838 19.0567 2.6341 17.0847 3.4809L16.7892 3.6078C16.2853 3.8242 15.7147 3.8242 15.2108 3.6078L14.9105 3.4788C12.9407 2.6329 10.649 3.3801 9.5562 5.2245L9.3869 5.5104C9.1059 5.9845 8.6418 6.3217 8.1041 6.4424L7.791 6.5126C5.6989 6.9821 4.2802 8.9311 4.4764 11.0662L4.5084 11.4147C4.5584 11.9588 4.3836 12.4997 4.0246 12.9117L3.7804 13.1919C2.3785 14.8005 2.3807 17.1976 3.7854 18.8037L4.0221 19.0744C4.3826 19.4867 4.5583 20.0287 4.5082 20.574L4.4754 20.9304C4.2796 23.0612 5.6925 25.0075 7.7791 25.4815L8.1076 25.5561C8.6432 25.6777 9.1053 26.0144 9.3853 26.4869L9.5515 26.7675C10.6463 28.6153 12.944 29.3613 14.9155 28.5089L15.2091 28.382C15.7139 28.1637 16.2864 28.1629 16.7919 28.38L17.0895 28.5079C19.0593 29.3537 21.3511 28.6065 22.4437 26.7621L22.6148 26.4736C22.8947 26.0011 23.3568 25.6644 23.8924 25.5428L24.22 25.4684C26.3071 24.9943 27.7199 23.0473 27.5236 20.9161L27.492 20.5743C27.4417 20.0288 27.6175 19.4865 27.9781 19.0741L28.2103 18.8088Z\",\n sw: 2,\n },\n {\n d: \"M13.9253 21.82C13.6649 22.0812 13.2418 22.0812 12.9813 21.82L8.8568 17.6848C8.5971 17.4243 8.5973 17.0027 8.8575 16.7425L9.8876 15.7124C10.1483 15.4517 10.5712 15.4521 10.8314 15.7135L13.4533 18.3467L20.7819 10.993C21.0421 10.7319 21.4649 10.7315 21.7256 10.9922L22.7559 12.0226C23.016 12.2827 23.0163 12.7043 22.7565 12.9647L13.9253 21.82Z\",\n },\n ],\n filled: [\n {\n d: \"M28.2103 18.8088C29.6168 17.2004 29.6168 14.7996 28.2103 13.1912L27.9781 12.9258C27.6175 12.5134 27.4417 11.9712 27.492 11.4257L27.5236 11.0838C27.7199 8.9526 26.3071 7.0057 24.22 6.5317L23.894 6.4576C23.3575 6.3357 22.8948 5.9982 22.6149 5.5244L22.442 5.2316C21.3507 3.3838 19.0567 2.6341 17.0847 3.4809L16.7892 3.6078C16.2853 3.8242 15.7147 3.8242 15.2108 3.6078L14.9105 3.4788C12.9407 2.6329 10.649 3.3801 9.5562 5.2245L9.3869 5.5104C9.1059 5.9845 8.6418 6.3217 8.1041 6.4424L7.791 6.5126C5.6989 6.9821 4.2802 8.9311 4.4764 11.0662L4.5084 11.4147C4.5584 11.9588 4.3836 12.4997 4.0246 12.9117L3.7804 13.1919C2.3785 14.8005 2.3807 17.1976 3.7854 18.8037L4.0221 19.0744C4.3826 19.4867 4.5583 20.0287 4.5082 20.574L4.4754 20.9304C4.2796 23.0612 5.6925 25.0075 7.7791 25.4815L8.1076 25.5561C8.6432 25.6777 9.1053 26.0144 9.3853 26.4869L9.5515 26.7675C10.6463 28.6153 12.944 29.3613 14.9155 28.5089L15.2091 28.382C15.7139 28.1637 16.2864 28.1629 16.7919 28.38L17.0895 28.5079C19.0593 29.3537 21.3511 28.6065 22.4437 26.7621L22.6148 26.4736C22.8947 26.0011 23.3568 25.6644 23.8924 25.5428L24.22 25.4684C26.3071 24.9943 27.7199 23.0473 27.5236 20.9161L27.492 20.5743C27.4417 20.0288 27.6175 19.4865 27.9781 19.0741L28.2103 18.8088ZM13.9253 21.82C13.6649 22.0812 13.2418 22.0812 12.9813 21.82L8.8568 17.6848C8.5971 17.4243 8.5973 17.0027 8.8575 16.7425L9.8876 15.7124C10.1483 15.4517 10.5712 15.4521 10.8314 15.7135L13.4533 18.3467L20.7819 10.993C21.0421 10.7319 21.4649 10.7315 21.7256 10.9922L22.7559 12.0226C23.016 12.2827 23.0163 12.7043 22.7565 12.9647L13.9253 21.82Z\",\n eo: true,\n },\n ],\n },\n};\n\n/** Props for {@link VerifiedIcon}. See {@link BaseIconProps} for the shared shape. */\nexport type VerifiedIconProps = BaseIconProps;\n\n/**\n * Verified badge icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.\n * Defaults to the filled variant.\n *\n * @example\n * ```tsx\n * <VerifiedIcon size={24} />\n * ```\n */\nexport const VerifiedIcon = React.forwardRef<SVGSVGElement, VerifiedIconProps>(\n ({ filled = true, ...props }, ref) => (\n <BaseIcon ref={ref} variants={VARIANTS} filled={filled} {...props} />\n ),\n);\n\nVerifiedIcon.displayName = \"VerifiedIcon\";\n"],"names":[],"mappings":";;;;AAIA,MAAM,WAAyB;AAAA,EAC7B,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,QACH,IAAI;AAAA,MAAA;AAAA,MAEN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,QACH,IAAI;AAAA,MAAA;AAAA,IACN;AAAA,EACF;AAAA,EAEF,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,QACH,IAAI;AAAA,MAAA;AAAA,MAEN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,QACH,IAAI;AAAA,MAAA;AAAA,IACN;AAAA,EACF;AAAA,EAEF,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,QACH,IAAI;AAAA,MAAA;AAAA,MAEN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,QACH,IAAI;AAAA,MAAA;AAAA,IACN;AAAA,EACF;AAEJ;AAcO,MAAM,eAAe,MAAM;AAAA,EAChC,CAAC,EAAE,SAAS,MAAM,GAAG,MAAA,GAAS,QAC5B,oBAAC,YAAS,KAAU,UAAU,UAAU,QAAiB,GAAG,MAAA,CAAO;AAEvE;AAEA,aAAa,cAAc;"}
1
+ {"version":3,"file":"VerifiedIcon.mjs","sources":["../../../src/components/Icons/VerifiedIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { BaseIcon } from \"./BaseIcon\";\nimport type { BaseIconProps, IconVariants } from \"./types\";\n\nconst VARIANTS: IconVariants = {\n 16: {\n outlined: [\n {\n d: \"M7.193 10.113a.5.5 0 0 1-.353-.147L5.227 8.353a.503.503 0 0 1 0-.707.503.503 0 0 1 .706 0l1.26 1.26L10.06 6.04a.503.503 0 0 1 .707 0 .503.503 0 0 1 0 .706l-3.22 3.22a.5.5 0 0 1-.354.147\",\n },\n {\n d: \"M8 15.167c-.42 0-.84-.14-1.167-.42L5.78 13.84a1 1 0 0 0-.513-.187H4.12c-.987 0-1.787-.8-1.787-1.786v-1.14a1 1 0 0 0-.186-.507l-.9-1.06C.7 8.513.7 7.493 1.247 6.847l.9-1.06a1 1 0 0 0 .186-.507V4.133c0-.986.8-1.786 1.787-1.786h1.153c.14 0 .407-.1.514-.187l1.053-.907a1.82 1.82 0 0 1 2.327 0l1.053.907c.107.093.373.187.513.187h1.134c.986 0 1.786.8 1.786 1.786v1.134c0 .14.1.406.194.513l.906 1.053c.56.654.56 1.674 0 2.327l-.906 1.053a1.03 1.03 0 0 0-.194.514v1.133c0 .987-.8 1.787-1.786 1.787h-1.134c-.14 0-.406.1-.513.186l-1.053.907A1.76 1.76 0 0 1 8 15.167M4.12 3.347a.79.79 0 0 0-.787.786v1.14c0 .38-.18.867-.426 1.154l-.9 1.06c-.234.273-.234.746 0 1.02l.9 1.06c.246.293.426.773.426 1.153v1.14a.79.79 0 0 0 .787.787h1.153c.387 0 .874.18 1.167.433l1.053.907c.274.233.754.233 1.027 0l1.053-.907c.294-.247.78-.433 1.167-.433h1.133a.79.79 0 0 0 .787-.787v-1.133c0-.387.18-.874.433-1.167L14 8.507c.233-.274.233-.754 0-1.027l-.907-1.053a1.96 1.96 0 0 1-.433-1.167V4.133a.79.79 0 0 0-.787-.786H10.74c-.387 0-.873-.18-1.167-.434L8.52 2.007c-.273-.234-.753-.234-1.027 0L6.44 2.92a2 2 0 0 1-1.167.427z\",\n },\n ],\n filled: [\n {\n d: \"m14.373 7.16-.906-1.053a1.5 1.5 0 0 1-.314-.84V4.134c0-.707-.58-1.287-1.286-1.287h-1.134c-.26 0-.64-.14-.84-.313L8.84 1.627c-.46-.393-1.213-.393-1.68 0l-1.047.913c-.2.167-.58.307-.84.307H4.12c-.707 0-1.287.58-1.287 1.287v1.14c0 .26-.14.633-.306.833l-.9 1.06c-.387.46-.387 1.207 0 1.667l.9 1.06c.166.2.306.573.306.833v1.14c0 .707.58 1.287 1.287 1.287h1.153c.26 0 .64.14.84.313l1.054.907c.46.393 1.213.393 1.68 0l1.053-.907c.2-.173.573-.313.84-.313h1.133c.707 0 1.287-.58 1.287-1.287v-1.133c0-.26.14-.64.313-.84l.907-1.054c.387-.46.387-1.22-.007-1.68m-3.6-.42-3.22 3.22a.5.5 0 0 1-.706 0L5.233 8.347a.503.503 0 0 1 0-.707.503.503 0 0 1 .707 0L7.2 8.9l2.867-2.866a.503.503 0 0 1 .706 0 .503.503 0 0 1 0 .706\",\n },\n ],\n },\n 24: {\n outlined: [\n {\n d: \"M10.79 15.17a.75.75 0 0 1-.53-.22l-2.42-2.42a.754.754 0 0 1 0-1.06c.29-.29.77-.29 1.06 0l1.89 1.89 4.3-4.3c.29-.29.77-.29 1.06 0s.29.77 0 1.06l-4.83 4.83a.75.75 0 0 1-.53.22\",\n },\n {\n d: \"M12 22.75c-.63 0-1.26-.21-1.75-.63l-1.58-1.36c-.16-.14-.56-.28-.77-.28H6.18A2.68 2.68 0 0 1 3.5 17.8v-1.71c0-.21-.14-.6-.28-.76l-1.35-1.59c-.82-.97-.82-2.5 0-3.47l1.35-1.59c.14-.16.28-.55.28-.76V6.2c0-1.48 1.2-2.68 2.68-2.68h1.73c.21 0 .61-.15.77-.28l1.58-1.36c.98-.84 2.51-.84 3.49 0l1.58 1.36c.16.14.56.28.77.28h1.7c1.48 0 2.68 1.2 2.68 2.68v1.7c0 .21.15.61.29.77l1.36 1.58c.84.98.84 2.51 0 3.49l-1.36 1.58c-.14.16-.29.56-.29.77v1.7c0 1.48-1.2 2.68-2.68 2.68h-1.7c-.21 0-.61.15-.77.28l-1.58 1.36c-.49.43-1.12.64-1.75.64M6.18 5.02C5.53 5.02 5 5.55 5 6.2v1.71c0 .57-.27 1.3-.64 1.73l-1.35 1.59c-.35.41-.35 1.12 0 1.53l1.35 1.59c.37.44.64 1.16.64 1.73v1.71c0 .65.53 1.18 1.18 1.18h1.73c.58 0 1.31.27 1.75.65l1.58 1.36c.41.35 1.13.35 1.54 0l1.58-1.36c.44-.37 1.17-.65 1.75-.65h1.7c.65 0 1.18-.53 1.18-1.18v-1.7c0-.58.27-1.31.65-1.75L21 12.76c.35-.41.35-1.13 0-1.54l-1.36-1.58c-.38-.44-.65-1.17-.65-1.75V6.2c0-.65-.53-1.18-1.18-1.18h-1.7c-.58 0-1.31-.27-1.75-.65l-1.58-1.36c-.41-.35-1.13-.35-1.54 0L9.66 4.38c-.44.37-1.18.64-1.75.64z\",\n },\n ],\n filled: [\n {\n d: \"M21.56 10.74 20.2 9.16c-.26-.3-.47-.86-.47-1.26V6.2c0-1.06-.87-1.93-1.93-1.93h-1.7c-.39 0-.96-.21-1.26-.47l-1.58-1.36c-.69-.59-1.82-.59-2.52 0L9.17 3.81c-.3.25-.87.46-1.26.46H6.18c-1.06 0-1.93.87-1.93 1.93v1.71c0 .39-.21.95-.46 1.25l-1.35 1.59c-.58.69-.58 1.81 0 2.5l1.35 1.59c.25.3.46.86.46 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.73c.39 0 .96.21 1.26.47l1.58 1.36c.69.59 1.82.59 2.52 0l1.58-1.36c.3-.26.86-.47 1.26-.47h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.39.21-.96.47-1.26l1.36-1.58c.58-.69.58-1.83-.01-2.52m-5.4-.63-4.83 4.83a.75.75 0 0 1-1.06 0l-2.42-2.42a.754.754 0 0 1 0-1.06c.29-.29.77-.29 1.06 0l1.89 1.89 4.3-4.3c.29-.29.77-.29 1.06 0s.29.77 0 1.06\",\n },\n ],\n },\n 32: {\n outlined: [\n {\n d: \"M14.387 20.226a1 1 0 0 1-.707-.294l-3.227-3.226a1.006 1.006 0 0 1 0-1.414 1.006 1.006 0 0 1 1.413 0l2.52 2.52 5.734-5.733a1.006 1.006 0 0 1 1.413 0 1.006 1.006 0 0 1 0 1.413l-6.44 6.44a1 1 0 0 1-.707.294\",\n },\n {\n d: \"M16 30.333c-.84 0-1.68-.28-2.334-.84L11.56 27.68c-.213-.187-.746-.373-1.026-.373H8.24a3.574 3.574 0 0 1-3.574-3.574v-2.28c0-.28-.186-.8-.373-1.013l-1.8-2.12c-1.093-1.294-1.093-3.334 0-4.627l1.8-2.12c.187-.213.373-.733.373-1.013V8.267c0-1.974 1.6-3.574 3.574-3.574h2.306c.28 0 .814-.2 1.027-.373l2.107-1.814c1.306-1.12 3.346-1.12 4.653 0L20.44 4.32c.213.186.746.373 1.026.373h2.267c1.973 0 3.573 1.6 3.573 3.574v2.266c0 .28.2.814.387 1.027l1.813 2.106c1.12 1.307 1.12 3.347 0 4.654l-1.813 2.107c-.187.213-.387.746-.387 1.026v2.267c0 1.973-1.6 3.573-3.573 3.573h-2.267c-.28 0-.813.2-1.027.373l-2.106 1.814c-.653.573-1.493.853-2.333.853M8.24 6.693c-.867 0-1.574.707-1.574 1.574v2.28c0 .76-.36 1.733-.853 2.306l-1.8 2.12c-.467.547-.467 1.493 0 2.04l1.8 2.12c.493.587.853 1.547.853 2.307v2.28c0 .867.707 1.573 1.574 1.573h2.306c.774 0 1.747.36 2.334.867l2.106 1.813c.547.467 1.507.467 2.053 0l2.107-1.813c.587-.494 1.56-.867 2.334-.867h2.266c.867 0 1.574-.706 1.574-1.573v-2.267c0-.773.36-1.747.866-2.333L28 17.013c.466-.547.466-1.507 0-2.053l-1.814-2.107c-.506-.586-.866-1.56-.866-2.333V8.267c0-.867-.707-1.574-1.574-1.574H21.48c-.774 0-1.747-.36-2.334-.866L17.04 4.013c-.546-.466-1.506-.466-2.053 0L12.88 5.84c-.586.493-1.573.853-2.333.853z\",\n },\n ],\n filled: [\n {\n d: \"m28.747 14.32-1.814-2.106c-.346-.4-.626-1.147-.626-1.68V8.267a2.583 2.583 0 0 0-2.574-2.573h-2.266c-.52 0-1.28-.28-1.68-.627L17.68 3.254c-.92-.787-2.427-.787-3.36 0l-2.093 1.827c-.4.333-1.16.613-1.68.613H8.24a2.583 2.583 0 0 0-2.573 2.573v2.28c0 .52-.28 1.267-.614 1.667l-1.8 2.12c-.773.92-.773 2.413 0 3.333l1.8 2.12c.334.4.614 1.147.614 1.667v2.28a2.583 2.583 0 0 0 2.573 2.573h2.307c.52 0 1.28.28 1.68.627l2.106 1.813c.92.787 2.427.787 3.36 0l2.107-1.813c.4-.347 1.147-.627 1.68-.627h2.267a2.583 2.583 0 0 0 2.573-2.573v-2.267c0-.52.28-1.28.627-1.68l1.813-2.106c.773-.92.773-2.44-.013-3.36m-7.2-.84-6.44 6.44a1 1 0 0 1-1.414 0l-3.226-3.226a1.006 1.006 0 0 1 0-1.413 1.006 1.006 0 0 1 1.413 0l2.52 2.52 5.733-5.734a1.006 1.006 0 0 1 1.414 0 1.006 1.006 0 0 1 0 1.414\",\n },\n ],\n },\n};\n\n/** Props for {@link VerifiedIcon}. See {@link BaseIconProps} for the shared shape. */\nexport type VerifiedIconProps = BaseIconProps;\n\n/**\n * Verify icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.\n * Defaults to the filled variant.\n *\n * @example\n * ```tsx\n * <VerifiedIcon size={24} />\n * ```\n */\nexport const VerifiedIcon = React.forwardRef<SVGSVGElement, VerifiedIconProps>(\n ({ filled = true, ...props }, ref) => (\n <BaseIcon ref={ref} variants={VARIANTS} filled={filled} {...props} />\n ),\n);\n\nVerifiedIcon.displayName = \"VerifiedIcon\";\n"],"names":[],"mappings":";;;;AAIA,MAAM,WAAyB;AAAA,EAC7B,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,MAEL;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,EACF;AAAA,EAEF,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,MAEL;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,EACF;AAAA,EAEF,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,MAEL;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,EACF;AAEJ;AAcO,MAAM,eAAe,MAAM;AAAA,EAChC,CAAC,EAAE,SAAS,MAAM,GAAG,MAAA,GAAS,QAC5B,oBAAC,YAAS,KAAU,UAAU,UAAU,QAAiB,GAAG,MAAA,CAAO;AAEvE;AAEA,aAAa,cAAc;"}
@@ -5,6 +5,7 @@ import { cn } from "../../utils/cn.mjs";
5
5
  import { IconButton } from "../IconButton/IconButton.mjs";
6
6
  import { ChevronLeftIcon } from "../Icons/ChevronLeftIcon.mjs";
7
7
  import { ChevronRightIcon } from "../Icons/ChevronRightIcon.mjs";
8
+ const PAGE_DOT = "bg-buttons-secondary-default group-hover:bg-buttons-secondary-hover group-active:bg-buttons-secondary-hover theme-v2:bg-neutral-alphas-200 theme-v2:group-hover:bg-neutral-alphas-300 theme-v2:group-active:bg-neutral-alphas-300";
8
9
  function getVisiblePages(currentPage, totalPages) {
9
10
  if (totalPages <= 7) {
10
11
  return Array.from({ length: totalPages }, (_, i) => i + 1);
@@ -83,7 +84,7 @@ const Pagination = React.forwardRef(
83
84
  onClick: () => onPageChange?.(page),
84
85
  className: cn(
85
86
  "typography-description-12px-regular flex min-w-6 cursor-pointer items-center justify-center rounded-2xs p-1 focus-visible:shadow-focus-ring focus-visible:outline-none motion-safe:transition-colors motion-safe:duration-150",
86
- page === currentPage ? "bg-surface-primary-inverted text-content-primary-inverted" : "text-content-primary hover:bg-buttons-secondary-default active:bg-buttons-secondary-hover"
87
+ page === currentPage ? "bg-surface-primary-inverted text-content-primary-inverted" : "text-content-primary hover:bg-buttons-secondary-default active:bg-buttons-secondary-hover theme-v2:hover:bg-buttons-secondary-hover"
87
88
  ),
88
89
  children: page
89
90
  },
@@ -103,7 +104,7 @@ const Pagination = React.forwardRef(
103
104
  {
104
105
  className: cn(
105
106
  "block size-2 rounded-2xs motion-safe:transition-colors motion-safe:duration-150",
106
- page === currentPage ? "bg-surface-primary-inverted" : "bg-buttons-secondary-default group-hover:bg-buttons-secondary-hover group-active:bg-buttons-secondary-hover"
107
+ page === currentPage ? "bg-surface-primary-inverted" : PAGE_DOT
107
108
  )
108
109
  }
109
110
  )
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.mjs","sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { IconButton } from \"../IconButton/IconButton\";\nimport { ChevronLeftIcon } from \"../Icons/ChevronLeftIcon\";\nimport { ChevronRightIcon } from \"../Icons/ChevronRightIcon\";\n\n/** Pagination display style — numbered buttons or minimal dots. */\nexport type PaginationVariant = \"default\" | \"dots\";\n\nexport interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, \"onChange\"> {\n /** Display style — numbered page buttons or minimal dots. @default \"default\" */\n variant?: PaginationVariant;\n /** Total number of pages. */\n totalPages: number;\n /** Current active page (1-indexed). */\n currentPage: number;\n /** Callback fired when the active page changes. Receives the new 1-indexed page number. */\n onPageChange?: (page: number) => void;\n /** Accessible label for the `<nav>` landmark. @default \"Pagination\" */\n ariaLabel?: string;\n /** Accessible label for the previous-page button. @default \"Previous page\" */\n previousLabel?: string;\n /** Accessible label for the next-page button. @default \"Next page\" */\n nextLabel?: string;\n /** Function that returns an accessible label for each page button. @default (page) => \\`Page ${page}\\` */\n getPageLabel?: (page: number) => string;\n}\n\ntype PageItem = number | \"ellipsis-start\" | \"ellipsis-end\";\n\nfunction getVisiblePages(currentPage: number, totalPages: number): PageItem[] {\n if (totalPages <= 7) {\n return Array.from({ length: totalPages }, (_, i) => i + 1);\n }\n\n const pages: PageItem[] = [1];\n\n if (currentPage <= 4) {\n pages.push(2, 3, 4, 5, \"ellipsis-end\");\n } else if (currentPage >= totalPages - 3) {\n pages.push(\"ellipsis-start\", totalPages - 4, totalPages - 3, totalPages - 2, totalPages - 1);\n } else {\n pages.push(\"ellipsis-start\", currentPage - 1, currentPage, currentPage + 1, \"ellipsis-end\");\n }\n\n pages.push(totalPages);\n return pages;\n}\n\n/**\n * Page navigation control with previous/next buttons and numbered page\n * indicators. Supports a numbered-buttons layout (`\"default\"`) and a compact\n * dots layout (`\"dots\"`).\n *\n * @example\n * ```tsx\n * <Pagination totalPages={10} currentPage={page} onPageChange={setPage} />\n * ```\n */\nexport const Pagination = React.forwardRef<HTMLElement, PaginationProps>(\n (\n {\n variant = \"default\",\n totalPages,\n currentPage,\n onPageChange,\n ariaLabel = \"Pagination\",\n previousLabel = \"Previous page\",\n nextLabel = \"Next page\",\n getPageLabel = (page: number) => `Page ${page}`,\n className,\n ...props\n },\n ref,\n ) => {\n const isFirstPage = currentPage <= 1;\n const isLastPage = currentPage >= totalPages;\n\n const handlePrevious = () => {\n if (!isFirstPage) onPageChange?.(currentPage - 1);\n };\n\n const handleNext = () => {\n if (!isLastPage) onPageChange?.(currentPage + 1);\n };\n\n return (\n <nav\n ref={ref}\n aria-label={ariaLabel}\n className={cn(\n \"inline-flex items-center pb-4\",\n variant === \"default\" && \"gap-3\",\n variant === \"dots\" && \"gap-3\",\n className,\n )}\n {...props}\n >\n <IconButton\n variant=\"tertiary\"\n size=\"32\"\n icon={<ChevronLeftIcon />}\n aria-label={previousLabel}\n disabled={isFirstPage}\n onClick={handlePrevious}\n />\n\n {variant === \"default\" && (\n <div className=\"flex items-center gap-3\">\n {getVisiblePages(currentPage, totalPages).map((page) =>\n typeof page === \"string\" ? (\n <span\n key={page}\n className=\"typography-description-12px-regular flex min-w-6 items-center justify-center p-1 text-content-primary\"\n aria-hidden=\"true\"\n >\n &hellip;\n </span>\n ) : (\n <button\n key={page}\n type=\"button\"\n aria-label={getPageLabel(page)}\n aria-current={page === currentPage ? \"page\" : undefined}\n onClick={() => onPageChange?.(page)}\n className={cn(\n \"typography-description-12px-regular flex min-w-6 cursor-pointer items-center justify-center rounded-2xs p-1 focus-visible:shadow-focus-ring focus-visible:outline-none motion-safe:transition-colors motion-safe:duration-150\",\n page === currentPage\n ? \"bg-surface-primary-inverted text-content-primary-inverted\"\n : \"text-content-primary hover:bg-buttons-secondary-default active:bg-buttons-secondary-hover\",\n )}\n >\n {page}\n </button>\n ),\n )}\n </div>\n )}\n\n {variant === \"dots\" && (\n <div className=\"flex items-center\">\n {Array.from({ length: totalPages }, (_, i) => i + 1).map((page) => (\n <button\n key={page}\n type=\"button\"\n aria-label={getPageLabel(page)}\n aria-current={page === currentPage ? \"page\" : undefined}\n onClick={() => onPageChange?.(page)}\n className=\"group flex size-6 cursor-pointer items-center justify-center rounded-2xs focus-visible:shadow-focus-ring focus-visible:outline-none\"\n >\n <span\n className={cn(\n \"block size-2 rounded-2xs motion-safe:transition-colors motion-safe:duration-150\",\n page === currentPage\n ? \"bg-surface-primary-inverted\"\n : \"bg-buttons-secondary-default group-hover:bg-buttons-secondary-hover group-active:bg-buttons-secondary-hover\",\n )}\n />\n </button>\n ))}\n </div>\n )}\n\n <IconButton\n variant=\"tertiary\"\n size=\"32\"\n icon={<ChevronRightIcon />}\n aria-label={nextLabel}\n disabled={isLastPage}\n onClick={handleNext}\n />\n </nav>\n );\n },\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AA;AAAA,cACC,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,0BAAO,kBAAA,EAAiB;AAAA,cACxB,cAAY;AAAA,cACZ,UAAU;AAAA,cACV,SAAS;AAAA,YAAA;AAAA,UAAA;AAAA,QACX;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,WAAW,cAAc;"}
1
+ {"version":3,"file":"Pagination.mjs","sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { IconButton } from \"../IconButton/IconButton\";\nimport { ChevronLeftIcon } from \"../Icons/ChevronLeftIcon\";\nimport { ChevronRightIcon } from \"../Icons/ChevronRightIcon\";\n\n/** Pagination display style — numbered buttons or minimal dots. */\nexport type PaginationVariant = \"default\" | \"dots\";\n\nexport interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, \"onChange\"> {\n /** Display style — numbered page buttons or minimal dots. @default \"default\" */\n variant?: PaginationVariant;\n /** Total number of pages. */\n totalPages: number;\n /** Current active page (1-indexed). */\n currentPage: number;\n /** Callback fired when the active page changes. Receives the new 1-indexed page number. */\n onPageChange?: (page: number) => void;\n /** Accessible label for the `<nav>` landmark. @default \"Pagination\" */\n ariaLabel?: string;\n /** Accessible label for the previous-page button. @default \"Previous page\" */\n previousLabel?: string;\n /** Accessible label for the next-page button. @default \"Next page\" */\n nextLabel?: string;\n /** Function that returns an accessible label for each page button. @default (page) => \\`Page ${page}\\` */\n getPageLabel?: (page: number) => string;\n}\n\ntype PageItem = number | \"ellipsis-start\" | \"ellipsis-end\";\n\n/**\n * A dot for a page other than the current one. Under the v2 palette the button resting\n * fill is a 5% wash, too faint to show that more pages exist, so the dots take their own\n * 20% step, with 30% on hover.\n */\nconst PAGE_DOT =\n \"bg-buttons-secondary-default group-hover:bg-buttons-secondary-hover group-active:bg-buttons-secondary-hover theme-v2:bg-neutral-alphas-200 theme-v2:group-hover:bg-neutral-alphas-300 theme-v2:group-active:bg-neutral-alphas-300\";\n\nfunction getVisiblePages(currentPage: number, totalPages: number): PageItem[] {\n if (totalPages <= 7) {\n return Array.from({ length: totalPages }, (_, i) => i + 1);\n }\n\n const pages: PageItem[] = [1];\n\n if (currentPage <= 4) {\n pages.push(2, 3, 4, 5, \"ellipsis-end\");\n } else if (currentPage >= totalPages - 3) {\n pages.push(\"ellipsis-start\", totalPages - 4, totalPages - 3, totalPages - 2, totalPages - 1);\n } else {\n pages.push(\"ellipsis-start\", currentPage - 1, currentPage, currentPage + 1, \"ellipsis-end\");\n }\n\n pages.push(totalPages);\n return pages;\n}\n\n/**\n * Page navigation control with previous/next buttons and numbered page\n * indicators. Supports a numbered-buttons layout (`\"default\"`) and a compact\n * dots layout (`\"dots\"`).\n *\n * @example\n * ```tsx\n * <Pagination totalPages={10} currentPage={page} onPageChange={setPage} />\n * ```\n */\nexport const Pagination = React.forwardRef<HTMLElement, PaginationProps>(\n (\n {\n variant = \"default\",\n totalPages,\n currentPage,\n onPageChange,\n ariaLabel = \"Pagination\",\n previousLabel = \"Previous page\",\n nextLabel = \"Next page\",\n getPageLabel = (page: number) => `Page ${page}`,\n className,\n ...props\n },\n ref,\n ) => {\n const isFirstPage = currentPage <= 1;\n const isLastPage = currentPage >= totalPages;\n\n const handlePrevious = () => {\n if (!isFirstPage) onPageChange?.(currentPage - 1);\n };\n\n const handleNext = () => {\n if (!isLastPage) onPageChange?.(currentPage + 1);\n };\n\n return (\n <nav\n ref={ref}\n aria-label={ariaLabel}\n className={cn(\n \"inline-flex items-center pb-4\",\n variant === \"default\" && \"gap-3\",\n variant === \"dots\" && \"gap-3\",\n className,\n )}\n {...props}\n >\n <IconButton\n variant=\"tertiary\"\n size=\"32\"\n icon={<ChevronLeftIcon />}\n aria-label={previousLabel}\n disabled={isFirstPage}\n onClick={handlePrevious}\n />\n\n {variant === \"default\" && (\n <div className=\"flex items-center gap-3\">\n {getVisiblePages(currentPage, totalPages).map((page) =>\n typeof page === \"string\" ? (\n <span\n key={page}\n className=\"typography-description-12px-regular flex min-w-6 items-center justify-center p-1 text-content-primary\"\n aria-hidden=\"true\"\n >\n &hellip;\n </span>\n ) : (\n <button\n key={page}\n type=\"button\"\n aria-label={getPageLabel(page)}\n aria-current={page === currentPage ? \"page\" : undefined}\n onClick={() => onPageChange?.(page)}\n className={cn(\n \"typography-description-12px-regular flex min-w-6 cursor-pointer items-center justify-center rounded-2xs p-1 focus-visible:shadow-focus-ring focus-visible:outline-none motion-safe:transition-colors motion-safe:duration-150\",\n page === currentPage\n ? \"bg-surface-primary-inverted text-content-primary-inverted\"\n : \"text-content-primary hover:bg-buttons-secondary-default active:bg-buttons-secondary-hover theme-v2:hover:bg-buttons-secondary-hover\",\n )}\n >\n {page}\n </button>\n ),\n )}\n </div>\n )}\n\n {variant === \"dots\" && (\n <div className=\"flex items-center\">\n {Array.from({ length: totalPages }, (_, i) => i + 1).map((page) => (\n <button\n key={page}\n type=\"button\"\n aria-label={getPageLabel(page)}\n aria-current={page === currentPage ? \"page\" : undefined}\n onClick={() => onPageChange?.(page)}\n className=\"group flex size-6 cursor-pointer items-center justify-center rounded-2xs focus-visible:shadow-focus-ring focus-visible:outline-none\"\n >\n <span\n className={cn(\n \"block size-2 rounded-2xs motion-safe:transition-colors motion-safe:duration-150\",\n page === currentPage ? \"bg-surface-primary-inverted\" : PAGE_DOT,\n )}\n />\n </button>\n ))}\n </div>\n )}\n\n <IconButton\n variant=\"tertiary\"\n size=\"32\"\n icon={<ChevronRightIcon />}\n aria-label={nextLabel}\n disabled={isLastPage}\n onClick={handleNext}\n />\n </nav>\n );\n },\n);\n\nPagination.displayName = \"Pagination\";\n"],"names":[],"mappings":";;;;;;;AAmCA,MAAM,WACJ;AAEF,SAAS,gBAAgB,aAAqB,YAAgC;AAC5E,MAAI,cAAc,GAAG;AACnB,WAAO,MAAM,KAAK,EAAE,QAAQ,cAAc,CAAC,GAAG,MAAM,IAAI,CAAC;AAAA,EAC3D;AAEA,QAAM,QAAoB,CAAC,CAA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-2,6 +2,7 @@
2
2
  import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { cn } from "../../utils/cn.mjs";
5
+ import { INPUT_FIELD_DISABLED_CLASSES, INPUT_FIELD_V2_FOCUS_CLASSES } from "../../utils/inputFieldClasses.mjs";
5
6
  import { ChevronDownIcon } from "../Icons/ChevronDownIcon.mjs";
6
7
  const CONTAINER_HEIGHT = {
7
8
  "48": "h-12",
@@ -28,9 +29,16 @@ function getContainerClassName(size, error, disabled) {
28
29
  "relative flex items-center gap-2 overflow-hidden rounded-sm border bg-inputs-inputs-primary after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] has-focus-visible:outline-none has-focus-visible:after:shadow-focus-ring motion-safe:transition-colors",
29
30
  CONTAINER_PADDING_X[size],
30
31
  CONTAINER_HEIGHT[size],
31
- error ? "border-error-content" : "border-border-primary",
32
- !disabled && !error && "hover:border-neutral-alphas-400",
33
- disabled && "opacity-50"
32
+ error ? "border-error-content" : ["border-border-input", INPUT_FIELD_V2_FOCUS_CLASSES],
33
+ !disabled && !error && "hover:border-border-input-hover",
34
+ disabled && INPUT_FIELD_DISABLED_CLASSES
35
+ );
36
+ }
37
+ function getDialCodeClassName(size, disabled) {
38
+ return cn(
39
+ "shrink-0 select-none whitespace-nowrap text-content-primary",
40
+ PREFIX_TYPOGRAPHY[size],
41
+ disabled && "theme-v2:text-content-disabled"
34
42
  );
35
43
  }
36
44
  function warnMissingAccessibleName(label, ariaLabel, ariaLabelledBy) {
@@ -130,24 +138,20 @@ const PhoneField = React.forwardRef(
130
138
  onClick: onCountrySelect,
131
139
  disabled,
132
140
  "aria-label": countryButtonLabel,
133
- className: "flex shrink-0 items-center gap-1 rounded-2xs focus-visible:shadow-focus-ring focus-visible:outline-none disabled:cursor-not-allowed",
141
+ className: "group flex shrink-0 items-center gap-1 rounded-2xs focus-visible:shadow-focus-ring focus-visible:outline-none disabled:cursor-not-allowed",
134
142
  children: [
135
143
  flag != null && /* @__PURE__ */ jsx("span", { className: "flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full", children: flag }),
136
- /* @__PURE__ */ jsx(ChevronDownIcon, { size: 16, className: "shrink-0 text-content-secondary" })
144
+ /* @__PURE__ */ jsx(
145
+ ChevronDownIcon,
146
+ {
147
+ size: 16,
148
+ className: "shrink-0 text-content-secondary theme-v2:group-disabled:text-icons-disabled"
149
+ }
150
+ )
137
151
  ]
138
152
  }
139
153
  ),
140
- dialCode != null && /* @__PURE__ */ jsx(
141
- "span",
142
- {
143
- id: dialCodeId,
144
- className: cn(
145
- "shrink-0 select-none whitespace-nowrap text-content-primary",
146
- PREFIX_TYPOGRAPHY[size]
147
- ),
148
- children: dialCode
149
- }
150
- ),
154
+ dialCode != null && /* @__PURE__ */ jsx("span", { id: dialCodeId, className: getDialCodeClassName(size, disabled), children: dialCode }),
151
155
  /* @__PURE__ */ jsx(
152
156
  "input",
153
157
  {
@@ -159,7 +163,7 @@ const PhoneField = React.forwardRef(
159
163
  "aria-describedby": describedBy,
160
164
  "aria-invalid": error || void 0,
161
165
  className: cn(
162
- "h-full min-w-0 flex-1 bg-transparent text-content-primary no-underline placeholder:text-content-tertiary focus:outline-none disabled:cursor-not-allowed",
166
+ "h-full min-w-0 flex-1 bg-transparent text-content-primary no-underline placeholder:text-content-tertiary focus:outline-none disabled:cursor-not-allowed theme-v2:disabled:text-content-disabled theme-v2:disabled:placeholder:text-content-disabled",
163
167
  INPUT_TYPOGRAPHY[size]
164
168
  ),
165
169
  ...props
@@ -1 +1 @@
1
- {"version":3,"file":"PhoneField.mjs","sources":["../../../src/components/PhoneField/PhoneField.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { ChevronDownIcon } from \"../Icons/ChevronDownIcon\";\n\n/** Phone field height in pixels. */\nexport type PhoneFieldSize = \"48\" | \"40\" | \"32\";\n\nexport interface PhoneFieldProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"size\" | \"prefix\"> {\n /** Label text displayed above the input. Also used as the accessible name. */\n label?: string;\n /** Helper text displayed below the input. Replaced by `errorMessage` when `error` is `true`. */\n helperText?: string;\n /** Height of the phone field in pixels. @default \"48\" */\n size?: PhoneFieldSize;\n /** Whether the field is in an error state. @default false */\n error?: boolean;\n /** Error message displayed below the input. Shown instead of `helperText` when `error` is `true`. */\n errorMessage?: string;\n /** Dial code of the selected country, shown before the number (e.g. `\"+39\"`). */\n dialCode?: React.ReactNode;\n /** Flag of the selected country, rendered in the country selector (e.g. an image or flag icon). */\n flag?: React.ReactNode;\n /** Fired when the country selector (flag + chevron) is activated. Open the country picker here. */\n onCountrySelect?: () => void;\n /** Accessible name for the country selector button. @default \"Select country\" */\n countryButtonLabel?: string;\n /** Whether the field stretches to fill its container width. @default false */\n fullWidth?: boolean;\n}\n\nconst CONTAINER_HEIGHT: Record<PhoneFieldSize, string> = {\n \"48\": \"h-12\",\n \"40\": \"h-10\",\n \"32\": \"h-8\",\n};\n\nconst CONTAINER_PADDING_X: Record<PhoneFieldSize, string> = {\n \"48\": \"px-4\",\n \"40\": \"px-4\",\n \"32\": \"px-3\",\n};\n\nconst INPUT_TYPOGRAPHY: Record<PhoneFieldSize, string> = {\n \"48\": \"typography-body-default-16px-regular autofill-body-lg\",\n \"40\": \"typography-body-default-16px-regular autofill-body-lg\",\n \"32\": \"typography-body-small-14px-regular autofill-body-md\",\n};\n\nconst PREFIX_TYPOGRAPHY: Record<PhoneFieldSize, string> = {\n \"48\": \"typography-body-default-16px-regular\",\n \"40\": \"typography-body-default-16px-regular\",\n \"32\": \"typography-body-small-14px-regular\",\n};\n\nfunction getContainerClassName(size: PhoneFieldSize, error: boolean, disabled?: boolean) {\n return cn(\n \"relative flex items-center gap-2 overflow-hidden rounded-sm border bg-inputs-inputs-primary after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] has-focus-visible:outline-none has-focus-visible:after:shadow-focus-ring motion-safe:transition-colors\",\n CONTAINER_PADDING_X[size],\n CONTAINER_HEIGHT[size],\n error ? \"border-error-content\" : \"border-border-primary\",\n !disabled && !error && \"hover:border-neutral-alphas-400\",\n disabled && \"opacity-50\",\n );\n}\n\nfunction warnMissingAccessibleName(label?: string, ariaLabel?: string, ariaLabelledBy?: string) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n \"PhoneField: no accessible name provided. Pass a `label`, `aria-label`, or `aria-labelledby` prop.\",\n );\n }\n }\n}\n\nfunction PhoneFieldHelperText({\n id,\n error,\n children,\n}: {\n id: string;\n error: boolean;\n children: React.ReactNode;\n}) {\n return (\n <p\n id={id}\n className={cn(\n \"typography-description-12px-regular pt-2\",\n error ? \"text-error-content\" : \"text-content-tertiary\",\n )}\n >\n {children}\n </p>\n );\n}\n\n/**\n * A phone number input with a country selector (flag + chevron), a fixed dial\n * code prefix, and a `tel` input. The country picker itself is owned by the\n * consumer: pass the selected country's `flag` and `dialCode`, and open your\n * picker from `onCountrySelect`.\n *\n * Provide at least one of `label`, `aria-label`, or `aria-labelledby` for\n * accessibility — a console warning is emitted in development if none are set.\n *\n * @example\n * ```tsx\n * <PhoneField\n * label=\"Phone number\"\n * flag={<img src={italyFlag} alt=\"\" />}\n * dialCode=\"+39\"\n * onCountrySelect={openCountryPicker}\n * value={number}\n * onChange={(e) => setNumber(e.target.value)}\n * />\n * ```\n */\nexport const PhoneField = React.forwardRef<HTMLInputElement, PhoneFieldProps>(\n (\n {\n label,\n helperText,\n size = \"48\",\n error = false,\n errorMessage,\n dialCode,\n flag,\n onCountrySelect,\n countryButtonLabel = \"Select country\",\n className,\n id,\n disabled,\n fullWidth = false,\n type = \"tel\",\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const inputId = id || generatedId;\n const helperTextId = `${inputId}-helper`;\n const dialCodeId = `${inputId}-dial-code`;\n const bottomText = error && errorMessage ? errorMessage : helperText;\n\n const describedBy =\n [dialCode != null ? dialCodeId : null, bottomText ? helperTextId : null]\n .filter(Boolean)\n .join(\" \") || undefined;\n\n const innerRef = React.useRef<HTMLInputElement>(null);\n const setRefs = React.useCallback(\n (node: HTMLInputElement | null) => {\n innerRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as React.RefObject<HTMLInputElement | null>).current = node;\n },\n [ref],\n );\n\n const handleContainerMouseDown = (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled) return;\n const target = event.target as HTMLElement;\n if (target === innerRef.current) return;\n if (target.closest(\"[data-pf-interactive]\")) return;\n event.preventDefault();\n innerRef.current?.focus();\n };\n\n warnMissingAccessibleName(label, props[\"aria-label\"], props[\"aria-labelledby\"]);\n\n return (\n <div\n className={cn(\"flex flex-col\", fullWidth && \"w-full\", className)}\n data-disabled={disabled ? \"\" : undefined}\n data-error={error ? \"\" : undefined}\n >\n {label && (\n <label\n htmlFor={inputId}\n className=\"typography-description-12px-semibold pb-2 text-content-primary\"\n >\n {label}\n </label>\n )}\n\n {/* biome-ignore lint/a11y/noStaticElementInteractions: focus bridge delegates pointer clicks on the padding to the input */}\n <div\n className={getContainerClassName(size, error, disabled)}\n onMouseDown={handleContainerMouseDown}\n >\n <button\n type=\"button\"\n data-pf-interactive=\"\"\n onClick={onCountrySelect}\n disabled={disabled}\n aria-label={countryButtonLabel}\n className=\"flex shrink-0 items-center gap-1 rounded-2xs focus-visible:shadow-focus-ring focus-visible:outline-none disabled:cursor-not-allowed\"\n >\n {flag != null && (\n <span className=\"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full\">\n {flag}\n </span>\n )}\n <ChevronDownIcon size={16} className=\"shrink-0 text-content-secondary\" />\n </button>\n\n {dialCode != null && (\n <span\n id={dialCodeId}\n className={cn(\n \"shrink-0 select-none whitespace-nowrap text-content-primary\",\n PREFIX_TYPOGRAPHY[size],\n )}\n >\n {dialCode}\n </span>\n )}\n\n <input\n ref={setRefs}\n id={inputId}\n type={type}\n inputMode=\"tel\"\n disabled={disabled}\n aria-describedby={describedBy}\n aria-invalid={error || undefined}\n className={cn(\n \"h-full min-w-0 flex-1 bg-transparent text-content-primary no-underline placeholder:text-content-tertiary focus:outline-none disabled:cursor-not-allowed\",\n INPUT_TYPOGRAPHY[size],\n )}\n {...props}\n />\n </div>\n\n {bottomText && (\n <PhoneFieldHelperText id={helperTextId} error={error}>\n {bottomText}\n </PhoneFieldHelperText>\n )}\n </div>\n );\n },\n);\n\nPhoneField.displayName = \"PhoneField\";\n"],"names":[],"mappings":";;;;;AA+BA,MAAM,mBAAmD;AAAA,EACvD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,sBAAsD;AAAA,EAC1D,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,mBAAmD;AAAA,EACvD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,oBAAoD;AAAA,EACxD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,SAAS,sBAAsB,MAAsB,OAAgB,UAAoB;AACvF,SAAO;AAAA,IACL;AAAA,IACA,oBAAoB,IAAI;AAAA,IACxB,iBAAiB,IAAI;AAAA,IACrB,QAAQ,yBAAyB;AAAA,IACjC,CAAC,YAAY,CAAC,SAAS;AAAA,IACvB,YAAY;AAAA,EAAA;AAEhB;AAEA,SAAS,0BAA0B,OAAgB,WAAoB,gBAAyB;AAC9F,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,QAAI,CAAC,SAAS,CAAC,aAAa,CAAC,gBAAgB;AAC3C,cAAQ;AAAA,QACN;AAAA,MAAA;AAAA,IAEJ;AAAA,EACF;AACF;AAEA,SAAS,qBAAqB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,QAAQ,uBAAuB;AAAA,MAAA;AAAA,MAGhC;AAAA,IAAA;AAAA,EAAA;A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honeField/PhoneField.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport {\n INPUT_FIELD_DISABLED_CLASSES,\n INPUT_FIELD_V2_FOCUS_CLASSES,\n} from \"../../utils/inputFieldClasses\";\nimport { ChevronDownIcon } from \"../Icons/ChevronDownIcon\";\n\n/** Phone field height in pixels. */\nexport type PhoneFieldSize = \"48\" | \"40\" | \"32\";\n\nexport interface PhoneFieldProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"size\" | \"prefix\"> {\n /** Label text displayed above the input. Also used as the accessible name. */\n label?: string;\n /** Helper text displayed below the input. Replaced by `errorMessage` when `error` is `true`. */\n helperText?: string;\n /** Height of the phone field in pixels. @default \"48\" */\n size?: PhoneFieldSize;\n /** Whether the field is in an error state. @default false */\n error?: boolean;\n /** Error message displayed below the input. Shown instead of `helperText` when `error` is `true`. */\n errorMessage?: string;\n /** Dial code of the selected country, shown before the number (e.g. `\"+39\"`). */\n dialCode?: React.ReactNode;\n /** Flag of the selected country, rendered in the country selector (e.g. an image or flag icon). */\n flag?: React.ReactNode;\n /** Fired when the country selector (flag + chevron) is activated. Open the country picker here. */\n onCountrySelect?: () => void;\n /** Accessible name for the country selector button. @default \"Select country\" */\n countryButtonLabel?: string;\n /** Whether the field stretches to fill its container width. @default false */\n fullWidth?: boolean;\n}\n\nconst CONTAINER_HEIGHT: Record<PhoneFieldSize, string> = {\n \"48\": \"h-12\",\n \"40\": \"h-10\",\n \"32\": \"h-8\",\n};\n\nconst CONTAINER_PADDING_X: Record<PhoneFieldSize, string> = {\n \"48\": \"px-4\",\n \"40\": \"px-4\",\n \"32\": \"px-3\",\n};\n\nconst INPUT_TYPOGRAPHY: Record<PhoneFieldSize, string> = {\n \"48\": \"typography-body-default-16px-regular autofill-body-lg\",\n \"40\": \"typography-body-default-16px-regular autofill-body-lg\",\n \"32\": \"typography-body-small-14px-regular autofill-body-md\",\n};\n\nconst PREFIX_TYPOGRAPHY: Record<PhoneFieldSize, string> = {\n \"48\": \"typography-body-default-16px-regular\",\n \"40\": \"typography-body-default-16px-regular\",\n \"32\": \"typography-body-small-14px-regular\",\n};\n\nfunction getContainerClassName(size: PhoneFieldSize, error: boolean, disabled?: boolean) {\n return cn(\n \"relative flex items-center gap-2 overflow-hidden rounded-sm border bg-inputs-inputs-primary after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] has-focus-visible:outline-none has-focus-visible:after:shadow-focus-ring motion-safe:transition-colors\",\n CONTAINER_PADDING_X[size],\n CONTAINER_HEIGHT[size],\n error ? \"border-error-content\" : [\"border-border-input\", INPUT_FIELD_V2_FOCUS_CLASSES],\n !disabled && !error && \"hover:border-border-input-hover\",\n disabled && INPUT_FIELD_DISABLED_CLASSES,\n );\n}\n\nfunction getDialCodeClassName(size: PhoneFieldSize, disabled?: boolean) {\n return cn(\n \"shrink-0 select-none whitespace-nowrap text-content-primary\",\n PREFIX_TYPOGRAPHY[size],\n disabled && \"theme-v2:text-content-disabled\",\n );\n}\n\nfunction warnMissingAccessibleName(label?: string, ariaLabel?: string, ariaLabelledBy?: string) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n \"PhoneField: no accessible name provided. Pass a `label`, `aria-label`, or `aria-labelledby` prop.\",\n );\n }\n }\n}\n\nfunction PhoneFieldHelperText({\n id,\n error,\n children,\n}: {\n id: string;\n error: boolean;\n children: React.ReactNode;\n}) {\n return (\n <p\n id={id}\n className={cn(\n \"typography-description-12px-regular pt-2\",\n error ? \"text-error-content\" : \"text-content-tertiary\",\n )}\n >\n {children}\n </p>\n );\n}\n\n/**\n * A phone number input with a country selector (flag + chevron), a fixed dial\n * code prefix, and a `tel` input. The country picker itself is owned by the\n * consumer: pass the selected country's `flag` and `dialCode`, and open your\n * picker from `onCountrySelect`.\n *\n * Provide at least one of `label`, `aria-label`, or `aria-labelledby` for\n * accessibility — a console warning is emitted in development if none are set.\n *\n * @example\n * ```tsx\n * <PhoneField\n * label=\"Phone number\"\n * flag={<img src={italyFlag} alt=\"\" />}\n * dialCode=\"+39\"\n * onCountrySelect={openCountryPicker}\n * value={number}\n * onChange={(e) => setNumber(e.target.value)}\n * />\n * ```\n */\nexport const PhoneField = React.forwardRef<HTMLInputElement, PhoneFieldProps>(\n (\n {\n label,\n helperText,\n size = \"48\",\n error = false,\n errorMessage,\n dialCode,\n flag,\n onCountrySelect,\n countryButtonLabel = \"Select country\",\n className,\n id,\n disabled,\n fullWidth = false,\n type = \"tel\",\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const inputId = id || generatedId;\n const helperTextId = `${inputId}-helper`;\n const dialCodeId = `${inputId}-dial-code`;\n const bottomText = error && errorMessage ? errorMessage : helperText;\n\n const describedBy =\n [dialCode != null ? dialCodeId : null, bottomText ? helperTextId : null]\n .filter(Boolean)\n .join(\" \") || undefined;\n\n const innerRef = React.useRef<HTMLInputElement>(null);\n const setRefs = React.useCallback(\n (node: HTMLInputElement | null) => {\n innerRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as React.RefObject<HTMLInputElement | null>).current = node;\n },\n [ref],\n );\n\n const handleContainerMouseDown = (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled) return;\n const target = event.target as HTMLElement;\n if (target === innerRef.current) return;\n if (target.closest(\"[data-pf-interactive]\")) return;\n event.preventDefault();\n innerRef.current?.focus();\n };\n\n warnMissingAccessibleName(label, props[\"aria-label\"], props[\"aria-labelledby\"]);\n\n return (\n <div\n className={cn(\"flex flex-col\", fullWidth && \"w-full\", className)}\n data-disabled={disabled ? \"\" : undefined}\n data-error={error ? \"\" : undefined}\n >\n {label && (\n <label\n htmlFor={inputId}\n className=\"typography-description-12px-semibold pb-2 text-content-primary\"\n >\n {label}\n </label>\n )}\n\n {/* biome-ignore lint/a11y/noStaticElementInteractions: focus bridge delegates pointer clicks on the padding to the input */}\n <div\n className={getContainerClassName(size, error, disabled)}\n onMouseDown={handleContainerMouseDown}\n >\n <button\n type=\"button\"\n data-pf-interactive=\"\"\n onClick={onCountrySelect}\n disabled={disabled}\n aria-label={countryButtonLabel}\n className=\"group flex shrink-0 items-center gap-1 rounded-2xs focus-visible:shadow-focus-ring focus-visible:outline-none disabled:cursor-not-allowed\"\n >\n {flag != null && (\n <span className=\"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full\">\n {flag}\n </span>\n )}\n <ChevronDownIcon\n size={16}\n className=\"shrink-0 text-content-secondary theme-v2:group-disabled:text-icons-disabled\"\n />\n </button>\n\n {dialCode != null && (\n <span id={dialCodeId} className={getDialCodeClassName(size, disabled)}>\n {dialCode}\n </span>\n )}\n\n <input\n ref={setRefs}\n id={inputId}\n type={type}\n inputMode=\"tel\"\n disabled={disabled}\n aria-describedby={describedBy}\n aria-invalid={error || undefined}\n className={cn(\n \"h-full min-w-0 flex-1 bg-transparent text-content-primary no-underline placeholder:text-content-tertiary focus:outline-none disabled:cursor-not-allowed theme-v2:disabled:text-content-disabled theme-v2:disabled:placeholder:text-content-disabled\",\n INPUT_TYPOGRAPHY[size],\n )}\n {...props}\n />\n </div>\n\n {bottomText && (\n <PhoneFieldHelperText id={helperTextId} error={error}>\n {bottomText}\n </PhoneFieldHelperText>\n )}\n </div>\n );\n },\n);\n\nPhoneField.displayName = \"PhoneField\";\n"],"names":[],"mappings":";;;;;;AAmCA,MAAM,mBAAmD;AAAA,EACvD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,sBAAsD;AAAA,EAC1D,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,mBAAmD;AAAA,EACvD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,oBAAoD;AAAA,EACxD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,SAAS,sBAAsB,MAAsB,OAAgB,UAAoB;AACvF,SAAO;AAAA,IACL;AAAA,IACA,oBAAo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Z;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAGD,YAAY,QACX,oBAAC,QAAA,EAAK,IAAI,YAAY,WAAW,qBAAqB,MAAM,QAAQ,GACjE,UAAA,SAAA,CACH;AAAA,gBAGF;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,KAAK;AAAA,oBACL,IAAI;AAAA,oBACJ;AAAA,oBACA,WAAU;AAAA,oBACV;AAAA,oBACA,oBAAkB;AAAA,oBAClB,gBAAc,SAAS;AAAA,oBACvB,WAAW;AAAA,sBACT;AAAA,sBACA,iBAAiB,IAAI;AAAA,oBAAA;AAAA,oBAEtB,GAAG;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACN;AAAA,YAAA;AAAA,UAAA;AAAA,UAGD,cACC,oBAAC,sBAAA,EAAqB,IAAI,cAAc,OACrC,UAAA,WAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,WAAW,cAAc;"}
@@ -0,0 +1,51 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
4
+ import * as React from "react";
5
+ import { cn } from "../../utils/cn.mjs";
6
+ import { FLOATING_CONTENT_COLLISION_PADDING } from "../../utils/floatingContentCollisionPadding.mjs";
7
+ import { FLOATING_CONTENT_Z_INDEX, FLOATING_CONTENT_SURFACE_CLASS } from "../../utils/floatingContentSurface.mjs";
8
+ import { useSuppressClickAfterDrag } from "../../utils/useSuppressClickAfterDrag.mjs";
9
+ const Popover = PopoverPrimitive.Root;
10
+ const PopoverTrigger = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { ref, ...useSuppressClickAfterDrag(props) }));
11
+ PopoverTrigger.displayName = "PopoverTrigger";
12
+ const PopoverAnchor = PopoverPrimitive.Anchor;
13
+ const PopoverClose = PopoverPrimitive.Close;
14
+ const PopoverContent = React.forwardRef(
15
+ ({
16
+ align = "start",
17
+ sideOffset = 8,
18
+ collisionPadding = FLOATING_CONTENT_COLLISION_PADDING,
19
+ className,
20
+ style,
21
+ ...props
22
+ }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
23
+ PopoverPrimitive.Content,
24
+ {
25
+ ref,
26
+ align,
27
+ sideOffset,
28
+ collisionPadding,
29
+ className: cn(
30
+ FLOATING_CONTENT_SURFACE_CLASS,
31
+ "w-max max-w-(--radix-popover-content-available-width) overflow-y-auto p-2 outline-hidden focus-visible:shadow-focus-ring",
32
+ className
33
+ ),
34
+ style: {
35
+ zIndex: FLOATING_CONTENT_Z_INDEX,
36
+ maxHeight: "var(--radix-popover-content-available-height)",
37
+ ...style
38
+ },
39
+ ...props
40
+ }
41
+ ) })
42
+ );
43
+ PopoverContent.displayName = "PopoverContent";
44
+ export {
45
+ Popover,
46
+ PopoverAnchor,
47
+ PopoverClose,
48
+ PopoverContent,
49
+ PopoverTrigger
50
+ };
51
+ //# sourceMappingURL=Popover.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Popover.mjs","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { FLOATING_CONTENT_COLLISION_PADDING } from \"../../utils/floatingContentCollisionPadding\";\nimport {\n FLOATING_CONTENT_SURFACE_CLASS,\n FLOATING_CONTENT_Z_INDEX,\n} from \"../../utils/floatingContentSurface\";\nimport { useSuppressClickAfterDrag } from \"../../utils/useSuppressClickAfterDrag\";\n\n/** Props for {@link Popover}. */\nexport type PopoverProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>;\n\n/** Props for {@link PopoverTrigger}. */\nexport type PopoverTriggerProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>;\n\n/** Props for {@link PopoverAnchor}. */\nexport type PopoverAnchorProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>;\n\n/** Props for {@link PopoverClose}. */\nexport type PopoverCloseProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Close>;\n\n/** Accessible name for the dialog: at least one of `aria-label` or `aria-labelledby` is required. */\nexport type PopoverContentName =\n | {\n /** Text label naming the dialog. */\n \"aria-label\": string;\n /** Id of an element that names the dialog. */\n \"aria-labelledby\"?: string;\n }\n | {\n /** Text label naming the dialog. */\n \"aria-label\"?: string;\n /** Id of an element that names the dialog. */\n \"aria-labelledby\": string;\n };\n\n/** Own props of {@link PopoverContent}, before the accessible name requirement is applied. */\nexport interface PopoverContentBaseProps\n extends Omit<React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>, \"forceMount\"> {\n /** Alignment of the content against the trigger. @default \"start\" */\n align?: PopoverPrimitive.PopoverContentProps[\"align\"];\n /** Distance in pixels between the trigger and the content. @default 8 */\n sideOffset?: PopoverPrimitive.PopoverContentProps[\"sideOffset\"];\n /**\n * Distance in pixels kept between the content and the viewport edge, as a number or a per-side\n * object. @default 16\n */\n collisionPadding?: PopoverPrimitive.PopoverContentProps[\"collisionPadding\"];\n /** Additional CSS classes merged onto the content surface. */\n className?: string;\n}\n\n/** Props for {@link PopoverContent}. */\nexport type PopoverContentProps = PopoverContentBaseProps & PopoverContentName;\n\n/**\n * Root of a popover. Holds the open state shared by its trigger and content.\n *\n * @example\n * ```tsx\n * <Popover>\n * <PopoverTrigger asChild><Button>Open</Button></PopoverTrigger>\n * <PopoverContent aria-label=\"Details\">Content</PopoverContent>\n * </Popover>\n * ```\n */\nexport const Popover = PopoverPrimitive.Root;\n\n/**\n * Element that toggles the popover. Use `asChild` to render your own button.\n *\n * On touch and pen, a press-and-release that moves past a small threshold counts as a drag, and\n * the synthetic click that follows it is ignored, so scrolling past the trigger does not open it.\n */\nexport const PopoverTrigger = React.forwardRef<\n React.ComponentRef<typeof PopoverPrimitive.Trigger>,\n PopoverTriggerProps\n>((props, ref) => <PopoverPrimitive.Trigger ref={ref} {...useSuppressClickAfterDrag(props)} />);\n\nPopoverTrigger.displayName = \"PopoverTrigger\";\n\n/** Optional element the content positions against instead of the trigger. */\nexport const PopoverAnchor = PopoverPrimitive.Anchor;\n\n/** Element that closes the popover when activated. Use `asChild` to render your own button. */\nexport const PopoverClose = PopoverPrimitive.Close;\n\n/**\n * Floating panel rendered in a portal, styled like the {@link DropdownMenuContent} surface.\n * Focus moves into it on open and returns to the trigger on close. It renders a `role=\"dialog\"`,\n * so pass `aria-label` or `aria-labelledby` to name it. The content unmounts when closed;\n * `forceMount` is not supported.\n *\n * @example\n * ```tsx\n * <PopoverContent align=\"end\" aria-label=\"Filters\">Filters</PopoverContent>\n * ```\n */\nexport const PopoverContent = React.forwardRef<\n React.ComponentRef<typeof PopoverPrimitive.Content>,\n PopoverContentProps\n>(\n (\n {\n align = \"start\",\n sideOffset = 8,\n collisionPadding = FLOATING_CONTENT_COLLISION_PADDING,\n className,\n style,\n ...props\n },\n ref,\n ) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n className={cn(\n FLOATING_CONTENT_SURFACE_CLASS,\n \"w-max max-w-(--radix-popover-content-available-width) overflow-y-auto p-2 outline-hidden focus-visible:shadow-focus-ring\",\n className,\n )}\n style={{\n zIndex: FLOATING_CONTENT_Z_INDEX,\n maxHeight: \"var(--radix-popover-content-available-height)\",\n ...style,\n }}\n {...props}\n />\n </PopoverPrimitive.Portal>\n ),\n);\n\nPopoverContent.displayName = \"PopoverContent\";\n"],"names":[],"mappings":";;;;;;;;AAmEO,MAAM,UAAU,iBAAiB;AAQjC,MAAM,iBAAiB,MAAM,WAGlC,CAAC,OAAO,QAAQ,oBAAC,iBAAiB,SAAjB,EAAyB,KAAW,GAAG,0BAA0B,KAAK,GAAG,CAAE;AAE9F,eAAe,cAAc;AAGtB,MAAM,gBAAgB,iBAAiB;AAGvC,MAAM,eAAe,iBAAiB;AAatC,MAAM,iBAAiB,MAAM;AAAA,EAIlC,CACE;AAAA,IACE,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QAEA,oBAAC,iBAAiB,QAAjB,EACC,UAAA;AAAA,IAAC,iBAAiB;AAAA,IAAjB;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAEF,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,WAAW;AAAA,QACX,GAAG;AAAA,MAAA;AAAA,MAEJ,GAAG;AAAA,IAAA;AAAA,EAAA,EACN,CACF;AAEJ;AAEA,eAAe,cAAc;"}
@@ -4,6 +4,7 @@ import * as SelectPrimitive from "@radix-ui/react-select";
4
4
  import * as React from "react";
5
5
  import { cn } from "../../utils/cn.mjs";
6
6
  import { FLOATING_CONTENT_COLLISION_PADDING } from "../../utils/floatingContentCollisionPadding.mjs";
7
+ import { FLOATING_CONTENT_Z_INDEX, FLOATING_CONTENT_SURFACE_CLASS } from "../../utils/floatingContentSurface.mjs";
7
8
  import { CheckIcon } from "../Icons/CheckIcon.mjs";
8
9
  import { ChevronDownIcon } from "../Icons/ChevronDownIcon.mjs";
9
10
  import { IconDefaultsContext, NO_ICON_DEFAULTS } from "../Icons/IconDefaults.mjs";
@@ -88,8 +89,11 @@ const Select = React.forwardRef(
88
89
  TRIGGER_GAP[size],
89
90
  TRIGGER_TYPOGRAPHY[size],
90
91
  isFilled ? "justify-center bg-background-secondary text-content-tertiary" : "justify-between bg-inputs-inputs-primary",
91
- error ? "border-error-content" : isFilled ? "border-transparent" : "border-border-primary",
92
- !disabled && !error && (isFilled ? "hover:bg-neutral-alphas-100 data-[state=open]:bg-neutral-alphas-100" : "hover:border-neutral-alphas-400 data-[state=open]:border-neutral-alphas-400"),
92
+ error ? "border-error-content" : isFilled ? "border-transparent" : "border-border-input",
93
+ !disabled && !error && (isFilled ? "hover:bg-neutral-alphas-100 data-[state=open]:bg-neutral-alphas-100" : [
94
+ "hover:border-border-input-hover data-[state=open]:border-border-input-hover",
95
+ "theme-v2:focus-visible:border-border-selected theme-v2:focus-visible:shadow-none theme-v2:data-[state=open]:border-border-selected"
96
+ ]),
93
97
  disabled && "cursor-not-allowed opacity-50"
94
98
  ),
95
99
  children: [
@@ -136,6 +140,22 @@ const Select = React.forwardRef(
136
140
  }
137
141
  );
138
142
  Select.displayName = "Select";
143
+ function SelectViewport({ children }) {
144
+ const [interacted, setInteracted] = React.useState(false);
145
+ const markInteracted = () => {
146
+ if (!interacted) setInteracted(true);
147
+ };
148
+ return /* @__PURE__ */ jsx(
149
+ SelectPrimitive.Viewport,
150
+ {
151
+ "data-interacted": interacted ? "" : void 0,
152
+ onPointerMove: markInteracted,
153
+ onKeyDown: markInteracted,
154
+ className: "group/select flex max-h-[var(--radix-select-content-available-height)] flex-col gap-0.5 overflow-y-auto p-2",
155
+ children
156
+ }
157
+ );
158
+ }
139
159
  const SelectContent = React.forwardRef(
140
160
  ({
141
161
  className,
@@ -152,9 +172,10 @@ const SelectContent = React.forwardRef(
152
172
  position,
153
173
  sideOffset,
154
174
  collisionPadding,
155
- style: { zIndex: "var(--fanvue-ui-portal-z-index, 50)", ...style },
175
+ style: { zIndex: FLOATING_CONTENT_Z_INDEX, ...style },
156
176
  className: cn(
157
- "relative w-max min-w-(--radix-select-trigger-width) max-w-(--radix-select-content-available-width) overflow-hidden rounded-md border border-border-strong bg-background-secondary text-content-primary shadow-blur-menu backdrop-blur-xs",
177
+ FLOATING_CONTENT_SURFACE_CLASS,
178
+ "relative w-max min-w-(--radix-select-trigger-width) max-w-(--radix-select-content-available-width) overflow-hidden",
158
179
  "data-[state=closed]:animate-out data-[state=open]:animate-in",
159
180
  "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
160
181
  "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
@@ -162,7 +183,7 @@ const SelectContent = React.forwardRef(
162
183
  className
163
184
  ),
164
185
  ...props,
165
- children: /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: "max-h-[var(--radix-select-content-available-height)] overflow-y-auto p-2", children: /* @__PURE__ */ jsx(IconDefaultsContext.Provider, { value: NO_ICON_DEFAULTS, children }) })
186
+ children: /* @__PURE__ */ jsx(SelectViewport, { children: /* @__PURE__ */ jsx(IconDefaultsContext.Provider, { value: NO_ICON_DEFAULTS, children }) })
166
187
  }
167
188
  ) })
168
189
  );
@@ -178,7 +199,10 @@ const ITEM_DESCRIPTION_TYPOGRAPHY = {
178
199
  function isRenderableNode(node) {
179
200
  return node !== null && node !== void 0 && typeof node !== "boolean";
180
201
  }
181
- const SelectItem = React.forwardRef(({ className, children, size, leadingIcon, avatar, description, ...props }, ref) => {
202
+ const CHECKED_V2_CLASSES = "theme-v2:data-[state=checked]:text-content-primary-inverted theme-v2:data-[state=checked]:focus:bg-menu-item-selected theme-v2:data-[state=checked]:data-highlighted:bg-menu-item-selected theme-v2:group-data-[interacted]/select:data-[state=checked]:data-highlighted:bg-menu-item-selected-hover";
203
+ const CHECKED_DESCRIPTION_V2_CLASSES = "theme-v2:group-data-[state=checked]:text-content-secondary-inverted theme-v2:group-data-[interacted]/select:group-data-[state=checked]:group-data-highlighted:text-menu-item-selected-hover-secondary";
204
+ const CHECKED_DISABLED_V2_CLASSES = "theme-v2:data-[state=checked]:bg-transparent";
205
+ const SelectItem = React.forwardRef(({ className, children, size, leadingIcon, avatar, description, disabled, ...props }, ref) => {
182
206
  const { size: triggerSize } = React.useContext(SelectContext);
183
207
  const itemSize = size ?? (triggerSize === "32" ? "32" : "40");
184
208
  const hasDescription = isRenderableNode(description);
@@ -189,18 +213,22 @@ const SelectItem = React.forwardRef(({ className, children, size, leadingIcon, a
189
213
  {
190
214
  ref,
191
215
  className: cn(
192
- "group relative flex w-full cursor-pointer select-none gap-2 rounded-sm px-3 text-content-primary outline-none",
216
+ "group relative flex w-full shrink-0 cursor-pointer select-none gap-2 rounded-sm px-3 text-content-primary outline-none",
193
217
  hasDescription ? "items-start" : "items-center",
194
218
  ITEM_SIZE_CLASSES[itemSize],
195
219
  hasAvatar && !hasDescription && itemSize === "32" && "py-1",
220
+ "data-[state=checked]:bg-menu-item-selected",
196
221
  "focus:bg-interaction-hover data-highlighted:bg-interaction-hover",
222
+ "data-[state=checked]:focus:bg-interaction-hover data-[state=checked]:data-highlighted:bg-interaction-hover",
223
+ disabled ? CHECKED_DISABLED_V2_CLASSES : CHECKED_V2_CLASSES,
197
224
  "data-disabled:pointer-events-none data-disabled:text-content-disabled",
198
225
  className
199
226
  ),
227
+ disabled,
200
228
  ...props,
201
229
  children: [
202
- hasAvatar ? /* @__PURE__ */ jsx("span", { className: "shrink-0", children: avatar }) : hasLeadingIcon && // In the two-line row the icon centres on the 18px title line, as in DropdownMenuItem.
203
- /* @__PURE__ */ jsx(MenuRowIcon, { alignToTitle: hasDescription, children: leadingIcon }),
230
+ hasAvatar ? /* @__PURE__ */ jsx("span", { className: cn("shrink-0", disabled && "theme-v2:opacity-60"), children: avatar }) : hasLeadingIcon && // In the two-line row the icon centres on the 18px title line, as in DropdownMenuItem.
231
+ /* @__PURE__ */ jsx(MenuRowIcon, { alignToTitle: hasDescription, invertWhenSelected: !disabled, children: leadingIcon }),
204
232
  hasDescription ? /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
205
233
  /* @__PURE__ */ jsx("span", { className: "typography-body-small-14px-semibold truncate", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }) }),
206
234
  /* @__PURE__ */ jsx(
@@ -208,12 +236,13 @@ const SelectItem = React.forwardRef(({ className, children, size, leadingIcon, a
208
236
  {
209
237
  className: cn(
210
238
  "truncate text-content-secondary group-data-[disabled]:text-content-disabled",
239
+ !disabled && CHECKED_DESCRIPTION_V2_CLASSES,
211
240
  ITEM_DESCRIPTION_TYPOGRAPHY[itemSize]
212
241
  ),
213
242
  children: description
214
243
  }
215
244
  )
216
- ] }) : /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }) }),
245
+ ] }) : /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate group-data-[state=checked]:font-semibold", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }) }),
217
246
  /* @__PURE__ */ jsx(
218
247
  SelectPrimitive.ItemIndicator,
219
248
  {
@@ -221,7 +250,15 @@ const SelectItem = React.forwardRef(({ className, children, size, leadingIcon, a
221
250
  "ml-auto flex w-4 shrink-0 items-center justify-center",
222
251
  hasDescription ? "h-4.5 self-start" : "h-4"
223
252
  ),
224
- children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4 text-content-primary group-data-[disabled]:text-content-disabled" })
253
+ children: /* @__PURE__ */ jsx(
254
+ CheckIcon,
255
+ {
256
+ className: cn(
257
+ "size-4 text-content-primary group-data-[disabled]:text-content-disabled",
258
+ !disabled && "theme-v2:text-icons-primary-inverted"
259
+ )
260
+ }
261
+ )
225
262
  }
226
263
  )
227
264
  ]
@@ -229,7 +266,7 @@ const SelectItem = React.forwardRef(({ className, children, size, leadingIcon, a
229
266
  );
230
267
  });
231
268
  SelectItem.displayName = "SelectItem";
232
- const SelectGroup = SelectPrimitive.Group;
269
+ const SelectGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Group, { ref, className: cn("flex flex-col gap-0.5", className), ...props }));
233
270
  SelectGroup.displayName = "SelectGroup";
234
271
  const SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
235
272
  SelectPrimitive.Label,
@@ -1 +1 @@
1
- {"version":3,"file":"Select.mjs","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import * as SelectPrimitive from \"@radix-ui/react-select\";\nimport * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { FLOATING_CONTENT_COLLISION_PADDING } from \"@/utils/floatingContentCollisionPadding\";\nimport { CheckIcon } from \"../Icons/CheckIcon\";\nimport { ChevronDownIcon } from \"../Icons/ChevronDownIcon\";\nimport { IconDefaultsContext, NO_ICON_DEFAULTS } from \"../Icons/IconDefaults\";\nimport { MenuRowIcon } from \"../Icons/MenuRowIcon\";\n\n/** Select field height in pixels. */\nexport type SelectSize = \"48\" | \"40\" | \"32\";\n\n/**\n * Trigger surface. `\"default\"` is the bordered input field; `\"filled\"` is the\n * V2 Table Tab Actions pill: a `background-secondary` fill with no border and a\n * centred `content-tertiary` label, for filters that sit beside a table or chart.\n */\nexport type SelectVariant = \"default\" | \"filled\";\n\ntype SelectContextValue = {\n size: SelectSize;\n error: boolean;\n disabled?: boolean;\n};\n\nconst SelectContext = React.createContext<SelectContextValue>({\n size: \"48\",\n error: false,\n});\n\nconst TRIGGER_HEIGHT: Record<SelectSize, string> = {\n \"48\": \"h-12\",\n \"40\": \"h-10\",\n \"32\": \"h-8\",\n};\n\nconst TRIGGER_PADDING_X: Record<SelectSize, string> = {\n \"48\": \"px-4\",\n \"40\": \"px-4\",\n \"32\": \"px-3\",\n};\n\nconst TRIGGER_GAP: Record<SelectSize, string> = {\n \"48\": \"gap-3\",\n \"40\": \"gap-3\",\n \"32\": \"gap-2\",\n};\n\nconst TRIGGER_TYPOGRAPHY: Record<SelectSize, string> = {\n \"48\": \"typography-body-default-16px-regular\",\n \"40\": \"typography-body-default-16px-regular\",\n \"32\": \"typography-body-small-14px-regular\",\n};\n\nexport interface SelectProps extends Omit<SelectPrimitive.SelectProps, \"dir\"> {\n /** Label text displayed above the trigger. Also used as the accessible name. */\n label?: string;\n /** Accessible name applied directly to the trigger button when no visible `label` is provided. */\n \"aria-label\"?: string;\n /** ID of an external element that labels the trigger button. */\n \"aria-labelledby\"?: string;\n /** Helper text displayed below the trigger. Replaced by `errorMessage` when `error` is `true`. */\n helperText?: string;\n /** Height of the select field in pixels. @default \"48\" */\n size?: SelectSize;\n /** Trigger surface. See {@link SelectVariant}. @default \"default\" */\n variant?: SelectVariant;\n /** Whether the field is in an error state. @default false */\n error?: boolean;\n /** Error message displayed below the trigger. Shown instead of `helperText` when `error` is `true`. */\n errorMessage?: string;\n /** Placeholder shown when no value is selected. */\n placeholder?: string;\n /** Icon element displayed at the left side of the trigger. */\n leftIcon?: React.ReactNode;\n /** Whether the field stretches to fill its container width. @default false */\n fullWidth?: boolean;\n /** Wraps the `className` of the outermost container div. */\n className?: string;\n /** HTML `id` applied to the trigger button. Auto-generated if omitted. */\n id?: string;\n}\n\n/**\n * A select field with optional label, helper/error text, and an icon slot,\n * built on Radix UI Select for full accessibility and keyboard navigation.\n *\n * Pair with {@link SelectContent} and {@link SelectItem} to provide options.\n *\n * @example\n * ```tsx\n * <Select label=\"Country\" placeholder=\"Select a country\">\n * <SelectContent>\n * <SelectItem value=\"us\">United States</SelectItem>\n * <SelectItem value=\"uk\">United Kingdom</SelectItem>\n * </SelectContent>\n * </Select>\n * ```\n */\nexport const Select = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Trigger>,\n SelectProps\n>(\n (\n {\n label,\n helperText,\n size = \"48\",\n variant = \"default\",\n error = false,\n errorMessage,\n placeholder,\n leftIcon,\n fullWidth = false,\n className,\n id,\n disabled,\n children,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const triggerId = id ?? generatedId;\n const helperTextId = `${triggerId}-helper`;\n const bottomText = error && errorMessage ? errorMessage : helperText;\n const isFilled = variant === \"filled\";\n\n return (\n <SelectContext.Provider value={{ size, error, disabled }}>\n <div\n className={cn(\"flex flex-col\", fullWidth && \"w-full\", className)}\n data-disabled={disabled ? \"\" : undefined}\n data-error={error ? \"\" : undefined}\n >\n {label && (\n <label\n htmlFor={triggerId}\n className=\"typography-description-12px-semibold pb-2 text-content-primary\"\n >\n {label}\n </label>\n )}\n\n <SelectPrimitive.Root disabled={disabled} {...props}>\n <SelectPrimitive.Trigger\n ref={ref}\n id={triggerId}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-describedby={bottomText ? helperTextId : undefined}\n aria-invalid={error || undefined}\n className={cn(\n \"flex w-full cursor-pointer items-center rounded-sm border outline-none focus-visible:shadow-focus-ring motion-safe:transition-colors\",\n TRIGGER_HEIGHT[size],\n isFilled ? \"px-2\" : TRIGGER_PADDING_X[size],\n TRIGGER_GAP[size],\n TRIGGER_TYPOGRAPHY[size],\n isFilled\n ? \"justify-center bg-background-secondary text-content-tertiary\"\n : \"justify-between bg-inputs-inputs-primary\",\n error\n ? \"border-error-content\"\n : isFilled\n ? \"border-transparent\"\n : \"border-border-primary\",\n !disabled &&\n !error &&\n (isFilled\n ? \"hover:bg-neutral-alphas-100 data-[state=open]:bg-neutral-alphas-100\"\n : \"hover:border-neutral-alphas-400 data-[state=open]:border-neutral-alphas-400\"),\n disabled && \"cursor-not-allowed opacity-50\",\n )}\n >\n <div className=\"flex min-w-0 items-center gap-2\">\n {leftIcon && (\n <span\n className=\"flex size-5 shrink-0 items-center justify-center text-content-secondary\"\n data-testid=\"left-icon\"\n >\n {leftIcon}\n </span>\n )}\n <span\n className={cn(\n \"min-w-0 flex-1 truncate [&>[data-placeholder]]:text-content-tertiary\",\n isFilled\n ? \"text-center text-content-tertiary\"\n : \"text-left text-content-primary\",\n )}\n >\n <SelectPrimitive.Value placeholder={placeholder} />\n </span>\n </div>\n\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon size={isFilled ? 16 : 24} className=\"shrink-0\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n\n {children}\n </SelectPrimitive.Root>\n\n {bottomText && (\n <p\n id={helperTextId}\n className={cn(\n \"typography-description-12px-regular px-2 pt-1 pb-0.5\",\n error ? \"text-error-content\" : \"text-content-secondary\",\n )}\n >\n {bottomText}\n </p>\n )}\n </div>\n </SelectContext.Provider>\n );\n },\n);\n\nSelect.displayName = \"Select\";\n\nexport interface SelectContentProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> {}\n\n/**\n * The dropdown panel rendered inside a portal. Place {@link SelectItem} elements\n * (and optionally {@link SelectGroup} / {@link SelectLabel}) as children.\n */\nexport const SelectContent = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Content>,\n SelectContentProps\n>(\n (\n {\n className,\n children,\n position = \"popper\",\n sideOffset = 4,\n collisionPadding = FLOATING_CONTENT_COLLISION_PADDING,\n style,\n ...props\n },\n ref,\n ) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n position={position}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n style={{ zIndex: \"var(--fanvue-ui-portal-z-index, 50)\", ...style }}\n className={cn(\n \"relative w-max min-w-(--radix-select-trigger-width) max-w-(--radix-select-content-available-width) overflow-hidden rounded-md border border-border-strong bg-background-secondary text-content-primary shadow-blur-menu backdrop-blur-xs\",\n \"data-[state=closed]:animate-out data-[state=open]:animate-in\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n >\n <SelectPrimitive.Viewport className=\"max-h-[var(--radix-select-content-available-height)] overflow-y-auto p-2\">\n {/* A select opened from inside a menu row must not inherit that row's icon defaults. */}\n <IconDefaultsContext.Provider value={NO_ICON_DEFAULTS}>\n {children}\n </IconDefaultsContext.Provider>\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n ),\n);\n\nSelectContent.displayName = \"SelectContent\";\n\n/** Dropdown row height in pixels, matching the V2 Menu Item spec. */\nexport type SelectItemSize = \"40\" | \"32\";\n\nconst ITEM_SIZE_CLASSES: Record<SelectItemSize, string> = {\n \"40\": \"min-h-10 py-2 typography-body-small-14px-regular\",\n \"32\": \"min-h-8 py-[7px] typography-body-small-14px-regular\",\n};\n\nconst ITEM_DESCRIPTION_TYPOGRAPHY: Record<SelectItemSize, string> = {\n \"40\": \"typography-body-small-14px-regular\",\n \"32\": \"typography-description-12px-regular\",\n};\n\nexport interface SelectItemProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> {\n /** Row height. Defaults to the parent {@link Select} size (`48`/`40` → `40`, `32` → `32`). */\n size?: SelectItemSize;\n /**\n * Icon (or other node) rendered before the label. Ignored when {@link SelectItemProps.avatar} is set.\n * Treated like `DropdownMenuItem`'s icons: a 16px box in `Icons/Secondary`, prop-based icons filled at 16px\n * unless they set `filled` or `size` themselves.\n */\n leadingIcon?: React.ReactNode;\n /**\n * Leading avatar rendered in place of {@link SelectItemProps.leadingIcon}, for rows\n * representing a person or account. Pass an `Avatar` sized to `24`. Takes precedence over `leadingIcon`.\n */\n avatar?: React.ReactNode;\n /** Optional secondary text rendered on a second line below the label. */\n description?: React.ReactNode;\n}\n\n/**\n * Whether a `ReactNode` will actually render. Excludes `null`/`undefined` and\n * booleans so short-circuit props (e.g. `description={cond && \"…\"}`) don't flip\n * the item into a two-line/avatar layout when they resolve to `false`.\n */\nfunction isRenderableNode(node: React.ReactNode): boolean {\n return node !== null && node !== undefined && typeof node !== \"boolean\";\n}\n\n/**\n * An individual option inside {@link SelectContent}, following the V2 Menu Item spec.\n *\n * Supports a leading icon or avatar, an optional two-line layout via `description`,\n * and the standard hover / selected / disabled states. The selected row is marked\n * with a trailing check indicator.\n *\n * @example\n * ```tsx\n * <SelectItem value=\"jane\" avatar={<Avatar size={24} fallback=\"JD\" />} description=\"Product designer\">\n * Jane Doe\n * </SelectItem>\n * ```\n */\nexport const SelectItem = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Item>,\n SelectItemProps\n>(({ className, children, size, leadingIcon, avatar, description, ...props }, ref) => {\n const { size: triggerSize } = React.useContext(SelectContext);\n const itemSize: SelectItemSize = size ?? (triggerSize === \"32\" ? \"32\" : \"40\");\n const hasDescription = isRenderableNode(description);\n const hasAvatar = isRenderableNode(avatar);\n const hasLeadingIcon = isRenderableNode(leadingIcon);\n\n return (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"group relative flex w-full cursor-pointer select-none gap-2 rounded-sm px-3 text-content-primary outline-none\",\n hasDescription ? \"items-start\" : \"items-center\",\n ITEM_SIZE_CLASSES[itemSize],\n hasAvatar && !hasDescription && itemSize === \"32\" && \"py-1\",\n \"focus:bg-interaction-hover data-highlighted:bg-interaction-hover\",\n \"data-disabled:pointer-events-none data-disabled:text-content-disabled\",\n className,\n )}\n {...props}\n >\n {hasAvatar ? (\n <span className=\"shrink-0\">{avatar}</span>\n ) : (\n hasLeadingIcon && (\n // In the two-line row the icon centres on the 18px title line, as in DropdownMenuItem.\n <MenuRowIcon alignToTitle={hasDescription}>{leadingIcon}</MenuRowIcon>\n )\n )}\n\n {hasDescription ? (\n <span className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n {/* A 14px semibold title over the regular description, matching DropdownMenuItem's two-line row. */}\n <span className=\"typography-body-small-14px-semibold truncate\">\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </span>\n <span\n className={cn(\n \"truncate text-content-secondary group-data-[disabled]:text-content-disabled\",\n ITEM_DESCRIPTION_TYPOGRAPHY[itemSize],\n )}\n >\n {description}\n </span>\n </span>\n ) : (\n <span className=\"min-w-0 flex-1 truncate\">\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </span>\n )}\n\n <SelectPrimitive.ItemIndicator\n className={cn(\n \"ml-auto flex w-4 shrink-0 items-center justify-center\",\n hasDescription ? \"h-4.5 self-start\" : \"h-4\",\n )}\n >\n <CheckIcon className=\"size-4 text-content-primary group-data-[disabled]:text-content-disabled\" />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n );\n});\n\nSelectItem.displayName = \"SelectItem\";\n\n/** Props for {@link SelectGroup}. */\nexport type SelectGroupProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Group>;\n\n/**\n * Groups related {@link SelectItem} elements under a {@link SelectLabel}.\n */\nexport const SelectGroup = SelectPrimitive.Group;\nSelectGroup.displayName = \"SelectGroup\";\n\nexport interface SelectLabelProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label> {}\n\n/**\n * A non-interactive label shown above a {@link SelectGroup}.\n */\nexport const SelectLabel = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Label>,\n SelectLabelProps\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\n \"typography-description-12px-semibold px-3 py-1.5 text-content-secondary\",\n className,\n )}\n {...props}\n />\n));\n\nSelectLabel.displayName = \"SelectLabel\";\n\nexport interface SelectSeparatorProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator> {}\n\n/** A horizontal rule that visually separates groups in {@link SelectContent}. */\nexport const SelectSeparator = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Separator>,\n SelectSeparatorProps\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"my-1 h-px bg-neutral-alphas-200\", className)}\n {...props}\n />\n));\n\nSelectSeparator.displayName = \"SelectSeparator\";\n"],"names":[],"mappings":";;;;;;;;;;AAyBA,MAAM,gBAAgB,MAAM,cAAkC;AAAA,EAC5D,MAAM;AAAA,EACN,OAAO;AACT,CAAC;AAED,MAAM,iBAA6C;AAAA,EACjD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,oBAAgD;AAAA,EACpD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,cAA0C;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,qBAAiD;AAAA,EACrD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AA+CO,MAAM,SAAS,MAAM;AAAA,EAI1B,C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,WAAU,wCAEd,UAAA;AAAA,UAAA,oBAAC,QAAA,EAAK,WAAU,gDACd,UAAA,oBAAC,gBAAgB,UAAhB,EAA0B,UAAS,EAAA,CACtC;AAAA,UACA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,gBACT;AAAA,gBACA,4BAA4B,QAAQ;AAAA,cAAA;AAAA,cAGrC,UAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACH,EAAA,CACF,IAEA,oBAAC,QAAA,EAAK,WAAU,2BACd,8BAAC,gBAAgB,UAAhB,EAA0B,SAAA,CAAS,EAAA,CACtC;AAAA,QAGF;AAAA,UAAC,gBAAgB;AAAA,UAAhB;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,iBAAiB,qBAAqB;AAAA,YAAA;AAAA,YAGxC,UAAA,oBAAC,WAAA,EAAU,WAAU,0EAAA,CAA0E;AAAA,UAAA;AAAA,QAAA;AAAA,MACjG;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;AAED,WAAW,cAAc;AAQlB,MAAM,cAAc,gBAAgB;AAC3C,YAAY,cAAc;AAQnB,MAAM,cAAc,MAAM,WAG/B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,EAAA;AACN,CACD;AAED,YAAY,cAAc;AAMnB,MAAM,kBAAkB,MAAM,WAGnC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,mCAAmC,SAAS;AAAA,IACzD,GAAG;AAAA,EAAA;AACN,CACD;AAED,gBAAgB,cAAc;"}
1
+ {"version":3,"file":"Select.mjs","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import * as SelectPrimitive from \"@radix-ui/react-select\";\nimport * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { FLOATING_CONTENT_COLLISION_PADDING } from \"@/utils/floatingContentCollisionPadding\";\nimport {\n FLOATING_CONTENT_SURFACE_CLASS,\n FLOATING_CONTENT_Z_INDEX,\n} from \"@/utils/floatingContentSurface\";\nimport { CheckIcon } from \"../Icons/CheckIcon\";\nimport { ChevronDownIcon } from \"../Icons/ChevronDownIcon\";\nimport { IconDefaultsContext, NO_ICON_DEFAULTS } from \"../Icons/IconDefaults\";\nimport { MenuRowIcon } from \"../Icons/MenuRowIcon\";\n\n/** Select field height in pixels. */\nexport type SelectSize = \"48\" | \"40\" | \"32\";\n\n/**\n * Trigger surface. `\"default\"` is the bordered input field; `\"filled\"` is the\n * V2 Table Tab Actions pill: a `background-secondary` fill with no border and a\n * centred `content-tertiary` label, for filters that sit beside a table or chart.\n */\nexport type SelectVariant = \"default\" | \"filled\";\n\ntype SelectContextValue = {\n size: SelectSize;\n error: boolean;\n disabled?: boolean;\n};\n\nconst SelectContext = React.createContext<SelectContextValue>({\n size: \"48\",\n error: false,\n});\n\nconst TRIGGER_HEIGHT: Record<SelectSize, string> = {\n \"48\": \"h-12\",\n \"40\": \"h-10\",\n \"32\": \"h-8\",\n};\n\nconst TRIGGER_PADDING_X: Record<SelectSize, string> = {\n \"48\": \"px-4\",\n \"40\": \"px-4\",\n \"32\": \"px-3\",\n};\n\nconst TRIGGER_GAP: Record<SelectSize, string> = {\n \"48\": \"gap-3\",\n \"40\": \"gap-3\",\n \"32\": \"gap-2\",\n};\n\nconst TRIGGER_TYPOGRAPHY: Record<SelectSize, string> = {\n \"48\": \"typography-body-default-16px-regular\",\n \"40\": \"typography-body-default-16px-regular\",\n \"32\": \"typography-body-small-14px-regular\",\n};\n\nexport interface SelectProps extends Omit<SelectPrimitive.SelectProps, \"dir\"> {\n /** Label text displayed above the trigger. Also used as the accessible name. */\n label?: string;\n /** Accessible name applied directly to the trigger button when no visible `label` is provided. */\n \"aria-label\"?: string;\n /** ID of an external element that labels the trigger button. */\n \"aria-labelledby\"?: string;\n /** Helper text displayed below the trigger. Replaced by `errorMessage` when `error` is `true`. */\n helperText?: string;\n /** Height of the select field in pixels. @default \"48\" */\n size?: SelectSize;\n /** Trigger surface. See {@link SelectVariant}. @default \"default\" */\n variant?: SelectVariant;\n /** Whether the field is in an error state. @default false */\n error?: boolean;\n /** Error message displayed below the trigger. Shown instead of `helperText` when `error` is `true`. */\n errorMessage?: string;\n /** Placeholder shown when no value is selected. */\n placeholder?: string;\n /** Icon element displayed at the left side of the trigger. */\n leftIcon?: React.ReactNode;\n /** Whether the field stretches to fill its container width. @default false */\n fullWidth?: boolean;\n /** Wraps the `className` of the outermost container div. */\n className?: string;\n /** HTML `id` applied to the trigger button. Auto-generated if omitted. */\n id?: string;\n}\n\n/**\n * A select field with optional label, helper/error text, and an icon slot,\n * built on Radix UI Select for full accessibility and keyboard navigation.\n *\n * Pair with {@link SelectContent} and {@link SelectItem} to provide options.\n *\n * @example\n * ```tsx\n * <Select label=\"Country\" placeholder=\"Select a country\">\n * <SelectContent>\n * <SelectItem value=\"us\">United States</SelectItem>\n * <SelectItem value=\"uk\">United Kingdom</SelectItem>\n * </SelectContent>\n * </Select>\n * ```\n */\nexport const Select = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Trigger>,\n SelectProps\n>(\n (\n {\n label,\n helperText,\n size = \"48\",\n variant = \"default\",\n error = false,\n errorMessage,\n placeholder,\n leftIcon,\n fullWidth = false,\n className,\n id,\n disabled,\n children,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const triggerId = id ?? generatedId;\n const helperTextId = `${triggerId}-helper`;\n const bottomText = error && errorMessage ? errorMessage : helperText;\n const isFilled = variant === \"filled\";\n\n return (\n <SelectContext.Provider value={{ size, error, disabled }}>\n <div\n className={cn(\"flex flex-col\", fullWidth && \"w-full\", className)}\n data-disabled={disabled ? \"\" : undefined}\n data-error={error ? \"\" : undefined}\n >\n {label && (\n <label\n htmlFor={triggerId}\n className=\"typography-description-12px-semibold pb-2 text-content-primary\"\n >\n {label}\n </label>\n )}\n\n <SelectPrimitive.Root disabled={disabled} {...props}>\n <SelectPrimitive.Trigger\n ref={ref}\n id={triggerId}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-describedby={bottomText ? helperTextId : undefined}\n aria-invalid={error || undefined}\n className={cn(\n \"flex w-full cursor-pointer items-center rounded-sm border outline-none focus-visible:shadow-focus-ring motion-safe:transition-colors\",\n TRIGGER_HEIGHT[size],\n isFilled ? \"px-2\" : TRIGGER_PADDING_X[size],\n TRIGGER_GAP[size],\n TRIGGER_TYPOGRAPHY[size],\n isFilled\n ? \"justify-center bg-background-secondary text-content-tertiary\"\n : \"justify-between bg-inputs-inputs-primary\",\n error\n ? \"border-error-content\"\n : isFilled\n ? \"border-transparent\"\n : \"border-border-input\",\n !disabled &&\n !error &&\n (isFilled\n ? \"hover:bg-neutral-alphas-100 data-[state=open]:bg-neutral-alphas-100\"\n : [\n \"hover:border-border-input-hover data-[state=open]:border-border-input-hover\",\n \"theme-v2:focus-visible:border-border-selected theme-v2:focus-visible:shadow-none theme-v2:data-[state=open]:border-border-selected\",\n ]),\n disabled && \"cursor-not-allowed opacity-50\",\n )}\n >\n <div className=\"flex min-w-0 items-center gap-2\">\n {leftIcon && (\n <span\n className=\"flex size-5 shrink-0 items-center justify-center text-content-secondary\"\n data-testid=\"left-icon\"\n >\n {leftIcon}\n </span>\n )}\n <span\n className={cn(\n \"min-w-0 flex-1 truncate [&>[data-placeholder]]:text-content-tertiary\",\n isFilled\n ? \"text-center text-content-tertiary\"\n : \"text-left text-content-primary\",\n )}\n >\n <SelectPrimitive.Value placeholder={placeholder} />\n </span>\n </div>\n\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon size={isFilled ? 16 : 24} className=\"shrink-0\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n\n {children}\n </SelectPrimitive.Root>\n\n {bottomText && (\n <p\n id={helperTextId}\n className={cn(\n \"typography-description-12px-regular px-2 pt-1 pb-0.5\",\n error ? \"text-error-content\" : \"text-content-secondary\",\n )}\n >\n {bottomText}\n </p>\n )}\n </div>\n </SelectContext.Provider>\n );\n },\n);\n\nSelect.displayName = \"Select\";\n\nexport interface SelectContentProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> {}\n\n/**\n * The list's scroll area. It marks itself `data-interacted` once the person moves the\n * pointer or presses a key in it, which lets the selected row's v2 hover fill wait for\n * real input (see {@link CHECKED_V2_CLASSES}). Radix mounts it afresh on every open, so\n * each open starts unmarked.\n */\nfunction SelectViewport({ children }: { children: React.ReactNode }) {\n const [interacted, setInteracted] = React.useState(false);\n const markInteracted = () => {\n if (!interacted) setInteracted(true);\n };\n return (\n <SelectPrimitive.Viewport\n data-interacted={interacted ? \"\" : undefined}\n onPointerMove={markInteracted}\n onKeyDown={markInteracted}\n className=\"group/select flex max-h-[var(--radix-select-content-available-height)] flex-col gap-0.5 overflow-y-auto p-2\"\n >\n {children}\n </SelectPrimitive.Viewport>\n );\n}\n\n/**\n * The dropdown panel rendered inside a portal. Place {@link SelectItem} elements\n * (and optionally {@link SelectGroup} / {@link SelectLabel}) as children.\n */\nexport const SelectContent = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Content>,\n SelectContentProps\n>(\n (\n {\n className,\n children,\n position = \"popper\",\n sideOffset = 4,\n collisionPadding = FLOATING_CONTENT_COLLISION_PADDING,\n style,\n ...props\n },\n ref,\n ) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n position={position}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n style={{ zIndex: FLOATING_CONTENT_Z_INDEX, ...style }}\n className={cn(\n FLOATING_CONTENT_SURFACE_CLASS,\n \"relative w-max min-w-(--radix-select-trigger-width) max-w-(--radix-select-content-available-width) overflow-hidden\",\n \"data-[state=closed]:animate-out data-[state=open]:animate-in\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n >\n <SelectViewport>\n {/* A select opened from inside a menu row must not inherit that row's icon defaults. */}\n <IconDefaultsContext.Provider value={NO_ICON_DEFAULTS}>\n {children}\n </IconDefaultsContext.Provider>\n </SelectViewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n ),\n);\n\nSelectContent.displayName = \"SelectContent\";\n\n/** Dropdown row height in pixels, matching the V2 Menu Item spec. */\nexport type SelectItemSize = \"40\" | \"32\";\n\nconst ITEM_SIZE_CLASSES: Record<SelectItemSize, string> = {\n \"40\": \"min-h-10 py-2 typography-body-small-14px-regular\",\n \"32\": \"min-h-8 py-[7px] typography-body-small-14px-regular\",\n};\n\nconst ITEM_DESCRIPTION_TYPOGRAPHY: Record<SelectItemSize, string> = {\n \"40\": \"typography-body-small-14px-regular\",\n \"32\": \"typography-description-12px-regular\",\n};\n\nexport interface SelectItemProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> {\n /** Row height. Defaults to the parent {@link Select} size (`48`/`40` → `40`, `32` → `32`). */\n size?: SelectItemSize;\n /**\n * Icon (or other node) rendered before the label. Ignored when {@link SelectItemProps.avatar} is set.\n * Treated like `DropdownMenuItem`'s icons: a 16px box in `Icons/Secondary`, prop-based icons filled at 16px\n * unless they set `filled` or `size` themselves.\n */\n leadingIcon?: React.ReactNode;\n /**\n * Leading avatar rendered in place of {@link SelectItemProps.leadingIcon}, for rows\n * representing a person or account. Pass an `Avatar` sized to `24`. Takes precedence over `leadingIcon`.\n */\n avatar?: React.ReactNode;\n /** Optional secondary text rendered on a second line below the label. */\n description?: React.ReactNode;\n}\n\n/**\n * Whether a `ReactNode` will actually render. Excludes `null`/`undefined` and\n * booleans so short-circuit props (e.g. `description={cond && \"…\"}`) don't flip\n * the item into a two-line/avatar layout when they resolve to `false`.\n */\nfunction isRenderableNode(node: React.ReactNode): boolean {\n return node !== null && node !== undefined && typeof node !== \"boolean\";\n}\n\n/**\n * Under the v2 palette a selected option's `Menu Item Selected` fill is inverted, so its\n * content inverts too. Radix focuses and highlights the selected option as the list opens,\n * so keyboard users start from it. Until the person moves the pointer or presses a key in\n * the list, the selected row keeps its own fill; after that a highlighted one moves to\n * `Menu Item Selected Hover` (see {@link SelectViewport}).\n */\nconst CHECKED_V2_CLASSES =\n \"theme-v2:data-[state=checked]:text-content-primary-inverted theme-v2:data-[state=checked]:focus:bg-menu-item-selected theme-v2:data-[state=checked]:data-highlighted:bg-menu-item-selected theme-v2:group-data-[interacted]/select:data-[state=checked]:data-highlighted:bg-menu-item-selected-hover\";\n\n/**\n * A selected option's description under the v2 palette: inverted, and\n * `Menu Item Selected Hover Secondary` while the row shows its hover fill.\n */\nconst CHECKED_DESCRIPTION_V2_CLASSES =\n \"theme-v2:group-data-[state=checked]:text-content-secondary-inverted theme-v2:group-data-[interacted]/select:group-data-[state=checked]:group-data-highlighted:text-menu-item-selected-hover-secondary\";\n\n/** A disabled selected option takes the library's Disabled state under the v2 palette, which has no fill. */\nconst CHECKED_DISABLED_V2_CLASSES = \"theme-v2:data-[state=checked]:bg-transparent\";\n\n/**\n * An individual option inside {@link SelectContent}, following the V2 Menu Item spec.\n *\n * Supports a leading icon or avatar, an optional two-line layout via `description`,\n * and the standard hover / selected / disabled states. The selected row rests on\n * `Buttons/Navigation/Hover` with a semibold label and a trailing check; hovering\n * it shows `Interaction/Hover` like any other row. Under the v2 palette the fill is\n * inverted, with inverted content, and a highlighted selected row moves to `Menu Item\n * Selected Hover`. Under the v2 palette the list opens with the selected row on its own\n * fill: the hover fill waits until the person moves the pointer or presses a key. Rows do not shrink, so a\n * two-line row stays whole when the list scrolls.\n *\n * @example\n * ```tsx\n * <SelectItem value=\"jane\" avatar={<Avatar size={24} fallback=\"JD\" />} description=\"Product designer\">\n * Jane Doe\n * </SelectItem>\n * ```\n */\nexport const SelectItem = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Item>,\n SelectItemProps\n>(({ className, children, size, leadingIcon, avatar, description, disabled, ...props }, ref) => {\n const { size: triggerSize } = React.useContext(SelectContext);\n const itemSize: SelectItemSize = size ?? (triggerSize === \"32\" ? \"32\" : \"40\");\n const hasDescription = isRenderableNode(description);\n const hasAvatar = isRenderableNode(avatar);\n const hasLeadingIcon = isRenderableNode(leadingIcon);\n\n return (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"group relative flex w-full shrink-0 cursor-pointer select-none gap-2 rounded-sm px-3 text-content-primary outline-none\",\n hasDescription ? \"items-start\" : \"items-center\",\n ITEM_SIZE_CLASSES[itemSize],\n hasAvatar && !hasDescription && itemSize === \"32\" && \"py-1\",\n \"data-[state=checked]:bg-menu-item-selected\",\n \"focus:bg-interaction-hover data-highlighted:bg-interaction-hover\",\n \"data-[state=checked]:focus:bg-interaction-hover data-[state=checked]:data-highlighted:bg-interaction-hover\",\n disabled ? CHECKED_DISABLED_V2_CLASSES : CHECKED_V2_CLASSES,\n \"data-disabled:pointer-events-none data-disabled:text-content-disabled\",\n className,\n )}\n disabled={disabled}\n {...props}\n >\n {hasAvatar ? (\n <span className={cn(\"shrink-0\", disabled && \"theme-v2:opacity-60\")}>{avatar}</span>\n ) : (\n hasLeadingIcon && (\n // In the two-line row the icon centres on the 18px title line, as in DropdownMenuItem.\n <MenuRowIcon alignToTitle={hasDescription} invertWhenSelected={!disabled}>\n {leadingIcon}\n </MenuRowIcon>\n )\n )}\n\n {hasDescription ? (\n <span className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n {/* A 14px semibold title over the regular description, matching DropdownMenuItem's two-line row. */}\n <span className=\"typography-body-small-14px-semibold truncate\">\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </span>\n <span\n className={cn(\n \"truncate text-content-secondary group-data-[disabled]:text-content-disabled\",\n !disabled && CHECKED_DESCRIPTION_V2_CLASSES,\n ITEM_DESCRIPTION_TYPOGRAPHY[itemSize],\n )}\n >\n {description}\n </span>\n </span>\n ) : (\n <span className=\"min-w-0 flex-1 truncate group-data-[state=checked]:font-semibold\">\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </span>\n )}\n\n <SelectPrimitive.ItemIndicator\n className={cn(\n \"ml-auto flex w-4 shrink-0 items-center justify-center\",\n hasDescription ? \"h-4.5 self-start\" : \"h-4\",\n )}\n >\n <CheckIcon\n className={cn(\n \"size-4 text-content-primary group-data-[disabled]:text-content-disabled\",\n !disabled && \"theme-v2:text-icons-primary-inverted\",\n )}\n />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n );\n});\n\nSelectItem.displayName = \"SelectItem\";\n\n/** Props for {@link SelectGroup}. */\nexport type SelectGroupProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Group>;\n\n/**\n * Groups related {@link SelectItem} elements under a {@link SelectLabel}.\n */\nexport const SelectGroup = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Group>,\n SelectGroupProps\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Group ref={ref} className={cn(\"flex flex-col gap-0.5\", className)} {...props} />\n));\nSelectGroup.displayName = \"SelectGroup\";\n\nexport interface SelectLabelProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label> {}\n\n/**\n * A non-interactive label shown above a {@link SelectGroup}.\n */\nexport const SelectLabel = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Label>,\n SelectLabelProps\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\n \"typography-description-12px-semibold px-3 py-1.5 text-content-secondary\",\n className,\n )}\n {...props}\n />\n));\n\nSelectLabel.displayName = \"SelectLabel\";\n\nexport interface SelectSeparatorProps\n extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator> {}\n\n/** A horizontal rule that visually separates groups in {@link SelectContent}. */\nexport const SelectSeparator = React.forwardRef<\n React.ComponentRef<typeof SelectPrimitive.Separator>,\n SelectSeparatorProps\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"my-1 h-px bg-neutral-alphas-200\", className)}\n {...props}\n />\n));\n\nSelectSeparator.displayName = \"SelectSeparator\";\n"],"names":[],"mappings":";;;;;;;;;;;AA6BA,MAAM,gBAAgB,MAAM,cAAkC;AAAA,EAC5D,MAAM;AAAA,EACN,OAAO;AACT,CAAC;AAED,MAAM,iBAA6C;AAAA,EACjD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,oBAAgD;AAAA,EACpD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,cAA0C;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,MAAM,qBAAiD;AAAA,EACrD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AA+CO,MAAM,SAAS,MAAM;AAAA,EAI1B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,UAAU;AAAA,IACV,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,cAAc,MAAM,MAAA;AAC1B,UAAM,YAAY,MAAM;AACxB,UAAM,eAAe,GAAG,SAAS;AACjC,UAAM,aAAa,SAAS,eAAe,eAAe;AAC1D,UAAM,WAAW,YAAY;AAE7B,WACE,oBAAC,cAAc,UAAd,EAAuB,OAAO,EAAE,MAAM,OAAO,YAC5C,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,GAAG,iBAAiB,aAAa,UAAU,SAA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EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,mCAAmC,SAAS;AAAA,IACzD,GAAG;AAAA,EAAA;AACN,CACD;AAED,gBAAgB,cAAc;"}
@@ -32,11 +32,12 @@ function SliderThumb({
32
32
  },
33
33
  onKeyDown: (e) => {
34
34
  if (showTooltip) {
35
- requestAnimationFrame(() => syncTooltipText(e.currentTarget, formatTooltip));
35
+ const thumb = e.currentTarget;
36
+ requestAnimationFrame(() => syncTooltipText(thumb, formatTooltip));
36
37
  }
37
38
  },
38
39
  className: cn(
39
- "flex size-6 items-center justify-center rounded-full border border-border-primary bg-background-primary shadow-sm",
40
+ "flex size-6 items-center justify-center rounded-full border border-border-primary bg-background-primary shadow-sm theme-v2:bg-surface-primary",
40
41
  "transition-shadow duration-150",
41
42
  "hover:ring-2 hover:ring-brand-primary-default",
42
43
  "not-data-disabled:active:ring-2 not-data-disabled:active:ring-brand-primary-default",