@sveltia/ui 0.15.5 → 0.15.7

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.
@@ -309,8 +309,12 @@ button:global(.link) :global(.label) {
309
309
  padding: 0;
310
310
  line-height: var(--sui-line-height-compact);
311
311
  text-decoration: var(--sui-button-link-text-decoration, none);
312
+ text-underline-offset: 2px;
312
313
  white-space: normal;
313
314
  }
315
+ :global(:root[data-underline-links="true"]) button:global(.link) :global(.label), :global(:host[data-underline-links="true"]) button:global(.link) :global(.label) {
316
+ text-decoration: underline;
317
+ }
314
318
  button:global(.link):hover :global(.label), button:global(.link):focus :global(.label), button:global(.link):active :global(.label) {
315
319
  text-decoration: var(--sui-button-link-text-decoration-focus, underline);
316
320
  }
@@ -489,10 +489,13 @@
489
489
  :global(a) {
490
490
  color: var(--sui-primary-accent-color-text);
491
491
  text-decoration: none;
492
+ text-underline-offset: 2px;
493
+ }
494
+ :global(a:hover), :global(a:focus), :global(a:active) {
495
+ text-decoration: underline;
492
496
  }
493
497
  :global(:root[data-underline-links=true]) :global(a), :global(:host[data-underline-links=true]) :global(a) {
494
498
  text-decoration: underline;
495
- text-underline-offset: 2px;
496
499
  }
497
500
 
498
501
  :global(p),
@@ -99,13 +99,17 @@ class Group {
99
99
  * Activate the members.
100
100
  */
101
101
  activate() {
102
- const { parent, allMembers, selected: defaultSelected } = this;
102
+ const { parent, role, allMembers, selected: defaultSelected } = this;
103
+ const multi = this.multi || role === 'menu' || role === 'menubar';
103
104
 
104
105
  allMembers.forEach((element, index) => {
105
106
  // Select the first one if no member has the `selected` attribute
106
- const isSelected = defaultSelected
107
- ? element === defaultSelected
108
- : this.selectFirst && index === 0;
107
+ // eslint-disable-next-line no-nested-ternary
108
+ const isSelected = multi
109
+ ? element.getAttribute(this.childSelectedAttr) === 'true'
110
+ : defaultSelected
111
+ ? element === defaultSelected
112
+ : this.selectFirst && index === 0;
109
113
 
110
114
  const controlTarget = /** @type {HTMLElement | null} */ (
111
115
  document.querySelector(`#${element.getAttribute('aria-controls')}`)
@@ -95,11 +95,17 @@ strong {
95
95
  a {
96
96
  color: var(--sui-primary-accent-color-text);
97
97
  text-decoration: none;
98
+ text-underline-offset: 2px;
99
+
100
+ &:hover,
101
+ &:focus,
102
+ &:active {
103
+ text-decoration: underline;
104
+ }
98
105
 
99
106
  :root[data-underline-links="true"] &,
100
107
  :host[data-underline-links="true"] & {
101
108
  text-decoration: underline;
102
- text-underline-offset: 2px;
103
109
  }
104
110
  }
105
111
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltia/ui",
3
- "version": "0.15.5",
3
+ "version": "0.15.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -23,18 +23,18 @@
23
23
  "test:unit": "vitest"
24
24
  },
25
25
  "dependencies": {
26
- "@lexical/code": "^0.15.0",
27
- "@lexical/history": "^0.15.0",
28
- "@lexical/link": "^0.15.0",
29
- "@lexical/list": "^0.15.0",
30
- "@lexical/markdown": "^0.15.0",
31
- "@lexical/rich-text": "^0.15.0",
32
- "@lexical/selection": "^0.15.0",
33
- "@lexical/table": "^0.15.0",
34
- "@lexical/utils": "^0.15.0",
35
- "@sveltia/utils": "^0.3.0",
36
- "lexical": "^0.15.0",
37
- "svelte": "^4.2.17"
26
+ "@lexical/code": "^0.16.0",
27
+ "@lexical/history": "^0.16.0",
28
+ "@lexical/link": "^0.16.0",
29
+ "@lexical/list": "^0.16.0",
30
+ "@lexical/markdown": "^0.16.0",
31
+ "@lexical/rich-text": "^0.16.0",
32
+ "@lexical/selection": "^0.16.0",
33
+ "@lexical/table": "^0.16.0",
34
+ "@lexical/utils": "^0.16.0",
35
+ "@sveltia/utils": "^0.4.0",
36
+ "lexical": "^0.16.0",
37
+ "svelte": "^4.2.18"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@playwright/test": "^1.44.1",
@@ -42,27 +42,27 @@
42
42
  "@sveltejs/kit": "^2.5.10",
43
43
  "@sveltejs/package": "^2.3.1",
44
44
  "@sveltejs/vite-plugin-svelte": "^3.1.1",
45
- "cspell": "^8.8.3",
45
+ "cspell": "^8.8.4",
46
46
  "eslint": "^8.57.0",
47
47
  "eslint-config-airbnb-base": "^15.0.0",
48
48
  "eslint-config-prettier": "^9.1.0",
49
49
  "eslint-plugin-import": "^2.29.1",
50
- "eslint-plugin-jsdoc": "^48.2.7",
51
- "eslint-plugin-svelte": "^2.39.0",
50
+ "eslint-plugin-jsdoc": "^48.2.9",
51
+ "eslint-plugin-svelte": "^2.39.2",
52
52
  "npm-run-all": "^4.1.5",
53
53
  "postcss": "^8.4.38",
54
54
  "postcss-html": "^1.7.0",
55
- "prettier": "^3.3.0",
56
- "prettier-plugin-svelte": "^3.2.3",
55
+ "prettier": "^3.3.1",
56
+ "prettier-plugin-svelte": "^3.2.4",
57
57
  "sass": "^1.77.4",
58
58
  "stylelint": "^16.6.1",
59
59
  "stylelint-config-recommended-scss": "^14.0.0",
60
- "stylelint-scss": "^6.3.0",
60
+ "stylelint-scss": "^6.3.1",
61
61
  "svelte-check": "^3.8.0",
62
62
  "svelte-i18n": "^4.0.0",
63
63
  "svelte-preprocess": "^5.1.4",
64
- "tslib": "^2.6.2",
65
- "vite": "^5.2.12",
64
+ "tslib": "^2.6.3",
65
+ "vite": "^5.2.13",
66
66
  "vitest": "^1.6.0"
67
67
  },
68
68
  "exports": {