@nadicodeai/ui 12.1.62 → 12.1.63
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/AGENTS.md +14 -8
- package/NOTICE +5 -11
- package/README.md +9 -17
- package/dist/components/agent-profile.d.ts +86 -0
- package/dist/components/agent-profile.d.ts.map +1 -0
- package/dist/components/agent-profile.js +60 -0
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/app-mark.d.ts +35 -17
- package/dist/components/app-mark.d.ts.map +1 -1
- package/dist/components/app-mark.js +34 -70
- package/dist/components/card.js +3 -3
- package/dist/components/checkbox.js +1 -1
- package/dist/components/collection-filters.d.ts +5 -0
- package/dist/components/collection-filters.d.ts.map +1 -1
- package/dist/components/collection-filters.js +15 -1
- package/dist/components/collection-search.d.ts +10 -0
- package/dist/components/collection-search.d.ts.map +1 -0
- package/dist/components/collection-search.js +8 -0
- package/dist/components/collection-sort.d.ts +18 -0
- package/dist/components/collection-sort.d.ts.map +1 -0
- package/dist/components/collection-sort.js +19 -0
- package/dist/components/collection-toolbar.d.ts +7 -1
- package/dist/components/collection-toolbar.d.ts.map +1 -1
- package/dist/components/collection-toolbar.js +16 -2
- package/dist/components/combobox.js +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/confirm-dialog.d.ts +3 -1
- package/dist/components/confirm-dialog.d.ts.map +1 -1
- package/dist/components/confirm-dialog.js +3 -2
- package/dist/components/data-table.d.ts +154 -0
- package/dist/components/data-table.d.ts.map +1 -0
- package/dist/components/data-table.js +283 -0
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.js +1 -1
- package/dist/components/dropdown-menu.d.ts +9 -1
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +10 -2
- package/dist/components/empty-art.d.ts +17 -0
- package/dist/components/empty-art.d.ts.map +1 -0
- package/dist/components/empty-art.js +29 -0
- package/dist/components/empty-state.d.ts +38 -0
- package/dist/components/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state.js +14 -0
- package/dist/components/feedback-state.d.ts +1 -1
- package/dist/components/feedback-state.d.ts.map +1 -1
- package/dist/components/feedback-state.js +1 -1
- package/dist/components/field.d.ts.map +1 -1
- package/dist/components/field.js +3 -1
- package/dist/components/form-drawer.d.ts +62 -0
- package/dist/components/form-drawer.d.ts.map +1 -0
- package/dist/components/form-drawer.js +35 -0
- package/dist/components/hover-card.js +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/message-notice.d.ts +18 -0
- package/dist/components/message-notice.d.ts.map +1 -0
- package/dist/components/message-notice.js +19 -0
- package/dist/components/model-mark.d.ts +5 -0
- package/dist/components/model-mark.d.ts.map +1 -1
- package/dist/components/model-mark.js +79 -74
- package/dist/components/object-workspace.d.ts +20 -8
- package/dist/components/object-workspace.d.ts.map +1 -1
- package/dist/components/object-workspace.js +10 -5
- package/dist/components/page-actions.d.ts +65 -0
- package/dist/components/page-actions.d.ts.map +1 -0
- package/dist/components/page-actions.js +76 -0
- package/dist/components/page-header.d.ts +14 -0
- package/dist/components/page-header.d.ts.map +1 -0
- package/dist/components/page-header.js +14 -0
- package/dist/components/platform-mark.d.ts +36 -0
- package/dist/components/platform-mark.d.ts.map +1 -0
- package/dist/components/platform-mark.js +49 -0
- package/dist/components/popover.js +1 -1
- package/dist/components/product-message.d.ts +33 -0
- package/dist/components/product-message.d.ts.map +1 -0
- package/dist/components/product-message.js +8 -0
- package/dist/components/select.js +1 -1
- package/dist/components/settings-facts.d.ts.map +1 -1
- package/dist/components/settings-facts.js +2 -1
- package/dist/components/sheet.js +1 -1
- package/dist/components/sonner.js +1 -1
- package/dist/components/status-badge.d.ts +15 -0
- package/dist/components/status-badge.d.ts.map +1 -0
- package/dist/components/status-badge.js +29 -0
- package/dist/components/table.js +2 -2
- package/dist/components/tag.d.ts +15 -0
- package/dist/components/tag.d.ts.map +1 -0
- package/dist/components/tag.js +12 -0
- package/dist/components/toast.d.ts +6 -2
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/components/toast.js +12 -4
- package/dist/components/tooltip.js +1 -1
- package/dist/eslint/index.js +4 -0
- package/dist/eslint/rules/no-global-patch.js +115 -0
- package/dist/eslint/rules/no-write-in-subscription.js +139 -0
- package/dist/index.d.ts +12 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -4
- package/dist/internal/empty.d.ts +25 -0
- package/dist/internal/empty.d.ts.map +1 -0
- package/dist/internal/empty.js +41 -0
- package/dist/internal/footer-strip.js +1 -1
- package/dist/internal/menu-surface.d.ts +1 -1
- package/dist/internal/menu-surface.js +1 -1
- package/dist/model-marks/ace.js +1 -0
- package/dist/model-marks/adobe-color.js +1 -0
- package/dist/model-marks/adobe.js +1 -0
- package/dist/model-marks/adobefirefly-color.js +1 -0
- package/dist/model-marks/adobefirefly.js +1 -0
- package/dist/model-marks/agentvoice-color.js +1 -0
- package/dist/model-marks/agentvoice.js +1 -0
- package/dist/model-marks/agnesai.js +1 -0
- package/dist/model-marks/agui.js +1 -0
- package/dist/model-marks/ai2-color.js +1 -0
- package/dist/model-marks/ai2.js +1 -0
- package/dist/model-marks/ai21.js +1 -0
- package/dist/model-marks/ai302-color.js +1 -0
- package/dist/model-marks/ai302.js +1 -0
- package/dist/model-marks/ai360-color.js +1 -0
- package/dist/model-marks/ai360.js +1 -0
- package/dist/model-marks/aihubmix-color.js +1 -0
- package/dist/model-marks/aihubmix.js +1 -0
- package/dist/model-marks/aimass-color.js +1 -0
- package/dist/model-marks/aimass.js +1 -0
- package/dist/model-marks/aionlabs-color.js +1 -0
- package/dist/model-marks/aionlabs.js +1 -0
- package/dist/model-marks/airjelly-color.js +1 -0
- package/dist/model-marks/airjelly.js +1 -0
- package/dist/model-marks/aistudio.js +1 -0
- package/dist/model-marks/akashchat-color.js +1 -0
- package/dist/model-marks/akashchat.js +1 -0
- package/dist/model-marks/alephalpha.js +1 -0
- package/dist/model-marks/alibaba-color.js +1 -0
- package/dist/model-marks/alibaba.js +1 -0
- package/dist/model-marks/alibabacloud-color.js +1 -0
- package/dist/model-marks/alibabacloud.js +1 -0
- package/dist/model-marks/amdradeoncloud-color.js +1 -0
- package/dist/model-marks/amdradeoncloud.js +1 -0
- package/dist/model-marks/amp-color.js +1 -0
- package/dist/model-marks/amp.js +1 -0
- package/dist/model-marks/anspire-color.js +1 -0
- package/dist/model-marks/anspire.js +1 -0
- package/dist/model-marks/antgroup-color.js +1 -0
- package/dist/model-marks/antgroup.js +1 -0
- package/dist/model-marks/anthropic.js +1 -0
- package/dist/model-marks/antigravity-color.js +1 -0
- package/dist/model-marks/antigravity.js +1 -0
- package/dist/model-marks/anyscale-color.js +1 -0
- package/dist/model-marks/anyscale.js +1 -0
- package/dist/model-marks/apertis-color.js +1 -0
- package/dist/model-marks/apertis.js +1 -0
- package/dist/model-marks/apple.js +1 -0
- package/dist/model-marks/arcee-color.js +1 -0
- package/dist/model-marks/arcee.js +1 -0
- package/dist/model-marks/askverdict-color.js +1 -0
- package/dist/model-marks/askverdict.js +1 -0
- package/dist/model-marks/assemblyai-color.js +1 -0
- package/dist/model-marks/assemblyai.js +1 -0
- package/dist/model-marks/atlascloud.js +1 -0
- package/dist/model-marks/automatic-color.js +1 -0
- package/dist/model-marks/automatic.js +1 -0
- package/dist/model-marks/aws-color.js +1 -0
- package/dist/model-marks/aws.js +1 -0
- package/dist/model-marks/aya-color.js +1 -0
- package/dist/model-marks/aya.js +1 -0
- package/dist/model-marks/azure-color.js +1 -0
- package/dist/model-marks/azure.js +1 -0
- package/dist/model-marks/azureai-color.js +1 -0
- package/dist/model-marks/azureai.js +1 -0
- package/dist/model-marks/baai.js +1 -0
- package/dist/model-marks/baichuan-color.js +1 -0
- package/dist/model-marks/baichuan.js +1 -0
- package/dist/model-marks/baidu-color.js +1 -0
- package/dist/model-marks/baidu.js +1 -0
- package/dist/model-marks/baiducloud-color.js +1 -0
- package/dist/model-marks/baiducloud.js +1 -0
- package/dist/model-marks/bailian-color.js +1 -0
- package/dist/model-marks/bailian.js +1 -0
- package/dist/model-marks/baseten.js +1 -0
- package/dist/model-marks/bedrock-color.js +1 -0
- package/dist/model-marks/bedrock.js +1 -0
- package/dist/model-marks/bfl.js +1 -0
- package/dist/model-marks/bilibili-color.js +1 -0
- package/dist/model-marks/bilibili.js +1 -0
- package/dist/model-marks/bilibiliindex.js +1 -0
- package/dist/model-marks/bing-color.js +1 -0
- package/dist/model-marks/bing.js +1 -0
- package/dist/model-marks/bocha-color.js +1 -0
- package/dist/model-marks/bocha.js +1 -0
- package/dist/model-marks/brave-color.js +1 -0
- package/dist/model-marks/brave.js +1 -0
- package/dist/model-marks/briaai-color.js +1 -0
- package/dist/model-marks/briaai.js +1 -0
- package/dist/model-marks/browserless.js +1 -0
- package/dist/model-marks/burncloud-color.js +1 -0
- package/dist/model-marks/burncloud.js +1 -0
- package/dist/model-marks/bytedance-color.js +1 -0
- package/dist/model-marks/bytedance.js +1 -0
- package/dist/model-marks/capcut.js +1 -0
- package/dist/model-marks/celestoai-color.js +1 -0
- package/dist/model-marks/celestoai.js +1 -0
- package/dist/model-marks/centml-color.js +1 -0
- package/dist/model-marks/centml.js +1 -0
- package/dist/model-marks/cerebras-color.js +1 -0
- package/dist/model-marks/cerebras.js +1 -0
- package/dist/model-marks/chatglm-color.js +1 -0
- package/dist/model-marks/chatglm.js +1 -0
- package/dist/model-marks/cherrystudio-color.js +1 -0
- package/dist/model-marks/cherrystudio.js +1 -0
- package/dist/model-marks/chutes.js +1 -0
- package/dist/model-marks/civitai-color.js +1 -0
- package/dist/model-marks/civitai.js +1 -0
- package/dist/model-marks/claude-color.js +1 -0
- package/dist/model-marks/claude.js +1 -0
- package/dist/model-marks/claudecode-color.js +1 -0
- package/dist/model-marks/claudecode.js +1 -0
- package/dist/model-marks/cline.js +1 -0
- package/dist/model-marks/clipdrop.js +1 -0
- package/dist/model-marks/cloudflare-color.js +1 -0
- package/dist/model-marks/cloudflare.js +1 -0
- package/dist/model-marks/codebuddy-color.js +1 -0
- package/dist/model-marks/codebuddy.js +1 -0
- package/dist/model-marks/codeflicker-color.js +1 -0
- package/dist/model-marks/codeflicker.js +1 -0
- package/dist/model-marks/codegeex-color.js +1 -0
- package/dist/model-marks/codegeex.js +1 -0
- package/dist/model-marks/codex-color.js +1 -0
- package/dist/model-marks/codex.js +1 -0
- package/dist/model-marks/cogvideo-color.js +1 -0
- package/dist/model-marks/cogvideo.js +1 -0
- package/dist/model-marks/cogview-color.js +1 -0
- package/dist/model-marks/cogview.js +1 -0
- package/dist/model-marks/cohere-color.js +1 -0
- package/dist/model-marks/cohere.js +1 -0
- package/dist/model-marks/colab-color.js +1 -0
- package/dist/model-marks/colab.js +1 -0
- package/dist/model-marks/cometapi-color.js +1 -0
- package/dist/model-marks/cometapi.js +1 -0
- package/dist/model-marks/comfyui-color.js +1 -0
- package/dist/model-marks/comfyui.js +1 -0
- package/dist/model-marks/commanda-color.js +1 -0
- package/dist/model-marks/commanda.js +1 -0
- package/dist/model-marks/commandcode.js +1 -0
- package/dist/model-marks/copilot-color.js +1 -0
- package/dist/model-marks/copilot.js +1 -0
- package/dist/model-marks/copilotkit-color.js +1 -0
- package/dist/model-marks/copilotkit.js +1 -0
- package/dist/model-marks/coqui-color.js +1 -0
- package/dist/model-marks/coqui.js +1 -0
- package/dist/model-marks/coze.js +1 -0
- package/dist/model-marks/crewai-color.js +1 -0
- package/dist/model-marks/crewai.js +1 -0
- package/dist/model-marks/crusoe-color.js +1 -0
- package/dist/model-marks/crusoe.js +1 -0
- package/dist/model-marks/cursor.js +1 -0
- package/dist/model-marks/cybercut.js +1 -0
- package/dist/model-marks/dalle-color.js +1 -0
- package/dist/model-marks/dalle.js +1 -0
- package/dist/model-marks/dbrx-color.js +1 -0
- package/dist/model-marks/dbrx.js +1 -0
- package/dist/model-marks/decart-color.js +1 -0
- package/dist/model-marks/decart.js +1 -0
- package/dist/model-marks/deepai.js +1 -0
- package/dist/model-marks/deepcogito-color.js +1 -0
- package/dist/model-marks/deepcogito.js +1 -0
- package/dist/model-marks/deepinfra-color.js +1 -0
- package/dist/model-marks/deepinfra.js +1 -0
- package/dist/model-marks/deepl-color.js +1 -0
- package/dist/model-marks/deepl.js +1 -0
- package/dist/model-marks/deepmind-color.js +1 -0
- package/dist/model-marks/deepmind.js +1 -0
- package/dist/model-marks/deepseek-color.js +1 -0
- package/dist/model-marks/deepseek.js +1 -0
- package/dist/model-marks/devin-color.js +1 -0
- package/dist/model-marks/devin.js +1 -0
- package/dist/model-marks/dify-color.js +1 -0
- package/dist/model-marks/dify.js +1 -0
- package/dist/model-marks/digitalocean.js +1 -0
- package/dist/model-marks/doc2x-color.js +1 -0
- package/dist/model-marks/doc2x.js +1 -0
- package/dist/model-marks/docsearch-color.js +1 -0
- package/dist/model-marks/docsearch.js +1 -0
- package/dist/model-marks/dolphin.js +1 -0
- package/dist/model-marks/dotsstudio.js +1 -0
- package/dist/model-marks/doubao-color.js +1 -0
- package/dist/model-marks/doubao.js +1 -0
- package/dist/model-marks/dreammachine.js +1 -0
- package/dist/model-marks/elevenlabs.js +1 -0
- package/dist/model-marks/elevenx.js +1 -0
- package/dist/model-marks/essentialai-color.js +1 -0
- package/dist/model-marks/essentialai.js +1 -0
- package/dist/model-marks/exa-color.js +1 -0
- package/dist/model-marks/exa.js +1 -0
- package/dist/model-marks/fal-color.js +1 -0
- package/dist/model-marks/fal.js +1 -0
- package/dist/model-marks/fastgpt-color.js +1 -0
- package/dist/model-marks/fastgpt.js +1 -0
- package/dist/model-marks/featherless-color.js +1 -0
- package/dist/model-marks/featherless.js +1 -0
- package/dist/model-marks/figma-color.js +1 -0
- package/dist/model-marks/figma.js +1 -0
- package/dist/model-marks/firecrawl-color.js +1 -0
- package/dist/model-marks/firecrawl.js +1 -0
- package/dist/model-marks/fireworks-color.js +1 -0
- package/dist/model-marks/fireworks.js +1 -0
- package/dist/model-marks/fishaudio.js +1 -0
- package/dist/model-marks/flora.js +1 -0
- package/dist/model-marks/flowith.js +1 -0
- package/dist/model-marks/flux.js +1 -0
- package/dist/model-marks/friendli.js +1 -0
- package/dist/model-marks/gemini-color.js +1 -0
- package/dist/model-marks/gemini.js +1 -0
- package/dist/model-marks/geminicli-color.js +1 -0
- package/dist/model-marks/geminicli.js +1 -0
- package/dist/model-marks/gemma-color.js +1 -0
- package/dist/model-marks/gemma.js +1 -0
- package/dist/model-marks/giteeai.js +1 -0
- package/dist/model-marks/github.js +1 -0
- package/dist/model-marks/githubcopilot.js +1 -0
- package/dist/model-marks/glama.js +1 -0
- package/dist/model-marks/glif.js +1 -0
- package/dist/model-marks/glmv-color.js +1 -0
- package/dist/model-marks/glmv.js +1 -0
- package/dist/model-marks/gmicloud.js +1 -0
- package/dist/model-marks/google-color.js +1 -0
- package/dist/model-marks/google.js +1 -0
- package/dist/model-marks/googlecloud-color.js +1 -0
- package/dist/model-marks/googlecloud.js +1 -0
- package/dist/model-marks/goose.js +1 -0
- package/dist/model-marks/gradio-color.js +1 -0
- package/dist/model-marks/gradio.js +1 -0
- package/dist/model-marks/greptile-color.js +1 -0
- package/dist/model-marks/greptile.js +1 -0
- package/dist/model-marks/grok.js +1 -0
- package/dist/model-marks/groq.js +1 -0
- package/dist/model-marks/hailuo-color.js +1 -0
- package/dist/model-marks/hailuo.js +1 -0
- package/dist/model-marks/haiper.js +1 -0
- package/dist/model-marks/happyhorse.js +1 -0
- package/dist/model-marks/hedra.js +1 -0
- package/dist/model-marks/hermesagent.js +1 -0
- package/dist/model-marks/higress-color.js +1 -0
- package/dist/model-marks/higress.js +1 -0
- package/dist/model-marks/huawei-color.js +1 -0
- package/dist/model-marks/huawei.js +1 -0
- package/dist/model-marks/huaweicloud-color.js +1 -0
- package/dist/model-marks/huaweicloud.js +1 -0
- package/dist/model-marks/huggingface-color.js +1 -0
- package/dist/model-marks/huggingface.js +1 -0
- package/dist/model-marks/hunyuan-color.js +1 -0
- package/dist/model-marks/hunyuan.js +1 -0
- package/dist/model-marks/hyperbolic-color.js +1 -0
- package/dist/model-marks/hyperbolic.js +1 -0
- package/dist/model-marks/ibm.js +1 -0
- package/dist/model-marks/ideogram.js +1 -0
- package/dist/model-marks/iflytekcloud-color.js +1 -0
- package/dist/model-marks/iflytekcloud.js +1 -0
- package/dist/model-marks/inception.js +1 -0
- package/dist/model-marks/inceptron-color.js +1 -0
- package/dist/model-marks/inceptron.js +1 -0
- package/dist/model-marks/inference.js +1 -0
- package/dist/model-marks/infermatic-color.js +1 -0
- package/dist/model-marks/infermatic.js +1 -0
- package/dist/model-marks/infinigence-color.js +1 -0
- package/dist/model-marks/infinigence.js +1 -0
- package/dist/model-marks/inflection.js +1 -0
- package/dist/model-marks/internlm-color.js +1 -0
- package/dist/model-marks/internlm.js +1 -0
- package/dist/model-marks/ionet.js +1 -0
- package/dist/model-marks/jimeng-color.js +1 -0
- package/dist/model-marks/jimeng.js +1 -0
- package/dist/model-marks/jina.js +1 -0
- package/dist/model-marks/junie-color.js +1 -0
- package/dist/model-marks/junie.js +1 -0
- package/dist/model-marks/kagi.js +1 -0
- package/dist/model-marks/kilocode.js +1 -0
- package/dist/model-marks/kimi-color.js +1 -0
- package/dist/model-marks/kimi.js +1 -0
- package/dist/model-marks/kiro-color.js +1 -0
- package/dist/model-marks/kiro.js +1 -0
- package/dist/model-marks/kling-color.js +1 -0
- package/dist/model-marks/kling.js +1 -0
- package/dist/model-marks/kluster-color.js +1 -0
- package/dist/model-marks/kluster.js +1 -0
- package/dist/model-marks/kolors-color.js +1 -0
- package/dist/model-marks/kolors.js +1 -0
- package/dist/model-marks/krea.js +1 -0
- package/dist/model-marks/kwaikat.js +1 -0
- package/dist/model-marks/kwaipilot-color.js +1 -0
- package/dist/model-marks/kwaipilot.js +1 -0
- package/dist/model-marks/lambda.js +1 -0
- package/dist/model-marks/langchain-color.js +1 -0
- package/dist/model-marks/langchain.js +1 -0
- package/dist/model-marks/langfuse-color.js +1 -0
- package/dist/model-marks/langfuse.js +1 -0
- package/dist/model-marks/langgraph-color.js +1 -0
- package/dist/model-marks/langgraph.js +1 -0
- package/dist/model-marks/langsmith-color.js +1 -0
- package/dist/model-marks/langsmith.js +1 -0
- package/dist/model-marks/leptonai-color.js +1 -0
- package/dist/model-marks/leptonai.js +1 -0
- package/dist/model-marks/lg-color.js +1 -0
- package/dist/model-marks/lg.js +1 -0
- package/dist/model-marks/lightricks.js +1 -0
- package/dist/model-marks/liquid.js +1 -0
- package/dist/model-marks/livekit-color.js +1 -0
- package/dist/model-marks/livekit.js +1 -0
- package/dist/model-marks/llamaindex-color.js +1 -0
- package/dist/model-marks/llamaindex.js +1 -0
- package/dist/model-marks/llava-color.js +1 -0
- package/dist/model-marks/llava.js +1 -0
- package/dist/model-marks/llmapi-color.js +1 -0
- package/dist/model-marks/llmapi.js +1 -0
- package/dist/model-marks/lmstudio.js +1 -0
- package/dist/model-marks/lobehub-color.js +1 -0
- package/dist/model-marks/lobehub.js +1 -0
- package/dist/model-marks/longcat-color.js +1 -0
- package/dist/model-marks/longcat.js +1 -0
- package/dist/model-marks/lovable-color.js +1 -0
- package/dist/model-marks/lovable.js +1 -0
- package/dist/model-marks/lovart.js +1 -0
- package/dist/model-marks/luma-color.js +1 -0
- package/dist/model-marks/luma.js +1 -0
- package/dist/model-marks/magic.js +1 -0
- package/dist/model-marks/make-color.js +1 -0
- package/dist/model-marks/make.js +1 -0
- package/dist/model-marks/manus.js +1 -0
- package/dist/model-marks/mastra.js +1 -0
- package/dist/model-marks/mcp.js +1 -0
- package/dist/model-marks/mcpso-color.js +1 -0
- package/dist/model-marks/mcpso.js +1 -0
- package/dist/model-marks/menlo-color.js +1 -0
- package/dist/model-marks/menlo.js +1 -0
- package/dist/model-marks/meshy-color.js +1 -0
- package/dist/model-marks/meshy.js +1 -0
- package/dist/model-marks/meta-color.js +1 -0
- package/dist/model-marks/meta.js +1 -0
- package/dist/model-marks/metaai-color.js +1 -0
- package/dist/model-marks/metaai.js +1 -0
- package/dist/model-marks/metagpt.js +1 -0
- package/dist/model-marks/microsoft-color.js +1 -0
- package/dist/model-marks/microsoft.js +1 -0
- package/dist/model-marks/midjourney.js +1 -0
- package/dist/model-marks/minimax-color.js +1 -0
- package/dist/model-marks/minimax.js +1 -0
- package/dist/model-marks/mistral-color.js +1 -0
- package/dist/model-marks/mistral.js +1 -0
- package/dist/model-marks/modelscope-color.js +1 -0
- package/dist/model-marks/modelscope.js +1 -0
- package/dist/model-marks/monica-color.js +1 -0
- package/dist/model-marks/monica.js +1 -0
- package/dist/model-marks/moonshot.js +1 -0
- package/dist/model-marks/morph-color.js +1 -0
- package/dist/model-marks/morph.js +1 -0
- package/dist/model-marks/moxt-color.js +1 -0
- package/dist/model-marks/moxt.js +1 -0
- package/dist/model-marks/myshell-color.js +1 -0
- package/dist/model-marks/myshell.js +1 -0
- package/dist/model-marks/n8n-color.js +1 -0
- package/dist/model-marks/n8n.js +1 -0
- package/dist/model-marks/nanobanana-color.js +1 -0
- package/dist/model-marks/nanobanana.js +1 -0
- package/dist/model-marks/nebius.js +1 -0
- package/dist/model-marks/newapi-color.js +1 -0
- package/dist/model-marks/newapi.js +1 -0
- package/dist/model-marks/nextbit-color.js +1 -0
- package/dist/model-marks/nextbit.js +1 -0
- package/dist/model-marks/notebooklm.js +1 -0
- package/dist/model-marks/notion.js +1 -0
- package/dist/model-marks/nousresearch.js +1 -0
- package/dist/model-marks/nova-color.js +1 -0
- package/dist/model-marks/nova.js +1 -0
- package/dist/model-marks/novelai.js +1 -0
- package/dist/model-marks/novita-color.js +1 -0
- package/dist/model-marks/novita.js +1 -0
- package/dist/model-marks/nplcloud-color.js +1 -0
- package/dist/model-marks/nplcloud.js +1 -0
- package/dist/model-marks/nvidia-color.js +1 -0
- package/dist/model-marks/nvidia.js +1 -0
- package/dist/model-marks/obsidian-color.js +1 -0
- package/dist/model-marks/obsidian.js +1 -0
- package/dist/model-marks/ollama.js +1 -0
- package/dist/model-marks/openai.js +1 -0
- package/dist/model-marks/openchat-color.js +1 -0
- package/dist/model-marks/openchat.js +1 -0
- package/dist/model-marks/openclaw-color.js +1 -0
- package/dist/model-marks/openclaw.js +1 -0
- package/dist/model-marks/opencode.js +1 -0
- package/dist/model-marks/openhands-color.js +1 -0
- package/dist/model-marks/openhands.js +1 -0
- package/dist/model-marks/openhuman.js +1 -0
- package/dist/model-marks/openrouter-color.js +1 -0
- package/dist/model-marks/openrouter.js +1 -0
- package/dist/model-marks/openwebui.js +1 -0
- package/dist/model-marks/palm-color.js +1 -0
- package/dist/model-marks/palm.js +1 -0
- package/dist/model-marks/parasail.js +1 -0
- package/dist/model-marks/perceptron.js +1 -0
- package/dist/model-marks/perplexity-color.js +1 -0
- package/dist/model-marks/perplexity.js +1 -0
- package/dist/model-marks/phala-color.js +1 -0
- package/dist/model-marks/phala.js +1 -0
- package/dist/model-marks/phidata-color.js +1 -0
- package/dist/model-marks/phidata.js +1 -0
- package/dist/model-marks/phind.js +1 -0
- package/dist/model-marks/pi.js +1 -0
- package/dist/model-marks/pika.js +1 -0
- package/dist/model-marks/pixverse-color.js +1 -0
- package/dist/model-marks/pixverse.js +1 -0
- package/dist/model-marks/player2-color.js +1 -0
- package/dist/model-marks/player2.js +1 -0
- package/dist/model-marks/poe-color.js +1 -0
- package/dist/model-marks/poe.js +1 -0
- package/dist/model-marks/pollinations.js +1 -0
- package/dist/model-marks/poolside-color.js +1 -0
- package/dist/model-marks/poolside.js +1 -0
- package/dist/model-marks/ppio-color.js +1 -0
- package/dist/model-marks/ppio.js +1 -0
- package/dist/model-marks/prunaai-color.js +1 -0
- package/dist/model-marks/prunaai.js +1 -0
- package/dist/model-marks/pydanticai-color.js +1 -0
- package/dist/model-marks/pydanticai.js +1 -0
- package/dist/model-marks/qingyan-color.js +1 -0
- package/dist/model-marks/qingyan.js +1 -0
- package/dist/model-marks/qiniu-color.js +1 -0
- package/dist/model-marks/qiniu.js +1 -0
- package/dist/model-marks/qoder-color.js +1 -0
- package/dist/model-marks/qoder.js +1 -0
- package/dist/model-marks/qwen-color.js +1 -0
- package/dist/model-marks/qwen.js +1 -0
- package/dist/model-marks/railway.js +1 -0
- package/dist/model-marks/recraft.js +1 -0
- package/dist/model-marks/reka.js +1 -0
- package/dist/model-marks/relace.js +1 -0
- package/dist/model-marks/replicate.js +1 -0
- package/dist/model-marks/replit-color.js +1 -0
- package/dist/model-marks/replit.js +1 -0
- package/dist/model-marks/reve.js +1 -0
- package/dist/model-marks/roocode.js +1 -0
- package/dist/model-marks/rsshub-color.js +1 -0
- package/dist/model-marks/rsshub.js +1 -0
- package/dist/model-marks/runway.js +1 -0
- package/dist/model-marks/rwkv-color.js +1 -0
- package/dist/model-marks/rwkv.js +1 -0
- package/dist/model-marks/sakana-color.js +1 -0
- package/dist/model-marks/sakana.js +1 -0
- package/dist/model-marks/sambanova-color.js +1 -0
- package/dist/model-marks/sambanova.js +1 -0
- package/dist/model-marks/search1api-color.js +1 -0
- package/dist/model-marks/search1api.js +1 -0
- package/dist/model-marks/searchapi.js +1 -0
- package/dist/model-marks/searxng-color.js +1 -0
- package/dist/model-marks/searxng.js +1 -0
- package/dist/model-marks/sensenova-color.js +1 -0
- package/dist/model-marks/sensenova.js +1 -0
- package/dist/model-marks/siliconcloud-color.js +1 -0
- package/dist/model-marks/siliconcloud.js +1 -0
- package/dist/model-marks/sillytavern-color.js +1 -0
- package/dist/model-marks/sillytavern.js +1 -0
- package/dist/model-marks/skywork-color.js +1 -0
- package/dist/model-marks/skywork.js +1 -0
- package/dist/model-marks/slock.js +1 -0
- package/dist/model-marks/smithery-color.js +1 -0
- package/dist/model-marks/smithery.js +1 -0
- package/dist/model-marks/snowflake-color.js +1 -0
- package/dist/model-marks/snowflake.js +1 -0
- package/dist/model-marks/sophnet-color.js +1 -0
- package/dist/model-marks/sophnet.js +1 -0
- package/dist/model-marks/sora-color.js +1 -0
- package/dist/model-marks/sora.js +1 -0
- package/dist/model-marks/spark-color.js +1 -0
- package/dist/model-marks/spark.js +1 -0
- package/dist/model-marks/speedai-color.js +1 -0
- package/dist/model-marks/speedai.js +1 -0
- package/dist/model-marks/stability-color.js +1 -0
- package/dist/model-marks/stability.js +1 -0
- package/dist/model-marks/statecloud-color.js +1 -0
- package/dist/model-marks/statecloud.js +1 -0
- package/dist/model-marks/stepfun-color.js +1 -0
- package/dist/model-marks/stepfun.js +1 -0
- package/dist/model-marks/straico-color.js +1 -0
- package/dist/model-marks/straico.js +1 -0
- package/dist/model-marks/streamlake-color.js +1 -0
- package/dist/model-marks/streamlake.js +1 -0
- package/dist/model-marks/submodel-color.js +1 -0
- package/dist/model-marks/submodel.js +1 -0
- package/dist/model-marks/suno.js +1 -0
- package/dist/model-marks/sync.js +1 -0
- package/dist/model-marks/targon-color.js +1 -0
- package/dist/model-marks/targon.js +1 -0
- package/dist/model-marks/tavily-color.js +1 -0
- package/dist/model-marks/tavily.js +1 -0
- package/dist/model-marks/tencent-color.js +1 -0
- package/dist/model-marks/tencent.js +1 -0
- package/dist/model-marks/tencentcloud-color.js +1 -0
- package/dist/model-marks/tencentcloud.js +1 -0
- package/dist/model-marks/tiangong-color.js +1 -0
- package/dist/model-marks/tiangong.js +1 -0
- package/dist/model-marks/tii-color.js +1 -0
- package/dist/model-marks/tii.js +1 -0
- package/dist/model-marks/together-color.js +1 -0
- package/dist/model-marks/together.js +1 -0
- package/dist/model-marks/topazlabs.js +1 -0
- package/dist/model-marks/trae-color.js +1 -0
- package/dist/model-marks/trae.js +1 -0
- package/dist/model-marks/tripo-color.js +1 -0
- package/dist/model-marks/tripo.js +1 -0
- package/dist/model-marks/turix.js +1 -0
- package/dist/model-marks/udio-color.js +1 -0
- package/dist/model-marks/udio.js +1 -0
- package/dist/model-marks/unionalpha-color.js +1 -0
- package/dist/model-marks/unionalpha.js +1 -0
- package/dist/model-marks/unsloth-color.js +1 -0
- package/dist/model-marks/unsloth.js +1 -0
- package/dist/model-marks/unstructured-color.js +1 -0
- package/dist/model-marks/unstructured.js +1 -0
- package/dist/model-marks/upstage-color.js +1 -0
- package/dist/model-marks/upstage.js +1 -0
- package/dist/model-marks/v0.js +1 -0
- package/dist/model-marks/vectorizerai.js +1 -0
- package/dist/model-marks/venice-color.js +1 -0
- package/dist/model-marks/venice.js +1 -0
- package/dist/model-marks/vercel.js +1 -0
- package/dist/model-marks/vertexai-color.js +1 -0
- package/dist/model-marks/vertexai.js +1 -0
- package/dist/model-marks/vidu-color.js +1 -0
- package/dist/model-marks/vidu.js +1 -0
- package/dist/model-marks/viggle.js +1 -0
- package/dist/model-marks/vllm-color.js +1 -0
- package/dist/model-marks/vllm.js +1 -0
- package/dist/model-marks/volcengine-color.js +1 -0
- package/dist/model-marks/volcengine.js +1 -0
- package/dist/model-marks/voyage-color.js +1 -0
- package/dist/model-marks/voyage.js +1 -0
- package/dist/model-marks/wafer.js +1 -0
- package/dist/model-marks/wandb-color.js +1 -0
- package/dist/model-marks/wandb.js +1 -0
- package/dist/model-marks/wavespeed.js +1 -0
- package/dist/model-marks/wenxin-color.js +1 -0
- package/dist/model-marks/wenxin.js +1 -0
- package/dist/model-marks/windsurf.js +1 -0
- package/dist/model-marks/workersai-color.js +1 -0
- package/dist/model-marks/workersai.js +1 -0
- package/dist/model-marks/worldrouter.js +1 -0
- package/dist/model-marks/xai.js +1 -0
- package/dist/model-marks/xiaomimimo.js +1 -0
- package/dist/model-marks/xinference-color.js +1 -0
- package/dist/model-marks/xinference.js +1 -0
- package/dist/model-marks/xpay-color.js +1 -0
- package/dist/model-marks/xpay.js +1 -0
- package/dist/model-marks/xuanyuan-color.js +1 -0
- package/dist/model-marks/xuanyuan.js +1 -0
- package/dist/model-marks/yandex.js +1 -0
- package/dist/model-marks/yi-color.js +1 -0
- package/dist/model-marks/yi.js +1 -0
- package/dist/model-marks/youmind.js +1 -0
- package/dist/model-marks/yuanbao-color.js +1 -0
- package/dist/model-marks/yuanbao.js +1 -0
- package/dist/model-marks/zai.js +1 -0
- package/dist/model-marks/zapier-color.js +1 -0
- package/dist/model-marks/zapier.js +1 -0
- package/dist/model-marks/zeabur-color.js +1 -0
- package/dist/model-marks/zeabur.js +1 -0
- package/dist/model-marks/zencoder-color.js +1 -0
- package/dist/model-marks/zencoder.js +1 -0
- package/dist/model-marks/zenmux.js +1 -0
- package/dist/model-marks/zeroone-color.js +1 -0
- package/dist/model-marks/zeroone.js +1 -0
- package/dist/model-marks/zhipu-color.js +1 -0
- package/dist/model-marks/zhipu.js +1 -0
- package/dist/standalone/index.js +1 -1
- package/dist/styles/components.css +13 -0
- package/package.json +6 -14
- package/LICENSES/MODEL-IDENTITY-ASSETS-NOTICE.txt +0 -28
- package/dist/assets/brand/aionlabs.svg +0 -2
- package/dist/assets/brand/airtable.svg +0 -2
- package/dist/assets/brand/apple.svg +0 -2
- package/dist/assets/brand/arcee.svg +0 -2
- package/dist/assets/brand/asana.svg +0 -2
- package/dist/assets/brand/atlassian.svg +0 -2
- package/dist/assets/brand/baidu.svg +0 -2
- package/dist/assets/brand/bytedance.svg +0 -2
- package/dist/assets/brand/claude.svg +0 -2
- package/dist/assets/brand/cohere.svg +0 -2
- package/dist/assets/brand/datadog.svg +0 -2
- package/dist/assets/brand/deepseek.svg +0 -2
- package/dist/assets/brand/discord.svg +0 -2
- package/dist/assets/brand/dolphin.svg +0 -2
- package/dist/assets/brand/dotsstudio.svg +0 -2
- package/dist/assets/brand/figma.svg +0 -2
- package/dist/assets/brand/gemini.svg +0 -2
- package/dist/assets/brand/github.svg +0 -2
- package/dist/assets/brand/gitlab.svg +0 -2
- package/dist/assets/brand/gmail.svg +0 -2
- package/dist/assets/brand/google-calendar.svg +0 -2
- package/dist/assets/brand/google-drive.svg +0 -2
- package/dist/assets/brand/google.svg +0 -2
- package/dist/assets/brand/grok.svg +0 -2
- package/dist/assets/brand/huggingface.svg +0 -2
- package/dist/assets/brand/ibm.svg +0 -2
- package/dist/assets/brand/inception.svg +0 -2
- package/dist/assets/brand/inclusionai.svg +0 -2
- package/dist/assets/brand/index.json +0 -798
- package/dist/assets/brand/inference.svg +0 -2
- package/dist/assets/brand/intercom.svg +0 -2
- package/dist/assets/brand/jira.svg +0 -2
- package/dist/assets/brand/kwaipilot.svg +0 -2
- package/dist/assets/brand/linear.svg +0 -2
- package/dist/assets/brand/linux.svg +0 -2
- package/dist/assets/brand/liquid.svg +0 -2
- package/dist/assets/brand/longcat.svg +0 -2
- package/dist/assets/brand/mattermost.svg +0 -2
- package/dist/assets/brand/meta.svg +0 -2
- package/dist/assets/brand/microsoft-teams.svg +0 -2
- package/dist/assets/brand/microsoft.svg +0 -2
- package/dist/assets/brand/minimax.svg +0 -2
- package/dist/assets/brand/mistral.svg +0 -2
- package/dist/assets/brand/moonshot.svg +0 -2
- package/dist/assets/brand/morph.svg +0 -2
- package/dist/assets/brand/n8n.svg +0 -2
- package/dist/assets/brand/netlify.svg +0 -2
- package/dist/assets/brand/nexagi.svg +0 -2
- package/dist/assets/brand/notion.svg +0 -2
- package/dist/assets/brand/nousresearch.svg +0 -2
- package/dist/assets/brand/nova.svg +0 -2
- package/dist/assets/brand/nvidia.svg +0 -2
- package/dist/assets/brand/openai.svg +0 -2
- package/dist/assets/brand/openrouter.svg +0 -2
- package/dist/assets/brand/paypal.svg +0 -2
- package/dist/assets/brand/perceptron.svg +0 -2
- package/dist/assets/brand/perplexity.svg +0 -2
- package/dist/assets/brand/poolside.svg +0 -2
- package/dist/assets/brand/postgresql.svg +0 -2
- package/dist/assets/brand/qwen.svg +0 -2
- package/dist/assets/brand/reka.svg +0 -2
- package/dist/assets/brand/relace.svg +0 -2
- package/dist/assets/brand/sakana.svg +0 -2
- package/dist/assets/brand/sentry.svg +0 -2
- package/dist/assets/brand/signal.svg +0 -2
- package/dist/assets/brand/slack.svg +0 -2
- package/dist/assets/brand/spotify.svg +0 -2
- package/dist/assets/brand/square.svg +0 -2
- package/dist/assets/brand/stepfun.svg +0 -2
- package/dist/assets/brand/stripe.svg +0 -2
- package/dist/assets/brand/supabase.svg +0 -2
- package/dist/assets/brand/telegram.svg +0 -2
- package/dist/assets/brand/tencent.svg +0 -2
- package/dist/assets/brand/the-drummer.svg +0 -2
- package/dist/assets/brand/thinkingmachines.svg +0 -2
- package/dist/assets/brand/todoist.svg +0 -2
- package/dist/assets/brand/unbiased.svg +0 -2
- package/dist/assets/brand/unreal-engine.svg +0 -2
- package/dist/assets/brand/upstage.svg +0 -2
- package/dist/assets/brand/vercel.svg +0 -2
- package/dist/assets/brand/webflow.svg +0 -2
- package/dist/assets/brand/whatsapp.svg +0 -2
- package/dist/assets/brand/windows.svg +0 -2
- package/dist/assets/brand/writer.svg +0 -2
- package/dist/assets/brand/xiaomimimo.svg +0 -2
- package/dist/assets/brand/youtube.svg +0 -2
- package/dist/assets/brand/yuanbao.svg +0 -2
- package/dist/assets/brand/zai.svg +0 -2
- package/dist/assets/brand/zapier.svg +0 -2
- package/dist/components/app-mark-aliases.d.ts +0 -16
- package/dist/components/app-mark-aliases.d.ts.map +0 -1
- package/dist/components/app-mark-aliases.js +0 -87
- package/dist/components/app-mark-frame.d.ts +0 -34
- package/dist/components/app-mark-frame.d.ts.map +0 -1
- package/dist/components/app-mark-frame.js +0 -37
- package/dist/components/app-mark-lazy/server.d.ts +0 -4
- package/dist/components/app-mark-lazy/server.d.ts.map +0 -1
- package/dist/components/app-mark-lazy/server.js +0 -8
- package/dist/components/app-mark-lazy.d.ts +0 -16
- package/dist/components/app-mark-lazy.d.ts.map +0 -1
- package/dist/components/app-mark-lazy.js +0 -85
- package/dist/components/brand-icons/aionlabs.d.ts +0 -18
- package/dist/components/brand-icons/aionlabs.d.ts.map +0 -1
- package/dist/components/brand-icons/aionlabs.js +0 -22
- package/dist/components/brand-icons/airtable.d.ts +0 -18
- package/dist/components/brand-icons/airtable.d.ts.map +0 -1
- package/dist/components/brand-icons/airtable.js +0 -22
- package/dist/components/brand-icons/apple.d.ts +0 -18
- package/dist/components/brand-icons/apple.d.ts.map +0 -1
- package/dist/components/brand-icons/apple.js +0 -22
- package/dist/components/brand-icons/arcee.d.ts +0 -18
- package/dist/components/brand-icons/arcee.d.ts.map +0 -1
- package/dist/components/brand-icons/arcee.js +0 -22
- package/dist/components/brand-icons/asana.d.ts +0 -18
- package/dist/components/brand-icons/asana.d.ts.map +0 -1
- package/dist/components/brand-icons/asana.js +0 -22
- package/dist/components/brand-icons/atlassian.d.ts +0 -18
- package/dist/components/brand-icons/atlassian.d.ts.map +0 -1
- package/dist/components/brand-icons/atlassian.js +0 -25
- package/dist/components/brand-icons/baidu.d.ts +0 -18
- package/dist/components/brand-icons/baidu.d.ts.map +0 -1
- package/dist/components/brand-icons/baidu.js +0 -22
- package/dist/components/brand-icons/brand-icon.d.ts +0 -22
- package/dist/components/brand-icons/brand-icon.d.ts.map +0 -1
- package/dist/components/brand-icons/brand-icon.js +0 -26
- package/dist/components/brand-icons/bytedance.d.ts +0 -18
- package/dist/components/brand-icons/bytedance.d.ts.map +0 -1
- package/dist/components/brand-icons/bytedance.js +0 -22
- package/dist/components/brand-icons/claude.d.ts +0 -18
- package/dist/components/brand-icons/claude.d.ts.map +0 -1
- package/dist/components/brand-icons/claude.js +0 -22
- package/dist/components/brand-icons/cohere.d.ts +0 -18
- package/dist/components/brand-icons/cohere.d.ts.map +0 -1
- package/dist/components/brand-icons/cohere.js +0 -22
- package/dist/components/brand-icons/datadog.d.ts +0 -18
- package/dist/components/brand-icons/datadog.d.ts.map +0 -1
- package/dist/components/brand-icons/datadog.js +0 -22
- package/dist/components/brand-icons/deepseek.d.ts +0 -18
- package/dist/components/brand-icons/deepseek.d.ts.map +0 -1
- package/dist/components/brand-icons/deepseek.js +0 -22
- package/dist/components/brand-icons/discord.d.ts +0 -18
- package/dist/components/brand-icons/discord.d.ts.map +0 -1
- package/dist/components/brand-icons/discord.js +0 -22
- package/dist/components/brand-icons/dolphin.d.ts +0 -18
- package/dist/components/brand-icons/dolphin.d.ts.map +0 -1
- package/dist/components/brand-icons/dolphin.js +0 -22
- package/dist/components/brand-icons/dotsstudio.d.ts +0 -18
- package/dist/components/brand-icons/dotsstudio.d.ts.map +0 -1
- package/dist/components/brand-icons/dotsstudio.js +0 -22
- package/dist/components/brand-icons/figma.d.ts +0 -18
- package/dist/components/brand-icons/figma.d.ts.map +0 -1
- package/dist/components/brand-icons/figma.js +0 -22
- package/dist/components/brand-icons/gemini.d.ts +0 -18
- package/dist/components/brand-icons/gemini.d.ts.map +0 -1
- package/dist/components/brand-icons/gemini.js +0 -25
- package/dist/components/brand-icons/github.d.ts +0 -18
- package/dist/components/brand-icons/github.d.ts.map +0 -1
- package/dist/components/brand-icons/github.js +0 -22
- package/dist/components/brand-icons/gitlab.d.ts +0 -18
- package/dist/components/brand-icons/gitlab.d.ts.map +0 -1
- package/dist/components/brand-icons/gitlab.js +0 -22
- package/dist/components/brand-icons/gmail.d.ts +0 -18
- package/dist/components/brand-icons/gmail.d.ts.map +0 -1
- package/dist/components/brand-icons/gmail.js +0 -25
- package/dist/components/brand-icons/google-calendar.d.ts +0 -18
- package/dist/components/brand-icons/google-calendar.d.ts.map +0 -1
- package/dist/components/brand-icons/google-calendar.js +0 -25
- package/dist/components/brand-icons/google-drive.d.ts +0 -18
- package/dist/components/brand-icons/google-drive.d.ts.map +0 -1
- package/dist/components/brand-icons/google-drive.js +0 -25
- package/dist/components/brand-icons/google.d.ts +0 -18
- package/dist/components/brand-icons/google.d.ts.map +0 -1
- package/dist/components/brand-icons/google.js +0 -22
- package/dist/components/brand-icons/grok.d.ts +0 -18
- package/dist/components/brand-icons/grok.d.ts.map +0 -1
- package/dist/components/brand-icons/grok.js +0 -22
- package/dist/components/brand-icons/huggingface.d.ts +0 -18
- package/dist/components/brand-icons/huggingface.d.ts.map +0 -1
- package/dist/components/brand-icons/huggingface.js +0 -22
- package/dist/components/brand-icons/ibm.d.ts +0 -18
- package/dist/components/brand-icons/ibm.d.ts.map +0 -1
- package/dist/components/brand-icons/ibm.js +0 -22
- package/dist/components/brand-icons/inception.d.ts +0 -18
- package/dist/components/brand-icons/inception.d.ts.map +0 -1
- package/dist/components/brand-icons/inception.js +0 -22
- package/dist/components/brand-icons/inclusionai.d.ts +0 -13
- package/dist/components/brand-icons/inclusionai.d.ts.map +0 -1
- package/dist/components/brand-icons/inclusionai.js +0 -18
- package/dist/components/brand-icons/inference.d.ts +0 -18
- package/dist/components/brand-icons/inference.d.ts.map +0 -1
- package/dist/components/brand-icons/inference.js +0 -22
- package/dist/components/brand-icons/intercom.d.ts +0 -18
- package/dist/components/brand-icons/intercom.d.ts.map +0 -1
- package/dist/components/brand-icons/intercom.js +0 -22
- package/dist/components/brand-icons/jira.d.ts +0 -18
- package/dist/components/brand-icons/jira.d.ts.map +0 -1
- package/dist/components/brand-icons/jira.js +0 -25
- package/dist/components/brand-icons/kwaipilot.d.ts +0 -18
- package/dist/components/brand-icons/kwaipilot.d.ts.map +0 -1
- package/dist/components/brand-icons/kwaipilot.js +0 -25
- package/dist/components/brand-icons/linear.d.ts +0 -18
- package/dist/components/brand-icons/linear.d.ts.map +0 -1
- package/dist/components/brand-icons/linear.js +0 -22
- package/dist/components/brand-icons/linux.d.ts +0 -18
- package/dist/components/brand-icons/linux.d.ts.map +0 -1
- package/dist/components/brand-icons/linux.js +0 -25
- package/dist/components/brand-icons/liquid.d.ts +0 -18
- package/dist/components/brand-icons/liquid.d.ts.map +0 -1
- package/dist/components/brand-icons/liquid.js +0 -22
- package/dist/components/brand-icons/longcat.d.ts +0 -18
- package/dist/components/brand-icons/longcat.d.ts.map +0 -1
- package/dist/components/brand-icons/longcat.js +0 -22
- package/dist/components/brand-icons/mattermost.d.ts +0 -18
- package/dist/components/brand-icons/mattermost.d.ts.map +0 -1
- package/dist/components/brand-icons/mattermost.js +0 -22
- package/dist/components/brand-icons/meta.d.ts +0 -18
- package/dist/components/brand-icons/meta.d.ts.map +0 -1
- package/dist/components/brand-icons/meta.js +0 -25
- package/dist/components/brand-icons/microsoft-teams.d.ts +0 -18
- package/dist/components/brand-icons/microsoft-teams.d.ts.map +0 -1
- package/dist/components/brand-icons/microsoft-teams.js +0 -25
- package/dist/components/brand-icons/microsoft.d.ts +0 -18
- package/dist/components/brand-icons/microsoft.d.ts.map +0 -1
- package/dist/components/brand-icons/microsoft.js +0 -22
- package/dist/components/brand-icons/minimax.d.ts +0 -18
- package/dist/components/brand-icons/minimax.d.ts.map +0 -1
- package/dist/components/brand-icons/minimax.js +0 -25
- package/dist/components/brand-icons/mistral.d.ts +0 -18
- package/dist/components/brand-icons/mistral.d.ts.map +0 -1
- package/dist/components/brand-icons/mistral.js +0 -22
- package/dist/components/brand-icons/moonshot.d.ts +0 -18
- package/dist/components/brand-icons/moonshot.d.ts.map +0 -1
- package/dist/components/brand-icons/moonshot.js +0 -22
- package/dist/components/brand-icons/morph.d.ts +0 -18
- package/dist/components/brand-icons/morph.d.ts.map +0 -1
- package/dist/components/brand-icons/morph.js +0 -22
- package/dist/components/brand-icons/n8n.d.ts +0 -18
- package/dist/components/brand-icons/n8n.d.ts.map +0 -1
- package/dist/components/brand-icons/n8n.js +0 -22
- package/dist/components/brand-icons/netlify.d.ts +0 -18
- package/dist/components/brand-icons/netlify.d.ts.map +0 -1
- package/dist/components/brand-icons/netlify.js +0 -22
- package/dist/components/brand-icons/nexagi.d.ts +0 -18
- package/dist/components/brand-icons/nexagi.d.ts.map +0 -1
- package/dist/components/brand-icons/nexagi.js +0 -22
- package/dist/components/brand-icons/notion.d.ts +0 -18
- package/dist/components/brand-icons/notion.d.ts.map +0 -1
- package/dist/components/brand-icons/notion.js +0 -22
- package/dist/components/brand-icons/nousresearch.d.ts +0 -18
- package/dist/components/brand-icons/nousresearch.d.ts.map +0 -1
- package/dist/components/brand-icons/nousresearch.js +0 -22
- package/dist/components/brand-icons/nova.d.ts +0 -18
- package/dist/components/brand-icons/nova.d.ts.map +0 -1
- package/dist/components/brand-icons/nova.js +0 -25
- package/dist/components/brand-icons/nvidia.d.ts +0 -18
- package/dist/components/brand-icons/nvidia.d.ts.map +0 -1
- package/dist/components/brand-icons/nvidia.js +0 -22
- package/dist/components/brand-icons/openai.d.ts +0 -18
- package/dist/components/brand-icons/openai.d.ts.map +0 -1
- package/dist/components/brand-icons/openai.js +0 -22
- package/dist/components/brand-icons/openrouter.d.ts +0 -18
- package/dist/components/brand-icons/openrouter.d.ts.map +0 -1
- package/dist/components/brand-icons/openrouter.js +0 -22
- package/dist/components/brand-icons/paypal.d.ts +0 -18
- package/dist/components/brand-icons/paypal.d.ts.map +0 -1
- package/dist/components/brand-icons/paypal.js +0 -22
- package/dist/components/brand-icons/perceptron.d.ts +0 -18
- package/dist/components/brand-icons/perceptron.d.ts.map +0 -1
- package/dist/components/brand-icons/perceptron.js +0 -22
- package/dist/components/brand-icons/perplexity.d.ts +0 -18
- package/dist/components/brand-icons/perplexity.d.ts.map +0 -1
- package/dist/components/brand-icons/perplexity.js +0 -22
- package/dist/components/brand-icons/poolside.d.ts +0 -18
- package/dist/components/brand-icons/poolside.d.ts.map +0 -1
- package/dist/components/brand-icons/poolside.js +0 -25
- package/dist/components/brand-icons/postgresql.d.ts +0 -18
- package/dist/components/brand-icons/postgresql.d.ts.map +0 -1
- package/dist/components/brand-icons/postgresql.js +0 -22
- package/dist/components/brand-icons/qwen.d.ts +0 -18
- package/dist/components/brand-icons/qwen.d.ts.map +0 -1
- package/dist/components/brand-icons/qwen.js +0 -25
- package/dist/components/brand-icons/reka.d.ts +0 -18
- package/dist/components/brand-icons/reka.d.ts.map +0 -1
- package/dist/components/brand-icons/reka.js +0 -22
- package/dist/components/brand-icons/relace.d.ts +0 -18
- package/dist/components/brand-icons/relace.d.ts.map +0 -1
- package/dist/components/brand-icons/relace.js +0 -22
- package/dist/components/brand-icons/sakana.d.ts +0 -18
- package/dist/components/brand-icons/sakana.d.ts.map +0 -1
- package/dist/components/brand-icons/sakana.js +0 -22
- package/dist/components/brand-icons/sentry.d.ts +0 -18
- package/dist/components/brand-icons/sentry.d.ts.map +0 -1
- package/dist/components/brand-icons/sentry.js +0 -22
- package/dist/components/brand-icons/signal.d.ts +0 -18
- package/dist/components/brand-icons/signal.d.ts.map +0 -1
- package/dist/components/brand-icons/signal.js +0 -22
- package/dist/components/brand-icons/slack.d.ts +0 -18
- package/dist/components/brand-icons/slack.d.ts.map +0 -1
- package/dist/components/brand-icons/slack.js +0 -22
- package/dist/components/brand-icons/spotify.d.ts +0 -18
- package/dist/components/brand-icons/spotify.d.ts.map +0 -1
- package/dist/components/brand-icons/spotify.js +0 -22
- package/dist/components/brand-icons/square.d.ts +0 -18
- package/dist/components/brand-icons/square.d.ts.map +0 -1
- package/dist/components/brand-icons/square.js +0 -22
- package/dist/components/brand-icons/stepfun.d.ts +0 -18
- package/dist/components/brand-icons/stepfun.d.ts.map +0 -1
- package/dist/components/brand-icons/stepfun.js +0 -25
- package/dist/components/brand-icons/stripe.d.ts +0 -18
- package/dist/components/brand-icons/stripe.d.ts.map +0 -1
- package/dist/components/brand-icons/stripe.js +0 -22
- package/dist/components/brand-icons/supabase.d.ts +0 -18
- package/dist/components/brand-icons/supabase.d.ts.map +0 -1
- package/dist/components/brand-icons/supabase.js +0 -25
- package/dist/components/brand-icons/telegram.d.ts +0 -18
- package/dist/components/brand-icons/telegram.d.ts.map +0 -1
- package/dist/components/brand-icons/telegram.js +0 -25
- package/dist/components/brand-icons/tencent.d.ts +0 -18
- package/dist/components/brand-icons/tencent.d.ts.map +0 -1
- package/dist/components/brand-icons/tencent.js +0 -22
- package/dist/components/brand-icons/the-drummer.d.ts +0 -13
- package/dist/components/brand-icons/the-drummer.d.ts.map +0 -1
- package/dist/components/brand-icons/the-drummer.js +0 -18
- package/dist/components/brand-icons/thinkingmachines.d.ts +0 -13
- package/dist/components/brand-icons/thinkingmachines.d.ts.map +0 -1
- package/dist/components/brand-icons/thinkingmachines.js +0 -18
- package/dist/components/brand-icons/todoist.d.ts +0 -18
- package/dist/components/brand-icons/todoist.d.ts.map +0 -1
- package/dist/components/brand-icons/todoist.js +0 -22
- package/dist/components/brand-icons/unbiased.d.ts +0 -13
- package/dist/components/brand-icons/unbiased.d.ts.map +0 -1
- package/dist/components/brand-icons/unbiased.js +0 -18
- package/dist/components/brand-icons/unreal-engine.d.ts +0 -18
- package/dist/components/brand-icons/unreal-engine.d.ts.map +0 -1
- package/dist/components/brand-icons/unreal-engine.js +0 -22
- package/dist/components/brand-icons/upstage.d.ts +0 -18
- package/dist/components/brand-icons/upstage.d.ts.map +0 -1
- package/dist/components/brand-icons/upstage.js +0 -25
- package/dist/components/brand-icons/vercel.d.ts +0 -18
- package/dist/components/brand-icons/vercel.d.ts.map +0 -1
- package/dist/components/brand-icons/vercel.js +0 -22
- package/dist/components/brand-icons/webflow.d.ts +0 -18
- package/dist/components/brand-icons/webflow.d.ts.map +0 -1
- package/dist/components/brand-icons/webflow.js +0 -22
- package/dist/components/brand-icons/whatsapp.d.ts +0 -18
- package/dist/components/brand-icons/whatsapp.d.ts.map +0 -1
- package/dist/components/brand-icons/whatsapp.js +0 -25
- package/dist/components/brand-icons/windows.d.ts +0 -18
- package/dist/components/brand-icons/windows.d.ts.map +0 -1
- package/dist/components/brand-icons/windows.js +0 -22
- package/dist/components/brand-icons/writer.d.ts +0 -13
- package/dist/components/brand-icons/writer.d.ts.map +0 -1
- package/dist/components/brand-icons/writer.js +0 -18
- package/dist/components/brand-icons/xiaomimimo.d.ts +0 -18
- package/dist/components/brand-icons/xiaomimimo.d.ts.map +0 -1
- package/dist/components/brand-icons/xiaomimimo.js +0 -22
- package/dist/components/brand-icons/youtube.d.ts +0 -18
- package/dist/components/brand-icons/youtube.d.ts.map +0 -1
- package/dist/components/brand-icons/youtube.js +0 -22
- package/dist/components/brand-icons/yuanbao.d.ts +0 -18
- package/dist/components/brand-icons/yuanbao.d.ts.map +0 -1
- package/dist/components/brand-icons/yuanbao.js +0 -22
- package/dist/components/brand-icons/zai.d.ts +0 -18
- package/dist/components/brand-icons/zai.d.ts.map +0 -1
- package/dist/components/brand-icons/zai.js +0 -22
- package/dist/components/brand-icons/zapier.d.ts +0 -18
- package/dist/components/brand-icons/zapier.d.ts.map +0 -1
- package/dist/components/brand-icons/zapier.js +0 -22
- package/dist/components/brand-icons.d.ts +0 -90
- package/dist/components/brand-icons.d.ts.map +0 -1
- package/dist/components/brand-icons.js +0 -95
- package/dist/components/empty.d.ts +0 -15
- package/dist/components/empty.d.ts.map +0 -1
- package/dist/components/empty.js +0 -33
- package/dist/internal/object-identity-support.d.ts +0 -6
- package/dist/internal/object-identity-support.d.ts.map +0 -1
- package/dist/internal/object-identity-support.js +0 -10
|
@@ -5,6 +5,12 @@ export type CollectionToolbarProps = Omit<ComponentPropsWithoutRef<"div">, "chil
|
|
|
5
5
|
search?: ReactNode;
|
|
6
6
|
actions?: ReactNode;
|
|
7
7
|
status?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* `glass` holds the bar over rows that scroll under it. `plain` is the bar on
|
|
10
|
+
* a page whose rows do not pass under it, such as a section of Nadia's Edit
|
|
11
|
+
* page: glass there shows nothing through it and reads as a bordered box.
|
|
12
|
+
*/
|
|
13
|
+
surface?: "glass" | "plain";
|
|
8
14
|
};
|
|
9
|
-
export declare function CollectionToolbar({ label, controls, search, actions, status, ...props }: CollectionToolbarProps): import("react").JSX.Element;
|
|
15
|
+
export declare function CollectionToolbar({ label, controls, search, actions, status, surface, ...props }: CollectionToolbarProps): import("react").JSX.Element;
|
|
10
16
|
//# sourceMappingURL=collection-toolbar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-toolbar.d.ts","sourceRoot":"","sources":["../../src/components/collection-toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjE,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,wBAAwB,CAAC,KAAK,CAAC,EAC/B,UAAU,GAAG,WAAW,CACzB,GAAG;IACF,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"collection-toolbar.d.ts","sourceRoot":"","sources":["../../src/components/collection-toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjE,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,wBAAwB,CAAC,KAAK,CAAC,EAC/B,UAAU,GAAG,WAAW,CACzB,GAAG;IACF,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CAC7B,CAAC;AAeF,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,MAAM,EACN,OAAiB,EACjB,GAAG,KAAK,EACT,EAAE,sBAAsB,+BAwCxB"}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/*
|
|
3
|
+
* A page's collection toolbar is a control bar over its own rows: glass on the
|
|
4
|
+
* floating rung, held at the top of the scrolling content while the rows pass
|
|
5
|
+
* under it (DESIGN.md "Elevation & Depth"). Inside a titled TableCard the bar
|
|
6
|
+
* stands on the card's solid ground, where glass would show nothing, so there
|
|
7
|
+
* it is the plain row it always was, and a page whose rows never pass under
|
|
8
|
+
* the bar asks for that plain row with `surface="plain"`.
|
|
9
|
+
*/
|
|
10
|
+
const ON_PAGE = "sticky top-3 z-20 mb-3 rounded-xl p-2 nc-glass nc-elevation-floating";
|
|
11
|
+
const PLAIN = "relative mb-3";
|
|
12
|
+
const IN_CARD = "[[data-slot=table-card-toolbar]_&]:relative [[data-slot=table-card-toolbar]_&]:z-auto [[data-slot=table-card-toolbar]_&]:mb-0 [[data-slot=table-card-toolbar]_&]:rounded-none [[data-slot=table-card-toolbar]_&]:p-0 [[data-slot=table-card-toolbar]_&]:pb-4 [[data-slot=table-card-toolbar]_&]:[background:none] [[data-slot=table-card-toolbar]_&]:[backdrop-filter:none] [[data-slot=table-card-toolbar]_&]:[box-shadow:none]";
|
|
13
|
+
export function CollectionToolbar({ label, controls, search, actions, status, surface = "glass", ...props }) {
|
|
14
|
+
// A search alone is the plain row: a search box never stands in a box of its
|
|
15
|
+
// own (DESIGN.md "Menus and commands").
|
|
16
|
+
const drawn = surface === "glass" && (controls || actions) ? "glass" : "plain";
|
|
17
|
+
return (_jsxs("div", { "data-slot": "collection-toolbar", ...props, role: "toolbar", "aria-label": label, "data-surface": drawn, className: `flex min-w-0 flex-wrap items-center gap-2 ${drawn === "glass" ? ON_PAGE : PLAIN} ${IN_CARD}`, children: [controls ? (_jsx("div", { "data-slot": "collection-toolbar-controls", className: "flex min-w-0 max-w-full flex-wrap items-center gap-2", children: controls })) : null, search ? (_jsx("div", { "data-slot": "collection-toolbar-search", className: "min-w-0 basis-full sm:flex-1 sm:basis-64", children: search })) : null, actions ? (_jsx("div", { "data-slot": "collection-toolbar-actions", className: "ml-auto flex min-w-0 flex-wrap items-center gap-2", children: actions })) : null, status ? _jsx("div", { className: "absolute right-0 bottom-0", children: status }) : null] }));
|
|
4
18
|
}
|
|
@@ -20,7 +20,7 @@ function ComboboxInput({ className, children, disabled = false, showTrigger = tr
|
|
|
20
20
|
return (_jsxs(InputGroup, { className: cn("w-auto", className), children: [_jsx(ComboboxPrimitive.Input, { render: _jsx(InputGroupInput, { disabled: disabled }), ...props }), _jsxs(InputGroupAddon, { align: "inline-end", children: [showTrigger && (_jsx(InputGroupButton, { size: "icon-xs", variant: "ghost", render: _jsx(ComboboxTrigger, {}), "data-slot": "input-group-button", className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent", disabled: disabled })), showClear && _jsx(ComboboxClear, { disabled: disabled })] }), children] }));
|
|
21
21
|
}
|
|
22
22
|
function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props }) {
|
|
23
|
-
return (_jsx(ComboboxPrimitive.Portal, { children: _jsx(ComboboxPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, anchor: anchor, className: "isolate z-50", children: _jsx(ComboboxPrimitive.Popup, { "data-slot": "combobox-content", "data-chips": !!anchor, className: cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] overflow-hidden rounded-
|
|
23
|
+
return (_jsx(ComboboxPrimitive.Portal, { children: _jsx(ComboboxPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, anchor: anchor, className: "isolate z-50", children: _jsx(ComboboxPrimitive.Popup, { "data-slot": "combobox-content", "data-chips": !!anchor, className: cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] overflow-hidden rounded-lg border-0 nc-glass text-popover-foreground nc-elevation-floating data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-control-height *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none", anchoredOverlayMotion, className), ...props }) }) }));
|
|
24
24
|
}
|
|
25
25
|
function ComboboxList({ className, ...props }) {
|
|
26
26
|
return (_jsx(ComboboxPrimitive.List, { "data-slot": "combobox-list", className: cn("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-nadicode-xxs data-empty:p-0", className), ...props }));
|
|
@@ -6,7 +6,7 @@ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, }
|
|
|
6
6
|
import { InputGroup, InputGroupAddon } from "./input-group.js";
|
|
7
7
|
import { SearchIcon, CheckIcon } from "lucide-react";
|
|
8
8
|
function Command({ className, ...props }) {
|
|
9
|
-
return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("flex size-full flex-col overflow-hidden rounded-
|
|
9
|
+
return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("flex size-full flex-col overflow-hidden rounded-lg! nc-glass p-nadicode-xxs text-popover-foreground", className), ...props }));
|
|
10
10
|
}
|
|
11
11
|
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = false, ...props }) {
|
|
12
12
|
return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: cn("top-1/3 translate-y-0 overflow-hidden rounded-md! bg-transparent p-0!", className), motion: "instant", showCloseButton: showCloseButton, children: children })] }));
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type * as React from "react";
|
|
2
|
+
import { type ResolvedMessage } from "./product-message.js";
|
|
2
3
|
interface ConfirmDialogProps {
|
|
3
4
|
open: boolean;
|
|
4
5
|
onConfirm: () => void;
|
|
5
6
|
onCancel: () => void;
|
|
6
7
|
title: React.ReactNode;
|
|
7
8
|
description?: React.ReactNode;
|
|
8
|
-
|
|
9
|
+
/** Why the confirmed action did not happen, from the product's catalogue. */
|
|
10
|
+
error?: ResolvedMessage | null;
|
|
9
11
|
confirmLabel?: React.ReactNode;
|
|
10
12
|
/** The confirm button's own word while the action runs. */
|
|
11
13
|
confirmPendingLabel?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../src/components/confirm-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../src/components/confirm-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAapC,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAErF,UAAU,kBAAkB;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,2DAA2D;IAC3D,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAOD,iBAAS,aAAa,CAAC,EACrB,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,KAAK,EACL,WAAW,EACX,KAAK,EACL,YAAwB,EACxB,mBAAmB,EACnB,WAAsB,EACtB,WAAmB,EACnB,OAAe,GAChB,EAAE,kBAAkB,qBA4CpB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { AlertDialog, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "./alert-dialog.js";
|
|
4
4
|
import { Button } from "./button.js";
|
|
5
5
|
import { FieldError } from "./field.js";
|
|
6
6
|
import { PendingLabel } from "./pending-label.js";
|
|
7
|
+
import { bodyBeyondTitle } from "./product-message.js";
|
|
7
8
|
// Fully controlled confirm dialog over the registry AlertDialog parts. The
|
|
8
9
|
// confirm action is a plain Button (not AlertDialogAction) so a failed confirm
|
|
9
10
|
// can keep the dialog open; the only closing gesture is Escape (alert dialogs
|
|
@@ -14,6 +15,6 @@ function ConfirmDialog({ open, onConfirm, onCancel, title, description, error, c
|
|
|
14
15
|
if (!nextOpen) {
|
|
15
16
|
onCancel();
|
|
16
17
|
}
|
|
17
|
-
}, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: title }), description ? _jsx(AlertDialogDescription, { children: description }) : null, error ?
|
|
18
|
+
}, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: title }), description ? _jsx(AlertDialogDescription, { children: description }) : null, error ? (_jsxs(FieldError, { className: "break-words", "data-message-code": error.code, children: [_jsx("span", { className: "block font-medium", children: error.title }), bodyBeyondTitle(error) ? (_jsxs(_Fragment, { children: [" ", _jsx("span", { className: "block", children: bodyBeyondTitle(error) })] })) : null] })) : null] }), _jsxs(AlertDialogFooter, { children: [_jsx(Button, { variant: "outline", onClick: onCancel, disabled: loading, children: cancelLabel }), _jsx(Button, { "aria-busy": loading || undefined, variant: destructive ? "destructive" : "default", onClick: onConfirm, disabled: loading, children: _jsx(PendingLabel, { pending: loading, pendingLabel: confirmPendingLabel ?? confirmLabel, children: confirmLabel }) })] })] }) }));
|
|
18
19
|
}
|
|
19
20
|
export { ConfirmDialog };
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { columnFilteringFeature, columnVisibilityFeature, createFilteredRowModel, createPaginatedRowModel, createSortedRowModel, filterFn_arrIncludes, filterFn_equals, filterFn_inDateRange, filterFn_includesString, filterFn_inNumberRange, filterFn_weakEquals, rowPaginationFeature, rowSortingFeature, sortFn_alphanumeric, sortFn_datetime, sortFn_text, type CellData, type Column, type ColumnDef, type RowData } from "@tanstack/react-table";
|
|
3
|
+
import { type EmptyStateProps } from "./empty-state.js";
|
|
4
|
+
import { type TableCompactLayout } from "./table-layouts.js";
|
|
5
|
+
type DataTableFeatures = {
|
|
6
|
+
columnFilteringFeature: typeof columnFilteringFeature;
|
|
7
|
+
columnVisibilityFeature: typeof columnVisibilityFeature;
|
|
8
|
+
rowPaginationFeature: typeof rowPaginationFeature;
|
|
9
|
+
rowSortingFeature: typeof rowSortingFeature;
|
|
10
|
+
filteredRowModel: ReturnType<typeof createFilteredRowModel>;
|
|
11
|
+
paginatedRowModel: ReturnType<typeof createPaginatedRowModel>;
|
|
12
|
+
sortedRowModel: ReturnType<typeof createSortedRowModel>;
|
|
13
|
+
filterFns: {
|
|
14
|
+
arrIncludes: typeof filterFn_arrIncludes;
|
|
15
|
+
equals: typeof filterFn_equals;
|
|
16
|
+
inDateRange: typeof filterFn_inDateRange;
|
|
17
|
+
includesString: typeof filterFn_includesString;
|
|
18
|
+
inNumberRange: typeof filterFn_inNumberRange;
|
|
19
|
+
weakEquals: typeof filterFn_weakEquals;
|
|
20
|
+
};
|
|
21
|
+
sortFns: {
|
|
22
|
+
alphanumeric: typeof sortFn_alphanumeric;
|
|
23
|
+
datetime: typeof sortFn_datetime;
|
|
24
|
+
text: typeof sortFn_text;
|
|
25
|
+
};
|
|
26
|
+
columnMeta: {
|
|
27
|
+
numeric?: boolean;
|
|
28
|
+
narrow?: boolean;
|
|
29
|
+
prose?: boolean;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/** A column definition typed for this table's feature set. */
|
|
33
|
+
export type DataTableColumnDef<TData extends RowData, TValue extends CellData = CellData> = ColumnDef<DataTableFeatures, TData, TValue>;
|
|
34
|
+
/** A column of this table, as handed to the column-visibility menu. */
|
|
35
|
+
export type DataTableColumn<TData extends RowData, TValue extends CellData = CellData> = Column<DataTableFeatures, TData, TValue>;
|
|
36
|
+
export type DataTablePagination = {
|
|
37
|
+
hasPrevious: boolean;
|
|
38
|
+
hasNext: boolean;
|
|
39
|
+
isPending?: boolean;
|
|
40
|
+
onPrevious: () => void;
|
|
41
|
+
onNext: () => void;
|
|
42
|
+
};
|
|
43
|
+
/** The anchor props a row link receives; the app's router renders them. */
|
|
44
|
+
export type DataTableRowLinkProps = Omit<React.ComponentProps<"a">, "href"> & {
|
|
45
|
+
href: string;
|
|
46
|
+
"data-row-link": "";
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* What the table hands its toolbar: the column-visibility menu and the caller's
|
|
50
|
+
* actions as one node, and the local search over a fully loaded comparison
|
|
51
|
+
* with its clear control when the caller asked for one.
|
|
52
|
+
*/
|
|
53
|
+
export type DataTableToolbarSlots = {
|
|
54
|
+
actions: React.ReactNode | null;
|
|
55
|
+
search?: {
|
|
56
|
+
label: string;
|
|
57
|
+
placeholder: string;
|
|
58
|
+
value: string;
|
|
59
|
+
onChange: (value: string) => void;
|
|
60
|
+
};
|
|
61
|
+
clear?: {
|
|
62
|
+
label: string;
|
|
63
|
+
onClear: () => void;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
type DataTableBaseProps<TData extends RowData> = {
|
|
67
|
+
columns: DataTableColumnDef<TData>[];
|
|
68
|
+
data: TData[];
|
|
69
|
+
/**
|
|
70
|
+
* A stable identity for each record. Rows and cells are keyed by it, so a
|
|
71
|
+
* cell's own state (an open confirmation) follows its record through a live
|
|
72
|
+
* update that inserts, removes or reorders rows.
|
|
73
|
+
*/
|
|
74
|
+
getRowId?: (row: TData) => string;
|
|
75
|
+
/** Local filtering for a fully loaded, non-registry comparison. */
|
|
76
|
+
filterColumnId?: string;
|
|
77
|
+
filterPlaceholder?: string;
|
|
78
|
+
/** Columns retained beside the identity at compact container widths. */
|
|
79
|
+
primaryColumns: string[];
|
|
80
|
+
/** Override the column-count default when this comparison needs a later compact breakpoint. */
|
|
81
|
+
compactLayout?: TableCompactLayout;
|
|
82
|
+
tableLabel?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Names this collection inside its own frame. A page whose whole job is one
|
|
85
|
+
* collection leaves it out, because the page heading already names it.
|
|
86
|
+
*/
|
|
87
|
+
heading?: {
|
|
88
|
+
title: string;
|
|
89
|
+
description?: string;
|
|
90
|
+
};
|
|
91
|
+
/** A count or the paging under the rows; never a help sentence. */
|
|
92
|
+
footer?: React.ReactNode;
|
|
93
|
+
/**
|
|
94
|
+
* Draws the column header row. Rows explain themselves by their cells (an
|
|
95
|
+
* identity with its orb or mark, a status badge, a tag, a relative time), so
|
|
96
|
+
* the header row is kept for screen readers only. Opt in only for a table
|
|
97
|
+
* whose columns are figures a reader cannot tell apart without their names,
|
|
98
|
+
* such as statements or analytics.
|
|
99
|
+
*/
|
|
100
|
+
showColumnHeaders?: boolean;
|
|
101
|
+
/** A fixed comparison inside an existing detail Card keeps that one frame. */
|
|
102
|
+
embedded?: boolean;
|
|
103
|
+
summary?: {
|
|
104
|
+
label: string;
|
|
105
|
+
value: React.ReactNode;
|
|
106
|
+
};
|
|
107
|
+
/** What the table says when it has no rows. */
|
|
108
|
+
empty: EmptyStateProps;
|
|
109
|
+
/** What the table says when its own search matches no row; it offers to clear the search. */
|
|
110
|
+
noMatchMessage?: string;
|
|
111
|
+
/** Opt in only when hiding secondary columns helps inspect this collection. */
|
|
112
|
+
columnsLabel?: string;
|
|
113
|
+
clearSearchLabel?: string;
|
|
114
|
+
pageLabels?: {
|
|
115
|
+
previous: string;
|
|
116
|
+
next: string;
|
|
117
|
+
};
|
|
118
|
+
toolbarActions?: React.ReactNode;
|
|
119
|
+
/** A bounded server page; false keeps a fixed comparison whole. */
|
|
120
|
+
pagination?: DataTablePagination | false;
|
|
121
|
+
/** A filter value the app owns (a URL param), applied to one column. */
|
|
122
|
+
externalFilter?: {
|
|
123
|
+
columnId: string;
|
|
124
|
+
value: string;
|
|
125
|
+
};
|
|
126
|
+
/** An order the app owns (a URL param): the column ids to sort by, in order. */
|
|
127
|
+
sorting?: readonly {
|
|
128
|
+
id: string;
|
|
129
|
+
desc: boolean;
|
|
130
|
+
}[];
|
|
131
|
+
/** Draws the row link; a plain anchor by default. */
|
|
132
|
+
renderRowLink?: (props: DataTableRowLinkProps) => React.ReactNode;
|
|
133
|
+
/** Draws the collection toolbar, with the table's search when it has one; the actions alone by default. */
|
|
134
|
+
renderToolbar?: (slots: DataTableToolbarSlots) => React.ReactNode;
|
|
135
|
+
/** Wraps the card, such as a frame that keeps it readable while new data loads. */
|
|
136
|
+
wrapCard?: (card: React.ReactNode) => React.ReactNode;
|
|
137
|
+
};
|
|
138
|
+
type DataTableRowNav<TData extends RowData> = {
|
|
139
|
+
rowHref?: undefined;
|
|
140
|
+
rowLabel?: undefined;
|
|
141
|
+
primaryColumnId?: undefined;
|
|
142
|
+
} | {
|
|
143
|
+
/** Makes each row navigable through exactly one link placed on the primary cell. */
|
|
144
|
+
rowHref: (row: TData) => string;
|
|
145
|
+
/** Purposeful, localized accessible name for the row link (e.g. "Open Studio Rossi"). */
|
|
146
|
+
rowLabel: (row: TData) => string;
|
|
147
|
+
/** Column id that carries the link; defaults to the row's first visible column. */
|
|
148
|
+
primaryColumnId?: string;
|
|
149
|
+
};
|
|
150
|
+
export type DataTableProps<TData extends RowData> = DataTableBaseProps<TData> & DataTableRowNav<TData>;
|
|
151
|
+
export declare function columnMenuLabel<TData extends RowData, TValue extends CellData = CellData>(column: DataTableColumn<TData, TValue>): string;
|
|
152
|
+
export declare function DataTable<TData extends RowData>({ columns, data, getRowId, filterColumnId, filterPlaceholder, primaryColumns, compactLayout: requestedCompactLayout, tableLabel, heading, footer, showColumnHeaders, embedded, summary, rowHref, rowLabel, primaryColumnId, empty, noMatchMessage, columnsLabel, clearSearchLabel, pageLabels, toolbarActions, externalFilter, sorting: externalSorting, pagination, renderRowLink, renderToolbar, wrapCard, }: DataTableProps<TData>): React.JSX.Element;
|
|
153
|
+
export {};
|
|
154
|
+
//# sourceMappingURL=data-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../src/components/data-table.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { flushSync } from "react-dom";
|
|
5
|
+
import { columnFilteringFeature, columnVisibilityFeature, createFilteredRowModel, createPaginatedRowModel, createSortedRowModel, filterFn_arrIncludes, filterFn_equals, filterFn_inDateRange, filterFn_includesString, filterFn_inNumberRange, filterFn_weakEquals, flexRender, rowPaginationFeature, rowSortingFeature, sortFn_alphanumeric, sortFn_datetime, sortFn_text, tableFeatures, useTable, } from "@tanstack/react-table";
|
|
6
|
+
import { ChevronDown } from "lucide-react";
|
|
7
|
+
import { cn } from "../lib/utils.js";
|
|
8
|
+
import { Button } from "./button.js";
|
|
9
|
+
import { CollectionToolbar } from "./collection-toolbar.js";
|
|
10
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuTrigger, } from "./dropdown-menu.js";
|
|
11
|
+
import { EmptyState } from "./empty-state.js";
|
|
12
|
+
import { Table, TableBody, TableCell, TableDetailRow, TableHead, TableHeader, TableRecordGroup, TableRow, } from "./table.js";
|
|
13
|
+
import { TableCard } from "./table-card.js";
|
|
14
|
+
import { tableCompactLayouts } from "./table-layouts.js";
|
|
15
|
+
const dataTableFeatures = tableFeatures({
|
|
16
|
+
columnFilteringFeature,
|
|
17
|
+
columnVisibilityFeature,
|
|
18
|
+
rowPaginationFeature,
|
|
19
|
+
rowSortingFeature,
|
|
20
|
+
filteredRowModel: createFilteredRowModel(),
|
|
21
|
+
paginatedRowModel: createPaginatedRowModel(),
|
|
22
|
+
sortedRowModel: createSortedRowModel(),
|
|
23
|
+
filterFns: {
|
|
24
|
+
arrIncludes: filterFn_arrIncludes,
|
|
25
|
+
equals: filterFn_equals,
|
|
26
|
+
inDateRange: filterFn_inDateRange,
|
|
27
|
+
includesString: filterFn_includesString,
|
|
28
|
+
inNumberRange: filterFn_inNumberRange,
|
|
29
|
+
weakEquals: filterFn_weakEquals,
|
|
30
|
+
},
|
|
31
|
+
sortFns: {
|
|
32
|
+
alphanumeric: sortFn_alphanumeric,
|
|
33
|
+
datetime: sortFn_datetime,
|
|
34
|
+
text: sortFn_text,
|
|
35
|
+
},
|
|
36
|
+
columnMeta: {},
|
|
37
|
+
});
|
|
38
|
+
function isNumericColumn(column) {
|
|
39
|
+
return column.columnDef.meta?.numeric === true;
|
|
40
|
+
}
|
|
41
|
+
// DESIGN.md, "Tables and missing values": a row reads as its record's name on
|
|
42
|
+
// one line, then facts at their own width. Against `table-layout: auto` a
|
|
43
|
+
// declared width is only a hint and a percentage is honoured first, so a
|
|
44
|
+
// control column asks for `1px`, the identity claims a third and gives it back
|
|
45
|
+
// down to its floor with an ellipsis, a prose column holds its words on one
|
|
46
|
+
// line up to a cap and cuts the rest with an ellipsis, and every other cell
|
|
47
|
+
// holds its fact on one line. A record is one line at every desktop width.
|
|
48
|
+
const NARROW_COLUMN_CLASS = "w-px whitespace-nowrap";
|
|
49
|
+
const IDENTITY_COLUMN_CLASS = "w-1/3 max-w-0 min-w-24 sm:min-w-44";
|
|
50
|
+
const IDENTITY_CONTENT_CLASS = "truncate";
|
|
51
|
+
const PROSE_COLUMN_CLASS = "min-w-32";
|
|
52
|
+
const PROSE_CONTENT_CLASS = "max-w-64 truncate";
|
|
53
|
+
const CELL_INSET_CLASS = "px-4";
|
|
54
|
+
// A name cut with an ellipsis is read whole on hover. The title is set when the
|
|
55
|
+
// pointer or focus arrives, and only while some part of the name is cut.
|
|
56
|
+
function titleWhenCut(event) {
|
|
57
|
+
const element = event.currentTarget;
|
|
58
|
+
const cut = [element, ...element.querySelectorAll("*")].some((node) => node.scrollWidth > node.clientWidth);
|
|
59
|
+
const text = element.textContent?.replace(/\s+/g, " ").trim();
|
|
60
|
+
if (cut && text)
|
|
61
|
+
element.title = text;
|
|
62
|
+
else
|
|
63
|
+
element.removeAttribute("title");
|
|
64
|
+
}
|
|
65
|
+
// In the compact layout every other visible column already takes its narrowest
|
|
66
|
+
// width, so the identity takes the whole rest of the row.
|
|
67
|
+
const COMPACT_IDENTITY_CLASS = {
|
|
68
|
+
tight: "@max-xl/table:w-full",
|
|
69
|
+
standard: "@max-3xl/table:w-full",
|
|
70
|
+
wide: "@max-5xl/table:w-full",
|
|
71
|
+
spacious: "@max-6xl/table:w-full",
|
|
72
|
+
};
|
|
73
|
+
function widthClass(column, identityColumnId, compactLayout, identityAlone) {
|
|
74
|
+
if (column.columnDef.meta?.narrow === true)
|
|
75
|
+
return NARROW_COLUMN_CLASS;
|
|
76
|
+
if (column.columnDef.meta?.prose === true)
|
|
77
|
+
return PROSE_COLUMN_CLASS;
|
|
78
|
+
if (column.id !== identityColumnId)
|
|
79
|
+
return false;
|
|
80
|
+
// Beside controls alone the identity takes the whole row, so the controls
|
|
81
|
+
// sit at its trailing edge instead of a third of the way across.
|
|
82
|
+
return cn(IDENTITY_COLUMN_CLASS, identityAlone && "w-full", compactLayout && COMPACT_IDENTITY_CLASS[compactLayout]);
|
|
83
|
+
}
|
|
84
|
+
// The id TanStack gives a column: its own, or the accessor key it reads.
|
|
85
|
+
function definitionId(column) {
|
|
86
|
+
if (!column)
|
|
87
|
+
return undefined;
|
|
88
|
+
if (column.id)
|
|
89
|
+
return column.id;
|
|
90
|
+
return "accessorKey" in column ? String(column.accessorKey) : undefined;
|
|
91
|
+
}
|
|
92
|
+
// The column-visibility menu and the detail row name each column by its
|
|
93
|
+
// localized header; the id is a fallback for a header drawn by a function.
|
|
94
|
+
export function columnMenuLabel(column) {
|
|
95
|
+
const header = column.columnDef.header;
|
|
96
|
+
return typeof header === "string" ? header : column.id;
|
|
97
|
+
}
|
|
98
|
+
function collapseClass(columnId, primaryColumns, compactLayout) {
|
|
99
|
+
if (primaryColumns.includes(columnId))
|
|
100
|
+
return undefined;
|
|
101
|
+
return compactLayout ? tableCompactLayouts[compactLayout].column : undefined;
|
|
102
|
+
}
|
|
103
|
+
function useShownLayout() {
|
|
104
|
+
const [shownLayout, setShownLayout] = React.useState("both");
|
|
105
|
+
const probeRef = React.useCallback((probe) => {
|
|
106
|
+
const container = probe?.closest('[data-slot="table-container"]');
|
|
107
|
+
if (!probe || !container || typeof ResizeObserver === "undefined")
|
|
108
|
+
return;
|
|
109
|
+
const read = () => getComputedStyle(probe).display === "none" ? "columns" : "details";
|
|
110
|
+
let shown = read();
|
|
111
|
+
setShownLayout(shown);
|
|
112
|
+
const show = (next) => {
|
|
113
|
+
if (next === shown)
|
|
114
|
+
return;
|
|
115
|
+
shown = next;
|
|
116
|
+
// Observers run after layout and before paint: committing here keeps any
|
|
117
|
+
// frame from showing a width whose layout has not been rendered.
|
|
118
|
+
flushSync(() => setShownLayout(next));
|
|
119
|
+
};
|
|
120
|
+
let printing = false;
|
|
121
|
+
const observer = new ResizeObserver(() => {
|
|
122
|
+
if (!printing)
|
|
123
|
+
show(read());
|
|
124
|
+
});
|
|
125
|
+
const beforePrint = () => {
|
|
126
|
+
printing = true;
|
|
127
|
+
show("both");
|
|
128
|
+
};
|
|
129
|
+
const afterPrint = () => {
|
|
130
|
+
printing = false;
|
|
131
|
+
show(read());
|
|
132
|
+
};
|
|
133
|
+
observer.observe(container);
|
|
134
|
+
window.addEventListener("beforeprint", beforePrint);
|
|
135
|
+
window.addEventListener("afterprint", afterPrint);
|
|
136
|
+
return () => {
|
|
137
|
+
observer.disconnect();
|
|
138
|
+
window.removeEventListener("beforeprint", beforePrint);
|
|
139
|
+
window.removeEventListener("afterprint", afterPrint);
|
|
140
|
+
setShownLayout("both");
|
|
141
|
+
};
|
|
142
|
+
}, []);
|
|
143
|
+
return [shownLayout, probeRef];
|
|
144
|
+
}
|
|
145
|
+
function LayoutProbeLeadingRecords({ layout, probeRef, children, }) {
|
|
146
|
+
return (_jsxs(_Fragment, { children: [layout ? (_jsx("tbody", { ref: probeRef, "aria-hidden": "true", "data-slot": "table-layout-probe", className: tableCompactLayouts[layout].details }, layout)) : null, children] }));
|
|
147
|
+
}
|
|
148
|
+
const defaultRowLink = (props) => _jsx("a", { ...props });
|
|
149
|
+
function DefaultToolbar({ actions }) {
|
|
150
|
+
return actions ? _jsx(CollectionToolbar, { label: "", actions: actions }) : null;
|
|
151
|
+
}
|
|
152
|
+
export function DataTable({ columns, data, getRowId, filterColumnId, filterPlaceholder, primaryColumns, compactLayout: requestedCompactLayout, tableLabel, heading, footer, showColumnHeaders = false, embedded = false, summary, rowHref, rowLabel, primaryColumnId, empty, noMatchMessage, columnsLabel, clearSearchLabel, pageLabels, toolbarActions, externalFilter, sorting: externalSorting, pagination, renderRowLink = defaultRowLink, renderToolbar = DefaultToolbar, wrapCard, }) {
|
|
153
|
+
const [sorting, setSorting] = React.useState([]);
|
|
154
|
+
const [columnFilters, setColumnFilters] = React.useState([]);
|
|
155
|
+
const [columnVisibility, setColumnVisibility] = React.useState({});
|
|
156
|
+
// One column absorbs the slack: a column of sentences when the table has
|
|
157
|
+
// one, otherwise the identity, the first column that is not a control.
|
|
158
|
+
const identityColumnId = definitionId(columns.find((column) => column.meta?.narrow !== true && column.meta?.prose !== true));
|
|
159
|
+
const identityAlone = columns.every((column) => column.meta?.narrow === true || definitionId(column) === identityColumnId);
|
|
160
|
+
// An external pager means `data` is already one bounded server page:
|
|
161
|
+
// `manualPagination` makes the paginated row model a passthrough so every
|
|
162
|
+
// row of the current page renders.
|
|
163
|
+
const table = useTable({
|
|
164
|
+
features: dataTableFeatures,
|
|
165
|
+
data,
|
|
166
|
+
columns,
|
|
167
|
+
...(getRowId ? { getRowId } : {}),
|
|
168
|
+
manualPagination: Boolean(pagination) || pagination === false || !pageLabels,
|
|
169
|
+
onSortingChange: setSorting,
|
|
170
|
+
onColumnFiltersChange: setColumnFilters,
|
|
171
|
+
onColumnVisibilityChange: setColumnVisibility,
|
|
172
|
+
state: {
|
|
173
|
+
sorting: externalSorting ? [...externalSorting] : sorting,
|
|
174
|
+
columnFilters: externalFilter
|
|
175
|
+
? [{ id: externalFilter.columnId, value: externalFilter.value }]
|
|
176
|
+
: columnFilters,
|
|
177
|
+
columnVisibility,
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
const hasDetailColumns = table
|
|
181
|
+
.getAllLeafColumns()
|
|
182
|
+
.some((column) => !primaryColumns.includes(column.id));
|
|
183
|
+
const compactLayout = hasDetailColumns
|
|
184
|
+
? (requestedCompactLayout ??
|
|
185
|
+
(columns.length > 7 ? "spacious" : columns.length > 5 ? "wide" : "standard"))
|
|
186
|
+
: undefined;
|
|
187
|
+
const [shownLayout, layoutProbeRef] = useShownLayout();
|
|
188
|
+
const canPreviousPage = pagination ? pagination.hasPrevious : table.getCanPreviousPage();
|
|
189
|
+
const canNextPage = pagination ? pagination.hasNext : table.getCanNextPage();
|
|
190
|
+
const goPreviousPage = pagination ? pagination.onPrevious : () => table.previousPage();
|
|
191
|
+
const goNextPage = pagination ? pagination.onNext : () => table.nextPage();
|
|
192
|
+
const filterColumn = filterColumnId ? table.getColumn(filterColumnId) : undefined;
|
|
193
|
+
const rawFilterValue = filterColumn?.getFilterValue();
|
|
194
|
+
const filterValue = typeof rawFilterValue === "string" ? rawFilterValue : "";
|
|
195
|
+
const canHideColumns = Boolean(columnsLabel) && table.getAllColumns().some((column) => column.getCanHide());
|
|
196
|
+
const columnsControl = canHideColumns ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { render: _jsxs(Button, { variant: "outline", children: [columnsLabel, _jsx(ChevronDown, { "aria-hidden": "true", "data-icon": "inline-end" })] }) }), _jsx(DropdownMenuContent, { align: "end", children: _jsx(DropdownMenuGroup, { children: table
|
|
197
|
+
.getAllColumns()
|
|
198
|
+
.filter((column) => column.getCanHide())
|
|
199
|
+
.map((column) => (_jsx(DropdownMenuCheckboxItem, { checked: column.getIsVisible(), onCheckedChange: (value) => column.toggleVisibility(!!value), children: columnMenuLabel(column) }, column.id))) }) })] })) : null;
|
|
200
|
+
const rows = table.getRowModel().rows;
|
|
201
|
+
const colSpan = Math.max(1, table.getVisibleLeafColumns().length);
|
|
202
|
+
const renderRow = (row) => {
|
|
203
|
+
const href = rowHref?.(row.original);
|
|
204
|
+
const label = rowLabel?.(row.original);
|
|
205
|
+
const visibleCells = row.getVisibleCells();
|
|
206
|
+
// The link rides one cell only, the named primary column or the first
|
|
207
|
+
// visible one, so the row is a single tab stop with a purposeful name.
|
|
208
|
+
const configuredPrimaryVisible = primaryColumnId !== undefined && table.getColumn(primaryColumnId)?.getIsVisible();
|
|
209
|
+
const primaryId = configuredPrimaryVisible ? primaryColumnId : visibleCells[0]?.column.id;
|
|
210
|
+
const detailCells = visibleCells.filter((cell) => !primaryColumns.includes(cell.column.id));
|
|
211
|
+
return (_jsxs(TableRecordGroup, { children: [_jsx(TableRow, { "data-href": href, className: cn(href && "cursor-pointer"), detailLayout: detailCells.length > 0 ? compactLayout : undefined, onClick: href
|
|
212
|
+
? (event) => {
|
|
213
|
+
const target = event.target;
|
|
214
|
+
// The row link and any interactive descendant own their own
|
|
215
|
+
// clicks; only a bare-cell click is delegated to the link.
|
|
216
|
+
if (!(target instanceof Element) ||
|
|
217
|
+
target.closest("a, button, input, select, textarea, label, [role='button'], [role='menuitem'], [role='checkbox']")) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
event.currentTarget.querySelector("a[data-row-link]")?.click();
|
|
221
|
+
}
|
|
222
|
+
: undefined, children: visibleCells.map((cell) => {
|
|
223
|
+
const numeric = isNumericColumn(cell.column);
|
|
224
|
+
const isPrimaryLink = href && cell.column.id === primaryId;
|
|
225
|
+
const collapsed = collapseClass(cell.column.id, primaryColumns, compactLayout);
|
|
226
|
+
const className = cn(CELL_INSET_CLASS, numeric && "text-right tabular-nums wrap-normal", widthClass(cell.column, identityColumnId, compactLayout, identityAlone), collapsed);
|
|
227
|
+
const drawnOnlyInDetailRow = Boolean(collapsed) && shownLayout === "details" && !isPrimaryLink;
|
|
228
|
+
if (drawnOnlyInDetailRow) {
|
|
229
|
+
return _jsx(TableCell, { className: className }, cell.id);
|
|
230
|
+
}
|
|
231
|
+
const content = flexRender(cell.column.columnDef.cell, cell.getContext());
|
|
232
|
+
const identity = cell.column.id === identityColumnId;
|
|
233
|
+
const prose = cell.column.columnDef.meta?.prose === true;
|
|
234
|
+
return (_jsx(TableCell, { className: className, children: isPrimaryLink ? (renderRowLink({
|
|
235
|
+
href,
|
|
236
|
+
"aria-label": label,
|
|
237
|
+
"data-row-link": "",
|
|
238
|
+
className: cn("-m-2 block rounded-md p-2", identity && IDENTITY_CONTENT_CLASS),
|
|
239
|
+
...(identity ? { onFocus: titleWhenCut, onPointerEnter: titleWhenCut } : {}),
|
|
240
|
+
children: content,
|
|
241
|
+
})) : identity ? (_jsx("div", { className: IDENTITY_CONTENT_CLASS, onFocus: titleWhenCut, onPointerEnter: titleWhenCut, children: content })) : prose ? (_jsx("div", { className: PROSE_CONTENT_CLASS, onFocus: titleWhenCut, onPointerEnter: titleWhenCut, children: content })) : (content) }, cell.id));
|
|
242
|
+
}) }), detailCells.length > 0 && shownLayout !== "columns" ? (_jsx(TableDetailRow, { layout: compactLayout, colSpan: visibleCells.filter((cell) => !collapseClass(cell.column.id, primaryColumns, compactLayout)).length, facts: detailCells.map((cell) => ({
|
|
243
|
+
id: cell.id,
|
|
244
|
+
label: columnMenuLabel(cell.column),
|
|
245
|
+
numeric: isNumericColumn(cell.column),
|
|
246
|
+
value: flexRender(cell.column.columnDef.cell, cell.getContext()),
|
|
247
|
+
})) })) : null] }, row.id));
|
|
248
|
+
};
|
|
249
|
+
const tableNode = (_jsxs(Table, { "aria-label": tableLabel, className: "nc-type-body-sm", compactDetails: compactLayout, children: [_jsx(TableHeader, { className: showColumnHeaders && rows.length > 0 ? undefined : "sr-only", children: table.getHeaderGroups().map((headerGroup) => (_jsx(TableRow, { children: headerGroup.headers.map((header) => (_jsx(TableHead, { className: cn(CELL_INSET_CLASS, isNumericColumn(header.column) && "text-right tabular-nums", widthClass(header.column, identityColumnId, compactLayout, identityAlone), collapseClass(header.column.id, primaryColumns, compactLayout)), children: header.isPlaceholder
|
|
250
|
+
? null
|
|
251
|
+
: flexRender(header.column.columnDef.header, header.getContext()) }, header.id))) }, headerGroup.id))) }), _jsx(LayoutProbeLeadingRecords, { layout: compactLayout, probeRef: layoutProbeRef, children: rows.length > 0 ? (rows.map(renderRow)) : (_jsx(TableBody, { children: _jsx(TableRow, { children: _jsx(TableCell, { colSpan: colSpan, className: cn(CELL_INSET_CLASS, "whitespace-normal"), children: _jsx(EmptyState, { scope: "card", ...(filterValue && noMatchMessage && clearSearchLabel && filterColumn
|
|
252
|
+
? {
|
|
253
|
+
kind: "noResults",
|
|
254
|
+
message: noMatchMessage,
|
|
255
|
+
clear: {
|
|
256
|
+
label: clearSearchLabel,
|
|
257
|
+
onClick: () => filterColumn.setFilterValue(""),
|
|
258
|
+
},
|
|
259
|
+
}
|
|
260
|
+
: empty) }) }) }) })) })] }));
|
|
261
|
+
const actions = columnsControl || toolbarActions ? (_jsxs(_Fragment, { children: [columnsControl, toolbarActions] })) : null;
|
|
262
|
+
// The toolbar belongs to the collection, so it sits at the top of the frame
|
|
263
|
+
// the collection owns: under the card's own title when it has one, and above
|
|
264
|
+
// the card when the page itself is the collection.
|
|
265
|
+
const toolbarRow = renderToolbar({
|
|
266
|
+
actions,
|
|
267
|
+
...(filterColumn
|
|
268
|
+
? {
|
|
269
|
+
search: {
|
|
270
|
+
label: filterPlaceholder ?? "",
|
|
271
|
+
placeholder: filterPlaceholder ?? "",
|
|
272
|
+
value: filterValue,
|
|
273
|
+
onChange: (value) => filterColumn.setFilterValue(value),
|
|
274
|
+
},
|
|
275
|
+
...(clearSearchLabel
|
|
276
|
+
? { clear: { label: clearSearchLabel, onClear: () => filterColumn.setFilterValue("") } }
|
|
277
|
+
: {}),
|
|
278
|
+
}
|
|
279
|
+
: {}),
|
|
280
|
+
});
|
|
281
|
+
const card = (_jsx(TableCard, { surface: embedded ? "plain" : "resting", ...(heading ? { title: heading.title } : {}), ...(heading?.description ? { description: heading.description } : {}), ...(heading && toolbarRow ? { toolbar: toolbarRow } : {}), ...(summary ? { summary } : {}), ...(footer ? { footer } : {}), children: tableNode }));
|
|
282
|
+
return (_jsxs("div", { className: "min-w-0 w-full nc-type-body-sm", "data-slot": "data-table", children: [heading ? null : toolbarRow, wrapCard ? wrapCard(card) : card, !pageLabels || pagination === false || (!canPreviousPage && !canNextPage) ? null : (_jsxs("div", { className: "flex items-center justify-end gap-2 py-4", children: [_jsx(Button, { variant: "outline", onClick: goPreviousPage, disabled: !canPreviousPage || (pagination && pagination.isPending), children: pageLabels.previous }), _jsx(Button, { variant: "outline", onClick: goNextPage, disabled: !canNextPage || (pagination && pagination.isPending), children: pageLabels.next })] }))] }));
|
|
283
|
+
}
|
|
@@ -28,7 +28,7 @@ function DialogContent({ className, children, showCloseButton = true, closeLabel
|
|
|
28
28
|
// clip this popup with `overflow-hidden`: that hides Base UI's
|
|
29
29
|
// trailing focus guard, and Tab then walks out of the dialog into the
|
|
30
30
|
// page behind it.
|
|
31
|
-
"fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100svh-var(--nc-xl))] w-full max-w-[calc(100%-var(--nc-xl))] -translate-x-1/2 -translate-y-1/2 flex-col gap-nadicode-md overflow-y-auto rounded-
|
|
31
|
+
"fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100svh-var(--nc-xl))] w-full max-w-[calc(100%-var(--nc-xl))] -translate-x-1/2 -translate-y-1/2 flex-col gap-nadicode-md overflow-y-auto rounded-lg border-0 bg-popover p-nadicode-lg text-sm text-popover-foreground nc-elevation-modal outline-none sm:max-w-sm", motion === "instant" ? instantModalOverlayMotion : modalOverlayMotion, className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-nadicode-md right-nadicode-md", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: closeLabel })] }))] })] }));
|
|
32
32
|
}
|
|
33
33
|
function DialogHeader({ className, ...props }) {
|
|
34
34
|
return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props }));
|
|
@@ -36,7 +36,7 @@ function DrawerContent({ className, children, ...props }) {
|
|
|
36
36
|
const swipeAxis = swipeDirection === "down" || swipeDirection === "up" ? "y" : "x";
|
|
37
37
|
return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [modal === true && _jsx(DrawerOverlay, { "data-snap-points": hasSnapPoints ? "" : undefined }), _jsx(DrawerPrimitive.Viewport, { "data-slot": "drawer-viewport", "data-modal": modal, className: "pointer-events-none fixed inset-0 z-50 select-none data-[modal=true]:pointer-events-auto", children: _jsxs(DrawerPrimitive.Popup, { "data-slot": "drawer-popup", "data-swipe-axis": swipeAxis, "data-snap-points": hasSnapPoints ? "" : undefined, className: cn(
|
|
38
38
|
// Base.
|
|
39
|
-
"group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col border-0 bg-popover text-sm text-popover-foreground nc-elevation-modal transition-[transform,opacity] duration-[var(--nc-duration-drawer)] ease-[var(--nc-ease-drawer)] outline-none select-none data-[swipe-direction=down]:rounded-t-
|
|
39
|
+
"group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col border-0 bg-popover text-sm text-popover-foreground nc-elevation-modal transition-[transform,opacity] duration-[var(--nc-duration-drawer)] ease-[var(--nc-ease-drawer)] outline-none select-none data-[swipe-direction=down]:rounded-t-lg data-[swipe-direction=left]:rounded-r-lg data-[swipe-direction=right]:rounded-l-lg data-[swipe-direction=up]:rounded-b-lg motion-reduce:transition-opacity",
|
|
40
40
|
// Nested.
|
|
41
41
|
"data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95",
|
|
42
42
|
// Bleed.
|
|
@@ -15,8 +15,16 @@ declare function DropdownMenuItem({ className, iconOnly, inset, variant, ...prop
|
|
|
15
15
|
inset?: boolean;
|
|
16
16
|
variant?: "default" | "destructive";
|
|
17
17
|
}): React.JSX.Element;
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* A command in a record's or a page's menu: its label first, a decorative icon
|
|
20
|
+
* at the trailing edge. A command that cannot run now is `disabled` and stays
|
|
21
|
+
* in place, greyed, with its `reason` under the label (DESIGN.md "Menus and
|
|
22
|
+
* commands").
|
|
23
|
+
*/
|
|
24
|
+
declare function DropdownMenuCommand({ icon, children, className, reason, ...props }: Omit<React.ComponentProps<typeof DropdownMenuItem>, "iconOnly"> & {
|
|
19
25
|
icon: React.ReactElement;
|
|
26
|
+
/** Why the command cannot run now, read after its name. */
|
|
27
|
+
reason?: React.ReactNode;
|
|
20
28
|
}): React.JSX.Element;
|
|
21
29
|
declare function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props): React.JSX.Element;
|
|
22
30
|
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: MenuPrimitive.SubmenuTrigger.Props & {
|