@supersoniks/concorde 5.1.1 → 5.1.3
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/skills/concorde-docs/SKILL.md +153 -0
- package/.agents/skills/{concorde-component-docs/template.md → concorde-docs/templates/component.md} +6 -2
- package/.agents/skills/concorde-docs/templates/decorator.md +43 -0
- package/.agents/skills/concorde-docs/templates/guide.md +25 -0
- package/PLAN-DOCS-AGENTS.md +80 -0
- package/README.md +4 -4
- package/ai/README.md +29 -41
- package/ai/skills/concorde/SKILL.md +54 -324
- package/ai/skills/concorde/rules/composition.md +32 -0
- package/ai/skills/concorde/rules/data.md +47 -0
- package/ai/skills/concorde/rules/http.md +25 -0
- package/ai/skills/concorde/rules/lists-forms.md +35 -0
- package/ai/skills/concorde/rules/styling.md +46 -0
- package/ai/skills/concorde/rules/troubleshooting.md +45 -0
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +21 -21
- package/concorde-core.es.js +977 -980
- package/custom-elements-manifest.public.config.mjs +8 -0
- package/{.tmp-cem/custom-elements.json → custom-elements.json} +11758 -8904
- package/dist/concorde-core.bundle.js +21 -21
- package/dist/concorde-core.es.js +977 -980
- package/dist/docs-mock-api-sw.js +58 -223
- package/dist/docs-mock-api-sw.js.map +4 -4
- package/dist/img/concorde/plane_01.jpg +0 -0
- package/dist/img/concorde/plane_02.jpg +0 -0
- package/dist/img/concorde/plane_03.jpg +0 -0
- package/dist/img/concorde/plane_04.jpg +0 -0
- package/dist/img/concorde/plane_05.jpg +0 -0
- package/dist/img/concorde/plane_06.jpg +0 -0
- package/dist/img/concorde/plane_07.jpg +0 -0
- package/dist/img/concorde/plane_08.jpg +0 -0
- package/dist/img/concorde/plane_09.jpg +0 -0
- package/dist/img/concorde/plane_10.jpg +0 -0
- package/dist/img/concorde/plane_11.jpg +0 -0
- package/dist/img/concorde/plane_12.jpg +0 -0
- package/dist/img/concorde/plane_13.jpg +0 -0
- package/dist/img/og-concorde.jpg +0 -0
- package/dist/robots.txt +11 -10
- package/docs/.htaccess +82 -0
- package/docs/404.html +15 -0
- package/docs/404.md +5 -0
- package/docs/about.html +111 -0
- package/docs/about.md +22 -0
- package/docs/assets/{index-Bb-_LRyY.js → index-6sS76xWj.js} +2625 -3158
- package/docs/assets/index-DkdPbH0F.css +1 -0
- package/docs/core/components/functional/date/date.html +211 -0
- package/docs/core/components/functional/date/date.md +150 -0
- package/docs/core/components/functional/fetch/fetch.html +180 -0
- package/docs/core/components/functional/fetch/fetch.md +108 -0
- package/docs/core/components/functional/if/if.html +65 -0
- package/docs/core/components/functional/if/if.md +34 -0
- package/docs/core/components/functional/jsonata/jsonata.html +110 -0
- package/docs/core/components/functional/jsonata/jsonata.md +61 -0
- package/docs/core/components/functional/list/list.html +200 -0
- package/docs/core/components/functional/list/list.md +125 -0
- package/docs/core/components/functional/mix/mix.html +78 -0
- package/docs/core/components/functional/mix/mix.md +46 -0
- package/docs/core/components/functional/queue/queue.html +155 -0
- package/docs/core/components/functional/queue/queue.md +51 -0
- package/docs/core/components/functional/router/router.html +154 -0
- package/docs/core/components/functional/router/router.md +93 -0
- package/docs/core/components/functional/sdui/sdui-extension-points.html +127 -0
- package/docs/core/components/functional/sdui/sdui-extension-points.md +94 -0
- package/docs/core/components/functional/sdui/sdui.html +397 -0
- package/docs/core/components/functional/sdui/sdui.md +307 -0
- package/docs/core/components/functional/states/states.html +141 -0
- package/docs/core/components/functional/states/states.md +112 -0
- package/docs/core/components/functional/submit/submit.html +178 -0
- package/docs/core/components/functional/submit/submit.md +106 -0
- package/docs/core/components/functional/subscriber/subscriber.html +68 -0
- package/docs/core/components/functional/subscriber/subscriber.md +91 -0
- package/docs/core/components/functional/translation/translation.html +60 -0
- package/docs/core/components/functional/translation/translation.md +38 -0
- package/docs/core/components/functional/value/value.html +81 -0
- package/docs/core/components/functional/value/value.md +47 -0
- package/docs/core/components/ui/alert/alert.html +201 -0
- package/docs/core/components/ui/alert/alert.md +186 -0
- package/docs/core/components/ui/alert-messages/alert-messages.html +132 -0
- package/docs/core/components/ui/alert-messages/alert-messages.md +85 -0
- package/docs/core/components/ui/badge/badge.html +197 -0
- package/docs/core/components/ui/badge/badge.md +181 -0
- package/docs/core/components/ui/button/button.html +309 -0
- package/docs/core/components/ui/button/button.md +216 -0
- package/docs/core/components/ui/captcha/captcha.html +80 -0
- package/docs/core/components/ui/captcha/captcha.md +56 -0
- package/docs/core/components/ui/card/card.html +254 -0
- package/docs/core/components/ui/card/card.md +215 -0
- package/docs/core/components/ui/divider/divider.html +144 -0
- package/docs/core/components/ui/divider/divider.md +126 -0
- package/docs/core/components/ui/form/checkbox/checkbox.html +200 -0
- package/docs/core/components/ui/form/checkbox/checkbox.md +125 -0
- package/docs/core/components/ui/form/fieldset/fieldset.html +238 -0
- package/docs/core/components/ui/form/fieldset/fieldset.md +161 -0
- package/docs/core/components/ui/form/form-actions/form-actions.html +122 -0
- package/docs/core/components/ui/form/form-actions/form-actions.md +98 -0
- package/docs/core/components/ui/form/form-layout/form-layout.html +115 -0
- package/docs/core/components/ui/form/form-layout/form-layout.md +109 -0
- package/docs/core/components/ui/form/input/input.html +235 -0
- package/docs/core/components/ui/form/input/input.md +142 -0
- package/docs/core/components/ui/form/radio/radio.html +144 -0
- package/docs/core/components/ui/form/radio/radio.md +78 -0
- package/docs/core/components/ui/form/select/select.html +178 -0
- package/docs/core/components/ui/form/select/select.md +86 -0
- package/docs/core/components/ui/form/switch/switch.html +146 -0
- package/docs/core/components/ui/form/switch/switch.md +80 -0
- package/docs/core/components/ui/form/textarea/textarea.html +162 -0
- package/docs/core/components/ui/form/textarea/textarea.md +82 -0
- package/docs/core/components/ui/group/group.html +113 -0
- package/docs/core/components/ui/group/group.md +77 -0
- package/docs/core/components/ui/icon/icon.html +223 -0
- package/docs/core/components/ui/icon/icon.md +214 -0
- package/docs/core/components/ui/image/image.html +194 -0
- package/docs/core/components/ui/image/image.md +167 -0
- package/docs/core/components/ui/link/link.html +101 -0
- package/docs/core/components/ui/link/link.md +81 -0
- package/docs/core/components/ui/loader/loader.html +114 -0
- package/docs/core/components/ui/loader/loader.md +87 -0
- package/docs/core/components/ui/menu/menu.html +395 -0
- package/docs/core/components/ui/menu/menu.md +370 -0
- package/docs/core/components/ui/modal/modal.html +324 -0
- package/docs/core/components/ui/modal/modal.md +211 -0
- package/docs/core/components/ui/pop/pop.html +250 -0
- package/docs/core/components/ui/pop/pop.md +216 -0
- package/docs/core/components/ui/progress/progress.html +132 -0
- package/docs/core/components/ui/progress/progress.md +109 -0
- package/docs/core/components/ui/table/table.html +333 -0
- package/docs/core/components/ui/table/table.md +267 -0
- package/docs/core/components/ui/theme/theme.html +116 -0
- package/docs/core/components/ui/theme/theme.md +97 -0
- package/docs/core/components/ui/toast/toast.html +185 -0
- package/docs/core/components/ui/toast/toast.md +147 -0
- package/docs/core/components/ui/tooltip/tooltip.html +112 -0
- package/docs/core/components/ui/tooltip/tooltip.md +89 -0
- package/docs/custom-elements.json +16559 -0
- package/docs/docs/decorators/ancestor-attribute.html +71 -0
- package/docs/docs/decorators/ancestor-attribute.md +59 -0
- package/docs/docs/decorators/auto-subscribe.html +61 -0
- package/docs/docs/decorators/auto-subscribe.md +40 -0
- package/docs/docs/decorators/bind.html +87 -0
- package/docs/docs/decorators/bind.md +76 -0
- package/docs/docs/decorators/get.html +166 -0
- package/docs/docs/decorators/get.md +160 -0
- package/docs/docs/decorators/handle.html +139 -0
- package/docs/docs/decorators/handle.md +119 -0
- package/docs/docs/decorators/on-assign.html +72 -0
- package/docs/docs/decorators/on-assign.md +63 -0
- package/docs/docs/decorators/patch.html +76 -0
- package/docs/docs/decorators/patch.md +44 -0
- package/docs/docs/decorators/post.html +150 -0
- package/docs/docs/decorators/post.md +134 -0
- package/docs/docs/decorators/publish.html +74 -0
- package/docs/docs/decorators/publish.md +56 -0
- package/docs/docs/decorators/put.html +83 -0
- package/docs/docs/decorators/put.md +51 -0
- package/docs/docs/decorators/subscribe.html +91 -0
- package/docs/docs/decorators/subscribe.md +87 -0
- package/docs/docs/decorators/wait-for-ancestors.html +82 -0
- package/docs/docs/decorators/wait-for-ancestors.md +76 -0
- package/docs/docs/directives/sub.html +79 -0
- package/docs/docs/directives/sub.md +75 -0
- package/docs/docs/directives/t.html +91 -0
- package/docs/docs/directives/t.md +73 -0
- package/docs/docs/getting-started/ai-agents.html +130 -0
- package/docs/docs/getting-started/ai-agents.md +50 -0
- package/docs/docs/getting-started/components.html +27 -0
- package/docs/docs/getting-started/create-a-component.html +108 -0
- package/{src/docs/_getting-started → docs/docs/getting-started}/create-a-component.md +3 -6
- package/docs/docs/getting-started/dataFlow.html +174 -0
- package/{src/docs/_core-concept → docs/docs/getting-started}/dataFlow.md +18 -19
- package/docs/docs/getting-started/installation.html +69 -0
- package/docs/docs/getting-started/installation.md +36 -0
- package/docs/docs/getting-started/my-first-component.html +180 -0
- package/{src/docs/_getting-started → docs/docs/getting-started}/my-first-component.md +5 -14
- package/docs/docs/getting-started/start.html +47 -0
- package/{src/docs/_getting-started → docs/docs/getting-started}/start.md +1 -13
- package/docs/docs/getting-started/theming.html +334 -0
- package/docs/docs/index.html +99 -0
- package/docs/docs/misc/api-configuration.html +149 -0
- package/{src/docs/_misc → docs/docs/misc}/api-configuration.md +10 -12
- package/docs/docs/misc/dataProviderKey.html +136 -0
- package/{src/docs/_misc → docs/docs/misc}/dataProviderKey.md +4 -4
- package/docs/docs/misc/docs-mock-api.html +155 -0
- package/{src/docs/_misc → docs/docs/misc}/docs-mock-api.md +12 -13
- package/docs/docs/misc/dynamic-path.html +181 -0
- package/{src/docs/_misc → docs/docs/misc}/dynamic-path.md +8 -8
- package/docs/docs/misc/endpoint.html +51 -0
- package/{src/docs/_misc → docs/docs/misc}/endpoint.md +8 -8
- package/docs/docs/misc/html-integration.html +45 -0
- package/{src/docs/_misc → docs/docs/misc}/html-integration.md +4 -5
- package/docs/docs-mock-api-sw.js +58 -223
- package/docs/docs-mock-api-sw.js.map +4 -4
- package/docs/hubs/decorators.html +438 -0
- package/docs/hubs/form-components.html +404 -0
- package/docs/hubs/remote-data.html +367 -0
- package/docs/img/archive/concorde-001-2cv.webp +0 -0
- package/docs/img/archive/concorde-red-arrows-2002-poster.jpg +0 -0
- package/docs/img/archive/concorde-red-arrows-2002.webm +0 -0
- package/docs/img/archive/credits.json +28 -0
- package/docs/img/concorde/plane_01.jpg +0 -0
- package/docs/img/concorde/plane_02.jpg +0 -0
- package/docs/img/concorde/plane_03.jpg +0 -0
- package/docs/img/concorde/plane_04.jpg +0 -0
- package/docs/img/concorde/plane_05.jpg +0 -0
- package/docs/img/concorde/plane_06.jpg +0 -0
- package/docs/img/concorde/plane_07.jpg +0 -0
- package/docs/img/concorde/plane_08.jpg +0 -0
- package/docs/img/concorde/plane_09.jpg +0 -0
- package/docs/img/concorde/plane_10.jpg +0 -0
- package/docs/img/concorde/plane_11.jpg +0 -0
- package/docs/img/concorde/plane_12.jpg +0 -0
- package/docs/img/concorde/plane_13.jpg +0 -0
- package/docs/img/og-concorde.jpg +0 -0
- package/docs/index.html +184 -68
- package/docs/index.md +22 -0
- package/docs/llms-full.txt +5779 -0
- package/docs/llms.txt +108 -0
- package/docs/privacy.html +122 -0
- package/docs/privacy.md +32 -0
- package/docs/robots.txt +11 -10
- package/docs/sitemap.xml +243 -0
- package/docs/src/core/components/functional/date/date.md +150 -0
- package/docs/src/core/components/functional/fetch/fetch.md +108 -0
- package/docs/src/core/components/functional/if/if.md +34 -0
- package/docs/src/core/components/functional/jsonata/jsonata.md +61 -0
- package/docs/src/core/components/functional/list/list.md +125 -0
- package/docs/src/core/components/functional/mix/mix.md +46 -0
- package/docs/src/core/components/functional/queue/queue.md +51 -0
- package/docs/src/core/components/functional/router/router.md +93 -0
- package/docs/src/core/components/functional/sdui/component-catalog.gaps.json +511 -0
- package/docs/src/core/components/functional/sdui/component-catalog.json +3103 -0
- package/docs/src/core/components/functional/sdui/default-library.json +108 -0
- package/docs/src/core/components/functional/sdui/example.json +32 -0
- package/docs/src/core/components/functional/sdui/sdui-extension-points.md +94 -0
- package/docs/src/core/components/functional/sdui/sdui.md +307 -0
- package/docs/src/core/components/functional/states/states.md +112 -0
- package/docs/src/core/components/functional/submit/submit.md +106 -0
- package/docs/src/core/components/functional/subscriber/subscriber.md +91 -0
- package/docs/src/core/components/functional/translation/translation.md +38 -0
- package/docs/src/core/components/functional/value/value.md +47 -0
- package/docs/src/core/components/ui/alert/alert.md +186 -0
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +85 -0
- package/docs/src/core/components/ui/badge/badge.md +181 -0
- package/docs/src/core/components/ui/button/button.md +216 -0
- package/docs/src/core/components/ui/captcha/captcha.md +56 -0
- package/docs/src/core/components/ui/card/card.md +215 -0
- package/docs/src/core/components/ui/divider/divider.md +126 -0
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +125 -0
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +161 -0
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +98 -0
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +109 -0
- package/docs/src/core/components/ui/form/input/input.md +142 -0
- package/docs/src/core/components/ui/form/radio/radio.md +78 -0
- package/docs/src/core/components/ui/form/select/select.md +86 -0
- package/docs/src/core/components/ui/form/switch/switch.md +80 -0
- package/docs/src/core/components/ui/form/textarea/textarea.md +82 -0
- package/docs/src/core/components/ui/group/group.md +77 -0
- package/docs/src/core/components/ui/icon/icon.md +214 -0
- package/docs/src/core/components/ui/icon/icons.json +1 -0
- package/docs/src/core/components/ui/image/image.md +167 -0
- package/docs/src/core/components/ui/link/link.md +81 -0
- package/docs/src/core/components/ui/loader/loader.md +87 -0
- package/docs/src/core/components/ui/menu/menu.md +370 -0
- package/docs/src/core/components/ui/modal/modal.md +211 -0
- package/docs/src/core/components/ui/pop/pop.md +216 -0
- package/docs/src/core/components/ui/progress/progress.md +109 -0
- package/docs/src/core/components/ui/table/table.md +267 -0
- package/docs/src/core/components/ui/theme/theme.md +97 -0
- package/docs/src/core/components/ui/toast/toast.md +147 -0
- package/docs/src/core/components/ui/tooltip/tooltip.md +89 -0
- package/docs/src/docs/decorators/ancestor-attribute.md +59 -0
- package/docs/src/docs/decorators/auto-subscribe.md +40 -0
- package/docs/src/docs/decorators/bind.md +76 -0
- package/docs/src/docs/decorators/get.md +160 -0
- package/docs/src/docs/decorators/handle.md +119 -0
- package/docs/src/docs/decorators/on-assign.md +63 -0
- package/docs/src/docs/decorators/patch.md +44 -0
- package/docs/src/docs/decorators/post.md +134 -0
- package/docs/src/docs/decorators/publish.md +56 -0
- package/docs/src/docs/decorators/put.md +51 -0
- package/docs/src/docs/decorators/subscribe.md +87 -0
- package/docs/src/docs/decorators/wait-for-ancestors.md +76 -0
- package/docs/src/docs/directives/sub.md +75 -0
- package/docs/src/docs/directives/t.md +73 -0
- package/docs/src/docs/getting-started/ai-agents.md +50 -0
- package/docs/src/docs/getting-started/components.md +5 -0
- package/docs/src/docs/getting-started/create-a-component.md +136 -0
- package/docs/src/docs/getting-started/dataFlow.md +87 -0
- package/docs/src/docs/getting-started/installation.md +36 -0
- package/docs/src/docs/getting-started/my-first-component.md +227 -0
- package/docs/src/docs/getting-started/start.md +35 -0
- package/docs/src/docs/getting-started/theming.md +253 -0
- package/docs/src/docs/misc/api-configuration.md +79 -0
- package/docs/src/docs/misc/dataProviderKey.md +168 -0
- package/docs/src/docs/misc/docs-mock-api.md +62 -0
- package/docs/src/docs/misc/dynamic-path.md +71 -0
- package/docs/src/docs/misc/endpoint.md +45 -0
- package/docs/src/docs/misc/html-integration.md +14 -0
- package/docs/src/docs/search/docs-search.json +10332 -0
- package/docs/src/tag-list.json +1 -0
- package/docs/src/tsconfig-model.json +23 -0
- package/docs/src/tsconfig.json +1359 -0
- package/index.html +157 -5
- package/package.json +8 -4
- package/public/docs-mock-api-sw.js +58 -223
- package/public/docs-mock-api-sw.js.map +4 -4
- package/public/img/concorde/plane_01.jpg +0 -0
- package/public/img/concorde/plane_02.jpg +0 -0
- package/public/img/concorde/plane_03.jpg +0 -0
- package/public/img/concorde/plane_04.jpg +0 -0
- package/public/img/concorde/plane_05.jpg +0 -0
- package/public/img/concorde/plane_06.jpg +0 -0
- package/public/img/concorde/plane_07.jpg +0 -0
- package/public/img/concorde/plane_08.jpg +0 -0
- package/public/img/concorde/plane_09.jpg +0 -0
- package/public/img/concorde/plane_10.jpg +0 -0
- package/public/img/concorde/plane_11.jpg +0 -0
- package/public/img/concorde/plane_12.jpg +0 -0
- package/public/img/concorde/plane_13.jpg +0 -0
- package/public/img/og-concorde.jpg +0 -0
- package/public/robots.txt +11 -10
- package/scripts/ai-init.mjs +104 -379
- package/scripts/ai-init.test.mjs +81 -239
- package/scripts/docs-markdown-vite-plugin.ts +43 -0
- package/scripts/docs-public-url.mjs +56 -0
- package/scripts/docs.htaccess +82 -0
- package/scripts/generate-cem.mjs +244 -0
- package/scripts/generate-cem.test.mjs +122 -0
- package/scripts/generate-crawl-docs.mjs +233 -118
- package/scripts/generate-crawl-docs.test.mjs +124 -0
- package/scripts/generate-sdui-catalog.mjs +11 -10
- package/scripts/post-build-docs.js +37 -50
- package/scripts/pre-publish.mjs +2 -1
- package/scripts/site-pages.mjs +212 -0
- package/scripts/site-pages.test.mjs +116 -0
- package/site-pages/about.md +22 -0
- package/site-pages/privacy.md +32 -0
- package/src/core/components/functional/date/date.md +91 -231
- package/src/core/components/functional/fetch/fetch.md +66 -83
- package/src/core/components/functional/if/if.md +28 -3
- package/src/core/components/functional/jsonata/jsonata.md +42 -37
- package/src/core/components/functional/list/list.md +103 -43
- package/src/core/components/functional/mix/mix.md +31 -26
- package/src/core/components/functional/queue/queue.demo.ts +10 -7
- package/src/core/components/functional/queue/queue.md +40 -61
- package/src/core/components/functional/router/router.demo.ts +16 -16
- package/src/core/components/functional/router/router.md +64 -65
- package/src/core/components/functional/sdui/component-catalog.gaps.json +1 -1
- package/src/core/components/functional/sdui/component-catalog.json +1 -1
- package/src/core/components/functional/sdui/example.json +19 -86
- package/src/core/components/functional/sdui/sdui-extension-points.md +1 -1
- package/src/core/components/functional/sdui/sdui.md +187 -358
- package/src/core/components/functional/states/states.demo.ts +21 -22
- package/src/core/components/functional/states/states.md +86 -61
- package/src/core/components/functional/states/states.ts +1 -1
- package/src/core/components/functional/submit/submit.md +64 -72
- package/src/core/components/functional/translation/translation.md +38 -0
- package/src/core/components/functional/value/value.md +34 -22
- package/src/core/components/ui/alert/alert.md +48 -58
- package/src/core/components/ui/badge/badge.md +27 -34
- package/src/core/components/ui/button/button.md +139 -106
- package/src/core/components/ui/captcha/captcha.md +17 -32
- package/src/core/components/ui/card/card.md +6 -6
- package/src/core/components/ui/divider/divider.md +8 -11
- package/src/core/components/ui/form/checkbox/checkbox.md +90 -42
- package/src/core/components/ui/form/fieldset/fieldset.md +31 -75
- package/src/core/components/ui/form/form-actions/form-actions.md +14 -16
- package/src/core/components/ui/form/form-layout/form-layout.md +19 -29
- package/src/core/components/ui/form/input/input.md +95 -95
- package/src/core/components/ui/form/radio/radio.md +55 -34
- package/src/core/components/ui/form/select/select.md +60 -45
- package/src/core/components/ui/form/switch/switch.md +57 -34
- package/src/core/components/ui/form/textarea/textarea.md +55 -38
- package/src/core/components/ui/group/group.md +35 -33
- package/src/core/components/ui/icon/icon.md +4 -4
- package/src/core/components/ui/image/image.md +41 -107
- package/src/core/components/ui/link/link.md +6 -6
- package/src/core/components/ui/loader/loader.md +30 -55
- package/src/core/components/ui/menu/menu.md +27 -27
- package/src/core/components/ui/modal/modal.md +72 -96
- package/src/core/components/ui/pop/pop.md +80 -158
- package/src/core/components/ui/progress/progress.md +2 -2
- package/src/core/components/ui/table/table.md +91 -255
- package/src/core/components/ui/theme/theme.md +11 -36
- package/src/core/components/ui/toast/toast.md +48 -117
- package/src/core/components/ui/tooltip/tooltip.md +27 -62
- package/src/core/decorators/subscriber/bind.ts +9 -14
- package/src/core/utils/LocationHandler.spec.ts +80 -0
- package/src/core/utils/LocationHandler.ts +5 -9
- package/src/docs/components/docs-demo-sources.ts +55 -140
- package/src/docs/components/docs-lit-demo.ts +1 -3
- package/src/docs/components/docs-source-link.ts +0 -82
- package/src/docs/decorators/ancestor-attribute.md +59 -0
- package/src/docs/decorators/auto-subscribe.md +40 -0
- package/src/docs/decorators/bind.md +76 -0
- package/src/docs/decorators/get.md +160 -0
- package/src/docs/decorators/handle.md +119 -0
- package/src/docs/decorators/on-assign.md +63 -0
- package/src/docs/decorators/patch.md +44 -0
- package/src/docs/decorators/post.md +134 -0
- package/src/docs/decorators/publish.md +56 -0
- package/src/docs/decorators/put.md +51 -0
- package/src/docs/decorators/subscribe.md +87 -0
- package/src/docs/decorators/wait-for-ancestors.md +76 -0
- package/src/docs/directives/sub.md +75 -0
- package/src/docs/directives/t.md +73 -0
- package/src/docs/docs-location.spec.ts +56 -0
- package/src/docs/docs-location.ts +133 -32
- package/src/docs/docs.ts +1 -2
- package/src/docs/example/decorators-demo-bind-demos.ts +83 -135
- package/src/docs/example/decorators-demo-geo.ts +30 -19
- package/src/docs/example/decorators-demo-post.ts +88 -186
- package/src/docs/example/decorators-demo-subscribe-publish-get-demos.ts +165 -268
- package/src/docs/example/decorators-demo.ts +85 -98
- package/src/docs/example/docs-api-config-demos.ts +19 -20
- package/src/docs/example/docs-flight-demos.ts +147 -0
- package/src/docs/example/docs-jsonata-demos.ts +52 -52
- package/src/docs/example/docs-list-demos.ts +43 -123
- package/src/docs/example/docs-provider-keys.ts +21 -28
- package/src/docs/example/docs-queue-demos.ts +37 -77
- package/src/docs/example/docs-router-demos.ts +20 -25
- package/src/docs/example/docs-submit-demos.ts +48 -48
- package/src/docs/example/docs-toggle-demos.ts +4 -3
- package/src/docs/getting-started/ai-agents.md +50 -0
- package/src/docs/getting-started/components.md +5 -0
- package/src/docs/getting-started/create-a-component.md +136 -0
- package/src/docs/getting-started/dataFlow.md +87 -0
- package/src/docs/getting-started/installation.md +36 -0
- package/src/docs/getting-started/my-first-component.md +227 -0
- package/src/docs/getting-started/start.md +35 -0
- package/src/docs/getting-started/theming.md +253 -0
- package/src/docs/header/header.ts +11 -6
- package/src/docs/home/catalog.ts +1 -1
- package/src/docs/home/home.ts +20 -11
- package/src/docs/layout.ts +12 -13
- package/src/docs/misc/api-configuration.md +79 -0
- package/src/docs/misc/dataProviderKey.md +168 -0
- package/src/docs/misc/docs-mock-api.md +62 -0
- package/src/docs/misc/dynamic-path.md +71 -0
- package/src/docs/misc/endpoint.md +45 -0
- package/src/docs/misc/html-integration.md +14 -0
- package/src/docs/mock-api/api-config-mock.ts +5 -0
- package/src/docs/mock-api/fixtures.ts +0 -278
- package/src/docs/mock-api/flights.ts +89 -0
- package/src/docs/mock-api/router.ts +3 -4
- package/src/docs/mock-api/urls.ts +1 -2
- package/src/docs/navigation/navigation.ts +82 -103
- package/src/docs/navigation/toc.ts +7 -4
- package/src/docs/search/docs-search.json +2804 -5024
- package/src/docs/search/markdown-renderer.ts +31 -8
- package/src/docs/search/page.ts +9 -6
- package/src/docs/search/search.ts +154 -122
- package/src/docs/tailwind/css/docs/content.css +4 -5
- package/src/tsconfig.json +11 -5
- package/src/tsconfig.tsbuildinfo +1 -1
- package/vite.config.mts +11 -2
- package/.agents/skills/concorde-component-docs/SKILL.md +0 -194
- package/ai/AGENTS.md +0 -56
- package/ai/cursor/rules/concorde-menu.mdc +0 -15
- package/ai/cursor/rules/concorde-scope.mdc +0 -14
- package/ai/cursor/rules/concorde-theme.mdc +0 -13
- package/ai/cursor/rules/concorde.mdc +0 -66
- package/ai/jetbrains/rules/concorde.md +0 -53
- package/ai/skills/concorde-get-set-dp/SKILL.md +0 -194
- package/ai/skills/concorde-imports/SKILL.md +0 -78
- package/ai/skills/concorde-menu/SKILL.md +0 -74
- package/ai/skills/concorde-scope/SKILL.md +0 -70
- package/ai/skills/concorde-theme/SKILL.md +0 -57
- package/docs/assets/index-CD4WyL6o.css +0 -1
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -29
- package/src/docs/_core-concept/overview.md +0 -57
- package/src/docs/_core-concept/subscriber.md +0 -75
- package/src/docs/_decorators/ancestor-attribute.md +0 -128
- package/src/docs/_decorators/auto-subscribe.md +0 -202
- package/src/docs/_decorators/bind.md +0 -167
- package/src/docs/_decorators/get.md +0 -162
- package/src/docs/_decorators/handle.md +0 -175
- package/src/docs/_decorators/on-assign.md +0 -390
- package/src/docs/_decorators/patch.md +0 -70
- package/src/docs/_decorators/post.md +0 -146
- package/src/docs/_decorators/publish.md +0 -55
- package/src/docs/_decorators/put.md +0 -70
- package/src/docs/_decorators/subscribe.md +0 -100
- package/src/docs/_decorators/wait-for-ancestors.md +0 -163
- package/src/docs/_directives/sub.md +0 -91
- package/src/docs/_getting-started/ai-agents.md +0 -76
- package/src/docs/_getting-started/concorde-manual-install.md +0 -133
- package/src/docs/_getting-started/concorde-outside.md +0 -33
- package/src/docs/_getting-started/my-first-subscriber.md +0 -120
- package/src/docs/_getting-started/pubsub.md +0 -37
- package/src/docs/_misc/formelement-subscriber-removal.md +0 -115
- package/src/docs/example/docs-input-autocomplete-demos.ts +0 -110
- package/src/docs/example/docs-joke-demos.ts +0 -297
- /package/{src/docs/_getting-started → docs/docs/getting-started}/components.md +0 -0
- /package/{src/docs/_getting-started → docs/docs/getting-started}/theming.md +0 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Badge
|
|
2
|
+
|
|
3
|
+
Badges are **compact, non-interactive** labels for status, counts, or categories. They mirror **`sonic-button`** styling (`type`, `variant`, `size`) without focus rings or click handling—use a button when the control should be actionable.
|
|
4
|
+
|
|
5
|
+
## Type
|
|
6
|
+
|
|
7
|
+
`default` — subtle background (`base-100`). `neutral` — dark fill (`base-content`) with light text, useful on light backgrounds.
|
|
8
|
+
|
|
9
|
+
<sonic-code>
|
|
10
|
+
<template>
|
|
11
|
+
<div class="flex flex-wrap gap-2">
|
|
12
|
+
<sonic-badge>Default</sonic-badge>
|
|
13
|
+
<sonic-badge type="primary">Primary</sonic-badge>
|
|
14
|
+
<sonic-badge type="neutral">Neutral</sonic-badge>
|
|
15
|
+
<sonic-badge type="warning">Warning</sonic-badge>
|
|
16
|
+
<sonic-badge type="info">Info</sonic-badge>
|
|
17
|
+
<sonic-badge type="success">Success</sonic-badge>
|
|
18
|
+
<sonic-badge type="danger">Danger</sonic-badge>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
</sonic-code>
|
|
22
|
+
|
|
23
|
+
## Variant
|
|
24
|
+
|
|
25
|
+
Default **`variant`** is filled. **`outline`** — border and text in the `type` color. **`ghost`** — text only, no padding (except in forced-colors mode).
|
|
26
|
+
|
|
27
|
+
<sonic-code>
|
|
28
|
+
<template>
|
|
29
|
+
<div class="grid gap-3">
|
|
30
|
+
<div class="flex items-center flex-wrap gap-3">
|
|
31
|
+
<sonic-badge variant="outline">Default</sonic-badge>
|
|
32
|
+
<sonic-badge variant="outline" type="primary">Primary</sonic-badge>
|
|
33
|
+
<sonic-badge variant="outline" type="neutral">Neutral</sonic-badge>
|
|
34
|
+
<sonic-badge variant="outline" type="warning">Warning</sonic-badge>
|
|
35
|
+
<sonic-badge variant="outline" type="info">Info</sonic-badge>
|
|
36
|
+
<sonic-badge variant="outline" type="success">Success</sonic-badge>
|
|
37
|
+
<sonic-badge variant="outline" type="danger">Danger</sonic-badge>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="flex items-center flex-wrap gap-3">
|
|
40
|
+
<sonic-badge variant="ghost">Default</sonic-badge>
|
|
41
|
+
<sonic-badge variant="ghost" type="primary">Primary</sonic-badge>
|
|
42
|
+
<sonic-badge variant="ghost" type="neutral">Neutral</sonic-badge>
|
|
43
|
+
<sonic-badge variant="ghost" type="warning">Warning</sonic-badge>
|
|
44
|
+
<sonic-badge variant="ghost" type="info">Info</sonic-badge>
|
|
45
|
+
<sonic-badge variant="ghost" type="success">Success</sonic-badge>
|
|
46
|
+
<sonic-badge variant="ghost" type="danger">Danger</sonic-badge>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
</sonic-code>
|
|
51
|
+
|
|
52
|
+
## Size
|
|
53
|
+
|
|
54
|
+
Default size is `md` (omit the `size` attribute). Typography and padding follow `sonic-button`.
|
|
55
|
+
|
|
56
|
+
<sonic-code>
|
|
57
|
+
<template>
|
|
58
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
59
|
+
<sonic-badge size="2xs">2Xs</sonic-badge>
|
|
60
|
+
<sonic-badge size="xs">Xs</sonic-badge>
|
|
61
|
+
<sonic-badge size="sm">Sm</sonic-badge>
|
|
62
|
+
<sonic-badge>Md</sonic-badge>
|
|
63
|
+
<sonic-badge size="lg">Lg</sonic-badge>
|
|
64
|
+
<sonic-badge size="xl">Xl</sonic-badge>
|
|
65
|
+
<sonic-badge size="2xl">2Xl</sonic-badge>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
</sonic-code>
|
|
69
|
+
|
|
70
|
+
## Prefix and suffix slots
|
|
71
|
+
|
|
72
|
+
Icons or short text before / after the main label.
|
|
73
|
+
|
|
74
|
+
<sonic-code>
|
|
75
|
+
<template>
|
|
76
|
+
<sonic-badge type="info" size="sm">
|
|
77
|
+
<sonic-icon slot="prefix" name="airplane" library="iconoir"></sonic-icon>
|
|
78
|
+
Boarding
|
|
79
|
+
</sonic-badge>
|
|
80
|
+
<sonic-badge type="success">
|
|
81
|
+
Landed
|
|
82
|
+
<sonic-icon slot="suffix" name="check" library="iconoir"></sonic-icon>
|
|
83
|
+
</sonic-badge>
|
|
84
|
+
</template>
|
|
85
|
+
</sonic-code>
|
|
86
|
+
|
|
87
|
+
## Empty badges
|
|
88
|
+
|
|
89
|
+
Badge with no text (visual dot). `min-width` / `min-height` keep a readable shape.
|
|
90
|
+
|
|
91
|
+
<sonic-code>
|
|
92
|
+
<template>
|
|
93
|
+
<div class="flex items-center flex-wrap gap-3">
|
|
94
|
+
<sonic-badge type="danger" size="2xs"></sonic-badge>
|
|
95
|
+
<sonic-badge type="danger" size="xs"></sonic-badge>
|
|
96
|
+
<sonic-badge type="danger" size="sm"></sonic-badge>
|
|
97
|
+
<sonic-badge type="danger"></sonic-badge>
|
|
98
|
+
<sonic-badge type="danger" size="lg"></sonic-badge>
|
|
99
|
+
<sonic-badge type="danger" size="xl"></sonic-badge>
|
|
100
|
+
<sonic-badge type="danger" size="2xl"></sonic-badge>
|
|
101
|
+
</div>
|
|
102
|
+
</template>
|
|
103
|
+
</sonic-code>
|
|
104
|
+
|
|
105
|
+
## Ellipsis
|
|
106
|
+
|
|
107
|
+
With `ellipsis`, long labels truncate. The parent must constrain width (`max-width`, grid, etc.).
|
|
108
|
+
|
|
109
|
+
<sonic-code>
|
|
110
|
+
<template>
|
|
111
|
+
<div class="grid grid-cols-2 gap-4 max-w-xl">
|
|
112
|
+
<sonic-badge ellipsis size="sm" variant="outline">
|
|
113
|
+
<sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon>
|
|
114
|
+
CN 001 · CDG → JFK · Gate change: now boarding at gate B12, terminal 2E
|
|
115
|
+
</sonic-badge>
|
|
116
|
+
<sonic-badge ellipsis size="sm">
|
|
117
|
+
<sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon>
|
|
118
|
+
CN 001 · CDG → JFK · Gate change: now boarding at gate B12, terminal 2E
|
|
119
|
+
</sonic-badge>
|
|
120
|
+
</div>
|
|
121
|
+
</template>
|
|
122
|
+
</sonic-code>
|
|
123
|
+
|
|
124
|
+
## Badge in button
|
|
125
|
+
|
|
126
|
+
Count inside a button (`slot="suffix"`) or a badge absolutely positioned on a button / icon.
|
|
127
|
+
|
|
128
|
+
<sonic-code>
|
|
129
|
+
<template>
|
|
130
|
+
<div class="flex flex-wrap gap-4 items-center">
|
|
131
|
+
<sonic-button type="default">
|
|
132
|
+
Departures <sonic-badge slot="suffix" type="danger" size="xs">5</sonic-badge>
|
|
133
|
+
</sonic-button>
|
|
134
|
+
<div class="relative inline-block">
|
|
135
|
+
<sonic-button type="success" class="relative">Crew</sonic-button>
|
|
136
|
+
<sonic-badge
|
|
137
|
+
type="danger"
|
|
138
|
+
size="xs"
|
|
139
|
+
class="absolute right-1 top-0 pe-none transform -translate-y-1/2"
|
|
140
|
+
>12</sonic-badge
|
|
141
|
+
>
|
|
142
|
+
</div>
|
|
143
|
+
<div class="relative inline-block">
|
|
144
|
+
<sonic-button type="neutral" shape="circle" variant="outline">
|
|
145
|
+
<sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
146
|
+
</sonic-button>
|
|
147
|
+
<sonic-badge
|
|
148
|
+
type="danger"
|
|
149
|
+
size="xs"
|
|
150
|
+
class="absolute right-1 bottom-1 pe-none transform translate-y-1/2 translate-x-1/2"
|
|
151
|
+
>33</sonic-badge
|
|
152
|
+
>
|
|
153
|
+
</div>
|
|
154
|
+
<div class="relative inline-block">
|
|
155
|
+
<sonic-button type="neutral" shape="circle" variant="outline">
|
|
156
|
+
<sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
157
|
+
</sonic-button>
|
|
158
|
+
<sonic-badge
|
|
159
|
+
type="danger"
|
|
160
|
+
size="xs"
|
|
161
|
+
class="absolute right-2 bottom-2 pe-none transform translate-y-1/2 translate-x-1/2"
|
|
162
|
+
></sonic-badge>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</template>
|
|
166
|
+
</sonic-code>
|
|
167
|
+
|
|
168
|
+
## API reference
|
|
169
|
+
|
|
170
|
+
| Attribute | Values | Description |
|
|
171
|
+
|----------|---------|-------------|
|
|
172
|
+
| `type` | `default` (default) · `primary` · `neutral` · `warning` · `info` · `success` · `danger` | Semantic color (`--sc-*` tokens) |
|
|
173
|
+
| `variant` | `default` (default) · `outline` · `ghost` | Filled, bordered, or text-only |
|
|
174
|
+
| `size` | `2xs` … `2xl` (default `md`) · `inherit` | Typography and padding (aligned with **`sonic-button`**) |
|
|
175
|
+
| `ellipsis` | boolean | Single-line truncation; parent must constrain width |
|
|
176
|
+
|
|
177
|
+
| Slot | Description |
|
|
178
|
+
|------|-------------|
|
|
179
|
+
| *(default)* | Main label |
|
|
180
|
+
| `prefix` | Icon or short text before the label |
|
|
181
|
+
| `suffix` | Icon or short text after the label |
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
**`sonic-button`** is the clickable control of the library: a plain button, a link when `href` is set, or a form toggle when it has a `name` and `value`. It shares `type` / `variant` / `size` with **`sonic-badge`**, and exposes `prefix` / `suffix` slots for icons.
|
|
4
|
+
|
|
5
|
+
## Type
|
|
6
|
+
|
|
7
|
+
With no `type`, the button is `default`. Use `custom` with `--sc-btn-custom-color` and `--sc-btn-custom-bg` for a one-off color.
|
|
8
|
+
|
|
9
|
+
<sonic-code>
|
|
10
|
+
<template>
|
|
11
|
+
<div class="flex flex-wrap gap-2">
|
|
12
|
+
<sonic-button>Default</sonic-button>
|
|
13
|
+
<sonic-button type="primary">Primary</sonic-button>
|
|
14
|
+
<sonic-button type="neutral">Neutral</sonic-button>
|
|
15
|
+
<sonic-button type="warning">Warning</sonic-button>
|
|
16
|
+
<sonic-button type="info">Info</sonic-button>
|
|
17
|
+
<sonic-button type="success">Success</sonic-button>
|
|
18
|
+
<sonic-button type="danger">Danger</sonic-button>
|
|
19
|
+
<sonic-button type="custom" style="--sc-btn-custom-color: #fde68a; --sc-btn-custom-bg: #5b21b6">Custom</sonic-button>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
</sonic-code>
|
|
23
|
+
|
|
24
|
+
## Variant
|
|
25
|
+
|
|
26
|
+
With no `variant`, the button is filled. The `outline` / `ghost` / `link` variants take their color from `type`. `unstyled` removes all styling so you can apply your own classes.
|
|
27
|
+
|
|
28
|
+
<sonic-code>
|
|
29
|
+
<template>
|
|
30
|
+
<div class="flex flex-wrap gap-2">
|
|
31
|
+
<sonic-button type="primary">Default</sonic-button>
|
|
32
|
+
<sonic-button type="primary" variant="outline">Outline</sonic-button>
|
|
33
|
+
<sonic-button type="primary" variant="ghost">Ghost</sonic-button>
|
|
34
|
+
<sonic-button type="primary" variant="link">Link</sonic-button>
|
|
35
|
+
<sonic-button variant="unstyled">Unstyled</sonic-button>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
</sonic-code>
|
|
39
|
+
|
|
40
|
+
## Size
|
|
41
|
+
|
|
42
|
+
With no `size`, the button is `md`.
|
|
43
|
+
|
|
44
|
+
<sonic-code>
|
|
45
|
+
<template>
|
|
46
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
47
|
+
<sonic-button size="2xs">2xs</sonic-button>
|
|
48
|
+
<sonic-button size="xs">xs</sonic-button>
|
|
49
|
+
<sonic-button size="sm">sm</sonic-button>
|
|
50
|
+
<sonic-button>md</sonic-button>
|
|
51
|
+
<sonic-button size="lg">lg</sonic-button>
|
|
52
|
+
<sonic-button size="xl">xl</sonic-button>
|
|
53
|
+
<sonic-button size="2xl">2xl</sonic-button>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
</sonic-code>
|
|
57
|
+
|
|
58
|
+
## Shape
|
|
59
|
+
|
|
60
|
+
`circle` and `square` make a fixed-size icon button. `block` stretches to the full width of the parent.
|
|
61
|
+
|
|
62
|
+
<sonic-code>
|
|
63
|
+
<template>
|
|
64
|
+
<div class="flex flex-wrap items-center gap-2 mb-2">
|
|
65
|
+
<sonic-button shape="circle" type="primary"><sonic-icon library="iconoir" name="plus"></sonic-icon></sonic-button>
|
|
66
|
+
<sonic-button shape="square" type="primary"><sonic-icon library="iconoir" name="plus"></sonic-icon></sonic-button>
|
|
67
|
+
</div>
|
|
68
|
+
<sonic-button shape="block" type="primary">Block</sonic-button>
|
|
69
|
+
</template>
|
|
70
|
+
</sonic-code>
|
|
71
|
+
|
|
72
|
+
## Prefix and suffix slots
|
|
73
|
+
|
|
74
|
+
<sonic-code>
|
|
75
|
+
<template>
|
|
76
|
+
<div class="flex flex-wrap gap-2">
|
|
77
|
+
<sonic-button type="primary" variant="outline">
|
|
78
|
+
<sonic-icon library="iconoir" slot="prefix" name="arrow-left"></sonic-icon>
|
|
79
|
+
Previous flight
|
|
80
|
+
</sonic-button>
|
|
81
|
+
<sonic-button type="primary">
|
|
82
|
+
Next flight
|
|
83
|
+
<sonic-icon library="iconoir" slot="suffix" name="arrow-right"></sonic-icon>
|
|
84
|
+
</sonic-button>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
</sonic-code>
|
|
88
|
+
|
|
89
|
+
## Loading
|
|
90
|
+
|
|
91
|
+
`loading` replaces the content with a spinner and blocks clicks. The button keeps the width of its content.
|
|
92
|
+
|
|
93
|
+
<sonic-code>
|
|
94
|
+
<template>
|
|
95
|
+
<div class="flex flex-wrap gap-2">
|
|
96
|
+
<sonic-button loading></sonic-button>
|
|
97
|
+
<sonic-button loading>Loading button</sonic-button>
|
|
98
|
+
<sonic-button loading type="primary">
|
|
99
|
+
<sonic-icon library="iconoir" slot="prefix" name="check"></sonic-icon>
|
|
100
|
+
Checking in
|
|
101
|
+
</sonic-button>
|
|
102
|
+
</div>
|
|
103
|
+
</template>
|
|
104
|
+
</sonic-code>
|
|
105
|
+
|
|
106
|
+
## Link
|
|
107
|
+
|
|
108
|
+
With `href`, the button renders as a link. For a relative `href`, the button gets `active` when the current URL matches, according to `autoActive` (default `partial`). Add `pushState` to navigate without reloading the page.
|
|
109
|
+
|
|
110
|
+
<sonic-code>
|
|
111
|
+
<template>
|
|
112
|
+
<div class="flex flex-wrap gap-2">
|
|
113
|
+
<sonic-button href="https://example.com" target="_blank" type="primary">External link</sonic-button>
|
|
114
|
+
<sonic-button href="/core/components/ui/button" variant="ghost">Current page</sonic-button>
|
|
115
|
+
</div>
|
|
116
|
+
</template>
|
|
117
|
+
</sonic-code>
|
|
118
|
+
|
|
119
|
+
## Toggle and radio
|
|
120
|
+
|
|
121
|
+
A button with `name` and `value` writes to its `formDataProvider` and toggles `active` when clicked. Add `radio` for a single choice in a group, or `unique` to also allow deselecting. Children marked `swap="on"` / `swap="off"` show only in the active / inactive state.
|
|
122
|
+
|
|
123
|
+
<sonic-code>
|
|
124
|
+
<template>
|
|
125
|
+
<div class="flex flex-wrap items-center gap-4">
|
|
126
|
+
<sonic-button formDataProvider="button-toggle-demo" name="visible" value="yes" type="primary" shape="circle" variant="outline">
|
|
127
|
+
<sonic-icon library="iconoir" swap="on" name="eye-empty"></sonic-icon>
|
|
128
|
+
<sonic-icon library="iconoir" swap="off" name="eye-off"></sonic-icon>
|
|
129
|
+
</sonic-button>
|
|
130
|
+
<sonic-group formDataProvider="button-radio-demo">
|
|
131
|
+
<sonic-button radio minWidth="7rem" name="plan" value="free">Free</sonic-button>
|
|
132
|
+
<sonic-button radio minWidth="7rem" name="plan" value="pro">Pro</sonic-button>
|
|
133
|
+
<sonic-button radio minWidth="7rem" name="plan" value="team">Team</sonic-button>
|
|
134
|
+
</sonic-group>
|
|
135
|
+
</div>
|
|
136
|
+
</template>
|
|
137
|
+
</sonic-code>
|
|
138
|
+
|
|
139
|
+
## Reset
|
|
140
|
+
|
|
141
|
+
`reset` clears the button's own `formDataProvider`. Give it a value to clear another one by name.
|
|
142
|
+
|
|
143
|
+
<sonic-code>
|
|
144
|
+
<template>
|
|
145
|
+
<div formDataProvider="button-reset-demo" class="mb-2">
|
|
146
|
+
<sonic-checkbox name="agree" value="yes">Extra baggage</sonic-checkbox>
|
|
147
|
+
<sonic-button reset>Reset this form</sonic-button>
|
|
148
|
+
</div>
|
|
149
|
+
<sonic-button reset="button-reset-demo">Reset by name</sonic-button>
|
|
150
|
+
</template>
|
|
151
|
+
</sonic-code>
|
|
152
|
+
|
|
153
|
+
## Go back
|
|
154
|
+
|
|
155
|
+
`goBack` navigates back in history. When there is no previous page on the same origin, it goes to the attribute value, or to the site root if empty.
|
|
156
|
+
|
|
157
|
+
<sonic-code>
|
|
158
|
+
<template>
|
|
159
|
+
<sonic-button goBack="/" variant="outline">
|
|
160
|
+
<sonic-icon library="iconoir" slot="prefix" name="arrow-left"></sonic-icon>
|
|
161
|
+
Back
|
|
162
|
+
</sonic-button>
|
|
163
|
+
</template>
|
|
164
|
+
</sonic-code>
|
|
165
|
+
|
|
166
|
+
## Accessibility
|
|
167
|
+
|
|
168
|
+
Icon-only buttons need a label. Use `data-aria-label`, which is forwarded to the inner `button` (and link).
|
|
169
|
+
|
|
170
|
+
<sonic-code>
|
|
171
|
+
<template>
|
|
172
|
+
<sonic-button shape="circle" data-aria-label="Close">
|
|
173
|
+
<sonic-icon library="iconoir" name="cancel"></sonic-icon>
|
|
174
|
+
</sonic-button>
|
|
175
|
+
</template>
|
|
176
|
+
</sonic-code>
|
|
177
|
+
|
|
178
|
+
## API reference
|
|
179
|
+
|
|
180
|
+
| Attribute | Values | Description |
|
|
181
|
+
|----------|---------|-------------|
|
|
182
|
+
| `type` | `default` (default) · `primary` · `neutral` · `warning` · `info` · `success` · `danger` · `custom` | Color; `custom` reads `--sc-btn-custom-color` and `--sc-btn-custom-bg` |
|
|
183
|
+
| `variant` | `default` (default) · `outline` · `ghost` · `link` · `unstyled` | Visual style |
|
|
184
|
+
| `size` | `2xs` … `2xl` (default `md`) · `inherit` | Typography and padding |
|
|
185
|
+
| `shape` | `default` (default) · `circle` · `square` · `block` | Icon button or full width |
|
|
186
|
+
| `icon` | boolean | Enlarges a lone icon |
|
|
187
|
+
| `loading` | boolean | Shows a spinner and blocks clicks |
|
|
188
|
+
| `disabled` | boolean | Dims the button and blocks clicks |
|
|
189
|
+
| `active` | boolean | Active state, set automatically for links and toggles |
|
|
190
|
+
| `align` | `left` · `center` · `right` | Text alignment |
|
|
191
|
+
| `direction` | flex direction (default `row`) | Layout of slots |
|
|
192
|
+
| `alignItems` | flex `align-items` (default `center`) | Cross-axis alignment of slots |
|
|
193
|
+
| `justify` | flex `justify-content` (default `center`) | Main-axis alignment of slots |
|
|
194
|
+
| `minWidth` | CSS length (default `0`) | Minimum width of the button |
|
|
195
|
+
| `href` | URL | Renders the button as a link |
|
|
196
|
+
| `target` | `_self` · `_blank` · `_parent` · `_top` | Link target |
|
|
197
|
+
| `download` | string | Link `download` attribute |
|
|
198
|
+
| `pushState` | boolean | Navigates with `history.pushState` |
|
|
199
|
+
| `autoActive` | `partial` (default) · `strict` · `strict-path-only` · `disabled` | URL matching for `active` |
|
|
200
|
+
| `goBack` | URL or empty | Goes back in history, with a fallback URL |
|
|
201
|
+
| `reset` | empty or provider name | Clears the current or named form data provider |
|
|
202
|
+
| `name` / `value` | string | Form field written to the data provider |
|
|
203
|
+
| `formDataProvider` | string | Data provider to write to (default: nearest ancestor) |
|
|
204
|
+
| `radio` | boolean | Single choice among buttons with the same `name` |
|
|
205
|
+
| `unique` | boolean | Like `radio`, but can be deselected |
|
|
206
|
+
| `autoRepeat` | boolean | Repeats the click while the pointer is held |
|
|
207
|
+
| `data-aria-label` | string | `aria-label` of the inner button |
|
|
208
|
+
| `data-aria-labelledby` | string | `aria-labelledby` of the inner button |
|
|
209
|
+
| `data-aria-controls` | string | `aria-controls` of the inner button |
|
|
210
|
+
| `data-aria-expanded` | boolean | `aria-expanded` of the inner button |
|
|
211
|
+
|
|
212
|
+
| Slot | Description |
|
|
213
|
+
|------|-------------|
|
|
214
|
+
| *(default)* | Label |
|
|
215
|
+
| `prefix` | Icon or text before the label |
|
|
216
|
+
| `suffix` | Icon or text after the label |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Captcha
|
|
2
|
+
|
|
3
|
+
**`sonic-captcha`** embeds an [ALTCHA](https://altcha.org) proof-of-work widget and makes the nearest form wait for it. Place it inside a form scope and put **`sonic-submit`** in its default slot: the widget renders above the slot content, and the submit sends only once a token is available.
|
|
4
|
+
|
|
5
|
+
## Basic example
|
|
6
|
+
|
|
7
|
+
The widget loads only on **HTTPS**. On plain HTTP the component renders nothing and the form is not blocked.
|
|
8
|
+
|
|
9
|
+
<sonic-code>
|
|
10
|
+
<template>
|
|
11
|
+
<sonic-scope
|
|
12
|
+
serviceURL="/docs-mock-api"
|
|
13
|
+
formDataProvider="captcha-docs-form"
|
|
14
|
+
submitResultDataProvider="captcha-docs-result"
|
|
15
|
+
>
|
|
16
|
+
<sonic-captcha>
|
|
17
|
+
<sonic-input class="mb-3 block" name="email" type="email" label="Email" value="demo@example.com"></sonic-input>
|
|
18
|
+
<sonic-submit endPoint="api/register" onClick>
|
|
19
|
+
<sonic-button type="primary">Join the crew</sonic-button>
|
|
20
|
+
</sonic-submit>
|
|
21
|
+
</sonic-captcha>
|
|
22
|
+
</sonic-scope>
|
|
23
|
+
</template>
|
|
24
|
+
</sonic-code>
|
|
25
|
+
|
|
26
|
+
## Form integration
|
|
27
|
+
|
|
28
|
+
The component writes to the publisher named by the closest `headersDataProvider`, or else `formDataProvider`, on itself or an ancestor. On connect it sets `needsCaptchaValidation` to `true`. When **`sonic-submit`** sees that flag, it requests a token, the captcha copies the solved ALTCHA payload into `captchaToken` and its key into `captchaKey`, and the request is sent. `needsCaptchaValidation` is stripped from the payload. On disconnect both fields are reset.
|
|
29
|
+
|
|
30
|
+
<sonic-code language="typescript">
|
|
31
|
+
<template>
|
|
32
|
+
{
|
|
33
|
+
email: "demo@example.com",
|
|
34
|
+
captchaKey: "…",
|
|
35
|
+
captchaToken: "…"
|
|
36
|
+
}
|
|
37
|
+
</template>
|
|
38
|
+
</sonic-code>
|
|
39
|
+
|
|
40
|
+
## Key and challenge endpoint
|
|
41
|
+
|
|
42
|
+
With no `key`, the component generates an encrypted key on connect. The widget fetches its challenge from the `chalengeUrl` property (a JavaScript property, not an attribute) with `key` and `maxNumber` (default `50000`) as query parameters. Point it at your own ALTCHA server and verify `captchaToken` there.
|
|
43
|
+
|
|
44
|
+
Labels follow the page language: French when `<html lang>` starts with `fr`, English otherwise.
|
|
45
|
+
|
|
46
|
+
## API reference
|
|
47
|
+
|
|
48
|
+
| Attribute | Values | Description |
|
|
49
|
+
|----------|---------|-------------|
|
|
50
|
+
| `key` | string (default generated) | Key sent to the challenge endpoint and copied to `captchaKey` |
|
|
51
|
+
|
|
52
|
+
| Slot | Description |
|
|
53
|
+
|------|-------------|
|
|
54
|
+
| *(default)* | Form fields and actions, rendered below the widget |
|
|
55
|
+
|
|
56
|
+
No events.
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Card
|
|
2
|
+
|
|
3
|
+
Cards **group related content** on a padded surface with radius, theme **`type`** colors, and elevation. Default **`shadow`** is `lg`. Compose **`sonic-card-header`** / **`sonic-card-main`** / **`sonic-card-footer`**, or place any markup in the default slot.
|
|
4
|
+
|
|
5
|
+
## Basic example
|
|
6
|
+
|
|
7
|
+
<sonic-code>
|
|
8
|
+
<template>
|
|
9
|
+
<sonic-card class="max-w-sm">
|
|
10
|
+
<p class="m-0">CN 001 · CDG → JFK · On time.</p>
|
|
11
|
+
</sonic-card>
|
|
12
|
+
</template>
|
|
13
|
+
</sonic-code>
|
|
14
|
+
|
|
15
|
+
## Type
|
|
16
|
+
|
|
17
|
+
Default **`type`** is `base`. **`default`** and **`light`** share the same surface tokens.
|
|
18
|
+
|
|
19
|
+
<sonic-code>
|
|
20
|
+
<template>
|
|
21
|
+
<div class="flex flex-wrap gap-3">
|
|
22
|
+
<sonic-card type="base" class="min-w-[8rem]">Base</sonic-card>
|
|
23
|
+
<sonic-card type="light" class="min-w-[8rem]">Light</sonic-card>
|
|
24
|
+
<sonic-card type="default" class="min-w-[8rem]">Default</sonic-card>
|
|
25
|
+
<sonic-card type="primary" class="min-w-[8rem]">Primary</sonic-card>
|
|
26
|
+
<sonic-card type="info" class="min-w-[8rem]">Info</sonic-card>
|
|
27
|
+
<sonic-card type="success" class="min-w-[8rem]">Success</sonic-card>
|
|
28
|
+
<sonic-card type="warning" class="min-w-[8rem]">Warning</sonic-card>
|
|
29
|
+
<sonic-card type="danger" class="min-w-[8rem]">Danger</sonic-card>
|
|
30
|
+
<sonic-card type="neutral" class="min-w-[8rem]">Neutral</sonic-card>
|
|
31
|
+
<sonic-card type="invert" class="min-w-[8rem]">Invert</sonic-card>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
</sonic-code>
|
|
35
|
+
|
|
36
|
+
## Shadow
|
|
37
|
+
|
|
38
|
+
Set **`shadow`** to control elevation. Default is `lg`.
|
|
39
|
+
|
|
40
|
+
<sonic-code>
|
|
41
|
+
<template>
|
|
42
|
+
<div class="grid gap-4 sm:grid-cols-2 max-w-2xl">
|
|
43
|
+
<sonic-card shadow="none" class="min-h-[5rem] flex items-center justify-center">None</sonic-card>
|
|
44
|
+
<sonic-card shadow="sm" class="min-h-[5rem] flex items-center justify-center">Small</sonic-card>
|
|
45
|
+
<sonic-card shadow="md" class="min-h-[5rem] flex items-center justify-center">Medium</sonic-card>
|
|
46
|
+
<sonic-card shadow="lg" class="min-h-[5rem] flex items-center justify-center">Large</sonic-card>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
</sonic-code>
|
|
50
|
+
|
|
51
|
+
## Header
|
|
52
|
+
|
|
53
|
+
Quick titles with **`label`** and **`description`**, or full control through the default slot. **`slot="suffix"`** aligns badges or actions on the right; suffix content does not shrink when the title wraps.
|
|
54
|
+
|
|
55
|
+
`label` and `description` accept HTML (rendered as markup). Prefer plain text when possible; use **`sonic-card-header-description`** or the default slot for structured content.
|
|
56
|
+
|
|
57
|
+
<sonic-code>
|
|
58
|
+
<template>
|
|
59
|
+
<div class="grid gap-4 max-w-xl">
|
|
60
|
+
<sonic-card>
|
|
61
|
+
<sonic-card-header
|
|
62
|
+
label="Account settings"
|
|
63
|
+
description="Manage your profile and preferences."
|
|
64
|
+
></sonic-card-header>
|
|
65
|
+
<p class="m-0 text-sm opacity-80">Body content goes in the card slot or in <code>sonic-card-main</code>.</p>
|
|
66
|
+
</sonic-card>
|
|
67
|
+
|
|
68
|
+
<sonic-card type="neutral">
|
|
69
|
+
<sonic-card-header label="Notifications">
|
|
70
|
+
<sonic-card-header-description>
|
|
71
|
+
Choose what we email you about.
|
|
72
|
+
</sonic-card-header-description>
|
|
73
|
+
<sonic-badge slot="suffix" type="warning" size="xs">3 new</sonic-badge>
|
|
74
|
+
</sonic-card-header>
|
|
75
|
+
</sonic-card>
|
|
76
|
+
|
|
77
|
+
<sonic-card>
|
|
78
|
+
<sonic-card-header label="Team workspace" description="Shared with 12 members">
|
|
79
|
+
<sonic-button
|
|
80
|
+
slot="suffix"
|
|
81
|
+
shape="circle"
|
|
82
|
+
variant="outline"
|
|
83
|
+
size="sm"
|
|
84
|
+
type="default"
|
|
85
|
+
icon
|
|
86
|
+
data-aria-label="Workspace settings"
|
|
87
|
+
>
|
|
88
|
+
<sonic-icon library="iconoir" name="settings"></sonic-icon>
|
|
89
|
+
</sonic-button>
|
|
90
|
+
</sonic-card-header>
|
|
91
|
+
</sonic-card>
|
|
92
|
+
|
|
93
|
+
<sonic-card type="primary">
|
|
94
|
+
<sonic-card-header>
|
|
95
|
+
<div>Custom header</div>
|
|
96
|
+
<sonic-card-header-description>
|
|
97
|
+
Use the header slot when attributes are not enough.
|
|
98
|
+
</sonic-card-header-description>
|
|
99
|
+
<sonic-button slot="suffix" shape="circle" variant="ghost" size="sm" type="primary" icon>
|
|
100
|
+
<sonic-icon library="iconoir" name="nav-arrow-right"></sonic-icon>
|
|
101
|
+
</sonic-button>
|
|
102
|
+
</sonic-card-header>
|
|
103
|
+
</sonic-card>
|
|
104
|
+
</div>
|
|
105
|
+
</template>
|
|
106
|
+
</sonic-code>
|
|
107
|
+
|
|
108
|
+
## Main
|
|
109
|
+
|
|
110
|
+
Optional wrapper for the primary content area (typography, media, forms).
|
|
111
|
+
|
|
112
|
+
<sonic-code>
|
|
113
|
+
<template>
|
|
114
|
+
<sonic-card class="max-w-xl">
|
|
115
|
+
<sonic-card-header label="Release notes" description="Version 2.4"></sonic-card-header>
|
|
116
|
+
<sonic-card-main>
|
|
117
|
+
<p class="mt-0">
|
|
118
|
+
Improved performance on large lists and fixed an issue with keyboard navigation in menus.
|
|
119
|
+
</p>
|
|
120
|
+
<sonic-divider></sonic-divider>
|
|
121
|
+
<p class="mb-0 text-sm opacity-80">See the changelog for details.</p>
|
|
122
|
+
</sonic-card-main>
|
|
123
|
+
</sonic-card>
|
|
124
|
+
</template>
|
|
125
|
+
</sonic-code>
|
|
126
|
+
|
|
127
|
+
## Footer
|
|
128
|
+
|
|
129
|
+
Optional footer for actions, metadata, or secondary text.
|
|
130
|
+
|
|
131
|
+
<sonic-code>
|
|
132
|
+
<template>
|
|
133
|
+
<sonic-card class="max-w-xl">
|
|
134
|
+
<sonic-card-header label="Confirm deletion"></sonic-card-header>
|
|
135
|
+
<sonic-card-main>
|
|
136
|
+
<p class="m-0">This project and all of its data will be removed permanently.</p>
|
|
137
|
+
</sonic-card-main>
|
|
138
|
+
<sonic-card-footer>
|
|
139
|
+
<sonic-divider></sonic-divider>
|
|
140
|
+
<div class="flex flex-wrap gap-2 justify-end">
|
|
141
|
+
<sonic-button variant="ghost" size="sm">Cancel</sonic-button>
|
|
142
|
+
<sonic-button type="danger" size="sm">Delete</sonic-button>
|
|
143
|
+
</div>
|
|
144
|
+
</sonic-card-footer>
|
|
145
|
+
</sonic-card>
|
|
146
|
+
</template>
|
|
147
|
+
</sonic-code>
|
|
148
|
+
|
|
149
|
+
## Full example
|
|
150
|
+
|
|
151
|
+
Header, media, body, and footer together.
|
|
152
|
+
|
|
153
|
+
<sonic-code>
|
|
154
|
+
<template>
|
|
155
|
+
<sonic-card class="max-w-md">
|
|
156
|
+
<sonic-card-header label="Featured route" description="CDG → JFK">
|
|
157
|
+
<sonic-icon slot="suffix" library="iconoir" name="airplane" aria-hidden="true"></sonic-icon>
|
|
158
|
+
</sonic-card-header>
|
|
159
|
+
<sonic-card-main>
|
|
160
|
+
<sonic-image
|
|
161
|
+
rounded
|
|
162
|
+
ratio="16/9"
|
|
163
|
+
src="/img/concorde/plane_04.jpg"
|
|
164
|
+
alt="Concorde on the apron under a blue sky"
|
|
165
|
+
></sonic-image>
|
|
166
|
+
<p class="mb-0">
|
|
167
|
+
Nonstop at Mach 2.04, with flexible dates.
|
|
168
|
+
</p>
|
|
169
|
+
</sonic-card-main>
|
|
170
|
+
<sonic-card-footer>
|
|
171
|
+
<div class="flex items-center justify-between gap-3 flex-wrap">
|
|
172
|
+
<span class="text-sm font-semibold">Cabin class: Business</span>
|
|
173
|
+
<sonic-button type="primary" size="sm">Book</sonic-button>
|
|
174
|
+
</div>
|
|
175
|
+
</sonic-card-footer>
|
|
176
|
+
</sonic-card>
|
|
177
|
+
</template>
|
|
178
|
+
</sonic-code>
|
|
179
|
+
|
|
180
|
+
## API reference
|
|
181
|
+
|
|
182
|
+
### `sonic-card`
|
|
183
|
+
|
|
184
|
+
| Attribute | Values | Description |
|
|
185
|
+
|----------|---------|-------------|
|
|
186
|
+
| `type` | `base` (default) · `light` · `invert` · `default` · `primary` · `warning` · `danger` · `success` · `info` · `neutral` | Semantic background and text (`default` and `light` share the same surface) |
|
|
187
|
+
| `shadow` | `none` · `sm` · `md` · `lg` (default `lg`) | Elevation on the card surface |
|
|
188
|
+
|
|
189
|
+
| Slot | Description |
|
|
190
|
+
|------|-------------|
|
|
191
|
+
| *(default)* | Free-form content (header, main, footer, or direct markup) |
|
|
192
|
+
|
|
193
|
+
### `sonic-card-header`
|
|
194
|
+
|
|
195
|
+
| Attribute | Values | Description |
|
|
196
|
+
|----------|---------|-------------|
|
|
197
|
+
| `label` | HTML | Title (rendered as markup) |
|
|
198
|
+
| `description` | HTML | Subtitle below the title |
|
|
199
|
+
|
|
200
|
+
| Slot | Description |
|
|
201
|
+
|------|-------------|
|
|
202
|
+
| *(default)* | Custom title / description when attributes are not enough |
|
|
203
|
+
| `suffix` | Actions or badges aligned on the right (does not shrink) |
|
|
204
|
+
|
|
205
|
+
### `sonic-card-header-description`
|
|
206
|
+
|
|
207
|
+
| Slot | Description |
|
|
208
|
+
|------|-------------|
|
|
209
|
+
| *(default)* | Subtitle text; styled below the title when slotted in **`sonic-card-header`** |
|
|
210
|
+
|
|
211
|
+
### `sonic-card-main` · `sonic-card-footer`
|
|
212
|
+
|
|
213
|
+
| Slot | Description |
|
|
214
|
+
|------|-------------|
|
|
215
|
+
| *(default)* | Primary content (`main`) or actions / metadata (`footer`) |
|