@supersoniks/concorde 1.1.42 → 1.1.43

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 (182) hide show
  1. package/components.js +2 -3
  2. package/concorde-core.bundle.js +37 -35
  3. package/concorde-core.es.js +5081 -4317
  4. package/core/_types/types.d.ts +26 -0
  5. package/core/_types/types.js +1 -0
  6. package/core/components/functional/date/date.d.ts +13 -5
  7. package/core/components/functional/date/date.js +48 -29
  8. package/core/components/functional/example/example.d.ts +1 -1
  9. package/core/components/functional/example/example.js +1 -1
  10. package/core/components/functional/fetch/fetch.d.ts +40 -3
  11. package/core/components/functional/fetch/fetch.js +2 -6
  12. package/core/components/functional/functional.d.ts +2 -0
  13. package/core/components/functional/functional.js +2 -0
  14. package/core/components/functional/if/if.d.ts +3 -0
  15. package/core/components/functional/if/if.js +6 -12
  16. package/core/components/functional/if/if.test.d.ts +1 -0
  17. package/core/components/functional/if/if.test.js +44 -0
  18. package/core/components/functional/list/list.d.ts +32 -8
  19. package/core/components/functional/list/list.js +33 -40
  20. package/core/components/functional/mix/mix.d.ts +22 -0
  21. package/core/components/functional/mix/mix.js +99 -0
  22. package/core/components/functional/queue/queue.d.ts +16 -3
  23. package/core/components/functional/queue/queue.js +71 -15
  24. package/core/components/functional/router/redirect.d.ts +10 -1
  25. package/core/components/functional/router/redirect.js +5 -6
  26. package/core/components/functional/router/router.d.ts +15 -1
  27. package/core/components/functional/router/router.js +1 -6
  28. package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +1 -1
  29. package/core/components/functional/sdui/SDUIDescriptorTransformer.js +24 -12
  30. package/core/components/functional/sdui/default-library.json +108 -0
  31. package/core/components/functional/sdui/sdui-utils.d.ts +5 -0
  32. package/core/components/functional/sdui/sdui-utils.js +63 -0
  33. package/core/components/functional/sdui/sdui.d.ts +16 -9
  34. package/core/components/functional/sdui/sdui.js +52 -25
  35. package/core/components/functional/sdui/types.d.ts +4 -2
  36. package/core/components/functional/states/states.d.ts +19 -3
  37. package/core/components/functional/states/states.js +7 -12
  38. package/core/components/functional/submit/submit.d.ts +16 -1
  39. package/core/components/functional/submit/submit.js +87 -17
  40. package/core/components/functional/subscriber/subscriber.d.ts +4 -1
  41. package/core/components/functional/subscriber/subscriber.js +1 -6
  42. package/core/components/functional/value/value.d.ts +7 -0
  43. package/core/components/functional/value/value.js +26 -0
  44. package/core/components/ui/_css/scroll.js +6 -7
  45. package/core/components/ui/_css/size.d.ts +1 -0
  46. package/core/components/ui/_css/size.js +3 -1
  47. package/core/components/ui/alert/alert.d.ts +2 -2
  48. package/core/components/ui/alert/alert.js +11 -16
  49. package/core/components/ui/badge/badge.d.ts +3 -1
  50. package/core/components/ui/badge/badge.js +36 -22
  51. package/core/components/ui/button/button.d.ts +23 -20
  52. package/core/components/ui/button/button.js +59 -42
  53. package/core/components/ui/captcha/captcha.d.ts +14 -2
  54. package/core/components/ui/captcha/captcha.js +17 -12
  55. package/core/components/ui/card/card-footer.js +1 -8
  56. package/core/components/ui/card/card-header-descripton.js +3 -9
  57. package/core/components/ui/card/card-header.js +1 -6
  58. package/core/components/ui/card/card-main.js +0 -5
  59. package/core/components/ui/card/card.d.ts +1 -1
  60. package/core/components/ui/card/card.js +28 -12
  61. package/core/components/ui/divider/divider.d.ts +2 -0
  62. package/core/components/ui/divider/divider.js +43 -16
  63. package/core/components/ui/form/checkbox/checkbox.d.ts +53 -16
  64. package/core/components/ui/form/checkbox/checkbox.js +53 -28
  65. package/core/components/ui/form/css/form-control.d.ts +2 -0
  66. package/core/components/ui/form/css/form-control.js +145 -67
  67. package/core/components/ui/form/fieldset/fieldset.d.ts +8 -1
  68. package/core/components/ui/form/fieldset/fieldset.js +45 -8
  69. package/core/components/ui/form/fieldset/legend-description.js +0 -5
  70. package/core/components/ui/form/fieldset/legend.js +3 -6
  71. package/core/components/ui/form/form-actions/form-actions.d.ts +2 -0
  72. package/core/components/ui/form/form-actions/form-actions.js +26 -11
  73. package/core/components/ui/form/form-layout/form-layout.d.ts +5 -2
  74. package/core/components/ui/form/form-layout/form-layout.js +31 -9
  75. package/core/components/ui/form/input/input.d.ts +15 -18
  76. package/core/components/ui/form/input/input.js +87 -52
  77. package/core/components/ui/form/input/password-helper.d.ts +1 -1
  78. package/core/components/ui/form/input/password-helper.js +3 -2
  79. package/core/components/ui/form/input/same-value-helper.d.ts +1 -1
  80. package/core/components/ui/form/input/same-value-helper.js +1 -0
  81. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +2 -3
  82. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +2 -6
  83. package/core/components/ui/form/radio/radio.d.ts +6 -0
  84. package/core/components/ui/form/radio/radio.js +7 -12
  85. package/core/components/ui/form/select/select.d.ts +23 -7
  86. package/core/components/ui/form/select/select.js +69 -38
  87. package/core/components/ui/form/textarea/textarea.d.ts +13 -13
  88. package/core/components/ui/form/textarea/textarea.js +29 -36
  89. package/core/components/ui/group/group.d.ts +11 -1
  90. package/core/components/ui/group/group.js +79 -17
  91. package/core/components/ui/icon/icon.d.ts +10 -3
  92. package/core/components/ui/icon/icon.js +16 -15
  93. package/core/components/ui/icon/icons.js +11 -8
  94. package/core/components/ui/icon/icons.json +1 -1
  95. package/core/components/ui/image/image.js +0 -5
  96. package/core/components/ui/link/link.d.ts +1 -1
  97. package/core/components/ui/link/link.js +2 -6
  98. package/core/components/ui/loader/loader.js +2 -8
  99. package/core/components/ui/menu/menu-item.js +4 -9
  100. package/core/components/ui/menu/menu.d.ts +9 -1
  101. package/core/components/ui/menu/menu.js +183 -27
  102. package/core/components/ui/modal/modal-actions.js +1 -6
  103. package/core/components/ui/modal/modal-close.d.ts +1 -0
  104. package/core/components/ui/modal/modal-close.js +14 -10
  105. package/core/components/ui/modal/modal-content.js +0 -5
  106. package/core/components/ui/modal/modal-subtitle.js +2 -6
  107. package/core/components/ui/modal/modal-title.js +0 -5
  108. package/core/components/ui/modal/modal.d.ts +7 -7
  109. package/core/components/ui/modal/modal.js +36 -36
  110. package/core/components/ui/pop/pop.d.ts +6 -5
  111. package/core/components/ui/pop/pop.js +44 -44
  112. package/core/components/ui/progress/progress.js +34 -32
  113. package/core/components/ui/table/table-caption.js +5 -10
  114. package/core/components/ui/table/table-tbody.js +10 -14
  115. package/core/components/ui/table/table-td.d.ts +2 -0
  116. package/core/components/ui/table/table-td.js +8 -5
  117. package/core/components/ui/table/table-tfoot.js +5 -7
  118. package/core/components/ui/table/table-th.d.ts +2 -0
  119. package/core/components/ui/table/table-th.js +12 -9
  120. package/core/components/ui/table/table-thead.js +1 -6
  121. package/core/components/ui/table/table-tr.js +4 -6
  122. package/core/components/ui/table/table.d.ts +0 -3
  123. package/core/components/ui/table/table.js +14 -31
  124. package/core/components/ui/taxonomy/taxonomy.d.ts +6 -3
  125. package/core/components/ui/taxonomy/taxonomy.js +9 -9
  126. package/core/components/ui/theme/theme-collection/core-variables.js +13 -11
  127. package/core/components/ui/theme/theme-collection/dark.js +1 -1
  128. package/core/components/ui/theme/theme.d.ts +1 -6
  129. package/core/components/ui/theme/theme.js +7 -36
  130. package/core/components/ui/toast/message-subscriber.d.ts +13 -7
  131. package/core/components/ui/toast/toast-item.js +1 -1
  132. package/core/components/ui/toast/toast.d.ts +2 -1
  133. package/core/components/ui/toast/toast.js +29 -14
  134. package/core/components/ui/tooltip/tooltip.d.ts +1 -0
  135. package/core/components/ui/tooltip/tooltip.js +35 -14
  136. package/core/components/ui/ui.js +0 -3
  137. package/core/core.js +5 -6
  138. package/core/mixins/Fetcher.d.ts +19 -10
  139. package/core/mixins/Fetcher.js +26 -10
  140. package/core/mixins/FormCheckable.d.ts +17 -8
  141. package/core/mixins/FormCheckable.js +177 -22
  142. package/core/mixins/FormElement.d.ts +12 -7
  143. package/core/mixins/FormElement.js +42 -26
  144. package/core/mixins/FormInput.d.ts +8 -4
  145. package/core/mixins/FormInput.js +4 -3
  146. package/core/mixins/Subscriber.d.ts +7 -5
  147. package/core/mixins/Subscriber.js +34 -32
  148. package/core/utils/Arrays.d.ts +15 -15
  149. package/core/utils/DataBindObserver.d.ts +16 -9
  150. package/core/utils/DataBindObserver.js +23 -28
  151. package/core/utils/Electron.d.ts +5 -1
  152. package/core/utils/Electron.js +4 -2
  153. package/core/utils/HTML.d.ts +9 -2
  154. package/core/utils/HTML.js +22 -3
  155. package/core/utils/LocationHandler.d.ts +6 -5
  156. package/core/utils/LocationHandler.js +19 -8
  157. package/core/utils/Objects.d.ts +7 -4
  158. package/core/utils/Objects.js +28 -6
  159. package/core/utils/{PublisherProxy.d.mts → PublisherProxy.d.ts} +40 -31
  160. package/core/utils/{PublisherProxy.mjs → PublisherProxy.js} +54 -28
  161. package/core/utils/Utils.d.ts +3 -0
  162. package/core/utils/Utils.js +18 -0
  163. package/core/utils/api.d.ts +39 -7
  164. package/core/utils/api.js +45 -32
  165. package/img/concorde-logo.svg +1 -0
  166. package/img/concorde.png +0 -0
  167. package/img/concorde_def.png +0 -0
  168. package/mixins.d.ts +36 -18
  169. package/mixins.js +3 -4
  170. package/package.json +45 -10
  171. package/svg/regular/plane.svg +1 -0
  172. package/svg/solid/plane.svg +1 -0
  173. package/test-utils/TestUtils.d.ts +4 -0
  174. package/test-utils/TestUtils.js +12 -0
  175. package/utils.d.ts +3 -1
  176. package/utils.js +7 -5
  177. package/core/components/functional/configuration/configuration.d.ts +0 -5
  178. package/core/components/functional/configuration/configuration.js +0 -22
  179. package/core/components/ui/tabs/tab.d.ts +0 -6
  180. package/core/components/ui/tabs/tab.js +0 -46
  181. package/core/components/ui/tabs/tabs.d.ts +0 -15
  182. package/core/components/ui/tabs/tabs.js +0 -129
