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

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 (269) hide show
  1. package/README.md +25 -0
  2. package/codemods/README.md +168 -0
  3. package/codemods/migrate/base-elements/accordion.ts +132 -0
  4. package/codemods/migrate/base-elements/alert.ts +81 -0
  5. package/codemods/migrate/base-elements/avatar.ts +116 -0
  6. package/codemods/migrate/base-elements/button.ts +188 -0
  7. package/codemods/migrate/base-elements/checkbox.ts +17 -0
  8. package/codemods/migrate/base-elements/chip.ts +87 -0
  9. package/codemods/migrate/base-elements/chip360.ts +162 -0
  10. package/codemods/migrate/base-elements/circular-progress.ts +73 -0
  11. package/codemods/migrate/base-elements/dialog.ts +323 -0
  12. package/codemods/migrate/base-elements/divider.ts +61 -0
  13. package/codemods/migrate/base-elements/feedback-message.ts +95 -0
  14. package/codemods/migrate/base-elements/icon-button.ts +203 -0
  15. package/codemods/migrate/base-elements/index.ts +55 -0
  16. package/codemods/migrate/base-elements/mui-props.ts +29 -0
  17. package/codemods/migrate/base-elements/notification.ts +98 -0
  18. package/codemods/migrate/base-elements/paper.ts +78 -0
  19. package/codemods/migrate/base-elements/select.ts +328 -0
  20. package/codemods/migrate/base-elements/shared.ts +910 -0
  21. package/codemods/migrate/base-elements/skeleton.ts +83 -0
  22. package/codemods/migrate/base-elements/switch.ts +19 -0
  23. package/codemods/migrate/base-elements/tabs.ts +222 -0
  24. package/codemods/migrate/base-elements/text-field.ts +425 -0
  25. package/codemods/migrate/base-elements/toggle-button.ts +185 -0
  26. package/codemods/migrate/base-elements/tooltip.ts +231 -0
  27. package/codemods/migrate/base-elements/typography.ts +247 -0
  28. package/codemods/migrate/base-elements/unsupported.ts +277 -0
  29. package/codemods/migrate/from-base-elements.ts +20 -0
  30. package/codemods/migrate/from-volt.ts +20 -0
  31. package/codemods/migrate/lib/imports.ts +399 -0
  32. package/codemods/migrate/lib/jsx.ts +313 -0
  33. package/codemods/migrate/lib/run-migration.ts +528 -0
  34. package/codemods/migrate/lib/source.ts +6 -0
  35. package/codemods/migrate/lib/todo.ts +107 -0
  36. package/codemods/migrate/lib/types.ts +114 -0
  37. package/codemods/migrate/volt/class-helpers.ts +37 -0
  38. package/codemods/migrate/volt/index.ts +18 -0
  39. package/codemods/migrate/volt/pagination.ts +26 -0
  40. package/codemods/migrate/volt/same-name.ts +293 -0
  41. package/codemods/migrate/volt/stylesheets.ts +18 -0
  42. package/codemods/migrate/volt/tanstack-types.ts +20 -0
  43. package/codemods/radix-to-base-ui.ts +389 -0
  44. package/dist/_virtual/_zenith-runtime-family_accordion.js +7 -0
  45. package/dist/_virtual/_zenith-runtime-family_accordion.js.map +1 -0
  46. package/dist/_virtual/_zenith-runtime-family_alert-dialog.js +7 -0
  47. package/dist/_virtual/_zenith-runtime-family_alert-dialog.js.map +1 -0
  48. package/dist/_virtual/_zenith-runtime-family_avatar.js +7 -0
  49. package/dist/_virtual/_zenith-runtime-family_avatar.js.map +1 -0
  50. package/dist/_virtual/_zenith-runtime-family_button.js +7 -0
  51. package/dist/_virtual/_zenith-runtime-family_button.js.map +1 -0
  52. package/dist/_virtual/_zenith-runtime-family_checkbox.js +7 -0
  53. package/dist/_virtual/_zenith-runtime-family_checkbox.js.map +1 -0
  54. package/dist/_virtual/_zenith-runtime-family_csp-provider.js +7 -0
  55. package/dist/_virtual/_zenith-runtime-family_csp-provider.js.map +1 -0
  56. package/dist/_virtual/_zenith-runtime-family_dialog.js +7 -0
  57. package/dist/_virtual/_zenith-runtime-family_dialog.js.map +1 -0
  58. package/dist/_virtual/_zenith-runtime-family_direction-provider.js +8 -0
  59. package/dist/_virtual/_zenith-runtime-family_direction-provider.js.map +1 -0
  60. package/dist/_virtual/_zenith-runtime-family_menu.js +7 -0
  61. package/dist/_virtual/_zenith-runtime-family_menu.js.map +1 -0
  62. package/dist/_virtual/_zenith-runtime-family_merge-props.js +11 -0
  63. package/dist/_virtual/_zenith-runtime-family_merge-props.js.map +1 -0
  64. package/dist/_virtual/_zenith-runtime-family_popover.js +7 -0
  65. package/dist/_virtual/_zenith-runtime-family_popover.js.map +1 -0
  66. package/dist/_virtual/_zenith-runtime-family_radio-group.js +7 -0
  67. package/dist/_virtual/_zenith-runtime-family_radio-group.js.map +1 -0
  68. package/dist/_virtual/_zenith-runtime-family_radio.js +7 -0
  69. package/dist/_virtual/_zenith-runtime-family_radio.js.map +1 -0
  70. package/dist/_virtual/_zenith-runtime-family_scroll-area.js +7 -0
  71. package/dist/_virtual/_zenith-runtime-family_scroll-area.js.map +1 -0
  72. package/dist/_virtual/_zenith-runtime-family_select.js +7 -0
  73. package/dist/_virtual/_zenith-runtime-family_select.js.map +1 -0
  74. package/dist/_virtual/_zenith-runtime-family_separator.js +7 -0
  75. package/dist/_virtual/_zenith-runtime-family_separator.js.map +1 -0
  76. package/dist/_virtual/_zenith-runtime-family_switch.js +7 -0
  77. package/dist/_virtual/_zenith-runtime-family_switch.js.map +1 -0
  78. package/dist/_virtual/_zenith-runtime-family_tabs.js +7 -0
  79. package/dist/_virtual/_zenith-runtime-family_tabs.js.map +1 -0
  80. package/dist/_virtual/_zenith-runtime-family_toast.js +7 -0
  81. package/dist/_virtual/_zenith-runtime-family_toast.js.map +1 -0
  82. package/dist/_virtual/_zenith-runtime-family_toggle-group.js +7 -0
  83. package/dist/_virtual/_zenith-runtime-family_toggle-group.js.map +1 -0
  84. package/dist/_virtual/_zenith-runtime-family_toggle.js +7 -0
  85. package/dist/_virtual/_zenith-runtime-family_toggle.js.map +1 -0
  86. package/dist/_virtual/_zenith-runtime-family_tooltip.js +7 -0
  87. package/dist/_virtual/_zenith-runtime-family_tooltip.js.map +1 -0
  88. package/dist/_virtual/_zenith-runtime-family_use-render.js +7 -0
  89. package/dist/_virtual/_zenith-runtime-family_use-render.js.map +1 -0
  90. package/dist/components/accordion/accordion.js +179 -96
  91. package/dist/components/accordion/accordion.js.map +1 -1
  92. package/dist/components/alert-dialog/alert-dialog.js +243 -206
  93. package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
  94. package/dist/components/avatar/avatar.js +94 -82
  95. package/dist/components/avatar/avatar.js.map +1 -1
  96. package/dist/components/badge/badge.js +11 -11
  97. package/dist/components/breadcrumb/breadcrumb.js +69 -70
  98. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  99. package/dist/components/button/button.js +119 -102
  100. package/dist/components/button/button.js.map +1 -1
  101. package/dist/components/checkbox/checkbox.js +68 -51
  102. package/dist/components/checkbox/checkbox.js.map +1 -1
  103. package/dist/components/date-range-picker/date-range-picker.js +100 -90
  104. package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
  105. package/dist/components/date-time-picker/date-time-picker-input.js +118 -108
  106. package/dist/components/date-time-picker/date-time-picker-input.js.map +1 -1
  107. package/dist/components/date-time-picker/date-time-picker-panel.js +91 -94
  108. package/dist/components/date-time-picker/date-time-picker-panel.js.map +1 -1
  109. package/dist/components/dialog/dialog.js +238 -228
  110. package/dist/components/dialog/dialog.js.map +1 -1
  111. package/dist/components/drawer/drawer.js +259 -321
  112. package/dist/components/drawer/drawer.js.map +1 -1
  113. package/dist/components/dropdown-menu/dropdown-menu.js +533 -279
  114. package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
  115. package/dist/components/field/field-combobox.js +87 -77
  116. package/dist/components/field/field-combobox.js.map +1 -1
  117. package/dist/components/list/list-sortable.js +104 -0
  118. package/dist/components/list/list-sortable.js.map +1 -0
  119. package/dist/components/list/list.js +246 -324
  120. package/dist/components/list/list.js.map +1 -1
  121. package/dist/components/option-card/option-card.js +121 -117
  122. package/dist/components/option-card/option-card.js.map +1 -1
  123. package/dist/components/pill/pill.js +7 -7
  124. package/dist/components/popover/popover.js +223 -127
  125. package/dist/components/popover/popover.js.map +1 -1
  126. package/dist/components/radio/radio-group-base.js +54 -0
  127. package/dist/components/radio/radio-group-base.js.map +1 -0
  128. package/dist/components/radio/radio.js +71 -60
  129. package/dist/components/radio/radio.js.map +1 -1
  130. package/dist/components/scroll-area/scroll-area.js +142 -108
  131. package/dist/components/scroll-area/scroll-area.js.map +1 -1
  132. package/dist/components/scroll-overflow/scroll-overflow.js +156 -127
  133. package/dist/components/scroll-overflow/scroll-overflow.js.map +1 -1
  134. package/dist/components/segmented-control/segmented-control.js +93 -81
  135. package/dist/components/segmented-control/segmented-control.js.map +1 -1
  136. package/dist/components/select/select.js +485 -310
  137. package/dist/components/select/select.js.map +1 -1
  138. package/dist/components/separator/separator.js.map +1 -1
  139. package/dist/components/slot/compose-as-child.js +15 -12
  140. package/dist/components/slot/compose-as-child.js.map +1 -1
  141. package/dist/components/switch/switch.js +75 -68
  142. package/dist/components/switch/switch.js.map +1 -1
  143. package/dist/components/table/table-pagination.js +212 -175
  144. package/dist/components/table/table-pagination.js.map +1 -1
  145. package/dist/components/tabs/tabs.js +193 -190
  146. package/dist/components/tabs/tabs.js.map +1 -1
  147. package/dist/components/toast/toast.js +610 -148
  148. package/dist/components/toast/toast.js.map +1 -1
  149. package/dist/components/toggle/toggle-group.js +143 -32
  150. package/dist/components/toggle/toggle-group.js.map +1 -1
  151. package/dist/components/toggle/toggle.js +83 -53
  152. package/dist/components/toggle/toggle.js.map +1 -1
  153. package/dist/components/tooltip/tooltip.js +298 -138
  154. package/dist/components/tooltip/tooltip.js.map +1 -1
  155. package/dist/index.d.ts +2335 -2129
  156. package/dist/index.js +24 -23
  157. package/dist/list/sortable/index.d.ts +29 -0
  158. package/dist/list/sortable/index.js +5 -0
  159. package/dist/{_virtual → list/sortable}/index.js.map +1 -1
  160. package/dist/packages/tokens/dist/delivery/index.js +10 -10
  161. package/dist/packages/tokens/dist/delivery/index.js.map +1 -1
  162. package/dist/packages/tokens/dist/generated/core.generated.js +6 -15
  163. package/dist/packages/tokens/dist/generated/core.generated.js.map +1 -1
  164. package/dist/packages/tokens/dist/generated/palette.generated.js +4 -5
  165. package/dist/packages/tokens/dist/generated/palette.generated.js.map +1 -1
  166. package/dist/packages/tokens/dist/generated/palette.meta.generated.js +5 -0
  167. package/dist/packages/tokens/dist/generated/palette.meta.generated.js.map +1 -0
  168. package/dist/packages/tokens/dist/install.js +40 -17
  169. package/dist/packages/tokens/dist/install.js.map +1 -1
  170. package/dist/renderer/runtime-contract.generated.js +8 -0
  171. package/dist/renderer/runtime-contract.generated.js.map +1 -0
  172. package/dist/renderer/served.js +34 -0
  173. package/dist/renderer/served.js.map +1 -0
  174. package/dist/tokens/core.meta.generated.js +2 -2
  175. package/dist/tokens/core.meta.generated.js.map +1 -1
  176. package/dist/tokens/index.d.ts +1028 -1028
  177. package/dist/tokens/index.js +863 -863
  178. package/dist/tokens/index.js.map +1 -1
  179. package/dist/tokens/palette.meta.generated.js +5 -0
  180. package/dist/tokens/palette.meta.generated.js.map +1 -0
  181. package/dist/tokens.json +1 -1
  182. package/dist/vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js +57 -62
  183. package/dist/vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js.map +1 -1
  184. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.3_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js +32 -38
  185. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.3_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js.map +1 -1
  186. package/package.json +28 -21
  187. package/scripts/migration-diagnostics-core.mjs +18 -10
  188. package/scripts/migration-diagnostics.mjs +31 -8
  189. package/dist/_virtual/index.js +0 -6
  190. package/dist/_virtual/index2.js +0 -5
  191. package/dist/_virtual/index2.js.map +0 -1
  192. package/dist/_virtual/use-sync-external-store-shim.development.js +0 -5
  193. package/dist/_virtual/use-sync-external-store-shim.development.js.map +0 -1
  194. package/dist/_virtual/use-sync-external-store-shim.production.js +0 -5
  195. package/dist/_virtual/use-sync-external-store-shim.production.js.map +0 -1
  196. package/dist/tokens/palette.generated.js +0 -5
  197. package/dist/tokens/palette.generated.js.map +0 -1
  198. package/dist/vendor/.bun/@floating-ui_core@1.8.0/vendor/@floating-ui/core/dist/floating-ui.core.js +0 -512
  199. package/dist/vendor/.bun/@floating-ui_core@1.8.0/vendor/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
  200. package/dist/vendor/.bun/@floating-ui_dom@1.8.0/vendor/@floating-ui/dom/dist/floating-ui.dom.js +0 -396
  201. package/dist/vendor/.bun/@floating-ui_dom@1.8.0/vendor/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
  202. 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
  203. 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
  204. package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -137
  205. package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
  206. package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.js +0 -129
  207. package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
  208. package/dist/vendor/.bun/@radix-ui_number@1.1.1/vendor/@radix-ui/number/dist/index.js +0 -7
  209. package/dist/vendor/.bun/@radix-ui_number@1.1.1/vendor/@radix-ui/number/dist/index.js.map +0 -1
  210. package/dist/vendor/.bun/@radix-ui_react-accordion@1.2.12_2b23df507bdda662/vendor/@radix-ui/react-accordion/dist/index.js +0 -240
  211. package/dist/vendor/.bun/@radix-ui_react-accordion@1.2.12_2b23df507bdda662/vendor/@radix-ui/react-accordion/dist/index.js.map +0 -1
  212. package/dist/vendor/.bun/@radix-ui_react-alert-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-alert-dialog/dist/index.js +0 -128
  213. 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
  214. package/dist/vendor/.bun/@radix-ui_react-arrow@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-arrow/dist/index.js +0 -25
  215. package/dist/vendor/.bun/@radix-ui_react-arrow@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-arrow/dist/index.js.map +0 -1
  216. package/dist/vendor/.bun/@radix-ui_react-avatar@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-avatar/dist/index.js +0 -76
  217. package/dist/vendor/.bun/@radix-ui_react-avatar@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-avatar/dist/index.js.map +0 -1
  218. package/dist/vendor/.bun/@radix-ui_react-checkbox@1.3.3_2b23df507bdda662/vendor/@radix-ui/react-checkbox/dist/index.js +0 -252
  219. package/dist/vendor/.bun/@radix-ui_react-checkbox@1.3.3_2b23df507bdda662/vendor/@radix-ui/react-checkbox/dist/index.js.map +0 -1
  220. package/dist/vendor/.bun/@radix-ui_react-collapsible@1.1.12_2b23df507bdda662/vendor/@radix-ui/react-collapsible/dist/index.js +0 -121
  221. package/dist/vendor/.bun/@radix-ui_react-collapsible@1.1.12_2b23df507bdda662/vendor/@radix-ui/react-collapsible/dist/index.js.map +0 -1
  222. package/dist/vendor/.bun/@radix-ui_react-collection@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-collection/dist/index.js +0 -49
  223. package/dist/vendor/.bun/@radix-ui_react-collection@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-collection/dist/index.js.map +0 -1
  224. package/dist/vendor/.bun/@radix-ui_react-direction@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-direction/dist/index.js +0 -11
  225. package/dist/vendor/.bun/@radix-ui_react-direction@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-direction/dist/index.js.map +0 -1
  226. package/dist/vendor/.bun/@radix-ui_react-dropdown-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-dropdown-menu/dist/index.js +0 -228
  227. 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
  228. package/dist/vendor/.bun/@radix-ui_react-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-menu/dist/index.js +0 -653
  229. package/dist/vendor/.bun/@radix-ui_react-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-menu/dist/index.js.map +0 -1
  230. package/dist/vendor/.bun/@radix-ui_react-popover@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-popover/dist/index.js +0 -244
  231. package/dist/vendor/.bun/@radix-ui_react-popover@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-popover/dist/index.js.map +0 -1
  232. package/dist/vendor/.bun/@radix-ui_react-popper@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-popper/dist/index.js +0 -222
  233. package/dist/vendor/.bun/@radix-ui_react-popper@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-popper/dist/index.js.map +0 -1
  234. package/dist/vendor/.bun/@radix-ui_react-radio-group@1.3.8_2b23df507bdda662/vendor/@radix-ui/react-radio-group/dist/index.js +0 -239
  235. 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
  236. package/dist/vendor/.bun/@radix-ui_react-roving-focus@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-roving-focus/dist/index.js +0 -184
  237. 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
  238. package/dist/vendor/.bun/@radix-ui_react-scroll-area@1.2.10_2b23df507bdda662/vendor/@radix-ui/react-scroll-area/dist/index.js +0 -535
  239. 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
  240. package/dist/vendor/.bun/@radix-ui_react-select@2.2.6_2b23df507bdda662/vendor/@radix-ui/react-select/dist/index.js +0 -863
  241. package/dist/vendor/.bun/@radix-ui_react-select@2.2.6_2b23df507bdda662/vendor/@radix-ui/react-select/dist/index.js.map +0 -1
  242. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.4_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js +0 -63
  243. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.4_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js.map +0 -1
  244. package/dist/vendor/.bun/@radix-ui_react-switch@1.2.6_2b23df507bdda662/vendor/@radix-ui/react-switch/dist/index.js +0 -133
  245. package/dist/vendor/.bun/@radix-ui_react-switch@1.2.6_2b23df507bdda662/vendor/@radix-ui/react-switch/dist/index.js.map +0 -1
  246. package/dist/vendor/.bun/@radix-ui_react-tabs@1.1.13_2b23df507bdda662/vendor/@radix-ui/react-tabs/dist/index.js +0 -164
  247. package/dist/vendor/.bun/@radix-ui_react-tabs@1.1.13_2b23df507bdda662/vendor/@radix-ui/react-tabs/dist/index.js.map +0 -1
  248. package/dist/vendor/.bun/@radix-ui_react-toggle-group@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-toggle-group/dist/index.js +0 -138
  249. 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
  250. package/dist/vendor/.bun/@radix-ui_react-toggle@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-toggle/dist/index.js +0 -34
  251. package/dist/vendor/.bun/@radix-ui_react-toggle@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-toggle/dist/index.js.map +0 -1
  252. package/dist/vendor/.bun/@radix-ui_react-tooltip@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-tooltip/dist/index.js +0 -340
  253. package/dist/vendor/.bun/@radix-ui_react-tooltip@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-tooltip/dist/index.js.map +0 -1
  254. 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
  255. 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
  256. package/dist/vendor/.bun/@radix-ui_react-use-previous@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-previous/dist/index.js +0 -9
  257. 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
  258. package/dist/vendor/.bun/@radix-ui_react-use-size@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-size/dist/index.js +0 -28
  259. 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
  260. package/dist/vendor/.bun/@radix-ui_react-visually-hidden@1.2.3_2b23df507bdda662/vendor/@radix-ui/react-visually-hidden/dist/index.js +0 -33
  261. 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
  262. package/dist/vendor/.bun/sonner@2.0.7_6f4b9a1cfb20c0ae/vendor/sonner/dist/index.js +0 -747
  263. package/dist/vendor/.bun/sonner@2.0.7_6f4b9a1cfb20c0ae/vendor/sonner/dist/index.js.map +0 -1
  264. 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
  265. 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
  266. 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
  267. 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
  268. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/shim/index.js +0 -11
  269. package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/shim/index.js.map +0 -1
