@commercetools/nimbus 0.0.0-canary-20251024075337 → 0.0.0-canary-20251024090130

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 (308) hide show
  1. package/dist/chunks/{Button-CafJrK0a.es.js → Button-C4ud7YxN.es.js} +3 -3
  2. package/dist/chunks/{Button-CafJrK0a.es.js.map → Button-C4ud7YxN.es.js.map} +1 -1
  3. package/dist/chunks/{DateField-BjKTTWs5.es.js → DateField-oXtVK-_5.es.js} +6 -6
  4. package/dist/chunks/{DateField-BjKTTWs5.es.js.map → DateField-oXtVK-_5.es.js.map} +1 -1
  5. package/dist/chunks/{DatePicker-BrgxRTyS.es.js → DatePicker-DrWdEOUQ.es.js} +40 -40
  6. package/dist/chunks/{DatePicker-BrgxRTyS.es.js.map → DatePicker-DrWdEOUQ.es.js.map} +1 -1
  7. package/dist/chunks/{Dialog-Cx5MzP6O.es.js → Dialog-C3sNnu1k.es.js} +5 -5
  8. package/dist/chunks/{Dialog-Cx5MzP6O.es.js.map → Dialog-C3sNnu1k.es.js.map} +1 -1
  9. package/dist/chunks/{Group-Bd9Zcn-V.es.js → Group-CiDvtaeM.es.js} +2 -2
  10. package/dist/chunks/{Group-Bd9Zcn-V.es.js.map → Group-CiDvtaeM.es.js.map} +1 -1
  11. package/dist/chunks/{Header-D6CYH5C_.es.js → Header-BxizMPpp.es.js} +2 -2
  12. package/dist/chunks/{Header-D6CYH5C_.es.js.map → Header-BxizMPpp.es.js.map} +1 -1
  13. package/dist/chunks/{Heading-DPlDZAaf.es.js → Heading-CAI_WTdS.es.js} +14 -14
  14. package/dist/chunks/{Heading-DPlDZAaf.es.js.map → Heading-CAI_WTdS.es.js.map} +1 -1
  15. package/dist/chunks/{Input-EnWCwj65.es.js → Input-De-sfAtq.es.js} +2 -2
  16. package/dist/chunks/{Input-EnWCwj65.es.js.map → Input-De-sfAtq.es.js.map} +1 -1
  17. package/dist/chunks/{Label-7OK510ha.es.js → Label-BS7NIWvY.es.js} +2 -2
  18. package/dist/chunks/{Label-7OK510ha.es.js.map → Label-BS7NIWvY.es.js.map} +1 -1
  19. package/dist/chunks/{ListBox-C4BToxCj.es.js → ListBox-BfRQSQ3P.es.js} +4 -4
  20. package/dist/chunks/{ListBox-C4BToxCj.es.js.map → ListBox-BfRQSQ3P.es.js.map} +1 -1
  21. package/dist/chunks/{Modal-DowTFCAo.es.js → Modal-BTJk-mW-.es.js} +3 -3
  22. package/dist/chunks/{Modal-DowTFCAo.es.js.map → Modal-BTJk-mW-.es.js.map} +1 -1
  23. package/dist/chunks/{ProgressBar-DA797ATA.es.js → ProgressBar-Dl4ZrjfX.es.js} +3 -3
  24. package/dist/chunks/{ProgressBar-DA797ATA.es.js.map → ProgressBar-Dl4ZrjfX.es.js.map} +1 -1
  25. package/dist/chunks/{Separator-B0kvBk7k.es.js → Separator-BOfmJd-0.es.js} +2 -2
  26. package/dist/chunks/{Separator-B0kvBk7k.es.js.map → Separator-BOfmJd-0.es.js.map} +1 -1
  27. package/dist/chunks/{TextArea-B__-6Fht.es.js → TextArea-DR4R6vJD.es.js} +2 -2
  28. package/dist/chunks/{TextArea-B__-6Fht.es.js.map → TextArea-DR4R6vJD.es.js.map} +1 -1
  29. package/dist/chunks/{ToggleButton-wAaapRtE.es.js → ToggleButton-DMoUAyoo.es.js} +2 -2
  30. package/dist/chunks/{ToggleButton-wAaapRtE.es.js.map → ToggleButton-DMoUAyoo.es.js.map} +1 -1
  31. package/dist/chunks/{accordion-BMztnndo.es.js → accordion-DyTTsrDh.es.js} +4 -4
  32. package/dist/chunks/{accordion-BMztnndo.es.js.map → accordion-DyTTsrDh.es.js.map} +1 -1
  33. package/dist/chunks/{alert-DEy9gf3U.es.js → alert-DCm-d72j.es.js} +2 -2
  34. package/dist/chunks/{alert-DEy9gf3U.es.js.map → alert-DCm-d72j.es.js.map} +1 -1
  35. package/dist/chunks/avatar-BNhECwD5.cjs.js +2 -0
  36. package/dist/chunks/avatar-BNhECwD5.cjs.js.map +1 -0
  37. package/dist/chunks/avatar-DFibCsCs.es.js +47 -0
  38. package/dist/chunks/avatar-DFibCsCs.es.js.map +1 -0
  39. package/dist/chunks/{button-B4vE-tAz.es.js → button-Ccof5UcQ.es.js} +4 -4
  40. package/dist/chunks/{button-B4vE-tAz.es.js.map → button-Ccof5UcQ.es.js.map} +1 -1
  41. package/dist/chunks/calendar-CcA9vDZ_.es.js +209 -0
  42. package/dist/chunks/calendar-CcA9vDZ_.es.js.map +1 -0
  43. package/dist/chunks/calendar-Dm2LIuao.cjs.js +2 -0
  44. package/dist/chunks/calendar-Dm2LIuao.cjs.js.map +1 -0
  45. package/dist/chunks/{checkbox-B-1U4AKF.es.js → checkbox-CFDf2T7S.es.js} +3 -3
  46. package/dist/chunks/{checkbox-B-1U4AKF.es.js.map → checkbox-CFDf2T7S.es.js.map} +1 -1
  47. package/dist/chunks/{collapsible-motion-CeEspYkc.es.js → collapsible-motion-DmWoSXyS.es.js} +3 -3
  48. package/dist/chunks/{collapsible-motion-CeEspYkc.es.js.map → collapsible-motion-DmWoSXyS.es.js.map} +1 -1
  49. package/dist/chunks/combobox-BuuiDfjq.cjs.js +2 -0
  50. package/dist/chunks/combobox-BuuiDfjq.cjs.js.map +1 -0
  51. package/dist/chunks/{combobox-0cCAwg3W.es.js → combobox-C1DerhP1.es.js} +1064 -1032
  52. package/dist/chunks/combobox-C1DerhP1.es.js.map +1 -0
  53. package/dist/chunks/{data-table-BxITOPnx.es.js → data-table-BuGUlgQU.es.js} +1169 -1116
  54. package/dist/chunks/data-table-BuGUlgQU.es.js.map +1 -0
  55. package/dist/chunks/data-table-CyNImBEZ.cjs.js +2 -0
  56. package/dist/chunks/data-table-CyNImBEZ.cjs.js.map +1 -0
  57. package/dist/chunks/{date-input-D70l0IsY.es.js → date-input-B_T7Az3-.es.js} +4 -4
  58. package/dist/chunks/{date-input-D70l0IsY.es.js.map → date-input-B_T7Az3-.es.js.map} +1 -1
  59. package/dist/chunks/{date-picker-Dk3QgvCN.cjs.js → date-picker-BEDlqfYN.cjs.js} +2 -2
  60. package/dist/chunks/date-picker-BEDlqfYN.cjs.js.map +1 -0
  61. package/dist/chunks/{date-picker-FvaPPqXZ.es.js → date-picker-DcDxaZ6Y.es.js} +14 -14
  62. package/dist/chunks/date-picker-DcDxaZ6Y.es.js.map +1 -0
  63. package/dist/chunks/date-range-picker-C5G8uDlJ.es.js +358 -0
  64. package/dist/chunks/date-range-picker-C5G8uDlJ.es.js.map +1 -0
  65. package/dist/chunks/date-range-picker-vr0DE_0V.cjs.js +2 -0
  66. package/dist/chunks/date-range-picker-vr0DE_0V.cjs.js.map +1 -0
  67. package/dist/chunks/{dialog-Bsg1kLnV.es.js → dialog-C9OHxEA2.es.js} +2 -2
  68. package/dist/chunks/{dialog-Bsg1kLnV.es.js.map → dialog-C9OHxEA2.es.js.map} +1 -1
  69. package/dist/chunks/{dialog.title-BmLccUat.es.js → dialog.title-CGSRn_GL.es.js} +7 -7
  70. package/dist/chunks/{dialog.title-BmLccUat.es.js.map → dialog.title-CGSRn_GL.es.js.map} +1 -1
  71. package/dist/chunks/{draggable-list-CadviYoN.es.js → draggable-list-5SfJXtEK.es.js} +10 -10
  72. package/dist/chunks/{draggable-list-CadviYoN.es.js.map → draggable-list-5SfJXtEK.es.js.map} +1 -1
  73. package/dist/chunks/{drawer-BsHkmwKB.es.js → drawer-LRm6SeM-.es.js} +8 -8
  74. package/dist/chunks/{drawer-BsHkmwKB.es.js.map → drawer-LRm6SeM-.es.js.map} +1 -1
  75. package/dist/chunks/{extract-style-props-CTU5PJnh.es.js → extract-style-props-CZpdYA8m.es.js} +2 -2
  76. package/dist/chunks/{extract-style-props-CTU5PJnh.es.js.map → extract-style-props-CZpdYA8m.es.js.map} +1 -1
  77. package/dist/chunks/{form-field-CH7MhZMM.es.js → form-field-B6PqLujT.es.js} +3 -3
  78. package/dist/chunks/{form-field-CH7MhZMM.es.js.map → form-field-B6PqLujT.es.js.map} +1 -1
  79. package/dist/chunks/{group-DDgNGiAB.es.js → group-BLPsc2Lf.es.js} +2 -2
  80. package/dist/chunks/{group-DDgNGiAB.es.js.map → group-BLPsc2Lf.es.js.map} +1 -1
  81. package/dist/chunks/{heading-DwvFL6nk.es.js → heading-14HwlWvH.es.js} +2 -2
  82. package/dist/chunks/{heading-DwvFL6nk.es.js.map → heading-14HwlWvH.es.js.map} +1 -1
  83. package/dist/chunks/{icon-button-CNauu_zf.es.js → icon-button-g4dZUH5O.es.js} +2 -2
  84. package/dist/chunks/{icon-button-CNauu_zf.es.js.map → icon-button-g4dZUH5O.es.js.map} +1 -1
  85. package/dist/chunks/{icon-toggle-button-D5ic1FhD.es.js → icon-toggle-button-DBGgxBWR.es.js} +2 -2
  86. package/dist/chunks/{icon-toggle-button-D5ic1FhD.es.js.map → icon-toggle-button-DBGgxBWR.es.js.map} +1 -1
  87. package/dist/chunks/{index-jNM4sRnI.es.js → index-CaeeOiBp.es.js} +3 -3
  88. package/dist/chunks/{index-jNM4sRnI.es.js.map → index-CaeeOiBp.es.js.map} +1 -1
  89. package/dist/chunks/{kbd-C6IVVksK.es.js → kbd-Cy3jFCSc.es.js} +2 -2
  90. package/dist/chunks/{kbd-C6IVVksK.es.js.map → kbd-Cy3jFCSc.es.js.map} +1 -1
  91. package/dist/chunks/loading-spinner-ByHGBHzt.es.js.map +1 -1
  92. package/dist/chunks/loading-spinner-DsKcjJ2b.cjs.js.map +1 -1
  93. package/dist/chunks/{localized-field-u03KZc2G.cjs.js → localized-field-BffTavHV.cjs.js} +2 -2
  94. package/dist/chunks/localized-field-BffTavHV.cjs.js.map +1 -0
  95. package/dist/chunks/{localized-field-D4HBEdq0.es.js → localized-field-CHV3AGQ-.es.js} +10 -10
  96. package/dist/chunks/localized-field-CHV3AGQ-.es.js.map +1 -0
  97. package/dist/chunks/{menu-CvowvbXh.es.js → menu-B5r0vnY6.es.js} +5 -5
  98. package/dist/chunks/{menu-CvowvbXh.es.js.map → menu-B5r0vnY6.es.js.map} +1 -1
  99. package/dist/chunks/{money-input-DHiEn7XA.es.js → money-input-Con6I5Ej.es.js} +7 -7
  100. package/dist/chunks/money-input-Con6I5Ej.es.js.map +1 -0
  101. package/dist/chunks/money-input-qNQdmjtx.cjs.js.map +1 -1
  102. package/dist/chunks/{multiline-text-input-BD_Pe10q.es.js → multiline-text-input-Cta4bg2-.es.js} +4 -4
  103. package/dist/chunks/{multiline-text-input-BD_Pe10q.es.js.map → multiline-text-input-Cta4bg2-.es.js.map} +1 -1
  104. package/dist/chunks/{nimbus-provider-DD5Om-MD.es.js → nimbus-provider-BtTUZMKb.es.js} +2 -2
  105. package/dist/chunks/{nimbus-provider-DD5Om-MD.es.js.map → nimbus-provider-BtTUZMKb.es.js.map} +1 -1
  106. package/dist/chunks/{number-input-DO5bD82a.es.js → number-input-BClKrTYK.es.js} +5 -5
  107. package/dist/chunks/{number-input-DO5bD82a.es.js.map → number-input-BClKrTYK.es.js.map} +1 -1
  108. package/dist/chunks/number-input-BUdRuDBZ.cjs.js.map +1 -1
  109. package/dist/chunks/pagination-BL1y2lAx.cjs.js +2 -0
  110. package/dist/chunks/pagination-BL1y2lAx.cjs.js.map +1 -0
  111. package/dist/chunks/pagination-BqjffQ1Z.es.js +210 -0
  112. package/dist/chunks/pagination-BqjffQ1Z.es.js.map +1 -0
  113. package/dist/chunks/{password-input-D4vhdbQW.es.js → password-input-DoWjkkoL.es.js} +4 -4
  114. package/dist/chunks/password-input-DoWjkkoL.es.js.map +1 -0
  115. package/dist/chunks/password-input-Dtu0_JiV.cjs.js.map +1 -1
  116. package/dist/chunks/{popover-qy-Vw0qP.es.js → popover-Dtxly24d.es.js} +2 -2
  117. package/dist/chunks/{popover-qy-Vw0qP.es.js.map → popover-Dtxly24d.es.js.map} +1 -1
  118. package/dist/chunks/{progress-bar-h8RUoyYt.es.js → progress-bar-oCdd2qvN.es.js} +4 -4
  119. package/dist/chunks/{progress-bar-h8RUoyYt.es.js.map → progress-bar-oCdd2qvN.es.js.map} +1 -1
  120. package/dist/chunks/{radio-input-qdrHc_fC.es.js → radio-input-eA3VvPwV.es.js} +5 -5
  121. package/dist/chunks/{radio-input-qdrHc_fC.es.js.map → radio-input-eA3VvPwV.es.js.map} +1 -1
  122. package/dist/chunks/range-calendar-BXMVhACe.cjs.js +2 -0
  123. package/dist/chunks/range-calendar-BXMVhACe.cjs.js.map +1 -0
  124. package/dist/chunks/range-calendar-BnB1F7_i.es.js +209 -0
  125. package/dist/chunks/range-calendar-BnB1F7_i.es.js.map +1 -0
  126. package/dist/chunks/rich-text-input-BebV_CaK.es.js +1200 -0
  127. package/dist/chunks/rich-text-input-BebV_CaK.es.js.map +1 -0
  128. package/dist/chunks/rich-text-input-D6WXRxiJ.cjs.js +10 -0
  129. package/dist/chunks/rich-text-input-D6WXRxiJ.cjs.js.map +1 -0
  130. package/dist/chunks/scoped-search-input-B5wDEKhF.es.js +143 -0
  131. package/dist/chunks/scoped-search-input-B5wDEKhF.es.js.map +1 -0
  132. package/dist/chunks/scoped-search-input-C3Vuxp-X.cjs.js +2 -0
  133. package/dist/chunks/scoped-search-input-C3Vuxp-X.cjs.js.map +1 -0
  134. package/dist/chunks/{search-input-CD_OQQwA.es.js → search-input-CmmBtmQf.es.js} +9 -9
  135. package/dist/chunks/{search-input-CD_OQQwA.es.js.map → search-input-CmmBtmQf.es.js.map} +1 -1
  136. package/dist/chunks/search-input-D4ISfjCg.cjs.js.map +1 -1
  137. package/dist/chunks/select-DLnPgZGL.cjs.js.map +1 -1
  138. package/dist/chunks/{select-Dny1auOH.es.js → select-DYkIoOqo.es.js} +10 -10
  139. package/dist/chunks/{select-Dny1auOH.es.js.map → select-DYkIoOqo.es.js.map} +1 -1
  140. package/dist/chunks/{separator-CCqidzEw.es.js → separator-D2824IwZ.es.js} +4 -4
  141. package/dist/chunks/{separator-CCqidzEw.es.js.map → separator-D2824IwZ.es.js.map} +1 -1
  142. package/dist/chunks/split-button-D4fKtZU6.cjs.js +2 -0
  143. package/dist/chunks/split-button-D4fKtZU6.cjs.js.map +1 -0
  144. package/dist/chunks/split-button-P5JM5TIs.es.js +106 -0
  145. package/dist/chunks/split-button-P5JM5TIs.es.js.map +1 -0
  146. package/dist/chunks/{switch-BRRuFpzu.es.js → switch-jX2Q8faO.es.js} +3 -3
  147. package/dist/chunks/{switch-BRRuFpzu.es.js.map → switch-jX2Q8faO.es.js.map} +1 -1
  148. package/dist/chunks/{tabs-BXoJTX6z.es.js → tabs-Bcs39h4J.es.js} +3 -3
  149. package/dist/chunks/{tabs-BXoJTX6z.es.js.map → tabs-Bcs39h4J.es.js.map} +1 -1
  150. package/dist/chunks/tag-group-Dx690E8r.cjs.js +2 -0
  151. package/dist/chunks/tag-group-Dx690E8r.cjs.js.map +1 -0
  152. package/dist/chunks/{tag-group-CDx2BCfu.es.js → tag-group-k_jEVQhv.es.js} +120 -110
  153. package/dist/chunks/tag-group-k_jEVQhv.es.js.map +1 -0
  154. package/dist/chunks/{text-BufUKCee.es.js → text-5xQLnEG4.es.js} +2 -2
  155. package/dist/chunks/{text-BufUKCee.es.js.map → text-5xQLnEG4.es.js.map} +1 -1
  156. package/dist/chunks/{text-input-CJNTJbW0.es.js → text-input-D8mfBGrA.es.js} +4 -4
  157. package/dist/chunks/{text-input-CJNTJbW0.es.js.map → text-input-D8mfBGrA.es.js.map} +1 -1
  158. package/dist/chunks/{time-input-CHA4irr4.es.js → time-input-9W94XJTY.es.js} +4 -4
  159. package/dist/chunks/{time-input-CHA4irr4.es.js.map → time-input-9W94XJTY.es.js.map} +1 -1
  160. package/dist/chunks/{toggle-button-C_WSvD7l.es.js → toggle-button-D1v2OtiG.es.js} +4 -4
  161. package/dist/chunks/{toggle-button-C_WSvD7l.es.js.map → toggle-button-D1v2OtiG.es.js.map} +1 -1
  162. package/dist/chunks/{toggle-button-group-CF1NxUIC.es.js → toggle-button-group-Bla1fe1z.es.js} +2 -2
  163. package/dist/chunks/{toggle-button-group-CF1NxUIC.es.js.map → toggle-button-group-Bla1fe1z.es.js.map} +1 -1
  164. package/dist/chunks/{toolbar-CdR1MLqf.es.js → toolbar-DpBQgamV.es.js} +4 -4
  165. package/dist/chunks/{toolbar-CdR1MLqf.es.js.map → toolbar-DpBQgamV.es.js.map} +1 -1
  166. package/dist/chunks/{tooltip-B6mt46EB.es.js → tooltip-BX45xCJd.es.js} +2 -2
  167. package/dist/chunks/{tooltip-B6mt46EB.es.js.map → tooltip-BX45xCJd.es.js.map} +1 -1
  168. package/dist/chunks/{useDateFormatter-BqUHVksS.es.js → useDateFormatter-DOSckBIG.es.js} +6 -6
  169. package/dist/chunks/{useDateFormatter-BqUHVksS.es.js.map → useDateFormatter-DOSckBIG.es.js.map} +1 -1
  170. package/dist/chunks/{useGridListItem-Cr6HZ3kJ.es.js → useGridListItem-Th8ivSlM.es.js} +2 -2
  171. package/dist/chunks/{useGridListItem-Cr6HZ3kJ.es.js.map → useGridListItem-Th8ivSlM.es.js.map} +1 -1
  172. package/dist/chunks/{utils-DF3YB901.es.js → utils-DDFsiM-7.es.js} +3 -3
  173. package/dist/chunks/{utils-DF3YB901.es.js.map → utils-DDFsiM-7.es.js.map} +1 -1
  174. package/dist/components/accordion.es.js +1 -1
  175. package/dist/components/alert.es.js +1 -1
  176. package/dist/components/avatar/avatar.i18n.d.ts +7 -0
  177. package/dist/components/avatar.cjs +1 -1
  178. package/dist/components/avatar.es.js +1 -1
  179. package/dist/components/button.es.js +1 -1
  180. package/dist/components/calendar/calendar.i18n.d.ts +22 -0
  181. package/dist/components/calendar.cjs +1 -1
  182. package/dist/components/calendar.es.js +1 -1
  183. package/dist/components/checkbox.es.js +1 -1
  184. package/dist/components/collapsible-motion.es.js +1 -1
  185. package/dist/components/combobox/combobox.i18n.d.ts +32 -0
  186. package/dist/components/combobox.cjs +1 -1
  187. package/dist/components/combobox.es.js +1 -1
  188. package/dist/components/components.es.js +1 -1
  189. package/dist/components/data-table/data-table.i18n.d.ts +37 -0
  190. package/dist/components/data-table.cjs +1 -1
  191. package/dist/components/data-table.es.js +1 -1
  192. package/dist/components/date-input.es.js +1 -1
  193. package/dist/components/date-picker/date-picker.i18n.d.ts +1 -2
  194. package/dist/components/date-picker.cjs +1 -1
  195. package/dist/components/date-picker.es.js +1 -1
  196. package/dist/components/date-range-picker/date-range-picker.i18n.d.ts +67 -0
  197. package/dist/components/date-range-picker.cjs +1 -1
  198. package/dist/components/date-range-picker.es.js +1 -1
  199. package/dist/components/dialog.es.js +1 -1
  200. package/dist/components/draggable-list.es.js +1 -1
  201. package/dist/components/drawer.es.js +1 -1
  202. package/dist/components/form-field.es.js +1 -1
  203. package/dist/components/group.es.js +1 -1
  204. package/dist/components/heading.es.js +1 -1
  205. package/dist/components/icon-button.es.js +1 -1
  206. package/dist/components/icon-toggle-button.es.js +1 -1
  207. package/dist/components/kbd.es.js +1 -1
  208. package/dist/components/loading-spinner/loading-spinner.i18n.d.ts +1 -2
  209. package/dist/components/localized-field/localized-field.i18n.d.ts +1 -2
  210. package/dist/components/localized-field.cjs +1 -1
  211. package/dist/components/localized-field.es.js +1 -1
  212. package/dist/components/money-input/money-input.i18n.d.ts +1 -2
  213. package/dist/components/money-input.es.js +1 -1
  214. package/dist/components/multiline-text-input.es.js +1 -1
  215. package/dist/components/nimbus-provider.es.js +1 -1
  216. package/dist/components/number-input/number-input.i18n.d.ts +1 -2
  217. package/dist/components/number-input.es.js +1 -1
  218. package/dist/components/pagination/pagination.i18n.d.ts +42 -0
  219. package/dist/components/pagination.cjs +1 -1
  220. package/dist/components/pagination.es.js +1 -1
  221. package/dist/components/password-input/password-input.i18n.d.ts +1 -2
  222. package/dist/components/password-input.es.js +1 -1
  223. package/dist/components/popover.es.js +1 -1
  224. package/dist/components/progress-bar.es.js +1 -1
  225. package/dist/components/radio-input.es.js +1 -1
  226. package/dist/components/range-calendar/range-calendar.i18n.d.ts +22 -0
  227. package/dist/components/range-calendar.cjs +1 -1
  228. package/dist/components/range-calendar.es.js +1 -1
  229. package/dist/components/rich-text-input/constants/text-styles.d.ts +6 -1
  230. package/dist/components/rich-text-input/hooks/use-toolbar-state.d.ts +4 -2
  231. package/dist/components/rich-text-input/rich-text-input.i18n.d.ts +122 -0
  232. package/dist/components/rich-text-input/utils/index.d.ts +0 -1
  233. package/dist/components/rich-text-input.cjs +1 -1
  234. package/dist/components/rich-text-input.es.js +1 -1
  235. package/dist/components/scoped-search-input/scoped-search-input.i18n.d.ts +1 -12
  236. package/dist/components/scoped-search-input.cjs +1 -1
  237. package/dist/components/scoped-search-input.es.js +1 -1
  238. package/dist/components/search-input/search-input.i18n.d.ts +1 -2
  239. package/dist/components/search-input.es.js +1 -1
  240. package/dist/components/select/select.i18n.d.ts +1 -2
  241. package/dist/components/select.es.js +1 -1
  242. package/dist/components/separator.es.js +1 -1
  243. package/dist/components/split-button/split-button.i18n.d.ts +7 -0
  244. package/dist/components/split-button.cjs +1 -1
  245. package/dist/components/split-button.es.js +1 -1
  246. package/dist/components/switch.es.js +1 -1
  247. package/dist/components/tabs.es.js +1 -1
  248. package/dist/components/tag-group/tag-group.i18n.d.ts +7 -0
  249. package/dist/components/tag-group.cjs +1 -1
  250. package/dist/components/tag-group.es.js +1 -1
  251. package/dist/components/text-input.es.js +1 -1
  252. package/dist/components/text.es.js +1 -1
  253. package/dist/components/time-input.es.js +1 -1
  254. package/dist/components/toggle-button-group.es.js +1 -1
  255. package/dist/components/toggle-button.es.js +1 -1
  256. package/dist/components/toolbar.es.js +1 -1
  257. package/dist/components/tooltip.es.js +1 -1
  258. package/dist/index.cjs +1 -1
  259. package/dist/index.es.js +51 -51
  260. package/package.json +5 -5
  261. package/dist/chunks/avatar-BGM-BDJa.cjs.js +0 -2
  262. package/dist/chunks/avatar-BGM-BDJa.cjs.js.map +0 -1
  263. package/dist/chunks/avatar-CTiSGVoD.es.js +0 -40
  264. package/dist/chunks/avatar-CTiSGVoD.es.js.map +0 -1
  265. package/dist/chunks/calendar-57M9FKqt.cjs.js +0 -2
  266. package/dist/chunks/calendar-57M9FKqt.cjs.js.map +0 -1
  267. package/dist/chunks/calendar-Kwoe0bYZ.es.js +0 -187
  268. package/dist/chunks/calendar-Kwoe0bYZ.es.js.map +0 -1
  269. package/dist/chunks/combobox-0cCAwg3W.es.js.map +0 -1
  270. package/dist/chunks/combobox-CKozWtj7.cjs.js +0 -2
  271. package/dist/chunks/combobox-CKozWtj7.cjs.js.map +0 -1
  272. package/dist/chunks/data-table-BxITOPnx.es.js.map +0 -1
  273. package/dist/chunks/data-table-Depm8_y5.cjs.js +0 -2
  274. package/dist/chunks/data-table-Depm8_y5.cjs.js.map +0 -1
  275. package/dist/chunks/date-picker-Dk3QgvCN.cjs.js.map +0 -1
  276. package/dist/chunks/date-picker-FvaPPqXZ.es.js.map +0 -1
  277. package/dist/chunks/date-range-picker-CMWsBL9j.cjs.js +0 -2
  278. package/dist/chunks/date-range-picker-CMWsBL9j.cjs.js.map +0 -1
  279. package/dist/chunks/date-range-picker-vH5DixcB.es.js +0 -281
  280. package/dist/chunks/date-range-picker-vH5DixcB.es.js.map +0 -1
  281. package/dist/chunks/localized-field-D4HBEdq0.es.js.map +0 -1
  282. package/dist/chunks/localized-field-u03KZc2G.cjs.js.map +0 -1
  283. package/dist/chunks/money-input-DHiEn7XA.es.js.map +0 -1
  284. package/dist/chunks/pagination-CjUoltTe.es.js +0 -160
  285. package/dist/chunks/pagination-CjUoltTe.es.js.map +0 -1
  286. package/dist/chunks/pagination-CnPACrJ5.cjs.js +0 -2
  287. package/dist/chunks/pagination-CnPACrJ5.cjs.js.map +0 -1
  288. package/dist/chunks/password-input-D4vhdbQW.es.js.map +0 -1
  289. package/dist/chunks/range-calendar-BjuErXNK.es.js +0 -187
  290. package/dist/chunks/range-calendar-BjuErXNK.es.js.map +0 -1
  291. package/dist/chunks/range-calendar-Cjqu4SXg.cjs.js +0 -2
  292. package/dist/chunks/range-calendar-Cjqu4SXg.cjs.js.map +0 -1
  293. package/dist/chunks/rich-text-input-B41QcSHY.cjs.js +0 -10
  294. package/dist/chunks/rich-text-input-B41QcSHY.cjs.js.map +0 -1
  295. package/dist/chunks/rich-text-input-BGVyDm30.es.js +0 -1074
  296. package/dist/chunks/rich-text-input-BGVyDm30.es.js.map +0 -1
  297. package/dist/chunks/scoped-search-input-CO9xtMOE.es.js +0 -153
  298. package/dist/chunks/scoped-search-input-CO9xtMOE.es.js.map +0 -1
  299. package/dist/chunks/scoped-search-input-COM1I724.cjs.js +0 -2
  300. package/dist/chunks/scoped-search-input-COM1I724.cjs.js.map +0 -1
  301. package/dist/chunks/split-button-C8BsVNhR.cjs.js +0 -2
  302. package/dist/chunks/split-button-C8BsVNhR.cjs.js.map +0 -1
  303. package/dist/chunks/split-button-YwopMYuE.es.js +0 -100
  304. package/dist/chunks/split-button-YwopMYuE.es.js.map +0 -1
  305. package/dist/chunks/tag-group-Beqgbttp.cjs.js +0 -2
  306. package/dist/chunks/tag-group-Beqgbttp.cjs.js.map +0 -1
  307. package/dist/chunks/tag-group-CDx2BCfu.es.js.map +0 -1
  308. package/dist/components/rich-text-input/utils/text-style-utils.d.ts +0 -33
