@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
|
@@ -7,7 +7,7 @@ const tagName = "sonic-radio";
|
|
|
7
7
|
* ### Le composant sonic-radio étend sonic-checkbox en assignant sa propriété radio à true.
|
|
8
8
|
*
|
|
9
9
|
* * Le type d'input html utilisé passe également de checkbox à radio.
|
|
10
|
-
* * Le comportement est donc similaire à un bouton radio classique mais avec les fonctionnalités de sonic-checkbox (
|
|
10
|
+
* * Le comportement est donc similaire à un bouton radio classique mais avec les fonctionnalités de sonic-checkbox (FormElement / FormCheckable).
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
@customElement(tagName)
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
description,
|
|
16
16
|
} from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
17
17
|
|
|
18
|
-
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
19
18
|
import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
20
19
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
21
20
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
@@ -35,14 +34,12 @@ export type SelectOption = {
|
|
|
35
34
|
const tagName = "sonic-select";
|
|
36
35
|
/**
|
|
37
36
|
* #### FormElement :
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* * On peut cependant décider de mettre à jour la donnée à une autre adresse en renseigne l'attribut *formDataProvider*.
|
|
41
|
-
* * Par conséquent on peut par exemple le lier à un composant *queue* (via sa propriété *dataFilterProvider*) de manière à appeller en auto une api avec des filtres.
|
|
37
|
+
* Synchronise `value` via `formDataProvider` + `name`.
|
|
38
|
+
* Peut alimenter un `sonic-queue` via `dataFilterProvider` sur le même store.
|
|
42
39
|
*/
|
|
43
40
|
|
|
44
41
|
@customElement(tagName)
|
|
45
|
-
export class Select extends FormElement(
|
|
42
|
+
export class Select extends FormElement(LitElement) {
|
|
46
43
|
static styles = [
|
|
47
44
|
fontSize,
|
|
48
45
|
formControl,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<sonic-button type="info" size="sm" target="_blank" href="https://www.w3schools.com/tags/tag_textarea.asp#midcontentadcontainer">
|
|
4
4
|
<sonic-icon library="iconoir" name="open-new-window" slot="prefix" ></sonic-icon>
|
|
5
|
-
Native
|
|
5
|
+
Native attributes list
|
|
6
6
|
</sonic-button>
|
|
7
7
|
|
|
8
8
|
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
formControl,
|
|
12
12
|
label,
|
|
13
13
|
} from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
14
|
-
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
15
14
|
import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
16
15
|
import FormInput from "@supersoniks/concorde/core/mixins/FormInput";
|
|
17
16
|
import { customScroll } from "@supersoniks/concorde/core/components/ui/_css/scroll";
|
|
@@ -25,7 +24,7 @@ import { styleMap } from "lit/directives/style-map.js";
|
|
|
25
24
|
const tagName = "sonic-textarea";
|
|
26
25
|
|
|
27
26
|
@customElement(tagName)
|
|
28
|
-
export class Textarea extends FormInput(FormElement(
|
|
27
|
+
export class Textarea extends FormInput(FormElement(LitElement)) {
|
|
29
28
|
static styles = [
|
|
30
29
|
fontSize,
|
|
31
30
|
formControl,
|
|
@@ -1,107 +1,201 @@
|
|
|
1
1
|
# Image
|
|
2
2
|
|
|
3
|
+
Responsive **`<img>`** wrapper: aspect ratio, `object-fit: cover`, rounded corners, and optional fade-in on load. The host uses a light placeholder background (`--sc-placeholder-bg`) until the file is ready. Default **`loading`** is `lazy`; set **`loading="eager"`** for above-the-fold heroes.
|
|
4
|
+
|
|
3
5
|
## Rounded
|
|
4
6
|
|
|
7
|
+
Omit `rounded` for square corners. Boolean **`rounded`** uses the theme token `--sc-rounded`. Sizes: **`sm`**, **`md`**, **`lg`**, **`xl`**, **`full`** (circle — pair with `ratio="1/1"`), **`none`** (explicit reset).
|
|
8
|
+
|
|
5
9
|
<sonic-code>
|
|
6
10
|
<template>
|
|
7
|
-
<div class="grid gap-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
11
|
+
<div class="grid gap-6 grid-cols-3 lg:grid-cols-4 items-end text-center text-xs ">
|
|
12
|
+
<div>
|
|
13
|
+
<sonic-image
|
|
14
|
+
ratio="1/1"
|
|
15
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
16
|
+
></sonic-image>
|
|
17
|
+
<p class="mt-2">default</p>
|
|
18
|
+
</div>
|
|
19
|
+
<div>
|
|
20
|
+
<sonic-image
|
|
21
|
+
rounded="sm"
|
|
22
|
+
ratio="1/1"
|
|
23
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
24
|
+
></sonic-image>
|
|
25
|
+
<p class="mt-2">sm</p>
|
|
26
|
+
</div>
|
|
27
|
+
<div>
|
|
28
|
+
<sonic-image
|
|
29
|
+
rounded
|
|
30
|
+
ratio="1/1"
|
|
31
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
32
|
+
></sonic-image>
|
|
33
|
+
<p class="mt-2">rounded</p>
|
|
34
|
+
</div>
|
|
35
|
+
<div>
|
|
36
|
+
<sonic-image
|
|
37
|
+
rounded="md"
|
|
38
|
+
ratio="1/1"
|
|
39
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
40
|
+
></sonic-image>
|
|
41
|
+
<p class="mt-2">md</p>
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<sonic-image
|
|
45
|
+
rounded="lg"
|
|
46
|
+
ratio="1/1"
|
|
47
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
48
|
+
></sonic-image>
|
|
49
|
+
<p class="mt-2">lg</p>
|
|
50
|
+
</div>
|
|
51
|
+
<div>
|
|
52
|
+
<sonic-image
|
|
53
|
+
rounded="xl"
|
|
54
|
+
ratio="1/1"
|
|
55
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
56
|
+
></sonic-image>
|
|
57
|
+
<p class="mt-2">xl</p>
|
|
58
|
+
</div>
|
|
59
|
+
<div >
|
|
60
|
+
<div >
|
|
61
|
+
<sonic-image
|
|
62
|
+
rounded="full"
|
|
63
|
+
ratio="1/1"
|
|
64
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
65
|
+
></sonic-image>
|
|
66
|
+
<p class="mt-2">full</p>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
43
69
|
</div>
|
|
44
70
|
</template>
|
|
45
71
|
</sonic-code>
|
|
46
72
|
|
|
47
|
-
##
|
|
73
|
+
## Aspect ratio
|
|
74
|
+
|
|
75
|
+
**`ratio`** sets CSS `aspect-ratio` on the image (default **`auto`**). The image still fills the host width (`width: 100%`).
|
|
48
76
|
|
|
49
77
|
<sonic-code>
|
|
50
78
|
<template>
|
|
51
79
|
<div class="grid gap-8 grid-cols-2 items-center">
|
|
52
80
|
<sonic-image
|
|
53
81
|
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
54
|
-
>
|
|
55
|
-
</sonic-image>
|
|
82
|
+
></sonic-image>
|
|
56
83
|
<sonic-image
|
|
57
84
|
ratio="16/9"
|
|
58
85
|
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
59
|
-
>
|
|
60
|
-
</sonic-image>
|
|
86
|
+
></sonic-image>
|
|
61
87
|
<sonic-image
|
|
62
88
|
ratio="1/1"
|
|
63
89
|
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
64
|
-
>
|
|
65
|
-
</sonic-image>
|
|
90
|
+
></sonic-image>
|
|
66
91
|
<sonic-image
|
|
67
92
|
ratio="2/3"
|
|
68
93
|
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
69
|
-
>
|
|
70
|
-
</sonic-image>
|
|
94
|
+
></sonic-image>
|
|
71
95
|
</div>
|
|
72
96
|
</template>
|
|
73
97
|
</sonic-code>
|
|
74
98
|
|
|
75
99
|
## Object position
|
|
76
100
|
|
|
101
|
+
**`objectPosition`** maps to CSS `object-position` (default **`center center`**). Useful on wide crops when the subject sits off-center.
|
|
102
|
+
|
|
77
103
|
<sonic-code>
|
|
78
104
|
<template>
|
|
79
105
|
<div class="grid gap-8 grid-cols-2 items-center">
|
|
80
106
|
<sonic-image
|
|
81
|
-
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
82
107
|
ratio="11/4"
|
|
83
|
-
|
|
84
|
-
|
|
108
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
109
|
+
></sonic-image>
|
|
85
110
|
<sonic-image
|
|
86
111
|
objectPosition="center top"
|
|
87
|
-
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
88
112
|
ratio="11/4"
|
|
89
|
-
|
|
90
|
-
|
|
113
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
114
|
+
></sonic-image>
|
|
91
115
|
</div>
|
|
92
116
|
</template>
|
|
93
117
|
</sonic-code>
|
|
94
118
|
|
|
95
119
|
## Cover
|
|
96
120
|
|
|
121
|
+
**`cover`** stretches the image to fill a **positioned** parent (`position: relative` + fixed height or inset). Aspect ratio on the host is ignored while `cover` is set.
|
|
122
|
+
|
|
97
123
|
<sonic-code>
|
|
98
124
|
<template>
|
|
99
|
-
<div class="h-96 relative">
|
|
125
|
+
<div class="h-96 relative rounded-lg overflow-hidden">
|
|
100
126
|
<sonic-image
|
|
101
127
|
cover
|
|
102
128
|
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
129
|
+
></sonic-image>
|
|
130
|
+
</div>
|
|
131
|
+
</template>
|
|
132
|
+
</sonic-code>
|
|
133
|
+
|
|
134
|
+
## Load transition
|
|
135
|
+
|
|
136
|
+
Set **`transition`** to **`fade`** (default when the attribute is present) or **`fade-scale-out`**. The image stays at `opacity: 0` until the browser fires **`load`**, then the **`loaded`** class runs the animation. Changing `src` on an existing element does not replay the effect — mount a new `sonic-image` when you need another entrance (galleries, infinite scroll).
|
|
137
|
+
|
|
138
|
+
Click **Add image** to append small thumbnails and replay the transition. **Clear** resets the row.
|
|
139
|
+
|
|
140
|
+
<sonic-code>
|
|
141
|
+
<template>
|
|
142
|
+
<div class="flex flex-wrap gap-2 mb-4">
|
|
143
|
+
<sonic-button
|
|
144
|
+
size="sm"
|
|
145
|
+
onclick="(function () {
|
|
146
|
+
var host = document.getElementById('sonic-image-transition-host');
|
|
147
|
+
var img = document.createElement('sonic-image');
|
|
148
|
+
img.transition = 'fade';
|
|
149
|
+
img.ratio = '1/1';
|
|
150
|
+
img.rounded = 'md';
|
|
151
|
+
img.loading = 'eager';
|
|
152
|
+
img.style.width = '5rem';
|
|
153
|
+
img.src = 'https://picsum.photos/seed/' + Date.now() + '/120/120';
|
|
154
|
+
host.appendChild(img);
|
|
155
|
+
})()"
|
|
156
|
+
>
|
|
157
|
+
Add image (fade)
|
|
158
|
+
</sonic-button>
|
|
159
|
+
<sonic-button
|
|
160
|
+
size="sm"
|
|
161
|
+
variant="outline"
|
|
162
|
+
onclick="(function () {
|
|
163
|
+
var host = document.getElementById('sonic-image-transition-host');
|
|
164
|
+
var img = document.createElement('sonic-image');
|
|
165
|
+
img.transition = 'fade-scale-out';
|
|
166
|
+
img.ratio = '1/1';
|
|
167
|
+
img.rounded = 'md';
|
|
168
|
+
img.loading = 'eager';
|
|
169
|
+
img.style.width = '5rem';
|
|
170
|
+
img.src = 'https://picsum.photos/seed/' + Date.now() + '/120/120';
|
|
171
|
+
host.appendChild(img);
|
|
172
|
+
})()"
|
|
173
|
+
>
|
|
174
|
+
Add image (fade-scale-out)
|
|
175
|
+
</sonic-button>
|
|
176
|
+
<sonic-button
|
|
177
|
+
size="sm"
|
|
178
|
+
variant="ghost"
|
|
179
|
+
onclick="document.getElementById('sonic-image-transition-host').replaceChildren()"
|
|
103
180
|
>
|
|
104
|
-
|
|
181
|
+
Clear
|
|
182
|
+
</sonic-button>
|
|
105
183
|
</div>
|
|
184
|
+
<div id="sonic-image-transition-host" class="flex flex-wrap gap-2 min-h-[5rem]"></div>
|
|
185
|
+
</template>
|
|
186
|
+
</sonic-code>
|
|
187
|
+
|
|
188
|
+
## Accessibility and parts
|
|
189
|
+
|
|
190
|
+
Always set meaningful **`alt`** text (empty string only for decorative images).
|
|
191
|
+
|
|
192
|
+
<sonic-code>
|
|
193
|
+
<template>
|
|
194
|
+
<sonic-image
|
|
195
|
+
rounded="md"
|
|
196
|
+
ratio="16/9"
|
|
197
|
+
alt="Concorde aircraft in flight"
|
|
198
|
+
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
199
|
+
></sonic-image>
|
|
106
200
|
</template>
|
|
107
201
|
</sonic-code>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { html, LitElement, css } from "lit";
|
|
2
2
|
import { customElement, property } from "lit/decorators.js";
|
|
3
3
|
import { styleMap } from "lit/directives/style-map.js";
|
|
4
|
+
import { Rounded, hostRounded } from "../_css/rounded";
|
|
4
5
|
const tagName = "sonic-image";
|
|
5
6
|
@customElement(tagName)
|
|
6
7
|
export class Image extends LitElement {
|
|
7
8
|
static styles = [
|
|
9
|
+
hostRounded,
|
|
8
10
|
css`
|
|
9
11
|
:host {
|
|
10
|
-
--sc-
|
|
11
|
-
|
|
12
|
-
border-radius: var(--sc-img-radius);
|
|
12
|
+
--sc-_bg: var(--sc-placeholder-bg, rgba(12, 12, 12, 0.05));
|
|
13
|
+
background: var(--sc-_bg);
|
|
13
14
|
display: block;
|
|
14
15
|
width: 100%;
|
|
15
|
-
background: var(--sc-img-bg);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
img {
|
|
@@ -25,34 +25,6 @@ export class Image extends LitElement {
|
|
|
25
25
|
visibility: hidden;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
/*Rounded*/
|
|
29
|
-
:host([rounded]) {
|
|
30
|
-
--sc-img-radius: var(--sc-rounded);
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
}
|
|
33
|
-
:host([rounded="sm"]) {
|
|
34
|
-
--sc-img-radius: var(--sc-rounded-sm);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
:host([rounded="md"]) {
|
|
38
|
-
--sc-img-radius: var(--sc-rounded-md);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:host([rounded="lg"]) {
|
|
42
|
-
--sc-img-radius: var(--sc-rounded-lg);
|
|
43
|
-
}
|
|
44
|
-
:host([rounded="xl"]) {
|
|
45
|
-
--sc-img-radius: var(--sc-rounded-xl);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/*Cercle*/
|
|
49
|
-
:host([rounded="full"]) {
|
|
50
|
-
--sc-img-radius: 50% !important;
|
|
51
|
-
}
|
|
52
|
-
:host([rounded="none"]) {
|
|
53
|
-
--sc-img-radius: 0 !important;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
28
|
:host([cover]),
|
|
57
29
|
:host([cover]) > div,
|
|
58
30
|
:host([cover]) img {
|
|
@@ -72,7 +44,8 @@ export class Image extends LitElement {
|
|
|
72
44
|
|
|
73
45
|
:host([transition="fade-scale-out"]) img {
|
|
74
46
|
scale: 1.08;
|
|
75
|
-
transition:
|
|
47
|
+
transition:
|
|
48
|
+
opacity 0.3s linear,
|
|
76
49
|
scale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
77
50
|
}
|
|
78
51
|
:host([transition]) img.loaded {
|
|
@@ -82,13 +55,7 @@ export class Image extends LitElement {
|
|
|
82
55
|
`,
|
|
83
56
|
];
|
|
84
57
|
|
|
85
|
-
@property({ type: String }) rounded:
|
|
86
|
-
| ""
|
|
87
|
-
| "none"
|
|
88
|
-
| "full"
|
|
89
|
-
| "sm"
|
|
90
|
-
| "md"
|
|
91
|
-
| "lg" = "none";
|
|
58
|
+
@property({ type: String, reflect: true }) rounded: Rounded = "none";
|
|
92
59
|
@property({ type: String }) src = "";
|
|
93
60
|
@property({ type: String }) alt = "";
|
|
94
61
|
@property({ type: String }) loading: "eager" | "lazy" = "lazy";
|
|
@@ -101,7 +68,7 @@ export class Image extends LitElement {
|
|
|
101
68
|
@property({ type: Boolean, reflect: true }) cover = false;
|
|
102
69
|
|
|
103
70
|
firstUpdated(
|
|
104
|
-
changedProperties: Map<string | number | symbol, unknown
|
|
71
|
+
changedProperties: Map<string | number | symbol, unknown>,
|
|
105
72
|
): void {
|
|
106
73
|
if (this.transition) {
|
|
107
74
|
const img = this.shadowRoot?.querySelector("img");
|
|
@@ -119,10 +86,9 @@ export class Image extends LitElement {
|
|
|
119
86
|
imageRendering: this.imageRendering,
|
|
120
87
|
objectPosition: this.objectPosition,
|
|
121
88
|
};
|
|
122
|
-
return html`<div
|
|
123
|
-
<picture
|
|
89
|
+
return html`<div>
|
|
90
|
+
<picture
|
|
124
91
|
><img
|
|
125
|
-
part="img"
|
|
126
92
|
src="${this.src}"
|
|
127
93
|
loading="${this.loading}"
|
|
128
94
|
alt="${this.alt}"
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
## Href
|
|
4
4
|
<sonic-code>
|
|
5
5
|
<template>
|
|
6
|
-
<sonic-link href="/">Basic link with href
|
|
6
|
+
<sonic-link href="/">Basic link with href attribute</sonic-link>
|
|
7
7
|
</template>
|
|
8
8
|
</sonic-code>
|
|
9
9
|
|
|
10
10
|
## Target
|
|
11
11
|
<sonic-code>
|
|
12
12
|
<template>
|
|
13
|
-
<sonic-link href="/" target="_blank">Link with target
|
|
13
|
+
<sonic-link href="/" target="_blank">Link with target attribute</sonic-link>
|
|
14
14
|
</template>
|
|
15
15
|
</sonic-code>
|
|
16
16
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import LocationHandler
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
1
|
+
import LocationHandler, {
|
|
2
|
+
type AutoActiveMode,
|
|
3
|
+
} from "@supersoniks/concorde/core/utils/LocationHandler";
|
|
4
|
+
import { html, LitElement, css, nothing } from "lit";
|
|
5
|
+
import { customElement, property } from "lit/decorators.js";
|
|
6
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
5
7
|
import Electron from "@supersoniks/concorde/core/utils/Electron";
|
|
6
8
|
const tagName = "sonic-link";
|
|
7
9
|
|
|
@@ -11,13 +13,27 @@ export class Link extends LitElement {
|
|
|
11
13
|
css`
|
|
12
14
|
a {
|
|
13
15
|
color: inherit;
|
|
14
|
-
text-decoration:
|
|
15
|
-
display:
|
|
16
|
+
text-decoration: inherit;
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
align-items: inherit;
|
|
19
|
+
gap: inherit;
|
|
20
|
+
min-width: 0;
|
|
21
|
+
max-width: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
a:focus {
|
|
25
|
+
outline: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
a:focus-visible {
|
|
29
|
+
outline: 2px solid currentColor;
|
|
30
|
+
outline-offset: 2px;
|
|
31
|
+
border-radius: 2px;
|
|
16
32
|
}
|
|
17
33
|
`,
|
|
18
34
|
];
|
|
19
35
|
|
|
20
|
-
@property({type: String}) href = "";
|
|
36
|
+
@property({ type: String }) href = "";
|
|
21
37
|
private _location = "";
|
|
22
38
|
get location(): string {
|
|
23
39
|
return this._location;
|
|
@@ -27,47 +43,37 @@ export class Link extends LitElement {
|
|
|
27
43
|
LocationHandler.updateComponentActiveState(this);
|
|
28
44
|
}
|
|
29
45
|
|
|
30
|
-
@property({type: String, attribute: "data-aria-label"}) ariaLabel
|
|
46
|
+
@property({ type: String, attribute: "data-aria-label" }) ariaLabel:
|
|
47
|
+
| string
|
|
48
|
+
| null = null;
|
|
31
49
|
|
|
32
50
|
/**
|
|
33
|
-
*
|
|
34
|
-
* - strict
|
|
35
|
-
* -
|
|
36
|
-
* -
|
|
51
|
+
* Active state for in-app navigation:
|
|
52
|
+
* - strict — pathname, search, and hash must match
|
|
53
|
+
* - strict-path-only — pathname and hash must match (ignore search)
|
|
54
|
+
* - partial — current URL starts with href (default)
|
|
55
|
+
* - disabled — never sets `active`
|
|
37
56
|
*/
|
|
38
|
-
@property({type: String}) autoActive:
|
|
57
|
+
@property({ type: String }) autoActive: AutoActiveMode = "partial";
|
|
58
|
+
|
|
39
59
|
connectedCallback() {
|
|
40
60
|
if (this.href && this.href.indexOf("http") != 0) {
|
|
41
61
|
LocationHandler.onChange(this);
|
|
42
|
-
this.location = document.location.href.replace(
|
|
62
|
+
this.location = document.location.href.replace(
|
|
63
|
+
document.location.origin,
|
|
64
|
+
"",
|
|
65
|
+
);
|
|
43
66
|
}
|
|
44
67
|
|
|
45
|
-
// on Enter keypress we trigger a click on the link tag
|
|
46
|
-
this.addEventListener("keypress", (e: KeyboardEvent) => {
|
|
47
|
-
if (e.key === "Enter") {
|
|
48
|
-
this.shadowRoot?.querySelector("a")?.click();
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
this.setFocusable();
|
|
53
|
-
|
|
54
68
|
super.connectedCallback();
|
|
55
69
|
}
|
|
56
70
|
|
|
57
|
-
setFocusable() {
|
|
58
|
-
if (this.href) {
|
|
59
|
-
this.setAttribute("tabIndex", "0");
|
|
60
|
-
} else {
|
|
61
|
-
this.removeAttribute("tabIndex");
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
71
|
disconnectedCallback(): void {
|
|
66
72
|
LocationHandler.offChange(this);
|
|
67
73
|
super.disconnectedCallback();
|
|
68
74
|
}
|
|
69
75
|
private _target: string | null = null;
|
|
70
|
-
@property({type: String}) set target(newTarget) {
|
|
76
|
+
@property({ type: String }) set target(newTarget) {
|
|
71
77
|
this._target = newTarget;
|
|
72
78
|
Electron.fixBlankLink(this);
|
|
73
79
|
this.requestUpdate();
|
|
@@ -79,17 +85,15 @@ export class Link extends LitElement {
|
|
|
79
85
|
/**
|
|
80
86
|
* Si présent on passe en mode pushstate
|
|
81
87
|
*/
|
|
82
|
-
@property({type: Boolean}) pushState: boolean | null = null;
|
|
88
|
+
@property({ type: Boolean, reflect: true }) pushState: boolean | null = null;
|
|
83
89
|
|
|
84
90
|
handlePushState(e: Event) {
|
|
85
91
|
e.preventDefault();
|
|
86
92
|
LocationHandler.changeFromComponent(this);
|
|
87
93
|
}
|
|
88
94
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
this.setFocusable();
|
|
92
|
-
}
|
|
95
|
+
private get blankRel(): string | undefined {
|
|
96
|
+
return this.target === "_blank" ? "noopener noreferrer" : undefined;
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
render() {
|
|
@@ -99,6 +103,7 @@ export class Link extends LitElement {
|
|
|
99
103
|
href="${this.href}"
|
|
100
104
|
aria-label=${this.ariaLabel || nothing}
|
|
101
105
|
target=${ifDefined(this.target)}
|
|
106
|
+
rel=${ifDefined(this.blankRel)}
|
|
102
107
|
@click=${this.pushState ? this.handlePushState : null}
|
|
103
108
|
>
|
|
104
109
|
<slot></slot>
|
|
@@ -4,31 +4,27 @@ import { Modal } from "@supersoniks/concorde/core/components/ui/modal/modal";
|
|
|
4
4
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
5
5
|
import HTML from "@supersoniks/concorde/core/utils/HTML";
|
|
6
6
|
import { ButtonType } from "../button/button";
|
|
7
|
+
import {
|
|
8
|
+
resolveUiLabel,
|
|
9
|
+
uiAriaLabels,
|
|
10
|
+
type UiLabelDict,
|
|
11
|
+
} from "@supersoniks/concorde/core/components/ui/_i18n/ui-aria-labels";
|
|
12
|
+
|
|
7
13
|
const tagName = "sonic-modal-close";
|
|
8
14
|
|
|
9
15
|
@customElement(tagName)
|
|
10
16
|
export class ModalClose extends LitElement {
|
|
11
|
-
@property() translation:
|
|
12
|
-
fr: "Fermer la fenêtre",
|
|
13
|
-
en: "Close window",
|
|
14
|
-
de: "Fenster schließen",
|
|
15
|
-
nl: "Venster sluiten",
|
|
16
|
-
es: "Cerrar",
|
|
17
|
-
};
|
|
17
|
+
@property() translation: UiLabelDict = { ...uiAriaLabels.closeWindow };
|
|
18
18
|
|
|
19
19
|
@property() reset?: string;
|
|
20
20
|
@property() type?: ButtonType;
|
|
21
21
|
|
|
22
|
-
connectedCallback() {
|
|
23
|
-
super.connectedCallback();
|
|
24
|
-
this.lang = document.documentElement.lang?.split("-")[0] ?? "fr";
|
|
25
|
-
}
|
|
26
22
|
render() {
|
|
27
23
|
return html`<sonic-button
|
|
28
24
|
noAutoFill
|
|
29
|
-
data-aria-label=${this.translation[this.lang]}
|
|
30
25
|
reset=${ifDefined(this.reset)}
|
|
31
26
|
shape="circle"
|
|
27
|
+
.ariaLabel=${resolveUiLabel(this.translation)}
|
|
32
28
|
@click=${this.handleClick}
|
|
33
29
|
type=${ifDefined(this.type)}
|
|
34
30
|
><sonic-icon name="cancel" size="lg"></sonic-icon
|