@@ -5,54 +5,116 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { html, LitElement, css } from "lit";
8
- import { customElement } from "lit/decorators.js";
8
+ import { styleMap } from "lit/directives/style-map.js";
9
+ import { customElement, property, state, queryAssignedNodes } from "lit/decorators.js";
10
+ import { label, description } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
11
+ import { fontSize } from "@supersoniks/concorde/core/components/ui/_css/size";
12
+ import { unsafeHTML } from "lit/directives/unsafe-html.js";
9
13
  const tagName = "sonic-group";
10
14
  let Group = class Group extends LitElement {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.alignItems = "center";
18
+ this.hasDescription = false;
19
+ this.hasLabel = false;
20
+ }
11
21
  updated() {
12
22
  const children = this.querySelectorAll("sonic-input, sonic-button");
13
23
  const nbChildren = children.length;
14
24
  if (nbChildren > 1) {
15
25
  children.forEach((item, index) => {
26
+ const htmlElement = item;
16
27
  if (index === 0) {
17
- item.style.setProperty("--sc-item-rounded-tr", "0");
18
- item.style.setProperty("--sc-item-rounded-br", "0");
28
+ htmlElement.style.setProperty("--sc-item-rounded-tr", "0");
29
+ htmlElement.style.setProperty("--sc-item-rounded-br", "0");
19
30
  }
20
31
  else if (index === nbChildren - 1) {
21
- item.style.setProperty("--sc-item-rounded-tl", "0");
22
- item.style.setProperty("--sc-item-rounded-bl", "0");
32
+ htmlElement.style.setProperty("--sc-item-rounded-tl", "0");
33
+ htmlElement.style.setProperty("--sc-item-rounded-bl", "0");
23
34
  }
24
35
  else {
25
- item.style.setProperty("--sc-item-rounded-tr", "0");
26
- item.style.setProperty("--sc-item-rounded-br", "0");
27
- item.style.setProperty("--sc-item-rounded-tl", "0");
28
- item.style.setProperty("--sc-item-rounded-bl", "0");
36
+ htmlElement.style.setProperty("--sc-item-rounded-tr", "0");
37
+ htmlElement.style.setProperty("--sc-item-rounded-br", "0");
38
+ htmlElement.style.setProperty("--sc-item-rounded-tl", "0");
39
+ htmlElement.style.setProperty("--sc-item-rounded-bl", "0");
29
40
  }
30
41
  });
31
42
  }
32
43
  }
