@acronis-platform/ui-react 0.61.0 → 1.0.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 (204) hide show
  1. package/dist/components/ui/alert/alert.js +115 -57
  2. package/dist/components/ui/alert/alert.js.map +1 -1
  3. package/dist/components/ui/button-group/button-group.js +57 -0
  4. package/dist/components/ui/button-group/button-group.js.map +1 -0
  5. package/dist/components/ui/button-icon-menu/button-icon-menu.js +26 -0
  6. package/dist/components/ui/button-icon-menu/button-icon-menu.js.map +1 -0
  7. package/dist/components/ui/calendar-panel/calendar-panel-utils.js +63 -0
  8. package/dist/components/ui/calendar-panel/calendar-panel-utils.js.map +1 -0
  9. package/dist/components/ui/calendar-panel/calendar-panel.js +260 -0
  10. package/dist/components/ui/calendar-panel/calendar-panel.js.map +1 -0
  11. package/dist/components/ui/chip/chip.js +33 -33
  12. package/dist/components/ui/chip/chip.js.map +1 -1
  13. package/dist/components/ui/date-range-picker/date-range-picker-utils.js +11 -23
  14. package/dist/components/ui/date-range-picker/date-range-picker-utils.js.map +1 -1
  15. package/dist/components/ui/date-range-picker/date-range-picker.js +94 -134
  16. package/dist/components/ui/date-range-picker/date-range-picker.js.map +1 -1
  17. package/dist/components/ui/dropdown-menu/dropdown-menu.js +129 -72
  18. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  19. package/dist/components/ui/filter-cards/filter-cards.js +25 -0
  20. package/dist/components/ui/filter-cards/filter-cards.js.map +1 -0
  21. package/dist/components/ui/filter-chips/filter-chips.js +44 -0
  22. package/dist/components/ui/filter-chips/filter-chips.js.map +1 -0
  23. package/dist/components/ui/filter-search/filter-search.js +184 -138
  24. package/dist/components/ui/filter-search/filter-search.js.map +1 -1
  25. package/dist/components/ui/fitted-actions/fitted-actions.js +139 -0
  26. package/dist/components/ui/fitted-actions/fitted-actions.js.map +1 -0
  27. package/dist/components/ui/input-date-picker/input-date-picker.js +103 -93
  28. package/dist/components/ui/input-date-picker/input-date-picker.js.map +1 -1
  29. package/dist/components/ui/input-password/input-password.js +76 -66
  30. package/dist/components/ui/input-password/input-password.js.map +1 -1
  31. package/dist/components/ui/input-search/input-search.js +9 -9
  32. package/dist/components/ui/input-search/input-search.js.map +1 -1
  33. package/dist/components/ui/input-select/input-select.js +8 -8
  34. package/dist/components/ui/input-select/input-select.js.map +1 -1
  35. package/dist/components/ui/input-text/input-text.js +77 -66
  36. package/dist/components/ui/input-text/input-text.js.map +1 -1
  37. package/dist/components/ui/input-text-area/input-text-area.js +76 -66
  38. package/dist/components/ui/input-text-area/input-text-area.js.map +1 -1
  39. package/dist/components/ui/link/link.js +50 -35
  40. package/dist/components/ui/link/link.js.map +1 -1
  41. package/dist/components/ui/number-field/number-field.js +1 -1
  42. package/dist/components/ui/number-field/number-field.js.map +1 -1
  43. package/dist/components/ui/popover/popover.js +75 -56
  44. package/dist/components/ui/popover/popover.js.map +1 -1
  45. package/dist/components/ui/resizable/resizable.js +23 -11
  46. package/dist/components/ui/resizable/resizable.js.map +1 -1
  47. package/dist/components/ui/scroll-area/scroll-area.js +46 -30
  48. package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
  49. package/dist/components/ui/sidebar-secondary/sidebar-secondary.js.map +1 -1
  50. package/dist/components/ui/timer/timer.js +47 -0
  51. package/dist/components/ui/timer/timer.js.map +1 -0
  52. package/dist/components/ui/toast/toast.js +168 -61
  53. package/dist/components/ui/toast/toast.js.map +1 -1
  54. package/dist/components/ui/truncate-text/middle-truncate.js +20 -0
  55. package/dist/components/ui/truncate-text/middle-truncate.js.map +1 -0
  56. package/dist/components/ui/truncate-text/text-width.js +12 -0
  57. package/dist/components/ui/truncate-text/text-width.js.map +1 -0
  58. package/dist/components/ui/truncate-text/truncate-text.js +152 -0
  59. package/dist/components/ui/truncate-text/truncate-text.js.map +1 -0
  60. package/dist/index.js +507 -469
  61. package/dist/index.js.map +1 -1
  62. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/addDays.js +5 -5
  63. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/addDays.js.map +1 -1
  64. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/constants.js +3 -6
  65. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/constants.js.map +1 -1
  66. package/dist/node_modules/.pnpm/react-day-picker@10.0.1_@types_react@19.2.15_react@19.2.6/node_modules/react-day-picker/dist/esm/useDayPicker.js +3 -3
  67. package/dist/react.js +507 -469
  68. package/dist/react.js.map +1 -1
  69. package/dist/src/components/ui/alert/alert.d.ts +34 -3
  70. package/dist/src/components/ui/alert/index.d.ts +2 -2
  71. package/dist/src/components/ui/button/button.d.ts +1 -1
  72. package/dist/src/components/ui/button-group/button-group.d.ts +38 -0
  73. package/dist/src/components/ui/button-group/index.d.ts +1 -0
  74. package/dist/src/components/ui/button-icon/button-icon.d.ts +1 -1
  75. package/dist/src/components/ui/button-icon-menu/button-icon-menu.d.ts +28 -0
  76. package/dist/src/components/ui/button-icon-menu/index.d.ts +1 -0
  77. package/dist/src/components/ui/button-menu/button-menu.d.ts +1 -1
  78. package/dist/src/components/ui/calendar-panel/__tests__/calendar-panel-utils.test.d.ts +1 -0
  79. package/dist/src/components/ui/calendar-panel/calendar-panel-utils.d.ts +55 -0
  80. package/dist/src/components/ui/calendar-panel/calendar-panel.d.ts +112 -0
  81. package/dist/src/components/ui/calendar-panel/index.d.ts +1 -0
  82. package/dist/src/components/ui/chip/chip.d.ts +1 -1
  83. package/dist/src/components/ui/date-range-picker/date-range-picker-utils.d.ts +10 -16
  84. package/dist/src/components/ui/date-range-picker/date-range-picker.d.ts +46 -2
  85. package/dist/src/components/ui/dropdown-menu/dropdown-menu.d.ts +8 -1
  86. package/dist/src/components/ui/dropdown-menu/index.d.ts +1 -1
  87. package/dist/src/components/ui/filter-cards/filter-cards.d.ts +11 -0
  88. package/dist/src/components/ui/filter-cards/index.d.ts +1 -0
  89. package/dist/src/components/ui/filter-chips/filter-chips.d.ts +25 -0
  90. package/dist/src/components/ui/filter-chips/index.d.ts +1 -0
  91. package/dist/src/components/ui/filter-search/filter-search.d.ts +39 -1
  92. package/dist/src/components/ui/fitted-actions/fitted-actions.d.ts +50 -0
  93. package/dist/src/components/ui/fitted-actions/fitted-actions.docs.d.ts +45 -0
  94. package/dist/src/components/ui/fitted-actions/index.d.ts +1 -0
  95. package/dist/src/components/ui/link/index.d.ts +1 -1
  96. package/dist/src/components/ui/link/link.d.ts +22 -4
  97. package/dist/src/components/ui/metric/metric.d.ts +1 -1
  98. package/dist/src/components/ui/popover/popover.d.ts +30 -1
  99. package/dist/src/components/ui/popover/popover.docs.d.ts +27 -2
  100. package/dist/src/components/ui/scroll-area/scroll-area.d.ts +24 -0
  101. package/dist/src/components/ui/tag/tag.d.ts +1 -1
  102. package/dist/src/components/ui/timer/index.d.ts +1 -0
  103. package/dist/src/components/ui/timer/timer.d.ts +28 -0
  104. package/dist/src/components/ui/toast/index.d.ts +1 -1
  105. package/dist/src/components/ui/toast/toast.d.ts +51 -18
  106. package/dist/src/components/ui/toast/toast.docs.d.ts +4 -0
  107. package/dist/src/components/ui/trend-indicator/trend-indicator.d.ts +1 -1
  108. package/dist/src/components/ui/truncate-text/__tests__/middle-truncate.test.d.ts +1 -0
  109. package/dist/src/components/ui/truncate-text/index.d.ts +3 -0
  110. package/dist/src/components/ui/truncate-text/middle-truncate.d.ts +13 -0
  111. package/dist/src/components/ui/truncate-text/text-width.d.ts +11 -0
  112. package/dist/src/components/ui/truncate-text/truncate-text.d.ts +45 -0
  113. package/dist/src/components/ui/truncate-text/truncate-text.docs.d.ts +35 -0
  114. package/dist/src/index.d.ts +8 -0
  115. package/dist/ui-react.css +1 -1
  116. package/package.json +4 -4
  117. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getDefaultOptions.js +0 -8
  118. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getDefaultOptions.js.map +0 -1
  119. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getISODay.js +0 -9
  120. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getISODay.js.map +0 -1
  121. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Parser.js +0 -23
  122. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Parser.js.map +0 -1
  123. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Setter.js +0 -42
  124. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Setter.js.map +0 -1
  125. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/constants.js +0 -50
  126. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/constants.js.map +0 -1
  127. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +0 -50
  128. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +0 -1
  129. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +0 -50
  130. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +0 -1
  131. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DateParser.js +0 -62
  132. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +0 -1
  133. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +0 -52
  134. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +0 -1
  135. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayParser.js +0 -50
  136. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +0 -1
  137. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +0 -50
  138. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +0 -1
  139. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/EraParser.js +0 -34
  140. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +0 -1
  141. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +0 -22
  142. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +0 -1
  143. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +0 -23
  144. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +0 -1
  145. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +0 -33
  146. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +0 -1
  147. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +0 -33
  148. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +0 -1
  149. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +0 -34
  150. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +0 -1
  151. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +0 -34
  152. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +0 -1
  153. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +0 -106
  154. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +0 -1
  155. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +0 -49
  156. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +0 -1
  157. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -49
  158. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +0 -1
  159. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +0 -50
  160. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +0 -1
  161. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +0 -41
  162. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +0 -1
  163. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +0 -81
  164. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +0 -1
  165. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +0 -49
  166. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +0 -1
  167. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +0 -70
  168. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +0 -1
  169. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +0 -33
  170. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +0 -1
  171. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +0 -78
  172. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +0 -1
  173. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +0 -76
  174. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +0 -1
  175. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +0 -33
  176. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +0 -1
  177. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -81
  178. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +0 -1
  179. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +0 -78
  180. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +0 -1
  181. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +0 -76
  182. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +0 -1
  183. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -23
  184. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +0 -1
  185. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +0 -23
  186. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +0 -1
  187. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/YearParser.js +0 -50
  188. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +0 -1
  189. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers.js +0 -68
  190. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers.js.map +0 -1
  191. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/utils.js +0 -104
  192. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/utils.js.map +0 -1
  193. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse.js +0 -86
  194. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse.js.map +0 -1
  195. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setDay.js +0 -12
  196. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setDay.js.map +0 -1
  197. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISODay.js +0 -11
  198. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISODay.js.map +0 -1
  199. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISOWeek.js +0 -10
  200. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISOWeek.js.map +0 -1
  201. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setWeek.js +0 -10
  202. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setWeek.js.map +0 -1
  203. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/transpose.js +0 -18
  204. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/transpose.js.map +0 -1
