@inkeep/agents-ui 0.0.0-dev-20260313222128
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 +64 -0
- package/README.md +1 -0
- package/dist/_virtual/index.cjs +1 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/use-sync-external-store-shim.development.cjs +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.cjs +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/color-mode/index.cjs +1 -0
- package/dist/color-mode/index.d.ts +20 -0
- package/dist/color-mode/index.js +170 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +238 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +9 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +9 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.cjs +1 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.js +8 -0
- package/dist/primitives/atoms/avatars/ai.cjs +1 -0
- package/dist/primitives/atoms/avatars/ai.d.ts +3 -0
- package/dist/primitives/atoms/avatars/ai.js +99 -0
- package/dist/primitives/atoms/avatars/user.cjs +1 -0
- package/dist/primitives/atoms/avatars/user.d.ts +3 -0
- package/dist/primitives/atoms/avatars/user.js +27 -0
- package/dist/primitives/atoms/cmdk/command-score.cjs +1 -0
- package/dist/primitives/atoms/cmdk/command-score.d.ts +1 -0
- package/dist/primitives/atoms/cmdk/command-score.js +46 -0
- package/dist/primitives/atoms/cmdk/index.cjs +1 -0
- package/dist/primitives/atoms/cmdk/index.d.ts +460 -0
- package/dist/primitives/atoms/cmdk/index.js +521 -0
- package/dist/primitives/atoms/codeblock/index.cjs +1 -0
- package/dist/primitives/atoms/codeblock/index.d.ts +10 -0
- package/dist/primitives/atoms/codeblock/index.js +40 -0
- package/dist/primitives/atoms/combobox.cjs +1 -0
- package/dist/primitives/atoms/combobox.js +275 -0
- package/dist/primitives/atoms/custom-styles.cjs +1 -0
- package/dist/primitives/atoms/custom-styles.d.ts +5 -0
- package/dist/primitives/atoms/custom-styles.js +57 -0
- package/dist/primitives/atoms/dialog.cjs +1 -0
- package/dist/primitives/atoms/dialog.d.ts +94 -0
- package/dist/primitives/atoms/dialog.js +227 -0
- package/dist/primitives/atoms/error-boundary.cjs +1 -0
- package/dist/primitives/atoms/error-boundary.d.ts +6 -0
- package/dist/primitives/atoms/error-boundary.js +9 -0
- package/dist/primitives/atoms/icons/built-in-icon-renderer.cjs +1 -0
- package/dist/primitives/atoms/icons/built-in-icon-renderer.d.ts +6 -0
- package/dist/primitives/atoms/icons/built-in-icon-renderer.js +51 -0
- package/dist/primitives/atoms/icons/built-in-icons.cjs +1 -0
- package/dist/primitives/atoms/icons/built-in-icons.d.ts +86 -0
- package/dist/primitives/atoms/icons/built-in-icons.js +89 -0
- package/dist/primitives/atoms/icons/checkbox-icon.cjs +1 -0
- package/dist/primitives/atoms/icons/checkbox-icon.d.ts +1 -0
- package/dist/primitives/atoms/icons/checkbox-icon.js +24 -0
- package/dist/primitives/atoms/icons/collections/bi.cjs +1 -0
- package/dist/primitives/atoms/icons/collections/bi.d.ts +4 -0
- package/dist/primitives/atoms/icons/collections/bi.js +49 -0
- package/dist/primitives/atoms/icons/collections/fi.cjs +1 -0
- package/dist/primitives/atoms/icons/collections/fi.d.ts +2 -0
- package/dist/primitives/atoms/icons/collections/fi.js +29 -0
- package/dist/primitives/atoms/icons/collections/gr.cjs +1 -0
- package/dist/primitives/atoms/icons/collections/gr.d.ts +2 -0
- package/dist/primitives/atoms/icons/collections/gr.js +21 -0
- package/dist/primitives/atoms/icons/collections/io5.cjs +1 -0
- package/dist/primitives/atoms/icons/collections/io5.d.ts +34 -0
- package/dist/primitives/atoms/icons/collections/io5.js +806 -0
- package/dist/primitives/atoms/icons/collections/pi.cjs +1 -0
- package/dist/primitives/atoms/icons/collections/pi.d.ts +4 -0
- package/dist/primitives/atoms/icons/collections/pi.js +49 -0
- package/dist/primitives/atoms/icons/custom-icon.cjs +1 -0
- package/dist/primitives/atoms/icons/custom-icon.d.ts +6 -0
- package/dist/primitives/atoms/icons/custom-icon.js +19 -0
- package/dist/primitives/atoms/icons/generate-icon.cjs +1 -0
- package/dist/primitives/atoms/icons/generate-icon.d.ts +28 -0
- package/dist/primitives/atoms/icons/generate-icon.js +56 -0
- package/dist/primitives/atoms/icons/index.cjs +1 -0
- package/dist/primitives/atoms/icons/index.d.ts +2 -0
- package/dist/primitives/atoms/icons/index.js +6 -0
- package/dist/primitives/atoms/icons/inkeep-default-icons.cjs +1 -0
- package/dist/primitives/atoms/icons/inkeep-default-icons.d.ts +2 -0
- package/dist/primitives/atoms/icons/inkeep-default-icons.js +28 -0
- package/dist/primitives/atoms/link.cjs +1 -0
- package/dist/primitives/atoms/link.d.ts +14 -0
- package/dist/primitives/atoms/link.js +35 -0
- package/dist/primitives/atoms/markdown/components.cjs +1 -0
- package/dist/primitives/atoms/markdown/components.d.ts +31 -0
- package/dist/primitives/atoms/markdown/components.js +76 -0
- package/dist/primitives/atoms/markdown/index.cjs +1 -0
- package/dist/primitives/atoms/markdown/index.d.ts +17 -0
- package/dist/primitives/atoms/markdown/index.js +121 -0
- package/dist/primitives/atoms/markdown/rehype-inline-code-property.cjs +1 -0
- package/dist/primitives/atoms/markdown/rehype-inline-code-property.d.ts +1 -0
- package/dist/primitives/atoms/markdown/rehype-inline-code-property.js +12 -0
- package/dist/primitives/atoms/portal-with-theme.cjs +1 -0
- package/dist/primitives/atoms/portal-with-theme.d.ts +2 -0
- package/dist/primitives/atoms/portal-with-theme.js +12 -0
- package/dist/primitives/atoms/portal.cjs +1 -0
- package/dist/primitives/atoms/portal.d.ts +8 -0
- package/dist/primitives/atoms/portal.js +19 -0
- package/dist/primitives/atoms/select.cjs +1 -0
- package/dist/primitives/atoms/select.d.ts +136 -0
- package/dist/primitives/atoms/select.js +785 -0
- package/dist/primitives/atoms/shadow/context.cjs +1 -0
- package/dist/primitives/atoms/shadow/context.d.ts +14 -0
- package/dist/primitives/atoms/shadow/context.js +54 -0
- package/dist/primitives/atoms/shadow/create.cjs +1 -0
- package/dist/primitives/atoms/shadow/create.d.ts +8 -0
- package/dist/primitives/atoms/shadow/create.js +56 -0
- package/dist/primitives/atoms/shadow/index.d.ts +1 -0
- package/dist/primitives/atoms/shadow/root.cjs +1 -0
- package/dist/primitives/atoms/shadow/root.d.ts +5 -0
- package/dist/primitives/atoms/shadow/root.js +22 -0
- package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.cjs +1 -0
- package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.d.ts +2 -0
- package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.js +11 -0
- package/dist/primitives/atoms/shadow/utils.cjs +1 -0
- package/dist/primitives/atoms/shadow/utils.d.ts +9 -0
- package/dist/primitives/atoms/shadow/utils.js +16 -0
- package/dist/primitives/components/chat-bubble/index.cjs +1 -0
- package/dist/primitives/components/chat-bubble/index.d.ts +10 -0
- package/dist/primitives/components/chat-bubble/index.js +38 -0
- package/dist/primitives/components/chat-button.cjs +1 -0
- package/dist/primitives/components/chat-button.d.ts +20 -0
- package/dist/primitives/components/chat-button.js +51 -0
- package/dist/primitives/components/chat-history/index.cjs +1 -0
- package/dist/primitives/components/chat-history/index.d.ts +27 -0
- package/dist/primitives/components/chat-history/index.js +105 -0
- package/dist/primitives/components/data-summaries.cjs +1 -0
- package/dist/primitives/components/data-summaries.d.ts +14 -0
- package/dist/primitives/components/data-summaries.js +38 -0
- package/dist/primitives/components/embedded-chat/chat-provider.cjs +1 -0
- package/dist/primitives/components/embedded-chat/chat-provider.d.ts +19 -0
- package/dist/primitives/components/embedded-chat/chat-provider.js +20 -0
- package/dist/primitives/components/embedded-chat/use-captcha.cjs +1 -0
- package/dist/primitives/components/embedded-chat/use-captcha.d.ts +30 -0
- package/dist/primitives/components/embedded-chat/use-captcha.js +67 -0
- package/dist/primitives/components/embedded-chat/use-chat-action.cjs +1 -0
- package/dist/primitives/components/embedded-chat/use-chat-action.d.ts +9 -0
- package/dist/primitives/components/embedded-chat/use-chat-action.js +41 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +3 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +57 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +312 -0
- package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -0
- package/dist/primitives/components/embedded-chat/use-stream-processor.d.ts +30 -0
- package/dist/primitives/components/embedded-chat/use-stream-processor.js +159 -0
- package/dist/primitives/components/embedded-chat.cjs +11 -0
- package/dist/primitives/components/embedded-chat.d.ts +461 -0
- package/dist/primitives/components/embedded-chat.js +2051 -0
- package/dist/primitives/components/embedded-search/search-provider.cjs +1 -0
- package/dist/primitives/components/embedded-search/search-provider.d.ts +21 -0
- package/dist/primitives/components/embedded-search/search-provider.js +26 -0
- package/dist/primitives/components/embedded-search/transform-results.cjs +1 -0
- package/dist/primitives/components/embedded-search/transform-results.d.ts +3 -0
- package/dist/primitives/components/embedded-search/transform-results.js +47 -0
- package/dist/primitives/components/embedded-search/url-query.cjs +1 -0
- package/dist/primitives/components/embedded-search/url-query.d.ts +4 -0
- package/dist/primitives/components/embedded-search/url-query.js +12 -0
- package/dist/primitives/components/embedded-search/use-inkeep-search.cjs +1 -0
- package/dist/primitives/components/embedded-search/use-inkeep-search.d.ts +19 -0
- package/dist/primitives/components/embedded-search/use-inkeep-search.js +35 -0
- package/dist/primitives/components/embedded-search/use-search-filter.cjs +1 -0
- package/dist/primitives/components/embedded-search/use-search-filter.d.ts +1 -0
- package/dist/primitives/components/embedded-search/use-search-filter.js +77 -0
- package/dist/primitives/components/embedded-search.cjs +1 -0
- package/dist/primitives/components/embedded-search.d.ts +249 -0
- package/dist/primitives/components/embedded-search.js +628 -0
- package/dist/primitives/components/factory.cjs +1 -0
- package/dist/primitives/components/factory.d.ts +19 -0
- package/dist/primitives/components/factory.js +39 -0
- package/dist/primitives/components/index.cjs +1 -0
- package/dist/primitives/components/index.d.ts +13 -0
- package/dist/primitives/components/index.js +33 -0
- package/dist/primitives/components/modal/modal-provider.cjs +1 -0
- package/dist/primitives/components/modal/modal-provider.d.ts +12 -0
- package/dist/primitives/components/modal/modal-provider.js +8 -0
- package/dist/primitives/components/modal/use-inkeep-modal.cjs +1 -0
- package/dist/primitives/components/modal/use-inkeep-modal.d.ts +7 -0
- package/dist/primitives/components/modal/use-inkeep-modal.js +9 -0
- package/dist/primitives/components/modal/widget-auto-focus.cjs +1 -0
- package/dist/primitives/components/modal/widget-auto-focus.d.ts +2 -0
- package/dist/primitives/components/modal/widget-auto-focus.js +25 -0
- package/dist/primitives/components/modal.cjs +1 -0
- package/dist/primitives/components/modal.d.ts +18 -0
- package/dist/primitives/components/modal.js +40 -0
- package/dist/primitives/components/presence.cjs +1 -0
- package/dist/primitives/components/presence.d.ts +8 -0
- package/dist/primitives/components/presence.js +26 -0
- package/dist/primitives/components/searchbar.cjs +1 -0
- package/dist/primitives/components/searchbar.d.ts +23 -0
- package/dist/primitives/components/searchbar.js +54 -0
- package/dist/primitives/components/sidebar-chat/index.cjs +1 -0
- package/dist/primitives/components/sidebar-chat/index.d.ts +9 -0
- package/dist/primitives/components/sidebar-chat/index.js +67 -0
- package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.cjs +1 -0
- package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.d.ts +5 -0
- package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.js +34 -0
- package/dist/primitives/components/tagline-logo-icon.cjs +1 -0
- package/dist/primitives/components/tagline-logo-icon.d.ts +1 -0
- package/dist/primitives/components/tagline-logo-icon.js +26 -0
- package/dist/primitives/components/use-component-trigger.cjs +1 -0
- package/dist/primitives/components/use-component-trigger.d.ts +5 -0
- package/dist/primitives/components/use-component-trigger.js +17 -0
- package/dist/primitives/constants/search.cjs +1 -0
- package/dist/primitives/constants/search.d.ts +1 -0
- package/dist/primitives/constants/search.js +5 -0
- package/dist/primitives/hooks/index.cjs +1 -0
- package/dist/primitives/hooks/index.d.ts +12 -0
- package/dist/primitives/hooks/index.js +26 -0
- package/dist/primitives/hooks/use-anonymous-session.cjs +1 -0
- package/dist/primitives/hooks/use-anonymous-session.d.ts +12 -0
- package/dist/primitives/hooks/use-anonymous-session.js +82 -0
- package/dist/primitives/hooks/use-boolean.cjs +1 -0
- package/dist/primitives/hooks/use-boolean.d.ts +10 -0
- package/dist/primitives/hooks/use-boolean.js +17 -0
- package/dist/primitives/hooks/use-component-classnames.cjs +1 -0
- package/dist/primitives/hooks/use-component-classnames.d.ts +6 -0
- package/dist/primitives/hooks/use-component-classnames.js +14 -0
- package/dist/primitives/hooks/use-container-size.cjs +1 -0
- package/dist/primitives/hooks/use-container-size.d.ts +5 -0
- package/dist/primitives/hooks/use-container-size.js +18 -0
- package/dist/primitives/hooks/use-conversation-loader.cjs +1 -0
- package/dist/primitives/hooks/use-conversation-loader.d.ts +13 -0
- package/dist/primitives/hooks/use-conversation-loader.js +36 -0
- package/dist/primitives/hooks/use-copy-to-clipboard.cjs +1 -0
- package/dist/primitives/hooks/use-copy-to-clipboard.d.ts +3 -0
- package/dist/primitives/hooks/use-copy-to-clipboard.js +24 -0
- package/dist/primitives/hooks/use-debounce.cjs +1 -0
- package/dist/primitives/hooks/use-debounce.d.ts +1 -0
- package/dist/primitives/hooks/use-debounce.js +16 -0
- package/dist/primitives/hooks/use-inkeep-api-client.cjs +1 -0
- package/dist/primitives/hooks/use-inkeep-api-client.d.ts +33 -0
- package/dist/primitives/hooks/use-inkeep-api-client.js +87 -0
- package/dist/primitives/hooks/use-inkeep-open-state.cjs +1 -0
- package/dist/primitives/hooks/use-inkeep-open-state.d.ts +18 -0
- package/dist/primitives/hooks/use-inkeep-open-state.js +47 -0
- package/dist/primitives/hooks/use-instant-update.cjs +1 -0
- package/dist/primitives/hooks/use-instant-update.d.ts +16 -0
- package/dist/primitives/hooks/use-instant-update.js +16 -0
- package/dist/primitives/hooks/use-is-mounted.cjs +1 -0
- package/dist/primitives/hooks/use-is-mounted.d.ts +1 -0
- package/dist/primitives/hooks/use-is-mounted.js +11 -0
- package/dist/primitives/hooks/use-local-storage.cjs +1 -0
- package/dist/primitives/hooks/use-local-storage.d.ts +8 -0
- package/dist/primitives/hooks/use-local-storage.js +26 -0
- package/dist/primitives/hooks/use-media-query.cjs +1 -0
- package/dist/primitives/hooks/use-media-query.d.ts +1 -0
- package/dist/primitives/hooks/use-media-query.js +14 -0
- package/dist/primitives/hooks/use-resize-observer.cjs +1 -0
- package/dist/primitives/hooks/use-resize-observer.d.ts +12 -0
- package/dist/primitives/hooks/use-resize-observer.js +32 -0
- package/dist/primitives/hooks/use-scrolling-fades.cjs +1 -0
- package/dist/primitives/hooks/use-scrolling-fades.d.ts +2 -0
- package/dist/primitives/hooks/use-scrolling-fades.js +18 -0
- package/dist/primitives/hooks/use-settle-action.cjs +1 -0
- package/dist/primitives/hooks/use-settle-action.d.ts +3 -0
- package/dist/primitives/hooks/use-settle-action.js +11 -0
- package/dist/primitives/hooks/use-simple-scroll.cjs +1 -0
- package/dist/primitives/hooks/use-simple-scroll.d.ts +16 -0
- package/dist/primitives/hooks/use-simple-scroll.js +51 -0
- package/dist/primitives/hooks/use-streaming-events.cjs +1 -0
- package/dist/primitives/hooks/use-streaming-events.d.ts +8 -0
- package/dist/primitives/hooks/use-streaming-events.js +33 -0
- package/dist/primitives/index.cjs +1 -0
- package/dist/primitives/index.d.ts +13 -0
- package/dist/primitives/index.js +174 -0
- package/dist/primitives/providers/attachment-item-provider.cjs +1 -0
- package/dist/primitives/providers/attachment-item-provider.d.ts +9 -0
- package/dist/primitives/providers/attachment-item-provider.js +13 -0
- package/dist/primitives/providers/attachments-bar-provider.cjs +1 -0
- package/dist/primitives/providers/attachments-bar-provider.d.ts +30 -0
- package/dist/primitives/providers/attachments-bar-provider.js +57 -0
- package/dist/primitives/providers/base-events-provider.cjs +1 -0
- package/dist/primitives/providers/base-events-provider.d.ts +8 -0
- package/dist/primitives/providers/base-events-provider.js +37 -0
- package/dist/primitives/providers/chat-bubble-provider.cjs +1 -0
- package/dist/primitives/providers/chat-bubble-provider.d.ts +22 -0
- package/dist/primitives/providers/chat-bubble-provider.js +19 -0
- package/dist/primitives/providers/chat-form-provider.cjs +1 -0
- package/dist/primitives/providers/chat-form-provider.d.ts +26 -0
- package/dist/primitives/providers/chat-form-provider.js +109 -0
- package/dist/primitives/providers/chat-history-provider.cjs +1 -0
- package/dist/primitives/providers/chat-history-provider.d.ts +32 -0
- package/dist/primitives/providers/chat-history-provider.js +105 -0
- package/dist/primitives/providers/config-provider.cjs +1 -0
- package/dist/primitives/providers/config-provider.d.ts +24 -0
- package/dist/primitives/providers/config-provider.js +40 -0
- package/dist/primitives/providers/feedback-item-provider.cjs +1 -0
- package/dist/primitives/providers/feedback-item-provider.d.ts +10 -0
- package/dist/primitives/providers/feedback-item-provider.js +16 -0
- package/dist/primitives/providers/feedback-provider.cjs +1 -0
- package/dist/primitives/providers/feedback-provider.d.ts +16 -0
- package/dist/primitives/providers/feedback-provider.js +83 -0
- package/dist/primitives/providers/form-field-provider.cjs +1 -0
- package/dist/primitives/providers/form-field-provider.d.ts +15 -0
- package/dist/primitives/providers/form-field-provider.js +17 -0
- package/dist/primitives/providers/help-menu-provider.cjs +1 -0
- package/dist/primitives/providers/help-menu-provider.d.ts +11 -0
- package/dist/primitives/providers/help-menu-provider.js +19 -0
- package/dist/primitives/providers/hover-popover-provider.cjs +1 -0
- package/dist/primitives/providers/hover-popover-provider.d.ts +10 -0
- package/dist/primitives/providers/hover-popover-provider.js +13 -0
- package/dist/primitives/providers/index.cjs +1 -0
- package/dist/primitives/providers/index.d.ts +19 -0
- package/dist/primitives/providers/index.js +65 -0
- package/dist/primitives/providers/markdown-provider.cjs +1 -0
- package/dist/primitives/providers/markdown-provider.d.ts +9 -0
- package/dist/primitives/providers/markdown-provider.js +8 -0
- package/dist/primitives/providers/message-attachments-provider.cjs +1 -0
- package/dist/primitives/providers/message-attachments-provider.d.ts +13 -0
- package/dist/primitives/providers/message-attachments-provider.js +27 -0
- package/dist/primitives/providers/message-provider.cjs +1 -0
- package/dist/primitives/providers/message-provider.d.ts +10 -0
- package/dist/primitives/providers/message-provider.js +14 -0
- package/dist/primitives/providers/root-provider.cjs +1 -0
- package/dist/primitives/providers/root-provider.d.ts +8 -0
- package/dist/primitives/providers/root-provider.js +21 -0
- package/dist/primitives/providers/search-events-provider.cjs +1 -0
- package/dist/primitives/providers/search-events-provider.d.ts +8 -0
- package/dist/primitives/providers/search-events-provider.js +17 -0
- package/dist/primitives/providers/sidebar-chat-provider.cjs +1 -0
- package/dist/primitives/providers/sidebar-chat-provider.d.ts +61 -0
- package/dist/primitives/providers/sidebar-chat-provider.js +37 -0
- package/dist/primitives/providers/source-item-provider.cjs +1 -0
- package/dist/primitives/providers/source-item-provider.d.ts +12 -0
- package/dist/primitives/providers/source-item-provider.js +13 -0
- package/dist/primitives/providers/theme-provider.cjs +3 -0
- package/dist/primitives/providers/theme-provider.d.ts +3 -0
- package/dist/primitives/providers/theme-provider.js +79 -0
- package/dist/primitives/providers/widget-provider.cjs +1 -0
- package/dist/primitives/providers/widget-provider.d.ts +10 -0
- package/dist/primitives/providers/widget-provider.js +8 -0
- package/dist/primitives/utils/component-ids.cjs +1 -0
- package/dist/primitives/utils/component-ids.d.ts +662 -0
- package/dist/primitives/utils/component-ids.js +361 -0
- package/dist/primitives/utils/compose-event-handlers.cjs +1 -0
- package/dist/primitives/utils/compose-event-handlers.d.ts +3 -0
- package/dist/primitives/utils/compose-event-handlers.js +10 -0
- package/dist/primitives/utils/compose-refs.cjs +1 -0
- package/dist/primitives/utils/compose-refs.d.ts +5 -0
- package/dist/primitives/utils/compose-refs.js +30 -0
- package/dist/primitives/utils/default-settings.cjs +1 -0
- package/dist/primitives/utils/default-settings.d.ts +169 -0
- package/dist/primitives/utils/default-settings.js +52 -0
- package/dist/primitives/utils/form.cjs +1 -0
- package/dist/primitives/utils/form.d.ts +3 -0
- package/dist/primitives/utils/form.js +19 -0
- package/dist/primitives/utils/generate-uid.cjs +1 -0
- package/dist/primitives/utils/generate-uid.d.ts +2 -0
- package/dist/primitives/utils/generate-uid.js +14 -0
- package/dist/primitives/utils/get-message-metadata.d.ts +8 -0
- package/dist/primitives/utils/get-source-icon.cjs +1 -0
- package/dist/primitives/utils/get-source-icon.d.ts +2 -0
- package/dist/primitives/utils/get-source-icon.js +11 -0
- package/dist/primitives/utils/highlight-emphasis.cjs +1 -0
- package/dist/primitives/utils/highlight-emphasis.d.ts +4 -0
- package/dist/primitives/utils/highlight-emphasis.js +15 -0
- package/dist/primitives/utils/merge-props.cjs +1 -0
- package/dist/primitives/utils/merge-props.d.ts +7 -0
- package/dist/primitives/utils/merge-props.js +41 -0
- package/dist/primitives/utils/misc.cjs +1 -0
- package/dist/primitives/utils/misc.d.ts +12 -0
- package/dist/primitives/utils/misc.js +31 -0
- package/dist/primitives/utils/split-props.cjs +1 -0
- package/dist/primitives/utils/split-props.d.ts +14 -0
- package/dist/primitives/utils/split-props.js +10 -0
- package/dist/react/chat-button-modal.cjs +1 -0
- package/dist/react/chat-button-modal.d.ts +22 -0
- package/dist/react/chat-button-modal.js +41 -0
- package/dist/react/chat-button.cjs +1 -0
- package/dist/react/chat-button.d.ts +28 -0
- package/dist/react/chat-button.js +73 -0
- package/dist/react/embedded-chat.cjs +1 -0
- package/dist/react/embedded-chat.d.ts +15 -0
- package/dist/react/embedded-chat.js +431 -0
- package/dist/react/embedded-search-and-chat.cjs +1 -0
- package/dist/react/embedded-search-and-chat.d.ts +40 -0
- package/dist/react/embedded-search-and-chat.impl.cjs +1 -0
- package/dist/react/embedded-search-and-chat.impl.d.ts +9 -0
- package/dist/react/embedded-search-and-chat.impl.js +43 -0
- package/dist/react/embedded-search-and-chat.js +66 -0
- package/dist/react/embedded-search.cjs +1 -0
- package/dist/react/embedded-search.d.ts +17 -0
- package/dist/react/embedded-search.js +181 -0
- package/dist/react/index.cjs +1 -0
- package/dist/react/index.d.ts +13 -0
- package/dist/react/index.js +238 -0
- package/dist/react/modal.chat.cjs +1 -0
- package/dist/react/modal.chat.d.ts +9 -0
- package/dist/react/modal.chat.js +21 -0
- package/dist/react/modal.cjs +1 -0
- package/dist/react/modal.d.ts +23 -0
- package/dist/react/modal.js +27 -0
- package/dist/react/modal.search-and-chat.cjs +1 -0
- package/dist/react/modal.search-and-chat.d.ts +6 -0
- package/dist/react/modal.search-and-chat.js +27 -0
- package/dist/react/modal.search.cjs +1 -0
- package/dist/react/modal.search.d.ts +6 -0
- package/dist/react/modal.search.js +21 -0
- package/dist/react/searchbar.cjs +1 -0
- package/dist/react/searchbar.d.ts +13 -0
- package/dist/react/searchbar.js +68 -0
- package/dist/react/sidebar-chat.cjs +1 -0
- package/dist/react/sidebar-chat.d.ts +4 -0
- package/dist/react/sidebar-chat.js +53 -0
- package/dist/react/utils.cjs +1 -0
- package/dist/react/utils.d.ts +6 -0
- package/dist/react/utils.js +20 -0
- package/dist/react/widget-toggle.cjs +1 -0
- package/dist/react/widget-toggle.d.ts +14 -0
- package/dist/react/widget-toggle.js +65 -0
- package/dist/styled/components/chat-bubble.cjs +1 -0
- package/dist/styled/components/chat-bubble.d.ts +5 -0
- package/dist/styled/components/chat-bubble.js +70 -0
- package/dist/styled/components/chat-button.cjs +1 -0
- package/dist/styled/components/chat-button.d.ts +9 -0
- package/dist/styled/components/chat-button.js +60 -0
- package/dist/styled/components/chat-history.cjs +1 -0
- package/dist/styled/components/chat-history.d.ts +15 -0
- package/dist/styled/components/chat-history.js +197 -0
- package/dist/styled/components/data-summary-group.cjs +1 -0
- package/dist/styled/components/data-summary-group.d.ts +11 -0
- package/dist/styled/components/data-summary-group.js +96 -0
- package/dist/styled/components/embedded-chat/session-loading.cjs +1 -0
- package/dist/styled/components/embedded-chat/session-loading.d.ts +1 -0
- package/dist/styled/components/embedded-chat/session-loading.js +23 -0
- package/dist/styled/components/embedded-chat.cjs +1 -0
- package/dist/styled/components/embedded-chat.d.ts +211 -0
- package/dist/styled/components/embedded-chat.js +1997 -0
- package/dist/styled/components/embedded-search/results-loading.cjs +1 -0
- package/dist/styled/components/embedded-search/results-loading.d.ts +1 -0
- package/dist/styled/components/embedded-search/results-loading.js +39 -0
- package/dist/styled/components/embedded-search.cjs +1 -0
- package/dist/styled/components/embedded-search.d.ts +73 -0
- package/dist/styled/components/embedded-search.js +680 -0
- package/dist/styled/components/index.cjs +1 -0
- package/dist/styled/components/index.d.ts +13 -0
- package/dist/styled/components/index.js +28 -0
- package/dist/styled/components/loading-indicator.cjs +1 -0
- package/dist/styled/components/loading-indicator.d.ts +1 -0
- package/dist/styled/components/loading-indicator.js +36 -0
- package/dist/styled/components/message.cjs +1 -0
- package/dist/styled/components/message.d.ts +4 -0
- package/dist/styled/components/message.js +333 -0
- package/dist/styled/components/modal.cjs +1 -0
- package/dist/styled/components/modal.d.ts +6 -0
- package/dist/styled/components/modal.js +46 -0
- package/dist/styled/components/searchbar.cjs +1 -0
- package/dist/styled/components/searchbar.d.ts +11 -0
- package/dist/styled/components/searchbar.js +81 -0
- package/dist/styled/components/shadow.cjs +1 -0
- package/dist/styled/components/shadow.d.ts +3 -0
- package/dist/styled/components/shadow.js +8 -0
- package/dist/styled/components/sidebar-chat.cjs +1 -0
- package/dist/styled/components/sidebar-chat.d.ts +6 -0
- package/dist/styled/components/sidebar-chat.js +90 -0
- package/dist/styled/components/ui/markdown-styles.cjs +1 -0
- package/dist/styled/components/ui/markdown-styles.d.ts +23 -0
- package/dist/styled/components/ui/markdown-styles.js +39 -0
- package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.cjs +1 -0
- package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.d.ts +7 -0
- package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.js +33 -0
- package/dist/styled/components/ui/recipes/attachment.cjs +1 -0
- package/dist/styled/components/ui/recipes/attachment.d.ts +4 -0
- package/dist/styled/components/ui/recipes/attachment.js +28 -0
- package/dist/styled/components/ui/recipes/button.cjs +1 -0
- package/dist/styled/components/ui/recipes/button.d.ts +6 -0
- package/dist/styled/components/ui/recipes/button.js +87 -0
- package/dist/styled/components/ui/recipes/checkbox.cjs +1 -0
- package/dist/styled/components/ui/recipes/checkbox.d.ts +4 -0
- package/dist/styled/components/ui/recipes/checkbox.js +23 -0
- package/dist/styled/components/ui/recipes/citation.cjs +1 -0
- package/dist/styled/components/ui/recipes/citation.d.ts +4 -0
- package/dist/styled/components/ui/recipes/citation.js +75 -0
- package/dist/styled/components/ui/recipes/combobox.cjs +1 -0
- package/dist/styled/components/ui/recipes/combobox.d.ts +4 -0
- package/dist/styled/components/ui/recipes/combobox.js +57 -0
- package/dist/styled/components/ui/recipes/icon.cjs +1 -0
- package/dist/styled/components/ui/recipes/icon.d.ts +2 -0
- package/dist/styled/components/ui/recipes/icon.js +6 -0
- package/dist/styled/components/ui/recipes/index.cjs +1 -0
- package/dist/styled/components/ui/recipes/index.d.ts +16 -0
- package/dist/styled/components/ui/recipes/index.js +39 -0
- package/dist/styled/components/ui/recipes/input.cjs +1 -0
- package/dist/styled/components/ui/recipes/input.d.ts +5 -0
- package/dist/styled/components/ui/recipes/input.js +34 -0
- package/dist/styled/components/ui/recipes/link.cjs +1 -0
- package/dist/styled/components/ui/recipes/link.d.ts +2 -0
- package/dist/styled/components/ui/recipes/link.js +13 -0
- package/dist/styled/components/ui/recipes/markdown.cjs +1 -0
- package/dist/styled/components/ui/recipes/markdown.d.ts +16 -0
- package/dist/styled/components/ui/recipes/markdown.js +103 -0
- package/dist/styled/components/ui/recipes/modal.cjs +1 -0
- package/dist/styled/components/ui/recipes/modal.d.ts +4 -0
- package/dist/styled/components/ui/recipes/modal.js +59 -0
- package/dist/styled/components/ui/recipes/popover.cjs +1 -0
- package/dist/styled/components/ui/recipes/popover.d.ts +4 -0
- package/dist/styled/components/ui/recipes/popover.js +20 -0
- package/dist/styled/components/ui/recipes/scrollable.cjs +1 -0
- package/dist/styled/components/ui/recipes/scrollable.d.ts +4 -0
- package/dist/styled/components/ui/recipes/scrollable.js +15 -0
- package/dist/styled/components/ui/recipes/select.cjs +1 -0
- package/dist/styled/components/ui/recipes/select.d.ts +4 -0
- package/dist/styled/components/ui/recipes/select.js +38 -0
- package/dist/styled/components/ui/recipes/skeleton.cjs +1 -0
- package/dist/styled/components/ui/recipes/skeleton.d.ts +2 -0
- package/dist/styled/components/ui/recipes/skeleton.js +16 -0
- package/dist/styled/components/ui/recipes/widget-toggle.cjs +1 -0
- package/dist/styled/components/ui/recipes/widget-toggle.d.ts +4 -0
- package/dist/styled/components/ui/recipes/widget-toggle.js +35 -0
- package/dist/styled/index.cjs +1 -0
- package/dist/styled/index.d.ts +2 -0
- package/dist/styled/index.js +200 -0
- package/dist/styled/inkeep.css.cjs +4567 -0
- package/dist/styled/inkeep.css.js +4571 -0
- package/dist/styled/utils.cjs +1 -0
- package/dist/styled/utils.d.ts +4 -0
- package/dist/styled/utils.js +11 -0
- package/dist/theme/color-utils.cjs +1 -0
- package/dist/theme/color-utils.d.ts +1 -0
- package/dist/theme/color-utils.js +21 -0
- package/dist/theme/colors.cjs +1 -0
- package/dist/theme/colors.d.ts +104 -0
- package/dist/theme/colors.js +143 -0
- package/dist/theme/index.cjs +1 -0
- package/dist/theme/index.d.ts +125 -0
- package/dist/theme/index.js +58 -0
- package/dist/theme/utils/create-css-variables.cjs +1 -0
- package/dist/theme/utils/create-css-variables.d.ts +2 -0
- package/dist/theme/utils/create-css-variables.js +24 -0
- package/dist/theme/utils/generate-theme-variables.cjs +1 -0
- package/dist/theme/utils/generate-theme-variables.d.ts +3 -0
- package/dist/theme/utils/generate-theme-variables.js +34 -0
- package/dist/types/color-mode.d.ts +44 -0
- package/dist/types/config/ai.d.ts +269 -0
- package/dist/types/config/base.d.ts +358 -0
- package/dist/types/config/components.d.ts +16 -0
- package/dist/types/config/filters.d.ts +17 -0
- package/dist/types/config/index.d.ts +36 -0
- package/dist/types/config/open-settings.d.ts +70 -0
- package/dist/types/config/search.d.ts +95 -0
- package/dist/types/config/settings/actions.d.ts +112 -0
- package/dist/types/config/settings/form.d.ts +83 -0
- package/dist/types/config/settings/jsonschema.d.ts +105 -0
- package/dist/types/config/settings/workflow.d.ts +86 -0
- package/dist/types/events.d.ts +188 -0
- package/dist/types/icons/built-in.d.ts +1 -0
- package/dist/types/icons/custom.d.ts +33 -0
- package/dist/types/icons/index.d.ts +2 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/js/index.d.ts +55 -0
- package/dist/types/message.d.ts +43 -0
- package/dist/types/shadow.d.ts +15 -0
- package/dist/types/sources.d.ts +100 -0
- package/dist/types/theme.d.ts +25 -0
- package/dist/types/widget.d.ts +27 -0
- package/package.json +140 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as c, Fragment as O, jsxs as M } from "react/jsx-runtime";
|
|
3
|
+
import * as f from "@zag-js/combobox";
|
|
4
|
+
import { useMachine as j, normalizeProps as B } from "@zag-js/react";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
import { useId as q } from "react";
|
|
7
|
+
import { BuiltInIconRenderer as I } from "./icons/built-in-icon-renderer.js";
|
|
8
|
+
import { useShadow as z } from "./shadow/context.js";
|
|
9
|
+
const A = r.forwardRef((o, a) => {
|
|
10
|
+
const {
|
|
11
|
+
children: t,
|
|
12
|
+
defaultValue: e = [],
|
|
13
|
+
items: n,
|
|
14
|
+
multiple: s = !1,
|
|
15
|
+
placeholder: l,
|
|
16
|
+
name: b,
|
|
17
|
+
disabled: P,
|
|
18
|
+
required: v,
|
|
19
|
+
id: w,
|
|
20
|
+
onValueChange: R
|
|
21
|
+
} = o, y = q(), N = w ?? y, T = z(), [p, h] = r.useState(n), L = r.useMemo(
|
|
22
|
+
() => f.collection({
|
|
23
|
+
items: p,
|
|
24
|
+
itemToValue: (i) => i.value,
|
|
25
|
+
itemToString: (i) => i.label
|
|
26
|
+
}),
|
|
27
|
+
[p]
|
|
28
|
+
), V = j(f.machine, {
|
|
29
|
+
id: N,
|
|
30
|
+
collection: L,
|
|
31
|
+
defaultValue: e,
|
|
32
|
+
multiple: s,
|
|
33
|
+
placeholder: l,
|
|
34
|
+
name: b,
|
|
35
|
+
disabled: P,
|
|
36
|
+
required: v,
|
|
37
|
+
openOnClick: !0,
|
|
38
|
+
getRootNode: () => T?.shadowHost?.shadowRoot ?? document,
|
|
39
|
+
selectionBehavior: s ? "clear" : "replace",
|
|
40
|
+
onOpenChange(i) {
|
|
41
|
+
i.open || h(n);
|
|
42
|
+
},
|
|
43
|
+
onInputValueChange(i) {
|
|
44
|
+
const g = i.inputValue.trim() === "" ? n : n.filter(
|
|
45
|
+
(E) => E.label.toLowerCase().includes(i.inputValue.toLowerCase())
|
|
46
|
+
);
|
|
47
|
+
h(g.length > 0 ? g : []);
|
|
48
|
+
},
|
|
49
|
+
onValueChange(i) {
|
|
50
|
+
R?.(i);
|
|
51
|
+
}
|
|
52
|
+
}), u = f.connect(
|
|
53
|
+
V,
|
|
54
|
+
B
|
|
55
|
+
), S = r.useMemo(() => ({ api: u, options: p }), [u, p]), k = u.getRootProps();
|
|
56
|
+
return /* @__PURE__ */ c("div", { "data-scope": "combobox", "data-part": "root", ...k, children: /* @__PURE__ */ c(C.Provider, { value: S, children: t }) });
|
|
57
|
+
});
|
|
58
|
+
A.displayName = "ComboboxRoot";
|
|
59
|
+
const D = r.forwardRef((o, a) => {
|
|
60
|
+
const { children: t, ...e } = o, n = d(), s = n.getControlProps();
|
|
61
|
+
return /* @__PURE__ */ c(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
"data-scope": "combobox",
|
|
65
|
+
"data-part": "control",
|
|
66
|
+
"data-state": n.open ? "open" : "closed",
|
|
67
|
+
"data-disabled": n.disabled ? "" : void 0,
|
|
68
|
+
"data-focus": n.focused ? "" : void 0,
|
|
69
|
+
...s,
|
|
70
|
+
ref: m(a, s.ref),
|
|
71
|
+
...e,
|
|
72
|
+
children: t
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
});
|
|
76
|
+
D.displayName = "ComboboxControl";
|
|
77
|
+
function m(...o) {
|
|
78
|
+
return (a) => {
|
|
79
|
+
o.forEach((t) => {
|
|
80
|
+
typeof t == "function" ? t(a) : t && (t.current = a);
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
const F = r.forwardRef((o, a) => {
|
|
85
|
+
const t = d(), e = t.getInputProps();
|
|
86
|
+
return /* @__PURE__ */ c(
|
|
87
|
+
"input",
|
|
88
|
+
{
|
|
89
|
+
"data-scope": "combobox",
|
|
90
|
+
"data-part": "input",
|
|
91
|
+
"data-state": t.open ? "open" : "closed",
|
|
92
|
+
...e,
|
|
93
|
+
...o,
|
|
94
|
+
ref: m(a, e.ref)
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
});
|
|
98
|
+
F.displayName = "ComboboxInput";
|
|
99
|
+
const H = r.forwardRef((o, a) => {
|
|
100
|
+
const t = d(), e = t.getTriggerProps();
|
|
101
|
+
return /* @__PURE__ */ c(
|
|
102
|
+
"button",
|
|
103
|
+
{
|
|
104
|
+
type: "button",
|
|
105
|
+
"data-scope": "combobox",
|
|
106
|
+
"data-part": "trigger",
|
|
107
|
+
"data-state": t.open ? "open" : "closed",
|
|
108
|
+
"data-disabled": t.disabled ? "" : void 0,
|
|
109
|
+
...e,
|
|
110
|
+
ref: m(a, e.ref),
|
|
111
|
+
...o,
|
|
112
|
+
children: o.children ?? "▼"
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
});
|
|
116
|
+
H.displayName = "ComboboxTrigger";
|
|
117
|
+
const ao = r.forwardRef(
|
|
118
|
+
function(a, t) {
|
|
119
|
+
const e = d();
|
|
120
|
+
return /* @__PURE__ */ c("div", { ref: t, ...e.getPositionerProps(), ...a });
|
|
121
|
+
}
|
|
122
|
+
), _ = r.forwardRef((o, a) => {
|
|
123
|
+
const t = d(), e = t.getContentProps();
|
|
124
|
+
return /* @__PURE__ */ c(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
"data-scope": "combobox",
|
|
128
|
+
"data-part": "content",
|
|
129
|
+
"data-state": t.open ? "open" : "closed",
|
|
130
|
+
...e,
|
|
131
|
+
ref: m(a, e.ref),
|
|
132
|
+
...o,
|
|
133
|
+
children: o.children
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
});
|
|
137
|
+
_.displayName = "ComboboxContent";
|
|
138
|
+
const $ = r.forwardRef((o, a) => {
|
|
139
|
+
const e = d().getListProps();
|
|
140
|
+
return /* @__PURE__ */ c(
|
|
141
|
+
"div",
|
|
142
|
+
{
|
|
143
|
+
ref: m(a, e.ref),
|
|
144
|
+
"data-scope": "combobox",
|
|
145
|
+
"data-part": "list",
|
|
146
|
+
...e,
|
|
147
|
+
...o,
|
|
148
|
+
children: o.children
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
});
|
|
152
|
+
$.displayName = "ComboboxList";
|
|
153
|
+
const G = ({ children: o }) => {
|
|
154
|
+
const a = W();
|
|
155
|
+
return /* @__PURE__ */ c(O, { children: o(a) });
|
|
156
|
+
};
|
|
157
|
+
G.displayName = "ComboboxListItems";
|
|
158
|
+
const J = r.forwardRef((o, a) => {
|
|
159
|
+
const { children: t = "No results found", ...e } = o;
|
|
160
|
+
return /* @__PURE__ */ c("div", { ref: a, "data-scope": "combobox", "data-part": "list-empty", ...e, children: t });
|
|
161
|
+
});
|
|
162
|
+
J.displayName = "ComboboxListEmpty";
|
|
163
|
+
const x = r.createContext(null), K = r.forwardRef((o, a) => {
|
|
164
|
+
const { item: t, ...e } = o, n = d(), s = n.getItemState({ item: t }), l = n.getItemProps({ item: t });
|
|
165
|
+
return /* @__PURE__ */ c(x.Provider, { value: t, children: /* @__PURE__ */ c(
|
|
166
|
+
"div",
|
|
167
|
+
{
|
|
168
|
+
ref: m(a, l.ref),
|
|
169
|
+
"data-scope": "combobox",
|
|
170
|
+
"data-part": "item",
|
|
171
|
+
"data-value": t.value,
|
|
172
|
+
"data-highlighted": s.highlighted ? "" : void 0,
|
|
173
|
+
"data-state": s.selected ? "checked" : "unchecked",
|
|
174
|
+
"data-disabled": s.disabled ? "" : void 0,
|
|
175
|
+
...l,
|
|
176
|
+
...e,
|
|
177
|
+
children: o.children
|
|
178
|
+
}
|
|
179
|
+
) });
|
|
180
|
+
});
|
|
181
|
+
K.displayName = "ComboboxItem";
|
|
182
|
+
const Q = r.forwardRef((o, a) => {
|
|
183
|
+
const t = r.useContext(x), e = d(), n = t ? e.getItemTextProps({ item: t }) : {};
|
|
184
|
+
return /* @__PURE__ */ c(
|
|
185
|
+
"span",
|
|
186
|
+
{
|
|
187
|
+
ref: m(a, n.ref),
|
|
188
|
+
"data-scope": "combobox",
|
|
189
|
+
"data-part": "item-text",
|
|
190
|
+
...n,
|
|
191
|
+
...o
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
});
|
|
195
|
+
Q.displayName = "ComboboxItemText";
|
|
196
|
+
const U = r.forwardRef(
|
|
197
|
+
(o, a) => {
|
|
198
|
+
const { children: t, ...e } = o, n = r.useContext(x), s = d(), l = n ? s.getItemState({ item: n }) : { selected: !1 }, b = n ? s.getItemIndicatorProps({ item: n }) : {};
|
|
199
|
+
return l.selected ? /* @__PURE__ */ c(
|
|
200
|
+
"span",
|
|
201
|
+
{
|
|
202
|
+
ref: m(a, b.ref),
|
|
203
|
+
"data-scope": "combobox",
|
|
204
|
+
"data-part": "item-indicator",
|
|
205
|
+
"data-state": "checked",
|
|
206
|
+
"aria-hidden": !0,
|
|
207
|
+
...b,
|
|
208
|
+
...e,
|
|
209
|
+
children: t ?? /* @__PURE__ */ c(I, { iconSettings: { builtIn: "LuCheck" } })
|
|
210
|
+
}
|
|
211
|
+
) : null;
|
|
212
|
+
}
|
|
213
|
+
);
|
|
214
|
+
U.displayName = "ComboboxItemIndicator";
|
|
215
|
+
const C = r.createContext(
|
|
216
|
+
null
|
|
217
|
+
);
|
|
218
|
+
function d() {
|
|
219
|
+
const o = r.useContext(C);
|
|
220
|
+
if (!o) throw new Error("Combobox components must be used within ComboboxRoot");
|
|
221
|
+
return o.api;
|
|
222
|
+
}
|
|
223
|
+
function W() {
|
|
224
|
+
const o = r.useContext(C);
|
|
225
|
+
if (!o) throw new Error("Combobox components must be used within ComboboxRoot");
|
|
226
|
+
return o.options;
|
|
227
|
+
}
|
|
228
|
+
const X = r.forwardRef(
|
|
229
|
+
(o, a) => {
|
|
230
|
+
const t = d(), e = t.selectedItems ?? [], n = t.clearValue;
|
|
231
|
+
return e.length === 0 ? null : /* @__PURE__ */ c(
|
|
232
|
+
"div",
|
|
233
|
+
{
|
|
234
|
+
ref: a,
|
|
235
|
+
"data-scope": "combobox",
|
|
236
|
+
"data-part": "selected-tags",
|
|
237
|
+
className: o.className,
|
|
238
|
+
style: o.style,
|
|
239
|
+
children: e.map((s) => /* @__PURE__ */ M("span", { "data-scope": "combobox", "data-part": "tag", children: [
|
|
240
|
+
o.renderTag ? o.renderTag(s) : s.label,
|
|
241
|
+
/* @__PURE__ */ c(
|
|
242
|
+
"button",
|
|
243
|
+
{
|
|
244
|
+
type: "button",
|
|
245
|
+
"data-part": "tag-clear",
|
|
246
|
+
"aria-label": `Remove ${s.label}`,
|
|
247
|
+
onClick: (l) => {
|
|
248
|
+
l.preventDefault(), l.stopPropagation(), n?.(s.value);
|
|
249
|
+
},
|
|
250
|
+
children: /* @__PURE__ */ c(I, { iconSettings: { builtIn: "IoCloseOutline" } })
|
|
251
|
+
}
|
|
252
|
+
)
|
|
253
|
+
] }, s.value))
|
|
254
|
+
}
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
X.displayName = "ComboboxSelectedTags";
|
|
259
|
+
export {
|
|
260
|
+
_ as ComboboxContent,
|
|
261
|
+
D as ComboboxControl,
|
|
262
|
+
F as ComboboxInput,
|
|
263
|
+
K as ComboboxItem,
|
|
264
|
+
U as ComboboxItemIndicator,
|
|
265
|
+
Q as ComboboxItemText,
|
|
266
|
+
$ as ComboboxList,
|
|
267
|
+
J as ComboboxListEmpty,
|
|
268
|
+
G as ComboboxListItems,
|
|
269
|
+
ao as ComboboxPositioner,
|
|
270
|
+
A as ComboboxRoot,
|
|
271
|
+
X as ComboboxSelectedTags,
|
|
272
|
+
H as ComboboxTrigger,
|
|
273
|
+
d as useComboboxApi,
|
|
274
|
+
W as useComboboxOptions
|
|
275
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),o=require("react"),i=require("../utils/generate-uid.cjs"),k=require("../providers/config-provider.cjs"),h=require("dequal");function p(){const{baseSettings:n}=k.useInkeepConfig(),[s,d]=o.useState([]),r=c(n.theme.styles),{customStyles:y,linksCount:a}=o.useMemo(()=>{if(!r||!Array.isArray(r))return{customStyles:null,loaded:!0};const{links:l,styleSheets:m}=r.reduce((e,t)=>(t.type==="link"?e.links.push(t):t.type==="style"&&e.styleSheets.push(t),e),{links:[],styleSheets:[]}),S=m.map(e=>u.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:e.value}},e.key??i.generatePrefixedUniqueId("link_"))),f=l.map(e=>{const t=e.key??i.generatePrefixedUniqueId("stylesheet_");return u.jsx("link",{id:t,rel:"stylesheet",type:"text/css",href:e.value,onLoad:()=>{d(g=>[...new Set([...g,e.value])])}},t)});return{customStyles:u.jsxs(u.Fragment,{children:[f,S]}),linksCount:l.length}},[r]);return{customStyles:y,loaded:s.length>=(a??0)}}function c(n){const s=o.useRef(void 0);return h.dequal(s.current,n)||(s.current=n),s.current}exports.useCompareMemoize=c;exports.useCustomStyles=p;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as l, jsxs as p, Fragment as k } from "react/jsx-runtime";
|
|
3
|
+
import { useState as h, useMemo as S, useRef as g } from "react";
|
|
4
|
+
import { generatePrefixedUniqueId as u } from "../utils/generate-uid.js";
|
|
5
|
+
import { useInkeepConfig as x } from "../providers/config-provider.js";
|
|
6
|
+
import { dequal as L } from "dequal";
|
|
7
|
+
function A() {
|
|
8
|
+
const { baseSettings: n } = x(), [s, i] = h([]), r = C(n.theme.styles), { customStyles: y, linksCount: c } = S(() => {
|
|
9
|
+
if (!r || !Array.isArray(r)) return { customStyles: null, loaded: !0 };
|
|
10
|
+
const { links: o, styleSheets: d } = r.reduce(
|
|
11
|
+
(e, t) => (t.type === "link" ? e.links.push(t) : t.type === "style" && e.styleSheets.push(t), e),
|
|
12
|
+
{ links: [], styleSheets: [] }
|
|
13
|
+
), m = d.map((e) => /* @__PURE__ */ l(
|
|
14
|
+
"style",
|
|
15
|
+
{
|
|
16
|
+
type: "text/css",
|
|
17
|
+
dangerouslySetInnerHTML: { __html: e.value }
|
|
18
|
+
},
|
|
19
|
+
e.key ?? u("link_")
|
|
20
|
+
)), a = o.map((e) => {
|
|
21
|
+
const t = e.key ?? u("stylesheet_");
|
|
22
|
+
return /* @__PURE__ */ l(
|
|
23
|
+
"link",
|
|
24
|
+
{
|
|
25
|
+
id: t,
|
|
26
|
+
rel: "stylesheet",
|
|
27
|
+
type: "text/css",
|
|
28
|
+
href: e.value,
|
|
29
|
+
onLoad: () => {
|
|
30
|
+
i((f) => [.../* @__PURE__ */ new Set([...f, e.value])]);
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
t
|
|
34
|
+
);
|
|
35
|
+
});
|
|
36
|
+
return {
|
|
37
|
+
customStyles: /* @__PURE__ */ p(k, { children: [
|
|
38
|
+
a,
|
|
39
|
+
m
|
|
40
|
+
] }),
|
|
41
|
+
linksCount: o.length
|
|
42
|
+
};
|
|
43
|
+
}, [r]);
|
|
44
|
+
return {
|
|
45
|
+
customStyles: y,
|
|
46
|
+
loaded: s.length >= (c ?? 0)
|
|
47
|
+
// >= in case a url is removed
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function C(n) {
|
|
51
|
+
const s = g(void 0);
|
|
52
|
+
return L(s.current, n) || (s.current = n), s.current;
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
C as useCompareMemoize,
|
|
56
|
+
A as useCustomStyles
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),P=require("react"),m=require("@radix-ui/primitive"),O=require("@radix-ui/react-compose-refs"),H=require("@radix-ui/react-context"),R=require("@radix-ui/react-id"),W=require("@radix-ui/react-use-controllable-state"),z=require("@radix-ui/react-dismissable-layer"),B=require("@zag-js/focus-trap"),K=require("@radix-ui/react-portal"),_=require("@radix-ui/react-presence"),g=require("@radix-ui/react-primitive"),U=require("@radix-ui/react-focus-guards"),V=require("aria-hidden"),Y=require("@zag-js/remove-scroll"),$=require("./shadow/context.cjs");function J(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return n.default=e,Object.freeze(n)}const c=J(P),x="Dialog",[w,Q]=H.createContextScope(x),[X,l]=w(x),y=e=>{const{__scopeDialog:n,children:o,open:s,defaultOpen:r,onOpenChange:t,modal:a=!0}=e,u=c.useRef(null),f=c.useRef(null),[D=!1,d]=W.useControllableState({prop:s,defaultProp:r??!1,onChange:t});return i.jsx(X,{scope:n,triggerRef:u,contentRef:f,contentId:R.useId(),titleId:R.useId(),descriptionId:R.useId(),open:D,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(N=>!N),[d]),modal:a,children:o})};y.displayName=x;const M="DialogTrigger",q=c.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,r=l(M,o),t=O.useComposedRefs(n,r.triggerRef);return i.jsx(g.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":T(r.open),...s,ref:t,onClick:m.composeEventHandlers(e.onClick,r.onOpenToggle)})});q.displayName=M;const v="DialogPortal",[Z,S]=w(v,{forceMount:void 0}),E=e=>{const{__scopeDialog:n,forceMount:o,children:s,container:r}=e,t=l(v,n);return i.jsx(Z,{scope:n,forceMount:o,children:c.Children.map(s,a=>i.jsx(_.Presence,{present:o||t.open,children:i.jsx(K.Portal,{asChild:!0,container:r,children:a})}))})};E.displayName=v;const C="DialogOverlay",I=c.forwardRef((e,n)=>{const o=S(C,e.__scopeDialog),{forceMount:s=o.forceMount,...r}=e,t=l(C,e.__scopeDialog);return t.modal?i.jsx(_.Presence,{present:s||t.open,children:i.jsx(ee,{...r,ref:n})}):null});I.displayName=C;const ee=c.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,r=l(C,o),t=$.useShadow();return P.useEffect(()=>{t&&Y.preventBodyScroll(t?.rootElement?.ownerDocument)},[t]),i.jsx(g.Primitive.div,{"data-state":T(r.open),...s,ref:n,style:{pointerEvents:"auto",...s.style}})}),p="DialogContent",h=c.forwardRef((e,n)=>{const o=S(p,e.__scopeDialog),{forceMount:s=o.forceMount,...r}=e,t=l(p,e.__scopeDialog);return i.jsx(_.Presence,{present:s||t.open,children:t.modal?i.jsx(te,{...r,ref:n}):i.jsx(oe,{...r,ref:n})})});h.displayName=p;const te=c.forwardRef((e,n)=>{const o=l(p,e.__scopeDialog),s=c.useRef(null),r=O.useComposedRefs(n,o.contentRef,s);return c.useEffect(()=>{const t=s.current;if(t){const a=document.querySelectorAll("[data-ikp-component]");return V.hideOthers([t,...Array.from(a)])}},[]),i.jsx(k,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:!0,onPointerDownOutside:m.composeEventHandlers(e.onPointerDownOutside,t=>{const a=t.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0;(a.button===2||u)&&t.preventDefault(),t.target.closest("[data-ikp-component]")&&t.preventDefault()}),onFocusOutside:m.composeEventHandlers(e.onFocusOutside,t=>t.preventDefault())})}),oe=c.forwardRef((e,n)=>{const o=l(p,e.__scopeDialog),s=c.useRef(!1),r=c.useRef(!1);return i.jsx(k,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(s.current=!0,t.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=t.target;o.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type==="focusin"&&r.current&&t.preventDefault()}})}),k=c.forwardRef((e,n)=>{const{__scopeDialog:o,trapFocus:s,onOpenAutoFocus:r,onCloseAutoFocus:t,...a}=e,u=l(p,o),f=c.useRef(null),D=O.useComposedRefs(n,f);return U.useFocusGuards(),P.useEffect(()=>{if(s)return B.trapFocus(f.current,{preventScroll:!0,onActivate:r,onDeactivate:t,initialFocus:!1,allowOutsideClick:d=>!!d.target.closest("[data-ikp-component]")})},[]),i.jsx(z.DismissableLayer,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":T(u.open),...a,ref:D,onDismiss:()=>u.onOpenChange(!1)})}),A="DialogTitle",b=c.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,r=l(A,o);return i.jsx(g.Primitive.h2,{id:r.titleId,...s,ref:n})});b.displayName=A;const F="DialogDescription",L=c.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,r=l(F,o);return i.jsx(g.Primitive.p,{id:r.descriptionId,...s,ref:n})});L.displayName=F;const G="DialogClose",j=c.forwardRef((e,n)=>{const{__scopeDialog:o,...s}=e,r=l(G,o);return i.jsx(g.Primitive.button,{type:"button",...s,ref:n,onClick:m.composeEventHandlers(e.onClick,()=>r.onOpenChange(!1))})});j.displayName=G;function T(e){return e?"open":"closed"}const ne=y,re=E,se=I,ce=h,ie=b,ae=j;exports.Close=ae;exports.Content=ce;exports.Dialog=y;exports.DialogClose=j;exports.DialogContent=h;exports.DialogDescription=L;exports.DialogOverlay=I;exports.DialogPortal=E;exports.DialogTitle=b;exports.DialogTrigger=q;exports.Overlay=se;exports.Portal=re;exports.Root=ne;exports.Title=ie;exports.createDialogScope=Q;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
|
|
2
|
+
import { TrapFocusOptions } from '@zag-js/focus-trap';
|
|
3
|
+
import { Portal as PortalPrimitive } from '@radix-ui/react-portal';
|
|
4
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
5
|
+
import { CreateScope } from '@radix-ui/react-context';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
declare const createDialogScope: CreateScope;
|
|
8
|
+
interface DialogProps {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
open?: boolean;
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
onOpenChange?(open: boolean): void;
|
|
13
|
+
modal?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const Dialog: React.FC<DialogProps>;
|
|
16
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
17
|
+
interface DialogTriggerProps extends PrimitiveButtonProps {
|
|
18
|
+
}
|
|
19
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
type PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;
|
|
21
|
+
interface DialogPortalProps {
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Specify a container element to portal the content into.
|
|
25
|
+
*/
|
|
26
|
+
container?: PortalProps['container'];
|
|
27
|
+
/**
|
|
28
|
+
* Used to force mounting when more control is needed. Useful when
|
|
29
|
+
* controlling animation with React animation libraries.
|
|
30
|
+
*/
|
|
31
|
+
forceMount?: true;
|
|
32
|
+
}
|
|
33
|
+
declare const DialogPortal: React.FC<DialogPortalProps>;
|
|
34
|
+
interface DialogOverlayProps extends DialogOverlayImplProps {
|
|
35
|
+
/**
|
|
36
|
+
* Used to force mounting when more control is needed. Useful when
|
|
37
|
+
* controlling animation with React animation libraries.
|
|
38
|
+
*/
|
|
39
|
+
forceMount?: true;
|
|
40
|
+
}
|
|
41
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
43
|
+
interface DialogOverlayImplProps extends PrimitiveDivProps {
|
|
44
|
+
}
|
|
45
|
+
interface DialogContentProps extends DialogContentTypeProps {
|
|
46
|
+
/**
|
|
47
|
+
* Used to force mounting when more control is needed. Useful when
|
|
48
|
+
* controlling animation with React animation libraries.
|
|
49
|
+
*/
|
|
50
|
+
forceMount?: true;
|
|
51
|
+
}
|
|
52
|
+
declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
interface DialogContentTypeProps extends Omit<DialogContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {
|
|
54
|
+
}
|
|
55
|
+
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
56
|
+
interface DialogContentImplProps extends Omit<DismissableLayerProps, 'onDismiss'> {
|
|
57
|
+
/**
|
|
58
|
+
* When `true`, focus cannot escape the `Content` via keyboard,
|
|
59
|
+
* pointer, or a programmatic focus.
|
|
60
|
+
* @defaultValue false
|
|
61
|
+
*/
|
|
62
|
+
trapFocus?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Event handler called when auto-focusing on open.
|
|
65
|
+
* Can be prevented.
|
|
66
|
+
*/
|
|
67
|
+
onOpenAutoFocus?: TrapFocusOptions['onActivate'];
|
|
68
|
+
/**
|
|
69
|
+
* Event handler called when auto-focusing on close.
|
|
70
|
+
* Can be prevented.
|
|
71
|
+
*/
|
|
72
|
+
onCloseAutoFocus?: TrapFocusOptions['onDeactivate'];
|
|
73
|
+
}
|
|
74
|
+
type PrimitiveHeading2Props = React.ComponentPropsWithoutRef<typeof Primitive.h2>;
|
|
75
|
+
interface DialogTitleProps extends PrimitiveHeading2Props {
|
|
76
|
+
}
|
|
77
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
78
|
+
type PrimitiveParagraphProps = React.ComponentPropsWithoutRef<typeof Primitive.p>;
|
|
79
|
+
interface DialogDescriptionProps extends PrimitiveParagraphProps {
|
|
80
|
+
}
|
|
81
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
82
|
+
interface DialogCloseProps extends PrimitiveButtonProps {
|
|
83
|
+
}
|
|
84
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
85
|
+
declare const Root: React.FC<DialogProps>;
|
|
86
|
+
declare const Trigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
87
|
+
declare const Portal: React.FC<DialogPortalProps>;
|
|
88
|
+
declare const Overlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
89
|
+
declare const Content: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
90
|
+
declare const Title: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
91
|
+
declare const Description: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
92
|
+
declare const Close: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
93
|
+
export { createDialogScope, Dialog, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, Root, Trigger, Portal, Overlay, Content, Title, Description, Close, };
|
|
94
|
+
export type { DialogProps, DialogTriggerProps, DialogPortalProps, DialogOverlayProps, DialogContentProps, DialogTitleProps, DialogDescriptionProps, DialogCloseProps, };
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import * as i from "react";
|
|
4
|
+
import { useEffect as I } from "react";
|
|
5
|
+
import { composeEventHandlers as D } from "@radix-ui/primitive";
|
|
6
|
+
import { useComposedRefs as _ } from "@radix-ui/react-compose-refs";
|
|
7
|
+
import { createContextScope as W } from "@radix-ui/react-context";
|
|
8
|
+
import { useId as R } from "@radix-ui/react-id";
|
|
9
|
+
import { useControllableState as $ } from "@radix-ui/react-use-controllable-state";
|
|
10
|
+
import { DismissableLayer as j } from "@radix-ui/react-dismissable-layer";
|
|
11
|
+
import { trapFocus as q } from "@zag-js/focus-trap";
|
|
12
|
+
import { Portal as B } from "@radix-ui/react-portal";
|
|
13
|
+
import { Presence as O } from "@radix-ui/react-presence";
|
|
14
|
+
import { Primitive as g } from "@radix-ui/react-primitive";
|
|
15
|
+
import { useFocusGuards as H } from "@radix-ui/react-focus-guards";
|
|
16
|
+
import { hideOthers as K } from "aria-hidden";
|
|
17
|
+
import { preventBodyScroll as V } from "@zag-js/remove-scroll";
|
|
18
|
+
import { useShadow as Y } from "./shadow/context.js";
|
|
19
|
+
const P = "Dialog", [v, Ct] = W(P), [z, l] = v(P), x = (t) => {
|
|
20
|
+
const { __scopeDialog: n, children: r, open: s, defaultOpen: e, onOpenChange: o, modal: a = !0 } = t, p = i.useRef(null), d = i.useRef(null), [m = !1, f] = $({
|
|
21
|
+
prop: s,
|
|
22
|
+
defaultProp: e ?? !1,
|
|
23
|
+
onChange: o
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ c(
|
|
26
|
+
z,
|
|
27
|
+
{
|
|
28
|
+
scope: n,
|
|
29
|
+
triggerRef: p,
|
|
30
|
+
contentRef: d,
|
|
31
|
+
contentId: R(),
|
|
32
|
+
titleId: R(),
|
|
33
|
+
descriptionId: R(),
|
|
34
|
+
open: m,
|
|
35
|
+
onOpenChange: f,
|
|
36
|
+
onOpenToggle: i.useCallback(() => f((E) => !E), [f]),
|
|
37
|
+
modal: a,
|
|
38
|
+
children: r
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
x.displayName = P;
|
|
43
|
+
const N = "DialogTrigger", J = i.forwardRef(
|
|
44
|
+
(t, n) => {
|
|
45
|
+
const { __scopeDialog: r, ...s } = t, e = l(N, r), o = _(n, e.triggerRef);
|
|
46
|
+
return /* @__PURE__ */ c(
|
|
47
|
+
g.button,
|
|
48
|
+
{
|
|
49
|
+
type: "button",
|
|
50
|
+
"aria-haspopup": "dialog",
|
|
51
|
+
"aria-expanded": e.open,
|
|
52
|
+
"aria-controls": e.contentId,
|
|
53
|
+
"data-state": h(e.open),
|
|
54
|
+
...s,
|
|
55
|
+
ref: o,
|
|
56
|
+
onClick: D(t.onClick, e.onOpenToggle)
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
J.displayName = N;
|
|
62
|
+
const y = "DialogPortal", [Q, w] = v(y, {
|
|
63
|
+
forceMount: void 0
|
|
64
|
+
}), T = (t) => {
|
|
65
|
+
const { __scopeDialog: n, forceMount: r, children: s, container: e } = t, o = l(y, n);
|
|
66
|
+
return /* @__PURE__ */ c(Q, { scope: n, forceMount: r, children: i.Children.map(s, (a) => /* @__PURE__ */ c(O, { present: r || o.open, children: /* @__PURE__ */ c(B, { asChild: !0, container: e, children: a }) })) });
|
|
67
|
+
};
|
|
68
|
+
T.displayName = y;
|
|
69
|
+
const C = "DialogOverlay", A = i.forwardRef(
|
|
70
|
+
(t, n) => {
|
|
71
|
+
const r = w(C, t.__scopeDialog), { forceMount: s = r.forceMount, ...e } = t, o = l(C, t.__scopeDialog);
|
|
72
|
+
return o.modal ? /* @__PURE__ */ c(O, { present: s || o.open, children: /* @__PURE__ */ c(U, { ...e, ref: n }) }) : null;
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
A.displayName = C;
|
|
76
|
+
const U = i.forwardRef(
|
|
77
|
+
(t, n) => {
|
|
78
|
+
const { __scopeDialog: r, ...s } = t, e = l(C, r), o = Y();
|
|
79
|
+
return I(() => {
|
|
80
|
+
o && V(o?.rootElement?.ownerDocument);
|
|
81
|
+
}, [o]), // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
82
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
83
|
+
// <RemoveScroll
|
|
84
|
+
// as={Slot}
|
|
85
|
+
// allowPinchZoom
|
|
86
|
+
// shards={[context.contentRef]}
|
|
87
|
+
// gapMode="padding"
|
|
88
|
+
// removeScrollBar={true}
|
|
89
|
+
// >
|
|
90
|
+
/* @__PURE__ */ c(
|
|
91
|
+
g.div,
|
|
92
|
+
{
|
|
93
|
+
"data-state": h(e.open),
|
|
94
|
+
...s,
|
|
95
|
+
ref: n,
|
|
96
|
+
style: { pointerEvents: "auto", ...s.style }
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
), u = "DialogContent", M = i.forwardRef(
|
|
101
|
+
(t, n) => {
|
|
102
|
+
const r = w(u, t.__scopeDialog), { forceMount: s = r.forceMount, ...e } = t, o = l(u, t.__scopeDialog);
|
|
103
|
+
return /* @__PURE__ */ c(O, { present: s || o.open, children: o.modal ? /* @__PURE__ */ c(X, { ...e, ref: n }) : /* @__PURE__ */ c(Z, { ...e, ref: n }) });
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
M.displayName = u;
|
|
107
|
+
const X = i.forwardRef(
|
|
108
|
+
(t, n) => {
|
|
109
|
+
const r = l(u, t.__scopeDialog), s = i.useRef(null), e = _(n, r.contentRef, s);
|
|
110
|
+
return i.useEffect(() => {
|
|
111
|
+
const o = s.current;
|
|
112
|
+
if (o) {
|
|
113
|
+
const a = document.querySelectorAll("[data-ikp-component]");
|
|
114
|
+
return K([o, ...Array.from(a)]);
|
|
115
|
+
}
|
|
116
|
+
}, []), /* @__PURE__ */ c(
|
|
117
|
+
b,
|
|
118
|
+
{
|
|
119
|
+
...t,
|
|
120
|
+
ref: e,
|
|
121
|
+
trapFocus: r.open,
|
|
122
|
+
disableOutsidePointerEvents: !0,
|
|
123
|
+
onPointerDownOutside: D(t.onPointerDownOutside, (o) => {
|
|
124
|
+
const a = o.detail.originalEvent, p = a.button === 0 && a.ctrlKey === !0;
|
|
125
|
+
(a.button === 2 || p) && o.preventDefault(), o.target.closest("[data-ikp-component]") && o.preventDefault();
|
|
126
|
+
}),
|
|
127
|
+
onFocusOutside: D(
|
|
128
|
+
t.onFocusOutside,
|
|
129
|
+
(o) => o.preventDefault()
|
|
130
|
+
)
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
), Z = i.forwardRef(
|
|
135
|
+
(t, n) => {
|
|
136
|
+
const r = l(u, t.__scopeDialog), s = i.useRef(!1), e = i.useRef(!1);
|
|
137
|
+
return /* @__PURE__ */ c(
|
|
138
|
+
b,
|
|
139
|
+
{
|
|
140
|
+
...t,
|
|
141
|
+
ref: n,
|
|
142
|
+
trapFocus: !1,
|
|
143
|
+
disableOutsidePointerEvents: !1,
|
|
144
|
+
onInteractOutside: (o) => {
|
|
145
|
+
t.onInteractOutside?.(o), o.defaultPrevented || (s.current = !0, o.detail.originalEvent.type === "pointerdown" && (e.current = !0));
|
|
146
|
+
const a = o.target;
|
|
147
|
+
r.triggerRef.current?.contains(a) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && e.current && o.preventDefault();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
), b = i.forwardRef(
|
|
153
|
+
(t, n) => {
|
|
154
|
+
const { __scopeDialog: r, trapFocus: s, onOpenAutoFocus: e, onCloseAutoFocus: o, ...a } = t, p = l(u, r), d = i.useRef(null), m = _(n, d);
|
|
155
|
+
return H(), I(() => {
|
|
156
|
+
if (s)
|
|
157
|
+
return q(d.current, {
|
|
158
|
+
preventScroll: !0,
|
|
159
|
+
onActivate: e,
|
|
160
|
+
onDeactivate: o,
|
|
161
|
+
initialFocus: !1,
|
|
162
|
+
allowOutsideClick: (f) => !!f.target.closest("[data-ikp-component]")
|
|
163
|
+
});
|
|
164
|
+
}, []), /* @__PURE__ */ c(
|
|
165
|
+
j,
|
|
166
|
+
{
|
|
167
|
+
role: "dialog",
|
|
168
|
+
id: p.contentId,
|
|
169
|
+
"aria-describedby": p.descriptionId,
|
|
170
|
+
"aria-labelledby": p.titleId,
|
|
171
|
+
"data-state": h(p.open),
|
|
172
|
+
...a,
|
|
173
|
+
ref: m,
|
|
174
|
+
onDismiss: () => p.onOpenChange(!1)
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
), k = "DialogTitle", F = i.forwardRef(
|
|
179
|
+
(t, n) => {
|
|
180
|
+
const { __scopeDialog: r, ...s } = t, e = l(k, r);
|
|
181
|
+
return /* @__PURE__ */ c(g.h2, { id: e.titleId, ...s, ref: n });
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
F.displayName = k;
|
|
185
|
+
const S = "DialogDescription", tt = i.forwardRef(
|
|
186
|
+
(t, n) => {
|
|
187
|
+
const { __scopeDialog: r, ...s } = t, e = l(S, r);
|
|
188
|
+
return /* @__PURE__ */ c(g.p, { id: e.descriptionId, ...s, ref: n });
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
tt.displayName = S;
|
|
192
|
+
const L = "DialogClose", G = i.forwardRef(
|
|
193
|
+
(t, n) => {
|
|
194
|
+
const { __scopeDialog: r, ...s } = t, e = l(L, r);
|
|
195
|
+
return /* @__PURE__ */ c(
|
|
196
|
+
g.button,
|
|
197
|
+
{
|
|
198
|
+
type: "button",
|
|
199
|
+
...s,
|
|
200
|
+
ref: n,
|
|
201
|
+
onClick: D(t.onClick, () => e.onOpenChange(!1))
|
|
202
|
+
}
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
G.displayName = L;
|
|
207
|
+
function h(t) {
|
|
208
|
+
return t ? "open" : "closed";
|
|
209
|
+
}
|
|
210
|
+
const Rt = x, _t = T, Ot = A, Pt = M, yt = F, ht = G;
|
|
211
|
+
export {
|
|
212
|
+
ht as Close,
|
|
213
|
+
Pt as Content,
|
|
214
|
+
x as Dialog,
|
|
215
|
+
G as DialogClose,
|
|
216
|
+
M as DialogContent,
|
|
217
|
+
tt as DialogDescription,
|
|
218
|
+
A as DialogOverlay,
|
|
219
|
+
T as DialogPortal,
|
|
220
|
+
F as DialogTitle,
|
|
221
|
+
J as DialogTrigger,
|
|
222
|
+
Ot as Overlay,
|
|
223
|
+
_t as Portal,
|
|
224
|
+
Rt as Root,
|
|
225
|
+
yt as Title,
|
|
226
|
+
Ct as createDialogScope
|
|
227
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react-error-boundary"),a=()=>null,c=({children:r})=>{const o=(n,e)=>{console.warn(n),console.warn(e)};return t.jsx(u.ErrorBoundary,{FallbackComponent:a,onError:o,children:r})};exports.ErrorBoundary=c;
|