@acronis-platform/ui-react 0.62.0 → 2.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 (237) hide show
  1. package/dist/components/ui/alert/alert.js +118 -60
  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/checkbox/checkbox.js +1 -1
  9. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  10. package/dist/components/ui/chip/chip.js +33 -33
  11. package/dist/components/ui/chip/chip.js.map +1 -1
  12. package/dist/components/ui/data-table/data-table-bulk-actions-bar.js +38 -0
  13. package/dist/components/ui/data-table/data-table-bulk-actions-bar.js.map +1 -0
  14. package/dist/components/ui/data-table/data-table-column-header.js +23 -20
  15. package/dist/components/ui/data-table/data-table-column-header.js.map +1 -1
  16. package/dist/components/ui/data-table/data-table-expand-trigger.js +23 -15
  17. package/dist/components/ui/data-table/data-table-expand-trigger.js.map +1 -1
  18. package/dist/components/ui/data-table/data-table-pagination.js +29 -28
  19. package/dist/components/ui/data-table/data-table-pagination.js.map +1 -1
  20. package/dist/components/ui/data-table/data-table-selection.js +7 -0
  21. package/dist/components/ui/data-table/data-table-selection.js.map +1 -0
  22. package/dist/components/ui/data-table/data-table-toolbar.js +21 -23
  23. package/dist/components/ui/data-table/data-table-toolbar.js.map +1 -1
  24. package/dist/components/ui/data-table/data-table-view-options.js +12 -10
  25. package/dist/components/ui/data-table/data-table-view-options.js.map +1 -1
  26. package/dist/components/ui/data-table/data-table.js +347 -183
  27. package/dist/components/ui/data-table/data-table.js.map +1 -1
  28. package/dist/components/ui/date-range-picker/date-range-picker-utils.js +11 -23
  29. package/dist/components/ui/date-range-picker/date-range-picker-utils.js.map +1 -1
  30. package/dist/components/ui/date-range-picker/date-range-picker.js +94 -134
  31. package/dist/components/ui/date-range-picker/date-range-picker.js.map +1 -1
  32. package/dist/components/ui/dropdown-menu/dropdown-menu.js +129 -72
  33. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  34. package/dist/components/ui/filter-chips/filter-chips.js +44 -0
  35. package/dist/components/ui/filter-chips/filter-chips.js.map +1 -0
  36. package/dist/components/ui/filter-search/filter-search.js +184 -138
  37. package/dist/components/ui/filter-search/filter-search.js.map +1 -1
  38. package/dist/components/ui/fitted-actions/fitted-actions.js +139 -0
  39. package/dist/components/ui/fitted-actions/fitted-actions.js.map +1 -0
  40. package/dist/components/ui/input-date-picker/input-date-picker.js +103 -93
  41. package/dist/components/ui/input-date-picker/input-date-picker.js.map +1 -1
  42. package/dist/components/ui/input-password/input-password.js +76 -66
  43. package/dist/components/ui/input-password/input-password.js.map +1 -1
  44. package/dist/components/ui/input-search/input-search.js +9 -9
  45. package/dist/components/ui/input-search/input-search.js.map +1 -1
  46. package/dist/components/ui/input-select/input-select.js +8 -8
  47. package/dist/components/ui/input-select/input-select.js.map +1 -1
  48. package/dist/components/ui/input-text/input-text.js +77 -66
  49. package/dist/components/ui/input-text/input-text.js.map +1 -1
  50. package/dist/components/ui/input-text-area/input-text-area.js +76 -66
  51. package/dist/components/ui/input-text-area/input-text-area.js.map +1 -1
  52. package/dist/components/ui/link/link.js +50 -35
  53. package/dist/components/ui/link/link.js.map +1 -1
  54. package/dist/components/ui/number-field/number-field.js +1 -1
  55. package/dist/components/ui/number-field/number-field.js.map +1 -1
  56. package/dist/components/ui/popover/popover.js +75 -56
  57. package/dist/components/ui/popover/popover.js.map +1 -1
  58. package/dist/components/ui/scroll-area/scroll-area.js +46 -30
  59. package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
  60. package/dist/components/ui/stepper/stepper.js +70 -0
  61. package/dist/components/ui/stepper/stepper.js.map +1 -0
  62. package/dist/components/ui/stepper-item/stepper-item.js +97 -0
  63. package/dist/components/ui/stepper-item/stepper-item.js.map +1 -0
  64. package/dist/components/ui/table/table-pagination.js +54 -47
  65. package/dist/components/ui/table/table-pagination.js.map +1 -1
  66. package/dist/components/ui/table/table-view-options.js +32 -19
  67. package/dist/components/ui/table/table-view-options.js.map +1 -1
  68. package/dist/components/ui/table/table.js +112 -63
  69. package/dist/components/ui/table/table.js.map +1 -1
  70. package/dist/components/ui/timeline/timeline.js +10 -10
  71. package/dist/components/ui/timeline/timeline.js.map +1 -1
  72. package/dist/components/ui/timer/timer.js +47 -0
  73. package/dist/components/ui/timer/timer.js.map +1 -0
  74. package/dist/components/ui/toast/toast.js +168 -61
  75. package/dist/components/ui/toast/toast.js.map +1 -1
  76. package/dist/components/ui/truncate-text/middle-truncate.js +20 -0
  77. package/dist/components/ui/truncate-text/middle-truncate.js.map +1 -0
  78. package/dist/components/ui/truncate-text/text-width.js +12 -0
  79. package/dist/components/ui/truncate-text/text-width.js.map +1 -0
  80. package/dist/components/ui/truncate-text/truncate-text.js +152 -0
  81. package/dist/components/ui/truncate-text/truncate-text.js.map +1 -0
  82. package/dist/index.js +516 -471
  83. package/dist/index.js.map +1 -1
  84. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/addDays.js +5 -5
  85. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/addDays.js.map +1 -1
  86. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/constants.js +3 -6
  87. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/constants.js.map +1 -1
  88. package/dist/react.js +516 -471
  89. package/dist/react.js.map +1 -1
  90. package/dist/src/components/ui/alert/alert.d.ts +34 -3
  91. package/dist/src/components/ui/alert/index.d.ts +2 -2
  92. package/dist/src/components/ui/button/button.d.ts +1 -1
  93. package/dist/src/components/ui/button-group/button-group.d.ts +38 -0
  94. package/dist/src/components/ui/button-group/index.d.ts +1 -0
  95. package/dist/src/components/ui/button-icon/button-icon.d.ts +1 -1
  96. package/dist/src/components/ui/button-icon-menu/button-icon-menu.d.ts +28 -0
  97. package/dist/src/components/ui/button-icon-menu/index.d.ts +1 -0
  98. package/dist/src/components/ui/button-menu/button-menu.d.ts +1 -1
  99. package/dist/src/components/ui/calendar-panel/calendar-panel.d.ts +2 -2
  100. package/dist/src/components/ui/chip/chip.d.ts +1 -1
  101. package/dist/src/components/ui/data-table/data-table-bulk-actions-bar.d.ts +26 -0
  102. package/dist/src/components/ui/data-table/data-table-column-header.d.ts +6 -1
  103. package/dist/src/components/ui/data-table/data-table-expand-trigger.d.ts +4 -0
  104. package/dist/src/components/ui/data-table/data-table-pagination.d.ts +15 -1
  105. package/dist/src/components/ui/data-table/data-table-selection.d.ts +11 -0
  106. package/dist/src/components/ui/data-table/data-table-view-options.d.ts +3 -2
  107. package/dist/src/components/ui/data-table/data-table.d.ts +88 -3
  108. package/dist/src/components/ui/data-table/data-table.docs.d.ts +61 -1
  109. package/dist/src/components/ui/data-table/index.d.ts +3 -1
  110. package/dist/src/components/ui/date-range-picker/date-range-picker-utils.d.ts +10 -16
  111. package/dist/src/components/ui/date-range-picker/date-range-picker.d.ts +46 -2
  112. package/dist/src/components/ui/dropdown-menu/dropdown-menu.d.ts +8 -1
  113. package/dist/src/components/ui/dropdown-menu/index.d.ts +1 -1
  114. package/dist/src/components/ui/filter-chips/filter-chips.d.ts +25 -0
  115. package/dist/src/components/ui/filter-chips/index.d.ts +1 -0
  116. package/dist/src/components/ui/filter-search/filter-search.d.ts +39 -1
  117. package/dist/src/components/ui/fitted-actions/fitted-actions.d.ts +50 -0
  118. package/dist/src/components/ui/fitted-actions/fitted-actions.docs.d.ts +45 -0
  119. package/dist/src/components/ui/fitted-actions/index.d.ts +1 -0
  120. package/dist/src/components/ui/link/index.d.ts +1 -1
  121. package/dist/src/components/ui/link/link.d.ts +22 -4
  122. package/dist/src/components/ui/metric/metric.d.ts +1 -1
  123. package/dist/src/components/ui/popover/popover.d.ts +30 -1
  124. package/dist/src/components/ui/popover/popover.docs.d.ts +27 -2
  125. package/dist/src/components/ui/scroll-area/scroll-area.d.ts +24 -0
  126. package/dist/src/components/ui/stepper/index.d.ts +1 -0
  127. package/dist/src/components/ui/stepper/stepper.d.ts +40 -0
  128. package/dist/src/components/ui/stepper-item/index.d.ts +1 -0
  129. package/dist/src/components/ui/stepper-item/stepper-item.d.ts +41 -0
  130. package/dist/src/components/ui/table/index.d.ts +1 -1
  131. package/dist/src/components/ui/table/table-pagination.d.ts +21 -0
  132. package/dist/src/components/ui/table/table-view-options.d.ts +9 -2
  133. package/dist/src/components/ui/table/table.d.ts +40 -1
  134. package/dist/src/components/ui/tag/tag.d.ts +1 -1
  135. package/dist/src/components/ui/timer/index.d.ts +1 -0
  136. package/dist/src/components/ui/timer/timer.d.ts +28 -0
  137. package/dist/src/components/ui/toast/index.d.ts +1 -1
  138. package/dist/src/components/ui/toast/toast.d.ts +51 -18
  139. package/dist/src/components/ui/toast/toast.docs.d.ts +4 -0
  140. package/dist/src/components/ui/trend-indicator/trend-indicator.d.ts +1 -1
  141. package/dist/src/components/ui/truncate-text/__tests__/middle-truncate.test.d.ts +1 -0
  142. package/dist/src/components/ui/truncate-text/index.d.ts +3 -0
  143. package/dist/src/components/ui/truncate-text/middle-truncate.d.ts +13 -0
  144. package/dist/src/components/ui/truncate-text/text-width.d.ts +11 -0
  145. package/dist/src/components/ui/truncate-text/truncate-text.d.ts +45 -0
  146. package/dist/src/components/ui/truncate-text/truncate-text.docs.d.ts +35 -0
  147. package/dist/src/index.d.ts +8 -0
  148. package/dist/ui-react.css +1 -1
  149. package/package.json +4 -4
  150. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getDefaultOptions.js +0 -8
  151. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getDefaultOptions.js.map +0 -1
  152. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getISODay.js +0 -9
  153. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getISODay.js.map +0 -1
  154. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Parser.js +0 -23
  155. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Parser.js.map +0 -1
  156. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Setter.js +0 -42
  157. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Setter.js.map +0 -1
  158. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/constants.js +0 -50
  159. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/constants.js.map +0 -1
  160. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +0 -50
  161. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +0 -1
  162. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +0 -50
  163. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +0 -1
  164. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DateParser.js +0 -62
  165. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +0 -1
  166. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +0 -52
  167. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +0 -1
  168. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayParser.js +0 -50
  169. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +0 -1
  170. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +0 -50
  171. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +0 -1
  172. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/EraParser.js +0 -34
  173. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +0 -1
  174. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +0 -22
  175. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +0 -1
  176. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +0 -23
  177. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +0 -1
  178. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +0 -33
  179. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +0 -1
  180. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +0 -33
  181. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +0 -1
  182. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +0 -34
  183. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +0 -1
  184. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +0 -34
  185. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +0 -1
  186. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +0 -106
  187. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +0 -1
  188. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +0 -49
  189. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +0 -1
  190. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -49
  191. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +0 -1
  192. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +0 -50
  193. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +0 -1
  194. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +0 -41
  195. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +0 -1
  196. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +0 -81
  197. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +0 -1
  198. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +0 -49
  199. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +0 -1
  200. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +0 -70
  201. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +0 -1
  202. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +0 -33
  203. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +0 -1
  204. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +0 -78
  205. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +0 -1
  206. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +0 -76
  207. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +0 -1
  208. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +0 -33
  209. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +0 -1
  210. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -81
  211. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +0 -1
  212. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +0 -78
  213. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +0 -1
  214. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +0 -76
  215. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +0 -1
  216. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -23
  217. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +0 -1
  218. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +0 -23
  219. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +0 -1
  220. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/YearParser.js +0 -50
  221. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +0 -1
  222. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers.js +0 -68
  223. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers.js.map +0 -1
  224. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/utils.js +0 -104
  225. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/utils.js.map +0 -1
  226. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse.js +0 -86
  227. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse.js.map +0 -1
  228. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setDay.js +0 -12
  229. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setDay.js.map +0 -1
  230. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISODay.js +0 -11
  231. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISODay.js.map +0 -1
  232. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISOWeek.js +0 -10
  233. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISOWeek.js.map +0 -1
  234. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setWeek.js +0 -10
  235. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setWeek.js.map +0 -1
  236. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/transpose.js +0 -18
  237. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/transpose.js.map +0 -1
