@marianmeres/stuic 3.71.0 → 3.72.0

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.
@@ -5,8 +5,9 @@
5
5
  ============================================================================ */
6
6
 
7
7
  :root {
8
- /* Structure - reference Tailwind vars where applicable */
9
- --stuic-button-group-padding: 0.1rem;
8
+ /* Default look is a pill switcher. Override radius/bg to get a square group. */
9
+ --stuic-button-group-radius: 9999px;
10
+ --stuic-button-group-padding: 3px;
10
11
  --stuic-button-group-gap: 0.25rem;
11
12
 
12
13
  /* Button sizing - 44px is Apple HIG minimum touch target */
@@ -19,23 +20,21 @@
19
20
  --stuic-button-group-ring-color: var(--stuic-color-ring);
20
21
 
21
22
  /* Container colors - theme vars */
22
- --stuic-button-group-bg: var(--stuic-color-surface);
23
+ --stuic-button-group-bg: var(--stuic-color-muted);
23
24
  --stuic-button-group-text: var(--stuic-color-foreground);
24
25
  --stuic-button-group-border: var(--stuic-color-border);
25
26
 
26
27
  /* Button colors (inactive) */
27
28
  --stuic-button-group-button-bg: transparent;
28
29
  --stuic-button-group-button-text: var(--stuic-color-foreground);
29
- --stuic-button-group-button-bg-hover: var(--stuic-color-muted);
30
+ --stuic-button-group-button-bg-hover: transparent;
30
31
  --stuic-button-group-button-text-hover: var(--stuic-color-foreground);
31
32
 
32
33
  /* Button colors (active) */
33
- --stuic-button-group-button-bg-active: var(--stuic-color-primary);
34
+ --stuic-button-group-button-bg-active: var(--stuic-color-muted-foreground);
34
35
  --stuic-button-group-button-text-active: var(--stuic-color-primary-foreground);
35
- --stuic-button-group-button-bg-active-hover: var(--stuic-color-primary-hover);
36
- --stuic-button-group-button-text-active-hover: var(
37
- --stuic-color-primary-foreground-hover
38
- );
36
+ --stuic-button-group-button-bg-active-hover: var(--stuic-color-muted-foreground);
37
+ --stuic-button-group-button-text-active-hover: var(--stuic-color-primary-foreground);
39
38
  }
40
39
 
41
40
  @layer components {
@@ -109,18 +109,16 @@
109
109
 
110
110
  onDestroy(clearTimers);
111
111
 
112
+ const HTML_ESCAPES: Record<string, string> = {
113
+ "&": "&amp;",
114
+ "<": "&lt;",
115
+ ">": "&gt;",
116
+ '"': "&quot;",
117
+ "'": "&#39;",
118
+ };
119
+
112
120
  function escapeHtml(s: string): string {
113
- return s.replace(/[&<>"']/g, (c) =>
114
- c === "&"
115
- ? "&amp;"
116
- : c === "<"
117
- ? "&lt;"
118
- : c === ">"
119
- ? "&gt;"
120
- : c === '"'
121
- ? "&quot;"
122
- : "&#39;"
123
- );
121
+ return s.replace(/[&<>"']/g, (c) => HTML_ESCAPES[c]);
124
122
  }
125
123
 
126
124
  let subheadingHtml = $derived(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "3.71.0",
3
+ "version": "3.72.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",