@14ch/svelte-ui 0.0.21 → 0.0.23
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 +1 -4
- package/dist/components/Button.svelte.d.ts +0 -1
- package/dist/components/Checkbox.svelte +0 -5
- package/dist/components/Checkbox.svelte.d.ts +0 -2
- package/dist/components/ColorPicker.svelte +0 -6
- package/dist/components/ColorPicker.svelte.d.ts +0 -2
- package/dist/components/Combobox.svelte +0 -4
- package/dist/components/Combobox.svelte.d.ts +0 -2
- package/dist/components/Datepicker.svelte +0 -5
- package/dist/components/Datepicker.svelte.d.ts +0 -2
- package/dist/components/Fab.svelte +0 -3
- package/dist/components/Fab.svelte.d.ts +0 -1
- package/dist/components/IconButton.svelte +0 -3
- package/dist/components/IconButton.svelte.d.ts +0 -1
- package/dist/components/Input.svelte +1 -6
- package/dist/components/Input.svelte.d.ts +0 -2
- package/dist/components/Radio.svelte +0 -5
- package/dist/components/Radio.svelte.d.ts +0 -2
- package/dist/components/Select.svelte +0 -5
- package/dist/components/Select.svelte.d.ts +0 -2
- package/dist/components/Slider.svelte +0 -5
- package/dist/components/Slider.svelte.d.ts +0 -2
- package/dist/components/Switch.svelte +1 -6
- package/dist/components/Switch.svelte.d.ts +0 -2
- package/dist/components/Textarea.svelte +0 -4
- package/dist/components/Textarea.svelte.d.ts +0 -1
- package/package.json +1 -1
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
children: Snippet;
|
|
25
25
|
|
|
26
26
|
// HTML属性系
|
|
27
|
-
buttonAttributes?: HTMLButtonAttributes | undefined;
|
|
28
27
|
type?: HTMLButtonAttributes['type'];
|
|
29
28
|
tabindex?: number | null;
|
|
30
29
|
|
|
@@ -99,7 +98,6 @@
|
|
|
99
98
|
children,
|
|
100
99
|
|
|
101
100
|
// HTML属性系
|
|
102
|
-
buttonAttributes,
|
|
103
101
|
type = 'button',
|
|
104
102
|
tabindex = null,
|
|
105
103
|
|
|
@@ -361,7 +359,6 @@
|
|
|
361
359
|
aria-expanded={ariaExpanded}
|
|
362
360
|
aria-busy={loading ? 'true' : undefined}
|
|
363
361
|
data-testid="button"
|
|
364
|
-
{...buttonAttributes}
|
|
365
362
|
{...restProps}
|
|
366
363
|
>
|
|
367
364
|
{#if loading}
|
|
@@ -393,7 +390,7 @@
|
|
|
393
390
|
|
|
394
391
|
<style>
|
|
395
392
|
.button {
|
|
396
|
-
display: flex;
|
|
393
|
+
display: inline-flex;
|
|
397
394
|
justify-content: center;
|
|
398
395
|
align-items: center;
|
|
399
396
|
gap: 4px;
|
|
@@ -5,7 +5,6 @@ import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, Pointer
|
|
|
5
5
|
import type { ButtonVariant, ButtonSize } from '../types/propOptions';
|
|
6
6
|
export type ButtonProps = {
|
|
7
7
|
children: Snippet;
|
|
8
|
-
buttonAttributes?: HTMLButtonAttributes | undefined;
|
|
9
8
|
type?: HTMLButtonAttributes['type'];
|
|
10
9
|
tabindex?: number | null;
|
|
11
10
|
customStyle?: HTMLButtonAttributes['style'];
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
<script lang="ts">
|
|
4
4
|
import { type Snippet } from 'svelte';
|
|
5
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
6
5
|
import type {
|
|
7
6
|
FocusHandler,
|
|
8
7
|
KeyboardHandler,
|
|
@@ -25,8 +24,6 @@
|
|
|
25
24
|
|
|
26
25
|
// HTML属性系
|
|
27
26
|
id?: string;
|
|
28
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
29
|
-
|
|
30
27
|
// スタイル/レイアウト
|
|
31
28
|
size?: 'small' | 'medium' | 'large';
|
|
32
29
|
|
|
@@ -88,7 +85,6 @@
|
|
|
88
85
|
|
|
89
86
|
// HTML属性系
|
|
90
87
|
id = `checkbox-${Math.random().toString(36).substring(2, 15)}`,
|
|
91
|
-
inputAttributes,
|
|
92
88
|
|
|
93
89
|
// スタイル/レイアウト
|
|
94
90
|
size = 'medium',
|
|
@@ -321,7 +317,6 @@
|
|
|
321
317
|
onpointermove={handlePointerMove}
|
|
322
318
|
onpointercancel={handlePointerCancel}
|
|
323
319
|
onchange={handleChange}
|
|
324
|
-
{...inputAttributes}
|
|
325
320
|
{...restProps}
|
|
326
321
|
/>
|
|
327
322
|
<label for={id} class="checkbox__icon"></label>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type Snippet } from 'svelte';
|
|
2
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
3
2
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler } from '../types/callbackHandlers';
|
|
4
3
|
export type CheckboxProps = {
|
|
5
4
|
children?: Snippet;
|
|
@@ -7,7 +6,6 @@ export type CheckboxProps = {
|
|
|
7
6
|
value: boolean;
|
|
8
7
|
indeterminate?: boolean;
|
|
9
8
|
id?: string;
|
|
10
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
11
9
|
size?: 'small' | 'medium' | 'large';
|
|
12
10
|
disabled?: boolean;
|
|
13
11
|
required?: boolean;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import { untrack } from 'svelte';
|
|
5
5
|
import Input from './Input.svelte';
|
|
6
6
|
import { t } from '../i18n';
|
|
7
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
8
7
|
import type { IconVariant } from '../types/icon';
|
|
9
8
|
import type {
|
|
10
9
|
FocusHandler,
|
|
@@ -24,8 +23,6 @@
|
|
|
24
23
|
// HTML属性系
|
|
25
24
|
id?: string;
|
|
26
25
|
ariaLabel?: string;
|
|
27
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
28
|
-
|
|
29
26
|
// スタイル/レイアウト
|
|
30
27
|
customStyle?: string;
|
|
31
28
|
focusStyle?: 'background' | 'outline' | 'none';
|
|
@@ -90,7 +87,6 @@
|
|
|
90
87
|
// HTML属性系
|
|
91
88
|
id = `colorpicker-${Math.random().toString(36).substring(2, 15)}`,
|
|
92
89
|
ariaLabel,
|
|
93
|
-
inputAttributes,
|
|
94
90
|
|
|
95
91
|
// スタイル/レイアウト
|
|
96
92
|
customStyle = '',
|
|
@@ -367,7 +363,6 @@
|
|
|
367
363
|
{maxWidth}
|
|
368
364
|
{rounded}
|
|
369
365
|
customStyle={`padding-left: var(--svelte-ui-colorpicker-text-padding-left); ${customStyle}`}
|
|
370
|
-
{inputAttributes}
|
|
371
366
|
onchange={handleChange}
|
|
372
367
|
oninput={handleInput}
|
|
373
368
|
onfocus={handleFocus}
|
|
@@ -408,7 +403,6 @@
|
|
|
408
403
|
onkeydown={handleKeydown}
|
|
409
404
|
{disabled}
|
|
410
405
|
class="color-picker__trigger-input"
|
|
411
|
-
{...inputAttributes}
|
|
412
406
|
{...restProps}
|
|
413
407
|
/>
|
|
414
408
|
<div
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
2
1
|
import type { IconVariant } from '../types/icon';
|
|
3
2
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler } from '../types/callbackHandlers';
|
|
4
3
|
export type ColorPickerProps = {
|
|
5
4
|
value: string | null | undefined;
|
|
6
5
|
id?: string;
|
|
7
6
|
ariaLabel?: string;
|
|
8
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
9
7
|
customStyle?: string;
|
|
10
8
|
focusStyle?: 'background' | 'outline' | 'none';
|
|
11
9
|
fullWidth?: boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<!-- Combobox.svelte -->
|
|
2
2
|
|
|
3
3
|
<script lang="ts">
|
|
4
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
5
4
|
import Input from './Input.svelte';
|
|
6
5
|
import Popup from './Popup.svelte';
|
|
7
6
|
import { announceSelection } from '../utils/accessibility';
|
|
@@ -25,7 +24,6 @@
|
|
|
25
24
|
options: string[];
|
|
26
25
|
|
|
27
26
|
// HTML属性系
|
|
28
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
29
27
|
id?: string | null;
|
|
30
28
|
tabindex?: number | null;
|
|
31
29
|
maxlength?: number | null;
|
|
@@ -96,7 +94,6 @@
|
|
|
96
94
|
options = [] as string[],
|
|
97
95
|
|
|
98
96
|
// HTML属性系
|
|
99
|
-
inputAttributes,
|
|
100
97
|
id = `combobox-${Math.random().toString(36).substring(2, 15)}`,
|
|
101
98
|
tabindex = null,
|
|
102
99
|
maxlength = null,
|
|
@@ -473,7 +470,6 @@
|
|
|
473
470
|
onpointerleave={handlePointerLeave}
|
|
474
471
|
onpointermove={handlePointerMove}
|
|
475
472
|
onpointercancel={handlePointerCancel}
|
|
476
|
-
{inputAttributes}
|
|
477
473
|
{...restProps}
|
|
478
474
|
role="textbox"
|
|
479
475
|
aria-autocomplete="list"
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
2
1
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler, BivariantValueHandler } from '../types/callbackHandlers';
|
|
3
2
|
export type ComboboxProps = {
|
|
4
3
|
name?: string;
|
|
5
4
|
value: string | number | null | undefined;
|
|
6
5
|
options: string[];
|
|
7
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
8
6
|
id?: string | null;
|
|
9
7
|
tabindex?: number | null;
|
|
10
8
|
maxlength?: number | null;
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
import DatepickerCalendar from './DatepickerCalendar.svelte';
|
|
16
16
|
import { announceToScreenReader } from '../utils/accessibility';
|
|
17
17
|
import { getLocale } from '../config';
|
|
18
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
19
18
|
import type { IconVariant, IconWeight, IconGrade, IconOpticalSize } from '../types/icon';
|
|
20
19
|
import type {
|
|
21
20
|
BivariantValueHandler,
|
|
@@ -42,8 +41,6 @@
|
|
|
42
41
|
|
|
43
42
|
// HTML属性系
|
|
44
43
|
id?: string;
|
|
45
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
46
|
-
|
|
47
44
|
// スタイル/レイアウト
|
|
48
45
|
inline?: boolean;
|
|
49
46
|
focusStyle?: FocusStyle;
|
|
@@ -113,7 +110,6 @@
|
|
|
113
110
|
|
|
114
111
|
// HTML属性系
|
|
115
112
|
id = `datepicker-${Math.random().toString(36).substring(2, 15)}`,
|
|
116
|
-
inputAttributes,
|
|
117
113
|
|
|
118
114
|
// スタイル/レイアウト
|
|
119
115
|
inline = false,
|
|
@@ -655,7 +651,6 @@
|
|
|
655
651
|
onpointermove={handlePointerMove}
|
|
656
652
|
onpointercancel={handlePointerCancel}
|
|
657
653
|
{id}
|
|
658
|
-
{inputAttributes}
|
|
659
654
|
{...restProps}
|
|
660
655
|
/>
|
|
661
656
|
{#if !enableTextInput && !disabled && enableClickToOpen}
|
|
@@ -4,7 +4,6 @@ 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 { HTMLInputAttributes } from 'svelte/elements';
|
|
8
7
|
import type { IconVariant, IconWeight, IconGrade, IconOpticalSize } from '../types/icon';
|
|
9
8
|
import type { BivariantValueHandler, FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler } from '../types/callbackHandlers';
|
|
10
9
|
import type { DatepickerMode, FocusStyle } from '../types/propOptions';
|
|
@@ -18,7 +17,6 @@ export type DatepickerProps = {
|
|
|
18
17
|
locale?: 'en' | 'ja' | 'fr' | 'de' | 'es' | 'zh-cn';
|
|
19
18
|
rangeSeparator?: string;
|
|
20
19
|
id?: string;
|
|
21
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
22
20
|
inline?: boolean;
|
|
23
21
|
focusStyle?: FocusStyle;
|
|
24
22
|
fullWidth?: boolean;
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
// =========================================================================
|
|
22
22
|
export type FabProps = {
|
|
23
23
|
children?: Snippet;
|
|
24
|
-
buttonAttributes?: HTMLButtonAttributes | undefined;
|
|
25
24
|
type?: HTMLButtonAttributes['type'];
|
|
26
25
|
customStyle?: HTMLButtonAttributes['style'];
|
|
27
26
|
disabled?: boolean;
|
|
@@ -83,7 +82,6 @@
|
|
|
83
82
|
|
|
84
83
|
// HTML属性系
|
|
85
84
|
type = 'button',
|
|
86
|
-
buttonAttributes,
|
|
87
85
|
|
|
88
86
|
// スタイル/レイアウト
|
|
89
87
|
customStyle,
|
|
@@ -293,7 +291,6 @@
|
|
|
293
291
|
<button
|
|
294
292
|
{type}
|
|
295
293
|
disabled={disabled || loading}
|
|
296
|
-
{...buttonAttributes}
|
|
297
294
|
{...restProps}
|
|
298
295
|
class="fab"
|
|
299
296
|
class:fab--outlined={variant === 'outlined'}
|
|
@@ -5,7 +5,6 @@ import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, Pointer
|
|
|
5
5
|
import type { ButtonVariant, FabPosition } from '../types/propOptions';
|
|
6
6
|
export type FabProps = {
|
|
7
7
|
children?: Snippet;
|
|
8
|
-
buttonAttributes?: HTMLButtonAttributes | undefined;
|
|
9
8
|
type?: HTMLButtonAttributes['type'];
|
|
10
9
|
customStyle?: HTMLButtonAttributes['style'];
|
|
11
10
|
disabled?: boolean;
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
children: Snippet;
|
|
25
25
|
|
|
26
26
|
// HTML属性系
|
|
27
|
-
buttonAttributes?: HTMLButtonAttributes | undefined;
|
|
28
27
|
type?: 'button' | 'submit' | 'reset' | null | undefined;
|
|
29
28
|
tabindex?: number | null;
|
|
30
29
|
|
|
@@ -104,7 +103,6 @@
|
|
|
104
103
|
children,
|
|
105
104
|
|
|
106
105
|
// HTML属性系
|
|
107
|
-
buttonAttributes,
|
|
108
106
|
type = 'button',
|
|
109
107
|
tabindex = null,
|
|
110
108
|
|
|
@@ -373,7 +371,6 @@
|
|
|
373
371
|
aria-pressed={ariaPressed !== undefined ? ariaPressed : pressed ? 'true' : undefined}
|
|
374
372
|
aria-busy={loading ? 'true' : undefined}
|
|
375
373
|
data-testid="icon-button"
|
|
376
|
-
{...buttonAttributes}
|
|
377
374
|
{...restProps}
|
|
378
375
|
>
|
|
379
376
|
{#if loading}
|
|
@@ -5,7 +5,6 @@ import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, Pointer
|
|
|
5
5
|
import type { ButtonVariant, BadgeVariant } from '../types/propOptions';
|
|
6
6
|
export type IconButtonProps = {
|
|
7
7
|
children: Snippet;
|
|
8
|
-
buttonAttributes?: HTMLButtonAttributes | undefined;
|
|
9
8
|
type?: 'button' | 'submit' | 'reset' | null | undefined;
|
|
10
9
|
tabindex?: number | null;
|
|
11
10
|
customStyle?: HTMLButtonAttributes['style'];
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import IconButton from './IconButton.svelte';
|
|
5
5
|
import Icon from './Icon.svelte';
|
|
6
6
|
import { getStyleFromNumber } from '../utils/style';
|
|
7
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
8
7
|
import type { IconVariant, IconWeight, IconGrade, IconOpticalSize } from '../types/icon';
|
|
9
8
|
import { t } from '../i18n';
|
|
10
9
|
import { convertToHtml, convertToHtmlWithLink } from '../utils/formatText';
|
|
@@ -39,8 +38,6 @@
|
|
|
39
38
|
enableThousandsSeparator?: boolean;
|
|
40
39
|
autocomplete?: HTMLInputElement['autocomplete'] | null;
|
|
41
40
|
spellcheck?: boolean | null;
|
|
42
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
43
|
-
|
|
44
41
|
// スタイル/レイアウト
|
|
45
42
|
inline?: boolean;
|
|
46
43
|
focusStyle?: FocusStyle;
|
|
@@ -149,7 +146,6 @@
|
|
|
149
146
|
enableThousandsSeparator = false,
|
|
150
147
|
autocomplete = null,
|
|
151
148
|
spellcheck = null,
|
|
152
|
-
inputAttributes,
|
|
153
149
|
|
|
154
150
|
// スタイル/レイアウト
|
|
155
151
|
inline = false,
|
|
@@ -657,7 +653,7 @@
|
|
|
657
653
|
<div
|
|
658
654
|
class="input
|
|
659
655
|
input--focus-{focusStyle}
|
|
660
|
-
input--type-{
|
|
656
|
+
input--type-{type}"
|
|
661
657
|
class:input--inline={inline}
|
|
662
658
|
class:input--linkify={isLinkifyActive}
|
|
663
659
|
class:input--auto-resize={inline}
|
|
@@ -738,7 +734,6 @@
|
|
|
738
734
|
onpointercancel={handlePointerCancel}
|
|
739
735
|
oncompositionstart={handleCompositionStart}
|
|
740
736
|
oncompositionend={handleCompositionEnd}
|
|
741
|
-
{...inputAttributes}
|
|
742
737
|
{...restProps}
|
|
743
738
|
/>
|
|
744
739
|
</div>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
2
1
|
import type { IconVariant, IconWeight, IconGrade, IconOpticalSize } from '../types/icon';
|
|
3
2
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler, BivariantValueHandler } from '../types/callbackHandlers';
|
|
4
3
|
import type { FocusStyle } from '../types/propOptions';
|
|
@@ -17,7 +16,6 @@ export type InputProps = {
|
|
|
17
16
|
enableThousandsSeparator?: boolean;
|
|
18
17
|
autocomplete?: HTMLInputElement['autocomplete'] | null;
|
|
19
18
|
spellcheck?: boolean | null;
|
|
20
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
21
19
|
inline?: boolean;
|
|
22
20
|
focusStyle?: FocusStyle;
|
|
23
21
|
placeholder?: string;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
<script lang="ts">
|
|
4
4
|
import { type Snippet } from 'svelte';
|
|
5
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
6
5
|
import type {
|
|
7
6
|
FocusHandler,
|
|
8
7
|
KeyboardHandler,
|
|
@@ -27,8 +26,6 @@
|
|
|
27
26
|
|
|
28
27
|
// HTML属性系
|
|
29
28
|
id?: string;
|
|
30
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
31
|
-
|
|
32
29
|
// スタイル/レイアウト
|
|
33
30
|
size?: 'small' | 'medium' | 'large';
|
|
34
31
|
|
|
@@ -90,7 +87,6 @@
|
|
|
90
87
|
|
|
91
88
|
// HTML属性系
|
|
92
89
|
id = `radio-${Math.random().toString(36).substring(2, 15)}`,
|
|
93
|
-
inputAttributes,
|
|
94
90
|
|
|
95
91
|
// スタイル/レイアウト
|
|
96
92
|
size = 'medium',
|
|
@@ -347,7 +343,6 @@
|
|
|
347
343
|
onpointermove={handlePointerMove}
|
|
348
344
|
onpointercancel={handlePointerCancel}
|
|
349
345
|
onchange={handleChange}
|
|
350
|
-
{...inputAttributes}
|
|
351
346
|
{...restProps}
|
|
352
347
|
/>
|
|
353
348
|
<label for={id} class="radio__icon"></label>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type Snippet } from 'svelte';
|
|
2
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
3
2
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler, BivariantValueHandler } from '../types/callbackHandlers';
|
|
4
3
|
import type { OptionValue } from '../types/options';
|
|
5
4
|
export type RadioProps = {
|
|
@@ -8,7 +7,6 @@ export type RadioProps = {
|
|
|
8
7
|
value: OptionValue;
|
|
9
8
|
currentValue: OptionValue;
|
|
10
9
|
id?: string;
|
|
11
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
12
10
|
size?: 'small' | 'medium' | 'large';
|
|
13
11
|
disabled?: boolean;
|
|
14
12
|
required?: boolean;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
<script lang="ts">
|
|
4
4
|
import Icon from './Icon.svelte';
|
|
5
5
|
import { t } from '../i18n';
|
|
6
|
-
import type { HTMLSelectAttributes } from 'svelte/elements';
|
|
7
6
|
import type {
|
|
8
7
|
FocusHandler,
|
|
9
8
|
KeyboardHandler,
|
|
@@ -28,8 +27,6 @@
|
|
|
28
27
|
ariaLabel?: string;
|
|
29
28
|
tabindex?: number | null;
|
|
30
29
|
placeholder?: string;
|
|
31
|
-
selectAttributes?: HTMLSelectAttributes | undefined;
|
|
32
|
-
|
|
33
30
|
// スタイル/レイアウト
|
|
34
31
|
size?: number | null;
|
|
35
32
|
inline?: boolean;
|
|
@@ -93,7 +90,6 @@
|
|
|
93
90
|
ariaLabel,
|
|
94
91
|
tabindex = null,
|
|
95
92
|
placeholder = '',
|
|
96
|
-
selectAttributes,
|
|
97
93
|
|
|
98
94
|
// スタイル/レイアウト
|
|
99
95
|
size = null,
|
|
@@ -328,7 +324,6 @@ select--focus-{focusStyle}"
|
|
|
328
324
|
onpointermove={handlePointerMove}
|
|
329
325
|
onpointercancel={handlePointerCancel}
|
|
330
326
|
onchange={handleChange}
|
|
331
|
-
{...selectAttributes}
|
|
332
327
|
{...restProps}
|
|
333
328
|
>
|
|
334
329
|
<!-- プレースホルダーオプション -->
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HTMLSelectAttributes } from 'svelte/elements';
|
|
2
1
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler, BivariantValueHandler } from '../types/callbackHandlers';
|
|
3
2
|
import type { Option } from '../types/options';
|
|
4
3
|
export type SelectProps = {
|
|
@@ -9,7 +8,6 @@ export type SelectProps = {
|
|
|
9
8
|
ariaLabel?: string;
|
|
10
9
|
tabindex?: number | null;
|
|
11
10
|
placeholder?: string;
|
|
12
|
-
selectAttributes?: HTMLSelectAttributes | undefined;
|
|
13
11
|
size?: number | null;
|
|
14
12
|
inline?: boolean;
|
|
15
13
|
focusStyle?: 'background' | 'outline' | 'none';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<!-- Slider.svelte -->
|
|
2
2
|
|
|
3
3
|
<script lang="ts">
|
|
4
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
5
4
|
import { getStyleFromNumber } from '../utils/style';
|
|
6
5
|
import { t } from '../i18n';
|
|
7
6
|
import type {
|
|
@@ -26,8 +25,6 @@
|
|
|
26
25
|
min?: number;
|
|
27
26
|
max?: number;
|
|
28
27
|
step?: number;
|
|
29
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
30
|
-
|
|
31
28
|
// スタイル/レイアウト
|
|
32
29
|
width?: string | number | null;
|
|
33
30
|
fullWidth?: boolean;
|
|
@@ -91,7 +88,6 @@
|
|
|
91
88
|
min = 0,
|
|
92
89
|
max = 100,
|
|
93
90
|
step = 1,
|
|
94
|
-
inputAttributes,
|
|
95
91
|
|
|
96
92
|
// スタイル/レイアウト
|
|
97
93
|
width = null,
|
|
@@ -350,7 +346,6 @@
|
|
|
350
346
|
onpointerleave={handlePointerLeave}
|
|
351
347
|
onpointermove={handlePointerMove}
|
|
352
348
|
onpointercancel={handlePointerCancel}
|
|
353
|
-
{...inputAttributes}
|
|
354
349
|
{...restProps}
|
|
355
350
|
/>
|
|
356
351
|
</div>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
2
1
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler } from '../types/callbackHandlers';
|
|
3
2
|
export type SliderProps = {
|
|
4
3
|
value: number;
|
|
@@ -8,7 +7,6 @@ export type SliderProps = {
|
|
|
8
7
|
min?: number;
|
|
9
8
|
max?: number;
|
|
10
9
|
step?: number;
|
|
11
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
12
10
|
width?: string | number | null;
|
|
13
11
|
fullWidth?: boolean;
|
|
14
12
|
thumbColor?: string | null;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
<script lang="ts">
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
6
5
|
import type {
|
|
7
6
|
FocusHandler,
|
|
8
7
|
KeyboardHandler,
|
|
@@ -23,8 +22,6 @@
|
|
|
23
22
|
|
|
24
23
|
// HTML属性系
|
|
25
24
|
id?: string;
|
|
26
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
27
|
-
|
|
28
25
|
// スタイル/レイアウト
|
|
29
26
|
size?: 'small' | 'medium' | 'large';
|
|
30
27
|
|
|
@@ -84,7 +81,6 @@
|
|
|
84
81
|
|
|
85
82
|
// HTML属性系
|
|
86
83
|
id = `switch-${Math.random().toString(36).substring(2, 15)}`,
|
|
87
|
-
inputAttributes,
|
|
88
84
|
|
|
89
85
|
// スタイル/レイアウト
|
|
90
86
|
size = 'medium',
|
|
@@ -290,7 +286,6 @@
|
|
|
290
286
|
{disabled}
|
|
291
287
|
{required}
|
|
292
288
|
{id}
|
|
293
|
-
{...inputAttributes}
|
|
294
289
|
onchange={handleChange}
|
|
295
290
|
onfocus={handleFocus}
|
|
296
291
|
onblur={handleBlur}
|
|
@@ -334,7 +329,7 @@
|
|
|
334
329
|
* Base Styles
|
|
335
330
|
* ============================================= */
|
|
336
331
|
.switch {
|
|
337
|
-
display: flex;
|
|
332
|
+
display: inline-flex;
|
|
338
333
|
align-items: center;
|
|
339
334
|
width: fit-content;
|
|
340
335
|
contain: layout;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
3
2
|
import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler } from '../types/callbackHandlers';
|
|
4
3
|
export type SwitchProps = {
|
|
5
4
|
children?: Snippet;
|
|
6
5
|
value: boolean;
|
|
7
6
|
id?: string;
|
|
8
|
-
inputAttributes?: HTMLInputAttributes | undefined;
|
|
9
7
|
size?: 'small' | 'medium' | 'large';
|
|
10
8
|
disabled?: boolean;
|
|
11
9
|
required?: boolean;
|
|
@@ -33,8 +33,6 @@
|
|
|
33
33
|
wrap?: 'soft' | 'hard' | null;
|
|
34
34
|
spellcheck?: boolean | null;
|
|
35
35
|
autocapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters' | null;
|
|
36
|
-
textareaAttributes?: HTMLTextareaAttributes | undefined;
|
|
37
|
-
|
|
38
36
|
// スタイル/レイアウト
|
|
39
37
|
rows?: number;
|
|
40
38
|
minHeight?: string | number | null;
|
|
@@ -119,7 +117,6 @@
|
|
|
119
117
|
wrap = null,
|
|
120
118
|
spellcheck = null,
|
|
121
119
|
autocapitalize = null,
|
|
122
|
-
textareaAttributes,
|
|
123
120
|
|
|
124
121
|
// スタイル/レイアウト
|
|
125
122
|
rows = 3,
|
|
@@ -583,7 +580,6 @@
|
|
|
583
580
|
onpointermove={handlePointerMove}
|
|
584
581
|
onpointercancel={handlePointerCancel}
|
|
585
582
|
onscroll={handleScroll}
|
|
586
|
-
{...textareaAttributes}
|
|
587
583
|
{...restProps}
|
|
588
584
|
></textarea>
|
|
589
585
|
</div>
|
|
@@ -13,7 +13,6 @@ export type TextareaProps = {
|
|
|
13
13
|
wrap?: 'soft' | 'hard' | null;
|
|
14
14
|
spellcheck?: boolean | null;
|
|
15
15
|
autocapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters' | null;
|
|
16
|
-
textareaAttributes?: HTMLTextareaAttributes | undefined;
|
|
17
16
|
rows?: number;
|
|
18
17
|
minHeight?: string | number | null;
|
|
19
18
|
maxHeight?: string | number | null;
|