@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
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import { mergeClasses as
|
|
1
|
+
import { jsx as t, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { Radio as p } from "../../_virtual/_zenith-runtime-family_radio.js";
|
|
4
|
+
import { mergeClasses as b, SLOT_ATTR as l, shorthands as i } from "@epilot/zenith-runtime/v1";
|
|
5
5
|
import { makeZenithStyles as k } from "../../styles/make-styles.js";
|
|
6
|
-
import { boxModel as
|
|
7
|
-
import { accentContrast as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { boxModel as m, nativeControl as y } from "../../styles/host-reset.js";
|
|
7
|
+
import { accentContrast as f, errorA10 as v, focusRing as h, errorSoft as R, grayA3 as g, accentSolid as w, accentOnSoft as S, accentSoft as I, errorA8 as E, accentA7 as A, spacingElement3 as T } from "../../tokens/index.js";
|
|
8
|
+
import { RadioGroupBase as j } from "./radio-group-base.js";
|
|
9
|
+
const G = n.forwardRef(
|
|
10
|
+
function(o, e) {
|
|
11
|
+
return /* @__PURE__ */ t(
|
|
11
12
|
"svg",
|
|
12
13
|
{
|
|
13
|
-
ref:
|
|
14
|
+
ref: e,
|
|
14
15
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15
16
|
viewBox: "0 0 24 24",
|
|
16
17
|
fill: "currentColor",
|
|
@@ -19,17 +20,17 @@ const N = d.forwardRef(
|
|
|
19
20
|
strokeLinecap: "round",
|
|
20
21
|
strokeLinejoin: "round",
|
|
21
22
|
...o,
|
|
22
|
-
children: /* @__PURE__ */
|
|
23
|
+
children: /* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10" })
|
|
23
24
|
}
|
|
24
25
|
);
|
|
25
26
|
}
|
|
26
|
-
),
|
|
27
|
+
), C = k({
|
|
27
28
|
group: {
|
|
28
29
|
display: "grid",
|
|
29
|
-
...
|
|
30
|
+
...i.gap(T)
|
|
30
31
|
},
|
|
31
32
|
item: {
|
|
32
|
-
...
|
|
33
|
+
...y,
|
|
33
34
|
boxSizing: "border-box",
|
|
34
35
|
display: "inline-flex",
|
|
35
36
|
alignItems: "center",
|
|
@@ -40,7 +41,7 @@ const N = d.forwardRef(
|
|
|
40
41
|
height: "1rem",
|
|
41
42
|
flexShrink: 0,
|
|
42
43
|
borderRadius: "9999px",
|
|
43
|
-
...
|
|
44
|
+
...i.border("1px", "solid", A),
|
|
44
45
|
backgroundColor: I,
|
|
45
46
|
color: S,
|
|
46
47
|
// Tailwind `shadow-xs` — literal per CONVENTIONS B7
|
|
@@ -55,32 +56,32 @@ const N = d.forwardRef(
|
|
|
55
56
|
outlineOffset: "2px",
|
|
56
57
|
outlineWidth: "2px",
|
|
57
58
|
outlineStyle: "solid",
|
|
58
|
-
outlineColor:
|
|
59
|
+
outlineColor: h
|
|
59
60
|
},
|
|
60
61
|
"&[data-disabled]": {
|
|
61
62
|
cursor: "not-allowed",
|
|
62
|
-
backgroundColor:
|
|
63
|
-
...
|
|
63
|
+
backgroundColor: g,
|
|
64
|
+
...i.borderColor("transparent")
|
|
64
65
|
},
|
|
65
|
-
"&[data-
|
|
66
|
-
backgroundColor:
|
|
67
|
-
color:
|
|
66
|
+
"&[data-checked]": {
|
|
67
|
+
backgroundColor: w,
|
|
68
|
+
color: f
|
|
68
69
|
},
|
|
69
|
-
"&[data-
|
|
70
|
-
backgroundColor:
|
|
70
|
+
"&[data-checked][data-disabled]": {
|
|
71
|
+
backgroundColor: g
|
|
71
72
|
},
|
|
72
73
|
"&[aria-invalid='true'], &[data-invalid]": {
|
|
73
|
-
backgroundColor: y,
|
|
74
|
-
...t.borderColor(j),
|
|
75
|
-
outlineColor: p
|
|
76
|
-
},
|
|
77
|
-
"&[data-state='checked'][aria-invalid='true'], &[data-state='checked'][data-invalid]": {
|
|
78
74
|
backgroundColor: R,
|
|
79
|
-
...
|
|
75
|
+
...i.borderColor(E),
|
|
76
|
+
outlineColor: h
|
|
77
|
+
},
|
|
78
|
+
"&[data-checked][aria-invalid='true'], &[data-checked][data-invalid]": {
|
|
79
|
+
backgroundColor: v,
|
|
80
|
+
...i.borderColor("transparent")
|
|
80
81
|
}
|
|
81
82
|
},
|
|
82
83
|
indicator: {
|
|
83
|
-
...
|
|
84
|
+
...m,
|
|
84
85
|
position: "relative",
|
|
85
86
|
display: "flex",
|
|
86
87
|
alignItems: "center",
|
|
@@ -89,8 +90,8 @@ const N = d.forwardRef(
|
|
|
89
90
|
height: "100%"
|
|
90
91
|
},
|
|
91
92
|
icon: {
|
|
92
|
-
...
|
|
93
|
-
color:
|
|
93
|
+
...m,
|
|
94
|
+
color: f,
|
|
94
95
|
position: "absolute",
|
|
95
96
|
top: "50%",
|
|
96
97
|
left: "50%",
|
|
@@ -99,45 +100,55 @@ const N = d.forwardRef(
|
|
|
99
100
|
transform: "translate(-50%, -50%)",
|
|
100
101
|
pointerEvents: "none"
|
|
101
102
|
}
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
103
|
+
});
|
|
104
|
+
function N(a) {
|
|
105
|
+
const o = n.Children.toArray(a).filter(n.isValidElement);
|
|
106
|
+
return o.length === 1 ? o[0] : void 0;
|
|
107
|
+
}
|
|
108
|
+
const F = n.forwardRef(
|
|
109
|
+
function({ className: o, asChild: e, children: d, ...u }, c) {
|
|
110
|
+
const s = C(), r = e ? N(d) : void 0;
|
|
111
|
+
return /* @__PURE__ */ t(
|
|
112
|
+
j,
|
|
113
|
+
{
|
|
114
|
+
ref: c,
|
|
115
|
+
"data-slot": "radio-group",
|
|
116
|
+
[l]: "radio-group",
|
|
117
|
+
className: b(s.group, o),
|
|
118
|
+
...u,
|
|
119
|
+
...r ? { render: r } : { children: d }
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
), L = /* @__PURE__ */ t("button", { type: "button" }), P = n.forwardRef(function({ className: o, children: e, asChild: d, checked: u, ...c }, s) {
|
|
124
|
+
const r = C();
|
|
125
|
+
return /* @__PURE__ */ x(
|
|
126
|
+
p.Root,
|
|
118
127
|
{
|
|
119
|
-
ref:
|
|
128
|
+
ref: s,
|
|
129
|
+
nativeButton: !0,
|
|
130
|
+
render: L,
|
|
120
131
|
"data-slot": "radio-group-item",
|
|
121
|
-
[
|
|
122
|
-
className:
|
|
123
|
-
...
|
|
132
|
+
[l]: "radio-group-item",
|
|
133
|
+
className: b(r.item, o),
|
|
134
|
+
...c,
|
|
124
135
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
|
|
136
|
+
/* @__PURE__ */ t(
|
|
137
|
+
p.Indicator,
|
|
127
138
|
{
|
|
128
139
|
"data-slot": "radio-group-indicator",
|
|
129
|
-
[
|
|
130
|
-
className:
|
|
131
|
-
children: /* @__PURE__ */
|
|
140
|
+
[l]: "radio-group-indicator",
|
|
141
|
+
className: r.indicator,
|
|
142
|
+
children: /* @__PURE__ */ t(G, { className: r.icon })
|
|
132
143
|
}
|
|
133
144
|
),
|
|
134
|
-
|
|
145
|
+
e
|
|
135
146
|
]
|
|
136
147
|
}
|
|
137
148
|
);
|
|
138
149
|
});
|
|
139
150
|
export {
|
|
140
|
-
|
|
141
|
-
|
|
151
|
+
F as RadioGroup,
|
|
152
|
+
P as RadioGroupItem
|
|
142
153
|
};
|
|
143
154
|
//# sourceMappingURL=radio.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.js","sources":["../../../src/components/radio/radio.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport { boxModel, nativeControl } from \"../../styles/host-reset\"\nimport * as tokens from \"../../tokens\"\n\nconst CircleIcon = React.forwardRef<SVGSVGElement, React.ComponentProps<\"svg\">>(\n function CircleIcon(props, ref) {\n return (\n <svg\n ref={ref}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n {...props}\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n </svg>\n )\n }\n)\n\nconst useStyles = makeZenithStyles({\n group: {\n display: \"grid\",\n ...shorthands.gap(tokens.spacingElement3),\n },\n item: {\n ...nativeControl,\n boxSizing: \"border-box\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"relative\",\n aspectRatio: \"1 / 1\",\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n borderRadius: \"9999px\",\n ...shorthands.border(\"1px\", \"solid\", tokens.accentA7),\n backgroundColor: tokens.accentSoft,\n color: tokens.accentOnSoft,\n // Tailwind `shadow-xs` — literal per CONVENTIONS B7\n boxShadow: \"0 1px 2px 0 #0000000d\",\n transitionProperty: \"color, box-shadow\",\n transitionDuration: \"150ms\",\n transitionTimingFunction: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n \"@media (prefers-reduced-motion: reduce)\": {\n transitionDuration: \"0.01ms\",\n },\n \":focus-visible\": {\n outlineOffset: \"2px\",\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineColor: tokens.focusRing,\n },\n \"&[data-disabled]\": {\n cursor: \"not-allowed\",\n backgroundColor: tokens.grayA3,\n ...shorthands.borderColor(\"transparent\"),\n },\n \"&[data-state='checked']\": {\n backgroundColor: tokens.accentSolid,\n color: tokens.accentContrast,\n },\n \"&[data-state='checked'][data-disabled]\": {\n backgroundColor: tokens.grayA3,\n },\n \"&[aria-invalid='true'], &[data-invalid]\": {\n backgroundColor: tokens.errorSoft,\n ...shorthands.borderColor(tokens.errorA8),\n outlineColor: tokens.focusRing,\n },\n \"&[data-state='checked'][aria-invalid='true'], &[data-state='checked'][data-invalid]\":\n {\n backgroundColor: tokens.errorA10,\n ...shorthands.borderColor(\"transparent\"),\n },\n },\n indicator: {\n ...boxModel,\n position: \"relative\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"100%\",\n height: \"100%\",\n },\n icon: {\n ...boxModel,\n color: tokens.accentContrast,\n position: \"absolute\",\n top: \"50%\",\n left: \"50%\",\n width: \"0.5rem\",\n height: \"0.5rem\",\n transform: \"translate(-50%, -50%)\",\n pointerEvents: \"none\",\n },\n})\n\nexport type RadioGroupProps = React.ComponentProps<\n typeof RadioGroupPrimitive.Root\n>\n\nexport const RadioGroup = React.forwardRef<\n React.ComponentRef<typeof RadioGroupPrimitive.Root>,\n RadioGroupProps\n>(function RadioGroup({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <RadioGroupPrimitive.Root\n ref={ref}\n data-slot=\"radio-group\"\n {...{ [SLOT_ATTR]: \"radio-group\" }}\n className={mergeClasses(styles.group, className)}\n {...props}\n />\n )\n})\n\nexport type RadioGroupItemProps = React.ComponentProps<\n typeof RadioGroupPrimitive.Item\n>\n\nexport const RadioGroupItem = React.forwardRef<\n React.ComponentRef<typeof RadioGroupPrimitive.Item>,\n RadioGroupItemProps\n>(function RadioGroupItem({ className, children, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n data-slot=\"radio-group-item\"\n {...{ [SLOT_ATTR]: \"radio-group-item\" }}\n className={mergeClasses(styles.item, className)}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n {...{ [SLOT_ATTR]: \"radio-group-indicator\" }}\n className={styles.indicator}\n >\n <CircleIcon className={styles.icon} />\n </RadioGroupPrimitive.Indicator>\n {children}\n </RadioGroupPrimitive.Item>\n )\n})\n"],"names":["CircleIcon","React","props","ref","jsx","useStyles","makeZenithStyles","shorthands","tokens.spacingElement3","nativeControl","tokens.accentA7","tokens.accentSoft","tokens.accentOnSoft","tokens.focusRing","tokens.grayA3","tokens.accentSolid","tokens.accentContrast","tokens.errorSoft","tokens.errorA8","tokens.errorA10","boxModel","RadioGroup","className","styles","RadioGroupPrimitive.Root","SLOT_ATTR","mergeClasses","RadioGroupItem","children","jsxs","RadioGroupPrimitive.Item","RadioGroupPrimitive.Indicator"],"mappings":";;;;;;;AASA,MAAMA,IAAaC,EAAM;AAAA,EACvB,SAAoBC,GAAOC,GAAK;AAC9B,WACE,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAD;AAAA,QACA,OAAM;AAAA,QACN,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,QAAO;AAAA,QACP,aAAY;AAAA,QACZ,eAAc;AAAA,QACd,gBAAe;AAAA,QACd,GAAGD;AAAA,QAEJ,4BAAC,UAAA,EAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAA,CAAK;AAAA,MAAA;AAAA,IAAA;AAAA,EAGrC;AACF,GAEMG,IAAYC,EAAiB;AAAA,EACjC,OAAO;AAAA,IACL,SAAS;AAAA,IACT,GAAGC,EAAW,IAAIC,CAAsB;AAAA,EAAA;AAAA,EAE1C,MAAM;AAAA,IACJ,GAAGC;AAAA,IACH,WAAW;AAAA,IACX,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,UAAU;AAAA,IACV,aAAa;AAAA,IACb,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,GAAGF,EAAW,OAAO,OAAO,SAASG,CAAe;AAAA,IACpD,iBAAiBC;AAAAA,IACjB,OAAOC;AAAAA;AAAAA,IAEP,WAAW;AAAA,IACX,oBAAoB;AAAA,IACpB,oBAAoB;AAAA,IACpB,0BAA0B;AAAA,IAC1B,2CAA2C;AAAA,MACzC,oBAAoB;AAAA,IAAA;AAAA,IAEtB,kBAAkB;AAAA,MAChB,eAAe;AAAA,MACf,cAAc;AAAA,MACd,cAAc;AAAA,MACd,cAAcC;AAAAA,IAAO;AAAA,IAEvB,oBAAoB;AAAA,MAClB,QAAQ;AAAA,MACR,iBAAiBC;AAAAA,MACjB,GAAGP,EAAW,YAAY,aAAa;AAAA,IAAA;AAAA,IAEzC,2BAA2B;AAAA,MACzB,iBAAiBQ;AAAAA,MACjB,OAAOC;AAAAA,IAAO;AAAA,IAEhB,0CAA0C;AAAA,MACxC,iBAAiBF;AAAAA,IAAO;AAAA,IAE1B,2CAA2C;AAAA,MACzC,iBAAiBG;AAAAA,MACjB,GAAGV,EAAW,YAAYW,CAAc;AAAA,MACxC,cAAcL;AAAAA,IAAO;AAAA,IAEvB,uFACE;AAAA,MACE,iBAAiBM;AAAAA,MACjB,GAAGZ,EAAW,YAAY,aAAa;AAAA,IAAA;AAAA,EACzC;AAAA,EAEJ,WAAW;AAAA,IACT,GAAGa;AAAA,IACH,UAAU;AAAA,IACV,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,OAAO;AAAA,IACP,QAAQ;AAAA,EAAA;AAAA,EAEV,MAAM;AAAA,IACJ,GAAGA;AAAA,IACH,OAAOJ;AAAAA,IACP,UAAU;AAAA,IACV,KAAK;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,eAAe;AAAA,EAAA;AAEnB,CAAC,GAMYK,IAAapB,EAAM,WAG9B,SAAoB,EAAE,WAAAqB,GAAW,GAAGpB,EAAA,GAASC,GAAK;AAClD,QAAMoB,IAASlB,EAAA;AAEf,SACE,gBAAAD;AAAA,IAACoB;AAAAA,IAAA;AAAA,MACC,KAAArB;AAAA,MACA,aAAU;AAAA,MACJ,CAACsB,CAAS,GAAG;AAAA,MACnB,WAAWC,EAAaH,EAAO,OAAOD,CAAS;AAAA,MAC9C,GAAGpB;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC,GAMYyB,IAAiB1B,EAAM,WAGlC,SAAwB,EAAE,WAAAqB,GAAW,UAAAM,GAAU,GAAG1B,EAAA,GAASC,GAAK;AAChE,QAAMoB,IAASlB,EAAA;AAEf,SACE,gBAAAwB;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,KAAA3B;AAAA,MACA,aAAU;AAAA,MACJ,CAACsB,CAAS,GAAG;AAAA,MACnB,WAAWC,EAAaH,EAAO,MAAMD,CAAS;AAAA,MAC7C,GAAGpB;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAE;AAAA,UAAC2B;AAAAA,UAAA;AAAA,YACC,aAAU;AAAA,YACJ,CAACN,CAAS,GAAG;AAAA,YACnB,WAAWF,EAAO;AAAA,YAElB,UAAA,gBAAAnB,EAACJ,GAAA,EAAW,WAAWuB,EAAO,KAAA,CAAM;AAAA,UAAA;AAAA,QAAA;AAAA,QAErCK;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
1
|
+
{"version":3,"file":"radio.js","sources":["../../../src/components/radio/radio.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Radio } from \"@base-ui/react/radio\"\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport { boxModel, nativeControl } from \"../../styles/host-reset\"\nimport * as tokens from \"../../tokens\"\nimport {\n RadioGroupBase,\n type RadioGroupBaseProps,\n type RadioGroupOrientation,\n} from \"./radio-group-base\"\n\nconst CircleIcon = React.forwardRef<SVGSVGElement, React.ComponentProps<\"svg\">>(\n function CircleIcon(props, ref) {\n return (\n <svg\n ref={ref}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n {...props}\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n </svg>\n )\n }\n)\n\nconst useStyles = makeZenithStyles({\n group: {\n display: \"grid\",\n ...shorthands.gap(tokens.spacingElement3),\n },\n item: {\n ...nativeControl,\n boxSizing: \"border-box\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"relative\",\n aspectRatio: \"1 / 1\",\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n borderRadius: \"9999px\",\n ...shorthands.border(\"1px\", \"solid\", tokens.accentA7),\n backgroundColor: tokens.accentSoft,\n color: tokens.accentOnSoft,\n // Tailwind `shadow-xs` — literal per CONVENTIONS B7\n boxShadow: \"0 1px 2px 0 #0000000d\",\n transitionProperty: \"color, box-shadow\",\n transitionDuration: \"150ms\",\n transitionTimingFunction: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n \"@media (prefers-reduced-motion: reduce)\": {\n transitionDuration: \"0.01ms\",\n },\n \":focus-visible\": {\n outlineOffset: \"2px\",\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineColor: tokens.focusRing,\n },\n \"&[data-disabled]\": {\n cursor: \"not-allowed\",\n backgroundColor: tokens.grayA3,\n ...shorthands.borderColor(\"transparent\"),\n },\n \"&[data-checked]\": {\n backgroundColor: tokens.accentSolid,\n color: tokens.accentContrast,\n },\n \"&[data-checked][data-disabled]\": {\n backgroundColor: tokens.grayA3,\n },\n \"&[aria-invalid='true'], &[data-invalid]\": {\n backgroundColor: tokens.errorSoft,\n ...shorthands.borderColor(tokens.errorA8),\n outlineColor: tokens.focusRing,\n },\n \"&[data-checked][aria-invalid='true'], &[data-checked][data-invalid]\": {\n backgroundColor: tokens.errorA10,\n ...shorthands.borderColor(\"transparent\"),\n },\n },\n indicator: {\n ...boxModel,\n position: \"relative\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"100%\",\n height: \"100%\",\n },\n icon: {\n ...boxModel,\n color: tokens.accentContrast,\n position: \"absolute\",\n top: \"50%\",\n left: \"50%\",\n width: \"0.5rem\",\n height: \"0.5rem\",\n transform: \"translate(-50%, -50%)\",\n pointerEvents: \"none\",\n },\n})\n\n/**\n * What `onValueChange` receives as its second argument: Base UI's change details, declared in\n * Zenith so that none of Base UI's internals reach the published declarations, where TypeScript 4\n * cannot parse them.\n */\nexport type RadioGroupChangeDetails = {\n /** Why the value changed. Base UI reports every radio group change as `none`. */\n reason: \"none\"\n /** The native event behind the change. */\n event: Event\n /** Keeps the group's current value. */\n cancel: () => void\n /** Lets the event propagate where the group would otherwise stop it. */\n allowPropagation: () => void\n isCanceled: boolean\n isPropagationAllowed: boolean\n /** The element that caused the change, if any. */\n trigger: Element | undefined\n}\n\ntype RadioGroupRootProps = {\n /**\n * The controlled value of the radio item that should be currently selected.\n *\n * To render an uncontrolled radio group, use the `defaultValue` prop instead.\n */\n value?: string | null | undefined\n /** The value of the radio item that should be initially selected. */\n defaultValue?: string | undefined\n /** Event handler called when the value changes. */\n onValueChange?:\n ((value: string, eventDetails: RadioGroupChangeDetails) => void) | undefined\n /** Whether the component should ignore user interaction. */\n disabled?: boolean | undefined\n /** Whether the user must choose a value before submitting a form. */\n required?: boolean | undefined\n /** Identifies the field when a form is submitted. */\n name?: string | undefined\n /**\n * The axis the arrow keys move along. When set, only that axis' keys move between the options\n * (Up and Down for `vertical`) and it is restated as `aria-orientation`. Unset, all four work.\n */\n orientation?: RadioGroupOrientation | undefined\n /** The reading direction, which decides what Left and Right mean. */\n dir?: \"ltr\" | \"rtl\" | undefined\n /** Whether the arrow keys wrap from the last option to the first and back. Defaults to `true`. */\n loop?: boolean | undefined\n /** Renders the single child element as the group, merging the group's props and behaviour onto it. */\n asChild?: boolean | undefined\n}\n\nexport type RadioGroupProps = Omit<\n React.ComponentPropsWithRef<\"div\">,\n keyof RadioGroupRootProps\n> &\n RadioGroupRootProps\n\n// A single child can arrive wrapped in a one-element array depending on the JSX runtime, which\n// Radix's Slot normalised.\nfunction onlySlotChild(children: React.ReactNode) {\n const elements = React.Children.toArray(children).filter(React.isValidElement)\n return elements.length === 1 ? elements[0] : undefined\n}\n\nexport const RadioGroup = React.forwardRef<HTMLDivElement, RadioGroupProps>(\n function RadioGroup({ className, asChild, children, ...props }, ref) {\n const styles = useStyles()\n const child = asChild ? onlySlotChild(children) : undefined\n\n return (\n <RadioGroupBase\n ref={ref}\n data-slot=\"radio-group\"\n {...{ [SLOT_ATTR]: \"radio-group\" }}\n className={mergeClasses(styles.group, className)}\n // Base UI types the group's handlers for its <div>, which is the element rendered; the\n // caller's div-typed handlers receive exactly the events they declare.\n {...(props as RadioGroupBaseProps)}\n {...(child ? { render: child } : { children })}\n />\n )\n }\n)\n\ntype RadioGroupItemOwnProps = {\n /** The value this item submits and selects the group with. */\n value: string\n /** Whether the item should ignore user interaction. */\n disabled?: boolean | undefined\n /** Whether the user must choose this item before submitting a form. */\n required?: boolean | undefined\n /**\n * @deprecated Has no effect. The group decides which item is checked, as it did on Radix, which\n * ignored this prop.\n */\n checked?: boolean | undefined\n /**\n * @deprecated Has no effect. The indicator is the item's only child, so on Radix this rendered\n * the indicator as the item rather than an element of yours. Remove it.\n */\n asChild?: boolean | undefined\n}\n\n// `name` belongs to the group, which submits it, so it is not an item prop, as on Radix.\nexport type RadioGroupItemProps = Omit<\n React.ComponentPropsWithRef<\"button\">,\n keyof RadioGroupItemOwnProps | \"name\"\n> &\n RadioGroupItemOwnProps\n\n// Base UI renders a <span> by default and moves the caller's id onto its hidden input. A native\n// button keeps the id, the HTMLButtonElement ref, native disabled and <label for> as Radix had them.\nconst ITEM_ELEMENT = <button type=\"button\" />\n\nexport const RadioGroupItem = React.forwardRef<\n HTMLButtonElement,\n RadioGroupItemProps\n>(function RadioGroupItem(\n { className, children, asChild: _asChild, checked: _checked, ...props },\n ref\n) {\n const styles = useStyles()\n\n return (\n <Radio.Root\n ref={ref}\n nativeButton\n render={ITEM_ELEMENT}\n data-slot=\"radio-group-item\"\n {...{ [SLOT_ATTR]: \"radio-group-item\" }}\n className={mergeClasses(styles.item, className)}\n // Base UI types the item's handlers for its default <span>; the element is the button above.\n {...(props as Radio.Root.Props<string>)}\n >\n <Radio.Indicator\n data-slot=\"radio-group-indicator\"\n {...{ [SLOT_ATTR]: \"radio-group-indicator\" }}\n className={styles.indicator}\n >\n <CircleIcon className={styles.icon} />\n </Radio.Indicator>\n {children}\n </Radio.Root>\n )\n})\n"],"names":["CircleIcon","React","props","ref","jsx","useStyles","makeZenithStyles","shorthands","tokens.spacingElement3","nativeControl","tokens.accentA7","tokens.accentSoft","tokens.accentOnSoft","tokens.focusRing","tokens.grayA3","tokens.accentSolid","tokens.accentContrast","tokens.errorSoft","tokens.errorA8","tokens.errorA10","boxModel","onlySlotChild","children","elements","RadioGroup","className","asChild","styles","child","RadioGroupBase","SLOT_ATTR","mergeClasses","ITEM_ELEMENT","RadioGroupItem","_asChild","_checked","jsxs","Radio"],"mappings":"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"}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o, jsxs as O } from "react/jsx-runtime";
|
|
2
2
|
import * as e from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
3
|
+
import { CSPProvider as D } from "../../_virtual/_zenith-runtime-family_csp-provider.js";
|
|
4
|
+
import { DirectionProvider as L } from "../../_virtual/_zenith-runtime-family_direction-provider.js";
|
|
5
|
+
import { ScrollArea as m } from "../../_virtual/_zenith-runtime-family_scroll-area.js";
|
|
6
|
+
import { mergeClasses as x, SLOT_ATTR as a, shorthands as g } from "@epilot/zenith-runtime/v1";
|
|
7
|
+
import { makeZenithStyles as M } from "../../styles/make-styles.js";
|
|
8
|
+
import { boxModel as _ } from "../../styles/host-reset.js";
|
|
9
|
+
import { grayA9 as q, grayA11 as I, grayA10 as X, focusRing as Y } from "../../tokens/index.js";
|
|
10
|
+
import { useScrollbarStyles as Z } from "./scrollbar-styles.js";
|
|
11
|
+
const N = e.createContext(null), V = M({
|
|
10
12
|
root: {
|
|
11
|
-
...
|
|
13
|
+
..._,
|
|
12
14
|
position: "relative",
|
|
13
15
|
minWidth: 0,
|
|
14
16
|
minHeight: 0,
|
|
15
|
-
...
|
|
16
|
-
[`&[data-revealed='true'] > [${
|
|
17
|
+
...g.overflow("hidden"),
|
|
18
|
+
[`&[data-revealed='true'] > [${a}='scroll-area-scrollbar']`]: {
|
|
17
19
|
opacity: 1,
|
|
18
20
|
pointerEvents: "auto"
|
|
19
21
|
},
|
|
20
22
|
"@media (forced-colors: active)": {
|
|
21
|
-
[`& > [${
|
|
23
|
+
[`& > [${a}='scroll-area-scrollbar']`]: {
|
|
22
24
|
opacity: 1,
|
|
23
25
|
pointerEvents: "auto",
|
|
24
26
|
backgroundColor: "Canvas"
|
|
@@ -32,171 +34,203 @@ const E = e.createContext(null), z = I({
|
|
|
32
34
|
minHeight: 0,
|
|
33
35
|
boxSizing: "border-box",
|
|
34
36
|
borderRadius: "inherit",
|
|
37
|
+
// The tracks replace the native scrollbars. Zenith's stylesheet hides them, so no inline
|
|
38
|
+
// <style> needs a nonce (Radix's took the viewport's).
|
|
39
|
+
scrollbarWidth: "none",
|
|
40
|
+
"::-webkit-scrollbar": { display: "none" },
|
|
35
41
|
":focus-visible": {
|
|
36
42
|
outlineWidth: "3px",
|
|
37
43
|
outlineStyle: "solid",
|
|
38
|
-
outlineColor:
|
|
44
|
+
outlineColor: Y,
|
|
39
45
|
outlineOffset: "-3px"
|
|
40
46
|
}
|
|
41
47
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
48
|
+
// The content wrapper keeps Radix's display:table, which grows to the content's width...
|
|
49
|
+
content: { display: "table" },
|
|
50
|
+
// ...except in a vertical area, where that would expand long lines past the viewport.
|
|
51
|
+
verticalContent: { display: "block" },
|
|
47
52
|
reserveVertical: { paddingInlineEnd: "12px" },
|
|
48
53
|
reserveHorizontal: { paddingBottom: "12px" },
|
|
49
54
|
track: {
|
|
50
55
|
boxSizing: "border-box",
|
|
51
|
-
...R.padding("3px"),
|
|
52
56
|
backgroundColor: "transparent",
|
|
53
57
|
opacity: 0,
|
|
54
58
|
pointerEvents: "none",
|
|
55
59
|
transitionProperty: "opacity",
|
|
56
60
|
transitionDuration: "120ms",
|
|
57
61
|
"@media (prefers-reduced-motion: reduce)": { transitionDuration: "0s" },
|
|
58
|
-
[`&:hover > [${
|
|
59
|
-
backgroundColor:
|
|
62
|
+
[`&:hover > [${a}='scroll-area-thumb']`]: {
|
|
63
|
+
backgroundColor: X
|
|
60
64
|
},
|
|
61
|
-
[`&:active > [${
|
|
62
|
-
backgroundColor:
|
|
65
|
+
[`&:active > [${a}='scroll-area-thumb']`]: {
|
|
66
|
+
backgroundColor: I
|
|
63
67
|
},
|
|
64
68
|
"@media (forced-colors: active)": {
|
|
65
|
-
[`& > [${
|
|
69
|
+
[`& > [${a}='scroll-area-thumb']`]: {
|
|
66
70
|
backgroundColor: "ButtonText",
|
|
67
71
|
forcedColorAdjust: "none"
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
74
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
thumb
|
|
74
|
-
//
|
|
75
|
+
// The 3px inset along the scroll axis is margin, not padding. With both tracks shown, Base UI
|
|
76
|
+
// 1.7.0 sizes the thumb from the track's offsetHeight/offsetWidth without subtracting its padding,
|
|
77
|
+
// which lengthened the thumb by the padding's share; a margin shrinks the track box instead, so
|
|
78
|
+
// the thumb keeps Radix's length on every orientation.
|
|
79
|
+
vertical: {
|
|
80
|
+
width: "12px",
|
|
81
|
+
...g.padding("0", "3px"),
|
|
82
|
+
...g.margin("3px", "0")
|
|
83
|
+
},
|
|
84
|
+
horizontal: {
|
|
85
|
+
height: "12px",
|
|
86
|
+
flexDirection: "column",
|
|
87
|
+
...g.padding("3px", "0"),
|
|
88
|
+
...g.margin("0", "3px")
|
|
89
|
+
},
|
|
90
|
+
thumb: { backgroundColor: q },
|
|
91
|
+
// Base UI owns thumb length (including its 16px minimum) and uses it in drag math.
|
|
75
92
|
// A CSS-only minimum overrides the paint but not that math, overshooting the track.
|
|
76
93
|
corner: { backgroundColor: "transparent", pointerEvents: "none" }
|
|
77
|
-
}),
|
|
94
|
+
}), er = e.forwardRef(
|
|
78
95
|
function({
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
96
|
+
dir: y = "ltr",
|
|
97
|
+
orientation: l = "vertical",
|
|
98
|
+
visibility: p = "interaction",
|
|
99
|
+
className: S,
|
|
100
|
+
children: k,
|
|
101
|
+
onPointerEnter: f,
|
|
102
|
+
onPointerLeave: h,
|
|
103
|
+
onFocusCapture: s,
|
|
104
|
+
onBlurCapture: t,
|
|
105
|
+
...i
|
|
106
|
+
}, n) {
|
|
107
|
+
const b = V(), C = Z(), A = e.useRef(null), R = e.useRef(
|
|
90
108
|
void 0
|
|
91
|
-
),
|
|
109
|
+
), c = e.useRef({
|
|
92
110
|
hover: !1,
|
|
93
111
|
focus: !1,
|
|
94
112
|
drag: !1
|
|
95
|
-
}), [
|
|
96
|
-
clearTimeout(
|
|
97
|
-
}, []),
|
|
98
|
-
|
|
99
|
-
}, [
|
|
100
|
-
|
|
101
|
-
}, [
|
|
102
|
-
|
|
103
|
-
}, [
|
|
113
|
+
}), [W, T] = e.useState(!1), u = e.useCallback(() => {
|
|
114
|
+
clearTimeout(R.current);
|
|
115
|
+
}, []), v = e.useCallback(() => {
|
|
116
|
+
u(), T(!0);
|
|
117
|
+
}, [u]), d = e.useCallback(() => {
|
|
118
|
+
u(), Object.values(c.current).some(Boolean) || (R.current = setTimeout(() => T(!1), 600));
|
|
119
|
+
}, [u]), E = e.useCallback(() => {
|
|
120
|
+
v(), d();
|
|
121
|
+
}, [v, d]);
|
|
104
122
|
e.useEffect(() => {
|
|
105
|
-
var
|
|
106
|
-
const r = (
|
|
107
|
-
|
|
123
|
+
var z;
|
|
124
|
+
const r = (z = A.current) == null ? void 0 : z.ownerDocument, w = () => {
|
|
125
|
+
c.current.drag && (c.current.drag = !1, d());
|
|
108
126
|
};
|
|
109
|
-
return r == null || r.addEventListener("pointerup",
|
|
110
|
-
|
|
127
|
+
return r == null || r.addEventListener("pointerup", w, !0), r == null || r.addEventListener("pointercancel", w, !0), () => {
|
|
128
|
+
u(), r == null || r.removeEventListener("pointerup", w, !0), r == null || r.removeEventListener("pointercancel", w, !0);
|
|
111
129
|
};
|
|
112
|
-
}, [
|
|
113
|
-
const
|
|
114
|
-
() => ({ orientation:
|
|
115
|
-
[
|
|
116
|
-
),
|
|
117
|
-
return /* @__PURE__ */
|
|
118
|
-
|
|
130
|
+
}, [u, d]);
|
|
131
|
+
const j = e.useMemo(
|
|
132
|
+
() => ({ orientation: l, onScroll: E }),
|
|
133
|
+
[l, E]
|
|
134
|
+
), H = l === "both" ? ["vertical", "horizontal"] : [l];
|
|
135
|
+
return /* @__PURE__ */ o(N.Provider, { value: j, children: /* @__PURE__ */ o(L, { direction: y, children: /* @__PURE__ */ o(D, { disableStyleElements: !0, children: /* @__PURE__ */ o(
|
|
136
|
+
m.Root,
|
|
119
137
|
{
|
|
120
|
-
...
|
|
121
|
-
|
|
138
|
+
...i,
|
|
139
|
+
dir: y,
|
|
122
140
|
ref: (r) => {
|
|
123
|
-
|
|
141
|
+
A.current = r, typeof n == "function" ? n(r) : n && (n.current = r);
|
|
124
142
|
},
|
|
125
143
|
"data-slot": "scroll-area",
|
|
126
|
-
[
|
|
127
|
-
"data-orientation":
|
|
128
|
-
"data-revealed":
|
|
129
|
-
className:
|
|
144
|
+
[a]: "scroll-area",
|
|
145
|
+
"data-orientation": l,
|
|
146
|
+
"data-revealed": p === "always" || W,
|
|
147
|
+
className: x(b.root, S),
|
|
130
148
|
onPointerEnter: (r) => {
|
|
131
|
-
r.pointerType !== "touch" && (
|
|
149
|
+
r.pointerType !== "touch" && (c.current.hover = !0, v()), f == null || f(r);
|
|
132
150
|
},
|
|
133
151
|
onPointerLeave: (r) => {
|
|
134
|
-
|
|
152
|
+
c.current.hover = !1, d(), h == null || h(r);
|
|
135
153
|
},
|
|
136
154
|
onFocusCapture: (r) => {
|
|
137
|
-
|
|
155
|
+
c.current.focus = !0, v(), s == null || s(r);
|
|
138
156
|
},
|
|
139
157
|
onBlurCapture: (r) => {
|
|
140
|
-
r.currentTarget.contains(r.relatedTarget) || (
|
|
158
|
+
r.currentTarget.contains(r.relatedTarget) || (c.current.focus = !1, d()), t == null || t(r);
|
|
141
159
|
},
|
|
142
|
-
children: [
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
160
|
+
children: /* @__PURE__ */ O(D, { children: [
|
|
161
|
+
k,
|
|
162
|
+
H.map((r) => /* @__PURE__ */ o(
|
|
163
|
+
m.Scrollbar,
|
|
146
164
|
{
|
|
147
165
|
orientation: r,
|
|
148
166
|
"data-slot": "scroll-area-scrollbar",
|
|
149
|
-
[
|
|
150
|
-
className:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
167
|
+
[a]: "scroll-area-scrollbar",
|
|
168
|
+
className: x(
|
|
169
|
+
C.track,
|
|
170
|
+
b.track,
|
|
171
|
+
b[r]
|
|
154
172
|
),
|
|
155
173
|
onPointerDown: () => {
|
|
156
|
-
|
|
174
|
+
c.current.drag = !0, v();
|
|
157
175
|
},
|
|
158
|
-
children: /* @__PURE__ */
|
|
159
|
-
|
|
176
|
+
children: /* @__PURE__ */ o(
|
|
177
|
+
m.Thumb,
|
|
160
178
|
{
|
|
161
179
|
"data-slot": "scroll-area-thumb",
|
|
162
|
-
[
|
|
163
|
-
className:
|
|
180
|
+
[a]: "scroll-area-thumb",
|
|
181
|
+
className: x(C.thumb, b.thumb)
|
|
164
182
|
}
|
|
165
183
|
)
|
|
166
184
|
},
|
|
167
185
|
r
|
|
168
186
|
)),
|
|
169
|
-
|
|
170
|
-
]
|
|
187
|
+
l === "both" && /* @__PURE__ */ o(m.Corner, { className: b.corner })
|
|
188
|
+
] })
|
|
171
189
|
}
|
|
172
|
-
) });
|
|
190
|
+
) }) }) });
|
|
173
191
|
}
|
|
174
|
-
),
|
|
175
|
-
const
|
|
176
|
-
if (!
|
|
192
|
+
), tr = e.forwardRef(function({ className: y, style: l, onScroll: p, children: S, nonce: k, ...f }, h) {
|
|
193
|
+
const s = e.useContext(N), t = V();
|
|
194
|
+
if (!s)
|
|
177
195
|
throw new Error("ScrollAreaViewport requires a ScrollArea parent");
|
|
178
|
-
|
|
179
|
-
|
|
196
|
+
const { orientation: i } = s;
|
|
197
|
+
return /* @__PURE__ */ o(
|
|
198
|
+
m.Viewport,
|
|
180
199
|
{
|
|
181
|
-
...
|
|
182
|
-
ref:
|
|
200
|
+
...f,
|
|
201
|
+
ref: h,
|
|
183
202
|
"data-slot": "scroll-area-viewport",
|
|
184
|
-
[
|
|
185
|
-
className:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
a
|
|
203
|
+
[a]: "scroll-area-viewport",
|
|
204
|
+
className: x(
|
|
205
|
+
t.viewport,
|
|
206
|
+
i !== "horizontal" && t.reserveVertical,
|
|
207
|
+
i !== "vertical" && t.reserveHorizontal,
|
|
208
|
+
y
|
|
191
209
|
),
|
|
210
|
+
style: {
|
|
211
|
+
overflowX: i === "vertical" ? "hidden" : "scroll",
|
|
212
|
+
overflowY: i === "horizontal" ? "hidden" : "scroll",
|
|
213
|
+
...l
|
|
214
|
+
},
|
|
192
215
|
onScroll: (n) => {
|
|
193
|
-
n.target === n.currentTarget && (
|
|
194
|
-
}
|
|
216
|
+
n.target === n.currentTarget && (s.onScroll(), p == null || p(n));
|
|
217
|
+
},
|
|
218
|
+
children: /* @__PURE__ */ o(
|
|
219
|
+
m.Content,
|
|
220
|
+
{
|
|
221
|
+
className: x(
|
|
222
|
+
t.content,
|
|
223
|
+
i === "vertical" && t.verticalContent
|
|
224
|
+
),
|
|
225
|
+
style: { minWidth: "100%" },
|
|
226
|
+
children: S
|
|
227
|
+
}
|
|
228
|
+
)
|
|
195
229
|
}
|
|
196
230
|
);
|
|
197
231
|
});
|
|
198
232
|
export {
|
|
199
|
-
|
|
200
|
-
|
|
233
|
+
er as ScrollArea,
|
|
234
|
+
tr as ScrollAreaViewport
|
|
201
235
|
};
|
|
202
236
|
//# sourceMappingURL=scroll-area.js.map
|