@14ch/svelte-ui 0.0.26 → 0.0.28

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.
Files changed (64) hide show
  1. package/dist/components/Button.svelte +8 -1
  2. package/dist/components/Button.svelte.d.ts +8 -1
  3. package/dist/components/Checkbox.svelte +7 -0
  4. package/dist/components/Checkbox.svelte.d.ts +7 -0
  5. package/dist/components/CheckboxGroup.svelte +5 -0
  6. package/dist/components/CheckboxGroup.svelte.d.ts +5 -0
  7. package/dist/components/ColorPicker.svelte +3 -0
  8. package/dist/components/ColorPicker.svelte.d.ts +3 -0
  9. package/dist/components/Combobox.svelte +7 -0
  10. package/dist/components/Combobox.svelte.d.ts +6 -0
  11. package/dist/components/ConfirmDialog.svelte +7 -0
  12. package/dist/components/ConfirmDialog.svelte.d.ts +7 -3
  13. package/dist/components/Datepicker.svelte +12 -0
  14. package/dist/components/Datepicker.svelte.d.ts +12 -3
  15. package/dist/components/Dialog.svelte +12 -0
  16. package/dist/components/Dialog.svelte.d.ts +12 -4
  17. package/dist/components/Drawer.svelte +13 -0
  18. package/dist/components/Drawer.svelte.d.ts +13 -4
  19. package/dist/components/Fab.svelte +11 -0
  20. package/dist/components/Fab.svelte.d.ts +11 -0
  21. package/dist/components/FileUploader.svelte +4 -0
  22. package/dist/components/FileUploader.svelte.d.ts +4 -0
  23. package/dist/components/Icon.svelte +8 -0
  24. package/dist/components/Icon.svelte.d.ts +8 -0
  25. package/dist/components/IconButton.svelte +13 -0
  26. package/dist/components/IconButton.svelte.d.ts +13 -0
  27. package/dist/components/ImageUploader.svelte +6 -0
  28. package/dist/components/ImageUploader.svelte.d.ts +6 -0
  29. package/dist/components/Input.svelte +18 -1
  30. package/dist/components/Input.svelte.d.ts +13 -0
  31. package/dist/components/LoadingSpinner.svelte +4 -0
  32. package/dist/components/LoadingSpinner.svelte.d.ts +4 -0
  33. package/dist/components/Modal.svelte +9 -0
  34. package/dist/components/Modal.svelte.d.ts +9 -4
  35. package/dist/components/Nav.svelte +6 -0
  36. package/dist/components/Nav.svelte.d.ts +6 -0
  37. package/dist/components/Pagination.svelte +7 -0
  38. package/dist/components/Pagination.svelte.d.ts +7 -0
  39. package/dist/components/Popup.svelte +13 -0
  40. package/dist/components/Popup.svelte.d.ts +13 -4
  41. package/dist/components/PopupMenu.svelte +8 -0
  42. package/dist/components/PopupMenu.svelte.d.ts +8 -3
  43. package/dist/components/PopupMenuButton.svelte +7 -0
  44. package/dist/components/PopupMenuButton.svelte.d.ts +7 -0
  45. package/dist/components/Radio.svelte +7 -0
  46. package/dist/components/Radio.svelte.d.ts +7 -0
  47. package/dist/components/RadioGroup.svelte +5 -0
  48. package/dist/components/RadioGroup.svelte.d.ts +5 -0
  49. package/dist/components/SegmentedControl.svelte +5 -0
  50. package/dist/components/SegmentedControl.svelte.d.ts +5 -0
  51. package/dist/components/Select.svelte +5 -0
  52. package/dist/components/Select.svelte.d.ts +4 -0
  53. package/dist/components/Slider.svelte +5 -0
  54. package/dist/components/Slider.svelte.d.ts +5 -0
  55. package/dist/components/Snackbar.svelte +4 -0
  56. package/dist/components/Snackbar.svelte.d.ts +4 -0
  57. package/dist/components/Switch.svelte +3 -0
  58. package/dist/components/Switch.svelte.d.ts +3 -0
  59. package/dist/components/Tab.svelte +7 -0
  60. package/dist/components/Tab.svelte.d.ts +7 -0
  61. package/dist/components/Textarea.svelte +10 -0
  62. package/dist/components/Textarea.svelte.d.ts +9 -0
  63. package/dist/index.d.ts +4 -0
  64. package/package.json +1 -1