@@ -0,0 +1,70 @@
1
+ import { jsxs as e, jsx as a } from "react/jsx-runtime";
2
+ import * as f from "react";
3
+ import { cn as u } from "../../../lib/utils.js";
4
+ const h = f.forwardRef(
5
+ ({
6
+ className: s,
7
+ children: r,
8
+ currentStep: l,
9
+ totalSteps: p,
10
+ current: i,
11
+ next: t,
12
+ stepLabel: n = "Step",
13
+ ofLabel: c = "of",
14
+ nextLabel: d = "Next:",
15
+ separatorLabel: o = ": ",
16
+ ...m
17
+ }, x) => /* @__PURE__ */ e(
18
+ "div",
19
+ {
20
+ ref: x,
21
+ "data-slot": "stepper",
22
+ className: u("w-full", s),
23
+ ...m,
24
+ children: [
25
+ /* @__PURE__ */ e(
26
+ "div",
27
+ {
28
+ "data-slot": "stepper-summary",
29
+ className: "flex flex-col gap-[var(--ui-gap-4)] text-sm leading-6 lg:hidden",
30
+ children: [
31
+ /* @__PURE__ */ e("p", { "data-slot": "stepper-current-line", children: [
32
+ /* @__PURE__ */ e("span", { className: "text-[var(--ui-text-on-surface-secondary)]", children: [
33
+ n,
34
+ " ",
35
+ l,
36
+ " ",
37
+ c,
38
+ " ",
39
+ p,
40
+ o
41
+ ] }),
42
+ /* @__PURE__ */ a("span", { className: "text-[var(--ui-text-on-surface-primary)]", children: i })
43
+ ] }),
44
+ t != null && /* @__PURE__ */ e("p", { "data-slot": "stepper-next-line", children: [
45
+ /* @__PURE__ */ e("span", { className: "text-[var(--ui-text-on-surface-secondary)]", children: [
46
+ d,
47
+ " "
48
+ ] }),
49
+ /* @__PURE__ */ a("span", { className: "text-[var(--ui-text-on-surface-primary)]", children: t })
50
+ ] })
51
+ ]
52
+ }
53
+ ),
54
+ /* @__PURE__ */ a(
55
+ "div",
56
+ {
57
+ "data-slot": "stepper-items",
58
+ className: "hidden flex-wrap content-start items-start justify-start gap-[var(--ui-gap-8)] lg:flex",
59
+ children: r
60
+ }
61
+ )
62
+ ]
63
+ }
64
+ )
65
+ );
66
+ h.displayName = "Stepper";
67
+ export {
68
+ h as Stepper
69
+ };
70
+ //# sourceMappingURL=stepper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stepper.js","sources":["../../../../src/components/ui/stepper/stepper.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n// The stepper root. It renders the sequence two ways and lets CSS pick one:\n// a start-aligned, wrapping row of `StepperItem` children on wide viewports, and a\n// two-line text summary (\"Step 3 of 5: <current>\" / \"Next: <next>\") on narrow\n// ones. There is no `variant` prop and no `cva`: the only axis the design has\n// is the viewport width, which is not something JS decides here.\n//\n// ── Why a real media query, and why both trees always render ──\n// The Figma component models the two layouts as a `breakpoint` variant\n// (`0-1024` / `>1025`). In code that is a viewport media query, so it is\n// expressed with Tailwind's stock `lg:` variant (`hidden lg:flex` /\n// `flex lg:hidden`) rather than a `ResizeObserver`. `page-header.tsx`'s\n// `useRowOverflow` hook is deliberately *not* reused: that measures whether\n// content fits its own container (a content-fit problem), which is a different\n// question from \"how wide is the viewport\". A media query needs no measuring\n// pass, no hydration mismatch, and no layout thrash.\n//\n// Consequence, and it is intentional: **both subtrees are always in the DOM**,\n// and only their visibility differs. Nothing is `aria-hidden`, because which\n// tree is showing is not knowable from JS — the browser decides it in CSS.\n// That is correct rather than a compromise: `hidden` / `lg:hidden` resolve to\n// `display: none`, and a `display: none` subtree is not exposed to assistive\n// tech, so exactly one of the two is announced at any width. In jsdom, though,\n// no media query is evaluated, so unit tests see both at once.\n//\n// ── Breakpoint boundary: 1024, not 1025 ──\n// Figma's variant names say `0-1024` and `>1025`, which leaves 1024px itself\n// ambiguous and 1025 as the first \"desktop\" pixel. Tailwind's `lg:` is\n// `@media (min-width: 64rem)` = exactly 1024px (see the `@theme` block in\n// `src/styles/index.css` and `BREAKPOINT_LG` in `src/lib/breakpoints.ts`), so\n// 1024px renders the desktop row here. That 1px difference is accepted rather\n// than hand-rolling a one-off `1025px` query: the repo already pins the design\n// team's ranges to clean rem values and documents the rounding where it differs\n// (see the comments in `src/stories/breakpoints-demo.stories.tsx`), and\n// inventing a bespoke breakpoint for one component would put it out of step\n// with every other responsive surface in the kit.\n//\n// ── Token substitution (placeholder — re-point once design ships the tier) ──\n// Same situation as `StepperItem`: the design references `components/Stepper/*`\n// variables, but there is no `--ui-stepper-*` tier in\n// @acronis-platform/tokens-pd (a grep for `Stepper` across tokens-pd and the\n// design-tokens source returns nothing). Rather than hand-author values, this\n// consumes the semantic/generic tokens whose *resolved* value in\n// `packages/tokens-pd/css/default.css` matches the Figma variable exactly —\n// verified value-by-value:\n//\n// components/Stepper/_global/list/gap (4px) -> --ui-gap-4\n// (the item row's gap came through Figma as the generic `gap/gap-8`,\n// the same 8px token StepperItem already uses internally) -> --ui-gap-8\n// components/Stepper/_global/prefix/color (#61656b) -> --ui-text-on-surface-secondary\n// components/Stepper/current/label/color (#18191b) -> --ui-text-on-surface-primary\n// components/Stepper/next/label/color (#18191b) -> --ui-text-on-surface-primary\n//\n// The last two are separate Figma variables carrying an identical value, so one\n// semantic token covers both faithfully — and it is the same token StepperItem\n// already uses for its own label, which is the point.\n\nexport interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The `StepperItem` elements making up the sequence. Rendered in the wide\n * (>= 1024px) layout only — the compact layout is a text summary and shows no\n * items at all.\n */\n children?: React.ReactNode;\n /** 1-based index of the step the user is on, e.g. `3`. Compact layout only. */\n currentStep: React.ReactNode;\n /** How many steps there are in total, e.g. `5`. Compact layout only. */\n totalSteps: React.ReactNode;\n /** The current step's name. Compact layout only. */\n current: React.ReactNode;\n /**\n * The next step's name. Omit it — on the last step, say — and the whole\n * \"Next: …\" line is left out rather than rendered empty. Compact layout only.\n */\n next?: React.ReactNode;\n /**\n * The word introducing the step counter. A prop, not an inlined literal, so\n * the string can be translated (see `context/conventions.md` §\"Localization —\n * no hardcoded labels\"): this component generates the text itself, unlike the\n * step names, which the caller supplies.\n */\n stepLabel?: string;\n /** The word joining the current step number to the total. Translatable — see `stepLabel`. */\n ofLabel?: string;\n /** The label introducing the next step's name. Translatable — see `stepLabel`. */\n nextLabel?: string;\n /**\n * The punctuation joining the step counter to the current step's name. A prop\n * for the same reason as `stepLabel`: the component generates it, and not every\n * locale writes it as `\": \"` (French, say, spaces before the colon; CJK uses a\n * full-width one).\n */\n separatorLabel?: string;\n}\n\nconst Stepper = React.forwardRef<HTMLDivElement, StepperProps>(\n (\n {\n className,\n children,\n currentStep,\n totalSteps,\n current,\n next,\n stepLabel = 'Step',\n ofLabel = 'of',\n nextLabel = 'Next:',\n separatorLabel = ': ',\n ...props\n },\n ref\n ) => (\n <div\n ref={ref}\n data-slot=\"stepper\"\n className={cn('w-full', className)}\n {...props}\n >\n {/* Compact summary — the only thing visible below the `lg` breakpoint. */}\n <div\n data-slot=\"stepper-summary\"\n className=\"flex flex-col gap-[var(--ui-gap-4)] text-sm leading-6 lg:hidden\"\n >\n <p data-slot=\"stepper-current-line\">\n <span className=\"text-[var(--ui-text-on-surface-secondary)]\">\n {stepLabel} {currentStep} {ofLabel} {totalSteps}\n {separatorLabel}\n </span>\n <span className=\"text-[var(--ui-text-on-surface-primary)]\">\n {current}\n </span>\n </p>\n {next != null && (\n <p data-slot=\"stepper-next-line\">\n <span className=\"text-[var(--ui-text-on-surface-secondary)]\">\n {nextLabel}{' '}\n </span>\n <span className=\"text-[var(--ui-text-on-surface-primary)]\">\n {next}\n </span>\n </p>\n )}\n </div>\n\n {/* The item row — hidden below `lg`, where the summary replaces it. */}\n <div\n data-slot=\"stepper-items\"\n className=\"hidden flex-wrap content-start items-start justify-start gap-[var(--ui-gap-8)] lg:flex\"\n >\n {children}\n </div>\n </div>\n )\n);\nStepper.displayName = 'Stepper';\n\nexport { Stepper };\n"],"names":["Stepper","React","className","children","currentStep","totalSteps","current","next","stepLabel","ofLabel","nextLabel","separatorLabel","props","ref","jsxs","cn","jsx"],"mappings":";;;AAoGA,MAAMA,IAAUC,EAAM;AAAA,EACpB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,SAAAC;AAAA,IACA,MAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,SAAAC,IAAU;AAAA,IACV,WAAAC,IAAY;AAAA,IACZ,gBAAAC,IAAiB;AAAA,IACjB,GAAGC;AAAA,EAAA,GAELC,MAEA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,aAAU;AAAA,MACV,WAAWE,EAAG,UAAUb,CAAS;AAAA,MAChC,GAAGU;AAAA,MAGJ,UAAA;AAAA,QAAA,gBAAAE;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,aAAU;AAAA,YACV,WAAU;AAAA,YAEV,UAAA;AAAA,cAAA,gBAAAA,EAAC,KAAA,EAAE,aAAU,wBACX,UAAA;AAAA,gBAAA,gBAAAA,EAAC,QAAA,EAAK,WAAU,8CACb,UAAA;AAAA,kBAAAN;AAAA,kBAAU;AAAA,kBAAEJ;AAAA,kBAAY;AAAA,kBAAEK;AAAA,kBAAQ;AAAA,kBAAEJ;AAAA,kBACpCM;AAAA,gBAAA,GACH;AAAA,gBACA,gBAAAK,EAAC,QAAA,EAAK,WAAU,4CACb,UAAAV,EAAA,CACH;AAAA,cAAA,GACF;AAAA,cACCC,KAAQ,QACP,gBAAAO,EAAC,KAAA,EAAE,aAAU,qBACX,UAAA;AAAA,gBAAA,gBAAAA,EAAC,QAAA,EAAK,WAAU,8CACb,UAAA;AAAA,kBAAAJ;AAAA,kBAAW;AAAA,gBAAA,GACd;AAAA,gBACA,gBAAAM,EAAC,QAAA,EAAK,WAAU,4CACb,UAAAT,EAAA,CACH;AAAA,cAAA,EAAA,CACF;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAKJ,gBAAAS;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,aAAU;AAAA,YACV,WAAU;AAAA,YAET,UAAAb;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAGN;AACAH,EAAQ,cAAc;"}
@@ -0,0 +1,97 @@
1
+ import { jsxs as p, Fragment as m, jsx as d } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import { mergeProps as v } from "@base-ui/react/merge-props";
4
+ import { useRender as f } from "@base-ui/react/use-render";
5
+ import { cva as g } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
6
+ import { cn as x } from "../../../lib/utils.js";
7
+ const b = g(
8
+ "inline-flex items-center gap-[var(--ui-gap-8)] rounded-lg px-[var(--ui-gap-16)] py-[var(--ui-gap-8)] text-sm leading-6 outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)]",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ current: "bg-[var(--ui-background-surface-active)] text-[var(--ui-text-on-surface-primary)]",
13
+ completed: "text-[var(--ui-text-on-surface-primary)]",
14
+ future: "pointer-events-none text-[var(--ui-text-on-surface-disabled)]"
15
+ },
16
+ // Declared as an axis so the variant x state matrix below can key off it;
17
+ // on its own it paints nothing, because only `completed` reacts to it.
18
+ state: {
19
+ idle: "",
20
+ hover: "",
21
+ active: ""
22
+ }
23
+ },
24
+ compoundVariants: [
25
+ {
26
+ variant: "completed",
27
+ state: "hover",
28
+ class: "bg-[var(--ui-background-surface-hover)]"
29
+ },
30
+ {
31
+ variant: "completed",
32
+ state: "active",
33
+ class: "bg-[var(--ui-background-surface-active)]"
34
+ }
35
+ ],
36
+ defaultVariants: {
37
+ variant: "current",
38
+ state: "idle"
39
+ }
40
+ }
41
+ ), h = l.forwardRef(
42
+ ({
43
+ className: i,
44
+ variant: e = "current",
45
+ state: r = "idle",
46
+ avatar: s,
47
+ label: t,
48
+ render: a,
49
+ children: n,
50
+ ...o
51
+ }, u) => {
52
+ const c = {
53
+ "data-slot": "stepper-item",
54
+ "data-variant": e,
55
+ "data-state": r,
56
+ ...e === "future" ? {
57
+ "aria-disabled": !0,
58
+ // `pointer-events-none` only stops the mouse. Without this, a step
59
+ // composed as a real control (`render={<button />}`) would still be
60
+ // reachable by Tab and activatable by Enter/Space, which contradicts
61
+ // what `aria-disabled` promises. A consumer prop still wins — `props`
62
+ // is merged after these.
63
+ tabIndex: -1,
64
+ // ARIA 1.2: `aria-disabled` on an element with no widget role is not
65
+ // announced, and the default rendering here is a plain `<div>`. Give
66
+ // it an explicit role so "unavailable" actually reaches assistive
67
+ // tech — the same fix `BreadcrumbPage` applies to the current-page
68
+ // `<span>`. Skipped when the consumer composes a real element via
69
+ // `render`, which brings its own (correct) role.
70
+ ...a ? {} : { role: "link" }
71
+ } : {}
72
+ };
73
+ return f({
74
+ render: a,
75
+ ref: u,
76
+ defaultTagName: "div",
77
+ props: v(
78
+ {
79
+ ...c,
80
+ className: x(b({ variant: e, state: r }), i),
81
+ children: /* @__PURE__ */ p(m, { children: [
82
+ s,
83
+ t != null && /* @__PURE__ */ d("span", { className: "min-w-0 truncate", children: t }),
84
+ n
85
+ ] })
86
+ },
87
+ o
88
+ )
89
+ });
90
+ }
91
+ );
92
+ h.displayName = "StepperItem";
93
+ export {
94
+ h as StepperItem,
95
+ b as stepperItemVariants
96
+ };
97
+ //# sourceMappingURL=stepper-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stepper-item.js","sources":["../../../../src/components/ui/stepper-item/stepper-item.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\n// One step in a stepper: an Avatar marker (the step's number, icon, or image)\n// followed by the step name. `variant` is the step's structural role in the\n// sequence — `current` (where the user is), `completed` (already passed, and so\n// realistically clickable to jump back), `future` (not reachable yet). `state`\n// is the interaction state, and it only produces a different look on a\n// `completed` step: `current` is always painted in its highlighted look and\n// `future` is always painted disabled, which is exactly what the Figma component\n// set models — only five state x variant combos exist there\n// (active+current, idle/hover/active+completed, disabled+future).\n//\n// The Avatar is fully consumer-supplied and consumer-styled: this component\n// renders the element it is given verbatim and never sizes, tints, or recolors\n// it. That is why the Figma variables that color the digit *inside* the circle\n// (`components/Stepper/Item/{current,future}/label/color/*`) are deliberately\n// not consumed here — they belong to whatever the caller puts in the `avatar`\n// slot.\n//\n// ── Token substitution (placeholder — re-point once design ships the tier) ──\n// The design references `components/Stepper/Item/*`, which is not \"ready for\n// dev\": there is no `--ui-stepper-item-*` tier in @acronis-platform/tokens-pd\n// (a grep for `Stepper` across tokens-pd and the design-tokens source returns\n// nothing). Rather than hand-author values, this consumes the semantic/generic\n// tokens whose *resolved* value in `packages/tokens-pd/css/default.css` matches\n// the Figma variable exactly — verified value-by-value:\n//\n// components/Stepper/Item/_global/container/gap (8px) -> --ui-gap-8\n// components/Stepper/Item/_global/container/paddingY (8px) -> --ui-gap-8\n// (padding-x came through Figma as the generic `gap/gap-16`) -> --ui-gap-16\n// components/Stepper/Item/_global/container/borderRadius (8px) -> `rounded-lg`\n// components/Stepper/Item/_global/container/color/active (#e2ebf5) -> --ui-background-surface-active\n// components/Stepper/Item/_global/container/color/hover (#eef2f7) -> --ui-background-surface-hover\n// semantics/colors/text/onSurface/primary (#18191b) -> --ui-text-on-surface-primary\n// semantics/colors/text/onSurface/disabled (#afb2b6) -> --ui-text-on-surface-disabled\n//\n// The radius is the one exception that stays a static Tailwind utility: tokens-pd\n// has no generic radius scale at all — every `*border-radius*` token is\n// component-owned (e.g. `--ui-card-filter-global-container-border-radius`) — so\n// there is nothing honest to point at, and inventing a token name would be worse\n// than an 8px utility. Figma also defines three separate\n// `completed/label/color/{idle,hover,active}` variables, but all three carry the\n// identical `#18191b`, so the single semantic token covers them faithfully.\n//\n// `focus-visible` lives on the base class rather than a variant: the default\n// `<div>` is never focusable, so the ring only ever appears on a step composed\n// as a real control via `render` — the same 3px `--ui-focus-primary` ring\n// `CardFilter` and `BreadcrumbLink` use.\nconst stepperItemVariants = cva(\n 'inline-flex items-center gap-[var(--ui-gap-8)] rounded-lg px-[var(--ui-gap-16)] py-[var(--ui-gap-8)] text-sm leading-6 outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)]',\n {\n variants: {\n variant: {\n current:\n 'bg-[var(--ui-background-surface-active)] text-[var(--ui-text-on-surface-primary)]',\n completed: 'text-[var(--ui-text-on-surface-primary)]',\n future:\n 'pointer-events-none text-[var(--ui-text-on-surface-disabled)]',\n },\n // Declared as an axis so the variant x state matrix below can key off it;\n // on its own it paints nothing, because only `completed` reacts to it.\n state: {\n idle: '',\n hover: '',\n active: '',\n },\n },\n compoundVariants: [\n {\n variant: 'completed',\n state: 'hover',\n class: 'bg-[var(--ui-background-surface-hover)]',\n },\n {\n variant: 'completed',\n state: 'active',\n class: 'bg-[var(--ui-background-surface-active)]',\n },\n ],\n defaultVariants: {\n variant: 'current',\n state: 'idle',\n },\n }\n);\n\n/** Kept in lockstep with the `cva` axes above. */\nexport type StepperItemVariant = NonNullable<\n VariantProps<typeof stepperItemVariants>['variant']\n>;\nexport type StepperItemState = NonNullable<\n VariantProps<typeof stepperItemVariants>['state']\n>;\n\nexport interface StepperItemProps\n extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * The step's structural role in the sequence. Drives the container background\n * and the label color. Defaults to `current` for prop ergonomics — in a real\n * sequence every step declares its own.\n */\n variant?: StepperItemVariant;\n /**\n * Interaction state. Only produces a different look when `variant` is\n * `completed` (`idle` has no background, `hover` and `active` paint one).\n * Ignored for `current`, which always renders in its highlighted look, and for\n * `future`, which always renders disabled and non-interactive.\n */\n state?: StepperItemState;\n /**\n * The step's marker — required, and entirely the caller's to compose. Pass any\n * `Avatar` composition (color scheme, initials / icon / image, size overrides);\n * this component renders it verbatim and never styles it.\n */\n avatar: React.ReactElement;\n /** The step name. */\n label?: React.ReactNode;\n /**\n * Replace the rendered `<div>` with another element or component (Base UI\n * composition) — e.g. a `<button>`, since a completed step is usually a way\n * back to an earlier step.\n */\n render?: useRender.RenderProp;\n}\n\nconst StepperItem = React.forwardRef<HTMLDivElement, StepperItemProps>(\n (\n {\n className,\n variant = 'current',\n state = 'idle',\n avatar,\n label,\n render,\n children,\n ...props\n },\n ref\n ) => {\n // Hoisted out of the `mergeProps` literal: `data-*` keys aren't part of the\n // Base UI element prop type, so they only pass the excess-property check\n // when spread in (same shape as CardFilter's `data-selected`).\n const attributes = {\n 'data-slot': 'stepper-item',\n 'data-variant': variant,\n 'data-state': state,\n ...(variant === 'future'\n ? {\n 'aria-disabled': true,\n // `pointer-events-none` only stops the mouse. Without this, a step\n // composed as a real control (`render={<button />}`) would still be\n // reachable by Tab and activatable by Enter/Space, which contradicts\n // what `aria-disabled` promises. A consumer prop still wins — `props`\n // is merged after these.\n tabIndex: -1,\n // ARIA 1.2: `aria-disabled` on an element with no widget role is not\n // announced, and the default rendering here is a plain `<div>`. Give\n // it an explicit role so \"unavailable\" actually reaches assistive\n // tech — the same fix `BreadcrumbPage` applies to the current-page\n // `<span>`. Skipped when the consumer composes a real element via\n // `render`, which brings its own (correct) role.\n ...(render ? {} : { role: 'link' }),\n }\n : {}),\n };\n\n return useRender({\n render,\n ref,\n defaultTagName: 'div',\n props: mergeProps<'div'>(\n {\n ...attributes,\n className: cn(stepperItemVariants({ variant, state }), className),\n children: (\n <>\n {avatar}\n {label != null && (\n <span className=\"min-w-0 truncate\">{label}</span>\n )}\n {children}\n </>\n ),\n },\n props\n ),\n });\n }\n);\nStepperItem.displayName = 'StepperItem';\n\nexport { StepperItem, stepperItemVariants };\n"],"names":["stepperItemVariants","cva","StepperItem","React","className","variant","state","avatar","label","render","children","props","ref","attributes","useRender","mergeProps","cn","jsxs","Fragment","jsx"],"mappings":";;;;;;AAuDA,MAAMA,IAAsBC;AAAA,EAC1B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,WAAW;AAAA,QACX,QACE;AAAA,MAAA;AAAA;AAAA;AAAA,MAIJ,OAAO;AAAA,QACL,MAAM;AAAA,QACN,OAAO;AAAA,QACP,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,IAEF,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,OAAO;AAAA,QACP,OAAO;AAAA,MAAA;AAAA,MAET;AAAA,QACE,SAAS;AAAA,QACT,OAAO;AAAA,QACP,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,OAAO;AAAA,IAAA;AAAA,EACT;AAEJ,GAyCMC,IAAcC,EAAM;AAAA,EACxB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,OAAAC,IAAQ;AAAA,IACR,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AAIH,UAAMC,IAAa;AAAA,MACjB,aAAa;AAAA,MACb,gBAAgBR;AAAA,MAChB,cAAcC;AAAA,MACd,GAAID,MAAY,WACZ;AAAA,QACE,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMjB,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAOV,GAAII,IAAS,CAAA,IAAK,EAAE,MAAM,OAAA;AAAA,MAAO,IAEnC,CAAA;AAAA,IAAC;AAGP,WAAOK,EAAU;AAAA,MACf,QAAAL;AAAA,MACA,KAAAG;AAAA,MACA,gBAAgB;AAAA,MAChB,OAAOG;AAAA,QACL;AAAA,UACE,GAAGF;AAAA,UACH,WAAWG,EAAGhB,EAAoB,EAAE,SAAAK,GAAS,OAAAC,EAAA,CAAO,GAAGF,CAAS;AAAA,UAChE,UACE,gBAAAa,EAAAC,GAAA,EACG,UAAA;AAAA,YAAAX;AAAA,YACAC,KAAS,QACR,gBAAAW,EAAC,QAAA,EAAK,WAAU,oBAAoB,UAAAX,GAAM;AAAA,YAE3CE;AAAA,UAAA,EAAA,CACH;AAAA,QAAA;AAAA,QAGJC;AAAA,MAAA;AAAA,IACF,CACD;AAAA,EACH;AACF;AACAT,EAAY,cAAc;"}
@@ -1,88 +1,95 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import * as b from "react";
3
- import { ChevronFirstIcon as x, ChevronLeftIcon as g, ChevronRightIcon as y, ChevronLastIcon as $ } from "@acronis-platform/icons-react/stroke-mono";
4
- import { cn as S } from "../../../lib/utils.js";
5
- import { InputSelect as j, InputSelectTrigger as k, InputSelectValue as w, InputSelectContent as C, InputSelectItem as G } from "../input-select/input-select.js";
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import * as S from "react";
3
+ import { ChevronFirstIcon as j, ChevronLeftIcon as k, ChevronRightIcon as G, ChevronLastIcon as I } from "@acronis-platform/icons-react/stroke-mono";
4
+ import { cn as R } from "../../../lib/utils.js";
5
+ import { InputSelect as T, InputSelectTrigger as V, InputSelectValue as B, InputSelectContent as F, InputSelectItem as L } from "../input-select/input-select.js";
6
6
  import { ButtonIcon as c } from "../button-icon/button-icon.js";
