@acronis-platform/ui-react 0.61.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/dist/components/ui/alert/alert.js +115 -57
  2. package/dist/components/ui/alert/alert.js.map +1 -1
  3. package/dist/components/ui/button-group/button-group.js +57 -0
  4. package/dist/components/ui/button-group/button-group.js.map +1 -0
  5. package/dist/components/ui/button-icon-menu/button-icon-menu.js +26 -0
  6. package/dist/components/ui/button-icon-menu/button-icon-menu.js.map +1 -0
  7. package/dist/components/ui/calendar-panel/calendar-panel-utils.js +63 -0
  8. package/dist/components/ui/calendar-panel/calendar-panel-utils.js.map +1 -0
  9. package/dist/components/ui/calendar-panel/calendar-panel.js +260 -0
  10. package/dist/components/ui/calendar-panel/calendar-panel.js.map +1 -0
  11. package/dist/components/ui/chip/chip.js +33 -33
  12. package/dist/components/ui/chip/chip.js.map +1 -1
  13. package/dist/components/ui/date-range-picker/date-range-picker-utils.js +11 -23
  14. package/dist/components/ui/date-range-picker/date-range-picker-utils.js.map +1 -1
  15. package/dist/components/ui/date-range-picker/date-range-picker.js +94 -134
  16. package/dist/components/ui/date-range-picker/date-range-picker.js.map +1 -1
  17. package/dist/components/ui/dropdown-menu/dropdown-menu.js +129 -72
  18. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  19. package/dist/components/ui/filter-cards/filter-cards.js +25 -0
  20. package/dist/components/ui/filter-cards/filter-cards.js.map +1 -0
  21. package/dist/components/ui/filter-chips/filter-chips.js +44 -0
  22. package/dist/components/ui/filter-chips/filter-chips.js.map +1 -0
  23. package/dist/components/ui/filter-search/filter-search.js +184 -138
  24. package/dist/components/ui/filter-search/filter-search.js.map +1 -1
  25. package/dist/components/ui/fitted-actions/fitted-actions.js +139 -0
  26. package/dist/components/ui/fitted-actions/fitted-actions.js.map +1 -0
  27. package/dist/components/ui/input-date-picker/input-date-picker.js +103 -93
  28. package/dist/components/ui/input-date-picker/input-date-picker.js.map +1 -1
  29. package/dist/components/ui/input-password/input-password.js +76 -66
  30. package/dist/components/ui/input-password/input-password.js.map +1 -1
  31. package/dist/components/ui/input-search/input-search.js +9 -9
  32. package/dist/components/ui/input-search/input-search.js.map +1 -1
  33. package/dist/components/ui/input-select/input-select.js +8 -8
  34. package/dist/components/ui/input-select/input-select.js.map +1 -1
  35. package/dist/components/ui/input-text/input-text.js +77 -66
  36. package/dist/components/ui/input-text/input-text.js.map +1 -1
  37. package/dist/components/ui/input-text-area/input-text-area.js +76 -66
  38. package/dist/components/ui/input-text-area/input-text-area.js.map +1 -1
  39. package/dist/components/ui/link/link.js +50 -35
  40. package/dist/components/ui/link/link.js.map +1 -1
  41. package/dist/components/ui/number-field/number-field.js +1 -1
  42. package/dist/components/ui/number-field/number-field.js.map +1 -1
  43. package/dist/components/ui/popover/popover.js +75 -56
  44. package/dist/components/ui/popover/popover.js.map +1 -1
  45. package/dist/components/ui/resizable/resizable.js +23 -11
  46. package/dist/components/ui/resizable/resizable.js.map +1 -1
  47. package/dist/components/ui/scroll-area/scroll-area.js +46 -30
  48. package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
  49. package/dist/components/ui/sidebar-secondary/sidebar-secondary.js.map +1 -1
  50. package/dist/components/ui/timer/timer.js +47 -0
  51. package/dist/components/ui/timer/timer.js.map +1 -0
  52. package/dist/components/ui/toast/toast.js +168 -61
  53. package/dist/components/ui/toast/toast.js.map +1 -1
  54. package/dist/components/ui/truncate-text/middle-truncate.js +20 -0
  55. package/dist/components/ui/truncate-text/middle-truncate.js.map +1 -0
  56. package/dist/components/ui/truncate-text/text-width.js +12 -0
  57. package/dist/components/ui/truncate-text/text-width.js.map +1 -0
  58. package/dist/components/ui/truncate-text/truncate-text.js +152 -0
  59. package/dist/components/ui/truncate-text/truncate-text.js.map +1 -0
  60. package/dist/index.js +507 -469
  61. package/dist/index.js.map +1 -1
  62. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/addDays.js +5 -5
  63. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/addDays.js.map +1 -1
  64. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/constants.js +3 -6
  65. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/constants.js.map +1 -1
  66. package/dist/node_modules/.pnpm/react-day-picker@10.0.1_@types_react@19.2.15_react@19.2.6/node_modules/react-day-picker/dist/esm/useDayPicker.js +3 -3
  67. package/dist/react.js +507 -469
  68. package/dist/react.js.map +1 -1
  69. package/dist/src/components/ui/alert/alert.d.ts +34 -3
  70. package/dist/src/components/ui/alert/index.d.ts +2 -2
  71. package/dist/src/components/ui/button/button.d.ts +1 -1
  72. package/dist/src/components/ui/button-group/button-group.d.ts +38 -0
  73. package/dist/src/components/ui/button-group/index.d.ts +1 -0
  74. package/dist/src/components/ui/button-icon/button-icon.d.ts +1 -1
  75. package/dist/src/components/ui/button-icon-menu/button-icon-menu.d.ts +28 -0
  76. package/dist/src/components/ui/button-icon-menu/index.d.ts +1 -0
  77. package/dist/src/components/ui/button-menu/button-menu.d.ts +1 -1
  78. package/dist/src/components/ui/calendar-panel/__tests__/calendar-panel-utils.test.d.ts +1 -0
  79. package/dist/src/components/ui/calendar-panel/calendar-panel-utils.d.ts +55 -0
  80. package/dist/src/components/ui/calendar-panel/calendar-panel.d.ts +112 -0
  81. package/dist/src/components/ui/calendar-panel/index.d.ts +1 -0
  82. package/dist/src/components/ui/chip/chip.d.ts +1 -1
  83. package/dist/src/components/ui/date-range-picker/date-range-picker-utils.d.ts +10 -16
  84. package/dist/src/components/ui/date-range-picker/date-range-picker.d.ts +46 -2
  85. package/dist/src/components/ui/dropdown-menu/dropdown-menu.d.ts +8 -1
  86. package/dist/src/components/ui/dropdown-menu/index.d.ts +1 -1
  87. package/dist/src/components/ui/filter-cards/filter-cards.d.ts +11 -0
  88. package/dist/src/components/ui/filter-cards/index.d.ts +1 -0
  89. package/dist/src/components/ui/filter-chips/filter-chips.d.ts +25 -0
  90. package/dist/src/components/ui/filter-chips/index.d.ts +1 -0
  91. package/dist/src/components/ui/filter-search/filter-search.d.ts +39 -1
  92. package/dist/src/components/ui/fitted-actions/fitted-actions.d.ts +50 -0
  93. package/dist/src/components/ui/fitted-actions/fitted-actions.docs.d.ts +45 -0
  94. package/dist/src/components/ui/fitted-actions/index.d.ts +1 -0
  95. package/dist/src/components/ui/link/index.d.ts +1 -1
  96. package/dist/src/components/ui/link/link.d.ts +22 -4
  97. package/dist/src/components/ui/metric/metric.d.ts +1 -1
  98. package/dist/src/components/ui/popover/popover.d.ts +30 -1
  99. package/dist/src/components/ui/popover/popover.docs.d.ts +27 -2
  100. package/dist/src/components/ui/scroll-area/scroll-area.d.ts +24 -0
  101. package/dist/src/components/ui/tag/tag.d.ts +1 -1
  102. package/dist/src/components/ui/timer/index.d.ts +1 -0
  103. package/dist/src/components/ui/timer/timer.d.ts +28 -0
  104. package/dist/src/components/ui/toast/index.d.ts +1 -1
  105. package/dist/src/components/ui/toast/toast.d.ts +51 -18
  106. package/dist/src/components/ui/toast/toast.docs.d.ts +4 -0
  107. package/dist/src/components/ui/trend-indicator/trend-indicator.d.ts +1 -1
  108. package/dist/src/components/ui/truncate-text/__tests__/middle-truncate.test.d.ts +1 -0
  109. package/dist/src/components/ui/truncate-text/index.d.ts +3 -0
  110. package/dist/src/components/ui/truncate-text/middle-truncate.d.ts +13 -0
  111. package/dist/src/components/ui/truncate-text/text-width.d.ts +11 -0
  112. package/dist/src/components/ui/truncate-text/truncate-text.d.ts +45 -0
  113. package/dist/src/components/ui/truncate-text/truncate-text.docs.d.ts +35 -0
  114. package/dist/src/index.d.ts +8 -0
  115. package/dist/ui-react.css +1 -1
  116. package/package.json +4 -4
  117. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getDefaultOptions.js +0 -8
  118. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getDefaultOptions.js.map +0 -1
  119. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getISODay.js +0 -9
  120. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/getISODay.js.map +0 -1
  121. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Parser.js +0 -23
  122. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Parser.js.map +0 -1
  123. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Setter.js +0 -42
  124. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/Setter.js.map +0 -1
  125. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/constants.js +0 -50
  126. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/constants.js.map +0 -1
  127. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +0 -50
  128. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +0 -1
  129. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +0 -50
  130. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +0 -1
  131. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DateParser.js +0 -62
  132. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +0 -1
  133. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +0 -52
  134. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +0 -1
  135. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayParser.js +0 -50
  136. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +0 -1
  137. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +0 -50
  138. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +0 -1
  139. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/EraParser.js +0 -34
  140. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +0 -1
  141. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +0 -22
  142. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +0 -1
  143. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +0 -23
  144. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +0 -1
  145. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +0 -33
  146. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +0 -1
  147. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +0 -33
  148. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +0 -1
  149. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +0 -34
  150. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +0 -1
  151. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +0 -34
  152. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +0 -1
  153. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +0 -106
  154. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +0 -1
  155. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +0 -49
  156. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +0 -1
  157. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -49
  158. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +0 -1
  159. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +0 -50
  160. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +0 -1
  161. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +0 -41
  162. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +0 -1
  163. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +0 -81
  164. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +0 -1
  165. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +0 -49
  166. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +0 -1
  167. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +0 -70
  168. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +0 -1
  169. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +0 -33
  170. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +0 -1
  171. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +0 -78
  172. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +0 -1
  173. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +0 -76
  174. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +0 -1
  175. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +0 -33
  176. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +0 -1
  177. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -81
  178. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +0 -1
  179. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +0 -78
  180. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +0 -1
  181. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +0 -76
  182. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +0 -1
  183. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -23
  184. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +0 -1
  185. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +0 -23
  186. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +0 -1
  187. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/YearParser.js +0 -50
  188. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +0 -1
  189. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers.js +0 -68
  190. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/parsers.js.map +0 -1
  191. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/utils.js +0 -104
  192. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse/_lib/utils.js.map +0 -1
  193. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse.js +0 -86
  194. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse.js.map +0 -1
  195. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setDay.js +0 -12
  196. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setDay.js.map +0 -1
  197. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISODay.js +0 -11
  198. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISODay.js.map +0 -1
  199. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISOWeek.js +0 -10
  200. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setISOWeek.js.map +0 -1
  201. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setWeek.js +0 -10
  202. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/setWeek.js.map +0 -1
  203. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/transpose.js +0 -18
  204. package/dist/node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/transpose.js.map +0 -1
