@epilot/zenith-react 0.2.0-next.3 → 0.2.0-next.5

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 (274) hide show
  1. package/README.md +37 -1
  2. package/codemods/README.md +182 -0
  3. package/codemods/format.ts +86 -0
  4. package/codemods/migrate/base-elements/accordion.ts +132 -0
  5. package/codemods/migrate/base-elements/alert.ts +81 -0
  6. package/codemods/migrate/base-elements/avatar.ts +116 -0
  7. package/codemods/migrate/base-elements/button.ts +188 -0
  8. package/codemods/migrate/base-elements/checkbox.ts +17 -0
  9. package/codemods/migrate/base-elements/chip.ts +87 -0
  10. package/codemods/migrate/base-elements/chip360.ts +162 -0
  11. package/codemods/migrate/base-elements/circular-progress.ts +73 -0
  12. package/codemods/migrate/base-elements/dialog.ts +323 -0
  13. package/codemods/migrate/base-elements/divider.ts +61 -0
  14. package/codemods/migrate/base-elements/feedback-message.ts +95 -0
  15. package/codemods/migrate/base-elements/icon-button.ts +203 -0
  16. package/codemods/migrate/base-elements/index.ts +55 -0
  17. package/codemods/migrate/base-elements/mui-props.ts +29 -0
  18. package/codemods/migrate/base-elements/notification.ts +98 -0
  19. package/codemods/migrate/base-elements/paper.ts +78 -0
  20. package/codemods/migrate/base-elements/select.ts +328 -0
  21. package/codemods/migrate/base-elements/shared.ts +910 -0
  22. package/codemods/migrate/base-elements/skeleton.ts +83 -0
  23. package/codemods/migrate/base-elements/switch.ts +19 -0
  24. package/codemods/migrate/base-elements/tabs.ts +222 -0
  25. package/codemods/migrate/base-elements/text-field.ts +425 -0
  26. package/codemods/migrate/base-elements/toggle-button.ts +185 -0
  27. package/codemods/migrate/base-elements/tooltip.ts +231 -0
  28. package/codemods/migrate/base-elements/typography.ts +247 -0
  29. package/codemods/migrate/base-elements/unsupported.ts +277 -0
  30. package/codemods/migrate/from-base-elements.ts +26 -0
  31. package/codemods/migrate/from-volt.ts +26 -0
  32. package/codemods/migrate/lib/imports.ts +399 -0
  33. package/codemods/migrate/lib/jsx.ts +313 -0
  34. package/codemods/migrate/lib/run-migration.ts +528 -0
  35. package/codemods/migrate/lib/source.ts +6 -0
  36. package/codemods/migrate/lib/todo.ts +107 -0
  37. package/codemods/migrate/lib/types.ts +114 -0
  38. package/codemods/migrate/volt/class-helpers.ts +37 -0
  39. package/codemods/migrate/volt/index.ts +18 -0
  40. package/codemods/migrate/volt/pagination.ts +26 -0
  41. package/codemods/migrate/volt/same-name.ts +293 -0
  42. package/codemods/migrate/volt/stylesheets.ts +18 -0
  43. package/codemods/migrate/volt/tanstack-types.ts +20 -0
  44. package/codemods/radix-to-base-ui.ts +677 -0
  45. package/dist/_virtual/_zenith-runtime-family_accordion.js +7 -0
  46. package/dist/_virtual/_zenith-runtime-family_accordion.js.map +1 -0
  47. package/dist/_virtual/_zenith-runtime-family_alert-dialog.js +7 -0
  48. package/dist/_virtual/_zenith-runtime-family_alert-dialog.js.map +1 -0
  49. package/dist/_virtual/_zenith-runtime-family_avatar.js +7 -0
  50. package/dist/_virtual/_zenith-runtime-family_avatar.js.map +1 -0
  51. package/dist/_virtual/_zenith-runtime-family_button.js +7 -0
  52. package/dist/_virtual/_zenith-runtime-family_button.js.map +1 -0
  53. package/dist/_virtual/_zenith-runtime-family_checkbox.js +7 -0
  54. package/dist/_virtual/_zenith-runtime-family_checkbox.js.map +1 -0
  55. package/dist/_virtual/_zenith-runtime-family_csp-provider.js +7 -0
  56. package/dist/_virtual/_zenith-runtime-family_csp-provider.js.map +1 -0
  57. package/dist/_virtual/_zenith-runtime-family_dialog.js +7 -0
  58. package/dist/_virtual/_zenith-runtime-family_dialog.js.map +1 -0
  59. package/dist/_virtual/_zenith-runtime-family_direction-provider.js +8 -0
  60. package/dist/_virtual/_zenith-runtime-family_direction-provider.js.map +1 -0
  61. package/dist/_virtual/_zenith-runtime-family_menu.js +7 -0
  62. package/dist/_virtual/_zenith-runtime-family_menu.js.map +1 -0
  63. package/dist/_virtual/_zenith-runtime-family_merge-props.js +11 -0
  64. package/dist/_virtual/_zenith-runtime-family_merge-props.js.map +1 -0
  65. package/dist/_virtual/_zenith-runtime-family_popover.js +7 -0
  66. package/dist/_virtual/_zenith-runtime-family_popover.js.map +1 -0
  67. package/dist/_virtual/_zenith-runtime-family_radio-group.js +7 -0
  68. package/dist/_virtual/_zenith-runtime-family_radio-group.js.map +1 -0
  69. package/dist/_virtual/_zenith-runtime-family_radio.js +7 -0
  70. package/dist/_virtual/_zenith-runtime-family_radio.js.map +1 -0
  71. package/dist/_virtual/_zenith-runtime-family_scroll-area.js +7 -0
  72. package/dist/_virtual/_zenith-runtime-family_scroll-area.js.map +1 -0
  73. package/dist/_virtual/_zenith-runtime-family_select.js +7 -0
  74. package/dist/_virtual/_zenith-runtime-family_select.js.map +1 -0
  75. package/dist/_virtual/_zenith-runtime-family_separator.js +7 -0
  76. package/dist/_virtual/_zenith-runtime-family_separator.js.map +1 -0
  77. package/dist/_virtual/_zenith-runtime-family_switch.js +7 -0
  78. package/dist/_virtual/_zenith-runtime-family_switch.js.map +1 -0
  79. package/dist/_virtual/_zenith-runtime-family_tabs.js +7 -0
  80. package/dist/_virtual/_zenith-runtime-family_tabs.js.map +1 -0
  81. package/dist/_virtual/_zenith-runtime-family_toast.js +7 -0
  82. package/dist/_virtual/_zenith-runtime-family_toast.js.map +1 -0
  83. package/dist/_virtual/_zenith-runtime-family_toggle-group.js +7 -0
  84. package/dist/_virtual/_zenith-runtime-family_toggle-group.js.map +1 -0
  85. package/dist/_virtual/_zenith-runtime-family_toggle.js +7 -0
  86. package/dist/_virtual/_zenith-runtime-family_toggle.js.map +1 -0
  87. package/dist/_virtual/_zenith-runtime-family_tooltip.js +7 -0
  88. package/dist/_virtual/_zenith-runtime-family_tooltip.js.map +1 -0
  89. package/dist/_virtual/_zenith-runtime-family_use-render.js +7 -0
  90. package/dist/_virtual/_zenith-runtime-family_use-render.js.map +1 -0
  91. package/dist/components/accordion/accordion.js +179 -96
  92. package/dist/components/accordion/accordion.js.map +1 -1
  93. package/dist/components/alert-dialog/alert-dialog.js +243 -206
  94. package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
  95. package/dist/components/avatar/avatar.js +94 -82
  96. package/dist/components/avatar/avatar.js.map +1 -1
  97. package/dist/components/badge/badge.js +11 -11
  98. package/dist/components/breadcrumb/breadcrumb.js +69 -70
  99. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  100. package/dist/components/button/button.js +119 -102
  101. package/dist/components/button/button.js.map +1 -1
  102. package/dist/components/checkbox/checkbox.js +68 -51
  103. package/dist/components/checkbox/checkbox.js.map +1 -1
  104. package/dist/components/date-range-picker/date-range-picker.js +100 -90
  105. package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
  106. package/dist/components/date-time-picker/date-time-picker-input.js +118 -108
  107. package/dist/components/date-time-picker/date-time-picker-input.js.map +1 -1
  108. package/dist/components/date-time-picker/date-time-picker-panel.js +91 -94
  109. package/dist/components/date-time-picker/date-time-picker-panel.js.map +1 -1
  110. package/dist/components/dialog/dialog.js +238 -228
  111. package/dist/components/dialog/dialog.js.map +1 -1
  112. package/dist/components/drawer/drawer.js +259 -321
  113. package/dist/components/drawer/drawer.js.map +1 -1
  114. package/dist/components/dropdown-menu/dropdown-menu.js +533 -279
  115. package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
  116. package/dist/components/field/field-combobox.js +205 -186
  117. package/dist/components/field/field-combobox.js.map +1 -1
  118. package/dist/components/field/field-select.js +37 -22
  119. package/dist/components/field/field-select.js.map +1 -1
  120. package/dist/components/list/list-sortable.js +104 -0
  121. package/dist/components/list/list-sortable.js.map +1 -0
  122. package/dist/components/list/list.js +246 -324
  123. package/dist/components/list/list.js.map +1 -1
  124. package/dist/components/option-card/option-card.js +121 -117
  125. package/dist/components/option-card/option-card.js.map +1 -1
  126. package/dist/components/pill/pill.js +7 -7
  127. package/dist/components/popover/popover.js +223 -127
  128. package/dist/components/popover/popover.js.map +1 -1
  129. package/dist/components/radio/radio-group-base.js +54 -0
  130. package/dist/components/radio/radio-group-base.js.map +1 -0
  131. package/dist/components/radio/radio.js +71 -60
  132. package/dist/components/radio/radio.js.map +1 -1
  133. package/dist/components/scroll-area/scroll-area.js +142 -108
  134. package/dist/components/scroll-area/scroll-area.js.map +1 -1
  135. package/dist/components/scroll-overflow/scroll-overflow.js +156 -127
  136. package/dist/components/scroll-overflow/scroll-overflow.js.map +1 -1
  137. package/dist/components/segmented-control/segmented-control.js +93 -81
  138. package/dist/components/segmented-control/segmented-control.js.map +1 -1
  139. package/dist/components/select/select.js +485 -310
  140. package/dist/components/select/select.js.map +1 -1
  141. package/dist/components/separator/separator.js.map +1 -1
  142. package/dist/components/slot/compose-as-child.js +15 -12
  143. package/dist/components/slot/compose-as-child.js.map +1 -1
  144. package/dist/components/switch/switch.js +75 -68
  145. package/dist/components/switch/switch.js.map +1 -1
  146. package/dist/components/table/table-pagination.js +212 -175
  147. package/dist/components/table/table-pagination.js.map +1 -1
  148. package/dist/components/tabs/tabs.js +193 -190
  149. package/dist/components/tabs/tabs.js.map +1 -1
  150. package/dist/components/toast/toast.js +610 -148
  151. package/dist/components/toast/toast.js.map +1 -1
  152. package/dist/components/toggle/toggle-group.js +143 -32
  153. package/dist/components/toggle/toggle-group.js.map +1 -1
  154. package/dist/components/toggle/toggle.js +82 -49
  155. package/dist/components/toggle/toggle.js.map +1 -1
  156. package/dist/components/tooltip/tooltip.js +298 -138
  157. package/dist/components/tooltip/tooltip.js.map +1 -1
  158. package/dist/index.d.ts +2336 -2130
  159. package/dist/index.js +24 -23
  160. package/dist/list/sortable/index.d.ts +29 -0
  161. package/dist/list/sortable/index.js +5 -0
  162. package/dist/{_virtual → list/sortable}/index.js.map +1 -1
  163. package/dist/packages/tokens/dist/delivery/index.js +10 -10
  164. package/dist/packages/tokens/dist/delivery/index.js.map +1 -1
  165. package/dist/packages/tokens/dist/generated/core.generated.js +6 -15
  166. package/dist/packages/tokens/dist/generated/core.generated.js.map +1 -1
  167. package/dist/packages/tokens/dist/generated/palette.generated.js +4 -5
  168. package/dist/packages/tokens/dist/generated/palette.generated.js.map +1 -1
  169. package/dist/packages/tokens/dist/generated/palette.meta.generated.js +5 -0
  170. package/dist/packages/tokens/dist/generated/palette.meta.generated.js.map +1 -0
  171. package/dist/packages/tokens/dist/install.js +40 -17
  172. package/dist/packages/tokens/dist/install.js.map +1 -1
  173. package/dist/renderer/runtime-contract.generated.js +8 -0
  174. package/dist/renderer/runtime-contract.generated.js.map +1 -0
  175. package/dist/renderer/served.js +39 -0
  176. package/dist/renderer/served.js.map +1 -0
  177. package/dist/tokens/core.meta.generated.js +2 -2
  178. package/dist/tokens/core.meta.generated.js.map +1 -1
  179. package/dist/tokens/index.d.ts +1028 -1028
  180. package/dist/tokens/index.js +863 -863
  181. package/dist/tokens/index.js.map +1 -1
  182. package/dist/tokens/palette.meta.generated.js +5 -0
  183. package/dist/tokens/palette.meta.generated.js.map +1 -0
  184. package/dist/tokens.json +1 -1
  185. package/dist/vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js +57 -62
  186. package/dist/vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js.map +1 -1
  187. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.3_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js +32 -38
  188. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.3_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js.map +1 -1
  189. package/package.json +29 -21
  190. package/scripts/migration-diagnostics-core.mjs +302 -10
  191. package/scripts/migration-diagnostics.mjs +31 -8
  192. package/scripts/migration-sweep.mjs +10 -10
  193. package/testing/setup.cjs +87 -0
  194. package/dist/_virtual/index.js +0 -6
  195. package/dist/_virtual/index2.js +0 -5
  196. package/dist/_virtual/index2.js.map +0 -1
  197. package/dist/_virtual/use-sync-external-store-shim.development.js +0 -5
  198. package/dist/_virtual/use-sync-external-store-shim.development.js.map +0 -1
  199. package/dist/_virtual/use-sync-external-store-shim.production.js +0 -5
  200. package/dist/_virtual/use-sync-external-store-shim.production.js.map +0 -1
  201. package/dist/tokens/palette.generated.js +0 -5
  202. package/dist/tokens/palette.generated.js.map +0 -1
  203. package/dist/vendor/.bun/@floating-ui_core@1.8.0/vendor/@floating-ui/core/dist/floating-ui.core.js +0 -512
  204. package/dist/vendor/.bun/@floating-ui_core@1.8.0/vendor/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
  205. package/dist/vendor/.bun/@floating-ui_dom@1.8.0/vendor/@floating-ui/dom/dist/floating-ui.dom.js +0 -396
  206. package/dist/vendor/.bun/@floating-ui_dom@1.8.0/vendor/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
  207. package/dist/vendor/.bun/@floating-ui_react-dom@2.1.9_6f4b9a1cfb20c0ae/vendor/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -233
  208. package/dist/vendor/.bun/@floating-ui_react-dom@2.1.9_6f4b9a1cfb20c0ae/vendor/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +0 -1
  209. package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -137
  210. package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
  211. package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.js +0 -129
  212. package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
  213. package/dist/vendor/.bun/@radix-ui_number@1.1.1/vendor/@radix-ui/number/dist/index.js +0 -7
  214. package/dist/vendor/.bun/@radix-ui_number@1.1.1/vendor/@radix-ui/number/dist/index.js.map +0 -1
  215. package/dist/vendor/.bun/@radix-ui_react-accordion@1.2.12_2b23df507bdda662/vendor/@radix-ui/react-accordion/dist/index.js +0 -240
  216. package/dist/vendor/.bun/@radix-ui_react-accordion@1.2.12_2b23df507bdda662/vendor/@radix-ui/react-accordion/dist/index.js.map +0 -1
  217. package/dist/vendor/.bun/@radix-ui_react-alert-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-alert-dialog/dist/index.js +0 -128
  218. package/dist/vendor/.bun/@radix-ui_react-alert-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-alert-dialog/dist/index.js.map +0 -1
  219. package/dist/vendor/.bun/@radix-ui_react-arrow@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-arrow/dist/index.js +0 -25
  220. package/dist/vendor/.bun/@radix-ui_react-arrow@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-arrow/dist/index.js.map +0 -1
  221. package/dist/vendor/.bun/@radix-ui_react-avatar@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-avatar/dist/index.js +0 -76
  222. package/dist/vendor/.bun/@radix-ui_react-avatar@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-avatar/dist/index.js.map +0 -1
  223. package/dist/vendor/.bun/@radix-ui_react-checkbox@1.3.3_2b23df507bdda662/vendor/@radix-ui/react-checkbox/dist/index.js +0 -252
  224. package/dist/vendor/.bun/@radix-ui_react-checkbox@1.3.3_2b23df507bdda662/vendor/@radix-ui/react-checkbox/dist/index.js.map +0 -1
  225. package/dist/vendor/.bun/@radix-ui_react-collapsible@1.1.12_2b23df507bdda662/vendor/@radix-ui/react-collapsible/dist/index.js +0 -121
  226. package/dist/vendor/.bun/@radix-ui_react-collapsible@1.1.12_2b23df507bdda662/vendor/@radix-ui/react-collapsible/dist/index.js.map +0 -1
  227. package/dist/vendor/.bun/@radix-ui_react-collection@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-collection/dist/index.js +0 -49
  228. package/dist/vendor/.bun/@radix-ui_react-collection@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-collection/dist/index.js.map +0 -1
  229. package/dist/vendor/.bun/@radix-ui_react-direction@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-direction/dist/index.js +0 -11
  230. package/dist/vendor/.bun/@radix-ui_react-direction@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-direction/dist/index.js.map +0 -1
  231. package/dist/vendor/.bun/@radix-ui_react-dropdown-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-dropdown-menu/dist/index.js +0 -228
  232. package/dist/vendor/.bun/@radix-ui_react-dropdown-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-dropdown-menu/dist/index.js.map +0 -1
  233. package/dist/vendor/.bun/@radix-ui_react-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-menu/dist/index.js +0 -653
  234. package/dist/vendor/.bun/@radix-ui_react-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-menu/dist/index.js.map +0 -1
  235. package/dist/vendor/.bun/@radix-ui_react-popover@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-popover/dist/index.js +0 -244
  236. package/dist/vendor/.bun/@radix-ui_react-popover@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-popover/dist/index.js.map +0 -1
  237. package/dist/vendor/.bun/@radix-ui_react-popper@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-popper/dist/index.js +0 -222
  238. package/dist/vendor/.bun/@radix-ui_react-popper@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-popper/dist/index.js.map +0 -1
  239. package/dist/vendor/.bun/@radix-ui_react-radio-group@1.3.8_2b23df507bdda662/vendor/@radix-ui/react-radio-group/dist/index.js +0 -239
  240. package/dist/vendor/.bun/@radix-ui_react-radio-group@1.3.8_2b23df507bdda662/vendor/@radix-ui/react-radio-group/dist/index.js.map +0 -1
  241. package/dist/vendor/.bun/@radix-ui_react-roving-focus@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-roving-focus/dist/index.js +0 -184
  242. package/dist/vendor/.bun/@radix-ui_react-roving-focus@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-roving-focus/dist/index.js.map +0 -1
  243. package/dist/vendor/.bun/@radix-ui_react-scroll-area@1.2.10_2b23df507bdda662/vendor/@radix-ui/react-scroll-area/dist/index.js +0 -535
  244. package/dist/vendor/.bun/@radix-ui_react-scroll-area@1.2.10_2b23df507bdda662/vendor/@radix-ui/react-scroll-area/dist/index.js.map +0 -1
  245. package/dist/vendor/.bun/@radix-ui_react-select@2.2.6_2b23df507bdda662/vendor/@radix-ui/react-select/dist/index.js +0 -863
  246. package/dist/vendor/.bun/@radix-ui_react-select@2.2.6_2b23df507bdda662/vendor/@radix-ui/react-select/dist/index.js.map +0 -1
  247. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.4_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js +0 -63
  248. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.4_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js.map +0 -1
  249. package/dist/vendor/.bun/@radix-ui_react-switch@1.2.6_2b23df507bdda662/vendor/@radix-ui/react-switch/dist/index.js +0 -133
  250. package/dist/vendor/.bun/@radix-ui_react-switch@1.2.6_2b23df507bdda662/vendor/@radix-ui/react-switch/dist/index.js.map +0 -1
  251. package/dist/vendor/.bun/@radix-ui_react-tabs@1.1.13_2b23df507bdda662/vendor/@radix-ui/react-tabs/dist/index.js +0 -164
  252. package/dist/vendor/.bun/@radix-ui_react-tabs@1.1.13_2b23df507bdda662/vendor/@radix-ui/react-tabs/dist/index.js.map +0 -1
  253. package/dist/vendor/.bun/@radix-ui_react-toggle-group@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-toggle-group/dist/index.js +0 -138
  254. package/dist/vendor/.bun/@radix-ui_react-toggle-group@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-toggle-group/dist/index.js.map +0 -1
  255. package/dist/vendor/.bun/@radix-ui_react-toggle@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-toggle/dist/index.js +0 -34
  256. package/dist/vendor/.bun/@radix-ui_react-toggle@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-toggle/dist/index.js.map +0 -1
  257. package/dist/vendor/.bun/@radix-ui_react-tooltip@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-tooltip/dist/index.js +0 -340
  258. package/dist/vendor/.bun/@radix-ui_react-tooltip@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-tooltip/dist/index.js.map +0 -1
  259. package/dist/vendor/.bun/@radix-ui_react-use-is-hydrated@0.1.0_0ac650c021fb1b59/vendor/@radix-ui/react-use-is-hydrated/dist/index.js +0 -16
  260. package/dist/vendor/.bun/@radix-ui_react-use-is-hydrated@0.1.0_0ac650c021fb1b59/vendor/@radix-ui/react-use-is-hydrated/dist/index.js.map +0 -1
  261. package/dist/vendor/.bun/@radix-ui_react-use-previous@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-previous/dist/index.js +0 -9
  262. package/dist/vendor/.bun/@radix-ui_react-use-previous@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-previous/dist/index.js.map +0 -1
  263. package/dist/vendor/.bun/@radix-ui_react-use-size@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-size/dist/index.js +0 -28
  264. package/dist/vendor/.bun/@radix-ui_react-use-size@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-size/dist/index.js.map +0 -1
  265. package/dist/vendor/.bun/@radix-ui_react-visually-hidden@1.2.3_2b23df507bdda662/vendor/@radix-ui/react-visually-hidden/dist/index.js +0 -33
  266. package/dist/vendor/.bun/@radix-ui_react-visually-hidden@1.2.3_2b23df507bdda662/vendor/@radix-ui/react-visually-hidden/dist/index.js.map +0 -1
  267. package/dist/vendor/.bun/sonner@2.0.7_6f4b9a1cfb20c0ae/vendor/sonner/dist/index.js +0 -747
  268. package/dist/vendor/.bun/sonner@2.0.7_6f4b9a1cfb20c0ae/vendor/sonner/dist/index.js.map +0 -1
  269. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -68
  270. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
  271. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -56
  272. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
  273. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/shim/index.js +0 -11
  274. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/shim/index.js.map +0 -1
