@supersoniks/concorde 1.1.28 → 1.1.31

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 (66) hide show
  1. package/concorde-core.bundle.js +23 -23
  2. package/concorde-core.es.js +23 -23
  3. package/core/components/functional/date/date.js +8 -2
  4. package/core/components/functional/list/list.js +17 -11
  5. package/core/components/functional/submit/submit.js +46 -30
  6. package/core/components/functional/subscriber/subscriber.d.ts +2 -1
  7. package/core/components/functional/subscriber/subscriber.js +8 -0
  8. package/core/components/ui/_css/size.d.ts +1 -0
  9. package/core/components/ui/_css/size.js +26 -0
  10. package/core/components/ui/_css/type.d.ts +2 -0
  11. package/core/components/ui/_css/{types.js → type.js} +1 -1
  12. package/core/components/ui/alert/alert.d.ts +1 -1
  13. package/core/components/ui/alert/alert.js +7 -16
  14. package/core/components/ui/badge/badge.d.ts +1 -1
  15. package/core/components/ui/badge/badge.js +7 -6
  16. package/core/components/ui/button/button.d.ts +11 -6
  17. package/core/components/ui/button/button.js +32 -35
  18. package/core/components/ui/captcha/captcha.d.ts +16 -0
  19. package/core/components/ui/captcha/captcha.js +54 -0
  20. package/core/components/ui/card/card-header.js +1 -1
  21. package/core/components/ui/divider/divider.d.ts +1 -1
  22. package/core/components/ui/divider/divider.js +7 -3
  23. package/core/components/ui/form/checkbox/checkbox.d.ts +51 -11
  24. package/core/components/ui/form/checkbox/checkbox.js +10 -6
  25. package/core/components/ui/form/css/form-control.js +56 -31
  26. package/core/components/ui/form/input/input.d.ts +23 -19
  27. package/core/components/ui/form/input/input.js +35 -33
  28. package/core/components/ui/form/radio/radio.js +1 -2
  29. package/core/components/ui/form/select/select.d.ts +9 -9
  30. package/core/components/ui/form/select/select.js +8 -14
  31. package/core/components/ui/form/textarea/textarea.d.ts +18 -17
  32. package/core/components/ui/form/textarea/textarea.js +12 -23
  33. package/core/components/ui/icon/icon.js +4 -0
  34. package/core/components/ui/image/image.d.ts +0 -1
  35. package/core/components/ui/image/image.js +0 -23
  36. package/core/components/ui/pop/pop.d.ts +1 -0
  37. package/core/components/ui/pop/pop.js +8 -0
  38. package/core/components/ui/progress/progress.d.ts +1 -0
  39. package/core/components/ui/progress/progress.js +13 -20
  40. package/core/components/ui/table/table-td.d.ts +1 -0
  41. package/core/components/ui/table/table-td.js +6 -2
  42. package/core/components/ui/table/table-th.js +2 -2
  43. package/core/components/ui/table/table-tr.js +3 -2
  44. package/core/components/ui/table/table.d.ts +1 -1
  45. package/core/components/ui/table/table.js +3 -20
  46. package/core/components/ui/taxonomy/taxonomy.js +2 -1
  47. package/core/components/ui/theme/theme-collection/core-variables.js +19 -8
  48. package/core/components/ui/theme/theme.d.ts +9 -1
  49. package/core/components/ui/theme/theme.js +47 -2
  50. package/core/components/ui/toast/toast-item.js +25 -7
  51. package/core/components/ui/toast/toast.js +6 -2
  52. package/core/components/ui/ui.d.ts +1 -0
  53. package/core/components/ui/ui.js +1 -0
  54. package/core/mixins/Fetcher.js +4 -0
  55. package/core/mixins/FormCheckable.d.ts +3 -5
  56. package/core/mixins/FormCheckable.js +5 -2
  57. package/core/mixins/FormElement.d.ts +3 -2
  58. package/core/mixins/FormElement.js +8 -4
  59. package/core/mixins/FormInput.d.ts +6 -9
  60. package/core/mixins/FormInput.js +1 -3
  61. package/core/utils/PublisherProxy.d.mts +1 -1
  62. package/core/utils/PublisherProxy.mjs +3 -3
  63. package/core/utils/api.js +4 -2
  64. package/mixins.d.ts +8 -6
  65. package/package.json +7 -3
  66. package/core/components/ui/_css/types.d.ts +0 -2
