@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
|
@@ -64,204 +64,270 @@
|
|
|
64
64
|
|
|
65
65
|
/* Expandable section indent */
|
|
66
66
|
--stuic-dropdown-menu-expandable-indent: calc(var(--spacing) * 4);
|
|
67
|
+
|
|
68
|
+
/* Search */
|
|
69
|
+
--stuic-dropdown-menu-search-bg: var(--stuic-color-surface);
|
|
70
|
+
--stuic-dropdown-menu-search-border: var(--stuic-color-border);
|
|
71
|
+
--stuic-dropdown-menu-search-text: var(--stuic-color-muted-foreground);
|
|
67
72
|
}
|
|
68
73
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
74
|
+
@layer components {
|
|
75
|
+
/* =============================================================================
|
|
76
|
+
BASE STYLES
|
|
77
|
+
============================================================================= */
|
|
72
78
|
|
|
73
|
-
.stuic-dropdown-menu {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
79
|
+
.stuic-dropdown-menu {
|
|
80
|
+
position: relative;
|
|
81
|
+
display: inline-block;
|
|
82
|
+
}
|
|
77
83
|
|
|
78
|
-
/* =============================================================================
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
/* =============================================================================
|
|
85
|
+
TRIGGER BUTTON
|
|
86
|
+
============================================================================= */
|
|
87
|
+
|
|
88
|
+
.stuic-dropdown-menu-trigger {
|
|
89
|
+
/* Layout */
|
|
90
|
+
display: inline-flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
gap: var(--stuic-dropdown-menu-gap);
|
|
94
|
+
|
|
95
|
+
/* Sizing */
|
|
96
|
+
padding: var(--stuic-dropdown-menu-trigger-padding-y)
|
|
97
|
+
var(--stuic-dropdown-menu-trigger-padding-x);
|
|
98
|
+
|
|
99
|
+
/* Box model */
|
|
100
|
+
border-width: 1px;
|
|
101
|
+
border-style: solid;
|
|
102
|
+
border-radius: var(--stuic-dropdown-menu-radius);
|
|
103
|
+
|
|
104
|
+
/* Colors */
|
|
105
|
+
background: var(--stuic-dropdown-menu-trigger-bg);
|
|
106
|
+
color: var(--stuic-dropdown-menu-trigger-text);
|
|
107
|
+
border-color: var(--stuic-dropdown-menu-trigger-border);
|
|
108
|
+
|
|
109
|
+
/* Interaction */
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
user-select: none;
|
|
112
|
+
-webkit-tap-highlight-color: transparent;
|
|
113
|
+
touch-action: manipulation;
|
|
114
|
+
transition:
|
|
115
|
+
background var(--stuic-dropdown-menu-transition),
|
|
116
|
+
color var(--stuic-dropdown-menu-transition),
|
|
117
|
+
border-color var(--stuic-dropdown-menu-transition);
|
|
118
|
+
}
|
|
81
119
|
|
|
82
|
-
.stuic-dropdown-menu-trigger {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
gap: var(--stuic-dropdown-menu-gap);
|
|
88
|
-
|
|
89
|
-
/* Sizing */
|
|
90
|
-
padding: var(--stuic-dropdown-menu-trigger-padding-y)
|
|
91
|
-
var(--stuic-dropdown-menu-trigger-padding-x);
|
|
92
|
-
|
|
93
|
-
/* Box model */
|
|
94
|
-
border-width: 1px;
|
|
95
|
-
border-style: solid;
|
|
96
|
-
border-radius: var(--stuic-dropdown-menu-radius);
|
|
97
|
-
|
|
98
|
-
/* Colors */
|
|
99
|
-
background: var(--stuic-dropdown-menu-trigger-bg);
|
|
100
|
-
color: var(--stuic-dropdown-menu-trigger-text);
|
|
101
|
-
border-color: var(--stuic-dropdown-menu-trigger-border);
|
|
102
|
-
|
|
103
|
-
/* Interaction */
|
|
104
|
-
cursor: pointer;
|
|
105
|
-
user-select: none;
|
|
106
|
-
-webkit-tap-highlight-color: transparent;
|
|
107
|
-
touch-action: manipulation;
|
|
108
|
-
transition:
|
|
109
|
-
background var(--stuic-dropdown-menu-transition),
|
|
110
|
-
color var(--stuic-dropdown-menu-transition),
|
|
111
|
-
border-color var(--stuic-dropdown-menu-transition);
|
|
112
|
-
}
|
|
120
|
+
.stuic-dropdown-menu-trigger:hover:not(:disabled) {
|
|
121
|
+
background: var(--stuic-dropdown-menu-trigger-bg-hover);
|
|
122
|
+
color: var(--stuic-dropdown-menu-trigger-text-hover);
|
|
123
|
+
border-color: var(--stuic-dropdown-menu-trigger-border-hover);
|
|
124
|
+
}
|
|
113
125
|
|
|
114
|
-
.stuic-dropdown-menu-trigger:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
126
|
+
.stuic-dropdown-menu-trigger:active:not(:disabled) {
|
|
127
|
+
background: var(--stuic-dropdown-menu-trigger-bg-active);
|
|
128
|
+
color: var(--stuic-dropdown-menu-trigger-text-active);
|
|
129
|
+
border-color: var(--stuic-dropdown-menu-trigger-border-active);
|
|
130
|
+
}
|
|
119
131
|
|
|
120
|
-
.stuic-dropdown-menu-trigger:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
132
|
+
.stuic-dropdown-menu-trigger:focus-visible {
|
|
133
|
+
outline: var(--stuic-dropdown-menu-ring-width) solid
|
|
134
|
+
var(--stuic-dropdown-menu-ring-color);
|
|
135
|
+
outline-offset: var(--stuic-dropdown-menu-ring-offset);
|
|
136
|
+
}
|
|
125
137
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
outline-offset: var(--stuic-dropdown-menu-ring-offset);
|
|
130
|
-
}
|
|
138
|
+
/* =============================================================================
|
|
139
|
+
DROPDOWN CONTAINER
|
|
140
|
+
============================================================================= */
|
|
131
141
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
142
|
+
.stuic-dropdown-menu-dropdown {
|
|
143
|
+
/* Colors */
|
|
144
|
+
background: var(--stuic-dropdown-menu-bg);
|
|
145
|
+
color: var(--stuic-dropdown-menu-text);
|
|
146
|
+
border: 1px solid var(--stuic-dropdown-menu-border);
|
|
147
|
+
box-shadow: var(--stuic-dropdown-menu-shadow);
|
|
148
|
+
|
|
149
|
+
/* Box model */
|
|
150
|
+
border-radius: var(--stuic-dropdown-menu-radius);
|
|
151
|
+
padding: var(--stuic-dropdown-menu-padding);
|
|
152
|
+
|
|
153
|
+
/* Layout */
|
|
154
|
+
min-width: var(--stuic-dropdown-menu-min-width);
|
|
155
|
+
overflow-y: auto;
|
|
156
|
+
scrollbar-width: thin;
|
|
157
|
+
|
|
158
|
+
/* Stacking */
|
|
159
|
+
z-index: 50;
|
|
160
|
+
}
|
|
135
161
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
color: var(--stuic-dropdown-menu-text);
|
|
140
|
-
border: 1px solid var(--stuic-dropdown-menu-border);
|
|
141
|
-
box-shadow: var(--stuic-dropdown-menu-shadow);
|
|
162
|
+
/* =============================================================================
|
|
163
|
+
DIVIDER
|
|
164
|
+
============================================================================= */
|
|
142
165
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
166
|
+
.stuic-dropdown-menu-divider {
|
|
167
|
+
height: var(--stuic-dropdown-menu-divider-height);
|
|
168
|
+
margin: var(--stuic-dropdown-menu-divider-margin-y) 0;
|
|
169
|
+
background: var(--stuic-dropdown-menu-divider-bg);
|
|
170
|
+
}
|
|
146
171
|
|
|
147
|
-
/*
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
172
|
+
/* =============================================================================
|
|
173
|
+
HEADER (Section Label)
|
|
174
|
+
============================================================================= */
|
|
175
|
+
|
|
176
|
+
.stuic-dropdown-menu-header {
|
|
177
|
+
padding: var(--stuic-dropdown-menu-header-padding-y)
|
|
178
|
+
var(--stuic-dropdown-menu-header-padding-x);
|
|
179
|
+
font-size: var(--stuic-dropdown-menu-header-font-size);
|
|
180
|
+
font-weight: var(--stuic-dropdown-menu-header-font-weight);
|
|
181
|
+
letter-spacing: var(--stuic-dropdown-menu-header-letter-spacing);
|
|
182
|
+
text-transform: var(--stuic-dropdown-menu-header-text-transform);
|
|
183
|
+
color: var(--stuic-dropdown-menu-header-text);
|
|
184
|
+
user-select: none;
|
|
185
|
+
}
|
|
151
186
|
|
|
152
|
-
/*
|
|
153
|
-
|
|
154
|
-
|
|
187
|
+
/* =============================================================================
|
|
188
|
+
BACKDROP (Fallback Mode)
|
|
189
|
+
============================================================================= */
|
|
155
190
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
191
|
+
.stuic-dropdown-menu-backdrop {
|
|
192
|
+
position: fixed;
|
|
193
|
+
inset: 0;
|
|
194
|
+
background: var(--stuic-dropdown-menu-backdrop-bg);
|
|
195
|
+
z-index: var(--stuic-dropdown-menu-backdrop-z-index);
|
|
196
|
+
transition-property: opacity;
|
|
197
|
+
}
|
|
159
198
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
199
|
+
/* =============================================================================
|
|
200
|
+
CLOSE BUTTON (Fallback Mode)
|
|
201
|
+
============================================================================= */
|
|
202
|
+
|
|
203
|
+
.stuic-dropdown-menu-close {
|
|
204
|
+
background: var(--stuic-dropdown-menu-close-bg);
|
|
205
|
+
color: var(--stuic-dropdown-menu-close-text);
|
|
206
|
+
opacity: var(--stuic-dropdown-menu-close-opacity);
|
|
207
|
+
border-radius: var(--stuic-dropdown-menu-radius);
|
|
208
|
+
padding: calc(var(--spacing) * 2);
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
line-height: 1;
|
|
211
|
+
transition: opacity var(--stuic-dropdown-menu-transition);
|
|
212
|
+
}
|
|
165
213
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
214
|
+
.stuic-dropdown-menu-close:hover {
|
|
215
|
+
opacity: var(--stuic-dropdown-menu-close-opacity-hover);
|
|
216
|
+
}
|
|
169
217
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
font-size: var(--stuic-dropdown-menu-header-font-size);
|
|
174
|
-
font-weight: var(--stuic-dropdown-menu-header-font-weight);
|
|
175
|
-
letter-spacing: var(--stuic-dropdown-menu-header-letter-spacing);
|
|
176
|
-
text-transform: var(--stuic-dropdown-menu-header-text-transform);
|
|
177
|
-
color: var(--stuic-dropdown-menu-header-text);
|
|
178
|
-
user-select: none;
|
|
179
|
-
}
|
|
218
|
+
/* =============================================================================
|
|
219
|
+
EXPANDABLE SECTION
|
|
220
|
+
============================================================================= */
|
|
180
221
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
222
|
+
.stuic-dropdown-menu-expandable-content {
|
|
223
|
+
padding-left: var(--stuic-dropdown-menu-expandable-indent);
|
|
224
|
+
overflow: hidden;
|
|
225
|
+
}
|
|
184
226
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
z-index: var(--stuic-dropdown-menu-backdrop-z-index);
|
|
190
|
-
transition-property: opacity;
|
|
191
|
-
}
|
|
227
|
+
/* =============================================================================
|
|
228
|
+
LIST ITEM BUTTON OVERRIDES FOR DROPDOWN CONTEXT
|
|
229
|
+
Reset default ListItemButton background to transparent within dropdown.
|
|
230
|
+
============================================================================= */
|
|
192
231
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
232
|
+
.stuic-dropdown-menu-dropdown .stuic-list-item-button {
|
|
233
|
+
--stuic-list-item-button-bg: transparent;
|
|
234
|
+
--stuic-list-item-button-border: transparent;
|
|
235
|
+
}
|
|
196
236
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
opacity: var(--stuic-dropdown-menu-close-opacity);
|
|
201
|
-
border-radius: var(--stuic-dropdown-menu-radius);
|
|
202
|
-
padding: calc(var(--spacing) * 2);
|
|
203
|
-
cursor: pointer;
|
|
204
|
-
line-height: 1;
|
|
205
|
-
transition: opacity var(--stuic-dropdown-menu-transition);
|
|
206
|
-
}
|
|
237
|
+
/* =============================================================================
|
|
238
|
+
CSS ANCHOR POSITIONING (when supported)
|
|
239
|
+
============================================================================= */
|
|
207
240
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
241
|
+
@position-try --pop-top {
|
|
242
|
+
position-area: top;
|
|
243
|
+
}
|
|
244
|
+
@position-try --pop-top-span-right {
|
|
245
|
+
position-area: top span-right;
|
|
246
|
+
}
|
|
247
|
+
@position-try --pop-top-span-left {
|
|
248
|
+
position-area: top span-left;
|
|
249
|
+
}
|
|
250
|
+
@position-try --pop-bottom {
|
|
251
|
+
position-area: bottom;
|
|
252
|
+
}
|
|
253
|
+
@position-try --pop-bottom-span-right {
|
|
254
|
+
position-area: bottom span-right;
|
|
255
|
+
}
|
|
256
|
+
@position-try --pop-bottom-span-left {
|
|
257
|
+
position-area: bottom span-left;
|
|
258
|
+
}
|
|
259
|
+
@position-try --pop-left {
|
|
260
|
+
position-area: left;
|
|
261
|
+
}
|
|
262
|
+
@position-try --pop-right {
|
|
263
|
+
position-area: right;
|
|
264
|
+
}
|
|
211
265
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
266
|
+
@supports (anchor-name: --anchor) {
|
|
267
|
+
.stuic-dropdown-menu-dropdown {
|
|
268
|
+
position-try-fallbacks:
|
|
269
|
+
flip-inline, --pop-bottom-span-right, --pop-bottom-span-left, --pop-bottom,
|
|
270
|
+
flip-block, --pop-top-span-right, --pop-top-span-left, --pop-top, --pop-left,
|
|
271
|
+
--pop-right;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
215
274
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
275
|
+
/* =============================================================================
|
|
276
|
+
SEARCH INPUT
|
|
277
|
+
============================================================================= */
|
|
278
|
+
|
|
279
|
+
.stuic-dropdown-menu-search {
|
|
280
|
+
position: sticky;
|
|
281
|
+
top: 0;
|
|
282
|
+
z-index: 10;
|
|
283
|
+
display: flex;
|
|
284
|
+
align-items: center;
|
|
285
|
+
gap: calc(var(--spacing) * 1);
|
|
286
|
+
padding: calc(var(--spacing) * 1.5) calc(var(--spacing) * 2);
|
|
287
|
+
background: var(--stuic-dropdown-menu-search-bg);
|
|
288
|
+
border-bottom: 1px solid var(--stuic-dropdown-menu-search-border);
|
|
289
|
+
margin: calc(var(--stuic-dropdown-menu-padding) * -1);
|
|
290
|
+
margin-bottom: var(--stuic-dropdown-menu-padding);
|
|
291
|
+
}
|
|
220
292
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
293
|
+
.stuic-dropdown-menu-search-icon {
|
|
294
|
+
color: var(--stuic-dropdown-menu-search-text);
|
|
295
|
+
flex-shrink: 0;
|
|
296
|
+
display: flex;
|
|
297
|
+
}
|
|
225
298
|
|
|
226
|
-
.stuic-dropdown-menu-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
299
|
+
.stuic-dropdown-menu-search-input {
|
|
300
|
+
flex: 1;
|
|
301
|
+
min-width: 0;
|
|
302
|
+
background: transparent;
|
|
303
|
+
border: none;
|
|
304
|
+
outline: none;
|
|
305
|
+
color: var(--stuic-dropdown-menu-text);
|
|
306
|
+
font-size: inherit;
|
|
307
|
+
}
|
|
230
308
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
309
|
+
.stuic-dropdown-menu-search-input::placeholder {
|
|
310
|
+
color: var(--stuic-dropdown-menu-search-text);
|
|
311
|
+
}
|
|
234
312
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
position-area: bottom;
|
|
246
|
-
}
|
|
247
|
-
@position-try --pop-bottom-span-right {
|
|
248
|
-
position-area: bottom span-right;
|
|
249
|
-
}
|
|
250
|
-
@position-try --pop-bottom-span-left {
|
|
251
|
-
position-area: bottom span-left;
|
|
252
|
-
}
|
|
253
|
-
@position-try --pop-left {
|
|
254
|
-
position-area: left;
|
|
255
|
-
}
|
|
256
|
-
@position-try --pop-right {
|
|
257
|
-
position-area: right;
|
|
258
|
-
}
|
|
313
|
+
.stuic-dropdown-menu-search-clear {
|
|
314
|
+
background: transparent;
|
|
315
|
+
border: none;
|
|
316
|
+
color: var(--stuic-dropdown-menu-search-text);
|
|
317
|
+
cursor: pointer;
|
|
318
|
+
padding: calc(var(--spacing) * 0.5);
|
|
319
|
+
display: flex;
|
|
320
|
+
border-radius: var(--stuic-dropdown-menu-radius);
|
|
321
|
+
transition: color var(--stuic-dropdown-menu-transition);
|
|
322
|
+
}
|
|
259
323
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
324
|
+
.stuic-dropdown-menu-search-clear:hover {
|
|
325
|
+
color: var(--stuic-dropdown-menu-text);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.stuic-dropdown-menu-no-results {
|
|
329
|
+
padding: calc(var(--spacing) * 4);
|
|
330
|
+
text-align: center;
|
|
331
|
+
color: var(--stuic-dropdown-menu-search-text);
|
|
266
332
|
}
|
|
267
333
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as DropdownMenu, type Props as DropdownMenuProps, type DropdownMenuItem, type DropdownMenuActionItem, type DropdownMenuDividerItem, type DropdownMenuHeaderItem, type DropdownMenuCustomItem, type DropdownMenuExpandableItem, type DropdownMenuFlatItem, type DropdownMenuPosition, type NavigableItem, type NavigableExpandable, DROPDOWN_MENU_BASE_CLASSES, DROPDOWN_MENU_TRIGGER_CLASSES, DROPDOWN_MENU_DROPDOWN_CLASSES, DROPDOWN_MENU_DIVIDER_CLASSES, DROPDOWN_MENU_HEADER_CLASSES, } from "./DropdownMenu.svelte";
|
|
1
|
+
export { default as DropdownMenu, type Props as DropdownMenuProps, type DropdownMenuItem, type DropdownMenuActionItem, type DropdownMenuDividerItem, type DropdownMenuHeaderItem, type DropdownMenuCustomItem, type DropdownMenuExpandableItem, type DropdownMenuFlatItem, type DropdownMenuPosition, type DropdownMenuSearchConfig, type NavigableItem, type NavigableExpandable, DROPDOWN_MENU_BASE_CLASSES, DROPDOWN_MENU_TRIGGER_CLASSES, DROPDOWN_MENU_DROPDOWN_CLASSES, DROPDOWN_MENU_DIVIDER_CLASSES, DROPDOWN_MENU_HEADER_CLASSES, } from "./DropdownMenu.svelte";
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
targetWidth?: number;
|
|
10
10
|
delayIn?: number;
|
|
11
11
|
delayOut?: number;
|
|
12
|
+
zIndex?: number;
|
|
12
13
|
children: Snippet<
|
|
13
14
|
[
|
|
14
15
|
{
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
targetWidth = 256,
|
|
39
40
|
delayIn = 500,
|
|
40
41
|
delayOut = 300,
|
|
42
|
+
zIndex = 10,
|
|
41
43
|
class: classProp,
|
|
42
44
|
children,
|
|
43
45
|
...rest
|
|
@@ -95,7 +97,7 @@
|
|
|
95
97
|
el.style.width = "auto";
|
|
96
98
|
el.style.height = "auto";
|
|
97
99
|
|
|
98
|
-
el.style.zIndex =
|
|
100
|
+
el.style.zIndex = `${zIndex}`;
|
|
99
101
|
|
|
100
102
|
// kind of ugly - need to set props in multiple steps...
|
|
101
103
|
(async () => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import type { Snippet } from "svelte";
|
|
3
3
|
import type { HTMLInputAttributes } from "svelte/elements";
|
|
4
|
+
import type { TypeaheadOptions } from "../../actions/typeahead.svelte.js";
|
|
4
5
|
import type { ValidateOptions } from "../../actions/validate.svelte.js";
|
|
5
6
|
import type { THC } from "../Thc/Thc.svelte";
|
|
6
7
|
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
tabindex?: number;
|
|
18
19
|
renderSize?: "sm" | "md" | "lg" | string;
|
|
19
20
|
useTrim?: boolean;
|
|
21
|
+
useTypeahead?: boolean | Omit<TypeaheadOptions, "enabled">;
|
|
20
22
|
required?: boolean;
|
|
21
23
|
disabled?: boolean;
|
|
22
24
|
validate?: boolean | Omit<ValidateOptions, "setValidationResult">;
|
|
@@ -42,6 +44,7 @@
|
|
|
42
44
|
|
|
43
45
|
<script lang="ts">
|
|
44
46
|
import { trim } from "../../actions/trim.svelte.js";
|
|
47
|
+
import { typeahead } from "../../actions/typeahead.svelte.js";
|
|
45
48
|
import {
|
|
46
49
|
validate as validateAction,
|
|
47
50
|
type ValidationResult,
|
|
@@ -61,6 +64,7 @@
|
|
|
61
64
|
class: classProp,
|
|
62
65
|
renderSize = "md",
|
|
63
66
|
useTrim = true,
|
|
67
|
+
useTypeahead,
|
|
64
68
|
//
|
|
65
69
|
required = false,
|
|
66
70
|
disabled = false,
|
|
@@ -131,6 +135,10 @@
|
|
|
131
135
|
enabled: useTrim,
|
|
132
136
|
setValue: (v: string) => useTrim && (value = v),
|
|
133
137
|
})}
|
|
138
|
+
use:typeahead={() => ({
|
|
139
|
+
enabled: !!useTypeahead,
|
|
140
|
+
...(typeof useTypeahead === "boolean" ? {} : useTypeahead),
|
|
141
|
+
})}
|
|
134
142
|
use:validateAction={() => ({
|
|
135
143
|
enabled: !!validate,
|
|
136
144
|
...(typeof validate === "boolean" ? {} : validate),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
2
|
import type { HTMLInputAttributes } from "svelte/elements";
|
|
3
|
+
import type { TypeaheadOptions } from "../../actions/typeahead.svelte.js";
|
|
3
4
|
import type { ValidateOptions } from "../../actions/validate.svelte.js";
|
|
4
5
|
import type { THC } from "../Thc/Thc.svelte";
|
|
5
6
|
type SnippetWithId = Snippet<[{
|
|
@@ -16,6 +17,7 @@ export interface Props extends HTMLInputAttributes, Record<string, any> {
|
|
|
16
17
|
tabindex?: number;
|
|
17
18
|
renderSize?: "sm" | "md" | "lg" | string;
|
|
18
19
|
useTrim?: boolean;
|
|
20
|
+
useTypeahead?: boolean | Omit<TypeaheadOptions, "enabled">;
|
|
19
21
|
required?: boolean;
|
|
20
22
|
disabled?: boolean;
|
|
21
23
|
validate?: boolean | Omit<ValidateOptions, "setValidationResult">;
|
|
@@ -561,7 +561,7 @@
|
|
|
561
561
|
bind:this={modalDialog}
|
|
562
562
|
preEscapeClose={escape}
|
|
563
563
|
classDialog="items-start"
|
|
564
|
-
class="w-full max-w-2xl bg-transparent pointer-events-none"
|
|
564
|
+
class={twMerge("w-full max-w-2xl bg-transparent! shadow-none! pointer-events-none")}
|
|
565
565
|
ariaLabelledby={id}
|
|
566
566
|
{noScrollLock}
|
|
567
567
|
>
|