@@ -1,11 +1,15 @@
1
- import { jsx as o, jsxs as w } from "react/jsx-runtime";
2
- import * as l from "react";
3
- import { mergeClasses as p, SLOT_ATTR as s, shorthands as n } from "@epilot/zenith-runtime/v1";
4
- import { makeZenithStyles as L } from "../../styles/make-styles.js";
5
- import { boxModel as h } from "../../styles/host-reset.js";
6
- import { grayDefault as y, fontWeightSemibold as x, accentA8 as R, grayLight as S, leadingBase as N, textBase as D, spacingElement1 as I, spacingElement2 as A } from "../../tokens/index.js";
7
- import { Root as E } from "../../vendor/.bun/@radix-ui_react-slot@1.2.4_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js";
8
- const k = L({
1
+ import { jsx as o, jsxs as W } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { mergeClasses as p, SLOT_ATTR as s, shorthands as l } from "@epilot/zenith-runtime/v1";
4
+ import { makeZenithStyles as w } from "../../styles/make-styles.js";
5
+ import { boxModel as k } from "../../styles/host-reset.js";
6
+ import { grayDefault as v, fontWeightSemibold as S, accentA8 as A, grayLight as C, leadingBase as L, textBase as D, spacingElement1 as I, spacingElement2 as R } from "../../tokens/index.js";
7
+ import { ComposeAsChild as E } from "../slot/compose-as-child.js";
8
+ function O(c) {
9
+ const e = i.Children.toArray(c);
10
+ return e.length === 1 ? e[0] : c;
11
+ }
12
+ const T = w({
9
13
  // A truncating crumb can only shrink if every box above it may shrink below its content too. The
10
14
  // nav is the box a flex row (a view header) actually sizes, so it carries the rule; plain trails
11
15
  // keep their content size.
@@ -15,142 +19,137 @@ const k = L({
15
19
  }
16
20
  },
17
21
  list: {
18
- ...h,
22
+ ...k,
19
23
  // A layout row, not a numbered list: reset the browser's markers and indent so the trail does
20
24
  // not depend on the host shipping a CSS reset.
21
25
  listStyleType: "none",
22
- ...n.margin(0),
23
- ...n.padding(0),
26
+ ...l.margin(0),
27
+ ...l.padding(0),
24
28
  display: "flex",
25
29
  alignItems: "center",
26
30
  // gap-2
27
- ...n.gap(A),
31
+ ...l.gap(R),
28
32
  fontSize: D,
29
- lineHeight: N,
33
+ lineHeight: L,
30
34
  minWidth: 0
31
35
  },
32
36
  separator: {
33
- color: S
37
+ color: C
34
38
  },
35
39
  item: {
36
40
  display: "inline-flex",
37
41
  alignItems: "center",
38
42
  // gap-1
39
- ...n.gap(I)
43
+ ...l.gap(I)
40
44
  },
41
45
  itemTruncate: {
42
- ...h,
46
+ ...k,
43
47
  minWidth: 0
44
48
  },
45
49
  truncate: {
46
- ...n.overflow("hidden"),
50
+ ...l.overflow("hidden"),
47
51
  textOverflow: "ellipsis",
48
52
  whiteSpace: "nowrap"
49
53
  },
50
54
  link: {
51
55
  // A browser underlines a bare `<a>`; the underline is a hover affordance here.
52
56
  textDecorationLine: "none",
53
- fontWeight: x,
54
- color: S,
57
+ fontWeight: S,
58
+ color: C,
55
59
  transitionProperty: "color, background-color, border-color, text-decoration-color, fill, stroke",
56
60
  transitionDuration: "150ms",
57
61
  transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
58
62
  cursor: "pointer",
59
63
  ":hover": {
60
- color: y,
64
+ color: v,
61
65
  textDecorationLine: "underline"
62
66
  },
63
67
  ":focus-visible": {
64
68
  outlineWidth: "2px",
65
69
  outlineStyle: "solid",
66
70
  outlineOffset: "2px",
67
- outlineColor: R
71
+ outlineColor: A
68
72
  }
69
73
  },
70
74
  page: {
71
- fontWeight: x,
72
- color: y
75
+ fontWeight: S,
76
+ color: v
73
77
  }
74
- }), M = l.forwardRef(
78
+ }), V = i.forwardRef(
75
79
  function({
76
- separator: a = "/",
77
- "aria-label": c = "Breadcrumb",
78
- className: m,
80
+ separator: e = "/",
81
+ "aria-label": m = "Breadcrumb",
82
+ className: d,
79
83
  children: t,
80
- ...d
81
- }, r) {
82
- const i = k(), b = l.Children.toArray(t).filter(l.isValidElement);
84
+ ...b
85
+ }, a) {
86
+ const n = T(), f = i.Children.toArray(t).filter(i.isValidElement);
83
87
  return /* @__PURE__ */ o(
84
88
  "nav",
85
89
  {
86
- ref: r,
90
+ ref: a,
87
91
  "data-slot": "breadcrumb",
88
92
  [s]: "breadcrumb",
89
- "aria-label": c,
90
- className: p(i.root, m),
91
- ...d,
92
- children: /* @__PURE__ */ o("ol", { className: i.list, children: b.map((f, e) => /* @__PURE__ */ w(l.Fragment, { children: [
93
- e > 0 && /* @__PURE__ */ o(
93
+ "aria-label": m,
94
+ className: p(n.root, d),
95
+ ...b,
96
+ children: /* @__PURE__ */ o("ol", { className: n.list, children: f.map((g, r) => /* @__PURE__ */ W(i.Fragment, { children: [
97
+ r > 0 && /* @__PURE__ */ o(
94
98
  "li",
95
99
  {
96
100
  role: "presentation",
97
101
  "aria-hidden": "true",
98
- className: i.separator,
99
- children: a
102
+ className: n.separator,
103
+ children: e
100
104
  }
101
105
  ),
102
- f
103
- ] }, e)) })
106
+ g
107
+ ] }, r)) })
104
108
  }
105
109
  );
106
110
  }
107
- ), P = l.forwardRef(function({
108
- href: a,
109
- isCurrent: c = !1,
110
- className: m,
111
+ ), Z = i.forwardRef(function({
112
+ href: e,
113
+ isCurrent: m = !1,
114
+ className: d,
111
115
  children: t,
112
- asChild: d = !1,
113
- truncate: r = !1,
114
- title: i,
115
- ...b
116
- }, f) {
117
- const e = k(), T = !!a, B = d ? E : "a", g = r ? e.truncate : void 0, u = i ?? (r && (typeof t == "string" || typeof t == "number") ? String(t) : void 0), W = T || d ? /* @__PURE__ */ o(
118
- B,
119
- {
120
- "data-slot": "breadcrumb-link",
121
- [s]: "breadcrumb-link",
122
- ...a ? { href: a } : {},
123
- className: p(e.link, g, m),
124
- ...u !== void 0 ? { title: u } : {},
125
- ...c ? { "aria-current": "page" } : {},
126
- ...b,
127
- children: t
128
- }
129
- ) : /* @__PURE__ */ o(
116
+ asChild: b = !1,
117
+ truncate: a = !1,
118
+ title: n,
119
+ ...f
120
+ }, g) {
121
+ const r = T(), B = !!e, h = a ? r.truncate : void 0, u = n ?? (a && (typeof t == "string" || typeof t == "number") ? String(t) : void 0), y = {
122
+ "data-slot": "breadcrumb-link",
123
+ [s]: "breadcrumb-link",
124
+ ...e ? { href: e } : {},
125
+ ...u !== void 0 ? { title: u } : {},
126
+ ...m ? { "aria-current": "page" } : {},
127
+ ...f
128
+ }, x = p(r.link, h, d), N = b ? /* @__PURE__ */ o(E, { ...y, className: x, children: O(t) }) : B ? /* @__PURE__ */ o("a", { ...y, className: x, children: t }) : /* @__PURE__ */ o(
130
129
  "span",
131
130
  {
132
131
  "data-slot": "breadcrumb-page",
133
132
  [s]: "breadcrumb-page",
134
- className: p(e.page, g, m),
133
+ className: p(r.page, h, d),
135
134
  ...u !== void 0 ? { title: u } : {},
136
- ...c ? { "aria-current": "page" } : {},
135
+ ...m ? { "aria-current": "page" } : {},
137
136
  children: t
138
137
  }
139
138
  );
140
139
  return /* @__PURE__ */ o(
141
140
  "li",
142
141
  {
143
- ref: f,
142
+ ref: g,
144
143
  "data-slot": "breadcrumb-item",
145
144
  [s]: "breadcrumb-item",
146
- ...r ? { "data-truncate": "" } : {},
147
- className: p(e.item, r && e.itemTruncate),
148
- children: W
145
+ ...a ? { "data-truncate": "" } : {},
146
+ className: p(r.item, a && r.itemTruncate),
147
+ children: N
149
148
  }
150
149
  );
151
150
  });
152
151
  export {
153
- M as Breadcrumb,
154
- P as BreadcrumbItem
152
+ V as Breadcrumb,
153
+ Z as BreadcrumbItem
155
154
  };
156
155
  //# sourceMappingURL=breadcrumb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.js","sources":["../../../src/components/breadcrumb/breadcrumb.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport { boxModel } from \"../../styles/host-reset\"\nimport * as tokens from \"../../tokens\"\nimport { Slot } from \"@radix-ui/react-slot\"\n\n/** Breadcrumb — Card's compound pattern applied to the nav / ol / li structure. */\n\nexport type BreadcrumbProps = React.ComponentProps<\"nav\"> & {\n separator?: React.ReactNode\n /**\n * Accessible name of the navigation landmark, read by screen readers. Pass a translated string\n * for any locale other than English. Defaults to \"Breadcrumb\".\n */\n \"aria-label\"?: string\n}\n\nconst useStyles = makeZenithStyles({\n // A truncating crumb can only shrink if every box above it may shrink below its content too. The\n // nav is the box a flex row (a view header) actually sizes, so it carries the rule; plain trails\n // keep their content size.\n root: {\n [`&:has([${SLOT_ATTR}=\"breadcrumb-item\"][data-truncate])`]: {\n minWidth: 0,\n },\n },\n list: {\n ...boxModel,\n // A layout row, not a numbered list: reset the browser's markers and indent so the trail does\n // not depend on the host shipping a CSS reset.\n listStyleType: \"none\",\n ...shorthands.margin(0),\n ...shorthands.padding(0),\n display: \"flex\",\n alignItems: \"center\",\n // gap-2\n ...shorthands.gap(tokens.spacingElement2),\n fontSize: tokens.textBase,\n lineHeight: tokens.leadingBase,\n minWidth: 0,\n },\n separator: {\n color: tokens.grayLight,\n },\n item: {\n display: \"inline-flex\",\n alignItems: \"center\",\n // gap-1\n ...shorthands.gap(tokens.spacingElement1),\n },\n itemTruncate: {\n ...boxModel,\n minWidth: 0,\n },\n truncate: {\n ...shorthands.overflow(\"hidden\"),\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n },\n link: {\n // A browser underlines a bare `<a>`; the underline is a hover affordance here.\n textDecorationLine: \"none\",\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.grayLight,\n transitionProperty:\n \"color, background-color, border-color, text-decoration-color, fill, stroke\",\n transitionDuration: \"150ms\",\n transitionTimingFunction: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n cursor: \"pointer\",\n \":hover\": {\n color: tokens.grayDefault,\n textDecorationLine: \"underline\",\n },\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.accentA8,\n },\n },\n page: {\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.grayDefault,\n },\n})\n\nexport const Breadcrumb = React.forwardRef<HTMLElement, BreadcrumbProps>(\n function Breadcrumb(\n {\n separator = \"/\",\n \"aria-label\": ariaLabel = \"Breadcrumb\",\n className,\n children,\n ...props\n },\n ref\n ) {\n const styles = useStyles()\n const items = React.Children.toArray(children).filter(React.isValidElement)\n\n return (\n <nav\n ref={ref}\n data-slot=\"breadcrumb\"\n {...{ [SLOT_ATTR]: \"breadcrumb\" }}\n aria-label={ariaLabel}\n className={mergeClasses(styles.root, className)}\n {...props}\n >\n <ol className={styles.list}>\n {items.map((child, index) => (\n <React.Fragment key={index}>\n {index > 0 && (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={styles.separator}\n >\n {separator}\n </li>\n )}\n {child}\n </React.Fragment>\n ))}\n </ol>\n </nav>\n )\n }\n)\n\nexport type BreadcrumbItemProps = Omit<React.ComponentProps<\"a\">, \"href\"> & {\n href?: string\n isCurrent?: boolean\n /**\n * Render the child instead of the built-in `a`, keeping the link styling and slot markers. This\n * is how a consumer supplies a router link. v1 supports it; it was dropped here while the package\n * was on Base UI and restored once it moved back to Radix.\n */\n asChild?: boolean\n /**\n * Keep the crumb on one line and cut it with an ellipsis when the trail runs out of room, with\n * the full text as its `title`. Pass `title` yourself when the children are not plain text.\n */\n truncate?: boolean\n}\n\nexport const BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n BreadcrumbItemProps\n>(function BreadcrumbItem(\n {\n href,\n isCurrent = false,\n className,\n children,\n asChild = false,\n truncate = false,\n title,\n ...props\n },\n ref\n) {\n const styles = useStyles()\n const isLink = !!href\n\n const LinkRoot = asChild ? Slot : \"a\"\n const truncateClass = truncate ? styles.truncate : undefined\n const fullText =\n title ??\n (truncate && (typeof children === \"string\" || typeof children === \"number\")\n ? String(children)\n : undefined)\n\n const content =\n isLink || asChild ? (\n <LinkRoot\n data-slot=\"breadcrumb-link\"\n {...{ [SLOT_ATTR]: \"breadcrumb-link\" }}\n {...(href ? { href } : {})}\n className={mergeClasses(styles.link, truncateClass, className)}\n {...(fullText !== undefined ? { title: fullText } : {})}\n {...(isCurrent ? { \"aria-current\": \"page\" as const } : {})}\n {...props}\n >\n {children}\n </LinkRoot>\n ) : (\n <span\n data-slot=\"breadcrumb-page\"\n {...{ [SLOT_ATTR]: \"breadcrumb-page\" }}\n className={mergeClasses(styles.page, truncateClass, className)}\n {...(fullText !== undefined ? { title: fullText } : {})}\n {...(isCurrent ? { \"aria-current\": \"page\" as const } : {})}\n >\n {children}\n </span>\n )\n\n return (\n <li\n ref={ref}\n data-slot=\"breadcrumb-item\"\n {...{ [SLOT_ATTR]: \"breadcrumb-item\" }}\n {...(truncate ? { \"data-truncate\": \"\" } : {})}\n className={mergeClasses(styles.item, truncate && styles.itemTruncate)}\n >\n {content}\n </li>\n )\n})\n"],"names":["useStyles","makeZenithStyles","SLOT_ATTR","boxModel","shorthands","tokens.spacingElement2","tokens.textBase","tokens.leadingBase","tokens.grayLight","tokens.spacingElement1","tokens.fontWeightSemibold","tokens.grayDefault","tokens.accentA8","Breadcrumb","React","separator","ariaLabel","className","children","props","ref","styles","items","jsx","mergeClasses","child","index","jsxs","BreadcrumbItem","href","isCurrent","asChild","truncate","title","isLink","LinkRoot","Slot","truncateClass","fullText","content"],"mappings":";;;;;;;AAqBA,MAAMA,IAAYC,EAAiB;AAAA;AAAA;AAAA;AAAA,EAIjC,MAAM;AAAA,IACJ,CAAC,UA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AAA;AAAA,MACC,aAAU;AAAA,MACJ,CAACjC,CAAS,GAAG;AAAA,MAClB,GAAI2B,IAAO,EAAE,MAAAA,EAAA,IAAS,CAAA;AAAA,MACvB,WAAWL,EAAaH,EAAO,MAAMgB,GAAepB,CAAS;AAAA,MAC5D,GAAIqB,MAAa,SAAY,EAAE,OAAOA,EAAA,IAAa,CAAA;AAAA,MACnD,GAAIR,IAAY,EAAE,gBAAgB,OAAA,IAAoB,CAAA;AAAA,MACtD,GAAGX;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA,IAGH,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACJ,CAACrB,CAAS,GAAG;AAAA,MACnB,WAAWsB,EAAaH,EAAO,MAAMgB,GAAepB,CAAS;AAAA,MAC5D,GAAIqB,MAAa,SAAY,EAAE,OAAOA,EAAA,IAAa,CAAA;AAAA,MACnD,GAAIR,IAAY,EAAE,gBAAgB,OAAA,IAAoB,CAAA;AAAA,MAEtD,UAAAZ;AAAA,IAAA;AAAA,EAAA;AAIP,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAH;AAAA,MACA,aAAU;AAAA,MACJ,CAAClB,CAAS,GAAG;AAAA,MAClB,GAAI8B,IAAW,EAAE,iBAAiB,GAAA,IAAO,CAAA;AAAA,MAC1C,WAAWR,EAAaH,EAAO,MAAMW,KAAYX,EAAO,YAAY;AAAA,MAEnE,UAAAkB;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
1
+ {"version":3,"file":"breadcrumb.js","sources":["../../../src/components/breadcrumb/breadcrumb.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport { boxModel } from \"../../styles/host-reset\"\nimport * as tokens from \"../../tokens\"\nimport { ComposeAsChild } from \"../slot/compose-as-child\"\n\n/** Breadcrumb — Card's compound pattern applied to the nav / ol / li structure. */\n\n// A single child can arrive wrapped in a one-element array depending on the JSX runtime (MDX call\n// sites do this), which `React.Children.only` rejects. Radix's Slot normalised that.\nfunction onlyChild(children: React.ReactNode) {\n const elements = React.Children.toArray(children)\n return (elements.length === 1 ? elements[0] : children) as React.ReactElement\n}\n\nexport type BreadcrumbProps = React.ComponentProps<\"nav\"> & {\n separator?: React.ReactNode\n /**\n * Accessible name of the navigation landmark, read by screen readers. Pass a translated string\n * for any locale other than English. Defaults to \"Breadcrumb\".\n */\n \"aria-label\"?: string\n}\n\nconst useStyles = makeZenithStyles({\n // A truncating crumb can only shrink if every box above it may shrink below its content too. The\n // nav is the box a flex row (a view header) actually sizes, so it carries the rule; plain trails\n // keep their content size.\n root: {\n [`&:has([${SLOT_ATTR}=\"breadcrumb-item\"][data-truncate])`]: {\n minWidth: 0,\n },\n },\n list: {\n ...boxModel,\n // A layout row, not a numbered list: reset the browser's markers and indent so the trail does\n // not depend on the host shipping a CSS reset.\n listStyleType: \"none\",\n ...shorthands.margin(0),\n ...shorthands.padding(0),\n display: \"flex\",\n alignItems: \"center\",\n // gap-2\n ...shorthands.gap(tokens.spacingElement2),\n fontSize: tokens.textBase,\n lineHeight: tokens.leadingBase,\n minWidth: 0,\n },\n separator: {\n color: tokens.grayLight,\n },\n item: {\n display: \"inline-flex\",\n alignItems: \"center\",\n // gap-1\n ...shorthands.gap(tokens.spacingElement1),\n },\n itemTruncate: {\n ...boxModel,\n minWidth: 0,\n },\n truncate: {\n ...shorthands.overflow(\"hidden\"),\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n },\n link: {\n // A browser underlines a bare `<a>`; the underline is a hover affordance here.\n textDecorationLine: \"none\",\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.grayLight,\n transitionProperty:\n \"color, background-color, border-color, text-decoration-color, fill, stroke\",\n transitionDuration: \"150ms\",\n transitionTimingFunction: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n cursor: \"pointer\",\n \":hover\": {\n color: tokens.grayDefault,\n textDecorationLine: \"underline\",\n },\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.accentA8,\n },\n },\n page: {\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.grayDefault,\n },\n})\n\nexport const Breadcrumb = React.forwardRef<HTMLElement, BreadcrumbProps>(\n function Breadcrumb(\n {\n separator = \"/\",\n \"aria-label\": ariaLabel = \"Breadcrumb\",\n className,\n children,\n ...props\n },\n ref\n ) {\n const styles = useStyles()\n const items = React.Children.toArray(children).filter(React.isValidElement)\n\n return (\n <nav\n ref={ref}\n data-slot=\"breadcrumb\"\n {...{ [SLOT_ATTR]: \"breadcrumb\" }}\n aria-label={ariaLabel}\n className={mergeClasses(styles.root, className)}\n {...props}\n >\n <ol className={styles.list}>\n {items.map((child, index) => (\n <React.Fragment key={index}>\n {index > 0 && (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={styles.separator}\n >\n {separator}\n </li>\n )}\n {child}\n </React.Fragment>\n ))}\n </ol>\n </nav>\n )\n }\n)\n\nexport type BreadcrumbItemProps = Omit<React.ComponentProps<\"a\">, \"href\"> & {\n href?: string\n isCurrent?: boolean\n /**\n * Render the child instead of the built-in `a`, keeping the link styling and slot markers. This\n * is how a consumer supplies a router link. The child must be one real element, not a Fragment.\n */\n asChild?: boolean\n /**\n * Keep the crumb on one line and cut it with an ellipsis when the trail runs out of room, with\n * the full text as its `title`. Pass `title` yourself when the children are not plain text.\n */\n truncate?: boolean\n}\n\nexport const BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n BreadcrumbItemProps\n>(function BreadcrumbItem(\n {\n href,\n isCurrent = false,\n className,\n children,\n asChild = false,\n truncate = false,\n title,\n ...props\n },\n ref\n) {\n const styles = useStyles()\n const isLink = !!href\n\n const truncateClass = truncate ? styles.truncate : undefined\n const fullText =\n title ??\n (truncate && (typeof children === \"string\" || typeof children === \"number\")\n ? String(children)\n : undefined)\n\n const linkProps = {\n \"data-slot\": \"breadcrumb-link\",\n [SLOT_ATTR]: \"breadcrumb-link\",\n ...(href ? { href } : {}),\n ...(fullText !== undefined ? { title: fullText } : {}),\n ...(isCurrent ? { \"aria-current\": \"page\" as const } : {}),\n ...props,\n }\n const linkClassName = mergeClasses(styles.link, truncateClass, className)\n\n const content = asChild ? (\n <ComposeAsChild {...linkProps} className={linkClassName}>\n {onlyChild(children)}\n </ComposeAsChild>\n ) : isLink ? (\n <a {...linkProps} className={linkClassName}>\n {children}\n </a>\n ) : (\n <span\n data-slot=\"breadcrumb-page\"\n {...{ [SLOT_ATTR]: \"breadcrumb-page\" }}\n className={mergeClasses(styles.page, truncateClass, className)}\n {...(fullText !== undefined ? { title: fullText } : {})}\n {...(isCurrent ? { \"aria-current\": \"page\" as const } : {})}\n >\n {children}\n </span>\n )\n\n return (\n <li\n ref={ref}\n data-slot=\"breadcrumb-item\"\n {...{ [SLOT_ATTR]: \"breadcrumb-item\" }}\n {...(truncate ? { \"data-truncate\": \"\" } : {})}\n className={mergeClasses(styles.item, truncate && styles.itemTruncate)}\n >\n {content}\n </li>\n )\n})\n"],"names":["onlyChild","children","elements","React","useStyles","makeZenithStyles","SLOT_ATTR","boxModel","shorthands","tokens.spacingElement2","tokens.textBase","tokens.leadingBase","tokens.grayLight","tokens.spacingElement1","tokens.fontWeightSemibold","tokens.grayDefault","tokens.accentA8","Breadcrumb","separator","ariaLabel","className","props","ref","styles","items","jsx","mergeClasses","child","index","jsxs","BreadcrumbItem","href","isCurrent","asChild","truncate","title","isLink","truncateClass","fullText","linkProps","linkClassName","content","ComposeAsChild"],"mappings":";;;;;;;AAcA,SAASA,EAAUC,GAA2B;AAC5C,QAAMC,IAAWC,EAAM,SAAS,QAAQF,CAAQ;AAChD,SAAQC,EAAS,WAAW,IAAIA,EAAS,CAAC,IAAID;AAChD;AAWA,MAAMG,IAAYC,EAAiB;A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A,IAChB,aAAa;AAAA,IACb,CAACjC,CAAS,GAAG;AAAA,IACb,GAAIyB,IAAO,EAAE,MAAAA,EAAA,IAAS,CAAA;AAAA,IACtB,GAAIO,MAAa,SAAY,EAAE,OAAOA,EAAA,IAAa,CAAA;AAAA,IACnD,GAAIN,IAAY,EAAE,gBAAgB,OAAA,IAAoB,CAAA;AAAA,IACtD,GAAGX;AAAA,EAAA,GAECmB,IAAgBd,EAAaH,EAAO,MAAMc,GAAejB,CAAS,GAElEqB,IAAUR,IACd,gBAAAR,EAACiB,GAAA,EAAgB,GAAGH,GAAW,WAAWC,GACvC,UAAAxC,EAAUC,CAAQ,GACrB,IACEmC,sBACD,KAAA,EAAG,GAAGG,GAAW,WAAWC,GAC1B,UAAAvC,GACH,IAEA,gBAAAwB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACJ,CAACnB,CAAS,GAAG;AAAA,MACnB,WAAWoB,EAAaH,EAAO,MAAMc,GAAejB,CAAS;AAAA,MAC5D,GAAIkB,MAAa,SAAY,EAAE,OAAOA,EAAA,IAAa,CAAA;AAAA,MACnD,GAAIN,IAAY,EAAE,gBAAgB,OAAA,IAAoB,CAAA;AAAA,MAEtD,UAAA/B;AAAA,IAAA;AAAA,EAAA;AAIL,SACE,gBAAAwB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAH;AAAA,MACA,aAAU;AAAA,MACJ,CAAChB,CAAS,GAAG;AAAA,MAClB,GAAI4B,IAAW,EAAE,iBAAiB,GAAA,IAAO,CAAA;AAAA,MAC1C,WAAWR,EAAaH,EAAO,MAAMW,KAAYX,EAAO,YAAY;AAAA,MAEnE,UAAAkB;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
@@ -1,18 +1,24 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import * as l from "react";
3
- import { mergeClasses as B, SLOT_ATTR as H, shorthands as n } from "@epilot/zenith-runtime/v1";
4
- import { makeZenithStyles as R } from "../../styles/make-styles.js";
5
- import { boxModel as i, nativeControl as I } from "../../styles/host-reset.js";
6
- import { capTrim as z } from "../../styles/text-box.js";
7
- import { radiusLg as E, buttonIconSize as h, leadingLg as L, textLg as O, leadingBase as T, textBase as A, buttonBaseMinHeight as D, leadingSm as P, textSm as X, leadingXs as $, textXs as M, errorSoft as u, errorA11 as V, errorSoftHover as W, errorOnSoft as j, errorSolidHover as p, errorContrast as N, errorSolid as F, accentSoft as g, grayA12 as K, accentA11 as Z, accentSoftHover as _, accentOnSoft as q, accentSolidHover as b, accentContrast as G, accentSolid as J, focusRing as Q, fontWeightSemibold as U, buttonBasePaddingInline as Y, spacingElement3 as ee } from "../../tokens/index.js";
8
- import { Root as oe } from "../../vendor/.bun/@radix-ui_react-slot@1.2.4_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js";
9
- const te = "button", re = R({
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import * as n from "react";
3
+ import { mergeClasses as R, SLOT_ATTR as S, shorthands as l } from "@epilot/zenith-runtime/v1";
4
+ import { makeZenithStyles as I } from "../../styles/make-styles.js";
5
+ import { boxModel as a, nativeControl as L } from "../../styles/host-reset.js";
6
+ import { capTrim as O } from "../../styles/text-box.js";
7
+ import { radiusLg as E, buttonIconSize as v, leadingLg as T, textLg as z, leadingBase as A, textBase as D, buttonBaseMinHeight as N, leadingSm as P, textSm as $, leadingXs as V, textXs as X, errorSoft as C, errorA11 as M, errorSoftHover as W, errorOnSoft as _, errorSolidHover as k, errorContrast as j, errorSolid as F, accentSoft as m, grayA12 as K, accentA11 as Z, accentSoftHover as q, accentOnSoft as G, accentSolidHover as x, accentContrast as J, accentSolid as Q, focusRing as U, fontWeightSemibold as Y, buttonBasePaddingInline as ee, spacingElement3 as te } from "../../tokens/index.js";
8
+ import { Button as oe } from "../../_virtual/_zenith-runtime-family_button.js";
9
+ import { useRender as re } from "../../_virtual/_zenith-runtime-family_use-render.js";
10
+ const ne = /* @__PURE__ */ g("span", {});
11
+ function ie(s) {
12
+ const r = n.Children.toArray(s).filter(n.isValidElement);
13
+ return r.length === 1 ? r[0] : void 0;
14
+ }
15
+ const le = I({
10
16
  root: {
11
- ...I,
17
+ ...L,
12
18
  display: "inline-flex",
13
19
  alignItems: "center",
14
20
  justifyContent: "center",
15
- fontWeight: U,
21
+ fontWeight: Y,
16
22
  whiteSpace: "nowrap",
17
23
  transitionProperty: "all",
18
24
  cursor: "pointer",
@@ -24,7 +30,7 @@ const te = "button", re = R({
24
30
  outlineWidth: "2px",
25
31
  outlineStyle: "solid",
26
32
  outlineOffset: "2px",
27
- outlineColor: Q
33
+ outlineColor: U
28
34
  },
29
35
  "@media (prefers-reduced-motion: reduce)": {
30
36
  transitionDuration: "0.01ms"
@@ -35,113 +41,113 @@ const te = "button", re = R({
35
41
  color: "currentColor"
36
42
  }
37
43
  },
38
- label: z,
44
+ label: O,
39
45
  primary: {
40
- backgroundColor: J,
41
- color: G,
42
- ":hover:not(:disabled)": { backgroundColor: b },
43
- ":active:not(:disabled)": { backgroundColor: b }
46
+ backgroundColor: Q,
47
+ color: J,
48
+ ":hover:not(:disabled)": { backgroundColor: x },
49
+ ":active:not(:disabled)": { backgroundColor: x }
44
50
  },
45
51
  secondary: {
46
- backgroundColor: g,
47
- color: q,
48
- ":hover:not(:disabled)": { backgroundColor: _ }
52
+ backgroundColor: m,
53
+ color: G,
54
+ ":hover:not(:disabled)": { backgroundColor: q }
49
55
  },
50
56
  tertiary: {
51
57
  backgroundColor: "transparent",
52
58
  color: Z,
53
- ":hover:not(:disabled)": { backgroundColor: g }
59
+ ":hover:not(:disabled)": { backgroundColor: m }
54
60
  },
55
61
  ghost: {
56
62
  backgroundColor: "transparent",
57
63
  color: K,
58
- ":hover:not(:disabled)": { backgroundColor: g }
64
+ ":hover:not(:disabled)": { backgroundColor: m }
59
65
  },
60
66
  primaryDestructive: {
61
67
  backgroundColor: F,
62
- color: N,
63
- ":hover:not(:disabled)": { backgroundColor: p },
64
- ":active:not(:disabled)": { backgroundColor: p }
68
+ color: j,
69
+ ":hover:not(:disabled)": { backgroundColor: k },
70
+ ":active:not(:disabled)": { backgroundColor: k }
65
71
  },
66
72
  secondaryDestructive: {
67
- backgroundColor: u,
68
- color: j,
73
+ backgroundColor: C,
74
+ color: _,
69
75
  ":hover:not(:disabled)": { backgroundColor: W }
70
76
  },
71
77
  tertiaryDestructive: {
72
78
  backgroundColor: "transparent",
73
- color: V,
74
- ":hover:not(:disabled)": { backgroundColor: u }
79
+ color: M,
80
+ ":hover:not(:disabled)": { backgroundColor: C }
75
81
  },
76
82
  xs: {
77
- ...i,
78
- ...n.paddingInline("0.5rem"),
79
- ...n.paddingBlock("0.25rem"),
83
+ ...a,
84
+ ...l.paddingInline("0.5rem"),
85
+ ...l.paddingBlock("0.25rem"),
80
86
  // Cap trimming removes the line-height's leading from direct text. Keep the established
81
87
  // 24px control geometry explicitly instead of relying on that incidental text height.
82
88
  minHeight: "1.5rem",
83
- fontSize: M,
84
- lineHeight: $,
89
+ fontSize: X,
90
+ lineHeight: V,
85
91
  gap: "4px",
86
92
  "& svg": { width: "0.75rem", height: "0.75rem" }
87
93
  },
88
94
  sm: {
89
- ...i,
90
- ...n.paddingInline(ee),
91
- ...n.paddingBlock("0.25rem"),
95
+ ...a,
96
+ ...l.paddingInline(te),
97
+ ...l.paddingBlock("0.25rem"),
92
98
  // As above, the fixed 28px size is part of Button's contract, independent of its label box.
93
99
  minHeight: "1.75rem",
94
- fontSize: X,
100
+ fontSize: $,
95
101
  lineHeight: P,
96
102
  gap: "0.375rem",
97
103
  "& svg": { width: "0.875rem", height: "0.875rem" }
98
104
  },
99
105
  base: {
100
- ...i,
106
+ ...a,
101
107
  // Density-bound (DENSITY-SPEC.md §2.4, WP9B1-ACCEPTANCE-WP9B2A): padding-inline is the
102
108
  // compact/comfortable lever; min-height is floored by the fixed line-height + padding-block
103
109
  // below and cannot shrink, so it is bound too (compact === normal, comfortable raised via an
104
110
  // explicit minHeight above the natural content box, same mechanism `lg` already uses).
105
- ...n.paddingInline(Y),
106
- ...n.paddingBlock("0.25rem"),
107
- minHeight: D,
108
- fontSize: A,
109
- lineHeight: T,
111
+ ...l.paddingInline(ee),
112
+ ...l.paddingBlock("0.25rem"),
113
+ minHeight: N,
114
+ fontSize: D,
115
+ lineHeight: A,
110
116
  gap: "0.5rem",
111
117
  "& svg": { width: "1rem", height: "1rem" }
112
118
  },
113
119
  lg: {
114
- ...i,
115
- ...n.paddingInline("1.25rem"),
116
- ...n.paddingBlock("0.25rem"),
120
+ ...a,
121
+ ...l.paddingInline("1.25rem"),
122
+ ...l.paddingBlock("0.25rem"),
117
123
  minHeight: "2.5rem",
118
- fontSize: O,
119
- lineHeight: L,
124
+ fontSize: z,
125
+ lineHeight: T,
120
126
  gap: "0.5rem",
121
127
  "& svg": { width: "1rem", height: "1rem" }
122
128
  },
123
129
  iconXs: {
124
- ...i,
130
+ ...a,
125
131
  width: "1.5rem",
126
132
  height: "1.5rem",
127
133
  "& svg": { width: "0.75rem", height: "0.75rem" }
128
134
  },
129
135
  iconSm: {
130
- ...i,
136
+ ...a,
131
137
  width: "1.75rem",
132
138
  height: "1.75rem",
133
139
  "& svg": { width: "0.875rem", height: "0.875rem" }
134
140
  },
135
141
  icon: {
136
- ...i,
142
+ ...a,
137
143
  // Density-bound: a fixed square, no line-height floor (unlike `base`), so compact/comfortable
138
144
  // both move freely (DENSITY-SPEC.md §2.4).
139
- width: h,
140
- height: h,
145
+ width: v,
146
+ height: v,
141
147
  "& svg": { width: "1.125rem", height: "1.125rem" }
142
148
  },
143
149
  iconLg: {
144
- ...i,
150
+ ...a,
145
151
  width: "2.5rem",
146
152
  height: "2.5rem",
147
153
  "& svg": { width: "1.5rem", height: "1.5rem" }
@@ -149,54 +155,54 @@ const te = "button", re = R({
149
155
  normal: { borderRadius: E },
150
156
  rounded: { borderRadius: "9999px" }
151
157
  });
152
- function S(d, a = "button") {
153
- return l.Children.toArray(d).flatMap((e, t) => {
154
- const s = l.isValidElement(e) && e.key !== null ? String(e.key) : String(t), o = `${a}/${s}`;
155
- return l.isValidElement(e) && e.type === l.Fragment ? S(e.props.children, o) : [{ node: e, keyPath: o }];
158
+ function w(s, r = "button") {
159
+ return n.Children.toArray(s).flatMap((e, o) => {
160
+ const d = n.isValidElement(e) && e.key !== null ? String(e.key) : String(o), t = `${r}/${d}`;
161
+ return n.isValidElement(e) && e.type === n.Fragment ? w(e.props.children, t) : [{ node: e, keyPath: t }];
156
162
  });
157
163
  }
158
- function ne(d, a) {
164
+ function ae(s, r) {
159
165
  const e = [];
160
- let t = [];
161
- const s = () => {
162
- if (!t.length) return;
163
- t.every(
164
- ({ node: r }) => typeof r == "string" && r.trim() === ""
165
- ) ? e.push(...t.map(({ node: r }) => r)) : e.push(
166
- /* @__PURE__ */ f(
166
+ let o = [];
167
+ const d = () => {
168
+ if (!o.length) return;
169
+ o.every(
170
+ ({ node: i }) => typeof i == "string" && i.trim() === ""
171
+ ) ? e.push(...o.map(({ node: i }) => i)) : e.push(
172
+ /* @__PURE__ */ g(
167
173
  "span",
168
174
  {
169
175
  "data-slot": "button-label",
170
- className: a,
171
- children: t.map(({ node: r }) => r)
176
+ className: r,
177
+ children: o.map(({ node: i }) => i)
172
178
  },
173
- `button-label:${t[0].keyPath}`
179
+ `button-label:${o[0].keyPath}`
174
180
  )
175
- ), t = [];
181
+ ), o = [];
176
182
  };
177
- for (const o of S(d)) {
178
- if (typeof o.node == "string" || typeof o.node == "number") {
179
- t.push(o);
183
+ for (const t of w(s)) {
184
+ if (typeof t.node == "string" || typeof t.node == "number") {
185
+ o.push(t);
180
186
  continue;
181
187
  }
182
- s(), e.push(
183
- l.isValidElement(o.node) ? l.cloneElement(o.node, { key: o.keyPath }) : o.node
188
+ d(), e.push(
189
+ n.isValidElement(t.node) ? n.cloneElement(t.node, { key: t.keyPath }) : t.node
184
190
  );
185
191
  }
186
- return s(), e;
192
+ return d(), e;
187
193
  }
188
- const me = l.forwardRef(
194
+ const be = n.forwardRef(
189
195
  function({
190
- variant: a = "primary",
196
+ variant: r = "primary",
191
197
  size: e = "base",
192
- shape: t = "rounded",
193
- destructive: s = !1,
194
- className: o,
195
- asChild: r = !1,
196
- children: m,
197
- ...y
198
- }, k) {
199
- const c = re(), v = s && a !== "ghost" ? `${a}Destructive` : a, C = {
198
+ shape: o = "rounded",
199
+ destructive: d = !1,
200
+ className: t,
201
+ asChild: i = !1,
202
+ children: h,
203
+ ...u
204
+ }, p) {
205
+ const c = le(), B = d && r !== "ghost" ? `${r}Destructive` : r, H = {
200
206
  xs: "xs",
201
207
  sm: "sm",
202
208
  base: "base",
@@ -205,27 +211,38 @@ const me = l.forwardRef(
205
211
  "icon-sm": "iconSm",
206
212
  icon: "icon",
207
213
  "icon-lg": "iconLg"
208
- }[e], x = r ? oe : te, w = r ? m : ne(m, c.label);
209
- return /* @__PURE__ */ f(
210
- x,
214
+ }[e], b = R(
215
+ c.root,
216
+ c[B],
217
+ c[H],
218
+ c[o],
219
+ t
220
+ ), f = i ? ie(h) : void 0, y = re({
221
+ render: f ?? ne,
222
+ props: {
223
+ "data-slot": "button",
224
+ [S]: "button",
225
+ className: b,
226
+ ...u
227
+ },
228
+ ref: p,
229
+ enabled: f !== void 0
230
+ });
231
+ return y || /* @__PURE__ */ g(
232
+ oe,
211
233
  {
212
- ref: k,
234
+ ref: p,
213
235
  "data-slot": "button",
214
- [H]: "button",
215
- className: B(
216
- c.root,
217
- c[v],
218
- c[C],
219
- c[t],
220
- o
221
- ),
222
- ...y,
223
- children: w
236
+ [S]: "button",
237
+ className: b,
238
+ type: "submit",
239
+ ...u,
240
+ children: ae(h, c.label)
224
241
  }
225
242
  );
226
243
  }
227
244
  );
228
245
  export {
229
- me as Button
246
+ be as Button
230
247
  };
231
248
  //# sourceMappingURL=button.js.map