@@ -1,9 +1,9 @@
1
1
  import { jsx as e, jsxs as m, Fragment as u } from "react/jsx-runtime";
2
2
  import { createSlotRecipeContext as f } from "@chakra-ui/react";
3
- import { c as h, a as g, b as S } from "./DateField-BjKTTWs5.es.js";
3
+ import { c as h, a as g, b as S } from "./DateField-oXtVK-_5.es.js";
4
4
  import { useRecipe as x } from "@chakra-ui/react/styled-system";
5
- import { d as I } from "./index-jNM4sRnI.es.js";
6
- import { e as $ } from "./extract-style-props-CTU5PJnh.es.js";
5
+ import { d as I } from "./index-CaeeOiBp.es.js";
6
+ import { e as $ } from "./extract-style-props-CZpdYA8m.es.js";
7
7
  const { withProvider: D, withContext: t } = /* @__PURE__ */ f({
8
8
  key: "dateInput"
9
9
  }), b = /* @__PURE__ */ D("div", "root"), P = /* @__PURE__ */ t("div", "leadingElement"), v = /* @__PURE__ */ t("div", "trailingElement"), E = /* @__PURE__ */ t("div", "segmentGroup"), C = /* @__PURE__ */ t("div", "segment"), y = (o) => {
@@ -18,4 +18,4 @@ y.displayName = "DateInput";
18
18
  export {
19
19
  y as D
20
20
  };
21
- //# sourceMappingURL=date-input-D70l0IsY.es.js.map
21
+ //# sourceMappingURL=date-input-B_T7Az3-.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-input-D70l0IsY.es.js","sources":["../../src/components/date-input/date-input.slots.tsx","../../src/components/date-input/date-input.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DateInputRootSlotProps } from \"./date-input.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"dateInput\",\n});\n\n/**\n * Root component that provides the styling context for the DateInput component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DateInputRootSlot = withProvider<\n HTMLDivElement,\n DateInputRootSlotProps\n>(\"div\", \"root\");\n\nexport const DateInputLeadingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"leadingElement\");\n\nexport const DateInputTrailingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trailingElement\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segmentGroup\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segment\");\n","import {\n DateInputLeadingElementSlot,\n DateInputRootSlot,\n DateInputSegmentGroupSlot,\n DateInputSegmentSlot,\n DateInputTrailingElementSlot,\n} from \"./date-input.slots\";\n\nimport {\n DateField,\n DateInput as DateInputField,\n DateSegment,\n} from \"react-aria-components\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { dateInputSlotRecipe } from \"./date-input.recipe\";\nimport type { DateInputProps } from \"./date-input.types\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * # DateInput\n *\n * allows entering a date\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/dateinput}\n */\nexport const DateInput = (props: DateInputProps) => {\n const recipe = useRecipe({ recipe: dateInputSlotRecipe });\n const { leadingElement, trailingElement, ...rest } = props;\n const [recipeProps, recipeFreeProps] = recipe.splitVariantProps({ ...rest });\n const [styleProps, functionalProps] = extractStyleProps(recipeFreeProps);\n\n return (\n <DateInputRootSlot {...recipeProps} {...styleProps} asChild>\n <DateField {...functionalProps}>\n <>\n {leadingElement && (\n <DateInputLeadingElementSlot>\n {leadingElement}\n </DateInputLeadingElementSlot>\n )}\n <DateInputSegmentGroupSlot asChild>\n <DateInputField>\n {(segment) => (\n <DateInputSegmentSlot asChild>\n <DateSegment segment={segment} />\n </DateInputSegmentSlot>\n )}\n </DateInputField>\n </DateInputSegmentGroupSlot>\n {trailingElement && (\n <DateInputTrailingElementSlot>\n {trailingElement}\n </DateInputTrailingElementSlot>\n )}\n </>\n </DateField>\n </DateInputRootSlot>\n );\n};\n\nDateInput.displayName = \"DateInput\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DateInputRootSlot","DateInputLeadingElementSlot","DateInputTrailingElementSlot","DateInputSegmentGroupSlot","DateInputSegmentSlot","DateInput","props","recipe","useRecipe","dateInputSlotRecipe","leadingElement","trailingElement","rest","recipeProps","recipeFreeProps","styleProps","functionalProps","extractStyleProps","jsx","DateField","jsxs","Fragment","DateInputField","segment","DateSegment"],"mappings":";;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAMYC,IAAoB,gBAAAH,EAG/B,OAAO,MAAM,GAEFI,IAA8B,gBAAAH,EAGzC,OAAO,gBAAgB,GAEZI,IAA+B,gBAAAJ,EAG1C,OAAO,iBAAiB,GAKbK,IAA4B,gBAAAL,EAGvC,OAAO,cAAc,GAKVM,IAAuB,gBAAAN,EAGlC,OAAO,SAAS,GCnBLO,IAAY,CAACC,MAA0B;AAClD,QAAMC,IAASC,EAAU,EAAE,QAAQC,GAAqB,GAClD,EAAE,gBAAAC,GAAgB,iBAAAC,GAAiB,GAAGC,MAASN,GAC/C,CAACO,GAAaC,CAAe,IAAIP,EAAO,kBAAkB,EAAE,GAAGK,GAAM,GACrE,CAACG,GAAYC,CAAe,IAAIC,EAAkBH,CAAe;AAEvE,SACE,gBAAAI,EAAClB,GAAA,EAAmB,GAAGa,GAAc,GAAGE,GAAY,SAAO,IACzD,UAAA,gBAAAG,EAACC,GAAA,EAAW,GAAGH,GACb,UAAA,gBAAAI,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAX,KACC,gBAAAQ,EAACjB,KACE,UAAAS,EAAA,CACH;AAAA,sBAEDP,GAAA,EAA0B,SAAO,IAChC,UAAA,gBAAAe,EAACI,KACE,UAAA,CAACC,MACA,gBAAAL,EAACd,GAAA,EAAqB,SAAO,IAC3B,UAAA,gBAAAc,EAACM,KAAY,SAAAD,EAAA,CAAkB,GACjC,GAEJ,EAAA,CACF;AAAA,IACCZ,KACC,gBAAAO,EAAChB,GAAA,EACE,UAAAS,EAAA,CACH;AAAA,EAAA,EAAA,CAEJ,GACF,GACF;AAEJ;AAEAN,EAAU,cAAc;"}
1
+ {"version":3,"file":"date-input-B_T7Az3-.es.js","sources":["../../src/components/date-input/date-input.slots.tsx","../../src/components/date-input/date-input.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DateInputRootSlotProps } from \"./date-input.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"dateInput\",\n});\n\n/**\n * Root component that provides the styling context for the DateInput component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DateInputRootSlot = withProvider<\n HTMLDivElement,\n DateInputRootSlotProps\n>(\"div\", \"root\");\n\nexport const DateInputLeadingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"leadingElement\");\n\nexport const DateInputTrailingElementSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trailingElement\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segmentGroup\");\n\n/**\n * Slot component for the DateField part of the DateInput.\n */\nexport const DateInputSegmentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segment\");\n","import {\n DateInputLeadingElementSlot,\n DateInputRootSlot,\n DateInputSegmentGroupSlot,\n DateInputSegmentSlot,\n DateInputTrailingElementSlot,\n} from \"./date-input.slots\";\n\nimport {\n DateField,\n DateInput as DateInputField,\n DateSegment,\n} from \"react-aria-components\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { dateInputSlotRecipe } from \"./date-input.recipe\";\nimport type { DateInputProps } from \"./date-input.types\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * # DateInput\n *\n * allows entering a date\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/dateinput}\n */\nexport const DateInput = (props: DateInputProps) => {\n const recipe = useRecipe({ recipe: dateInputSlotRecipe });\n const { leadingElement, trailingElement, ...rest } = props;\n const [recipeProps, recipeFreeProps] = recipe.splitVariantProps({ ...rest });\n const [styleProps, functionalProps] = extractStyleProps(recipeFreeProps);\n\n return (\n <DateInputRootSlot {...recipeProps} {...styleProps} asChild>\n <DateField {...functionalProps}>\n <>\n {leadingElement && (\n <DateInputLeadingElementSlot>\n {leadingElement}\n </DateInputLeadingElementSlot>\n )}\n <DateInputSegmentGroupSlot asChild>\n <DateInputField>\n {(segment) => (\n <DateInputSegmentSlot asChild>\n <DateSegment segment={segment} />\n </DateInputSegmentSlot>\n )}\n </DateInputField>\n </DateInputSegmentGroupSlot>\n {trailingElement && (\n <DateInputTrailingElementSlot>\n {trailingElement}\n </DateInputTrailingElementSlot>\n )}\n </>\n </DateField>\n </DateInputRootSlot>\n );\n};\n\nDateInput.displayName = \"DateInput\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DateInputRootSlot","DateInputLeadingElementSlot","DateInputTrailingElementSlot","DateInputSegmentGroupSlot","DateInputSegmentSlot","DateInput","props","recipe","useRecipe","dateInputSlotRecipe","leadingElement","trailingElement","rest","recipeProps","recipeFreeProps","styleProps","functionalProps","extractStyleProps","jsx","DateField","jsxs","Fragment","DateInputField","segment","DateSegment"],"mappings":";;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAMYC,IAAoB,gBAAAH,EAG/B,OAAO,MAAM,GAEFI,IAA8B,gBAAAH,EAGzC,OAAO,gBAAgB,GAEZI,IAA+B,gBAAAJ,EAG1C,OAAO,iBAAiB,GAKbK,IAA4B,gBAAAL,EAGvC,OAAO,cAAc,GAKVM,IAAuB,gBAAAN,EAGlC,OAAO,SAAS,GCnBLO,IAAY,CAACC,MAA0B;AAClD,QAAMC,IAASC,EAAU,EAAE,QAAQC,GAAqB,GAClD,EAAE,gBAAAC,GAAgB,iBAAAC,GAAiB,GAAGC,MAASN,GAC/C,CAACO,GAAaC,CAAe,IAAIP,EAAO,kBAAkB,EAAE,GAAGK,GAAM,GACrE,CAACG,GAAYC,CAAe,IAAIC,EAAkBH,CAAe;AAEvE,SACE,gBAAAI,EAAClB,GAAA,EAAmB,GAAGa,GAAc,GAAGE,GAAY,SAAO,IACzD,UAAA,gBAAAG,EAACC,GAAA,EAAW,GAAGH,GACb,UAAA,gBAAAI,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAX,KACC,gBAAAQ,EAACjB,KACE,UAAAS,EAAA,CACH;AAAA,sBAEDP,GAAA,EAA0B,SAAO,IAChC,UAAA,gBAAAe,EAACI,KACE,UAAA,CAACC,MACA,gBAAAL,EAACd,GAAA,EAAqB,SAAO,IAC3B,UAAA,gBAAAc,EAACM,KAAY,SAAAD,EAAA,CAAkB,GACjC,GAEJ,EAAA,CACF;AAAA,IACCZ,KACC,gBAAAO,EAAChB,GAAA,EACE,UAAAS,EAAA,CACH;AAAA,EAAA,EAAA,CAEJ,GACF,GACF;AAEJ;AAEAN,EAAU,cAAc;"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("react/jsx-runtime"),j=require("@chakra-ui/react"),P=require("@commercetools/nimbus-icons"),x=require("./DatePicker-Codg0QnC.cjs.js"),T=require("./Dialog-DINBl88u.cjs.js"),q=require("./Group-1nWkximy.cjs.js"),v=require("@chakra-ui/react/styled-system"),C=require("./index-CxLKWOES.cjs.js"),I=require("./extract-style-props-IfUYxPJV.cjs.js"),f=require("react"),h=require("react-intl"),M=require("./time-input-C8BWH8SA.cjs.js"),E=require("@chakra-ui/react/flex"),H=require("./text-BtRhIklG.cjs.js"),k=require("./Button-DLCecw8f.cjs.js"),S=require("./utils-DVb3jcp5.cjs.js"),R=require("./DateField-B5u8QZFY.cjs.js"),N=require("./date-input-DTM_24C2.cjs.js"),V=require("./calendar-57M9FKqt.cjs.js"),B=require("./box-CWni3A32.cjs.js"),y=require("./icon-button-B28VUff9.cjs.js"),{withProvider:w,withContext:g}=j.createSlotRecipeContext({key:"datePicker"}),z=w("div","root"),F=g("div","group"),G=g("div","popover"),A=g("div","calendar"),m=h.defineMessages({clearInput:{id:"Nimbus.DatePicker.clearInput",description:"aria-label for clear input button in date picker",defaultMessage:"Clear input value"},enterTime:{id:"Nimbus.DatePicker.Time.enterTime",description:"aria-label for time input field in date picker",defaultMessage:"Enter time"},enterTimeHour:{id:"Nimbus.DatePicker.Time.enterTimeHour",description:"aria-label for hour-only time input in date picker",defaultMessage:"Enter time (hour)"},enterTimeHourMinute:{id:"Nimbus.DatePicker.Time.enterTimeHourMinute",description:"aria-label for hour and minute time input in date picker",defaultMessage:"Enter time (hour and minute)"},enterTimeHourMinuteSecond:{id:"Nimbus.DatePicker.Time.enterTimeHourMinuteSecond",description:"aria-label for full time input with seconds in date picker",defaultMessage:"Enter time (hour, minute, and second)"},startTime:{id:"Nimbus.DatePicker.Time.startTime",description:"Label for start time in date picker",defaultMessage:"Start time"}}),L=({hideTimeZone:n,hourCycle:r})=>{const s=f.useContext(x.$06d5b8ec9ee5d538$export$50a10c048fdcdee9),{granularity:a,dateValue:t}=s,o=f.useRef(null),u=f.useRef(t);return a==="day"?null:(f.useEffect(()=>{let i;if(t&&u.current?.compare(t)!==0){const c=o.current,l=document.activeElement;c?.contains(l)&&l?.getAttribute("role")==="spinbutton"||(i=setTimeout(()=>{c&&c.querySelector('[role="spinbutton"]')?.focus()},50))}return u.current=t,()=>{i&&clearTimeout(i)}},[t]),e.jsxs(E.Flex,{ref:o,borderTop:"solid-25",borderColor:"neutral.3",py:"300",px:"400",alignItems:"center",justifyContent:"center",gap:"200",children:[e.jsx(H.Text,{textStyle:"xs",fontWeight:"500",color:"neutral.12",children:e.jsx(h.FormattedMessage,{...m.startTime})}),e.jsx(M.TimeInput,{slot:"timeInput",variant:"ghost",size:"sm",hideTimeZone:n,hourCycle:r})]}))},O=({children:n})=>{const r=h.useIntl(),s=S.$64fa3d84918910a7$export$fabf2dc03a41866e(k.$d2b4bc8c273e7be6$export$24d547caef80ccd1)||{},a=f.useContext(x.$06d5b8ec9ee5d538$export$50a10c048fdcdee9),t=a?.dateValue===null,{timeValue:o,setTimeValue:u,granularity:i}=a,c=s?.isDisabled,l=()=>{switch(i){case"hour":return r.formatMessage(m.enterTimeHour);case"minute":return r.formatMessage(m.enterTimeHourMinute);case"second":return r.formatMessage(m.enterTimeHourMinuteSecond);default:return r.formatMessage(m.enterTime)}},b={calendarToggle:{...s,onPress:d=>{const $=document?.activeElement;$&&$.blur(),s.onPress?.(d)}},clear:{onPress:()=>a?.setValue(null),"aria-label":r.formatMessage(m.clearInput),isDisabled:c,style:t?{display:"none"}:void 0,"aria-hidden":t?!0:void 0}},p={timeInput:{value:o,onChange:d=>{d!==null&&u(d)},granularity:i==="day"?void 0:i,"aria-label":l()}};return e.jsx(S.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[k.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{slots:b}],[R.$40825cdb76e74f70$export$8e17ddc448e87c1e,{slots:p}]],children:n})},D=n=>{const{size:r="md",variant:s,granularity:a="day",hideTimeZone:t,hourCycle:o}=n,u=v.useSlotRecipe({recipe:C.datePickerSlotRecipe}),[i,c]=u.splitVariantProps(n),[l,b]=I.extractStyleProps(c),p=r==="md"?"xs":"2xs",d=a==="day"?n.shouldCloseOnSelect:!1;return e.jsx(z,{...i,...l,asChild:!0,children:e.jsx(x.$06d5b8ec9ee5d538$export$5109c6dd95d8fb00,{...b,shouldCloseOnSelect:d,children:e.jsxs(O,{children:[e.jsx(F,{asChild:!0,children:e.jsx(q.$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,{children:e.jsx(N.DateInput,{size:r,variant:s,width:"full",hideTimeZone:t,hourCycle:o,trailingElement:e.jsxs(B.Box,{children:[e.jsx(y.IconButton,{tone:"primary",variant:"ghost",size:p,slot:"clear",children:e.jsx(P.Close,{})}),e.jsx(y.IconButton,{tone:"primary",variant:"ghost",size:p,slot:"calendarToggle",children:e.jsx(P.CalendarMonth,{})})]})})})}),e.jsx(G,{asChild:!0,children:e.jsx(T.$07b14b47974efb58$export$5b6b19405a83ff9d,{placement:"bottom end",children:e.jsxs(T.$de32f1b87079253c$export$3ddf2d174ce01153,{children:[e.jsx(A,{children:e.jsx(V.Calendar,{})}),e.jsx(L,{hideTimeZone:t,hourCycle:o})]})})})]})})})};D.displayName="DatePicker";exports.DatePicker=D;
2
- //# sourceMappingURL=date-picker-Dk3QgvCN.cjs.js.map
1
+ "use strict";const e=require("react/jsx-runtime"),j=require("@chakra-ui/react"),P=require("@commercetools/nimbus-icons"),x=require("./DatePicker-Codg0QnC.cjs.js"),T=require("./Dialog-DINBl88u.cjs.js"),q=require("./Group-1nWkximy.cjs.js"),v=require("@chakra-ui/react/styled-system"),C=require("./index-CxLKWOES.cjs.js"),I=require("./extract-style-props-IfUYxPJV.cjs.js"),f=require("react"),h=require("react-intl"),M=require("./time-input-C8BWH8SA.cjs.js"),E=require("@chakra-ui/react/flex"),H=require("./text-BtRhIklG.cjs.js"),k=require("./Button-DLCecw8f.cjs.js"),S=require("./utils-DVb3jcp5.cjs.js"),R=require("./DateField-B5u8QZFY.cjs.js"),N=require("./date-input-DTM_24C2.cjs.js"),V=require("./calendar-Dm2LIuao.cjs.js"),B=require("./box-CWni3A32.cjs.js"),y=require("./icon-button-B28VUff9.cjs.js"),{withProvider:w,withContext:g}=j.createSlotRecipeContext({key:"datePicker"}),z=w("div","root"),F=g("div","group"),G=g("div","popover"),A=g("div","calendar"),m=h.defineMessages({clearInput:{id:"Nimbus.DatePicker.clearInput",description:"aria-label for clear input button in date picker",defaultMessage:"Clear input value"},enterTime:{id:"Nimbus.DatePicker.Time.enterTime",description:"aria-label for time input field in date picker",defaultMessage:"Enter time"},enterTimeHour:{id:"Nimbus.DatePicker.Time.enterTimeHour",description:"aria-label for hour-only time input in date picker",defaultMessage:"Enter time (hour)"},enterTimeHourMinute:{id:"Nimbus.DatePicker.Time.enterTimeHourMinute",description:"aria-label for hour and minute time input in date picker",defaultMessage:"Enter time (hour and minute)"},enterTimeHourMinuteSecond:{id:"Nimbus.DatePicker.Time.enterTimeHourMinuteSecond",description:"aria-label for full time input with seconds in date picker",defaultMessage:"Enter time (hour, minute, and second)"},startTime:{id:"Nimbus.DatePicker.Time.startTime",description:"Label for start time in date picker",defaultMessage:"Start time"}}),L=({hideTimeZone:n,hourCycle:r})=>{const s=f.useContext(x.$06d5b8ec9ee5d538$export$50a10c048fdcdee9),{granularity:a,dateValue:t}=s,o=f.useRef(null),u=f.useRef(t);return a==="day"?null:(f.useEffect(()=>{let i;if(t&&u.current?.compare(t)!==0){const c=o.current,l=document.activeElement;c?.contains(l)&&l?.getAttribute("role")==="spinbutton"||(i=setTimeout(()=>{c&&c.querySelector('[role="spinbutton"]')?.focus()},50))}return u.current=t,()=>{i&&clearTimeout(i)}},[t]),e.jsxs(E.Flex,{ref:o,borderTop:"solid-25",borderColor:"neutral.3",py:"300",px:"400",alignItems:"center",justifyContent:"center",gap:"200",children:[e.jsx(H.Text,{textStyle:"xs",fontWeight:"500",color:"neutral.12",children:e.jsx(h.FormattedMessage,{...m.startTime})}),e.jsx(M.TimeInput,{slot:"timeInput",variant:"ghost",size:"sm",hideTimeZone:n,hourCycle:r})]}))},O=({children:n})=>{const r=h.useIntl(),s=S.$64fa3d84918910a7$export$fabf2dc03a41866e(k.$d2b4bc8c273e7be6$export$24d547caef80ccd1)||{},a=f.useContext(x.$06d5b8ec9ee5d538$export$50a10c048fdcdee9),t=a?.dateValue===null,{timeValue:o,setTimeValue:u,granularity:i}=a,c=s?.isDisabled,l=()=>{switch(i){case"hour":return r.formatMessage(m.enterTimeHour);case"minute":return r.formatMessage(m.enterTimeHourMinute);case"second":return r.formatMessage(m.enterTimeHourMinuteSecond);default:return r.formatMessage(m.enterTime)}},b={calendarToggle:{...s,onPress:d=>{const $=document?.activeElement;$&&$.blur(),s.onPress?.(d)}},clear:{onPress:()=>a?.setValue(null),"aria-label":r.formatMessage(m.clearInput),isDisabled:c,style:t?{display:"none"}:void 0,"aria-hidden":t?!0:void 0}},p={timeInput:{value:o,onChange:d=>{d!==null&&u(d)},granularity:i==="day"?void 0:i,"aria-label":l()}};return e.jsx(S.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[k.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{slots:b}],[R.$40825cdb76e74f70$export$8e17ddc448e87c1e,{slots:p}]],children:n})},D=n=>{const{size:r="md",variant:s,granularity:a="day",hideTimeZone:t,hourCycle:o}=n,u=v.useSlotRecipe({recipe:C.datePickerSlotRecipe}),[i,c]=u.splitVariantProps(n),[l,b]=I.extractStyleProps(c),p=r==="md"?"xs":"2xs",d=a==="day"?n.shouldCloseOnSelect:!1;return e.jsx(z,{...i,...l,asChild:!0,children:e.jsx(x.$06d5b8ec9ee5d538$export$5109c6dd95d8fb00,{...b,shouldCloseOnSelect:d,children:e.jsxs(O,{children:[e.jsx(F,{asChild:!0,children:e.jsx(q.$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,{children:e.jsx(N.DateInput,{size:r,variant:s,width:"full",hideTimeZone:t,hourCycle:o,trailingElement:e.jsxs(B.Box,{children:[e.jsx(y.IconButton,{tone:"primary",variant:"ghost",size:p,slot:"clear",children:e.jsx(P.Close,{})}),e.jsx(y.IconButton,{tone:"primary",variant:"ghost",size:p,slot:"calendarToggle",children:e.jsx(P.CalendarMonth,{})})]})})})}),e.jsx(G,{asChild:!0,children:e.jsx(T.$07b14b47974efb58$export$5b6b19405a83ff9d,{placement:"bottom end",children:e.jsxs(T.$de32f1b87079253c$export$3ddf2d174ce01153,{children:[e.jsx(A,{children:e.jsx(V.Calendar,{})}),e.jsx(L,{hideTimeZone:t,hourCycle:o})]})})})]})})})};D.displayName="DatePicker";exports.DatePicker=D;
2
+ //# sourceMappingURL=date-picker-BEDlqfYN.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-picker-BEDlqfYN.cjs.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/date-picker.i18n.ts","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DatePickerRootSlotProps } from \"./date-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"datePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n clearInput: {\n id: \"Nimbus.DatePicker.clearInput\",\n description: \"aria-label for clear input button in date picker\",\n defaultMessage: \"Clear input value\",\n },\n enterTime: {\n id: \"Nimbus.DatePicker.Time.enterTime\",\n description: \"aria-label for time input field in date picker\",\n defaultMessage: \"Enter time\",\n },\n enterTimeHour: {\n id: \"Nimbus.DatePicker.Time.enterTimeHour\",\n description: \"aria-label for hour-only time input in date picker\",\n defaultMessage: \"Enter time (hour)\",\n },\n enterTimeHourMinute: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinute\",\n description: \"aria-label for hour and minute time input in date picker\",\n defaultMessage: \"Enter time (hour and minute)\",\n },\n enterTimeHourMinuteSecond: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinuteSecond\",\n description: \"aria-label for full time input with seconds in date picker\",\n defaultMessage: \"Enter time (hour, minute, and second)\",\n },\n startTime: {\n id: \"Nimbus.DatePicker.Time.startTime\",\n description: \"Label for start time in date picker\",\n defaultMessage: \"Start time\",\n },\n});\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\nimport { FormattedMessage } from \"react-intl\";\nimport { messages } from \"../date-picker.i18n\";\n\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n <FormattedMessage {...messages.startTime} />\n </Text>\n <TimeInput\n slot=\"timeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../date-picker.i18n\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const datePickerState = useContext(DatePickerStateContext);\n const noInputValue = datePickerState?.dateValue === null;\n\n const { timeValue, setTimeValue, granularity } = datePickerState!;\n\n // Try to get disabled state from the button context\n const isDatePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = () => {\n switch (granularity) {\n case \"hour\":\n return intl.formatMessage(messages.enterTimeHour);\n case \"minute\":\n return intl.formatMessage(messages.enterTimeHourMinute);\n case \"second\":\n return intl.formatMessage(messages.enterTimeHourMinuteSecond);\n default:\n return intl.formatMessage(messages.enterTime);\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": intl.formatMessage(messages.clearInput),\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { DateInput, Calendar, IconButton, Box } from \"@/components\";\nimport { DatePickerTimeInput } from \"./components/date-picker.time-input\";\nimport { DatePickerCustomContext } from \"./components/date-picker.custom-context\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n trailingElement={\n <Box>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </Box>\n }\n />\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DatePickerRootSlot","DatePickerGroupSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","messages","defineMessages","DatePickerTimeInput","hideTimeZone","hourCycle","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","FormattedMessage","TimeInput","DatePickerCustomContext","children","intl","useIntl","buttonContext","useSlottedContext","ButtonContext","noInputValue","timeValue","setTimeValue","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","timeInputSlots","value","Provider","TimeFieldContext","DatePicker","props","size","variant","recipe","useSlotRecipe","datePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","Box","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":"kyBAOM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,YACP,CAAC,EAMYC,EAAqBH,EAGhC,MAAO,MAAM,EAKFI,EAAsBH,EAGjC,MAAO,OAAO,EAKHI,EAAwBJ,EAGnC,MAAO,SAAS,EAKLK,EAAyBL,EAGpC,MAAO,UAAU,ECxCNM,EAAWC,EAAAA,eAAe,CACrC,WAAY,CACV,GAAI,+BACJ,YAAa,mDACb,eAAgB,mBAAA,EAElB,UAAW,CACT,GAAI,mCACJ,YAAa,iDACb,eAAgB,YAAA,EAElB,cAAe,CACb,GAAI,uCACJ,YAAa,qDACb,eAAgB,mBAAA,EAElB,oBAAqB,CACnB,GAAI,6CACJ,YAAa,2DACb,eAAgB,8BAAA,EAElB,0BAA2B,CACzB,GAAI,mDACJ,YAAa,6DACb,eAAgB,uCAAA,EAElB,UAAW,CACT,GAAI,mCACJ,YAAa,sCACb,eAAgB,YAAA,CAEpB,CAAC,EC1BYC,EAAsB,CAAC,CAClC,aAAAC,EACA,UAAAC,CACF,IAAgC,CAC9B,MAAMC,EAAkBC,EAAAA,WAAWC,2CAAsB,EACnD,CAAE,YAAAC,EAAa,UAAAC,CAAA,EAAcJ,EAC7BK,EAAeC,EAAAA,OAAuB,IAAI,EAC1CC,EAAkBD,EAAAA,OAAOF,CAAS,EAGxC,OAAID,IAAgB,MACX,MAITK,EAAAA,UAAU,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AO,GAC1D,SAAA/B,EAAAA,IAACoC,EAAAA,0CAAA,CACE,GAAGJ,EACJ,oBAAAG,EAEA,gBAAC/B,EAAA,CACC,SAAA,CAAAJ,MAACtB,EAAA,CAAoB,QAAO,GAC1B,SAAAsB,MAACqC,EAAAA,0CAAA,CACC,SAAArC,EAAAA,IAACsC,EAAAA,UAAA,CACC,KAAAd,EACA,QAAAC,EACA,MAAM,OACN,aAAAzC,EACA,UAAAC,EACA,uBACGsD,MAAA,CAEC,SAAA,CAAAvC,EAAAA,IAACwC,EAAAA,WAAA,CACC,KAAK,UACL,QAAQ,QACR,KAAMN,EACN,KAAK,QAEL,eAACO,EAAAA,MAAA,CAAA,CAAM,CAAA,CAAA,EAGTzC,EAAAA,IAACwC,EAAAA,WAAA,CACC,KAAK,UACL,QAAQ,QACR,KAAMN,EACN,KAAK,iBAEL,eAACQ,EAAAA,cAAA,CAAA,CAAc,CAAA,CAAA,CACjB,CAAA,CACF,CAAA,CAAA,EAGN,CAAA,CACF,EACA1C,EAAAA,IAACrB,GAAsB,QAAO,GAC5B,eAACgE,EAAAA,0CAAA,CAAQ,UAAU,aACjB,SAAA7C,EAAAA,KAAC8C,EAAAA,0CAAA,CACC,SAAA,CAAA5C,EAAAA,IAACpB,EAAA,CACC,SAAAoB,EAAAA,IAAC6C,EAAAA,SAAA,CAAA,CAAS,EACZ,EACA7C,EAAAA,IAACjB,EAAA,CACC,aAAAC,EACA,UAAAC,CAAA,CAAA,CACF,CAAA,CACF,EACF,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,EAEJ,CAEJ,EAEAqC,EAAW,YAAc"}
@@ -1,24 +1,24 @@
1
1
  import { jsxs as b, jsx as e } from "react/jsx-runtime";
