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