@14ch/svelte-ui 0.0.56 → 0.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/styles/import.css +23 -22
- package/dist/assets/styles/variables.scss +23 -22
- package/dist/components/Button.svelte +30 -4
- package/dist/components/Button.svelte.d.ts +3 -2
- package/dist/components/Checkbox.svelte +32 -4
- package/dist/components/Checkbox.svelte.d.ts +2 -2
- package/dist/components/ColorPicker.svelte +41 -4
- package/dist/components/ColorPicker.svelte.d.ts +2 -2
- package/dist/components/Combobox.svelte +31 -4
- package/dist/components/Combobox.svelte.d.ts +2 -2
- package/dist/components/Datepicker.svelte +31 -4
- package/dist/components/Datepicker.svelte.d.ts +2 -2
- package/dist/components/DatepickerCalendar.svelte +3 -3
- package/dist/components/Fab.svelte +28 -2
- package/dist/components/Fab.svelte.d.ts +1 -2
- package/dist/components/Icon.svelte +2 -4
- package/dist/components/Icon.svelte.d.ts +2 -2
- package/dist/components/IconButton.svelte +28 -4
- package/dist/components/IconButton.svelte.d.ts +1 -2
- package/dist/components/Input.svelte +43 -4
- package/dist/components/Input.svelte.d.ts +3 -2
- package/dist/components/MultiSelect.svelte +1 -1
- package/dist/components/PopupMenu.svelte +2 -2
- package/dist/components/Radio.svelte +32 -4
- package/dist/components/Radio.svelte.d.ts +2 -2
- package/dist/components/SegmentedControl.svelte +29 -4
- package/dist/components/SegmentedControl.svelte.d.ts +2 -2
- package/dist/components/Select.svelte +35 -5
- package/dist/components/Select.svelte.d.ts +2 -2
- package/dist/components/Slider.svelte +31 -4
- package/dist/components/Slider.svelte.d.ts +2 -2
- package/dist/components/SnackbarItem.svelte +1 -1
- package/dist/components/Switch.svelte +32 -4
- package/dist/components/Switch.svelte.d.ts +2 -2
- package/dist/components/Textarea.svelte +38 -4
- package/dist/components/Textarea.svelte.d.ts +1 -2
- package/package.json +1 -1
|
@@ -139,11 +139,11 @@
|
|
|
139
139
|
* ==================================== */
|
|
140
140
|
/* 基本テキスト色の定義 */
|
|
141
141
|
--svelte-ui-text-color: var(--base-800-transparent);
|
|
142
|
-
--svelte-ui-text-subtle-color: var(--base-
|
|
142
|
+
--svelte-ui-text-subtle-color: var(--base-500-transparent);
|
|
143
143
|
--svelte-ui-text-on-filled-color: #ffffff;
|
|
144
144
|
--svelte-ui-text-inverse-color: var(--white-800-transparent);
|
|
145
|
-
--svelte-ui-text-inverse-subtle-color: var(--white-
|
|
146
|
-
--svelte-ui-text-placeholder-color: var(--base-
|
|
145
|
+
--svelte-ui-text-inverse-subtle-color: var(--white-500-transparent);
|
|
146
|
+
--svelte-ui-text-placeholder-color: var(--base-500-transparent);
|
|
147
147
|
/* ボーダーカラー */
|
|
148
148
|
--svelte-ui-border-color: var(--base-200-transparent);
|
|
149
149
|
--svelte-ui-border-weak-color: var(--base-100-transparent);
|
|
@@ -179,11 +179,11 @@
|
|
|
179
179
|
[data-theme=dark] {
|
|
180
180
|
/* 基本テキスト色の定義 */
|
|
181
181
|
--svelte-ui-text-color: var(--white-800-transparent);
|
|
182
|
-
--svelte-ui-text-subtle-color: var(--white-
|
|
182
|
+
--svelte-ui-text-subtle-color: var(--white-500-transparent);
|
|
183
183
|
--svelte-ui-text-on-filled-color: #ffffff;
|
|
184
184
|
--svelte-ui-text-inverse-color: var(--base-800-transparent);
|
|
185
|
-
--svelte-ui-text-inverse-subtle-color: var(--base-
|
|
186
|
-
--svelte-ui-text-placeholder-color: var(--white-
|
|
185
|
+
--svelte-ui-text-inverse-subtle-color: var(--base-500-transparent);
|
|
186
|
+
--svelte-ui-text-placeholder-color: var(--white-500-transparent);
|
|
187
187
|
/* ボーダーカラー */
|
|
188
188
|
--svelte-ui-border-color: var(--white-400-transparent);
|
|
189
189
|
--svelte-ui-border-weak-color: var(--white-200-transparent);
|
|
@@ -226,8 +226,9 @@
|
|
|
226
226
|
--svelte-ui-font-size-xs: 0.75rem;
|
|
227
227
|
--svelte-ui-font-size-sm: 0.875rem;
|
|
228
228
|
--svelte-ui-font-size: 1rem;
|
|
229
|
-
--svelte-ui-font-size-lg: 1.
|
|
230
|
-
--svelte-ui-font-size-xl: 1.
|
|
229
|
+
--svelte-ui-font-size-lg: 1.25rem;
|
|
230
|
+
--svelte-ui-font-size-xl: 1.5rem;
|
|
231
|
+
--svelte-ui-font-size-xxl: 2rem;
|
|
231
232
|
/* Mobile Touch Size */
|
|
232
233
|
--svelte-ui-touch-target-sm: 36px;
|
|
233
234
|
--svelte-ui-touch-target: 44px;
|
|
@@ -263,9 +264,9 @@
|
|
|
263
264
|
--svelte-ui-button-padding-sm: 6px 8px;
|
|
264
265
|
--svelte-ui-button-padding: 8px 12px;
|
|
265
266
|
--svelte-ui-button-padding-lg: 12px 16px;
|
|
266
|
-
--svelte-ui-button-font-size-sm:
|
|
267
|
+
--svelte-ui-button-font-size-sm: var(--svelte-ui-font-size-sm);
|
|
267
268
|
--svelte-ui-button-font-size: inherit;
|
|
268
|
-
--svelte-ui-button-font-size-lg:
|
|
269
|
+
--svelte-ui-button-font-size-lg: var(--svelte-ui-font-size);
|
|
269
270
|
--svelte-ui-button-line-height: 1.2em;
|
|
270
271
|
--svelte-ui-button-border-radius: var(--svelte-ui-border-radius);
|
|
271
272
|
--svelte-ui-button-border-radius-rounded: var(--svelte-ui-border-radius-rounded);
|
|
@@ -313,9 +314,9 @@
|
|
|
313
314
|
--svelte-ui-segmented-control-button-height-sm: 24px;
|
|
314
315
|
--svelte-ui-segmented-control-button-height: 32px;
|
|
315
316
|
--svelte-ui-segmented-control-button-height-lg: 40px;
|
|
316
|
-
--svelte-ui-segmented-control-font-size-sm:
|
|
317
|
-
--svelte-ui-segmented-control-font-size:
|
|
318
|
-
--svelte-ui-segmented-control-font-size-lg:
|
|
317
|
+
--svelte-ui-segmented-control-font-size-sm: var(--svelte-ui-font-size-sm);
|
|
318
|
+
--svelte-ui-segmented-control-font-size: var(--svelte-ui-font-size);
|
|
319
|
+
--svelte-ui-segmented-control-font-size-lg: var(--svelte-ui-font-size-lg);
|
|
319
320
|
--svelte-ui-segmented-control-button-padding-sm: 4px 8px;
|
|
320
321
|
--svelte-ui-segmented-control-button-padding: 6px 12px;
|
|
321
322
|
--svelte-ui-segmented-control-button-padding-lg: 8px 16px;
|
|
@@ -354,7 +355,7 @@
|
|
|
354
355
|
--svelte-ui-nav-mobile-min-height: 56px;
|
|
355
356
|
--svelte-ui-nav-mobile-item-padding: 8px;
|
|
356
357
|
--svelte-ui-nav-mobile-item-icon-gap: 8px;
|
|
357
|
-
--svelte-ui-nav-mobile-item-font-size:
|
|
358
|
+
--svelte-ui-nav-mobile-item-font-size: var(--svelte-ui-font-size-xs);
|
|
358
359
|
/* Nav: vertical */
|
|
359
360
|
--svelte-ui-nav-vertical-item-gap: 8px;
|
|
360
361
|
/* Nav: horizontal */
|
|
@@ -385,9 +386,9 @@
|
|
|
385
386
|
/* ラベル・説明 */
|
|
386
387
|
--svelte-ui-step-nav-label-color: var(--svelte-ui-text-color);
|
|
387
388
|
--svelte-ui-step-nav-description-color: var(--svelte-ui-text-subtle-color);
|
|
388
|
-
--svelte-ui-step-nav-font-size-sm:
|
|
389
|
-
--svelte-ui-step-nav-font-size:
|
|
390
|
-
--svelte-ui-step-nav-font-size-lg:
|
|
389
|
+
--svelte-ui-step-nav-font-size-sm: var(--svelte-ui-font-size-xs);
|
|
390
|
+
--svelte-ui-step-nav-font-size: var(--svelte-ui-font-size-sm);
|
|
391
|
+
--svelte-ui-step-nav-font-size-lg: var(--svelte-ui-font-size);
|
|
391
392
|
--svelte-ui-step-nav-description-font-size: var(--svelte-ui-font-size-sm);
|
|
392
393
|
--svelte-ui-step-nav-label-line-height: 1.3;
|
|
393
394
|
/* コネクター(完了区間 / 未完了区間) */
|
|
@@ -635,8 +636,8 @@
|
|
|
635
636
|
--svelte-ui-dialog-padding: 16px 24px;
|
|
636
637
|
--svelte-ui-dialog-body-padding: 24px;
|
|
637
638
|
--svelte-ui-dialog-header-height: 56px;
|
|
638
|
-
--svelte-ui-dialog-title-font-size:
|
|
639
|
-
--svelte-ui-dialog-description-font-size:
|
|
639
|
+
--svelte-ui-dialog-title-font-size: var(--svelte-ui-font-size-xl);
|
|
640
|
+
--svelte-ui-dialog-description-font-size: var(--svelte-ui-font-size-sm);
|
|
640
641
|
--svelte-ui-dialog-description-padding: 0.5rem 1rem;
|
|
641
642
|
--svelte-ui-dialog-footer-padding: 8px;
|
|
642
643
|
--svelte-ui-dialog-border: solid 1px var(--svelte-ui-border-weak-color);
|
|
@@ -649,8 +650,8 @@
|
|
|
649
650
|
--svelte-ui-drawer-header-padding: 16px 24px;
|
|
650
651
|
--svelte-ui-drawer-body-padding: 24px;
|
|
651
652
|
--svelte-ui-drawer-header-height: 56px;
|
|
652
|
-
--svelte-ui-drawer-title-font-size:
|
|
653
|
-
--svelte-ui-drawer-description-font-size:
|
|
653
|
+
--svelte-ui-drawer-title-font-size: var(--svelte-ui-font-size-xl);
|
|
654
|
+
--svelte-ui-drawer-description-font-size: var(--svelte-ui-font-size-sm);
|
|
654
655
|
--svelte-ui-drawer-description-padding: 0.5rem 1rem;
|
|
655
656
|
--svelte-ui-drawer-footer-padding: 8px;
|
|
656
657
|
--svelte-ui-drawer-border: 1px solid var(--svelte-ui-border-weak-color);
|
|
@@ -762,7 +763,7 @@
|
|
|
762
763
|
--svelte-ui-skeleton-media-gap: 16px;
|
|
763
764
|
--svelte-ui-skeleton-media-vertical-gap: 8px;
|
|
764
765
|
--svelte-ui-skeleton-heading-width: 50%;
|
|
765
|
-
--svelte-ui-skeleton-heading-font-size:
|
|
766
|
+
--svelte-ui-skeleton-heading-font-size: var(--svelte-ui-font-size-xxl);
|
|
766
767
|
--svelte-ui-skeleton-pattern-gap: 16px;
|
|
767
768
|
--svelte-ui-skeleton-repeat-gap: 24px;
|
|
768
769
|
/* Badge */
|
|
@@ -141,11 +141,11 @@
|
|
|
141
141
|
|
|
142
142
|
/* 基本テキスト色の定義 */
|
|
143
143
|
--svelte-ui-text-color: var(--base-800-transparent);
|
|
144
|
-
--svelte-ui-text-subtle-color: var(--base-
|
|
144
|
+
--svelte-ui-text-subtle-color: var(--base-500-transparent);
|
|
145
145
|
--svelte-ui-text-on-filled-color: #ffffff;
|
|
146
146
|
--svelte-ui-text-inverse-color: var(--white-800-transparent);
|
|
147
|
-
--svelte-ui-text-inverse-subtle-color: var(--white-
|
|
148
|
-
--svelte-ui-text-placeholder-color: var(--base-
|
|
147
|
+
--svelte-ui-text-inverse-subtle-color: var(--white-500-transparent);
|
|
148
|
+
--svelte-ui-text-placeholder-color: var(--base-500-transparent);
|
|
149
149
|
|
|
150
150
|
/* ボーダーカラー */
|
|
151
151
|
--svelte-ui-border-color: var(--base-200-transparent);
|
|
@@ -193,11 +193,11 @@
|
|
|
193
193
|
[data-theme='dark'] {
|
|
194
194
|
/* 基本テキスト色の定義 */
|
|
195
195
|
--svelte-ui-text-color: var(--white-800-transparent);
|
|
196
|
-
--svelte-ui-text-subtle-color: var(--white-
|
|
196
|
+
--svelte-ui-text-subtle-color: var(--white-500-transparent);
|
|
197
197
|
--svelte-ui-text-on-filled-color: #ffffff;
|
|
198
198
|
--svelte-ui-text-inverse-color: var(--base-800-transparent);
|
|
199
|
-
--svelte-ui-text-inverse-subtle-color: var(--base-
|
|
200
|
-
--svelte-ui-text-placeholder-color: var(--white-
|
|
199
|
+
--svelte-ui-text-inverse-subtle-color: var(--base-500-transparent);
|
|
200
|
+
--svelte-ui-text-placeholder-color: var(--white-500-transparent);
|
|
201
201
|
|
|
202
202
|
/* ボーダーカラー */
|
|
203
203
|
--svelte-ui-border-color: var(--white-400-transparent);
|
|
@@ -253,8 +253,9 @@
|
|
|
253
253
|
--svelte-ui-font-size-xs: 0.75rem;
|
|
254
254
|
--svelte-ui-font-size-sm: 0.875rem;
|
|
255
255
|
--svelte-ui-font-size: 1rem;
|
|
256
|
-
--svelte-ui-font-size-lg: 1.
|
|
257
|
-
--svelte-ui-font-size-xl: 1.
|
|
256
|
+
--svelte-ui-font-size-lg: 1.25rem;
|
|
257
|
+
--svelte-ui-font-size-xl: 1.5rem;
|
|
258
|
+
--svelte-ui-font-size-xxl: 2rem;
|
|
258
259
|
|
|
259
260
|
/* Mobile Touch Size */
|
|
260
261
|
--svelte-ui-touch-target-sm: 36px;
|
|
@@ -296,9 +297,9 @@
|
|
|
296
297
|
--svelte-ui-button-padding-sm: 6px 8px;
|
|
297
298
|
--svelte-ui-button-padding: 8px 12px;
|
|
298
299
|
--svelte-ui-button-padding-lg: 12px 16px;
|
|
299
|
-
--svelte-ui-button-font-size-sm:
|
|
300
|
+
--svelte-ui-button-font-size-sm: var(--svelte-ui-font-size-sm);
|
|
300
301
|
--svelte-ui-button-font-size: inherit;
|
|
301
|
-
--svelte-ui-button-font-size-lg:
|
|
302
|
+
--svelte-ui-button-font-size-lg: var(--svelte-ui-font-size);
|
|
302
303
|
--svelte-ui-button-line-height: 1.2em;
|
|
303
304
|
--svelte-ui-button-border-radius: var(--svelte-ui-border-radius);
|
|
304
305
|
--svelte-ui-button-border-radius-rounded: var(--svelte-ui-border-radius-rounded);
|
|
@@ -349,9 +350,9 @@
|
|
|
349
350
|
--svelte-ui-segmented-control-button-height-sm: 24px;
|
|
350
351
|
--svelte-ui-segmented-control-button-height: 32px;
|
|
351
352
|
--svelte-ui-segmented-control-button-height-lg: 40px;
|
|
352
|
-
--svelte-ui-segmented-control-font-size-sm:
|
|
353
|
-
--svelte-ui-segmented-control-font-size:
|
|
354
|
-
--svelte-ui-segmented-control-font-size-lg:
|
|
353
|
+
--svelte-ui-segmented-control-font-size-sm: var(--svelte-ui-font-size-sm);
|
|
354
|
+
--svelte-ui-segmented-control-font-size: var(--svelte-ui-font-size);
|
|
355
|
+
--svelte-ui-segmented-control-font-size-lg: var(--svelte-ui-font-size-lg);
|
|
355
356
|
--svelte-ui-segmented-control-button-padding-sm: 4px 8px;
|
|
356
357
|
--svelte-ui-segmented-control-button-padding: 6px 12px;
|
|
357
358
|
--svelte-ui-segmented-control-button-padding-lg: 8px 16px;
|
|
@@ -392,7 +393,7 @@
|
|
|
392
393
|
--svelte-ui-nav-mobile-min-height: 56px;
|
|
393
394
|
--svelte-ui-nav-mobile-item-padding: 8px;
|
|
394
395
|
--svelte-ui-nav-mobile-item-icon-gap: 8px;
|
|
395
|
-
--svelte-ui-nav-mobile-item-font-size:
|
|
396
|
+
--svelte-ui-nav-mobile-item-font-size: var(--svelte-ui-font-size-xs);
|
|
396
397
|
/* Nav: vertical */
|
|
397
398
|
--svelte-ui-nav-vertical-item-gap: 8px;
|
|
398
399
|
/* Nav: horizontal */
|
|
@@ -424,9 +425,9 @@
|
|
|
424
425
|
/* ラベル・説明 */
|
|
425
426
|
--svelte-ui-step-nav-label-color: var(--svelte-ui-text-color);
|
|
426
427
|
--svelte-ui-step-nav-description-color: var(--svelte-ui-text-subtle-color);
|
|
427
|
-
--svelte-ui-step-nav-font-size-sm:
|
|
428
|
-
--svelte-ui-step-nav-font-size:
|
|
429
|
-
--svelte-ui-step-nav-font-size-lg:
|
|
428
|
+
--svelte-ui-step-nav-font-size-sm: var(--svelte-ui-font-size-xs);
|
|
429
|
+
--svelte-ui-step-nav-font-size: var(--svelte-ui-font-size-sm);
|
|
430
|
+
--svelte-ui-step-nav-font-size-lg: var(--svelte-ui-font-size);
|
|
430
431
|
--svelte-ui-step-nav-description-font-size: var(--svelte-ui-font-size-sm);
|
|
431
432
|
--svelte-ui-step-nav-label-line-height: 1.3;
|
|
432
433
|
/* コネクター(完了区間 / 未完了区間) */
|
|
@@ -692,8 +693,8 @@
|
|
|
692
693
|
--svelte-ui-dialog-padding: 16px 24px;
|
|
693
694
|
--svelte-ui-dialog-body-padding: 24px;
|
|
694
695
|
--svelte-ui-dialog-header-height: 56px;
|
|
695
|
-
--svelte-ui-dialog-title-font-size:
|
|
696
|
-
--svelte-ui-dialog-description-font-size:
|
|
696
|
+
--svelte-ui-dialog-title-font-size: var(--svelte-ui-font-size-xl);
|
|
697
|
+
--svelte-ui-dialog-description-font-size: var(--svelte-ui-font-size-sm);
|
|
697
698
|
--svelte-ui-dialog-description-padding: 0.5rem 1rem;
|
|
698
699
|
--svelte-ui-dialog-footer-padding: 8px;
|
|
699
700
|
--svelte-ui-dialog-border: solid 1px var(--svelte-ui-border-weak-color);
|
|
@@ -707,8 +708,8 @@
|
|
|
707
708
|
--svelte-ui-drawer-header-padding: 16px 24px;
|
|
708
709
|
--svelte-ui-drawer-body-padding: 24px;
|
|
709
710
|
--svelte-ui-drawer-header-height: 56px;
|
|
710
|
-
--svelte-ui-drawer-title-font-size:
|
|
711
|
-
--svelte-ui-drawer-description-font-size:
|
|
711
|
+
--svelte-ui-drawer-title-font-size: var(--svelte-ui-font-size-xl);
|
|
712
|
+
--svelte-ui-drawer-description-font-size: var(--svelte-ui-font-size-sm);
|
|
712
713
|
--svelte-ui-drawer-description-padding: 0.5rem 1rem;
|
|
713
714
|
--svelte-ui-drawer-footer-padding: 8px;
|
|
714
715
|
--svelte-ui-drawer-border: 1px solid var(--svelte-ui-border-weak-color);
|
|
@@ -828,7 +829,7 @@
|
|
|
828
829
|
--svelte-ui-skeleton-media-gap: 16px;
|
|
829
830
|
--svelte-ui-skeleton-media-vertical-gap: 8px;
|
|
830
831
|
--svelte-ui-skeleton-heading-width: 50%;
|
|
831
|
-
--svelte-ui-skeleton-heading-font-size:
|
|
832
|
+
--svelte-ui-skeleton-heading-font-size: var(--svelte-ui-font-size-xxl);
|
|
832
833
|
--svelte-ui-skeleton-pattern-gap: 16px;
|
|
833
834
|
--svelte-ui-skeleton-repeat-gap: 24px;
|
|
834
835
|
|
|
@@ -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;
|
|
@@ -697,7 +697,7 @@
|
|
|
697
697
|
}
|
|
698
698
|
|
|
699
699
|
.datepicker-calendar__header__month-label-button {
|
|
700
|
-
font-size:
|
|
700
|
+
font-size: var(--svelte-ui-font-size-xl);
|
|
701
701
|
font-weight: bold;
|
|
702
702
|
color: var(--svelte-ui-datepicker-date-color);
|
|
703
703
|
background: none;
|
|
@@ -728,7 +728,7 @@
|
|
|
728
728
|
border-radius: var(--svelte-ui-border-radius);
|
|
729
729
|
background-color: var(--svelte-ui-surface-color);
|
|
730
730
|
color: var(--svelte-ui-datepicker-date-color);
|
|
731
|
-
font-size:
|
|
731
|
+
font-size: var(--svelte-ui-font-size);
|
|
732
732
|
cursor: pointer;
|
|
733
733
|
transition: background-color var(--svelte-ui-transition-duration);
|
|
734
734
|
}
|
|
@@ -776,7 +776,7 @@
|
|
|
776
776
|
display: flex;
|
|
777
777
|
justify-content: center;
|
|
778
778
|
padding: 2px 0;
|
|
779
|
-
font-size:
|
|
779
|
+
font-size: var(--svelte-ui-font-size);
|
|
780
780
|
width: 14.2857142857%;
|
|
781
781
|
}
|
|
782
782
|
|