@supersoniks/concorde 2.0.7 → 3.0.1
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/concorde-core.bundle.js +387 -344
- package/concorde-core.es.js +8040 -11093
- package/index.html +44 -0
- package/notes de migration.md +21 -0
- package/package.json +23 -290
- package/scripts/postbuild.mjs +22 -0
- 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/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,288 @@
|
|
|
1
|
+
# Menu
|
|
2
|
+
|
|
3
|
+
## Direction
|
|
4
|
+
<sonic-code>
|
|
5
|
+
<template>
|
|
6
|
+
<sonic-menu direction="row" >
|
|
7
|
+
<sonic-menu-item variant="ghost">
|
|
8
|
+
<sonic-icon library="iconoir" name="arrow-right" slot="prefix"></sonic-icon>
|
|
9
|
+
Row
|
|
10
|
+
</sonic-menu-item>
|
|
11
|
+
<sonic-menu-item>
|
|
12
|
+
<sonic-icon library="iconoir" name="user" slot="prefix"></sonic-icon>
|
|
13
|
+
Profile
|
|
14
|
+
</sonic-menu-item>
|
|
15
|
+
<sonic-menu-item >
|
|
16
|
+
<sonic-icon library="iconoir" name="clock-outline" slot="prefix"></sonic-icon>
|
|
17
|
+
History
|
|
18
|
+
</sonic-menu-item>
|
|
19
|
+
<sonic-menu-item >
|
|
20
|
+
<sonic-icon library="iconoir" name="bag" slot="prefix"></sonic-icon>
|
|
21
|
+
Orders
|
|
22
|
+
</sonic-menu-item>
|
|
23
|
+
<sonic-menu-item type="danger">
|
|
24
|
+
<sonic-icon library="iconoir" name="log-out" slot="prefix"></sonic-icon>
|
|
25
|
+
Log out
|
|
26
|
+
</sonic-menu-item>
|
|
27
|
+
</sonic-menu>
|
|
28
|
+
<sonic-menu direction ="column" >
|
|
29
|
+
<sonic-menu-item variant="ghost">
|
|
30
|
+
<sonic-icon library="iconoir" name="arrow-down" slot="prefix"></sonic-icon>
|
|
31
|
+
Column
|
|
32
|
+
</sonic-menu-item>
|
|
33
|
+
<sonic-menu-item>
|
|
34
|
+
<sonic-icon library="iconoir" name="user" slot="prefix"></sonic-icon>
|
|
35
|
+
Profile
|
|
36
|
+
</sonic-menu-item>
|
|
37
|
+
<sonic-menu-item >
|
|
38
|
+
<sonic-icon library="iconoir" name="clock-outline" slot="prefix"></sonic-icon>
|
|
39
|
+
History
|
|
40
|
+
</sonic-menu-item>
|
|
41
|
+
<sonic-menu-item >
|
|
42
|
+
<sonic-icon library="iconoir" name="bag" slot="prefix"></sonic-icon>
|
|
43
|
+
Orders
|
|
44
|
+
</sonic-menu-item>
|
|
45
|
+
<sonic-menu-item type="danger">
|
|
46
|
+
<sonic-icon library="iconoir" name="log-out" slot="prefix"></sonic-icon>
|
|
47
|
+
Log out
|
|
48
|
+
</sonic-menu-item>
|
|
49
|
+
</sonic-menu>
|
|
50
|
+
</template>
|
|
51
|
+
</sonic-code>
|
|
52
|
+
|
|
53
|
+
## Size
|
|
54
|
+
<sonic-code>
|
|
55
|
+
<template>
|
|
56
|
+
<div class="grid gap-3">
|
|
57
|
+
<sonic-menu size="xs" direction="row">
|
|
58
|
+
<sonic-menu-item>
|
|
59
|
+
XS
|
|
60
|
+
</sonic-menu-item>
|
|
61
|
+
<sonic-menu-item>
|
|
62
|
+
<sonic-icon library="iconoir" name="user" slot="prefix"></sonic-icon>
|
|
63
|
+
Profile
|
|
64
|
+
</sonic-menu-item>
|
|
65
|
+
<sonic-menu-item >
|
|
66
|
+
<sonic-icon library="iconoir" name="clock-outline" slot="prefix"></sonic-icon>
|
|
67
|
+
History
|
|
68
|
+
</sonic-menu-item>
|
|
69
|
+
<sonic-menu-item >
|
|
70
|
+
<sonic-icon library="iconoir" name="bag" slot="prefix"></sonic-icon>
|
|
71
|
+
Orders
|
|
72
|
+
</sonic-menu-item>
|
|
73
|
+
</sonic-menu>
|
|
74
|
+
<sonic-menu size="sm" direction="row">
|
|
75
|
+
<sonic-menu-item>
|
|
76
|
+
Small
|
|
77
|
+
</sonic-menu-item>
|
|
78
|
+
<sonic-menu-item>
|
|
79
|
+
<sonic-icon library="iconoir" name="user" slot="prefix"></sonic-icon>
|
|
80
|
+
Profile
|
|
81
|
+
</sonic-menu-item>
|
|
82
|
+
<sonic-menu-item >
|
|
83
|
+
<sonic-icon library="iconoir" name="clock-outline" slot="prefix"></sonic-icon>
|
|
84
|
+
History
|
|
85
|
+
</sonic-menu-item>
|
|
86
|
+
<sonic-menu-item >
|
|
87
|
+
<sonic-icon library="iconoir" name="bag" slot="prefix"></sonic-icon>
|
|
88
|
+
Orders
|
|
89
|
+
</sonic-menu-item>
|
|
90
|
+
</sonic-menu>
|
|
91
|
+
<sonic-menu direction="row">
|
|
92
|
+
<sonic-menu-item>
|
|
93
|
+
Medium
|
|
94
|
+
</sonic-menu-item>
|
|
95
|
+
<sonic-menu-item>
|
|
96
|
+
<sonic-icon library="iconoir" name="user" slot="prefix"></sonic-icon>
|
|
97
|
+
Profile
|
|
98
|
+
</sonic-menu-item>
|
|
99
|
+
<sonic-menu-item >
|
|
100
|
+
<sonic-icon library="iconoir" name="clock-outline" slot="prefix"></sonic-icon>
|
|
101
|
+
History
|
|
102
|
+
</sonic-menu-item>
|
|
103
|
+
<sonic-menu-item >
|
|
104
|
+
<sonic-icon library="iconoir" name="bag" slot="prefix"></sonic-icon>
|
|
105
|
+
Orders
|
|
106
|
+
</sonic-menu-item>
|
|
107
|
+
</sonic-menu>
|
|
108
|
+
<sonic-menu size="lg" direction="row">
|
|
109
|
+
<sonic-menu-item>
|
|
110
|
+
Large
|
|
111
|
+
</sonic-menu-item>
|
|
112
|
+
<sonic-menu-item>
|
|
113
|
+
<sonic-icon library="iconoir" name="user" slot="prefix"></sonic-icon>
|
|
114
|
+
Profile
|
|
115
|
+
</sonic-menu-item>
|
|
116
|
+
<sonic-menu-item >
|
|
117
|
+
<sonic-icon library="iconoir" name="clock-outline" slot="prefix"></sonic-icon>
|
|
118
|
+
History
|
|
119
|
+
</sonic-menu-item>
|
|
120
|
+
<sonic-menu-item >
|
|
121
|
+
<sonic-icon library="iconoir" name="bag" slot="prefix"></sonic-icon>
|
|
122
|
+
Orders
|
|
123
|
+
</sonic-menu-item>
|
|
124
|
+
</sonic-menu>
|
|
125
|
+
<sonic-menu size="xl" direction="row">
|
|
126
|
+
<sonic-menu-item>
|
|
127
|
+
XL
|
|
128
|
+
</sonic-menu-item>
|
|
129
|
+
<sonic-menu-item>
|
|
130
|
+
<sonic-icon library="iconoir" name="user" slot="prefix"></sonic-icon>
|
|
131
|
+
Profile
|
|
132
|
+
</sonic-menu-item>
|
|
133
|
+
<sonic-menu-item >
|
|
134
|
+
<sonic-icon library="iconoir" name="clock-outline" slot="prefix"></sonic-icon>
|
|
135
|
+
History
|
|
136
|
+
</sonic-menu-item>
|
|
137
|
+
<sonic-menu-item >
|
|
138
|
+
<sonic-icon library="iconoir" name="bag" slot="prefix"></sonic-icon>
|
|
139
|
+
Orders
|
|
140
|
+
</sonic-menu-item>
|
|
141
|
+
</sonic-menu>
|
|
142
|
+
</div>
|
|
143
|
+
</template>
|
|
144
|
+
</sonic-code>
|
|
145
|
+
|
|
146
|
+
## Shadow
|
|
147
|
+
<sonic-code>
|
|
148
|
+
<template>
|
|
149
|
+
<div class="grid gap-3">
|
|
150
|
+
<sonic-menu direction="row">
|
|
151
|
+
<sonic-menu-item>
|
|
152
|
+
None
|
|
153
|
+
</sonic-menu-item>
|
|
154
|
+
</sonic-menu>
|
|
155
|
+
<sonic-menu shadow="sm" direction="row">
|
|
156
|
+
<sonic-menu-item>
|
|
157
|
+
Small
|
|
158
|
+
</sonic-menu-item>
|
|
159
|
+
</sonic-menu>
|
|
160
|
+
<sonic-menu shadow="md" direction="row">
|
|
161
|
+
<sonic-menu-item>
|
|
162
|
+
Medium
|
|
163
|
+
</sonic-menu-item>
|
|
164
|
+
</sonic-menu>
|
|
165
|
+
<sonic-menu shadow="lg" direction="row">
|
|
166
|
+
<sonic-menu-item>
|
|
167
|
+
Large
|
|
168
|
+
</sonic-menu-item>
|
|
169
|
+
</sonic-menu>
|
|
170
|
+
</div>
|
|
171
|
+
</template>
|
|
172
|
+
</sonic-code>
|
|
173
|
+
|
|
174
|
+
## Align
|
|
175
|
+
<sonic-code>
|
|
176
|
+
<template>
|
|
177
|
+
<sonic-menu align="center">
|
|
178
|
+
<sonic-menu-item variant="ghost">
|
|
179
|
+
<sonic-icon library="iconoir" name="home"></sonic-icon>
|
|
180
|
+
Home
|
|
181
|
+
</sonic-menu-item>
|
|
182
|
+
<sonic-menu-item>
|
|
183
|
+
<sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
184
|
+
Profile
|
|
185
|
+
</sonic-menu-item>
|
|
186
|
+
</sonic-menu>
|
|
187
|
+
<sonic-menu align="left">
|
|
188
|
+
<sonic-menu-item variant="ghost">
|
|
189
|
+
<sonic-icon library="iconoir" name="home"></sonic-icon>
|
|
190
|
+
Home
|
|
191
|
+
</sonic-menu-item>
|
|
192
|
+
<sonic-menu-item>
|
|
193
|
+
<sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
194
|
+
Profile
|
|
195
|
+
</sonic-menu-item>
|
|
196
|
+
</sonic-menu>
|
|
197
|
+
<sonic-menu align="right">
|
|
198
|
+
<sonic-menu-item variant="ghost">
|
|
199
|
+
<sonic-icon library="iconoir" name="home"></sonic-icon>
|
|
200
|
+
Home
|
|
201
|
+
</sonic-menu-item>
|
|
202
|
+
<sonic-menu-item>
|
|
203
|
+
<sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
204
|
+
Profile
|
|
205
|
+
</sonic-menu-item>
|
|
206
|
+
</sonic-menu>
|
|
207
|
+
</template>
|
|
208
|
+
</sonic-code>
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
## More
|
|
213
|
+
<sonic-code>
|
|
214
|
+
<template>
|
|
215
|
+
<sonic-menu direction="row">
|
|
216
|
+
<sonic-menu-item variant="ghost">
|
|
217
|
+
<sonic-icon library="iconoir" name="home"></sonic-icon>
|
|
218
|
+
Home
|
|
219
|
+
</sonic-menu-item>
|
|
220
|
+
<sonic-menu-item>
|
|
221
|
+
<sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
222
|
+
Profile
|
|
223
|
+
</sonic-menu-item>
|
|
224
|
+
<sonic-menu-item >
|
|
225
|
+
<sonic-icon library="iconoir" name="clock-outline" slot="prefix"></sonic-icon>
|
|
226
|
+
History
|
|
227
|
+
</sonic-menu-item>
|
|
228
|
+
<sonic-menu-item >
|
|
229
|
+
<sonic-icon library="iconoir" name="bag" slot="prefix"></sonic-icon>
|
|
230
|
+
Orders
|
|
231
|
+
</sonic-menu-item>
|
|
232
|
+
<sonic-menu slot="more">
|
|
233
|
+
<sonic-menu-item >
|
|
234
|
+
<sonic-icon library="iconoir" name="settings" slot="prefix"></sonic-icon>
|
|
235
|
+
Settings
|
|
236
|
+
</sonic-menu-item>
|
|
237
|
+
<sonic-menu-item >
|
|
238
|
+
<sonic-icon library="iconoir" name="chat-bubble" slot="prefix"></sonic-icon>
|
|
239
|
+
Messages
|
|
240
|
+
</sonic-menu-item>
|
|
241
|
+
<sonic-divider></sonic-divider>
|
|
242
|
+
<sonic-menu-item type="danger">
|
|
243
|
+
<sonic-icon library="iconoir" name="log-out" slot="prefix"></sonic-icon>
|
|
244
|
+
Log out
|
|
245
|
+
</sonic-menu-item>
|
|
246
|
+
</sonic-menu>
|
|
247
|
+
</sonic-menu>
|
|
248
|
+
</template>
|
|
249
|
+
</sonic-code>
|
|
250
|
+
|
|
251
|
+
## Scrollable
|
|
252
|
+
<sonic-code>
|
|
253
|
+
<template>
|
|
254
|
+
<sonic-menu direction="row" scrollable>
|
|
255
|
+
<sonic-menu-item variant="ghost">
|
|
256
|
+
<sonic-icon library="iconoir" name="home" slot="prefix"></sonic-icon>
|
|
257
|
+
Home
|
|
258
|
+
</sonic-menu-item>
|
|
259
|
+
<sonic-menu-item>
|
|
260
|
+
<sonic-icon library="iconoir" name="user" slot="prefix"></sonic-icon>
|
|
261
|
+
Profile
|
|
262
|
+
</sonic-menu-item>
|
|
263
|
+
<sonic-menu-item >
|
|
264
|
+
<sonic-icon library="iconoir" name="clock-outline" slot="prefix"></sonic-icon>
|
|
265
|
+
History
|
|
266
|
+
</sonic-menu-item>
|
|
267
|
+
<sonic-menu-item >
|
|
268
|
+
<sonic-icon library="iconoir" name="bag" slot="prefix"></sonic-icon>
|
|
269
|
+
Orders
|
|
270
|
+
</sonic-menu-item>
|
|
271
|
+
<sonic-menu-item >
|
|
272
|
+
<sonic-icon library="iconoir" name="settings" slot="prefix"></sonic-icon>
|
|
273
|
+
Settings
|
|
274
|
+
</sonic-menu-item>
|
|
275
|
+
<sonic-menu-item >
|
|
276
|
+
<sonic-icon library="iconoir" name="chat-bubble" slot="prefix"></sonic-icon>
|
|
277
|
+
Messages
|
|
278
|
+
</sonic-menu-item>
|
|
279
|
+
<sonic-menu-item type="danger">
|
|
280
|
+
<sonic-icon library="iconoir" name="log-out" slot="prefix"></sonic-icon>
|
|
281
|
+
Log out
|
|
282
|
+
</sonic-menu-item>
|
|
283
|
+
</sonic-menu>
|
|
284
|
+
</template>
|
|
285
|
+
</sonic-code>
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import {html, LitElement, css, PropertyValues} from "lit";
|
|
2
|
+
import {styleMap} from "lit/directives/style-map.js";
|
|
3
|
+
import {customElement, property, queryAssignedElements, state, query} from "lit/decorators.js";
|
|
4
|
+
import "@supersoniks/concorde/core/components/ui/menu/menu-item";
|
|
5
|
+
const tagName = "sonic-menu";
|
|
6
|
+
|
|
7
|
+
@customElement(tagName)
|
|
8
|
+
export class MenuItems extends LitElement {
|
|
9
|
+
static styles = [
|
|
10
|
+
css`
|
|
11
|
+
:host {
|
|
12
|
+
display: block;
|
|
13
|
+
--sc-menu-gap: 0.15rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:host > menu {
|
|
17
|
+
display: flex;
|
|
18
|
+
border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0.35em;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.hidden {
|
|
24
|
+
display: none !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/*OMBRE*/
|
|
28
|
+
:host([shadow]) .shadowable,
|
|
29
|
+
:host([shadow="md"]) .shadowable,
|
|
30
|
+
:host([shadow="true"]) .shadowable {
|
|
31
|
+
box-shadow: var(--sc-shadow);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([shadow="sm"]) .shadowable {
|
|
35
|
+
box-shadow: var(--sc-shadow-sm);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host([shadow="lg"]) .shadowable {
|
|
39
|
+
box-shadow: var(--sc-shadow-lg);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([shadow="none"]) .shadowable {
|
|
43
|
+
box-shadow: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* SCROLLABLE*/
|
|
47
|
+
:host([scrollable]) {
|
|
48
|
+
scrollbar-width: none;
|
|
49
|
+
-ms-overflow-style: none;
|
|
50
|
+
}
|
|
51
|
+
:host([scrollable]) menu > * {
|
|
52
|
+
scroll-snap-align: start;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
}
|
|
55
|
+
:host([scrollable][direction="row"]) {
|
|
56
|
+
overflow-x: scroll;
|
|
57
|
+
scroll-snap-type: x mandatory;
|
|
58
|
+
}
|
|
59
|
+
:host([scrollable][direction="column"]) {
|
|
60
|
+
overflow-y: scroll;
|
|
61
|
+
scroll-snap-type: y mandatory;
|
|
62
|
+
}
|
|
63
|
+
:host([scrollable])::-webkit-scrollbar {
|
|
64
|
+
display: none !important;
|
|
65
|
+
}
|
|
66
|
+
:host([scrollable][direction="row"].shadow-right) {
|
|
67
|
+
-webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
|
|
68
|
+
mask-image: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
|
|
69
|
+
}
|
|
70
|
+
:host([scrollable][direction="row"].shadow-left) {
|
|
71
|
+
-webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
|
|
72
|
+
mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
|
|
73
|
+
}
|
|
74
|
+
:host([scrollable][direction="row"].shadow-left.shadow-right) {
|
|
75
|
+
-webkit-mask-image: linear-gradient(
|
|
76
|
+
to right,
|
|
77
|
+
rgba(0, 0, 0, 0) 0%,
|
|
78
|
+
rgba(0, 0, 0, 1) 10%,
|
|
79
|
+
rgba(0, 0, 0, 1) 90%,
|
|
80
|
+
rgba(0, 0, 0, 0) 100%
|
|
81
|
+
);
|
|
82
|
+
mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0) 100%);
|
|
83
|
+
}
|
|
84
|
+
:host([scrollable][direction="column"].shadow-top) {
|
|
85
|
+
-webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
|
|
86
|
+
mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
|
|
87
|
+
}
|
|
88
|
+
:host([scrollable][direction="column"].shadow-bottom) {
|
|
89
|
+
-webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
|
|
90
|
+
mask-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
|
|
91
|
+
}
|
|
92
|
+
:host([scrollable][direction="column"].shadow-top.shadow-bottom) {
|
|
93
|
+
-webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0) 100%);
|
|
94
|
+
mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0) 100%);
|
|
95
|
+
}
|
|
96
|
+
`,
|
|
97
|
+
];
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Taille du composant, peut avoir un effet sur ses composants enfants
|
|
101
|
+
* tels que les dividers / boutons,... qui n'auraient pas d'attribut size précisés.
|
|
102
|
+
*/
|
|
103
|
+
@property({type: String, reflect: true}) size: "" | "xs" | "sm" | "lg" = "";
|
|
104
|
+
/**
|
|
105
|
+
* Direction
|
|
106
|
+
*/
|
|
107
|
+
@property({type: String, reflect: true}) direction: "row" | "column" = "column";
|
|
108
|
+
@property({type: String}) gap = "var(--sc-menu-gap)";
|
|
109
|
+
|
|
110
|
+
@property({type: String, reflect: true}) align: "center" | "left" | "right" = "left";
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Ombre
|
|
114
|
+
*/
|
|
115
|
+
@property({type: String, reflect: true}) shadow: "" | "sm" | "md" | "lg" | "xl" | "none" | null = null;
|
|
116
|
+
|
|
117
|
+
@property({type: String}) moreShape: "square" | "circle" = "circle";
|
|
118
|
+
@property({type: Boolean}) scrollable = false;
|
|
119
|
+
|
|
120
|
+
observer: ResizeObserver | null = null;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Propriété min-width du bouton
|
|
124
|
+
*/
|
|
125
|
+
@property({type: String}) minWidth = "0";
|
|
126
|
+
|
|
127
|
+
@query("menu") menu!: HTMLElement;
|
|
128
|
+
|
|
129
|
+
@queryAssignedElements({selector: "sonic-menu-item"})
|
|
130
|
+
menuChildren!: Array<HTMLElement>;
|
|
131
|
+
|
|
132
|
+
@queryAssignedElements({slot: "more", selector: "*"})
|
|
133
|
+
moreElements!: Array<HTMLElement>;
|
|
134
|
+
@state() hasMoreElements = false;
|
|
135
|
+
|
|
136
|
+
checkIfMore() {
|
|
137
|
+
this.hasMoreElements = !!this.moreElements?.length;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
updated(_changedProperties: PropertyValues): void {
|
|
141
|
+
const moreBtn = this.querySelector(".more-btn");
|
|
142
|
+
if (this.size && moreBtn) {
|
|
143
|
+
moreBtn.setAttribute("size", this.size);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const dividers = this.querySelectorAll("sonic-divider");
|
|
147
|
+
|
|
148
|
+
dividers.forEach((elt) => {
|
|
149
|
+
if (!elt.hasAttribute("size")) {
|
|
150
|
+
elt.setAttribute("size", "xs");
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
super.updated(_changedProperties);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
mainSlotChange() {
|
|
158
|
+
this.setChildrenSize(this.menuChildren);
|
|
159
|
+
this.updateIsScollable();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
connectedCallback(): void {
|
|
163
|
+
this.observer = new ResizeObserver(this.updateIsScollable);
|
|
164
|
+
// observe if menu elements are overflowing and initiate scrollable
|
|
165
|
+
this.observer.observe(this);
|
|
166
|
+
super.connectedCallback();
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
disconnectedCallback(): void {
|
|
170
|
+
this.observer?.disconnect();
|
|
171
|
+
super.disconnectedCallback();
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
updateIsScollable = () => {
|
|
175
|
+
if (this.scrollable) {
|
|
176
|
+
this.initScrollable();
|
|
177
|
+
this.setScrollShadow(this, this.direction);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
initScrollable(): void {
|
|
182
|
+
let isDown = false;
|
|
183
|
+
let startX: number;
|
|
184
|
+
let scrollLeft: number;
|
|
185
|
+
|
|
186
|
+
if (this.scrollable) {
|
|
187
|
+
this.addEventListener("mousedown", (e) => {
|
|
188
|
+
isDown = true;
|
|
189
|
+
this.classList.add("active");
|
|
190
|
+
startX = e.pageX - this.offsetLeft;
|
|
191
|
+
scrollLeft = this.scrollLeft;
|
|
192
|
+
});
|
|
193
|
+
this.addEventListener("mouseleave", () => {
|
|
194
|
+
isDown = false;
|
|
195
|
+
this.classList.remove("active");
|
|
196
|
+
});
|
|
197
|
+
this.addEventListener("mouseup", () => {
|
|
198
|
+
isDown = false;
|
|
199
|
+
this.classList.remove("active");
|
|
200
|
+
});
|
|
201
|
+
this.addEventListener("mousemove", (e) => {
|
|
202
|
+
if (!isDown) return;
|
|
203
|
+
e.preventDefault();
|
|
204
|
+
const x = e.pageX - this.offsetLeft;
|
|
205
|
+
const walk = (x - startX) * 1.5; //scroll-fast
|
|
206
|
+
this.scrollLeft = scrollLeft - walk;
|
|
207
|
+
this.setScrollShadow(this, this.direction);
|
|
208
|
+
});
|
|
209
|
+
this.addEventListener("scroll", (e) => {
|
|
210
|
+
e.preventDefault();
|
|
211
|
+
// const delta = Math.sign(e.deltaY);
|
|
212
|
+
// this.scrollLeft += delta * 50;
|
|
213
|
+
this.setScrollShadow(this, this.direction);
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
setScrollShadow(target: HTMLElement, direction: string): void {
|
|
219
|
+
if (direction == "row") {
|
|
220
|
+
if (target.scrollLeft > 0) {
|
|
221
|
+
this.classList.add("shadow-left");
|
|
222
|
+
} else {
|
|
223
|
+
this.classList.remove("shadow-left");
|
|
224
|
+
}
|
|
225
|
+
if (target.scrollLeft < target.scrollWidth - target.offsetWidth) {
|
|
226
|
+
this.classList.add("shadow-right");
|
|
227
|
+
} else {
|
|
228
|
+
this.classList.remove("shadow-right");
|
|
229
|
+
}
|
|
230
|
+
} else if (direction == "column") {
|
|
231
|
+
if (target.scrollTop > 0) {
|
|
232
|
+
this.classList.add("shadow-top");
|
|
233
|
+
} else {
|
|
234
|
+
this.classList.remove("shadow-top");
|
|
235
|
+
}
|
|
236
|
+
if (target.scrollTop < target.scrollHeight - (target.offsetHeight + 1)) {
|
|
237
|
+
this.classList.add("shadow-bottom");
|
|
238
|
+
} else {
|
|
239
|
+
this.classList.remove("shadow-bottom");
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
setChildrenSize(menuItems: Array<HTMLElement>) {
|
|
245
|
+
menuItems.forEach((elt) => {
|
|
246
|
+
if (this.size) {
|
|
247
|
+
elt.setAttribute("size", this.size);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (this.align) {
|
|
251
|
+
if (elt.getAttribute("shape") != "square" && elt.getAttribute("shape") != "circle") {
|
|
252
|
+
elt.setAttribute("align", this.align);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (this.direction == "row") {
|
|
257
|
+
if (elt.getAttribute("shape") == "block") {
|
|
258
|
+
elt.setAttribute("shape", "default");
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
render() {
|
|
265
|
+
const menuStyles = {
|
|
266
|
+
minWidth: this.minWidth,
|
|
267
|
+
flexDirection: this.direction,
|
|
268
|
+
gap: this.gap,
|
|
269
|
+
};
|
|
270
|
+
const isMenuRow = this.direction == "row";
|
|
271
|
+
|
|
272
|
+
const popStyles = {
|
|
273
|
+
display: "block",
|
|
274
|
+
alignSelf: isMenuRow ? "center" : "flex-start",
|
|
275
|
+
justifySelf: "center",
|
|
276
|
+
flexDirection: this.direction,
|
|
277
|
+
};
|
|
278
|
+
const popBtnStyles = {
|
|
279
|
+
marginLeft: isMenuRow ? "" : ".55em",
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
return html`<menu part="menu" class="shadowable" style=${styleMap(menuStyles)}>
|
|
283
|
+
<slot @slotchange=${this.mainSlotChange}></slot>
|
|
284
|
+
<sonic-pop style=${styleMap(popStyles)} class=${!this.hasMoreElements ? "hidden" : ""}>
|
|
285
|
+
<sonic-menu-item style=${styleMap(popBtnStyles)} class="more-btn" shape=${this.moreShape} align="center">
|
|
286
|
+
<sonic-icon size="xl" name=${isMenuRow ? "more-vert" : "more-horiz"}></sonic-icon>
|
|
287
|
+
</sonic-menu-item>
|
|
288
|
+
<slot name="more" @slotchange=${this.checkIfMore} slot="content"></slot>
|
|
289
|
+
</sonic-pop>
|
|
290
|
+
</menu>`;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {html, LitElement, css} from "lit";
|
|
2
|
+
import {customElement, queryAssignedElements} from "lit/decorators.js";
|
|
3
|
+
import {Modal} from "@supersoniks/concorde/core/components/ui/modal/modal";
|
|
4
|
+
const tagName = "sonic-modal-actions";
|
|
5
|
+
@customElement(tagName)
|
|
6
|
+
export class ModalActions extends LitElement {
|
|
7
|
+
static styles = [
|
|
8
|
+
css`
|
|
9
|
+
:host {
|
|
10
|
+
display: flex;
|
|
11
|
+
gap: 0.5rem;
|
|
12
|
+
margin-top: auto;
|
|
13
|
+
padding-top: 1.5rem;
|
|
14
|
+
}
|
|
15
|
+
`,
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
@queryAssignedElements({selector: "sonic-button"})
|
|
19
|
+
buttons!: Array<HTMLElement>;
|
|
20
|
+
|
|
21
|
+
firstUpdated(changedProperties: Map<string | number | symbol, unknown>) {
|
|
22
|
+
this.buttons?.forEach((btn) => {
|
|
23
|
+
btn.addEventListener("click", () => {
|
|
24
|
+
if (btn.getAttribute("hideModal") != "false") {
|
|
25
|
+
const parentModal = this.closest("sonic-modal") as Modal;
|
|
26
|
+
parentModal?.hide();
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
super.firstUpdated(changedProperties);
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
return html`<slot></slot>`;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {html, LitElement, css} from "lit";
|
|
2
|
+
import {customElement, property} from "lit/decorators.js";
|
|
3
|
+
import {Modal} from "@supersoniks/concorde/core/components/ui/modal/modal";
|
|
4
|
+
import {ifDefined} from "lit/directives/if-defined.js";
|
|
5
|
+
import HTML from "@supersoniks/concorde/core/utils/HTML";
|
|
6
|
+
const tagName = "sonic-modal-close";
|
|
7
|
+
|
|
8
|
+
@customElement(tagName)
|
|
9
|
+
export class ModalClose extends LitElement {
|
|
10
|
+
static styles = [
|
|
11
|
+
css`
|
|
12
|
+
:host {
|
|
13
|
+
position: sticky;
|
|
14
|
+
display: block;
|
|
15
|
+
align-self: flex-end;
|
|
16
|
+
height: 0;
|
|
17
|
+
top: 0.5rem;
|
|
18
|
+
right: 0.5rem;
|
|
19
|
+
transform: translate3d(calc(var(--sc-modal-px)), calc(-1 * var(--sc-modal-py)), 0);
|
|
20
|
+
z-index: 20;
|
|
21
|
+
}
|
|
22
|
+
`,
|
|
23
|
+
];
|
|
24
|
+
@property() reset?: string;
|
|
25
|
+
|
|
26
|
+
render() {
|
|
27
|
+
return html`<sonic-button reset=${ifDefined(this.reset)} shape="circle" @click=${this.handleClick}
|
|
28
|
+
><sonic-icon name="cancel" size="lg"></sonic-icon
|
|
29
|
+
></sonic-button>`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
handleClick() {
|
|
33
|
+
const parentModal = HTML.getClosestElement(this, "sonic-modal") as Modal;
|
|
34
|
+
parentModal.hide();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {html, LitElement, css} from "lit";
|
|
2
|
+
import {customElement} from "lit/decorators.js";
|
|
3
|
+
const tagName = "sonic-modal-content";
|
|
4
|
+
|
|
5
|
+
@customElement(tagName)
|
|
6
|
+
export class ModalContent extends LitElement {
|
|
7
|
+
static styles = [
|
|
8
|
+
css`
|
|
9
|
+
:host {
|
|
10
|
+
display: block;
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
`,
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
render() {
|
|
17
|
+
return html`<slot></slot>`;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {html, LitElement, css} from "lit";
|
|
2
|
+
import {customElement} from "lit/decorators.js";
|
|
3
|
+
const tagName = "sonic-modal-subtitle";
|
|
4
|
+
|
|
5
|
+
@customElement(tagName)
|
|
6
|
+
export class ModalSubTitle extends LitElement {
|
|
7
|
+
static styles = [
|
|
8
|
+
css`
|
|
9
|
+
:host {
|
|
10
|
+
font-size: 1.1rem;
|
|
11
|
+
display: block;
|
|
12
|
+
line-height: 1.1rem;
|
|
13
|
+
line-height: var(--sc-headings-line-height);
|
|
14
|
+
font-family: var(--sc-headings-font-family);
|
|
15
|
+
font-weight: var(--sc-headings-font-weight);
|
|
16
|
+
}
|
|
17
|
+
`,
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
render() {
|
|
21
|
+
return html`<slot></slot>`;
|
|
22
|
+
}
|
|
23
|
+
}
|