@marianmeres/stuic 3.0.0 → 3.0.2

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 (156) hide show
  1. package/dist/actions/index.d.ts +1 -0
  2. package/dist/actions/index.js +1 -0
  3. package/dist/actions/typeahead.svelte.d.ts +53 -0
  4. package/dist/actions/typeahead.svelte.js +328 -0
  5. package/dist/base.css +17 -0
  6. package/dist/components/AlertConfirmPrompt/AlertConfirmPrompt.svelte +4 -3
  7. package/dist/components/AlertConfirmPrompt/AlertConfirmPrompt.svelte.d.ts +4 -3
  8. package/dist/components/AlertConfirmPrompt/Current.svelte +1 -2
  9. package/dist/components/AlertConfirmPrompt/Current.svelte.d.ts +0 -1
  10. package/dist/components/AlertConfirmPrompt/index.css +47 -43
  11. package/dist/components/AssetsPreview/AssetsPreview.svelte +0 -1
  12. package/dist/components/AssetsPreview/AssetsPreview.svelte.d.ts +0 -1
  13. package/dist/components/AssetsPreview/index.css +31 -29
  14. package/dist/components/Avatar/Avatar.svelte +0 -1
  15. package/dist/components/Avatar/Avatar.svelte.d.ts +0 -1
  16. package/dist/components/Avatar/index.css +87 -85
  17. package/dist/components/Backdrop/Backdrop.svelte +0 -1
  18. package/dist/components/Backdrop/Backdrop.svelte.d.ts +0 -1
  19. package/dist/components/Backdrop/index.css +15 -13
  20. package/dist/components/Button/Button.svelte +0 -1
  21. package/dist/components/Button/Button.svelte.d.ts +0 -1
  22. package/dist/components/Button/index.css +431 -429
  23. package/dist/components/ButtonGroupRadio/ButtonGroupRadio.svelte +0 -1
  24. package/dist/components/ButtonGroupRadio/ButtonGroupRadio.svelte.d.ts +0 -1
  25. package/dist/components/ButtonGroupRadio/index.css +123 -117
  26. package/dist/components/Collapsible/index.css +17 -15
  27. package/dist/components/CommandMenu/CommandMenu.svelte +7 -4
  28. package/dist/components/CommandMenu/CommandMenu.svelte.d.ts +0 -1
  29. package/dist/components/CommandMenu/index.css +27 -25
  30. package/dist/components/DismissibleMessage/DismissibleMessage.svelte +0 -2
  31. package/dist/components/DismissibleMessage/DismissibleMessage.svelte.d.ts +0 -1
  32. package/dist/components/DismissibleMessage/index.css +116 -110
  33. package/dist/components/DropdownMenu/DropdownMenu.svelte +317 -74
  34. package/dist/components/DropdownMenu/DropdownMenu.svelte.d.ts +19 -1
  35. package/dist/components/DropdownMenu/index.css +236 -170
  36. package/dist/components/DropdownMenu/index.d.ts +1 -1
  37. package/dist/components/HoverExpandableWidth/HoverExpandableWidth.svelte +3 -1
  38. package/dist/components/HoverExpandableWidth/HoverExpandableWidth.svelte.d.ts +1 -0
  39. package/dist/components/Input/FieldInput.svelte +8 -0
  40. package/dist/components/Input/FieldInput.svelte.d.ts +2 -0
  41. package/dist/components/Input/FieldOptions.svelte +1 -1
  42. package/dist/components/Input/index.css +411 -398
  43. package/dist/components/KbdShortcut/KbdShortcut.svelte +4 -12
  44. package/dist/components/KbdShortcut/README.md +34 -0
  45. package/dist/components/KbdShortcut/index.css +55 -0
  46. package/dist/components/ListItemButton/ListItemButton.svelte +0 -1
  47. package/dist/components/ListItemButton/ListItemButton.svelte.d.ts +0 -1
  48. package/dist/components/ListItemButton/index.css +118 -116
  49. package/dist/components/Modal/Modal.svelte +0 -1
  50. package/dist/components/Modal/Modal.svelte.d.ts +0 -1
  51. package/dist/components/Modal/index.css +18 -16
  52. package/dist/components/ModalDialog/index.css +29 -27
  53. package/dist/components/Nav/Nav.svelte +732 -0
  54. package/dist/components/Nav/Nav.svelte.d.ts +110 -0
  55. package/dist/components/Nav/README.md +334 -0
  56. package/dist/components/Nav/index.css +318 -0
  57. package/dist/components/Nav/index.d.ts +1 -0
  58. package/dist/components/Nav/index.js +1 -0
  59. package/dist/components/Notifications/Notifications.svelte +2 -3
  60. package/dist/components/Notifications/Notifications.svelte.d.ts +0 -1
  61. package/dist/components/Notifications/index.css +158 -158
  62. package/dist/components/Notifications/notifications-stack.svelte.d.ts +4 -0
  63. package/dist/components/Notifications/notifications-stack.svelte.js +8 -0
  64. package/dist/components/Progress/Progress.svelte +4 -2
  65. package/dist/components/Progress/Progress.svelte.d.ts +1 -0
  66. package/dist/components/Progress/README.md +86 -15
  67. package/dist/components/Progress/_internal/Bar.svelte +4 -15
  68. package/dist/components/Progress/_internal/Bar.svelte.d.ts +1 -1
  69. package/dist/components/Progress/_internal/Circle.svelte +30 -2
  70. package/dist/components/Progress/_internal/Circle.svelte.d.ts +1 -0
  71. package/dist/components/Progress/index.css +47 -1
  72. package/dist/components/Skeleton/README.md +152 -0
  73. package/dist/components/Skeleton/Skeleton.svelte +6 -7
  74. package/dist/components/Skeleton/Skeleton.svelte.d.ts +0 -1
  75. package/dist/components/Skeleton/index.css +73 -43
  76. package/dist/components/Spinner/README.md +149 -37
  77. package/dist/components/Spinner/Spinner.svelte +14 -38
  78. package/dist/components/Spinner/Spinner.svelte.d.ts +2 -1
  79. package/dist/components/Spinner/SpinnerCircle.svelte +6 -34
  80. package/dist/components/Spinner/SpinnerCircle.svelte.d.ts +1 -0
  81. package/dist/components/Spinner/SpinnerCircleOscillate.svelte +10 -5
  82. package/dist/components/Spinner/SpinnerUnicode.svelte +3 -1
  83. package/dist/components/Spinner/SpinnerUnicode.svelte.d.ts +1 -0
  84. package/dist/components/Spinner/index.css +104 -0
  85. package/dist/components/Switch/README.md +34 -18
  86. package/dist/components/Switch/Switch.svelte +24 -46
  87. package/dist/components/Switch/Switch.svelte.d.ts +4 -2
  88. package/dist/components/Switch/index.css +120 -2
  89. package/dist/components/Switch/index.d.ts +1 -2
  90. package/dist/components/Switch/index.js +1 -2
  91. package/dist/components/TabbedMenu/README.md +28 -17
  92. package/dist/components/TabbedMenu/TabbedMenu.svelte +5 -46
  93. package/dist/components/TabbedMenu/TabbedMenu.svelte.d.ts +0 -1
  94. package/dist/components/TabbedMenu/index.css +85 -3
  95. package/dist/components/ThemePreview/ThemePreview.svelte +86 -33
  96. package/dist/components/ThemePreview/ThemePreview.svelte.d.ts +3 -1
  97. package/dist/components/ThemePreview/index.css +24 -8
  98. package/dist/components/TwCheck/README.md +32 -13
  99. package/dist/components/TwCheck/TwCheck.svelte +11 -9
  100. package/dist/components/TwCheck/TwCheck.svelte.d.ts +0 -1
  101. package/dist/components/TwCheck/index.css +14 -0
  102. package/dist/components/TypeaheadInput/TypeaheadInput.svelte +19 -187
  103. package/dist/components/TypeaheadInput/TypeaheadInput.svelte.d.ts +4 -2
  104. package/dist/icons/index.d.ts +1 -0
  105. package/dist/icons/index.js +1 -0
  106. package/dist/index.css +44 -39
  107. package/dist/index.d.ts +1 -0
  108. package/dist/index.js +1 -0
  109. package/dist/themes/blue-orange.css +246 -156
  110. package/dist/themes/blue-orange.js +24 -0
  111. package/dist/themes/cyan-red.css +246 -156
  112. package/dist/themes/cyan-red.js +24 -0
  113. package/dist/themes/cyan-slate.css +246 -156
  114. package/dist/themes/cyan-slate.js +25 -1
  115. package/dist/themes/emerald-pink.css +246 -156
  116. package/dist/themes/emerald-pink.js +25 -1
  117. package/dist/themes/fuchsia-emerald.css +246 -156
  118. package/dist/themes/fuchsia-emerald.js +25 -1
  119. package/dist/themes/gray.css +246 -156
  120. package/dist/themes/gray.js +24 -0
  121. package/dist/themes/indigo-amber.css +246 -156
  122. package/dist/themes/indigo-amber.js +26 -2
  123. package/dist/themes/neutral.css +246 -156
  124. package/dist/themes/neutral.js +24 -0
  125. package/dist/themes/pink-emerald.css +246 -156
  126. package/dist/themes/pink-emerald.js +25 -1
  127. package/dist/themes/pink-teal.css +253 -0
  128. package/dist/themes/pink-teal.d.ts +6 -0
  129. package/dist/themes/pink-teal.js +175 -0
  130. package/dist/themes/purple-yellow.css +246 -156
  131. package/dist/themes/purple-yellow.js +24 -0
  132. package/dist/themes/rainbow.css +246 -156
  133. package/dist/themes/rainbow.js +25 -1
  134. package/dist/themes/red-blue.css +246 -156
  135. package/dist/themes/red-blue.js +24 -0
  136. package/dist/themes/red-cyan.css +246 -156
  137. package/dist/themes/red-cyan.js +24 -0
  138. package/dist/themes/red-sky.css +253 -0
  139. package/dist/themes/red-sky.d.ts +6 -0
  140. package/dist/themes/red-sky.js +175 -0
  141. package/dist/themes/rose-teal.css +246 -156
  142. package/dist/themes/rose-teal.js +24 -0
  143. package/dist/themes/sky-amber.css +246 -156
  144. package/dist/themes/sky-amber.js +26 -2
  145. package/dist/themes/slate-cyan.css +246 -156
  146. package/dist/themes/slate-cyan.js +25 -1
  147. package/dist/themes/teal-rose.css +246 -156
  148. package/dist/themes/teal-rose.js +24 -0
  149. package/dist/themes/violet-lime.css +246 -156
  150. package/dist/themes/violet-lime.js +27 -3
  151. package/dist/utils/design-tokens.d.ts +1 -1
  152. package/dist/utils/design-tokens.js +44 -3
  153. package/dist/utils/storage-abstraction.js +1 -1
  154. package/package.json +11 -28
  155. package/dist/components/Switch/SwitchButton.svelte +0 -134
  156. package/dist/components/Switch/SwitchButton.svelte.d.ts +0 -21
