@acronis-platform/ui-react 0.62.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 (190) 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.js.map +1 -1
  8. package/dist/components/ui/chip/chip.js +33 -33
  9. package/dist/components/ui/chip/chip.js.map +1 -1
  10. package/dist/components/ui/date-range-picker/date-range-picker-utils.js +11 -23
  11. package/dist/components/ui/date-range-picker/date-range-picker-utils.js.map +1 -1
  12. package/dist/components/ui/date-range-picker/date-range-picker.js +94 -134
  13. package/dist/components/ui/date-range-picker/date-range-picker.js.map +1 -1
  14. package/dist/components/ui/dropdown-menu/dropdown-menu.js +129 -72
  15. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  16. package/dist/components/ui/filter-chips/filter-chips.js +44 -0
  17. package/dist/components/ui/filter-chips/filter-chips.js.map +1 -0
  18. package/dist/components/ui/filter-search/filter-search.js +184 -138
  19. package/dist/components/ui/filter-search/filter-search.js.map +1 -1
  20. package/dist/components/ui/fitted-actions/fitted-actions.js +139 -0
  21. package/dist/components/ui/fitted-actions/fitted-actions.js.map +1 -0
  22. package/dist/components/ui/input-date-picker/input-date-picker.js +103 -93
  23. package/dist/components/ui/input-date-picker/input-date-picker.js.map +1 -1
  24. package/dist/components/ui/input-password/input-password.js +76 -66
  25. package/dist/components/ui/input-password/input-password.js.map +1 -1
  26. package/dist/components/ui/input-search/input-search.js +9 -9
  27. package/dist/components/ui/input-search/input-search.js.map +1 -1
  28. package/dist/components/ui/input-select/input-select.js +8 -8
  29. package/dist/components/ui/input-select/input-select.js.map +1 -1
  30. package/dist/components/ui/input-text/input-text.js +77 -66
  31. package/dist/components/ui/input-text/input-text.js.map +1 -1
  32. package/dist/components/ui/input-text-area/input-text-area.js +76 -66
  33. package/dist/components/ui/input-text-area/input-text-area.js.map +1 -1
  34. package/dist/components/ui/link/link.js +50 -35
  35. package/dist/components/ui/link/link.js.map +1 -1
  36. package/dist/components/ui/number-field/number-field.js +1 -1
  37. package/dist/components/ui/number-field/number-field.js.map +1 -1
  38. package/dist/components/ui/popover/popover.js +75 -56
  39. package/dist/components/ui/popover/popover.js.map +1 -1
  40. package/dist/components/ui/scroll-area/scroll-area.js +46 -30
  41. package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
  42. package/dist/components/ui/timer/timer.js +47 -0
  43. package/dist/components/ui/timer/timer.js.map +1 -0
  44. package/dist/components/ui/toast/toast.js +168 -61
  45. package/dist/components/ui/toast/toast.js.map +1 -1
  46. package/dist/components/ui/truncate-text/middle-truncate.js +20 -0
  47. package/dist/components/ui/truncate-text/middle-truncate.js.map +1 -0
  48. package/dist/components/ui/truncate-text/text-width.js +12 -0
  49. package/dist/components/ui/truncate-text/text-width.js.map +1 -0
  50. package/dist/components/ui/truncate-text/truncate-text.js +152 -0
  51. package/dist/components/ui/truncate-text/truncate-text.js.map +1 -0
  52. package/dist/index.js +505 -473
  53. package/dist/index.js.map +1 -1
  54. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/addDays.js +5 -5
  55. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/addDays.js.map +1 -1
  56. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/constants.js +3 -6
  57. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/constants.js.map +1 -1
  58. package/dist/react.js +505 -473
  59. package/dist/react.js.map +1 -1
  60. package/dist/src/components/ui/alert/alert.d.ts +34 -3
  61. package/dist/src/components/ui/alert/index.d.ts +2 -2
  62. package/dist/src/components/ui/button/button.d.ts +1 -1
  63. package/dist/src/components/ui/button-group/button-group.d.ts +38 -0
  64. package/dist/src/components/ui/button-group/index.d.ts +1 -0
  65. package/dist/src/components/ui/button-icon/button-icon.d.ts +1 -1
  66. package/dist/src/components/ui/button-icon-menu/button-icon-menu.d.ts +28 -0
  67. package/dist/src/components/ui/button-icon-menu/index.d.ts +1 -0
  68. package/dist/src/components/ui/button-menu/button-menu.d.ts +1 -1
  69. package/dist/src/components/ui/calendar-panel/calendar-panel.d.ts +2 -2
  70. package/dist/src/components/ui/chip/chip.d.ts +1 -1
  71. package/dist/src/components/ui/date-range-picker/date-range-picker-utils.d.ts +10 -16
  72. package/dist/src/components/ui/date-range-picker/date-range-picker.d.ts +46 -2
  73. package/dist/src/components/ui/dropdown-menu/dropdown-menu.d.ts +8 -1
  74. package/dist/src/components/ui/dropdown-menu/index.d.ts +1 -1
  75. package/dist/src/components/ui/filter-chips/filter-chips.d.ts +25 -0
  76. package/dist/src/components/ui/filter-chips/index.d.ts +1 -0
  77. package/dist/src/components/ui/filter-search/filter-search.d.ts +39 -1
  78. package/dist/src/components/ui/fitted-actions/fitted-actions.d.ts +50 -0
  79. package/dist/src/components/ui/fitted-actions/fitted-actions.docs.d.ts +45 -0
  80. package/dist/src/components/ui/fitted-actions/index.d.ts +1 -0
  81. package/dist/src/components/ui/link/index.d.ts +1 -1
  82. package/dist/src/components/ui/link/link.d.ts +22 -4
  83. package/dist/src/components/ui/metric/metric.d.ts +1 -1
  84. package/dist/src/components/ui/popover/popover.d.ts +30 -1
  85. package/dist/src/components/ui/popover/popover.docs.d.ts +27 -2
  86. package/dist/src/components/ui/scroll-area/scroll-area.d.ts +24 -0
  87. package/dist/src/components/ui/tag/tag.d.ts +1 -1
  88. package/dist/src/components/ui/timer/index.d.ts +1 -0
  89. package/dist/src/components/ui/timer/timer.d.ts +28 -0
  90. package/dist/src/components/ui/toast/index.d.ts +1 -1
  91. package/dist/src/components/ui/toast/toast.d.ts +51 -18
  92. package/dist/src/components/ui/toast/toast.docs.d.ts +4 -0
  93. package/dist/src/components/ui/trend-indicator/trend-indicator.d.ts +1 -1
  94. package/dist/src/components/ui/truncate-text/__tests__/middle-truncate.test.d.ts +1 -0
  95. package/dist/src/components/ui/truncate-text/index.d.ts +3 -0
  96. package/dist/src/components/ui/truncate-text/middle-truncate.d.ts +13 -0
  97. package/dist/src/components/ui/truncate-text/text-width.d.ts +11 -0
  98. package/dist/src/components/ui/truncate-text/truncate-text.d.ts +45 -0
  99. package/dist/src/components/ui/truncate-text/truncate-text.docs.d.ts +35 -0
  100. package/dist/src/index.d.ts +6 -0
  101. package/dist/ui-react.css +1 -1
  102. package/package.json +3 -3
  103. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getDefaultOptions.js +0 -8
  104. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getDefaultOptions.js.map +0 -1
  105. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getISODay.js +0 -9
  106. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getISODay.js.map +0 -1
  107. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Parser.js +0 -23
  108. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Parser.js.map +0 -1
  109. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Setter.js +0 -42
  110. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Setter.js.map +0 -1
  111. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/constants.js +0 -50
  112. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/constants.js.map +0 -1
  113. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +0 -50
  114. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +0 -1
  115. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +0 -50
  116. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +0 -1
  117. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DateParser.js +0 -62
  118. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +0 -1
  119. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +0 -52
  120. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +0 -1
  121. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayParser.js +0 -50
  122. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +0 -1
  123. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +0 -50
  124. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +0 -1
  125. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/EraParser.js +0 -34
  126. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +0 -1
  127. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +0 -22
  128. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +0 -1
  129. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +0 -23
  130. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +0 -1
  131. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +0 -33
  132. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +0 -1
  133. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +0 -33
  134. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +0 -1
  135. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +0 -34
  136. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +0 -1
  137. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +0 -34
  138. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +0 -1
  139. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +0 -106
  140. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +0 -1
  141. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +0 -49
  142. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +0 -1
  143. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -49
  144. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +0 -1
  145. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +0 -50
  146. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +0 -1
  147. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +0 -41
  148. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +0 -1
  149. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +0 -81
  150. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +0 -1
  151. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +0 -49
  152. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +0 -1
  153. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +0 -70
  154. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +0 -1
  155. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +0 -33
  156. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +0 -1
  157. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +0 -78
  158. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +0 -1
  159. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +0 -76
  160. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +0 -1
  161. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +0 -33
  162. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +0 -1
  163. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -81
  164. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +0 -1
  165. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +0 -78
  166. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +0 -1
  167. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +0 -76
  168. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +0 -1
  169. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -23
  170. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +0 -1
  171. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +0 -23
  172. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +0 -1
  173. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/YearParser.js +0 -50
  174. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +0 -1
  175. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers.js +0 -68
  176. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers.js.map +0 -1
  177. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/utils.js +0 -104
  178. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/utils.js.map +0 -1
  179. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse.js +0 -86
  180. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse.js.map +0 -1
  181. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setDay.js +0 -12
  182. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setDay.js.map +0 -1
  183. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISODay.js +0 -11
  184. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISODay.js.map +0 -1
  185. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISOWeek.js +0 -10
  186. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISOWeek.js.map +0 -1
  187. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setWeek.js +0 -10
  188. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setWeek.js.map +0 -1
  189. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/transpose.js +0 -18
  190. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/transpose.js.map +0 -1
