@fanvue/ui 3.51.0 → 3.53.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 (165) hide show
  1. package/dist/cjs/components/Autocomplete/Autocomplete.cjs +34 -10
  2. package/dist/cjs/components/Autocomplete/Autocomplete.cjs.map +1 -1
  3. package/dist/cjs/components/Autocomplete/AutocompleteOptionItem.cjs +13 -1
  4. package/dist/cjs/components/Autocomplete/AutocompleteOptionItem.cjs.map +1 -1
  5. package/dist/cjs/components/BottomNavigation/BottomNavigation.cjs +2 -2
  6. package/dist/cjs/components/BottomNavigation/BottomNavigation.cjs.map +1 -1
  7. package/dist/cjs/components/Card/Card.cjs +5 -2
  8. package/dist/cjs/components/Card/Card.cjs.map +1 -1
  9. package/dist/cjs/components/Chart/ChartCard.cjs +2 -1
  10. package/dist/cjs/components/Chart/ChartCard.cjs.map +1 -1
  11. package/dist/cjs/components/Chart/ChartLoadingOverlay.cjs +1 -1
  12. package/dist/cjs/components/Chart/ChartLoadingOverlay.cjs.map +1 -1
  13. package/dist/cjs/components/ChatInput/ChatInput.cjs +2 -2
  14. package/dist/cjs/components/ChatInput/ChatInput.cjs.map +1 -1
  15. package/dist/cjs/components/ChatMessage/ChatMessage.cjs +1 -1
  16. package/dist/cjs/components/ChatMessage/ChatMessage.cjs.map +1 -1
  17. package/dist/cjs/components/CreatorCard/CreatorCard.cjs +3 -5
  18. package/dist/cjs/components/CreatorCard/CreatorCard.cjs.map +1 -1
  19. package/dist/cjs/components/CreatorCover/CreatorCover.cjs +11 -7
  20. package/dist/cjs/components/CreatorCover/CreatorCover.cjs.map +1 -1
  21. package/dist/cjs/components/DatePicker/DatePicker.cjs +37 -16
  22. package/dist/cjs/components/DatePicker/DatePicker.cjs.map +1 -1
  23. package/dist/cjs/components/Drawer/Drawer.cjs +11 -3
  24. package/dist/cjs/components/Drawer/Drawer.cjs.map +1 -1
  25. package/dist/cjs/components/DropdownMenu/DropdownMenuItem.cjs +33 -10
  26. package/dist/cjs/components/DropdownMenu/DropdownMenuItem.cjs.map +1 -1
  27. package/dist/cjs/components/DropdownMenu/DropdownMenuReorderItem.cjs +2 -1
  28. package/dist/cjs/components/DropdownMenu/DropdownMenuReorderItem.cjs.map +1 -1
  29. package/dist/cjs/components/DropdownMenu/DropdownMenuRoot.cjs +18 -13
  30. package/dist/cjs/components/DropdownMenu/DropdownMenuRoot.cjs.map +1 -1
  31. package/dist/cjs/components/DropdownMenu/DropdownMenuSelectionItems.cjs +56 -40
  32. package/dist/cjs/components/DropdownMenu/DropdownMenuSelectionItems.cjs.map +1 -1
  33. package/dist/cjs/components/IconButton/IconButton.cjs +5 -2
  34. package/dist/cjs/components/IconButton/IconButton.cjs.map +1 -1
  35. package/dist/cjs/components/Icons/MenuRowIcon.cjs +9 -2
  36. package/dist/cjs/components/Icons/MenuRowIcon.cjs.map +1 -1
  37. package/dist/cjs/components/Icons/VerifiedIcon.cjs +9 -15
  38. package/dist/cjs/components/Icons/VerifiedIcon.cjs.map +1 -1
  39. package/dist/cjs/components/InlineEmptyState/InlineEmptyState.cjs +42 -0
  40. package/dist/cjs/components/InlineEmptyState/InlineEmptyState.cjs.map +1 -0
  41. package/dist/cjs/components/Link/Link.cjs +30 -7
  42. package/dist/cjs/components/Link/Link.cjs.map +1 -1
  43. package/dist/cjs/components/PhoneField/PhoneField.cjs +21 -17
  44. package/dist/cjs/components/PhoneField/PhoneField.cjs.map +1 -1
  45. package/dist/cjs/components/Popover/Popover.cjs +69 -0
  46. package/dist/cjs/components/Popover/Popover.cjs.map +1 -0
  47. package/dist/cjs/components/SegmentedControl/SegmentedControl.cjs +6 -10
  48. package/dist/cjs/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
  49. package/dist/cjs/components/SegmentedControl/segmentedControlClassNames.cjs +54 -0
  50. package/dist/cjs/components/SegmentedControl/segmentedControlClassNames.cjs.map +1 -0
  51. package/dist/cjs/components/Select/Select.cjs +40 -12
  52. package/dist/cjs/components/Select/Select.cjs.map +1 -1
  53. package/dist/cjs/components/Slider/SliderThumb.cjs +3 -2
  54. package/dist/cjs/components/Slider/SliderThumb.cjs.map +1 -1
  55. package/dist/cjs/components/Snackbar/Snackbar.cjs +1 -1
  56. package/dist/cjs/components/Snackbar/Snackbar.cjs.map +1 -1
  57. package/dist/cjs/components/Switch/Switch.cjs +1 -1
  58. package/dist/cjs/components/Switch/Switch.cjs.map +1 -1
  59. package/dist/cjs/components/Table/Table.cjs +77 -7
  60. package/dist/cjs/components/Table/Table.cjs.map +1 -1
  61. package/dist/cjs/components/Table/TableRowLink.cjs +55 -0
  62. package/dist/cjs/components/Table/TableRowLink.cjs.map +1 -0
  63. package/dist/cjs/components/Tag/Tag.cjs +99 -0
  64. package/dist/cjs/components/Tag/Tag.cjs.map +1 -0
  65. package/dist/cjs/components/TextArea/TextArea.cjs +5 -4
  66. package/dist/cjs/components/TextArea/TextArea.cjs.map +1 -1
  67. package/dist/cjs/components/TextField/TextField.cjs +30 -15
  68. package/dist/cjs/components/TextField/TextField.cjs.map +1 -1
  69. package/dist/cjs/index.cjs +12 -0
  70. package/dist/cjs/index.cjs.map +1 -1
  71. package/dist/cjs/utils/floatingContentSurface.cjs +8 -0
  72. package/dist/cjs/utils/floatingContentSurface.cjs.map +1 -0
  73. package/dist/cjs/utils/inputFieldClasses.cjs +8 -0
  74. package/dist/cjs/utils/inputFieldClasses.cjs.map +1 -0
  75. package/dist/cjs/utils/pointerCapture.cjs +20 -0
  76. package/dist/cjs/utils/pointerCapture.cjs.map +1 -0
  77. package/dist/cjs/utils/useDragToDismiss.cjs +3 -2
  78. package/dist/cjs/utils/useDragToDismiss.cjs.map +1 -1
  79. package/dist/cjs/utils/useSuppressClickAfterDrag.cjs +2 -1
  80. package/dist/cjs/utils/useSuppressClickAfterDrag.cjs.map +1 -1
  81. package/dist/components/Autocomplete/Autocomplete.mjs +34 -10
  82. package/dist/components/Autocomplete/Autocomplete.mjs.map +1 -1
  83. package/dist/components/Autocomplete/AutocompleteOptionItem.mjs +13 -1
  84. package/dist/components/Autocomplete/AutocompleteOptionItem.mjs.map +1 -1
  85. package/dist/components/BottomNavigation/BottomNavigation.mjs +2 -2
  86. package/dist/components/BottomNavigation/BottomNavigation.mjs.map +1 -1
  87. package/dist/components/Card/Card.mjs +5 -2
  88. package/dist/components/Card/Card.mjs.map +1 -1
  89. package/dist/components/Chart/ChartCard.mjs +2 -1
  90. package/dist/components/Chart/ChartCard.mjs.map +1 -1
  91. package/dist/components/Chart/ChartLoadingOverlay.mjs +1 -1
  92. package/dist/components/Chart/ChartLoadingOverlay.mjs.map +1 -1
  93. package/dist/components/ChatInput/ChatInput.mjs +2 -2
  94. package/dist/components/ChatInput/ChatInput.mjs.map +1 -1
  95. package/dist/components/ChatMessage/ChatMessage.mjs +1 -1
  96. package/dist/components/ChatMessage/ChatMessage.mjs.map +1 -1
  97. package/dist/components/CreatorCard/CreatorCard.mjs +3 -5
  98. package/dist/components/CreatorCard/CreatorCard.mjs.map +1 -1
  99. package/dist/components/CreatorCover/CreatorCover.mjs +11 -7
  100. package/dist/components/CreatorCover/CreatorCover.mjs.map +1 -1
  101. package/dist/components/DatePicker/DatePicker.mjs +39 -18
  102. package/dist/components/DatePicker/DatePicker.mjs.map +1 -1
  103. package/dist/components/Drawer/Drawer.mjs +11 -3
  104. package/dist/components/Drawer/Drawer.mjs.map +1 -1
  105. package/dist/components/DropdownMenu/DropdownMenuItem.mjs +33 -10
  106. package/dist/components/DropdownMenu/DropdownMenuItem.mjs.map +1 -1
  107. package/dist/components/DropdownMenu/DropdownMenuReorderItem.mjs +2 -1
  108. package/dist/components/DropdownMenu/DropdownMenuReorderItem.mjs.map +1 -1
  109. package/dist/components/DropdownMenu/DropdownMenuRoot.mjs +18 -13
  110. package/dist/components/DropdownMenu/DropdownMenuRoot.mjs.map +1 -1
  111. package/dist/components/DropdownMenu/DropdownMenuSelectionItems.mjs +56 -40
  112. package/dist/components/DropdownMenu/DropdownMenuSelectionItems.mjs.map +1 -1
  113. package/dist/components/IconButton/IconButton.mjs +5 -2
  114. package/dist/components/IconButton/IconButton.mjs.map +1 -1
  115. package/dist/components/Icons/MenuRowIcon.mjs +9 -2
  116. package/dist/components/Icons/MenuRowIcon.mjs.map +1 -1
  117. package/dist/components/Icons/VerifiedIcon.mjs +9 -15
  118. package/dist/components/Icons/VerifiedIcon.mjs.map +1 -1
  119. package/dist/components/InlineEmptyState/InlineEmptyState.mjs +25 -0
  120. package/dist/components/InlineEmptyState/InlineEmptyState.mjs.map +1 -0
  121. package/dist/components/Link/Link.mjs +31 -8
  122. package/dist/components/Link/Link.mjs.map +1 -1
  123. package/dist/components/PhoneField/PhoneField.mjs +21 -17
  124. package/dist/components/PhoneField/PhoneField.mjs.map +1 -1
  125. package/dist/components/Popover/Popover.mjs +51 -0
  126. package/dist/components/Popover/Popover.mjs.map +1 -0
  127. package/dist/components/SegmentedControl/SegmentedControl.mjs +6 -10
  128. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  129. package/dist/components/SegmentedControl/segmentedControlClassNames.mjs +54 -0
  130. package/dist/components/SegmentedControl/segmentedControlClassNames.mjs.map +1 -0
  131. package/dist/components/Select/Select.mjs +40 -12
  132. package/dist/components/Select/Select.mjs.map +1 -1
  133. package/dist/components/Slider/SliderThumb.mjs +3 -2
  134. package/dist/components/Slider/SliderThumb.mjs.map +1 -1
  135. package/dist/components/Snackbar/Snackbar.mjs +1 -1
  136. package/dist/components/Snackbar/Snackbar.mjs.map +1 -1
  137. package/dist/components/Switch/Switch.mjs +1 -1
  138. package/dist/components/Switch/Switch.mjs.map +1 -1
  139. package/dist/components/Table/Table.mjs +77 -7
  140. package/dist/components/Table/Table.mjs.map +1 -1
  141. package/dist/components/Table/TableRowLink.mjs +38 -0
  142. package/dist/components/Table/TableRowLink.mjs.map +1 -0
  143. package/dist/components/Tag/Tag.mjs +82 -0
  144. package/dist/components/Tag/Tag.mjs.map +1 -0
  145. package/dist/components/TextArea/TextArea.mjs +5 -4
  146. package/dist/components/TextArea/TextArea.mjs.map +1 -1
  147. package/dist/components/TextField/TextField.mjs +30 -15
  148. package/dist/components/TextField/TextField.mjs.map +1 -1
  149. package/dist/date-picker.d.ts +9 -0
  150. package/dist/index.d.ts +339 -30
  151. package/dist/index.mjs +12 -0
  152. package/dist/index.mjs.map +1 -1
  153. package/dist/styles/base.css +8 -4
  154. package/dist/styles/theme.css +1217 -1
  155. package/dist/utils/floatingContentSurface.mjs +8 -0
  156. package/dist/utils/floatingContentSurface.mjs.map +1 -0
  157. package/dist/utils/inputFieldClasses.mjs +8 -0
  158. package/dist/utils/inputFieldClasses.mjs.map +1 -0
  159. package/dist/utils/pointerCapture.mjs +20 -0
  160. package/dist/utils/pointerCapture.mjs.map +1 -0
  161. package/dist/utils/useDragToDismiss.mjs +3 -2
  162. package/dist/utils/useDragToDismiss.mjs.map +1 -1
  163. package/dist/utils/useSuppressClickAfterDrag.mjs +2 -1
  164. package/dist/utils/useSuppressClickAfterDrag.mjs.map +1 -1
  165. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"VerifiedIcon.cjs","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":["React","jsx","BaseIcon"],"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,eAAeA,iBAAM;AAAA,EAChC,CAAC,EAAE,SAAS,MAAM,GAAG,MAAA,GAAS,QAC5BC,2BAAAA,IAACC,SAAAA,YAAS,KAAU,UAAU,UAAU,QAAiB,GAAG,MAAA,CAAO;AAEvE;AAEA,aAAa,cAAc;;"}
