@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
|
@@ -58,13 +58,13 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
58
58
|
--sc-modal-py: 2.5rem;
|
|
59
59
|
--sc-modal-px: 1.5rem;
|
|
60
60
|
|
|
61
|
-
--
|
|
62
|
-
--
|
|
61
|
+
--sc-_backdrop-bg: var(
|
|
62
|
+
--sc-_overlay-bg,
|
|
63
63
|
var(--sc-base-200, rgba(0, 0, 0, 0.12))
|
|
64
64
|
);
|
|
65
|
-
--
|
|
66
|
-
--
|
|
67
|
-
--
|
|
65
|
+
--sc-_backdrop-opacity: 0;
|
|
66
|
+
--sc-_rounded: var(--sc-rounded-lg);
|
|
67
|
+
--sc-_z-index: 990;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
* {
|
|
@@ -76,7 +76,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
76
76
|
color: var(--sc-base-content, #000);
|
|
77
77
|
width: 100%;
|
|
78
78
|
box-shadow: var(--sc-shadow-lg);
|
|
79
|
-
border-radius: var(--
|
|
79
|
+
border-radius: var(--sc-_rounded) var(--sc-_rounded);
|
|
80
80
|
transform: translateZ(0);
|
|
81
81
|
border: none;
|
|
82
82
|
outline: none;
|
|
@@ -87,16 +87,16 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
87
87
|
opacity: 0;
|
|
88
88
|
position: fixed;
|
|
89
89
|
inset: 0;
|
|
90
|
-
z-index: var(--
|
|
90
|
+
z-index: var(--sc-_z-index);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
#backdrop {
|
|
94
|
-
opacity: var(--
|
|
95
|
-
background: var(--
|
|
94
|
+
opacity: var(--sc-_backdrop-opacity, 0);
|
|
95
|
+
background: var(--sc-_backdrop-bg);
|
|
96
96
|
transition: opacity 0.15s linear;
|
|
97
97
|
inset: 0;
|
|
98
98
|
position: fixed;
|
|
99
|
-
z-index: var(--
|
|
99
|
+
z-index: var(--sc-_z-index);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
#modal-content {
|
|
@@ -112,12 +112,12 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
112
112
|
max-width: none !important;
|
|
113
113
|
margin: auto 0 0 !important;
|
|
114
114
|
width: 100% !important;
|
|
115
|
-
border-radius: var(--
|
|
115
|
+
border-radius: var(--sc-_rounded) var(--sc-_rounded) 0 0 !important;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
:host([fullScreen]) {
|
|
120
|
-
--
|
|
120
|
+
--sc-_rounded: 0;
|
|
121
121
|
}
|
|
122
122
|
:host([fullScreen]) #modal {
|
|
123
123
|
width: 100% !important;
|
|
@@ -161,11 +161,11 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
161
161
|
/* Close button */
|
|
162
162
|
::slotted(sonic-modal-close),
|
|
163
163
|
sonic-modal-close {
|
|
164
|
-
--
|
|
165
|
-
--
|
|
164
|
+
--sc-_top: 0.25rem;
|
|
165
|
+
--sc-_x: 0.25rem;
|
|
166
166
|
position: sticky;
|
|
167
167
|
display: block;
|
|
168
|
-
top: var(--
|
|
168
|
+
top: var(--sc-_top);
|
|
169
169
|
margin-left: auto;
|
|
170
170
|
margin-bottom: -1rem;
|
|
171
171
|
margin-top: calc(-1 * var(--sc-modal-py) - 0.25rem);
|
|
@@ -312,7 +312,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
if (_changedProperties.has("zIndex")) {
|
|
315
|
-
this.style.setProperty("--
|
|
315
|
+
this.style.setProperty("--sc-_z-index", this.zIndex || "990");
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
if (_changedProperties.has("paddingX")) {
|
|
@@ -530,10 +530,10 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
530
530
|
// Backdrop
|
|
531
531
|
if (!this.fullScreen) {
|
|
532
532
|
if (isEntering) {
|
|
533
|
-
this.style.setProperty("--
|
|
533
|
+
this.style.setProperty("--sc-_backdrop-opacity", "0.8");
|
|
534
534
|
} else {
|
|
535
535
|
setTimeout(() => {
|
|
536
|
-
this.style.setProperty("--
|
|
536
|
+
this.style.setProperty("--sc-_backdrop-opacity", "0");
|
|
537
537
|
}, 150);
|
|
538
538
|
}
|
|
539
539
|
}
|
|
@@ -30,7 +30,43 @@
|
|
|
30
30
|
</template>
|
|
31
31
|
</sonic-code>
|
|
32
32
|
|
|
33
|
+
Default placement is `bottom`. Placement is written `side-align`, like `sonic-tooltip`: `side` is `top`, `right`, `bottom` or `left`, `align` is `start`, `center` or `end`. Without `align`, content is aligned on the start of the trigger. If there is not enough room, content flips to the opposite side and stays inside the viewport.
|
|
34
|
+
|
|
35
|
+
The former space syntax (`placement="bottom center"`) still works but is deprecated.
|
|
36
|
+
|
|
37
|
+
<sonic-code>
|
|
38
|
+
<template>
|
|
39
|
+
<sonic-pop class="inline-block" placement="bottom-center">
|
|
40
|
+
<sonic-button>Bottom center</sonic-button>
|
|
41
|
+
<sonic-menu slot="content">
|
|
42
|
+
<sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
|
|
43
|
+
</sonic-menu>
|
|
44
|
+
</sonic-pop>
|
|
45
|
+
<sonic-pop class="inline-block" placement="top-center">
|
|
46
|
+
<sonic-button>Top center</sonic-button>
|
|
47
|
+
<sonic-menu slot="content">
|
|
48
|
+
<sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
|
|
49
|
+
</sonic-menu>
|
|
50
|
+
</sonic-pop>
|
|
51
|
+
<sonic-pop class="inline-block" placement="left-center">
|
|
52
|
+
<sonic-button>Left center</sonic-button>
|
|
53
|
+
<sonic-menu slot="content">
|
|
54
|
+
<sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
|
|
55
|
+
</sonic-menu>
|
|
56
|
+
</sonic-pop>
|
|
57
|
+
<sonic-pop class="inline-block" placement="right-center">
|
|
58
|
+
<sonic-button>Right center</sonic-button>
|
|
59
|
+
<sonic-menu slot="content">
|
|
60
|
+
<sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
|
|
61
|
+
</sonic-menu>
|
|
62
|
+
</sonic-pop>
|
|
63
|
+
</template>
|
|
64
|
+
</sonic-code>
|
|
65
|
+
|
|
33
66
|
## Shadow
|
|
67
|
+
|
|
68
|
+
Default shadow is `lg`.
|
|
69
|
+
|
|
34
70
|
<sonic-code>
|
|
35
71
|
<template>
|
|
36
72
|
<sonic-pop class="inline-block" shadow="none" placement='top' >
|
|
@@ -60,6 +96,26 @@
|
|
|
60
96
|
</template>
|
|
61
97
|
</sonic-code>
|
|
62
98
|
|
|
99
|
+
## Inline
|
|
100
|
+
|
|
101
|
+
By default, pop is vertically aligned to the middle. Use `inline` to align it on the text baseline, e.g. inside a sentence.
|
|
102
|
+
|
|
103
|
+
<sonic-code>
|
|
104
|
+
<template>
|
|
105
|
+
<p>
|
|
106
|
+
The Concorde flew from Paris to
|
|
107
|
+
<sonic-pop inline>
|
|
108
|
+
<sonic-button variant="link">New York</sonic-button>
|
|
109
|
+
<sonic-menu slot="content">
|
|
110
|
+
<sonic-menu-item>See flights</sonic-menu-item>
|
|
111
|
+
<sonic-menu-item>Book a seat</sonic-menu-item>
|
|
112
|
+
</sonic-menu>
|
|
113
|
+
</sonic-pop>
|
|
114
|
+
in about 3.5 hours.
|
|
115
|
+
</p>
|
|
116
|
+
</template>
|
|
117
|
+
</sonic-code>
|
|
118
|
+
|
|
63
119
|
## noToggle
|
|
64
120
|
<sonic-code>
|
|
65
121
|
<template>
|
|
@@ -93,4 +149,52 @@
|
|
|
93
149
|
Click to open pop
|
|
94
150
|
</sonic-button>
|
|
95
151
|
</template>
|
|
96
|
-
</sonic-code>
|
|
152
|
+
</sonic-code>
|
|
153
|
+
|
|
154
|
+
## Keep open on select
|
|
155
|
+
|
|
156
|
+
By default, a click inside the content closes the pop, as well as a click outside. Add `data-on-select="keep"` on the content, or on any of its elements, to keep the pop open when interacting with it.
|
|
157
|
+
|
|
158
|
+
<sonic-code>
|
|
159
|
+
<template>
|
|
160
|
+
<sonic-pop class="inline-block">
|
|
161
|
+
<sonic-button>Closes on select</sonic-button>
|
|
162
|
+
<div slot="content" class="grid gap-2 p-3">
|
|
163
|
+
<sonic-checkbox>Option A</sonic-checkbox>
|
|
164
|
+
<sonic-checkbox>Option B</sonic-checkbox>
|
|
165
|
+
</div>
|
|
166
|
+
</sonic-pop>
|
|
167
|
+
<sonic-pop class="inline-block">
|
|
168
|
+
<sonic-button>Stays open on select</sonic-button>
|
|
169
|
+
<div slot="content" class="grid gap-2 p-3" data-on-select="keep">
|
|
170
|
+
<sonic-checkbox>Option A</sonic-checkbox>
|
|
171
|
+
<sonic-checkbox>Option B</sonic-checkbox>
|
|
172
|
+
</div>
|
|
173
|
+
</sonic-pop>
|
|
174
|
+
</template>
|
|
175
|
+
</sonic-code>
|
|
176
|
+
|
|
177
|
+
## Keyboard
|
|
178
|
+
|
|
179
|
+
- `ArrowDown` on the trigger opens the pop.
|
|
180
|
+
- `Escape` closes the last opened pop and gives focus back to its trigger.
|
|
181
|
+
|
|
182
|
+
## Methods and events
|
|
183
|
+
|
|
184
|
+
`show()` and `hide()` open and close the pop programmatically (see `manual` above). The pop dispatches a `show` event when it opens and a `hide` event when it closes.
|
|
185
|
+
|
|
186
|
+
```js
|
|
187
|
+
const pop = document.querySelector("sonic-pop");
|
|
188
|
+
pop.addEventListener("hide", () => console.log("pop closed"));
|
|
189
|
+
pop.show();
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Styling
|
|
193
|
+
|
|
194
|
+
The content can be styled from outside with `::part(content)`.
|
|
195
|
+
|
|
196
|
+
```css
|
|
197
|
+
sonic-pop::part(content) {
|
|
198
|
+
border-radius: 0;
|
|
199
|
+
}
|
|
200
|
+
```
|
|
@@ -1,27 +1,44 @@
|
|
|
1
1
|
import { html, LitElement, css, PropertyValues } from "lit";
|
|
2
2
|
import { customElement, query, state, property } from "lit/decorators.js";
|
|
3
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
3
4
|
|
|
4
5
|
import HTML, {
|
|
5
6
|
SearchableDomElement,
|
|
6
7
|
} from "@supersoniks/concorde/core/utils/HTML";
|
|
8
|
+
import {
|
|
9
|
+
computeFloatingPosition,
|
|
10
|
+
FloatingPlacement,
|
|
11
|
+
FloatingSide,
|
|
12
|
+
getFloatingBounds,
|
|
13
|
+
parsePlacement,
|
|
14
|
+
startFrameLoop,
|
|
15
|
+
supportsPopover,
|
|
16
|
+
} from "@supersoniks/concorde/core/utils/positioning";
|
|
7
17
|
import { Shadow, shadowable } from "../_css/shadow";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
/** @deprecated écriture avec espace, utiliser `"bottom-center"`. */
|
|
20
|
+
type LegacyPopPlacement = `${FloatingSide} center`;
|
|
21
|
+
type PopPlacement = FloatingPlacement | LegacyPopPlacement;
|
|
22
|
+
|
|
23
|
+
let legacyPlacementWarned = false;
|
|
24
|
+
|
|
25
|
+
function normalizePopPlacement(placement: PopPlacement): FloatingPlacement {
|
|
26
|
+
if (!placement.includes(" ")) return placement as FloatingPlacement;
|
|
27
|
+
if (!legacyPlacementWarned) {
|
|
28
|
+
legacyPlacementWarned = true;
|
|
29
|
+
console.warn(
|
|
30
|
+
`[concorde] sonic-pop placement="${placement}" est déprécié, utiliser placement="${placement.replace(" ", "-")}".`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
return placement.replace(" ", "-") as FloatingPlacement;
|
|
34
|
+
}
|
|
19
35
|
|
|
20
36
|
const tagName = "sonic-pop";
|
|
21
37
|
|
|
22
38
|
@customElement(tagName)
|
|
23
39
|
export class Pop extends LitElement {
|
|
24
40
|
static pops = new Set<Pop>();
|
|
41
|
+
static readonly supportsPopover = supportsPopover;
|
|
25
42
|
static styles = [
|
|
26
43
|
css`
|
|
27
44
|
:host {
|
|
@@ -44,7 +61,7 @@ export class Pop extends LitElement {
|
|
|
44
61
|
border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
|
|
45
62
|
}
|
|
46
63
|
|
|
47
|
-
slot[name="content"].is-open
|
|
64
|
+
slot[name="content"].is-open {
|
|
48
65
|
transform: translateY(0) scale(1);
|
|
49
66
|
opacity: 1;
|
|
50
67
|
pointer-events: auto;
|
|
@@ -52,6 +69,36 @@ export class Pop extends LitElement {
|
|
|
52
69
|
transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
|
|
53
70
|
}
|
|
54
71
|
|
|
72
|
+
slot[name="content"][popover] {
|
|
73
|
+
inset: auto;
|
|
74
|
+
width: auto;
|
|
75
|
+
height: auto;
|
|
76
|
+
margin: 0;
|
|
77
|
+
padding: 0;
|
|
78
|
+
border: none;
|
|
79
|
+
overflow: visible;
|
|
80
|
+
color: inherit;
|
|
81
|
+
/* display / overlay en allow-discrete : reste dans le top layer pendant le fondu de fermeture */
|
|
82
|
+
transition-property: all, display, overlay;
|
|
83
|
+
transition-behavior: normal, allow-discrete, allow-discrete;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
slot[name="content"][popover]:not(:popover-open) {
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
slot[name="content"][popover].is-open {
|
|
91
|
+
transition-property: scale, opacity, display, overlay;
|
|
92
|
+
transition-behavior: normal, normal, allow-discrete, allow-discrete;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@starting-style {
|
|
96
|
+
slot[name="content"][popover].is-open:popover-open {
|
|
97
|
+
transform: translateY(1rem) scale(0.95);
|
|
98
|
+
opacity: 0;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
55
102
|
:host([inline]) {
|
|
56
103
|
vertical-align: baseline;
|
|
57
104
|
}
|
|
@@ -72,7 +119,6 @@ export class Pop extends LitElement {
|
|
|
72
119
|
@property({ type: String, reflect: true }) shadow: Shadow = "lg";
|
|
73
120
|
|
|
74
121
|
@property({ type: String }) placement: PopPlacement = "bottom";
|
|
75
|
-
positioningRuns = false;
|
|
76
122
|
lastContentX = 0;
|
|
77
123
|
lastContentY = 0;
|
|
78
124
|
resizeObserver: ResizeObserver = new ResizeObserver(() =>
|
|
@@ -80,13 +126,9 @@ export class Pop extends LitElement {
|
|
|
80
126
|
);
|
|
81
127
|
|
|
82
128
|
@state() private triggerElement: HTMLElement | null = null;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
this.positioningRuns = true;
|
|
87
|
-
this.computePosition(this.placement);
|
|
88
|
-
window.requestAnimationFrame(() => this.runPositioningLoop());
|
|
89
|
-
}
|
|
129
|
+
private stopPositioning?: () => void;
|
|
130
|
+
private hideDisplayTimeout?: ReturnType<typeof setTimeout>;
|
|
131
|
+
private pendingShow = false;
|
|
90
132
|
|
|
91
133
|
toggle(e: Event) {
|
|
92
134
|
if (this.open && this.noToggle) return;
|
|
@@ -99,40 +141,76 @@ export class Pop extends LitElement {
|
|
|
99
141
|
this.triggerElement = e.target as HTMLElement;
|
|
100
142
|
}
|
|
101
143
|
|
|
102
|
-
this.open
|
|
103
|
-
|
|
144
|
+
if (this.open) this.hide();
|
|
145
|
+
else this.show();
|
|
104
146
|
}
|
|
105
147
|
|
|
106
148
|
show() {
|
|
107
|
-
this.
|
|
149
|
+
if (!this.popContent) {
|
|
150
|
+
this.pendingShow = true;
|
|
151
|
+
this.updateComplete.then(() => {
|
|
152
|
+
if (this.pendingShow) this.show();
|
|
153
|
+
});
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
this.pendingShow = false;
|
|
157
|
+
if (this.open) return;
|
|
158
|
+
if (!Pop.supportsPopover) this.setMaxZindex();
|
|
159
|
+
clearTimeout(this.hideDisplayTimeout);
|
|
108
160
|
this.popContent?.style?.removeProperty("display");
|
|
161
|
+
if (Pop.supportsPopover && !this.popContent.matches(":popover-open")) {
|
|
162
|
+
this.popContent.showPopover();
|
|
163
|
+
}
|
|
109
164
|
this.open = true;
|
|
165
|
+
// Pop.pops suit l'ordre d'ouverture : Escape ferme le dernier ouvert.
|
|
166
|
+
if (Pop.pops.delete(this)) Pop.pops.add(this);
|
|
110
167
|
this.popContent.setAttribute("tabindex", "0");
|
|
111
|
-
if (this.popBtn && this.popContent && !this.
|
|
112
|
-
this.positioningRuns = true;
|
|
168
|
+
if (this.popBtn && this.popContent && !this.stopPositioning) {
|
|
113
169
|
this.lastContentX = 0;
|
|
114
170
|
this.lastContentY = 0;
|
|
115
|
-
this.
|
|
171
|
+
this.stopPositioning = startFrameLoop(() =>
|
|
172
|
+
this.computePosition(this.placement),
|
|
173
|
+
);
|
|
116
174
|
}
|
|
117
175
|
this.dispatchEvent(new CustomEvent("show"));
|
|
118
176
|
}
|
|
119
177
|
|
|
120
178
|
hide() {
|
|
121
|
-
this.
|
|
179
|
+
this.pendingShow = false;
|
|
180
|
+
if (!this.popContent) {
|
|
181
|
+
this.dispatchEvent(new CustomEvent("hide"));
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
if (!Pop.supportsPopover) this.resetZindexes();
|
|
185
|
+
if (Pop.supportsPopover && this.popContent?.matches(":popover-open")) {
|
|
186
|
+
this.popContent.hidePopover();
|
|
187
|
+
}
|
|
122
188
|
this.open = false;
|
|
123
189
|
this.popContent.setAttribute("tabindex", "-1");
|
|
124
|
-
this.
|
|
190
|
+
this.stopPositionLoop();
|
|
191
|
+
if (!Pop.supportsPopover) this.hideContentAfterTransition();
|
|
125
192
|
if (this.triggerElement) {
|
|
126
193
|
this.triggerElement.focus();
|
|
127
194
|
this.triggerElement = null;
|
|
128
195
|
}
|
|
129
|
-
Object.assign(this.popContent.style, {
|
|
130
|
-
left: `${this.lastContentX}px`,
|
|
131
|
-
top: `${this.lastContentY}px`,
|
|
132
|
-
});
|
|
133
196
|
this.dispatchEvent(new CustomEvent("hide"));
|
|
134
197
|
}
|
|
135
198
|
|
|
199
|
+
private stopPositionLoop() {
|
|
200
|
+
this.stopPositioning?.();
|
|
201
|
+
this.stopPositioning = undefined;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/** Sans display:none, le contenu masqué par opacité resterait atteignable au clavier. */
|
|
205
|
+
private hideContentAfterTransition() {
|
|
206
|
+
clearTimeout(this.hideDisplayTimeout);
|
|
207
|
+
const duration =
|
|
208
|
+
parseFloat(getComputedStyle(this.popContent).transitionDuration) * 1000;
|
|
209
|
+
this.hideDisplayTimeout = setTimeout(() => {
|
|
210
|
+
if (!this.open) this.popContent.style.display = "none";
|
|
211
|
+
}, duration || 0);
|
|
212
|
+
}
|
|
213
|
+
|
|
136
214
|
/**
|
|
137
215
|
* Remonte dans la structure html de parents en parents et si ils on une position relative ou absolute, on met leur z-index élévé
|
|
138
216
|
*/
|
|
@@ -174,6 +252,7 @@ export class Pop extends LitElement {
|
|
|
174
252
|
const target = path[0] as HTMLElement;
|
|
175
253
|
|
|
176
254
|
Pop.pops.forEach((pop: Pop) => {
|
|
255
|
+
if (!pop.open) return;
|
|
177
256
|
const popContainsTarget = path.includes(pop);
|
|
178
257
|
const popContentContainsTarget = path.includes(
|
|
179
258
|
pop.querySelector('[slot="content"]') as EventTarget,
|
|
@@ -195,7 +274,8 @@ export class Pop extends LitElement {
|
|
|
195
274
|
if (Pop.pops.size == 0) {
|
|
196
275
|
document.addEventListener("pointerdown", this._handleClosePop);
|
|
197
276
|
document.addEventListener("click", this._handleClosePop);
|
|
198
|
-
|
|
277
|
+
// Capture : passer avant les écouteurs Escape des ancêtres (ex. sonic-modal).
|
|
278
|
+
document.addEventListener("keydown", Pop._handleKeyDown, true);
|
|
199
279
|
}
|
|
200
280
|
Pop.pops.add(this);
|
|
201
281
|
}
|
|
@@ -212,133 +292,56 @@ export class Pop extends LitElement {
|
|
|
212
292
|
if (this.popContent) {
|
|
213
293
|
this.resizeObserver.unobserve(this.popContent);
|
|
214
294
|
}
|
|
295
|
+
this.stopPositionLoop();
|
|
296
|
+
clearTimeout(this.hideDisplayTimeout);
|
|
297
|
+
if (this.open) {
|
|
298
|
+
if (!Pop.supportsPopover) this.resetZindexes();
|
|
299
|
+
this.open = false;
|
|
300
|
+
this.triggerElement = null;
|
|
301
|
+
this.popContent?.style.setProperty("display", "none");
|
|
302
|
+
}
|
|
215
303
|
super.disconnectedCallback();
|
|
216
304
|
Pop.pops.delete(this);
|
|
217
305
|
if (Pop.pops.size == 0) {
|
|
218
306
|
document.removeEventListener("pointerdown", this._handleClosePop);
|
|
219
307
|
document.removeEventListener("click", this._handleClosePop);
|
|
220
|
-
document.removeEventListener("keydown",
|
|
308
|
+
document.removeEventListener("keydown", Pop._handleKeyDown, true);
|
|
221
309
|
}
|
|
222
310
|
}
|
|
223
311
|
|
|
224
312
|
computePosition(placement: PopPlacement) {
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
const
|
|
233
|
-
this.
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
const maxX =
|
|
239
|
-
Math.min(
|
|
240
|
-
window.innerWidth,
|
|
241
|
-
scrollableAncestorRect?.right || window.innerWidth,
|
|
242
|
-
) - padding;
|
|
243
|
-
const maxY =
|
|
244
|
-
Math.min(
|
|
245
|
-
window.innerHeight,
|
|
246
|
-
scrollableAncestorRect?.bottom || window.innerHeight,
|
|
247
|
-
) - padding;
|
|
248
|
-
const x0 = thisRect.left;
|
|
249
|
-
const y0 = thisRect.top;
|
|
250
|
-
let x = x0,
|
|
251
|
-
y = y0;
|
|
252
|
-
let contentRect = this.popContent?.getBoundingClientRect();
|
|
253
|
-
const yTop = y0 - contentRect.height;
|
|
254
|
-
const xLeft = x0 - contentRect.width;
|
|
255
|
-
const xRight = x0 + thisRect.width;
|
|
256
|
-
const yBottom = y0 + thisRect.height;
|
|
257
|
-
const xCenter = x0 + (thisRect.width - contentRect.width) * 0.5;
|
|
258
|
-
const yCenter = y0 + (thisRect.height - contentRect.height) * 0.5;
|
|
259
|
-
switch (placementBase) {
|
|
260
|
-
case "bottom":
|
|
261
|
-
y = yBottom;
|
|
262
|
-
if (placementSec == "center") {
|
|
263
|
-
x = xCenter;
|
|
264
|
-
}
|
|
265
|
-
break;
|
|
266
|
-
case "top":
|
|
267
|
-
y = yTop;
|
|
268
|
-
if (placementSec == "center") {
|
|
269
|
-
x = xCenter;
|
|
270
|
-
}
|
|
271
|
-
break;
|
|
272
|
-
case "left":
|
|
273
|
-
x = xLeft;
|
|
274
|
-
if (placementSec == "center") {
|
|
275
|
-
y = yCenter;
|
|
276
|
-
}
|
|
277
|
-
break;
|
|
278
|
-
case "right":
|
|
279
|
-
x = xRight;
|
|
280
|
-
if (placementSec == "center") {
|
|
281
|
-
y = yCenter;
|
|
282
|
-
}
|
|
283
|
-
break;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
this.lastContentX += x - contentRect.x;
|
|
287
|
-
this.lastContentY += y - contentRect.y;
|
|
288
|
-
Object.assign(this.popContent.style, {
|
|
289
|
-
left: `${this.lastContentX}px`,
|
|
290
|
-
top: `${this.lastContentY}px`,
|
|
313
|
+
const { side, align } = parsePlacement(
|
|
314
|
+
normalizePopPlacement(placement),
|
|
315
|
+
"bottom",
|
|
316
|
+
"start",
|
|
317
|
+
);
|
|
318
|
+
const contentRect = this.popContent.getBoundingClientRect();
|
|
319
|
+
|
|
320
|
+
const { x, y } = computeFloatingPosition({
|
|
321
|
+
anchor: this.getBoundingClientRect(),
|
|
322
|
+
floating: contentRect,
|
|
323
|
+
side,
|
|
324
|
+
align,
|
|
325
|
+
bounds: getFloatingBounds(this.popContent, 5),
|
|
291
326
|
});
|
|
292
327
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
if (contentRect.y < minY && placementBase == "top") y = yBottom;
|
|
296
|
-
if (contentRect.x + contentRect.width > maxX && placementBase == "right")
|
|
297
|
-
x = xLeft;
|
|
298
|
-
if (contentRect.y + contentRect.height > maxY && placementBase == "bottom")
|
|
299
|
-
y = yTop;
|
|
300
|
-
|
|
328
|
+
// Déplacement relatif à la position mesurée : reste juste quand un ancêtre transformé
|
|
329
|
+
// (ex. modale en translateZ) devient le bloc conteneur du position: fixed.
|
|
301
330
|
this.lastContentX += x - contentRect.x;
|
|
302
331
|
this.lastContentY += y - contentRect.y;
|
|
303
|
-
|
|
304
|
-
Object.assign(this.popContent.style, {
|
|
305
|
-
left: `${this.lastContentX}px`,
|
|
306
|
-
top: `${this.lastContentY}px`,
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
contentRect = this.popContent?.getBoundingClientRect();
|
|
310
|
-
|
|
311
|
-
if (contentRect.x < minX) {
|
|
312
|
-
this.lastContentX += minX - contentRect.x;
|
|
313
|
-
}
|
|
314
|
-
if (contentRect.y < minY) {
|
|
315
|
-
this.lastContentY += minY - contentRect.y;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
Object.assign(this.popContent.style, {
|
|
319
|
-
left: `${this.lastContentX}px`,
|
|
320
|
-
top: `${this.lastContentY}px`,
|
|
321
|
-
});
|
|
322
|
-
contentRect = this.popContent?.getBoundingClientRect();
|
|
323
|
-
if (contentRect.x + contentRect.width > maxX) {
|
|
324
|
-
this.lastContentX += maxX - (contentRect.x + contentRect.width);
|
|
325
|
-
}
|
|
326
|
-
if (contentRect.y + contentRect.height > maxY) {
|
|
327
|
-
this.lastContentY += maxY - (contentRect.y + contentRect.height);
|
|
328
|
-
}
|
|
329
|
-
|
|
330
332
|
Object.assign(this.popContent.style, {
|
|
331
333
|
left: `${this.lastContentX}px`,
|
|
332
334
|
top: `${this.lastContentY}px`,
|
|
333
335
|
});
|
|
334
336
|
}
|
|
335
337
|
|
|
336
|
-
private _handleKeyDown
|
|
337
|
-
if (e.key
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
338
|
+
private static _handleKeyDown(e: KeyboardEvent) {
|
|
339
|
+
if (e.key !== "Escape") return;
|
|
340
|
+
const lastOpened = [...Pop.pops].reverse().find((pop) => pop.open);
|
|
341
|
+
if (!lastOpened) return;
|
|
342
|
+
e.stopPropagation();
|
|
343
|
+
lastOpened.hide();
|
|
344
|
+
}
|
|
342
345
|
|
|
343
346
|
render() {
|
|
344
347
|
return html`
|
|
@@ -349,6 +352,7 @@ export class Pop extends LitElement {
|
|
|
349
352
|
></slot>
|
|
350
353
|
<slot
|
|
351
354
|
name="content"
|
|
355
|
+
popover=${ifDefined(Pop.supportsPopover ? "manual" : undefined)}
|
|
352
356
|
tabindex="-1"
|
|
353
357
|
part="content"
|
|
354
358
|
style="display: none;"
|
|
@@ -11,6 +11,7 @@ import "@supersoniks/concorde/core/components/ui/table/table-tbody";
|
|
|
11
11
|
import "@supersoniks/concorde/core/components/ui/table/table-tfoot";
|
|
12
12
|
import "@supersoniks/concorde/core/components/ui/table/table-caption";
|
|
13
13
|
import { fontSize } from "@supersoniks/concorde/core/components/ui/_css/size";
|
|
14
|
+
import { Size } from "@supersoniks/concorde/core/components/ui/_css/size";
|
|
14
15
|
|
|
15
16
|
const tagName = "sonic-table";
|
|
16
17
|
@customElement(tagName)
|
|
@@ -66,14 +67,7 @@ export class Table extends LitElement {
|
|
|
66
67
|
`,
|
|
67
68
|
];
|
|
68
69
|
|
|
69
|
-
@property({ type: String, reflect: true }) size?:
|
|
70
|
-
| "2xs"
|
|
71
|
-
| "xs"
|
|
72
|
-
| "sm"
|
|
73
|
-
| "md"
|
|
74
|
-
| "lg"
|
|
75
|
-
| "xl"
|
|
76
|
-
| "2xl";
|
|
70
|
+
@property({ type: String, reflect: true }) size?: Size;
|
|
77
71
|
@property({ type: Boolean, reflect: true }) bordered?: boolean;
|
|
78
72
|
@property({ type: Boolean, reflect: true }) rounded?: boolean;
|
|
79
73
|
@property({ type: Boolean, reflect: true }) noCustomScroll?: boolean;
|
|
@@ -38,7 +38,7 @@ export class Theme extends LitElement {
|
|
|
38
38
|
border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
::slotted(.sonic-pop-content).is-open
|
|
41
|
+
::slotted(.sonic-pop-content).is-open {
|
|
42
42
|
transform: translateY(0) scale(1);
|
|
43
43
|
opacity: 1;
|
|
44
44
|
pointer-events: auto;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isDismissed,
|
|
3
|
+
markDismissed,
|
|
4
|
+
} from "@supersoniks/concorde/core/utils/dismissed";
|
|
5
|
+
|
|
6
|
+
const storageKey = "sonic-toast-dismissed";
|
|
7
|
+
|
|
8
|
+
export function isToastDismissed(id: string | number): boolean {
|
|
9
|
+
return isDismissed(storageKey, id);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function markToastDismissed(id: string | number): void {
|
|
13
|
+
markDismissed(storageKey, id);
|
|
14
|
+
}
|