2
2
  import { createSlotRecipeContext as S } from "@chakra-ui/react";
3
3
  import { Close as y, CalendarMonth as D } from "@commercetools/nimbus-icons";
4
- import { b as k, c as v } from "./DatePicker-BrgxRTyS.es.js";
5
- import { $ as C, h as M } from "./Dialog-Cx5MzP6O.es.js";
6
- import { $ as I } from "./Group-Bd9Zcn-V.es.js";
4
+ import { b as k, c as v } from "./DatePicker-DrWdEOUQ.es.js";
5
+ import { $ as C, h as M } from "./Dialog-C3sNnu1k.es.js";
6
+ import { $ as I } from "./Group-CiDvtaeM.es.js";
7
7
  import { useSlotRecipe as E } from "@chakra-ui/react/styled-system";
8
- import { h as H } from "./index-jNM4sRnI.es.js";
9
- import { e as N } from "./extract-style-props-CTU5PJnh.es.js";
8
+ import { h as H } from "./index-CaeeOiBp.es.js";
9
+ import { e as N } from "./extract-style-props-CZpdYA8m.es.js";
10
10
  import { useContext as x, useRef as T, useEffect as R } from "react";
11
11
  import { defineMessages as V, FormattedMessage as w, useIntl as z } from "react-intl";
