@supersoniks/concorde 5.0.0 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/.gitlab-ci.yml +0 -13
  2. package/build-infos.json +1 -1
  3. package/concorde-core.bundle.js +606 -689
  4. package/concorde-core.es.js +4511 -4329
  5. package/dist/concorde-core.bundle.js +606 -689
  6. package/dist/concorde-core.es.js +4511 -4329
  7. package/gitlab/job_tests.sh +25 -12
  8. package/index.html +3 -3
  9. package/package.json +16 -1
  10. package/scripts/post-build-docs.js +0 -0
  11. package/scripts/post-build.mjs +0 -0
  12. package/src/core/components/functional/fetch/fetch.md +0 -0
  13. package/src/core/components/functional/if/if.md +0 -0
  14. package/src/core/components/functional/list/list.demo.ts +0 -0
  15. package/src/core/components/functional/list/list.md +0 -0
  16. package/src/core/components/functional/list/list.ts +0 -0
  17. package/src/core/components/functional/router/router.md +0 -0
  18. package/src/core/components/functional/router/router.ts +0 -0
  19. package/src/core/components/functional/sdui/sdui.md +0 -0
  20. package/src/core/components/functional/states/states.md +0 -0
  21. package/src/core/components/functional/submit/submit.md +0 -0
  22. package/src/core/components/ui/_css/rounded.ts +36 -0
  23. package/src/core/components/ui/_css/size.ts +0 -0
  24. package/src/core/components/ui/_css/type.ts +49 -0
  25. package/src/core/components/ui/_i18n/ui-aria-labels.ts +104 -0
  26. package/src/core/components/ui/alert/alert.md +128 -72
  27. package/src/core/components/ui/alert/alert.spec.ts +145 -0
  28. package/src/core/components/ui/alert/alert.ts +86 -91
  29. package/src/core/components/ui/alert-messages/alert-messages.ts +1 -1
  30. package/src/core/components/ui/badge/badge.md +126 -78
  31. package/src/core/components/ui/badge/badge.ts +29 -81
  32. package/src/core/components/ui/button/button.md +1 -0
  33. package/src/core/components/ui/button/button.ts +11 -8
  34. package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
  35. package/src/core/components/ui/captcha/captcha.md +0 -0
  36. package/src/core/components/ui/card/card-header.ts +7 -2
  37. package/src/core/components/ui/card/card.md +120 -65
  38. package/src/core/components/ui/divider/divider.ts +4 -9
  39. package/src/core/components/ui/form/fieldset/legend-description.ts +1 -1
  40. package/src/core/components/ui/form/fieldset/legend.ts +1 -1
  41. package/src/core/components/ui/form/input/input.md +1 -1
  42. package/src/core/components/ui/form/input/input.ts +19 -15
  43. package/src/core/components/ui/form/radio/radio.md +0 -0
  44. package/src/core/components/ui/form/select/select.md +0 -0
  45. package/src/core/components/ui/form/switch/switch.md +0 -0
  46. package/src/core/components/ui/form/textarea/textarea.md +1 -1
  47. package/src/core/components/ui/image/image.md +147 -53
  48. package/src/core/components/ui/image/image.ts +10 -44
  49. package/src/core/components/ui/link/link.md +2 -2
  50. package/src/core/components/ui/link/link.ts +42 -37
  51. package/src/core/components/ui/loader/loader.md +0 -0
  52. package/src/core/components/ui/menu/menu.md +0 -0
  53. package/src/core/components/ui/modal/modal-close.ts +8 -12
  54. package/src/core/components/ui/modal/modal.md +0 -0
  55. package/src/core/components/ui/modal/modal.ts +18 -18
  56. package/src/core/components/ui/pop/pop.md +105 -1
  57. package/src/core/components/ui/pop/pop.ts +143 -148
  58. package/src/core/components/ui/table/table-caption.ts +0 -0
  59. package/src/core/components/ui/table/table.md +0 -0
  60. package/src/core/components/ui/table/table.ts +2 -8
  61. package/src/core/components/ui/theme/theme.ts +1 -1
  62. package/src/core/components/ui/toast/dismissed.ts +14 -0
  63. package/src/core/components/ui/toast/toast-item.ts +139 -91
  64. package/src/core/components/ui/toast/toast.ts +4 -7
  65. package/src/core/components/ui/tooltip/tooltip.ts +176 -154
  66. package/src/core/utils/LocationHandler.ts +12 -5
  67. package/src/core/utils/dismissed.ts +22 -0
  68. package/src/core/utils/positioning.spec.ts +208 -0
  69. package/src/core/utils/positioning.ts +183 -0
  70. package/src/core/utils/route.ts +0 -0
  71. package/src/directives.ts +2 -3
  72. package/src/docs/_core-concept/subscriber.md +0 -0
  73. package/src/docs/_getting-started/concorde-outside.md +3 -3
  74. package/src/docs/_getting-started/my-first-subscriber.md +0 -0
  75. package/src/docs/_getting-started/pubsub.md +0 -0
  76. package/src/docs/_getting-started/start.md +0 -0
  77. package/src/docs/code.ts +3 -1
  78. package/src/docs/example/users.ts +0 -0
  79. package/src/docs/search/docs-search.json +651 -21
  80. package/src/docs/search/page.ts +0 -0
  81. package/src/docs/tailwind/css/tailwind.css +13 -6
  82. package/src/tsconfig.json +45 -0
  83. package/src/tsconfig.tsbuildinfo +1 -1
  84. package/tailwind.config.js +50 -3
  85. package/vitest.setup.ts +49 -13
  86. package/.github/workflows/ci.yml +0 -21
  87. package/.github-export-ignore +0 -30
  88. package/CONTRIBUTING.md +0 -59
  89. package/DEV.md +0 -54
  90. package/LICENSE +0 -21
  91. package/OPEN_SOURCE_CHECKPOINT.md +0 -133
  92. package/concorde-3d.bundle.js +0 -3960
  93. package/concorde-3d.es.js +0 -33433
  94. package/concorde-hugging-face-infer.bundle.js +0 -32
  95. package/concorde-hugging-face-infer.es.js +0 -2952
  96. package/concorde-shader.bundle.js +0 -116
  97. package/concorde-shader.es.js +0 -8353
  98. package/concorde-webgpu.bundle.js +0 -307
  99. package/concorde-webgpu.es.js +0 -8627
  100. package/docs/altcha-widget.js +0 -2662
  101. package/docs/assets/index-BZiZXMU-.css +0 -1
  102. package/docs/assets/index-FmK4JaIM.js +0 -11992
  103. package/docs/crawl/core/components/functional/date/date.html +0 -190
  104. package/docs/crawl/core/components/functional/fetch/fetch.html +0 -109
  105. package/docs/crawl/core/components/functional/if/if.html +0 -27
  106. package/docs/crawl/core/components/functional/jsonata/jsonata.html +0 -79
  107. package/docs/crawl/core/components/functional/list/list.html +0 -70
  108. package/docs/crawl/core/components/functional/mix/mix.html +0 -45
  109. package/docs/crawl/core/components/functional/queue/queue.html +0 -96
  110. package/docs/crawl/core/components/functional/router/router.html +0 -106
  111. package/docs/crawl/core/components/functional/sdui/sdui.html +0 -269
  112. package/docs/crawl/core/components/functional/states/states.html +0 -66
  113. package/docs/crawl/core/components/functional/submit/submit.html +0 -160
  114. package/docs/crawl/core/components/functional/subscriber/subscriber.html +0 -67
  115. package/docs/crawl/core/components/functional/value/value.html +0 -51
  116. package/docs/crawl/core/components/ui/alert/alert.html +0 -110
  117. package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +0 -23
  118. package/docs/crawl/core/components/ui/badge/badge.html +0 -119
  119. package/docs/crawl/core/components/ui/button/button.html +0 -149
  120. package/docs/crawl/core/components/ui/captcha/captcha.html +0 -30
  121. package/docs/crawl/core/components/ui/card/card.html +0 -99
  122. package/docs/crawl/core/components/ui/divider/divider.html +0 -58
  123. package/docs/crawl/core/components/ui/form/checkbox/checkbox.html +0 -73
  124. package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +0 -135
  125. package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +0 -79
  126. package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +0 -62
  127. package/docs/crawl/core/components/ui/form/input/input.html +0 -109
  128. package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +0 -106
  129. package/docs/crawl/core/components/ui/form/radio/radio.html +0 -56
  130. package/docs/crawl/core/components/ui/form/select/select.html +0 -73
  131. package/docs/crawl/core/components/ui/form/switch/switch.html +0 -56
  132. package/docs/crawl/core/components/ui/form/textarea/textarea.html +0 -59
  133. package/docs/crawl/core/components/ui/group/group.html +0 -82
  134. package/docs/crawl/core/components/ui/icon/icon.html +0 -133
  135. package/docs/crawl/core/components/ui/image/image.html +0 -110
  136. package/docs/crawl/core/components/ui/link/link.html +0 -42
  137. package/docs/crawl/core/components/ui/loader/loader.html +0 -50
  138. package/docs/crawl/core/components/ui/menu/menu.html +0 -322
  139. package/docs/crawl/core/components/ui/modal/modal.html +0 -117
  140. package/docs/crawl/core/components/ui/pop/pop.html +0 -102
  141. package/docs/crawl/core/components/ui/progress/progress.html +0 -58
  142. package/docs/crawl/core/components/ui/table/table.html +0 -413
  143. package/docs/crawl/core/components/ui/toast/toast.html +0 -122
  144. package/docs/crawl/core/components/ui/tooltip/tooltip.html +0 -79
  145. package/docs/crawl/docs/_core-concept/dataFlow.html +0 -177
  146. package/docs/crawl/docs/_core-concept/overview.html +0 -66
  147. package/docs/crawl/docs/_core-concept/subscriber.html +0 -75
  148. package/docs/crawl/docs/_decorators/ancestor-attribute.html +0 -116
  149. package/docs/crawl/docs/_decorators/auto-subscribe.html +0 -202
  150. package/docs/crawl/docs/_decorators/bind.html +0 -141
  151. package/docs/crawl/docs/_decorators/get.html +0 -149
  152. package/docs/crawl/docs/_decorators/handle.html +0 -165
  153. package/docs/crawl/docs/_decorators/on-assign.html +0 -355
  154. package/docs/crawl/docs/_decorators/patch.html +0 -78
  155. package/docs/crawl/docs/_decorators/post.html +0 -139
  156. package/docs/crawl/docs/_decorators/publish.html +0 -61
  157. package/docs/crawl/docs/_decorators/put.html +0 -78
  158. package/docs/crawl/docs/_decorators/subscribe.html +0 -109
  159. package/docs/crawl/docs/_decorators/wait-for-ancestors.html +0 -137
  160. package/docs/crawl/docs/_directives/sub.html +0 -93
  161. package/docs/crawl/docs/_getting-started/ai-agents.html +0 -173
  162. package/docs/crawl/docs/_getting-started/concorde-manual-install.html +0 -100
  163. package/docs/crawl/docs/_getting-started/concorde-outside.html +0 -58
  164. package/docs/crawl/docs/_getting-started/create-a-component.html +0 -111
  165. package/docs/crawl/docs/_getting-started/my-first-component.html +0 -189
  166. package/docs/crawl/docs/_getting-started/my-first-subscriber.html +0 -110
  167. package/docs/crawl/docs/_getting-started/pubsub.html +0 -62
  168. package/docs/crawl/docs/_getting-started/start.html +0 -76
  169. package/docs/crawl/docs/_getting-started/theming.html +0 -85
  170. package/docs/crawl/docs/_misc/api-configuration.html +0 -149
  171. package/docs/crawl/docs/_misc/dataProviderKey.html +0 -135
  172. package/docs/crawl/docs/_misc/docs-mock-api.html +0 -158
  173. package/docs/crawl/docs/_misc/dynamic-path.html +0 -180
  174. package/docs/crawl/docs/_misc/endpoint.html +0 -50
  175. package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +0 -138
  176. package/docs/crawl/docs/_misc/html-integration.html +0 -48
  177. package/docs/crawl/hubs/decorators.html +0 -547
  178. package/docs/crawl/hubs/form-components.html +0 -357
  179. package/docs/crawl/hubs/remote-data.html +0 -452
  180. package/docs/crawl/index.html +0 -101
  181. package/docs/css/docs.css +0 -0
  182. package/docs/docs-mock-api-sw.js +0 -720
  183. package/docs/docs-mock-api-sw.js.map +0 -7
  184. package/docs/fonts/ClashGrotesk-Bold.eot +0 -0
  185. package/docs/fonts/ClashGrotesk-Bold.ttf +0 -0
  186. package/docs/fonts/ClashGrotesk-Bold.woff +0 -0
  187. package/docs/fonts/ClashGrotesk-Bold.woff2 +0 -0
  188. package/docs/fonts/ClashGrotesk-Extralight.eot +0 -0
  189. package/docs/fonts/ClashGrotesk-Extralight.ttf +0 -0
  190. package/docs/fonts/ClashGrotesk-Extralight.woff +0 -0
  191. package/docs/fonts/ClashGrotesk-Extralight.woff2 +0 -0
  192. package/docs/fonts/ClashGrotesk-Light.eot +0 -0
  193. package/docs/fonts/ClashGrotesk-Light.ttf +0 -0
  194. package/docs/fonts/ClashGrotesk-Light.woff +0 -0
  195. package/docs/fonts/ClashGrotesk-Light.woff2 +0 -0
  196. package/docs/fonts/ClashGrotesk-Medium.eot +0 -0
  197. package/docs/fonts/ClashGrotesk-Medium.ttf +0 -0
  198. package/docs/fonts/ClashGrotesk-Medium.woff +0 -0
  199. package/docs/fonts/ClashGrotesk-Medium.woff2 +0 -0
  200. package/docs/fonts/ClashGrotesk-Regular.eot +0 -0
  201. package/docs/fonts/ClashGrotesk-Regular.ttf +0 -0
  202. package/docs/fonts/ClashGrotesk-Regular.woff +0 -0
  203. package/docs/fonts/ClashGrotesk-Regular.woff2 +0 -0
  204. package/docs/fonts/ClashGrotesk-Semibold.eot +0 -0
  205. package/docs/fonts/ClashGrotesk-Semibold.ttf +0 -0
  206. package/docs/fonts/ClashGrotesk-Semibold.woff +0 -0
  207. package/docs/fonts/ClashGrotesk-Semibold.woff2 +0 -0
  208. package/docs/fonts/ClashGrotesk-Variable.eot +0 -0
  209. package/docs/fonts/ClashGrotesk-Variable.ttf +0 -0
  210. package/docs/fonts/ClashGrotesk-Variable.woff +0 -0
  211. package/docs/fonts/ClashGrotesk-Variable.woff2 +0 -0
  212. package/docs/img/concorde-icon.svg +0 -5
  213. package/docs/img/concorde-logo.svg +0 -1
  214. package/docs/img/concorde.png +0 -0
  215. package/docs/img/concorde_def.png +0 -0
  216. package/docs/img/concorde_seuil.png.webp +0 -0
  217. package/docs/img/concorde_seuil_invert.png +0 -0
  218. package/docs/img/paul_metrand.jpg +0 -0
  219. package/docs/img/paul_metrand_xs.jpg +0 -0
  220. package/docs/index.html +0 -93
  221. package/docs/llms-full.txt +0 -5787
  222. package/docs/llms.txt +0 -104
  223. package/docs/robots.txt +0 -16
  224. package/docs/sitemap.xml +0 -237
  225. package/docs/src/core/components/functional/date/date.md +0 -290
  226. package/docs/src/core/components/functional/fetch/fetch.md +0 -125
  227. package/docs/src/core/components/functional/if/if.md +0 -9
  228. package/docs/src/core/components/functional/jsonata/jsonata.md +0 -56
  229. package/docs/src/core/components/functional/list/list.md +0 -65
  230. package/docs/src/core/components/functional/mix/mix.md +0 -41
  231. package/docs/src/core/components/functional/queue/queue.md +0 -72
  232. package/docs/src/core/components/functional/router/router.md +0 -94
  233. package/docs/src/core/components/functional/sdui/default-library.json +0 -108
  234. package/docs/src/core/components/functional/sdui/example.json +0 -99
  235. package/docs/src/core/components/functional/sdui/sdui.md +0 -356
  236. package/docs/src/core/components/functional/states/states.md +0 -87
  237. package/docs/src/core/components/functional/submit/submit.md +0 -114
  238. package/docs/src/core/components/functional/subscriber/subscriber.md +0 -91
  239. package/docs/src/core/components/functional/value/value.md +0 -35
  240. package/docs/src/core/components/ui/alert/alert.md +0 -121
  241. package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -0
  242. package/docs/src/core/components/ui/badge/badge.md +0 -127
  243. package/docs/src/core/components/ui/button/button.md +0 -182
  244. package/docs/src/core/components/ui/captcha/captcha.md +0 -12
  245. package/docs/src/core/components/ui/card/card.md +0 -97
  246. package/docs/src/core/components/ui/divider/divider.md +0 -35
  247. package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -77
  248. package/docs/src/core/components/ui/form/fieldset/fieldset.md +0 -129
  249. package/docs/src/core/components/ui/form/form-actions/form-actions.md +0 -77
  250. package/docs/src/core/components/ui/form/form-layout/form-layout.md +0 -44
  251. package/docs/src/core/components/ui/form/input/input.md +0 -142
  252. package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -133
  253. package/docs/src/core/components/ui/form/radio/radio.md +0 -57
  254. package/docs/src/core/components/ui/form/select/select.md +0 -71
  255. package/docs/src/core/components/ui/form/switch/switch.md +0 -57
  256. package/docs/src/core/components/ui/form/textarea/textarea.md +0 -65
  257. package/docs/src/core/components/ui/group/group.md +0 -75
  258. package/docs/src/core/components/ui/icon/icon.md +0 -125
  259. package/docs/src/core/components/ui/icon/icons.json +0 -1
  260. package/docs/src/core/components/ui/image/image.md +0 -107
  261. package/docs/src/core/components/ui/link/link.md +0 -43
  262. package/docs/src/core/components/ui/loader/loader.md +0 -55
  263. package/docs/src/core/components/ui/menu/menu.md +0 -329
  264. package/docs/src/core/components/ui/modal/modal.md +0 -119
  265. package/docs/src/core/components/ui/pop/pop.md +0 -96
  266. package/docs/src/core/components/ui/progress/progress.md +0 -63
  267. package/docs/src/core/components/ui/table/table.md +0 -455
  268. package/docs/src/core/components/ui/toast/toast.md +0 -166
  269. package/docs/src/core/components/ui/tooltip/tooltip.md +0 -82
  270. package/docs/src/docs/_core-concept/dataFlow.md +0 -88
  271. package/docs/src/docs/_core-concept/overview.md +0 -57
  272. package/docs/src/docs/_core-concept/subscriber.md +0 -75
  273. package/docs/src/docs/_decorators/ancestor-attribute.md +0 -127
  274. package/docs/src/docs/_decorators/auto-subscribe.md +0 -202
  275. package/docs/src/docs/_decorators/bind.md +0 -167
  276. package/docs/src/docs/_decorators/get.md +0 -162
  277. package/docs/src/docs/_decorators/handle.md +0 -175
  278. package/docs/src/docs/_decorators/on-assign.md +0 -390
  279. package/docs/src/docs/_decorators/patch.md +0 -70
  280. package/docs/src/docs/_decorators/post.md +0 -146
  281. package/docs/src/docs/_decorators/publish.md +0 -55
  282. package/docs/src/docs/_decorators/put.md +0 -70
  283. package/docs/src/docs/_decorators/subscribe.md +0 -100
  284. package/docs/src/docs/_decorators/wait-for-ancestors.md +0 -163
  285. package/docs/src/docs/_directives/sub.md +0 -91
  286. package/docs/src/docs/_getting-started/ai-agents.md +0 -76
  287. package/docs/src/docs/_getting-started/concorde-manual-install.md +0 -133
  288. package/docs/src/docs/_getting-started/concorde-outside.md +0 -33
  289. package/docs/src/docs/_getting-started/create-a-component.md +0 -139
  290. package/docs/src/docs/_getting-started/my-first-component.md +0 -236
  291. package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -120
  292. package/docs/src/docs/_getting-started/pubsub.md +0 -37
  293. package/docs/src/docs/_getting-started/start.md +0 -47
  294. package/docs/src/docs/_getting-started/theming.md +0 -91
  295. package/docs/src/docs/_misc/api-configuration.md +0 -81
  296. package/docs/src/docs/_misc/dataProviderKey.md +0 -168
  297. package/docs/src/docs/_misc/docs-mock-api.md +0 -63
  298. package/docs/src/docs/_misc/dynamic-path.md +0 -71
  299. package/docs/src/docs/_misc/endpoint.md +0 -45
  300. package/docs/src/docs/_misc/formelement-subscriber-removal.md +0 -115
  301. package/docs/src/docs/_misc/html-integration.md +0 -15
  302. package/docs/src/docs/search/docs-search.json +0 -9512
  303. package/docs/src/tag-list.json +0 -1
  304. package/docs/src/tsconfig-model.json +0 -23
  305. package/docs/src/tsconfig.declarations.json +0 -22
  306. package/docs/src/tsconfig.emit.json +0 -23
  307. package/docs/src/tsconfig.json +0 -858
  308. package/docs/svg/regular/plane.svg +0 -1
  309. package/docs/svg/solid/plane.svg +0 -1
  310. package/gitlab/job_github_mirror.sh +0 -39
  311. package/scripts/github-export.mjs +0 -150
  312. package/src/css.d.ts +0 -19
  313. package/src/tsconfig.declarations.json +0 -22
  314. package/src/tsconfig.emit.json +0 -23