@@ -0,0 +1,50 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Pure overflow math (no DOM). Greedily fits leading actions into
4
+ * `containerWidth - dropdownWidth`, accounting for the inter-item `gap`. Returns
5
+ * how many render inline; the rest overflow into the menu. Exported for testing.
6
+ */
7
+ export declare function computeFittedVisibleCount({ containerWidth, itemWidths, dropdownWidth, gap, }: {
8
+ containerWidth: number;
9
+ itemWidths: number[];
10
+ dropdownWidth: number;
11
+ gap?: number;
12
+ }): number;
13
+ export interface FittedAction {
14
+ /** Stable identity. */
15
+ id: string;
16
+ /** Visible label (also the overflow menu-item label). */
17
+ label: React.ReactNode;
18
+ /** Optional leading 16px icon. */
19
+ icon?: React.ReactNode;
20
+ /** Set `false` to omit the action entirely. */
21
+ isDisplayed?: boolean;
22
+ /** Render a divider above this item when it sits in the overflow menu. */
23
+ divided?: boolean;
24
+ disabled?: boolean;
25
+ /** Invoked when this action is chosen (inline click or menu select). */
26
+ onSelect?: () => void;
27
+ }
28
+ export interface FittedActionsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
29
+ /** Ordered actions; trailing items overflow into the menu first. Defaults to `[]`. */
30
+ actions?: FittedAction[];
31
+ /** Collapse overflow into a "More" menu. Default true. */
32
+ showDropdown?: boolean;
33
+ /** Label for the overflow trigger. Default "More". */
34
+ moreLabel?: React.ReactNode;
35
+ /** Inter-item gap in px (also reserved when measuring). Default 8. */
36
+ gap?: number;
37
+ /** Fired for any chosen action, after its own `onSelect`. */
38
+ onAction?: (action: FittedAction) => void;
39
+ /** Customize the inline action element. Default: a ghost `Button`. */
40
+ renderAction?: (action: FittedAction, api: {
41
+ onSelect: () => void;
42
+ disabled?: boolean;
43
+ }) => React.ReactNode;
44
+ /** Customize the overflow trigger (used as the menu trigger's `render`). Default: a ghost `Button`. */
45
+ renderTrigger?: (api: {
46
+ label: React.ReactNode;
47
+ }) => React.ReactElement;
48
+ }
49
+ declare const FittedActions: React.ForwardRefExoticComponent<FittedActionsProps & React.RefAttributes<HTMLDivElement>>;
50
+ export { FittedActions };
@@ -0,0 +1,45 @@
1
+ import type * as React from 'react';
2
+ /**
3
+ * Props for `FittedActions` — the responsive action row.
4
+ * Extends `div` props (excluding `onSelect`).
5
+ */
6
+ export interface FittedActionsProps {
7
+ /** Ordered actions; trailing items overflow into the menu first. Defaults to `[]`. */
8
+ actions?: FittedAction[];
9
+ /** Collapse overflow into a "More" menu. Default `true`. */
10
+ showDropdown?: boolean;
11
+ /** Label for the overflow trigger. Default `"More"`. */
12
+ moreLabel?: React.ReactNode;
13
+ /** Inter-item gap in px (also reserved when measuring). Default `8`. */
14
+ gap?: number;
15
+ /** Fired for any chosen action, after its own `onSelect`. */
16
+ onAction?: (action: FittedAction) => void;
17
+ /** Customize the inline action element. Default: a ghost `Button`. */
18
+ renderAction?: (action: FittedAction, api: {
19
+ onSelect: () => void;
20
+ disabled?: boolean;
21
+ }) => React.ReactNode;
22
+ /** Customize the overflow trigger (used as the menu trigger's `render`). Default: a ghost `Button`. */
23
+ renderTrigger?: (api: {
24
+ label: React.ReactNode;
25
+ }) => React.ReactElement;
26
+ /** Extra classes merged onto the root `<div>`. */
27
+ className?: string;
28
+ }
29
+ /** A single action in the `FittedActions` bar. */
30
+ export interface FittedAction {
31
+ /** Stable identity — used as React key. */
32
+ id: string;
33
+ /** Visible label (also the overflow menu-item label). */
34
+ label: React.ReactNode;
35
+ /** Optional leading 16px icon rendered before the label. */
36
+ icon?: React.ReactNode;
37
+ /** Set `false` to omit the action entirely without removing it from the array. */
38
+ isDisplayed?: boolean;
39
+ /** Render a divider above this item when it appears in the overflow menu. */
40
+ divided?: boolean;
41
+ /** Disables the action (inline button and overflow menu item both become inert). */
42
+ disabled?: boolean;
43
+ /** Invoked when this action is chosen — inline click or overflow menu select. */
44
+ onSelect?: () => void;
45
+ }
@@ -0,0 +1 @@
1
+ export { FittedActions, computeFittedVisibleCount, type FittedAction, type FittedActionsProps, } from './fitted-actions';
@@ -1 +1 @@
1
- export { Link, type LinkProps } from './link';
1
+ export { Link, linkVariants, type LinkProps } from './link';
@@ -1,9 +1,27 @@
1
1
  import { useRender } from '@base-ui/react/use-render';