@@ -29,23 +29,32 @@
29
29
  children: Snippet;
30
30
 
31
31
  // DOM参照
32
+ /** The element the popup is anchored to. */
32
33
  anchorElement: HTMLElement | null | undefined;
33
34
 
34
35
  // 基本プロパティ
36
+ /** ARIA role for the popup container. @default 'menu' */
35
37
  role?: string;
36
38
 
37
39
  // HTML属性
38
40
  id?: string;
39
41
 
40
42
  // スタイル/レイアウト
43
+ /** @default 'bottom' */
41
44
  position?: PopupPosition;
45
+ /** Gap in px between anchor and popup. @default 8 */
42
46
  margin?: number;
43
47
 
44
48
  // 状態/動作
49
+ /** Use `popupRef.open()` / `.close()` instead of binding this directly. */
45
50
  isOpen?: boolean;
51
+ /** Traps keyboard focus inside the popup. @default false */
46
52
  focusTrap?: boolean;
53
+ /** Returns focus to the anchor element on close. @default false */
47
54
  restoreFocus?: boolean;
55
+ /** On mobile, displays as a fullscreen sheet. @default false */
48
56
  mobileFullscreen?: boolean;
57
+ /** Repositions automatically when near viewport edges. @default false */
49
58
  enableAutoReposition?: boolean;
50
59
 
51
60
  // ARIA/アクセシビリティ
@@ -432,6 +441,7 @@
432
441
  };
433
442
  };
434
443
 
444
+ /** Opens the popup. */
435
445
  export const open = async () => {
436
446
  // 他の開いているPopupをすべて閉じる
437
447
  popupManager.closeOthers(close);
@@ -487,6 +497,7 @@
487
497
  }, 1);
488
498
  };
489
499
 
500
+ /** Closes the popup. */
490
501
  export const close = () => {
491
502
  isOpen = false;
492
503
  removeEventListenersToClose();
@@ -498,6 +509,7 @@
498
509
  // onCloseはアニメーション完了後に呼ぶ(closeEndで実行)
499
510
  };
500
511
 
512
+ /** Toggles between open and closed. */
501
513
  export const toggle = () => {
502
514
  if (isOpen) {
503
515
  close();
@@ -506,6 +518,7 @@
506
518
  }
507
519
  };
508
520
 
521
+ /** Returns whether the popup is currently open. */
509
522
  export const getIsOpen = () => {
510
523
  return isOpen;
511
524
  };
@@ -14,15 +14,24 @@ import type { Snippet } from 'svelte';
14
14
  import type { PopupPosition } from '../types/propOptions';
