@supersoniks/concorde 1.1.28 → 1.1.30

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 (57) hide show
  1. package/README.md +0 -0
  2. package/cli.js +0 -0
  3. package/concorde-core.bundle.js +21 -22
  4. package/concorde-core.es.js +22 -23
  5. package/core/components/functional/subscriber/subscriber.d.ts +2 -1
  6. package/core/components/functional/subscriber/subscriber.js +8 -0
  7. package/core/components/ui/_css/size.d.ts +1 -0
  8. package/core/components/ui/_css/size.js +26 -0
  9. package/core/components/ui/_css/type.d.ts +2 -0
  10. package/core/components/ui/_css/{types.js → type.js} +1 -1
  11. package/core/components/ui/alert/alert.d.ts +1 -1
  12. package/core/components/ui/alert/alert.js +6 -15
  13. package/core/components/ui/badge/badge.d.ts +1 -1
  14. package/core/components/ui/badge/badge.js +7 -6
  15. package/core/components/ui/button/button.d.ts +11 -6
  16. package/core/components/ui/button/button.js +32 -35
  17. package/core/components/ui/card/card-header.js +1 -1
  18. package/core/components/ui/divider/divider.d.ts +1 -1
  19. package/core/components/ui/divider/divider.js +7 -3
  20. package/core/components/ui/form/checkbox/checkbox.d.ts +11 -9
  21. package/core/components/ui/form/checkbox/checkbox.js +10 -6
  22. package/core/components/ui/form/css/form-control.js +56 -31
  23. package/core/components/ui/form/input/input.d.ts +23 -19
  24. package/core/components/ui/form/input/input.js +35 -33
  25. package/core/components/ui/form/radio/radio.js +1 -2
  26. package/core/components/ui/form/select/select.d.ts +9 -9
  27. package/core/components/ui/form/select/select.js +8 -14
  28. package/core/components/ui/form/textarea/textarea.d.ts +18 -17
  29. package/core/components/ui/form/textarea/textarea.js +12 -23
  30. package/core/components/ui/icon/icon.js +4 -0
  31. package/core/components/ui/image/image.d.ts +0 -1
  32. package/core/components/ui/image/image.js +0 -23
  33. package/core/components/ui/pop/pop.d.ts +1 -0
  34. package/core/components/ui/pop/pop.js +8 -0
  35. package/core/components/ui/progress/progress.d.ts +1 -0
  36. package/core/components/ui/progress/progress.js +13 -20
  37. package/core/components/ui/table/table-td.d.ts +1 -0
  38. package/core/components/ui/table/table-td.js +6 -2
  39. package/core/components/ui/table/table-th.js +2 -2
  40. package/core/components/ui/table/table-tr.js +3 -2
  41. package/core/components/ui/table/table.d.ts +1 -1
  42. package/core/components/ui/table/table.js +3 -20
  43. package/core/components/ui/theme/css/tailwind.css +0 -0
  44. package/core/components/ui/theme/css/tailwind.d.ts +0 -0
  45. package/core/components/ui/theme/theme-collection/core-variables.js +19 -8
  46. package/core/components/ui/theme/theme.d.ts +8 -1
  47. package/core/components/ui/theme/theme.js +42 -1
  48. package/core/components/ui/toast/toast-item.js +1 -1
  49. package/core/mixins/FormCheckable.d.ts +3 -2
  50. package/core/mixins/FormCheckable.js +5 -2
  51. package/core/mixins/FormElement.d.ts +3 -2
  52. package/core/mixins/FormElement.js +8 -4
  53. package/core/mixins/FormInput.d.ts +6 -5
  54. package/core/mixins/FormInput.js +1 -3
  55. package/mixins.d.ts +8 -6
  56. package/package.json +5 -3
  57. package/core/components/ui/_css/types.d.ts +0 -2
@@ -1,8 +1,9 @@
1
- import { LitElement } from "lit";
1
+ import { LitElement, PropertyValues } from "lit";
2
2
  declare const SonicSubscriber_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface) & typeof LitElement;