1
+ {"version":3,"file":"VerifiedIcon.cjs","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":["React","jsx","BaseIcon"],"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,eAAeA,iBAAM;AAAA,EAChC,CAAC,EAAE,SAAS,MAAM,GAAG,MAAA,GAAS,QAC5BC,2BAAAA,IAACC,SAAAA,YAAS,KAAU,UAAU,UAAU,QAAiB,GAAG,MAAA,CAAO;AAEvE;AAEA,aAAa,cAAc;;"}
@@ -0,0 +1,42 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const jsxRuntime = require("react/jsx-runtime");
5
+ const React = require("react");
6
+ const cn = require("../../utils/cn.cjs");
7
+ function _interopNamespaceDefault(e) {
8
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
9
+ if (e) {
10
+ for (const k in e) {
11
+ if (k !== "default") {
12
+ const d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: () => e[k]
16
+ });
17
+ }
18
+ }
19
+ }
20
+ n.default = e;
21
+ return Object.freeze(n);
22
+ }
23
+ const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
24
+ const InlineEmptyState = React__namespace.forwardRef(
25
+ ({ className, children, ...props }, ref) => {
26
+ return /* @__PURE__ */ jsxRuntime.jsx(
27
+ "p",
28
+ {
29
+ ref,
30
+ className: cn.cn(
31
+ "typography-body-small-14px-regular m-0 flex min-h-20 items-center justify-center px-4 text-center text-content-tertiary",
32
+ className
33
+ ),
34
+ ...props,
35
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 [overflow-wrap:anywhere]", children })
36
+ }
37
+ );
38
+ }
39
+ );
40
+ InlineEmptyState.displayName = "InlineEmptyState";
41
+ exports.InlineEmptyState = InlineEmptyState;
42
+ //# sourceMappingURL=InlineEmptyState.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InlineEmptyState.cjs","sources":["../../../../src/components/InlineEmptyState/InlineEmptyState.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface InlineEmptyStateProps\n extends Omit<React.HTMLAttributes<HTMLParagraphElement>, \"dangerouslySetInnerHTML\"> {\n /** The message. Keep it to one short sentence. */\n children?: React.ReactNode;\n}\n\n/**\n * An empty or coming-soon state as one quiet, centred line in an 80px block. Use it inside a\n * card, table or panel that has nothing to show yet. For a state with a title, artwork or\n * actions, use {@link EmptyState}.\n *\n * @example\n * ```tsx\n * <InlineEmptyState>No links in this campaign yet.</InlineEmptyState>\n * ```\n */\nexport const InlineEmptyState = React.forwardRef<HTMLParagraphElement, InlineEmptyStateProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <p\n ref={ref}\n className={cn(\n \"typography-body-small-14px-regular m-0 flex min-h-20 items-center justify-center px-4 text-center text-content-tertiary\",\n className,\n )}\n {...props}\n >\n <span className=\"min-w-0 [overflow-wrap:anywhere]\">{children}</span>\n </p>\n );\n },\n);\n\nInlineEmptyState.displayName = \"InlineEmptyState\";\n"],"names":["React","jsx","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAM,mBAAmBA,iBAAM;AAAA,EACpC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAA,GAAS,QAAQ;AAC1C,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAWC,GAAAA;AAAAA,UACT;AAAA,UACA;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,QAEJ,UAAAD,2BAAAA,IAAC,QAAA,EAAK,WAAU,oCAAoC,SAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAGnE;AACF;AAEA,iBAAiB,cAAc;;"}
@@ -30,9 +30,25 @@ const SIZE_CLASSES = {
30
30
  const VARIANT_CLASSES = {
31
31
  primary: "text-buttons-link-primary-default hover:text-buttons-link-primary-hover",
32
32
  brand: "text-buttons-link-brand-default hover:text-buttons-link-brand-hover",
33
- inherit: "text-inherit hover:opacity-80"
33
+ inherit: "text-inherit hover:opacity-80",
34
+ subtle: "text-content-secondary hover:text-content-primary"
34
35
  };
35
36
  const ICON_WRAPPER = "flex shrink-0 items-center justify-center [&>svg]:size-4";
37
+ const UNDERLINE_STYLE = "decoration-from-font decoration-solid [text-underline-position:from-font]";
38
+ function getUnderlineClassName(variant, asChild) {
39
+ if (variant !== "subtle") return cn.cn("underline", UNDERLINE_STYLE);
40
+ return cn.cn(
41
+ "no-underline underline-offset-4",
42
+ asChild ? "hover:underline" : "group-hover/link:underline",
43
+ UNDERLINE_STYLE
44
+ );
45
+ }
46
+ function getLayoutClassName(variant, size, hasIcon) {
47
+ const hoverGroup = variant === "subtle" && "group/link";
48
+ if (size === "inherit" && !hasIcon) return cn.cn("inline", hoverGroup);
49
+ if (variant !== "subtle") return "inline-flex items-center gap-2";
50
+ return cn.cn(hoverGroup, "inline-flex items-center gap-1", hasIcon && "min-h-8 px-1");
51
+ }
36
52
  const Link = React__namespace.forwardRef(
37
53
  ({
38
54
  className,
@@ -48,15 +64,22 @@ const Link = React__namespace.forwardRef(
48
64
  ...props
49
65
  }, ref) => {
50
66
  const Comp = asChild ? reactSlot.Slot : "a";
51
- const textClasses = cn.cn(
52
- SIZE_CLASSES[size],
53
- "underline decoration-from-font decoration-solid [text-underline-position:from-font]"
54
- );
67
+ const textClasses = cn.cn(SIZE_CLASSES[size], getUnderlineClassName(variant, asChild));
55
68
  const disabledProps = disabled ? { "aria-disabled": true, tabIndex: -1 } : {};
56
69
  const slotChild = disabled && React__namespace.isValidElement(children) && children.type === "a" ? React__namespace.cloneElement(children, { href: void 0 }) : children;
57
70
  const handleClick = disabled ? (event) => event.preventDefault() : onClick;
58
71
  const leftIconNode = leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: ICON_WRAPPER, "aria-hidden": "true", children: leftIcon });
59
- const rightIconNode = rightIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: ICON_WRAPPER, "aria-hidden": "true", children: rightIcon });
72
+ const rightIconNode = rightIcon && /* @__PURE__ */ jsxRuntime.jsx(
73
+ "span",
74
+ {
75
+ className: cn.cn(
76
+ ICON_WRAPPER,
77
+ variant === "subtle" && "motion-safe:transition-transform motion-safe:group-hover/link:translate-x-0.5"
78
+ ),
79
+ "aria-hidden": "true",
80
+ children: rightIcon
81
+ }
82
+ );
60
83
  return /* @__PURE__ */ jsxRuntime.jsxs(
61
84
  Comp,
62
85
  {
@@ -64,7 +87,7 @@ const Link = React__namespace.forwardRef(
64
87
  href: disabled ? void 0 : href,
65
88
  onClick: handleClick,
66
89
  className: cn.cn(
67
- size === "inherit" && !leftIcon && !rightIcon ? "inline" : "inline-flex items-center gap-2",
90
+ getLayoutClassName(variant, size, Boolean(leftIcon || rightIcon)),
68
91
  "rounded-2xs",
69
92
  variant === "inherit" ? "transition-opacity" : "transition-colors",
70
93
  "focus-visible:shadow-focus-ring focus-visible:outline-none",
@@ -1 +1 @@
1
- {"version":3,"file":"Link.cjs","sources":["../../../../src/components/Link/Link.tsx"],"sourcesContent":["import { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/**\n * Visual style variant of the link. `inherit` takes the colour of the\n * surrounding text, for links inside tooltips, alerts and other copy that sets\n * its own colour.\n */\nexport type LinkVariant = \"primary\" | \"brand\" | \"inherit\";\n\n/**\n * Text size of the link in pixels. `inherit` keeps the font size and weight of\n * the surrounding text, for a link that sits inside a sentence. Without icons it\n * renders inline, so a long link wraps with the sentence.\n */\nexport type LinkSize = \"16\" | \"14\" | \"inherit\";\n\nexport interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n /** Visual style variant of the link. @default \"primary\" */\n variant?: LinkVariant;\n /** Text size of the link in pixels. @default \"16\" */\n size?: LinkSize;\n /** When `true`, greys the link out and blocks interaction. @default false */\n disabled?: boolean;\n /** Icon element displayed before the label. */\n leftIcon?: React.ReactNode;\n /** Icon element displayed after the label. */\n rightIcon?: React.ReactNode;\n /** Merge props onto a child element instead of rendering an `<a>`. @default false */\n asChild?: boolean;\n}\n\nconst SIZE_CLASSES: Record<LinkSize, string> = {\n \"16\": \"typography-body-default-16px-semibold\",\n \"14\": \"typography-body-small-14px-semibold\",\n inherit: \"\",\n};\n\nconst VARIANT_CLASSES: Record<LinkVariant, string> = {\n primary: \"text-buttons-link-primary-default hover:text-buttons-link-primary-hover\",\n brand: \"text-buttons-link-brand-default hover:text-buttons-link-brand-hover\",\n inherit: \"text-inherit hover:opacity-80\",\n};\n\nconst ICON_WRAPPER = \"flex shrink-0 items-center justify-center [&>svg]:size-4\";\n\n/**\n * An inline text link for navigating to a related page or section without\n * using a button. Use `primary` for standard navigation and `brand` for the\n * Fanvue green accent on calls to action within content. Use `inherit` with\n * `size=\"inherit\"` for a link inside copy that sets its own colour and type,\n * such as a tooltip.\n *\n * Renders an underlined `<a>` by default. Pass `asChild` to compose with a\n * router link (e.g. Next.js `Link`). When rendering without a visible label,\n * provide an `aria-label`.\n *\n * @example\n * ```tsx\n * <Link href=\"/pricing\" variant=\"brand\">See our plans</Link>\n * ```\n */\nexport const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n (\n {\n className,\n variant = \"primary\",\n size = \"16\",\n disabled = false,\n leftIcon,\n rightIcon,\n asChild = false,\n children,\n href,\n onClick,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : \"a\";\n\n const textClasses = cn(\n SIZE_CLASSES[size],\n \"underline decoration-from-font decoration-solid [text-underline-position:from-font]\",\n );\n\n const disabledProps = disabled ? { \"aria-disabled\": true, tabIndex: -1 } : {};\n\n // Radix Slot lets the child's own props win when merging, so a disabled\n // `asChild` link would keep the child's navigable href. Strip it from the\n // child (anchors only) and block default navigation to honor `disabled`.\n const slotChild =\n disabled && React.isValidElement<{ href?: string }>(children) && children.type === \"a\"\n ? React.cloneElement(children, { href: undefined })\n : children;\n\n const handleClick = disabled\n ? (event: React.MouseEvent<HTMLAnchorElement>) => event.preventDefault()\n : onClick;\n\n const leftIconNode = leftIcon && (\n <span className={ICON_WRAPPER} aria-hidden=\"true\">\n {leftIcon}\n </span>\n );\n const rightIconNode = rightIcon && (\n <span className={ICON_WRAPPER} aria-hidden=\"true\">\n {rightIcon}\n </span>\n );\n\n return (\n <Comp\n ref={ref}\n href={disabled ? undefined : href}\n onClick={handleClick}\n className={cn(\n size === \"inherit\" && !leftIcon && !rightIcon\n ? \"inline\"\n : \"inline-flex items-center gap-2\",\n \"rounded-2xs\",\n variant === \"inherit\" ? \"transition-opacity\" : \"transition-colors\",\n \"focus-visible:shadow-focus-ring focus-visible:outline-none\",\n disabled\n ? \"pointer-events-none cursor-not-allowed text-content-disabled\"\n : VARIANT_CLASSES[variant],\n asChild && textClasses,\n className,\n )}\n {...(asChild ? {} : { \"data-testid\": \"link\" })}\n {...disabledProps}\n {...props}\n >\n {leftIconNode}\n {asChild ? (\n <Slottable>{slotChild}</Slottable>\n ) : (\n <span className={textClasses}>{children}</span>\n )}\n {rightIconNode}\n </Comp>\n );\n },\n);\n\nLink.displayName = \"Link\";\n"],"names":["React","Slot","cn","jsx","jsxs","Slottable"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAM,eAAyC;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AACX;AAEA,MAAM,kBAA+C;AAAA,EACnD,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AACX;AAEA,MAAM,eAAe;AAkBd,MAAM,OAAOA,iBAAM;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA,UAAU;AAAA,IACV,OAAO;AAAA,IACP,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,OAAO,UAAUC,UAAAA,OAAO;AAE9B,UAAM,cAAcC,GAAAA;AAAAA,MAClB,aAAa,IAAI;AAAA,MACjB;AAAA,IAAA;AAGF,UAAM,gBAAgB,WAAW,EAAE,iBAAiB,MAAM,UAAU,GAAA,IAAO,CAAA;AAK3E,UAAM,YACJ,YAAYF,iBAAM,eAAkC,QAAQ,KAAK,SAAS,SAAS,MAC/EA,iBAAM,aAAa,UAAU,EAAE,MAAM,OAAA,CAAW,IAChD;AAEN,UAAM,cAAc,WAChB,CAAC,UAA+C,MAAM,mBACtD;AAEJ,UAAM,eAAe,YACnBG,2BAAAA,IAAC,QAAA,EAAK,WAAW,cAAc,eAAY,QACxC,UAAA,SAAA,CACH;AAEF,UAAM,gBAAgB,aACpBA,2BAAAA,IAAC,QAAA,EAAK,WAAW,cAAc,eAAY,QACxC,UAAA,UAAA,CACH;AAGF,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,MAAM,WAAW,SAAY;AAAA,QAC7B,SAAS;AAAA,QACT,WAAWF,GAAAA;AAAAA,UACT,SAAS,aAAa,CAAC,YAAY,CAAC,YAChC,WACA;AAAA,UACJ;AAAA,UACA,YAAY,YAAY,uBAAuB;AAAA,UAC/C;AAAA,UACA,WACI,iEACA,gBAAgB,OAAO;AAAA,UAC3B,WAAW;AAAA,UACX;AAAA,QAAA;AAAA,QAED,GAAI,UAAU,CAAA,IAAK,EAAE,eAAe,OAAA;AAAA,QACpC,GAAG;AAAA,QACH,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA;AAAA,UACA,yCACEG,UAAAA,WAAA,EAAW,UAAA,UAAA,CAAU,IAEtBF,2BAAAA,IAAC,QAAA,EAAK,WAAW,aAAc,SAAA,CAAS;AAAA,UAEzC;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,KAAK,cAAc;;"}
1
+ {"version":3,"file":"Link.cjs","sources":["../../../../src/components/Link/Link.tsx"],"sourcesContent":["import { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/**\n * Visual style variant of the link. `inherit` takes the colour of the\n * surrounding text, for links inside tooltips, alerts and other copy that sets\n * its own colour. `subtle` is a quiet \"go there\" link for card headers, footers\n * and toolbars: secondary text that turns primary and underlines on hover. With\n * an icon it is at least 32px tall, so it sits level with a 32px control, and a\n * `rightIcon` moves 2px towards the destination on hover unless the user asks\n * for reduced motion.\n */\nexport type LinkVariant = \"primary\" | \"brand\" | \"inherit\" | \"subtle\";\n\n/**\n * Text size of the link in pixels. `inherit` keeps the font size and weight of\n * the surrounding text, for a link that sits inside a sentence. Without icons it\n * renders inline, so a long link wraps with the sentence.\n */\nexport type LinkSize = \"16\" | \"14\" | \"inherit\";\n\nexport interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n /** Visual style variant of the link. @default \"primary\" */\n variant?: LinkVariant;\n /** Text size of the link in pixels. @default \"16\" */\n size?: LinkSize;\n /** When `true`, greys the link out and blocks interaction. @default false */\n disabled?: boolean;\n /** Icon element displayed before the label. */\n leftIcon?: React.ReactNode;\n /** Icon element displayed after the label. */\n rightIcon?: React.ReactNode;\n /** Merge props onto a child element instead of rendering an `<a>`. @default false */\n asChild?: boolean;\n}\n\nconst SIZE_CLASSES: Record<LinkSize, string> = {\n \"16\": \"typography-body-default-16px-semibold\",\n \"14\": \"typography-body-small-14px-semibold\",\n inherit: \"\",\n};\n\nconst VARIANT_CLASSES: Record<LinkVariant, string> = {\n primary: \"text-buttons-link-primary-default hover:text-buttons-link-primary-hover\",\n brand: \"text-buttons-link-brand-default hover:text-buttons-link-brand-hover\",\n inherit: \"text-inherit hover:opacity-80\",\n subtle: \"text-content-secondary hover:text-content-primary\",\n};\n\nconst ICON_WRAPPER = \"flex shrink-0 items-center justify-center [&>svg]:size-4\";\n\nconst UNDERLINE_STYLE = \"decoration-from-font decoration-solid [text-underline-position:from-font]\";\n\n/**\n * Underline classes for the label. Every variant is underlined at rest except\n * `subtle`, which underlines on hover only. The label is the root itself under\n * `asChild` and a child `<span>` otherwise, so the hover is read from the root\n * in both cases.\n */\nfunction getUnderlineClassName(variant: LinkVariant, asChild: boolean) {\n if (variant !== \"subtle\") return cn(\"underline\", UNDERLINE_STYLE);\n return cn(\n \"no-underline underline-offset-4\",\n asChild ? \"hover:underline\" : \"group-hover/link:underline\",\n UNDERLINE_STYLE,\n );\n}\n\n/**\n * Layout classes for the root: inline for a link inside a sentence, and a flex\n * row otherwise. `subtle` tightens the gap, and with an icon takes the minimum\n * height and side padding of a 32px control, growing if its label wraps. A `subtle` root is always the hover\n * group its label and icon read from, in both layouts.\n */\nfunction getLayoutClassName(variant: LinkVariant, size: LinkSize, hasIcon: boolean) {\n const hoverGroup = variant === \"subtle\" && \"group/link\";\n if (size === \"inherit\" && !hasIcon) return cn(\"inline\", hoverGroup);\n if (variant !== \"subtle\") return \"inline-flex items-center gap-2\";\n return cn(hoverGroup, \"inline-flex items-center gap-1\", hasIcon && \"min-h-8 px-1\");\n}\n\n/**\n * An inline text link for navigating to a related page or section without\n * using a button. Use `primary` for standard navigation and `brand` for the\n * Fanvue green accent on calls to action within content. Use `inherit` with\n * `size=\"inherit\"` for a link inside copy that sets its own colour and type,\n * such as a tooltip. Use `subtle` for a quiet link beside controls, such as\n * \"Open full page\" in a panel footer.\n *\n * Renders an underlined `<a>` by default. Pass `asChild` to compose with a\n * router link (e.g. Next.js `Link`). When rendering without a visible label,\n * provide an `aria-label`.\n *\n * @example\n * ```tsx\n * <Link href=\"/pricing\" variant=\"brand\">See our plans</Link>\n * ```\n *\n * @example A quiet link with an arrow, level with a 32px control\n * ```tsx\n * <Link href=\"/campaigns/1\" variant=\"subtle\" size=\"14\" rightIcon={<ArrowRightIcon />}>\n * Open full page\n * </Link>\n * ```\n */\nexport const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n (\n {\n className,\n variant = \"primary\",\n size = \"16\",\n disabled = false,\n leftIcon,\n rightIcon,\n asChild = false,\n children,\n href,\n onClick,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : \"a\";\n\n const textClasses = cn(SIZE_CLASSES[size], getUnderlineClassName(variant, asChild));\n\n const disabledProps = disabled ? { \"aria-disabled\": true, tabIndex: -1 } : {};\n\n // Radix Slot lets the child's own props win when merging, so a disabled\n // `asChild` link would keep the child's navigable href. Strip it from the\n // child (anchors only) and block default navigation to honor `disabled`.\n const slotChild =\n disabled && React.isValidElement<{ href?: string }>(children) && children.type === \"a\"\n ? React.cloneElement(children, { href: undefined })\n : children;\n\n const handleClick = disabled\n ? (event: React.MouseEvent<HTMLAnchorElement>) => event.preventDefault()\n : onClick;\n\n const leftIconNode = leftIcon && (\n <span className={ICON_WRAPPER} aria-hidden=\"true\">\n {leftIcon}\n </span>\n );\n const rightIconNode = rightIcon && (\n <span\n className={cn(\n ICON_WRAPPER,\n variant === \"subtle\" &&\n \"motion-safe:transition-transform motion-safe:group-hover/link:translate-x-0.5\",\n )}\n aria-hidden=\"true\"\n >\n {rightIcon}\n </span>\n );\n\n return (\n <Comp\n ref={ref}\n href={disabled ? undefined : href}\n onClick={handleClick}\n className={cn(\n getLayoutClassName(variant, size, Boolean(leftIcon || rightIcon)),\n \"rounded-2xs\",\n variant === \"inherit\" ? \"transition-opacity\" : \"transition-colors\",\n \"focus-visible:shadow-focus-ring focus-visible:outline-none\",\n disabled\n ? \"pointer-events-none cursor-not-allowed text-content-disabled\"\n : VARIANT_CLASSES[variant],\n asChild && textClasses,\n className,\n )}\n {...(asChild ? {} : { \"data-testid\": \"link\" })}\n {...disabledProps}\n {...props}\n >\n {leftIconNode}\n {asChild ? (\n <Slottable>{slotChild}</Slottable>\n ) : (\n <span className={textClasses}>{children}</span>\n )}\n {rightIconNode}\n </Comp>\n );\n },\n);\n\nLink.displayName = \"Link\";\n"],"names":["cn","React","Slot","jsx","jsxs","Slottable"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,eAAyC;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AACX;AAEA,MAAM,kBAA+C;AAAA,EACnD,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AACV;AAEA,MAAM,eAAe;AAErB,MAAM,kBAAkB;AAQxB,SAAS,sBAAsB,SAAsB,SAAkB;AACrE,MAAI,YAAY,SAAU,QAAOA,GAAAA,GAAG,aAAa,eAAe;AAChE,SAAOA,GAAAA;AAAAA,IACL;AAAA,IACA,UAAU,oBAAoB;AAAA,IAC9B;AAAA,EAAA;AAEJ;AAQA,SAAS,mBAAmB,SAAsB,MAAgB,SAAkB;AAClF,QAAM,aAAa,YAAY,YAAY;AAC3C,MAAI,SAAS,aAAa,CAAC,QAAS,QAAOA,GAAAA,GAAG,UAAU,UAAU;AAClE,MAAI,YAAY,SAAU,QAAO;AACjC,SAAOA,GAAAA,GAAG,YAAY,kCAAkC,WAAW,cAAc;AACnF;AA0BO,MAAM,OAAOC,iBAAM;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA,UAAU;AAAA,IACV,OAAO;AAAA,IACP,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,OAAO,UAAUC,UAAAA,OAAO;AAE9B,UAAM,cAAcF,GAAAA,GAAG,aAAa,IAAI,GAAG,sBAAsB,SAAS,OAAO,CAAC;AAElF,UAAM,gBAAgB,WAAW,EAAE,iBAAiB,MAAM,UAAU,GAAA,IAAO,CAAA;AAK3E,UAAM,YACJ,YAAYC,iBAAM,eAAkC,QAAQ,KAAK,SAAS,SAAS,MAC/EA,iBAAM,aAAa,UAAU,EAAE,MAAM,OAAA,CAAW,IAChD;AAEN,UAAM,cAAc,WAChB,CAAC,UAA+C,MAAM,mBACtD;AAEJ,UAAM,eAAe,YACnBE,2BAAAA,IAAC,QAAA,EAAK,WAAW,cAAc,eAAY,QACxC,UAAA,SAAA,CACH;AAEF,UAAM,gBAAgB,aACpBA,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWH,GAAAA;AAAAA,UACT;AAAA,UACA,YAAY,YACV;AAAA,QAAA;AAAA,QAEJ,eAAY;AAAA,QAEX,UAAA;AAAA,MAAA;AAAA,IAAA;AAIL,WACEI,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,MAAM,WAAW,SAAY;AAAA,QAC7B,SAAS;AAAA,QACT,WAAWJ,GAAAA;AAAAA,UACT,mBAAmB,SAAS,MAAM,QAAQ,YAAY,SAAS,CAAC;AAAA,UAChE;AAAA,UACA,YAAY,YAAY,uBAAuB;AAAA,UAC/C;AAAA,UACA,WACI,iEACA,gBAAgB,OAAO;AAAA,UAC3B,WAAW;AAAA,UACX;AAAA,QAAA;AAAA,QAED,GAAI,UAAU,CAAA,IAAK,EAAE,eAAe,OAAA;AAAA,QACpC,GAAG;AAAA,QACH,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA;AAAA,UACA,yCACEK,UAAAA,WAAA,EAAW,UAAA,UAAA,CAAU,IAEtBF,2BAAAA,IAAC,QAAA,EAAK,WAAW,aAAc,SAAA,CAAS;AAAA,UAEzC;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA,KAAK,cAAc;;"}
@@ -4,6 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
5
  const React = require("react");
6
6
  const cn = require("../../utils/cn.cjs");
7
+ const inputFieldClasses = require("../../utils/inputFieldClasses.cjs");
7
8
  const ChevronDownIcon = require("../Icons/ChevronDownIcon.cjs");
8
9
  function _interopNamespaceDefault(e) {
9
10
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -47,9 +48,16 @@ function getContainerClassName(size, error, disabled) {
47
48
  "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",
48
49
  CONTAINER_PADDING_X[size],
49
50
  CONTAINER_HEIGHT[size],
50
- error ? "border-error-content" : "border-border-primary",
51
- !disabled && !error && "hover:border-neutral-alphas-400",
52
- disabled && "opacity-50"
51
+ error ? "border-error-content" : ["border-border-input", inputFieldClasses.INPUT_FIELD_V2_FOCUS_CLASSES],
52
+ !disabled && !error && "hover:border-border-input-hover",
53
+ disabled && inputFieldClasses.INPUT_FIELD_DISABLED_CLASSES
54
+ );
55
+ }
56
+ function getDialCodeClassName(size, disabled) {
57
+ return cn.cn(
58
+ "shrink-0 select-none whitespace-nowrap text-content-primary",
59
+ PREFIX_TYPOGRAPHY[size],
60
+ disabled && "theme-v2:text-content-disabled"
53
61
  );
54
62
  }
55
63
  function warnMissingAccessibleName(label, ariaLabel, ariaLabelledBy) {
@@ -149,24 +157,20 @@ const PhoneField = React__namespace.forwardRef(
149
157
  onClick: onCountrySelect,
150
158
  disabled,
151
159
  "aria-label": countryButtonLabel,
152
- className: "flex shrink-0 items-center gap-1 rounded-2xs focus-visible:shadow-focus-ring focus-visible:outline-none disabled:cursor-not-allowed",
160
+ className: "group flex shrink-0 items-center gap-1 rounded-2xs focus-visible:shadow-focus-ring focus-visible:outline-none disabled:cursor-not-allowed",
153
161
  children: [
154
162
  flag != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full", children: flag }),
155
- /* @__PURE__ */ jsxRuntime.jsx(ChevronDownIcon.ChevronDownIcon, { size: 16, className: "shrink-0 text-content-secondary" })
163
+ /* @__PURE__ */ jsxRuntime.jsx(
164
+ ChevronDownIcon.ChevronDownIcon,
165
+ {
166
+ size: 16,
167
+ className: "shrink-0 text-content-secondary theme-v2:group-disabled:text-icons-disabled"
168
+ }
169
+ )
156
170
  ]
157
171
  }
158
172
  ),
159
- dialCode != null && /* @__PURE__ */ jsxRuntime.jsx(
160
- "span",
161
- {
162
- id: dialCodeId,
163
- className: cn.cn(
164
- "shrink-0 select-none whitespace-nowrap text-content-primary",
165
- PREFIX_TYPOGRAPHY[size]
166
- ),
167
- children: dialCode
168
- }
169
- ),
173
+ dialCode != null && /* @__PURE__ */ jsxRuntime.jsx("span", { id: dialCodeId, className: getDialCodeClassName(size, disabled), children: dialCode }),
170
174
  /* @__PURE__ */ jsxRuntime.jsx(
171
175
  "input",
172
176
  {
@@ -178,7 +182,7 @@ const PhoneField = React__namespace.forwardRef(
178
182
  "aria-describedby": describedBy,
179
183
  "aria-invalid": error || void 0,
180
184
  className: cn.cn(
181
- "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",
185
+ "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",
182
186
  INPUT_TYPOGRAPHY[size]
183
187
  ),
184
188
  ...props
@@ -1 +1 @@
1
- {"version":3,"file":"PhoneField.cjs","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":["cn","jsx","React","jsxs","ChevronDownIcon"],"mappings":"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"}
1
+ {"version":3,"file":"PhoneField.cjs","sources":["../../../../src/components/PhoneField/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":["cn","INPUT_FIELD_V2_FOCUS_CLASSES","INPUT_FIELD_DISABLED_CLASSES","jsx","React","jsxs","ChevronDownIcon"],"mappings":"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"}
@@ -0,0 +1,69 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const jsxRuntime = require("react/jsx-runtime");
5
+ const PopoverPrimitive = require("@radix-ui/react-popover");
6
+ const React = require("react");
7
+ const cn = require("../../utils/cn.cjs");
8
+ const floatingContentCollisionPadding = require("../../utils/floatingContentCollisionPadding.cjs");
9
+ const floatingContentSurface = require("../../utils/floatingContentSurface.cjs");
10
+ const useSuppressClickAfterDrag = require("../../utils/useSuppressClickAfterDrag.cjs");
11
+ function _interopNamespaceDefault(e) {
12
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
13
+ if (e) {
14
+ for (const k in e) {
15
+ if (k !== "default") {
16
+ const d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: () => e[k]
20
+ });
21
+ }
22
+ }
23
+ }
24
+ n.default = e;
25
+ return Object.freeze(n);
26
+ }
27
+ const PopoverPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(PopoverPrimitive);
28
+ const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
29
+ const Popover = PopoverPrimitive__namespace.Root;
30
+ const PopoverTrigger = React__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { ref, ...useSuppressClickAfterDrag.useSuppressClickAfterDrag(props) }));
31
+ PopoverTrigger.displayName = "PopoverTrigger";
32
+ const PopoverAnchor = PopoverPrimitive__namespace.Anchor;
33
+ const PopoverClose = PopoverPrimitive__namespace.Close;
34
+ const PopoverContent = React__namespace.forwardRef(
35
+ ({
36
+ align = "start",
37
+ sideOffset = 8,
38
+ collisionPadding = floatingContentCollisionPadding.FLOATING_CONTENT_COLLISION_PADDING,
39
+ className,
40
+ style,
41
+ ...props
42
+ }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
43
+ PopoverPrimitive__namespace.Content,
44
+ {
45
+ ref,
46
+ align,
47
+ sideOffset,
48
+ collisionPadding,
49
+ className: cn.cn(
50
+ floatingContentSurface.FLOATING_CONTENT_SURFACE_CLASS,
51
+ "w-max max-w-(--radix-popover-content-available-width) overflow-y-auto p-2 outline-hidden focus-visible:shadow-focus-ring",
52
+ className
53
+ ),
54
+ style: {
55
+ zIndex: floatingContentSurface.FLOATING_CONTENT_Z_INDEX,
56
+ maxHeight: "var(--radix-popover-content-available-height)",
57
+ ...style
58
+ },
59
+ ...props
60
+ }
61
+ ) })
62
+ );
63
+ PopoverContent.displayName = "PopoverContent";
64
+ exports.Popover = Popover;
65
+ exports.PopoverAnchor = PopoverAnchor;
66
+ exports.PopoverClose = PopoverClose;
67
+ exports.PopoverContent = PopoverContent;
68
+ exports.PopoverTrigger = PopoverTrigger;
69
+ //# sourceMappingURL=Popover.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Popover.cjs","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":["PopoverPrimitive","React","jsx","useSuppressClickAfterDrag","FLOATING_CONTENT_COLLISION_PADDING","cn","FLOATING_CONTENT_SURFACE_CLASS","FLOATING_CONTENT_Z_INDEX"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEO,MAAM,UAAUA,4BAAiB;AAQjC,MAAM,iBAAiBC,iBAAM,WAGlC,CAAC,OAAO,QAAQC,2BAAAA,IAACF,4BAAiB,SAAjB,EAAyB,KAAW,GAAGG,0BAAAA,0BAA0B,KAAK,GAAG,CAAE;AAE9F,eAAe,cAAc;AAGtB,MAAM,gBAAgBH,4BAAiB;AAGvC,MAAM,eAAeA,4BAAiB;AAatC,MAAM,iBAAiBC,iBAAM;AAAA,EAIlC,CACE;AAAA,IACE,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,mBAAmBG,gCAAAA;AAAAA,IACnB;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QAEAF,2BAAAA,IAACF,4BAAiB,QAAjB,EACC,UAAAE,2BAAAA;AAAAA,IAACF,4BAAiB;AAAA,IAAjB;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAWK,GAAAA;AAAAA,QACTC,uBAAAA;AAAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAEF,OAAO;AAAA,QACL,QAAQC,uBAAAA;AAAAA,QACR,WAAW;AAAA,QACX,GAAG;AAAA,MAAA;AAAA,MAEJ,GAAG;AAAA,IAAA;AAAA,EAAA,EACN,CACF;AAEJ;AAEA,eAAe,cAAc;;;;;;"}
@@ -4,6 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
5
  const React = require("react");
6
6
  const cn = require("../../utils/cn.cjs");
7
+ const segmentedControlClassNames = require("./segmentedControlClassNames.cjs");
7
8
  function _interopNamespaceDefault(e) {
8
9
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
9
10
  if (e) {
@@ -48,7 +49,7 @@ function warnMissingOptionAccessibleName(options) {
48
49
  }
49
50
  function warnUnsupportedCollapsible(appearance, options, hasCollapsedIcon) {
50
51
  if (process.env.NODE_ENV !== "production") {
51
- if (appearance === "pill") {
52
+ if (appearance === "pill" || appearance === "squared") {
52
53
  console.warn(
53
54
  'SegmentedControl: `collapsible` is only supported for the "plain" and "brand" appearances; ignoring it.'
54
55
  );
@@ -67,6 +68,9 @@ function getSegmentClassName({
67
68
  isAiSegment,
68
69
  disabled
69
70
  }) {
71
+ if (appearance === "squared") {
72
+ return segmentedControlClassNames.getSquaredSegmentClassName({ size, variant, isSelected, disabled });
73
+ }
70
74
  return cn.cn(
71
75
  "relative inline-flex min-w-0 cursor-pointer items-center justify-center rounded-full",
72
76
  "motion-safe:transition-colors motion-safe:duration-150 motion-safe:ease-in-out",
@@ -273,15 +277,7 @@ const SegmentedControl = React__namespace.forwardRef(
273
277
  ref: setRootRef,
274
278
  role: isCollapsed ? "group" : "radiogroup",
275
279
  className: cn.cn(
276
- "relative items-center rounded-full",
277
- variant === "fill" ? "flex w-full" : "inline-flex",
278
- isCollapsed ? (
279
- // Collapsed, the toggle itself carries the surface, so the container drops its own
280
- // chrome and centres the button instead of pinning it to the start of a full-width
281
- // row — in a narrow rail that offset is the whole width of the column.
282
- "justify-center"
283
- ) : appearance === "plain" ? "gap-2" : "bg-surface-tertiary p-1",
284
- disabled && "cursor-not-allowed opacity-50",
280
+ segmentedControlClassNames.getRootClassName({ appearance, variant, size, isCollapsed, disabled }),
285
281
  className
286
282
  ),
287
283
  ...props,