@@ -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,6 +12,7 @@ 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';
17
18
  export * from './components/ui/calendar-panel';
@@ -36,7 +37,9 @@ export * from './components/ui/dialog-welcome';
36
37
  export * from './components/ui/dropdown-menu';
37
38
  export * from './components/ui/empty';
38
39
  export * from './components/ui/field';
40
+ export * from './components/ui/fitted-actions';
39
41
  export * from './components/ui/filter-cards';
42
+ export * from './components/ui/filter-chips';
40
43
  export * from './components/ui/funnel-chart';
41
44
  export * from './components/ui/grid';
42
45
  export * from './components/ui/histogram';
@@ -84,6 +87,7 @@ export * from './components/ui/sidebar-primary';
84
87
  export * from './components/ui/sidebar-secondary';
85
88
  export * from './components/ui/button-icon';
86
89
  export * from './components/ui/button-icon-input';
90
+ export * from './components/ui/button-icon-menu';
87
91
  export * from './components/ui/filter-search';
88
92
  export * from './components/ui/switch';
89
93
  export * from './components/ui/table';
@@ -92,8 +96,10 @@ export * from './components/ui/toast';
92
96
  export * from './components/ui/toggle-group';
93
97
  export * from './components/ui/toolbar';
94
98
  export * from './components/ui/tooltip';
99
+ export * from './components/ui/truncate-text';
95
100
  export * from './components/ui/tag';
96
101
  export * from './components/ui/timeline';
102
+ export * from './components/ui/timer';
97
103
  export { Tag as Badge, type TagProps as BadgeProps, } from './components/ui/tag';
98
104
  export * from './components/ui/treemap';
99
105
  export * from './components/ui/trend-indicator';