@@ -1,95 +1,240 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import * as w from "react";
3
- import { Toaster as b, toast as C } from "../../vendor/.bun/sonner@2.0.7_6f4b9a1cfb20c0ae/vendor/sonner/dist/index.js";
4
- import { shorthands as r } from "@epilot/zenith-runtime/v1";
5
- import { makeZenithStyles as v } from "../../styles/make-styles.js";
6
- import { boxModel as i, nativeControl as y } from "../../styles/host-reset.js";
7
- import { errorA11 as S, errorA12 as k, error4 as B, warningA11 as M, warningA12 as Z, warning3 as A, infoA11 as W, infoA12 as I, info3 as L, successA11 as R, successA12 as H, success4 as V, fontWeightMedium as g, leadingSm as a, textSm as c, graySoftHover as T, grayA12 as d, graySoft as j, grayA8 as u, gray11 as z, gray12 as E, accentContrast as U, leadingXs as N, textXs as X, spacingGroup2 as f, fontWeightSemibold as $, body as p, errorUi as D, warningUi as F, infoUi as G, successUi as q, radiusMd as J, spacingElement2 as l, grayA6 as m, radiusXl as K, spacingElement3 as P } from "../../tokens/index.js";
8
- import { Spinner as Q } from "../spinner/spinner.js";
9
- const Y = (o) => /* @__PURE__ */ n(
1
+ import { jsx as n, jsxs as V } from "react/jsx-runtime";
2
+ import * as n1 from "react";
3
+ import { Toast as S } from "../../_virtual/_zenith-runtime-family_toast.js";
4
+ import { mergeClasses as F, SLOT_ATTR as g, shorthands as l } from "@epilot/zenith-runtime/v1";
5
+ import { makeZenithStyles as l1 } from "../../styles/make-styles.js";
6
+ import { boxModel as h, nativeControl as c1 } from "../../styles/host-reset.js";
7
+ import { errorA11 as d1, errorA12 as f1, error4 as u1, warningA11 as C1, warningA12 as g1, warning3 as m1, infoA11 as h1, infoA12 as p1, info3 as v1, successA11 as b1, successA12 as w1, success4 as y1, fontWeightMedium as q, leadingSm as _, textSm as P, graySoftHover as x1, grayA12 as U, graySoft as S1, grayA8 as J, gray11 as T1, gray12 as $1, accentContrast as E1, leadingXs as A1, textXs as B1, spacingGroup2 as Q, fontWeightSemibold as I1, body as O, ease as t1, motionSlow as z, motionBase as L1, errorUi as N1, warningUi as k1, infoUi as M1, successUi as z1, radiusMd as D1, spacingElement2 as D, grayA6 as o1, radiusXl as R1, spacingElement3 as F1 } from "../../tokens/index.js";
8
+ import { Spinner as W1 } from "../spinner/spinner.js";
9
+ const _1 = (t) => /* @__PURE__ */ n(
10
10
  "svg",
11
11
  {
12
12
  xmlns: "http://www.w3.org/2000/svg",
13
13
  viewBox: "0 0 24 24",
14
14
  fill: "currentColor",
15
- ...o,
15
+ ...t,
16
16
  children: /* @__PURE__ */ n("path", { d: "M12.0003 16.75C12.2129 16.75 12.391 16.6781 12.5345 16.5343C12.6782 16.3906 12.75 16.2125 12.75 16V11.75C12.75 11.5375 12.6781 11.3593 12.5343 11.2155C12.3904 11.0718 12.2122 11 11.9997 11C11.7871 11 11.609 11.0718 11.4655 11.2155C11.3218 11.3593 11.25 11.5375 11.25 11.75V16C11.25 16.2125 11.3219 16.3906 11.4658 16.5343C11.6096 16.6781 11.7878 16.75 12.0003 16.75ZM12 9.2885C12.2288 9.2885 12.4207 9.21108 12.5755 9.05625C12.7303 8.90142 12.8077 8.70958 12.8077 8.48075C12.8077 8.25192 12.7303 8.06008 12.5755 7.90525C12.4207 7.75058 12.2288 7.67325 12 7.67325C11.7712 7.67325 11.5793 7.75058 11.4245 7.90525C11.2697 8.06008 11.1923 8.25192 11.1923 8.48075C11.1923 8.70958 11.2697 8.90142 11.4245 9.05625C11.5793 9.21108 11.7712 9.2885 12 9.2885ZM12.0017 21.5C10.6877 21.5 9.45267 21.2507 8.2965 20.752C7.14033 20.2533 6.13467 19.5766 5.2795 18.7218C4.42433 17.8669 3.74725 16.8617 3.24825 15.706C2.74942 14.5503 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45267 3.248 8.2965C3.74667 7.14033 4.42342 6.13467 5.27825 5.2795C6.13308 4.42433 7.13833 3.74725 8.294 3.24825C9.44967 2.74942 10.6844 2.5 11.9982 2.5C13.3122 2.5 14.5473 2.74933 15.7035 3.248C16.8597 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.13308 20.2528 7.13833 20.7518 8.294C21.2506 9.44967 21.5 10.6844 21.5 11.9982C21.5 13.3122 21.2507 14.5473 20.752 15.7035C20.2533 16.8597 19.5766 17.8653 18.7218 18.7205C17.8669 19.5757 16.8617 20.2528 15.706 20.7518C14.5503 21.2506 13.3156 21.5 12.0017 21.5Z" })
17
17
  }
18
- ), _ = (o) => /* @__PURE__ */ n(
18
+ ), P1 = (t) => /* @__PURE__ */ n(
19
19
  "svg",
20
20
  {
21
21
  xmlns: "http://www.w3.org/2000/svg",
22
22
  viewBox: "0 0 24 24",
23
23
  fill: "currentColor",
24
- ...o,
24
+ ...t,
25
25
  children: /* @__PURE__ */ n("path", { d: "M3.4255 20.5C3.256 20.5 3.10375 20.4586 2.96875 20.3757C2.83375 20.2929 2.72883 20.1837 2.654 20.048C2.576 19.9133 2.53308 19.7675 2.52525 19.6105C2.51742 19.4535 2.55975 19.298 2.65225 19.144L11.213 4.356C11.3057 4.202 11.4215 4.08817 11.5605 4.0145C11.6997 3.94083 11.8462 3.904 12 3.904C12.1538 3.904 12.3003 3.94083 12.4395 4.0145C12.5785 4.08817 12.6943 4.202 12.787 4.356L21.3477 19.144C21.4402 19.298 21.4826 19.4535 21.4747 19.6105C21.4669 19.7675 21.424 19.9133 21.346 20.048C21.2712 20.1837 21.1663 20.2929 21.0313 20.3757C20.8963 20.4586 20.744 20.5 20.5745 20.5H3.4255ZM12 17.8077C12.2288 17.8077 12.4207 17.7303 12.5755 17.5755C12.7303 17.4207 12.8078 17.2288 12.8078 17C12.8078 16.7712 12.7303 16.5793 12.5755 16.4245C12.4207 16.2697 12.2288 16.1923 12 16.1923C11.7712 16.1923 11.5793 16.2697 11.4245 16.4245C11.2697 16.5793 11.1923 16.7712 11.1923 17C11.1923 17.2288 11.2697 17.4207 11.4245 17.5755C11.5793 17.7303 11.7712 17.8077 12 17.8077ZM12.0003 15.1923C12.2129 15.1923 12.391 15.1204 12.5345 14.9768C12.6782 14.8329 12.75 14.6548 12.75 14.4423V10.9423C12.75 10.7298 12.6781 10.5517 12.5342 10.408C12.3904 10.2642 12.2122 10.1923 11.9997 10.1923C11.7871 10.1923 11.609 10.2642 11.4655 10.408C11.3218 10.5517 11.25 10.7298 11.25 10.9423V14.4423C11.25 14.6548 11.3219 14.8329 11.4658 14.9768C11.6096 15.1204 11.7878 15.1923 12.0003 15.1923Z" })
26
26
  }
27
- ), O = (o) => /* @__PURE__ */ n(
27
+ ), U1 = (t) => /* @__PURE__ */ n(
28
28
  "svg",
29
29
  {
30
30
  xmlns: "http://www.w3.org/2000/svg",
31
31
  viewBox: "0 0 24 24",
32
32
  fill: "currentColor",
33
- ...o,
33
+ ...t,
34
34
  children: /* @__PURE__ */ n("path", { d: "M10.5808 14.1463L8.25775 11.823C8.11925 11.6847 7.94517 11.6138 7.7355 11.6105C7.526 11.6073 7.34875 11.6782 7.20375 11.823C7.05892 11.968 6.9865 12.1437 6.9865 12.35C6.9865 12.5563 7.05892 12.732 7.20375 12.877L9.948 15.6212C10.1288 15.8019 10.3398 15.8922 10.5808 15.8922C10.8218 15.8922 11.0327 15.8019 11.2135 15.6212L16.777 10.0577C16.9153 9.91925 16.9862 9.74517 16.9895 9.5355C16.9927 9.326 16.9218 9.14875 16.777 9.00375C16.632 8.85892 16.4563 8.7865 16.25 8.7865C16.0437 8.7865 15.868 8.85892 15.723 9.00375L10.5808 14.1463ZM12.0017 21.5C10.6877 21.5 9.45267 21.2507 8.2965 20.752C7.14033 20.2533 6.13467 19.5766 5.2795 18.7218C4.42433 17.8669 3.74725 16.8617 3.24825 15.706C2.74942 14.5503 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45267 3.248 8.2965C3.74667 7.14033 4.42342 6.13467 5.27825 5.2795C6.13308 4.42433 7.13833 3.74725 8.294 3.24825C9.44967 2.74942 10.6844 2.5 11.9982 2.5C13.3122 2.5 14.5473 2.74933 15.7035 3.248C16.8597 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.13308 20.2528 7.13833 20.7518 8.294C21.2506 9.44967 21.5 10.6844 21.5 11.9982C21.5 13.3122 21.2507 14.5473 20.752 15.7035C20.2533 16.8597 19.5766 17.8653 18.7218 18.7205C17.8669 19.5757 16.8617 20.2528 15.706 20.7518C14.5503 21.2506 13.3156 21.5 12.0017 21.5Z" })
35
35
  }
36
- ), o1 = (o) => /* @__PURE__ */ n(
36
+ ), H1 = (t) => /* @__PURE__ */ n(
37
37
  "svg",
38
38
  {
39
39
  xmlns: "http://www.w3.org/2000/svg",
40
40
  viewBox: "0 0 24 24",
41
41
  fill: "currentColor",
42
- ...o,
42
+ ...t,
43
43
  children: /* @__PURE__ */ n("path", { d: "M12 16.7307C12.2288 16.7307 12.4207 16.6533 12.5755 16.4985C12.7303 16.3437 12.8077 16.1518 12.8077 15.923C12.8077 15.6942 12.7303 15.5023 12.5755 15.3475C12.4207 15.1928 12.2288 15.1155 12 15.1155C11.7712 15.1155 11.5793 15.1928 11.4245 15.3475C11.2697 15.5023 11.1923 15.6942 11.1923 15.923C11.1923 16.1518 11.2697 16.3437 11.4245 16.4985C11.5793 16.6533 11.7712 16.7307 12 16.7307ZM12.0003 13.077C12.2129 13.077 12.391 13.0051 12.5345 12.8613C12.6782 12.7176 12.75 12.5395 12.75 12.327V7.827C12.75 7.6145 12.6781 7.43633 12.5343 7.2925C12.3904 7.14883 12.2122 7.077 11.9997 7.077C11.7871 7.077 11.609 7.14883 11.4655 7.2925C11.3218 7.43633 11.25 7.6145 11.25 7.827V12.327C11.25 12.5395 11.3219 12.7176 11.4658 12.8613C11.6096 13.0051 11.7878 13.077 12.0003 13.077ZM12.0017 21.5C10.6877 21.5 9.45267 21.2507 8.2965 20.752C7.14033 20.2533 6.13467 19.5766 5.2795 18.7218C4.42433 17.8669 3.74725 16.8617 3.24825 15.706C2.74942 14.5503 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45267 3.248 8.2965C3.74667 7.14033 4.42342 6.13467 5.27825 5.2795C6.13308 4.42433 7.13833 3.74725 8.294 3.24825C9.44967 2.74942 10.6844 2.5 11.9982 2.5C13.3122 2.5 14.5473 2.74933 15.7035 3.248C16.8597 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.13308 20.2528 7.13833 20.7518 8.294C21.2506 9.44967 21.5 10.6844 21.5 11.9982C21.5 13.3122 21.2507 14.5473 20.752 15.7035C20.2533 16.8597 19.5766 17.8653 18.7218 18.7205C17.8669 19.5757 16.8617 20.2528 15.706 20.7518C14.5503 21.2506 13.3156 21.5 12.0017 21.5Z" })
44
44
  }
45
- ), r1 = v({
45
+ ), Z1 = () => /* @__PURE__ */ V(
46
+ "svg",
47
+ {
48
+ xmlns: "http://www.w3.org/2000/svg",
49
+ width: "12",
50
+ height: "12",
51
+ viewBox: "0 0 24 24",
52
+ fill: "none",
53
+ stroke: "currentColor",
54
+ strokeWidth: "1.5",
55
+ strokeLinecap: "round",
56
+ strokeLinejoin: "round",
57
+ children: [
58
+ /* @__PURE__ */ n("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
59
+ /* @__PURE__ */ n("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
60
+ ]
61
+ }
62
+ ), Y = "--zenith-toast-gap", i1 = "--zenith-toast-front-height", j = "--zenith-toast-index", r1 = "--zenith-toast-stack-offset", E = "--zenith-toast-lift", w = "--zenith-toast-y", H = "--zenith-toast-scale", V1 = ["top", "right", "bottom", "left"], I = {
63
+ top: "--zenith-toast-offset-top",
64
+ right: "--zenith-toast-offset-right",
65
+ bottom: "--zenith-toast-offset-bottom",
66
+ left: "--zenith-toast-offset-left"
67
+ }, L = {
68
+ top: "--zenith-toast-mobile-offset-top",
69
+ right: "--zenith-toast-mobile-offset-right",
70
+ bottom: "--zenith-toast-mobile-offset-bottom",
71
+ left: "--zenith-toast-mobile-offset-left"
72
+ }, R = "@media (max-width: 600px)", Y1 = "@media (prefers-reduced-motion: reduce)", s1 = l1({
73
+ list: {
74
+ ...h,
75
+ position: "fixed",
76
+ // The toast width before Base UI, kept so a toast still measures what it did.
77
+ width: "356px",
78
+ ...l.margin(0),
79
+ ...l.padding(0),
80
+ listStyleType: "none",
81
+ outlineStyle: "none",
82
+ // Above every overlay (OVERLAY_Z_INDEX), as the toaster always was.
83
+ zIndex: 999999999,
84
+ [R]: {
85
+ left: `var(${L.left})`,
86
+ right: `var(${L.right})`,
87
+ width: "auto"
88
+ }
89
+ },
90
+ listTop: {
91
+ top: `var(${I.top})`,
92
+ [R]: { top: `var(${L.top})` }
93
+ },
94
+ listBottom: {
95
+ bottom: `var(${I.bottom})`,
96
+ [R]: { bottom: `var(${L.bottom})` }
97
+ },
98
+ listLeft: {
99
+ left: `var(${I.left})`
100
+ },
101
+ listRight: {
102
+ right: `var(${I.right})`
103
+ },
104
+ listCenter: {
105
+ left: "50%",
106
+ transform: "translateX(-50%)",
107
+ [R]: { transform: "none" }
108
+ },
109
+ root: {
110
+ ...h,
111
+ position: "absolute",
112
+ [w]: "0px",
113
+ [H]: "1",
114
+ transform: `translateY(var(${w})) scale(var(${H}))`,
115
+ opacity: 1,
116
+ touchAction: "none",
117
+ overflowWrap: "anywhere",
118
+ outlineStyle: "none",
119
+ transitionProperty: "transform, opacity, height, box-shadow",
120
+ transitionDuration: `${z}, ${z}, ${z}, ${L1}`,
121
+ transitionTimingFunction: t1,
122
+ "& > *": {
123
+ transitionProperty: "opacity",
124
+ transitionDuration: z,
125
+ transitionTimingFunction: t1
126
+ },
127
+ "&[data-starting-style]": {
128
+ opacity: 0,
129
+ transform: `translateY(calc(var(${E}) * -100%))`
130
+ },
131
+ "&[data-ending-style]": {
132
+ opacity: 0,
133
+ transform: `translateY(calc(var(${w}) - var(${E}) * 100%))`
134
+ },
135
+ "&[data-ending-style][data-swipe-direction='right']": {
136
+ transform: `translateX(calc(var(--toast-swipe-movement-x) + 100%)) translateY(var(${w}))`
137
+ },
138
+ "&[data-ending-style][data-swipe-direction='left']": {
139
+ transform: `translateX(calc(var(--toast-swipe-movement-x) - 100%)) translateY(var(${w}))`
140
+ },
141
+ "&[data-ending-style][data-swipe-direction='down']": {
142
+ transform: `translateY(calc(var(${w}) + var(--toast-swipe-movement-y) + 100%))`
143
+ },
144
+ "&[data-ending-style][data-swipe-direction='up']": {
145
+ transform: `translateY(calc(var(${w}) + var(--toast-swipe-movement-y) - 100%))`
146
+ },
147
+ // Beyond `visibleToasts`: kept in the stack, out of sight and out of reach.
148
+ "&[data-limited]": {
149
+ opacity: 0,
150
+ pointerEvents: "none"
151
+ },
152
+ [Y1]: {
153
+ transitionProperty: "none",
154
+ "& > *": { transitionProperty: "none" }
155
+ }
156
+ },
157
+ rootTop: {
158
+ top: 0,
159
+ [E]: "1"
160
+ },
161
+ rootBottom: {
162
+ bottom: 0,
163
+ [E]: "-1"
164
+ },
165
+ rootLeft: {
166
+ left: 0
167
+ },
168
+ rootRight: {
169
+ right: 0
170
+ },
171
+ /** An older toast while the stack is collapsed: tucked behind the front one, a step smaller. */
172
+ behind: {
173
+ [w]: `calc(var(${E}) * var(${Y}) * var(${j}))`,
174
+ [H]: `calc(1 - var(${j}) * 0.05)`,
175
+ height: `var(${i1})`,
176
+ "& > *": { opacity: 0 }
177
+ },
178
+ /** Hovered, focused or `expand`: every toast at its own height, one gap apart. */
179
+ expanded: {
180
+ [w]: `calc(var(${E}) * var(${r1}))`,
181
+ height: "var(--toast-height)",
182
+ // Bridges the gap above each toast, so moving between toasts does not collapse the stack.
183
+ "::after": {
184
+ content: '""',
185
+ position: "absolute",
186
+ left: 0,
187
+ bottom: "100%",
188
+ width: "100%",
189
+ height: `calc(var(${Y}) + 1px)`
190
+ }
191
+ },
46
192
  toast: {
47
- ...i,
193
+ ...h,
48
194
  pointerEvents: "auto",
49
- position: "relative",
50
195
  width: "100%",
51
196
  display: "flex",
52
197
  alignItems: "baseline",
53
- ...r.gap(l),
54
- ...r.padding(f, P),
55
- ...r.borderRadius(K),
56
- ...r.borderStyle("solid"),
57
- ...r.borderWidth(0),
58
- ...r.borderColor(m),
59
- backgroundColor: p,
60
- color: d,
198
+ ...l.gap(D),
199
+ ...l.padding(Q, F1),
200
+ ...l.borderRadius(R1),
201
+ ...l.borderStyle("solid"),
202
+ ...l.borderWidth(0),
203
+ ...l.borderColor(o1),
204
+ backgroundColor: O,
205
+ color: U,
61
206
  boxShadow: "0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a",
62
207
  ":focus-visible": {
63
208
  outlineWidth: "2px",
64
209
  outlineStyle: "solid",
65
- outlineColor: u
210
+ outlineColor: J
66
211
  }
67
212
  },
68
213
  default: {
69
- ...i,
70
- backgroundColor: p,
71
- ...r.borderColor(m),
72
- ...r.gap(l),
73
- color: d
214
+ ...h,
215
+ backgroundColor: O,
216
+ ...l.borderColor(o1),
217
+ ...l.gap(D),
218
+ color: U
74
219
  },
75
220
  content: {
76
221
  display: "flex",
77
222
  flexDirection: "column",
78
- ...r.gap("0.125rem")
223
+ ...l.gap("0.125rem")
79
224
  },
80
225
  title: {
81
- fontSize: c,
82
- lineHeight: a,
83
- fontWeight: $,
84
- ...r.margin(0)
226
+ fontSize: P,
227
+ lineHeight: _,
228
+ fontWeight: I1,
229
+ ...l.margin(0)
85
230
  },
86
231
  description: {
87
- fontSize: c,
88
- lineHeight: a,
89
- ...r.margin(0)
232
+ fontSize: P,
233
+ lineHeight: _,
234
+ ...l.margin(0)
90
235
  },
91
236
  icon: {
92
- ...i,
237
+ ...h,
93
238
  alignSelf: "flex-start",
94
239
  display: "flex",
95
240
  width: "1.25rem",
@@ -98,57 +243,64 @@ const Y = (o) => /* @__PURE__ */ n(
98
243
  justifyContent: "flex-start",
99
244
  alignItems: "center",
100
245
  flexShrink: 0,
101
- marginLeft: "var(--toast-icon-margin-start)",
102
- marginRight: "var(--toast-icon-margin-end)"
246
+ // The optical offsets the icon always had, written per writing direction.
247
+ marginInlineStart: "-3px",
248
+ marginInlineEnd: "4px"
249
+ },
250
+ loader: {
251
+ position: "absolute",
252
+ top: "50%",
253
+ left: "50%",
254
+ transform: "translate(-50%, -50%)"
103
255
  },
104
256
  actionButton: {
105
- ...i,
106
- ...r.borderRadius("9999px"),
257
+ ...h,
258
+ ...l.borderRadius("9999px"),
107
259
  flexShrink: 0,
108
260
  alignSelf: "flex-end",
109
261
  cursor: "pointer",
110
262
  marginLeft: "auto",
111
- marginTop: f,
112
- fontSize: X,
113
- lineHeight: N,
114
- fontWeight: g,
115
- ...r.padding("0.3125rem", l),
116
- color: U,
117
- backgroundColor: E,
263
+ marginTop: Q,
264
+ fontSize: B1,
265
+ lineHeight: A1,
266
+ fontWeight: q,
267
+ ...l.padding("0.3125rem", D),
268
+ color: E1,
269
+ backgroundColor: $1,
118
270
  ":hover": {
119
- backgroundColor: z
271
+ backgroundColor: T1
120
272
  },
121
273
  ":focus-visible": {
122
274
  outlineWidth: "2px",
123
275
  outlineStyle: "solid",
124
276
  outlineOffset: "2px",
125
- outlineColor: u
277
+ outlineColor: J
126
278
  }
127
279
  },
128
280
  cancelButton: {
129
- ...i,
130
- backgroundColor: j,
131
- color: d,
281
+ ...h,
282
+ backgroundColor: S1,
283
+ color: U,
132
284
  ":hover": {
133
- backgroundColor: T
285
+ backgroundColor: x1
134
286
  },
135
- fontSize: c,
136
- lineHeight: a,
137
- fontWeight: g,
138
- ...r.padding("0.3125rem", l),
139
- ...r.borderRadius(J)
287
+ fontSize: P,
288
+ lineHeight: _,
289
+ fontWeight: q,
290
+ ...l.padding("0.3125rem", D),
291
+ ...l.borderRadius(D1)
140
292
  },
141
293
  closeButton: {
142
- ...y,
294
+ ...c1,
143
295
  position: "absolute",
144
296
  right: "0.625rem",
145
297
  top: "0.625rem",
146
- ...r.borderRadius("9999px"),
298
+ ...l.borderRadius("9999px"),
147
299
  color: "currentColor",
148
300
  cursor: "pointer",
149
301
  backgroundColor: "transparent",
150
- ...r.border("0"),
151
- ...r.padding(0),
302
+ ...l.border("0"),
303
+ ...l.padding(0),
152
304
  display: "flex",
153
305
  alignItems: "center",
154
306
  justifyContent: "center",
@@ -165,112 +317,422 @@ const Y = (o) => /* @__PURE__ */ n(
165
317
  }
166
318
  },
167
319
  success: {
168
- ...i,
169
- ...r.borderColor(q),
170
- backgroundColor: V,
171
- color: H,
172
- "& [data-icon]": {
173
- color: R
320
+ ...h,
321
+ ...l.borderColor(z1),
322
+ backgroundColor: y1,
323
+ color: w1,
324
+ [`& [${g}="toast-icon"]`]: {
325
+ color: b1
174
326
  }
175
327
  },
176
328
  info: {
177
- ...i,
178
- ...r.borderColor(G),
179
- backgroundColor: L,
180
- color: I,
181
- "& [data-icon]": {
182
- color: W
329
+ ...h,
330
+ ...l.borderColor(M1),
331
+ backgroundColor: v1,
332
+ color: p1,
333
+ [`& [${g}="toast-icon"]`]: {
334
+ color: h1
183
335
  }
184
336
  },
185
337
  warning: {
186
- ...i,
187
- ...r.borderColor(F),
188
- backgroundColor: A,
189
- color: Z,
190
- "& [data-icon]": {
191
- color: M
338
+ ...h,
339
+ ...l.borderColor(k1),
340
+ backgroundColor: m1,
341
+ color: g1,
342
+ [`& [${g}="toast-icon"]`]: {
343
+ color: C1
192
344
  }
193
345
  },
194
346
  error: {
195
- ...i,
196
- ...r.borderColor(D),
197
- backgroundColor: B,
198
- color: k,
199
- "& [data-icon]": {
200
- color: S
347
+ ...h,
348
+ ...l.borderColor(N1),
349
+ backgroundColor: u1,
350
+ color: f1,
351
+ [`& [${g}="toast-icon"]`]: {
352
+ color: d1
201
353
  }
202
354
  },
203
355
  loading: {},
204
356
  spinner: {
205
- ...i,
357
+ ...h,
206
358
  width: "1.125rem",
207
359
  height: "1.125rem"
208
360
  }
209
- }), c1 = w.forwardRef(
210
- function({ theme: t, toastOptions: s, ...h }, x) {
211
- const e = r1();
361
+ }), j1 = 4e3, X1 = 14, G1 = 3, K1 = "24px", q1 = "16px", J1 = {
362
+ success: /* @__PURE__ */ n(U1, { width: "100%", height: "100%" }),
363
+ info: /* @__PURE__ */ n(_1, { width: "100%", height: "100%" }),
364
+ warning: /* @__PURE__ */ n(P1, { width: "100%", height: "100%" }),
365
+ error: /* @__PURE__ */ n(H1, { width: "100%", height: "100%" })
366
+ }, X = /* @__PURE__ */ new Map();
367
+ function G(t) {
368
+ const o = t ?? "";
369
+ let e = X.get(o);
370
+ return e || (e = S.createToastManager(), X.set(o, e)), e;
371
+ }
372
+ const T = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Set();
373
+ function Q1(t, o) {
374
+ var c, s;
375
+ if (!A.delete(t)) return;
376
+ const e = T.get(t);
377
+ T.delete(t), e === "dismissed" ? (c = o.onDismiss) == null || c.call(o, o) : e === void 0 && ((s = o.onAutoClose) == null || s.call(o, o));
378
+ }
379
+ function Z(t, o, e) {
380
+ T.set(o, e), t.close(o);
381
+ }
382
+ function e1(t) {
383
+ A.has(t) && (T.set(t, "dismissed"), queueMicrotask(() => {
384
+ A.has(t) && T.get(t) === "dismissed" && T.delete(t);
385
+ }));
386
+ }
387
+ function a1(t) {
388
+ if (t)
389
+ return t === 1 / 0 ? 0 : t;
390
+ }
391
+ let O1 = 0;
392
+ function y(t, o, e = {}) {
393
+ const c = e.id === void 0 || e.id === "" ? ++O1 : e.id, s = String(c), d = { ...e, id: c, title: o, type: t };
394
+ return A.add(s), G(e.toasterId).add({
395
+ id: s,
396
+ title: o,
397
+ description: e.description,
398
+ type: t,
399
+ timeout: a1(e.duration),
400
+ onClose: () => Q1(s, d),
401
+ data: e
402
+ }), c;
403
+ }
404
+ function tt() {
405
+ if (typeof document > "u") return "ltr";
406
+ const t = document.documentElement.getAttribute("dir");
407
+ return t === "ltr" || t === "rtl" ? t : getComputedStyle(document.documentElement).direction === "rtl" ? "rtl" : "ltr";
408
+ }
409
+ function ot(t, o) {
410
+ const e = {}, c = (s, d, a) => {
411
+ for (const u of V1) {
412
+ const i = typeof s == "object" ? s[u] ?? a : s ?? a;
413
+ e[d[u]] = typeof i == "number" ? `${i}px` : i;
414
+ }
415
+ };
416
+ return c(t, I, K1), c(o, L, q1), e;
417
+ }
418
+ function et(t, o, e) {
419
+ var s;
420
+ const c = /* @__PURE__ */ new Map();
421
+ for (const d of t) {
422
+ const a = ((s = d.data) == null ? void 0 : s.position) ?? o;
423
+ c.set(a, [...c.get(a) ?? [], d]);
424
+ }
425
+ return [...c].map(([d, a]) => {
426
+ let u = 0, i = 0, x = 0;
427
+ const r = a.map((f) => {
428
+ const v = { toast: f, index: u, offset: i + u * e };
429
+ return f.transitionStatus !== "ending" && (u === 0 && (x = f.height ?? 0), i += f.height ?? 0, u += 1), v;
430
+ });
431
+ return { position: d, frontHeight: x, entries: r };
432
+ });
433
+ }
434
+ function nt({
435
+ toast: t,
436
+ index: o,
437
+ offset: e,
438
+ total: c,
439
+ y: s,
440
+ x: d,
441
+ expand: a,
442
+ closeButton: u,
443
+ toastOptions: i,
444
+ manager: x
445
+ }) {
446
+ var k;
447
+ const r = s1(), f = t.data ?? {}, v = t.type, b = t.id, $ = f.dismissible !== !1, C = {
448
+ toast: r.toast,
449
+ title: r.title,
450
+ description: r.description,
451
+ closeButton: r.closeButton,
452
+ cancelButton: r.cancelButton,
453
+ actionButton: r.actionButton,
454
+ success: r.success,
455
+ error: r.error,
456
+ info: r.info,
457
+ warning: r.warning,
458
+ loading: r.loading,
459
+ default: r.default,
460
+ content: r.content,
461
+ icon: r.icon,
462
+ ...i == null ? void 0 : i.classNames
463
+ }, N = f.icon === null ? null : v === "loading" ? f.icon || /* @__PURE__ */ n(
464
+ "div",
465
+ {
466
+ className: F(
467
+ r.loader,
468
+ (k = i == null ? void 0 : i.classNames) == null ? void 0 : k.loader
469
+ ),
470
+ children: /* @__PURE__ */ n(W1, { className: r.spinner })
471
+ }
472
+ ) : f.icon || (v ? J1[v] : null), W = $ ? [s === "top" ? "up" : "down", ...d === "center" ? [] : [d]] : [];
473
+ return /* @__PURE__ */ V(
474
+ S.Root,
475
+ {
476
+ toast: t,
477
+ render: /* @__PURE__ */ n("li", {}),
478
+ role: void 0,
479
+ "aria-modal": void 0,
480
+ "data-slot": "toast",
481
+ [g]: "toast",
482
+ swipeDirection: W,
483
+ className: (p) => F(
484
+ C.toast,
485
+ C.default,
486
+ v && C[v],
487
+ r.root,
488
+ s === "top" ? r.rootTop : r.rootBottom,
489
+ d === "left" && r.rootLeft,
490
+ d === "right" && r.rootRight,
491
+ a || p.expanded ? r.expanded : o > 0 && r.behind,
492
+ i == null ? void 0 : i.className,
493
+ f.className
494
+ ),
495
+ style: {
496
+ zIndex: c - o,
497
+ [j]: o,
498
+ [r1]: `${e}px`,
499
+ ...i == null ? void 0 : i.style,
500
+ ...f.style
501
+ },
502
+ onKeyDown: (p) => {
503
+ p.key === "Escape" && ($ ? e1(b) : p.preventBaseUIHandler());
504
+ },
505
+ onPointerUp: () => e1(b),
506
+ children: [
507
+ u && v !== "loading" ? /* @__PURE__ */ n(
508
+ "button",
509
+ {
510
+ type: "button",
511
+ "aria-label": (i == null ? void 0 : i.closeButtonAriaLabel) ?? "Close toast",
512
+ "data-slot": "toast-close",
513
+ [g]: "toast-close",
514
+ className: C.closeButton,
515
+ onClick: () => {
516
+ $ && Z(x, b, "dismissed");
517
+ },
518
+ children: /* @__PURE__ */ n(Z1, {})
519
+ }
520
+ ) : null,
521
+ N ? /* @__PURE__ */ n(
522
+ "div",
523
+ {
524
+ "data-slot": "toast-icon",
525
+ [g]: "toast-icon",
526
+ className: C.icon,
527
+ children: N
528
+ }
529
+ ) : null,
530
+ /* @__PURE__ */ V(
531
+ S.Content,
532
+ {
533
+ "data-slot": "toast-content",
534
+ [g]: "toast-content",
535
+ className: C.content,
536
+ children: [
537
+ /* @__PURE__ */ n(
538
+ S.Title,
539
+ {
540
+ render: /* @__PURE__ */ n("div", {}),
541
+ "data-slot": "toast-title",
542
+ [g]: "toast-title",
543
+ className: C.title
544
+ }
545
+ ),
546
+ t.description ? /* @__PURE__ */ n(
547
+ S.Description,
548
+ {
549
+ render: /* @__PURE__ */ n("div", {}),
550
+ "data-slot": "toast-description",
551
+ [g]: "toast-description",
552
+ className: F(
553
+ C.description,
554
+ i == null ? void 0 : i.descriptionClassName
555
+ )
556
+ }
557
+ ) : null
558
+ ]
559
+ }
560
+ ),
561
+ f.cancel ? /* @__PURE__ */ n(
562
+ "button",
563
+ {
564
+ type: "button",
565
+ "data-slot": "toast-cancel",
566
+ [g]: "toast-cancel",
567
+ className: C.cancelButton,
568
+ onClick: (p) => {
569
+ var m, B;
570
+ $ && ((B = (m = f.cancel) == null ? void 0 : m.onClick) == null || B.call(m, p), Z(x, b, "acted"));
571
+ },
572
+ children: f.cancel.label
573
+ }
574
+ ) : null,
575
+ f.action ? /* @__PURE__ */ n(
576
+ "button",
577
+ {
578
+ type: "button",
579
+ "data-slot": "toast-action",
580
+ [g]: "toast-action",
581
+ className: C.actionButton,
582
+ onClick: (p) => {
583
+ var m;
584
+ (m = f.action) == null || m.onClick(p), p.defaultPrevented || Z(x, b, "acted");
585
+ },
586
+ children: f.action.label
587
+ }
588
+ ) : null
589
+ ]
590
+ }
591
+ );
592
+ }
593
+ const it = n1.forwardRef(
594
+ function({
595
+ id: o,
596
+ theme: e,
597
+ position: c = "bottom-right",
598
+ gap: s = X1,
599
+ closeButton: d = !0,
600
+ expand: a = !1,
601
+ dir: u,
602
+ offset: i,
603
+ mobileOffset: x,
604
+ className: r,
605
+ style: f,
606
+ containerAriaLabel: v = "Notifications",
607
+ toastOptions: b
608
+ }, $) {
609
+ const C = s1(), { toasts: N } = S.useToastManager(), W = G(o), k = u === void 0 || u === "auto" ? tt() : u, p = ot(i, x);
212
610
  return /* @__PURE__ */ n(
213
- b,
611
+ S.Viewport,
214
612
  {
215
- ref: x,
216
- closeButton: !0,
217
- theme: t,
218
- toastOptions: {
219
- ...s,
220
- unstyled: !0,
221
- classNames: {
222
- toast: e.toast,
223
- default: e.default,
224
- content: e.content,
225
- title: e.title,
226
- description: e.description,
227
- icon: e.icon,
228
- actionButton: e.actionButton,
229
- cancelButton: e.cancelButton,
230
- closeButton: e.closeButton,
231
- success: e.success,
232
- info: e.info,
233
- warning: e.warning,
234
- error: e.error,
235
- loading: e.loading,
236
- ...s == null ? void 0 : s.classNames
237
- }
238
- },
239
- icons: {
240
- success: /* @__PURE__ */ n(O, {}),
241
- info: /* @__PURE__ */ n(Y, {}),
242
- warning: /* @__PURE__ */ n(_, {}),
243
- error: /* @__PURE__ */ n(o1, {}),
244
- loading: /* @__PURE__ */ n(Q, { className: e.spinner })
245
- },
246
- ...h
613
+ ref: $,
614
+ "data-slot": "toaster",
615
+ [g]: "toaster",
616
+ "aria-label": `${v} F6`,
617
+ "data-theme": e,
618
+ children: et(N, c, s).map((m) => {
619
+ const [B, M] = m.position.split("-");
620
+ return /* @__PURE__ */ n(
621
+ "ol",
622
+ {
623
+ dir: k,
624
+ "data-slot": "toast-list",
625
+ [g]: "toast-list",
626
+ className: F(
627
+ C.list,
628
+ B === "top" ? C.listTop : C.listBottom,
629
+ M === "left" && C.listLeft,
630
+ M === "right" && C.listRight,
631
+ M === "center" && C.listCenter,
632
+ r
633
+ ),
634
+ style: {
635
+ [i1]: `${m.frontHeight}px`,
636
+ [Y]: `${s}px`,
637
+ ...f,
638
+ ...p
639
+ },
640
+ children: m.entries.map((K) => /* @__PURE__ */ n(
641
+ nt,
642
+ {
643
+ ...K,
644
+ total: m.entries.length,
645
+ y: B,
646
+ x: M,
647
+ expand: a,
648
+ closeButton: (b == null ? void 0 : b.closeButton) ?? d,
649
+ toastOptions: b,
650
+ manager: W
651
+ },
652
+ K.toast.id
653
+ ))
654
+ },
655
+ m.position
656
+ );
657
+ })
658
+ }
659
+ );
660
+ }
661
+ ), mt = n1.forwardRef(
662
+ function(o, e) {
663
+ var s;
664
+ const c = a1(((s = o.toastOptions) == null ? void 0 : s.duration) ?? o.duration) ?? j1;
665
+ return /* @__PURE__ */ n(
666
+ S.Provider,
667
+ {
668
+ toastManager: G(o.id),
669
+ timeout: c,
670
+ limit: o.visibleToasts ?? G1,
671
+ children: /* @__PURE__ */ n(it, { ...o, ref: e })
247
672
  }
248
673
  );
249
674
  }
250
675
  );
251
- function t1(o, t) {
252
- return C(o, t);
676
+ function rt(t, o) {
677
+ return y(void 0, t, o);
678
+ }
679
+ function st(t) {
680
+ return typeof t == "object" && t !== null && "ok" in t && t.ok === !1 && "status" in t && typeof t.status == "number";
253
681
  }
254
- const d1 = Object.assign(t1, {
255
- success: (o, t) => C.success(o, t),
256
- error: (o, t) => C.error(o, t),
257
- warning: (o, t) => C.warning(o, t),
258
- info: (o, t) => C.info(o, t),
259
- loading: (o, t) => C.loading(o, t),
260
- dismiss: (o) => C.dismiss(o),
682
+ const at = Object.assign(rt, {
683
+ success: (t, o) => y("success", t, o),
684
+ error: (t, o) => y("error", t, o),
685
+ warning: (t, o) => y("warning", t, o),
686
+ info: (t, o) => y("info", t, o),
687
+ loading: (t, o) => y("loading", t, o),
688
+ /** Dismisses one toast, or every toast when called without an id. Returns the id it was given. */
689
+ dismiss: (t) => {
690
+ const o = t === void 0 ? [...A] : [String(t)];
691
+ for (const e of o)
692
+ A.has(e) && T.set(e, "dismissed");
693
+ for (const e of X.values())
694
+ e.close(t === void 0 ? void 0 : String(t));
695
+ return t;
696
+ },
261
697
  /**
262
- * Declared here rather than passed through: sonner's own signature references types its bundle
263
- * does not name publicly, which makes the emitted `.d.ts` unbuildable (TS4023). The return is
264
- * `unknown` on purpose -- sonner returns an internally-typed handle, and every use in this
265
- * repository and its docs ignores it.
698
+ * Shows `loading` while the promise is pending, then turns the same toast into `success` or
699
+ * `error`. A resolved `Response` with an error status counts as a failure. Returns `{ unwrap }`,
700
+ * whose promise settles like the original.
266
701
  */
267
- promise: (o, t) => C.promise(
268
- o,
269
- t
270
- )
702
+ promise: (t, o) => {
703
+ if (!o) return;
704
+ const e = o.loading === void 0 ? void 0 : y("loading", o.loading, { description: o.description }), c = Promise.resolve(
705
+ typeof t == "function" ? t() : t
706
+ );
707
+ let s = e !== void 0;
708
+ const d = (a) => {
709
+ s = !1;
710
+ const u = typeof o.error == "function" ? o.error(a) : o.error;
711
+ y("error", u, { id: e, description: o.description });
712
+ };
713
+ return c.then(
714
+ (a) => {
715
+ if (st(a))
716
+ d(`HTTP error! status: ${a.status}`);
717
+ else if (a instanceof Error)
718
+ d(a);
719
+ else if (o.success !== void 0) {
720
+ s = !1;
721
+ const u = typeof o.success == "function" ? o.success(a) : o.success;
722
+ y("success", u, { id: e, description: o.description });
723
+ }
724
+ },
725
+ (a) => {
726
+ o.error !== void 0 && d(a);
727
+ }
728
+ ).finally(() => {
729
+ var a;
730
+ s && e !== void 0 && at.dismiss(e), (a = o.finally) == null || a.call(o);
731
+ }), { unwrap: () => c };
732
+ }
271
733
  });
272
734
  export {
273
- c1 as Toaster,
274
- d1 as toast
735
+ mt as Toaster,
736
+ at as toast
275
737
  };
276
738
  //# sourceMappingURL=toast.js.map