3
3
  export declare class SonicSubscriber extends SonicSubscriber_base {
4
4
  noAutofill: boolean;
5
5
  connectedCallback(): void;
6
+ updated(changedProperties: PropertyValues): void;
6
7
  render(): import("lit-html").TemplateResult<1>;
7
8
  }
8
9
  export {};
@@ -20,6 +20,14 @@ let SonicSubscriber = class SonicSubscriber extends Subscriber(LitElement) {
20
20
  this.noShadowDom = "";
21
21
  super.connectedCallback();
22
22
  }
23
+ updated(changedProperties) {
24
+ super.updated(changedProperties);
25
+ // Display contents, notamment pour les layout dans tableaux
26
+ if (this.children.length == 0)
27
+ this.style.display = "none";
28
+ else
29
+ this.style.display = "contents";
30
+ }
23
31
  render() {
24
32
  return html `<slot></slot> `;
25
33
  }
@@ -0,0 +1 @@
1
+ export declare const fontSize: import("lit").CSSResult;
@@ -0,0 +1,26 @@
1
+ import { css } from "lit";
2
+ export const fontSize = css `
3
+ /*SIZES*/
4
+ :host {
5
+ --sc-fs: 1rem;
6
+ font-size: var(--sc-fs);
7
+ }
8
+ :host([size="2xs"]) {
9
+ --sc-fs: 0.68rem;
10
+ }
11
+ :host([size="xs"]) {
12
+ --sc-fs: 0.75rem;
13
+ }
14
+ :host([size="sm"]) {
15
+ --sc-fs: 0.875rem;
16
+ }
17
+ :host([size="lg"]) {
18
+ --sc-fs: 1.125rem;
19
+ }
20
+ :host([size="xl"]) {
21
+ --sc-fs: 1.25rem;
22
+ }
23
+ :host([size="2xl"]) {
24
+ --sc-fs: 1.5rem;
25
+ }
26
+ `;
@@ -0,0 +1,2 @@
1
+ export declare const typeColor: import("lit").CSSResult;
2
+ export declare const typesBg: import("lit").CSSResult;
@@ -1,5 +1,5 @@
1
1
  import { css } from "lit";
