@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,342 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { composeEventHandlers } from "../../primitive/dist/index.js";
|
|
3
|
+
import { useComposedRefs } from "../../react-compose-refs/dist/index.js";
|
|
4
|
+
import { createContextScope, createContext as createContext2 } from "../../react-context/dist/index.js";
|
|
5
|
+
import { useId } from "../../react-id/dist/index.js";
|
|
6
|
+
import { useControllableState } from "../../react-use-controllable-state/dist/index.js";
|
|
7
|
+
import { DismissableLayer } from "../../react-dismissable-layer/dist/index.js";
|
|
8
|
+
import { FocusScope } from "../../react-focus-scope/dist/index.js";
|
|
9
|
+
import { Portal as Portal$1 } from "../../react-portal/dist/index.js";
|
|
10
|
+
import { Presence } from "../../react-presence/dist/index.js";
|
|
11
|
+
import { Primitive } from "../../react-primitive/dist/index.js";
|
|
12
|
+
import { useFocusGuards } from "../../react-focus-guards/dist/index.js";
|
|
13
|
+
import ReactRemoveScroll from "../../../react-remove-scroll/dist/es2015/Combination.js";
|
|
14
|
+
import { hideOthers } from "../../../aria-hidden/dist/es2015/index.js";
|
|
15
|
+
import { createSlot } from "../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
16
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
17
|
+
var DIALOG_NAME = "Dialog";
|
|
18
|
+
var [createDialogContext] = createContextScope(DIALOG_NAME);
|
|
19
|
+
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
20
|
+
var Dialog = (props) => {
|
|
21
|
+
const {
|
|
22
|
+
__scopeDialog,
|
|
23
|
+
children,
|
|
24
|
+
open: openProp,
|
|
25
|
+
defaultOpen,
|
|
26
|
+
onOpenChange,
|
|
27
|
+
modal = true
|
|
28
|
+
} = props;
|
|
29
|
+
const triggerRef = React.useRef(null);
|
|
30
|
+
const contentRef = React.useRef(null);
|
|
31
|
+
const [open, setOpen] = useControllableState({
|
|
32
|
+
prop: openProp,
|
|
33
|
+
defaultProp: defaultOpen ?? false,
|
|
34
|
+
onChange: onOpenChange,
|
|
35
|
+
caller: DIALOG_NAME
|
|
36
|
+
});
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
DialogProvider,
|
|
39
|
+
{
|
|
40
|
+
scope: __scopeDialog,
|
|
41
|
+
triggerRef,
|
|
42
|
+
contentRef,
|
|
43
|
+
contentId: useId(),
|
|
44
|
+
titleId: useId(),
|
|
45
|
+
descriptionId: useId(),
|
|
46
|
+
open,
|
|
47
|
+
onOpenChange: setOpen,
|
|
48
|
+
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
49
|
+
modal,
|
|
50
|
+
children
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
Dialog.displayName = DIALOG_NAME;
|
|
55
|
+
var TRIGGER_NAME = "DialogTrigger";
|
|
56
|
+
var DialogTrigger = React.forwardRef(
|
|
57
|
+
(props, forwardedRef) => {
|
|
58
|
+
const { __scopeDialog, ...triggerProps } = props;
|
|
59
|
+
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
|
60
|
+
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
61
|
+
return /* @__PURE__ */ jsx(
|
|
62
|
+
Primitive.button,
|
|
63
|
+
{
|
|
64
|
+
type: "button",
|
|
65
|
+
"aria-haspopup": "dialog",
|
|
66
|
+
"aria-expanded": context.open,
|
|
67
|
+
"aria-controls": context.contentId,
|
|
68
|
+
"data-state": getState(context.open),
|
|
69
|
+
...triggerProps,
|
|
70
|
+
ref: composedTriggerRef,
|
|
71
|
+
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
DialogTrigger.displayName = TRIGGER_NAME;
|
|
77
|
+
var PORTAL_NAME = "DialogPortal";
|
|
78
|
+
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
|
79
|
+
forceMount: void 0
|
|
80
|
+
});
|
|
81
|
+
var DialogPortal = (props) => {
|
|
82
|
+
const { __scopeDialog, forceMount, children, container } = props;
|
|
83
|
+
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
|
84
|
+
return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$1, { asChild: true, container, children: child }) })) });
|
|
85
|
+
};
|
|
86
|
+
DialogPortal.displayName = PORTAL_NAME;
|
|
87
|
+
var OVERLAY_NAME = "DialogOverlay";
|
|
88
|
+
var DialogOverlay = React.forwardRef(
|
|
89
|
+
(props, forwardedRef) => {
|
|
90
|
+
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
91
|
+
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
92
|
+
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
93
|
+
return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
DialogOverlay.displayName = OVERLAY_NAME;
|
|
97
|
+
var Slot = createSlot("DialogOverlay.RemoveScroll");
|
|
98
|
+
var DialogOverlayImpl = React.forwardRef(
|
|
99
|
+
(props, forwardedRef) => {
|
|
100
|
+
const { __scopeDialog, ...overlayProps } = props;
|
|
101
|
+
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
102
|
+
return (
|
|
103
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
104
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
105
|
+
/* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
|
|
106
|
+
Primitive.div,
|
|
107
|
+
{
|
|
108
|
+
"data-state": getState(context.open),
|
|
109
|
+
...overlayProps,
|
|
110
|
+
ref: forwardedRef,
|
|
111
|
+
style: { pointerEvents: "auto", ...overlayProps.style }
|
|
112
|
+
}
|
|
113
|
+
) })
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
var CONTENT_NAME = "DialogContent";
|
|
118
|
+
var DialogContent = React.forwardRef(
|
|
119
|
+
(props, forwardedRef) => {
|
|
120
|
+
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
|
121
|
+
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
122
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
123
|
+
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
DialogContent.displayName = CONTENT_NAME;
|
|
127
|
+
var DialogContentModal = React.forwardRef(
|
|
128
|
+
(props, forwardedRef) => {
|
|
129
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
130
|
+
const contentRef = React.useRef(null);
|
|
131
|
+
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
132
|
+
React.useEffect(() => {
|
|
133
|
+
const content = contentRef.current;
|
|
134
|
+
if (content) return hideOthers(content);
|
|
135
|
+
}, []);
|
|
136
|
+
return /* @__PURE__ */ jsx(
|
|
137
|
+
DialogContentImpl,
|
|
138
|
+
{
|
|
139
|
+
...props,
|
|
140
|
+
ref: composedRefs,
|
|
141
|
+
trapFocus: context.open,
|
|
142
|
+
disableOutsidePointerEvents: true,
|
|
143
|
+
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
144
|
+
var _a;
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
(_a = context.triggerRef.current) == null ? void 0 : _a.focus();
|
|
147
|
+
}),
|
|
148
|
+
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
|
|
149
|
+
const originalEvent = event.detail.originalEvent;
|
|
150
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
151
|
+
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
152
|
+
if (isRightClick) event.preventDefault();
|
|
153
|
+
}),
|
|
154
|
+
onFocusOutside: composeEventHandlers(
|
|
155
|
+
props.onFocusOutside,
|
|
156
|
+
(event) => event.preventDefault()
|
|
157
|
+
)
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
var DialogContentNonModal = React.forwardRef(
|
|
163
|
+
(props, forwardedRef) => {
|
|
164
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
165
|
+
const hasInteractedOutsideRef = React.useRef(false);
|
|
166
|
+
const hasPointerDownOutsideRef = React.useRef(false);
|
|
167
|
+
return /* @__PURE__ */ jsx(
|
|
168
|
+
DialogContentImpl,
|
|
169
|
+
{
|
|
170
|
+
...props,
|
|
171
|
+
ref: forwardedRef,
|
|
172
|
+
trapFocus: false,
|
|
173
|
+
disableOutsidePointerEvents: false,
|
|
174
|
+
onCloseAutoFocus: (event) => {
|
|
175
|
+
var _a, _b;
|
|
176
|
+
(_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props, event);
|
|
177
|
+
if (!event.defaultPrevented) {
|
|
178
|
+
if (!hasInteractedOutsideRef.current) (_b = context.triggerRef.current) == null ? void 0 : _b.focus();
|
|
179
|
+
event.preventDefault();
|
|
180
|
+
}
|
|
181
|
+
hasInteractedOutsideRef.current = false;
|
|
182
|
+
hasPointerDownOutsideRef.current = false;
|
|
183
|
+
},
|
|
184
|
+
onInteractOutside: (event) => {
|
|
185
|
+
var _a, _b;
|
|
186
|
+
(_a = props.onInteractOutside) == null ? void 0 : _a.call(props, event);
|
|
187
|
+
if (!event.defaultPrevented) {
|
|
188
|
+
hasInteractedOutsideRef.current = true;
|
|
189
|
+
if (event.detail.originalEvent.type === "pointerdown") {
|
|
190
|
+
hasPointerDownOutsideRef.current = true;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
const target = event.target;
|
|
194
|
+
const targetIsTrigger = (_b = context.triggerRef.current) == null ? void 0 : _b.contains(target);
|
|
195
|
+
if (targetIsTrigger) event.preventDefault();
|
|
196
|
+
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
197
|
+
event.preventDefault();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
);
|
|
204
|
+
var DialogContentImpl = React.forwardRef(
|
|
205
|
+
(props, forwardedRef) => {
|
|
206
|
+
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
|
|
207
|
+
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
|
208
|
+
const contentRef = React.useRef(null);
|
|
209
|
+
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
210
|
+
useFocusGuards();
|
|
211
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
212
|
+
/* @__PURE__ */ jsx(
|
|
213
|
+
FocusScope,
|
|
214
|
+
{
|
|
215
|
+
asChild: true,
|
|
216
|
+
loop: true,
|
|
217
|
+
trapped: trapFocus,
|
|
218
|
+
onMountAutoFocus: onOpenAutoFocus,
|
|
219
|
+
onUnmountAutoFocus: onCloseAutoFocus,
|
|
220
|
+
children: /* @__PURE__ */ jsx(
|
|
221
|
+
DismissableLayer,
|
|
222
|
+
{
|
|
223
|
+
role: "dialog",
|
|
224
|
+
id: context.contentId,
|
|
225
|
+
"aria-describedby": context.descriptionId,
|
|
226
|
+
"aria-labelledby": context.titleId,
|
|
227
|
+
"data-state": getState(context.open),
|
|
228
|
+
...contentProps,
|
|
229
|
+
ref: composedRefs,
|
|
230
|
+
onDismiss: () => context.onOpenChange(false)
|
|
231
|
+
}
|
|
232
|
+
)
|
|
233
|
+
}
|
|
234
|
+
),
|
|
235
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
236
|
+
/* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),
|
|
237
|
+
/* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
238
|
+
] })
|
|
239
|
+
] });
|
|
240
|
+
}
|
|
241
|
+
);
|
|
242
|
+
var TITLE_NAME = "DialogTitle";
|
|
243
|
+
var DialogTitle = React.forwardRef(
|
|
244
|
+
(props, forwardedRef) => {
|
|
245
|
+
const { __scopeDialog, ...titleProps } = props;
|
|
246
|
+
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
247
|
+
return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
DialogTitle.displayName = TITLE_NAME;
|
|
251
|
+
var DESCRIPTION_NAME = "DialogDescription";
|
|
252
|
+
var DialogDescription = React.forwardRef(
|
|
253
|
+
(props, forwardedRef) => {
|
|
254
|
+
const { __scopeDialog, ...descriptionProps } = props;
|
|
255
|
+
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
256
|
+
return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
257
|
+
}
|
|
258
|
+
);
|
|
259
|
+
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
260
|
+
var CLOSE_NAME = "DialogClose";
|
|
261
|
+
var DialogClose = React.forwardRef(
|
|
262
|
+
(props, forwardedRef) => {
|
|
263
|
+
const { __scopeDialog, ...closeProps } = props;
|
|
264
|
+
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
265
|
+
return /* @__PURE__ */ jsx(
|
|
266
|
+
Primitive.button,
|
|
267
|
+
{
|
|
268
|
+
type: "button",
|
|
269
|
+
...closeProps,
|
|
270
|
+
ref: forwardedRef,
|
|
271
|
+
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
|
272
|
+
}
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
);
|
|
276
|
+
DialogClose.displayName = CLOSE_NAME;
|
|
277
|
+
function getState(open) {
|
|
278
|
+
return open ? "open" : "closed";
|
|
279
|
+
}
|
|
280
|
+
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
281
|
+
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
282
|
+
contentName: CONTENT_NAME,
|
|
283
|
+
titleName: TITLE_NAME,
|
|
284
|
+
docsSlug: "dialog"
|
|
285
|
+
});
|
|
286
|
+
var TitleWarning = ({ titleId }) => {
|
|
287
|
+
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
288
|
+
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
289
|
+
|
|
290
|
+
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
291
|
+
|
|
292
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
293
|
+
React.useEffect(() => {
|
|
294
|
+
if (titleId) {
|
|
295
|
+
const hasTitle = document.getElementById(titleId);
|
|
296
|
+
if (!hasTitle) console.error(MESSAGE);
|
|
297
|
+
}
|
|
298
|
+
}, [MESSAGE, titleId]);
|
|
299
|
+
return null;
|
|
300
|
+
};
|
|
301
|
+
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
302
|
+
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
303
|
+
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
304
|
+
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
305
|
+
React.useEffect(() => {
|
|
306
|
+
var _a;
|
|
307
|
+
const describedById = (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby");
|
|
308
|
+
if (descriptionId && describedById) {
|
|
309
|
+
const hasDescription = document.getElementById(descriptionId);
|
|
310
|
+
if (!hasDescription) console.warn(MESSAGE);
|
|
311
|
+
}
|
|
312
|
+
}, [MESSAGE, contentRef, descriptionId]);
|
|
313
|
+
return null;
|
|
314
|
+
};
|
|
315
|
+
var Root = Dialog;
|
|
316
|
+
var Trigger = DialogTrigger;
|
|
317
|
+
var Portal = DialogPortal;
|
|
318
|
+
var Overlay = DialogOverlay;
|
|
319
|
+
var Content = DialogContent;
|
|
320
|
+
var Title = DialogTitle;
|
|
321
|
+
var Description = DialogDescription;
|
|
322
|
+
var Close = DialogClose;
|
|
323
|
+
export {
|
|
324
|
+
Close,
|
|
325
|
+
Content,
|
|
326
|
+
Description,
|
|
327
|
+
Dialog,
|
|
328
|
+
DialogClose,
|
|
329
|
+
DialogContent,
|
|
330
|
+
DialogDescription,
|
|
331
|
+
DialogOverlay,
|
|
332
|
+
DialogPortal,
|
|
333
|
+
DialogTitle,
|
|
334
|
+
DialogTrigger,
|
|
335
|
+
Overlay,
|
|
336
|
+
Portal,
|
|
337
|
+
Root,
|
|
338
|
+
Title,
|
|
339
|
+
Trigger,
|
|
340
|
+
WarningProvider
|
|
341
|
+
};
|
|
342
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar Slot = createSlot(\"DialogOverlay.RemoveScroll\");\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["PortalPrimitive","RemoveScroll","createContext"],"mappings":";;;;;;;;;;;;;;;;AAmBA,IAAI,cAAc;AAClB,IAAI,CAAC,mBAAsC,IAAI,mBAAmB,WAAW;AAC7E,IAAI,CAAC,gBAAgB,gBAAgB,IAAI,oBAAoB,WAAW;AACrE,IAAC,SAAS,CAAC,UAAU;AACtB,QAAM;AAAA,IACJ;AAAA,IACA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C,EAAE,YAAY,oBAAoB;AAC1D,QAAM,4BAA4B,kBAAkB,wBAAwB;AAC5E,QAAM,UAAU,6EAA6E,0BAA0B,WAAW;AAClI,QAAM,UAAU,MAAM;;AACpB,UAAM,iBAAgB,gBAAW,YAAX,mBAAoB,aAAa;AACvD,QAAI,iBAAiB,eAAe;AAClC,YAAM,iBAAiB,SAAS,eAAe,aAAa;AAC5D,UAAI,CAAC,eAAgB,SAAQ,KAAK,OAAO;AAAA,IAC3C;AAAA,EACF,GAAG,CAAC,SAAS,YAAY,aAAa,CAAC;AACvC,SAAO;AACT;AACG,IAAC,OAAO;AACR,IAAC,UAAU;AACX,IAAC,SAAS;AACV,IAAC,UAAU;AACX,IAAC,UAAU;AACX,IAAC,QAAQ;AACT,IAAC,cAAc;AACf,IAAC,QAAQ;","x_google_ignoreList":[0]}
|
package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { composeRefs } from "../../../../../react-compose-refs/dist/index.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// @__NO_SIDE_EFFECTS__
|
|
5
|
+
function createSlot(ownerName) {
|
|
6
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
7
|
+
const Slot2 = React.forwardRef((props, forwardedRef) => {
|
|
8
|
+
const { children, ...slotProps } = props;
|
|
9
|
+
const childrenArray = React.Children.toArray(children);
|
|
10
|
+
const slottable = childrenArray.find(isSlottable);
|
|
11
|
+
if (slottable) {
|
|
12
|
+
const newElement = slottable.props.children;
|
|
13
|
+
const newChildren = childrenArray.map((child) => {
|
|
14
|
+
if (child === slottable) {
|
|
15
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
16
|
+
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
17
|
+
} else {
|
|
18
|
+
return child;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
22
|
+
}
|
|
23
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
24
|
+
});
|
|
25
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
26
|
+
return Slot2;
|
|
27
|
+
}
|
|
28
|
+
// @__NO_SIDE_EFFECTS__
|
|
29
|
+
function createSlotClone(ownerName) {
|
|
30
|
+
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
31
|
+
const { children, ...slotProps } = props;
|
|
32
|
+
if (React.isValidElement(children)) {
|
|
33
|
+
const childrenRef = getElementRef(children);
|
|
34
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
35
|
+
if (children.type !== React.Fragment) {
|
|
36
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
37
|
+
}
|
|
38
|
+
return React.cloneElement(children, props2);
|
|
39
|
+
}
|
|
40
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
41
|
+
});
|
|
42
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
43
|
+
return SlotClone;
|
|
44
|
+
}
|
|
45
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
46
|
+
function isSlottable(child) {
|
|
47
|
+
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
48
|
+
}
|
|
49
|
+
function mergeProps(slotProps, childProps) {
|
|
50
|
+
const overrideProps = { ...childProps };
|
|
51
|
+
for (const propName in childProps) {
|
|
52
|
+
const slotPropValue = slotProps[propName];
|
|
53
|
+
const childPropValue = childProps[propName];
|
|
54
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
55
|
+
if (isHandler) {
|
|
56
|
+
if (slotPropValue && childPropValue) {
|
|
57
|
+
overrideProps[propName] = (...args) => {
|
|
58
|
+
const result = childPropValue(...args);
|
|
59
|
+
slotPropValue(...args);
|
|
60
|
+
return result;
|
|
61
|
+
};
|
|
62
|
+
} else if (slotPropValue) {
|
|
63
|
+
overrideProps[propName] = slotPropValue;
|
|
64
|
+
}
|
|
65
|
+
} else if (propName === "style") {
|
|
66
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
67
|
+
} else if (propName === "className") {
|
|
68
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return { ...slotProps, ...overrideProps };
|
|
72
|
+
}
|
|
73
|
+
function getElementRef(element) {
|
|
74
|
+
var _a, _b;
|
|
75
|
+
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
76
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
77
|
+
if (mayWarn) {
|
|
78
|
+
return element.ref;
|
|
79
|
+
}
|
|
80
|
+
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
81
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
82
|
+
if (mayWarn) {
|
|
83
|
+
return element.props.ref;
|
|
84
|
+
}
|
|
85
|
+
return element.props.ref || element.ref;
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
createSlot
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=index.js.map
|
package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;AAKA,SAAS,WAAW,WAAW;AAC7B,QAAM,YAA4B,gCAAgB,SAAS;AAC3D,QAAM,QAAQ,MAAM,WAAW,CAAC,OAAO,iBAAiB;AACtD,UAAM,EAAE,UAAU,GAAG,UAAS,IAAK;AACnC,UAAM,gBAAgB,MAAM,SAAS,QAAQ,QAAQ;AACrD,UAAM,YAAY,cAAc,KAAK,WAAW;AAChD,QAAI,WAAW;AACb,YAAM,aAAa,UAAU,MAAM;AACnC,YAAM,cAAc,cAAc,IAAI,CAAC,UAAU;AAC/C,YAAI,UAAU,WAAW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,YAAY;AACjC,UAAM,gBAAgB,UAAU,QAAQ;AACxC,UAAM,iBAAiB,WAAW,QAAQ;AAC1C,UAAM,YAAY,WAAW,KAAK,QAAQ;AAC1C,QAAI,WAAW;AACb,UAAI,iBAAiB,gBAAgB;AACnC,sBAAc,QAAQ,IAAI,IAAI,SAAS;AACrC,gBAAM,SAAS,eAAe,GAAG,IAAI;AACrC,wBAAc,GAAG,IAAI;AACrB,iBAAO;AAAA,QACT;AAAA,MACF,WAAW,eAAe;AACxB,sBAAc,QAAQ,IAAI;AAAA,MAC5B;AAAA,IACF,WAAW,aAAa,SAAS;AAC/B,oBAAc,QAAQ,IAAI,EAAE,GAAG,eAAe,GAAG,eAAc;AAAA,IACjE,WAAW,aAAa,aAAa;AACnC,oBAAc,QAAQ,IAAI,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AACA,SAAO,EAAE,GAAG,WAAW,GAAG,cAAa;AACzC;AACA,SAAS,cAAc,SAAS;;AAC9B,MAAI,UAAS,YAAO,yBAAyB,QAAQ,OAAO,KAAK,MAApD,mBAAuD;AACpE,MAAI,UAAU,UAAU,oBAAoB,UAAU,OAAO;AAC7D,MAAI,SAAS;AACX,WAAO,QAAQ;AAAA,EACjB;AACA,YAAS,YAAO,yBAAyB,SAAS,KAAK,MAA9C,mBAAiD;AAC1D,YAAU,UAAU,oBAAoB,UAAU,OAAO;AACzD,MAAI,SAAS;AACX,WAAO,QAAQ,MAAM;AAAA,EACvB;AACA,SAAO,QAAQ,MAAM,OAAO,QAAQ;AACtC;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
var DirectionContext = React.createContext(void 0);
|
|
4
|
+
function useDirection(localDir) {
|
|
5
|
+
const globalDir = React.useContext(DirectionContext);
|
|
6
|
+
return localDir || globalDir || "ltr";
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
useDirection
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@radix-ui/react-direction/dist/index.mjs"],"sourcesContent":["// packages/react/direction/src/direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;AAGA,IAAI,mBAAmB,MAAM,cAAc,MAAM;AAKjD,SAAS,aAAa,UAAU;AAC9B,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;","x_google_ignoreList":[0]}
|