44
+ connectedCallback() {
45
+ super.connectedCallback();
46
+ this.hasSlotOrProps();
47
+ }
48
+ willUpdate(changedProperties) {
49
+ this.hasSlotOrProps();
50
+ super.willUpdate(changedProperties);
51
+ }
52
+ hasSlotOrProps() {
53
+ var _a, _b;
54
+ this.hasLabel = this.label || ((_a = this.slotLabelNodes) === null || _a === void 0 ? void 0 : _a.length) ? true : false;
55
+ this.hasDescription = this.description || ((_b = this.slotDescriptionNodes) === null || _b === void 0 ? void 0 : _b.length) ? true : false;
56
+ }
33
57
  render() {
34
- return html `<slot></slot>`;
58
+ var slotStyle = {
59
+ alignItems: this.alignItems,
60
+ };
61
+ return html `<span class="${this.hasLabel ? "form-label" : "hidden"}"
62
+ >${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
63
+ name="label"
64
+ @slotchange=${this.hasSlotOrProps}
65
+ ></slot
66
+ ></span>
67
+ <slot class="main-slot" style=${styleMap(slotStyle)}></slot>
68
+ <slot
69
+ name="description"
70
+ @slotchange=${this.hasSlotOrProps}
71
+ class="${this.hasDescription ? "form-description" : "hidden"}"
72
+ >
73
+ ${this.description ? html `${unsafeHTML(this.description)}` : ""}
74
+ </slot>`;
35
75
  }
