@14ch/svelte-ui 0.0.1
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/README.md +359 -0
- package/dist/assets/styles/README.md +144 -0
- package/dist/assets/styles/core.scss +61 -0
- package/dist/assets/styles/import.scss +11 -0
- package/dist/assets/styles/optional/fonts.scss +23 -0
- package/dist/assets/styles/optional/reset.scss +230 -0
- package/dist/assets/styles/variables.scss +805 -0
- package/dist/components/Button.svelte +574 -0
- package/dist/components/Button.svelte.d.ts +56 -0
- package/dist/components/COMPONENT_DESIGN_GUIDELINES.md +127 -0
- package/dist/components/Checkbox.svelte +523 -0
- package/dist/components/Checkbox.svelte.d.ts +42 -0
- package/dist/components/CheckboxGroup.svelte +82 -0
- package/dist/components/CheckboxGroup.svelte.d.ts +13 -0
- package/dist/components/ColorPicker.svelte +496 -0
- package/dist/components/ColorPicker.svelte.d.ts +45 -0
- package/dist/components/Combobox.svelte +576 -0
- package/dist/components/Combobox.svelte.d.ts +52 -0
- package/dist/components/ConfirmDialog.svelte +116 -0
- package/dist/components/ConfirmDialog.svelte.d.ts +20 -0
- package/dist/components/Datepicker.svelte +578 -0
- package/dist/components/Datepicker.svelte.d.ts +72 -0
- package/dist/components/DatepickerCalendar.svelte +925 -0
- package/dist/components/DatepickerCalendar.svelte.d.ts +31 -0
- package/dist/components/Dialog.svelte +245 -0
- package/dist/components/Dialog.svelte.d.ts +38 -0
- package/dist/components/Drawer.svelte +383 -0
- package/dist/components/Drawer.svelte.d.ts +39 -0
- package/dist/components/Fab.svelte +486 -0
- package/dist/components/Fab.svelte.d.ts +51 -0
- package/dist/components/FileUploader.svelte +456 -0
- package/dist/components/FileUploader.svelte.d.ts +36 -0
- package/dist/components/Icon.svelte +167 -0
- package/dist/components/Icon.svelte.d.ts +21 -0
- package/dist/components/IconButton.svelte +557 -0
- package/dist/components/IconButton.svelte.d.ts +60 -0
- package/dist/components/ImageUploader.svelte +516 -0
- package/dist/components/ImageUploader.svelte.d.ts +37 -0
- package/dist/components/ImageUploaderPreview.svelte +157 -0
- package/dist/components/ImageUploaderPreview.svelte.d.ts +13 -0
- package/dist/components/Input.svelte +885 -0
- package/dist/components/Input.svelte.d.ts +75 -0
- package/dist/components/LoadingSpinner.svelte +116 -0
- package/dist/components/LoadingSpinner.svelte.d.ts +10 -0
- package/dist/components/Modal.svelte +313 -0
- package/dist/components/Modal.svelte.d.ts +34 -0
- package/dist/components/Pagination.svelte +276 -0
- package/dist/components/Pagination.svelte.d.ts +14 -0
- package/dist/components/Popup.svelte +676 -0
- package/dist/components/Popup.svelte.d.ts +40 -0
- package/dist/components/PopupMenu.svelte +421 -0
- package/dist/components/PopupMenu.svelte.d.ts +24 -0
- package/dist/components/PopupMenuButton.svelte +365 -0
- package/dist/components/PopupMenuButton.svelte.d.ts +42 -0
- package/dist/components/Radio.svelte +548 -0
- package/dist/components/Radio.svelte.d.ts +42 -0
- package/dist/components/RadioGroup.svelte +74 -0
- package/dist/components/RadioGroup.svelte.d.ts +14 -0
- package/dist/components/Select.svelte +479 -0
- package/dist/components/Select.svelte.d.ts +47 -0
- package/dist/components/Slider.svelte +473 -0
- package/dist/components/Slider.svelte.d.ts +46 -0
- package/dist/components/Snackbar.svelte +124 -0
- package/dist/components/Snackbar.svelte.d.ts +9 -0
- package/dist/components/SnackbarItem.svelte +423 -0
- package/dist/components/SnackbarItem.svelte.d.ts +21 -0
- package/dist/components/Switch.svelte +454 -0
- package/dist/components/Switch.svelte.d.ts +40 -0
- package/dist/components/Tab.svelte +193 -0
- package/dist/components/Tab.svelte.d.ts +14 -0
- package/dist/components/TabItem.svelte +140 -0
- package/dist/components/TabItem.svelte.d.ts +17 -0
- package/dist/components/Textarea.svelte +702 -0
- package/dist/components/Textarea.svelte.d.ts +64 -0
- package/dist/components/skeleton/Skeleton.svelte +235 -0
- package/dist/components/skeleton/Skeleton.svelte.d.ts +13 -0
- package/dist/components/skeleton/SkeletonAvatar.svelte +97 -0
- package/dist/components/skeleton/SkeletonAvatar.svelte.d.ts +8 -0
- package/dist/components/skeleton/SkeletonBox.svelte +105 -0
- package/dist/components/skeleton/SkeletonBox.svelte.d.ts +12 -0
- package/dist/components/skeleton/SkeletonButton.svelte +71 -0
- package/dist/components/skeleton/SkeletonButton.svelte.d.ts +8 -0
- package/dist/components/skeleton/SkeletonHeading.svelte +49 -0
- package/dist/components/skeleton/SkeletonHeading.svelte.d.ts +8 -0
- package/dist/components/skeleton/SkeletonMedia.svelte +115 -0
- package/dist/components/skeleton/SkeletonMedia.svelte.d.ts +9 -0
- package/dist/components/skeleton/SkeletonText.svelte +75 -0
- package/dist/components/skeleton/SkeletonText.svelte.d.ts +8 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +43 -0
- package/dist/types/icon.d.ts +4 -0
- package/dist/types/icon.js +2 -0
- package/dist/types/menuItem.d.ts +8 -0
- package/dist/types/menuItem.js +1 -0
- package/dist/types/options.d.ts +6 -0
- package/dist/types/options.js +4 -0
- package/dist/types/skeleton.d.ts +77 -0
- package/dist/types/skeleton.js +19 -0
- package/dist/utils/accessibility.d.ts +48 -0
- package/dist/utils/accessibility.js +87 -0
- package/dist/utils/formatText.d.ts +4 -0
- package/dist/utils/formatText.js +44 -0
- package/dist/utils/mobile.d.ts +9 -0
- package/dist/utils/mobile.js +47 -0
- package/dist/utils/snackbar.svelte.d.ts +51 -0
- package/dist/utils/snackbar.svelte.js +107 -0
- package/dist/utils/style.d.ts +17 -0
- package/dist/utils/style.js +22 -0
- package/package.json +102 -0
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
<!-- PopupMenuButton.svelte -->
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import IconButton from './IconButton.svelte';
|
|
5
|
+
import PopupMenu from './PopupMenu.svelte';
|
|
6
|
+
import type { MenuItem } from '../types/menuItem';
|
|
7
|
+
import type { SvelteComponent, Snippet } from 'svelte';
|
|
8
|
+
|
|
9
|
+
// =========================================================================
|
|
10
|
+
// Props, States & Constants
|
|
11
|
+
// =========================================================================
|
|
12
|
+
let {
|
|
13
|
+
// Snippet
|
|
14
|
+
children,
|
|
15
|
+
|
|
16
|
+
// 基本プロパティ
|
|
17
|
+
menuItems,
|
|
18
|
+
|
|
19
|
+
// HTML属性
|
|
20
|
+
id,
|
|
21
|
+
|
|
22
|
+
// スタイル/レイアウト
|
|
23
|
+
position = 'bottom',
|
|
24
|
+
variant = 'ghost',
|
|
25
|
+
size = 32,
|
|
26
|
+
color,
|
|
27
|
+
rounded = true,
|
|
28
|
+
|
|
29
|
+
// 状態/動作
|
|
30
|
+
disabled = false,
|
|
31
|
+
mobileFullscreen = true,
|
|
32
|
+
mobileBehavior = 'auto',
|
|
33
|
+
|
|
34
|
+
// フォーカスイベント
|
|
35
|
+
onfocus = () => {}, // No params for type inference
|
|
36
|
+
onblur = () => {}, // No params for type inference
|
|
37
|
+
|
|
38
|
+
// キーボードイベント
|
|
39
|
+
onkeydown = () => {}, // No params for type inference
|
|
40
|
+
onkeyup = () => {}, // No params for type inference
|
|
41
|
+
|
|
42
|
+
// マウスイベント
|
|
43
|
+
onclick = () => {}, // No params for type inference
|
|
44
|
+
onmousedown = () => {}, // No params for type inference
|
|
45
|
+
onmouseup = () => {}, // No params for type inference
|
|
46
|
+
onmouseenter = () => {}, // No params for type inference
|
|
47
|
+
onmouseleave = () => {}, // No params for type inference
|
|
48
|
+
onmouseover = () => {}, // No params for type inference
|
|
49
|
+
onmouseout = () => {}, // No params for type inference
|
|
50
|
+
oncontextmenu = () => {}, // No params for type inference
|
|
51
|
+
onauxclick = () => {}, // No params for type inference
|
|
52
|
+
|
|
53
|
+
// タッチイベント
|
|
54
|
+
ontouchstart = () => {}, // No params for type inference
|
|
55
|
+
ontouchend = () => {}, // No params for type inference
|
|
56
|
+
ontouchmove = () => {}, // No params for type inference
|
|
57
|
+
ontouchcancel = () => {}, // No params for type inference
|
|
58
|
+
|
|
59
|
+
// ポインターイベント
|
|
60
|
+
onpointerdown = () => {}, // No params for type inference
|
|
61
|
+
onpointerup = () => {}, // No params for type inference
|
|
62
|
+
onpointerenter = () => {}, // No params for type inference
|
|
63
|
+
onpointerleave = () => {}, // No params for type inference
|
|
64
|
+
onpointermove = () => {}, // No params for type inference
|
|
65
|
+
onpointercancel = () => {}, // No params for type inference
|
|
66
|
+
|
|
67
|
+
// ARIA/アクセシビリティ
|
|
68
|
+
ariaLabel
|
|
69
|
+
}: {
|
|
70
|
+
// Snippet
|
|
71
|
+
children?: Snippet;
|
|
72
|
+
|
|
73
|
+
// 基本プロパティ
|
|
74
|
+
menuItems: (MenuItem | 'separator')[];
|
|
75
|
+
|
|
76
|
+
// HTML属性
|
|
77
|
+
id?: string;
|
|
78
|
+
|
|
79
|
+
// スタイル/レイアウト
|
|
80
|
+
position?:
|
|
81
|
+
| 'top'
|
|
82
|
+
| 'bottom'
|
|
83
|
+
| 'left'
|
|
84
|
+
| 'right'
|
|
85
|
+
| 'top-left'
|
|
86
|
+
| 'top-center'
|
|
87
|
+
| 'top-right'
|
|
88
|
+
| 'bottom-left'
|
|
89
|
+
| 'bottom-center'
|
|
90
|
+
| 'bottom-right'
|
|
91
|
+
| 'left-top'
|
|
92
|
+
| 'left-center'
|
|
93
|
+
| 'left-bottom'
|
|
94
|
+
| 'right-top'
|
|
95
|
+
| 'right-center'
|
|
96
|
+
| 'right-bottom';
|
|
97
|
+
variant?: 'ghost' | 'filled' | 'outlined' | 'glass';
|
|
98
|
+
size?: number;
|
|
99
|
+
color?: string;
|
|
100
|
+
rounded?: boolean;
|
|
101
|
+
|
|
102
|
+
// 状態/動作
|
|
103
|
+
disabled?: boolean;
|
|
104
|
+
mobileFullscreen?: boolean;
|
|
105
|
+
mobileBehavior?: 'auto' | 'fullscreen' | 'popup';
|
|
106
|
+
|
|
107
|
+
// フォーカスイベント
|
|
108
|
+
onfocus?: Function; // No params for type inference
|
|
109
|
+
onblur?: Function; // No params for type inference
|
|
110
|
+
|
|
111
|
+
// キーボードイベント
|
|
112
|
+
onkeydown?: Function; // No params for type inference
|
|
113
|
+
onkeyup?: Function; // No params for type inference
|
|
114
|
+
|
|
115
|
+
// マウスイベント
|
|
116
|
+
onclick?: Function; // No params for type inference
|
|
117
|
+
onmousedown?: Function; // No params for type inference
|
|
118
|
+
onmouseup?: Function; // No params for type inference
|
|
119
|
+
onmouseenter?: Function; // No params for type inference
|
|
120
|
+
onmouseleave?: Function; // No params for type inference
|
|
121
|
+
onmouseover?: Function; // No params for type inference
|
|
122
|
+
onmouseout?: Function; // No params for type inference
|
|
123
|
+
oncontextmenu?: Function; // No params for type inference
|
|
124
|
+
onauxclick?: Function; // No params for type inference
|
|
125
|
+
|
|
126
|
+
// タッチイベント
|
|
127
|
+
ontouchstart?: Function; // No params for type inference
|
|
128
|
+
ontouchend?: Function; // No params for type inference
|
|
129
|
+
ontouchmove?: Function; // No params for type inference
|
|
130
|
+
ontouchcancel?: Function; // No params for type inference
|
|
131
|
+
|
|
132
|
+
// ポインターイベント
|
|
133
|
+
onpointerdown?: Function; // No params for type inference
|
|
134
|
+
onpointerup?: Function; // No params for type inference
|
|
135
|
+
onpointerenter?: Function; // No params for type inference
|
|
136
|
+
onpointerleave?: Function; // No params for type inference
|
|
137
|
+
onpointermove?: Function; // No params for type inference
|
|
138
|
+
onpointercancel?: Function; // No params for type inference
|
|
139
|
+
|
|
140
|
+
// ARIA/アクセシビリティ
|
|
141
|
+
ariaLabel?: string;
|
|
142
|
+
} = $props();
|
|
143
|
+
|
|
144
|
+
let anchorRef: HTMLElement | undefined = $state();
|
|
145
|
+
let popupMenuRef: SvelteComponent | undefined = $state();
|
|
146
|
+
let buttonId: string = $state(`menu-button-${Math.random().toString(36).substring(2, 15)}`);
|
|
147
|
+
|
|
148
|
+
// =========================================================================
|
|
149
|
+
|
|
150
|
+
// =========================================================================
|
|
151
|
+
// Methods
|
|
152
|
+
// =========================================================================
|
|
153
|
+
const handleClick = (event: MouseEvent) => {
|
|
154
|
+
if (disabled) return;
|
|
155
|
+
event.stopPropagation();
|
|
156
|
+
onclick?.(event);
|
|
157
|
+
toggle();
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const handleFocus = (event: FocusEvent) => {
|
|
161
|
+
if (disabled) return;
|
|
162
|
+
onfocus?.(event);
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const handleBlur = (event: FocusEvent) => {
|
|
166
|
+
if (disabled) return;
|
|
167
|
+
onblur?.(event);
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
const handleKeyDown = (event: KeyboardEvent) => {
|
|
171
|
+
if (disabled) return;
|
|
172
|
+
onkeydown?.(event);
|
|
173
|
+
switch (event.key) {
|
|
174
|
+
case 'ArrowDown':
|
|
175
|
+
case 'Enter':
|
|
176
|
+
case ' ':
|
|
177
|
+
event.preventDefault();
|
|
178
|
+
open();
|
|
179
|
+
break;
|
|
180
|
+
case 'Escape':
|
|
181
|
+
event.preventDefault();
|
|
182
|
+
close();
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
const handleKeyUp = (event: KeyboardEvent) => {
|
|
188
|
+
if (disabled) return;
|
|
189
|
+
onkeyup?.(event);
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
const handleMouseDown = (event: MouseEvent) => {
|
|
193
|
+
if (disabled) return;
|
|
194
|
+
onmousedown?.(event);
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
const handleMouseUp = (event: MouseEvent) => {
|
|
198
|
+
if (disabled) return;
|
|
199
|
+
onmouseup?.(event);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
const handleMouseEnter = (event: MouseEvent) => {
|
|
203
|
+
if (disabled) return;
|
|
204
|
+
onmouseenter?.(event);
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const handleMouseLeave = (event: MouseEvent) => {
|
|
208
|
+
if (disabled) return;
|
|
209
|
+
onmouseleave?.(event);
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
const handleMouseOver = (event: MouseEvent) => {
|
|
213
|
+
if (disabled) return;
|
|
214
|
+
onmouseover?.(event);
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
const handleMouseOut = (event: MouseEvent) => {
|
|
218
|
+
if (disabled) return;
|
|
219
|
+
onmouseout?.(event);
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
const handleContextMenu = (event: MouseEvent) => {
|
|
223
|
+
if (disabled) return;
|
|
224
|
+
oncontextmenu?.(event);
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
const handleAuxClick = (event: MouseEvent) => {
|
|
228
|
+
if (disabled) return;
|
|
229
|
+
onauxclick?.(event);
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
const handleTouchStart = (event: TouchEvent) => {
|
|
233
|
+
if (disabled) return;
|
|
234
|
+
ontouchstart?.(event);
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
const handleTouchEnd = (event: TouchEvent) => {
|
|
238
|
+
if (disabled) return;
|
|
239
|
+
ontouchend?.(event);
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
const handleTouchMove = (event: TouchEvent) => {
|
|
243
|
+
if (disabled) return;
|
|
244
|
+
ontouchmove?.(event);
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
const handleTouchCancel = (event: TouchEvent) => {
|
|
248
|
+
if (disabled) return;
|
|
249
|
+
ontouchcancel?.(event);
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
const handlePointerDown = (event: PointerEvent) => {
|
|
253
|
+
if (disabled) return;
|
|
254
|
+
onpointerdown?.(event);
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
const handlePointerUp = (event: PointerEvent) => {
|
|
258
|
+
if (disabled) return;
|
|
259
|
+
onpointerup?.(event);
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
const handlePointerEnter = (event: PointerEvent) => {
|
|
263
|
+
if (disabled) return;
|
|
264
|
+
onpointerenter?.(event);
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
const handlePointerLeave = (event: PointerEvent) => {
|
|
268
|
+
if (disabled) return;
|
|
269
|
+
onpointerleave?.(event);
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
const handlePointerMove = (event: PointerEvent) => {
|
|
273
|
+
if (disabled) return;
|
|
274
|
+
onpointermove?.(event);
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
const handlePointerCancel = (event: PointerEvent) => {
|
|
278
|
+
if (disabled) return;
|
|
279
|
+
onpointercancel?.(event);
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
const open = (): void => {
|
|
283
|
+
popupMenuRef?.open();
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
const close = (): void => {
|
|
287
|
+
popupMenuRef?.close();
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
const toggle = (): void => {
|
|
291
|
+
popupMenuRef?.toggle();
|
|
292
|
+
};
|
|
293
|
+
</script>
|
|
294
|
+
|
|
295
|
+
<div class="button-block" bind:this={anchorRef} {id}>
|
|
296
|
+
<IconButton
|
|
297
|
+
{ariaLabel}
|
|
298
|
+
{disabled}
|
|
299
|
+
{variant}
|
|
300
|
+
{size}
|
|
301
|
+
{color}
|
|
302
|
+
{rounded}
|
|
303
|
+
aria-haspopup="menu"
|
|
304
|
+
aria-expanded={popupMenuRef?.isOpen ? 'true' : 'false'}
|
|
305
|
+
aria-controls={popupMenuRef ? `${id}-menu-popup` : undefined}
|
|
306
|
+
onclick={handleClick}
|
|
307
|
+
onfocus={handleFocus}
|
|
308
|
+
onblur={handleBlur}
|
|
309
|
+
onkeydown={handleKeyDown}
|
|
310
|
+
onkeyup={handleKeyUp}
|
|
311
|
+
onmousedown={handleMouseDown}
|
|
312
|
+
onmouseup={handleMouseUp}
|
|
313
|
+
onmouseenter={handleMouseEnter}
|
|
314
|
+
onmouseleave={handleMouseLeave}
|
|
315
|
+
onmouseover={handleMouseOver}
|
|
316
|
+
onmouseout={handleMouseOut}
|
|
317
|
+
oncontextmenu={handleContextMenu}
|
|
318
|
+
onauxclick={handleAuxClick}
|
|
319
|
+
ontouchstart={handleTouchStart}
|
|
320
|
+
ontouchend={handleTouchEnd}
|
|
321
|
+
ontouchmove={handleTouchMove}
|
|
322
|
+
ontouchcancel={handleTouchCancel}
|
|
323
|
+
onpointerdown={handlePointerDown}
|
|
324
|
+
onpointerup={handlePointerUp}
|
|
325
|
+
onpointerenter={handlePointerEnter}
|
|
326
|
+
onpointerleave={handlePointerLeave}
|
|
327
|
+
onpointermove={handlePointerMove}
|
|
328
|
+
onpointercancel={handlePointerCancel}
|
|
329
|
+
id={buttonId}
|
|
330
|
+
>
|
|
331
|
+
{#if children}
|
|
332
|
+
{@render children()}
|
|
333
|
+
{:else}
|
|
334
|
+
more_vert
|
|
335
|
+
{/if}
|
|
336
|
+
</IconButton>
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
<PopupMenu
|
|
340
|
+
bind:this={popupMenuRef}
|
|
341
|
+
{menuItems}
|
|
342
|
+
anchorElement={anchorRef}
|
|
343
|
+
{ariaLabel}
|
|
344
|
+
{position}
|
|
345
|
+
{mobileFullscreen}
|
|
346
|
+
{mobileBehavior}
|
|
347
|
+
id={id ? `${id}-menu` : undefined}
|
|
348
|
+
/>
|
|
349
|
+
|
|
350
|
+
<style>.button-block {
|
|
351
|
+
width: fit-content;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/* Screen reader only content */
|
|
355
|
+
:global(.sr-only) {
|
|
356
|
+
position: absolute;
|
|
357
|
+
width: 1px;
|
|
358
|
+
height: 1px;
|
|
359
|
+
padding: 0;
|
|
360
|
+
margin: -1px;
|
|
361
|
+
overflow: hidden;
|
|
362
|
+
clip: rect(0, 0, 0, 0);
|
|
363
|
+
white-space: nowrap;
|
|
364
|
+
border: 0;
|
|
365
|
+
}</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { MenuItem } from '../types/menuItem';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
type $$ComponentProps = {
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
menuItems: (MenuItem | 'separator')[];
|
|
6
|
+
id?: string;
|
|
7
|
+
position?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left-top' | 'left-center' | 'left-bottom' | 'right-top' | 'right-center' | 'right-bottom';
|
|
8
|
+
variant?: 'ghost' | 'filled' | 'outlined' | 'glass';
|
|
9
|
+
size?: number;
|
|
10
|
+
color?: string;
|
|
11
|
+
rounded?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
mobileFullscreen?: boolean;
|
|
14
|
+
mobileBehavior?: 'auto' | 'fullscreen' | 'popup';
|
|
15
|
+
onfocus?: Function;
|
|
16
|
+
onblur?: Function;
|
|
17
|
+
onkeydown?: Function;
|
|
18
|
+
onkeyup?: Function;
|
|
19
|
+
onclick?: Function;
|
|
20
|
+
onmousedown?: Function;
|
|
21
|
+
onmouseup?: Function;
|
|
22
|
+
onmouseenter?: Function;
|
|
23
|
+
onmouseleave?: Function;
|
|
24
|
+
onmouseover?: Function;
|
|
25
|
+
onmouseout?: Function;
|
|
26
|
+
oncontextmenu?: Function;
|
|
27
|
+
onauxclick?: Function;
|
|
28
|
+
ontouchstart?: Function;
|
|
29
|
+
ontouchend?: Function;
|
|
30
|
+
ontouchmove?: Function;
|
|
31
|
+
ontouchcancel?: Function;
|
|
32
|
+
onpointerdown?: Function;
|
|
33
|
+
onpointerup?: Function;
|
|
34
|
+
onpointerenter?: Function;
|
|
35
|
+
onpointerleave?: Function;
|
|
36
|
+
onpointermove?: Function;
|
|
37
|
+
onpointercancel?: Function;
|
|
38
|
+
ariaLabel?: string;
|
|
39
|
+
};
|
|
40
|
+
declare const PopupMenuButton: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
41
|
+
type PopupMenuButton = ReturnType<typeof PopupMenuButton>;
|
|
42
|
+
export default PopupMenuButton;
|