@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.
Files changed (407) hide show
  1. package/build-infos.json +1 -0
  2. package/concorde-core.bundle.js +387 -344
  3. package/concorde-core.es.js +8040 -11093
  4. package/index.html +44 -0
  5. package/notes de migration.md +21 -0
  6. package/package.json +23 -290
  7. package/scripts/postbuild.mjs +22 -0
  8. package/scripts/prebuild.mjs +22 -0
  9. package/{components.js → src/components.ts} +5 -2
  10. package/src/concorde-loaded.ts +3 -0
  11. package/src/core/_types/types.ts +55 -0
  12. package/src/core/components/functional/date/date.md +290 -0
  13. package/src/core/components/functional/date/date.ts +206 -0
  14. package/src/core/components/functional/example/example.ts +11 -0
  15. package/src/core/components/functional/fetch/fetch.md +117 -0
  16. package/{core/components/functional/fetch/fetch.js → src/core/components/functional/fetch/fetch.ts} +33 -37
  17. package/src/core/components/functional/if/if.md +16 -0
  18. package/src/core/components/functional/if/if.test.ts +40 -0
  19. package/src/core/components/functional/if/if.ts +23 -0
  20. package/src/core/components/functional/list/list.md +194 -0
  21. package/src/core/components/functional/list/list.ts +236 -0
  22. package/src/core/components/functional/mix/mix.md +41 -0
  23. package/src/core/components/functional/mix/mix.ts +95 -0
  24. package/src/core/components/functional/queue/queue.md +87 -0
  25. package/src/core/components/functional/queue/queue.ts +279 -0
  26. package/src/core/components/functional/router/redirect.ts +44 -0
  27. package/src/core/components/functional/router/router.md +112 -0
  28. package/src/core/components/functional/router/router.ts +108 -0
  29. package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +229 -0
  30. package/{core → src/core}/components/functional/sdui/default-library.json +13 -13
  31. package/src/core/components/functional/sdui/example.json +99 -0
  32. package/src/core/components/functional/sdui/sdui-utils.ts +62 -0
  33. package/src/core/components/functional/sdui/sdui.md +356 -0
  34. package/src/core/components/functional/sdui/sdui.ts +230 -0
  35. package/src/core/components/functional/sdui/types.ts +34 -0
  36. package/src/core/components/functional/sonic-scope/sonic-scope.ts +13 -0
  37. package/src/core/components/functional/states/states.md +87 -0
  38. package/src/core/components/functional/states/states.ts +121 -0
  39. package/src/core/components/functional/submit/submit.md +48 -0
  40. package/src/core/components/functional/submit/submit.ts +265 -0
  41. package/src/core/components/functional/subscriber/subscriber.md +91 -0
  42. package/src/core/components/functional/subscriber/subscriber.ts +28 -0
  43. package/src/core/components/functional/value/value.md +35 -0
  44. package/src/core/components/functional/value/value.ts +18 -0
  45. package/{core/components/ui/_css/scroll.js → src/core/components/ui/_css/scroll.ts} +3 -2
  46. package/{core/components/ui/_css/size.js → src/core/components/ui/_css/size.ts} +5 -2
  47. package/{core/components/ui/_css/type.js → src/core/components/ui/_css/type.ts} +5 -3
  48. package/src/core/components/ui/alert/alert.md +121 -0
  49. package/src/core/components/ui/alert/alert.ts +177 -0
  50. package/src/core/components/ui/badge/badge.md +102 -0
  51. package/{core/components/ui/badge/badge.js → src/core/components/ui/badge/badge.ts} +36 -51
  52. package/src/core/components/ui/button/button.md +184 -0
  53. package/{core/components/ui/button/button.js → src/core/components/ui/button/button.ts} +258 -302
  54. package/src/core/components/ui/captcha/captcha.md +12 -0
  55. package/src/core/components/ui/captcha/captcha.ts +88 -0
  56. package/src/core/components/ui/card/card-footer.ts +19 -0
  57. package/src/core/components/ui/card/card-header-descripton.ts +24 -0
  58. package/{core/components/ui/card/card-header.js → src/core/components/ui/card/card-header.ts} +28 -38
  59. package/src/core/components/ui/card/card-main.ts +24 -0
  60. package/src/core/components/ui/card/card.md +96 -0
  61. package/{core/components/ui/card/card.js → src/core/components/ui/card/card.ts} +23 -34
  62. package/src/core/components/ui/divider/divider.md +35 -0
  63. package/{core/components/ui/divider/divider.js → src/core/components/ui/divider/divider.ts} +35 -65
  64. package/src/core/components/ui/form/checkbox/checkbox.md +96 -0
  65. package/{core/components/ui/form/checkbox/checkbox.js → src/core/components/ui/form/checkbox/checkbox.ts} +79 -98
  66. package/{core/components/ui/form/css/form-control.js → src/core/components/ui/form/css/form-control.ts} +9 -5
  67. package/src/core/components/ui/form/fieldset/fieldset.md +129 -0
  68. package/src/core/components/ui/form/fieldset/fieldset.ts +96 -0
  69. package/src/core/components/ui/form/fieldset/legend-description.ts +23 -0
  70. package/src/core/components/ui/form/fieldset/legend.ts +90 -0
  71. package/src/core/components/ui/form/form-actions/form-actions.md +77 -0
  72. package/src/core/components/ui/form/form-actions/form-actions.ts +32 -0
  73. package/src/core/components/ui/form/form-layout/form-layout.md +43 -0
  74. package/src/core/components/ui/form/form-layout/form-layout.ts +71 -0
  75. package/src/core/components/ui/form/input/input.md +168 -0
  76. package/src/core/components/ui/form/input/input.ts +227 -0
  77. package/src/core/components/ui/form/input/password-helper.ts +68 -0
  78. package/src/core/components/ui/form/input/same-value-helper.ts +48 -0
  79. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +130 -0
  80. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +285 -0
  81. package/src/core/components/ui/form/radio/radio.md +86 -0
  82. package/src/core/components/ui/form/radio/radio.ts +44 -0
  83. package/src/core/components/ui/form/select/select.md +99 -0
  84. package/src/core/components/ui/form/select/select.ts +310 -0
  85. package/src/core/components/ui/form/textarea/textarea.md +66 -0
  86. package/src/core/components/ui/form/textarea/textarea.ts +119 -0
  87. package/src/core/components/ui/group/group.md +75 -0
  88. package/src/core/components/ui/group/group.ts +101 -0
  89. package/src/core/components/ui/icon/icon.md +125 -0
  90. package/src/core/components/ui/icon/icon.stories.ts +100 -0
  91. package/src/core/components/ui/icon/icon.ts +106 -0
  92. package/src/core/components/ui/icon/icons.json +1 -0
  93. package/src/core/components/ui/icon/icons.ts +130 -0
  94. package/src/core/components/ui/icon/svgs/cancel.svg +3 -0
  95. package/src/core/components/ui/icon/svgs/check-circled-outline.svg +4 -0
  96. package/src/core/components/ui/icon/svgs/check.svg +3 -0
  97. package/src/core/components/ui/icon/svgs/emoji-puzzled.svg +1 -0
  98. package/src/core/components/ui/icon/svgs/info-empty.svg +5 -0
  99. package/src/core/components/ui/icon/svgs/loader.svg +1 -0
  100. package/src/core/components/ui/icon/svgs/minus-small.svg +3 -0
  101. package/src/core/components/ui/icon/svgs/more-horiz.svg +5 -0
  102. package/src/core/components/ui/icon/svgs/more-vert.svg +5 -0
  103. package/src/core/components/ui/icon/svgs/nav-arrow-down.svg +3 -0
  104. package/src/core/components/ui/icon/svgs/warning-circled-outline.svg +5 -0
  105. package/src/core/components/ui/image/image.md +107 -0
  106. package/src/core/components/ui/image/image.ts +117 -0
  107. package/src/core/components/ui/link/link.md +43 -0
  108. package/src/core/components/ui/link/link.ts +108 -0
  109. package/src/core/components/ui/loader/loader.md +37 -0
  110. package/src/core/components/ui/loader/loader.stories.ts +25 -0
  111. package/src/core/components/ui/loader/loader.ts +81 -0
  112. package/{core/components/ui/loader/styles/fixed.js → src/core/components/ui/loader/styles/fixed.ts} +2 -1
  113. package/{core/components/ui/loader/styles/inline.js → src/core/components/ui/loader/styles/inline.ts} +3 -2
  114. package/src/core/components/ui/menu/menu-item.ts +30 -0
  115. package/src/core/components/ui/menu/menu.md +288 -0
  116. package/src/core/components/ui/menu/menu.ts +292 -0
  117. package/src/core/components/ui/modal/modal-actions.ts +35 -0
  118. package/src/core/components/ui/modal/modal-close.ts +36 -0
  119. package/src/core/components/ui/modal/modal-content.ts +19 -0
  120. package/src/core/components/ui/modal/modal-subtitle.ts +23 -0
  121. package/src/core/components/ui/modal/modal-title.ts +22 -0
  122. package/src/core/components/ui/modal/modal.md +123 -0
  123. package/src/core/components/ui/modal/modal.stories.ts +140 -0
  124. package/src/core/components/ui/modal/modal.ts +386 -0
  125. package/src/core/components/ui/pop/pop.md +79 -0
  126. package/src/core/components/ui/pop/pop.ts +291 -0
  127. package/src/core/components/ui/progress/progress.md +65 -0
  128. package/{core/components/ui/progress/progress.js → src/core/components/ui/progress/progress.ts} +31 -50
  129. package/src/core/components/ui/table/table-caption.ts +21 -0
  130. package/src/core/components/ui/table/table-tbody.ts +32 -0
  131. package/src/core/components/ui/table/table-td.ts +47 -0
  132. package/src/core/components/ui/table/table-tfoot.ts +20 -0
  133. package/src/core/components/ui/table/table-th.ts +56 -0
  134. package/src/core/components/ui/table/table-thead.ts +18 -0
  135. package/src/core/components/ui/table/table-tr.ts +48 -0
  136. package/src/core/components/ui/table/table.md +467 -0
  137. package/{core/components/ui/table/table.js → src/core/components/ui/table/table.ts} +32 -53
  138. package/{core/components/ui/theme/theme-collection/core-variables.js → src/core/components/ui/theme/theme-collection/core-variables.ts} +3 -2
  139. package/{core/components/ui/theme/theme-collection/dark.js → src/core/components/ui/theme/theme-collection/dark.ts} +5 -3
  140. package/{core/components/ui/theme/theme-collection/light.js → src/core/components/ui/theme/theme-collection/light.ts} +3 -2
  141. package/src/core/components/ui/theme/theme.ts +118 -0
  142. package/src/core/components/ui/toast/message-subscriber.stories.ts +43 -0
  143. package/src/core/components/ui/toast/message-subscriber.ts +37 -0
  144. package/{core/components/ui/toast/toast-item.js → src/core/components/ui/toast/toast-item.ts} +86 -113
  145. package/src/core/components/ui/toast/toast.ts +237 -0
  146. package/src/core/components/ui/toast/types.ts +14 -0
  147. package/src/core/components/ui/tooltip/tooltip.md +37 -0
  148. package/{core/components/ui/tooltip/tooltip.js → src/core/components/ui/tooltip/tooltip.ts} +26 -47
  149. package/{core/components/ui/ui.js → src/core/components/ui/ui.ts} +2 -0
  150. package/src/core/core.ts +22 -0
  151. package/src/core/decorators/Subscriber.ts +187 -0
  152. package/src/core/directives/DataProvider.ts +113 -0
  153. package/src/core/directives/Wording.ts +220 -0
  154. package/src/core/mixins/Fetcher.ts +258 -0
  155. package/src/core/mixins/FormCheckable.ts +287 -0
  156. package/src/core/mixins/FormElement.ts +275 -0
  157. package/src/core/mixins/FormInput.ts +135 -0
  158. package/src/core/mixins/Subscriber.ts +352 -0
  159. package/src/core/mixins/TemplatesContainer.ts +70 -0
  160. package/{core/mixins/mixins.d.ts → src/core/mixins/mixins.ts} +1 -1
  161. package/src/core/utils/Arrays.ts +161 -0
  162. package/src/core/utils/DataBindObserver.ts +286 -0
  163. package/src/core/utils/Electron.ts +15 -0
  164. package/src/core/utils/Format.ts +58 -0
  165. package/src/core/utils/HTML.ts +126 -0
  166. package/src/core/utils/LocationHandler.ts +139 -0
  167. package/src/core/utils/Objects.ts +103 -0
  168. package/src/core/utils/PublisherProxy.ts +786 -0
  169. package/src/core/utils/Utils.ts +12 -0
  170. package/src/core/utils/api.ts +456 -0
  171. package/{core/utils/url-pattern.d.ts → src/core/utils/url-pattern.ts} +1 -0
  172. package/{decorators.js → src/decorators.ts} +6 -2
  173. package/{directives.js → src/directives.ts} +11 -6
  174. package/src/docs/_core-concept/overview.md +57 -0
  175. package/src/docs/_core-concept/subscriber.md +76 -0
  176. package/src/docs/_getting-started/concorde-outside.md +141 -0
  177. package/src/docs/_getting-started/create-a-component.md +137 -0
  178. package/src/docs/_getting-started/pubsub.md +150 -0
  179. package/src/docs/_getting-started/start.md +37 -0
  180. package/src/docs/_getting-started/theming.md +91 -0
  181. package/src/docs/code.ts +281 -0
  182. package/src/docs/docs.ts +6 -0
  183. package/src/docs/example/users.ts +64 -0
  184. package/src/docs/navigation/navigation.ts +101 -0
  185. package/src/docs/prism/index.ts +6 -0
  186. package/src/docs/prism/prism.css +158 -0
  187. package/src/docs/prism/prism.js +1022 -0
  188. package/src/docs/search/docs-search.json +3767 -0
  189. package/src/docs/search/markdown-renderer.ts +40 -0
  190. package/src/docs/search/page.ts +40 -0
  191. package/src/docs/search/search.ts +184 -0
  192. package/src/docs.ts +2 -0
  193. package/src/index.ts +7 -0
  194. package/{mixins.js → src/mixins.ts} +10 -6
  195. package/src/tag-list.json +1 -0
  196. package/src/test-utils/TestUtils.ts +13 -0
  197. package/src/tsconfig.json +113 -0
  198. package/{utils.js → src/utils.ts} +15 -11
  199. package/test-utils/TestUtils.ts +13 -0
  200. package/vite/config.js +136 -0
  201. package/vite.config.mts +87 -0
  202. package/README.md +0 -27
  203. package/cli.js +0 -75
  204. package/components.d.ts +0 -4
  205. package/core/_types/types.d.ts +0 -28
  206. package/core/_types/types.js +0 -2
  207. package/core/components/functional/date/date.d.ts +0 -45
  208. package/core/components/functional/date/date.js +0 -243
  209. package/core/components/functional/example/example.d.ts +0 -7
  210. package/core/components/functional/example/example.js +0 -26
  211. package/core/components/functional/fetch/fetch.d.ts +0 -93
  212. package/core/components/functional/functional.js +0 -15
  213. package/core/components/functional/if/if.d.ts +0 -12
  214. package/core/components/functional/if/if.js +0 -38
  215. package/core/components/functional/if/if.test.d.ts +0 -1
  216. package/core/components/functional/if/if.test.js +0 -35
  217. package/core/components/functional/list/list.d.ts +0 -117
  218. package/core/components/functional/list/list.js +0 -214
  219. package/core/components/functional/mix/mix.d.ts +0 -22
  220. package/core/components/functional/mix/mix.js +0 -102
  221. package/core/components/functional/queue/queue.d.ts +0 -67
  222. package/core/components/functional/queue/queue.js +0 -310
  223. package/core/components/functional/router/redirect.d.ts +0 -18
  224. package/core/components/functional/router/redirect.js +0 -53
  225. package/core/components/functional/router/router.d.ts +0 -27
  226. package/core/components/functional/router/router.js +0 -119
  227. package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +0 -58
  228. package/core/components/functional/sdui/SDUIDescriptorTransformer.js +0 -215
  229. package/core/components/functional/sdui/sdui-utils.d.ts +0 -5
  230. package/core/components/functional/sdui/sdui-utils.js +0 -63
  231. package/core/components/functional/sdui/sdui.d.ts +0 -136
  232. package/core/components/functional/sdui/sdui.js +0 -254
  233. package/core/components/functional/sdui/types.d.ts +0 -37
  234. package/core/components/functional/sdui/types.js +0 -1
  235. package/core/components/functional/sonic-scope/sonic-scope.d.ts +0 -5
  236. package/core/components/functional/sonic-scope/sonic-scope.js +0 -21
  237. package/core/components/functional/states/states.d.ts +0 -29
  238. package/core/components/functional/states/states.js +0 -134
  239. package/core/components/functional/submit/submit.d.ts +0 -30
  240. package/core/components/functional/submit/submit.js +0 -236
  241. package/core/components/functional/subscriber/subscriber.d.ts +0 -12
  242. package/core/components/functional/subscriber/subscriber.js +0 -38
  243. package/core/components/functional/value/value.d.ts +0 -7
  244. package/core/components/functional/value/value.js +0 -27
  245. package/core/components/ui/_css/scroll.d.ts +0 -1
  246. package/core/components/ui/_css/size.d.ts +0 -2
  247. package/core/components/ui/_css/type.d.ts +0 -2
  248. package/core/components/ui/alert/alert.d.ts +0 -34
  249. package/core/components/ui/alert/alert.js +0 -202
  250. package/core/components/ui/badge/badge.d.ts +0 -26
  251. package/core/components/ui/button/button.d.ts +0 -171
  252. package/core/components/ui/captcha/captcha.d.ts +0 -30
  253. package/core/components/ui/captcha/captcha.js +0 -93
  254. package/core/components/ui/card/card-footer.d.ts +0 -4
  255. package/core/components/ui/card/card-footer.js +0 -24
  256. package/core/components/ui/card/card-header-descripton.d.ts +0 -5
  257. package/core/components/ui/card/card-header-descripton.js +0 -32
  258. package/core/components/ui/card/card-header.d.ts +0 -8
  259. package/core/components/ui/card/card-main.d.ts +0 -4
  260. package/core/components/ui/card/card-main.js +0 -28
  261. package/core/components/ui/card/card.d.ts +0 -12
  262. package/core/components/ui/divider/divider.d.ts +0 -15
  263. package/core/components/ui/form/checkbox/checkbox.d.ts +0 -181
  264. package/core/components/ui/form/css/form-control.d.ts +0 -4
  265. package/core/components/ui/form/fieldset/fieldset.d.ts +0 -23
  266. package/core/components/ui/form/fieldset/fieldset.js +0 -118
  267. package/core/components/ui/form/fieldset/legend-description.d.ts +0 -5
  268. package/core/components/ui/form/fieldset/legend-description.js +0 -30
  269. package/core/components/ui/form/fieldset/legend.d.ts +0 -16
  270. package/core/components/ui/form/fieldset/legend.js +0 -112
  271. package/core/components/ui/form/form-actions/form-actions.d.ts +0 -7
  272. package/core/components/ui/form/form-actions/form-actions.js +0 -46
  273. package/core/components/ui/form/form-layout/form-layout.d.ts +0 -12
  274. package/core/components/ui/form/form-layout/form-layout.js +0 -83
  275. package/core/components/ui/form/input/input.d.ts +0 -106
  276. package/core/components/ui/form/input/input.js +0 -268
  277. package/core/components/ui/form/input/password-helper.d.ts +0 -25
  278. package/core/components/ui/form/input/password-helper.js +0 -119
  279. package/core/components/ui/form/input/same-value-helper.d.ts +0 -16
  280. package/core/components/ui/form/input/same-value-helper.js +0 -77
  281. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +0 -136
  282. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +0 -296
  283. package/core/components/ui/form/radio/radio.d.ts +0 -12
  284. package/core/components/ui/form/radio/radio.js +0 -50
  285. package/core/components/ui/form/select/select.d.ts +0 -58
  286. package/core/components/ui/form/select/select.js +0 -298
  287. package/core/components/ui/form/textarea/textarea.d.ts +0 -84
  288. package/core/components/ui/form/textarea/textarea.js +0 -150
  289. package/core/components/ui/group/group.d.ts +0 -16
  290. package/core/components/ui/group/group.js +0 -118
  291. package/core/components/ui/icon/icon.d.ts +0 -26
  292. package/core/components/ui/icon/icon.js +0 -113
  293. package/core/components/ui/icon/icons.d.ts +0 -10
  294. package/core/components/ui/icon/icons.js +0 -126
  295. package/core/components/ui/icon/icons.json +0 -1
  296. package/core/components/ui/image/image.d.ts +0 -15
  297. package/core/components/ui/image/image.js +0 -153
  298. package/core/components/ui/link/link.d.ts +0 -29
  299. package/core/components/ui/link/link.js +0 -124
  300. package/core/components/ui/loader/loader.d.ts +0 -23
  301. package/core/components/ui/loader/loader.js +0 -97
  302. package/core/components/ui/loader/styles/fixed.d.ts +0 -1
  303. package/core/components/ui/loader/styles/inline.d.ts +0 -1
  304. package/core/components/ui/menu/menu-item.d.ts +0 -5
  305. package/core/components/ui/menu/menu-item.js +0 -34
  306. package/core/components/ui/menu/menu.d.ts +0 -41
  307. package/core/components/ui/menu/menu.js +0 -313
  308. package/core/components/ui/modal/modal-actions.d.ts +0 -7
  309. package/core/components/ui/modal/modal-actions.js +0 -42
  310. package/core/components/ui/modal/modal-close.d.ts +0 -7
  311. package/core/components/ui/modal/modal-close.js +0 -43
  312. package/core/components/ui/modal/modal-content.d.ts +0 -5
  313. package/core/components/ui/modal/modal-content.js +0 -26
  314. package/core/components/ui/modal/modal-subtitle.d.ts +0 -5
  315. package/core/components/ui/modal/modal-subtitle.js +0 -30
  316. package/core/components/ui/modal/modal-title.d.ts +0 -5
  317. package/core/components/ui/modal/modal-title.js +0 -29
  318. package/core/components/ui/modal/modal.d.ts +0 -58
  319. package/core/components/ui/modal/modal.js +0 -401
  320. package/core/components/ui/pop/pop.d.ts +0 -37
  321. package/core/components/ui/pop/pop.js +0 -299
  322. package/core/components/ui/progress/progress.d.ts +0 -10
  323. package/core/components/ui/table/table-caption.d.ts +0 -5
  324. package/core/components/ui/table/table-caption.js +0 -28
  325. package/core/components/ui/table/table-tbody.d.ts +0 -5
  326. package/core/components/ui/table/table-tbody.js +0 -39
  327. package/core/components/ui/table/table-td.d.ts +0 -12
  328. package/core/components/ui/table/table-td.js +0 -68
  329. package/core/components/ui/table/table-tfoot.d.ts +0 -5
  330. package/core/components/ui/table/table-tfoot.js +0 -27
  331. package/core/components/ui/table/table-th.d.ts +0 -11
  332. package/core/components/ui/table/table-th.js +0 -73
  333. package/core/components/ui/table/table-thead.d.ts +0 -5
  334. package/core/components/ui/table/table-thead.js +0 -25
  335. package/core/components/ui/table/table-tr.d.ts +0 -13
  336. package/core/components/ui/table/table-tr.js +0 -66
  337. package/core/components/ui/table/table.d.ts +0 -17
  338. package/core/components/ui/theme/theme-collection/core-variables.d.ts +0 -1
  339. package/core/components/ui/theme/theme-collection/dark.d.ts +0 -1
  340. package/core/components/ui/theme/theme-collection/light.d.ts +0 -1
  341. package/core/components/ui/theme/theme.d.ts +0 -19
  342. package/core/components/ui/theme/theme.js +0 -124
  343. package/core/components/ui/toast/message-subscriber.d.ts +0 -18
  344. package/core/components/ui/toast/message-subscriber.js +0 -40
  345. package/core/components/ui/toast/toast-item.d.ts +0 -19
  346. package/core/components/ui/toast/toast.d.ts +0 -25
  347. package/core/components/ui/toast/toast.js +0 -226
  348. package/core/components/ui/toast/types.d.ts +0 -11
  349. package/core/components/ui/toast/types.js +0 -1
  350. package/core/components/ui/tooltip/tooltip.d.ts +0 -10
  351. package/core/components/ui/ui.d.ts +0 -32
  352. package/core/core.d.ts +0 -4
  353. package/core/core.js +0 -19
  354. package/core/decorators/Subscriber.d.ts +0 -4
  355. package/core/decorators/Subscriber.js +0 -166
  356. package/core/directives/DataProvider.d.ts +0 -23
  357. package/core/directives/DataProvider.js +0 -102
  358. package/core/directives/Wording.d.ts +0 -42
  359. package/core/directives/Wording.js +0 -202
  360. package/core/mixins/Fetcher.d.ts +0 -90
  361. package/core/mixins/Fetcher.js +0 -242
  362. package/core/mixins/FormCheckable.d.ts +0 -88
  363. package/core/mixins/FormCheckable.js +0 -306
  364. package/core/mixins/FormElement.d.ts +0 -32
  365. package/core/mixins/FormElement.js +0 -272
  366. package/core/mixins/FormInput.d.ts +0 -70
  367. package/core/mixins/FormInput.js +0 -81
  368. package/core/mixins/Subscriber.d.ts +0 -36
  369. package/core/mixins/Subscriber.js +0 -333
  370. package/core/mixins/TemplatesContainer.d.ts +0 -13
  371. package/core/mixins/TemplatesContainer.js +0 -69
  372. package/core/mixins/mixins.js +0 -6
  373. package/core/utils/Arrays.d.ts +0 -97
  374. package/core/utils/Arrays.js +0 -140
  375. package/core/utils/DataBindObserver.d.ts +0 -83
  376. package/core/utils/DataBindObserver.js +0 -264
  377. package/core/utils/Electron.d.ts +0 -7
  378. package/core/utils/Electron.js +0 -11
  379. package/core/utils/Format.d.ts +0 -12
  380. package/core/utils/Format.js +0 -38
  381. package/core/utils/HTML.d.ts +0 -42
  382. package/core/utils/HTML.js +0 -119
  383. package/core/utils/LocationHandler.d.ts +0 -46
  384. package/core/utils/LocationHandler.js +0 -133
  385. package/core/utils/Objects.d.ts +0 -28
  386. package/core/utils/Objects.js +0 -102
  387. package/core/utils/PublisherProxy.d.ts +0 -176
  388. package/core/utils/PublisherProxy.js +0 -709
  389. package/core/utils/Utils.d.ts +0 -4
  390. package/core/utils/Utils.js +0 -12
  391. package/core/utils/api.d.ts +0 -139
  392. package/core/utils/api.js +0 -391
  393. package/core/utils/url-pattern.js +0 -2
  394. package/decorators.d.ts +0 -3
  395. package/directives.d.ts +0 -40
  396. package/img/concorde-logo.svg +0 -1
  397. package/img/concorde.png +0 -0
  398. package/img/concorde_def.png +0 -0
  399. package/mixins.d.ts +0 -181
  400. package/svg/regular/plane.svg +0 -1
  401. package/svg/solid/plane.svg +0 -1
  402. package/test-utils/TestUtils.d.ts +0 -4
  403. package/test-utils/TestUtils.js +0 -12
  404. package/utils.d.ts +0 -20
  405. /package/{core/components/functional/functional.d.ts → src/core/components/functional/functional.ts} +0 -0
  406. /package/{core → src/core}/components/ui/theme/css/tailwind.css +0 -0
  407. /package/{core → src/core}/components/ui/theme/css/tailwind.d.ts +0 -0