36
76
  };
37
77
  Group.styles = [
78
+ fontSize,
79
+ label,
80
+ description,
38
81
  css `
39
82
  :host {
40
- display: inline-flex;
83
+ display: inline-block;
41
84
  vertical-align: middle;
42
85
  }
43
86
 
44
- slot {
87
+ .main-slot {
45
88
  width: 100%;
46
89
  display: flex;
47
- align-items: flex-end;
90
+ }
91
+ .hidden {
92
+ display: none;
48
93
  }
49
94
  `,
50
95
  ];
96
+ __decorate([
97
+ property({ type: String })
98
+ ], Group.prototype, "alignItems", void 0);
99
+ __decorate([
100
+ property({ type: String })
101
+ ], Group.prototype, "label", void 0);
102
+ __decorate([
103
+ property({ type: String })
104
+ ], Group.prototype, "description", void 0);
105
+ __decorate([
106
+ queryAssignedNodes({ slot: "label" })
107
+ ], Group.prototype, "slotLabelNodes", void 0);
108
+ __decorate([
109
+ queryAssignedNodes({ slot: "description" })
110
+ ], Group.prototype, "slotDescriptionNodes", void 0);
111
+ __decorate([
112
+ state()
113
+ ], Group.prototype, "hasDescription", void 0);
114
+ __decorate([
115
+ state()
116
+ ], Group.prototype, "hasLabel", void 0);
51
117
  Group = __decorate([
52
118
  customElement(tagName)
53
119
  ], Group);
54
120
  export { Group };
