@14ch/svelte-ui 0.0.55 → 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/assets/styles/import.css +4 -4
- package/dist/assets/styles/variables.scss +4 -4
- 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/StepNav.svelte +29 -19
- package/dist/components/StepNav.svelte.d.ts +5 -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/dist/i18n/index.d.ts +12 -12
- package/dist/i18n/locales/de.d.ts +2 -2
- package/dist/i18n/locales/de.js +2 -2
- package/dist/i18n/locales/en.d.ts +2 -2
- package/dist/i18n/locales/en.js +2 -2
- package/dist/i18n/locales/es.d.ts +2 -2
- package/dist/i18n/locales/es.js +2 -2
- package/dist/i18n/locales/fr.d.ts +2 -2
- package/dist/i18n/locales/fr.js +2 -2
- package/dist/i18n/locales/ja.d.ts +2 -2
- package/dist/i18n/locales/ja.js +2 -2
- package/dist/i18n/locales/zh-cn.d.ts +2 -2
- package/dist/i18n/locales/zh-cn.js +2 -2
- package/package.json +1 -1
|
@@ -371,8 +371,8 @@
|
|
|
371
371
|
/* StepNav */
|
|
372
372
|
/* 強調色(現在/完了)。color prop 指定時は --internal-step-nav-accent が優先。 */
|
|
373
373
|
--svelte-ui-step-nav-accent-color: var(--svelte-ui-primary-color);
|
|
374
|
-
--svelte-ui-step-nav-
|
|
375
|
-
--svelte-ui-step-nav-
|
|
374
|
+
--svelte-ui-step-nav-done-color: var(--svelte-ui-step-nav-accent-color);
|
|
375
|
+
--svelte-ui-step-nav-in-progress-color: var(--svelte-ui-step-nav-accent-color);
|
|
376
376
|
/* マーカー */
|
|
377
377
|
--svelte-ui-step-nav-marker-size-sm: 24px;
|
|
378
378
|
--svelte-ui-step-nav-marker-size: 32px;
|
|
@@ -392,7 +392,7 @@
|
|
|
392
392
|
--svelte-ui-step-nav-label-line-height: 1.3;
|
|
393
393
|
/* コネクター(完了区間 / 未完了区間) */
|
|
394
394
|
--svelte-ui-step-nav-connector-color: var(--svelte-ui-border-color);
|
|
395
|
-
--svelte-ui-step-nav-connector-
|
|
395
|
+
--svelte-ui-step-nav-connector-done-color: var(--svelte-ui-step-nav-accent-color);
|
|
396
396
|
--svelte-ui-step-nav-connector-thickness: 2px;
|
|
397
397
|
/* 間隔 */
|
|
398
398
|
--svelte-ui-step-nav-marker-label-gap: 8px;
|
|
@@ -864,7 +864,7 @@
|
|
|
864
864
|
--svelte-ui-step-nav-description-color: CanvasText;
|
|
865
865
|
--svelte-ui-step-nav-error-color: CanvasText;
|
|
866
866
|
--svelte-ui-step-nav-connector-color: CanvasText;
|
|
867
|
-
--svelte-ui-step-nav-connector-
|
|
867
|
+
--svelte-ui-step-nav-connector-done-color: Highlight;
|
|
868
868
|
--svelte-ui-step-nav-ring-color: Highlight;
|
|
869
869
|
--svelte-ui-step-nav-focus-color: CanvasText;
|
|
870
870
|
/* Radio */
|
|
@@ -410,8 +410,8 @@
|
|
|
410
410
|
/* StepNav */
|
|
411
411
|
/* 強調色(現在/完了)。color prop 指定時は --internal-step-nav-accent が優先。 */
|
|
412
412
|
--svelte-ui-step-nav-accent-color: var(--svelte-ui-primary-color);
|
|
413
|
-
--svelte-ui-step-nav-
|
|
414
|
-
--svelte-ui-step-nav-
|
|
413
|
+
--svelte-ui-step-nav-done-color: var(--svelte-ui-step-nav-accent-color);
|
|
414
|
+
--svelte-ui-step-nav-in-progress-color: var(--svelte-ui-step-nav-accent-color);
|
|
415
415
|
/* マーカー */
|
|
416
416
|
--svelte-ui-step-nav-marker-size-sm: 24px;
|
|
417
417
|
--svelte-ui-step-nav-marker-size: 32px;
|
|
@@ -431,7 +431,7 @@
|
|
|
431
431
|
--svelte-ui-step-nav-label-line-height: 1.3;
|
|
432
432
|
/* コネクター(完了区間 / 未完了区間) */
|
|
433
433
|
--svelte-ui-step-nav-connector-color: var(--svelte-ui-border-color);
|
|
434
|
-
--svelte-ui-step-nav-connector-
|
|
434
|
+
--svelte-ui-step-nav-connector-done-color: var(--svelte-ui-step-nav-accent-color);
|
|
435
435
|
--svelte-ui-step-nav-connector-thickness: 2px;
|
|
436
436
|
/* 間隔 */
|
|
437
437
|
--svelte-ui-step-nav-marker-label-gap: 8px;
|
|
@@ -947,7 +947,7 @@
|
|
|
947
947
|
--svelte-ui-step-nav-description-color: CanvasText;
|
|
948
948
|
--svelte-ui-step-nav-error-color: CanvasText;
|
|
949
949
|
--svelte-ui-step-nav-connector-color: CanvasText;
|
|
950
|
-
--svelte-ui-step-nav-connector-
|
|
950
|
+
--svelte-ui-step-nav-connector-done-color: Highlight;
|
|
951
951
|
--svelte-ui-step-nav-ring-color: Highlight;
|
|
952
952
|
--svelte-ui-step-nav-focus-color: CanvasText;
|
|
953
953
|
|
|
@@ -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>;
|