@@ -44,14 +44,11 @@
44
44
  let { class: classProp, metas, keys, forcedOs }: Props = $props();
45
45
 
46
46
  function wrap(s: string, mac: boolean) {
47
- const cls = ["pr-0.5 font-mono tracking-tight"];
48
47
  const sym = mac ? macSymbol[s as KnownMeta] : otherSymbol[s as KnownMeta];
49
48
  if (sym) {
50
- s = sym;
51
- cls.push("font-sans pr-0");
49
+ return `<span class="stuic-kbd-symbol">${sym}</span>`;
52
50
  }
53
- const _class = twMerge(...cls);
54
- return `<span class="${_class}">${ucfirst(s)}</span>`;
51
+ return `<span class="stuic-kbd-key">${ucfirst(s)}</span>`;
55
52
  }
56
53
 
57
54
  async function get_meta_key() {
@@ -73,13 +70,8 @@
73
70
  }
74
71
  </script>
75
72
 
76
- <kbd
77
- class={twMerge(
78
- "text-sm leading-0 space-x-0.5 rounded px-1 py-0 outline outline-neutral-400",
79
- classProp
80
- )}
81
- >
73
+ <kbd class={twMerge("stuic-kbd", classProp)}>
82
74
  {#await get_meta_key() then metaKey}
83
- <span class="font-sans">{@html metaKey}</span><span>{keys}</span>
75
+ {@html metaKey}<span class="stuic-kbd-key">{keys}</span>
84
76
  {/await}
85
77
  </kbd>
@@ -79,3 +79,37 @@ Display keyboard shortcuts with platform-aware modifier key symbols. Automatical
79
79
  class="bg-gray-100 px-2 py-1"
80
80
  />
81
81
  ```
82
+
83
+ ## CSS Variables
84
+
85
+ Override to customize appearance:
86
+
87
+ | Variable | Default | Description |
88
+ |----------|---------|-------------|
89
+ | `--stuic-kbd-font-family` | `var(--font-mono)` | Font family |
90
+ | `--stuic-kbd-font-size` | `var(--text-sm)` | Font size |
91
+ | `--stuic-kbd-padding-x` | `calc(var(--spacing) * 1)` | Horizontal padding |
92
+ | `--stuic-kbd-padding-y` | `0` | Vertical padding |
93
+ | `--stuic-kbd-gap` | `calc(var(--spacing) * 0.5)` | Gap between elements |
94
+ | `--stuic-kbd-radius` | `var(--radius-sm)` | Border radius |
95
+ | `--stuic-kbd-border-width` | `1px` | Border width |
96
+ | `--stuic-kbd-border-color` | `var(--stuic-color-border)` | Border color (themeable) |
97
+
98
+ ### Global Override
99
+
100
+ ```css
101
+ :root {
102
+ --stuic-kbd-border-color: var(--color-blue-500);
103
+ --stuic-kbd-radius: var(--radius-lg);
104
+ }
105
+ ```
106
+
107
+ ### Local Override
108
+
109
+ ```svelte
110
+ <KbdShortcut
111
+ metas={['cmd']}
112
+ keys="K"
113
+ style="--stuic-kbd-border-color: blue; --stuic-kbd-radius: 0;"
114
+ />
115
+ ```
@@ -0,0 +1,55 @@
1
+ /* ============================================================================
2
+ KBD SHORTCUT COMPONENT TOKENS
3
+ Override globally: :root { --stuic-kbd-border-color: blue; }
4
+ Override locally: <KbdShortcut style="--stuic-kbd-radius: 0;">
5
+ ============================================================================ */
6
+
7
+ :root {
8
+ /* Typography */
9
+ --stuic-kbd-font-family: var(--font-sans);
10
+ --stuic-kbd-font-size: var(--text-sm);
11
+
12
+ /* Spacing */
13
+ --stuic-kbd-padding-x: calc(var(--spacing) * 1);
14
+ --stuic-kbd-padding-y: calc(var(--spacing) * 1);
15
+ --stuic-kbd-gap: calc(var(--spacing) * 0.5);
16
+
17
+ /* Border */
18
+ --stuic-kbd-radius: var(--radius-sm);
19
+ --stuic-kbd-border-width: 1px;
20
+ --stuic-kbd-border-color: var(--stuic-color-border);
21
+ }
22
+
23
+ @layer components {
24
+ /* ============================================================================
25
+ BASE STYLES
26
+ ============================================================================ */
27
+
28
+ .stuic-kbd {
29
+ /* Layout */
30
+ display: inline-flex;
31
+ align-items: center;
32
+ gap: var(--stuic-kbd-gap);
33
+
34
+ /* Typography */
35
+ font-family: var(--stuic-kbd-font-family);
36
+ font-size: var(--stuic-kbd-font-size);
37
+ line-height: 1;
38
+
39
+ /* Box model */
40
+ padding: var(--stuic-kbd-padding-y) var(--stuic-kbd-padding-x);
41
+ border-radius: var(--stuic-kbd-radius);
42
+ border: var(--stuic-kbd-border-width) solid var(--stuic-kbd-border-color);
43
+ }
44
+
45
+ /* Symbol styling (⌘, ⇧, ⌥, ⌃, ⊞) */
46
+ .stuic-kbd-symbol {
47
+ font-family: var(--font-sans);
48
+ }
49
+
50
+ /* Text key styling (Ctrl, Alt, etc.) */
51
+ .stuic-kbd-key {
52
+ font-family: var(--font-mono);
53
+ letter-spacing: var(--tracking-tight);
54
+ }
55
+ }
@@ -41,7 +41,6 @@
41
41
  import { twMerge } from "../../utils/tw-merge.js";
42
42
  import { DevicePointer } from "../../utils/device-pointer.svelte.js";
43
43
  import Thc from "../Thc/Thc.svelte";
44
- import "./index.css";
45
44
 
46
45
  let {
47
46
  children,
@@ -33,7 +33,6 @@ export interface Props extends Omit<HTMLButtonAttributes, "children" | "class">
33
33
  /** Bindable element reference */
34
34
  el?: HTMLButtonElement | HTMLAnchorElement;
35
35
  }
36
- import "./index.css";
37
36
  declare const ListItemButton: import("svelte").Component<Props, {}, "el">;
38
37
  type ListItemButton = ReturnType<typeof ListItemButton>;
39
38
  export default ListItemButton;
@@ -58,120 +58,122 @@
58
58
  --stuic-list-item-button-border-focus: transparent;
59
59
  }
60
60
 
61
- /* =============================================================================
62
- BASE STYLES
63
- ============================================================================= */
64
-
65
- .stuic-list-item-button {
66
- /* Layout */
67
- display: flex;
68
- align-items: center;
69
- gap: var(--stuic-list-item-button-gap);
70
- width: 100%;
71
-
72
- /* Typography */
73
- text-align: left;
74
- text-decoration: none;
75
-
76
- /* Box model */
77
- border-width: 1px;
78
- border-style: solid;
79
- border-radius: var(--stuic-list-item-button-radius);
80
-
81
- /* Colors */
82
- background: var(--stuic-list-item-button-bg);
83
- color: var(--stuic-list-item-button-text);
84
- border-color: var(--stuic-list-item-button-border);
85
-
86
- /* Interaction */
87
- cursor: pointer;
88
- user-select: none;
89
- -webkit-tap-highlight-color: transparent;
90
- touch-action: manipulation;
91
- transition:
92
- background var(--stuic-list-item-button-transition),
93
- color var(--stuic-list-item-button-transition),
94
- border-color var(--stuic-list-item-button-transition);
95
- }
96
-
97
- /* =============================================================================
98
- STATE STYLES
99
- ============================================================================= */
100
-
101
- /* Hover state */
102
- .stuic-list-item-button:hover:not(:disabled):not([data-active]) {
103
- background: var(--stuic-list-item-button-bg-hover);
104
- color: var(--stuic-list-item-button-text-hover);
105
- border-color: var(--stuic-list-item-button-border-hover);
106
- }
107
-
108
- /* Focus styles */
109
- .stuic-list-item-button:focus {
110
- outline: none;
111
- }
112
-
113
- .stuic-list-item-button:focus-visible:not([data-active]) {
114
- background: var(--stuic-list-item-button-bg-focus);
115
- color: var(--stuic-list-item-button-text-focus);
116
- border-color: var(--stuic-list-item-button-border-focus);
117
- outline: var(--stuic-list-item-button-ring-width) solid
118
- var(--stuic-list-item-button-ring-color);
119
- outline-offset: var(--stuic-list-item-button-ring-offset);
120
- }
121
-
122
- /* Active/Selected state (via data attribute) */
123
- .stuic-list-item-button[data-active] {
124
- background: var(--stuic-list-item-button-bg-active);
125
- color: var(--stuic-list-item-button-text-active);
126
- border-color: var(--stuic-list-item-button-border-active);
127
- }
128
-
129
- /* Focused state (keyboard navigation highlight, distinct from focus-visible) */
130
- .stuic-list-item-button[data-focused]:not([data-active]) {
131
- background: var(--stuic-list-item-button-bg-focus);
132
- color: var(--stuic-list-item-button-text-focus);
133
- border-color: var(--stuic-list-item-button-border-focus);
134
- }
135
-
136
- /* Disabled state */
137
- .stuic-list-item-button:disabled {
138
- opacity: 0.5;
139
- cursor: not-allowed;
140
- pointer-events: none;
141
- }
142
-
143
- /* =============================================================================
144
- SIZE VARIANTS
145
- ============================================================================= */
146
-
147
- .stuic-list-item-button[data-size="sm"] {
148
- padding: var(--stuic-list-item-button-padding-y-sm)
149
- var(--stuic-list-item-button-padding-x-sm);
150
- font-size: var(--stuic-list-item-button-font-size-sm);
151
- min-height: var(--stuic-list-item-button-min-height-sm);
152
- }
153
-
154
- .stuic-list-item-button[data-size="md"] {
155
- padding: var(--stuic-list-item-button-padding-y-md)
156
- var(--stuic-list-item-button-padding-x-md);
157
- font-size: var(--stuic-list-item-button-font-size-md);
158
- min-height: var(--stuic-list-item-button-min-height-md);
159
- }
160
-
161
- .stuic-list-item-button[data-size="lg"] {
162
- padding: var(--stuic-list-item-button-padding-y-lg)
163
- var(--stuic-list-item-button-padding-x-lg);
164
- font-size: var(--stuic-list-item-button-font-size-lg);
165
- min-height: var(--stuic-list-item-button-min-height-lg);
166
- }
167
-
168
- /* =============================================================================
169
- TOUCH-FRIENDLY MODIFIER
170
- Ensures minimum 44px touch target per Apple HIG guidelines
171
- ============================================================================= */
172
-
173
- .stuic-list-item-button[data-touch-friendly] {
174
- min-height: var(--stuic-list-item-button-min-height-touch);
175
- padding-top: var(--stuic-list-item-button-padding-y-touch);
176
- padding-bottom: var(--stuic-list-item-button-padding-y-touch);
61
+ @layer components {
62
+ /* =============================================================================
63
+ BASE STYLES
64
+ ============================================================================= */
65
+
66
+ .stuic-list-item-button {
67
+ /* Layout */
68
+ display: flex;
69
+ align-items: center;
70
+ gap: var(--stuic-list-item-button-gap);
71
+ width: 100%;
72
+
73
+ /* Typography */
74
+ text-align: left;
75
+ text-decoration: none;
76
+
77
+ /* Box model */
78
+ border-width: 1px;
79
+ border-style: solid;
80
+ border-radius: var(--stuic-list-item-button-radius);
81
+
82
+ /* Colors */
83
+ background: var(--stuic-list-item-button-bg);
84
+ color: var(--stuic-list-item-button-text);
85
+ border-color: var(--stuic-list-item-button-border);
86
+
87
+ /* Interaction */
88
+ cursor: pointer;
89
+ user-select: none;
90
+ -webkit-tap-highlight-color: transparent;
91
+ touch-action: manipulation;
92
+ transition:
93
+ background var(--stuic-list-item-button-transition),
94
+ color var(--stuic-list-item-button-transition),
95
+ border-color var(--stuic-list-item-button-transition);
96
+ }
97
+
98
+ /* =============================================================================
99
+ STATE STYLES
100
+ ============================================================================= */
101
+
102
+ /* Hover state */
103
+ .stuic-list-item-button:hover:not(:disabled):not([data-active]) {
104
+ background: var(--stuic-list-item-button-bg-hover);
105
+ color: var(--stuic-list-item-button-text-hover);
106
+ border-color: var(--stuic-list-item-button-border-hover);
107
+ }
108
+
109
+ /* Focus styles */
110
+ .stuic-list-item-button:focus {
111
+ outline: none;
112
+ }
113
+
114
+ .stuic-list-item-button:focus-visible:not([data-active]) {
115
+ background: var(--stuic-list-item-button-bg-focus);
116
+ color: var(--stuic-list-item-button-text-focus);
117
+ border-color: var(--stuic-list-item-button-border-focus);
118
+ outline: var(--stuic-list-item-button-ring-width) solid
119
+ var(--stuic-list-item-button-ring-color);
120
+ outline-offset: var(--stuic-list-item-button-ring-offset);
121
+ }
122
+
123
+ /* Active/Selected state (via data attribute) */
124
+ .stuic-list-item-button[data-active] {
125
+ background: var(--stuic-list-item-button-bg-active);
126
+ color: var(--stuic-list-item-button-text-active);
127
+ border-color: var(--stuic-list-item-button-border-active);
128
+ }
129
+
130
+ /* Focused state (keyboard navigation highlight, distinct from focus-visible) */
131
+ .stuic-list-item-button[data-focused]:not([data-active]) {
132
+ background: var(--stuic-list-item-button-bg-focus);
133
+ color: var(--stuic-list-item-button-text-focus);
134
+ border-color: var(--stuic-list-item-button-border-focus);
135
+ }
136
+
137
+ /* Disabled state */
138
+ .stuic-list-item-button:disabled {
139
+ opacity: 0.5;
140
+ cursor: not-allowed;
141
+ pointer-events: none;
142
+ }
143
+
144
+ /* =============================================================================
145
+ SIZE VARIANTS
146
+ ============================================================================= */
147
+
148
+ .stuic-list-item-button[data-size="sm"] {
149
+ padding: var(--stuic-list-item-button-padding-y-sm)
150
+ var(--stuic-list-item-button-padding-x-sm);
151
+ font-size: var(--stuic-list-item-button-font-size-sm);
152
+ min-height: var(--stuic-list-item-button-min-height-sm);
153
+ }
154
+
155
+ .stuic-list-item-button[data-size="md"] {
156
+ padding: var(--stuic-list-item-button-padding-y-md)
157
+ var(--stuic-list-item-button-padding-x-md);
158
+ font-size: var(--stuic-list-item-button-font-size-md);
159
+ min-height: var(--stuic-list-item-button-min-height-md);
160
+ }
161
+
162
+ .stuic-list-item-button[data-size="lg"] {
163
+ padding: var(--stuic-list-item-button-padding-y-lg)
164
+ var(--stuic-list-item-button-padding-x-lg);
165
+ font-size: var(--stuic-list-item-button-font-size-lg);
166
+ min-height: var(--stuic-list-item-button-min-height-lg);
167
+ }
168
+
169
+ /* =============================================================================
170
+ TOUCH-FRIENDLY MODIFIER
171
+ Ensures minimum 44px touch target per Apple HIG guidelines
172
+ ============================================================================= */
173
+
174
+ .stuic-list-item-button[data-touch-friendly] {
175
+ min-height: var(--stuic-list-item-button-min-height-touch);
176
+ padding-top: var(--stuic-list-item-button-padding-y-touch);
177
+ padding-bottom: var(--stuic-list-item-button-padding-y-touch);
178
+ }
177
179
  }
@@ -27,7 +27,6 @@
27
27
  <script lang="ts">
28
28
  import ModalDialog from "../ModalDialog/ModalDialog.svelte";
29
29
  import { twMerge } from "../../utils/tw-merge.js";
30
- import "./index.css";
31
30
 
32
31
  let {
33
32
  visible = $bindable(false),
@@ -20,7 +20,6 @@ export interface Props {
20
20
  /** Disable body scroll lock when modal is open */
21
21
  noScrollLock?: boolean;
22
22
  }
23
- import "./index.css";
24
23
  declare const Modal: import("svelte").Component<Props, {
25
24
  close: () => void;
26
25
  open: (openerOrEvent?: null | HTMLElement | MouseEvent) => void;
@@ -13,24 +13,26 @@
13
13
  --stuic-modal-radius: var(--radius-md);
14
14
  }
15
15
 
16
- /* ============================================================================
17
- BASE STYLES
18
- ============================================================================ */
19
-
20
- .stuic-modal {
21
- background: var(--stuic-modal-bg);
22
- color: var(--stuic-modal-text);
23
- border-radius: 0; /* Mobile: fullscreen, no radius */
24
- }
16
+ @layer components {
17
+ /* ============================================================================
18
+ BASE STYLES
19
+ ============================================================================ */
25
20
 
26
- @media (min-width: 48rem) {
27
- /* md breakpoint */
28
21
  .stuic-modal {
29
- border-radius: var(--stuic-modal-radius);
22
+ background: var(--stuic-modal-bg);
23
+ color: var(--stuic-modal-text);
24
+ border-radius: 0; /* Mobile: fullscreen, no radius */
25
+ }
26
+
27
+ @media (min-width: 48rem) {
28
+ /* md breakpoint */
29
+ .stuic-modal {
30
+ border-radius: var(--stuic-modal-radius);
31
+ }
30
32
  }
31
- }
32
33
 
33
- /* Thin scrollbar for main content area */
34
- .stuic-modal .main {
35
- scrollbar-width: thin;
34
+ /* Thin scrollbar for main content area */
35
+ .stuic-modal .main {
36
+ scrollbar-width: thin;
37
+ }
36
38
  }
@@ -20,38 +20,40 @@
20
20
  --stuic-modal-dialog-shadow: var(--shadow-xl);
21
21
  }
22
22
 
23
- /* ============================================================================
24
- BACKDROP STYLES
25
- ============================================================================ */
23
+ @layer components {
24
+ /* ============================================================================
25
+ BACKDROP STYLES
26
+ ============================================================================ */
26
27
 
27
- .stuic-modal-dialog::backdrop {
28
- background: var(--stuic-modal-dialog-backdrop);
29
- }
28
+ .stuic-modal-dialog::backdrop {
29
+ background: var(--stuic-modal-dialog-backdrop);
30
+ }
30
31
 
31
- /* ============================================================================
32
- CONTENT BOX STYLES
33
- ============================================================================ */
32
+ /* ============================================================================
33
+ CONTENT BOX STYLES
34
+ ============================================================================ */
34
35
 
35
- .stuic-modal-dialog .box {
36
- background: var(--stuic-modal-dialog-bg);
37
- color: var(--stuic-modal-dialog-text);
38
- border-radius: var(--stuic-modal-dialog-radius);
39
- box-shadow: var(--stuic-modal-dialog-shadow);
40
- }
41
-
42
- /* ============================================================================
43
- ANIMATIONS
44
- ============================================================================ */
36
+ .stuic-modal-dialog .box {
37
+ background: var(--stuic-modal-dialog-bg);
38
+ color: var(--stuic-modal-dialog-text);
39
+ border-radius: var(--stuic-modal-dialog-radius);
40
+ box-shadow: var(--stuic-modal-dialog-shadow);
41
+ }
45
42
 
46
- .stuic-modal-dialog[open]::backdrop {
47
- animation: stuic-modal-dialog-fadeIn var(--stuic-modal-dialog-transition) ease-out;
48
- }
43
+ /* ============================================================================
44
+ ANIMATIONS
45
+ ============================================================================ */
49
46
 
50
- @keyframes stuic-modal-dialog-fadeIn {
51
- from {
52
- opacity: 0;
47
+ .stuic-modal-dialog[open]::backdrop {
48
+ animation: stuic-modal-dialog-fadeIn var(--stuic-modal-dialog-transition) ease-out;
53
49
  }
54
- to {
55
- opacity: 1;
50
+
51
+ @keyframes stuic-modal-dialog-fadeIn {
52
+ from {
53
+ opacity: 0;
54
+ }
55
+ to {
56
+ opacity: 1;
57
+ }
56
58
  }
57
59
  }