7
- const I = b.forwardRef(
7
+ const q = S.forwardRef(
8
8
  ({
9
9
  className: d,
10
- pageIndex: l,
11
- pageCount: i,
10
+ pageIndex: i,
11
+ pageCount: s,
12
12
  pageSize: f,
13
13
  pageSizeOptions: p = [10, 20, 30, 40, 50],
14
- totalRows: n,
15
- selectedRows: s,
16
- onPageIndexChange: t,
14
+ totalRows: o,
15
+ selectedRows: h,
16
+ onPageIndexChange: n,
17
17
  onPageSizeChange: u,
18
- ...h
19
- }, v) => {
20
- const o = l > 0, m = l < i - 1, N = s != null && n != null ? `${s} of ${n} row(s) selected.` : n != null ? `${n} row(s).` : null;
21
- return /* @__PURE__ */ r(
18
+ rowsPerPageLabel: m = "Rows per page",
19
+ firstPageLabel: v = "Go to first page",
20
+ previousPageLabel: N = "Go to previous page",
21
+ nextPageLabel: x = "Go to next page",
22
+ lastPageLabel: b = "Go to last page",
23
+ pageLabel: g = (a, l) => l === 0 ? "No pages" : `Page ${a} of ${l}`,
24
+ summaryLabel: y = (a, l) => a != null ? `${a} of ${l} row(s) selected.` : `${l} row(s).`,
25
+ ...$
26
+ }, w) => {
27
+ const a = i > 0, l = i < s - 1, C = o != null ? y(h, o) : null;
28
+ return /* @__PURE__ */ t(
22
29
  "div",
23
30
  {
24
- ref: v,
25
- className: S("flex items-center justify-between px-2", d),
26
- ...h,
31
+ ref: w,
32
+ className: R("flex items-center justify-between px-2", d),
33
+ ...$,
27
34
  children: [
28
- /* @__PURE__ */ e("div", { className: "flex-1 text-sm text-muted-foreground", children: N }),
29
- /* @__PURE__ */ r("div", { className: "flex items-center gap-6 lg:gap-8", children: [
30
- /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
31
- /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "Rows per page" }),
32
- /* @__PURE__ */ r(
33
- j,
35
+ /* @__PURE__ */ e("div", { className: "flex-1 text-sm text-muted-foreground", children: C }),
36
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-6 lg:gap-8", children: [
37
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
38
+ /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: m }),
39
+ /* @__PURE__ */ t(
40
+ T,
34
41
  {
35
42
  value: `${f}`,
36
- onValueChange: (a) => u(Number(a)),
43
+ onValueChange: (r) => u(Number(r)),
37
44
  children: [
38
- /* @__PURE__ */ e(k, { "aria-label": "Rows per page", className: "h-8 w-[70px]", children: /* @__PURE__ */ e(w, {}) }),
39
- /* @__PURE__ */ e(C, { children: p.map((a) => /* @__PURE__ */ e(G, { value: `${a}`, children: a }, a)) })
45
+ /* @__PURE__ */ e(V, { "aria-label": m, className: "h-8 w-[70px]", children: /* @__PURE__ */ e(B, {}) }),
46
+ /* @__PURE__ */ e(F, { children: p.map((r) => /* @__PURE__ */ e(L, { value: `${r}`, children: r }, r)) })
40
47
  ]
41
48
  }
42
49
  )
43
50
  ] }),
44
- /* @__PURE__ */ e("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: i === 0 ? "No pages" : `Page ${l + 1} of ${i}` }),
45
- /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
51
+ /* @__PURE__ */ e("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: g(i + 1, s) }),
52
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
46
53
  /* @__PURE__ */ e(
47
54
  c,
48
55
  {
49
56
  variant: "secondary",
50
- "aria-label": "Go to first page",
57
+ "aria-label": v,
51
58
  className: "hidden lg:inline-flex",
52
- onClick: () => t(0),
53
- disabled: !o,
54
- children: /* @__PURE__ */ e(x, {})
59
+ onClick: () => n(0),
60
+ disabled: !a,
61
+ children: /* @__PURE__ */ e(j, {})
55
62
  }
56
63
  ),
57
64
  /* @__PURE__ */ e(
58
65
  c,
59
66
  {
60
67
  variant: "secondary",
61
- "aria-label": "Go to previous page",
62
- onClick: () => t(l - 1),
63
- disabled: !o,
64
- children: /* @__PURE__ */ e(g, {})
68
+ "aria-label": N,
69
+ onClick: () => n(i - 1),
70
+ disabled: !a,
71
+ children: /* @__PURE__ */ e(k, {})
65
72
  }
66
73
  ),
67
74
  /* @__PURE__ */ e(
68
75
  c,
69
76
  {
70
77
  variant: "secondary",
71
- "aria-label": "Go to next page",
72
- onClick: () => t(l + 1),
73
- disabled: !m,
74
- children: /* @__PURE__ */ e(y, {})
78
+ "aria-label": x,
79
+ onClick: () => n(i + 1),
80
+ disabled: !l,
81
+ children: /* @__PURE__ */ e(G, {})
75
82
  }
76
83
  ),
77
84
  /* @__PURE__ */ e(
78
85
  c,
79
86
  {
80
87
  variant: "secondary",
81
- "aria-label": "Go to last page",
88
+ "aria-label": b,
82
89
  className: "hidden lg:inline-flex",
83
- onClick: () => t(i - 1),
84
- disabled: !m,
85
- children: /* @__PURE__ */ e($, {})
90
+ onClick: () => n(s - 1),
91
+ disabled: !l,
92
+ children: /* @__PURE__ */ e(I, {})
86
93
  }
87
94
  )
88
95
  ] })
@@ -92,8 +99,8 @@ const I = b.forwardRef(
92
99
  );
93
100
  }
94
101
  );
