@14ch/svelte-ui 0.0.56 → 0.0.58
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/assets/styles/import.css +23 -22
- package/dist/assets/styles/variables.scss +23 -22
- package/dist/components/Button.svelte +30 -4
- package/dist/components/Button.svelte.d.ts +3 -2
- package/dist/components/Checkbox.svelte +32 -4
- package/dist/components/Checkbox.svelte.d.ts +2 -2
- package/dist/components/ColorPicker.svelte +41 -4
- package/dist/components/ColorPicker.svelte.d.ts +2 -2
- package/dist/components/Combobox.svelte +31 -4
- package/dist/components/Combobox.svelte.d.ts +2 -2
- package/dist/components/Datepicker.svelte +31 -4
- package/dist/components/Datepicker.svelte.d.ts +2 -2
- package/dist/components/DatepickerCalendar.svelte +3 -3
- package/dist/components/Fab.svelte +28 -2
- package/dist/components/Fab.svelte.d.ts +1 -2
- package/dist/components/Icon.svelte +2 -4
- package/dist/components/Icon.svelte.d.ts +2 -2
- package/dist/components/IconButton.svelte +28 -4
- package/dist/components/IconButton.svelte.d.ts +1 -2
- package/dist/components/Input.svelte +43 -4
- package/dist/components/Input.svelte.d.ts +3 -2
- package/dist/components/MultiSelect.svelte +1 -1
- package/dist/components/PopupMenu.svelte +2 -2
- package/dist/components/Radio.svelte +32 -4
- package/dist/components/Radio.svelte.d.ts +2 -2
- package/dist/components/SegmentedControl.svelte +29 -4
- package/dist/components/SegmentedControl.svelte.d.ts +2 -2
- package/dist/components/Select.svelte +35 -5
- package/dist/components/Select.svelte.d.ts +2 -2
- package/dist/components/Slider.svelte +31 -4
- package/dist/components/Slider.svelte.d.ts +2 -2
- package/dist/components/SnackbarItem.svelte +1 -1
- package/dist/components/Switch.svelte +32 -4
- package/dist/components/Switch.svelte.d.ts +2 -2
- package/dist/components/Textarea.svelte +38 -4
- package/dist/components/Textarea.svelte.d.ts +1 -2
- package/package.json +1 -1
|
@@ -19,7 +19,34 @@
|
|
|
19
19
|
// =========================================================================
|
|
20
20
|
// Props, States & Constants
|
|
21
21
|
// =========================================================================
|
|
22
|
-
export type FabProps =
|
|
22
|
+
export type FabProps = Omit<
|
|
23
|
+
HTMLButtonAttributes,
|
|
24
|
+
// 独自ハンドラ型(callbackHandlers)で再定義するイベント系は除外して衝突を避ける
|
|
25
|
+
| 'children'
|
|
26
|
+
| 'onfocus'
|
|
27
|
+
| 'onblur'
|
|
28
|
+
| 'onkeydown'
|
|
29
|
+
| 'onkeyup'
|
|
30
|
+
| 'onclick'
|
|
31
|
+
| 'onmousedown'
|
|
32
|
+
| 'onmouseup'
|
|
33
|
+
| 'onmouseenter'
|
|
34
|
+
| 'onmouseleave'
|
|
35
|
+
| 'onmouseover'
|
|
36
|
+
| 'onmouseout'
|
|
37
|
+
| 'oncontextmenu'
|
|
38
|
+
| 'onauxclick'
|
|
39
|
+
| 'ontouchstart'
|
|
40
|
+
| 'ontouchend'
|
|
41
|
+
| 'ontouchmove'
|
|
42
|
+
| 'ontouchcancel'
|
|
43
|
+
| 'onpointerdown'
|
|
44
|
+
| 'onpointerup'
|
|
45
|
+
| 'onpointerenter'
|
|
46
|
+
| 'onpointerleave'
|
|
47
|
+
| 'onpointermove'
|
|
48
|
+
| 'onpointercancel'
|
|
49
|
+
> & {
|
|
23
50
|
children?: Snippet;
|
|
24
51
|
/** @default 'button' */
|
|
25
52
|
type?: HTMLButtonAttributes['type'];
|
|
@@ -86,7 +113,6 @@
|
|
|
86
113
|
onpointerleave?: PointerHandler;
|
|
87
114
|
onpointermove?: PointerHandler;
|
|
88
115
|
onpointercancel?: PointerHandler;
|
|
89
|
-
[key: string]: any;
|
|
90
116
|
};
|
|
91
117
|
|
|
92
118
|
let {
|
|
@@ -3,7 +3,7 @@ import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
|
3
3
|
import type { IconVariant, IconWeight, IconGrade, IconOpticalSize } from '../types/icon';
|
|
4
4
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler } from '../types/callbackHandlers';
|
|
5
5
|
import type { ButtonVariant, FabPosition, IconPosition } from '../types/propOptions';
|
|
6
|
-
export type FabProps = {
|
|
6
|
+
export type FabProps = Omit<HTMLButtonAttributes, 'children' | 'onfocus' | 'onblur' | 'onkeydown' | 'onkeyup' | 'onclick' | 'onmousedown' | 'onmouseup' | 'onmouseenter' | 'onmouseleave' | 'onmouseover' | 'onmouseout' | 'oncontextmenu' | 'onauxclick' | 'ontouchstart' | 'ontouchend' | 'ontouchmove' | 'ontouchcancel' | 'onpointerdown' | 'onpointerup' | 'onpointerenter' | 'onpointerleave' | 'onpointermove' | 'onpointercancel'> & {
|
|
7
7
|
children?: Snippet;
|
|
8
8
|
/** @default 'button' */
|
|
9
9
|
type?: HTMLButtonAttributes['type'];
|
|
@@ -61,7 +61,6 @@ export type FabProps = {
|
|
|
61
61
|
onpointerleave?: PointerHandler;
|
|
62
62
|
onpointermove?: PointerHandler;
|
|
63
63
|
onpointercancel?: PointerHandler;
|
|
64
|
-
[key: string]: any;
|
|
65
64
|
};
|
|
66
65
|
declare const Fab: import("svelte").Component<FabProps, {}, "">;
|
|
67
66
|
type Fab = ReturnType<typeof Fab>;
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
<script lang="ts">
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
5
6
|
import type { IconVariant, IconWeight, IconGrade, IconOpticalSize } from '../types/icon';
|
|
6
7
|
import { getStyleFromNumber } from '../utils/style';
|
|
7
8
|
|
|
8
9
|
// =========================================================================
|
|
9
10
|
// Props, States & Constants
|
|
10
11
|
// =========================================================================
|
|
11
|
-
export type IconProps = {
|
|
12
|
+
export type IconProps = Omit<HTMLAttributes<HTMLElement>, 'children'> & {
|
|
12
13
|
// Snippet
|
|
13
14
|
/** Material Symbols icon name (e.g. `"home"`, `"settings"`). */
|
|
14
15
|
children: Snippet;
|
|
@@ -39,9 +40,6 @@
|
|
|
39
40
|
ariaLabel?: string;
|
|
40
41
|
/** Marks the icon as decorative (hidden from screen readers). @default true */
|
|
41
42
|
decorative?: boolean;
|
|
42
|
-
|
|
43
|
-
// その他
|
|
44
|
-
[key: string]: any;
|
|
45
43
|
};
|
|
46
44
|
|
|
47
45
|
let {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
3
|
import type { IconVariant, IconWeight, IconGrade, IconOpticalSize } from '../types/icon';
|
|
3
|
-
export type IconProps = {
|
|
4
|
+
export type IconProps = Omit<HTMLAttributes<HTMLElement>, 'children'> & {
|
|
4
5
|
/** Material Symbols icon name (e.g. `"home"`, `"settings"`). */
|
|
5
6
|
children: Snippet;
|
|
6
7
|
title?: string;
|
|
@@ -22,7 +23,6 @@ export type IconProps = {
|
|
|
22
23
|
ariaLabel?: string;
|
|
23
24
|
/** Marks the icon as decorative (hidden from screen readers). @default true */
|
|
24
25
|
decorative?: boolean;
|
|
25
|
-
[key: string]: any;
|
|
26
26
|
};
|
|
27
27
|
declare const Icon: import("svelte").Component<IconProps, {}, "">;
|
|
28
28
|
type Icon = ReturnType<typeof Icon>;
|
|
@@ -19,7 +19,34 @@
|
|
|
19
19
|
// =========================================================================
|
|
20
20
|
// Props, States & Constants
|
|
21
21
|
// =========================================================================
|
|
22
|
-
export type IconButtonProps =
|
|
22
|
+
export type IconButtonProps = Omit<
|
|
23
|
+
HTMLButtonAttributes,
|
|
24
|
+
// 独自ハンドラ型(callbackHandlers)で再定義するイベント系は除外して衝突を避ける
|
|
25
|
+
| 'children'
|
|
26
|
+
| 'onfocus'
|
|
27
|
+
| 'onblur'
|
|
28
|
+
| 'onkeydown'
|
|
29
|
+
| 'onkeyup'
|
|
30
|
+
| 'onclick'
|
|
31
|
+
| 'onmousedown'
|
|
32
|
+
| 'onmouseup'
|
|
33
|
+
| 'onmouseenter'
|
|
34
|
+
| 'onmouseleave'
|
|
35
|
+
| 'onmouseover'
|
|
36
|
+
| 'onmouseout'
|
|
37
|
+
| 'oncontextmenu'
|
|
38
|
+
| 'onauxclick'
|
|
39
|
+
| 'ontouchstart'
|
|
40
|
+
| 'ontouchend'
|
|
41
|
+
| 'ontouchmove'
|
|
42
|
+
| 'ontouchcancel'
|
|
43
|
+
| 'onpointerdown'
|
|
44
|
+
| 'onpointerup'
|
|
45
|
+
| 'onpointerenter'
|
|
46
|
+
| 'onpointerleave'
|
|
47
|
+
| 'onpointermove'
|
|
48
|
+
| 'onpointercancel'
|
|
49
|
+
> & {
|
|
23
50
|
// Snippet
|
|
24
51
|
/** Material Symbols icon name (e.g. `"close"`, `"edit"`). */
|
|
25
52
|
children: Snippet;
|
|
@@ -106,9 +133,6 @@
|
|
|
106
133
|
onpointerleave?: PointerHandler;
|
|
107
134
|
onpointermove?: PointerHandler;
|
|
108
135
|
onpointercancel?: PointerHandler;
|
|
109
|
-
|
|
110
|
-
// その他
|
|
111
|
-
[key: string]: any;
|
|
112
136
|
};
|
|
113
137
|
|
|
114
138
|
let {
|
|
@@ -3,7 +3,7 @@ import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
|
3
3
|
import type { IconVariant, IconWeight, IconGrade, IconOpticalSize } from '../types/icon';
|
|
4
4
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler } from '../types/callbackHandlers';
|
|
5
5
|
import type { ButtonVariant, BadgeVariant } from '../types/propOptions';
|
|
6
|
-
export type IconButtonProps = {
|
|
6
|
+
export type IconButtonProps = Omit<HTMLButtonAttributes, 'children' | 'onfocus' | 'onblur' | 'onkeydown' | 'onkeyup' | 'onclick' | 'onmousedown' | 'onmouseup' | 'onmouseenter' | 'onmouseleave' | 'onmouseover' | 'onmouseout' | 'oncontextmenu' | 'onauxclick' | 'ontouchstart' | 'ontouchend' | 'ontouchmove' | 'ontouchcancel' | 'onpointerdown' | 'onpointerup' | 'onpointerenter' | 'onpointerleave' | 'onpointermove' | 'onpointercancel'> & {
|
|
7
7
|
/** Material Symbols icon name (e.g. `"close"`, `"edit"`). */
|
|
8
8
|
children: Snippet;
|
|
9
9
|
/** @default 'button' */
|
|
@@ -67,7 +67,6 @@ export type IconButtonProps = {
|
|
|
67
67
|
onpointerleave?: PointerHandler;
|
|
68
68
|
onpointermove?: PointerHandler;
|
|
69
69
|
onpointercancel?: PointerHandler;
|
|
70
|
-
[key: string]: any;
|
|
71
70
|
};
|
|
72
71
|
declare const IconButton: import("svelte").Component<IconButtonProps, {}, "">;
|
|
73
72
|
type IconButton = ReturnType<typeof IconButton>;
|
|
@@ -16,11 +16,52 @@
|
|
|
16
16
|
BivariantValueHandler
|
|
17
17
|
} from '../types/callbackHandlers';
|
|
18
18
|
import type { FocusStyle } from '../types/propOptions';
|
|
19
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
19
20
|
|
|
20
21
|
// =========================================================================
|
|
21
22
|
// Props, States & Constants
|
|
22
23
|
// =========================================================================
|
|
23
|
-
export type InputProps =
|
|
24
|
+
export type InputProps = Omit<
|
|
25
|
+
HTMLInputAttributes,
|
|
26
|
+
// 独自の型で再定義するためベースの HTML 属性から除外
|
|
27
|
+
| 'value'
|
|
28
|
+
| 'type'
|
|
29
|
+
| 'id'
|
|
30
|
+
| 'tabindex'
|
|
31
|
+
| 'maxlength'
|
|
32
|
+
| 'pattern'
|
|
33
|
+
| 'min'
|
|
34
|
+
| 'max'
|
|
35
|
+
| 'step'
|
|
36
|
+
| 'autocomplete'
|
|
37
|
+
| 'spellcheck'
|
|
38
|
+
// 独自ハンドラ型(callbackHandlers)で再定義するイベント系
|
|
39
|
+
| 'onfocus'
|
|
40
|
+
| 'onblur'
|
|
41
|
+
| 'onkeydown'
|
|
42
|
+
| 'onkeyup'
|
|
43
|
+
| 'onclick'
|
|
44
|
+
| 'onmousedown'
|
|
45
|
+
| 'onmouseup'
|
|
46
|
+
| 'onmouseenter'
|
|
47
|
+
| 'onmouseleave'
|
|
48
|
+
| 'onmouseover'
|
|
49
|
+
| 'onmouseout'
|
|
50
|
+
| 'oncontextmenu'
|
|
51
|
+
| 'onauxclick'
|
|
52
|
+
| 'ontouchstart'
|
|
53
|
+
| 'ontouchend'
|
|
54
|
+
| 'ontouchmove'
|
|
55
|
+
| 'ontouchcancel'
|
|
56
|
+
| 'onpointerdown'
|
|
57
|
+
| 'onpointerup'
|
|
58
|
+
| 'onpointerenter'
|
|
59
|
+
| 'onpointerleave'
|
|
60
|
+
| 'onpointermove'
|
|
61
|
+
| 'onpointercancel'
|
|
62
|
+
| 'onchange'
|
|
63
|
+
| 'oninput'
|
|
64
|
+
> & {
|
|
24
65
|
// 基本プロパティ
|
|
25
66
|
name?: string;
|
|
26
67
|
value: string | number | null | undefined;
|
|
@@ -76,6 +117,7 @@
|
|
|
76
117
|
required?: boolean;
|
|
77
118
|
/** Shows a clear (×) button when the input has a value. @default false */
|
|
78
119
|
clearable?: boolean;
|
|
120
|
+
clearButtonAriaLabel?: string;
|
|
79
121
|
/** Converts URLs in the value to clickable links. Only for `type="text"` or `type="url"`. @default false */
|
|
80
122
|
linkify?: boolean;
|
|
81
123
|
/** Adds a show/hide password toggle button. Only for `type="password"`. @default false */
|
|
@@ -139,9 +181,6 @@
|
|
|
139
181
|
onLeftIconTouchEnd?: TouchHandler;
|
|
140
182
|
onRightIconTouchCancel?: TouchHandler;
|
|
141
183
|
onLeftIconTouchCancel?: TouchHandler;
|
|
142
|
-
|
|
143
|
-
// その他
|
|
144
|
-
[key: string]: any;
|
|
145
184
|
};
|
|
146
185
|
|
|
147
186
|
let {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IconVariant, IconWeight, IconGrade, IconOpticalSize } from '../types/icon';
|
|
2
2
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler, BivariantValueHandler } from '../types/callbackHandlers';
|
|
3
3
|
import type { FocusStyle } from '../types/propOptions';
|
|
4
|
-
|
|
4
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
5
|
+
export type InputProps = Omit<HTMLInputAttributes, 'value' | 'type' | 'id' | 'tabindex' | 'maxlength' | 'pattern' | 'min' | 'max' | 'step' | 'autocomplete' | 'spellcheck' | 'onfocus' | 'onblur' | 'onkeydown' | 'onkeyup' | 'onclick' | 'onmousedown' | 'onmouseup' | 'onmouseenter' | 'onmouseleave' | 'onmouseover' | 'onmouseout' | 'oncontextmenu' | 'onauxclick' | 'ontouchstart' | 'ontouchend' | 'ontouchmove' | 'ontouchcancel' | 'onpointerdown' | 'onpointerup' | 'onpointerenter' | 'onpointerleave' | 'onpointermove' | 'onpointercancel' | 'onchange' | 'oninput'> & {
|
|
5
6
|
name?: string;
|
|
6
7
|
value: string | number | null | undefined;
|
|
7
8
|
id?: string | null;
|
|
@@ -49,6 +50,7 @@ export type InputProps = {
|
|
|
49
50
|
required?: boolean;
|
|
50
51
|
/** Shows a clear (×) button when the input has a value. @default false */
|
|
51
52
|
clearable?: boolean;
|
|
53
|
+
clearButtonAriaLabel?: string;
|
|
52
54
|
/** Converts URLs in the value to clickable links. Only for `type="text"` or `type="url"`. @default false */
|
|
53
55
|
linkify?: boolean;
|
|
54
56
|
/** Adds a show/hide password toggle button. Only for `type="password"`. @default false */
|
|
@@ -96,7 +98,6 @@ export type InputProps = {
|
|
|
96
98
|
onLeftIconTouchEnd?: TouchHandler;
|
|
97
99
|
onRightIconTouchCancel?: TouchHandler;
|
|
98
100
|
onLeftIconTouchCancel?: TouchHandler;
|
|
99
|
-
[key: string]: any;
|
|
100
101
|
};
|
|
101
102
|
declare const Input: import("svelte").Component<InputProps, {
|
|
102
103
|
focus: () => void;
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
box-shadow: 0 0 0 var(--svelte-ui-border-width) inset var(--svelte-ui-select-border-color);
|
|
337
337
|
border: none;
|
|
338
338
|
border-radius: var(--svelte-ui-select-border-radius);
|
|
339
|
-
font-size:
|
|
339
|
+
font-size: var(--svelte-ui-font-size);
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
/* =============================================
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
padding: 8px 16px;
|
|
356
356
|
background: transparent;
|
|
357
357
|
border: none;
|
|
358
|
-
font-size:
|
|
358
|
+
font-size: var(--svelte-ui-font-size);
|
|
359
359
|
color: var(--svelte-ui-popupmenu-text-color);
|
|
360
360
|
text-align: left;
|
|
361
361
|
white-space: nowrap;
|
|
@@ -412,6 +412,6 @@
|
|
|
412
412
|
|
|
413
413
|
:global(.popup--fullscreen) .popup-menu__button {
|
|
414
414
|
padding: 16px 24px;
|
|
415
|
-
font-size:
|
|
415
|
+
font-size: var(--svelte-ui-font-size);
|
|
416
416
|
min-height: var(--svelte-ui-touch-target-lg);
|
|
417
417
|
}</style>
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<script lang="ts">
|
|
4
4
|
import { type Snippet } from 'svelte';
|
|
5
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
5
6
|
import type {
|
|
6
7
|
FocusHandler,
|
|
7
8
|
KeyboardHandler,
|
|
@@ -16,7 +17,37 @@
|
|
|
16
17
|
// =========================================================================
|
|
17
18
|
// Props, States & Constants
|
|
18
19
|
// =========================================================================
|
|
19
|
-
export type RadioProps =
|
|
20
|
+
export type RadioProps = Omit<
|
|
21
|
+
HTMLInputAttributes,
|
|
22
|
+
// 独自型で再定義する props / イベントは除外して衝突を避ける
|
|
23
|
+
| 'children'
|
|
24
|
+
| 'value'
|
|
25
|
+
| 'size'
|
|
26
|
+
| 'onfocus'
|
|
27
|
+
| 'onblur'
|
|
28
|
+
| 'onkeydown'
|
|
29
|
+
| 'onkeyup'
|
|
30
|
+
| 'onclick'
|
|
31
|
+
| 'onmousedown'
|
|
32
|
+
| 'onmouseup'
|
|
33
|
+
| 'onmouseenter'
|
|
34
|
+
| 'onmouseleave'
|
|
35
|
+
| 'onmouseover'
|
|
36
|
+
| 'onmouseout'
|
|
37
|
+
| 'oncontextmenu'
|
|
38
|
+
| 'onauxclick'
|
|
39
|
+
| 'ontouchstart'
|
|
40
|
+
| 'ontouchend'
|
|
41
|
+
| 'ontouchmove'
|
|
42
|
+
| 'ontouchcancel'
|
|
43
|
+
| 'onpointerdown'
|
|
44
|
+
| 'onpointerup'
|
|
45
|
+
| 'onpointerenter'
|
|
46
|
+
| 'onpointerleave'
|
|
47
|
+
| 'onpointermove'
|
|
48
|
+
| 'onpointercancel'
|
|
49
|
+
| 'onchange'
|
|
50
|
+
> & {
|
|
20
51
|
// Snippet
|
|
21
52
|
/** Label content displayed next to the radio button. */
|
|
22
53
|
children?: Snippet;
|
|
@@ -85,9 +116,6 @@
|
|
|
85
116
|
|
|
86
117
|
// 入力イベント
|
|
87
118
|
onchange?: BivariantValueHandler<OptionValue>;
|
|
88
|
-
|
|
89
|
-
// その他
|
|
90
|
-
[key: string]: any;
|
|
91
119
|
};
|
|
92
120
|
|
|
93
121
|
let {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
2
3
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler, BivariantValueHandler } from '../types/callbackHandlers';
|
|
3
4
|
import type { OptionValue } from '../types/options';
|
|
4
5
|
import type { ComponentSize } from '../types/propOptions';
|
|
5
|
-
export type RadioProps = {
|
|
6
|
+
export type RadioProps = Omit<HTMLInputAttributes, 'children' | 'value' | 'size' | 'onfocus' | 'onblur' | 'onkeydown' | 'onkeyup' | 'onclick' | 'onmousedown' | 'onmouseup' | 'onmouseenter' | 'onmouseleave' | 'onmouseover' | 'onmouseout' | 'oncontextmenu' | 'onauxclick' | 'ontouchstart' | 'ontouchend' | 'ontouchmove' | 'ontouchcancel' | 'onpointerdown' | 'onpointerup' | 'onpointerenter' | 'onpointerleave' | 'onpointermove' | 'onpointercancel' | 'onchange'> & {
|
|
6
7
|
/** Label content displayed next to the radio button. */
|
|
7
8
|
children?: Snippet;
|
|
8
9
|
/** Radio group name. All radios in a group must share the same name. */
|
|
@@ -48,7 +49,6 @@ export type RadioProps = {
|
|
|
48
49
|
onpointermove?: PointerHandler;
|
|
49
50
|
onpointercancel?: PointerHandler;
|
|
50
51
|
onchange?: BivariantValueHandler<OptionValue>;
|
|
51
|
-
[key: string]: any;
|
|
52
52
|
};
|
|
53
53
|
declare const Radio: import("svelte").Component<RadioProps, {}, "currentValue">;
|
|
54
54
|
type Radio = ReturnType<typeof Radio>;
|
|
@@ -13,11 +13,39 @@
|
|
|
13
13
|
BivariantValueHandler
|
|
14
14
|
} from '../types/callbackHandlers';
|
|
15
15
|
import type { ComponentSize } from '../types/propOptions';
|
|
16
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
16
17
|
|
|
17
18
|
// =========================================================================
|
|
18
19
|
// Props, States & Constants
|
|
19
20
|
// =========================================================================
|
|
20
|
-
export type SegmentedControlProps =
|
|
21
|
+
export type SegmentedControlProps = Omit<
|
|
22
|
+
HTMLAttributes<HTMLDivElement>,
|
|
23
|
+
// 独自ハンドラ型(callbackHandlers)で再定義するイベント系は除外して衝突を避ける
|
|
24
|
+
| 'onchange'
|
|
25
|
+
| 'onfocus'
|
|
26
|
+
| 'onblur'
|
|
27
|
+
| 'onkeydown'
|
|
28
|
+
| 'onkeyup'
|
|
29
|
+
| 'onclick'
|
|
30
|
+
| 'onmousedown'
|
|
31
|
+
| 'onmouseup'
|
|
32
|
+
| 'onmouseenter'
|
|
33
|
+
| 'onmouseleave'
|
|
34
|
+
| 'onmouseover'
|
|
35
|
+
| 'onmouseout'
|
|
36
|
+
| 'oncontextmenu'
|
|
37
|
+
| 'onauxclick'
|
|
38
|
+
| 'ontouchstart'
|
|
39
|
+
| 'ontouchend'
|
|
40
|
+
| 'ontouchmove'
|
|
41
|
+
| 'ontouchcancel'
|
|
42
|
+
| 'onpointerdown'
|
|
43
|
+
| 'onpointerup'
|
|
44
|
+
| 'onpointerenter'
|
|
45
|
+
| 'onpointerleave'
|
|
46
|
+
| 'onpointermove'
|
|
47
|
+
| 'onpointercancel'
|
|
48
|
+
> & {
|
|
21
49
|
// 基本プロパティ
|
|
22
50
|
/** `{ label, value, icon?, disabled? }[]` */
|
|
23
51
|
items: SegmentedControlItem[];
|
|
@@ -87,9 +115,6 @@
|
|
|
87
115
|
onpointerleave?: PointerHandler;
|
|
88
116
|
onpointermove?: PointerHandler;
|
|
89
117
|
onpointercancel?: PointerHandler;
|
|
90
|
-
|
|
91
|
-
// その他
|
|
92
|
-
[key: string]: any;
|
|
93
118
|
};
|
|
94
119
|
|
|
95
120
|
let {
|
|
@@ -2,7 +2,8 @@ import type { IconVariant, IconWeight, IconGrade, IconOpticalSize } from '../typ
|
|
|
2
2
|
import type { SegmentedControlItem } from '../types/segmentedControlItem';
|
|
3
3
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler, BivariantValueHandler } from '../types/callbackHandlers';
|
|
4
4
|
import type { ComponentSize } from '../types/propOptions';
|
|
5
|
-
|
|
5
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
6
|
+
export type SegmentedControlProps = Omit<HTMLAttributes<HTMLDivElement>, 'onchange' | 'onfocus' | 'onblur' | 'onkeydown' | 'onkeyup' | 'onclick' | 'onmousedown' | 'onmouseup' | 'onmouseenter' | 'onmouseleave' | 'onmouseover' | 'onmouseout' | 'oncontextmenu' | 'onauxclick' | 'ontouchstart' | 'ontouchend' | 'ontouchmove' | 'ontouchcancel' | 'onpointerdown' | 'onpointerup' | 'onpointerenter' | 'onpointerleave' | 'onpointermove' | 'onpointercancel'> & {
|
|
6
7
|
/** `{ label, value, icon?, disabled? }[]` */
|
|
7
8
|
items: SegmentedControlItem[];
|
|
8
9
|
/** Currently selected value. Supports `bind:value`. */
|
|
@@ -49,7 +50,6 @@ export type SegmentedControlProps = {
|
|
|
49
50
|
onpointerleave?: PointerHandler;
|
|
50
51
|
onpointermove?: PointerHandler;
|
|
51
52
|
onpointercancel?: PointerHandler;
|
|
52
|
-
[key: string]: any;
|
|
53
53
|
};
|
|
54
54
|
declare const SegmentedControl: import("svelte").Component<SegmentedControlProps, {}, "value">;
|
|
55
55
|
type SegmentedControl = ReturnType<typeof SegmentedControl>;
|
|
@@ -12,11 +12,44 @@
|
|
|
12
12
|
BivariantValueHandler
|
|
13
13
|
} from '../types/callbackHandlers';
|
|
14
14
|
import type { Option } from '../types/options';
|
|
15
|
+
import type { HTMLSelectAttributes } from 'svelte/elements';
|
|
15
16
|
|
|
16
17
|
// =========================================================================
|
|
17
18
|
// Props, States & Constants
|
|
18
19
|
// =========================================================================
|
|
19
|
-
export type SelectProps =
|
|
20
|
+
export type SelectProps = Omit<
|
|
21
|
+
HTMLSelectAttributes,
|
|
22
|
+
// 独自の型で再定義するためベースの HTML 属性から除外
|
|
23
|
+
| 'value'
|
|
24
|
+
| 'id'
|
|
25
|
+
| 'tabindex'
|
|
26
|
+
| 'size'
|
|
27
|
+
// 独自ハンドラ型(callbackHandlers)で再定義するイベント系
|
|
28
|
+
| 'onfocus'
|
|
29
|
+
| 'onblur'
|
|
30
|
+
| 'onkeydown'
|
|
31
|
+
| 'onkeyup'
|
|
32
|
+
| 'onclick'
|
|
33
|
+
| 'onmousedown'
|
|
34
|
+
| 'onmouseup'
|
|
35
|
+
| 'onmouseenter'
|
|
36
|
+
| 'onmouseleave'
|
|
37
|
+
| 'onmouseover'
|
|
38
|
+
| 'onmouseout'
|
|
39
|
+
| 'oncontextmenu'
|
|
40
|
+
| 'onauxclick'
|
|
41
|
+
| 'ontouchstart'
|
|
42
|
+
| 'ontouchend'
|
|
43
|
+
| 'ontouchmove'
|
|
44
|
+
| 'ontouchcancel'
|
|
45
|
+
| 'onpointerdown'
|
|
46
|
+
| 'onpointerup'
|
|
47
|
+
| 'onpointerenter'
|
|
48
|
+
| 'onpointerleave'
|
|
49
|
+
| 'onpointermove'
|
|
50
|
+
| 'onpointercancel'
|
|
51
|
+
| 'onchange'
|
|
52
|
+
> & {
|
|
20
53
|
// 基本プロパティ
|
|
21
54
|
name?: string;
|
|
22
55
|
value: string | number | null | undefined;
|
|
@@ -78,9 +111,6 @@
|
|
|
78
111
|
|
|
79
112
|
// 入力イベント
|
|
80
113
|
onchange?: BivariantValueHandler<string | number | null | undefined>;
|
|
81
|
-
|
|
82
|
-
// その他
|
|
83
|
-
[key: string]: any;
|
|
84
114
|
};
|
|
85
115
|
|
|
86
116
|
let {
|
|
@@ -456,7 +486,7 @@ select--focus-{focusStyle}"
|
|
|
456
486
|
box-shadow: 0 0 0 var(--svelte-ui-border-width) inset var(--svelte-ui-select-border-color);
|
|
457
487
|
border: none;
|
|
458
488
|
border-radius: var(--svelte-ui-select-border-radius);
|
|
459
|
-
font-size:
|
|
489
|
+
font-size: var(--svelte-ui-font-size);
|
|
460
490
|
line-height: var(--svelte-ui-select-height);
|
|
461
491
|
}
|
|
462
492
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler, BivariantValueHandler } from '../types/callbackHandlers';
|
|
2
2
|
import type { Option } from '../types/options';
|
|
3
|
-
|
|
3
|
+
import type { HTMLSelectAttributes } from 'svelte/elements';
|
|
4
|
+
export type SelectProps = Omit<HTMLSelectAttributes, 'value' | 'id' | 'tabindex' | 'size' | 'onfocus' | 'onblur' | 'onkeydown' | 'onkeyup' | 'onclick' | 'onmousedown' | 'onmouseup' | 'onmouseenter' | 'onmouseleave' | 'onmouseover' | 'onmouseout' | 'oncontextmenu' | 'onauxclick' | 'ontouchstart' | 'ontouchend' | 'ontouchmove' | 'ontouchcancel' | 'onpointerdown' | 'onpointerup' | 'onpointerenter' | 'onpointerleave' | 'onpointermove' | 'onpointercancel' | 'onchange'> & {
|
|
4
5
|
name?: string;
|
|
5
6
|
value: string | number | null | undefined;
|
|
6
7
|
/** `{ label, value, disabled? }[]` */
|
|
@@ -44,7 +45,6 @@ export type SelectProps = {
|
|
|
44
45
|
onpointermove?: PointerHandler;
|
|
45
46
|
onpointercancel?: PointerHandler;
|
|
46
47
|
onchange?: BivariantValueHandler<string | number | null | undefined>;
|
|
47
|
-
[key: string]: any;
|
|
48
48
|
};
|
|
49
49
|
declare const Select: import("svelte").Component<SelectProps, {}, "value">;
|
|
50
50
|
type Select = ReturnType<typeof Select>;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<script lang="ts">
|
|
4
4
|
import { getStyleFromNumber } from '../utils/style';
|
|
5
5
|
import { t } from '../i18n';
|
|
6
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
6
7
|
import type {
|
|
7
8
|
FocusHandler,
|
|
8
9
|
KeyboardHandler,
|
|
@@ -15,7 +16,36 @@
|
|
|
15
16
|
// =========================================================================
|
|
16
17
|
// Props, States & Constants
|
|
17
18
|
// =========================================================================
|
|
18
|
-
export type SliderProps =
|
|
19
|
+
export type SliderProps = Omit<
|
|
20
|
+
HTMLInputAttributes,
|
|
21
|
+
// 独自型で再定義する props / イベントは除外して衝突を避ける
|
|
22
|
+
| 'value'
|
|
23
|
+
| 'onfocus'
|
|
24
|
+
| 'onblur'
|
|
25
|
+
| 'onkeydown'
|
|
26
|
+
| 'onkeyup'
|
|
27
|
+
| 'onclick'
|
|
28
|
+
| 'onmousedown'
|
|
29
|
+
| 'onmouseup'
|
|
30
|
+
| 'onmouseenter'
|
|
31
|
+
| 'onmouseleave'
|
|
32
|
+
| 'onmouseover'
|
|
33
|
+
| 'onmouseout'
|
|
34
|
+
| 'oncontextmenu'
|
|
35
|
+
| 'onauxclick'
|
|
36
|
+
| 'ontouchstart'
|
|
37
|
+
| 'ontouchend'
|
|
38
|
+
| 'ontouchmove'
|
|
39
|
+
| 'ontouchcancel'
|
|
40
|
+
| 'onpointerdown'
|
|
41
|
+
| 'onpointerup'
|
|
42
|
+
| 'onpointerenter'
|
|
43
|
+
| 'onpointerleave'
|
|
44
|
+
| 'onpointermove'
|
|
45
|
+
| 'onpointercancel'
|
|
46
|
+
| 'onchange'
|
|
47
|
+
| 'oninput'
|
|
48
|
+
> & {
|
|
19
49
|
// 基本プロパティ
|
|
20
50
|
/** Supports `bind:value`. */
|
|
21
51
|
value: number;
|
|
@@ -78,9 +108,6 @@
|
|
|
78
108
|
// 入力イベント
|
|
79
109
|
onchange?: BivariantValueHandler<number>;
|
|
80
110
|
oninput?: BivariantValueHandler<number>;
|
|
81
|
-
|
|
82
|
-
// その他
|
|
83
|
-
[key: string]: any;
|
|
84
111
|
};
|
|
85
112
|
|
|
86
113
|
let {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
1
2
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler, BivariantValueHandler } from '../types/callbackHandlers';
|
|
2
|
-
export type SliderProps = {
|
|
3
|
+
export type SliderProps = Omit<HTMLInputAttributes, 'value' | 'onfocus' | 'onblur' | 'onkeydown' | 'onkeyup' | 'onclick' | 'onmousedown' | 'onmouseup' | 'onmouseenter' | 'onmouseleave' | 'onmouseover' | 'onmouseout' | 'oncontextmenu' | 'onauxclick' | 'ontouchstart' | 'ontouchend' | 'ontouchmove' | 'ontouchcancel' | 'onpointerdown' | 'onpointerup' | 'onpointerenter' | 'onpointerleave' | 'onpointermove' | 'onpointercancel' | 'onchange' | 'oninput'> & {
|
|
3
4
|
/** Supports `bind:value`. */
|
|
4
5
|
value: number;
|
|
5
6
|
name?: string;
|
|
@@ -44,7 +45,6 @@ export type SliderProps = {
|
|
|
44
45
|
onpointercancel?: PointerHandler;
|
|
45
46
|
onchange?: BivariantValueHandler<number>;
|
|
46
47
|
oninput?: BivariantValueHandler<number>;
|
|
47
|
-
[key: string]: any;
|
|
48
48
|
};
|
|
49
49
|
declare const Slider: import("svelte").Component<SliderProps, {}, "value">;
|
|
50
50
|
type Slider = ReturnType<typeof Slider>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<script lang="ts">
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
5
6
|
import type {
|
|
6
7
|
FocusHandler,
|
|
7
8
|
KeyboardHandler,
|
|
@@ -15,7 +16,37 @@
|
|
|
15
16
|
// =========================================================================
|
|
16
17
|
// Props, States & Constants
|
|
17
18
|
// =========================================================================
|
|
18
|
-
export type SwitchProps =
|
|
19
|
+
export type SwitchProps = Omit<
|
|
20
|
+
HTMLInputAttributes,
|
|
21
|
+
// 独自型で再定義する props / イベントは除外して衝突を避ける
|
|
22
|
+
| 'children'
|
|
23
|
+
| 'value'
|
|
24
|
+
| 'size'
|
|
25
|
+
| 'onfocus'
|
|
26
|
+
| 'onblur'
|
|
27
|
+
| 'onkeydown'
|
|
28
|
+
| 'onkeyup'
|
|
29
|
+
| 'onclick'
|
|
30
|
+
| 'onmousedown'
|
|
31
|
+
| 'onmouseup'
|
|
32
|
+
| 'onmouseenter'
|
|
33
|
+
| 'onmouseleave'
|
|
34
|
+
| 'onmouseover'
|
|
35
|
+
| 'onmouseout'
|
|
36
|
+
| 'oncontextmenu'
|
|
37
|
+
| 'onauxclick'
|
|
38
|
+
| 'ontouchstart'
|
|
39
|
+
| 'ontouchend'
|
|
40
|
+
| 'ontouchmove'
|
|
41
|
+
| 'ontouchcancel'
|
|
42
|
+
| 'onpointerdown'
|
|
43
|
+
| 'onpointerup'
|
|
44
|
+
| 'onpointerenter'
|
|
45
|
+
| 'onpointerleave'
|
|
46
|
+
| 'onpointermove'
|
|
47
|
+
| 'onpointercancel'
|
|
48
|
+
| 'onchange'
|
|
49
|
+
> & {
|
|
19
50
|
// Snippet
|
|
20
51
|
children?: Snippet;
|
|
21
52
|
|
|
@@ -77,9 +108,6 @@
|
|
|
77
108
|
|
|
78
109
|
// 入力イベント
|
|
79
110
|
onchange?: BivariantValueHandler<boolean>;
|
|
80
|
-
|
|
81
|
-
// その他
|
|
82
|
-
[key: string]: any;
|
|
83
111
|
};
|
|
84
112
|
|
|
85
113
|
let {
|