wj-elements 0.1.128 → 0.1.129

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 (94) hide show
  1. package/dist/dark.css +6 -1
  2. package/dist/{infinite-scroll.element-DcO1E5Es.js → infinite-scroll.element-R3y_ZQj6.js} +42 -14
  3. package/dist/light.css +5 -0
  4. package/dist/{list.element-TZXMx1rt.js → list.element-syl98NWS.js} +4 -1
  5. package/dist/localize.js +4 -3
  6. package/dist/{popup.element-l8v-dMoK.js → popup.element-C0a1z1y2.js} +191 -78
  7. package/dist/wje-accordion-item.js +1 -1
  8. package/dist/wje-animation.js +141 -13
  9. package/dist/wje-aside.js +1 -1
  10. package/dist/wje-avatar.js +5 -5
  11. package/dist/wje-badge.js +1 -1
  12. package/dist/wje-breadcrumb.js +16 -6
  13. package/dist/wje-breadcrumbs.js +4 -4
  14. package/dist/wje-button-group.js +2 -2
  15. package/dist/wje-button.js +64 -6
  16. package/dist/wje-card-content.js +1 -1
  17. package/dist/wje-card-controls.js +1 -1
  18. package/dist/wje-card-header.js +1 -1
  19. package/dist/wje-card-subtitle.js +1 -1
  20. package/dist/wje-card-title.js +1 -1
  21. package/dist/wje-carousel-item.js +1 -1
  22. package/dist/wje-carousel.js +1 -1
  23. package/dist/wje-checkbox.js +14 -11
  24. package/dist/wje-chip.js +1 -1
  25. package/dist/wje-col.js +9 -3
  26. package/dist/wje-color-picker.js +72 -42
  27. package/dist/wje-container.js +1 -1
  28. package/dist/wje-copy-button.js +3 -3
  29. package/dist/wje-dialog.js +89 -0
  30. package/dist/wje-divider.js +1 -1
  31. package/dist/wje-dropdown.js +21 -6
  32. package/dist/wje-element.js +284 -127
  33. package/dist/wje-fetchAndParseCSS.js +2 -1
  34. package/dist/wje-file-upload-item.js +5 -2
  35. package/dist/wje-file-upload.js +57 -13
  36. package/dist/wje-footer.js +1 -1
  37. package/dist/wje-form.js +1 -1
  38. package/dist/wje-format-digital.js +1 -1
  39. package/dist/wje-grid.js +1 -1
  40. package/dist/wje-header.js +1 -1
  41. package/dist/wje-icon-picker.js +6 -3
  42. package/dist/wje-icon.js +4 -1
  43. package/dist/wje-img-comparer.js +1 -3
  44. package/dist/wje-img.js +5 -2
  45. package/dist/wje-infinite-scroll.js +1 -1
  46. package/dist/wje-input-file.js +4 -1
  47. package/dist/wje-input.js +9 -4
  48. package/dist/wje-item.js +34 -3
  49. package/dist/wje-kanban.js +16 -31
  50. package/dist/wje-label.js +1 -10
  51. package/dist/wje-list.js +1 -1
  52. package/dist/wje-main.js +1 -1
  53. package/dist/wje-masonry.js +9 -9
  54. package/dist/wje-master.js +9 -117
  55. package/dist/wje-menu-button.js +4 -1
  56. package/dist/wje-menu-item.js +13 -4
  57. package/dist/wje-menu-label.js +1 -1
  58. package/dist/wje-menu.js +4 -1
  59. package/dist/wje-option.js +8 -4
  60. package/dist/wje-options.js +25 -11
  61. package/dist/wje-orgchart-group.js +2 -2
  62. package/dist/wje-orgchart-item.js +7 -4
  63. package/dist/wje-orgchart.js +1 -1
  64. package/dist/wje-popup.js +1 -1
  65. package/dist/wje-progress-bar.js +6 -2
  66. package/dist/wje-qr-code.js +2 -2
  67. package/dist/wje-radio-group.js +4 -1
  68. package/dist/wje-radio.js +1 -1
  69. package/dist/wje-rate.js +6 -3
  70. package/dist/wje-relative-time.js +37 -19
  71. package/dist/wje-reorder.js +73 -10
  72. package/dist/wje-route.js +1 -1
  73. package/dist/wje-router-link.js +1 -2
  74. package/dist/wje-routerx.js +3 -1
  75. package/dist/wje-row.js +1 -11
  76. package/dist/wje-select.js +15 -12
  77. package/dist/wje-slider.js +7 -4
  78. package/dist/wje-sliding-container.js +125 -49
  79. package/dist/wje-split-view.js +10 -2
  80. package/dist/wje-status.js +1 -1
  81. package/dist/wje-stepper.js +879 -766
  82. package/dist/wje-store.js +17 -18
  83. package/dist/wje-tab-group.js +4 -1
  84. package/dist/wje-tab-panel.js +1 -1
  85. package/dist/wje-tab.js +4 -1
  86. package/dist/wje-textarea.js +8 -2
  87. package/dist/wje-thumbnail.js +1 -9
  88. package/dist/wje-toast.js +24 -23
  89. package/dist/wje-toggle.js +7 -1
  90. package/dist/wje-toolbar-action.js +1 -1
  91. package/dist/wje-toolbar.js +1 -1
  92. package/dist/wje-tooltip.js +5 -1
  93. package/dist/wje-visually-hidden.js +1 -1
  94. package/package.json +16 -5
@@ -4090,6 +4090,132 @@ class Animation extends WJElement {
4090
4090
  __publicField(this, "className", "Animation");
4091
4091
  this._animations = [];
4092
4092
  }
4093
+ /**
4094
+ * Setter for the name attribute.
4095
+ * @param value
4096
+ */
4097
+ set name(value) {
4098
+ this.setAttribute("name", value);
4099
+ }
4100
+ /**
4101
+ * Getter for the name attribute.
4102
+ * @returns {string}
4103
+ */
4104
+ get name() {
4105
+ return this.getAttribute("name");
4106
+ }
4107
+ /**
4108
+ * Setter for the name attribute.
4109
+ * @param value
4110
+ */
4111
+ set duration(value) {
4112
+ this.setAttribute("duration", value);
4113
+ }
4114
+ /**
4115
+ * Getter for the name attribute.
4116
+ * @returns {number}
4117
+ */
4118
+ get duration() {
4119
+ return +this.getAttribute("duration") || 1e3;
4120
+ }
4121
+ /**
4122
+ * Setter for the name attribute.
4123
+ * @param value
4124
+ */
4125
+ set delay(value) {
4126
+ this.setAttribute("delay", value);
4127
+ }
4128
+ /**
4129
+ * Getter for the name attribute.
4130
+ * @returns {number}
4131
+ */
4132
+ get delay() {
4133
+ return +this.getAttribute("delay") || 0;
4134
+ }
4135
+ /**
4136
+ * Setter for the name attribute.
4137
+ * @param value
4138
+ */
4139
+ set endDelay(value) {
4140
+ this.setAttribute("endDelay", value);
4141
+ }
4142
+ /**
4143
+ * Getter for the name attribute.
4144
+ * @returns {number}
4145
+ */
4146
+ get endDelay() {
4147
+ return +this.getAttribute("endDelay") || 0;
4148
+ }
4149
+ /**
4150
+ * Setter for the name attribute.
4151
+ * @param value
4152
+ */
4153
+ set fill(value) {
4154
+ this.setAttribute("fill", value);
4155
+ }
4156
+ /**
4157
+ * Getter for the name attribute.
4158
+ * @returns {string}
4159
+ */
4160
+ get fill() {
4161
+ return this.getAttribute("fill") || "auto";
4162
+ }
4163
+ /**
4164
+ * Setter for the name attribute.
4165
+ * @param value
4166
+ */
4167
+ set iterations(value) {
4168
+ this.setAttribute("iterations", value);
4169
+ }
4170
+ /**
4171
+ * Getter for the name attribute.
4172
+ * @returns {string|number}
4173
+ */
4174
+ get iterations() {
4175
+ return this.getAttribute("iterations") || Infinity;
4176
+ }
4177
+ /**
4178
+ * Setter for the name attribute.
4179
+ * @param value
4180
+ */
4181
+ set iterationStart(value) {
4182
+ this.setAttribute("iterationStart", value);
4183
+ }
4184
+ /**
4185
+ * Getter for the name attribute.
4186
+ * @returns {number}
4187
+ */
4188
+ get iterationStart() {
4189
+ return +this.getAttribute("iterationStart") || 0;
4190
+ }
4191
+ /**
4192
+ * Setter for the name attribute.
4193
+ * @param value
4194
+ */
4195
+ set direction(value) {
4196
+ this.setAttribute("direction", value);
4197
+ }
4198
+ /**
4199
+ * Getter for the name attribute.
4200
+ * @returns {string}
4201
+ */
4202
+ get direction() {
4203
+ return this.getAttribute("direction") || "normal";
4204
+ }
4205
+ /**
4206
+ * Setter for the name attribute.
4207
+ * @param value
4208
+ */
4209
+ set easing(value) {
4210
+ this.setAttribute("easing", value);
4211
+ }
4212
+ /**
4213
+ * Getter for the name attribute.
4214
+ * @returns {string}
4215
+ */
4216
+ get easing() {
4217
+ return this.getAttribute("easing") || "linear";
4218
+ }
4093
4219
  /**
4094
4220
  * Setter for the animations property.
4095
4221
  * @param {Array} value - The new value for the animations property.
@@ -4098,8 +4224,8 @@ class Animation extends WJElement {
4098
4224
  this._animations = value;
4099
4225
  }
4100
4226
  /**
4101
- * Getter for the animations property.
4102
- * @return {Array} The current value of the animations property.
4227
+ * Getter for the animations' property.
4228
+ * @return {Array} The current value of the animations' property.
4103
4229
  */