15
15
  export type PopupProps = {
16
16
  children: Snippet;
17
+ /** The element the popup is anchored to. */
17
18
  anchorElement: HTMLElement | null | undefined;
19
+ /** ARIA role for the popup container. @default 'menu' */
18
20
  role?: string;
19
21
  id?: string;
22
+ /** @default 'bottom' */
20
23
  position?: PopupPosition;
24
+ /** Gap in px between anchor and popup. @default 8 */
21
25
  margin?: number;
26
+ /** Use `popupRef.open()` / `.close()` instead of binding this directly. */
22
27
  isOpen?: boolean;
28
+ /** Traps keyboard focus inside the popup. @default false */
23
29
  focusTrap?: boolean;
30
+ /** Returns focus to the anchor element on close. @default false */
24
31
  restoreFocus?: boolean;
32
+ /** On mobile, displays as a fullscreen sheet. @default false */
25
33
  mobileFullscreen?: boolean;
34
+ /** Repositions automatically when near viewport edges. @default false */
26
35
  enableAutoReposition?: boolean;
27
36
  ariaLabel?: string;
28
37
  ariaLabelledby?: string;
@@ -31,10 +40,10 @@ export type PopupProps = {
31
40
  onClose?: () => void;
32
41
  };
33
42
  declare const Popup: import("svelte").Component<PopupProps, {
34
- open: () => Promise<void>;
35
- close: () => void;
36
- toggle: () => void;
37
- getIsOpen: () => boolean;
43
+ /** Opens the popup. */ open: () => Promise<void>;
44
+ /** Closes the popup. */ close: () => void;
45
+ /** Toggles between open and closed. */ toggle: () => void;
46
+ /** Returns whether the popup is currently open. */ getIsOpen: () => boolean;
38
47
  }, "isOpen">;
39
48
  type Popup = ReturnType<typeof Popup>;
40
49
  export default Popup;
@@ -14,12 +14,17 @@
14
14
  // Props, States & Constants
15
15
  // =========================================================================
16
16
  export type PopupMenuProps = {
17
+ /** Use `popupMenuRef.open()` / `.close()` instead of binding this directly. */
17
18
  isOpen?: boolean;
19
+ /** The element the menu is anchored to. */
18
20
  anchorElement: HTMLElement | null | undefined;
21
+ /** @default 'bottom' */
19
22
  position?: PopupPosition;
23
+ /** `{ label, icon?, href?, callback?, disabled? }[]` or `'separator'` for dividers. */
20
24
  menuItems: (MenuItem | 'separator')[];
21
25
  id?: string;
22
26
  ariaLabel?: string;
27
+ /** On mobile, displays as a fullscreen sheet. @default true */
23
28
  mobileFullscreen?: boolean;
24
29
  iconFilled?: boolean;
25
30
  iconWeight?: IconWeight;
@@ -192,14 +197,17 @@
192
197
  }
193
198
  };
194
199
 
200
+ /** Opens the menu. */
195
201
  export const open = () => {
196
202
  popupRef?.open();
197
203
  };
198
204
 
205
+ /** Closes the menu. */
199
206
  export const close = () => {
200
207
  popupRef?.close();
201
208
  };
202
209
 
210
+ /** Toggles between open and closed. */
203
211
  export const toggle = () => {
204
212
  popupRef?.toggle();
205
213
  };
@@ -2,12 +2,17 @@ import type { MenuItem } from '../types/menuItem';
2
2
  import type { IconVariant, IconWeight, IconGrade, IconOpticalSize } from '../types/icon';
3
3
  import type { PopupPosition } from '../types/propOptions';
4
4
  export type PopupMenuProps = {
5
+ /** Use `popupMenuRef.open()` / `.close()` instead of binding this directly. */
5
6
  isOpen?: boolean;
7
+ /** The element the menu is anchored to. */
6
8
  anchorElement: HTMLElement | null | undefined;
9
+ /** @default 'bottom' */
7
10
  position?: PopupPosition;
11
+ /** `{ label, icon?, href?, callback?, disabled? }[]` or `'separator'` for dividers. */
8
12
  menuItems: (MenuItem | 'separator')[];
9
13
  id?: string;
10
14
  ariaLabel?: string;
15
+ /** On mobile, displays as a fullscreen sheet. @default true */
11
16
  mobileFullscreen?: boolean;
12
17
  iconFilled?: boolean;
13
18
  iconWeight?: IconWeight;
@@ -16,9 +21,9 @@ export type PopupMenuProps = {
16
21
  iconVariant?: IconVariant;
17
22
  };
18
23
  declare const PopupMenu: import("svelte").Component<PopupMenuProps, {
19
- open: () => void;
20
- close: () => void;
21
- toggle: () => void;
24
+ /** Opens the menu. */ open: () => void;
25
+ /** Closes the menu. */ close: () => void;
26
+ /** Toggles between open and closed. */ toggle: () => void;
22
27
  }, "isOpen">;
23
28
  type PopupMenu = ReturnType<typeof PopupMenu>;
24
29
  export default PopupMenu;
@@ -23,21 +23,28 @@
23
23
  children?: Snippet;
24
24
 
25
25
  // 基本プロパティ
26
+ /** `{ label, icon?, href?, callback?, disabled? }[]` or `'separator'` for dividers. */
26
27
  menuItems: (MenuItem | 'separator')[];
27
28
 
28
29
  // HTML属性
29
30
  id?: string;
30
31
 
31
32
  // スタイル/レイアウト
33
+ /** @default 'bottom' */
32
34
  position?: PopupPosition;
35
+ /** @default 'ghost' */
33
36
  variant?: ButtonVariant;
37
+ /** Button size in px. */
34
38
  size?: number;
39
+ /** Custom CSS color value. Overrides the theme color. */
35
40
  color?: string;
36
41
  rounded?: boolean;
37
42
 
38
43
  // 状態/動作
39
44
  disabled?: boolean;
45
+ /** On mobile, displays the menu as a fullscreen sheet. @default true */
40
46
  mobileFullscreen?: boolean;
47
+ /** Stops click event propagation to parent elements. @default false */
41
48
  cancelParentClick?: boolean;
42
49
 
43
50
  // フォーカスイベント
@@ -4,15 +4,22 @@ import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, Pointer
4
4
  import type { PopupPosition, ButtonVariant } from '../types/propOptions';
5
5
  export type PopupMenuButtonProps = {
6
6
  children?: Snippet;
7
+ /** `{ label, icon?, href?, callback?, disabled? }[]` or `'separator'` for dividers. */
7
8
  menuItems: (MenuItem | 'separator')[];
8
9
  id?: string;
10
+ /** @default 'bottom' */
9
11
  position?: PopupPosition;
12
+ /** @default 'ghost' */
10
13
  variant?: ButtonVariant;
14
+ /** Button size in px. */
11
15
  size?: number;
16
+ /** Custom CSS color value. Overrides the theme color. */
12
17
  color?: string;
13
18
  rounded?: boolean;
14
19
  disabled?: boolean;
20
+ /** On mobile, displays the menu as a fullscreen sheet. @default true */
15
21
  mobileFullscreen?: boolean;
22
+ /** Stops click event propagation to parent elements. @default false */
16
23
  cancelParentClick?: boolean;
17
24
  onfocus?: FocusHandler;
18
25
  onblur?: FocusHandler;
@@ -17,23 +17,30 @@
17
17
  // =========================================================================
18
18
  export type RadioProps = {
19
19
  // Snippet
20
+ /** Label content displayed next to the radio button. */
20
21
  children?: Snippet;
21
22
 
22
23
  // 基本プロパティ
24
+ /** Radio group name. All radios in a group must share the same name. */
23
25
  name: string;
26
+ /** This radio button's value. */
24
27
  value: OptionValue;
28
+ /** The currently selected value in the group. Radio is checked when `value === currentValue`. Supports `bind:currentValue`. */
25
29
  currentValue: OptionValue;
26
30
 
27
31
  // HTML属性系
28
32
  id?: string;
29
33
  // スタイル/レイアウト
34
+ /** Radio button size. @default 'medium' */
30
35
  size?: 'small' | 'medium' | 'large';
31
36
 
32
37
  // 状態/動作
38
+ /** Disables this radio button. @default false */
33
39
  disabled?: boolean;
34
40
  required?: boolean;
35
41
 
36
42
  // ARIA/アクセシビリティ
43
+ /** Disables animations for users who prefer reduced motion. @default false */
37
44
  reducedMotion?: boolean;
38
45
 
39
46
  // フォーカスイベント
@@ -2,14 +2,21 @@ import { type Snippet } from 'svelte';
2
2
  import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler, BivariantValueHandler } from '../types/callbackHandlers';
3
3
  import type { OptionValue } from '../types/options';
4
4
  export type RadioProps = {
5
+ /** Label content displayed next to the radio button. */
5
6
  children?: Snippet;
7
+ /** Radio group name. All radios in a group must share the same name. */
6
8
  name: string;
9
+ /** This radio button's value. */
7
10
  value: OptionValue;
11
+ /** The currently selected value in the group. Radio is checked when `value === currentValue`. Supports `bind:currentValue`. */
8
12
  currentValue: OptionValue;
9
13
  id?: string;
14
+ /** Radio button size. @default 'medium' */
10
15
  size?: 'small' | 'medium' | 'large';
16
+ /** Disables this radio button. @default false */
11
17
  disabled?: boolean;
12
18
  required?: boolean;
19
+ /** Disables animations for users who prefer reduced motion. @default false */
13
20
  reducedMotion?: boolean;
14
21
  onfocus?: FocusHandler;
15
22
  onblur?: FocusHandler;
@@ -12,14 +12,18 @@
12
12
  export type RadioGroupProps = {
13
13
  // 基本プロパティ
14
14
  name?: string;
15
+ /** `{ label, value, disabled? }[]` */
15
16
  options: Option[];
17
+ /** Currently selected value. Supports `bind:value`. */
16
18
  value: OptionValue;
17
19
 
18
20
  // スタイル/レイアウト
21
+ /** @default 'vertical' */
19
22
  direction?: 'vertical' | 'horizontal';
20
23
  gap?: string | number;
21
24
  wrap?: boolean;
22
25
  minOptionWidth?: string | number;
26
+ /** @default 'medium' */
23
27
  size?: 'small' | 'medium' | 'large';
24
28
 
25
29
  // 状態/動作
@@ -27,6 +31,7 @@
27
31
  required?: boolean;
28
32
 
29
33
  // ARIA/アクセシビリティ
34
+ /** Disables animations for accessibility. @default false */
30
35
  reducedMotion?: boolean;
31
36
 
32
37
  // 入力イベント
@@ -2,15 +2,20 @@ import type { Option, OptionValue } from '../types/options';
2
2
  import type { BivariantValueHandler } from '../types/callbackHandlers';
3
3
  export type RadioGroupProps = {
4
4
  name?: string;
5
+ /** `{ label, value, disabled? }[]` */
5
6
  options: Option[];
7
+ /** Currently selected value. Supports `bind:value`. */
6
8
  value: OptionValue;
9
+ /** @default 'vertical' */
7
10
  direction?: 'vertical' | 'horizontal';
8
11
  gap?: string | number;
9
12
  wrap?: boolean;
10
13
  minOptionWidth?: string | number;
14
+ /** @default 'medium' */
11
15
  size?: 'small' | 'medium' | 'large';
12
16
  disabled?: boolean;
13
17
  required?: boolean;
18
+ /** Disables animations for accessibility. @default false */
14
19
  reducedMotion?: boolean;
15
20
  onchange?: BivariantValueHandler<OptionValue>;
16
21
  };
@@ -17,7 +17,9 @@
17
17
  // =========================================================================
18
18
  export type SegmentedControlProps = {
19
19
  // 基本プロパティ
20
+ /** `{ label, value, icon?, disabled? }[]` */
20
21
  items: SegmentedControlItem[];
22
+ /** Currently selected value. Supports `bind:value`. */
21
23
  value: string;
22
24
 
23
25
  // HTML属性系
@@ -25,8 +27,10 @@
25
27
  name?: string;
26
28
 
27
29
  // スタイル/レイアウト
30
+ /** @default 'medium' */
28
31
  size?: 'small' | 'medium' | 'large';
29
32
  fullWidth?: boolean;
33
+ /** Custom CSS color value. Overrides the theme color. */
30
34
  color?: string;
31
35
  rounded?: boolean;
32
36
 
@@ -43,6 +47,7 @@
43
47
  // ARIA/アクセシビリティ
44
48
  ariaLabel?: string;
45
49
  ariaLabelledby?: string;
50
+ /** Disables animations for accessibility. @default false */
46
51
  reducedMotion?: boolean;
47
52
 
48
53
  // 入力イベント
@@ -2,12 +2,16 @@ 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 } from '../types/callbackHandlers';
4
4
  export type SegmentedControlProps = {
5
+ /** `{ label, value, icon?, disabled? }[]` */
5
6
  items: SegmentedControlItem[];
7
+ /** Currently selected value. Supports `bind:value`. */
6
8
  value: string;
7
9
  id?: string;
8
10
  name?: string;
11
+ /** @default 'medium' */
9
12
  size?: 'small' | 'medium' | 'large';
10
13
  fullWidth?: boolean;
14
+ /** Custom CSS color value. Overrides the theme color. */
11
15
  color?: string;
12
16
  rounded?: boolean;
13
17
  iconFilled?: boolean;
@@ -18,6 +22,7 @@ export type SegmentedControlProps = {
18
22
  disabled?: boolean;
19
23
  ariaLabel?: string;
20
24
  ariaLabelledby?: string;
25
+ /** Disables animations for accessibility. @default false */
21
26
  reducedMotion?: boolean;
22
27
  onchange?: (value: string) => void;
23
28
  onfocus?: FocusHandler;
@@ -20,6 +20,7 @@
20
20
  // 基本プロパティ
21
21
  name?: string;
22
22
  value: string | number | null | undefined;
23
+ /** `{ label, value, disabled? }[]` */
23
24
  options: Option[];
24
25
 
25
26
  // HTML属性系
@@ -28,8 +29,11 @@
28
29
  tabindex?: number | null;
29
30
  placeholder?: string;
30
31
  // スタイル/レイアウト
32
+ /** Number of visible rows (multi-line mode). @default null */
31
33
  size?: number | null;
34
+ /** Renders inline. @default false */
32
35
  inline?: boolean;
36
+ /** @default 'outline' */
33
37
  focusStyle?: 'background' | 'outline' | 'none';
34
38
  fullWidth?: boolean;
35
39
  rounded?: boolean;
@@ -368,6 +372,7 @@ select--focus-{focusStyle}"
368
372
  background: transparent;
369
373
  border: none;
370
374
  border-radius: 0;
375
+ font-family: inherit;
371
376
  font-size: inherit;
372
377
  font-weight: inherit;
373
378
  color: inherit;
@@ -3,13 +3,17 @@ import type { Option } from '../types/options';
3
3
  export type SelectProps = {
4
4
  name?: string;
5
5
  value: string | number | null | undefined;
6
+ /** `{ label, value, disabled? }[]` */
6
7
  options: Option[];
7
8
  id?: string | null;
8
9
  ariaLabel?: string;
9
10
  tabindex?: number | null;
10
11
  placeholder?: string;
12
+ /** Number of visible rows (multi-line mode). @default null */
11
13
  size?: number | null;
14
+ /** Renders inline. @default false */
12
15
  inline?: boolean;
16
+ /** @default 'outline' */
13
17
  focusStyle?: 'background' | 'outline' | 'none';
14
18
  fullWidth?: boolean;
15
19
  rounded?: boolean;
@@ -16,18 +16,23 @@
16
16
  // =========================================================================
17
17
  export type SliderProps = {
18
18
  // 基本プロパティ
19
+ /** Supports `bind:value`. */
19
20
  value: number;
20
21
  name?: string;
21
22
  id?: string;
22
23
 
23
24
  // HTML属性系
24
25
  ariaLabel?: string;
26
+ /** @default 0 */
25
27
  min?: number;
28
+ /** @default 100 */
26
29
  max?: number;
30
+ /** @default 1 */
27
31
  step?: number;
28
32
  // スタイル/レイアウト
29
33
  width?: string | number | null;
30
34
  fullWidth?: boolean;
35
+ /** Custom CSS color for the thumb. */
31
36
  thumbColor?: string | null;
32
37
  thumbWidth?: string | number | null;
33
38
  thumbHeight?: string | number | null;
@@ -1,14 +1,19 @@
1
1
  import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler } from '../types/callbackHandlers';
2
2
  export type SliderProps = {
3
+ /** Supports `bind:value`. */
3
4
  value: number;
4
5
  name?: string;
5
6
  id?: string;
6
7
  ariaLabel?: string;
8
+ /** @default 0 */
7
9
  min?: number;
10
+ /** @default 100 */
8
11
  max?: number;
12
+ /** @default 1 */
9
13
  step?: number;
10
14
  width?: string | number | null;
11
15
  fullWidth?: boolean;
16
+ /** Custom CSS color for the thumb. */
12
17
  thumbColor?: string | null;
13
18
  thumbWidth?: string | number | null;
14
19
  thumbHeight?: string | number | null;
@@ -10,11 +10,15 @@
10
10
  // =========================================================================
11
11
  export type SnackbarProps = {
12
12
  // スタイル/レイアウト
13
+ /** @default 'bottom' */
13
14
  position?: SnackbarPosition;
15
+ /** Maximum number of snackbars shown at once. @default 5 */
14
16
  maxVisible?: number;
17
+ /** @default 'filled' */
15
18
  variant?: SnackbarVariant;
16
19
 
17
20
  // 状態/動作
21
+ /** Auto-dismiss duration in milliseconds. @default 3000 */
18
22
  duration?: number;
19
23
  };
20
24
 
@@ -1,8 +1,12 @@
1
1
  import type { SnackbarPosition, SnackbarVariant } from '../types/propOptions';
2
2
  export type SnackbarProps = {
3
+ /** @default 'bottom' */
3
4
  position?: SnackbarPosition;
5
+ /** Maximum number of snackbars shown at once. @default 5 */
4
6
  maxVisible?: number;
7
+ /** @default 'filled' */
5
8
  variant?: SnackbarVariant;
9
+ /** Auto-dismiss duration in milliseconds. @default 3000 */
6
10
  duration?: number;
7
11
  };
8
12
  declare const Snackbar: import("svelte").Component<SnackbarProps, {}, "">;
@@ -18,11 +18,13 @@
18
18
  children?: Snippet;
19
19
 
20
20
  // 基本プロパティ
21
+ /** Supports `bind:value`. */
21
22
  value: boolean;
22
23
 
23
24
  // HTML属性系
24
25
  id?: string;
25
26
  // スタイル/レイアウト
27
+ /** @default 'medium' */
26
28
  size?: 'small' | 'medium' | 'large';
27
29
 
28
30
  // 状態/動作
@@ -30,6 +32,7 @@
30
32
  required?: boolean;
31
33
 
32
34
  // ARIA/アクセシビリティ
35
+ /** Disables animations for accessibility. @default false */
33
36
  reducedMotion?: boolean;
34
37
 
35
38
  // フォーカスイベント
@@ -2,11 +2,14 @@ import type { Snippet } from 'svelte';
2
2
  import type { FocusHandler, KeyboardHandler, MouseHandler, TouchHandler, PointerHandler } from '../types/callbackHandlers';
3
3
  export type SwitchProps = {
4
4
  children?: Snippet;
5
+ /** Supports `bind:value`. */
5
6
  value: boolean;
6
7
  id?: string;
8
+ /** @default 'medium' */
7
9
  size?: 'small' | 'medium' | 'large';
8
10
  disabled?: boolean;
9
11
  required?: boolean;
12
+ /** Disables animations for accessibility. @default false */
10
13
  reducedMotion?: boolean;
11
14
  onfocus?: FocusHandler;
12
15
  onblur?: FocusHandler;
@@ -11,14 +11,21 @@
11
11
  // =========================================================================
12
12
  export type TabProps = {
13
13
  // 基本プロパティ
14
+ /** `{ label, href, icon?, disabled? }[]` */
14
15
  tabItems: MenuItem[];
16
+ /** Prepended to each item's href for active-state matching. */
15
17
  pathPrefix?: string;
18
+ /** Custom function to determine if an item is active. */
16
19
  customPathMatcher?: (currentPath: string, itemHref: string, item: MenuItem) => boolean;
20
+ /** Overrides the auto-detected current path. */
17
21
  currentPath?: string;
18
22
 
19
23
  // スタイル/レイアウト
24
+ /** Custom CSS color for tab labels. */
20
25
  textColor?: string;
26
+ /** Custom CSS color for the active tab label. */
21
27
  selectedTextColor?: string;
28
+ /** Custom CSS color for the active tab indicator bar. */
22
29
  selectedBarColor?: string;
23
30
 
24
31
  // ARIA/アクセシビリティ
@@ -1,11 +1,18 @@
1
1
  import type { MenuItem } from '../types/menuItem';
2
2
  export type TabProps = {
3
+ /** `{ label, href, icon?, disabled? }[]` */
3
4
  tabItems: MenuItem[];
5
+ /** Prepended to each item's href for active-state matching. */
4
6
  pathPrefix?: string;
7
+ /** Custom function to determine if an item is active. */
5
8
  customPathMatcher?: (currentPath: string, itemHref: string, item: MenuItem) => boolean;
9
+ /** Overrides the auto-detected current path. */
6
10
  currentPath?: string;
11
+ /** Custom CSS color for tab labels. */
7
12
  textColor?: string;
13
+ /** Custom CSS color for the active tab label. */
8
14
  selectedTextColor?: string;
15
+ /** Custom CSS color for the active tab indicator bar. */
9
16
  selectedBarColor?: string;
10
17
  ariaLabel?: string;
11
18
  ariaLabelledby?: string;
@@ -35,10 +35,15 @@
35
35
  autocapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters' | null;
36
36
  // スタイル/レイアウト
37
37
  rows?: number;
38
+ /** Min height as px number or CSS string. */
38
39
  minHeight?: string | number | null;
40
+ /** Max height as px number or CSS string. Applied when `autoResize` is enabled. */
39
41
  maxHeight?: string | number | null;
42
+ /** Renders inline. @default false */
40
43
  inline?: boolean;
44
+ /** @default 'outline' */
41
45
  focusStyle?: FocusStyle;
46
+ /** Width as px number or CSS string. */
42
47
  width?: string | number | null;
43
48
  fullWidth?: boolean;
44
49
  fullHeight?: boolean;
@@ -55,11 +60,15 @@
55
60
 
56
61
  // 状態/動作
57
62
  disabled?: boolean;
63
+ /** Automatically grows height to fit content. @default false */
58
64
  autoResize?: boolean;
65
+ /** Allows manual resize via drag handle. @default false */
59
66
  resizable?: boolean;
67
+ /** Shows a clear (×) button when the textarea has a value. @default false */
60
68
  clearable?: boolean;
61
69
  readonly?: boolean;
62
70
  required?: boolean;
71
+ /** Converts URLs in the value to clickable links (non-focused view). @default false */
63
72
  linkify?: boolean;
64
73
 
65
74
  // フォーカスイベント
@@ -657,6 +666,7 @@
657
666
  background-color: transparent;
658
667
  border: none;
659
668
  border-radius: var(--svelte-ui-textarea-border-radius);
669
+ font-family: inherit;
660
670
  font-size: inherit;
661
671
  font-weight: inherit;
662
672
  color: inherit;
@@ -14,10 +14,15 @@ export type TextareaProps = {
14
14
  spellcheck?: boolean | null;
15
15
  autocapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters' | null;
16
16
  rows?: number;
17
+ /** Min height as px number or CSS string. */
17
18
  minHeight?: string | number | null;
19
+ /** Max height as px number or CSS string. Applied when `autoResize` is enabled. */
18
20
  maxHeight?: string | number | null;
21
+ /** Renders inline. @default false */
19
22
  inline?: boolean;
23
+ /** @default 'outline' */
20
24
  focusStyle?: FocusStyle;
25
+ /** Width as px number or CSS string. */
21
26
  width?: string | number | null;
22
27
  fullWidth?: boolean;
23
28
  fullHeight?: boolean;
@@ -30,11 +35,15 @@ export type TextareaProps = {
30
35
  iconOpticalSize?: IconOpticalSize;
31
36
  iconVariant?: IconVariant;
32
37
  disabled?: boolean;
38
+ /** Automatically grows height to fit content. @default false */
33
39
  autoResize?: boolean;
40
+ /** Allows manual resize via drag handle. @default false */
34
41
  resizable?: boolean;
42
+ /** Shows a clear (×) button when the textarea has a value. @default false */
35
43
  clearable?: boolean;
36
44
  readonly?: boolean;
37
45
  required?: boolean;
46
+ /** Converts URLs in the value to clickable links (non-focused view). @default false */
38
47
  linkify?: boolean;
39
48
  onfocus?: FocusHandler;
40
49
  onblur?: FocusHandler;