@@ -17,9 +17,9 @@ const tagName = "sonic-radio";
17
17
  let Radio = class Radio extends Checkbox {
18
18
  constructor() {
19
19
  super();
20
+ this.radio = true;
20
21
  }
21
22
  connectedCallback() {
22
- this.radio = true;
23
23
  // this.iconName = "circle-small";
24
24
  // this.iconPrefix = "solid";
25
25
  super.connectedCallback();
@@ -32,7 +32,6 @@ Radio.styles = [
32
32
  :host input {
33
33
  border-radius: 50%;
34
34
  }
35
-
36
35
  :host sonic-icon {
37
36
  border-radius: 50%;
38
37
  overflow: hidden;
@@ -5,9 +5,9 @@ export declare class Select extends Select_base {
5
5
  static styles: import("lit").CSSResult[];
6
6
  valueKey: string;
7
7
  wordingKey: string;
8
- multiple: null;
9
- size: "" | "xs" | "sm" | "lg";
10
- selectSize: string | null;
8
+ multiple: boolean;
9
+ size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
10
+ selectSize?: number;
11
11
  private _options;
12
12
  set options(value: Array<any>);
13
13
  get options(): Array<any>;
@@ -15,16 +15,16 @@ export declare class Select extends Select_base {
15
15
  get value(): string;
16
16
  set value(value: string);
17
17
  connectedCallback(): void;
18
- label: string;
19
- description: string;
18
+ label?: string;
19
+ description?: string;
20
20
  slotLabelNodes: Array<Node>;
21
21
  slotDescriptionNodes: Array<Node>;
22
22
  slotSuffixNodes: Array<Node>;
23
23
  slotPrefixNodes: Array<Node>;
24
- hasDescription: true | false;
25
- hasLabel: true | false;
26
- hasSuffix: true | false;
27
- hasPrefix: true | false;
24
+ hasDescription: boolean;
25
+ hasLabel: boolean;
26
+ hasSuffix: boolean;
27
+ hasPrefix: boolean;
28
28
  updated(): void;
29
29
  onSlotChange(): void;
30
30
  validateFormElement(): void;
@@ -27,17 +27,9 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
27
27
  super(...arguments);
28
28
  this.valueKey = "value";
29
29
  this.wordingKey = "wording";
30
- this.multiple = null;
31
- this.size = "";
32
- this.selectSize = null;
30
+ this.multiple = false;
33
31
  this._options = [];
34
32
  this._value = "";
35
- /*
36
- * TODO
37
- * Mutualiser avec le composant select
38
- */
39
- this.label = "";
40
- this.description = "";
41
33
  this.hasDescription = false;
42
34
  this.hasLabel = false;
43
35
  this.hasSuffix = false;
@@ -117,10 +109,12 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
117
109
  <div class="form-select-wrapper">
118
110
  <select
119
111
  @change=${this.handleChange}
120
- disabled=${ifDefined(this.multiple)}
112
+ @blur=${this.handleBlur}
113
+ disabled=${ifDefined(this.disabled)}
114
+ ?required=${this.required}
115
+ ?multiple=${this.multiple}
121
116
  size=${ifDefined(this.selectSize)}
122
- autofocus=${ifDefined(this.autofocus)}
123
- required=${ifDefined(this.required)}
117
+ ?autofocus=${this.autofocus}
124
118
  .value="${this.value}"
125
119
  class="form-element"
126
120
  >
@@ -182,10 +176,10 @@ __decorate([
182
176
  property({ type: Boolean })
183
177
  ], Select.prototype, "multiple", void 0);
184
178
  __decorate([
185
- property({ type: String })
179
+ property({ type: String, reflect: true })
186
180
  ], Select.prototype, "size", void 0);
187
181
  __decorate([
188
- property({ type: String })
182
+ property({ type: Number })
189
183
  ], Select.prototype, "selectSize", void 0);
190
184
  __decorate([
191
185
  property({ type: Array })
@@ -3,16 +3,17 @@ declare const Textarea_base: {
3
3
  new (...args: any[]): {
4
4
  validateFormElement(): void;
5
5
  type: "number" | "search" | "file" | "button" | "password" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local";
6
- tabindex: string | null;
7
- 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;
6
+ tabindex?: number | undefined;
7
+ 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;
8
8
  getFormPublisher(): any;
9
9
  updateDataValue(): void;
10
10
  handleChange(e?: any): void;
11
+ handleBlur(e?: any): void;
11
12
  getValueForFormPublisher(): any;
12
- error: true | null;
13
+ error: boolean;
13
14
  autofocus: boolean;
15
+ required: boolean;
14
16
  disabled: true | null;
15
- required: true | null;
16
17
  formDataProvider: string;
17
18
  _value: any;
18
19
  value: any;
@@ -45,23 +46,23 @@ declare const Textarea_base: {
45
46
  export declare class Textarea extends Textarea_base {
46
47
  static styles: import("lit").CSSResult[];
47
48
  size: "" | "xs" | "sm" | "lg";
48
- rows: string;
49
- cols: string;
50
- maxlength: string;
51
- minlength: string;
52
- wrap: "hard" | "soft" | null;
53
- readonly: boolean | null;
54
- placeholder: string;
55
- label: string;
56
- description: string;
49
+ rows?: number;
50
+ cols?: number;
51
+ maxlength?: number;
52
+ minlength?: number;
53
+ wrap?: "hard" | "soft";
54
+ readonly: boolean;
55
+ placeholder?: string;
56
+ label?: string;
57
+ description?: string;
57
58
  slotLabelNodes: Array<Node>;
58
59
  slotDescriptionNodes: Array<Node>;
59
60
  slotSuffixNodes: Array<Node>;
60
61
  slotPrefixNodes: Array<Node>;
61
- hasDescription: true | false;
62
- hasLabel: true | false;
63
- hasSuffix: true | false;
64
- hasPrefix: true | false;
62
+ hasDescription: boolean;
63
+ hasLabel: boolean;
64
+ hasSuffix: boolean;
65
+ hasPrefix: boolean;
65
66
  slotClasses: {};
66
67
  updated(): void;
67
68
  onSlotChange(): void;
@@ -20,19 +20,7 @@ let Textarea = class Textarea extends FormInput(FormElement(Subscriber(LitElemen
20
20
  // type: "" | "primary" | "warning" | "danger" | "success" | "info" = "";
21
21
  // @property({ type: String }) variant: "" | "ghost" | "outline" = "";
22
22
  this.size = "";
23
- this.rows = "";
24
- this.cols = "";
25
- this.maxlength = "";
26
- this.minlength = "";
27
- this.wrap = null;
28
- this.readonly = null;
29
- this.placeholder = "";
30
- /*
31
- * TODO
32
- * Mutualiser avec le composant select
33
- */
34
- this.label = "";
35
- this.description = "";
23
+ this.readonly = false;
36
24
  this.hasDescription = false;
37
25
  this.hasLabel = false;
38
26
  this.hasSuffix = false;
@@ -67,21 +55,22 @@ let Textarea = class Textarea extends FormInput(FormElement(Subscriber(LitElemen
67
55
  <div class="form-control">
68
56
  <textarea
69
57
  @input=${this.handleChange}
70
- ?disabled=${this.disabled}
58
+ @blur=${this.handleBlur}
59
+ disabled=${ifDefined(this.disabled)}
71
60
  ?required=${this.required}
72
- autocomplete=${ifDefined(this.autocomplete)}
73
- autofocus=${ifDefined(this.autofocus)}
61
+ ?autofocus=${this.autofocus}
74
62
  rows=${ifDefined(this.rows)}
75
63
  cols=${ifDefined(this.cols)}
76
64
  maxlength=${ifDefined(this.maxlength)}
77
65
  minlength=${ifDefined(this.minlength)}
78
66
  ?readonly=${this.readonly}
79
67
  spellcheck=${ifDefined(this.spellcheck)}
68
+ autocomplete=${ifDefined(this.autocomplete)}
69
+ tabindex=${ifDefined(this.tabindex)}
80
70
  wrap=${ifDefined(this.wrap)}
81
- class="form-element textarea custom-scroll"
82
71
  placeholder="${this.placeholder}"
83
- >
84
- ${this.value}</textarea
72
+ class="form-element textarea custom-scroll"
73
+ >${this.value}</textarea
85
74
  >
86
75
  </div>
87
76
 
@@ -104,16 +93,16 @@ __decorate([
104
93
  property({ type: String })
105
94
  ], Textarea.prototype, "size", void 0);
106
95
  __decorate([
107
- property({ type: String })
96
+ property({ type: Number })
108
97
  ], Textarea.prototype, "rows", void 0);
109
98
  __decorate([
110
- property({ type: String })
99
+ property({ type: Number })
111
100
  ], Textarea.prototype, "cols", void 0);
112
101
  __decorate([
113
- property({ type: String })
102
+ property({ type: Number })
114
103
  ], Textarea.prototype, "maxlength", void 0);
115
104
  __decorate([
116
- property({ type: String })
105
+ property({ type: Number })
117
106
  ], Textarea.prototype, "minlength", void 0);
118
107
  __decorate([
119
108
  property({ type: String })
@@ -119,6 +119,10 @@ Icon.styles = css `
119
119
  :host([size="2xl"]) svg {
120
120
  --sc-icon-size: 2em;
121
121
  }
122
+
123
+ :host([size="3xl"]) svg {
124
+ --sc-icon-size: 2.8em;
125
+
122
126
  `;
123
127
  __decorate([
124
128
  property({ type: String })
@@ -8,7 +8,6 @@ export declare class Image extends LitElement {
8
8
  ratio: string;
9
9
  objectPosition: string;
10
10
  imageRendering: string;
11
- shadow: "" | "none" | "sm" | "md";
12
11
  cover: boolean;
13
12
  render(): import("lit-html").TemplateResult<1>;
14
13
  }
@@ -18,7 +18,6 @@ let Image = class Image extends LitElement {
18
18
  this.ratio = "auto";
19
19
  this.objectPosition = "center center";
20
20
  this.imageRendering = "auto";
21
- this.shadow = "none";
22
21
  this.cover = false;
23
22
  }
24
23
  render() {
@@ -83,25 +82,6 @@ Image.styles = [
83
82
  --sc-img-radius: 0 !important;
84
83
  }
85
84
 
86
- /*OMBRE*/
87
- :host([shadow]) > div,
88
- :host([shadow="md"]) > div,
89
- :host([shadow="true"]) > div {
90
- box-shadow: var(--sc-shadow);
91
- }
92
-
93
- :host([shadow="sm"]) > div {
94
- box-shadow: var(--sc-shadow-sm);
95
- }
96
-
97
- :host([shadow="none"]) > div {
98
- box-shadow: none;
99
- }
100
-
101
- :host([shadow="lg"]) > div {
102
- box-shadow: var(--sc-shadow-lg);
103
- }
104
-
105
85
  :host([cover]),
106
86
  :host([cover]) > div,
107
87
  :host([cover]) img {
@@ -136,9 +116,6 @@ __decorate([
136
116
  __decorate([
137
117
  property({ type: String })
138
118
  ], Image.prototype, "imageRendering", void 0);
139
- __decorate([
140
- property({ type: String, reflect: true })
141
- ], Image.prototype, "shadow", void 0);
142
119
  __decorate([
143
120
  property({ type: Boolean, reflect: true })
144
121
  ], Image.prototype, "cover", void 0);
@@ -7,6 +7,7 @@ export declare class Pop extends LitElement {
7
7
  popBtn: HTMLElement;
8
8
  popContent: HTMLElement;
9
9
  toggle: "true" | "false";
10
+ inline: boolean;
10
11
  /**
11
12
  * Ombre
12
13
  */
@@ -14,6 +14,7 @@ let Pop = Pop_1 = class Pop extends LitElement {
14
14
  super(...arguments);
15
15
  this.open = false;
16
16
  this.toggle = "true";
17
+ this.inline = false;
17
18
  /**
18
19
  * Ombre
19
20
  */
@@ -196,6 +197,10 @@ Pop.styles = [
196
197
  :host([shadow="lg"]) slot[name="content"] {
197
198
  box-shadow: var(--sc-shadow-lg);
198
199
  }
200
+
201
+ :host([inline]) {
202
+ vertical-align: baseline;
203
+ }
199
204
  `,
200
205
  ];
201
206
  __decorate([
@@ -210,6 +215,9 @@ __decorate([
210
215
  __decorate([
211
216
  property({ type: String })
212
217
  ], Pop.prototype, "toggle", void 0);
218
+ __decorate([
219
+ property({ type: Boolean, reflect: true })
220
+ ], Pop.prototype, "inline", void 0);
213
221
  __decorate([
214
222
  property({ type: String, reflect: true })
215
223
  ], Pop.prototype, "shadow", void 0);
@@ -3,6 +3,7 @@ export declare class Progress extends LitElement {
3
3
  static styles: import("lit").CSSResult[];
4
4
  value?: number;
5
5
  max: number;
6
+ invert: boolean;
6
7
  type: "default" | "primary" | "warning" | "danger" | "success" | "info";
7
8
  size: "xs" | "sm" | "md" | "lg" | "xl";
8
9
  render(): import("lit-html").TemplateResult<1>;
@@ -7,11 +7,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { html, LitElement, css } from "lit";
8
8
  import { customElement, property } from "lit/decorators.js";
9
9
  import { ifDefined } from "lit/directives/if-defined.js";
10
+ import { fontSize } from "@supersoniks/concorde/core/components/ui/_css/size";
10
11
  const tagName = "sonic-progress";
11
12
  let Progress = class Progress extends LitElement {
12
13
  constructor() {
13
14
  super(...arguments);
14
15
  this.max = 100;
16
+ this.invert = false;
15
17
  this.type = "default";
16
18
  this.size = "md";
17
19
  }
@@ -26,12 +28,13 @@ let Progress = class Progress extends LitElement {
26
28
  }
27
29
  };
28
30
  Progress.styles = [
31
+ fontSize,
29
32
  css `
30
33
  :host {
31
34
  --sc-progress-bg: var(--sc-input-bg, var(--sc-base-100, #f5f5f5));
32
35
  --sc-progress-color: var(--sc-base-content, #1f2937);
33
- --sc-progress-height: .6rem;
34
- --sc-progress-fs: 1rem;
36
+ --sc-progress-height: .6em;
37
+ --sc-progress-fs: var(--sc-fs, 1rem);
35
38
  --sc-progress-fw: 500;
36
39
  --sc-progress-rounded: var(--sc-rounded-lg);
37
40
  display: block;
@@ -103,25 +106,11 @@ Progress.styles = [
103
106
  --sc-progress-color: var(--sc-success);
104
107
  }
105
108
 
106
- /* SIZES */
107
- :host([size="xs"]) {
108
- --sc-progress-height:.25rem;
109
- --sc-progress-fs: 0.68rem;
109
+ :host([invert]) {
110
+ --sc-progress-bg: var(--sc-base-700);
110
111
  }
111
-
112
- :host([size="sm"]) {
113
- --sc-progress-height:.4rem;
114
- --sc-progress-fs: 0.85rem;
115
- }
116
-
117
- :host([size="lg"]) {
118
- --sc-progress-height:1rem;
119
- --sc-progress-fs: 1.25rem;
120
- }
121
-
122
- :host([size="xl"]) {
123
- --sc-progress-height:1.5rem;
124
- --sc-progress-fs: 1.5rem;
112
+ :host([type="default"][invert]) {
113
+ --sc-progress-color: var(--sc-base);
125
114
  }
126
115
 
127
116
  slot[name="remaining"] {
@@ -135,6 +124,7 @@ Progress.styles = [
135
124
  display:flex;
136
125
  justify-content: space-between;
137
126
  gap:.5em;
127
+ margin-top:.15em;
138
128
  }
139
129
  `
140
130
  ];
@@ -144,6 +134,9 @@ __decorate([
144
134
  __decorate([
145
135
  property({ type: Number })
146
136
  ], Progress.prototype, "max", void 0);
137
+ __decorate([
138
+ property({ type: Boolean })
139
+ ], Progress.prototype, "invert", void 0);
147
140
  __decorate([
148
141
  property({ type: String, reflect: true })
149
142
  ], Progress.prototype, "type", void 0);
@@ -4,6 +4,7 @@ export declare class TableTd extends LitElement {
4
4
  colSpan?: number;
5
5
  rowSpan?: number;
6
6
  align?: string;
7
+ vAlign?: string;
7
8
  minWidth?: string;
8
9
  render(): import("lit-html").TemplateResult<1>;
9
10
  }
@@ -9,11 +9,12 @@ import { customElement, property } from "lit/decorators.js";
9
9
  import { ifDefined } from "lit/directives/if-defined.js";
10
10
  import { styleMap } from "lit/directives/style-map.js";
11
11
  const tagName = "sonic-td";
12
- import { typesColor } from "@supersoniks/concorde/core/components/ui/_css/types";
12
+ import { typeColor } from "@supersoniks/concorde/core/components/ui/_css/type";
13
13
  let TableTd = class TableTd extends LitElement {
14
14
  render() {
15
15
  const styles = {
16
16
  textAlign: this.align,
17
+ verticalAlign: this.vAlign,
17
18
  minWidth: this.minWidth,
18
19
  };
19
20
  return html `<td
@@ -27,7 +28,7 @@ let TableTd = class TableTd extends LitElement {
27
28
  }
28
29
  };
29
30
  TableTd.styles = [
30
- typesColor,
31
+ typeColor,
31
32
  css `
32
33
  :host {
33
34
  display: contents;
@@ -48,6 +49,9 @@ __decorate([
48
49
  __decorate([
49
50
  property({ type: String })
50
51
  ], TableTd.prototype, "align", void 0);
52
+ __decorate([
53
+ property({ type: String })
54
+ ], TableTd.prototype, "vAlign", void 0);
51
55
  __decorate([
52
56
  property({ type: String })
53
57
  ], TableTd.prototype, "minWidth", void 0);
@@ -8,7 +8,7 @@ import { html, LitElement, css } from "lit";
8
8
  import { customElement, property } from "lit/decorators.js";
9
9
  import { ifDefined } from "lit/directives/if-defined.js";
10
10
  import { styleMap } from "lit/directives/style-map.js";
11
- import { typesColor } from "@supersoniks/concorde/core/components/ui/_css/types";
11
+ import { typeColor } from "@supersoniks/concorde/core/components/ui/_css/type";
12
12
  const tagName = "sonic-th";
13
13
  let TableTh = class TableTh extends LitElement {
14
14
  render() {
@@ -27,7 +27,7 @@ let TableTh = class TableTh extends LitElement {
27
27
  }
28
28
  };
29
29
  TableTh.styles = [
30
- typesColor,
30
+ typeColor,
31
31
  css `
32
32
  :host {
33
33
  display: contents;
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { html, LitElement, css } from "lit";
8
8
  import { customElement } from "lit/decorators.js";
9
- import { typesColor } from "@supersoniks/concorde/core/components/ui/_css/types";
9
+ import { typeColor } from "@supersoniks/concorde/core/components/ui/_css/type";
10
10
  const tagName = "sonic-tr";
11
11
  let TableTr = class TableTr extends LitElement {
12
12
  render() {
@@ -14,11 +14,12 @@ let TableTr = class TableTr extends LitElement {
14
14
  }
15
15
  };
16
16
  TableTr.styles = [
17
- typesColor,
17
+ typeColor,
18
18
  css `
19
19
  :host {
20
20
  display: table-row;
21
21
  }
22
+
22
23
  `
23
24
  ];
24
25
  TableTr = __decorate([
@@ -8,7 +8,7 @@ import "@supersoniks/concorde/core/components/ui/table/table-tfoot";
8
8
  import "@supersoniks/concorde/core/components/ui/table/table-caption";
9
9
  export declare class Table extends LitElement {
10
10
  static styles: import("lit").CSSResult[];
11
- size: "xs" | "sm" | "md" | "lg" | "xl";
11
+ size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
12
12
  striped: boolean;
13
13
  sticky: boolean;
14
14
  bordered: boolean;
@@ -15,11 +15,11 @@ import "@supersoniks/concorde/core/components/ui/table/table-thead";
15
15
  import "@supersoniks/concorde/core/components/ui/table/table-tbody";
16
16
  import "@supersoniks/concorde/core/components/ui/table/table-tfoot";
17
17
  import "@supersoniks/concorde/core/components/ui/table/table-caption";
18
+ import { fontSize } from "@supersoniks/concorde/core/components/ui/_css/size";
18
19
  const tagName = "sonic-table";
19
20
  let Table = class Table extends LitElement {
20
21
  constructor() {
21
22
  super(...arguments);
22
- this.size = "md";
23
23
  this.striped = false;
24
24
  this.sticky = false;
25
25
  this.bordered = false;
@@ -41,6 +41,7 @@ let Table = class Table extends LitElement {
41
41
  };
42
42
  Table.styles = [
43
43
  customScroll,
44
+ fontSize,
44
45
  css `
45
46
  :host {
46
47
  --sc-table-fw: var(--sc-font-weight-base);
@@ -56,38 +57,20 @@ Table.styles = [
56
57
  --sc-table-th-py: calc(1.8 * var(--sc-table-td-py) );
57
58
  --sc-table-td-px: .5em;
58
59
  --sc-table-td-py: .5em;
59
-
60
60
  display:block;
61
61
  }
62
62
 
63
- .table-container {
63
+ :host([maxHeight]) .table-container {
64
64
  overflow-x: auto;
65
65
  -webkit-overflow-scrolling: touch;
66
66
  }
67
67
 
68
68
  .table {
69
69
  width: 100%;
70
- font-size: var(--sc-table-fs);
71
70
  display: table;
72
71
  box-sizing:border-box;
73
72
  }
74
73
 
75
- /*SIZES*/
76
- :host([size="2xs"]) {
77
- --sc-table-fs: 0.6rem;
78
- }
79
- :host([size="xs"]) {
80
- --sc-table-fs: 0.75rem;
81
- }
82
- :host([size="sm"]) {
83
- --sc-table-fs: 0.85rem;
84
- }
85
- :host([size="lg"]) {
86
- --sc-table-fs: 1.2rem;
87
- }
88
- :host([size="xl"]) {
89
- --sc-table-fs: 1.5rem;
90
- }
91
74
  :host([bordered]) .table-container {
92
75
  border:var(--sc-border-width) solid var(--sc-table-border-color) !important;
93
76
  }
@@ -10,6 +10,7 @@ import { repeat } from "lit/directives/repeat.js";
10
10
  import "@supersoniks/concorde/core/components/ui/icon/icon";
11
11
  import "@supersoniks/concorde/core/components/ui/badge/badge";
12
12
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
13
+ import { ifDefined } from "lit/directives/if-defined.js";
13
14
  const tagName = "sonic-taxonomy";
14
15
  /**
15
16
  * Le composant taxonomy crée un badge (*sonic-badge*) contenant une liste de termes préfixés par une icone (*sonic-icon*) optionelle séparées par une chaine html séparatrice (*separator*)
@@ -61,7 +62,7 @@ let Taxonomy = class Taxonomy extends LitElement {
61
62
  this.style.removeProperty("display");
62
63
  return html `
63
64
  <sonic-badge type=${this.type} variant=${this.variant} size=${this.size}>
64
- <sonic-icon slot="prefix" name=${this.icon.name} prefix=${this.icon.prefix}></sonic-icon>
65
+ <sonic-icon slot="prefix" library=${ifDefined(this.icon.library)} prefix=${ifDefined(this.icon.prefix)} name=${ifDefined(this.icon.name)} ></sonic-icon>
65
66
  <span class="taxonomy-list">
66
67
  ${repeat(taxo, (item) => item[this.key + "_id"], (item) => {
67
68
  return html `<span> ${item[this.key + "_name"]}</span
@@ -20,35 +20,46 @@ export const coreVariables = css `
20
20
 
21
21
  /* ROUNDED*/
22
22
  --sc-rounded-sm: calc(var(--sc-rounded) * 0.5);
23
- --sc-rounded: 0.35rem;
23
+ --sc-rounded: 0.375rem;
24
24
  --sc-rounded-md: calc(var(--sc-rounded) * 1.8);
25
25
  --sc-rounded-lg: calc(var(--sc-rounded) * 3.5);
26
26
  --sc-rounded-xl: calc(var(--sc-rounded) * 7);
27
+ --sc-rounded-size-intensity: calc((1em - 1rem) * .4);
27
28
 
28
- --sc-btn-rounded: calc(var(--sc-rounded) * 1.2);
29
+ /* 4 for rounded full*/
30
+ --sc-btn-rounded-intensity : 1.4;
31
+ --sc-btn-font-weight: 500;
32
+ --sc-btn-rounded: calc((var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-btn-rounded-intensity) );
29
33
 
30
34
  /* Placeholder */
31
35
  --sc-placeholder-bg: rgba(17, 24, 39, 0.05);
32
36
 
33
- /* Images*/
37
+ /* OMBRES */
34
38
  --sc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
35
39
  --sc-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
36
40
  --sc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
37
41
  --sc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
38
42
  --sc-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
39
43
 
40
- /* formulaires*/
41
- --sc-border-width: max(1px, 0.085rem);
44
+ /* Forms */
45
+ --sc-border-width: max(1px, 0.12rem);
46
+ --sc-form-height : 2.5em;
42
47
  --sc-form-border-width: var(--sc-border-width);
43
48
  --sc-input-bg: var(--sc-base-100);
44
49
  --sc-input-border-color: var(--sc-input-bg);
45
- --sc-input-rounded: calc(var(--sc-rounded) * 1.2);
50
+ --sc-input-rounded-intensity : 1.4;
51
+ --sc-input-rounded: calc((var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-input-rounded-intensity) );
52
+ --sc-label-font-weight: 500;
46
53
 
47
- /*Couleurs -- textes sur images*/
54
+ /* Contrast -- ex : Text on images */
48
55
  --sc-contrast-content: #fff;
49
- --sc-contrast: #0f172a;
56
+ --sc-contrast: #11151f;
50
57
 
51
58
  /*Scrollbar*/
52
59
  --sc-scrollbar-bg : var(--sc-base-400);
60
+
61
+ /*Body*/
62
+ --sc-body-bg: var(--sc-base);
63
+
53
64
  }
54
65
  `;