55
- try {
56
- customElements.define(tagName, Group);
57
- }
58
- catch (e) { }
@@ -1,8 +1,15 @@
1
1
  import { LitElement } 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
+ */
2
8
  export declare class Icon extends LitElement {
3
9
  static styles: import("lit").CSSResult;
4
- updateIcon(): Promise<void>;
5
- iconText: any;
10
+ renderId: number;
11
+ updateIcon(): void;
12
+ iconText: DirectiveResult<typeof UnsafeHTMLDirective> | string;
6
13
  /**
7
14
  * Nom identifiant l'icone ex : *info*
8
15
  */
@@ -21,5 +28,5 @@ export declare class Icon extends LitElement {
21
28
  private _library;
22
29
  get library(): string;
23
30
  set library(newLibrary: string);
24
- render(): any;
31
+ render(): DirectiveResult<typeof UnsafeHTMLDirective>;
25
32
  }
@@ -13,17 +13,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
13
13
  step((generator = generator.apply(thisArg, _arguments || [])).next());
14
14
  });
15
15
  };
16
- import { LitElement, css, nothing } from "lit";
17
- import { customElement, property } from "lit/decorators.js";
18
16
  import Icons from "@supersoniks/concorde/core/components/ui/icon/icons";
17
+ import { css, LitElement, nothing } from "lit";
18
+ import { customElement, property } from "lit/decorators.js";
19
+ const tagName = "sonic-icon";
19
20
  /**
20
21
  * Afficher l'icone choisie parmis une liste prédéfinie dans icons.json
21
22
  * les tailles suivantes sont disponible via l'attribut *size* : 2xs,xs,sm,"",lg,xl,2xl
22
23
  */
