@automa8e/ui 0.2.0
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/LICENSE +21 -0
- package/README.md +2 -0
- package/dist/_virtual/index.js +6 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index2.js +5 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/automa8e-ui.css +226 -0
- package/dist/components/automation/metric-card.d.ts +19 -0
- package/dist/components/automation/metric-card.d.ts.map +1 -0
- package/dist/components/automation/metric-card.js +59 -0
- package/dist/components/automation/metric-card.js.map +1 -0
- package/dist/components/automation/status-badge.d.ts +27 -0
- package/dist/components/automation/status-badge.d.ts.map +1 -0
- package/dist/components/automation/status-badge.js +112 -0
- package/dist/components/automation/status-badge.js.map +1 -0
- package/dist/components/automation/task-card.d.ts +14 -0
- package/dist/components/automation/task-card.d.ts.map +1 -0
- package/dist/components/automation/task-card.js +114 -0
- package/dist/components/automation/task-card.js.map +1 -0
- package/dist/components/automation/workflow-node.d.ts +20 -0
- package/dist/components/automation/workflow-node.d.ts.map +1 -0
- package/dist/components/automation/workflow-node.js +132 -0
- package/dist/components/automation/workflow-node.js.map +1 -0
- package/dist/components/layout/app-shell.d.ts +21 -0
- package/dist/components/layout/app-shell.d.ts.map +1 -0
- package/dist/components/layout/app-shell.js +35 -0
- package/dist/components/layout/app-shell.js.map +1 -0
- package/dist/components/layout/header.d.ts +16 -0
- package/dist/components/layout/header.d.ts.map +1 -0
- package/dist/components/layout/header.js +30 -0
- package/dist/components/layout/header.js.map +1 -0
- package/dist/components/layout/page-header.d.ts +16 -0
- package/dist/components/layout/page-header.d.ts.map +1 -0
- package/dist/components/layout/page-header.js +29 -0
- package/dist/components/layout/page-header.js.map +1 -0
- package/dist/components/layout/sidebar.d.ts +35 -0
- package/dist/components/layout/sidebar.d.ts.map +1 -0
- package/dist/components/layout/sidebar.js +103 -0
- package/dist/components/layout/sidebar.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +51 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert.d.ts +18 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +89 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +20 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +72 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +13 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +54 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/button.d.ts +15 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +96 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/card.d.ts +16 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +96 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +9 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +29 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +28 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +105 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +29 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +160 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/input.d.ts +14 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +60 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.d.ts +13 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +26 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +29 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +17 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +80 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +39 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +131 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +9 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +50 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +10 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +30 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +14 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +44 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +8 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +43 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +95 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +20 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +92 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +12 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +41 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.d.ts +16 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +113 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +28 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/hooks/use-debounce.d.ts +15 -0
- package/dist/hooks/use-debounce.d.ts.map +1 -0
- package/dist/hooks/use-debounce.js +15 -0
- package/dist/hooks/use-debounce.js.map +1 -0
- package/dist/hooks/use-local-storage.d.ts +9 -0
- package/dist/hooks/use-local-storage.d.ts.map +1 -0
- package/dist/hooks/use-local-storage.js +49 -0
- package/dist/hooks/use-local-storage.js.map +1 -0
- package/dist/hooks/use-media-query.d.ts +9 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +20 -0
- package/dist/hooks/use-media-query.js.map +1 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +153 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/colors.d.ts +73 -0
- package/dist/lib/colors.d.ts.map +1 -0
- package/dist/lib/colors.js +64 -0
- package/dist/lib/colors.js.map +1 -0
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +729 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +630 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +325 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +177 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +152 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +12 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +319 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +26 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +124 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js +66 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +280 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +152 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +71 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +82 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +342 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +217 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +299 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +30 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +209 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-label/dist/index.js +27 -0
- package/dist/node_modules/@radix-ui/react-label/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +881 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +314 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +294 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +19 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +44 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-progress/dist/index.js +97 -0
- package/dist/node_modules/@radix-ui/react-progress/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.js +66 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +228 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +728 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +1200 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-separator/dist/index.js +31 -0
- package/dist/node_modules/@radix-ui/react-separator/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +107 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +156 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +195 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-toast/dist/index.js +645 -0
- package/dist/node_modules/@radix-ui/react-toast/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +501 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +72 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +18 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +37 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +123 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/class-variance-authority/dist/index.js +46 -0
- package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +10 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +43 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +25 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ban.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ban.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/calendar.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/calendar.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-minus.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-minus.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-x.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-x.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/clock.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/clock.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/flag.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/flag.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-branch.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-branch.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minus.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minus.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/pause.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/pause.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/play.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/play.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/send.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/send.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tag.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tag.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/timer.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/timer.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-down.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-down.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/zap.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/zap.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +12 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +181 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +20 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +103 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +48 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +11 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +38 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +14 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +17 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +49 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2467 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.js +40 -0
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +12 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +36 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +30 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +22 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +89 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +78 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +63 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +18 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -0
- package/dist/types/automation.d.ts +59 -0
- package/dist/types/automation.d.ts.map +1 -0
- package/dist/types/common.d.ts +38 -0
- package/dist/types/common.d.ts.map +1 -0
- package/package.json +119 -0
- package/registry/registry.json +218 -0
- package/src/components/automation/metric-card.tsx +113 -0
- package/src/components/automation/status-badge.tsx +136 -0
- package/src/components/automation/task-card.tsx +164 -0
- package/src/components/automation/workflow-node.tsx +186 -0
- package/src/components/layout/app-shell.tsx +58 -0
- package/src/components/layout/header.tsx +39 -0
- package/src/components/layout/page-header.tsx +42 -0
- package/src/components/layout/sidebar.tsx +190 -0
- package/src/components/ui/accordion.tsx +57 -0
- package/src/components/ui/alert.tsx +93 -0
- package/src/components/ui/avatar.tsx +94 -0
- package/src/components/ui/badge.tsx +69 -0
- package/src/components/ui/button.tsx +106 -0
- package/src/components/ui/card.tsx +96 -0
- package/src/components/ui/checkbox.tsx +40 -0
- package/src/components/ui/dialog.tsx +129 -0
- package/src/components/ui/dropdown-menu.tsx +194 -0
- package/src/components/ui/input.tsx +80 -0
- package/src/components/ui/label.tsx +37 -0
- package/src/components/ui/popover.tsx +29 -0
- package/src/components/ui/progress.tsx +92 -0
- package/src/components/ui/scroll-area.tsx +43 -0
- package/src/components/ui/select.tsx +157 -0
- package/src/components/ui/separator.tsx +56 -0
- package/src/components/ui/skeleton.tsx +41 -0
- package/src/components/ui/spinner.tsx +50 -0
- package/src/components/ui/switch.tsx +46 -0
- package/src/components/ui/table.tsx +117 -0
- package/src/components/ui/tabs.tsx +107 -0
- package/src/components/ui/textarea.tsx +50 -0
- package/src/components/ui/toast.tsx +139 -0
- package/src/components/ui/tooltip.tsx +28 -0
- package/src/hooks/use-debounce.ts +28 -0
- package/src/hooks/use-local-storage.ts +63 -0
- package/src/hooks/use-media-query.ts +29 -0
- package/src/index.ts +197 -0
- package/src/lib/colors.ts +102 -0
- package/src/lib/utils.ts +10 -0
- package/src/styles/globals.css +230 -0
- package/src/types/automation.ts +74 -0
- package/src/types/common.ts +48 -0
- package/tailwind/preset.cjs +98 -0
- package/tailwind/preset.css +5 -0
- package/tailwind/preset.ts +159 -0
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ReactDOM from "react-dom";
|
|
3
|
+
import { composeEventHandlers } from "../../primitive/dist/index.js";
|
|
4
|
+
import { useComposedRefs } from "../../react-compose-refs/dist/index.js";
|
|
5
|
+
import { createCollection } from "../../react-collection/dist/index.js";
|
|
6
|
+
import { createContextScope } from "../../react-context/dist/index.js";
|
|
7
|
+
import { Branch, Root } from "../../react-dismissable-layer/dist/index.js";
|
|
8
|
+
import { Portal } from "../../react-portal/dist/index.js";
|
|
9
|
+
import { Presence } from "../../react-presence/dist/index.js";
|
|
10
|
+
import { Primitive, dispatchDiscreteCustomEvent } from "../../react-primitive/dist/index.js";
|
|
11
|
+
import { useCallbackRef } from "../../react-use-callback-ref/dist/index.js";
|
|
12
|
+
import { useControllableState } from "../../react-use-controllable-state/dist/index.js";
|
|
13
|
+
import { useLayoutEffect as useLayoutEffect2 } from "../../react-use-layout-effect/dist/index.js";
|
|
14
|
+
import { VisuallyHidden } from "../../react-visually-hidden/dist/index.js";
|
|
15
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
16
|
+
var PROVIDER_NAME = "ToastProvider";
|
|
17
|
+
var [Collection, useCollection, createCollectionScope] = createCollection("Toast");
|
|
18
|
+
var [createToastContext] = createContextScope("Toast", [createCollectionScope]);
|
|
19
|
+
var [ToastProviderProvider, useToastProviderContext] = createToastContext(PROVIDER_NAME);
|
|
20
|
+
var ToastProvider = (props) => {
|
|
21
|
+
const {
|
|
22
|
+
__scopeToast,
|
|
23
|
+
label = "Notification",
|
|
24
|
+
duration = 5e3,
|
|
25
|
+
swipeDirection = "right",
|
|
26
|
+
swipeThreshold = 50,
|
|
27
|
+
children
|
|
28
|
+
} = props;
|
|
29
|
+
const [viewport, setViewport] = React.useState(null);
|
|
30
|
+
const [toastCount, setToastCount] = React.useState(0);
|
|
31
|
+
const isFocusedToastEscapeKeyDownRef = React.useRef(false);
|
|
32
|
+
const isClosePausedRef = React.useRef(false);
|
|
33
|
+
if (!label.trim()) {
|
|
34
|
+
console.error(
|
|
35
|
+
`Invalid prop \`label\` supplied to \`${PROVIDER_NAME}\`. Expected non-empty \`string\`.`
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
return /* @__PURE__ */ jsx(Collection.Provider, { scope: __scopeToast, children: /* @__PURE__ */ jsx(
|
|
39
|
+
ToastProviderProvider,
|
|
40
|
+
{
|
|
41
|
+
scope: __scopeToast,
|
|
42
|
+
label,
|
|
43
|
+
duration,
|
|
44
|
+
swipeDirection,
|
|
45
|
+
swipeThreshold,
|
|
46
|
+
toastCount,
|
|
47
|
+
viewport,
|
|
48
|
+
onViewportChange: setViewport,
|
|
49
|
+
onToastAdd: React.useCallback(() => setToastCount((prevCount) => prevCount + 1), []),
|
|
50
|
+
onToastRemove: React.useCallback(() => setToastCount((prevCount) => prevCount - 1), []),
|
|
51
|
+
isFocusedToastEscapeKeyDownRef,
|
|
52
|
+
isClosePausedRef,
|
|
53
|
+
children
|
|
54
|
+
}
|
|
55
|
+
) });
|
|
56
|
+
};
|
|
57
|
+
ToastProvider.displayName = PROVIDER_NAME;
|
|
58
|
+
var VIEWPORT_NAME = "ToastViewport";
|
|
59
|
+
var VIEWPORT_DEFAULT_HOTKEY = ["F8"];
|
|
60
|
+
var VIEWPORT_PAUSE = "toast.viewportPause";
|
|
61
|
+
var VIEWPORT_RESUME = "toast.viewportResume";
|
|
62
|
+
var ToastViewport = React.forwardRef(
|
|
63
|
+
(props, forwardedRef) => {
|
|
64
|
+
const {
|
|
65
|
+
__scopeToast,
|
|
66
|
+
hotkey = VIEWPORT_DEFAULT_HOTKEY,
|
|
67
|
+
label = "Notifications ({hotkey})",
|
|
68
|
+
...viewportProps
|
|
69
|
+
} = props;
|
|
70
|
+
const context = useToastProviderContext(VIEWPORT_NAME, __scopeToast);
|
|
71
|
+
const getItems = useCollection(__scopeToast);
|
|
72
|
+
const wrapperRef = React.useRef(null);
|
|
73
|
+
const headFocusProxyRef = React.useRef(null);
|
|
74
|
+
const tailFocusProxyRef = React.useRef(null);
|
|
75
|
+
const ref = React.useRef(null);
|
|
76
|
+
const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
|
|
77
|
+
const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
|
|
78
|
+
const hasToasts = context.toastCount > 0;
|
|
79
|
+
React.useEffect(() => {
|
|
80
|
+
const handleKeyDown = (event) => {
|
|
81
|
+
var _a;
|
|
82
|
+
const isHotkeyPressed = hotkey.length !== 0 && hotkey.every((key) => event[key] || event.code === key);
|
|
83
|
+
if (isHotkeyPressed) (_a = ref.current) == null ? void 0 : _a.focus();
|
|
84
|
+
};
|
|
85
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
86
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
87
|
+
}, [hotkey]);
|
|
88
|
+
React.useEffect(() => {
|
|
89
|
+
const wrapper = wrapperRef.current;
|
|
90
|
+
const viewport = ref.current;
|
|
91
|
+
if (hasToasts && wrapper && viewport) {
|
|
92
|
+
const handlePause = () => {
|
|
93
|
+
if (!context.isClosePausedRef.current) {
|
|
94
|
+
const pauseEvent = new CustomEvent(VIEWPORT_PAUSE);
|
|
95
|
+
viewport.dispatchEvent(pauseEvent);
|
|
96
|
+
context.isClosePausedRef.current = true;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const handleResume = () => {
|
|
100
|
+
if (context.isClosePausedRef.current) {
|
|
101
|
+
const resumeEvent = new CustomEvent(VIEWPORT_RESUME);
|
|
102
|
+
viewport.dispatchEvent(resumeEvent);
|
|
103
|
+
context.isClosePausedRef.current = false;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
const handleFocusOutResume = (event) => {
|
|
107
|
+
const isFocusMovingOutside = !wrapper.contains(event.relatedTarget);
|
|
108
|
+
if (isFocusMovingOutside) handleResume();
|
|
109
|
+
};
|
|
110
|
+
const handlePointerLeaveResume = () => {
|
|
111
|
+
const isFocusInside = wrapper.contains(document.activeElement);
|
|
112
|
+
if (!isFocusInside) handleResume();
|
|
113
|
+
};
|
|
114
|
+
wrapper.addEventListener("focusin", handlePause);
|
|
115
|
+
wrapper.addEventListener("focusout", handleFocusOutResume);
|
|
116
|
+
wrapper.addEventListener("pointermove", handlePause);
|
|
117
|
+
wrapper.addEventListener("pointerleave", handlePointerLeaveResume);
|
|
118
|
+
window.addEventListener("blur", handlePause);
|
|
119
|
+
window.addEventListener("focus", handleResume);
|
|
120
|
+
return () => {
|
|
121
|
+
wrapper.removeEventListener("focusin", handlePause);
|
|
122
|
+
wrapper.removeEventListener("focusout", handleFocusOutResume);
|
|
123
|
+
wrapper.removeEventListener("pointermove", handlePause);
|
|
124
|
+
wrapper.removeEventListener("pointerleave", handlePointerLeaveResume);
|
|
125
|
+
window.removeEventListener("blur", handlePause);
|
|
126
|
+
window.removeEventListener("focus", handleResume);
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
}, [hasToasts, context.isClosePausedRef]);
|
|
130
|
+
const getSortedTabbableCandidates = React.useCallback(
|
|
131
|
+
({ tabbingDirection }) => {
|
|
132
|
+
const toastItems = getItems();
|
|
133
|
+
const tabbableCandidates = toastItems.map((toastItem) => {
|
|
134
|
+
const toastNode = toastItem.ref.current;
|
|
135
|
+
const toastTabbableCandidates = [toastNode, ...getTabbableCandidates(toastNode)];
|
|
136
|
+
return tabbingDirection === "forwards" ? toastTabbableCandidates : toastTabbableCandidates.reverse();
|
|
137
|
+
});
|
|
138
|
+
return (tabbingDirection === "forwards" ? tabbableCandidates.reverse() : tabbableCandidates).flat();
|
|
139
|
+
},
|
|
140
|
+
[getItems]
|
|
141
|
+
);
|
|
142
|
+
React.useEffect(() => {
|
|
143
|
+
const viewport = ref.current;
|
|
144
|
+
if (viewport) {
|
|
145
|
+
const handleKeyDown = (event) => {
|
|
146
|
+
var _a, _b, _c;
|
|
147
|
+
const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
|
|
148
|
+
const isTabKey = event.key === "Tab" && !isMetaKey;
|
|
149
|
+
if (isTabKey) {
|
|
150
|
+
const focusedElement = document.activeElement;
|
|
151
|
+
const isTabbingBackwards = event.shiftKey;
|
|
152
|
+
const targetIsViewport = event.target === viewport;
|
|
153
|
+
if (targetIsViewport && isTabbingBackwards) {
|
|
154
|
+
(_a = headFocusProxyRef.current) == null ? void 0 : _a.focus();
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const tabbingDirection = isTabbingBackwards ? "backwards" : "forwards";
|
|
158
|
+
const sortedCandidates = getSortedTabbableCandidates({ tabbingDirection });
|
|
159
|
+
const index = sortedCandidates.findIndex((candidate) => candidate === focusedElement);
|
|
160
|
+
if (focusFirst(sortedCandidates.slice(index + 1))) {
|
|
161
|
+
event.preventDefault();
|
|
162
|
+
} else {
|
|
163
|
+
isTabbingBackwards ? (_b = headFocusProxyRef.current) == null ? void 0 : _b.focus() : (_c = tailFocusProxyRef.current) == null ? void 0 : _c.focus();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
viewport.addEventListener("keydown", handleKeyDown);
|
|
168
|
+
return () => viewport.removeEventListener("keydown", handleKeyDown);
|
|
169
|
+
}
|
|
170
|
+
}, [getItems, getSortedTabbableCandidates]);
|
|
171
|
+
return /* @__PURE__ */ jsxs(
|
|
172
|
+
Branch,
|
|
173
|
+
{
|
|
174
|
+
ref: wrapperRef,
|
|
175
|
+
role: "region",
|
|
176
|
+
"aria-label": label.replace("{hotkey}", hotkeyLabel),
|
|
177
|
+
tabIndex: -1,
|
|
178
|
+
style: { pointerEvents: hasToasts ? void 0 : "none" },
|
|
179
|
+
children: [
|
|
180
|
+
hasToasts && /* @__PURE__ */ jsx(
|
|
181
|
+
FocusProxy,
|
|
182
|
+
{
|
|
183
|
+
ref: headFocusProxyRef,
|
|
184
|
+
onFocusFromOutsideViewport: () => {
|
|
185
|
+
const tabbableCandidates = getSortedTabbableCandidates({
|
|
186
|
+
tabbingDirection: "forwards"
|
|
187
|
+
});
|
|
188
|
+
focusFirst(tabbableCandidates);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
),
|
|
192
|
+
/* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeToast, children: /* @__PURE__ */ jsx(Primitive.ol, { tabIndex: -1, ...viewportProps, ref: composedRefs }) }),
|
|
193
|
+
hasToasts && /* @__PURE__ */ jsx(
|
|
194
|
+
FocusProxy,
|
|
195
|
+
{
|
|
196
|
+
ref: tailFocusProxyRef,
|
|
197
|
+
onFocusFromOutsideViewport: () => {
|
|
198
|
+
const tabbableCandidates = getSortedTabbableCandidates({
|
|
199
|
+
tabbingDirection: "backwards"
|
|
200
|
+
});
|
|
201
|
+
focusFirst(tabbableCandidates);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
)
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
ToastViewport.displayName = VIEWPORT_NAME;
|
|
211
|
+
var FOCUS_PROXY_NAME = "ToastFocusProxy";
|
|
212
|
+
var FocusProxy = React.forwardRef(
|
|
213
|
+
(props, forwardedRef) => {
|
|
214
|
+
const { __scopeToast, onFocusFromOutsideViewport, ...proxyProps } = props;
|
|
215
|
+
const context = useToastProviderContext(FOCUS_PROXY_NAME, __scopeToast);
|
|
216
|
+
return /* @__PURE__ */ jsx(
|
|
217
|
+
VisuallyHidden,
|
|
218
|
+
{
|
|
219
|
+
tabIndex: 0,
|
|
220
|
+
...proxyProps,
|
|
221
|
+
ref: forwardedRef,
|
|
222
|
+
style: { position: "fixed" },
|
|
223
|
+
onFocus: (event) => {
|
|
224
|
+
var _a;
|
|
225
|
+
const prevFocusedElement = event.relatedTarget;
|
|
226
|
+
const isFocusFromOutsideViewport = !((_a = context.viewport) == null ? void 0 : _a.contains(prevFocusedElement));
|
|
227
|
+
if (isFocusFromOutsideViewport) onFocusFromOutsideViewport();
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
FocusProxy.displayName = FOCUS_PROXY_NAME;
|
|
234
|
+
var TOAST_NAME = "Toast";
|
|
235
|
+
var TOAST_SWIPE_START = "toast.swipeStart";
|
|
236
|
+
var TOAST_SWIPE_MOVE = "toast.swipeMove";
|
|
237
|
+
var TOAST_SWIPE_CANCEL = "toast.swipeCancel";
|
|
238
|
+
var TOAST_SWIPE_END = "toast.swipeEnd";
|
|
239
|
+
var Toast = React.forwardRef(
|
|
240
|
+
(props, forwardedRef) => {
|
|
241
|
+
const { forceMount, open: openProp, defaultOpen, onOpenChange, ...toastProps } = props;
|
|
242
|
+
const [open, setOpen] = useControllableState({
|
|
243
|
+
prop: openProp,
|
|
244
|
+
defaultProp: defaultOpen ?? true,
|
|
245
|
+
onChange: onOpenChange,
|
|
246
|
+
caller: TOAST_NAME
|
|
247
|
+
});
|
|
248
|
+
return /* @__PURE__ */ jsx(Presence, { present: forceMount || open, children: /* @__PURE__ */ jsx(
|
|
249
|
+
ToastImpl,
|
|
250
|
+
{
|
|
251
|
+
open,
|
|
252
|
+
...toastProps,
|
|
253
|
+
ref: forwardedRef,
|
|
254
|
+
onClose: () => setOpen(false),
|
|
255
|
+
onPause: useCallbackRef(props.onPause),
|
|
256
|
+
onResume: useCallbackRef(props.onResume),
|
|
257
|
+
onSwipeStart: composeEventHandlers(props.onSwipeStart, (event) => {
|
|
258
|
+
event.currentTarget.setAttribute("data-swipe", "start");
|
|
259
|
+
}),
|
|
260
|
+
onSwipeMove: composeEventHandlers(props.onSwipeMove, (event) => {
|
|
261
|
+
const { x, y } = event.detail.delta;
|
|
262
|
+
event.currentTarget.setAttribute("data-swipe", "move");
|
|
263
|
+
event.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${x}px`);
|
|
264
|
+
event.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${y}px`);
|
|
265
|
+
}),
|
|
266
|
+
onSwipeCancel: composeEventHandlers(props.onSwipeCancel, (event) => {
|
|
267
|
+
event.currentTarget.setAttribute("data-swipe", "cancel");
|
|
268
|
+
event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x");
|
|
269
|
+
event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y");
|
|
270
|
+
event.currentTarget.style.removeProperty("--radix-toast-swipe-end-x");
|
|
271
|
+
event.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
|
|
272
|
+
}),
|
|
273
|
+
onSwipeEnd: composeEventHandlers(props.onSwipeEnd, (event) => {
|
|
274
|
+
const { x, y } = event.detail.delta;
|
|
275
|
+
event.currentTarget.setAttribute("data-swipe", "end");
|
|
276
|
+
event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x");
|
|
277
|
+
event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y");
|
|
278
|
+
event.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${x}px`);
|
|
279
|
+
event.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${y}px`);
|
|
280
|
+
setOpen(false);
|
|
281
|
+
})
|
|
282
|
+
}
|
|
283
|
+
) });
|
|
284
|
+
}
|
|
285
|
+
);
|
|
286
|
+
Toast.displayName = TOAST_NAME;
|
|
287
|
+
var [ToastInteractiveProvider, useToastInteractiveContext] = createToastContext(TOAST_NAME, {
|
|
288
|
+
onClose() {
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
var ToastImpl = React.forwardRef(
|
|
292
|
+
(props, forwardedRef) => {
|
|
293
|
+
const {
|
|
294
|
+
__scopeToast,
|
|
295
|
+
type = "foreground",
|
|
296
|
+
duration: durationProp,
|
|
297
|
+
open,
|
|
298
|
+
onClose,
|
|
299
|
+
onEscapeKeyDown,
|
|
300
|
+
onPause,
|
|
301
|
+
onResume,
|
|
302
|
+
onSwipeStart,
|
|
303
|
+
onSwipeMove,
|
|
304
|
+
onSwipeCancel,
|
|
305
|
+
onSwipeEnd,
|
|
306
|
+
...toastProps
|
|
307
|
+
} = props;
|
|
308
|
+
const context = useToastProviderContext(TOAST_NAME, __scopeToast);
|
|
309
|
+
const [node, setNode] = React.useState(null);
|
|
310
|
+
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
311
|
+
const pointerStartRef = React.useRef(null);
|
|
312
|
+
const swipeDeltaRef = React.useRef(null);
|
|
313
|
+
const duration = durationProp || context.duration;
|
|
314
|
+
const closeTimerStartTimeRef = React.useRef(0);
|
|
315
|
+
const closeTimerRemainingTimeRef = React.useRef(duration);
|
|
316
|
+
const closeTimerRef = React.useRef(0);
|
|
317
|
+
const { onToastAdd, onToastRemove } = context;
|
|
318
|
+
const handleClose = useCallbackRef(() => {
|
|
319
|
+
var _a;
|
|
320
|
+
const isFocusInToast = node == null ? void 0 : node.contains(document.activeElement);
|
|
321
|
+
if (isFocusInToast) (_a = context.viewport) == null ? void 0 : _a.focus();
|
|
322
|
+
onClose();
|
|
323
|
+
});
|
|
324
|
+
const startTimer = React.useCallback(
|
|
325
|
+
(duration2) => {
|
|
326
|
+
if (!duration2 || duration2 === Infinity) return;
|
|
327
|
+
window.clearTimeout(closeTimerRef.current);
|
|
328
|
+
closeTimerStartTimeRef.current = (/* @__PURE__ */ new Date()).getTime();
|
|
329
|
+
closeTimerRef.current = window.setTimeout(handleClose, duration2);
|
|
330
|
+
},
|
|
331
|
+
[handleClose]
|
|
332
|
+
);
|
|
333
|
+
React.useEffect(() => {
|
|
334
|
+
const viewport = context.viewport;
|
|
335
|
+
if (viewport) {
|
|
336
|
+
const handleResume = () => {
|
|
337
|
+
startTimer(closeTimerRemainingTimeRef.current);
|
|
338
|
+
onResume == null ? void 0 : onResume();
|
|
339
|
+
};
|
|
340
|
+
const handlePause = () => {
|
|
341
|
+
const elapsedTime = (/* @__PURE__ */ new Date()).getTime() - closeTimerStartTimeRef.current;
|
|
342
|
+
closeTimerRemainingTimeRef.current = closeTimerRemainingTimeRef.current - elapsedTime;
|
|
343
|
+
window.clearTimeout(closeTimerRef.current);
|
|
344
|
+
onPause == null ? void 0 : onPause();
|
|
345
|
+
};
|
|
346
|
+
viewport.addEventListener(VIEWPORT_PAUSE, handlePause);
|
|
347
|
+
viewport.addEventListener(VIEWPORT_RESUME, handleResume);
|
|
348
|
+
return () => {
|
|
349
|
+
viewport.removeEventListener(VIEWPORT_PAUSE, handlePause);
|
|
350
|
+
viewport.removeEventListener(VIEWPORT_RESUME, handleResume);
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
}, [context.viewport, duration, onPause, onResume, startTimer]);
|
|
354
|
+
React.useEffect(() => {
|
|
355
|
+
if (open && !context.isClosePausedRef.current) startTimer(duration);
|
|
356
|
+
}, [open, duration, context.isClosePausedRef, startTimer]);
|
|
357
|
+
React.useEffect(() => {
|
|
358
|
+
onToastAdd();
|
|
359
|
+
return () => onToastRemove();
|
|
360
|
+
}, [onToastAdd, onToastRemove]);
|
|
361
|
+
const announceTextContent = React.useMemo(() => {
|
|
362
|
+
return node ? getAnnounceTextContent(node) : null;
|
|
363
|
+
}, [node]);
|
|
364
|
+
if (!context.viewport) return null;
|
|
365
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
366
|
+
announceTextContent && /* @__PURE__ */ jsx(
|
|
367
|
+
ToastAnnounce,
|
|
368
|
+
{
|
|
369
|
+
__scopeToast,
|
|
370
|
+
role: "status",
|
|
371
|
+
"aria-live": type === "foreground" ? "assertive" : "polite",
|
|
372
|
+
children: announceTextContent
|
|
373
|
+
}
|
|
374
|
+
),
|
|
375
|
+
/* @__PURE__ */ jsx(ToastInteractiveProvider, { scope: __scopeToast, onClose: handleClose, children: ReactDOM.createPortal(
|
|
376
|
+
/* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeToast, children: /* @__PURE__ */ jsx(
|
|
377
|
+
Root,
|
|
378
|
+
{
|
|
379
|
+
asChild: true,
|
|
380
|
+
onEscapeKeyDown: composeEventHandlers(onEscapeKeyDown, () => {
|
|
381
|
+
if (!context.isFocusedToastEscapeKeyDownRef.current) handleClose();
|
|
382
|
+
context.isFocusedToastEscapeKeyDownRef.current = false;
|
|
383
|
+
}),
|
|
384
|
+
children: /* @__PURE__ */ jsx(
|
|
385
|
+
Primitive.li,
|
|
386
|
+
{
|
|
387
|
+
tabIndex: 0,
|
|
388
|
+
"data-state": open ? "open" : "closed",
|
|
389
|
+
"data-swipe-direction": context.swipeDirection,
|
|
390
|
+
...toastProps,
|
|
391
|
+
ref: composedRefs,
|
|
392
|
+
style: { userSelect: "none", touchAction: "none", ...props.style },
|
|
393
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
394
|
+
if (event.key !== "Escape") return;
|
|
395
|
+
onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(event.nativeEvent);
|
|
396
|
+
if (!event.nativeEvent.defaultPrevented) {
|
|
397
|
+
context.isFocusedToastEscapeKeyDownRef.current = true;
|
|
398
|
+
handleClose();
|
|
399
|
+
}
|
|
400
|
+
}),
|
|
401
|
+
onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
|
|
402
|
+
if (event.button !== 0) return;
|
|
403
|
+
pointerStartRef.current = { x: event.clientX, y: event.clientY };
|
|
404
|
+
}),
|
|
405
|
+
onPointerMove: composeEventHandlers(props.onPointerMove, (event) => {
|
|
406
|
+
if (!pointerStartRef.current) return;
|
|
407
|
+
const x = event.clientX - pointerStartRef.current.x;
|
|
408
|
+
const y = event.clientY - pointerStartRef.current.y;
|
|
409
|
+
const hasSwipeMoveStarted = Boolean(swipeDeltaRef.current);
|
|
410
|
+
const isHorizontalSwipe = ["left", "right"].includes(context.swipeDirection);
|
|
411
|
+
const clamp = ["left", "up"].includes(context.swipeDirection) ? Math.min : Math.max;
|
|
412
|
+
const clampedX = isHorizontalSwipe ? clamp(0, x) : 0;
|
|
413
|
+
const clampedY = !isHorizontalSwipe ? clamp(0, y) : 0;
|
|
414
|
+
const moveStartBuffer = event.pointerType === "touch" ? 10 : 2;
|
|
415
|
+
const delta = { x: clampedX, y: clampedY };
|
|
416
|
+
const eventDetail = { originalEvent: event, delta };
|
|
417
|
+
if (hasSwipeMoveStarted) {
|
|
418
|
+
swipeDeltaRef.current = delta;
|
|
419
|
+
handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE, onSwipeMove, eventDetail, {
|
|
420
|
+
discrete: false
|
|
421
|
+
});
|
|
422
|
+
} else if (isDeltaInDirection(delta, context.swipeDirection, moveStartBuffer)) {
|
|
423
|
+
swipeDeltaRef.current = delta;
|
|
424
|
+
handleAndDispatchCustomEvent(TOAST_SWIPE_START, onSwipeStart, eventDetail, {
|
|
425
|
+
discrete: false
|
|
426
|
+
});
|
|
427
|
+
event.target.setPointerCapture(event.pointerId);
|
|
428
|
+
} else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) {
|
|
429
|
+
pointerStartRef.current = null;
|
|
430
|
+
}
|
|
431
|
+
}),
|
|
432
|
+
onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
|
|
433
|
+
const delta = swipeDeltaRef.current;
|
|
434
|
+
const target = event.target;
|
|
435
|
+
if (target.hasPointerCapture(event.pointerId)) {
|
|
436
|
+
target.releasePointerCapture(event.pointerId);
|
|
437
|
+
}
|
|
438
|
+
swipeDeltaRef.current = null;
|
|
439
|
+
pointerStartRef.current = null;
|
|
440
|
+
if (delta) {
|
|
441
|
+
const toast = event.currentTarget;
|
|
442
|
+
const eventDetail = { originalEvent: event, delta };
|
|
443
|
+
if (isDeltaInDirection(delta, context.swipeDirection, context.swipeThreshold)) {
|
|
444
|
+
handleAndDispatchCustomEvent(TOAST_SWIPE_END, onSwipeEnd, eventDetail, {
|
|
445
|
+
discrete: true
|
|
446
|
+
});
|
|
447
|
+
} else {
|
|
448
|
+
handleAndDispatchCustomEvent(
|
|
449
|
+
TOAST_SWIPE_CANCEL,
|
|
450
|
+
onSwipeCancel,
|
|
451
|
+
eventDetail,
|
|
452
|
+
{
|
|
453
|
+
discrete: true
|
|
454
|
+
}
|
|
455
|
+
);
|
|
456
|
+
}
|
|
457
|
+
toast.addEventListener("click", (event2) => event2.preventDefault(), {
|
|
458
|
+
once: true
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
})
|
|
462
|
+
}
|
|
463
|
+
)
|
|
464
|
+
}
|
|
465
|
+
) }),
|
|
466
|
+
context.viewport
|
|
467
|
+
) })
|
|
468
|
+
] });
|
|
469
|
+
}
|
|
470
|
+
);
|
|
471
|
+
var ToastAnnounce = (props) => {
|
|
472
|
+
const { __scopeToast, children, ...announceProps } = props;
|
|
473
|
+
const context = useToastProviderContext(TOAST_NAME, __scopeToast);
|
|
474
|
+
const [renderAnnounceText, setRenderAnnounceText] = React.useState(false);
|
|
475
|
+
const [isAnnounced, setIsAnnounced] = React.useState(false);
|
|
476
|
+
useNextFrame(() => setRenderAnnounceText(true));
|
|
477
|
+
React.useEffect(() => {
|
|
478
|
+
const timer = window.setTimeout(() => setIsAnnounced(true), 1e3);
|
|
479
|
+
return () => window.clearTimeout(timer);
|
|
480
|
+
}, []);
|
|
481
|
+
return isAnnounced ? null : /* @__PURE__ */ jsx(Portal, { asChild: true, children: /* @__PURE__ */ jsx(VisuallyHidden, { ...announceProps, children: renderAnnounceText && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
482
|
+
context.label,
|
|
483
|
+
" ",
|
|
484
|
+
children
|
|
485
|
+
] }) }) });
|
|
486
|
+
};
|
|
487
|
+
var TITLE_NAME = "ToastTitle";
|
|
488
|
+
var ToastTitle = React.forwardRef(
|
|
489
|
+
(props, forwardedRef) => {
|
|
490
|
+
const { __scopeToast, ...titleProps } = props;
|
|
491
|
+
return /* @__PURE__ */ jsx(Primitive.div, { ...titleProps, ref: forwardedRef });
|
|
492
|
+
}
|
|
493
|
+
);
|
|
494
|
+
ToastTitle.displayName = TITLE_NAME;
|
|
495
|
+
var DESCRIPTION_NAME = "ToastDescription";
|
|
496
|
+
var ToastDescription = React.forwardRef(
|
|
497
|
+
(props, forwardedRef) => {
|
|
498
|
+
const { __scopeToast, ...descriptionProps } = props;
|
|
499
|
+
return /* @__PURE__ */ jsx(Primitive.div, { ...descriptionProps, ref: forwardedRef });
|
|
500
|
+
}
|
|
501
|
+
);
|
|
502
|
+
ToastDescription.displayName = DESCRIPTION_NAME;
|
|
503
|
+
var ACTION_NAME = "ToastAction";
|
|
504
|
+
var ToastAction = React.forwardRef(
|
|
505
|
+
(props, forwardedRef) => {
|
|
506
|
+
const { altText, ...actionProps } = props;
|
|
507
|
+
if (!altText.trim()) {
|
|
508
|
+
console.error(
|
|
509
|
+
`Invalid prop \`altText\` supplied to \`${ACTION_NAME}\`. Expected non-empty \`string\`.`
|
|
510
|
+
);
|
|
511
|
+
return null;
|
|
512
|
+
}
|
|
513
|
+
return /* @__PURE__ */ jsx(ToastAnnounceExclude, { altText, asChild: true, children: /* @__PURE__ */ jsx(ToastClose, { ...actionProps, ref: forwardedRef }) });
|
|
514
|
+
}
|
|
515
|
+
);
|
|
516
|
+
ToastAction.displayName = ACTION_NAME;
|
|
517
|
+
var CLOSE_NAME = "ToastClose";
|
|
518
|
+
var ToastClose = React.forwardRef(
|
|
519
|
+
(props, forwardedRef) => {
|
|
520
|
+
const { __scopeToast, ...closeProps } = props;
|
|
521
|
+
const interactiveContext = useToastInteractiveContext(CLOSE_NAME, __scopeToast);
|
|
522
|
+
return /* @__PURE__ */ jsx(ToastAnnounceExclude, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
523
|
+
Primitive.button,
|
|
524
|
+
{
|
|
525
|
+
type: "button",
|
|
526
|
+
...closeProps,
|
|
527
|
+
ref: forwardedRef,
|
|
528
|
+
onClick: composeEventHandlers(props.onClick, interactiveContext.onClose)
|
|
529
|
+
}
|
|
530
|
+
) });
|
|
531
|
+
}
|
|
532
|
+
);
|
|
533
|
+
ToastClose.displayName = CLOSE_NAME;
|
|
534
|
+
var ToastAnnounceExclude = React.forwardRef((props, forwardedRef) => {
|
|
535
|
+
const { __scopeToast, altText, ...announceExcludeProps } = props;
|
|
536
|
+
return /* @__PURE__ */ jsx(
|
|
537
|
+
Primitive.div,
|
|
538
|
+
{
|
|
539
|
+
"data-radix-toast-announce-exclude": "",
|
|
540
|
+
"data-radix-toast-announce-alt": altText || void 0,
|
|
541
|
+
...announceExcludeProps,
|
|
542
|
+
ref: forwardedRef
|
|
543
|
+
}
|
|
544
|
+
);
|
|
545
|
+
});
|
|
546
|
+
function getAnnounceTextContent(container) {
|
|
547
|
+
const textContent = [];
|
|
548
|
+
const childNodes = Array.from(container.childNodes);
|
|
549
|
+
childNodes.forEach((node) => {
|
|
550
|
+
if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent);
|
|
551
|
+
if (isHTMLElement(node)) {
|
|
552
|
+
const isHidden = node.ariaHidden || node.hidden || node.style.display === "none";
|
|
553
|
+
const isExcluded = node.dataset.radixToastAnnounceExclude === "";
|
|
554
|
+
if (!isHidden) {
|
|
555
|
+
if (isExcluded) {
|
|
556
|
+
const altText = node.dataset.radixToastAnnounceAlt;
|
|
557
|
+
if (altText) textContent.push(altText);
|
|
558
|
+
} else {
|
|
559
|
+
textContent.push(...getAnnounceTextContent(node));
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
return textContent;
|
|
565
|
+
}
|
|
566
|
+
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
567
|
+
const currentTarget = detail.originalEvent.currentTarget;
|
|
568
|
+
const event = new CustomEvent(name, { bubbles: true, cancelable: true, detail });
|
|
569
|
+
if (handler) currentTarget.addEventListener(name, handler, { once: true });
|
|
570
|
+
if (discrete) {
|
|
571
|
+
dispatchDiscreteCustomEvent(currentTarget, event);
|
|
572
|
+
} else {
|
|
573
|
+
currentTarget.dispatchEvent(event);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
var isDeltaInDirection = (delta, direction, threshold = 0) => {
|
|
577
|
+
const deltaX = Math.abs(delta.x);
|
|
578
|
+
const deltaY = Math.abs(delta.y);
|
|
579
|
+
const isDeltaX = deltaX > deltaY;
|
|
580
|
+
if (direction === "left" || direction === "right") {
|
|
581
|
+
return isDeltaX && deltaX > threshold;
|
|
582
|
+
} else {
|
|
583
|
+
return !isDeltaX && deltaY > threshold;
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
function useNextFrame(callback = () => {
|
|
587
|
+
}) {
|
|
588
|
+
const fn = useCallbackRef(callback);
|
|
589
|
+
useLayoutEffect2(() => {
|
|
590
|
+
let raf1 = 0;
|
|
591
|
+
let raf2 = 0;
|
|
592
|
+
raf1 = window.requestAnimationFrame(() => raf2 = window.requestAnimationFrame(fn));
|
|
593
|
+
return () => {
|
|
594
|
+
window.cancelAnimationFrame(raf1);
|
|
595
|
+
window.cancelAnimationFrame(raf2);
|
|
596
|
+
};
|
|
597
|
+
}, [fn]);
|
|
598
|
+
}
|
|
599
|
+
function isHTMLElement(node) {
|
|
600
|
+
return node.nodeType === node.ELEMENT_NODE;
|
|
601
|
+
}
|
|
602
|
+
function getTabbableCandidates(container) {
|
|
603
|
+
const nodes = [];
|
|
604
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
605
|
+
acceptNode: (node) => {
|
|
606
|
+
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
607
|
+
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
608
|
+
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
609
|
+
}
|
|
610
|
+
});
|
|
611
|
+
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
612
|
+
return nodes;
|
|
613
|
+
}
|
|
614
|
+
function focusFirst(candidates) {
|
|
615
|
+
const previouslyFocusedElement = document.activeElement;
|
|
616
|
+
return candidates.some((candidate) => {
|
|
617
|
+
if (candidate === previouslyFocusedElement) return true;
|
|
618
|
+
candidate.focus();
|
|
619
|
+
return document.activeElement !== previouslyFocusedElement;
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
var Provider = ToastProvider;
|
|
623
|
+
var Viewport = ToastViewport;
|
|
624
|
+
var Root2 = Toast;
|
|
625
|
+
var Title = ToastTitle;
|
|
626
|
+
var Description = ToastDescription;
|
|
627
|
+
var Action = ToastAction;
|
|
628
|
+
var Close = ToastClose;
|
|
629
|
+
export {
|
|
630
|
+
Action,
|
|
631
|
+
Close,
|
|
632
|
+
Description,
|
|
633
|
+
Provider,
|
|
634
|
+
Root2 as Root,
|
|
635
|
+
Title,
|
|
636
|
+
Toast,
|
|
637
|
+
ToastAction,
|
|
638
|
+
ToastClose,
|
|
639
|
+
ToastDescription,
|
|
640
|
+
ToastProvider,
|
|
641
|
+
ToastTitle,
|
|
642
|
+
ToastViewport,
|
|
643
|
+
Viewport
|
|
644
|
+
};
|
|
645
|
+
//# sourceMappingURL=index.js.map
|