@14ch/svelte-ui 0.0.56 → 0.0.57
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/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/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/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 +34 -4
- 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 ButtonProps =
|
|
22
|
+
export type ButtonProps = 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
|
children: Snippet;
|
|
25
52
|
|
|
@@ -39,6 +66,8 @@
|
|
|
39
66
|
fullWidth?: boolean;
|
|
40
67
|
/** Content alignment. Useful with `fullWidth`. @default 'center' */
|
|
41
68
|
align?: 'left' | 'center' | 'right';
|
|
69
|
+
/** Minimum width. A number is treated as px. @default 0 */
|
|
70
|
+
minWidth?: number;
|
|
42
71
|
rounded?: boolean;
|
|
43
72
|
/** Adds a chevron-down icon. Use when the button opens a popup/dropdown. @default false */
|
|
44
73
|
popup?: boolean;
|
|
@@ -97,9 +126,6 @@
|
|
|
97
126
|
onpointerleave?: PointerHandler;
|
|
98
127
|
onpointermove?: PointerHandler;
|
|
99
128
|
onpointercancel?: PointerHandler;
|
|
100
|
-
|
|
101
|
-
// その他
|
|
102
|
-
[key: string]: any;
|
|
103
129
|
};
|
|
104
130
|
|
|
105
131
|
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, ButtonSize, IconPosition } from '../types/propOptions';
|
|
6
|
-
export type ButtonProps = {
|
|
6
|
+
export type ButtonProps = 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'];
|
|
@@ -18,6 +18,8 @@ export type ButtonProps = {
|
|
|
18
18
|
fullWidth?: boolean;
|
|
19
19
|
/** Content alignment. Useful with `fullWidth`. @default 'center' */
|
|
20
20
|
align?: 'left' | 'center' | 'right';
|
|
21
|
+
/** Minimum width. A number is treated as px. @default 0 */
|
|
22
|
+
minWidth?: number;
|
|
21
23
|
rounded?: boolean;
|
|
22
24
|
/** Adds a chevron-down icon. Use when the button opens a popup/dropdown. @default false */
|
|
23
25
|
popup?: boolean;
|
|
@@ -60,7 +62,6 @@ export type ButtonProps = {
|
|
|
60
62
|
onpointerleave?: PointerHandler;
|
|
61
63
|
onpointermove?: PointerHandler;
|
|
62
64
|
onpointercancel?: PointerHandler;
|
|
63
|
-
[key: string]: any;
|
|
64
65
|
};
|
|
65
66
|
declare const Button: import("svelte").Component<ButtonProps, {}, "">;
|
|
66
67
|
type Button = ReturnType<typeof Button>;
|
|
@@ -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 CheckboxProps =
|
|
19
|
+
export type CheckboxProps = 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
|
/** Label content displayed next to the checkbox. */
|
|
21
52
|
children?: Snippet;
|
|
@@ -84,9 +115,6 @@
|
|
|
84
115
|
|
|
85
116
|
// 入力イベント
|
|
86
117
|
onchange?: BivariantValueHandler<boolean>;
|
|
87
|
-
|
|
88
|
-
// その他
|
|
89
|
-
[key: string]: any;
|
|
90
118
|
};
|
|
91
119
|
|
|
92
120
|
let {
|
|
@@ -1,7 +1,8 @@
|
|
|
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 { ComponentSize } from '../types/propOptions';
|
|
4
|
-
export type CheckboxProps = {
|
|
5
|
+
export type CheckboxProps = 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'> & {
|
|
5
6
|
/** Label content displayed next to the checkbox. */
|
|
6
7
|
children?: Snippet;
|
|
7
8
|
/** Native `name` attribute. */
|
|
@@ -47,7 +48,6 @@ export type CheckboxProps = {
|
|
|
47
48
|
onpointermove?: PointerHandler;
|
|
48
49
|
onpointercancel?: PointerHandler;
|
|
49
50
|
onchange?: BivariantValueHandler<boolean>;
|
|
50
|
-
[key: string]: any;
|
|
51
51
|
};
|
|
52
52
|
declare const Checkbox: import("svelte").Component<CheckboxProps, {}, "value" | "indeterminate">;
|
|
53
53
|
type Checkbox = ReturnType<typeof Checkbox>;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<script lang="ts">
|
|
4
4
|
import { untrack } from 'svelte';
|
|
5
5
|
import Input from './Input.svelte';
|
|
6
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
6
7
|
import { t } from '../i18n';
|
|
7
8
|
import type { IconVariant } from '../types/icon';
|
|
8
9
|
import type {
|
|
@@ -17,7 +18,46 @@
|
|
|
17
18
|
// =========================================================================
|
|
18
19
|
// Props, States & Constants
|
|
19
20
|
// =========================================================================
|
|
20
|
-
export type ColorPickerProps =
|
|
21
|
+
export type ColorPickerProps = Omit<
|
|
22
|
+
HTMLInputAttributes,
|
|
23
|
+
// Input と生の color input の両方へ転送するため、Input が絞り込むキーと独自ハンドラを除外
|
|
24
|
+
| 'value'
|
|
25
|
+
| 'type'
|
|
26
|
+
| 'id'
|
|
27
|
+
| 'tabindex'
|
|
28
|
+
| 'maxlength'
|
|
29
|
+
| 'pattern'
|
|
30
|
+
| 'min'
|
|
31
|
+
| 'max'
|
|
32
|
+
| 'step'
|
|
33
|
+
| 'autocomplete'
|
|
34
|
+
| 'spellcheck'
|
|
35
|
+
| 'onchange'
|
|
36
|
+
| 'oninput'
|
|
37
|
+
| 'onfocus'
|
|
38
|
+
| 'onblur'
|
|
39
|
+
| 'onkeydown'
|
|
40
|
+
| 'onkeyup'
|
|
41
|
+
| 'onclick'
|
|
42
|
+
| 'onmousedown'
|
|
43
|
+
| 'onmouseup'
|
|
44
|
+
| 'onmouseenter'
|
|
45
|
+
| 'onmouseleave'
|
|
46
|
+
| 'onmouseover'
|
|
47
|
+
| 'onmouseout'
|
|
48
|
+
| 'oncontextmenu'
|
|
49
|
+
| 'onauxclick'
|
|
50
|
+
| 'ontouchstart'
|
|
51
|
+
| 'ontouchend'
|
|
52
|
+
| 'ontouchmove'
|
|
53
|
+
| 'ontouchcancel'
|
|
54
|
+
| 'onpointerdown'
|
|
55
|
+
| 'onpointerup'
|
|
56
|
+
| 'onpointerenter'
|
|
57
|
+
| 'onpointerleave'
|
|
58
|
+
| 'onpointermove'
|
|
59
|
+
| 'onpointercancel'
|
|
60
|
+
> & {
|
|
21
61
|
// 基本プロパティ
|
|
22
62
|
/** Hex color string (e.g. `"#ff0000"`). Supports `bind:value`. */
|
|
23
63
|
value: string | null | undefined;
|
|
@@ -79,9 +119,6 @@
|
|
|
79
119
|
onpointerleave?: PointerHandler;
|
|
80
120
|
onpointermove?: PointerHandler;
|
|
81
121
|
onpointercancel?: PointerHandler;
|
|
82
|
-
|
|
83
|
-
// その他
|
|
84
|
-
[key: string]: any;
|
|
85
122
|
};
|
|
86
123
|
|
|
87
124
|
let {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
1
2
|
import type { IconVariant } from '../types/icon';
|
|
2
3
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler, BivariantValueHandler } from '../types/callbackHandlers';
|
|
3
|
-
export type ColorPickerProps = {
|
|
4
|
+
export type ColorPickerProps = Omit<HTMLInputAttributes, 'value' | 'type' | 'id' | 'tabindex' | 'maxlength' | 'pattern' | 'min' | 'max' | 'step' | 'autocomplete' | 'spellcheck' | 'onchange' | 'oninput' | 'onfocus' | 'onblur' | 'onkeydown' | 'onkeyup' | 'onclick' | 'onmousedown' | 'onmouseup' | 'onmouseenter' | 'onmouseleave' | 'onmouseover' | 'onmouseout' | 'oncontextmenu' | 'onauxclick' | 'ontouchstart' | 'ontouchend' | 'ontouchmove' | 'ontouchcancel' | 'onpointerdown' | 'onpointerup' | 'onpointerenter' | 'onpointerleave' | 'onpointermove' | 'onpointercancel'> & {
|
|
4
5
|
/** Hex color string (e.g. `"#ff0000"`). Supports `bind:value`. */
|
|
5
6
|
value: string | null | undefined;
|
|
6
7
|
id?: string;
|
|
@@ -44,7 +45,6 @@ export type ColorPickerProps = {
|
|
|
44
45
|
onpointerleave?: PointerHandler;
|
|
45
46
|
onpointermove?: PointerHandler;
|
|
46
47
|
onpointercancel?: PointerHandler;
|
|
47
|
-
[key: string]: any;
|
|
48
48
|
};
|
|
49
49
|
declare const ColorPicker: import("svelte").Component<ColorPickerProps, {}, "value">;
|
|
50
50
|
type ColorPicker = ReturnType<typeof ColorPicker>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<script lang="ts">
|
|
4
4
|
import Input from './Input.svelte';
|
|
5
|
+
import type { InputProps } from './Input.svelte';
|
|
5
6
|
import Popup from './Popup.svelte';
|
|
6
7
|
import { announceSelection } from '../utils/accessibility';
|
|
7
8
|
import { t } from '../i18n';
|
|
@@ -17,7 +18,36 @@
|
|
|
17
18
|
// =========================================================================
|
|
18
19
|
// Props, States & Constants
|
|
19
20
|
// =========================================================================
|
|
20
|
-
export type ComboboxProps =
|
|
21
|
+
export type ComboboxProps = Omit<
|
|
22
|
+
InputProps,
|
|
23
|
+
// 独自ハンドラ型と独自型の value は除外して衝突を避ける(余剰プロパティは Input へ転送)
|
|
24
|
+
| 'value'
|
|
25
|
+
| 'onchange'
|
|
26
|
+
| 'oninput'
|
|
27
|
+
| 'onfocus'
|
|
28
|
+
| 'onblur'
|
|
29
|
+
| 'onkeydown'
|
|
30
|
+
| 'onkeyup'
|
|
31
|
+
| 'onclick'
|
|
32
|
+
| 'onmousedown'
|
|
33
|
+
| 'onmouseup'
|
|
34
|
+
| 'onmouseenter'
|
|
35
|
+
| 'onmouseleave'
|
|
36
|
+
| 'onmouseover'
|
|
37
|
+
| 'onmouseout'
|
|
38
|
+
| 'oncontextmenu'
|
|
39
|
+
| 'onauxclick'
|
|
40
|
+
| 'ontouchstart'
|
|
41
|
+
| 'ontouchend'
|
|
42
|
+
| 'ontouchmove'
|
|
43
|
+
| 'ontouchcancel'
|
|
44
|
+
| 'onpointerdown'
|
|
45
|
+
| 'onpointerup'
|
|
46
|
+
| 'onpointerenter'
|
|
47
|
+
| 'onpointerleave'
|
|
48
|
+
| 'onpointermove'
|
|
49
|
+
| 'onpointercancel'
|
|
50
|
+
> & {
|
|
21
51
|
// 基本プロパティ
|
|
22
52
|
name?: string;
|
|
23
53
|
/** Supports `bind:value`. */
|
|
@@ -88,9 +118,6 @@
|
|
|
88
118
|
onpointerleave?: PointerHandler;
|
|
89
119
|
onpointermove?: PointerHandler;
|
|
90
120
|
onpointercancel?: PointerHandler;
|
|
91
|
-
|
|
92
|
-
// その他
|
|
93
|
-
[key: string]: any;
|
|
94
121
|
};
|
|
95
122
|
|
|
96
123
|
let {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { InputProps } from './Input.svelte';
|
|
1
2
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler, BivariantValueHandler } from '../types/callbackHandlers';
|
|
2
|
-
export type ComboboxProps = {
|
|
3
|
+
export type ComboboxProps = Omit<InputProps, 'value' | 'onchange' | 'oninput' | 'onfocus' | 'onblur' | 'onkeydown' | 'onkeyup' | 'onclick' | 'onmousedown' | 'onmouseup' | 'onmouseenter' | 'onmouseleave' | 'onmouseover' | 'onmouseout' | 'oncontextmenu' | 'onauxclick' | 'ontouchstart' | 'ontouchend' | 'ontouchmove' | 'ontouchcancel' | 'onpointerdown' | 'onpointerup' | 'onpointerenter' | 'onpointerleave' | 'onpointermove' | 'onpointercancel'> & {
|
|
3
4
|
name?: string;
|
|
4
5
|
/** Supports `bind:value`. */
|
|
5
6
|
value: string | number | null | undefined;
|
|
@@ -51,7 +52,6 @@ export type ComboboxProps = {
|
|
|
51
52
|
onpointerleave?: PointerHandler;
|
|
52
53
|
onpointermove?: PointerHandler;
|
|
53
54
|
onpointercancel?: PointerHandler;
|
|
54
|
-
[key: string]: any;
|
|
55
55
|
};
|
|
56
56
|
declare const Combobox: import("svelte").Component<ComboboxProps, {}, "value">;
|
|
57
57
|
type Combobox = ReturnType<typeof Combobox>;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import 'dayjs/locale/es';
|
|
12
12
|
import 'dayjs/locale/zh-cn';
|
|
13
13
|
import Input from './Input.svelte';
|
|
14
|
+
import type { InputProps } from './Input.svelte';
|
|
14
15
|
import Popup from './Popup.svelte';
|
|
15
16
|
import DatepickerCalendar from './DatepickerCalendar.svelte';
|
|
16
17
|
import { announceToScreenReader } from '../utils/accessibility';
|
|
@@ -31,7 +32,36 @@
|
|
|
31
32
|
// =========================================================================
|
|
32
33
|
// Props, States & Constants
|
|
33
34
|
// =========================================================================
|
|
34
|
-
export type DatepickerProps =
|
|
35
|
+
export type DatepickerProps = Omit<
|
|
36
|
+
InputProps,
|
|
37
|
+
// 独自ハンドラ型と独自型の value は除外して衝突を避ける(余剰プロパティは Input へ転送)
|
|
38
|
+
| 'value'
|
|
39
|
+
| 'onchange'
|
|
40
|
+
| 'oninput'
|
|
41
|
+
| 'onfocus'
|
|
42
|
+
| 'onblur'
|
|
43
|
+
| 'onkeydown'
|
|
44
|
+
| 'onkeyup'
|
|
45
|
+
| 'onclick'
|
|
46
|
+
| 'onmousedown'
|
|
47
|
+
| 'onmouseup'
|
|
48
|
+
| 'onmouseenter'
|
|
49
|
+
| 'onmouseleave'
|
|
50
|
+
| 'onmouseover'
|
|
51
|
+
| 'onmouseout'
|
|
52
|
+
| 'oncontextmenu'
|
|
53
|
+
| 'onauxclick'
|
|
54
|
+
| 'ontouchstart'
|
|
55
|
+
| 'ontouchend'
|
|
56
|
+
| 'ontouchmove'
|
|
57
|
+
| 'ontouchcancel'
|
|
58
|
+
| 'onpointerdown'
|
|
59
|
+
| 'onpointerup'
|
|
60
|
+
| 'onpointerenter'
|
|
61
|
+
| 'onpointerleave'
|
|
62
|
+
| 'onpointermove'
|
|
63
|
+
| 'onpointercancel'
|
|
64
|
+
> & {
|
|
35
65
|
// 基本プロパティ
|
|
36
66
|
/** Selected date (single mode) or range (range mode). Supports `bind:value`. */
|
|
37
67
|
value: Date | { start: Date; end: Date } | undefined;
|
|
@@ -104,9 +134,6 @@
|
|
|
104
134
|
onpointerleave?: PointerHandler;
|
|
105
135
|
onpointermove?: PointerHandler;
|
|
106
136
|
onpointercancel?: PointerHandler;
|
|
107
|
-
|
|
108
|
-
// その他
|
|
109
|
-
[key: string]: any;
|
|
110
137
|
};
|
|
111
138
|
|
|
112
139
|
let {
|
|
@@ -4,10 +4,11 @@ import 'dayjs/locale/fr';
|
|
|
4
4
|
import 'dayjs/locale/de';
|
|
5
5
|
import 'dayjs/locale/es';
|
|
6
6
|
import 'dayjs/locale/zh-cn';
|
|
7
|
+
import type { InputProps } from './Input.svelte';
|
|
7
8
|
import type { IconVariant, IconWeight, IconGrade, IconOpticalSize } from '../types/icon';
|
|
8
9
|
import type { BivariantValueHandler, FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler } from '../types/callbackHandlers';
|
|
9
10
|
import type { DatepickerMode, FocusStyle } from '../types/propOptions';
|
|
10
|
-
export type DatepickerProps = {
|
|
11
|
+
export type DatepickerProps = Omit<InputProps, 'value' | 'onchange' | 'oninput' | 'onfocus' | 'onblur' | 'onkeydown' | 'onkeyup' | 'onclick' | 'onmousedown' | 'onmouseup' | 'onmouseenter' | 'onmouseleave' | 'onmouseover' | 'onmouseout' | 'oncontextmenu' | 'onauxclick' | 'ontouchstart' | 'ontouchend' | 'ontouchmove' | 'ontouchcancel' | 'onpointerdown' | 'onpointerup' | 'onpointerenter' | 'onpointerleave' | 'onpointermove' | 'onpointercancel'> & {
|
|
11
12
|
/** Selected date (single mode) or range (range mode). Supports `bind:value`. */
|
|
12
13
|
value: Date | {
|
|
13
14
|
start: Date;
|
|
@@ -74,7 +75,6 @@ export type DatepickerProps = {
|
|
|
74
75
|
onpointerleave?: PointerHandler;
|
|
75
76
|
onpointermove?: PointerHandler;
|
|
76
77
|
onpointercancel?: PointerHandler;
|
|
77
|
-
[key: string]: any;
|
|
78
78
|
};
|
|
79
79
|
declare const Datepicker: import("svelte").Component<DatepickerProps, {
|
|
80
80
|
/** Opens the calendar popup. */ open: () => void;
|
|
@@ -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;
|
|
@@ -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 {
|
|
@@ -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 {
|
|
@@ -1,7 +1,8 @@
|
|
|
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 { ComponentSize } from '../types/propOptions';
|
|
4
|
-
export type SwitchProps = {
|
|
5
|
+
export type SwitchProps = 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'> & {
|
|
5
6
|
children?: Snippet;
|
|
6
7
|
/** Supports `bind:value`. */
|
|
7
8
|
value: boolean;
|
|
@@ -41,7 +42,6 @@ export type SwitchProps = {
|
|
|
41
42
|
onpointermove?: PointerHandler;
|
|
42
43
|
onpointercancel?: PointerHandler;
|
|
43
44
|
onchange?: BivariantValueHandler<boolean>;
|
|
44
|
-
[key: string]: any;
|
|
45
45
|
};
|
|
46
46
|
declare const Switch: import("svelte").Component<SwitchProps, {}, "value">;
|
|
47
47
|
type Switch = ReturnType<typeof Switch>;
|
|
@@ -20,7 +20,44 @@
|
|
|
20
20
|
// =========================================================================
|
|
21
21
|
// Props, States & Constants
|
|
22
22
|
// =========================================================================
|
|
23
|
-
export type TextareaProps =
|
|
23
|
+
export type TextareaProps = Omit<
|
|
24
|
+
HTMLTextareaAttributes,
|
|
25
|
+
// 独自の型で再定義するためベースの HTML 属性から除外
|
|
26
|
+
| 'value'
|
|
27
|
+
| 'id'
|
|
28
|
+
| 'tabindex'
|
|
29
|
+
| 'maxlength'
|
|
30
|
+
| 'autocomplete'
|
|
31
|
+
| 'wrap'
|
|
32
|
+
| 'spellcheck'
|
|
33
|
+
| 'autocapitalize'
|
|
34
|
+
// 独自ハンドラ型(callbackHandlers)で再定義するイベント系
|
|
35
|
+
| 'onfocus'
|
|
36
|
+
| 'onblur'
|
|
37
|
+
| 'onkeydown'
|
|
38
|
+
| 'onkeyup'
|
|
39
|
+
| 'onclick'
|
|
40
|
+
| 'onmousedown'
|
|
41
|
+
| 'onmouseup'
|
|
42
|
+
| 'onmouseenter'
|
|
43
|
+
| 'onmouseleave'
|
|
44
|
+
| 'onmouseover'
|
|
45
|
+
| 'onmouseout'
|
|
46
|
+
| 'oncontextmenu'
|
|
47
|
+
| 'onauxclick'
|
|
48
|
+
| 'ontouchstart'
|
|
49
|
+
| 'ontouchend'
|
|
50
|
+
| 'ontouchmove'
|
|
51
|
+
| 'ontouchcancel'
|
|
52
|
+
| 'onpointerdown'
|
|
53
|
+
| 'onpointerup'
|
|
54
|
+
| 'onpointerenter'
|
|
55
|
+
| 'onpointerleave'
|
|
56
|
+
| 'onpointermove'
|
|
57
|
+
| 'onpointercancel'
|
|
58
|
+
| 'onchange'
|
|
59
|
+
| 'oninput'
|
|
60
|
+
> & {
|
|
24
61
|
// 基本プロパティ
|
|
25
62
|
name?: string;
|
|
26
63
|
value: string | null | undefined;
|
|
@@ -112,9 +149,6 @@
|
|
|
112
149
|
// 入力イベント
|
|
113
150
|
onchange?: BivariantValueHandler<string>;
|
|
114
151
|
oninput?: BivariantValueHandler<string>;
|
|
115
|
-
|
|
116
|
-
// その他
|
|
117
|
-
[key: string]: any;
|
|
118
152
|
};
|
|
119
153
|
|
|
120
154
|
let {
|
|
@@ -2,7 +2,7 @@ import type { HTMLTextareaAttributes } from 'svelte/elements';
|
|
|
2
2
|
import type { IconVariant, IconWeight, IconGrade, IconOpticalSize } from '../types/icon';
|
|
3
3
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler, BivariantValueHandler } from '../types/callbackHandlers';
|
|
4
4
|
import type { FocusStyle } from '../types/propOptions';
|
|
5
|
-
export type TextareaProps = {
|
|
5
|
+
export type TextareaProps = Omit<HTMLTextareaAttributes, 'value' | 'id' | 'tabindex' | 'maxlength' | 'autocomplete' | 'wrap' | 'spellcheck' | 'autocapitalize' | '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'> & {
|
|
6
6
|
name?: string;
|
|
7
7
|
value: string | null | undefined;
|
|
8
8
|
placeholder?: string;
|
|
@@ -72,7 +72,6 @@ export type TextareaProps = {
|
|
|
72
72
|
onpointercancel?: PointerHandler;
|
|
73
73
|
onchange?: BivariantValueHandler<string>;
|
|
74
74
|
oninput?: BivariantValueHandler<string>;
|
|
75
|
-
[key: string]: any;
|
|
76
75
|
};
|
|
77
76
|
declare const Textarea: import("svelte").Component<TextareaProps, {
|
|
78
77
|
focus: () => void;
|