23
- const tagName = "sonic-icon";
24
24
  let Icon = class Icon extends LitElement {
25
25
  constructor() {
26
26
  super(...arguments);
27
+ this.renderId = 0;
27
28
  this.iconText = "";
28
29
  /**
29
30
  * Nom identifiant l'icone ex : *info*
@@ -39,12 +40,17 @@ let Icon = class Icon extends LitElement {
39
40
  this._library = "";
40
41
  }
41
42
  updateIcon() {
42
- return __awaiter(this, void 0, void 0, function* () {
43
- if (!this.name)
43
+ if (!this.name)
44
+ return;
45
+ this.renderId++;
46
+ const frameRenderId = this.renderId;
47
+ window.requestAnimationFrame(() => __awaiter(this, void 0, void 0, function* () {
48
+ if (frameRenderId != this.renderId) {
44
49
  return;
50
+ }
45
51
  this.iconText = yield Icons.default.get({ name: this.name, prefix: this.prefix, library: this.library });
46
52
  this.requestUpdate();
47
- });
53
+ }));
48
54
  }
49
55
  get name() {
50
56
  return this._name;
@@ -88,14 +94,14 @@ Icon.styles = css `
88
94
  width: var(--sc-icon-size, 1em);
89
95
  }
90
96
 
91
- svg:not([fill="none"]){
97
+ svg:not([fill="none"]) {
92
98
  fill: currentColor;
93
99
  }
94
100
 
95
- svg[fill="none"]{
101
+ svg[fill="none"] {
96
102
  stroke-width: 2;
97
103
  }
98
-
104
+
99
105
  :host([size="2xs"]) svg {
100
106
  --sc-icon-size: 0.625em;
101
107
  }
@@ -122,7 +128,7 @@ Icon.styles = css `
122
128
 
123
129
  :host([size="3xl"]) svg {
124
130
  --sc-icon-size: 2.8em;
125
-
131
+ }
126
132
  `;
127
133
  __decorate([
128
134
  property({ type: String })
@@ -137,8 +143,3 @@ Icon = __decorate([
137
143
  customElement(tagName)
138
144
  ], Icon);
139
145
  export { Icon };
140
- //Ajout pour la creation du cem notamment pour Storybook
141
- try {
142
- customElements.define(tagName, Icon);
143
- }
144
- catch (e) { }
@@ -8,8 +8,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  var _a;
11
- import { unsafeHTML } from "lit/directives/unsafe-html.js";
12
11
  import icons from "@supersoniks/concorde/core/components/ui/icon/icons.json";
12
+ import { unsafeHTML } from "lit/directives/unsafe-html.js";
13
13
  /**
14
14
  * Ce tableau static permet de ne pas appeler plusieurs fois le même service lors d'appel concurrents en GET.
15
15
  */
@@ -31,6 +31,9 @@ const libraries = {
31
31
  feathers: {
32
32
  url: "https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg",
33
33
  },
34
+ lucide: {
35
+ url: "https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg",
36
+ },
34
37
  material: {
35
38
  url: "https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",
36
39
  defaultPrefix: "regular",
@@ -39,6 +42,7 @@ const libraries = {
39
42
  url: "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",
40
43
  defaultPrefix: "regular",
41
44
  },
45
+ custom: { url: "", defaultPrefix: "" },
42
46
  };
43
47
  let hasEnabledCustomLibrary = false;
44
48
  function enableCustomLibrary() {
@@ -46,9 +50,9 @@ function enableCustomLibrary() {
46
50
  if (hasEnabledCustomLibrary)
47
51
  return;
48
52
  hasEnabledCustomLibrary = true;
49
- libraries.custom = {};
50
- libraries.custom.url = (_b = document.querySelector("[customIconLibraryPath]")) === null || _b === void 0 ? void 0 : _b.getAttribute("customIconLibraryPath");
51
- libraries.custom.defaultPrefix = (_c = document.querySelector("[customIconDefaultPrefix]")) === null || _c === void 0 ? void 0 : _c.getAttribute("customIconDefaultPrefix");
53
+ libraries.custom.url = ((_b = document.querySelector("[customIconLibraryPath]")) === null || _b === void 0 ? void 0 : _b.getAttribute("customIconLibraryPath")) || "";
54
+ libraries.custom.defaultPrefix =
55
+ ((_c = document.querySelector("[customIconDefaultPrefix]")) === null || _c === void 0 ? void 0 : _c.getAttribute("customIconDefaultPrefix")) || "";
52
56
  }
53
57
  export default class Icons {
54
58
  static registerIcons(newIcons) {
@@ -77,8 +81,9 @@ Icons.fontAwesomeNext = {
77
81
  }
78
82
  if (library && libraries[library]) {
79
83
  let libraryItem = libraries[library];
80
- let prefix = params.prefix || libraryItem.defaultPrefix;
84
+ let prefix = params.prefix || libraryItem.defaultPrefix || "";
81
85
  let libIcons = iconsAsRecord[library] || {};
86
+ iconsAsRecord[library] = libIcons;
82
87
  let libIconsKey = prefix + "-" + name;
83
88
  // if(!libIcons )libIcons = iconsAsRecord[library] = {};
84
89
  /**
@@ -90,8 +95,6 @@ Icons.fontAwesomeNext = {
90
95
  /**
91
96
  * on utilise une promise mutualisée pour ne pas faire plusieurs appels concurents d'une même icone
92
97
  */
93
- if (libIcons[libIconsKey])
94
- return unsafeHTML(libIcons[libIconsKey]);
95
98
  if (!loadingGetPromises.has(url)) {
96
99
  let promise = new Promise((resolve) => __awaiter(void 0, void 0, void 0, function* () {
97
100
  let result = yield fetch(url);
@@ -114,7 +117,7 @@ Icons.fontAwesomeNext = {
114
117
  */
115
118
  let result = yield loadingGetPromises.get(url);
116
119
  loadingGetPromises.delete(url);
117
- libIcons[libIconsKey] = result;
120
+ libIcons[libIconsKey] = result || "";
118
121
  return unsafeHTML(result);
119
122
  }
120
123
  /**
@@ -1 +1 @@
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": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><svg width=\"24px\" height=\"24px\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" color=\"#000000\"><path d=\"M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2\" stroke=\"#000000\" 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=\"#000000\" 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=\"#000000\" 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>", "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
+ { "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" } }
@@ -123,8 +123,3 @@ Image = __decorate([
123
123
  customElement(tagName)
124
124
  ], Image);
125
125
  export { Image };
126
- //Ajout pour la creation du cem notamment pour Storybook
127
- try {
128
- customElements.define(tagName, Image);
129
- }
130
- catch (e) { }
@@ -10,7 +10,7 @@ export declare class Link extends LitElement {
10
10
  * - strict : l'url courante match exactement avec le href du bouton
11
11
  * - partial : l'url courante match à gauche avec le href du bouton
12
12
  * - disabled : aucune activation / désactivation
13
- */
13
+ */
14
14
  autoActive: "strict" | "partial" | "disabled";
15
15
  connectedCallback(): void;
16
16
  disconnectedCallback(): void;
@@ -20,7 +20,7 @@ let Link = class Link extends LitElement {
20
20
  * - strict : l'url courante match exactement avec le href du bouton
21
21
  * - partial : l'url courante match à gauche avec le href du bouton
22
22
  * - disabled : aucune activation / désactivation
23
- */
23
+ */
24
24
  this.autoActive = "partial";
25
25
  this._target = null;
26
26
  /**
@@ -73,7 +73,7 @@ Link.styles = [
73
73
  a {
74
74
  color: inherit;
75
75
  text-decoration: none;
76
- display:contents;
76
+ display: contents;
77
77
  }
78
78
  `,
79
79
  ];
@@ -93,7 +93,3 @@ Link = __decorate([
93
93
  customElement(tagName)
94
94
  ], Link);
95
95
  export { Link };
96
- try {
97
- customElements.define(tagName, Link);
98
- }
99
- catch (e) { }
@@ -26,9 +26,8 @@ let Loader = Loader_1 = class Loader extends LitElement {
26
26
  let loader = Loader_1.loader;
27
27
  if (!conf)
28
28
  conf = {};
29
- let v = conf;
30
- for (let z in v)
31
- loader.setAttribute(z, v[z]);
29
+ if (conf.mode)
30
+ loader.setAttribute("mode", conf.mode);
32
31
  if (!conf.container) {
33
32
  conf.container = document.querySelector("sonic-theme") || document.body;
34
33
  conf.mode = "fixed";
@@ -88,8 +87,3 @@ Loader = Loader_1 = __decorate([
88
87
  customElement(tagName)
89
88
  ], Loader);
90
89
  export { Loader };
91
- //Ajout pour la creation du cem notamment pour Storybook
92
- try {
93
- customElements.define(tagName, Loader);
94
- }
95
- catch (e) { }
@@ -12,16 +12,16 @@ let MenuItem = class MenuItem extends Button {
12
12
  super();
13
13
  }
14
14
  connectedCallback() {
15
- if (!this.hasAttribute('variant')) {
15
+ if (!this.hasAttribute("variant")) {
16
16
  this.variant = "ghost";
17
17
  }
18
- if (!this.hasAttribute('type')) {
18
+ if (!this.hasAttribute("type")) {
19
19
  this.type = "primary";
20
20
  }
21
- if (!this.hasAttribute('shape')) {
21
+ if (!this.hasAttribute("shape")) {
22
22
  this.shape = "block";
23
23
  }
24
- if (!this.hasAttribute('align')) {
24
+ if (!this.hasAttribute("align")) {
25
25
  this.align = "left";
26
26
  }
27
27
  super.connectedCallback();
@@ -31,8 +31,3 @@ MenuItem = __decorate([
31
31
  customElement(tagName)
32
32
  ], MenuItem);
33
33
  export { MenuItem };
34
- //Ajout pour Storybook
35
- try {
36
- customElements.define(tagName, MenuItem);
37
- }
38
- catch (e) { }
@@ -16,18 +16,26 @@ export declare class MenuItems extends LitElement {
16
16
  /**
17
17
  * Ombre
18
18
  */
19
- shadow: "" | "sm" | "md" | 'lg' | "xl" | "none" | null;
19
+ shadow: "" | "sm" | "md" | "lg" | "xl" | "none" | null;
20
20
  moreShape: "square" | "circle";
21
+ scrollable: boolean;
22
+ observer: ResizeObserver | null;
21
23
  /**
22
24
  * Propriété min-width du bouton
23
25
  */
24
26
  minWidth: string;
27
+ menu: HTMLElement;
25
28
  menuChildren: Array<HTMLElement>;
26
29
  moreElements: Array<HTMLElement>;
27
30
  hasMoreElements: boolean;
28
31
  checkIfMore(): void;
29
32
  updated(_changedProperties: PropertyValues): void;
30
33
  mainSlotChange(): void;
34
+ connectedCallback(): void;
35
+ disconnectedCallback(): void;
36
+ updateIsScollable: () => void;
37
+ initScrollable(): void;
38
+ setScrollShadow(target: HTMLElement, direction: string): void;
31
39
  setChildrenSize(menuItems: Array<HTMLElement>): void;
32
40
  render(): import("lit-html").TemplateResult<1>;
33
41
  }