@@ -1,18 +1,18 @@
1
1
  import { html, LitElement, css } from "lit";
2
2
  import { customElement, property } from "lit/decorators.js";
3
3
  import { styleMap } from "lit/directives/style-map.js";
4
+ import { Rounded, hostRounded } from "../_css/rounded";
4
5
  const tagName = "sonic-image";
5
6
  @customElement(tagName)
6
7
  export class Image extends LitElement {
7
8
  static styles = [
9
+ hostRounded,
8
10
  css`
9
11
  :host {
10
- --sc-img-radius: 0;
11
- --sc-img-bg: var(--sc-placeholder-bg, rgba(12, 12, 12, 0.05));
12
- border-radius: var(--sc-img-radius);
12
+ --sc-_bg: var(--sc-placeholder-bg, rgba(12, 12, 12, 0.05));
13
+ background: var(--sc-_bg);
13
14
  display: block;
14
15
  width: 100%;
15
- background: var(--sc-img-bg);
16
16
  }
17
17
 
18
18
  img {
@@ -25,34 +25,6 @@ export class Image extends LitElement {
25
25
  visibility: hidden;
26
26
  }
27
27
 
28
- /*Rounded*/
29
- :host([rounded]) {
30
- --sc-img-radius: var(--sc-rounded);
31
- overflow: hidden;
32
- }
33
- :host([rounded="sm"]) {
34
- --sc-img-radius: var(--sc-rounded-sm);
35
- }
36
-
37
- :host([rounded="md"]) {
38
- --sc-img-radius: var(--sc-rounded-md);
39
- }
40
-
41
- :host([rounded="lg"]) {
42
- --sc-img-radius: var(--sc-rounded-lg);
43
- }
44
- :host([rounded="xl"]) {
45
- --sc-img-radius: var(--sc-rounded-xl);
46
- }
47
-
48
- /*Cercle*/
49
- :host([rounded="full"]) {
50
- --sc-img-radius: 50% !important;
51
- }
52
- :host([rounded="none"]) {
53
- --sc-img-radius: 0 !important;
54
- }
55
-
56
28
  :host([cover]),
57
29
  :host([cover]) > div,
58
30
  :host([cover]) img {
@@ -72,7 +44,8 @@ export class Image extends LitElement {
72
44
 
73
45
  :host([transition="fade-scale-out"]) img {
74
46
  scale: 1.08;
75
- transition: opacity 0.3s linear,
47
+ transition:
48
+ opacity 0.3s linear,
76
49
  scale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
77
50
  }
78
51
  :host([transition]) img.loaded {
@@ -82,13 +55,7 @@ export class Image extends LitElement {
82
55
  `,
83
56
  ];
84
57
 
85
- @property({ type: String }) rounded:
86
- | ""
87
- | "none"
88
- | "full"
89
- | "sm"
90
- | "md"
91
- | "lg" = "none";
58
+ @property({ type: String, reflect: true }) rounded: Rounded = "none";
92
59
  @property({ type: String }) src = "";
93
60
  @property({ type: String }) alt = "";
94
61
  @property({ type: String }) loading: "eager" | "lazy" = "lazy";
@@ -101,7 +68,7 @@ export class Image extends LitElement {
101
68
  @property({ type: Boolean, reflect: true }) cover = false;
102
69
 
103
70
  firstUpdated(
104
- changedProperties: Map<string | number | symbol, unknown>
71
+ changedProperties: Map<string | number | symbol, unknown>,
105
72
  ): void {
106
73
  if (this.transition) {
107
74
  const img = this.shadowRoot?.querySelector("img");
@@ -119,10 +86,9 @@ export class Image extends LitElement {
119
86
  imageRendering: this.imageRendering,
120
87
  objectPosition: this.objectPosition,
121
88
  };
122
- return html`<div part="image">
123
- <picture part="picture"
89
+ return html`<div>
90
+ <picture
124
91
  ><img
125
- part="img"
126
92
  src="${this.src}"
127
93
  loading="${this.loading}"
128
94
  alt="${this.alt}"
@@ -3,14 +3,14 @@
3
3
  ## Href
4
4
  <sonic-code>
5
5
  <template>
6
- <sonic-link href="/">Basic link with href attibute</sonic-link>
6
+ <sonic-link href="/">Basic link with href attribute</sonic-link>
7
7
  </template>
8
8
  </sonic-code>
9
9
 
10
10
  ## Target
11
11
  <sonic-code>
12
12
  <template>
13
- <sonic-link href="/" target="_blank">Link with target attibute</sonic-link>
13
+ <sonic-link href="/" target="_blank">Link with target attribute</sonic-link>
14
14
  </template>
15
15
  </sonic-code>
16
16
 
@@ -1,7 +1,9 @@
1
- import LocationHandler from "@supersoniks/concorde/core/utils/LocationHandler";
2
- import {html, LitElement, css, PropertyValues, nothing} from "lit";
3
- import {customElement, property} from "lit/decorators.js";
4
- import {ifDefined} from "lit/directives/if-defined.js";
1
+ import LocationHandler, {
2
+ type AutoActiveMode,
3
+ } from "@supersoniks/concorde/core/utils/LocationHandler";
4
+ import { html, LitElement, css, nothing } from "lit";
5
+ import { customElement, property } from "lit/decorators.js";
6
+ import { ifDefined } from "lit/directives/if-defined.js";
5
7
  import Electron from "@supersoniks/concorde/core/utils/Electron";
6
8
  const tagName = "sonic-link";
7
9
 
@@ -11,13 +13,27 @@ export class Link extends LitElement {
11
13
  css`
12
14
  a {
13
15
  color: inherit;
14
- text-decoration: none;
15
- display: contents;
16
+ text-decoration: inherit;
17
+ display: inline-flex;
18
+ align-items: inherit;
19
+ gap: inherit;
20
+ min-width: 0;
21
+ max-width: 100%;
22
+ }
23
+
24
+ a:focus {
25
+ outline: none;
26
+ }
27
+
28
+ a:focus-visible {
29
+ outline: 2px solid currentColor;
30
+ outline-offset: 2px;
31
+ border-radius: 2px;
16
32
  }
17
33
  `,
18
34
  ];
19
35
 
20
- @property({type: String}) href = "";
36
+ @property({ type: String }) href = "";
21
37
  private _location = "";
22
38
  get location(): string {
23
39
  return this._location;
@@ -27,47 +43,37 @@ export class Link extends LitElement {
27
43
  LocationHandler.updateComponentActiveState(this);
28
44
  }
29
45
 
30
- @property({type: String, attribute: "data-aria-label"}) ariaLabel = null;
46
+ @property({ type: String, attribute: "data-aria-label" }) ariaLabel:
47
+ | string
48
+ | null = null;
31
49
 
32
50
  /**
33
- * mode d'activation du bouton :
34
- * - strict : l'url courante match exactement avec le href du bouton
35
- * - partial : l'url courante match à gauche avec le href du bouton
36
- * - disabled : aucune activation / désactivation
51
+ * Active state for in-app navigation:
52
+ * - strict — pathname, search, and hash must match
53
+ * - strict-path-only — pathname and hash must match (ignore search)
54
+ * - partial — current URL starts with href (default)
55
+ * - disabled — never sets `active`
37
56
  */
38
- @property({type: String}) autoActive: "strict" | "partial" | "disabled" = "partial";
57
+ @property({ type: String }) autoActive: AutoActiveMode = "partial";
58
+
39
59
  connectedCallback() {
40
60
  if (this.href && this.href.indexOf("http") != 0) {
41
61
  LocationHandler.onChange(this);
42
- this.location = document.location.href.replace(document.location.origin, "");
62
+ this.location = document.location.href.replace(
63
+ document.location.origin,
64
+ "",
65
+ );
43
66
  }
44
67
 
45
- // on Enter keypress we trigger a click on the link tag
46
- this.addEventListener("keypress", (e: KeyboardEvent) => {
47
- if (e.key === "Enter") {
48
- this.shadowRoot?.querySelector("a")?.click();
49
- }
50
- });
51
-
52
- this.setFocusable();
53
-
54
68
  super.connectedCallback();
55
69
  }
56
70
 
57
- setFocusable() {
58
- if (this.href) {
59
- this.setAttribute("tabIndex", "0");
60
- } else {
61
- this.removeAttribute("tabIndex");
62
- }
63
- }
64
-
65
71
  disconnectedCallback(): void {
66
72
  LocationHandler.offChange(this);
67
73
  super.disconnectedCallback();
68
74
  }
69
75
  private _target: string | null = null;
70
- @property({type: String}) set target(newTarget) {
76
+ @property({ type: String }) set target(newTarget) {
71
77
  this._target = newTarget;
72
78
  Electron.fixBlankLink(this);
73
79
  this.requestUpdate();
@@ -79,17 +85,15 @@ export class Link extends LitElement {
79
85
  /**
80
86
  * Si présent on passe en mode pushstate
81
87
  */
82
- @property({type: Boolean}) pushState: boolean | null = null;
88
+ @property({ type: Boolean, reflect: true }) pushState: boolean | null = null;
83
89
 
84
90
  handlePushState(e: Event) {
85
91
  e.preventDefault();
86
92
  LocationHandler.changeFromComponent(this);
87
93
  }
88
94
 
89
- updated(changedProperties: PropertyValues) {
90
- if (changedProperties.has("href")) {
91
- this.setFocusable();
92
- }
95
+ private get blankRel(): string | undefined {
96
+ return this.target === "_blank" ? "noopener noreferrer" : undefined;
93
97
  }
94
98
 
95
99
  render() {
@@ -99,6 +103,7 @@ export class Link extends LitElement {
99
103
  href="${this.href}"
100
104
  aria-label=${this.ariaLabel || nothing}
101
105
  target=${ifDefined(this.target)}
106
+ rel=${ifDefined(this.blankRel)}
102
107
  @click=${this.pushState ? this.handlePushState : null}
103
108
  >
104
109
  <slot></slot>
File without changes
File without changes
@@ -4,31 +4,27 @@ import { Modal } from "@supersoniks/concorde/core/components/ui/modal/modal";
4
4
  import { ifDefined } from "lit/directives/if-defined.js";
5
5
  import HTML from "@supersoniks/concorde/core/utils/HTML";
6
6
  import { ButtonType } from "../button/button";
7
+ import {
8
+ resolveUiLabel,
9
+ uiAriaLabels,
10
+ type UiLabelDict,
11
+ } from "@supersoniks/concorde/core/components/ui/_i18n/ui-aria-labels";
12
+
7
13
  const tagName = "sonic-modal-close";
8
14
 
9
15
  @customElement(tagName)
10
16
  export class ModalClose extends LitElement {
11
- @property() translation: Record<string, string> = {
12
- fr: "Fermer la fenêtre",
13
- en: "Close window",
14
- de: "Fenster schließen",
15
- nl: "Venster sluiten",
16
- es: "Cerrar",
17
- };
17
+ @property() translation: UiLabelDict = { ...uiAriaLabels.closeWindow };
18
18
 
19
19
  @property() reset?: string;
20
20
  @property() type?: ButtonType;
21
21
 
22
- connectedCallback() {
23
- super.connectedCallback();
24
- this.lang = document.documentElement.lang?.split("-")[0] ?? "fr";
25
- }
26
22
  render() {
27
23
  return html`<sonic-button
28
24
  noAutoFill
29
- data-aria-label=${this.translation[this.lang]}
30
25
  reset=${ifDefined(this.reset)}
31
26
  shape="circle"
27
+ .ariaLabel=${resolveUiLabel(this.translation)}
32
28
  @click=${this.handleClick}
33
29
  type=${ifDefined(this.type)}
34
30
  ><sonic-icon name="cancel" size="lg"></sonic-icon
File without changes
@@ -58,13 +58,13 @@ export class Modal extends Subscriber(LitElement) {
58
58
  --sc-modal-py: 2.5rem;
59
59
  --sc-modal-px: 1.5rem;
60
60
 
61
- --sc_backdrop-bg: var(
62
- --sc_overlay-bg,
61
+ --sc-_backdrop-bg: var(
62
+ --sc-_overlay-bg,
63
63
  var(--sc-base-200, rgba(0, 0, 0, 0.12))
64
64
  );
65
- --sc_backdrop-opacity: 0;
66
- --sc_rounded: var(--sc-rounded-lg);
67
- --sc_z-index: 990;
65
+ --sc-_backdrop-opacity: 0;
66
+ --sc-_rounded: var(--sc-rounded-lg);
67
+ --sc-_z-index: 990;
68
68
  }
69
69
 
70
70
  * {
@@ -76,7 +76,7 @@ export class Modal extends Subscriber(LitElement) {
76
76
  color: var(--sc-base-content, #000);
77
77
  width: 100%;
78
78
  box-shadow: var(--sc-shadow-lg);
79
- border-radius: var(--sc_rounded) var(--sc_rounded);
79
+ border-radius: var(--sc-_rounded) var(--sc-_rounded);
80
80
  transform: translateZ(0);
81
81
  border: none;
82
82
  outline: none;
@@ -87,16 +87,16 @@ export class Modal extends Subscriber(LitElement) {
87
87
  opacity: 0;
88
88
  position: fixed;
89
89
  inset: 0;
90
- z-index: var(--sc_z-index);
90
+ z-index: var(--sc-_z-index);
91
91
  }
92
92
 
93
93
  #backdrop {
94
- opacity: var(--sc_backdrop-opacity, 0);
95
- background: var(--sc_backdrop-bg);
94
+ opacity: var(--sc-_backdrop-opacity, 0);
95
+ background: var(--sc-_backdrop-bg);
96
96
  transition: opacity 0.15s linear;
97
97
  inset: 0;
98
98
  position: fixed;
99
- z-index: var(--sc_z-index);
99
+ z-index: var(--sc-_z-index);
100
100
  }
101
101
 
102
102
  #modal-content {
@@ -112,12 +112,12 @@ export class Modal extends Subscriber(LitElement) {
112
112
  max-width: none !important;
113
113
  margin: auto 0 0 !important;
114
114
  width: 100% !important;
115
- border-radius: var(--sc_rounded) var(--sc_rounded) 0 0 !important;
115
+ border-radius: var(--sc-_rounded) var(--sc-_rounded) 0 0 !important;
116
116
  }
117
117
  }
118
118
 
119
119
  :host([fullScreen]) {
120
- --sc_rounded: 0;
120
+ --sc-_rounded: 0;
121
121
  }
122
122
  :host([fullScreen]) #modal {
123
123
  width: 100% !important;
@@ -161,11 +161,11 @@ export class Modal extends Subscriber(LitElement) {
161
161
  /* Close button */
162
162
  ::slotted(sonic-modal-close),
163
163
  sonic-modal-close {
164
- --sc_top: 0.25rem;
165
- --sc_x: 0.25rem;
164
+ --sc-_top: 0.25rem;
165
+ --sc-_x: 0.25rem;
166
166
  position: sticky;
167
167
  display: block;
168
- top: var(--sc_top);
168
+ top: var(--sc-_top);
169
169
  margin-left: auto;
170
170
  margin-bottom: -1rem;
171
171
  margin-top: calc(-1 * var(--sc-modal-py) - 0.25rem);
@@ -312,7 +312,7 @@ export class Modal extends Subscriber(LitElement) {
312
312
  }
313
313
 
314
314
  if (_changedProperties.has("zIndex")) {
315
- this.style.setProperty("--sc_z-index", this.zIndex || "990");
315
+ this.style.setProperty("--sc-_z-index", this.zIndex || "990");
316
316
  }
317
317
 
318
318
  if (_changedProperties.has("paddingX")) {
@@ -530,10 +530,10 @@ export class Modal extends Subscriber(LitElement) {
530
530
  // Backdrop
531
531
  if (!this.fullScreen) {
532
532
  if (isEntering) {
533
- this.style.setProperty("--sc_backdrop-opacity", "0.8");
533
+ this.style.setProperty("--sc-_backdrop-opacity", "0.8");
534
534
  } else {
535
535
  setTimeout(() => {
536
- this.style.setProperty("--sc_backdrop-opacity", "0");
536
+ this.style.setProperty("--sc-_backdrop-opacity", "0");
537
537
  }, 150);
538
538
  }
539
539
  }
@@ -30,7 +30,43 @@
30
30
  </template>
31
31
  </sonic-code>
32
32
 
33
+ Default placement is `bottom`. Placement is written `side-align`, like `sonic-tooltip`: `side` is `top`, `right`, `bottom` or `left`, `align` is `start`, `center` or `end`. Without `align`, content is aligned on the start of the trigger. If there is not enough room, content flips to the opposite side and stays inside the viewport.
34
+
35
+ The former space syntax (`placement="bottom center"`) still works but is deprecated.
36
+
37
+ <sonic-code>
38
+ <template>
39
+ <sonic-pop class="inline-block" placement="bottom-center">
40
+ <sonic-button>Bottom center</sonic-button>
41
+ <sonic-menu slot="content">
42
+ <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
43
+ </sonic-menu>
44
+ </sonic-pop>
45
+ <sonic-pop class="inline-block" placement="top-center">
46
+ <sonic-button>Top center</sonic-button>
47
+ <sonic-menu slot="content">
48
+ <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
49
+ </sonic-menu>
50
+ </sonic-pop>
51
+ <sonic-pop class="inline-block" placement="left-center">
52
+ <sonic-button>Left center</sonic-button>
53
+ <sonic-menu slot="content">
54
+ <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
55
+ </sonic-menu>
56
+ </sonic-pop>
57
+ <sonic-pop class="inline-block" placement="right-center">
58
+ <sonic-button>Right center</sonic-button>
59
+ <sonic-menu slot="content">
60
+ <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
61
+ </sonic-menu>
62
+ </sonic-pop>
63
+ </template>
64
+ </sonic-code>
65
+
33
66
  ## Shadow
67
+
68
+ Default shadow is `lg`.
69
+
34
70
  <sonic-code>
35
71
  <template>
36
72
  <sonic-pop class="inline-block" shadow="none" placement='top' >
@@ -60,6 +96,26 @@
60
96
  </template>
61
97
  </sonic-code>
62
98
 
99
+ ## Inline
100
+
101
+ By default, pop is vertically aligned to the middle. Use `inline` to align it on the text baseline, e.g. inside a sentence.
102
+
103
+ <sonic-code>
104
+ <template>
105
+ <p>
106
+ The Concorde flew from Paris to
107
+ <sonic-pop inline>
108
+ <sonic-button variant="link">New York</sonic-button>
109
+ <sonic-menu slot="content">
110
+ <sonic-menu-item>See flights</sonic-menu-item>
111
+ <sonic-menu-item>Book a seat</sonic-menu-item>
112
+ </sonic-menu>
113
+ </sonic-pop>
114
+ in about 3.5 hours.
115
+ </p>
116
+ </template>
117
+ </sonic-code>
118
+
63
119
  ## noToggle
64
120
  <sonic-code>
65
121
  <template>
@@ -93,4 +149,52 @@
93
149
  Click to open pop
94
150
  </sonic-button>
95
151
  </template>
96
- </sonic-code>
152
+ </sonic-code>
153
+
154
+ ## Keep open on select
155
+
156
+ By default, a click inside the content closes the pop, as well as a click outside. Add `data-on-select="keep"` on the content, or on any of its elements, to keep the pop open when interacting with it.
157
+
158
+ <sonic-code>
159
+ <template>
160
+ <sonic-pop class="inline-block">
161
+ <sonic-button>Closes on select</sonic-button>
162
+ <div slot="content" class="grid gap-2 p-3">
163
+ <sonic-checkbox>Option A</sonic-checkbox>
164
+ <sonic-checkbox>Option B</sonic-checkbox>
165
+ </div>
166
+ </sonic-pop>
167
+ <sonic-pop class="inline-block">
168
+ <sonic-button>Stays open on select</sonic-button>
169
+ <div slot="content" class="grid gap-2 p-3" data-on-select="keep">
170
+ <sonic-checkbox>Option A</sonic-checkbox>
171
+ <sonic-checkbox>Option B</sonic-checkbox>
172
+ </div>
173
+ </sonic-pop>
174
+ </template>
175
+ </sonic-code>
176
+
177
+ ## Keyboard
178
+
179
+ - `ArrowDown` on the trigger opens the pop.
180
+ - `Escape` closes the last opened pop and gives focus back to its trigger.
181
+
182
+ ## Methods and events
183
+
184
+ `show()` and `hide()` open and close the pop programmatically (see `manual` above). The pop dispatches a `show` event when it opens and a `hide` event when it closes.
185
+
186
+ ```js
187
+ const pop = document.querySelector("sonic-pop");
188
+ pop.addEventListener("hide", () => console.log("pop closed"));
189
+ pop.show();
190
+ ```
191
+
192
+ ## Styling
193
+
194
+ The content can be styled from outside with `::part(content)`.
195
+
196
+ ```css
197
+ sonic-pop::part(content) {
198
+ border-radius: 0;
199
+ }
200
+ ```