@@ -1,26 +0,0 @@
1
- import { LitElement, PropertyValues } from "lit";
2
- import { DirectiveResult } from "lit/directive";
3
- import { UnsafeHTMLDirective } from "lit/directives/unsafe-html";
4
- /**
5
- * Afficher l'icone choisie parmis une liste prédéfinie dans icons.json
6
- * les tailles suivantes sont disponible via l'attribut *size* : 2xs,xs,sm,"",lg,xl,2xl
7
- */
8
- export declare class Icon extends LitElement {
9
- static styles: import("lit").CSSResult;
10
- updateIcon(): Promise<void>;
11
- iconText: DirectiveResult<typeof UnsafeHTMLDirective> | string;
12
- /**
13
- * Nom identifiant l'icone ex : *info*
14
- */
15
- name: string;
16
- /**
17
- * prefix de l'icone si nécessaire ex: *solid*. La valeur par défaut est "" qui est mappée sur *regular*
18
- */
19
- prefix: string;
20
- /**
21
- * library de l'icone url vers un dossier en lign conenant des icônes
22
- */
23
- library: string;
24
- willUpdate(changedProperties: PropertyValues): void;
25
- render(): DirectiveResult<typeof UnsafeHTMLDirective>;
26
- }
@@ -1,113 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import Icons from "@supersoniks/concorde/core/components/ui/icon/icons";
8
- import { css, LitElement, nothing } from "lit";
9
- import { customElement, property, state } from "lit/decorators.js";
10
- const tagName = "sonic-icon";
11
- /**
12
- * Afficher l'icone choisie parmis une liste prédéfinie dans icons.json
13
- * les tailles suivantes sont disponible via l'attribut *size* : 2xs,xs,sm,"",lg,xl,2xl
14
- */
15
- let Icon = class Icon extends LitElement {
16
- constructor() {
17
- super(...arguments);
18
- this.iconText = "";
19
- /**
20
- * Nom identifiant l'icone ex : *info*
21
- */
22
- this.name = "";
23
- /**
24
- * prefix de l'icone si nécessaire ex: *solid*. La valeur par défaut est "" qui est mappée sur *regular*
25
- */
26
- this.prefix = "";
27
- /**
28
- * library de l'icone url vers un dossier en lign conenant des icônes
29
- */
30
- this.library = "";
31
- }
32
- async updateIcon() {
33
- this.iconText = await Icons.default.get({ name: this.name, prefix: this.prefix, library: this.library });
34
- }
35
- willUpdate(changedProperties) {
36
- if (changedProperties.has("name") || changedProperties.has("prefix") || changedProperties.has("library")) {
37
- this.updateIcon();
38
- }
39
- super.willUpdate(changedProperties);
40
- }
41
- render() {
42
- if (!this.iconText) {
43
- return nothing;
44
- }
45
- return this.iconText;
46
- }
47
- };
48
- Icon.styles = css `
49
- :host {
50
- line-height: 0.1em;
51
- width: fit-content;
52
- height: fit-content;
53
- vertical-align: -0.125em;
54
- flex-shrink: 0;
55
- }
56
- svg {
57
- height: var(--sc-icon-size, 1em);
58
- width: 1.4em;
59
- overflow: visible;
60
- }
61
-
62
- svg:not([fill="none"]) {
63
- fill: currentColor;
64
- }
65
-
66
- svg[fill="none"] {
67
- stroke-width: 2;
68
- }
69
-
70
- :host([size="2xs"]) svg {
71
- --sc-icon-size: 0.625em;
72
- }
73
-
74
- :host([size="xs"]) svg {
75
- --sc-icon-size: 0.75em;
76
- }
77
-
78
- :host([size="sm"]) svg {
79
- --sc-icon-size: 0.875em;
80
- }
81
-
82
- :host([size="lg"]) svg {
83
- --sc-icon-size: 1.25em;
84
- }
85
-
86
- :host([size="xl"]) svg {
87
- --sc-icon-size: 1.5em;
88
- }
89
-
90
- :host([size="2xl"]) svg {
91
- --sc-icon-size: 2em;
92
- }
93
-
94
- :host([size="3xl"]) svg {
95
- --sc-icon-size: 2.8em;
96
- }
97
- `;
98
- __decorate([
99
- state()
100
- ], Icon.prototype, "iconText", void 0);
101
- __decorate([
102
- property({ type: String })
103
- ], Icon.prototype, "name", void 0);
104
- __decorate([
105
- property({ type: String })
106
- ], Icon.prototype, "prefix", void 0);
107
- __decorate([
108
- property({ type: String })
109
- ], Icon.prototype, "library", void 0);
110
- Icon = __decorate([
111
- customElement(tagName)
112
- ], Icon);
113
- export { Icon };
@@ -1,10 +0,0 @@
1
- export declare type IconConf = {
2
- name: string;
3
- prefix?: string;
4
- library?: string;
5
- };
6
- export default class Icons {
7
- static default: {
8
- get: (params: IconConf) => Promise<import("lit-html/directive").DirectiveResult<typeof import("lit-html/directives/unsafe-html").UnsafeHTMLDirective>>;
9
- };
10
- }
@@ -1,126 +0,0 @@
1
- var _a;
2
- // ici on désactive un regle de eslint exceptionnelement pour ce fichier
3
- /* eslint no-async-promise-executor: 0 */ // --> OFF
4
- import icons from "@supersoniks/concorde/core/components/ui/icon/icons.json";
5
- import { unsafeHTML } from "lit/directives/unsafe-html.js";
6
- /**
7
- * Ce tableau static permet de ne pas appeler plusieurs fois le même service lors d'appel concurrents en GET.
8
- */
9
- const loadingGetPromises = new Map();
10
- /**
11
- * Les librairies en ligne.
12
- * Pour chaque identifiant de librairie a une template d'url de chargement
13
- * Les propriétés name et prefix de sonic-icon servent à remplir le template.
14
- * la propriété library de sonic-icon correspond à une clef de librairies.
15
- */
16
- const libraries = {
17
- heroicons: {
18
- url: "https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",
19
- defaultPrefix: "outline",
20
- },
21
- iconoir: {
22
- url: "https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg",
23
- },
24
- feathers: {
25
- url: "https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg",
26
- },
27
- lucide: {
28
- url: "https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg",
29
- },
30
- material: {
31
- url: "https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",
32
- defaultPrefix: "regular",
33
- },
34
- fontAwesome: {
35
- url: "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",
36
- defaultPrefix: "regular",
37
- },
38
- custom: { url: "", defaultPrefix: "" },
39
- };
40
- let hasEnabledCustomLibrary = false;
41
- function enableCustomLibrary() {
42
- if (hasEnabledCustomLibrary)
43
- return;
44
- hasEnabledCustomLibrary = true;
45
- libraries.custom.url = document.querySelector("[customIconLibraryPath]")?.getAttribute("customIconLibraryPath") || "";
46
- libraries.custom.defaultPrefix = document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix") || "";
47
- }
48
- const iconCachStr = sessionStorage.getItem("sonicIconsCache");
49
- const iconCache = iconCachStr ? JSON.parse(iconCachStr) : { icons: {}, names: [] };
50
- const iconCacheMaxSize = 100;
51
- class Icons {
52
- }
53
- _a = Icons;
54
- Icons.default = {
55
- get: async (params) => {
56
- const library = params.library;
57
- if (!params.name)
58
- return "";
59
- const name = params.name;
60
- const iconsAsRecord = icons;
61
- /**
62
- * SVGS en ligne
63
- */
64
- if (library == "custom") {
65
- enableCustomLibrary();
66
- }
67
- if (library && library in libraries) {
68
- const libraryItem = libraries[library];
69
- const prefix = params.prefix || libraryItem.defaultPrefix || "";
70
- const libIcons = iconsAsRecord[library] || {};
71
- iconsAsRecord[library] = libIcons;
72
- const libIconsKey = prefix + "-" + name;
73
- /**
74
- * Si l'icone a déjà été chargée on ne la recharge pas
75
- */
76
- if (libIcons[libIconsKey])
77
- return unsafeHTML(libIcons[libIconsKey]);
78
- const url = (libraryItem.url || "").replace("$prefix", prefix).replace("$name", name);
79
- /**
80
- * MiniCache de session
81
- */
82
- if (iconCache.icons[url]) {
83
- libIcons[libIconsKey] = iconCache.icons[url];
84
- return unsafeHTML(iconCache.icons[url]);
85
- }
86
- /**
87
- * on utilise une promise mutualisée pour ne pas faire plusieurs appels concurents d'une même icone
88
- */
89
- if (!loadingGetPromises.has(url)) {
90
- const promise = new Promise(async (resolve) => {
91
- const result = await fetch(url);
92
- if (!result.ok) {
93
- resolve(`<b title="Erreur ${result.status}">😶</b>`);
94
- return;
95
- }
96
- try {
97
- const text = await result.text();
98
- resolve(text);
99
- }
100
- catch (e) {
101
- resolve(null);
102
- }
103
- });
104
- loadingGetPromises.set(url, promise);
105
- }
106
- /**
107
- * Chargement de l'icone.
108
- */
109
- const result = await loadingGetPromises.get(url);
110
- loadingGetPromises.delete(url);
111
- libIcons[libIconsKey] = result || "";
112
- iconCache.icons[url] = result || "";
113
- if (iconCache.names.length > iconCacheMaxSize) {
114
- const key = iconCache.names.shift();
115
- delete iconCache.icons[key];
116
- }
117
- sessionStorage.setItem("sonicIconsCache", JSON.stringify(iconCache));
118
- return unsafeHTML(result);
119
- }
120
- /**
121
- * svgs "locaux"
122
- */
123
- return unsafeHTML(iconsAsRecord["core"][params.name] || "");
124
- },
125
- };
126
- export default Icons;
@@ -1 +0,0 @@
1
- { "core": { "cancel": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "check-circled-outline": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M7 12.5L10 15.5L17 8.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "check": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M5 13L9 17L19 7\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "emoji-puzzled": "<svg width=\"24px\" height=\"24px\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" ><path d=\"M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M11.5 15.5s1.5-2 4.5-2 4.5 2 4.5 2M3 4c0-2.754 4-2.754 4 0 0 1.967-2 1.64-2 4M5 11.01l.01-.011\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path><path d=\"M17.5 9a.5.5 0 110-1 .5.5 0 010 1zM10.5 9a.5.5 0 110-1 .5.5 0 010 1z\" fill=\"#000\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path></svg>", "info-empty": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M12 11.5V16.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 7.51L12.01 7.49889\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "loader": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-loader\"><line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"6\"></line><line x1=\"12\" y1=\"18\" x2=\"12\" y2=\"22\"></line><line x1=\"4.93\" y1=\"4.93\" x2=\"7.76\" y2=\"7.76\"></line><line x1=\"16.24\" y1=\"16.24\" x2=\"19.07\" y2=\"19.07\"></line><line x1=\"2\" y1=\"12\" x2=\"6\" y2=\"12\"></line><line x1=\"18\" y1=\"12\" x2=\"22\" y2=\"12\"></line><line x1=\"4.93\" y1=\"19.07\" x2=\"7.76\" y2=\"16.24\"></line><line x1=\"16.24\" y1=\"7.76\" x2=\"19.07\" y2=\"4.93\"></line></svg>", "minus-small": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-6 h-6\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M18 12H6\" />\n</svg>\n", "more-horiz": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M18 12.5C18.2761 12.5 18.5 12.2761 18.5 12C18.5 11.7239 18.2761 11.5 18 11.5C17.7239 11.5 17.5 11.7239 17.5 12C17.5 12.2761 17.7239 12.5 18 12.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M6 12.5C6.27614 12.5 6.5 12.2761 6.5 12C6.5 11.7239 6.27614 11.5 6 11.5C5.72386 11.5 5.5 11.7239 5.5 12C5.5 12.2761 5.72386 12.5 6 12.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "more-vert": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 18.5C12.2761 18.5 12.5 18.2761 12.5 18C12.5 17.7239 12.2761 17.5 12 17.5C11.7239 17.5 11.5 17.7239 11.5 18C11.5 18.2761 11.7239 18.5 12 18.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 6.5C12.2761 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.2761 5.5 12 5.5C11.7239 5.5 11.5 5.72386 11.5 6C11.5 6.27614 11.7239 6.5 12 6.5Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "nav-arrow-down": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M6 9L12 15L18 9\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n", "warning-circled-outline": "<svg width=\"24\" height=\"24\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M12 7L12 13\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 17.01L12.01 16.9989\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n" } }
@@ -1,15 +0,0 @@
1
- import { LitElement } from "lit";
2
- export declare class Image extends LitElement {
3
- static styles: import("lit").CSSResult[];
4
- rounded: "" | "none" | "full" | "sm" | "md" | "lg";
5
- src: string;
6
- alt: string;
7
- loading: "eager" | "lazy";
8
- transition?: "fade" | "fade-scale-out";
9
- ratio: string;
10
- objectPosition: string;
11
- imageRendering: string;
12
- cover: boolean;
13
- firstUpdated(changedProperties: Map<string | number | symbol, unknown>): void;
14
- render(): import("lit-html").TemplateResult<1>;
15
- }
@@ -1,153 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { html, LitElement, css } from "lit";
8
- import { customElement, property } from "lit/decorators.js";
9
- import { styleMap } from "lit/directives/style-map.js";
10
- const tagName = "sonic-image";
11
- let Image = class Image extends LitElement {
12
- constructor() {
13
- super(...arguments);
14
- this.rounded = "none";
15
- this.src = "";
16
- this.alt = "";
17
- this.loading = "lazy";
18
- this.ratio = "auto";
19
- this.objectPosition = "center center";
20
- this.imageRendering = "auto";
21
- this.cover = false;
22
- }
23
- firstUpdated(changedProperties) {
24
- if (this.transition) {
25
- const img = this.shadowRoot?.querySelector("img");
26
- if (!img)
27
- return;
28
- img.onload = function () {
29
- img.classList.add("loaded");
30
- };
31
- }
32
- super.firstUpdated(changedProperties);
33
- }
34
- render() {
35
- const imgStyles = {
36
- aspectRatio: this.cover ? "auto" : this.ratio,
37
- imageRendering: this.imageRendering,
38
- objectPosition: this.objectPosition,
39
- };
40
- return html `<div part="image">
41
- <picture part="picture"
42
- ><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style=${styleMap(imgStyles)}
43
- /></picture>
44
- </div>`;
45
- }
46
- };
47
- Image.styles = [
48
- css `
49
- :host {
50
- --sc-img-radius: 0;
51
- --sc-img-bg: var(--sc-placeholder-bg);
52
- border-radius: var(--sc-img-radius);
53
- display: block;
54
- width: 100%;
55
- background: var(--sc-img-bg);
56
- }
57
-
58
- img {
59
- width: 100%;
60
- vertical-align: middle;
61
- object-fit: cover;
62
- }
63
-
64
- img[src=""] {
65
- visibility: hidden;
66
- }
67
-
68
- /*Rounded*/
69
- :host([rounded]) {
70
- --sc-img-radius: var(--sc-rounded);
71
- overflow: hidden;
72
- }
73
- :host([rounded="sm"]) {
74
- --sc-img-radius: var(--sc-rounded-sm);
75
- }
76
-
77
- :host([rounded="md"]) {
78
- --sc-img-radius: var(--sc-rounded-md);
79
- }
80
-
81
- :host([rounded="lg"]) {
82
- --sc-img-radius: var(--sc-rounded-lg);
83
- }
84
- :host([rounded="xl"]) {
85
- --sc-img-radius: var(--sc-rounded-xl);
86
- }
87
-
88
- /*Cercle*/
89
- :host([rounded="full"]) {
90
- --sc-img-radius: 50% !important;
91
- }
92
- :host([rounded="none"]) {
93
- --sc-img-radius: 0 !important;
94
- }
95
-
96
- :host([cover]),
97
- :host([cover]) > div,
98
- :host([cover]) img {
99
- position: absolute !important;
100
- left: 0 !important;
101
- top: 0 !important;
102
- right: 0 !important;
103
- bottom: 0 !important;
104
- height: 100% !important;
105
- width: 100% !important;
106
- }
107
-
108
- :host([transition]) img {
109
- opacity: 0;
110
- transition: 0.25s;
111
- }
112
-
113
- :host([transition="fade-scale-out"]) img {
114
- scale: 1.08;
115
- transition: opacity 0.3s linear, scale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
116
- }
117
- :host([transition]) img.loaded {
118
- opacity: 1;
119
- scale: 1;
120
- }
121
- `,
122
- ];
123
- __decorate([
124
- property({ type: String })
125
- ], Image.prototype, "rounded", void 0);
126
- __decorate([
127
- property({ type: String })
128
- ], Image.prototype, "src", void 0);
129
- __decorate([
130
- property({ type: String })
131
- ], Image.prototype, "alt", void 0);
132
- __decorate([
133
- property({ type: String })
134
- ], Image.prototype, "loading", void 0);
135
- __decorate([
136
- property({ type: String, reflect: true })
137
- ], Image.prototype, "transition", void 0);
138
- __decorate([
139
- property({ type: String })
140
- ], Image.prototype, "ratio", void 0);
141
- __decorate([
142
- property({ type: String })
143
- ], Image.prototype, "objectPosition", void 0);
144
- __decorate([
145
- property({ type: String })
146
- ], Image.prototype, "imageRendering", void 0);
147
- __decorate([
148
- property({ type: Boolean, reflect: true })
149
- ], Image.prototype, "cover", void 0);
150
- Image = __decorate([
151
- customElement(tagName)
152
- ], Image);
153
- export { Image };
@@ -1,29 +0,0 @@
1
- import { LitElement, PropertyValues } from "lit";
2
- export declare class Link extends LitElement {
3
- static styles: import("lit").CSSResult[];
4
- href: string;
5
- private _location;
6
- get location(): string;
7
- set location(value: string);
8
- ariaLabel: null;
9
- /**
10
- * mode d'activation du bouton :
11
- * - strict : l'url courante match exactement avec le href du bouton
12
- * - partial : l'url courante match à gauche avec le href du bouton
13
- * - disabled : aucune activation / désactivation
14
- */
15
- autoActive: "strict" | "partial" | "disabled";
16
- connectedCallback(): void;
17
- setFocusable(): void;
18
- disconnectedCallback(): void;
19
- private _target;
20
- set target(newTarget: string | null);
21
- get target(): string | null;
22
- /**
23
- * Si présent on passe en mode pushstate
24
- */
25
- pushState: boolean | null;
26
- handlePushState(e: Event): void;
27
- updated(changedProperties: PropertyValues): void;
28
- render(): import("lit-html").TemplateResult<1>;
29
- }
@@ -1,124 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import LocationHandler from "@supersoniks/concorde/core/utils/LocationHandler";
8
- import { html, LitElement, css, nothing } from "lit";
9
- import { customElement, property } from "lit/decorators.js";
10
- import { ifDefined } from "lit/directives/if-defined.js";
11
- import Electron from "@supersoniks/concorde/core/utils/Electron";
12
- const tagName = "sonic-link";
13
- let Link = class Link extends LitElement {
14
- constructor() {
15
- super(...arguments);
16
- this.href = "";
17
- this._location = "";
18
- this.ariaLabel = null;
19
- /**
20
- * mode d'activation du bouton :
21
- * - strict : l'url courante match exactement avec le href du bouton
22
- * - partial : l'url courante match à gauche avec le href du bouton
23
- * - disabled : aucune activation / désactivation
24
- */
25
- this.autoActive = "partial";
26
- this._target = null;
27
- /**
28
- * Si présent on passe en mode pushstate
29
- */
30
- this.pushState = null;
31
- }
32
- get location() {
33
- return this._location;
34
- }
35
- set location(value) {
36
- this._location = value;
37
- LocationHandler.updateComponentActiveState(this);
38
- }
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
- // on Enter keypress we trigger a click on the link tag
45
- this.addEventListener("keypress", (e) => {
46
- if (e.key === "Enter") {
47
- this.shadowRoot?.querySelector("a")?.click();
48
- }
49
- });
50
- this.setFocusable();
51
- super.connectedCallback();
52
- }
53
- setFocusable() {
54
- if (this.href) {
55
- this.setAttribute("tabIndex", "0");
56
- }
57
- else {
58
- this.removeAttribute("tabIndex");
59
- }
60
- }
61
- disconnectedCallback() {
62
- LocationHandler.offChange(this);
63
- super.disconnectedCallback();
64
- }
65
- set target(newTarget) {
66
- this._target = newTarget;
67
- Electron.fixBlankLink(this);
68
- this.requestUpdate();
69
- }
70
- get target() {
71
- return this._target;
72
- }
73
- handlePushState(e) {
74
- e.preventDefault();
75
- LocationHandler.changeFromComponent(this);
76
- }
77
- updated(changedProperties) {
78
- if (changedProperties.has("href")) {
79
- this.setFocusable();
80
- }
81
- }
82
- render() {
83
- if (!this.href)
84
- return html `<slot></slot>`;
85
- return html `
86
- <a
87
- href="${this.href}"
88
- aria-label=${this.ariaLabel || nothing}
89
- target=${ifDefined(this.target)}
90
- @click=${this.pushState ? this.handlePushState : null}
91
- >
92
- <slot></slot>
93
- </a>
94
- `;
95
- }
96
- };
97
- Link.styles = [
98
- css `
99
- a {
100
- color: inherit;
101
- text-decoration: none;
102
- display: contents;
103
- }
104
- `,
105
- ];
106
- __decorate([
107
- property({ type: String })
108
- ], Link.prototype, "href", void 0);
109
- __decorate([
110
- property({ type: String, attribute: "data-aria-label" })
111
- ], Link.prototype, "ariaLabel", void 0);
112
- __decorate([
113
- property({ type: String })
114
- ], Link.prototype, "autoActive", void 0);
115
- __decorate([
116
- property({ type: String })
117
- ], Link.prototype, "target", null);
118
- __decorate([
119
- property({ type: Boolean })
120
- ], Link.prototype, "pushState", void 0);
121
- Link = __decorate([
122
- customElement(tagName)
123
- ], Link);
124
- export { Link };
@@ -1,23 +0,0 @@
1
- import { LitElement } from "lit";
2
- export type LoaderMode = "inline" | "fixed" | "noDelay";
3
- type LoaderConf = {
4
- mode?: string;
5
- container?: HTMLElement;
6
- noDelay?: boolean;
7
- };
8
- export declare class Loader extends LitElement {
9
- static styles: import("lit").CSSResult[];
10
- static loader: Loader;
11
- static callCounter: number;
12
- static show(conf?: LoaderConf): void;
13
- static hide(): void;
14
- /**
15
- * Mode d'affichage du loader
16
- * * inline : Loader dans le contenu
17
- * * fixed : Loader global par dessus la page
18
- */
19
- mode: LoaderMode;
20
- noDelay: boolean;
21
- render(): import("lit-html").TemplateResult<1>;
22
- }
23
- export {};