@sveltia/ui 0.26.3 → 0.26.4

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.
@@ -170,7 +170,8 @@ input:focus + .label {
170
170
  opacity: 0;
171
171
  }
172
172
 
173
- :is(input::placeholder, .label) {
173
+ input::placeholder,
174
+ .label {
174
175
  color: var(--sui-textbox-placeholder-foreground-color, var(--sui-textbox-foreground-color));
175
176
  opacity: var(--sui-textbox-placeholder-opacity, 0.5);
176
177
  font-family: var(--sui-textbox-placeholder-font-family, var(--sui-textbox-font-family));
@@ -109,9 +109,9 @@ class Group {
109
109
 
110
110
  allMembers.forEach((element, index) => {
111
111
  // Select the first one if no member has the `selected` attribute
112
- const isSelected = defaultSelected
113
- ? element === defaultSelected
114
- : this.selectFirst && index === 0;
112
+ const isSelected =
113
+ element.getAttribute(this.childSelectedAttr) === 'true' ||
114
+ (defaultSelected ? element === defaultSelected : this.selectFirst && index === 0);
115
115
 
116
116
  const controlTarget = /** @type {HTMLElement | null} */ (
117
117
  document.querySelector(`#${element.getAttribute('aria-controls')}`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltia/ui",
3
- "version": "0.26.3",
3
+ "version": "0.26.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {