@epilot/zenith-react 0.2.0-next.1 → 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.
- package/README.md +25 -0
- package/codemods/README.md +168 -0
- package/codemods/migrate/base-elements/accordion.ts +132 -0
- package/codemods/migrate/base-elements/alert.ts +81 -0
- package/codemods/migrate/base-elements/avatar.ts +116 -0
- package/codemods/migrate/base-elements/button.ts +188 -0
- package/codemods/migrate/base-elements/checkbox.ts +17 -0
- package/codemods/migrate/base-elements/chip.ts +87 -0
- package/codemods/migrate/base-elements/chip360.ts +162 -0
- package/codemods/migrate/base-elements/circular-progress.ts +73 -0
- package/codemods/migrate/base-elements/dialog.ts +323 -0
- package/codemods/migrate/base-elements/divider.ts +61 -0
- package/codemods/migrate/base-elements/feedback-message.ts +95 -0
- package/codemods/migrate/base-elements/icon-button.ts +203 -0
- package/codemods/migrate/base-elements/index.ts +55 -0
- package/codemods/migrate/base-elements/mui-props.ts +29 -0
- package/codemods/migrate/base-elements/notification.ts +98 -0
- package/codemods/migrate/base-elements/paper.ts +78 -0
- package/codemods/migrate/base-elements/select.ts +328 -0
- package/codemods/migrate/base-elements/shared.ts +910 -0
- package/codemods/migrate/base-elements/skeleton.ts +83 -0
- package/codemods/migrate/base-elements/switch.ts +19 -0
- package/codemods/migrate/base-elements/tabs.ts +222 -0
- package/codemods/migrate/base-elements/text-field.ts +425 -0
- package/codemods/migrate/base-elements/toggle-button.ts +185 -0
- package/codemods/migrate/base-elements/tooltip.ts +231 -0
- package/codemods/migrate/base-elements/typography.ts +247 -0
- package/codemods/migrate/base-elements/unsupported.ts +277 -0
- package/codemods/migrate/from-base-elements.ts +20 -0
- package/codemods/migrate/from-volt.ts +20 -0
- package/codemods/migrate/lib/imports.ts +399 -0
- package/codemods/migrate/lib/jsx.ts +313 -0
- package/codemods/migrate/lib/run-migration.ts +528 -0
- package/codemods/migrate/lib/source.ts +6 -0
- package/codemods/migrate/lib/todo.ts +107 -0
- package/codemods/migrate/lib/types.ts +114 -0
- package/codemods/migrate/volt/class-helpers.ts +37 -0
- package/codemods/migrate/volt/index.ts +18 -0
- package/codemods/migrate/volt/pagination.ts +26 -0
- package/codemods/migrate/volt/same-name.ts +293 -0
- package/codemods/migrate/volt/stylesheets.ts +18 -0
- package/codemods/migrate/volt/tanstack-types.ts +20 -0
- package/codemods/radix-to-base-ui.ts +389 -0
- package/dist/_virtual/_zenith-runtime-family_accordion.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_accordion.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_alert-dialog.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_alert-dialog.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_avatar.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_avatar.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_button.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_button.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_checkbox.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_checkbox.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_csp-provider.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_csp-provider.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_dialog.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_dialog.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_direction-provider.js +8 -0
- package/dist/_virtual/_zenith-runtime-family_direction-provider.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_menu.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_menu.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_merge-props.js +11 -0
- package/dist/_virtual/_zenith-runtime-family_merge-props.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_popover.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_popover.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_radio-group.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_radio-group.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_radio.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_radio.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_scroll-area.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_scroll-area.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_select.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_select.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_separator.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_separator.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_switch.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_switch.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_tabs.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_tabs.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_toast.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_toast.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_toggle-group.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_toggle-group.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_toggle.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_toggle.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_tooltip.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_tooltip.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_use-render.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_use-render.js.map +1 -0
- package/dist/components/accordion/accordion.js +179 -96
- package/dist/components/accordion/accordion.js.map +1 -1
- package/dist/components/alert-dialog/alert-dialog.js +243 -206
- package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/avatar/avatar.js +94 -82
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/badge/badge.js +11 -11
- package/dist/components/breadcrumb/breadcrumb.js +69 -70
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/button/button.js +119 -102
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/checkbox/checkbox.js +68 -51
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/data-table/data-table-header.js +113 -99
- package/dist/components/data-table/data-table-header.js.map +1 -1
- package/dist/components/data-table/data-table-row.js +49 -40
- package/dist/components/data-table/data-table-row.js.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +100 -90
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker-input.js +118 -108
- package/dist/components/date-time-picker/date-time-picker-input.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker-panel.js +91 -94
- package/dist/components/date-time-picker/date-time-picker-panel.js.map +1 -1
- package/dist/components/dialog/dialog.js +238 -228
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/drawer/drawer.js +260 -322
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.js +533 -279
- package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/field/field-combobox.js +87 -77
- package/dist/components/field/field-combobox.js.map +1 -1
- package/dist/components/list/list-sortable.js +104 -0
- package/dist/components/list/list-sortable.js.map +1 -0
- package/dist/components/list/list.js +246 -324
- package/dist/components/list/list.js.map +1 -1
- package/dist/components/option-card/option-card.js +121 -117
- package/dist/components/option-card/option-card.js.map +1 -1
- package/dist/components/pill/pill.js +7 -7
- package/dist/components/popover/popover.js +223 -127
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/radio/radio-group-base.js +54 -0
- package/dist/components/radio/radio-group-base.js.map +1 -0
- package/dist/components/radio/radio.js +71 -60
- package/dist/components/radio/radio.js.map +1 -1
- package/dist/components/scroll-area/scroll-area.js +142 -108
- package/dist/components/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/scroll-overflow/scroll-overflow.js +156 -127
- package/dist/components/scroll-overflow/scroll-overflow.js.map +1 -1
- package/dist/components/segmented-control/segmented-control.js +93 -81
- package/dist/components/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/select/select.js +485 -310
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/separator/separator.js.map +1 -1
- package/dist/components/slot/compose-as-child.js +15 -12
- package/dist/components/slot/compose-as-child.js.map +1 -1
- package/dist/components/switch/switch.js +75 -68
- package/dist/components/switch/switch.js.map +1 -1
- package/dist/components/table/table-pagination.js +212 -175
- package/dist/components/table/table-pagination.js.map +1 -1
- package/dist/components/tabs/tabs.js +193 -190
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/toast/toast.js +610 -148
- package/dist/components/toast/toast.js.map +1 -1
- package/dist/components/toggle/toggle-group.js +143 -32
- package/dist/components/toggle/toggle-group.js.map +1 -1
- package/dist/components/toggle/toggle.js +83 -53
- package/dist/components/toggle/toggle.js.map +1 -1
- package/dist/components/tooltip/tooltip.js +298 -138
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/index.d.ts +2335 -2129
- package/dist/index.js +24 -23
- package/dist/list/sortable/index.d.ts +29 -0
- package/dist/list/sortable/index.js +5 -0
- package/dist/{_virtual → list/sortable}/index.js.map +1 -1
- package/dist/packages/tokens/dist/delivery/index.js +10 -10
- package/dist/packages/tokens/dist/delivery/index.js.map +1 -1
- package/dist/packages/tokens/dist/generated/core.generated.js +6 -15
- package/dist/packages/tokens/dist/generated/core.generated.js.map +1 -1
- package/dist/packages/tokens/dist/generated/palette.generated.js +4 -5
- package/dist/packages/tokens/dist/generated/palette.generated.js.map +1 -1
- package/dist/packages/tokens/dist/generated/palette.meta.generated.js +5 -0
- package/dist/packages/tokens/dist/generated/palette.meta.generated.js.map +1 -0
- package/dist/packages/tokens/dist/install.js +40 -17
- package/dist/packages/tokens/dist/install.js.map +1 -1
- package/dist/renderer/runtime-contract.generated.js +8 -0
- package/dist/renderer/runtime-contract.generated.js.map +1 -0
- package/dist/renderer/served.js +34 -0
- package/dist/renderer/served.js.map +1 -0
- package/dist/tokens/core.meta.generated.js +2 -2
- package/dist/tokens/core.meta.generated.js.map +1 -1
- package/dist/tokens/index.d.ts +1028 -1028
- package/dist/tokens/index.js +863 -863
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/palette.meta.generated.js +5 -0
- package/dist/tokens/palette.meta.generated.js.map +1 -0
- package/dist/tokens.json +1 -1
- package/dist/vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js +57 -62
- package/dist/vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js.map +1 -1
- package/dist/vendor/.bun/@radix-ui_react-slot@1.2.3_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js +32 -38
- package/dist/vendor/.bun/@radix-ui_react-slot@1.2.3_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/package.json +29 -21
- package/scripts/migration-diagnostics-core.mjs +18 -10
- package/scripts/migration-diagnostics.mjs +31 -8
- package/dist/_virtual/index.js +0 -6
- package/dist/_virtual/index2.js +0 -5
- package/dist/_virtual/index2.js.map +0 -1
- package/dist/_virtual/use-sync-external-store-shim.development.js +0 -5
- package/dist/_virtual/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/_virtual/use-sync-external-store-shim.production.js +0 -5
- package/dist/_virtual/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/tokens/palette.generated.js +0 -5
- package/dist/tokens/palette.generated.js.map +0 -1
- package/dist/vendor/.bun/@floating-ui_core@1.8.0/vendor/@floating-ui/core/dist/floating-ui.core.js +0 -512
- package/dist/vendor/.bun/@floating-ui_core@1.8.0/vendor/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
- package/dist/vendor/.bun/@floating-ui_dom@1.8.0/vendor/@floating-ui/dom/dist/floating-ui.dom.js +0 -396
- package/dist/vendor/.bun/@floating-ui_dom@1.8.0/vendor/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
- 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
- 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
- package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -137
- package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
- package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.js +0 -129
- package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_number@1.1.1/vendor/@radix-ui/number/dist/index.js +0 -7
- package/dist/vendor/.bun/@radix-ui_number@1.1.1/vendor/@radix-ui/number/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-accordion@1.2.12_2b23df507bdda662/vendor/@radix-ui/react-accordion/dist/index.js +0 -240
- package/dist/vendor/.bun/@radix-ui_react-accordion@1.2.12_2b23df507bdda662/vendor/@radix-ui/react-accordion/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-alert-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-alert-dialog/dist/index.js +0 -128
- 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
- package/dist/vendor/.bun/@radix-ui_react-arrow@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-arrow/dist/index.js +0 -25
- package/dist/vendor/.bun/@radix-ui_react-arrow@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-arrow/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-avatar@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-avatar/dist/index.js +0 -76
- package/dist/vendor/.bun/@radix-ui_react-avatar@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-avatar/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-checkbox@1.3.3_2b23df507bdda662/vendor/@radix-ui/react-checkbox/dist/index.js +0 -252
- package/dist/vendor/.bun/@radix-ui_react-checkbox@1.3.3_2b23df507bdda662/vendor/@radix-ui/react-checkbox/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-collapsible@1.1.12_2b23df507bdda662/vendor/@radix-ui/react-collapsible/dist/index.js +0 -121
- package/dist/vendor/.bun/@radix-ui_react-collapsible@1.1.12_2b23df507bdda662/vendor/@radix-ui/react-collapsible/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-collection@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-collection/dist/index.js +0 -49
- package/dist/vendor/.bun/@radix-ui_react-collection@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-collection/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-direction@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-direction/dist/index.js +0 -11
- package/dist/vendor/.bun/@radix-ui_react-direction@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-direction/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-dropdown-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-dropdown-menu/dist/index.js +0 -228
- 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
- package/dist/vendor/.bun/@radix-ui_react-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-menu/dist/index.js +0 -653
- package/dist/vendor/.bun/@radix-ui_react-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-menu/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-popover@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-popover/dist/index.js +0 -244
- package/dist/vendor/.bun/@radix-ui_react-popover@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-popover/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-popper@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-popper/dist/index.js +0 -222
- package/dist/vendor/.bun/@radix-ui_react-popper@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-popper/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-radio-group@1.3.8_2b23df507bdda662/vendor/@radix-ui/react-radio-group/dist/index.js +0 -239
- 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
- package/dist/vendor/.bun/@radix-ui_react-roving-focus@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-roving-focus/dist/index.js +0 -184
- 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
- package/dist/vendor/.bun/@radix-ui_react-scroll-area@1.2.10_2b23df507bdda662/vendor/@radix-ui/react-scroll-area/dist/index.js +0 -535
- 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
- package/dist/vendor/.bun/@radix-ui_react-select@2.2.6_2b23df507bdda662/vendor/@radix-ui/react-select/dist/index.js +0 -863
- package/dist/vendor/.bun/@radix-ui_react-select@2.2.6_2b23df507bdda662/vendor/@radix-ui/react-select/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-slot@1.2.4_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js +0 -63
- package/dist/vendor/.bun/@radix-ui_react-slot@1.2.4_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-switch@1.2.6_2b23df507bdda662/vendor/@radix-ui/react-switch/dist/index.js +0 -133
- package/dist/vendor/.bun/@radix-ui_react-switch@1.2.6_2b23df507bdda662/vendor/@radix-ui/react-switch/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-tabs@1.1.13_2b23df507bdda662/vendor/@radix-ui/react-tabs/dist/index.js +0 -164
- package/dist/vendor/.bun/@radix-ui_react-tabs@1.1.13_2b23df507bdda662/vendor/@radix-ui/react-tabs/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-toggle-group@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-toggle-group/dist/index.js +0 -138
- 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
- package/dist/vendor/.bun/@radix-ui_react-toggle@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-toggle/dist/index.js +0 -34
- package/dist/vendor/.bun/@radix-ui_react-toggle@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-toggle/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-tooltip@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-tooltip/dist/index.js +0 -340
- package/dist/vendor/.bun/@radix-ui_react-tooltip@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-tooltip/dist/index.js.map +0 -1
- 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
- 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
- package/dist/vendor/.bun/@radix-ui_react-use-previous@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-previous/dist/index.js +0 -9
- 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
- package/dist/vendor/.bun/@radix-ui_react-use-size@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-size/dist/index.js +0 -28
- 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
- package/dist/vendor/.bun/@radix-ui_react-visually-hidden@1.2.3_2b23df507bdda662/vendor/@radix-ui/react-visually-hidden/dist/index.js +0 -33
- 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
- package/dist/vendor/.bun/sonner@2.0.7_6f4b9a1cfb20c0ae/vendor/sonner/dist/index.js +0 -747
- package/dist/vendor/.bun/sonner@2.0.7_6f4b9a1cfb20c0ae/vendor/sonner/dist/index.js.map +0 -1
- 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
- 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
- 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
- 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
- package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/shim/index.js +0 -11
- package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/shim/index.js.map +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skeleton → Skeleton. MUI's `width`/`height` become the inline `style` (Zenith sizes a Skeleton
|
|
3
|
+
* by className or style); `variant="circle"` becomes a round style; `animation` is dropped.
|
|
4
|
+
*/
|
|
5
|
+
import type { MigrateContext } from "../lib/types"
|
|
6
|
+
import { dropWithHint } from "./mui-props"
|
|
7
|
+
|
|
8
|
+
export const handles = ["Skeleton", "SkeletonProps"] as const
|
|
9
|
+
|
|
10
|
+
export function migrate(ctx: MigrateContext): void {
|
|
11
|
+
const { j, jsx } = ctx
|
|
12
|
+
const elements = ctx.elements("Skeleton")
|
|
13
|
+
ctx.moveElements("Skeleton")
|
|
14
|
+
ctx.move("SkeletonProps")
|
|
15
|
+
|
|
16
|
+
elements.forEach((path) => {
|
|
17
|
+
const el = path.node
|
|
18
|
+
jsx.removeAttr(el, "animation")
|
|
19
|
+
|
|
20
|
+
const sized = ["width", "height"]
|
|
21
|
+
.map((name) => jsx.attr(el, name))
|
|
22
|
+
.filter((a): a is NonNullable<typeof a> => !!a)
|
|
23
|
+
const variant = jsx.attr(el, "variant")
|
|
24
|
+
const variantValue = jsx.literal(variant)
|
|
25
|
+
const round = variantValue === "circle" || variantValue === "circular"
|
|
26
|
+
if (variant) {
|
|
27
|
+
if (typeof variantValue === "string") jsx.removeAttr(el, "variant")
|
|
28
|
+
else {
|
|
29
|
+
jsx.removeAttr(el, "variant")
|
|
30
|
+
ctx.todo(
|
|
31
|
+
path,
|
|
32
|
+
"Skeleton",
|
|
33
|
+
`dropped ${jsx.print(variant)}: Skeleton variant is "default" | "ai"; a circle is style={{ borderRadius: "50%" }}`
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (sized.length || round) {
|
|
39
|
+
const style = jsx.attr(el, "style")
|
|
40
|
+
const object =
|
|
41
|
+
style?.value?.type === "JSXExpressionContainer" &&
|
|
42
|
+
style.value.expression.type === "ObjectExpression"
|
|
43
|
+
? style.value.expression
|
|
44
|
+
: undefined
|
|
45
|
+
if (style && !object) {
|
|
46
|
+
const printed = sized.map((a) => jsx.print(a)).join(" ")
|
|
47
|
+
for (const a of sized) jsx.removeAttr(el, jsx.attrName(a))
|
|
48
|
+
ctx.todo(
|
|
49
|
+
path,
|
|
50
|
+
"Skeleton",
|
|
51
|
+
`dropped ${printed}${round ? " and the circle shape" : ""}: merge them into the existing style (width/height/borderRadius)`
|
|
52
|
+
)
|
|
53
|
+
return
|
|
54
|
+
}
|
|
55
|
+
const entries = (object?.properties ?? []).map((prop) =>
|
|
56
|
+
j(prop as never).toSource()
|
|
57
|
+
)
|
|
58
|
+
for (const a of sized) {
|
|
59
|
+
const name = jsx.attrName(a)
|
|
60
|
+
const value =
|
|
61
|
+
a.value?.type === "JSXExpressionContainer"
|
|
62
|
+
? j(a.value.expression as never).toSource()
|
|
63
|
+
: JSON.stringify(String(jsx.literal(a) ?? ""))
|
|
64
|
+
entries.push(`${name}: ${value}`)
|
|
65
|
+
jsx.removeAttr(el, name)
|
|
66
|
+
}
|
|
67
|
+
if (round) entries.push(`borderRadius: "50%"`)
|
|
68
|
+
const next = jsx.parseAttr(`style={{ ${entries.join(", ")} }}`)
|
|
69
|
+
if (style) {
|
|
70
|
+
el.openingElement.attributes = (el.openingElement.attributes ?? []).map(
|
|
71
|
+
(a) => (a === style ? next : a)
|
|
72
|
+
)
|
|
73
|
+
} else {
|
|
74
|
+
el.openingElement.attributes = [
|
|
75
|
+
...(el.openingElement.attributes ?? []),
|
|
76
|
+
next,
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
dropWithHint(ctx, path, "Skeleton")
|
|
82
|
+
})
|
|
83
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Switch → Switch: `onChange(event, checked)` → `onCheckedChange(checked)`, `size` small → sm,
|
|
3
|
+
* base-elements' `label`/`labelPlacement` → a wrapping `<Label>`. See `migrateCheckedControl`.
|
|
4
|
+
*/
|
|
5
|
+
import type { MigrateContext } from "../lib/types"
|
|
6
|
+
import { migrateCheckedControl, moveElements } from "./shared"
|
|
7
|
+
|
|
8
|
+
export const handles = ["Switch", "SwitchProps"] as const
|
|
9
|
+
|
|
10
|
+
export function migrate(ctx: MigrateContext): void {
|
|
11
|
+
ctx.move("SwitchProps")
|
|
12
|
+
moveElements(ctx, "Switch", "Switch", (path) =>
|
|
13
|
+
migrateCheckedControl(ctx, path, "Switch", {
|
|
14
|
+
tristate: false,
|
|
15
|
+
sizes: { small: "sm", medium: "base" },
|
|
16
|
+
fallbackSize: "base",
|
|
17
|
+
})
|
|
18
|
+
)
|
|
19
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MUI tabs family → Tabs / TabsList / TabsTrigger / TabsContent.
|
|
3
|
+
*
|
|
4
|
+
* - `TabContext value` → `Tabs value`; the `onChange` of the tab list inside it moves up as
|
|
5
|
+
* `onValueChange` (MUI's `(event, value)` handler becomes `(value)`).
|
|
6
|
+
* - MUI `Tabs` (value + onChange + Tab children) is the list: inside a `TabContext` it becomes
|
|
7
|
+
* `TabsList`; on its own it becomes `Tabs` around a new `TabsList`. `TabList` and
|
|
8
|
+
* base-elements' `PrimaryTabs` become `TabsList`.
|
|
9
|
+
* - `Tab label value` → `TabsTrigger value` with the label as children; `icon` leads them.
|
|
10
|
+
* - `TabPanel` → `TabsContent`.
|
|
11
|
+
* - Radix values are strings: a numeric or missing Tab value (MUI fell back to the index) is
|
|
12
|
+
* written as a string and reported. Indicator/text colours are theming and dropped.
|
|
13
|
+
*/
|
|
14
|
+
import type { ASTPath, JSXElement } from "jscodeshift"
|
|
15
|
+
import type { MigrateContext } from "../lib/types"
|
|
16
|
+
import {
|
|
17
|
+
attrExpression,
|
|
18
|
+
insertChild,
|
|
19
|
+
nestChildren,
|
|
20
|
+
printAttr,
|
|
21
|
+
printAttrs,
|
|
22
|
+
setChildren,
|
|
23
|
+
takeAttrs,
|
|
24
|
+
valueHandler,
|
|
25
|
+
familyStays,
|
|
26
|
+
} from "./shared"
|
|
27
|
+
|
|
28
|
+
export const handles = [
|
|
29
|
+
"TabContext",
|
|
30
|
+
"TabContextProps",
|
|
31
|
+
"Tabs",
|
|
32
|
+
"TabsProps",
|
|
33
|
+
"PrimaryTabs",
|
|
34
|
+
"TabList",
|
|
35
|
+
"TabListProps",
|
|
36
|
+
"Tab",
|
|
37
|
+
"TabPanel",
|
|
38
|
+
"TabPanelProps",
|
|
39
|
+
"useTabContext",
|
|
40
|
+
] as const
|
|
41
|
+
|
|
42
|
+
const SILENT_LIST = [
|
|
43
|
+
"indicatorColor",
|
|
44
|
+
"textColor",
|
|
45
|
+
"buttonsVariant",
|
|
46
|
+
"TabIndicatorProps",
|
|
47
|
+
"selectionFollowsFocus",
|
|
48
|
+
]
|
|
49
|
+
const REPORTED_LIST = [
|
|
50
|
+
"variant",
|
|
51
|
+
"scrollButtons",
|
|
52
|
+
"centered",
|
|
53
|
+
"ScrollButtonComponent",
|
|
54
|
+
"classes",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
export function migrate(ctx: MigrateContext): void {
|
|
58
|
+
const { j, jsx } = ctx
|
|
59
|
+
if (
|
|
60
|
+
familyStays(
|
|
61
|
+
ctx,
|
|
62
|
+
["TabContext", "Tabs", "PrimaryTabs", "TabList", "Tab", "TabPanel"],
|
|
63
|
+
"migrate these tabs by hand: Tabs value onValueChange > TabsList > TabsTrigger, and TabsContent"
|
|
64
|
+
)
|
|
65
|
+
)
|
|
66
|
+
return
|
|
67
|
+
const listTags = ["Tabs", "TabList", "PrimaryTabs"]
|
|
68
|
+
.map((n) => ctx.names[n])
|
|
69
|
+
.filter(Boolean)
|
|
70
|
+
|
|
71
|
+
// Lists inside a TabContext: their onChange moves up to the new Tabs root.
|
|
72
|
+
const contained = new Set<JSXElement>()
|
|
73
|
+
ctx.elements("TabContext").forEach((path) => {
|
|
74
|
+
const lists = j(path)
|
|
75
|
+
.find(j.JSXElement)
|
|
76
|
+
.filter((p) => listTags.includes(jsx.tagName(p.node) ?? ""))
|
|
77
|
+
.paths()
|
|
78
|
+
for (const list of lists) {
|
|
79
|
+
contained.add(list.node)
|
|
80
|
+
moveHandler(ctx, list, path.node)
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
const standalone = ctx
|
|
85
|
+
.elements("Tabs")
|
|
86
|
+
.paths()
|
|
87
|
+
.filter((p) => !contained.has(p.node))
|
|
88
|
+
const containedTabs = ctx
|
|
89
|
+
.elements("Tabs")
|
|
90
|
+
.paths()
|
|
91
|
+
.filter((p) => contained.has(p.node))
|
|
92
|
+
// Moved even when every MUI Tabs is a list inside a TabContext: the TabContext → Tabs rename
|
|
93
|
+
// then lands on the same Zenith binding instead of an alias.
|
|
94
|
+
ctx.move("Tabs")
|
|
95
|
+
ctx.move("TabsProps")
|
|
96
|
+
ctx.move("TabContext", "Tabs")
|
|
97
|
+
ctx.move("TabContextProps", "TabsProps")
|
|
98
|
+
ctx.move("TabList", "TabsList")
|
|
99
|
+
ctx.move("TabListProps", "TabsListProps")
|
|
100
|
+
ctx.move("PrimaryTabs", "TabsList")
|
|
101
|
+
ctx.move("Tab", "TabsTrigger")
|
|
102
|
+
ctx.move("TabPanel", "TabsContent")
|
|
103
|
+
ctx.move("TabPanelProps", "TabsContentProps")
|
|
104
|
+
ctx.keep(
|
|
105
|
+
"useTabContext",
|
|
106
|
+
"no Zenith equivalent: read the selected value from the state you pass to Tabs"
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
for (const path of standalone) {
|
|
110
|
+
moveHandler(ctx, path, path.node)
|
|
111
|
+
const list = nestChildren(j, path.node, ctx.ensureZenith("TabsList"))
|
|
112
|
+
cleanList(ctx, path, list)
|
|
113
|
+
}
|
|
114
|
+
for (const path of containedTabs) {
|
|
115
|
+
jsx.rename(path.node, ctx.ensureZenith("TabsList"))
|
|
116
|
+
jsx.removeAttr(path.node, "value")
|
|
117
|
+
cleanList(ctx, path, path.node)
|
|
118
|
+
}
|
|
119
|
+
for (const name of ["TabList", "PrimaryTabs"])
|
|
120
|
+
ctx.elements(name).forEach((path) => {
|
|
121
|
+
if (!contained.has(path.node)) moveHandler(ctx, path, path.node)
|
|
122
|
+
cleanList(ctx, path, path.node)
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
ctx.elements("Tab").forEach((path) => migrateTab(ctx, path))
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* `onChange={(event, value) => …}` on a list → `onValueChange={(value) => …}` on `root` (the
|
|
130
|
+
* TabContext, or the standalone Tabs itself).
|
|
131
|
+
*/
|
|
132
|
+
function moveHandler(
|
|
133
|
+
ctx: MigrateContext,
|
|
134
|
+
list: ASTPath<JSXElement>,
|
|
135
|
+
root: JSXElement
|
|
136
|
+
): void {
|
|
137
|
+
const { j, jsx } = ctx
|
|
138
|
+
const onChange = jsx.removeAttr(list.node, "onChange")
|
|
139
|
+
if (!onChange) return
|
|
140
|
+
const handler = valueHandler(j, attrExpression(onChange), {
|
|
141
|
+
valueName: "value",
|
|
142
|
+
})
|
|
143
|
+
if (handler) jsx.setAttr(root, "onValueChange", handler)
|
|
144
|
+
else
|
|
145
|
+
ctx.todo(
|
|
146
|
+
list,
|
|
147
|
+
"Tabs",
|
|
148
|
+
`dropped ${printAttr(ctx, onChange)} (Tabs onValueChange(value) passes only the value: call your handler with it)`
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function cleanList(
|
|
153
|
+
ctx: MigrateContext,
|
|
154
|
+
path: ASTPath<JSXElement>,
|
|
155
|
+
list: JSXElement
|
|
156
|
+
): void {
|
|
157
|
+
const root = path.node
|
|
158
|
+
takeAttrs(ctx, root, SILENT_LIST)
|
|
159
|
+
// On a standalone Tabs, orientation and the list's labelling belong to the root and list.
|
|
160
|
+
if (root !== list) {
|
|
161
|
+
const toList = takeAttrs(ctx, root, ["aria-label", "aria-labelledby"])
|
|
162
|
+
list.openingElement.attributes = [
|
|
163
|
+
...(list.openingElement.attributes ?? []),
|
|
164
|
+
...toList,
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
const reported = takeAttrs(ctx, root, REPORTED_LIST)
|
|
168
|
+
if (reported.length)
|
|
169
|
+
ctx.todo(
|
|
170
|
+
path,
|
|
171
|
+
"Tabs",
|
|
172
|
+
`dropped ${printAttrs(ctx, reported)} (TabsList has one layout; scrolling and centering are yours to style)`
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function migrateTab(ctx: MigrateContext, path: ASTPath<JSXElement>): void {
|
|
177
|
+
const { j, jsx } = ctx
|
|
178
|
+
const el = path.node
|
|
179
|
+
const reported: string[] = []
|
|
180
|
+
|
|
181
|
+
const value = jsx.attr(el, "value")
|
|
182
|
+
const literal = jsx.literal(value)
|
|
183
|
+
if (typeof literal === "number") {
|
|
184
|
+
jsx.setAttr(el, "value", String(literal))
|
|
185
|
+
reported.push(
|
|
186
|
+
`value={${literal}} is now "${literal}": Radix tab values are strings; make the Tabs value a string too`
|
|
187
|
+
)
|
|
188
|
+
} else if (!value) {
|
|
189
|
+
const index = siblingIndex(ctx, path)
|
|
190
|
+
jsx.setAttr(el, "value", String(index))
|
|
191
|
+
reported.push(
|
|
192
|
+
`had no value, so MUI used its index: it is value="${index}" now; give it a real one and make the Tabs value match`
|
|
193
|
+
)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const label = jsx.removeAttr(el, "label")
|
|
197
|
+
const children: JSXElement["children"] = label
|
|
198
|
+
? [jsx.childFromValue(label)]
|
|
199
|
+
: []
|
|
200
|
+
setChildren(j, el, children)
|
|
201
|
+
const icon = jsx.removeAttr(el, "icon")
|
|
202
|
+
if (icon) insertChild(j, el, jsx.childFromValue(icon), "start")
|
|
203
|
+
takeAttrs(ctx, el, ["wrapped", "disableRipple", "disableFocusRipple"])
|
|
204
|
+
|
|
205
|
+
const unsupported = takeAttrs(ctx, el, ["component", "to", "href", "classes"])
|
|
206
|
+
if (unsupported.length)
|
|
207
|
+
reported.push(
|
|
208
|
+
`dropped ${printAttrs(ctx, unsupported)} (a link tab is a TabsTrigger asChild around your link)`
|
|
209
|
+
)
|
|
210
|
+
if (reported.length) ctx.todo(path, "Tab", reported.join("; "))
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** The Tab's position among its sibling Tabs, MUI's fallback value. */
|
|
214
|
+
function siblingIndex(ctx: MigrateContext, path: ASTPath<JSXElement>): number {
|
|
215
|
+
const parent = path.parent?.node as JSXElement | undefined
|
|
216
|
+
const tag = ctx.jsx.tagName(path.node)
|
|
217
|
+
const siblings = (parent?.children ?? []).filter(
|
|
218
|
+
(c): c is JSXElement =>
|
|
219
|
+
c.type === "JSXElement" && ctx.jsx.tagName(c) === tag
|
|
220
|
+
)
|
|
221
|
+
return Math.max(0, siblings.indexOf(path.node))
|
|
222
|
+
}
|