12
- import { T as B } from "./time-input-CHA4irr4.es.js";
12
+ import { T as B } from "./time-input-9W94XJTY.es.js";
13
13
  import { Flex as F } from "@chakra-ui/react/flex";
14
- import { T as j } from "./text-BufUKCee.es.js";
15
- import { $ as P } from "./Button-CafJrK0a.es.js";
16
- import { e as A, d as G } from "./utils-DF3YB901.es.js";
17
- import { d as L } from "./DateField-BjKTTWs5.es.js";
18
- import { D as O } from "./date-input-D70l0IsY.es.js";
19
- import { C as q } from "./calendar-Kwoe0bYZ.es.js";
14
+ import { T as j } from "./text-5xQLnEG4.es.js";
15
+ import { $ as P } from "./Button-C4ud7YxN.es.js";
16
+ import { f as A, d as G } from "./utils-DDFsiM-7.es.js";
17
+ import { d as L } from "./DateField-oXtVK-_5.es.js";
18
+ import { D as O } from "./date-input-B_T7Az3-.es.js";
19
+ import { C as q } from "./calendar-CcA9vDZ_.es.js";
20
20
  import { B as W } from "./box-DuBoAZvq.es.js";
21
- import { I as $ } from "./icon-button-CNauu_zf.es.js";
21
+ import { I as $ } from "./icon-button-g4dZUH5O.es.js";
22
22
  const { withProvider: Z, withContext: h } = /* @__PURE__ */ S({
23
23
  key: "datePicker"
24
24
  }), J = /* @__PURE__ */ Z("div", "root"), K = /* @__PURE__ */ h("div", "group"), Q = /* @__PURE__ */ h("div", "popover"), U = /* @__PURE__ */ h("div", "calendar"), u = /* @__PURE__ */ V({
@@ -217,4 +217,4 @@ _.displayName = "DatePicker";
217
217
  export {
218
218
  _ as D
219
219
  };
220
- //# sourceMappingURL=date-picker-FvaPPqXZ.es.js.map
220
+ //# sourceMappingURL=date-picker-DcDxaZ6Y.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-picker-DcDxaZ6Y.es.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/date-picker.i18n.ts","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { DatePickerRootSlotProps } from \"./date-picker.types\";\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"datePicker\",\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootSlotProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n clearInput: {\n id: \"Nimbus.DatePicker.clearInput\",\n description: \"aria-label for clear input button in date picker\",\n defaultMessage: \"Clear input value\",\n },\n enterTime: {\n id: \"Nimbus.DatePicker.Time.enterTime\",\n description: \"aria-label for time input field in date picker\",\n defaultMessage: \"Enter time\",\n },\n enterTimeHour: {\n id: \"Nimbus.DatePicker.Time.enterTimeHour\",\n description: \"aria-label for hour-only time input in date picker\",\n defaultMessage: \"Enter time (hour)\",\n },\n enterTimeHourMinute: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinute\",\n description: \"aria-label for hour and minute time input in date picker\",\n defaultMessage: \"Enter time (hour and minute)\",\n },\n enterTimeHourMinuteSecond: {\n id: \"Nimbus.DatePicker.Time.enterTimeHourMinuteSecond\",\n description: \"aria-label for full time input with seconds in date picker\",\n defaultMessage: \"Enter time (hour, minute, and second)\",\n },\n startTime: {\n id: \"Nimbus.DatePicker.Time.startTime\",\n description: \"Label for start time in date picker\",\n defaultMessage: \"Start time\",\n },\n});\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\nimport { FormattedMessage } from \"react-intl\";\nimport { messages } from \"../date-picker.i18n\";\n\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n <FormattedMessage {...messages.startTime} />\n </Text>\n <TimeInput\n slot=\"timeInput\"\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../date-picker.i18n\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const datePickerState = useContext(DatePickerStateContext);\n const noInputValue = datePickerState?.dateValue === null;\n\n const { timeValue, setTimeValue, granularity } = datePickerState!;\n\n // Try to get disabled state from the button context\n const isDatePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = () => {\n switch (granularity) {\n case \"hour\":\n return intl.formatMessage(messages.enterTimeHour);\n case \"minute\":\n return intl.formatMessage(messages.enterTimeHourMinute);\n case \"second\":\n return intl.formatMessage(messages.enterTimeHourMinuteSecond);\n default:\n return intl.formatMessage(messages.enterTime);\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": intl.formatMessage(messages.clearInput),\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { DateInput, Calendar, IconButton, Box } from \"@/components\";\nimport { DatePickerTimeInput } from \"./components/date-picker.time-input\";\nimport { DatePickerCustomContext } from \"./components/date-picker.custom-context\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n trailingElement={\n <Box>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </Box>\n }\n />\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","DatePickerRootSlot","DatePickerGroupSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","messages","defineMessages","DatePickerTimeInput","hideTimeZone","hourCycle","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","FormattedMessage","TimeInput","DatePickerCustomContext","children","intl","useIntl","buttonContext","useSlottedContext","ButtonContext","noInputValue","timeValue","setTimeValue","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","timeInputSlots","value","Provider","TimeFieldContext","DatePicker","props","size","variant","recipe","useSlotRecipe","datePickerSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","Box","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAMYC,IAAqB,gBAAAH,EAGhC,OAAO,MAAM,GAKFI,IAAsB,gBAAAH,EAGjC,OAAO,OAAO,GA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A,UAAA;AAAA,QACF,EAAA,CACF,GACF,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEAqC,EAAW,cAAc;"}
@@ -0,0 +1,358 @@
1
+ import { jsxs as g, jsx as a } from "react/jsx-runtime";
2
+ import { createSlotRecipeContext as N } from "@chakra-ui/react";
3
+ import { Close as V, CalendarMonth as E } from "@commercetools/nimbus-icons";
4
+ import { $ as I, a as z } from "./DatePicker-DrWdEOUQ.es.js";
5
+ import { $ as w, h as L } from "./Dialog-C3sNnu1k.es.js";
6
+ import { $ as W } from "./Group-CiDvtaeM.es.js";
7
+ import { useSlotRecipe as j } from "@chakra-ui/react/styled-system";
8
+ import { g as F } from "./index-CaeeOiBp.es.js";
9
+ import { e as O } from "./extract-style-props-CZpdYA8m.es.js";
10
+ import { useContext as H, useRef as M, useEffect as A } from "react";
11
+ import { defineMessages as B, useIntl as $ } from "react-intl";
12
+ import { Flex as S } from "@chakra-ui/react/flex";
13
+ import { T as v } from "./text-5xQLnEG4.es.js";
14
+ import { T as y } from "./time-input-9W94XJTY.es.js";
15
+ import { $ as k } from "./Button-C4ud7YxN.es.js";
16
+ import { f as G, d as q } from "./utils-DDFsiM-7.es.js";
17
+ import { d as K } from "./DateField-oXtVK-_5.es.js";
18
+ import { R as J } from "./range-calendar-BnB1F7_i.es.js";
19
+ import { D as x } from "./date-input-B_T7Az3-.es.js";
20
+ import { I as C } from "./icon-button-g4dZUH5O.es.js";
21
+ const { withProvider: Q, withContext: D } = /* @__PURE__ */ N({
22
+ key: "dateRangePicker"
23
+ }), U = /* @__PURE__ */ Q("div", "root"), X = /* @__PURE__ */ D("div", "group"), Y = /* @__PURE__ */ D("div", "trigger"), Z = /* @__PURE__ */ D("div", "popover"), _ = /* @__PURE__ */ D("div", "calendar"), l = /* @__PURE__ */ B({
24
+ clearSelection: {
25
+ id: "Nimbus.DateRangePicker.clearSelection",
26
+ description: "aria-label for clear button in date range picker",
27
+ defaultMessage: "Clear date range"
28
+ },
29
+ openCalendar: {
30
+ id: "Nimbus.DateRangePicker.openCalendar",
31
+ description: "aria-label for calendar toggle button in date range picker",
32
+ defaultMessage: "Open calendar"
33
+ },
34
+ clearInput: {
35
+ id: "Nimbus.DateRangePicker.clearInput",
36
+ description: "aria-label for clear input button in date range picker",
37
+ defaultMessage: "Clear input value"
38
+ },
39
+ startTime: {
40
+ id: "Nimbus.DateRangePicker.startTime",
41
+ description: "aria-label for start time input (default)",
42
+ defaultMessage: "Start time"
43
+ },
44
+ startTimeHour: {
45
+ id: "Nimbus.DateRangePicker.startTimeHour",
46
+ description: "aria-label for start time input (hour granularity)",
47
+ defaultMessage: "Start time (hour)"
48
+ },
49
+ startTimeHourMinute: {
50
+ id: "Nimbus.DateRangePicker.startTimeHourMinute",
51
+ description: "aria-label for start time input (minute granularity)",
52
+ defaultMessage: "Start time (hour and minute)"
53
+ },
54
+ startTimeHourMinuteSecond: {
55
+ id: "Nimbus.DateRangePicker.startTimeHourMinuteSecond",
56
+ description: "aria-label for start time input (second granularity)",
57
+ defaultMessage: "Start time (hour, minute, and second)"
58
+ },
59
+ endTime: {
60
+ id: "Nimbus.DateRangePicker.endTime",
61
+ description: "aria-label for end time input (default)",
62
+ defaultMessage: "End time"
63
+ },
64
+ endTimeHour: {
65
+ id: "Nimbus.DateRangePicker.endTimeHour",
66
+ description: "aria-label for end time input (hour granularity)",
67
+ defaultMessage: "End time (hour)"
68
+ },
69
+ endTimeHourMinute: {
70
+ id: "Nimbus.DateRangePicker.endTimeHourMinute",
71
+ description: "aria-label for end time input (minute granularity)",
72
+ defaultMessage: "End time (hour and minute)"
73
+ },
74
+ endTimeHourMinuteSecond: {
75
+ id: "Nimbus.DateRangePicker.endTimeHourMinuteSecond",
76
+ description: "aria-label for end time input (second granularity)",
77
+ defaultMessage: "End time (hour, minute, and second)"
78
+ },
79
+ startTimeLabel: {
80
+ id: "Nimbus.DateRangePicker.startTimeLabel",
81
+ description: "visible label for start time input field",
82
+ defaultMessage: "Start time"
83
+ },
84
+ endTimeLabel: {
85
+ id: "Nimbus.DateRangePicker.endTimeLabel",
86
+ description: "visible label for end time input field",
87
+ defaultMessage: "End time"
88
+ }
89
+ }), ee = ({
90
+ hideTimeZone: s,
91
+ hourCycle: i
92
+ }) => {
93
+ const d = $(), e = H(I), { granularity: c, value: n } = e, o = M(null), m = M(n);
94
+ return c === "day" ? null : (A(() => {
95
+ let p;
96
+ if (n?.start && m.current?.start?.compare(n.start) !== 0 || n?.end && m.current?.end?.compare(n.end) !== 0) {
97
+ const u = o.current, f = document.activeElement;
98
+ u?.contains(f) && f?.getAttribute("role") === "spinbutton" || (p = setTimeout(() => {
99
+ if (u) {
100
+ const t = u.querySelector(
101
+ '[role="spinbutton"]'
102
+ );
103
+ t && t.focus();
104
+ }
105
+ }, 50));
106
+ }
107
+ return m.current = n, () => {
108
+ p && clearTimeout(p);
109
+ };
110
+ }, [n]), /* @__PURE__ */ g(
111
+ S,
112
+ {
113
+ ref: o,
114
+ borderTop: "solid-25",
115
+ borderColor: "neutral.3",
116
+ py: "300",
117
+ px: "400",
118
+ alignItems: "center",
119
+ justifyContent: "center",
120
+ gap: "200",
121
+ children: [
122
+ /* @__PURE__ */ g(S, { alignItems: "center", gap: "200", children: [
123
+ /* @__PURE__ */ a(
124
+ v,
125
+ {
126
+ textStyle: "xs",
127
+ fontWeight: "500",
128
+ color: "neutral.12",
129
+ minWidth: "fit-content",
130
+ children: d.formatMessage(l.startTimeLabel)
131
+ }
132
+ ),
133
+ /* @__PURE__ */ a(
134
+ y,
135
+ {
136
+ slot: "startTimeInput",
137
+ variant: "ghost",
138
+ size: "sm",
139
+ hideTimeZone: s,
140
+ hourCycle: i
141
+ }
142
+ )
143
+ ] }),
144
+ /* @__PURE__ */ g(S, { alignItems: "center", gap: "200", children: [
145
+ /* @__PURE__ */ a(
146
+ v,
147
+ {
148
+ textStyle: "xs",
149
+ fontWeight: "500",
150
+ color: "neutral.12",
151
+ minWidth: "fit-content",
152
+ children: d.formatMessage(l.endTimeLabel)
153
+ }
154
+ ),
155
+ /* @__PURE__ */ a(
156
+ y,
157
+ {
158
+ slot: "endTimeInput",
159
+ variant: "ghost",
160
+ size: "sm",
161
+ hideTimeZone: s,
162
+ hourCycle: i
163
+ }
164
+ )
165
+ ] })
166
+ ]
167
+ }
168
+ ));
169
+ }, te = ({
170
+ children: s
171
+ }) => {
172
+ const i = $(), d = G(k) || {}, e = H(I), c = (t) => t?.day && t?.month && t?.year, n = !e?.value || !c(e.value.start) || !c(e.value.end), { granularity: o } = e, m = e?.value?.start && "hour" in e.value.start ? e.value.start : null, p = e?.value?.end && "hour" in e.value.end ? e.value.end : null, T = d?.isDisabled, u = (t) => {
173
+ const r = t === "start" ? "start" : "end";
174
+ switch (o) {
175
+ case "hour":
176
+ return i.formatMessage(
177
+ l[`${r}TimeHour`]
178
+ );
179
+ case "minute":
180
+ return i.formatMessage(
181
+ l[`${r}TimeHourMinute`]
182
+ );
183
+ case "second":
184
+ return i.formatMessage(
185
+ l[`${r}TimeHourMinuteSecond`]
186
+ );
187
+ default:
188
+ return i.formatMessage(
189
+ l[`${r}Time`]
190
+ );
191
+ }
192
+ }, f = {
193
+ /** toggles the calendar popover */
194
+ calendarToggle: {
195
+ ...d,
196
+ onPress: (t) => {
197
+ const r = document?.activeElement;
198
+ r && r.blur(), d.onPress?.(t);
199
+ }
200
+ },
201
+ /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */
202
+ clear: {
203
+ // Clear both start and end values
204
+ onPress: () => e?.setValue(null),
205
+ "aria-label": i.formatMessage(l.clearInput),
206
+ isDisabled: T,
207
+ // Hide the button when there's no value
208
+ style: n ? { display: "none" } : void 0,
209
+ "aria-hidden": n ? !0 : void 0
210
+ }
211
+ }, P = {
212
+ startTimeInput: {
213
+ value: m,
214
+ onChange: (t) => {
215
+ if (t !== null && e?.value?.start) {
216
+ const r = e.value, b = r.start, h = r.end;
217
+ if (b && h) {
218
+ const R = b.set({
219
+ hour: t.hour,
220
+ minute: t.minute || 0,
221
+ second: t.second || 0,
222
+ millisecond: t.millisecond || 0
223
+ });
224
+ e.setValue({
225
+ start: R,
226
+ end: h
227
+ });
228
+ }
229
+ }
230
+ },
231
+ granularity: o === "day" ? void 0 : o,
232
+ "aria-label": u("start")
233
+ },
234
+ endTimeInput: {
235
+ value: p,
236
+ onChange: (t) => {
237
+ if (t !== null && e?.value?.end) {
238
+ const r = e.value, b = r.start, h = r.end;
239
+ if (b && h) {
240
+ const R = h.set({
241
+ hour: t.hour,
242
+ minute: t.minute || 0,
243
+ second: t.second || 0,
244
+ millisecond: t.millisecond || 0
245
+ });
246
+ e.setValue({
247
+ start: b,
248
+ end: R
249
+ });
250
+ }
251
+ }
252
+ },
253
+ granularity: o === "day" ? void 0 : o,
254
+ "aria-label": u("end")
255
+ }
256
+ };
257
+ return /* @__PURE__ */ a(
258
+ q,
259
+ {
260
+ values: [
261
+ [
262
+ k,
263
+ {
264
+ slots: f
265
+ }
266
+ ],
267
+ [K, { slots: P }]
268
+ ],
269
+ children: s
270
+ }
271
+ );
272
+ }, ae = (s) => {
273
+ const i = $(), { granularity: d = "day", hideTimeZone: e, hourCycle: c } = s, n = j({ recipe: F }), [o, m] = n.splitVariantProps(s), [p, T] = O(m), { size: u = "md" } = o, f = u === "md" ? "xs" : "2xs", P = d === "day" ? s.shouldCloseOnSelect : !1;
274
+ return /* @__PURE__ */ a(U, { ...o, ...p, asChild: !0, children: /* @__PURE__ */ a(
275
+ z,
276
+ {
277
+ ...T,
278
+ shouldCloseOnSelect: P,
279
+ children: /* @__PURE__ */ g(te, { children: [
280
+ /* @__PURE__ */ a(X, { asChild: !0, children: /* @__PURE__ */ g(W, { children: [
281
+ /* @__PURE__ */ a(
282
+ x,
283
+ {
284
+ slot: "start",
285
+ size: s.size,
286
+ variant: "plain",
287
+ width: "auto",
288
+ hideTimeZone: e,
289
+ hourCycle: c
290
+ }
291
+ ),
292
+ /* @__PURE__ */ a(
293
+ v,
294
+ {
295
+ as: "span",
296
+ px: "150",
297
+ color: "neutral.11",
298
+ userSelect: "none",
299
+ "aria-hidden": "true",
300
+ slot: null,
301
+ children: "–"
302
+ }
303
+ ),
304
+ /* @__PURE__ */ a(
305
+ x,
306
+ {
307
+ slot: "end",
308
+ size: s.size,
309
+ variant: "plain",
310
+ width: "auto",
311
+ hideTimeZone: e,
312
+ hourCycle: c
313
+ }
314
+ ),
315
+ /* @__PURE__ */ g(Y, { children: [
316
+ /* @__PURE__ */ a(
317
+ C,
318
+ {
319
+ tone: "primary",
320
+ variant: "ghost",
321
+ size: f,
322
+ slot: "clear",
323
+ "aria-label": i.formatMessage(l.clearSelection),
324
+ children: /* @__PURE__ */ a(V, {})
325
+ }
326
+ ),
327
+ /* @__PURE__ */ a(
328
+ C,
329
+ {
330
+ tone: "primary",
331
+ variant: "ghost",
332
+ size: f,
333
+ slot: "calendarToggle",
334
+ "aria-label": i.formatMessage(l.openCalendar),
335
+ children: /* @__PURE__ */ a(E, {})
336
+ }
337
+ )
338
+ ] })
339
+ ] }) }),
340
+ /* @__PURE__ */ a(Z, { asChild: !0, children: /* @__PURE__ */ a(w, { placement: "bottom end", children: /* @__PURE__ */ g(L, { children: [
341
+ /* @__PURE__ */ a(_, { children: /* @__PURE__ */ a(J, {}) }),
342
+ /* @__PURE__ */ a(
343
+ ee,
344
+ {
345
+ hideTimeZone: e,
346
+ hourCycle: c
347
+ }
348
+ )
349
+ ] }) }) })
350
+ ] })
351
+ }
352
+ ) });
353
+ };
354
+ ae.displayName = "DateRangePicker";
355
+ export {
356
+ ae as D
357
+ };
358
+ //# sourceMappingURL=date-range-picker-C5G8uDlJ.es.js.map