95
- I.displayName = "TablePagination";
102
+ q.displayName = "TablePagination";
96
103
  export {
97
- I as TablePagination
104
+ q as TablePagination
98
105
  };
99
106
  //# sourceMappingURL=table-pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-pagination.js","sources":["../../../../src/components/ui/table/table-pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n ChevronFirstIcon,\n ChevronLastIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n} from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\n\nimport { ButtonIcon } from '../button-icon';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '../select';\n\nexport interface TablePaginationProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {\n /** Zero-based index of the current page. */\n pageIndex: number;\n /** Total number of pages. */\n pageCount: number;\n /** Number of rows shown per page. */\n pageSize: number;\n /** Page-size options offered in the rows-per-page select. */\n pageSizeOptions?: number[];\n /** Total number of rows across all pages (drives the summary text). */\n totalRows?: number;\n /** Number of currently selected rows (drives the selection summary text). */\n selectedRows?: number;\n /** Invoked with the next zero-based page index. */\n onPageIndexChange: (pageIndex: number) => void;\n /** Invoked with the next page size. */\n onPageSizeChange: (pageSize: number) => void;\n}\n\n// TanStack-independent twin of `DataTablePagination` — same visual design\n// (first/prev/next/last + rows-per-page select + page-count text, no numbered\n// button window) driven by plain props so it can pair with the `Table`\n// primitives without pulling in `@tanstack/react-table`.\nconst TablePagination = React.forwardRef<HTMLDivElement, TablePaginationProps>(\n (\n {\n className,\n pageIndex,\n pageCount,\n pageSize,\n pageSizeOptions = [10, 20, 30, 40, 50],\n totalRows,\n selectedRows,\n onPageIndexChange,\n onPageSizeChange,\n ...props\n },\n ref\n ) => {\n const canPrevious = pageIndex > 0;\n const canNext = pageIndex < pageCount - 1;\n\n const summary =\n selectedRows != null && totalRows != null\n ? `${selectedRows} of ${totalRows} row(s) selected.`\n : totalRows != null\n ? `${totalRows} row(s).`\n : null;\n\n return (\n <div\n ref={ref}\n className={cn('flex items-center justify-between px-2', className)}\n {...props}\n >\n <div className=\"flex-1 text-sm text-muted-foreground\">{summary}</div>\n <div className=\"flex items-center gap-6 lg:gap-8\">\n <div className=\"flex items-center gap-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={`${pageSize}`}\n onValueChange={(value) => onPageSizeChange(Number(value))}\n >\n <SelectTrigger aria-label=\"Rows per page\" className=\"h-8 w-[70px]\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {pageSizeOptions.map((option) => (\n <SelectItem key={option} value={`${option}`}>\n {option}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-[100px] items-center justify-center text-sm font-medium\">\n {pageCount === 0 ? 'No pages' : `Page ${pageIndex + 1} of ${pageCount}`}\n </div>\n <div className=\"flex items-center gap-2\">\n <ButtonIcon\n variant=\"secondary\"\n aria-label=\"Go to first page\"\n className=\"hidden lg:inline-flex\"\n onClick={() => onPageIndexChange(0)}\n disabled={!canPrevious}\n >\n <ChevronFirstIcon />\n </ButtonIcon>\n <ButtonIcon\n variant=\"secondary\"\n aria-label=\"Go to previous page\"\n onClick={() => onPageIndexChange(pageIndex - 1)}\n disabled={!canPrevious}\n >\n <ChevronLeftIcon />\n </ButtonIcon>\n <ButtonIcon\n variant=\"secondary\"\n aria-label=\"Go to next page\"\n onClick={() => onPageIndexChange(pageIndex + 1)}\n disabled={!canNext}\n >\n <ChevronRightIcon />\n </ButtonIcon>\n <ButtonIcon\n variant=\"secondary\"\n aria-label=\"Go to last page\"\n className=\"hidden lg:inline-flex\"\n onClick={() => onPageIndexChange(pageCount - 1)}\n disabled={!canNext}\n >\n <ChevronLastIcon />\n </ButtonIcon>\n </div>\n </div>\n </div>\n );\n }\n);\nTablePagination.displayName = 'TablePagination';\n\nexport { TablePagination };\n"],"names":["TablePagination","React","className","pageIndex","pageCount","pageSize","pageSizeOptions","totalRows","selectedRows","onPageIndexChange","onPageSizeChange","props","ref","canPrevious","canNext","summary","jsxs","cn","jsx","Select","value","SelectTrigger","SelectValue","SelectContent","option","SelectItem","ButtonIcon","ChevronFirstIcon","ChevronLeftIcon","ChevronRightIcon","ChevronLastIcon"],"mappings":"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"}