@@ -0,0 +1,260 @@
1
+ import { jsxs as M, jsx as t } from "react/jsx-runtime";
2
+ import * as r from "react";
3
+ import { cn as D } from "../../../lib/utils.js";
4
+ import { buildMonthItems as K, buildYearItems as Q, clampNavigationTarget as k, resolveWeekStartsOn as X, resolveYearRange as Z, buildModeProps as $, DEFAULT_YEAR_SPAN as ee } from "./calendar-panel-utils.js";
5
+ import { useDayPicker as ae } from "../../../node_modules/.pnpm/react-day-picker@10.0.1_@types_react@19.2.15_react@19.2.6/node_modules/react-day-picker/dist/esm/useDayPicker.js";
6
+ import { addMonths as F } from "../../../node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/addMonths.js";
7
+ import { format as re } from "../../../node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/format.js";
8
+ import { DayPicker as te } from "../../../node_modules/.pnpm/react-day-picker@10.0.1_@types_react@19.2.15_react@19.2.6/node_modules/react-day-picker/dist/esm/DayPicker.js";
9
+ import { DialogFooterDefault as oe } from "../dialog-footer-default/dialog-footer-default.js";
10
+ import { Button as L } from "../button/button.js";
11
+ import { InputSelect as ne, InputSelectTrigger as de, InputSelectValue as le, InputSelectContent as ie, InputSelectItem as ce } from "../input-select/input-select.js";
12
+ const O = r.createContext(null);
13
+ function N({
14
+ items: n,
15
+ value: a,
16
+ ariaLabel: o,
17
+ onValueChange: d
18
+ }) {
19
+ return /* @__PURE__ */ M(
20
+ ne,
21
+ {
22
+ items: n,
23
+ value: a,
24
+ onValueChange: (e) => d(Number(e)),
25
+ children: [
26
+ /* @__PURE__ */ t(de, { "aria-label": o, className: "min-w-0 flex-1", children: /* @__PURE__ */ t(le, {}) }),
27
+ /* @__PURE__ */ t(ie, { children: n.map((e) => /* @__PURE__ */ t(ce, { value: e.value, children: e.label }, e.value)) })
28
+ ]
29
+ }
30
+ );
31
+ }
32
+ N.displayName = "CalendarHeaderSelect";
33
+ function R({
34
+ calendarMonth: n,
35
+ displayIndex: a,
36
+ className: o,
37
+ ...d
38
+ }) {
39
+ const { goToMonth: e } = ae(), l = r.useContext(O);
40
+ if (!l)
41
+ throw new Error("CalendarHeader must be rendered inside <CalendarPanel>.");
42
+ const { monthLabel: u, yearLabel: c, fromYear: v, toYear: b, formatMonthLabel: h, endMonth: p, numberOfMonths: f } = l, g = n.date, i = g.getMonth(), s = g.getFullYear(), y = r.useMemo(
43
+ () => K(h),
44
+ [h]
45
+ ), C = r.useMemo(
46
+ () => Q(v, b),
47
+ [v, b]
48
+ );
49
+ return /* @__PURE__ */ M(
50
+ "header",
51
+ {
52
+ className: D(
53
+ "flex items-center gap-[var(--ui-calendar-header-gap)] border-b-[length:var(--ui-calendar-header-border-width)] border-[color:var(--ui-calendar-header-border-color)] px-[var(--ui-calendar-header-padding-x)] py-[var(--ui-calendar-header-padding-y)] [border-bottom-style:var(--ui-calendar-header-border-style)]",
54
+ o
55
+ ),
56
+ ...d,
57
+ children: [
58
+ /* @__PURE__ */ t(
59
+ N,
60
+ {
61
+ items: y,
62
+ value: i,
63
+ ariaLabel: u,
64
+ onValueChange: (m) => e(
65
+ k(
66
+ F(new Date(s, m, 1), -a),
67
+ p,
68
+ f
69
+ )
70
+ )
71
+ }
72
+ ),
73
+ /* @__PURE__ */ t(
74
+ N,
75
+ {
76
+ items: C,
77
+ value: s,
78
+ ariaLabel: c,
79
+ onValueChange: (m) => e(
80
+ k(
81
+ F(new Date(m, i, 1), -a),
82
+ p,
83
+ f
84
+ )
85
+ )
86
+ }
87
+ )
88
+ ]
89
+ }
90
+ );
91
+ }
92
+ R.displayName = "CalendarHeader";
93
+ function _({
94
+ className: n,
95
+ day: a,
96
+ modifiers: o,
97
+ ...d
98
+ }) {
99
+ const e = r.useRef(null);
100
+ r.useEffect(() => {
101
+ var c;
102
+ o.focused && ((c = e.current) == null || c.focus());
103
+ }, [o.focused]);
104
+ const l = !!o.range_middle, u = !!o.selected && !l;
105
+ return /* @__PURE__ */ t(
106
+ "button",
107
+ {
108
+ ref: e,
109
+ type: "button",
110
+ "data-day": a.date.toLocaleDateString(),
111
+ "data-active": u,
112
+ "data-range-middle": l,
113
+ className: D(
114
+ "ui-calendar-value-text-style",
115
+ "flex size-[var(--ui-calendar-item-width-min)] min-h-[var(--ui-calendar-item-height-min)] min-w-[var(--ui-calendar-item-width-min)] cursor-pointer items-center justify-center border border-[color:var(--ui-calendar-item-border-idle)] bg-[var(--ui-calendar-item-color-idle)] p-0 text-[var(--ui-calendar-value-color-idle-primary)] outline-none transition-colors [font-variant-numeric:var(--ui-calendar-value-font-variant-numeric)]",
116
+ "not-data-[active=true]:hover:border-[color:var(--ui-calendar-item-border-hover)] not-data-[active=true]:hover:bg-[var(--ui-calendar-item-color-hover)]",
117
+ "data-[range-middle=true]:bg-[var(--ui-calendar-item-color-hover)] data-[range-middle=true]:text-[var(--ui-calendar-value-color-idle-primary)]",
118
+ "data-[active=true]:border-[color:var(--ui-calendar-item-border-active)] data-[active=true]:bg-[var(--ui-calendar-item-color-active)] data-[active=true]:text-[var(--ui-calendar-value-color-active)]",
119
+ "group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-[var(--ui-focus-primary)]",
120
+ "disabled:pointer-events-none disabled:text-[var(--ui-calendar-value-color-disabled)]",
121
+ n
122
+ ),
123
+ ...d
124
+ }
125
+ );
126
+ }
127
+ _.displayName = "CalendarItem";
128
+ const ue = r.forwardRef(
129
+ ({
130
+ className: n,
131
+ variant: a = "single",
132
+ selected: o,
133
+ onSelect: d,
134
+ defaultMonth: e,
135
+ month: l,
136
+ onMonthChange: u,
137
+ disabled: c,
138
+ min: v,
139
+ max: b,
140
+ showOutsideDays: h = !0,
141
+ weekStartsOn: p,
142
+ fromYear: f,
143
+ toYear: g,
144
+ locale: i,
145
+ monthLabel: s = "Month",
146
+ yearLabel: y = "Year",
147
+ formatMonthLabel: C,
148
+ cancelLabel: m = "Cancel",
149
+ applyLabel: A = "Apply",
150
+ onCancel: H,
151
+ onApply: T,
152
+ dir: S,
153
+ ...z
154
+ }, B) => {
155
+ const E = (/* @__PURE__ */ new Date()).getFullYear(), { fromYear: x, toYear: w } = Z(
156
+ f,
157
+ g,
158
+ E,
159
+ ee
160
+ ), V = X(p, i), j = a !== "single", I = a === "range" ? 2 : 1, W = r.useCallback(
161
+ (J) => re(J, "MMMM", { locale: i }),
162
+ [i]
163
+ ), P = C ?? W, U = r.useMemo(() => new Date(x, 0, 1), [x]), Y = r.useMemo(() => new Date(w, 11, 1), [w]), q = r.useMemo(
164
+ () => ({
165
+ monthLabel: s,
166
+ yearLabel: y,
167
+ fromYear: x,
168
+ toYear: w,
169
+ formatMonthLabel: P,
170
+ endMonth: Y,
171
+ numberOfMonths: I
172
+ }),
173
+ [
174
+ s,
175
+ y,
176
+ x,
177
+ w,
178
+ P,
179
+ Y,
180
+ I
181
+ ]
182
+ ), G = $(
183
+ a,
184
+ o,
185
+ d,
186
+ v,
187
+ b
188
+ );
189
+ return /* @__PURE__ */ M(
190
+ "div",
191
+ {
192
+ ref: B,
193
+ dir: S,
194
+ "data-slot": "calendar-panel",
195
+ "data-variant": a,
196
+ className: D(
197
+ "inline-flex w-fit flex-col overflow-hidden rounded-[var(--ui-calendar-container-border-radius)] border-[length:var(--ui-calendar-container-border-width)] border-[color:var(--ui-calendar-container-border-color)] bg-[var(--ui-calendar-container-color)] shadow-md [border-style:var(--ui-calendar-container-border-style)]",
198
+ n
199
+ ),
200
+ ...z,
201
+ children: [
202
+ /* @__PURE__ */ t(O.Provider, { value: q, children: /* @__PURE__ */ t(
203
+ te,
204
+ {
205
+ ...G,
206
+ dir: S,
207
+ defaultMonth: e,
208
+ month: l,
209
+ onMonthChange: u,
210
+ disabled: c,
211
+ startMonth: U,
212
+ endMonth: Y,
213
+ showOutsideDays: h,
214
+ weekStartsOn: V,
215
+ locale: i,
216
+ numberOfMonths: a === "range" ? 2 : 1,
217
+ hideNavigation: !0,
218
+ classNames: {
219
+ root: "flex",
220
+ months: "flex flex-row",
221
+ // The vertical rule between the two `range` months is the first
222
+ // column's inline-end border, so it mirrors under RTL.
223
+ // Width = 7 day columns + 2 sides of body padding, derived from tokens
224
+ // so it stays in sync if either is retokened.
225
+ month: "flex w-[calc(var(--ui-calendar-item-width-min)*7+var(--ui-calendar-body-padding-x)*2)] flex-col border-e-[length:var(--ui-calendar-body-border-width)] border-[color:var(--ui-calendar-body-border-color)] last:border-e-0 [border-inline-end-style:var(--ui-calendar-body-border-style)]",
226
+ // `table-fixed` (rather than the default `auto`) is what makes the
227
+ // 32px-per-column contract above actually hold: under `auto`
228
+ // layout a single wide weekday abbreviation (e.g. some `ar`/`te`/
229
+ // `kn` locales) widens its whole column past the fixed 248px month
230
+ // width, which the panel's `overflow-hidden` then clips — silently
231
+ // dropping a day column instead of just the label.
232
+ month_grid: "w-full table-fixed border-separate border-spacing-0 px-[var(--ui-calendar-body-padding-x)] py-[var(--ui-calendar-body-padding-y)]",
233
+ weekday: "ui-calendar-value-text-style size-[var(--ui-calendar-item-width-min)] overflow-hidden whitespace-nowrap p-0 text-center font-normal text-[var(--ui-calendar-value-color-idle-secondary)]",
234
+ day: "group/day size-[var(--ui-calendar-item-width-min)] p-0 text-center",
235
+ outside: "[&_button]:text-[var(--ui-calendar-value-color-disabled)]",
236
+ disabled: "[&_button]:text-[var(--ui-calendar-value-color-disabled)]",
237
+ hidden: "invisible"
238
+ },
239
+ components: {
240
+ MonthCaption: R,
241
+ DayButton: _
242
+ }
243
+ }
244
+ ) }),
245
+ j && /* @__PURE__ */ M(oe, { children: [
246
+ /* @__PURE__ */ t(L, { variant: "secondary", onClick: H, children: m }),
247
+ /* @__PURE__ */ t(L, { onClick: T, children: A })
248
+ ] })
249
+ ]
250
+ }
251
+ );
252
+ }
253
+ );
254
+ ue.displayName = "CalendarPanel";
255
+ export {
256
+ R as CalendarHeader,
257
+ _ as CalendarItem,
258
+ ue as CalendarPanel
259
+ };
260
+ //# sourceMappingURL=calendar-panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-panel.js","sources":["../../../../src/components/ui/calendar-panel/calendar-panel.tsx"],"sourcesContent":["import * as React from 'react';\nimport { addMonths, format } from 'date-fns';\nimport {\n DayPicker,\n useDayPicker,\n type DateRange,\n type DayButton,\n type DayPickerLocale,\n type Matcher,\n type MonthCaptionProps,\n} from 'react-day-picker';\n\nimport { cn } from '@/lib/utils';\nimport { Button } from '../button';\nimport { DialogFooterDefault } from '../dialog-footer-default';\nimport {\n InputSelect,\n InputSelectContent,\n InputSelectItem,\n InputSelectTrigger,\n InputSelectValue,\n} from '../input-select';\nimport {\n DEFAULT_YEAR_SPAN,\n buildModeProps,\n buildMonthItems,\n buildYearItems,\n clampNavigationTarget,\n resolveWeekStartsOn,\n resolveYearRange,\n type CalendarSelectItem,\n} from './calendar-panel-utils';\n\n// The Figma \"Calendar\" panel: a bordered, elevated day-picker panel themed by the\n// dedicated `--ui-calendar-*` tier. Its three variants are the three\n// `react-day-picker` selection modes, and each one changes the panel's structure:\n// • single — one 248px month, no footer.\n// • multiple — one 248px month + a Cancel/Apply footer.\n// • range — two 248px months side by side (divided by a vertical rule) sharing\n// one Cancel/Apply footer.\n// Figma's `state` axis (idle / selected) is demo-only — it is DayPicker's runtime\n// selection state, not a prop.\n//\n// The month/year pickers in the header are real `InputSelect` instances (as in the\n// design), wired through DayPicker's custom-component API: the whole `MonthCaption`\n// is replaced, rather than using `captionLayout=\"dropdown\"`'s native `<select>`\n// elements. Per-instance caption options (labels, year window, month formatter) reach\n// that override through `CalendarPanelCaptionContext`, since DayPicker instantiates\n// custom components itself and passes only its own props.\n//\n// Every cell — idle, hover, in-range, endpoint — is a flat square: this design has no\n// corner-radius differentiation, so there is deliberately no range-endpoint \"pill\"\n// rounding.\n\nexport type CalendarPanelVariant = 'single' | 'multiple' | 'range';\n\n/** Selected value, shaped by the active `variant`. */\nexport type CalendarPanelSelected = Date | Date[] | DateRange | undefined;\n\ninterface CalendarPanelCaptionContextValue {\n monthLabel: string;\n yearLabel: string;\n fromYear: number;\n toYear: number;\n formatMonthLabel: (date: Date) => string;\n endMonth: Date;\n numberOfMonths: number;\n}\n\nconst CalendarPanelCaptionContext =\n React.createContext<CalendarPanelCaptionContextValue | null>(null);\n\n/** One header dropdown (month or year) — an `InputSelect` over a fixed item list. */\nfunction CalendarHeaderSelect({\n items,\n value,\n ariaLabel,\n onValueChange,\n}: {\n items: CalendarSelectItem<number>[];\n value: number;\n ariaLabel: string;\n onValueChange: (next: number) => void;\n}) {\n return (\n <InputSelect\n items={items}\n value={value}\n onValueChange={(next) => onValueChange(Number(next))}\n >\n <InputSelectTrigger aria-label={ariaLabel} className=\"min-w-0 flex-1\">\n <InputSelectValue />\n </InputSelectTrigger>\n <InputSelectContent>\n {items.map((item) => (\n <InputSelectItem key={item.value} value={item.value}>\n {item.label}\n </InputSelectItem>\n ))}\n </InputSelectContent>\n </InputSelect>\n );\n}\nCalendarHeaderSelect.displayName = 'CalendarHeaderSelect';\n\n/**\n * The header of one month column: a month `InputSelect` and a year `InputSelect`.\n * Replaces DayPicker's `MonthCaption`.\n */\nfunction CalendarHeader({\n calendarMonth,\n displayIndex,\n className,\n ...props\n}: MonthCaptionProps) {\n const { goToMonth } = useDayPicker();\n const context = React.useContext(CalendarPanelCaptionContext);\n if (!context) {\n throw new Error('CalendarHeader must be rendered inside <CalendarPanel>.');\n }\n const { monthLabel, yearLabel, fromYear, toYear, formatMonthLabel, endMonth, numberOfMonths } =\n context;\n\n const date = calendarMonth.date;\n const month = date.getMonth();\n const year = date.getFullYear();\n\n const monthItems = React.useMemo(\n () => buildMonthItems(formatMonthLabel),\n [formatMonthLabel]\n );\n\n const yearItems = React.useMemo(\n () => buildYearItems(fromYear, toYear),\n [fromYear, toYear]\n );\n\n return (\n <header\n className={cn(\n 'flex items-center gap-[var(--ui-calendar-header-gap)] border-b-[length:var(--ui-calendar-header-border-width)] border-[color:var(--ui-calendar-header-border-color)] px-[var(--ui-calendar-header-padding-x)] py-[var(--ui-calendar-header-padding-y)] [border-bottom-style:var(--ui-calendar-header-border-style)]',\n className\n )}\n {...props}\n >\n <CalendarHeaderSelect\n items={monthItems}\n value={month}\n ariaLabel={monthLabel}\n onValueChange={(next) =>\n goToMonth(\n clampNavigationTarget(\n addMonths(new Date(year, next, 1), -displayIndex),\n endMonth,\n numberOfMonths\n )\n )\n }\n />\n <CalendarHeaderSelect\n items={yearItems}\n value={year}\n ariaLabel={yearLabel}\n onValueChange={(next) =>\n goToMonth(\n clampNavigationTarget(\n addMonths(new Date(next, month, 1), -displayIndex),\n endMonth,\n numberOfMonths\n )\n )\n }\n />\n </header>\n );\n}\nCalendarHeader.displayName = 'CalendarHeader';\n\n/**\n * One day cell (Figma's \"CalendarItem\") — a flat 32×32 square. `data-active`\n * (a selected day or either range endpoint) and `data-range-middle` are mutually\n * exclusive, so their backgrounds never compete.\n */\nfunction CalendarItem({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus();\n }, [modifiers.focused]);\n\n const isRangeMiddle = Boolean(modifiers.range_middle);\n const isActive = Boolean(modifiers.selected) && !isRangeMiddle;\n\n return (\n <button\n ref={ref}\n type=\"button\"\n data-day={day.date.toLocaleDateString()}\n data-active={isActive}\n data-range-middle={isRangeMiddle}\n className={cn(\n 'ui-calendar-value-text-style',\n 'flex size-[var(--ui-calendar-item-width-min)] min-h-[var(--ui-calendar-item-height-min)] min-w-[var(--ui-calendar-item-width-min)] cursor-pointer items-center justify-center border border-[color:var(--ui-calendar-item-border-idle)] bg-[var(--ui-calendar-item-color-idle)] p-0 text-[var(--ui-calendar-value-color-idle-primary)] outline-none transition-colors [font-variant-numeric:var(--ui-calendar-value-font-variant-numeric)]',\n 'not-data-[active=true]:hover:border-[color:var(--ui-calendar-item-border-hover)] not-data-[active=true]:hover:bg-[var(--ui-calendar-item-color-hover)]',\n 'data-[range-middle=true]:bg-[var(--ui-calendar-item-color-hover)] data-[range-middle=true]:text-[var(--ui-calendar-value-color-idle-primary)]',\n 'data-[active=true]:border-[color:var(--ui-calendar-item-border-active)] data-[active=true]:bg-[var(--ui-calendar-item-color-active)] data-[active=true]:text-[var(--ui-calendar-value-color-active)]',\n 'group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-[var(--ui-focus-primary)]',\n 'disabled:pointer-events-none disabled:text-[var(--ui-calendar-value-color-disabled)]',\n className\n )}\n {...props}\n />\n );\n}\nCalendarItem.displayName = 'CalendarItem';\n\ninterface CalendarPanelSharedProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect' | 'defaultValue'> {\n /**\n * Text direction. Forwarded to `DayPicker` explicitly — an ancestor's `dir`\n * mirrors the panel's CSS layout automatically (logical properties), but\n * `react-day-picker` only flips its Arrow Left/Right keyboard roaming when\n * `dir` is passed to it directly, so it must also be passed here.\n */\n dir?: 'ltr' | 'rtl';\n /** Uncontrolled initial month shown. */\n defaultMonth?: Date;\n /** Controlled month shown (the first month, for `range`). */\n month?: Date;\n /** Called when the displayed month changes (header dropdowns). */\n onMonthChange?: (month: Date) => void;\n /** Days that cannot be selected. */\n disabled?: Matcher | Matcher[];\n /** Minimum count (`multiple` / `range`; ignored for `single`): for `multiple`, the number of selected dates; for `range`, the number of nights between start and end. */\n min?: number;\n /** Maximum count (`multiple` / `range`; ignored for `single`): for `multiple`, the number of selected dates; for `range`, the number of nights between start and end. */\n max?: number;\n /** Render the leading/trailing days of the adjacent months. */\n showOutsideDays?: boolean;\n /**\n * First day of the week (0 = Sunday). Defaults to `locale`'s own week start,\n * falling back to Monday (per the design) when no `locale` is given.\n */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n /**\n * First year offered by the year dropdown and the earliest month the grid\n * can navigate to. Defaults to 50 years back.\n */\n fromYear?: number;\n /**\n * Last year offered by the year dropdown and the latest month the grid can\n * navigate to. Defaults to 50 years ahead.\n */\n toYear?: number;\n /**\n * Localizes weekday names and DayPicker's default day-cell/caption accessible\n * labels (e.g. `import { es } from 'react-day-picker/locale'`). Defaults to\n * date-fns `enUS`. Does not translate `monthLabel`/`yearLabel`/`cancelLabel`/\n * `applyLabel`/`formatMonthLabel` — those are separate props the consumer\n * must localize themselves.\n */\n locale?: DayPickerLocale;\n /** Accessible name of the month dropdown. */\n monthLabel?: string;\n /** Accessible name of the year dropdown. */\n yearLabel?: string;\n /** Formats a month's name for the month dropdown. Defaults to `locale`-aware `date-fns` formatting. */\n formatMonthLabel?: (date: Date) => string;\n /** Footer \"Cancel\" button label (`multiple` / `range`). */\n cancelLabel?: string;\n /** Footer \"Apply\" button label (`multiple` / `range`). */\n applyLabel?: string;\n /** Called when the footer's Cancel button is pressed. */\n onCancel?: () => void;\n /** Called when the footer's Apply button is pressed. */\n onApply?: () => void;\n}\n\n/** `variant=\"single\"` (the default) — `selected` is a single optional `Date`. */\nexport interface CalendarPanelSingleProps extends CalendarPanelSharedProps {\n /** Selection mode + panel structure. `multiple`/`range` add the Cancel/Apply footer; `range` shows two months. */\n variant?: 'single';\n /** The selected date. Uncontrolled unless `onSelect` is provided. */\n selected?: Date;\n /** Called when the selection changes. Providing it makes `selected` controlled. */\n onSelect?: (selected: Date | undefined, triggerDate: Date) => void;\n}\n\n/** `variant=\"multiple\"` — `selected` is a `Date[]`, and the footer is shown. */\nexport interface CalendarPanelMultipleProps extends CalendarPanelSharedProps {\n variant: 'multiple';\n selected?: Date[];\n onSelect?: (selected: Date[] | undefined, triggerDate: Date) => void;\n}\n\n/** `variant=\"range\"` — `selected` is a `DateRange`, two months render, and the footer is shown. */\nexport interface CalendarPanelRangeProps extends CalendarPanelSharedProps {\n variant: 'range';\n selected?: DateRange;\n onSelect?: (selected: DateRange | undefined, triggerDate: Date) => void;\n}\n\n/**\n * `CalendarPanel`'s props, discriminated by `variant` — a `single` panel only\n * accepts a `Date`, `multiple` only a `Date[]`, `range` only a `DateRange`, so\n * mismatched `selected`/`onSelect` shapes are caught at the call site instead\n * of silently reaching `react-day-picker` with the wrong shape at runtime.\n */\nexport type CalendarPanelProps =\n | CalendarPanelSingleProps\n | CalendarPanelMultipleProps\n | CalendarPanelRangeProps;\n\nconst CalendarPanel = React.forwardRef<HTMLDivElement, CalendarPanelProps>(\n (\n {\n className,\n variant = 'single',\n selected,\n onSelect,\n defaultMonth,\n month,\n onMonthChange,\n disabled,\n min,\n max,\n showOutsideDays = true,\n weekStartsOn,\n fromYear,\n toYear,\n locale,\n monthLabel = 'Month',\n yearLabel = 'Year',\n formatMonthLabel,\n cancelLabel = 'Cancel',\n applyLabel = 'Apply',\n onCancel,\n onApply,\n dir,\n ...props\n },\n ref\n ) => {\n const currentYear = new Date().getFullYear();\n const { fromYear: resolvedFromYear, toYear: resolvedToYear } = resolveYearRange(\n fromYear,\n toYear,\n currentYear,\n DEFAULT_YEAR_SPAN\n );\n const resolvedWeekStartsOn = resolveWeekStartsOn(weekStartsOn, locale);\n const showFooter = variant !== 'single';\n const numberOfMonths = variant === 'range' ? 2 : 1;\n\n // Stable across renders when the consumer doesn't override `formatMonthLabel`,\n // so `captionContext` below doesn't get a new identity (and rebuild the month\n // dropdown items) on every render.\n const defaultFormatMonthLabel = React.useCallback(\n (date: Date) => format(date, 'MMMM', { locale }),\n [locale]\n );\n const resolvedFormatMonthLabel = formatMonthLabel ?? defaultFormatMonthLabel;\n\n // Bounds the header dropdowns' navigation to the same window their own\n // options list offers — without this, keyboard shortcuts (Shift+PageUp/\n // PageDown) and a controlled `month` can move the grid past `fromYear`/\n // `toYear` while the year dropdown still only lists that range.\n const startMonth = React.useMemo(() => new Date(resolvedFromYear, 0, 1), [resolvedFromYear]);\n const endMonth = React.useMemo(() => new Date(resolvedToYear, 11, 1), [resolvedToYear]);\n\n const captionContext = React.useMemo<CalendarPanelCaptionContextValue>(\n () => ({\n monthLabel,\n yearLabel,\n fromYear: resolvedFromYear,\n toYear: resolvedToYear,\n formatMonthLabel: resolvedFormatMonthLabel,\n endMonth,\n numberOfMonths,\n }),\n [\n monthLabel,\n yearLabel,\n resolvedFromYear,\n resolvedToYear,\n resolvedFormatMonthLabel,\n endMonth,\n numberOfMonths,\n ]\n );\n\n // `selected`/`onSelect` are already guaranteed consistent with `variant` by\n // the discriminated `CalendarPanelProps` union above — this is the one\n // place that bridges to `DayPickerProps`'s own (differently-shaped)\n // discriminated union.\n const modeProps = buildModeProps(\n variant,\n selected,\n onSelect as unknown as\n | ((selected: CalendarPanelSelected, triggerDate: Date) => void)\n | undefined,\n min,\n max\n );\n\n return (\n <div\n ref={ref}\n dir={dir}\n data-slot=\"calendar-panel\"\n data-variant={variant}\n className={cn(\n 'inline-flex w-fit flex-col overflow-hidden rounded-[var(--ui-calendar-container-border-radius)] border-[length:var(--ui-calendar-container-border-width)] border-[color:var(--ui-calendar-container-border-color)] bg-[var(--ui-calendar-container-color)] shadow-md [border-style:var(--ui-calendar-container-border-style)]',\n className\n )}\n {...props}\n >\n <CalendarPanelCaptionContext.Provider value={captionContext}>\n <DayPicker\n {...modeProps}\n dir={dir}\n defaultMonth={defaultMonth}\n month={month}\n onMonthChange={onMonthChange}\n disabled={disabled}\n startMonth={startMonth}\n endMonth={endMonth}\n showOutsideDays={showOutsideDays}\n weekStartsOn={resolvedWeekStartsOn}\n locale={locale}\n numberOfMonths={variant === 'range' ? 2 : 1}\n // The design navigates months through the header dropdowns only —\n // there are no prev/next chevrons.\n hideNavigation\n classNames={{\n root: 'flex',\n months: 'flex flex-row',\n // The vertical rule between the two `range` months is the first\n // column's inline-end border, so it mirrors under RTL.\n // Width = 7 day columns + 2 sides of body padding, derived from tokens\n // so it stays in sync if either is retokened.\n month:\n 'flex w-[calc(var(--ui-calendar-item-width-min)*7+var(--ui-calendar-body-padding-x)*2)] flex-col border-e-[length:var(--ui-calendar-body-border-width)] border-[color:var(--ui-calendar-body-border-color)] last:border-e-0 [border-inline-end-style:var(--ui-calendar-body-border-style)]',\n // `table-fixed` (rather than the default `auto`) is what makes the\n // 32px-per-column contract above actually hold: under `auto`\n // layout a single wide weekday abbreviation (e.g. some `ar`/`te`/\n // `kn` locales) widens its whole column past the fixed 248px month\n // width, which the panel's `overflow-hidden` then clips — silently\n // dropping a day column instead of just the label.\n month_grid:\n 'w-full table-fixed border-separate border-spacing-0 px-[var(--ui-calendar-body-padding-x)] py-[var(--ui-calendar-body-padding-y)]',\n weekday:\n 'ui-calendar-value-text-style size-[var(--ui-calendar-item-width-min)] overflow-hidden whitespace-nowrap p-0 text-center font-normal text-[var(--ui-calendar-value-color-idle-secondary)]',\n day: 'group/day size-[var(--ui-calendar-item-width-min)] p-0 text-center',\n outside: '[&_button]:text-[var(--ui-calendar-value-color-disabled)]',\n disabled: '[&_button]:text-[var(--ui-calendar-value-color-disabled)]',\n hidden: 'invisible',\n }}\n components={{\n MonthCaption: CalendarHeader,\n DayButton: CalendarItem,\n }}\n />\n </CalendarPanelCaptionContext.Provider>\n {showFooter && (\n <DialogFooterDefault>\n <Button variant=\"secondary\" onClick={onCancel}>\n {cancelLabel}\n </Button>\n <Button onClick={onApply}>{applyLabel}</Button>\n </DialogFooterDefault>\n )}\n </div>\n );\n }\n);\nCalendarPanel.displayName = 'CalendarPanel';\n\nexport { CalendarPanel, CalendarItem, CalendarHeader };\n"],"names":["CalendarPanelCaptionContext","React","CalendarHeaderSelect","items","value","ariaLabel","onValueChange","jsxs","InputSelect","next","jsx","InputSelectTrigger","InputSelectValue","InputSelectContent","item","InputSelectItem","CalendarHeader","calendarMonth","displayIndex","className","props","goToMonth","useDayPicker","context","monthLabel","yearLabel","fromYear","toYear","formatMonthLabel","endMonth","numberOfMonths","date","month","year","monthItems","buildMonthItems","yearItems","buildYearItems","cn","clampNavigationTarget","addMonths","CalendarItem","day","modifiers","ref","_a","isRangeMiddle","isActive","CalendarPanel","variant","selected","onSelect","defaultMonth","onMonthChange","disabled","min","max","showOutsideDays","weekStartsOn","locale","cancelLabel","applyLabel","onCancel","onApply","dir","currentYear","resolvedFromYear","resolvedToYear","resolveYearRange","DEFAULT_YEAR_SPAN","resolvedWeekStartsOn","resolveWeekStartsOn","showFooter","defaultFormatMonthLabel","format","resolvedFormatMonthLabel","startMonth","captionContext","modeProps","buildModeProps","DayPicker","DialogFooterDefault","Button"],"mappings":"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"}
@@ -1,60 +1,60 @@
1
- import { jsxs as p, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as h, jsx as r } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
- import { TimesIcon as h } from "@acronis-platform/icons-react/stroke-mono";
4
- import { cva as g } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
5
- import { cn as m } from "../../../lib/utils.js";
6
- const f = g(
3
+ import { TimesSmallIcon as g } from "@acronis-platform/icons-react/stroke-mono";
4
+ import { cva as m } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
5
+ import { cn as f } from "../../../lib/utils.js";
6
+ const x = m(
7
7
  "inline-flex h-[var(--ui-chip-global-box-height)] min-w-[var(--ui-chip-global-box-width-min)] cursor-pointer items-center justify-center gap-[var(--ui-chip-global-box-gap)] rounded-[var(--ui-chip-global-border-radius)] border-[length:var(--ui-chip-global-border-width)] border-solid border-[var(--ui-chip-global-border-color-idle)] bg-[var(--ui-chip-global-box-color-idle)] px-[var(--ui-chip-global-box-padding-x)] text-sm leading-6 hover:border-[var(--ui-chip-global-border-color-hover)] hover:bg-[var(--ui-chip-global-box-color-hover)] [&_svg]:size-[var(--ui-chip-global-icon-size)] [&_svg]:shrink-0 [&_svg]:pointer-events-none [&_svg]:text-[var(--ui-chip-global-icon-color)]",
8
8
  {
9
9
  variants: {
10
10
  variant: {
11
11
  removable: "text-[var(--ui-chip-removable-label-color)] focus-within:outline-none focus-within:ring-[3px] focus-within:ring-[var(--ui-focus-primary)] active:border-[var(--ui-chip-global-border-color-active)] active:bg-[var(--ui-chip-global-box-color-active)]",
12
- selectable: "text-[var(--ui-chip-selectable-label-color)] focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)] data-[selected=true]:border-[var(--ui-chip-global-border-color-active)] data-[selected=true]:bg-[var(--ui-chip-global-box-color-active)]"
12
+ selectable: "text-[var(--ui-chip-selectable-label-color)] focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)] data-[selected=true]:border-[var(--ui-chip-global-border-color-active)] data-[selected=true]:bg-[var(--ui-chip-global-box-color-active)]",
13
+ operational: "ui-chip-operational-label-text-style text-[var(--ui-chip-operational-label-color)] focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)] active:border-[var(--ui-chip-global-border-color-active)] active:bg-[var(--ui-chip-global-box-color-active)]"
13
14
  }
14
15
  },
15
16
  defaultVariants: {
16
17
  variant: "removable"
17
18
  }
18
19
  }
19
- ), x = d.forwardRef(
20
+ ), y = d.forwardRef(
20
21
  ({
21
- className: c,
22
+ className: t,
22
23
  variant: e = "removable",
23
- icon: t,
24
+ icon: b,
24
25
  selected: a,
25
- onRemove: b,
26
- removeLabel: s = "Remove",
27
- children: n,
28
- onKeyDown: i,
29
- ...u
30
- }, v) => {
31
- const l = e === "selectable";
32
- return /* @__PURE__ */ p(
26
+ onRemove: s,
27
+ removeLabel: n = "Remove",
28
+ children: u,
29
+ onKeyDown: o,
30
+ ...v
31
+ }, p) => {
32
+ const l = e === "selectable", c = l || e === "operational";
33
+ return /* @__PURE__ */ h(
33
34
  "div",
34
35
  {
35
- ref: v,
36
- className: m(f({ variant: e }), c),
37
- onKeyDown: (r) => {
38
- l && (r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.currentTarget.click()), i == null || i(r);
36
+ ref: p,
37
+ className: f(x({ variant: e }), t),
38
+ onKeyDown: (i) => {
39
+ c && (i.key === "Enter" || i.key === " ") && (i.preventDefault(), i.currentTarget.click()), o == null || o(i);
39
40
  },
41
+ ...c ? { role: "button", tabIndex: 0 } : {},
40
42
  ...l ? {
41
- role: "button",
42
- tabIndex: 0,
43
43
  "aria-pressed": !!a,
44
44
  "data-selected": a ? "true" : void 0
45
45
  } : {},
46
- ...u,
46
+ ...v,
47
47
  children: [
48
- t,
49
- /* @__PURE__ */ o("span", { className: "min-w-0 truncate", children: n }),
50
- e === "removable" && /* @__PURE__ */ o(
48
+ b,
49
+ /* @__PURE__ */ r("span", { className: "min-w-0 truncate", children: u }),
50
+ e === "removable" && /* @__PURE__ */ r(
51
51
  "button",
52
52
  {
53
53
  type: "button",
54
- "aria-label": s,
55
- onClick: b,
54
+ "aria-label": n,
55
+ onClick: s,
56
56
  className: "-me-1 flex shrink-0 cursor-pointer items-center justify-center rounded-full outline-none focus-visible:outline-none",
57
- children: /* @__PURE__ */ o(h, {})
57
+ children: /* @__PURE__ */ r(g, { size: 16 })
58
58
  }
59
59
  )
60
60
  ]
@@ -62,9 +62,9 @@ const f = g(
62
62
  );
63
63
  }
64
64
  );
65
- x.displayName = "Chip";
65
+ y.displayName = "Chip";
66
66
  export {
67
- x as Chip,
68
- f as chipVariants
67
+ y as Chip,
68
+ x as chipVariants
69
69
  };
70
70
  //# sourceMappingURL=chip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chip.js","sources":["../../../../src/components/ui/chip/chip.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TimesIcon } from '@acronis-platform/icons-react/stroke-mono';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\n// A compact, interactive label. `variant` mirrors the Figma \"Chip\" `type`:\n// `removable` carries a trailing × (remove) button; `selectable` toggles a\n// selected state. The container fill/border/label/icon all wire to the dedicated\n// `--ui-chip-*` tier from @acronis-platform/tokens-pd; geometry (height, gap,\n// padding, min-width, radius, border width, icon size) is tokenized too.\n// The Figma `state` enum (idle / hover / active / focused) maps to interaction\n// states, not props: `hover:` → the hover tokens, `:focus`/`focus-visible` → the\n// 3px `--ui-focus-primary` ring, and the `active` look is the pressed state for\n// `removable` (`active:`) and the selected state for `selectable`\n// (`data-[selected]`, driven by the `selected` prop).\nconst chipVariants = cva(\n \"inline-flex h-[var(--ui-chip-global-box-height)] min-w-[var(--ui-chip-global-box-width-min)] cursor-pointer items-center justify-center gap-[var(--ui-chip-global-box-gap)] rounded-[var(--ui-chip-global-border-radius)] border-[length:var(--ui-chip-global-border-width)] border-solid border-[var(--ui-chip-global-border-color-idle)] bg-[var(--ui-chip-global-box-color-idle)] px-[var(--ui-chip-global-box-padding-x)] text-sm leading-6 hover:border-[var(--ui-chip-global-border-color-hover)] hover:bg-[var(--ui-chip-global-box-color-hover)] [&_svg]:size-[var(--ui-chip-global-icon-size)] [&_svg]:shrink-0 [&_svg]:pointer-events-none [&_svg]:text-[var(--ui-chip-global-icon-color)]\",\n {\n variants: {\n variant: {\n removable:\n 'text-[var(--ui-chip-removable-label-color)] focus-within:outline-none focus-within:ring-[3px] focus-within:ring-[var(--ui-focus-primary)] active:border-[var(--ui-chip-global-border-color-active)] active:bg-[var(--ui-chip-global-box-color-active)]',\n selectable:\n 'text-[var(--ui-chip-selectable-label-color)] focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)] data-[selected=true]:border-[var(--ui-chip-global-border-color-active)] data-[selected=true]:bg-[var(--ui-chip-global-box-color-active)]',\n },\n },\n defaultVariants: {\n variant: 'removable',\n },\n }\n);\n\nexport interface ChipProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof chipVariants> {\n /** Optional leading icon, rendered at 16px before the label. */\n icon?: React.ReactNode;\n /**\n * `selectable` only — applies the selected (active) styling and exposes the\n * chip as a pressed toggle (`role=\"button\"` + `aria-pressed`).\n */\n selected?: boolean;\n /** `removable` only — called when the trailing remove (×) button is pressed. */\n onRemove?: () => void;\n /** Accessible label for the remove button (`removable`). */\n removeLabel?: string;\n}\n\nconst Chip = React.forwardRef<HTMLDivElement, ChipProps>(\n (\n {\n className,\n variant = 'removable',\n icon,\n selected,\n onRemove,\n removeLabel = 'Remove',\n children,\n onKeyDown,\n ...props\n },\n ref\n ) => {\n const selectable = variant === 'selectable';\n return (\n <div\n ref={ref}\n className={cn(chipVariants({ variant }), className)}\n onKeyDown={(event) => {\n // The selectable chip is a div with button semantics; mirror native\n // button activation so Enter/Space fire its click handler.\n if (selectable && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n event.currentTarget.click();\n }\n onKeyDown?.(event);\n }}\n {...(selectable\n ? {\n role: 'button',\n tabIndex: 0,\n 'aria-pressed': Boolean(selected),\n 'data-selected': selected ? 'true' : undefined,\n }\n : {})}\n {...props}\n >\n {icon}\n <span className=\"min-w-0 truncate\">{children}</span>\n {variant === 'removable' && (\n <button\n type=\"button\"\n aria-label={removeLabel}\n onClick={onRemove}\n className=\"-me-1 flex shrink-0 cursor-pointer items-center justify-center rounded-full outline-none focus-visible:outline-none\"\n >\n <TimesIcon />\n </button>\n )}\n </div>\n );\n }\n);\nChip.displayName = 'Chip';\n\nexport { Chip, chipVariants };\n"],"names":["chipVariants","cva","Chip","React","className","variant","icon","selected","onRemove","removeLabel","children","onKeyDown","props","ref","selectable","jsxs","cn","event","jsx","TimesIcon"],"mappings":";;;;;AAgBA,MAAMA,IAAeC;AAAA,EACnB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,WACE;AAAA,QACF,YACE;AAAA,MAAA;AAAA,IACJ;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ,GAmBMC,IAAOC,EAAM;AAAA,EACjB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAaT,MAAY;AAC/B,WACE,gBAAAU;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAF;AAAA,QACA,WAAWG,EAAGhB,EAAa,EAAE,SAAAK,EAAA,CAAS,GAAGD,CAAS;AAAA,QAClD,WAAW,CAACa,MAAU;AAGpB,UAAIH,MAAeG,EAAM,QAAQ,WAAWA,EAAM,QAAQ,SACxDA,EAAM,eAAA,GACNA,EAAM,cAAc,MAAA,IAEtBN,KAAA,QAAAA,EAAYM;AAAA,QACd;AAAA,QACC,GAAIH,IACD;AAAA,UACE,MAAM;AAAA,UACN,UAAU;AAAA,UACV,gBAAgB,EAAQP;AAAA,UACxB,iBAAiBA,IAAW,SAAS;AAAA,QAAA,IAEvC,CAAA;AAAA,QACH,GAAGK;AAAA,QAEH,UAAA;AAAA,UAAAN;AAAA,UACD,gBAAAY,EAAC,QAAA,EAAK,WAAU,oBAAoB,UAAAR,EAAA,CAAS;AAAA,UAC5CL,MAAY,eACX,gBAAAa;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,cAAYT;AAAA,cACZ,SAASD;AAAA,cACT,WAAU;AAAA,cAEV,4BAACW,GAAA,CAAA,CAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QACb;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AACAjB,EAAK,cAAc;"}
1
+ {"version":3,"file":"chip.js","sources":["../../../../src/components/ui/chip/chip.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TimesSmallIcon } from '@acronis-platform/icons-react/stroke-mono';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\n// A compact, interactive label. `variant` mirrors the Figma \"Chip\" `type`:\n// `removable` (Figma `dismissable`) carries a trailing × (remove) button;\n// `selectable` toggles a selected state; `operational` is a plain action chip\n// whose label is styled like a strong link (the semibold weight comes from\n// tokens-pd's generated `ui-chip-operational-label-text-style` class).\n// The container fill/border/label/icon all wire to the dedicated\n// `--ui-chip-*` tier from @acronis-platform/tokens-pd; geometry (height, gap,\n// padding, min-width, radius, border width, icon size) is tokenized too.\n// The Figma `state` enum (idle / hover / active / focused) maps to interaction\n// states, not props: `hover:` → the hover tokens, `:focus`/`focus-visible` → the\n// 3px `--ui-focus-primary` ring, and the `active` look is the pressed state for\n// `removable`/`operational` (`active:`) and the selected state for `selectable`\n// (`data-[selected]`, driven by the `selected` prop).\n//\n// Figma's `_global/box/marginY` (4px) is deliberately NOT wired: its frame sits\n// at y=-4 with height 32 around the 24px box, i.e. it bleeds *outside* the\n// component's 24px footprint to give the focus ring room on the canvas. A CSS\n// `ring` already paints outside the border box without affecting layout, so\n// translating it to a real margin would wrongly add 8px to every chip.\nconst chipVariants = cva(\n \"inline-flex h-[var(--ui-chip-global-box-height)] min-w-[var(--ui-chip-global-box-width-min)] cursor-pointer items-center justify-center gap-[var(--ui-chip-global-box-gap)] rounded-[var(--ui-chip-global-border-radius)] border-[length:var(--ui-chip-global-border-width)] border-solid border-[var(--ui-chip-global-border-color-idle)] bg-[var(--ui-chip-global-box-color-idle)] px-[var(--ui-chip-global-box-padding-x)] text-sm leading-6 hover:border-[var(--ui-chip-global-border-color-hover)] hover:bg-[var(--ui-chip-global-box-color-hover)] [&_svg]:size-[var(--ui-chip-global-icon-size)] [&_svg]:shrink-0 [&_svg]:pointer-events-none [&_svg]:text-[var(--ui-chip-global-icon-color)]\",\n {\n variants: {\n variant: {\n removable:\n 'text-[var(--ui-chip-removable-label-color)] focus-within:outline-none focus-within:ring-[3px] focus-within:ring-[var(--ui-focus-primary)] active:border-[var(--ui-chip-global-border-color-active)] active:bg-[var(--ui-chip-global-box-color-active)]',\n selectable:\n 'text-[var(--ui-chip-selectable-label-color)] focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)] data-[selected=true]:border-[var(--ui-chip-global-border-color-active)] data-[selected=true]:bg-[var(--ui-chip-global-box-color-active)]',\n operational:\n 'ui-chip-operational-label-text-style text-[var(--ui-chip-operational-label-color)] focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)] active:border-[var(--ui-chip-global-border-color-active)] active:bg-[var(--ui-chip-global-box-color-active)]',\n },\n },\n defaultVariants: {\n variant: 'removable',\n },\n }\n);\n\nexport interface ChipProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof chipVariants> {\n /** Optional leading icon, rendered at 16px before the label. */\n icon?: React.ReactNode;\n /**\n * `selectable` only — applies the selected (active) styling and exposes the\n * chip as a pressed toggle (`role=\"button\"` + `aria-pressed`).\n */\n selected?: boolean;\n /** `removable` only — called when the trailing remove (×) button is pressed. */\n onRemove?: () => void;\n /** Accessible label for the remove button (`removable`). */\n removeLabel?: string;\n}\n\nconst Chip = React.forwardRef<HTMLDivElement, ChipProps>(\n (\n {\n className,\n variant = 'removable',\n icon,\n selected,\n onRemove,\n removeLabel = 'Remove',\n children,\n onKeyDown,\n ...props\n },\n ref\n ) => {\n const selectable = variant === 'selectable';\n // `selectable` and `operational` put the action on the chip itself, so the\n // container carries button semantics. `removable` keeps a presentational\n // container — its only control is the trailing × button.\n const actionable = selectable || variant === 'operational';\n return (\n <div\n ref={ref}\n className={cn(chipVariants({ variant }), className)}\n onKeyDown={(event) => {\n // An actionable chip is a div with button semantics; mirror native\n // button activation so Enter/Space fire its click handler.\n if (actionable && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n event.currentTarget.click();\n }\n onKeyDown?.(event);\n }}\n {...(actionable ? { role: 'button', tabIndex: 0 } : {})}\n {...(selectable\n ? {\n 'aria-pressed': Boolean(selected),\n 'data-selected': selected ? 'true' : undefined,\n }\n : {})}\n {...props}\n >\n {icon}\n <span className=\"min-w-0 truncate\">{children}</span>\n {variant === 'removable' && (\n <button\n type=\"button\"\n aria-label={removeLabel}\n onClick={onRemove}\n className=\"-me-1 flex shrink-0 cursor-pointer items-center justify-center rounded-full outline-none focus-visible:outline-none\"\n >\n {/* `TimesSmall` (not `Times`) at size 16 is what the design uses:\n its × mark spans ~52% of the 16px box, where `Times` spans ~85%.\n `size={16}` also picks the 16px stroke spec (2.4 viewBox units →\n the design's 1.6px), instead of scaling the 24px master down. */}\n <TimesSmallIcon size={16} />\n </button>\n )}\n </div>\n );\n }\n);\nChip.displayName = 'Chip';\n\nexport { Chip, chipVariants };\n"],"names":["chipVariants","cva","Chip","React","className","variant","icon","selected","onRemove","removeLabel","children","onKeyDown","props","ref","selectable","actionable","jsxs","cn","event","jsx","TimesSmallIcon"],"mappings":";;;;;AAyBA,MAAMA,IAAeC;AAAA,EACnB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,WACE;AAAA,QACF,YACE;AAAA,QACF,aACE;AAAA,MAAA;AAAA,IACJ;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ,GAmBMC,IAAOC,EAAM;AAAA,EACjB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAaT,MAAY,cAIzBU,IAAaD,KAAcT,MAAY;AAC7C,WACE,gBAAAW;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAH;AAAA,QACA,WAAWI,EAAGjB,EAAa,EAAE,SAAAK,EAAA,CAAS,GAAGD,CAAS;AAAA,QAClD,WAAW,CAACc,MAAU;AAGpB,UAAIH,MAAeG,EAAM,QAAQ,WAAWA,EAAM,QAAQ,SACxDA,EAAM,eAAA,GACNA,EAAM,cAAc,MAAA,IAEtBP,KAAA,QAAAA,EAAYO;AAAA,QACd;AAAA,QACC,GAAIH,IAAa,EAAE,MAAM,UAAU,UAAU,EAAA,IAAM,CAAA;AAAA,QACnD,GAAID,IACD;AAAA,UACE,gBAAgB,EAAQP;AAAA,UACxB,iBAAiBA,IAAW,SAAS;AAAA,QAAA,IAEvC,CAAA;AAAA,QACH,GAAGK;AAAA,QAEH,UAAA;AAAA,UAAAN;AAAA,UACD,gBAAAa,EAAC,QAAA,EAAK,WAAU,oBAAoB,UAAAT,EAAA,CAAS;AAAA,UAC5CL,MAAY,eACX,gBAAAc;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,cAAYV;AAAA,cACZ,SAASD;AAAA,cACT,WAAU;AAAA,cAMV,UAAA,gBAAAW,EAACC,GAAA,EAAe,MAAM,GAAA,CAAI;AAAA,YAAA;AAAA,UAAA;AAAA,QAC5B;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AACAlB,EAAK,cAAc;"}
@@ -1,28 +1,16 @@
1
- import { isValid as n } from "../../../node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/isValid.js";
2
- import { format as a } from "../../../node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/format.js";
3
- import { parse as u } from "../../../node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/parse.js";
4
- import { startOfDay as s } from "../../../node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/startOfDay.js";
5
- const f = "MMM d, yyyy";
6
- function y(t) {
7
- return t && n(t) ? a(t, f) : "";
1
+ import { isValid as m } from "../../../node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/isValid.js";
2
+ import { format as i } from "../../../node_modules/.pnpm/date-fns@4.3.0/node_modules/date-fns/format.js";
3
+ const n = "MMM d, yyyy";
4
+ function u(o, r) {
5
+ return o && m(o) ? i(o, n, { locale: r }) : "";
8
6
  }
9
- function D(t) {
10
- const r = u(t.trim(), f, /* @__PURE__ */ new Date());
11
- return n(r) ? s(r) : void 0;
12
- }
13
- function M(t, r) {
14
- var o, e, m, i;
15
- return ((o = t.from) == null ? void 0 : o.getTime()) === ((e = r.from) == null ? void 0 : e.getTime()) && ((m = t.to) == null ? void 0 : m.getTime()) === ((i = r.to) == null ? void 0 : i.getTime());
16
- }
17
- function l(t) {
18
- const { from: r, to: o } = t;
19
- return r && o && r.getTime() > o.getTime() ? { from: o, to: r } : t;
7
+ function c(o) {
8
+ const { from: r, to: t } = o;
9
+ return r && t && r.getTime() > t.getTime() ? { from: t, to: r } : o;
20
10
  }
21
11
  export {
22
- f as DISPLAY_FORMAT,
23
- y as formatDate,
24
- l as normalizeRange,
25
- D as parseDate,
26
- M as rangesEqual
12
+ n as DISPLAY_FORMAT,
13
+ u as formatDate,
14
+ c as normalizeRange
27
15
  };
28
16
  //# sourceMappingURL=date-range-picker-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-range-picker-utils.js","sources":["../../../../src/components/ui/date-range-picker/date-range-picker-utils.ts"],"sourcesContent":["import { format, isValid, parse, startOfDay } from 'date-fns';\n\n/** A start/end date range. Both ends are optional (a partial range while editing). */\nexport interface DateRange {\n from?: Date;\n to?: Date;\n}\n\n/** The date display / parse pattern used by the trigger and the editable fields. */\nexport const DISPLAY_FORMAT = 'MMM d, yyyy';\n\n/**\n * Format a date with {@link DISPLAY_FORMAT}, returning `''` for a missing or\n * invalid `Date`. `date-fns`' `format` throws a `RangeError` on an invalid\n * `Date` (e.g. `new Date('garbage')`), so the `isValid` guard is load-bearing —\n * a truthy-but-invalid `Date` must not reach `format`.\n */\nexport function formatDate(date: Date | undefined): string {\n return date && isValid(date) ? format(date, DISPLAY_FORMAT) : '';\n}\n\n/**\n * Parse a {@link DISPLAY_FORMAT} string into a `Date`, or `undefined` when the\n * text is empty, partial (mid-type), or not a real calendar date\n * (e.g. `\"Feb 30, 2026\"`). The result is normalized to the start of the day so\n * it round-trips with {@link formatDate} — `date-fns`' `parse` fills the unspecified\n * time-of-day from its reference date, which would otherwise leave a \"now\" time\n * on the value and break equality with the midnight dates the calendar emits.\n *\n * NOTE: the pattern is locale-fixed (US-style `MMM d, yyyy`), matching the\n * `InputDatePicker` trigger. Locale-aware parsing is not yet supported — a\n * known limitation to revisit once the design tier lands.\n */\nexport function parseDate(text: string): Date | undefined {\n const parsed = parse(text.trim(), DISPLAY_FORMAT, new Date());\n return isValid(parsed) ? startOfDay(parsed) : undefined;\n}\n\n/** Structural equality of two ranges by their endpoints' timestamps. */\nexport function rangesEqual(a: DateRange, b: DateRange): boolean {\n return (\n a.from?.getTime() === b.from?.getTime() &&\n a.to?.getTime() === b.to?.getTime()\n );\n}\n\n/**\n * Return a range whose `from` is never after its `to`. When both ends are set\n * and inverted (e.g. the user typed an end date earlier than the start), the two\n * are swapped; a partial range (one end unset) is returned unchanged. Used to\n * keep the calendar highlight and the committed value chronologically ordered.\n */\nexport function normalizeRange(range: DateRange): DateRange {\n const { from, to } = range;\n if (from && to && from.getTime() > to.getTime()) {\n return { from: to, to: from };\n }\n return range;\n}\n"],"names":["DISPLAY_FORMAT","formatDate","date","isValid","format","parseDate","text","parsed","parse","startOfDay","rangesEqual","a","b","_a","_b","_c","_d","normalizeRange","range","from","to"],"mappings":";;;;AASO,MAAMA,IAAiB;AAQvB,SAASC,EAAWC,GAAgC;AACzD,SAAOA,KAAQC,EAAQD,CAAI,IAAIE,EAAOF,GAAMF,CAAc,IAAI;AAChE;AAcO,SAASK,EAAUC,GAAgC;AACxD,QAAMC,IAASC,EAAMF,EAAK,KAAA,GAAQN,GAAgB,oBAAI,MAAM;AAC5D,SAAOG,EAAQI,CAAM,IAAIE,EAAWF,CAAM,IAAI;AAChD;AAGO,SAASG,EAAYC,GAAcC,GAAuB;;AAC/D,WACEC,IAAAF,EAAE,SAAF,gBAAAE,EAAQ,iBAAcC,IAAAF,EAAE,SAAF,gBAAAE,EAAQ,gBAC9BC,IAAAJ,EAAE,OAAF,gBAAAI,EAAM,iBAAcC,IAAAJ,EAAE,OAAF,gBAAAI,EAAM;AAE9B;AAQO,SAASC,EAAeC,GAA6B;AAC1D,QAAM,EAAE,MAAAC,GAAM,IAAAC,EAAA,IAAOF;AACrB,SAAIC,KAAQC,KAAMD,EAAK,YAAYC,EAAG,YAC7B,EAAE,MAAMA,GAAI,IAAID,EAAA,IAElBD;AACT;"}
1
+ {"version":3,"file":"date-range-picker-utils.js","sources":["../../../../src/components/ui/date-range-picker/date-range-picker-utils.ts"],"sourcesContent":["import { format, isValid } from 'date-fns';\nimport type { DayPickerLocale } from 'react-day-picker';\n\n/** A start/end date range. Both ends are optional (a partial range while editing). */\nexport interface DateRange {\n from?: Date;\n to?: Date;\n}\n\n/**\n * The date display pattern used by the trigger. Fixed month-day-year order\n * regardless of `locale` — only the month/day/era token *names* localize (see\n * {@link formatDate}); true locale-aware reordering is a separate, bigger\n * change (tracked, not done here).\n */\nexport const DISPLAY_FORMAT = 'MMM d, yyyy';\n\n/**\n * Format a date with {@link DISPLAY_FORMAT}, returning `''` for a missing or\n * invalid `Date`. `date-fns`' `format` throws a `RangeError` on an invalid\n * `Date` (e.g. `new Date('garbage')`), so the `isValid` guard is load-bearing —\n * a truthy-but-invalid `Date` must not reach `format`.\n *\n * `locale` only translates the month name via `date-fns`' `format` `options`\n * — it does not reorder `DISPLAY_FORMAT`'s fixed month-day-year pattern.\n */\nexport function formatDate(\n date: Date | undefined,\n locale?: DayPickerLocale\n): string {\n return date && isValid(date) ? format(date, DISPLAY_FORMAT, { locale }) : '';\n}\n\n/**\n * Return a range whose `from` is never after its `to`. When both ends are set\n * and inverted (e.g. the user typed an end date earlier than the start), the two\n * are swapped; a partial range (one end unset) is returned unchanged. Used to\n * keep the calendar highlight and the committed value chronologically ordered.\n */\nexport function normalizeRange(range: DateRange): DateRange {\n const { from, to } = range;\n if (from && to && from.getTime() > to.getTime()) {\n return { from: to, to: from };\n }\n return range;\n}\n"],"names":["DISPLAY_FORMAT","formatDate","date","locale","isValid","format","normalizeRange","range","from","to"],"mappings":";;AAeO,MAAMA,IAAiB;AAWvB,SAASC,EACdC,GACAC,GACQ;AACR,SAAOD,KAAQE,EAAQF,CAAI,IAAIG,EAAOH,GAAMF,GAAgB,EAAE,QAAAG,EAAA,CAAQ,IAAI;AAC5E;AAQO,SAASG,EAAeC,GAA6B;AAC1D,QAAM,EAAE,MAAAC,GAAM,IAAAC,EAAA,IAAOF;AACrB,SAAIC,KAAQC,KAAMD,EAAK,YAAYC,EAAG,YAC7B,EAAE,MAAMA,GAAI,IAAID,EAAA,IAElBD;AACT;"}