4104
4230
  get animations() {
4105
4231
  return this._animations;
@@ -4131,7 +4257,7 @@ class Animation extends WJElement {
4131
4257
  * @param {Object} params - The parameters for drawing the element.
4132
4258
  * @return {Object} The document fragment containing the drawn element.
4133
4259
  */
4134
- draw(context, store, params) {
4260
+ draw() {
4135
4261
  let fragment = document.createDocumentFragment();
4136
4262
  let slot = document.createElement("slot");
4137
4263
  fragment.appendChild(slot);
@@ -4149,14 +4275,14 @@ class Animation extends WJElement {
4149
4275
  this.animations = await this.getAnimationsArray();
4150
4276
  const selected = this.animations.find((k) => k.name === this.name);
4151
4277
  this.animation = element == null ? void 0 : element.animate(selected.keyframes, {
4152
- delay: +this.delay || 0,
4153
- endDelay: +this.endDelay || 0,
4154
- fill: this.fill || "auto",
4155
- duration: +this.duration || 1e3,
4156
- iterationStart: +this.iterationStart || 0,
4157
- iterations: this.iterations || Infinity,
4158
- direction: this.direction || "normal",
4159
- easing: this.easing || "linear"
4278
+ delay: +this.delay,
4279
+ endDelay: +this.endDelay,
4280
+ fill: this.fill,
4281
+ duration: +this.duration,
4282
+ iterationStart: +this.iterationStart,
4283
+ iterations: this.iterations,
4284
+ direction: this.direction,
4285
+ easing: this.easing
4160
4286
  });
4161
4287
  if (this.animation)
4162
4288
  this.animation.play();
@@ -4166,7 +4292,7 @@ class Animation extends WJElement {
4166
4292
  * @return {Array} The animations array.
4167
4293
  */
4168
4294
  async getAnimationsArray() {
4169
- return fetchAndParseCSS(animations);
4295
+ return await fetchAndParseCSS(animations);
4170
4296
  }
4171
4297
  /**
4172
4298
  * Method to destroy the current animation.
@@ -4188,8 +4314,10 @@ class Animation extends WJElement {
4188
4314
  * Method to cancel the current animation.
4189
4315
  */
4190
4316
  cancel() {
4191
- if (this.animation) {
4317
+ if (this.animation && typeof this.animation.cancel === "function") {
4192
4318
  this.animation.cancel();
4319
+ } else {
4320
+ console.warn("Animation is not initialized or cancel is not available");
4193
4321
  }
4194
4322
  }
4195
4323
  }
package/dist/wje-aside.js CHANGED
@@ -42,7 +42,7 @@ class Aside extends WJElement {
42
42
  * @param {Object} params - The parameters for drawing the element.
43
43
  * @return {Object} The document fragment containing the drawn element.
44
44
  */
45
- draw(context, store, params) {
45
+ draw() {
46
46
  let fragment = document.createDocumentFragment();
47
47
  if (this.width)
48
48
  this.style.setProperty("--wje-aside-width", this.width);
@@ -3,13 +3,13 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import WJElement from "./wje-element.js";
5
5
  function getHsl(text, s = 40, l = 65) {
6
- let str = text, hash = 0;
6
+ let str = text;
7
+ let hash = 0;
7
8
  for (let i = 0; i < (str == null ? void 0 : str.length); i++) {
8
- hash = str.charCodeAt(i) + ((hash << 5) - hash);
9
+ hash = str.charCodeAt(i) + hash * 31;
9
10
  }
10
11
  let h = hash % 360;
11
- let hexColor = "hsl(" + h + ", " + s + "%, " + l + "%)";
12
- return hexColor;
12
+ return `hsl(${h}, ${s}%, ${l}%)`;
13
13
  }
14
14
  function getInitials(string, length = 2) {
15
15
  let names = string.split(" ");
@@ -51,7 +51,7 @@ class Avatar extends WJElement {
51
51
  * @param {object} params - The parameters
52
52
  * @returns {object} fragment - The document fragment
53
53
  */
54
- draw(context, store, params) {
54
+ draw() {
55
55
  let fragment = document.createDocumentFragment();
56
56
  let element = document.createElement("div");
57
57
  element.setAttribute("part", "native");
package/dist/wje-badge.js CHANGED
@@ -44,7 +44,7 @@ class Badge extends WJElement {
44
44
  * @param {Object} params - The parameters
45
45
  * @returns {Object} fragment - The document fragment
46
46
  */
47
- draw(context, store, params) {
47
+ draw() {
48
48
  let fragment = document.createDocumentFragment();
49
49
  let native = document.createElement("div");
50
50
  native.setAttribute("part", "native");
@@ -17,7 +17,18 @@ class Breadcrumb extends WJElement {
17
17
  __publicField(this, "className", "Breadcrumb");
18
18
  this._showSeparator = true;
19
19
  this._collapsedVariant = ((_a = this.parentElement) == null ? void 0 : _a.collapsedVariant) || "BUTTON";
20
+ this.showCollapsedIndicator = false;
20
21
  }
22
+ // set showCollapsedIndicator(value) {
23
+ // // this.removeAttribute("show-collapsed-indicator");
24
+ //
25
+ // if(WjElementUtils.stringToBoolean(value))
26
+ // this.setAttribute("show-collapsed-indicator", value);
27
+ // }
28
+ //
29
+ // get showCollapsedIndicator() {
30
+ // return this.hasAttribute("show-collapsed-indicator");
31
+ // }
21
32
  /**
22
33
  * Get show separator flag
23
34
  * @returns {boolean} showSeparator - The show separator flag
@@ -71,7 +82,7 @@ class Breadcrumb extends WJElement {
71
82
  */
72
83
  attributeChangedCallback(name, oldValue, newValue) {
73
84
  if (name === "collapsed") {
74
- if (WjElementUtils.stringToBoolean(newValue))
85
+ if (WjElementUtils.stringToBoolean(newValue) && !this.hasAttribute("show-collapsed-indicator"))
75
86
  this.classList.add("collapsed");
76
87
  } else if (name === "show-collapsed-indicator") {
77
88
  if (WjElementUtils.stringToBoolean(newValue)) {
@@ -98,7 +109,7 @@ class Breadcrumb extends WJElement {
98
109
  * @param {Object} params - The parameters
99
110
  * @returns {Object} fragment - The document fragment
100
111
  */
101
- draw(context, store, params) {
112
+ draw() {
102
113
  let fragment = document.createDocumentFragment();
103
114
  let native = document.createElement("a");
104
115
  native.classList.add("native-breadcrumb");
@@ -114,9 +125,8 @@ class Breadcrumb extends WJElement {
114
125
  native.appendChild(slot);
115
126
  native.appendChild(end);
116
127
  fragment.appendChild(native);
117
- if (this.showCollapsedIndicator) {
128
+ if (WjElementUtils.stringToBoolean(this.showCollapsedIndicator)) {
118
129
  fragment.appendChild(this.drawCollapsedIndicator());
119
- this.classList.remove("collapsed");
120
130
  native.classList.add("hidden");
121
131
  }
122
132
  if (this.showSeparator) {
@@ -188,8 +198,8 @@ class Breadcrumb extends WJElement {
188
198
  event.addListener(button, "click", null, (e) => {
189
199
  this.native.classList.remove("hidden");
190
200
  button.remove();
191
- this.parentElement.querySelectorAll("wje-breadcrumb").forEach((e2) => {
192
- e2.classList.remove("collapsed");
201
+ this.parentElement.querySelectorAll("wje-breadcrumb").forEach((el) => {
202
+ el.classList.remove("collapsed");
193
203
  });
194
204
  e.stopPropagation();
195
205
  });
@@ -38,7 +38,7 @@ class Breadcrumbs extends WJElement {
38
38
  * @param {Object} params - The parameters
39
39
  * @returns {Object} fragment - The document fragment
40
40
  */
41
- draw(context, store, params) {
41
+ draw() {
42
42
  let fragment = document.createDocumentFragment();
43
43
  let element = document.createElement("slot");
44
44
  fragment.appendChild(element);
@@ -58,12 +58,12 @@ class Breadcrumbs extends WJElement {
58
58
  breadcrumb.setAttribute("last", true);
59
59
  const shouldCollapse = maxItems !== void 0 && breadcrumbs.length > maxItems && itemsBeforeCollapse + itemsAfterCollapse <= maxItems;
60
60
  if (shouldCollapse) {
61
- breadcrumbs.forEach((breadcrumb2, index) => {
61
+ breadcrumbs.forEach((b, index) => {
62
62
  if (index === itemsBeforeCollapse) {
63
- breadcrumb2.setAttribute("show-collapsed-indicator", true);
63
+ b.setAttribute("show-collapsed-indicator", true);
64
64
  }
65
65
  if (index >= itemsBeforeCollapse && index < breadcrumbs.length - itemsAfterCollapse) {
66
- breadcrumb2.setAttribute("collapsed", true);
66
+ b.setAttribute("collapsed", true);
67
67
  }
68
68
  });
69
69
  }
@@ -45,7 +45,7 @@ class ButtonGroup extends WJElement {
45
45
  * @param {Object} params - The parameters
46
46
  * @returns {Object} fragment - The document fragment
47
47
  */
48
- draw(context, store, params) {
48
+ draw() {
49
49
  let fragment = document.createDocumentFragment();
50
50
  let element = document.createElement("div");
51
51
  element.classList.add("native-button-group");
@@ -61,7 +61,7 @@ class ButtonGroup extends WJElement {
61
61
  * @param {Object} store - The store
62
62
  * @param {Object} params - The parameters
63
63
  */
64
- afterDraw(context, store, params) {
64
+ afterDraw() {
65
65
  const slottedElements = [...this.slotElement.assignedElements({ flatten: true })];
66
66
  slottedElements.forEach((el) => {
67
67
  let index = slottedElements.indexOf(el);
@@ -49,6 +49,62 @@ class Button extends WJElement {
49
49
  });
50
50
  this.internals_ = this.attachInternals();
51
51
  }
52
+ /**
53
+ * Properties of the element
54
+ * @param value
55
+ */
56
+ set color(value) {
57
+ this.setAttribute("color", value || "default");
58
+ }
59
+ /**
60
+ * Get color
61
+ * @returns {string|string}
62
+ */
63
+ get color() {
64
+ return this.getAttribute("color") || "default";
65
+ }
66
+ /**
67
+ * Set variant
68
+ * @param value
69
+ */
70
+ set caret(value) {
71
+ this.setAttribute("caret", value);
72
+ }
73
+ /**
74
+ * Get variant
75
+ * @returns {boolean}
76
+ */
77
+ get caret() {
78
+ return this.hasAttribute("caret");
79
+ }
80
+ /**
81
+ * Set variant
82
+ * @param value
83
+ */
84
+ set tooltip(value) {
85
+ this.setAttribute("tooltip", value);
86
+ }
87
+ /**
88
+ * Get variant
89
+ * @returns {boolean}
90
+ */
91
+ get tooltip() {
92
+ return this.hasAttribute("tooltip");
93
+ }
94
+ /**
95
+ * Set variant
96
+ * @param value
97
+ */
98
+ set dialog(value) {
99
+ this.setAttribute("dialog", value);
100
+ }
101
+ /**
102
+ * Get variant
103
+ * @returns {string|object}
104
+ */
105
+ get dialog() {
106
+ return this.getAttribute("dialog");
107
+ }
52
108
  /**
53
109
  * Set active state
54
110
  * @param {boolean} value - The value to set
@@ -171,7 +227,7 @@ class Button extends WJElement {
171
227
  * @param {Object} params - The parameters
172
228
  * @returns {Object} fragment - The document fragment
173
229
  */
174
- draw(context, store, params) {
230
+ draw() {
175
231
  let fragment = document.createDocumentFragment();
176
232
  let native = document.createElement(this.hasAttribute("href") ? "a" : "button");
177
233
  if (this.hasAttribute("href")) {
@@ -198,15 +254,12 @@ class Button extends WJElement {
198
254
  native.classList.add("wje-button-" + this.fill);
199
255
  if (this.size)
200
256
  native.classList.add("wje-button-" + this.size);
201
- if (this.hasAttribute("color"))
202
- native.classList.add("wje-color-" + this.color, "wje-color");
203
- else
204
- native.classList.add("wje-color-default", "wje-color");
205
257
  if (this.querySelectorAll("[slot=caret]").length < 1 && this.hasAttribute("caret") || this.hasAttribute("only-caret")) {
206
258
  let i = document.createElement("wje-icon");
207
259
  i.style.setProperty("--wje-icon-size", "14px");
208
260
  i.setAttribute("slot", "caret");
209
261
  i.setAttribute("name", "chevron-down");
262
+ i.setAttribute("part", "caret");
210
263
  this.appendChild(i);
211
264
  }
212
265
  if (this.active) {
@@ -215,6 +268,7 @@ class Button extends WJElement {
215
268
  i.setAttribute("name", "check");
216
269
  this.appendChild(i);
217
270
  }
271
+ native.classList.add("wje-color-" + this.color, "wje-color");
218
272
  let span = document.createElement("span");
219
273
  span.setAttribute("part", "inner");
220
274
  span.classList.add("button-inner");
@@ -239,7 +293,7 @@ class Button extends WJElement {
239
293
  span.appendChild(this.slotToggle);
240
294
  }
241
295
  native.appendChild(span);
242
- if (this.hasAttribute("tooltip")) {
296
+ if (this.tooltip) {
243
297
  let tooltip = document.createElement("wje-tooltip");
244
298
  tooltip.setAttribute("content", this.getAttribute("tooltip"));
245
299
  tooltip.setAttribute("placement", this.getAttribute("tooltip-placement") || "top");
@@ -252,6 +306,9 @@ class Button extends WJElement {
252
306
  }
253
307
  /**
254
308
  * After draw method
309
+ * @param {Object} context - The context
310
+ * @param {Object} store - The store
311
+ * @param {Object} params - The parameters
255
312
  */
256
313
  afterDraw() {
257
314
  if (this.hasToggle) {
@@ -272,6 +329,7 @@ class Button extends WJElement {
272
329
  event.addListener(this, "click", "wje-button:toggle", this.toggleStates, { stopPropagation: this.stopPropagation });
273
330
  if (this.type === "submit") {
274
331
  event.addListener(this, "click", "wje-button:submit", () => {
332
+ console.log("submit", this.internals_.form);
275
333
  event.dispatchCustomEvent(this.internals_.form, "submit", {});
276
334
  });
277
335
  }
@@ -37,7 +37,7 @@ class CardContent extends WJElement {
37
37
  * @param {Object} params - The parameters
38
38
  * @returns {Object} fragment - The document fragment
39
39
  */
40
- draw(context, store, params) {
40
+ draw() {
41
41
  let fragment = document.createDocumentFragment();
42
42
  let element = document.createElement("slot");
43
43
  fragment.appendChild(element);
@@ -37,7 +37,7 @@ class CardControls extends WJElement {
37
37
  * @param {Object} params - The parameters
38
38
  * @returns {Object} fragment - The document fragment
39
39
  */
40
- draw(context, store, params) {
40
+ draw() {
41
41
  let fragment = document.createDocumentFragment();
42
42
  let element = document.createElement("slot");
43
43
  fragment.appendChild(element);
@@ -36,7 +36,7 @@ class CardHeader extends WJElement {
36
36
  * @param {Object} params - The parameters to use.
37
37
  * @returns {DocumentFragment} The created document fragment.
38
38
  */
39
- draw(context, store, params) {
39
+ draw() {
40
40
  let fragment = document.createDocumentFragment();
41
41
  let element = document.createElement("slot");
42
42
  if (this.hasAttribute("separator"))
@@ -44,7 +44,7 @@ class CardSubtitle extends WJElement {
44
44
  * @param {Object} params - The parameters to use.
45
45
  * @returns {DocumentFragment} The created document fragment.
46
46
  */
47
- draw(context, store, params) {
47
+ draw() {
48
48
  let fragment = document.createDocumentFragment();
49
49
  let element = document.createElement("slot");
50
50
  fragment.appendChild(element);
@@ -44,7 +44,7 @@ class CardTitle extends WJElement {
44
44
  * @param {Object} params - The parameters to use.
45
45
  * @returns {DocumentFragment} The created document fragment.
46
46
  */
47
- draw(context, store, params) {
47
+ draw() {
48
48
  let fragment = document.createDocumentFragment();
49
49
  let element = document.createElement("slot");
50
50
  fragment.appendChild(element);
@@ -17,7 +17,7 @@ class CarouselItem extends WJElement {
17
17
  setupAttributes() {
18
18
  this.isShadowRoot = "open";
19
19
  }
20
- draw(context, store, params) {
20
+ draw() {
21
21
  let fragment = document.createDocumentFragment();
22
22
  let native = document.createElement("div");
23
23
  native.classList.add("native-carousel-item");
@@ -47,7 +47,7 @@ class Carousel extends WJElement {
47
47
  beforeDraw(context, store, params) {
48
48
  this.cloneFirstAndLastItems();
49
49
  }
50
- draw(context, store, params) {
50
+ draw() {
51
51
  let fragment = document.createDocumentFragment();
52
52
  let native = document.createElement("div");
53
53
  native.classList.add("native-carousel");
@@ -46,6 +46,16 @@ class Checkbox extends WJElement {
46
46
  get validateOnChange() {
47
47
  return this.hasAttribute("validate-on-change");
48
48
  }
49
+ /**
50
+ * Setter for the invalid attribute.
51
+ * @param {boolean} isInvalid - Whether the input is invalid.
52
+ */
53
+ set invalid(isInvalid) {
54
+ if (isInvalid)
55
+ this.setAttribute("invalid", "");
56
+ else
57
+ this.removeAttribute("invalid");
58
+ }
49
59
  /**
50
60
  * Getter for the invalid attribute.
51
61
  * @returns {boolean} Whether the attribute is present.
@@ -53,13 +63,6 @@ class Checkbox extends WJElement {
53
63
  get invalid() {
54
64
  return this.hasAttribute("invalid");
55
65
  }
56
- /**
57
- * Setter for the invalid attribute.
58
- * @param {boolean} isInvalid - Whether the input is invalid.
59
- */
60
- set invalid(isInvalid) {
61
- isInvalid ? this.setAttribute("invalid", "") : this.removeAttribute("invalid");
62
- }
63
66
  /**
64
67
  * Getter for the form attribute.
65
68
  * @returns {HTMLFormElement} The form the input is associated with.
@@ -123,7 +126,7 @@ class Checkbox extends WJElement {
123
126
  }
124
127
  /**
125
128
  * @summary Set checked attribute
126
- * @returns {boolean} true if the toggle is checked, false otherwise
129
+ * @param {boolean} value - true if the toggle is checked, false otherwise
127
130
  */
128
131
  set disabled(value) {
129
132
  if (value)
@@ -139,8 +142,8 @@ class Checkbox extends WJElement {
139
142
  return this.hasAttribute("disabled");
140
143
  }
141
144
  /**
142
- * @summary Set checked attribute
143
- * @returns {boolean} true if the toggle is checked, false otherwise
145
+ * @summary Set checked attribute
146
+ * @param {boolean} value - true if the toggle is checked, false otherwise
144
147
  */
145
148
  set checked(value) {
146
149
  if (value)
@@ -178,7 +181,7 @@ class Checkbox extends WJElement {
178
181
  * @param {object} params - The parameters.
179
182
  * @returns {DocumentFragment} The created fragment.
180
183
  */
181
- draw(context, store, params) {
184
+ draw() {
182
185
  let fragment = document.createDocumentFragment();
183
186
  let native = document.createElement("div");
184
187
  native.setAttribute("part", "native");
package/dist/wje-chip.js CHANGED
@@ -14,7 +14,7 @@ class Chip extends WJElement {
14
14
  setupAttributes() {
15
15
  this.isShadowRoot = "open";
16
16
  }
17
- draw(context, store, params) {
17
+ draw() {
18
18
  let fragment = document.createDocumentFragment();
19
19
  let native = document.createElement("div");
20
20
  native.classList.add("native-chip");
package/dist/wje-col.js CHANGED
@@ -14,9 +14,15 @@ class Col extends WJElement {
14
14
  setupAttributes() {
15
15
  this.isShadowRoot = "open";
16
16
  }
17
- beforeDraw(context, store, params) {
18
- }
19
- draw(context, store, params) {
17
+ /**
18
+ * Draws the component.
19
+ *
20
+ * @param {Object} context - The context for drawing.
21
+ * @param {Object} store - The store for drawing.
22
+ * @param {Object} params - The parameters for drawing.
23
+ * @returns {DocumentFragment}
24
+ */
25
+ draw() {
20
26
  let fragment = document.createDocumentFragment();
21
27
  let element = document.createElement("slot");
22
28
  if (this.order)