@supersoniks/concorde 2.0.7 → 3.0.0
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/build-infos.json +1 -0
- package/index.html +44 -0
- package/notes de migration.md +21 -0
- package/package.json +23 -290
- package/scripts/prebuild.mjs +22 -0
- package/{components.js → src/components.ts} +5 -2
- package/src/concorde-loaded.ts +3 -0
- package/src/core/_types/types.ts +55 -0
- package/src/core/components/functional/date/date.md +290 -0
- package/src/core/components/functional/date/date.ts +206 -0
- package/src/core/components/functional/example/example.ts +11 -0
- package/src/core/components/functional/fetch/fetch.md +117 -0
- package/{core/components/functional/fetch/fetch.js → src/core/components/functional/fetch/fetch.ts} +33 -37
- package/src/core/components/functional/if/if.md +16 -0
- package/src/core/components/functional/if/if.test.ts +40 -0
- package/src/core/components/functional/if/if.ts +23 -0
- package/src/core/components/functional/list/list.md +194 -0
- package/src/core/components/functional/list/list.ts +236 -0
- package/src/core/components/functional/mix/mix.md +41 -0
- package/src/core/components/functional/mix/mix.ts +95 -0
- package/src/core/components/functional/queue/queue.md +87 -0
- package/src/core/components/functional/queue/queue.ts +279 -0
- package/src/core/components/functional/router/redirect.ts +44 -0
- package/src/core/components/functional/router/router.md +112 -0
- package/src/core/components/functional/router/router.ts +108 -0
- package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +229 -0
- package/{core → src/core}/components/functional/sdui/default-library.json +13 -13
- package/src/core/components/functional/sdui/example.json +99 -0
- package/src/core/components/functional/sdui/sdui-utils.ts +62 -0
- package/src/core/components/functional/sdui/sdui.md +356 -0
- package/src/core/components/functional/sdui/sdui.ts +230 -0
- package/src/core/components/functional/sdui/types.ts +34 -0
- package/src/core/components/functional/sonic-scope/sonic-scope.ts +13 -0
- package/src/core/components/functional/states/states.md +87 -0
- package/src/core/components/functional/states/states.ts +121 -0
- package/src/core/components/functional/submit/submit.md +48 -0
- package/src/core/components/functional/submit/submit.ts +265 -0
- package/src/core/components/functional/subscriber/subscriber.md +91 -0
- package/src/core/components/functional/subscriber/subscriber.ts +28 -0
- package/src/core/components/functional/value/value.md +35 -0
- package/src/core/components/functional/value/value.ts +18 -0
- package/{core/components/ui/_css/scroll.js → src/core/components/ui/_css/scroll.ts} +3 -2
- package/{core/components/ui/_css/size.js → src/core/components/ui/_css/size.ts} +5 -2
- package/{core/components/ui/_css/type.js → src/core/components/ui/_css/type.ts} +5 -3
- package/src/core/components/ui/alert/alert.md +121 -0
- package/src/core/components/ui/alert/alert.ts +177 -0
- package/src/core/components/ui/badge/badge.md +102 -0
- package/{core/components/ui/badge/badge.js → src/core/components/ui/badge/badge.ts} +36 -51
- package/src/core/components/ui/button/button.md +184 -0
- package/{core/components/ui/button/button.js → src/core/components/ui/button/button.ts} +258 -302
- package/src/core/components/ui/captcha/captcha.md +12 -0
- package/src/core/components/ui/captcha/captcha.ts +88 -0
- package/src/core/components/ui/card/card-footer.ts +19 -0
- package/src/core/components/ui/card/card-header-descripton.ts +24 -0
- package/{core/components/ui/card/card-header.js → src/core/components/ui/card/card-header.ts} +28 -38
- package/src/core/components/ui/card/card-main.ts +24 -0
- package/src/core/components/ui/card/card.md +96 -0
- package/{core/components/ui/card/card.js → src/core/components/ui/card/card.ts} +23 -34
- package/src/core/components/ui/divider/divider.md +35 -0
- package/{core/components/ui/divider/divider.js → src/core/components/ui/divider/divider.ts} +35 -65
- package/src/core/components/ui/form/checkbox/checkbox.md +96 -0
- package/{core/components/ui/form/checkbox/checkbox.js → src/core/components/ui/form/checkbox/checkbox.ts} +79 -98
- package/{core/components/ui/form/css/form-control.js → src/core/components/ui/form/css/form-control.ts} +9 -5
- package/src/core/components/ui/form/fieldset/fieldset.md +129 -0
- package/src/core/components/ui/form/fieldset/fieldset.ts +96 -0
- package/src/core/components/ui/form/fieldset/legend-description.ts +23 -0
- package/src/core/components/ui/form/fieldset/legend.ts +90 -0
- package/src/core/components/ui/form/form-actions/form-actions.md +77 -0
- package/src/core/components/ui/form/form-actions/form-actions.ts +32 -0
- package/src/core/components/ui/form/form-layout/form-layout.md +43 -0
- package/src/core/components/ui/form/form-layout/form-layout.ts +71 -0
- package/src/core/components/ui/form/input/input.md +168 -0
- package/src/core/components/ui/form/input/input.ts +227 -0
- package/src/core/components/ui/form/input/password-helper.ts +68 -0
- package/src/core/components/ui/form/input/same-value-helper.ts +48 -0
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +130 -0
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +285 -0
- package/src/core/components/ui/form/radio/radio.md +86 -0
- package/src/core/components/ui/form/radio/radio.ts +44 -0
- package/src/core/components/ui/form/select/select.md +99 -0
- package/src/core/components/ui/form/select/select.ts +310 -0
- package/src/core/components/ui/form/textarea/textarea.md +66 -0
- package/src/core/components/ui/form/textarea/textarea.ts +119 -0
- package/src/core/components/ui/group/group.md +75 -0
- package/src/core/components/ui/group/group.ts +101 -0
- package/src/core/components/ui/icon/icon.md +125 -0
- package/src/core/components/ui/icon/icon.stories.ts +100 -0
- package/src/core/components/ui/icon/icon.ts +106 -0
- package/src/core/components/ui/icon/icons.json +1 -0
- package/src/core/components/ui/icon/icons.ts +130 -0
- package/src/core/components/ui/icon/svgs/cancel.svg +3 -0
- package/src/core/components/ui/icon/svgs/check-circled-outline.svg +4 -0
- package/src/core/components/ui/icon/svgs/check.svg +3 -0
- package/src/core/components/ui/icon/svgs/emoji-puzzled.svg +1 -0
- package/src/core/components/ui/icon/svgs/info-empty.svg +5 -0
- package/src/core/components/ui/icon/svgs/loader.svg +1 -0
- package/src/core/components/ui/icon/svgs/minus-small.svg +3 -0
- package/src/core/components/ui/icon/svgs/more-horiz.svg +5 -0
- package/src/core/components/ui/icon/svgs/more-vert.svg +5 -0
- package/src/core/components/ui/icon/svgs/nav-arrow-down.svg +3 -0
- package/src/core/components/ui/icon/svgs/warning-circled-outline.svg +5 -0
- package/src/core/components/ui/image/image.md +107 -0
- package/src/core/components/ui/image/image.ts +117 -0
- package/src/core/components/ui/link/link.md +43 -0
- package/src/core/components/ui/link/link.ts +108 -0
- package/src/core/components/ui/loader/loader.md +37 -0
- package/src/core/components/ui/loader/loader.stories.ts +25 -0
- package/src/core/components/ui/loader/loader.ts +81 -0
- package/{core/components/ui/loader/styles/fixed.js → src/core/components/ui/loader/styles/fixed.ts} +2 -1
- package/{core/components/ui/loader/styles/inline.js → src/core/components/ui/loader/styles/inline.ts} +3 -2
- package/src/core/components/ui/menu/menu-item.ts +30 -0
- package/src/core/components/ui/menu/menu.md +288 -0
- package/src/core/components/ui/menu/menu.ts +292 -0
- package/src/core/components/ui/modal/modal-actions.ts +35 -0
- package/src/core/components/ui/modal/modal-close.ts +36 -0
- package/src/core/components/ui/modal/modal-content.ts +19 -0
- package/src/core/components/ui/modal/modal-subtitle.ts +23 -0
- package/src/core/components/ui/modal/modal-title.ts +22 -0
- package/src/core/components/ui/modal/modal.md +123 -0
- package/src/core/components/ui/modal/modal.stories.ts +140 -0
- package/src/core/components/ui/modal/modal.ts +386 -0
- package/src/core/components/ui/pop/pop.md +79 -0
- package/src/core/components/ui/pop/pop.ts +291 -0
- package/src/core/components/ui/progress/progress.md +65 -0
- package/{core/components/ui/progress/progress.js → src/core/components/ui/progress/progress.ts} +31 -50
- package/src/core/components/ui/table/table-caption.ts +21 -0
- package/src/core/components/ui/table/table-tbody.ts +32 -0
- package/src/core/components/ui/table/table-td.ts +47 -0
- package/src/core/components/ui/table/table-tfoot.ts +20 -0
- package/src/core/components/ui/table/table-th.ts +56 -0
- package/src/core/components/ui/table/table-thead.ts +18 -0
- package/src/core/components/ui/table/table-tr.ts +48 -0
- package/src/core/components/ui/table/table.md +467 -0
- package/{core/components/ui/table/table.js → src/core/components/ui/table/table.ts} +32 -53
- package/{core/components/ui/theme/theme-collection/core-variables.js → src/core/components/ui/theme/theme-collection/core-variables.ts} +3 -2
- package/{core/components/ui/theme/theme-collection/dark.js → src/core/components/ui/theme/theme-collection/dark.ts} +5 -3
- package/{core/components/ui/theme/theme-collection/light.js → src/core/components/ui/theme/theme-collection/light.ts} +3 -2
- package/src/core/components/ui/theme/theme.ts +118 -0
- package/src/core/components/ui/toast/message-subscriber.stories.ts +43 -0
- package/src/core/components/ui/toast/message-subscriber.ts +37 -0
- package/{core/components/ui/toast/toast-item.js → src/core/components/ui/toast/toast-item.ts} +86 -113
- package/src/core/components/ui/toast/toast.ts +237 -0
- package/src/core/components/ui/toast/types.ts +14 -0
- package/src/core/components/ui/tooltip/tooltip.md +37 -0
- package/{core/components/ui/tooltip/tooltip.js → src/core/components/ui/tooltip/tooltip.ts} +26 -47
- package/{core/components/ui/ui.js → src/core/components/ui/ui.ts} +2 -0
- package/src/core/core.ts +22 -0
- package/src/core/decorators/Subscriber.ts +187 -0
- package/src/core/directives/DataProvider.ts +113 -0
- package/src/core/directives/Wording.ts +220 -0
- package/src/core/mixins/Fetcher.ts +258 -0
- package/src/core/mixins/FormCheckable.ts +287 -0
- package/src/core/mixins/FormElement.ts +275 -0
- package/src/core/mixins/FormInput.ts +135 -0
- package/src/core/mixins/Subscriber.ts +352 -0
- package/src/core/mixins/TemplatesContainer.ts +70 -0
- package/{core/mixins/mixins.d.ts → src/core/mixins/mixins.ts} +1 -1
- package/src/core/utils/Arrays.ts +161 -0
- package/src/core/utils/DataBindObserver.ts +286 -0
- package/src/core/utils/Electron.ts +15 -0
- package/src/core/utils/Format.ts +58 -0
- package/src/core/utils/HTML.ts +126 -0
- package/src/core/utils/LocationHandler.ts +139 -0
- package/src/core/utils/Objects.ts +103 -0
- package/src/core/utils/PublisherProxy.ts +786 -0
- package/src/core/utils/Utils.ts +12 -0
- package/src/core/utils/api.ts +456 -0
- package/{core/utils/url-pattern.d.ts → src/core/utils/url-pattern.ts} +1 -0
- package/{decorators.js → src/decorators.ts} +6 -2
- package/{directives.js → src/directives.ts} +11 -6
- package/src/docs/_core-concept/overview.md +57 -0
- package/src/docs/_core-concept/subscriber.md +76 -0
- package/src/docs/_getting-started/concorde-outside.md +141 -0
- package/src/docs/_getting-started/create-a-component.md +137 -0
- package/src/docs/_getting-started/pubsub.md +150 -0
- package/src/docs/_getting-started/start.md +37 -0
- package/src/docs/_getting-started/theming.md +91 -0
- package/src/docs/code.ts +281 -0
- package/src/docs/docs.ts +6 -0
- package/src/docs/example/users.ts +64 -0
- package/src/docs/navigation/navigation.ts +101 -0
- package/src/docs/prism/index.ts +6 -0
- package/src/docs/prism/prism.css +158 -0
- package/src/docs/prism/prism.js +1022 -0
- package/src/docs/search/docs-search.json +3767 -0
- package/src/docs/search/markdown-renderer.ts +40 -0
- package/src/docs/search/page.ts +40 -0
- package/src/docs/search/search.ts +184 -0
- package/src/docs.ts +2 -0
- package/src/index.ts +7 -0
- package/{mixins.js → src/mixins.ts} +10 -6
- package/src/tag-list.json +1 -0
- package/src/test-utils/TestUtils.ts +13 -0
- package/src/tsconfig.json +113 -0
- package/{utils.js → src/utils.ts} +15 -11
- package/test-utils/TestUtils.ts +13 -0
- package/vite/config.js +136 -0
- package/vite.config.mts +87 -0
- package/README.md +0 -27
- package/cli.js +0 -75
- package/components.d.ts +0 -4
- package/concorde-core.bundle.js +0 -3427
- package/concorde-core.es.js +0 -14372
- package/core/_types/types.d.ts +0 -28
- package/core/_types/types.js +0 -2
- package/core/components/functional/date/date.d.ts +0 -45
- package/core/components/functional/date/date.js +0 -243
- package/core/components/functional/example/example.d.ts +0 -7
- package/core/components/functional/example/example.js +0 -26
- package/core/components/functional/fetch/fetch.d.ts +0 -93
- package/core/components/functional/functional.js +0 -15
- package/core/components/functional/if/if.d.ts +0 -12
- package/core/components/functional/if/if.js +0 -38
- package/core/components/functional/if/if.test.d.ts +0 -1
- package/core/components/functional/if/if.test.js +0 -35
- package/core/components/functional/list/list.d.ts +0 -117
- package/core/components/functional/list/list.js +0 -214
- package/core/components/functional/mix/mix.d.ts +0 -22
- package/core/components/functional/mix/mix.js +0 -102
- package/core/components/functional/queue/queue.d.ts +0 -67
- package/core/components/functional/queue/queue.js +0 -310
- package/core/components/functional/router/redirect.d.ts +0 -18
- package/core/components/functional/router/redirect.js +0 -53
- package/core/components/functional/router/router.d.ts +0 -27
- package/core/components/functional/router/router.js +0 -119
- package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +0 -58
- package/core/components/functional/sdui/SDUIDescriptorTransformer.js +0 -215
- package/core/components/functional/sdui/sdui-utils.d.ts +0 -5
- package/core/components/functional/sdui/sdui-utils.js +0 -63
- package/core/components/functional/sdui/sdui.d.ts +0 -136
- package/core/components/functional/sdui/sdui.js +0 -254
- package/core/components/functional/sdui/types.d.ts +0 -37
- package/core/components/functional/sdui/types.js +0 -1
- package/core/components/functional/sonic-scope/sonic-scope.d.ts +0 -5
- package/core/components/functional/sonic-scope/sonic-scope.js +0 -21
- package/core/components/functional/states/states.d.ts +0 -29
- package/core/components/functional/states/states.js +0 -134
- package/core/components/functional/submit/submit.d.ts +0 -30
- package/core/components/functional/submit/submit.js +0 -236
- package/core/components/functional/subscriber/subscriber.d.ts +0 -12
- package/core/components/functional/subscriber/subscriber.js +0 -38
- package/core/components/functional/value/value.d.ts +0 -7
- package/core/components/functional/value/value.js +0 -27
- package/core/components/ui/_css/scroll.d.ts +0 -1
- package/core/components/ui/_css/size.d.ts +0 -2
- package/core/components/ui/_css/type.d.ts +0 -2
- package/core/components/ui/alert/alert.d.ts +0 -34
- package/core/components/ui/alert/alert.js +0 -202
- package/core/components/ui/badge/badge.d.ts +0 -26
- package/core/components/ui/button/button.d.ts +0 -171
- package/core/components/ui/captcha/captcha.d.ts +0 -30
- package/core/components/ui/captcha/captcha.js +0 -93
- package/core/components/ui/card/card-footer.d.ts +0 -4
- package/core/components/ui/card/card-footer.js +0 -24
- package/core/components/ui/card/card-header-descripton.d.ts +0 -5
- package/core/components/ui/card/card-header-descripton.js +0 -32
- package/core/components/ui/card/card-header.d.ts +0 -8
- package/core/components/ui/card/card-main.d.ts +0 -4
- package/core/components/ui/card/card-main.js +0 -28
- package/core/components/ui/card/card.d.ts +0 -12
- package/core/components/ui/divider/divider.d.ts +0 -15
- package/core/components/ui/form/checkbox/checkbox.d.ts +0 -181
- package/core/components/ui/form/css/form-control.d.ts +0 -4
- package/core/components/ui/form/fieldset/fieldset.d.ts +0 -23
- package/core/components/ui/form/fieldset/fieldset.js +0 -118
- package/core/components/ui/form/fieldset/legend-description.d.ts +0 -5
- package/core/components/ui/form/fieldset/legend-description.js +0 -30
- package/core/components/ui/form/fieldset/legend.d.ts +0 -16
- package/core/components/ui/form/fieldset/legend.js +0 -112
- package/core/components/ui/form/form-actions/form-actions.d.ts +0 -7
- package/core/components/ui/form/form-actions/form-actions.js +0 -46
- package/core/components/ui/form/form-layout/form-layout.d.ts +0 -12
- package/core/components/ui/form/form-layout/form-layout.js +0 -83
- package/core/components/ui/form/input/input.d.ts +0 -106
- package/core/components/ui/form/input/input.js +0 -268
- package/core/components/ui/form/input/password-helper.d.ts +0 -25
- package/core/components/ui/form/input/password-helper.js +0 -119
- package/core/components/ui/form/input/same-value-helper.d.ts +0 -16
- package/core/components/ui/form/input/same-value-helper.js +0 -77
- package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +0 -136
- package/core/components/ui/form/input-autocomplete/input-autocomplete.js +0 -296
- package/core/components/ui/form/radio/radio.d.ts +0 -12
- package/core/components/ui/form/radio/radio.js +0 -50
- package/core/components/ui/form/select/select.d.ts +0 -58
- package/core/components/ui/form/select/select.js +0 -298
- package/core/components/ui/form/textarea/textarea.d.ts +0 -84
- package/core/components/ui/form/textarea/textarea.js +0 -150
- package/core/components/ui/group/group.d.ts +0 -16
- package/core/components/ui/group/group.js +0 -118
- package/core/components/ui/icon/icon.d.ts +0 -26
- package/core/components/ui/icon/icon.js +0 -113
- package/core/components/ui/icon/icons.d.ts +0 -10
- package/core/components/ui/icon/icons.js +0 -126
- package/core/components/ui/icon/icons.json +0 -1
- package/core/components/ui/image/image.d.ts +0 -15
- package/core/components/ui/image/image.js +0 -153
- package/core/components/ui/link/link.d.ts +0 -29
- package/core/components/ui/link/link.js +0 -124
- package/core/components/ui/loader/loader.d.ts +0 -23
- package/core/components/ui/loader/loader.js +0 -97
- package/core/components/ui/loader/styles/fixed.d.ts +0 -1
- package/core/components/ui/loader/styles/inline.d.ts +0 -1
- package/core/components/ui/menu/menu-item.d.ts +0 -5
- package/core/components/ui/menu/menu-item.js +0 -34
- package/core/components/ui/menu/menu.d.ts +0 -41
- package/core/components/ui/menu/menu.js +0 -313
- package/core/components/ui/modal/modal-actions.d.ts +0 -7
- package/core/components/ui/modal/modal-actions.js +0 -42
- package/core/components/ui/modal/modal-close.d.ts +0 -7
- package/core/components/ui/modal/modal-close.js +0 -43
- package/core/components/ui/modal/modal-content.d.ts +0 -5
- package/core/components/ui/modal/modal-content.js +0 -26
- package/core/components/ui/modal/modal-subtitle.d.ts +0 -5
- package/core/components/ui/modal/modal-subtitle.js +0 -30
- package/core/components/ui/modal/modal-title.d.ts +0 -5
- package/core/components/ui/modal/modal-title.js +0 -29
- package/core/components/ui/modal/modal.d.ts +0 -58
- package/core/components/ui/modal/modal.js +0 -401
- package/core/components/ui/pop/pop.d.ts +0 -37
- package/core/components/ui/pop/pop.js +0 -299
- package/core/components/ui/progress/progress.d.ts +0 -10
- package/core/components/ui/table/table-caption.d.ts +0 -5
- package/core/components/ui/table/table-caption.js +0 -28
- package/core/components/ui/table/table-tbody.d.ts +0 -5
- package/core/components/ui/table/table-tbody.js +0 -39
- package/core/components/ui/table/table-td.d.ts +0 -12
- package/core/components/ui/table/table-td.js +0 -68
- package/core/components/ui/table/table-tfoot.d.ts +0 -5
- package/core/components/ui/table/table-tfoot.js +0 -27
- package/core/components/ui/table/table-th.d.ts +0 -11
- package/core/components/ui/table/table-th.js +0 -73
- package/core/components/ui/table/table-thead.d.ts +0 -5
- package/core/components/ui/table/table-thead.js +0 -25
- package/core/components/ui/table/table-tr.d.ts +0 -13
- package/core/components/ui/table/table-tr.js +0 -66
- package/core/components/ui/table/table.d.ts +0 -17
- package/core/components/ui/theme/theme-collection/core-variables.d.ts +0 -1
- package/core/components/ui/theme/theme-collection/dark.d.ts +0 -1
- package/core/components/ui/theme/theme-collection/light.d.ts +0 -1
- package/core/components/ui/theme/theme.d.ts +0 -19
- package/core/components/ui/theme/theme.js +0 -124
- package/core/components/ui/toast/message-subscriber.d.ts +0 -18
- package/core/components/ui/toast/message-subscriber.js +0 -40
- package/core/components/ui/toast/toast-item.d.ts +0 -19
- package/core/components/ui/toast/toast.d.ts +0 -25
- package/core/components/ui/toast/toast.js +0 -226
- package/core/components/ui/toast/types.d.ts +0 -11
- package/core/components/ui/toast/types.js +0 -1
- package/core/components/ui/tooltip/tooltip.d.ts +0 -10
- package/core/components/ui/ui.d.ts +0 -32
- package/core/core.d.ts +0 -4
- package/core/core.js +0 -19
- package/core/decorators/Subscriber.d.ts +0 -4
- package/core/decorators/Subscriber.js +0 -166
- package/core/directives/DataProvider.d.ts +0 -23
- package/core/directives/DataProvider.js +0 -102
- package/core/directives/Wording.d.ts +0 -42
- package/core/directives/Wording.js +0 -202
- package/core/mixins/Fetcher.d.ts +0 -90
- package/core/mixins/Fetcher.js +0 -242
- package/core/mixins/FormCheckable.d.ts +0 -88
- package/core/mixins/FormCheckable.js +0 -306
- package/core/mixins/FormElement.d.ts +0 -32
- package/core/mixins/FormElement.js +0 -272
- package/core/mixins/FormInput.d.ts +0 -70
- package/core/mixins/FormInput.js +0 -81
- package/core/mixins/Subscriber.d.ts +0 -36
- package/core/mixins/Subscriber.js +0 -333
- package/core/mixins/TemplatesContainer.d.ts +0 -13
- package/core/mixins/TemplatesContainer.js +0 -69
- package/core/mixins/mixins.js +0 -6
- package/core/utils/Arrays.d.ts +0 -97
- package/core/utils/Arrays.js +0 -140
- package/core/utils/DataBindObserver.d.ts +0 -83
- package/core/utils/DataBindObserver.js +0 -264
- package/core/utils/Electron.d.ts +0 -7
- package/core/utils/Electron.js +0 -11
- package/core/utils/Format.d.ts +0 -12
- package/core/utils/Format.js +0 -38
- package/core/utils/HTML.d.ts +0 -42
- package/core/utils/HTML.js +0 -119
- package/core/utils/LocationHandler.d.ts +0 -46
- package/core/utils/LocationHandler.js +0 -133
- package/core/utils/Objects.d.ts +0 -28
- package/core/utils/Objects.js +0 -102
- package/core/utils/PublisherProxy.d.ts +0 -176
- package/core/utils/PublisherProxy.js +0 -709
- package/core/utils/Utils.d.ts +0 -4
- package/core/utils/Utils.js +0 -12
- package/core/utils/api.d.ts +0 -139
- package/core/utils/api.js +0 -391
- package/core/utils/url-pattern.js +0 -2
- package/decorators.d.ts +0 -3
- package/directives.d.ts +0 -40
- package/img/concorde-logo.svg +0 -1
- package/img/concorde.png +0 -0
- package/img/concorde_def.png +0 -0
- package/mixins.d.ts +0 -181
- package/svg/regular/plane.svg +0 -1
- package/svg/solid/plane.svg +0 -1
- package/test-utils/TestUtils.d.ts +0 -4
- package/test-utils/TestUtils.js +0 -12
- package/utils.d.ts +0 -20
- /package/{core/components/functional/functional.d.ts → src/core/components/functional/functional.ts} +0 -0
- /package/{core → src/core}/components/ui/theme/css/tailwind.css +0 -0
- /package/{core → src/core}/components/ui/theme/css/tailwind.d.ts +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import {html, LitElement, css} from "lit";
|
|
2
|
+
import {customElement, property} from "lit/decorators.js";
|
|
3
|
+
import {styleMap} from "lit/directives/style-map.js";
|
|
4
|
+
const tagName = "sonic-image";
|
|
5
|
+
@customElement(tagName)
|
|
6
|
+
export class Image extends LitElement {
|
|
7
|
+
static styles = [
|
|
8
|
+
css`
|
|
9
|
+
:host {
|
|
10
|
+
--sc-img-radius: 0;
|
|
11
|
+
--sc-img-bg: var(--sc-placeholder-bg);
|
|
12
|
+
border-radius: var(--sc-img-radius);
|
|
13
|
+
display: block;
|
|
14
|
+
width: 100%;
|
|
15
|
+
background: var(--sc-img-bg);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
img {
|
|
19
|
+
width: 100%;
|
|
20
|
+
vertical-align: middle;
|
|
21
|
+
object-fit: cover;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
img[src=""] {
|
|
25
|
+
visibility: hidden;
|
|
26
|
+
}
|
|
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
|
+
:host([cover]),
|
|
57
|
+
:host([cover]) > div,
|
|
58
|
+
:host([cover]) img {
|
|
59
|
+
position: absolute !important;
|
|
60
|
+
left: 0 !important;
|
|
61
|
+
top: 0 !important;
|
|
62
|
+
right: 0 !important;
|
|
63
|
+
bottom: 0 !important;
|
|
64
|
+
height: 100% !important;
|
|
65
|
+
width: 100% !important;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([transition]) img {
|
|
69
|
+
opacity: 0;
|
|
70
|
+
transition: 0.25s;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:host([transition="fade-scale-out"]) img {
|
|
74
|
+
scale: 1.08;
|
|
75
|
+
transition: opacity 0.3s linear, scale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
76
|
+
}
|
|
77
|
+
:host([transition]) img.loaded {
|
|
78
|
+
opacity: 1;
|
|
79
|
+
scale: 1;
|
|
80
|
+
}
|
|
81
|
+
`,
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
@property({type: String}) rounded: "" | "none" | "full" | "sm" | "md" | "lg" = "none";
|
|
85
|
+
@property({type: String}) src = "";
|
|
86
|
+
@property({type: String}) alt = "";
|
|
87
|
+
@property({type: String}) loading: "eager" | "lazy" = "lazy";
|
|
88
|
+
@property({type: String, reflect: true}) transition?: "fade" | "fade-scale-out";
|
|
89
|
+
@property({type: String}) ratio = "auto";
|
|
90
|
+
@property({type: String}) objectPosition = "center center";
|
|
91
|
+
@property({type: String}) imageRendering = "auto";
|
|
92
|
+
@property({type: Boolean, reflect: true}) cover = false;
|
|
93
|
+
|
|
94
|
+
firstUpdated(changedProperties: Map<string | number | symbol, unknown>): void {
|
|
95
|
+
if (this.transition) {
|
|
96
|
+
const img = this.shadowRoot?.querySelector("img");
|
|
97
|
+
if (!img) return;
|
|
98
|
+
img.onload = function () {
|
|
99
|
+
img.classList.add("loaded");
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
super.firstUpdated(changedProperties);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
render() {
|
|
106
|
+
const imgStyles = {
|
|
107
|
+
aspectRatio: this.cover ? "auto" : this.ratio,
|
|
108
|
+
imageRendering: this.imageRendering,
|
|
109
|
+
objectPosition: this.objectPosition,
|
|
110
|
+
};
|
|
111
|
+
return html`<div part="image">
|
|
112
|
+
<picture part="picture"
|
|
113
|
+
><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style=${styleMap(imgStyles)}
|
|
114
|
+
/></picture>
|
|
115
|
+
</div>`;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Link
|
|
2
|
+
|
|
3
|
+
## Href
|
|
4
|
+
<sonic-code>
|
|
5
|
+
<template>
|
|
6
|
+
<sonic-link href="/">Basic link with href attibute</sonic-link>
|
|
7
|
+
</template>
|
|
8
|
+
</sonic-code>
|
|
9
|
+
|
|
10
|
+
## Target
|
|
11
|
+
<sonic-code>
|
|
12
|
+
<template>
|
|
13
|
+
<sonic-link href="/" target="_blank">Link with target attibute</sonic-link>
|
|
14
|
+
</template>
|
|
15
|
+
</sonic-code>
|
|
16
|
+
|
|
17
|
+
## AutoActive
|
|
18
|
+
|
|
19
|
+
<sonic-code>
|
|
20
|
+
<template>
|
|
21
|
+
<sonic-link href="/#core/components" class="[&[active]]:text-success">autoActive partial (default)</sonic-link>
|
|
22
|
+
</template>
|
|
23
|
+
</sonic-code>
|
|
24
|
+
|
|
25
|
+
### AutoActive Strict vs partial
|
|
26
|
+
|
|
27
|
+
<sonic-code>
|
|
28
|
+
<template>
|
|
29
|
+
<div class="grid gap-3">
|
|
30
|
+
<sonic-link href="/#core" autoActive="strict" class="[&[active]]:text-success">autoActive strict</sonic-link>
|
|
31
|
+
<sonic-link href="/#core/components/ui/link/link.md/link" autoActive="strict" class="[&[active]]:text-success">autoActive strict</sonic-link>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
</sonic-code>
|
|
35
|
+
|
|
36
|
+
### AutoActive disabled
|
|
37
|
+
|
|
38
|
+
<sonic-code>
|
|
39
|
+
<template>
|
|
40
|
+
<sonic-link href="/#core/components/ui/link/link.md/link" autoActive="disabled" class="[&[active]]:text-success">autoActive disabled</sonic-link>
|
|
41
|
+
</template>
|
|
42
|
+
</sonic-code>
|
|
43
|
+
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import LocationHandler from "@supersoniks/concorde/core/utils/LocationHandler";
|
|
2
|
+
import {html, LitElement, css, PropertyValues, nothing} from "lit";
|
|
3
|
+
import {customElement, property} from "lit/decorators.js";
|
|
4
|
+
import {ifDefined} from "lit/directives/if-defined.js";
|
|
5
|
+
import Electron from "@supersoniks/concorde/core/utils/Electron";
|
|
6
|
+
const tagName = "sonic-link";
|
|
7
|
+
|
|
8
|
+
@customElement(tagName)
|
|
9
|
+
export class Link extends LitElement {
|
|
10
|
+
static styles = [
|
|
11
|
+
css`
|
|
12
|
+
a {
|
|
13
|
+
color: inherit;
|
|
14
|
+
text-decoration: none;
|
|
15
|
+
display: contents;
|
|
16
|
+
}
|
|
17
|
+
`,
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
@property({type: String}) href = "";
|
|
21
|
+
private _location = "";
|
|
22
|
+
get location(): string {
|
|
23
|
+
return this._location;
|
|
24
|
+
}
|
|
25
|
+
set location(value: string) {
|
|
26
|
+
this._location = value;
|
|
27
|
+
LocationHandler.updateComponentActiveState(this);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@property({type: String, attribute: "data-aria-label"}) ariaLabel = null;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* mode d'activation du bouton :
|
|
34
|
+
* - strict : l'url courante match exactement avec le href du bouton
|
|
35
|
+
* - partial : l'url courante match à gauche avec le href du bouton
|
|
36
|
+
* - disabled : aucune activation / désactivation
|
|
37
|
+
*/
|
|
38
|
+
@property({type: String}) autoActive: "strict" | "partial" | "disabled" = "partial";
|
|
39
|
+
connectedCallback() {
|
|
40
|
+
if (this.href && this.href.indexOf("http") != 0) {
|
|
41
|
+
LocationHandler.onChange(this);
|
|
42
|
+
this.location = document.location.href.replace(document.location.origin, "");
|
|
43
|
+
}
|
|
44
|
+
|
|
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
|
+
super.connectedCallback();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
setFocusable() {
|
|
58
|
+
if (this.href) {
|
|
59
|
+
this.setAttribute("tabIndex", "0");
|
|
60
|
+
} else {
|
|
61
|
+
this.removeAttribute("tabIndex");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
disconnectedCallback(): void {
|
|
66
|
+
LocationHandler.offChange(this);
|
|
67
|
+
super.disconnectedCallback();
|
|
68
|
+
}
|
|
69
|
+
private _target: string | null = null;
|
|
70
|
+
@property({type: String}) set target(newTarget) {
|
|
71
|
+
this._target = newTarget;
|
|
72
|
+
Electron.fixBlankLink(this);
|
|
73
|
+
this.requestUpdate();
|
|
74
|
+
}
|
|
75
|
+
get target() {
|
|
76
|
+
return this._target;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Si présent on passe en mode pushstate
|
|
81
|
+
*/
|
|
82
|
+
@property({type: Boolean}) pushState: boolean | null = null;
|
|
83
|
+
|
|
84
|
+
handlePushState(e: Event) {
|
|
85
|
+
e.preventDefault();
|
|
86
|
+
LocationHandler.changeFromComponent(this);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
updated(changedProperties: PropertyValues) {
|
|
90
|
+
if (changedProperties.has("href")) {
|
|
91
|
+
this.setFocusable();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
render() {
|
|
96
|
+
if (!this.href) return html`<slot></slot>`;
|
|
97
|
+
return html`
|
|
98
|
+
<a
|
|
99
|
+
href="${this.href}"
|
|
100
|
+
aria-label=${this.ariaLabel || nothing}
|
|
101
|
+
target=${ifDefined(this.target)}
|
|
102
|
+
@click=${this.pushState ? this.handlePushState : null}
|
|
103
|
+
>
|
|
104
|
+
<slot></slot>
|
|
105
|
+
</a>
|
|
106
|
+
`;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Loader
|
|
2
|
+
|
|
3
|
+
## Inline mode
|
|
4
|
+
|
|
5
|
+
<sonic-code>
|
|
6
|
+
<template>
|
|
7
|
+
<sonic-loader mode="inline"></sonic-loader>
|
|
8
|
+
</template>
|
|
9
|
+
</sonic-code>
|
|
10
|
+
|
|
11
|
+
## Fixed mode
|
|
12
|
+
|
|
13
|
+
<sonic-code >
|
|
14
|
+
<template>
|
|
15
|
+
<div formDataProvider="toazdar">
|
|
16
|
+
<sonic-button name="toggleLoader" value="on">
|
|
17
|
+
Toggle fixed loader
|
|
18
|
+
<sonic-loader swap="on"></sonic-loader>
|
|
19
|
+
</sonic-button>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
</sonic-code>
|
|
23
|
+
|
|
24
|
+
## Hide / show programmatically
|
|
25
|
+
|
|
26
|
+
<sonic-code language="javascript">
|
|
27
|
+
<template>
|
|
28
|
+
import {Loader} from "@supersoniks/concorde/core/components/ui/loader/loader";
|
|
29
|
+
// Show
|
|
30
|
+
Loader.show({
|
|
31
|
+
mode:"fixed" // optional : fixed | inline
|
|
32
|
+
container : document.querySelector('#foo') // optional, default : parent sonic-theme || document.body
|
|
33
|
+
});
|
|
34
|
+
// Hide
|
|
35
|
+
Loader.hide();
|
|
36
|
+
</template>
|
|
37
|
+
</sonic-code>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "./loader";
|
|
2
|
+
import "../theme/theme";
|
|
3
|
+
import { html } from "lit";
|
|
4
|
+
|
|
5
|
+
// More on default export: https://storybook.js.org/docs/web-components/writing-stories/introduction#default-export
|
|
6
|
+
export default {
|
|
7
|
+
component: "sonic-loader",
|
|
8
|
+
title: "core/components/ui/Loader",
|
|
9
|
+
args: {
|
|
10
|
+
mode: "inline",
|
|
11
|
+
theme: "light",
|
|
12
|
+
},
|
|
13
|
+
argTypes: {
|
|
14
|
+
mode: { options: ["inline", "fixed"], control: { type: "select" } },
|
|
15
|
+
styles: { table: { category: "Internals or others" } },
|
|
16
|
+
loader: { table: { category: "Internals or others" } },
|
|
17
|
+
callCounter: { table: { category: "Internals or others" } },
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const Template: any = ({ mode }: { mode: string; theme: string }) => {
|
|
22
|
+
return html` <sonic-loader mode="${mode}"> </sonic-loader> `;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const Example = Template.bind({});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {html, LitElement, css} from "lit";
|
|
2
|
+
import {customElement, property} from "lit/decorators.js";
|
|
3
|
+
|
|
4
|
+
import {inline} from "@supersoniks/concorde/core/components/ui/loader/styles/inline";
|
|
5
|
+
import {fixed} from "@supersoniks/concorde/core/components/ui/loader/styles/fixed";
|
|
6
|
+
import {Theme} from "@supersoniks/concorde/core/components/ui/theme/theme";
|
|
7
|
+
export type LoaderMode = "inline" | "fixed" | "noDelay";
|
|
8
|
+
type LoaderConf = {mode?: string; container?: HTMLElement; noDelay?: boolean};
|
|
9
|
+
const tagName = "sonic-loader";
|
|
10
|
+
@customElement(tagName)
|
|
11
|
+
export class Loader extends LitElement {
|
|
12
|
+
static styles = [
|
|
13
|
+
inline,
|
|
14
|
+
fixed,
|
|
15
|
+
css`
|
|
16
|
+
:host {
|
|
17
|
+
--sc-loader-bg: var(--sc-primary, currentColor);
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.sonic-loader {
|
|
22
|
+
opacity: 0;
|
|
23
|
+
animation: showLoader 0.5s 0.5s forwards;
|
|
24
|
+
}
|
|
25
|
+
.sonic-loader--inline,
|
|
26
|
+
.sonic-loader--nodelay {
|
|
27
|
+
animation-delay: 0s;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@keyframes showLoader {
|
|
31
|
+
0% {
|
|
32
|
+
opacity: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
100% {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`,
|
|
40
|
+
];
|
|
41
|
+
static loader: Loader;
|
|
42
|
+
static callCounter = 0;
|
|
43
|
+
static show(conf?: LoaderConf) {
|
|
44
|
+
if (!Loader.loader) Loader.loader = document.createElement("sonic-loader") as Loader;
|
|
45
|
+
const loader: Loader = Loader.loader;
|
|
46
|
+
if (!conf) conf = {};
|
|
47
|
+
if (conf.mode) loader.setAttribute("mode", conf.mode);
|
|
48
|
+
if (conf.noDelay) loader.setAttribute("noDelay", "");
|
|
49
|
+
|
|
50
|
+
if (!conf.container) {
|
|
51
|
+
conf.container = Theme.getPopContainer();
|
|
52
|
+
conf.mode = "fixed";
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
conf.container.appendChild(loader);
|
|
56
|
+
Loader.callCounter++;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static hide() {
|
|
60
|
+
Loader.callCounter--;
|
|
61
|
+
if (Loader.callCounter > 0) return;
|
|
62
|
+
if (Loader.loader) Loader.loader.remove();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Mode d'affichage du loader
|
|
67
|
+
* * inline : Loader dans le contenu
|
|
68
|
+
* * fixed : Loader global par dessus la page
|
|
69
|
+
*/
|
|
70
|
+
@property({type: String}) mode: LoaderMode = "fixed";
|
|
71
|
+
@property({type: Boolean}) noDelay: boolean = false;
|
|
72
|
+
|
|
73
|
+
render() {
|
|
74
|
+
return html`<div class="sonic-loader sonic-loader--${this.mode} ${this.noDelay ? "sonic-loader--nodelay" : ""} ">
|
|
75
|
+
<div></div>
|
|
76
|
+
<div></div>
|
|
77
|
+
<div></div>
|
|
78
|
+
<div></div>
|
|
79
|
+
</div>`;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {customElement} from "lit/decorators.js";
|
|
2
|
+
import {Button} from "@supersoniks/concorde/core/components/ui/button/button";
|
|
3
|
+
const tagName = "sonic-menu-item";
|
|
4
|
+
|
|
5
|
+
@customElement(tagName)
|
|
6
|
+
export class MenuItem extends Button {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
connectedCallback() {
|
|
12
|
+
if (!this.hasAttribute("variant")) {
|
|
13
|
+
this.variant = "ghost";
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (!this.hasAttribute("type")) {
|
|
17
|
+
this.type = "primary";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (!this.hasAttribute("shape")) {
|
|
21
|
+
this.shape = "block";
|
|
22
|
+
}
|
|
23
|
+
const isSquareOrCircle = this.shape === "square" || this.shape === "circle";
|
|
24
|
+
if (!this.hasAttribute("align") && !isSquareOrCircle) {
|
|
25
|
+
this.align = "left";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
super.connectedCallback();
|
|
29
|
+
}
|
|
30
|
+
}
|