2
+ import { VariantProps } from 'class-variance-authority';
2
3
  import * as React from 'react';
3
- export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
4
- /** Append a trailing external-link icon (e.g. for links that leave the app). */
4
+ declare const linkVariants: (props?: ({
5
+ variant?: "normal" | "inverse" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, VariantProps<typeof linkVariants> {
8
+ /**
9
+ * Which surface the link sits on (Figma's `background`): `normal` for ordinary
10
+ * surfaces, `inverse` for a backdrop/scrim or other dark brand surface.
11
+ */
12
+ variant?: 'normal' | 'inverse';
13
+ /**
14
+ * Append a trailing external-link icon (e.g. for links that leave the app).
15
+ * Has no effect on `variant="inverse"` — the design defines no external icon for
16
+ * links on a backdrop.
17
+ */
5
18
  external?: boolean;
6
- /** Render the link inert: disabled color, removed from the tab order, no navigation. */
19
+ /**
20
+ * Render the link inert: disabled color, removed from the tab order, no navigation.
21
+ * Ignored entirely on `variant="inverse"` — the design defines no disabled state on
22
+ * a backdrop, so the link renders exactly as an enabled one (still navigable and
23
+ * focusable). Omit the link, or use `variant="normal"`, when you need it inert.
24
+ */
7
25
  disabled?: boolean;
8
26
  /**
9
27
  * Replace the rendered `<a>` with another element or component (Base UI
@@ -12,4 +30,4 @@ export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>
12
30
  render?: useRender.RenderProp;
13
31
  }
14
32
  declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
15
- export { Link };
33
+ export { Link, linkVariants };
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const metricVariants: (props?: ({
4
4
  size?: "small" | "medium" | "large" | null | undefined;
5
- status?: "info" | "success" | "warning" | "critical" | "neutral" | "danger" | null | undefined;
5
+ status?: "info" | "success" | "warning" | "critical" | "danger" | "neutral" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export interface MetricProps extends React.ComponentProps<'div'>, VariantProps<typeof metricVariants> {
8
8
  /** What the value measures — e.g. "Gross margin". Rendered as an uppercase note heading. */
@@ -17,11 +17,40 @@ export interface PopoverContentProps extends React.ComponentPropsWithoutRef<type
17
17
  portal?: boolean;
18
18
  /**
19
19
  * Portal container. Pass a shadow-root mount for isolated-style previews
20
- * (the docs demos do this via `useShadowMount`).
20
+ * (the docs demos do this via `useShadowMount`), or a constrained
21
+ * MFE/Shadow DOM mount point (see `PortalContainerProvider`).
21
22
  */
22
23
  portalContainer?: PopoverPrimitive.Portal.Props['container'];
23
24
  /** Keep the content mounted while closed (Base UI `Portal` prop). */
24
25
  keepMounted?: PopoverPrimitive.Portal.Props['keepMounted'];
26
+ /**
27
+ * Element/rect the popup is confined to when avoiding collisions. Defaults
28
+ * to Base UI's own `'clipping-ancestors'` behavior — left alone here,
29
+ * since pairing it with the `positionMethod` default below already avoids
30
+ * clipping inside a constrained `portalContainer` (see that prop's doc).
31
+ * Override explicitly if a different boundary is needed.
32
+ */
33
+ collisionBoundary?: PopoverPrimitive.Positioner.Props['collisionBoundary'];
34
+ /**
35
+ * Which CSS `position` the popup uses. Defaults to `'fixed'` whenever the
36
+ * popup is portaled (`portal` is not `false`) into a resolved
37
+ * `portalContainer` — an `'absolute'`-positioned popup
38
+ * (Base UI's own default) is still clipped by a `portalContainer` ancestor
39
+ * that constrains overflow (e.g. a Shadow DOM host with `overflow: hidden`)
40
+ * no matter how the collision boundary is computed, since it shares that
41
+ * ancestor's containing block. `'fixed'` escapes a plain overflow-clipping
42
+ * ancestor — for a `fixed`-positioned popup, the collision-detection
43
+ * library (floating-ui) drops overflow ancestors that don't establish
44
+ * their own containing block, so it clips against the real viewport
45
+ * instead, which is also unaffected by page scroll (unlike measuring
46
+ * `document.documentElement`'s own bounding rect, which shrinks by the
47
+ * scroll offset). Note this is not an absolute guarantee: an ancestor with
48
+ * `transform`, `filter`, `will-change`, `backdrop-filter`, `perspective`,
49
+ * or `contain: paint`/`layout` *does* establish a containing block, so it
50
+ * still clips (and repositions relative to) a `fixed` descendant. Override
51
+ * explicitly if a different strategy is needed.
52
+ */
53
+ positionMethod?: PopoverPrimitive.Positioner.Props['positionMethod'];
25
54
  }
26
55
  declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
27
56
  /**
@@ -14,11 +14,36 @@ export interface PopoverContentProps {
14
14
  portal?: boolean;
15
15
  /**
16
16
  * Portal container. Pass a shadow-root mount for isolated-style previews
17
- * (the docs demos do this via `useShadowMount`).
17
+ * (the docs demos do this via `useShadowMount`), or a `RefObject` pointing
18
+ * at a not-yet-mounted container element — its `current` is resolved once
19
+ * attached, so it doesn't need to be available on first render.
18
20
  */
19
- portalContainer?: HTMLElement | null;
21
+ portalContainer?: HTMLElement | ShadowRoot | null | React.RefObject<HTMLElement | ShadowRoot | null>;
20
22
  /** Keep the content mounted while closed. */
21
23
  keepMounted?: boolean;
24
+ /**
25
+ * Element/rect the popup is confined to when avoiding collisions. Defaults
26
+ * to Base UI's own `'clipping-ancestors'` behavior, left alone here — see
27
+ * `positionMethod` for why that already avoids clipping inside a
28
+ * constrained `portalContainer`.
29
+ */
30
+ collisionBoundary?: Element | Element[] | {
31
+ x: number;
32
+ y: number;
33
+ width: number;
34
+ height: number;
35
+ } | 'clipping-ancestors';
36
+ /**
37
+ * Which CSS `position` the popup uses. Defaults to `fixed` whenever the
38
+ * popup is portaled into a resolved `portalContainer`, so it escapes a
39
+ * plain overflow-clipping container (e.g. `overflow: hidden`) — the
40
+ * collision-detection library drops such an ancestor from its clipping
41
+ * chain for a `fixed`-positioned element, resolving to the real,
42
+ * scroll-independent viewport. Not a guarantee against an ancestor that
43
+ * also has a `transform`/`filter`/`will-change`/etc., which establishes
44
+ * its own containing block for fixed descendants and still clips.
45
+ */
46
+ positionMethod?: 'absolute' | 'fixed';
22
47
  /** Extra classes merged onto the popup. */
23
48
  className?: string;
24
49
  children?: React.ReactNode;
@@ -5,6 +5,30 @@ declare const ScrollBar: React.ForwardRefExoticComponent<Omit<Omit<import('@base
5
5
  export interface ScrollAreaProps extends React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> {
6
6
  /** Which scrollbar(s) to render. @default 'vertical' */
7
7
  orientation?: 'vertical' | 'horizontal' | 'both';
8
+ /**
9
+ * Ref to the **viewport** — the element that actually scrolls.
10
+ *
11
+ * `ref` reaches the root, which is `overflow: hidden` and never scrolls, so
12
+ * it reports `scrollTop: 0` and `scrollHeight === clientHeight` forever.
13
+ * Anything that measures, observes, or programmatically scrolls the region
14
+ * needs this one instead: a virtualizer's scroll element, an infinite-scroll
15
+ * observer, a scroll-to-item call.
16
+ */
17
+ viewportRef?: React.Ref<HTMLDivElement>;
18
+ /**
19
+ * Extra props for the viewport — a scroll handler, a tab index, or
20
+ * `data-*` attributes that must sit on the element that scrolls rather than
21
+ * on the wrapper around it.
22
+ *
23
+ * The `data-*` index signature is deliberate: JSX grants intrinsic elements
24
+ * an arbitrary-`data-*` escape hatch, but a props object typed as
25
+ * `HTMLAttributes` does not get it — so without this, the main thing this
26
+ * prop exists for (marking the scrolling element for an observer) would not
27
+ * type-check.
28
+ */
29
+ viewportProps?: React.HTMLAttributes<HTMLDivElement> & {
30
+ readonly [attribute: `data-${string}`]: unknown;
31
+ };
8
32
  }
9
33
  declare const ScrollArea: React.ForwardRefExoticComponent<ScrollAreaProps & React.RefAttributes<HTMLDivElement>>;
10
34
  export { ScrollArea, ScrollBar };
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const tagVariants: (props?: ({
4
- variant?: "info" | "success" | "warning" | "critical" | "ai" | "neutral" | "danger" | null | undefined;
4
+ variant?: "info" | "success" | "warning" | "critical" | "danger" | "ai" | "neutral" | null | undefined;
5
5
  size?: "default" | "sm" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export interface TagProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof tagVariants> {
@@ -0,0 +1 @@
1
+ export { Timer, type TimerProps } from './timer';
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+ export interface TimerProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {
3
+ /**
4
+ * The formatted time to display, e.g. `"12:01:45"`. Rendered with tabular
5
+ * figures so the readout doesn't jitter as the digits change. The component
6
+ * neither ticks nor formats — pass an already-formatted value.
7
+ */
8
+ value: React.ReactNode;
9
+ /**
10
+ * The actions, as `ButtonGroupItem` elements in visual order. Omit them for a
11
+ * read-only readout — with no actions the divider is dropped too.
12
+ */
13
+ children?: React.ReactNode;
14
+ /**
15
+ * Accessible name for the action cluster's toolbar. Localize it; the default
16
+ * is English.
17
+ */
18
+ actionsLabel?: string;
19
+ }
20
+ /**
21
+ * An elapsed-time readout paired with a cluster of icon-only actions.
22
+ *
23
+ * The readout is a `role="timer"` live region — implicitly `aria-live="off"`,
24
+ * so it is not announced on every tick. Each action needs its own accessible
25
+ * name; the cluster as a whole is named by `actionsLabel`.
26
+ */
27
+ declare const Timer: React.ForwardRefExoticComponent<TimerProps & React.RefAttributes<HTMLDivElement>>;
28
+ export { Timer };
@@ -1 +1 @@
1
- export { toast, Toaster, type ToasterProps, type ToastType, type ToastOptions, } from './toast';
1
+ export { toast, Toaster, toastVariants, type ToasterProps, type ToastAction, type ToastType, type ToastVariant, type ToastOptions, } from './toast';
@@ -1,39 +1,72 @@
1
1
  import { Toast as ToastPrimitive } from '@base-ui/react/toast';
2
+ import { VariantProps } from 'class-variance-authority';
2
3
  import * as React from 'react';
3
- export type ToastType = 'success' | 'info' | 'warning' | 'error' | 'loading';
4
+ declare const toastVariants: (props?: ({
5
+ variant?: "info" | "success" | "warning" | "critical" | "danger" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export type ToastVariant = NonNullable<VariantProps<typeof toastVariants>['variant']>;
8
+ /**
9
+ * A toast's kind. The five severities match the Figma variants; `loading` has no
10
+ * Figma variant — it is the spinner state `toast.promise` needs.
11
+ */
12
+ export type ToastType = ToastVariant | 'loading';
13
+ export interface ToastAction {
14
+ /** The button's label. */
15
+ label: React.ReactNode;
16
+ /** Invoked on click. The toast is not dismissed automatically. */
17
+ onClick?: () => void;
18
+ /**
19
+ * Button style. Defaults to `secondary` for the first action and `ghost` for
20
+ * the rest, matching the Figma's button pairing.
21
+ */
22
+ variant?: 'secondary' | 'ghost';
23
+ }
24
+ /** Custom per-toast payload carried through the Base UI manager. */
25
+ interface ToastData {
26
+ actions?: ToastAction[];
27
+ dismissable?: boolean;
28
+ }
4
29
  export interface ToastOptions {
5
- /** Secondary line under the title. */
30
+ /** Secondary line under the title; clamped to three lines. */
6
31
  description?: React.ReactNode;
7
32
  /** Auto-dismiss delay in ms; `0` keeps the toast until dismissed. */
8
33
  timeout?: number;
9
- /** A single inline action button (e.g. Undo). */
10
- action?: {
11
- label: React.ReactNode;
12
- onClick?: () => void;
13
- };
34
+ /** Action buttons rendered in a wrapping row under the text. */
35
+ actions?: ToastAction[];
36
+ /**
37
+ * Whether the toast shows its dismiss control and can be swiped away.
38
+ * Defaults to `true`. A non-dismissable toast with `timeout: 0` can only be
39
+ * removed with `toast.dismiss(id)`.
40
+ */
41
+ dismissable?: boolean;
14
42
  /** Stable id — re-adding with the same id updates the toast in place. */
15
43
  id?: string;
16
44
  }
17
45
  /**
18
- * Imperative toast API. `toast(title, options)` shows a neutral toast;
19
- * `toast.success` / `info` / `warning` / `error` / `loading` set the variant.
20
- * `toast.dismiss(id?)` closes one (or all) and `toast.promise` ties a toast to a
21
- * promise's lifecycle.
46
+ * Imperative toast API. `toast(title, options)` shows an info toast;
47
+ * `toast.info` / `success` / `warning` / `critical` / `danger` set the severity
48
+ * and `toast.loading` shows a persistent spinner. `toast.dismiss(id?)` closes one
49
+ * (or all) and `toast.promise` ties a toast to a promise's lifecycle.
22
50
  */
23
51
  declare const toast: ((title: React.ReactNode, options?: ToastOptions) => string) & {
24
- success: (title: React.ReactNode, options?: ToastOptions) => string;
25
52
  info: (title: React.ReactNode, options?: ToastOptions) => string;
53
+ success: (title: React.ReactNode, options?: ToastOptions) => string;
26
54
  warning: (title: React.ReactNode, options?: ToastOptions) => string;
27
- error: (title: React.ReactNode, options?: ToastOptions) => string;
55
+ critical: (title: React.ReactNode, options?: ToastOptions) => string;
56
+ danger: (title: React.ReactNode, options?: ToastOptions) => string;
28
57
  loading: (title: React.ReactNode, options?: ToastOptions) => string;
29
58
  dismiss: (id?: string) => void;
30
- promise: <Value, T extends any = any>(promiseValue: Promise<Value>, options: import('@base-ui/react').ToastManagerPromiseOptions<Value, T>) => Promise<Value>;
59
+ promise: <Value, T extends ToastData = ToastData>(promiseValue: Promise<Value>, options: import('@base-ui/react').ToastManagerPromiseOptions<Value, T>) => Promise<Value>;
31
60
  };
32
61
  export interface ToasterProps {
33
62
  /** Default auto-dismiss delay in ms for toasts that don't set one. */
34
63
  timeout?: number;
35
64
  /** Max toasts shown at once; the oldest is dropped past the limit. */
36
65
  limit?: number;
66
+ /** Accessible name for the toast region. */
67
+ label?: string;
68
+ /** Accessible name for each toast's dismiss control. */
69
+ closeAriaLabel?: string;
37
70
  /**
38
71
  * Portal container for the toast stack. Pass a shadow-root mount for
39
72
  * isolated-style previews (the docs demos do this via `useShadowMount`).
@@ -41,8 +74,8 @@ export interface ToasterProps {
41
74
  portalContainer?: ToastPrimitive.Portal.Props['container'];
42
75
  }
43
76
  /**
44
- * The toast region. Render once near the app root; it portals a bottom-right
45
- * stack and renders every queued toast. Trigger toasts with the `toast` API.
77
+ * The toast region. Render once near the app root; it portals a bottom-end stack
78
+ * and renders every queued toast. Trigger toasts with the `toast` API.
46
79
  */
47
- declare function Toaster({ timeout, limit, portalContainer }: ToasterProps): import("react/jsx-runtime").JSX.Element;
48
- export { toast, Toaster };
80
+ declare function Toaster({ timeout, limit, label, closeAriaLabel, portalContainer, }: ToasterProps): import("react/jsx-runtime").JSX.Element;
81
+ export { toast, Toaster, toastVariants };
@@ -4,6 +4,10 @@ export interface ToasterProps {
4
4
  timeout?: number;
5
5
  /** Max toasts shown at once; the oldest is dropped past the limit (default 3). */
6
6
  limit?: number;
7
+ /** Accessible name for the toast region (default `'Notifications'`). */
8
+ label?: string;
9
+ /** Accessible name for each toast's dismiss control (default `'Close'`). */
10
+ closeAriaLabel?: string;
7
11
  /**
8
12
  * Portal container for the toast stack. Pass a shadow-root mount for
9
13
  * isolated-style previews (the docs demos do this via `useShadowMount`).
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const trendIndicatorVariants: (props?: ({
4
- sentiment?: "neutral" | "positive" | "negative" | null | undefined;
4
+ sentiment?: "positive" | "neutral" | "negative" | null | undefined;
5
5
  size?: "small" | "medium" | null | undefined;
6
6
  variant?: "inline" | "badge" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,3 @@
1
+ export { TruncateText, type TruncateTextProps } from './truncate-text';
2
+ export { middleTruncate, type MiddleTruncateOptions } from './middle-truncate';
3
+ export { measureTextWidth } from './text-width';
@@ -0,0 +1,13 @@
1
+ export interface MiddleTruncateOptions {
2
+ /** Returns the rendered width of `candidate`, in the same unit as `maxWidth`. */
3
+ readonly measure: (candidate: string) => number;
4
+ /** Inserted between the kept start and end slices. Defaults to `'…'`. */
5
+ readonly ellipsis?: string;
6
+ }
7
+ /**
8
+ * Returns `text` unchanged if it already fits `maxWidth`, otherwise the widest
9
+ * start+ellipsis+end slice that does. Never returns something wider than
10
+ * `maxWidth`, even when nothing meaningful fits — the degenerate result is the
11
+ * bare ellipsis, or `''` if `maxWidth` cannot fit that either.
12
+ */
13
+ export declare function middleTruncate(text: string, maxWidth: number, { measure, ellipsis }: MiddleTruncateOptions): string;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The rendered width of `text` in `font` (a CSS `font` shorthand string, e.g. from
3
+ * `getComputedStyle(el).font`), in CSS pixels.
4
+ *
5
+ * Falls back to a fixed per-character estimate when `canvas` 2D contexts are
6
+ * unavailable (jsdom's default; the real component is exercised by the browser
7
+ * test project instead) — a rough width is enough to keep the search from
8
+ * throwing, and nothing in the unit project renders far enough to compare it
9
+ * against a pixel budget.
10
+ */
11
+ export declare function measureTextWidth(text: string, font: string): number;
@@ -0,0 +1,45 @@
1
+ import { TooltipContent } from '../tooltip';
2
+ import * as React from 'react';
3
+ type TooltipContentProps = React.ComponentProps<typeof TooltipContent>;
4
+ export interface TruncateTextProps {
5
+ /** The text to display. Also used verbatim as the tooltip body when truncated. */
6
+ children: string;
7
+ /**
8
+ * Where the ellipsis goes. `'end'` (default) is the familiar CSS
9
+ * `text-overflow: ellipsis` — reach for `'middle'` when the distinguishing
10
+ * part of the value is at the tail (a URL, a hash) rather than the start.
11
+ */
12
+ mode?: 'middle' | 'end';
13
+ /** Which side the tooltip opens on. Defaults to `top`. */
14
+ side?: 'top' | 'bottom' | 'left' | 'right';
15
+ /**
16
+ * Max lines before truncating, in `'end'` mode only: `1` (default) =
17
+ * single-line ellipsis; `>1` = a multi-line clamp. Ignored in `'middle'`
18
+ * mode, which is inherently single-line.
19
+ */
20
+ lines?: number;
21
+ /**
22
+ * Force the tooltip open on mount (only has effect when the text is truncated).
23
+ * Mainly for stories / visual review; normal usage reveals it on hover/focus.
24
+ */
25
+ defaultOpen?: boolean;
26
+ /**
27
+ * Container the tooltip popup portals into. Pass a shadow root (e.g. a
28
+ * micro-frontend mount point) so the popup inherits the kit's styles; defaults
29
+ * to the document body.
30
+ */
31
+ portalContainer?: TooltipContentProps['portalContainer'];
32
+ /** Merged onto the rendered `<span>`. */
33
+ className?: string;
34
+ }
35
+ /**
36
+ * Text that truncates with an ellipsis and reveals its full value in a tooltip
37
+ * **only when it's actually clipped** — the tooltip is skipped when everything
38
+ * fits, so short cells don't get a pointless hover target. Ideal for table cells.
39
+ *
40
+ * `'end'`-mode truncation is detected by comparing scroll vs client size and
41
+ * re-checked on resize; `'middle'`-mode measures a real font metric via canvas
42
+ * (there is no native CSS middle-ellipsis) and re-measures the same way.
43
+ */
44
+ export declare const TruncateText: React.ForwardRefExoticComponent<TruncateTextProps & React.RefAttributes<HTMLSpanElement>>;
45
+ export {};
@@ -0,0 +1,35 @@
1
+ import type * as React from 'react';
2
+ /** Props for `TruncateText`. */
3
+ export interface TruncateTextProps {
4
+ /** The text to display. Also used verbatim as the tooltip body when truncated. */
5
+ children: string;
6
+ /**
7
+ * Where the ellipsis goes.
8
+ * - `'end'` (default) — CSS `text-overflow: ellipsis` for single-line; `-webkit-line-clamp` when `lines > 1`.
9
+ * - `'middle'` — canvas binary-search preserving both ends; ideal for URLs, paths, and hashes.
10
+ */
11
+ mode?: 'end' | 'middle';
12
+ /** Which side the tooltip opens on. Defaults to `'top'`. */
13
+ side?: 'top' | 'bottom' | 'left' | 'right';
14
+ /**
15
+ * Max lines before truncating (`'end'` mode only).
16
+ * `1` (default) = single-line ellipsis; `>1` = multi-line `-webkit-line-clamp`.
17
+ * Ignored in `'middle'` mode, which is inherently single-line.
18
+ */
19
+ lines?: number;
20
+ /**
21
+ * Force the tooltip open on mount — only has effect when the text is truncated.
22
+ * Useful for stories and visual review; normal usage reveals the tooltip on hover/focus.
23
+ */
24
+ defaultOpen?: boolean;
25
+ /**
26
+ * Container the tooltip popup portals into. Pass a shadow-root mount (e.g. a
27
+ * micro-frontend mount point) so the popup inherits the kit's styles.
28
+ * Defaults to `document.body`.
29
+ */
30
+ portalContainer?: HTMLElement | ShadowRoot | null;
31
+ /** Extra classes merged onto the rendered `<span>`. */
32
+ className?: string;
33
+ /** Forwarded to the underlying `<span>`. */
34
+ ref?: React.Ref<HTMLSpanElement>;
35
+ }
@@ -12,8 +12,10 @@ export * from './components/ui/avatar';
12
12
  export * from './components/ui/bar-chart';
13
13
  export * from './components/ui/breadcrumb';
14
14
  export * from './components/ui/button';
15
+ export * from './components/ui/button-group';
15
16
  export * from './components/ui/button-menu';
16
17
  export * from './components/ui/calendar';
18
+ export * from './components/ui/calendar-panel';
17
19
  export * from './components/ui/card';
18
20
  export * from './components/ui/card-filter';
19
21
  export * from './components/ui/category-bar';
@@ -35,6 +37,9 @@ export * from './components/ui/dialog-welcome';
35
37
  export * from './components/ui/dropdown-menu';
36
38
  export * from './components/ui/empty';
37
39
  export * from './components/ui/field';
40
+ export * from './components/ui/fitted-actions';
41
+ export * from './components/ui/filter-cards';
42
+ export * from './components/ui/filter-chips';
38
43
  export * from './components/ui/funnel-chart';
39
44
  export * from './components/ui/grid';
40
45
  export * from './components/ui/histogram';
@@ -82,6 +87,7 @@ export * from './components/ui/sidebar-primary';
82
87
  export * from './components/ui/sidebar-secondary';
83
88
  export * from './components/ui/button-icon';
84
89
  export * from './components/ui/button-icon-input';
90
+ export * from './components/ui/button-icon-menu';
85
91
  export * from './components/ui/filter-search';
86
92
  export * from './components/ui/switch';
87
93
  export * from './components/ui/table';
@@ -90,8 +96,10 @@ export * from './components/ui/toast';
90
96
  export * from './components/ui/toggle-group';
91
97
  export * from './components/ui/toolbar';
92
98
  export * from './components/ui/tooltip';
99
+ export * from './components/ui/truncate-text';
93
100
  export * from './components/ui/tag';
94
101
  export * from './components/ui/timeline';
102
+ export * from './components/ui/timer';
95
103
  export { Tag as Badge, type TagProps as BadgeProps, } from './components/ui/tag';
96
104
  export * from './components/ui/treemap';
97
105
  export * from './components/ui/trend-indicator';