@supersoniks/concorde 4.9.98-visual-stack.0 → 4.9.98-visual-stack.2
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/.gitlab-ci.yml +0 -13
- package/build-infos.json +1 -1
- package/concorde-3d.bundle.js +201 -152
- package/concorde-3d.es.js +14688 -13906
- package/concorde-core.bundle.js +557 -622
- package/concorde-core.es.js +6025 -5575
- package/concorde-hugging-face-infer.bundle.js +1 -1
- package/concorde-hugging-face-infer.es.js +1 -1
- package/concorde-interactive.bundle.js +1162 -0
- package/concorde-interactive.es.js +10723 -0
- package/concorde-shader.bundle.js +31 -20
- package/concorde-shader.es.js +2773 -2547
- package/concorde-webgpu.bundle.js +43 -32
- package/concorde-webgpu.es.js +1819 -1553
- package/dist/concorde-3d.bundle.js +201 -152
- package/dist/concorde-3d.es.js +14688 -13906
- package/dist/concorde-core.bundle.js +557 -622
- package/dist/concorde-core.es.js +6025 -5575
- package/dist/concorde-hugging-face-infer.bundle.js +1 -1
- package/dist/concorde-hugging-face-infer.es.js +1 -1
- package/dist/concorde-interactive.bundle.js +1162 -0
- package/dist/concorde-interactive.es.js +10723 -0
- package/dist/concorde-shader.bundle.js +31 -20
- package/dist/concorde-shader.es.js +2773 -2547
- package/dist/concorde-webgpu.bundle.js +43 -32
- package/dist/concorde-webgpu.es.js +1819 -1553
- package/dist/docs-mock-api-sw.js +5 -1
- package/dist/docs-mock-api-sw.js.map +2 -2
- package/dist/js/addons/interactive.js +6 -0
- package/dist/js/addons/interactive.js.map +1 -0
- package/dist/js/core/components/functional/3d/3d.js +90 -2
- package/dist/js/core/components/functional/3d/3d.js.map +1 -1
- package/dist/js/core/components/functional/3d/constants.js +1 -0
- package/dist/js/core/components/functional/3d/constants.js.map +1 -1
- package/dist/js/core/components/functional/3d/ensure.js +6 -3
- package/dist/js/core/components/functional/3d/ensure.js.map +1 -1
- package/dist/js/core/components/functional/3d/form-params.js +2 -0
- package/dist/js/core/components/functional/3d/form-params.js.map +1 -1
- package/dist/js/core/components/functional/3d/life.js +2 -1
- package/dist/js/core/components/functional/3d/life.js.map +1 -1
- package/dist/js/core/components/functional/3d/out-publish.js +3 -2
- package/dist/js/core/components/functional/3d/out-publish.js.map +1 -1
- package/dist/js/core/components/functional/3d/playback.js +6 -1
- package/dist/js/core/components/functional/3d/playback.js.map +1 -1
- package/dist/js/core/components/functional/3d/post-bind.js +207 -0
- package/dist/js/core/components/functional/3d/post-bind.js.map +1 -0
- package/dist/js/core/components/functional/3d/post-channels.js +39 -0
- package/dist/js/core/components/functional/3d/post-channels.js.map +1 -0
- package/dist/js/core/components/functional/3d/post-fx.js +495 -0
- package/dist/js/core/components/functional/3d/post-fx.js.map +1 -0
- package/dist/js/core/components/functional/3d/props.js +142 -0
- package/dist/js/core/components/functional/3d/props.js.map +1 -1
- package/dist/js/core/components/functional/3d/reload.js +2 -0
- package/dist/js/core/components/functional/3d/reload.js.map +1 -1
- package/dist/js/core/components/functional/3d/runtime.js +80 -3
- package/dist/js/core/components/functional/3d/runtime.js.map +1 -1
- package/dist/js/core/components/functional/3d/scene-runtime.js +1 -1
- package/dist/js/core/components/functional/3d/scene-runtime.js.map +1 -1
- package/dist/js/core/components/functional/3d/tune.js +21 -0
- package/dist/js/core/components/functional/3d/tune.js.map +1 -1
- package/dist/js/core/components/functional/3d/updated.js +13 -1
- package/dist/js/core/components/functional/3d/updated.js.map +1 -1
- package/dist/js/core/components/functional/if/if.js +65 -7
- package/dist/js/core/components/functional/if/if.js.map +1 -1
- package/dist/js/core/components/functional/interactive/action.js +96 -0
- package/dist/js/core/components/functional/interactive/action.js.map +1 -0
- package/dist/js/core/components/functional/interactive/gamepad.js +206 -0
- package/dist/js/core/components/functional/interactive/gamepad.js.map +1 -0
- package/dist/js/core/components/functional/interactive/gesture.js +148 -0
- package/dist/js/core/components/functional/interactive/gesture.js.map +1 -0
- package/dist/js/core/components/functional/interactive/helpers.js +82 -0
- package/dist/js/core/components/functional/interactive/helpers.js.map +1 -0
- package/dist/js/core/components/functional/interactive/index.js +20 -0
- package/dist/js/core/components/functional/interactive/index.js.map +1 -0
- package/dist/js/core/components/functional/interactive/keyboard.js +183 -0
- package/dist/js/core/components/functional/interactive/keyboard.js.map +1 -0
- package/dist/js/core/components/functional/interactive/matrix.js +201 -0
- package/dist/js/core/components/functional/interactive/matrix.js.map +1 -0
- package/dist/js/core/components/functional/interactive/registry.js +28 -0
- package/dist/js/core/components/functional/interactive/registry.js.map +1 -0
- package/dist/js/core/components/functional/interactive/store.js +264 -0
- package/dist/js/core/components/functional/interactive/store.js.map +1 -0
- package/dist/js/core/components/functional/interactive/ticker.js +182 -0
- package/dist/js/core/components/functional/interactive/ticker.js.map +1 -0
- package/dist/js/core/components/functional/shader/gl-runtime.js +128 -14
- package/dist/js/core/components/functional/shader/gl-runtime.js.map +1 -1
- package/dist/js/core/components/functional/shader/shader.js +154 -57
- package/dist/js/core/components/functional/shader/shader.js.map +1 -1
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js +39 -5
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js.map +1 -1
- package/dist/js/core/components/functional/shader/types.js +58 -7
- package/dist/js/core/components/functional/shader/types.js.map +1 -1
- package/dist/js/core/components/functional/value/value.js +49 -4
- package/dist/js/core/components/functional/value/value.js.map +1 -1
- package/dist/js/core/components/functional/webgpu/gl-fallback.js +27 -6
- package/dist/js/core/components/functional/webgpu/gl-fallback.js.map +1 -1
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js +115 -13
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js.map +1 -1
- package/dist/js/core/components/functional/webgpu/helpers.js +8 -2
- package/dist/js/core/components/functional/webgpu/helpers.js.map +1 -1
- package/dist/js/core/components/functional/webgpu/webgpu.js +34 -1
- package/dist/js/core/components/functional/webgpu/webgpu.js.map +1 -1
- package/dist/js/core/components/ui/_css/rounded.js +34 -0
- package/dist/js/core/components/ui/_css/rounded.js.map +1 -0
- package/dist/js/core/components/ui/_css/type.js +44 -0
- package/dist/js/core/components/ui/_css/type.js.map +1 -1
- package/dist/js/core/components/ui/_i18n/ui-aria-labels.js +95 -0
- package/dist/js/core/components/ui/_i18n/ui-aria-labels.js.map +1 -0
- package/dist/js/core/components/ui/alert/alert.js +72 -87
- package/dist/js/core/components/ui/alert/alert.js.map +1 -1
- package/dist/js/core/components/ui/alert-messages/alert-messages.js +1 -0
- package/dist/js/core/components/ui/alert-messages/alert-messages.js.map +1 -1
- package/dist/js/core/components/ui/badge/badge.js +29 -80
- package/dist/js/core/components/ui/badge/badge.js.map +1 -1
- package/dist/js/core/components/ui/button/button.js +8 -7
- package/dist/js/core/components/ui/button/button.js.map +1 -1
- package/dist/js/core/components/ui/card/card-header.js +7 -2
- package/dist/js/core/components/ui/card/card-header.js.map +1 -1
- package/dist/js/core/components/ui/divider/divider.js +1 -1
- package/dist/js/core/components/ui/divider/divider.js.map +1 -1
- package/dist/js/core/components/ui/form/checkbox/checkbox.js +4 -20
- package/dist/js/core/components/ui/form/checkbox/checkbox.js.map +1 -1
- package/dist/js/core/components/ui/form/fieldset/legend-description.js +1 -1
- package/dist/js/core/components/ui/form/fieldset/legend.js +1 -1
- package/dist/js/core/components/ui/form/input/input.js +12 -15
- package/dist/js/core/components/ui/form/input/input.js.map +1 -1
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js +363 -158
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js.map +1 -1
- package/dist/js/core/components/ui/form/radio/radio.js +1 -1
- package/dist/js/core/components/ui/form/select/select.js +3 -6
- package/dist/js/core/components/ui/form/select/select.js.map +1 -1
- package/dist/js/core/components/ui/form/textarea/textarea.js +1 -2
- package/dist/js/core/components/ui/form/textarea/textarea.js.map +1 -1
- package/dist/js/core/components/ui/image/image.js +9 -37
- package/dist/js/core/components/ui/image/image.js.map +1 -1
- package/dist/js/core/components/ui/link/link.js +25 -26
- package/dist/js/core/components/ui/link/link.js.map +1 -1
- package/dist/js/core/components/ui/modal/modal-close.js +3 -12
- package/dist/js/core/components/ui/modal/modal-close.js.map +1 -1
- package/dist/js/core/components/ui/modal/modal.js +18 -18
- package/dist/js/core/components/ui/modal/modal.js.map +1 -1
- package/dist/js/core/components/ui/pop/pop.js +131 -112
- package/dist/js/core/components/ui/pop/pop.js.map +1 -1
- package/dist/js/core/components/ui/table/table.js.map +1 -1
- package/dist/js/core/components/ui/theme/theme.js +1 -1
- package/dist/js/core/components/ui/toast/dismissed.js +9 -0
- package/dist/js/core/components/ui/toast/dismissed.js.map +1 -0
- package/dist/js/core/components/ui/toast/render-content.js +14 -0
- package/dist/js/core/components/ui/toast/render-content.js.map +1 -0
- package/dist/js/core/components/ui/toast/toast-item.js +150 -96
- package/dist/js/core/components/ui/toast/toast-item.js.map +1 -1
- package/dist/js/core/components/ui/toast/toast.js +41 -13
- package/dist/js/core/components/ui/toast/toast.js.map +1 -1
- package/dist/js/core/components/ui/tooltip/tooltip.js +144 -143
- package/dist/js/core/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/js/core/decorators/subscriber/ancestorAttribute.js.map +1 -1
- package/dist/js/core/decorators/subscriber/derive.js +3 -1
- package/dist/js/core/decorators/subscriber/derive.js.map +1 -1
- package/dist/js/core/mixins/Fetcher.js.map +1 -1
- package/dist/js/core/mixins/FormCheckable.js +1 -8
- package/dist/js/core/mixins/FormCheckable.js.map +1 -1
- package/dist/js/core/mixins/FormElement.js +26 -53
- package/dist/js/core/mixins/FormElement.js.map +1 -1
- package/dist/js/core/utils/AncestorAttributeObserver.js +130 -55
- package/dist/js/core/utils/AncestorAttributeObserver.js.map +1 -1
- package/dist/js/core/utils/LocationHandler.js +1 -1
- package/dist/js/core/utils/LocationHandler.js.map +1 -1
- package/dist/js/core/utils/dismissed.js +23 -0
- package/dist/js/core/utils/dismissed.js.map +1 -0
- package/dist/js/core/utils/mediaRef.js +37 -0
- package/dist/js/core/utils/mediaRef.js.map +1 -1
- package/dist/js/core/utils/positioning.js +110 -0
- package/dist/js/core/utils/positioning.js.map +1 -0
- package/dist/js/directives.js +1 -2
- package/dist/js/directives.js.map +1 -1
- package/dist/types/addons/interactive.d.ts +6 -0
- package/dist/types/addons/interactive.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/3d.d.ts +26 -3
- package/dist/types/core/components/functional/3d/3d.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/constants.d.ts +1 -1
- package/dist/types/core/components/functional/3d/constants.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/ensure.d.ts +3 -0
- package/dist/types/core/components/functional/3d/ensure.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/form-params.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/life.d.ts +2 -0
- package/dist/types/core/components/functional/3d/life.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/out-publish.d.ts +1 -0
- package/dist/types/core/components/functional/3d/out-publish.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/playback.d.ts +9 -0
- package/dist/types/core/components/functional/3d/playback.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/post-bind.d.ts +52 -0
- package/dist/types/core/components/functional/3d/post-bind.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/post-channels.d.ts +40 -0
- package/dist/types/core/components/functional/3d/post-channels.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/post-fx.d.ts +73 -0
- package/dist/types/core/components/functional/3d/post-fx.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/props.d.ts +42 -0
- package/dist/types/core/components/functional/3d/props.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/reload.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/runtime.d.ts +16 -1
- package/dist/types/core/components/functional/3d/runtime.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/scene-runtime.d.ts +1 -1
- package/dist/types/core/components/functional/3d/scene-runtime.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/tune.d.ts +5 -0
- package/dist/types/core/components/functional/3d/tune.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/types.d.ts +9 -0
- package/dist/types/core/components/functional/3d/types.d.ts.map +1 -1
- package/dist/types/core/components/functional/3d/updated.d.ts.map +1 -1
- package/dist/types/core/components/functional/if/if.d.ts +14 -5
- package/dist/types/core/components/functional/if/if.d.ts.map +1 -1
- package/dist/types/core/components/functional/interactive/action.d.ts +22 -0
- package/dist/types/core/components/functional/interactive/action.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/gamepad.d.ts +37 -0
- package/dist/types/core/components/functional/interactive/gamepad.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/gesture.d.ts +26 -0
- package/dist/types/core/components/functional/interactive/gesture.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/helpers.d.ts +23 -0
- package/dist/types/core/components/functional/interactive/helpers.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/index.d.ts +20 -0
- package/dist/types/core/components/functional/interactive/index.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/keyboard.d.ts +37 -0
- package/dist/types/core/components/functional/interactive/keyboard.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/matrix.d.ts +31 -0
- package/dist/types/core/components/functional/interactive/matrix.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/registry.d.ts +23 -0
- package/dist/types/core/components/functional/interactive/registry.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/store.d.ts +46 -0
- package/dist/types/core/components/functional/interactive/store.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/ticker.d.ts +33 -0
- package/dist/types/core/components/functional/interactive/ticker.d.ts.map +1 -0
- package/dist/types/core/components/functional/shader/gl-runtime.d.ts +33 -1
- package/dist/types/core/components/functional/shader/gl-runtime.d.ts.map +1 -1
- package/dist/types/core/components/functional/shader/shader.d.ts +28 -7
- package/dist/types/core/components/functional/shader/shader.d.ts.map +1 -1
- package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts +16 -2
- package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts.map +1 -1
- package/dist/types/core/components/functional/shader/types.d.ts +29 -5
- package/dist/types/core/components/functional/shader/types.d.ts.map +1 -1
- package/dist/types/core/components/functional/value/value.d.ts +6 -0
- package/dist/types/core/components/functional/value/value.d.ts.map +1 -1
- package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts +4 -0
- package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts.map +1 -1
- package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts +14 -0
- package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts.map +1 -1
- package/dist/types/core/components/functional/webgpu/helpers.d.ts +1 -0
- package/dist/types/core/components/functional/webgpu/helpers.d.ts.map +1 -1
- package/dist/types/core/components/functional/webgpu/webgpu.d.ts +7 -1
- package/dist/types/core/components/functional/webgpu/webgpu.d.ts.map +1 -1
- package/dist/types/core/components/ui/_css/rounded.d.ts +3 -0
- package/dist/types/core/components/ui/_css/rounded.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/type.d.ts +13 -0
- package/dist/types/core/components/ui/_css/type.d.ts.map +1 -1
- package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts +83 -0
- package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts.map +1 -0
- package/dist/types/core/components/ui/alert/alert.d.ts +14 -12
- package/dist/types/core/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts.map +1 -1
- package/dist/types/core/components/ui/badge/badge.d.ts +1 -1
- package/dist/types/core/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/types/core/components/ui/button/button.d.ts +13 -29
- package/dist/types/core/components/ui/button/button.d.ts.map +1 -1
- package/dist/types/core/components/ui/card/card-header.d.ts.map +1 -1
- package/dist/types/core/components/ui/divider/divider.d.ts +2 -1
- package/dist/types/core/components/ui/divider/divider.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts +25 -73
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/input/input.d.ts +14 -29
- package/dist/types/core/components/ui/form/input/input.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +63 -65
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/radio/radio.d.ts +1 -1
- package/dist/types/core/components/ui/form/select/select.d.ts +3 -5
- package/dist/types/core/components/ui/form/select/select.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts +12 -28
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts.map +1 -1
- package/dist/types/core/components/ui/image/image.d.ts +2 -1
- package/dist/types/core/components/ui/image/image.d.ts.map +1 -1
- package/dist/types/core/components/ui/link/link.d.ts +10 -9
- package/dist/types/core/components/ui/link/link.d.ts.map +1 -1
- package/dist/types/core/components/ui/modal/modal-close.d.ts +2 -2
- package/dist/types/core/components/ui/modal/modal-close.d.ts.map +1 -1
- package/dist/types/core/components/ui/pop/pop.d.ts +12 -4
- package/dist/types/core/components/ui/pop/pop.d.ts.map +1 -1
- package/dist/types/core/components/ui/table/table.d.ts +2 -1
- package/dist/types/core/components/ui/table/table.d.ts.map +1 -1
- package/dist/types/core/components/ui/toast/dismissed.d.ts +3 -0
- package/dist/types/core/components/ui/toast/dismissed.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/render-content.d.ts +7 -0
- package/dist/types/core/components/ui/toast/render-content.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/toast-item.d.ts +26 -9
- package/dist/types/core/components/ui/toast/toast-item.d.ts.map +1 -1
- package/dist/types/core/components/ui/toast/toast.d.ts +6 -3
- package/dist/types/core/components/ui/toast/toast.d.ts.map +1 -1
- package/dist/types/core/components/ui/toast/types.d.ts +12 -2
- package/dist/types/core/components/ui/toast/types.d.ts.map +1 -1
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts +19 -11
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts.map +1 -1
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts +3 -4
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts.map +1 -1
- package/dist/types/core/decorators/subscriber/derive.d.ts.map +1 -1
- package/dist/types/core/mixins/FormCheckable.d.ts +10 -27
- package/dist/types/core/mixins/FormCheckable.d.ts.map +1 -1
- package/dist/types/core/mixins/FormElement.d.ts +21 -10
- package/dist/types/core/mixins/FormElement.d.ts.map +1 -1
- package/dist/types/core/mixins/FormInput.d.ts +11 -27
- package/dist/types/core/mixins/FormInput.d.ts.map +1 -1
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts +17 -9
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts.map +1 -1
- package/dist/types/core/utils/LocationHandler.d.ts +3 -2
- package/dist/types/core/utils/LocationHandler.d.ts.map +1 -1
- package/dist/types/core/utils/dismissed.d.ts +3 -0
- package/dist/types/core/utils/dismissed.d.ts.map +1 -0
- package/dist/types/core/utils/mediaRef.d.ts +15 -0
- package/dist/types/core/utils/mediaRef.d.ts.map +1 -1
- package/dist/types/core/utils/positioning.d.ts +44 -0
- package/dist/types/core/utils/positioning.d.ts.map +1 -0
- package/dist/types/directives.d.ts +1 -3
- package/dist/types/directives.d.ts.map +1 -1
- package/dist/types/mixins.d.ts +22 -55
- package/dist/types/mixins.d.ts.map +1 -1
- package/docs/assets/{index-FmK4JaIM.js → index-D8MVWqY6.js} +946 -687
- package/docs/assets/index-DiD0qYvE.css +1 -0
- package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +17 -85
- package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +1 -1
- package/docs/crawl/hubs/form-components.html +13 -11
- package/docs/docs-mock-api-sw.js +5 -1
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +2 -2
- package/docs/llms-full.txt +12 -38
- package/docs/llms.txt +1 -1
- package/docs/src/core/components/functional/sdui/sdui.md +0 -0
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -0
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
- package/docs/src/docs/_getting-started/create-a-component.md +0 -0
- package/docs/src/docs/_misc/formelement-subscriber-removal.md +1 -1
- package/docs/src/docs/search/docs-search.json +195 -200
- package/docs/src/tsconfig.json +324 -0
- package/gitlab/job_tests.sh +25 -12
- package/index.html +3 -3
- package/package.json +217 -9
- package/public/docs-mock-api-sw.js +5 -1
- package/public/docs-mock-api-sw.js.map +2 -2
- package/scripts/build-addons.mjs +2 -2
- package/scripts/post-build.mjs +9 -0
- package/src/addons/interactive.ts +5 -0
- package/src/core/components/functional/3d/3d.md +34 -1
- package/src/core/components/functional/3d/3d.spec.ts +42 -0
- package/src/core/components/functional/3d/3d.ts +101 -3
- package/src/core/components/functional/3d/constants.ts +1 -0
- package/src/core/components/functional/3d/ensure.ts +11 -3
- package/src/core/components/functional/3d/form-params.ts +2 -0
- package/src/core/components/functional/3d/life.ts +4 -1
- package/src/core/components/functional/3d/out-publish.ts +4 -3
- package/src/core/components/functional/3d/playback.ts +13 -1
- package/src/core/components/functional/3d/post-bind.ts +262 -0
- package/src/core/components/functional/3d/post-channels.spec.ts +36 -0
- package/src/core/components/functional/3d/post-channels.ts +69 -0
- package/src/core/components/functional/3d/post-fx.ts +594 -0
- package/src/core/components/functional/3d/props.ts +45 -0
- package/src/core/components/functional/3d/reload.ts +2 -0
- package/src/core/components/functional/3d/runtime.ts +93 -4
- package/src/core/components/functional/3d/scene-runtime.ts +3 -0
- package/src/core/components/functional/3d/tune.ts +21 -0
- package/src/core/components/functional/3d/types.ts +9 -0
- package/src/core/components/functional/3d/updated.ts +17 -1
- package/src/core/components/functional/if/if.ts +54 -7
- package/src/core/components/functional/interactive/action.ts +84 -0
- package/src/core/components/functional/interactive/gamepad.ts +197 -0
- package/src/core/components/functional/interactive/gesture.ts +136 -0
- package/src/core/components/functional/interactive/helpers.spec.ts +50 -0
- package/src/core/components/functional/interactive/helpers.ts +97 -0
- package/src/core/components/functional/interactive/index.ts +25 -0
- package/src/core/components/functional/interactive/interactive.md +33 -0
- package/src/core/components/functional/interactive/keyboard.ts +171 -0
- package/src/core/components/functional/interactive/matrix.ts +185 -0
- package/src/core/components/functional/interactive/registry.ts +46 -0
- package/src/core/components/functional/interactive/store.ts +264 -0
- package/src/core/components/functional/interactive/ticker.ts +171 -0
- package/src/core/components/functional/list/list.ts +0 -0
- package/src/core/components/functional/shader/gl-runtime.ts +169 -12
- package/src/core/components/functional/shader/shader.md +27 -4
- package/src/core/components/functional/shader/shader.spec.ts +267 -0
- package/src/core/components/functional/shader/shader.ts +177 -55
- package/src/core/components/functional/shader/shadertoy-prelude.ts +49 -5
- package/src/core/components/functional/shader/types.ts +89 -12
- package/src/core/components/functional/subscriber/subscriber.ts +0 -0
- package/src/core/components/functional/value/value.ts +44 -4
- package/src/core/components/functional/webgpu/gl-fallback.ts +28 -4
- package/src/core/components/functional/webgpu/gpu-runtime.ts +154 -18
- package/src/core/components/functional/webgpu/helpers.ts +8 -2
- package/src/core/components/functional/webgpu/webgpu.md +13 -2
- package/src/core/components/functional/webgpu/webgpu.spec.ts +37 -0
- package/src/core/components/functional/webgpu/webgpu.ts +39 -1
- package/src/core/components/ui/_css/rounded.ts +36 -0
- package/src/core/components/ui/_css/type.ts +49 -0
- package/src/core/components/ui/_i18n/ui-aria-labels.ts +104 -0
- package/src/core/components/ui/alert/alert.md +128 -72
- package/src/core/components/ui/alert/alert.spec.ts +145 -0
- package/src/core/components/ui/alert/alert.ts +86 -91
- package/src/core/components/ui/alert-messages/alert-messages.ts +1 -1
- package/src/core/components/ui/badge/badge.md +126 -78
- package/src/core/components/ui/badge/badge.ts +29 -81
- package/src/core/components/ui/button/button.md +1 -0
- package/src/core/components/ui/button/button.ts +12 -10
- package/src/core/components/ui/card/card-header.ts +7 -2
- package/src/core/components/ui/card/card.md +120 -65
- package/src/core/components/ui/divider/divider.ts +4 -9
- package/src/core/components/ui/form/checkbox/checkbox.md +1 -1
- package/src/core/components/ui/form/checkbox/checkbox.ts +4 -20
- package/src/core/components/ui/form/fieldset/legend-description.ts +1 -1
- package/src/core/components/ui/form/fieldset/legend.ts +1 -1
- package/src/core/components/ui/form/input/input.md +1 -1
- package/src/core/components/ui/form/input/input.ts +25 -27
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +419 -187
- package/src/core/components/ui/form/radio/radio.ts +1 -1
- package/src/core/components/ui/form/select/select.ts +3 -6
- package/src/core/components/ui/form/textarea/textarea.md +1 -1
- package/src/core/components/ui/form/textarea/textarea.ts +1 -2
- package/src/core/components/ui/image/image.md +147 -53
- package/src/core/components/ui/image/image.ts +10 -44
- package/src/core/components/ui/link/link.md +2 -2
- package/src/core/components/ui/link/link.ts +42 -37
- package/src/core/components/ui/modal/modal-close.ts +8 -12
- package/src/core/components/ui/modal/modal.ts +18 -18
- package/src/core/components/ui/pop/pop.md +105 -1
- package/src/core/components/ui/pop/pop.ts +145 -141
- package/src/core/components/ui/table/table.ts +2 -8
- package/src/core/components/ui/theme/theme.ts +1 -1
- package/src/core/components/ui/toast/dismissed.ts +14 -0
- package/src/core/components/ui/toast/render-content.ts +13 -0
- package/src/core/components/ui/toast/toast-item.ts +179 -103
- package/src/core/components/ui/toast/toast.ts +58 -21
- package/src/core/components/ui/toast/types.ts +14 -2
- package/src/core/components/ui/tooltip/tooltip.ts +176 -154
- package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +26 -0
- package/src/core/decorators/subscriber/ancestorAttribute.ts +3 -4
- package/src/core/decorators/subscriber/derive.ts +3 -3
- package/src/core/mixins/Fetcher.ts +1 -1
- package/src/core/mixins/FormCheckable.ts +1 -8
- package/src/core/mixins/FormElement.ts +74 -76
- package/src/core/mixins/Subscriber.ts +0 -0
- package/src/core/utils/AncestorAttributeObserver.ts +183 -70
- package/src/core/utils/DataBindObserver.ts +0 -0
- package/src/core/utils/LocationHandler.ts +12 -5
- package/src/core/utils/Objects.ts +0 -0
- package/src/core/utils/dismissed.ts +22 -0
- package/src/core/utils/mediaRef.spec.ts +25 -0
- package/src/core/utils/mediaRef.ts +45 -0
- package/src/core/utils/positioning.spec.ts +208 -0
- package/src/core/utils/positioning.ts +183 -0
- package/src/directives.ts +1 -3
- package/src/docs/_core-concept/dataFlow.md +1 -1
- package/src/docs/_decorators/ancestor-attribute.md +3 -2
- package/src/docs/_getting-started/concorde-outside.md +3 -3
- package/src/docs/_misc/formelement-subscriber-removal.md +115 -0
- package/src/docs/_misc/html-integration.md +2 -0
- package/src/docs/_misc/visual-stack.md +19 -1
- package/src/docs/code.ts +3 -1
- package/src/docs/components/docs-demo-sources.ts +88 -0
- package/src/docs/docs.ts +3 -0
- package/src/docs/example/docs-3d-post-depth-demo.ts +68 -0
- package/src/docs/example/docs-3d-webgpu-live-demo.ts +83 -0
- package/src/docs/example/docs-harris-webgpu-demo.ts +53 -55
- package/src/docs/example/docs-input-autocomplete-demos.ts +110 -0
- package/src/docs/mock-api/router.ts +17 -1
- package/src/docs/navigation/navigation.ts +4 -0
- package/src/docs/search/docs-search.json +922 -1762
- package/src/docs/tailwind/css/tailwind.css +13 -6
- package/src/tsconfig.json +162 -6
- package/src/tsconfig.tsbuildinfo +1 -1
- package/tailwind.config.js +50 -3
- package/vite/config.js +23 -35
- package/vite.config.mts +5 -0
- package/vitest.setup.ts +49 -13
- package/docs/assets/index-BZiZXMU-.css +0 -1
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
import { html, LitElement, css, nothing } from "lit";
|
|
1
|
+
import { html, LitElement, css, nothing, PropertyValues } from "lit";
|
|
2
2
|
import { customElement, property } from "lit/decorators.js";
|
|
3
3
|
import {
|
|
4
4
|
fontSize,
|
|
5
5
|
Size,
|
|
6
6
|
} from "@supersoniks/concorde/core/components/ui/_css/size";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
import {
|
|
8
|
+
StatusIconKey,
|
|
9
|
+
statusAriaLive,
|
|
10
|
+
statusAriaRole,
|
|
11
|
+
statusColor,
|
|
12
|
+
statusIcon,
|
|
13
|
+
} from "@supersoniks/concorde/core/components/ui/_css/type";
|
|
14
|
+
import {
|
|
15
|
+
isDismissed,
|
|
16
|
+
markDismissed,
|
|
17
|
+
} from "@supersoniks/concorde/core/utils/dismissed";
|
|
18
|
+
import {
|
|
19
|
+
resolveUiLabel,
|
|
20
|
+
uiAriaLabels,
|
|
21
|
+
} from "@supersoniks/concorde/core/components/ui/_i18n/ui-aria-labels";
|
|
22
|
+
|
|
23
|
+
export type AlertStatus = StatusIconKey;
|
|
17
24
|
const tagName = "sonic-alert";
|
|
25
|
+
const dismissStorageKey = "sonic-alert-dismissed";
|
|
18
26
|
|
|
19
27
|
/**
|
|
20
28
|
* Affiche un message en ligne.
|
|
@@ -24,66 +32,29 @@ const tagName = "sonic-alert";
|
|
|
24
32
|
export class Alert extends LitElement {
|
|
25
33
|
static styles = [
|
|
26
34
|
fontSize,
|
|
35
|
+
statusColor,
|
|
27
36
|
css`
|
|
28
37
|
:host {
|
|
29
|
-
--
|
|
30
|
-
--sc_rounded: var(--sc-rounded);
|
|
31
|
-
--sc_fw: var(--sc-font-weight-base, 400);
|
|
32
|
-
--sc_fst: var(--sc-font-style-base, normal);
|
|
33
|
-
--sc_label-fw: bold;
|
|
34
|
-
|
|
35
|
-
font-weight: var(--sc_fw);
|
|
36
|
-
font-style: var(--sc_fst);
|
|
37
|
-
color: var(--sc_color);
|
|
38
|
+
--sc-_rounded: var(--sc-rounded);
|
|
38
39
|
position: relative;
|
|
39
40
|
display: flex;
|
|
40
41
|
gap: 0.4em;
|
|
41
|
-
border-radius: var(--
|
|
42
|
+
border-radius: var(--sc-_rounded);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
.label {
|
|
45
|
-
font-weight:
|
|
46
|
+
font-weight: bold;
|
|
46
47
|
margin-bottom: 0.15em;
|
|
47
48
|
display: block;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
:host([status="warning"]) {
|
|
51
|
-
--sc_color: var(--sc-warning, var(--sc-base-content, #000));
|
|
52
|
-
}
|
|
53
|
-
:host([status="error"]) {
|
|
54
|
-
--sc_color: var(--sc-danger, var(--sc-base-content, #000));
|
|
55
|
-
}
|
|
56
|
-
:host([status="info"]) {
|
|
57
|
-
--sc_color: var(--sc-info, var(--sc-base-content, #000));
|
|
58
|
-
}
|
|
59
|
-
:host([status="success"]) {
|
|
60
|
-
--sc_color: var(--sc-success, var(--sc-base-content, #000));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
51
|
/*background*/
|
|
64
|
-
:host([dismissible]),
|
|
65
52
|
:host([background]) {
|
|
66
|
-
background: var(--sc-base, #fff);
|
|
67
|
-
padding: 0.8em
|
|
68
|
-
}
|
|
69
|
-
:host([dismissible]):before,
|
|
70
|
-
:host([background]):before {
|
|
71
|
-
background-color: currentColor;
|
|
72
|
-
content: "";
|
|
73
|
-
display: block;
|
|
74
|
-
position: absolute;
|
|
75
|
-
left: 0;
|
|
76
|
-
top: 0;
|
|
77
|
-
right: 0;
|
|
78
|
-
bottom: 0;
|
|
79
|
-
opacity: 0.08;
|
|
80
|
-
border-radius: var(--sc_rounded);
|
|
81
|
-
pointer-events: none;
|
|
53
|
+
background: color-mix(in srgb, currentColor 8%, var(--sc-base, #fff));
|
|
54
|
+
padding: 0.8em;
|
|
82
55
|
}
|
|
83
56
|
|
|
84
57
|
.content {
|
|
85
|
-
z-index: 2;
|
|
86
|
-
position: relative;
|
|
87
58
|
flex: 1;
|
|
88
59
|
}
|
|
89
60
|
|
|
@@ -91,30 +62,34 @@ export class Alert extends LitElement {
|
|
|
91
62
|
display: block;
|
|
92
63
|
}
|
|
93
64
|
|
|
94
|
-
.hidden {
|
|
95
|
-
display: none !important;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
65
|
/*Rounded*/
|
|
99
66
|
:host([size="2xs"]),
|
|
100
67
|
:host([size="xs"]),
|
|
101
68
|
:host([size="sm"]) {
|
|
102
|
-
--
|
|
69
|
+
--sc-_rounded: var(--sc-rounded-sm);
|
|
103
70
|
}
|
|
104
71
|
|
|
105
72
|
/*Dismissible*/
|
|
106
|
-
|
|
73
|
+
.close-btn {
|
|
74
|
+
flex-shrink: 0;
|
|
75
|
+
align-self: flex-start;
|
|
76
|
+
border-left: var(--sc-border-width, 1px) solid currentColor;
|
|
77
|
+
padding-left: 0.5em;
|
|
78
|
+
margin-left: 0.5em;
|
|
79
|
+
}
|
|
80
|
+
:host([dismissible][background]) {
|
|
107
81
|
padding-right: 3rem;
|
|
108
82
|
}
|
|
109
|
-
:host([dismissible]) .close-btn {
|
|
83
|
+
:host([dismissible][background]) .close-btn {
|
|
110
84
|
position: absolute;
|
|
111
85
|
top: 0.4rem;
|
|
112
86
|
right: 0.3rem;
|
|
87
|
+
border-left: none;
|
|
113
88
|
}
|
|
114
89
|
`,
|
|
115
90
|
];
|
|
116
91
|
/**
|
|
117
|
-
* Titre du message
|
|
92
|
+
* Titre du message (texte brut, utiliser le slot pour du contenu riche)
|
|
118
93
|
*/
|
|
119
94
|
@property({ type: String }) label = "";
|
|
120
95
|
|
|
@@ -125,8 +100,6 @@ export class Alert extends LitElement {
|
|
|
125
100
|
*/
|
|
126
101
|
@property({ type: String }) text = "";
|
|
127
102
|
|
|
128
|
-
@property({ type: String }) id = new Date().getTime().toString();
|
|
129
|
-
|
|
130
103
|
@property({ type: String, reflect: true }) size?: Size;
|
|
131
104
|
|
|
132
105
|
@property({ type: Boolean, reflect: true }) dismissible = false;
|
|
@@ -135,33 +108,58 @@ export class Alert extends LitElement {
|
|
|
135
108
|
|
|
136
109
|
@property({ type: String, reflect: true }) status: AlertStatus = "default";
|
|
137
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Mémorise la fermeture dans le localStorage. Nécessite un `id`.
|
|
113
|
+
*/
|
|
138
114
|
@property({ type: Boolean, reflect: true }) dismissForever = false;
|
|
139
115
|
|
|
116
|
+
/**
|
|
117
|
+
* Annonce le message aux lecteurs d'écran (role alert/status).
|
|
118
|
+
* À activer pour les messages injectés dynamiquement, pas pour une alerte déjà dans la page.
|
|
119
|
+
*/
|
|
120
|
+
@property({ type: Boolean, reflect: true }) announce = false;
|
|
121
|
+
|
|
140
122
|
connectedCallback() {
|
|
141
|
-
if (this.dismissForever) {
|
|
142
|
-
const dismissed = localStorage.getItem("sonic-alert-dismissed") || "{}";
|
|
143
|
-
const dismissedObj = JSON.parse(dismissed);
|
|
144
|
-
if (dismissedObj[this.id]) {
|
|
145
|
-
this.remove();
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
123
|
super.connectedCallback();
|
|
124
|
+
if (
|
|
125
|
+
this.dismissForever &&
|
|
126
|
+
this.id &&
|
|
127
|
+
isDismissed(dismissStorageKey, this.id)
|
|
128
|
+
) {
|
|
129
|
+
this.remove();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
willUpdate(changed: PropertyValues<this>) {
|
|
134
|
+
if (changed.has("announce") || changed.has("status")) {
|
|
135
|
+
this._syncAnnounceA11y();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
private _syncAnnounceA11y() {
|
|
140
|
+
if (!this.announce) {
|
|
141
|
+
this.removeAttribute("role");
|
|
142
|
+
this.removeAttribute("aria-live");
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
this.setAttribute("role", statusAriaRole(this.status));
|
|
146
|
+
const live = statusAriaLive(this.status);
|
|
147
|
+
if (live) this.setAttribute("aria-live", live);
|
|
148
|
+
else this.removeAttribute("aria-live");
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
render() {
|
|
152
152
|
return html`
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
153
|
+
${this.noIcon
|
|
154
|
+
? nothing
|
|
155
|
+
: html`<slot name="icon">
|
|
156
|
+
<sonic-icon
|
|
157
|
+
aria-hidden="true"
|
|
158
|
+
name=${statusIcon[this.status] ?? statusIcon.default}
|
|
159
|
+
></sonic-icon>
|
|
160
|
+
</slot>`}
|
|
161
161
|
<div class="content">
|
|
162
|
-
${this.label
|
|
163
|
-
? html`<span class="label">${unsafeHTML(this.label)}</span>`
|
|
164
|
-
: nothing}
|
|
162
|
+
${this.label ? html`<span class="label">${this.label}</span>` : nothing}
|
|
165
163
|
<div>${this.text}<slot></slot></div>
|
|
166
164
|
</div>
|
|
167
165
|
${this.dismissible
|
|
@@ -171,6 +169,7 @@ export class Alert extends LitElement {
|
|
|
171
169
|
variant="unstyled"
|
|
172
170
|
shape="circle"
|
|
173
171
|
icon
|
|
172
|
+
.ariaLabel=${resolveUiLabel(uiAriaLabels.closeAlert)}
|
|
174
173
|
>
|
|
175
174
|
<sonic-icon name="cancel"></sonic-icon>
|
|
176
175
|
</sonic-button>`
|
|
@@ -180,15 +179,11 @@ export class Alert extends LitElement {
|
|
|
180
179
|
|
|
181
180
|
close() {
|
|
182
181
|
this.remove();
|
|
183
|
-
|
|
184
|
-
if (this.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
dismissedObj[this.id] = true;
|
|
188
|
-
localStorage.setItem(
|
|
189
|
-
"sonic-alert-dismissed",
|
|
190
|
-
JSON.stringify(dismissedObj)
|
|
191
|
-
);
|
|
182
|
+
if (!this.dismissForever) return;
|
|
183
|
+
if (!this.id) {
|
|
184
|
+
console.warn("sonic-alert : dismissForever nécessite un id.");
|
|
185
|
+
return;
|
|
192
186
|
}
|
|
187
|
+
markDismissed(dismissStorageKey, this.id);
|
|
193
188
|
}
|
|
194
189
|
}
|
|
@@ -4,7 +4,6 @@ import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
|
4
4
|
import { Message } from "@supersoniks/concorde/core/_types/types";
|
|
5
5
|
import { map } from "lit/directives/map.js";
|
|
6
6
|
import { Size } from "@supersoniks/concorde/core/components/ui/_css/size";
|
|
7
|
-
|
|
8
7
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
9
8
|
import { APIResult } from "@supersoniks/concorde/core/components/ui/toast/message-subscriber";
|
|
10
9
|
|
|
@@ -37,6 +36,7 @@ export class AlertMessages extends Subscriber(LitElement, {} as APIResult) {
|
|
|
37
36
|
${map(this.messages, (message) => {
|
|
38
37
|
if (message.type == "public") {
|
|
39
38
|
return html`<sonic-alert
|
|
39
|
+
announce
|
|
40
40
|
status=${message.status || "default"}
|
|
41
41
|
text=${ifDefined(message.content)}
|
|
42
42
|
size=${this.size}
|
|
@@ -1,127 +1,175 @@
|
|
|
1
1
|
# Badge
|
|
2
2
|
|
|
3
|
+
A **non-interactive** pill for labels, counts, or highlights (counter, status, category). The API mirrors `sonic-button` (`type`, `variant`, `size`) without focus or click states.
|
|
4
|
+
|
|
5
|
+
Colors come from theme tokens (`--sc-primary`, `--sc-danger`, …) or the semantic `type` values below.
|
|
6
|
+
|
|
3
7
|
## Type
|
|
8
|
+
|
|
9
|
+
`default` — subtle background (`base-100`). `neutral` — dark fill (`base-content`) with light text, useful on light backgrounds.
|
|
10
|
+
|
|
4
11
|
<sonic-code>
|
|
5
12
|
<template>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
<div class="flex flex-wrap gap-2">
|
|
14
|
+
<sonic-badge>Default</sonic-badge>
|
|
15
|
+
<sonic-badge type="primary">Primary</sonic-badge>
|
|
16
|
+
<sonic-badge type="neutral">Neutral</sonic-badge>
|
|
17
|
+
<sonic-badge type="warning">Warning</sonic-badge>
|
|
18
|
+
<sonic-badge type="info">Info</sonic-badge>
|
|
19
|
+
<sonic-badge type="success">Success</sonic-badge>
|
|
20
|
+
<sonic-badge type="danger">Danger</sonic-badge>
|
|
21
|
+
</div>
|
|
14
22
|
</template>
|
|
15
23
|
</sonic-code>
|
|
16
24
|
|
|
25
|
+
## Variant
|
|
26
|
+
|
|
27
|
+
`outline` — border and text in the `type` color. `ghost` — text only, no padding (except in forced-colors mode).
|
|
17
28
|
|
|
18
29
|
## Outline
|
|
30
|
+
|
|
19
31
|
<sonic-code>
|
|
20
32
|
<template>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</div>
|
|
33
|
+
<div class="flex items-center flex-wrap gap-3">
|
|
34
|
+
<sonic-badge variant="outline">Default</sonic-badge>
|
|
35
|
+
<sonic-badge variant="outline" type="primary">Primary</sonic-badge>
|
|
36
|
+
<sonic-badge variant="outline" type="neutral">Neutral</sonic-badge>
|
|
37
|
+
<sonic-badge variant="outline" type="warning">Warning</sonic-badge>
|
|
38
|
+
<sonic-badge variant="outline" type="info">Info</sonic-badge>
|
|
39
|
+
<sonic-badge variant="outline" type="success">Success</sonic-badge>
|
|
40
|
+
<sonic-badge variant="outline" type="danger">Danger</sonic-badge>
|
|
41
|
+
</div>
|
|
31
42
|
</template>
|
|
32
43
|
</sonic-code>
|
|
33
44
|
|
|
34
45
|
## Ghost
|
|
46
|
+
|
|
35
47
|
<sonic-code>
|
|
36
48
|
<template>
|
|
37
49
|
<div class="flex items-center flex-wrap gap-3">
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</div>
|
|
50
|
+
<sonic-badge variant="ghost">Default</sonic-badge>
|
|
51
|
+
<sonic-badge variant="ghost" type="primary">Primary</sonic-badge>
|
|
52
|
+
<sonic-badge variant="ghost" type="neutral">Neutral</sonic-badge>
|
|
53
|
+
<sonic-badge variant="ghost" type="warning">Warning</sonic-badge>
|
|
54
|
+
<sonic-badge variant="ghost" type="info">Info</sonic-badge>
|
|
55
|
+
<sonic-badge variant="ghost" type="success">Success</sonic-badge>
|
|
56
|
+
<sonic-badge variant="ghost" type="danger">Danger</sonic-badge>
|
|
57
|
+
</div>
|
|
47
58
|
</template>
|
|
48
59
|
</sonic-code>
|
|
49
60
|
|
|
50
61
|
## Size
|
|
62
|
+
|
|
63
|
+
Default size is `md` (omit the `size` attribute). Typography and padding follow `sonic-button`.
|
|
64
|
+
|
|
51
65
|
<sonic-code>
|
|
52
66
|
<template>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
68
|
+
<sonic-badge size="2xs">2Xs</sonic-badge>
|
|
69
|
+
<sonic-badge size="xs">Xs</sonic-badge>
|
|
70
|
+
<sonic-badge size="sm">Sm</sonic-badge>
|
|
71
|
+
<sonic-badge>Md</sonic-badge>
|
|
72
|
+
<sonic-badge size="lg">Lg</sonic-badge>
|
|
73
|
+
<sonic-badge size="xl">Xl</sonic-badge>
|
|
74
|
+
<sonic-badge size="2xl">2Xl</sonic-badge>
|
|
75
|
+
</div>
|
|
60
76
|
</template>
|
|
61
77
|
</sonic-code>
|
|
62
78
|
|
|
79
|
+
## Prefix and suffix slots
|
|
80
|
+
|
|
81
|
+
Icons or short text before / after the main label.
|
|
63
82
|
|
|
64
|
-
## Empty badges
|
|
65
83
|
<sonic-code>
|
|
66
84
|
<template>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<sonic-badge type="
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
</div>
|
|
85
|
+
<sonic-badge type="info" size="sm">
|
|
86
|
+
<sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon>
|
|
87
|
+
Info
|
|
88
|
+
</sonic-badge>
|
|
89
|
+
<sonic-badge type="success">
|
|
90
|
+
Verified
|
|
91
|
+
<sonic-icon slot="suffix" name="check" library="iconoir"></sonic-icon>
|
|
92
|
+
</sonic-badge>
|
|
76
93
|
</template>
|
|
77
94
|
</sonic-code>
|
|
78
95
|
|
|
96
|
+
## Empty badges
|
|
97
|
+
|
|
98
|
+
Badge with no text (visual dot). `min-width` / `min-height` keep a readable shape.
|
|
99
|
+
|
|
100
|
+
<sonic-code>
|
|
101
|
+
<template>
|
|
102
|
+
<div class="flex items-center flex-wrap gap-3">
|
|
103
|
+
<sonic-badge type="danger" size="2xs"></sonic-badge>
|
|
104
|
+
<sonic-badge type="danger" size="xs"></sonic-badge>
|
|
105
|
+
<sonic-badge type="danger" size="sm"></sonic-badge>
|
|
106
|
+
<sonic-badge type="danger"></sonic-badge>
|
|
107
|
+
<sonic-badge type="danger" size="lg"></sonic-badge>
|
|
108
|
+
<sonic-badge type="danger" size="xl"></sonic-badge>
|
|
109
|
+
<sonic-badge type="danger" size="2xl"></sonic-badge>
|
|
110
|
+
</div>
|
|
111
|
+
</template>
|
|
112
|
+
</sonic-code>
|
|
79
113
|
|
|
80
114
|
## Ellipsis
|
|
115
|
+
|
|
116
|
+
With `ellipsis`, long labels truncate. The parent must constrain width (`max-width`, grid, etc.).
|
|
117
|
+
|
|
81
118
|
<sonic-code>
|
|
82
119
|
<template>
|
|
83
|
-
<div class="grid grid-cols-
|
|
84
|
-
|
|
85
|
-
<sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon>
|
|
86
|
-
|
|
120
|
+
<div class="grid grid-cols-2 gap-4 max-w-xl">
|
|
121
|
+
<sonic-badge ellipsis size="sm" variant="outline">
|
|
122
|
+
<sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon>
|
|
123
|
+
Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod.
|
|
124
|
+
</sonic-badge>
|
|
125
|
+
<sonic-badge ellipsis size="sm">
|
|
126
|
+
<sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon>
|
|
127
|
+
Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod.
|
|
128
|
+
</sonic-badge>
|
|
87
129
|
</div>
|
|
88
130
|
</template>
|
|
89
131
|
</sonic-code>
|
|
90
132
|
|
|
91
133
|
## Badge in button
|
|
134
|
+
|
|
135
|
+
Count inside a button (`slot="suffix"`) or a badge absolutely positioned on a button / icon.
|
|
136
|
+
|
|
92
137
|
<sonic-code>
|
|
93
138
|
<template>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
</sonic-button>
|
|
98
|
-
<div class="relative inline-block">
|
|
99
|
-
<sonic-button type="success" class="relative"> Mon compte </sonic-button>
|
|
100
|
-
<sonic-badge type="danger" size="xs" class="absolute right-1 top-0 pe-none transform -translate-y-1/2"
|
|
101
|
-
>12</sonic-badge
|
|
102
|
-
>
|
|
103
|
-
</div>
|
|
104
|
-
<div class="relative inline-block">
|
|
105
|
-
<sonic-button type="neutral" shape="circle" variant="outline"
|
|
106
|
-
><sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
107
|
-
</sonic-button>
|
|
108
|
-
<sonic-badge
|
|
109
|
-
type="danger"
|
|
110
|
-
size="xs"
|
|
111
|
-
class="absolute right-1 bottom-1 pe-none transform translate-y-1/2 translate-x-1/2"
|
|
112
|
-
>33</sonic-badge
|
|
113
|
-
>
|
|
114
|
-
</div>
|
|
115
|
-
<div class="relative inline-block">
|
|
116
|
-
<sonic-button type="neutral" shape="circle" variant="outline"
|
|
117
|
-
><sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
139
|
+
<div class="flex flex-wrap gap-4 items-center">
|
|
140
|
+
<sonic-button type="default">
|
|
141
|
+
Messages <sonic-badge slot="suffix" type="danger" size="xs">5</sonic-badge>
|
|
118
142
|
</sonic-button>
|
|
119
|
-
<
|
|
120
|
-
type="
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
143
|
+
<div class="relative inline-block">
|
|
144
|
+
<sonic-button type="success" class="relative">My account</sonic-button>
|
|
145
|
+
<sonic-badge
|
|
146
|
+
type="danger"
|
|
147
|
+
size="xs"
|
|
148
|
+
class="absolute right-1 top-0 pe-none transform -translate-y-1/2"
|
|
149
|
+
>12</sonic-badge
|
|
150
|
+
>
|
|
151
|
+
</div>
|
|
152
|
+
<div class="relative inline-block">
|
|
153
|
+
<sonic-button type="neutral" shape="circle" variant="outline">
|
|
154
|
+
<sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
155
|
+
</sonic-button>
|
|
156
|
+
<sonic-badge
|
|
157
|
+
type="danger"
|
|
158
|
+
size="xs"
|
|
159
|
+
class="absolute right-1 bottom-1 pe-none transform translate-y-1/2 translate-x-1/2"
|
|
160
|
+
>33</sonic-badge
|
|
161
|
+
>
|
|
162
|
+
</div>
|
|
163
|
+
<div class="relative inline-block">
|
|
164
|
+
<sonic-button type="neutral" shape="circle" variant="outline">
|
|
165
|
+
<sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
166
|
+
</sonic-button>
|
|
167
|
+
<sonic-badge
|
|
168
|
+
type="danger"
|
|
169
|
+
size="xs"
|
|
170
|
+
class="absolute right-2 bottom-2 pe-none transform translate-y-1/2 translate-x-1/2"
|
|
171
|
+
></sonic-badge>
|
|
172
|
+
</div>
|
|
124
173
|
</div>
|
|
125
|
-
</div>
|
|
126
174
|
</template>
|
|
127
175
|
</sonic-code>
|