1
+ {"version":3,"file":"table-pagination.js","sources":["../../../../src/components/ui/table/table-pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n ChevronFirstIcon,\n ChevronLastIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n} from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\n\nimport { ButtonIcon } from '../button-icon';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '../select';\n\nexport interface TablePaginationProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {\n /** Zero-based index of the current page. */\n pageIndex: number;\n /** Total number of pages. */\n pageCount: number;\n /** Number of rows shown per page. */\n pageSize: number;\n /** Page-size options offered in the rows-per-page select. */\n pageSizeOptions?: number[];\n /** Total number of rows across all pages (drives the summary text). */\n totalRows?: number;\n /** Number of currently selected rows (drives the selection summary text). */\n selectedRows?: number;\n /** Invoked with the next zero-based page index. */\n onPageIndexChange: (pageIndex: number) => void;\n /** Invoked with the next page size. */\n onPageSizeChange: (pageSize: number) => void;\n /** Label of the rows-per-page select (also its accessible name). */\n rowsPerPageLabel?: string;\n /** Accessible name of the first-page control. */\n firstPageLabel?: string;\n /** Accessible name of the previous-page control. */\n previousPageLabel?: string;\n /** Accessible name of the next-page control. */\n nextPageLabel?: string;\n /** Accessible name of the last-page control. */\n lastPageLabel?: string;\n /**\n * Builds the page indicator. Receives the 1-based page number and the total\n * page count; `pageCount === 0` means there are no pages.\n */\n pageLabel?: (page: number, pageCount: number) => string;\n /**\n * Builds the leading row summary. Receives the selected-row count (or\n * `undefined` when selection isn't tracked) and the total row count. Return\n * `null` for no summary.\n */\n summaryLabel?: (\n selectedRows: number | undefined,\n totalRows: number\n ) => string | null;\n}\n\n// TanStack-independent twin of `DataTablePagination` — same visual design\n// (first/prev/next/last + rows-per-page select + page-count text, no numbered\n// button window) driven by plain props so it can pair with the `Table`\n// primitives without pulling in `@tanstack/react-table`.\nconst TablePagination = React.forwardRef<HTMLDivElement, TablePaginationProps>(\n (\n {\n className,\n pageIndex,\n pageCount,\n pageSize,\n pageSizeOptions = [10, 20, 30, 40, 50],\n totalRows,\n selectedRows,\n onPageIndexChange,\n onPageSizeChange,\n rowsPerPageLabel = 'Rows per page',\n firstPageLabel = 'Go to first page',\n previousPageLabel = 'Go to previous page',\n nextPageLabel = 'Go to next page',\n lastPageLabel = 'Go to last page',\n pageLabel = (page, count) =>\n count === 0 ? 'No pages' : `Page ${page} of ${count}`,\n summaryLabel = (selected, total) =>\n selected != null\n ? `${selected} of ${total} row(s) selected.`\n : `${total} row(s).`,\n ...props\n },\n ref\n ) => {\n const canPrevious = pageIndex > 0;\n const canNext = pageIndex < pageCount - 1;\n\n const summary =\n totalRows != null ? summaryLabel(selectedRows, totalRows) : null;\n\n return (\n <div\n ref={ref}\n className={cn('flex items-center justify-between px-2', className)}\n {...props}\n >\n <div className=\"flex-1 text-sm text-muted-foreground\">{summary}</div>\n <div className=\"flex items-center gap-6 lg:gap-8\">\n <div className=\"flex items-center gap-2\">\n <p className=\"text-sm font-medium\">{rowsPerPageLabel}</p>\n <Select\n value={`${pageSize}`}\n onValueChange={(value) => onPageSizeChange(Number(value))}\n >\n <SelectTrigger aria-label={rowsPerPageLabel} className=\"h-8 w-[70px]\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {pageSizeOptions.map((option) => (\n <SelectItem key={option} value={`${option}`}>\n {option}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-[100px] items-center justify-center text-sm font-medium\">\n {pageLabel(pageIndex + 1, pageCount)}\n </div>\n <div className=\"flex items-center gap-2\">\n <ButtonIcon\n variant=\"secondary\"\n aria-label={firstPageLabel}\n className=\"hidden lg:inline-flex\"\n onClick={() => onPageIndexChange(0)}\n disabled={!canPrevious}\n >\n <ChevronFirstIcon />\n </ButtonIcon>\n <ButtonIcon\n variant=\"secondary\"\n aria-label={previousPageLabel}\n onClick={() => onPageIndexChange(pageIndex - 1)}\n disabled={!canPrevious}\n >\n <ChevronLeftIcon />\n </ButtonIcon>\n <ButtonIcon\n variant=\"secondary\"\n aria-label={nextPageLabel}\n onClick={() => onPageIndexChange(pageIndex + 1)}\n disabled={!canNext}\n >\n <ChevronRightIcon />\n </ButtonIcon>\n <ButtonIcon\n variant=\"secondary\"\n aria-label={lastPageLabel}\n className=\"hidden lg:inline-flex\"\n onClick={() => onPageIndexChange(pageCount - 1)}\n disabled={!canNext}\n >\n <ChevronLastIcon />\n </ButtonIcon>\n </div>\n </div>\n </div>\n );\n }\n);\nTablePagination.displayName = 'TablePagination';\n\nexport { TablePagination };\n"],"names":["TablePagination","React","className","pageIndex","pageCount","pageSize","pageSizeOptions","totalRows","selectedRows","onPageIndexChange","onPageSizeChange","rowsPerPageLabel","firstPageLabel","previousPageLabel","nextPageLabel","lastPageLabel","pageLabel","page","count","summaryLabel","selected","total","props","ref","canPrevious","canNext","summary","jsxs","cn","jsx","Select","value","SelectTrigger","SelectValue","SelectContent","option","SelectItem","ButtonIcon","ChevronFirstIcon","ChevronLeftIcon","ChevronRightIcon","ChevronLastIcon"],"mappings":"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"}
@@ -1,41 +1,54 @@
1
- import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
- import { CogIcon as d, CheckIcon as t } from "@acronis-platform/icons-react/stroke-mono";
3
- import { DropdownMenu as p, DropdownMenuTrigger as s, DropdownMenuContent as c, DropdownMenuGroup as l, DropdownMenuItem as h } from "../dropdown-menu/dropdown-menu.js";
4
- import { Button as m } from "../button/button.js";
5
- function w({
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { CogIcon as s } from "@acronis-platform/icons-react/stroke-mono";
3
+ import { DropdownMenu as p, DropdownMenuTrigger as c, DropdownMenuContent as l, DropdownMenuGroup as m, DropdownMenuItem as h } from "../dropdown-menu/dropdown-menu.js";
4
+ import { ButtonIcon as f } from "../button-icon/button-icon.js";
5
+ import { Button as u } from "../button/button.js";
6
+ import { Checkbox as w } from "../checkbox/checkbox.js";
7
+ function b({
6
8
  columns: i,
7
- onToggle: o,
8
- triggerLabel: a = "View"
9
+ onToggle: a,
10
+ triggerLabel: t = "View",
11
+ iconOnly: o = !1,
12
+ triggerAriaLabel: d = "Column settings"
9
13
  }) {
10
14
  return /* @__PURE__ */ r(p, { children: [
11
15
  /* @__PURE__ */ r(
12
- s,
16
+ c,
13
17
  {
14
- render: /* @__PURE__ */ n(m, { variant: "secondary", className: "h-8 shrink-0 gap-2" }),
18
+ render: o ? /* @__PURE__ */ e(f, { "aria-label": d }) : /* @__PURE__ */ e(u, { variant: "secondary", className: "h-8 shrink-0 gap-2" }),
15
19
  children: [
16
- /* @__PURE__ */ n(d, {}),
17
- a
20
+ /* @__PURE__ */ e(s, {}),
21
+ !o && t
18
22
  ]
19
23
  }
20
24
  ),
21
- /* @__PURE__ */ n(c, { align: "end", className: "w-[150px]", children: /* @__PURE__ */ n(l, { children: i.map((e) => /* @__PURE__ */ r(
25
+ /* @__PURE__ */ e(l, { align: "end", className: "w-[150px]", children: /* @__PURE__ */ e(m, { children: i.map((n) => /* @__PURE__ */ r(
22
26
  h,
23
27
  {
24
28
  role: "menuitemcheckbox",
25
- "aria-checked": !e.hidden,
29
+ "aria-checked": !n.hidden,
26
30
  closeOnClick: !1,
27
- onClick: () => o(e.id),
31
+ onClick: () => a(n.id),
32
+ className: "items-center",
28
33
  children: [
29
- e.label,
30
- !e.hidden && /* @__PURE__ */ n(t, { className: "ms-auto", "aria-hidden": !0 })
34
+ /* @__PURE__ */ e(
35
+ w,
36
+ {
37
+ checked: !n.hidden,
38
+ "aria-hidden": !0,
39
+ tabIndex: -1,
40
+ className: "pointer-events-none"
41
+ }
42
+ ),
43
+ n.label
31
44
  ]
32
45
  },
33
- e.id
46
+ n.id
34
47
  )) }) })
35
48
  ] });
36
49
  }
37
- w.displayName = "TableViewOptions";
50
+ b.displayName = "TableViewOptions";
38
51
  export {
39
- w as TableViewOptions
52
+ b as TableViewOptions
40
53
  };
41
54
  //# sourceMappingURL=table-view-options.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-view-options.js","sources":["../../../../src/components/ui/table/table-view-options.tsx"],"sourcesContent":["import * as React from 'react';\nimport { CheckIcon, CogIcon } from '@acronis-platform/icons-react/stroke-mono';\n\nimport { Button } from '../button';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '../dropdown-menu';\n\nexport interface TableColumnVisibility {\n /** Stable column identifier. */\n id: string;\n /** Human-readable label shown in the menu. */\n label: string;\n /** Whether the column is currently hidden. */\n hidden: boolean;\n}\n\nexport interface TableViewOptionsProps {\n /** The toggleable columns and their current visibility. */\n columns: TableColumnVisibility[];\n /** Invoked with the column id whose visibility was toggled. */\n onToggle: (id: string) => void;\n /** Trigger label. Defaults to `View`. */\n triggerLabel?: React.ReactNode;\n}\n\n// TanStack-independent show/hide-columns dropdown extracted from\n// `DataTableViewOptions`'s UI. Driven by a plain `{ id, label, hidden }[]` +\n// `onToggle`, so it pairs with the `Table` primitives; `DataTableViewOptions`\n// can later become a thin TanStack adapter over this part.\nfunction TableViewOptions({\n columns,\n onToggle,\n triggerLabel = 'View',\n}: TableViewOptionsProps) {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n render={<Button variant=\"secondary\" className=\"h-8 shrink-0 gap-2\" />}\n >\n <CogIcon />\n {triggerLabel}\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-[150px]\">\n <DropdownMenuGroup>\n {columns.map((column) => (\n <DropdownMenuItem\n key={column.id}\n role=\"menuitemcheckbox\"\n aria-checked={!column.hidden}\n closeOnClick={false}\n onClick={() => onToggle(column.id)}\n >\n {column.label}\n {!column.hidden && <CheckIcon className=\"ms-auto\" aria-hidden />}\n </DropdownMenuItem>\n ))}\n </DropdownMenuGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\nTableViewOptions.displayName = 'TableViewOptions';\n\nexport { TableViewOptions };\n"],"names":["TableViewOptions","columns","onToggle","triggerLabel","DropdownMenu","jsxs","DropdownMenuTrigger","jsx","Button","CogIcon","DropdownMenuContent","DropdownMenuGroup","column","DropdownMenuItem","CheckIcon"],"mappings":";;;;AAkCA,SAASA,EAAiB;AAAA,EACxB,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC,IAAe;AACjB,GAA0B;AACxB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,QAAQ,gBAAAC,EAACC,GAAA,EAAO,SAAQ,aAAY,WAAU,sBAAqB;AAAA,QAEnE,UAAA;AAAA,UAAA,gBAAAD,EAACE,GAAA,EAAQ;AAAA,UACRN;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAEH,gBAAAI,EAACG,GAAA,EAAoB,OAAM,OAAM,WAAU,aACzC,UAAA,gBAAAH,EAACI,GAAA,EACE,UAAAV,EAAQ,IAAI,CAACW,MACZ,gBAAAP;AAAA,MAACQ;AAAA,MAAA;AAAA,QAEC,MAAK;AAAA,QACL,gBAAc,CAACD,EAAO;AAAA,QACtB,cAAc;AAAA,QACd,SAAS,MAAMV,EAASU,EAAO,EAAE;AAAA,QAEhC,UAAA;AAAA,UAAAA,EAAO;AAAA,UACP,CAACA,EAAO,UAAU,gBAAAL,EAACO,KAAU,WAAU,WAAU,eAAW,GAAA,CAAC;AAAA,QAAA;AAAA,MAAA;AAAA,MAPzDF,EAAO;AAAA,IAAA,CASf,GACH,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;AACAZ,EAAiB,cAAc;"}
1
+ {"version":3,"file":"table-view-options.js","sources":["../../../../src/components/ui/table/table-view-options.tsx"],"sourcesContent":["import * as React from 'react';\nimport { CogIcon } from '@acronis-platform/icons-react/stroke-mono';\n\nimport { Button } from '../button';\nimport { ButtonIcon } from '../button-icon';\nimport { Checkbox } from '../checkbox';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '../dropdown-menu';\n\nexport interface TableColumnVisibility {\n /** Stable column identifier. */\n id: string;\n /** Human-readable label shown in the menu. */\n label: string;\n /** Whether the column is currently hidden. */\n hidden: boolean;\n}\n\nexport interface TableViewOptionsProps {\n /** The toggleable columns and their current visibility. */\n columns: TableColumnVisibility[];\n /** Invoked with the column id whose visibility was toggled. */\n onToggle: (id: string) => void;\n /** Trigger label. Defaults to `View`. Ignored when `iconOnly`. */\n triggerLabel?: React.ReactNode;\n /**\n * Render the trigger as a cog-only icon button instead of a labelled\n * `Button` — the shape that fits the 48px `TableSettingsCell` column.\n */\n iconOnly?: boolean;\n /** Accessible name of the `iconOnly` trigger. Override to localize. */\n triggerAriaLabel?: string;\n}\n\n// TanStack-independent show/hide-columns dropdown extracted from\n// `DataTableViewOptions`'s UI. Driven by a plain `{ id, label, hidden }[]` +\n// `onToggle`, so it pairs with the `Table` primitives; `DataTableViewOptions`\n// can later become a thin TanStack adapter over this part.\n//\n// Each row shows a real `Checkbox` box beside the column name, per the design.\n// That box is presentation only (`aria-hidden`, not focusable, click-through):\n// the accessible control is the `menuitemcheckbox` row itself, which carries\n// `aria-checked` and the click handler.\nfunction TableViewOptions({\n columns,\n onToggle,\n triggerLabel = 'View',\n iconOnly = false,\n triggerAriaLabel = 'Column settings',\n}: TableViewOptionsProps) {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n iconOnly ? (\n <ButtonIcon aria-label={triggerAriaLabel} />\n ) : (\n <Button variant=\"secondary\" className=\"h-8 shrink-0 gap-2\" />\n )\n }\n >\n <CogIcon />\n {!iconOnly && triggerLabel}\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-[150px]\">\n <DropdownMenuGroup>\n {columns.map((column) => (\n <DropdownMenuItem\n key={column.id}\n role=\"menuitemcheckbox\"\n aria-checked={!column.hidden}\n closeOnClick={false}\n onClick={() => onToggle(column.id)}\n className=\"items-center\"\n >\n <Checkbox\n checked={!column.hidden}\n aria-hidden\n tabIndex={-1}\n className=\"pointer-events-none\"\n />\n {column.label}\n </DropdownMenuItem>\n ))}\n </DropdownMenuGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\nTableViewOptions.displayName = 'TableViewOptions';\n\nexport { TableViewOptions };\n"],"names":["TableViewOptions","columns","onToggle","triggerLabel","iconOnly","triggerAriaLabel","DropdownMenu","jsxs","DropdownMenuTrigger","jsx","ButtonIcon","Button","CogIcon","DropdownMenuContent","DropdownMenuGroup","column","DropdownMenuItem","Checkbox"],"mappings":";;;;;;AAgDA,SAASA,EAAiB;AAAA,EACxB,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,UAAAC,IAAW;AAAA,EACX,kBAAAC,IAAmB;AACrB,GAA0B;AACxB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,QACEJ,IACE,gBAAAK,EAACC,GAAA,EAAW,cAAYL,EAAA,CAAkB,IAE1C,gBAAAI,EAACE,GAAA,EAAO,SAAQ,aAAY,WAAU,qBAAA,CAAqB;AAAA,QAI/D,UAAA;AAAA,UAAA,gBAAAF,EAACG,GAAA,EAAQ;AAAA,UACR,CAACR,KAAYD;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAEhB,gBAAAM,EAACI,GAAA,EAAoB,OAAM,OAAM,WAAU,aACzC,UAAA,gBAAAJ,EAACK,GAAA,EACE,UAAAb,EAAQ,IAAI,CAACc,MACZ,gBAAAR;AAAA,MAACS;AAAA,MAAA;AAAA,QAEC,MAAK;AAAA,QACL,gBAAc,CAACD,EAAO;AAAA,QACtB,cAAc;AAAA,QACd,SAAS,MAAMb,EAASa,EAAO,EAAE;AAAA,QACjC,WAAU;AAAA,QAEV,UAAA;AAAA,UAAA,gBAAAN;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,SAAS,CAACF,EAAO;AAAA,cACjB,eAAW;AAAA,cACX,UAAU;AAAA,cACV,WAAU;AAAA,YAAA;AAAA,UAAA;AAAA,UAEXA,EAAO;AAAA,QAAA;AAAA,MAAA;AAAA,MAbHA,EAAO;AAAA,IAAA,CAef,GACH,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;AACAf,EAAiB,cAAc;"}