@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.
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.js +1 -0
- package/dist/actions/typeahead.svelte.d.ts +53 -0
- package/dist/actions/typeahead.svelte.js +328 -0
- package/dist/base.css +17 -0
- package/dist/components/AlertConfirmPrompt/AlertConfirmPrompt.svelte +4 -3
- package/dist/components/AlertConfirmPrompt/AlertConfirmPrompt.svelte.d.ts +4 -3
- package/dist/components/AlertConfirmPrompt/Current.svelte +1 -2
- package/dist/components/AlertConfirmPrompt/Current.svelte.d.ts +0 -1
- package/dist/components/AlertConfirmPrompt/index.css +47 -43
- package/dist/components/AssetsPreview/AssetsPreview.svelte +0 -1
- package/dist/components/AssetsPreview/AssetsPreview.svelte.d.ts +0 -1
- package/dist/components/AssetsPreview/index.css +31 -29
- package/dist/components/Avatar/Avatar.svelte +0 -1
- package/dist/components/Avatar/Avatar.svelte.d.ts +0 -1
- package/dist/components/Avatar/index.css +87 -85
- package/dist/components/Backdrop/Backdrop.svelte +0 -1
- package/dist/components/Backdrop/Backdrop.svelte.d.ts +0 -1
- package/dist/components/Backdrop/index.css +15 -13
- package/dist/components/Button/Button.svelte +0 -1
- package/dist/components/Button/Button.svelte.d.ts +0 -1
- package/dist/components/Button/index.css +431 -429
- package/dist/components/ButtonGroupRadio/ButtonGroupRadio.svelte +0 -1
- package/dist/components/ButtonGroupRadio/ButtonGroupRadio.svelte.d.ts +0 -1
- package/dist/components/ButtonGroupRadio/index.css +123 -117
- package/dist/components/Collapsible/index.css +17 -15
- package/dist/components/CommandMenu/CommandMenu.svelte +7 -4
- package/dist/components/CommandMenu/CommandMenu.svelte.d.ts +0 -1
- package/dist/components/CommandMenu/index.css +27 -25
- package/dist/components/DismissibleMessage/DismissibleMessage.svelte +0 -2
- package/dist/components/DismissibleMessage/DismissibleMessage.svelte.d.ts +0 -1
- package/dist/components/DismissibleMessage/index.css +116 -110
- package/dist/components/DropdownMenu/DropdownMenu.svelte +317 -74
- package/dist/components/DropdownMenu/DropdownMenu.svelte.d.ts +19 -1
- package/dist/components/DropdownMenu/index.css +236 -170
- package/dist/components/DropdownMenu/index.d.ts +1 -1
- package/dist/components/HoverExpandableWidth/HoverExpandableWidth.svelte +3 -1
- package/dist/components/HoverExpandableWidth/HoverExpandableWidth.svelte.d.ts +1 -0
- package/dist/components/Input/FieldInput.svelte +8 -0
- package/dist/components/Input/FieldInput.svelte.d.ts +2 -0
- package/dist/components/Input/FieldOptions.svelte +1 -1
- package/dist/components/Input/index.css +411 -398
- package/dist/components/KbdShortcut/KbdShortcut.svelte +4 -12
- package/dist/components/KbdShortcut/README.md +34 -0
- package/dist/components/KbdShortcut/index.css +55 -0
- package/dist/components/ListItemButton/ListItemButton.svelte +0 -1
- package/dist/components/ListItemButton/ListItemButton.svelte.d.ts +0 -1
- package/dist/components/ListItemButton/index.css +118 -116
- package/dist/components/Modal/Modal.svelte +0 -1
- package/dist/components/Modal/Modal.svelte.d.ts +0 -1
- package/dist/components/Modal/index.css +18 -16
- package/dist/components/ModalDialog/index.css +29 -27
- package/dist/components/Nav/Nav.svelte +732 -0
- package/dist/components/Nav/Nav.svelte.d.ts +110 -0
- package/dist/components/Nav/README.md +334 -0
- package/dist/components/Nav/index.css +318 -0
- package/dist/components/Nav/index.d.ts +1 -0
- package/dist/components/Nav/index.js +1 -0
- package/dist/components/Notifications/Notifications.svelte +2 -3
- package/dist/components/Notifications/Notifications.svelte.d.ts +0 -1
- package/dist/components/Notifications/index.css +158 -158
- package/dist/components/Notifications/notifications-stack.svelte.d.ts +4 -0
- package/dist/components/Notifications/notifications-stack.svelte.js +8 -0
- package/dist/components/Progress/Progress.svelte +4 -2
- package/dist/components/Progress/Progress.svelte.d.ts +1 -0
- package/dist/components/Progress/README.md +86 -15
- package/dist/components/Progress/_internal/Bar.svelte +4 -15
- package/dist/components/Progress/_internal/Bar.svelte.d.ts +1 -1
- package/dist/components/Progress/_internal/Circle.svelte +30 -2
- package/dist/components/Progress/_internal/Circle.svelte.d.ts +1 -0
- package/dist/components/Progress/index.css +47 -1
- package/dist/components/Skeleton/README.md +152 -0
- package/dist/components/Skeleton/Skeleton.svelte +6 -7
- package/dist/components/Skeleton/Skeleton.svelte.d.ts +0 -1
- package/dist/components/Skeleton/index.css +73 -43
- package/dist/components/Spinner/README.md +149 -37
- package/dist/components/Spinner/Spinner.svelte +14 -38
- package/dist/components/Spinner/Spinner.svelte.d.ts +2 -1
- package/dist/components/Spinner/SpinnerCircle.svelte +6 -34
- package/dist/components/Spinner/SpinnerCircle.svelte.d.ts +1 -0
- package/dist/components/Spinner/SpinnerCircleOscillate.svelte +10 -5
- package/dist/components/Spinner/SpinnerUnicode.svelte +3 -1
- package/dist/components/Spinner/SpinnerUnicode.svelte.d.ts +1 -0
- package/dist/components/Spinner/index.css +104 -0
- package/dist/components/Switch/README.md +34 -18
- package/dist/components/Switch/Switch.svelte +24 -46
- package/dist/components/Switch/Switch.svelte.d.ts +4 -2
- package/dist/components/Switch/index.css +120 -2
- package/dist/components/Switch/index.d.ts +1 -2
- package/dist/components/Switch/index.js +1 -2
- package/dist/components/TabbedMenu/README.md +28 -17
- package/dist/components/TabbedMenu/TabbedMenu.svelte +5 -46
- package/dist/components/TabbedMenu/TabbedMenu.svelte.d.ts +0 -1
- package/dist/components/TabbedMenu/index.css +85 -3
- package/dist/components/ThemePreview/ThemePreview.svelte +86 -33
- package/dist/components/ThemePreview/ThemePreview.svelte.d.ts +3 -1
- package/dist/components/ThemePreview/index.css +24 -8
- package/dist/components/TwCheck/README.md +32 -13
- package/dist/components/TwCheck/TwCheck.svelte +11 -9
- package/dist/components/TwCheck/TwCheck.svelte.d.ts +0 -1
- package/dist/components/TwCheck/index.css +14 -0
- package/dist/components/TypeaheadInput/TypeaheadInput.svelte +19 -187
- package/dist/components/TypeaheadInput/TypeaheadInput.svelte.d.ts +4 -2
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +1 -0
- package/dist/index.css +44 -39
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/themes/blue-orange.css +246 -156
- package/dist/themes/blue-orange.js +24 -0
- package/dist/themes/cyan-red.css +246 -156
- package/dist/themes/cyan-red.js +24 -0
- package/dist/themes/cyan-slate.css +246 -156
- package/dist/themes/cyan-slate.js +25 -1
- package/dist/themes/emerald-pink.css +246 -156
- package/dist/themes/emerald-pink.js +25 -1
- package/dist/themes/fuchsia-emerald.css +246 -156
- package/dist/themes/fuchsia-emerald.js +25 -1
- package/dist/themes/gray.css +246 -156
- package/dist/themes/gray.js +24 -0
- package/dist/themes/indigo-amber.css +246 -156
- package/dist/themes/indigo-amber.js +26 -2
- package/dist/themes/neutral.css +246 -156
- package/dist/themes/neutral.js +24 -0
- package/dist/themes/pink-emerald.css +246 -156
- package/dist/themes/pink-emerald.js +25 -1
- package/dist/themes/pink-teal.css +253 -0
- package/dist/themes/pink-teal.d.ts +6 -0
- package/dist/themes/pink-teal.js +175 -0
- package/dist/themes/purple-yellow.css +246 -156
- package/dist/themes/purple-yellow.js +24 -0
- package/dist/themes/rainbow.css +246 -156
- package/dist/themes/rainbow.js +25 -1
- package/dist/themes/red-blue.css +246 -156
- package/dist/themes/red-blue.js +24 -0
- package/dist/themes/red-cyan.css +246 -156
- package/dist/themes/red-cyan.js +24 -0
- package/dist/themes/red-sky.css +253 -0
- package/dist/themes/red-sky.d.ts +6 -0
- package/dist/themes/red-sky.js +175 -0
- package/dist/themes/rose-teal.css +246 -156
- package/dist/themes/rose-teal.js +24 -0
- package/dist/themes/sky-amber.css +246 -156
- package/dist/themes/sky-amber.js +26 -2
- package/dist/themes/slate-cyan.css +246 -156
- package/dist/themes/slate-cyan.js +25 -1
- package/dist/themes/teal-rose.css +246 -156
- package/dist/themes/teal-rose.js +24 -0
- package/dist/themes/violet-lime.css +246 -156
- package/dist/themes/violet-lime.js +27 -3
- package/dist/utils/design-tokens.d.ts +1 -1
- package/dist/utils/design-tokens.js +44 -3
- package/dist/utils/storage-abstraction.js +1 -1
- package/package.json +11 -28
- package/dist/components/Switch/SwitchButton.svelte +0 -134
- 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
|
-
|
|
51
|
-
cls.push("font-sans pr-0");
|
|
49
|
+
return `<span class="stuic-kbd-symbol">${sym}</span>`;
|
|
52
50
|
}
|
|
53
|
-
|
|
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="
|
|
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
|
+
}
|
|
@@ -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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
var(--stuic-list-item-button-ring-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
var(--stuic-list-item-button-padding-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
var(--stuic-list-item-button-padding-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
var(--stuic-list-item-button-padding-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
}
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
25
|
-
|
|
23
|
+
@layer components {
|
|
24
|
+
/* ============================================================================
|
|
25
|
+
BACKDROP STYLES
|
|
26
|
+
============================================================================ */
|
|
26
27
|
|
|
27
|
-
.stuic-modal-dialog::backdrop {
|
|
28
|
-
|
|
29
|
-
}
|
|
28
|
+
.stuic-modal-dialog::backdrop {
|
|
29
|
+
background: var(--stuic-modal-dialog-backdrop);
|
|
30
|
+
}
|
|
30
31
|
|
|
31
|
-
/* ============================================================================
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
/* ============================================================================
|
|
33
|
+
CONTENT BOX STYLES
|
|
34
|
+
============================================================================ */
|
|
34
35
|
|
|
35
|
-
.stuic-modal-dialog .box {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
/* ============================================================================
|
|
44
|
+
ANIMATIONS
|
|
45
|
+
============================================================================ */
|
|
49
46
|
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
55
|
-
|
|
50
|
+
|
|
51
|
+
@keyframes stuic-modal-dialog-fadeIn {
|
|
52
|
+
from {
|
|
53
|
+
opacity: 0;
|
|
54
|
+
}
|
|
55
|
+
to {
|
|
56
|
+
opacity: 1;
|
|
57
|
+
}
|
|
56
58
|
}
|
|
57
59
|
}
|