2
- export const typesColor = css `
2
+ export const typeColor = css `
3
3
  :host{
4
4
  --sc-color:inherit;
5
5
  color:var(--sc-color);
@@ -13,7 +13,7 @@ export declare class Alert extends LitElement {
13
13
  * Peut être renseigné dans le slot pour créer des messages plus complexes
14
14
  */
15
15
  text: string;
16
- size: "xs" | "sm" | "md" | "lg";
16
+ size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
17
17
  background: boolean;
18
18
  status: "default" | "error" | "warning" | "primary" | "info";
19
19
  render(): import("lit-html").TemplateResult<1>;
@@ -6,6 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { html, LitElement, css, nothing } from "lit";
8
8
  import { customElement, property } from "lit/decorators.js";
9
+ import { fontSize } from "@supersoniks/concorde/core/components/ui/_css/size";
9
10
  const icon = {
10
11
  warning: "warning-circled-outline",
11
12
  success: "check-circled-outline",
@@ -29,7 +30,6 @@ let Alert = class Alert extends LitElement {
29
30
  * Peut être renseigné dans le slot pour créer des messages plus complexes
30
31
  */
31
32
  this.text = "";
32
- this.size = "md";
33
33
  this.background = false;
34
34
  this.status = "default";
35
35
  }
@@ -39,24 +39,22 @@ let Alert = class Alert extends LitElement {
39
39
  ${this.status && html `<sonic-icon name=${icon[this.status]}></sonic-icon>`}
40
40
  </div>
41
41
  <div >
42
- ${this.label ? html `<span class="label">${this.label} :</span>` : nothing}
43
- ${this.text} <slot></slot>
42
+ ${this.label ? html `<span class="label">${this.label}</span>` : nothing}
43
+ <slot>${this.text}</slot>
44
44
  </div>
45
45
  </div>`;
46
46
  }
47
47
  };
48
48
  Alert.styles = [
49
+ fontSize,
49
50
  css `
50
51
  :host {
51
52
  --sc-alert-color: inherit;
52
53
  --sc-alert-rounded: var(--sc-rounded);
53
54
  --sc-alert-fw: var(--sc-font-weight-base);
54
55
  --sc-alert-fst: var(--sc-font-style-base);
55
- --sc-alert-fs: 1rem;
56
56
  --sc-alert-label-fw: bold;
57
-
58
57
  display: block;
59
- font-size: var(--sc-alert-fs);
60
58
  font-weight: var(--sc-alert-fw);
61
59
  font-style: var(--sc-alert-fst);
62
60
  }
@@ -110,15 +108,8 @@ Alert.styles = [
110
108
  position: relative;
111
109
  }
112
110
 
113
- /*SIZE*/
114
- :host([size="xs"]) {
115
- --sc-alert-fs: 0.75rem;
116
- }
117
- :host([size="sm"]) {
118
- --sc-alert-fs: 0.85rem;
119
- }
120
- :host([size="lg"]) {
121
- --sc-alert-fs: 1.2rem;
111
+ slot {
112
+ display: block;
122
113
  }
123
114
 
124
115
  /*Rounded*/
@@ -19,6 +19,6 @@ export declare class Badge extends LitElement {
19
19
  /**
20
20
  * Taille du composant, implique notamment des modifications de typo et de marge interne
21
21
  */
22
- size: "xs" | "sm" | "md" | "lg" | "xl";
22
+ size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
23
23
  render(): import("lit-html").TemplateResult<1>;
24
24
  }
@@ -25,10 +25,6 @@ let Badge = class Badge extends LitElement {
25
25
  * * outline : composant légé avec une bordure
26
26
  */
27
27
  this.variant = "default";
28
- /**
29
- * Taille du composant, implique notamment des modifications de typo et de marge interne
30
- */
31
- this.size = "md";
32
28
  }
33
29
  render() {
34
30
  return html `
@@ -42,7 +38,7 @@ Badge.styles = [
42
38
  css `
43
39
  :host {
44
40
  --sc-badge-gap: 0.3em;
45
- --sc-badge-py: 0.15em;
41
+ --sc-badge-py: 0.16em;
46
42
  --sc-badge-px: 0.66em;
47
43
  --sc-badge-fs: 1rem;
48
44
 
@@ -53,7 +49,7 @@ Badge.styles = [
53
49
  --sc-badge-border-color: transparent;
54
50
  --sc-badge-border: var(--sc-badge-border-with) solid var(--sc-badge-border-color);
55
51
 
56
- --sc-badge-rounded: 9999px;
52
+ --sc-badge-rounded: calc(var(--sc-rounded) * 1000);
57
53
  --sc-badge-line-height: 1.15;
58
54
  --sc-badge-fw: var(--sc-font-weight-base);
59
55
 
@@ -108,6 +104,11 @@ Badge.styles = [
108
104
  gap: var(--sc-badge-gap);
109
105
  }
110
106
 
107
+
108
+ :host([size="2xs"]) {
109
+ --sc-badge-fs: 0.58rem;
110
+ --sc-badge-gap: 0.3em;
111
+ }
111
112
  :host([size="xs"]) {
112
113
  --sc-badge-fs: 0.68rem;
113
114
  --sc-badge-gap: 0.35em;
@@ -17,10 +17,11 @@ declare const Button_base: {
17
17
  initPublisher(): void;
18
18
  getFormPublisher(): any;
19
19
  updateDataValue(): void;
20
- error: true | null;
20
+ handleBlur(e?: any): void;
21
+ error: boolean;
21
22
  autofocus: boolean;
23
+ required: boolean;
22
24
  disabled: true | null;
23
- required: true | null;
24
25
  formDataProvider: string;
25
26
  props: any;
26
27
  isConnected: boolean;
@@ -62,11 +63,11 @@ export declare class Button extends Button_base {
62
63
  * * gost : composant super léger visuellement
63
64
  * * outline : composant légé avec une bordure
64
65
  */
65
- variant: "default" | "ghost" | "outline" | "unstyled";
66
+ variant: "default" | "ghost" | "outline" | "unstyled" | "link";
66
67
  /**
67
68
  * Taille du composant, implique notamment des modifications de typo et de marge interne
68
69
  */
69
- size: "xs" | "sm" | "md" | "lg" | "xl";
70
+ size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
70
71
  /**
71
72
  * Forme du bouton, permet de le forcer en carré ou cercle
72
73
  */
@@ -86,11 +87,15 @@ export declare class Button extends Button_base {
86
87
  /**
87
88
  * Propriété text-align du bouton
88
89
  */
89
- align: "" | "right" | "left" | "center";
90
+ align?: "right" | "left" | "center";
90
91
  /**
91
92
  * Propriété min-width du bouton
92
93
  */
93
94
  minWidth: string;
95
+ /**
96
+ * Si un bouton n'a qu'une icone pour contenu, agrandi l'icone pour des raisons d'équilibre
97
+ */
98
+ icon: boolean;
94
99
  /**
95
100
  * mode d'activation du bouton :
96
101
  * - strict : l'url courante match exactement avec le href du bouton
@@ -121,7 +126,7 @@ export declare class Button extends Button_base {
121
126
  /**
122
127
  * Si présent on passe en mode pushstate
123
128
  */
124
- pushState: null;
129
+ pushState: boolean;
125
130
  active: boolean;
126
131
  handleNavigation(e: Event): void;
127
132
  handleChange(e?: any): void;
@@ -12,6 +12,7 @@ import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
12
12
  import FormCheckable from "@supersoniks/concorde/core/mixins/FormCheckable";
13
13
  import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
14
14
  import { ifDefined } from "lit/directives/if-defined.js";
15
+ import { fontSize } from "@supersoniks/concorde/core/components/ui/_css/size";
15
16
  const tagName = 'sonic-button';
16
17
  /**
17
18
  * Un bouton simple avec deux slots, un nommé préfix et un nomé suffix de manière à pouvoir mettre (par exemple) une icone avant ou après le contenu.
@@ -32,10 +33,6 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
32
33
  * * outline : composant légé avec une bordure
33
34
  */
34
35
  this.variant = "default";
35
- /**
36
- * Taille du composant, implique notamment des modifications de typo et de marge interne
37
- */
38
- this.size = "md";
39
36
  /**
40
37
  * Forme du bouton, permet de le forcer en carré ou cercle
41
38
  */
@@ -52,14 +49,14 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
52
49
  * Propriété justify-content de *flex* appliquée à l'élément contenant les *slots*
53
50
  */
54
51
  this.justify = "center";
55
- /**
56
- * Propriété text-align du bouton
57
- */
58
- this.align = "center";
59
52
  /**
60
53
  * Propriété min-width du bouton
61
54
  */
62
55
  this.minWidth = "0";
56
+ /**
57
+ * Si un bouton n'a qu'une icone pour contenu, agrandi l'icone pour des raisons d'équilibre
58
+ */
59
+ this.icon = false;
63
60
  /**
64
61
  * mode d'activation du bouton :
65
62
  * - strict : l'url courante match exactement avec le href du bouton
@@ -82,7 +79,7 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
82
79
  /**
83
80
  * Si présent on passe en mode pushstate
84
81
  */
85
- this.pushState = null;
82
+ this.pushState = false;
86
83
  this.active = false;
87
84
  this._location = "";
88
85
  }
@@ -163,6 +160,7 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
163
160
  }
164
161
  };
165
162
  Button.styles = [
163
+ fontSize,
166
164
  css `
167
165
  * {
168
166
  box-sizing: border-box;
@@ -171,24 +169,24 @@ Button.styles = [
171
169
  --sc-btn-gap: 0.35em;
172
170
  --sc-btn-py: 0.25em;
173
171
  --sc-btn-px: 1.1em;
174
- --sc-btn-fs: 1rem;
172
+ --sc-btn-fs: var(--sc-fs, 1rem);
175
173
  --sc-btn-fw: var(--sc-btn-font-weight);
176
174
  --sc-btn-ff: var(--sc-btn-font-family);
177
175
 
178
- --sc-btn-height: var(--sc-form-height, 2.5em);
179
- --sc-btn-color: var(--sc-base-content, #1f2937);
180
- --sc-btn-bg: var(--sc-base-100, #e5e7eb);
176
+ --sc-btn-height: var(--sc-form-height);
177
+ --sc-btn-color: var(--sc-base-content);
178
+ --sc-btn-bg: var(--sc-base-100);
181
179
 
182
180
  --sc-btn-border-style: solid;
183
- --sc-btn-border-with: var(--sc-form-border-width, 0.1rem);
181
+ --sc-btn-border-with: var(--sc-form-border-width);
184
182
  --sc-btn-border-color: transparent;
185
183
 
186
184
  --sc-btn-outline-bg-hover: var(--sc-base-100);
187
185
  --sc-btn-ghost-bg-hover: var(--sc-base-100);
188
186
 
189
187
  --sc-btn-active-color: var(--sc-base);
190
- --sc-btn-hover-filter: brightness(0.97);
191
- --sc-btn-active-filter: brightness(0.96);
188
+ --sc-btn-hover-filter: brightness(0.98);
189
+ --sc-btn-active-filter: brightness(0.97);
192
190
  --sc-btn-active-bg: var(--sc-base-content);
193
191
 
194
192
  --sc-item-rounded-tr: var(--sc-btn-rounded);
@@ -279,28 +277,13 @@ Button.styles = [
279
277
  --sc-btn-bg: var(--sc-base-600);
280
278
  }
281
279
 
282
- /*SIZE*/
283
- :host([size="2xs"]) {
284
- --sc-btn-fs: 0.6rem;
285
- }
286
- :host([size="xs"]) {
287
- --sc-btn-fs: 0.75rem;
288
- }
289
- :host([size="sm"]) {
290
- --sc-btn-fs: 0.85rem;
291
- }
292
- :host([size="lg"]) {
293
- --sc-btn-fs: 1.2rem;
294
- }
295
- :host([size="xl"]) {
296
- --sc-btn-fs: 1.5rem;
297
- }
298
280
 
299
281
  /*UNSTYLED*/
282
+ :host([variant="unstyled"]),
300
283
  :host([variant="unstyled"]) button {
301
284
  all: unset;
285
+ display: contents;
302
286
  transition: 0.1s;
303
- display: inline-flex;
304
287
  cursor: pointer;
305
288
  --sc-btn-height: auto;
306
289
  --sc-btn-width: auto;
@@ -358,12 +341,16 @@ Button.styles = [
358
341
  }
359
342
 
360
343
  /*OUTLINE*/
361
- :host([variant="link"]) {
344
+ :host([variant="link"]:not([size])) {
362
345
  vertical-align: baseline;
363
346
  margin-left:.25em;
364
347
  margin-right:.25em;
365
348
  }
366
349
 
350
+ :host([variant="link"]:not([size])) {
351
+ font-size: inherit;
352
+ }
353
+
367
354
  :host([variant="link"]) button {
368
355
  text-decoration: underline;
369
356
  padding: 0;
@@ -448,10 +435,17 @@ Button.styles = [
448
435
  permet de tous les avoir alignés dans un menu
449
436
  */
450
437
  ::slotted(sonic-icon) {
451
- min-width: 1.3em;
438
+ min-width: 1.28em;
452
439
  text-align: center;
453
440
  }
454
441
 
442
+
443
+ /*BOUTON Avec icone seulement*/
444
+ :host([icon]) ::slotted(sonic-icon) {
445
+ font-size: 1.35em;
446
+ }
447
+
448
+
455
449
  /*Tooltip ne joue pas sur le layout*/
456
450
  sonic-tooltip {
457
451
  display: contents;
@@ -530,6 +524,9 @@ __decorate([
530
524
  __decorate([
531
525
  property({ type: String })
532
526
  ], Button.prototype, "minWidth", void 0);
527
+ __decorate([
528
+ property({ type: Boolean, reflect: true })
529
+ ], Button.prototype, "icon", void 0);
533
530
  __decorate([
534
531
  property({ type: String })
535
532
  ], Button.prototype, "autoActive", void 0);
@@ -26,7 +26,7 @@ CardHeader.styles = [
26
26
  css `
27
27
 
28
28
  :host {
29
- --sc-card-header-mb: 1rem;
29
+ --sc-card-header-mb: 1.25rem;
30
30
  --sc-card-header-font-size: 1.875rem;
31
31
  --sc-card-header-font-weight: var(--sc-headings-font-weight);
32
32
  --sc-card-header-font-style: var(--sc-headings-font-style);
@@ -4,7 +4,7 @@ export declare class Divider extends LitElement {
4
4
  slotNodes: Array<Node>;
5
5
  divider: HTMLDivElement;
6
6
  label: string;
7
- size: "xs" | "md" | "sm" | "lg";
7
+ size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
8
8
  align: "left" | "right" | "center";
9
9
  firstUpdated(): void;
10
10
  render(): import("lit-html").TemplateResult<1>;
@@ -11,7 +11,6 @@ let Divider = class Divider extends LitElement {
11
11
  constructor() {
12
12
  super(...arguments);
13
13
  this.label = "";
14
- this.size = "md";
15
14
  this.align = "center";
16
15
  }
17
16
  firstUpdated() {
@@ -50,6 +49,11 @@ Divider.styles = [
50
49
  }
51
50
 
52
51
  /*SIZE*/
52
+ :host([size="2xs"]) {
53
+ --sc-divider-my: 0.35rem;
54
+ --sc-divider-fs: 0.68rem;
55
+ }
56
+
53
57
  :host([size="xs"]) {
54
58
  --sc-divider-my: 0.5rem;
55
59
  --sc-divider-fs: 0.75rem;
@@ -57,7 +61,7 @@ Divider.styles = [
57
61
 
58
62
  :host([size="sm"]) {
59
63
  --sc-divider-my: 0.75rem;
60
- --sc-divider-fs: 0.85rem;
64
+ --sc-divider-fs: 0.875rem;
61
65
  }
62
66
 
63
67
  :host([size="md"]) {
@@ -73,7 +77,7 @@ Divider.styles = [
73
77
  }
74
78
 
75
79
  :host([size="2xl"]) {
76
- --sc-divider-my: 3rem;
80
+ --sc-divider-my: 3.35rem;
77
81
  }
78
82
 
79
83
  div {
@@ -18,10 +18,11 @@ declare const Checkbox_base: {
18
18
  initPublisher(): void;
19
19
  getFormPublisher(): any;
20
20
  updateDataValue(): void;
21
- error: true | null;
21
+ handleBlur(e?: any): void;
22
+ error: boolean;
22
23
  autofocus: boolean;
24
+ required: boolean;
23
25
  disabled: true | null;
24
- required: true | null;
25
26
  formDataProvider: string;
26
27
  props: any;
27
28
  isConnected: boolean;
@@ -49,16 +50,17 @@ declare const Checkbox_base: {
49
50
  new (...args: any[]): {
50
51
  validateFormElement(): void;
51
52
  type: "number" | "search" | "file" | "button" | "password" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local";
52
- tabindex: string | null;
53
- autocomplete: "url" | "name" | "language" | "on" | "tel" | "email" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "photo" | null;
53
+ tabindex?: number | undefined;
54
+ autocomplete?: "url" | "name" | "language" | "on" | "tel" | "email" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "photo" | undefined;
54
55
  getFormPublisher(): any;
55
56
  updateDataValue(): void;
56
57
  handleChange(e?: any): void;
58
+ handleBlur(e?: any): void;
57
59
  getValueForFormPublisher(): any;
58
- error: true | null;
60
+ error: boolean;
59
61
  autofocus: boolean;
62
+ required: boolean;
60
63
  disabled: true | null;
61
- required: true | null;
62
64
  formDataProvider: string;
63
65
  _value: any;
64
66
  value: any;
@@ -92,10 +94,10 @@ export declare class Checkbox extends Checkbox_base {
92
94
  static styles: CSSResultGroup[];
93
95
  touched: boolean;
94
96
  iconName: string;
95
- description: string;
96
- label: string;
97
+ description?: string;
98
+ label?: string;
97
99
  slotDescriptionNodes: Array<Node>;
98
- hasDescription: true | false;
100
+ hasDescription: boolean;
99
101
  updated(): void;
100
102
  connectedCallback(): void;
101
103
  render(): import("lit-html").TemplateResult<1>;
@@ -12,6 +12,7 @@ import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
12
12
  import FormInput from "@supersoniks/concorde/core/mixins/FormInput";
13
13
  import FormCheckable from "@supersoniks/concorde/core/mixins/FormCheckable";
14
14
  import "@supersoniks/concorde/core/components/ui/icon/icon";
15
+ import { fontSize } from "@supersoniks/concorde/core/components/ui/_css/size";
15
16
  /**
16
17
  * ### Le composent sonic-checkbox étend les mixins FormCheckable, FormInput, FormElement et Subscriber
17
18
  * **FormElement :**
@@ -38,8 +39,6 @@ let Checkbox = class Checkbox extends FormCheckable(FormInput(FormElement(Subscr
38
39
  super(...arguments);
39
40
  this.touched = false;
40
41
  this.iconName = "check";
41
- this.description = "";
42
- this.label = "";
43
42
  this.hasDescription = false;
44
43
  }
45
44
  updated() {
@@ -57,8 +56,9 @@ let Checkbox = class Checkbox extends FormCheckable(FormInput(FormElement(Subscr
57
56
  <input
58
57
  type="${this.type}"
59
58
  @change=${this.handleChange}
59
+ @blur=${this.handleBlur}
60
+ ?required=${this.required}
60
61
  .disabled=${ifDefined(this.disabled)}
61
- .required=${ifDefined(this.required)}
62
62
  .checked=${ifDefined(this.checked)}
63
63
  .name=${this.name}
64
64
  .value=${this.value}
@@ -80,21 +80,24 @@ let Checkbox = class Checkbox extends FormCheckable(FormInput(FormElement(Subscr
80
80
  }
81
81
  };
82
82
  Checkbox.styles = [
83
+ fontSize,
83
84
  css `
84
-
85
85
  :host{
86
86
  --sc-checkbox-border-width: var(--sc-form-border-width);
87
87
  --sc-checkbox-border-color: transparent;
88
88
  }
89
+
89
90
  * {
90
91
  box-sizing: border-box;
91
92
  }
93
+
92
94
  .checkbox-container {
93
95
  min-height: 1.4em;
94
96
  display: flex;
95
97
  gap: 0.5em;
96
98
  line-height: 1.2;
97
99
  align-items: flex-start;
100
+ font-size: var(--sc-fs);
98
101
  }
99
102
 
100
103
  .icon-container {
@@ -104,10 +107,11 @@ Checkbox.styles = [
104
107
  }
105
108
 
106
109
  input {
110
+ box-sizing: border-box;
107
111
  appearance: none;
108
112
  flex-shrink: 0;
109
- height: 1.5em;
110
- width: 1.5em;
113
+ height: calc(var(--sc-fs) * 1.25);
114
+ width: calc(var(--sc-fs) * 1.25);
111
115
  display: block;
112
116
  cursor: pointer;
113
117
  border-radius: 0.25em;