@waggylabs/yumekit 0.4.0-beta.46 → 0.4.0-beta.48
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.
- package/CHANGELOG.md +1 -1
- package/dist/components/y-appbar.js +3 -2
- package/dist/components/y-button.d.ts +1 -1
- package/dist/components/y-button.js +1 -0
- package/dist/components/y-input.js +1 -1
- package/dist/components/y-menu.js +2 -2
- package/dist/components/y-textarea.js +1 -1
- package/dist/index.js +5 -4
- package/dist/yumekit.min.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -40,7 +40,7 @@ Delete any empty sections before publishing.
|
|
|
40
40
|
- 12 new bundled icons: `heart`, `thumbs-up`, `thumbs-down`, `flask`, `briefcase`, `thumbtack`, `map-marker`, `pencil`, `code`, `circle-question`, `comp-textarea`, `comp-rating`.
|
|
41
41
|
- Two new icons: `ellipsis-v` (three vertical dots) and `ellipsis-h` (three horizontal dots). Both are available in the icon registry via `all.js`.
|
|
42
42
|
- `y-select`: new `searchable` attribute — enables autocomplete-style inline filtering. In single mode the value display is replaced by a text input that clears on open (showing the current selection as a placeholder) and restores the selected label on close. In multi-tag mode the input appears after the last tag and the dropdown stays open after each selection.
|
|
43
|
-
- `y-select`: new `clearable` attribute — shows a clear button (using the `close` icon) when a value is selected.
|
|
43
|
+
- `y-select`: new `clearable` attribute — shows a clear button (using the `close` icon) when a value is selected.
|
|
44
44
|
- `y-select` tag display mode: per-option `color` field — each option object in the `options` array may now include a `color` key (predefined scheme or CSS color) to individually color its tag.
|
|
45
45
|
- `y-switch`: new `on-color` and `off-color` attributes for the toggle indicator when checked and unchecked respectively. Accepts predefined scheme names or custom CSS colors. Defaults to `"primary"` for on.
|
|
46
46
|
- Custom CSS color support (`#hex`, `rgb()`, `hsl()`) added to the `color` attribute of `y-avatar`, `y-button`, `y-icon`, `y-tag`, `y-toast`, and `y-tooltip`. Predefined scheme names continue to resolve through design tokens; custom values use WCAG-based luminance to auto-contrast the text color. `y-slider` already supported custom color passthrough.
|
|
@@ -18,6 +18,7 @@ class YumeButton extends HTMLElement {
|
|
|
18
18
|
constructor() {
|
|
19
19
|
super();
|
|
20
20
|
this.attachShadow({ mode: "open" });
|
|
21
|
+
this.selectedValues = new Set();
|
|
21
22
|
this._init();
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -950,10 +951,10 @@ class YumeMenu extends HTMLElement {
|
|
|
950
951
|
if (textTpl) {
|
|
951
952
|
contentWrapper.appendChild(textTpl.content.cloneNode(true));
|
|
952
953
|
} else {
|
|
953
|
-
contentWrapper.
|
|
954
|
+
contentWrapper.append(item.text);
|
|
954
955
|
}
|
|
955
956
|
} else {
|
|
956
|
-
contentWrapper.
|
|
957
|
+
contentWrapper.append(item.text);
|
|
957
958
|
}
|
|
958
959
|
|
|
959
960
|
li.appendChild(contentWrapper);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export class YumeButton extends HTMLElement {
|
|
2
2
|
static get observedAttributes(): string[];
|
|
3
|
+
selectedValues: Set<any>;
|
|
3
4
|
connectedCallback(): void;
|
|
4
5
|
attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
|
|
5
6
|
set color(val: string);
|
|
@@ -23,7 +24,6 @@ export class YumeButton extends HTMLElement {
|
|
|
23
24
|
set value(newVal: any);
|
|
24
25
|
/** The current selected value(s), comma-separated when 'multiple' is set. */
|
|
25
26
|
get value(): any;
|
|
26
|
-
selectedValues: any;
|
|
27
27
|
/**
|
|
28
28
|
* Sets the button options from an array of objects.
|
|
29
29
|
* @param {Array<Object>} options
|
|
@@ -92,7 +92,7 @@ class YumeInput extends HTMLElement {
|
|
|
92
92
|
get value() { return this.input?.value || ""; }
|
|
93
93
|
set value(val) {
|
|
94
94
|
if (this.input) this.input.value = val;
|
|
95
|
-
|
|
95
|
+
this.setAttribute("value", val);
|
|
96
96
|
this._internals.setFormValue(val, this.getAttribute("name"));
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -221,10 +221,10 @@ class YumeMenu extends HTMLElement {
|
|
|
221
221
|
if (textTpl) {
|
|
222
222
|
contentWrapper.appendChild(textTpl.content.cloneNode(true));
|
|
223
223
|
} else {
|
|
224
|
-
contentWrapper.
|
|
224
|
+
contentWrapper.append(item.text);
|
|
225
225
|
}
|
|
226
226
|
} else {
|
|
227
|
-
contentWrapper.
|
|
227
|
+
contentWrapper.append(item.text);
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
li.appendChild(contentWrapper);
|
|
@@ -92,7 +92,7 @@ class YumeTextarea extends HTMLElement {
|
|
|
92
92
|
get value() { return this.textarea?.value || ""; }
|
|
93
93
|
set value(val) {
|
|
94
94
|
if (this.textarea) this.textarea.value = val;
|
|
95
|
-
|
|
95
|
+
this.setAttribute("value", val);
|
|
96
96
|
this._internals.setFormValue(val, this.getAttribute("name"));
|
|
97
97
|
}
|
|
98
98
|
|
package/dist/index.js
CHANGED
|
@@ -543,6 +543,7 @@ class YumeButton extends HTMLElement {
|
|
|
543
543
|
constructor() {
|
|
544
544
|
super();
|
|
545
545
|
this.attachShadow({ mode: "open" });
|
|
546
|
+
this.selectedValues = new Set();
|
|
546
547
|
this._init();
|
|
547
548
|
}
|
|
548
549
|
|
|
@@ -1465,10 +1466,10 @@ class YumeMenu extends HTMLElement {
|
|
|
1465
1466
|
if (textTpl) {
|
|
1466
1467
|
contentWrapper.appendChild(textTpl.content.cloneNode(true));
|
|
1467
1468
|
} else {
|
|
1468
|
-
contentWrapper.
|
|
1469
|
+
contentWrapper.append(item.text);
|
|
1469
1470
|
}
|
|
1470
1471
|
} else {
|
|
1471
|
-
contentWrapper.
|
|
1472
|
+
contentWrapper.append(item.text);
|
|
1472
1473
|
}
|
|
1473
1474
|
|
|
1474
1475
|
li.appendChild(contentWrapper);
|
|
@@ -3863,7 +3864,7 @@ class YumeInput extends HTMLElement {
|
|
|
3863
3864
|
get value() { return this.input?.value || ""; }
|
|
3864
3865
|
set value(val) {
|
|
3865
3866
|
if (this.input) this.input.value = val;
|
|
3866
|
-
|
|
3867
|
+
this.setAttribute("value", val);
|
|
3867
3868
|
this._internals.setFormValue(val, this.getAttribute("name"));
|
|
3868
3869
|
}
|
|
3869
3870
|
|
|
@@ -4152,7 +4153,7 @@ class YumeTextarea extends HTMLElement {
|
|
|
4152
4153
|
get value() { return this.textarea?.value || ""; }
|
|
4153
4154
|
set value(val) {
|
|
4154
4155
|
if (this.textarea) this.textarea.value = val;
|
|
4155
|
-
|
|
4156
|
+
this.setAttribute("value", val);
|
|
4156
4157
|
this._internals.setFormValue(val, this.getAttribute("name"));
|
|
4157
4158
|
}
|
|
4158
4159
|
|