@fibrae/semi-ui-svelte 0.9.1 → 0.10.0

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 (165) hide show
  1. package/README.md +8 -4
  2. package/README.zh-CN.md +8 -4
  3. package/dist/components/anchor/interface.d.ts +14 -0
  4. package/dist/components/audio-player/interface.d.ts +5 -0
  5. package/dist/components/auto-complete/interface.d.ts +29 -0
  6. package/dist/components/avatar/interface.d.ts +24 -0
  7. package/dist/components/backtop/interface.d.ts +2 -0
  8. package/dist/components/badge/interface.d.ts +7 -0
  9. package/dist/components/banner/interface.d.ts +7 -0
  10. package/dist/components/breadcrumb/interface.d.ts +10 -0
  11. package/dist/components/button/interface.d.ts +18 -0
  12. package/dist/components/calendar/interface.d.ts +16 -0
  13. package/dist/components/card/interface.d.ts +18 -0
  14. package/dist/components/carousel/interface.d.ts +16 -0
  15. package/dist/components/cascader/interface.d.ts +57 -0
  16. package/dist/components/checkbox/interface.d.ts +19 -0
  17. package/dist/components/code-highlight/interface.d.ts +3 -0
  18. package/dist/components/collapse/interface.d.ts +16 -0
  19. package/dist/components/collapsible/interface.d.ts +10 -0
  20. package/dist/components/color-picker/interface.d.ts +10 -0
  21. package/dist/components/config-provider/interface.d.ts +7 -0
  22. package/dist/components/cropper/interface.d.ts +11 -0
  23. package/dist/components/date-picker/interface.d.ts +47 -0
  24. package/dist/components/descriptions/interface.d.ts +6 -0
  25. package/dist/components/divider/interface.d.ts +4 -0
  26. package/dist/components/dropdown/interface.d.ts +8 -0
  27. package/dist/components/empty/interface.d.ts +7 -0
  28. package/dist/components/feedback/interface.d.ts +16 -0
  29. package/dist/components/float-button/interface.d.ts +14 -0
  30. package/dist/components/form/interface.d.ts +47 -0
  31. package/dist/components/grid/interface.d.ts +13 -0
  32. package/dist/components/highlight/interface.d.ts +7 -0
  33. package/dist/components/hot-keys/interface.d.ts +3 -0
  34. package/dist/components/image/interface.d.ts +59 -0
  35. package/dist/components/input/interface.d.ts +67 -0
  36. package/dist/components/input-number/interface.d.ts +24 -0
  37. package/dist/components/json-viewer/interface.d.ts +7 -0
  38. package/dist/components/layout/interface.d.ts +3 -0
  39. package/dist/components/list/interface.d.ts +18 -0
  40. package/dist/components/locale/interface.d.ts +4 -0
  41. package/dist/components/lottie/interface.d.ts +2 -0
  42. package/dist/components/markdown-render/interface.d.ts +5 -0
  43. package/dist/components/modal/interface.d.ts +29 -0
  44. package/dist/components/navigation/interface.d.ts +47 -0
  45. package/dist/components/overflow-list/interface.d.ts +11 -0
  46. package/dist/components/pagination/interface.d.ts +12 -0
  47. package/dist/components/pincode/interface.d.ts +8 -0
  48. package/dist/components/popconfirm/interface.d.ts +12 -0
  49. package/dist/components/popover/interface.d.ts +30 -0
  50. package/dist/components/progress/interface.d.ts +13 -0
  51. package/dist/components/radio/interface.d.ts +22 -0
  52. package/dist/components/rating/interface.d.ts +12 -0
  53. package/dist/components/resizable/interface.d.ts +30 -0
  54. package/dist/components/scroll-list/interface.d.ts +6 -0
  55. package/dist/components/select/interface.d.ts +63 -0
  56. package/dist/components/side-sheet/interface.d.ts +19 -0
  57. package/dist/components/skeleton/interface.d.ts +7 -0
  58. package/dist/components/slider/interface.d.ts +23 -0
  59. package/dist/components/space/interface.d.ts +4 -0
  60. package/dist/components/spin/interface.d.ts +7 -0
  61. package/dist/components/steps/interface.d.ts +9 -0
  62. package/dist/components/switch/interface.d.ts +7 -0
  63. package/dist/components/table/interface.d.ts +48 -0
  64. package/dist/components/tabs/interface.d.ts +29 -0
  65. package/dist/components/tag/interface.d.ts +22 -0
  66. package/dist/components/tag-input/interface.d.ts +29 -0
  67. package/dist/components/time-picker/interface.d.ts +31 -0
  68. package/dist/components/timeline/interface.d.ts +5 -0
  69. package/dist/components/tooltip/interface.d.ts +20 -0
  70. package/dist/components/transfer/interface.d.ts +18 -0
  71. package/dist/components/tree/interface.d.ts +45 -0
  72. package/dist/components/tree-select/interface.d.ts +55 -0
  73. package/dist/components/typography/interface.d.ts +33 -0
  74. package/dist/components/upload/interface.d.ts +64 -0
  75. package/dist/components/user-guide/interface.d.ts +15 -0
  76. package/dist/components/video-player/interface.d.ts +22 -0
  77. package/docs/advanced/dark-mode.md +288 -0
  78. package/docs/basic/button.md +605 -0
  79. package/docs/basic/divider.md +103 -0
  80. package/docs/basic/float-button.md +246 -0
  81. package/docs/basic/grid.md +427 -0
  82. package/docs/basic/layout.md +459 -0
  83. package/docs/basic/resizable.md +584 -0
  84. package/docs/basic/space.md +163 -0
  85. package/docs/basic/tokens.md +425 -0
  86. package/docs/basic/typography.md +615 -0
  87. package/docs/changes-from-semi.md +105 -0
  88. package/docs/ecosystem/tailwind.md +210 -0
  89. package/docs/experience/accessibility.md +82 -0
  90. package/docs/experience/content-guidelines.md +819 -0
  91. package/docs/experience/internationalization.md +7 -0
  92. package/docs/feedback/banner.md +198 -0
  93. package/docs/feedback/feedback.md +294 -0
  94. package/docs/feedback/notification.md +401 -0
  95. package/docs/feedback/popconfirm.md +243 -0
  96. package/docs/feedback/progress.md +389 -0
  97. package/docs/feedback/skeleton.md +388 -0
  98. package/docs/feedback/spin.md +172 -0
  99. package/docs/feedback/toast.md +393 -0
  100. package/docs/input/auto-complete.md +399 -0
  101. package/docs/input/cascader.md +1558 -0
  102. package/docs/input/checkbox.md +408 -0
  103. package/docs/input/color-picker.md +175 -0
  104. package/docs/input/date-picker.md +942 -0
  105. package/docs/input/form.md +2550 -0
  106. package/docs/input/input-number.md +451 -0
  107. package/docs/input/input.md +640 -0
  108. package/docs/input/pincode.md +191 -0
  109. package/docs/input/radio.md +337 -0
  110. package/docs/input/rating.md +214 -0
  111. package/docs/input/select.md +1230 -0
  112. package/docs/input/slider.md +347 -0
  113. package/docs/input/switch.md +206 -0
  114. package/docs/input/tag-input.md +465 -0
  115. package/docs/input/time-picker.md +358 -0
  116. package/docs/input/transfer.md +1061 -0
  117. package/docs/input/tree-select.md +1300 -0
  118. package/docs/input/upload.md +1811 -0
  119. package/docs/llms.txt +147 -0
  120. package/docs/navigation/anchor.md +377 -0
  121. package/docs/navigation/backtop.md +100 -0
  122. package/docs/navigation/breadcrumb.md +284 -0
  123. package/docs/navigation/navigation.md +851 -0
  124. package/docs/navigation/pagination.md +217 -0
  125. package/docs/navigation/steps.md +315 -0
  126. package/docs/navigation/tabs.md +754 -0
  127. package/docs/navigation/tree.md +1956 -0
  128. package/docs/other/config-provider.md +599 -0
  129. package/docs/other/locale.md +353 -0
  130. package/docs/plus/audio-player.md +155 -0
  131. package/docs/plus/code-highlight.md +150 -0
  132. package/docs/plus/drag-move.md +214 -0
  133. package/docs/plus/hot-keys.md +174 -0
  134. package/docs/plus/json-viewer.md +392 -0
  135. package/docs/plus/lottie.md +176 -0
  136. package/docs/plus/markdown-render.md +240 -0
  137. package/docs/plus/video-player.md +325 -0
  138. package/docs/show/avatar.md +475 -0
  139. package/docs/show/badge.md +276 -0
  140. package/docs/show/calendar.md +352 -0
  141. package/docs/show/card.md +485 -0
  142. package/docs/show/carousel.md +592 -0
  143. package/docs/show/collapse.md +289 -0
  144. package/docs/show/collapsible.md +216 -0
  145. package/docs/show/cropper.md +285 -0
  146. package/docs/show/descriptions.md +325 -0
  147. package/docs/show/dropdown.md +466 -0
  148. package/docs/show/empty.md +225 -0
  149. package/docs/show/highlight.md +144 -0
  150. package/docs/show/image.md +433 -0
  151. package/docs/show/list.md +927 -0
  152. package/docs/show/modal.md +517 -0
  153. package/docs/show/overflow-list.md +272 -0
  154. package/docs/show/popover.md +534 -0
  155. package/docs/show/scroll-list.md +156 -0
  156. package/docs/show/side-sheet.md +274 -0
  157. package/docs/show/table.md +5437 -0
  158. package/docs/show/tag.md +428 -0
  159. package/docs/show/timeline.md +277 -0
  160. package/docs/show/tooltip.md +442 -0
  161. package/docs/show/user-guide.md +419 -0
  162. package/docs/start/getting-started.md +234 -0
  163. package/docs/start/introduction.md +57 -0
  164. package/docs/start/overview.md +21 -0
  165. package/package.json +5 -4
@@ -23,45 +23,61 @@ export interface FeedbackContentSnippetProps {
23
23
  content: Snippet;
24
24
  }
25
25
  export interface FeedbackOwnProps {
26
+ /** Display mode: popup is a non-modal panel at the bottom without a mask (SideSheet); modal is a modal dialog (Modal). Attributes Feedback does not declare go to the SideSheet or Modal of the current mode. */
26
27
  mode?: FeedbackMode;
28
+ /** Type of the feedback content. For custom, the content goes in the children. */
27
29
  type?: FeedbackType;
28
30
  /** Forwarded to the Modal or SideSheet of the current mode. */
29
31
  classNames?: Partial<Record<FeedbackPart, ClassValue>>;
32
+ /** Inline styles of the inner parts, keyed like classNames; every value is a style string. Passed to the Modal or SideSheet of the current mode. */
30
33
  styles?: Partial<Record<FeedbackPart, string>>;
31
34
  /** Bindable. The cancel paths (cancel button, close button, Escape, and for a modal the mask click) write `false`; the ok button never closes. */
32
35
  visible?: boolean;
33
36
  /** Plain text or a snippet. A string is declared here so `title="x"` is not a native tooltip. */
34
37
  title?: string | Snippet;
38
+ /** Props of the multi-line input for the text and emoji types; its onChange is called as usual and does not replace the built-in handling. */
35
39
  textAreaProps?: FeedbackTextAreaProps;
40
+ /** Props of the radio group for the radio type, written as the props of RadioGroup. The group has no accessible name by default; name it with aria-label. */
36
41
  radioGroupProps?: FeedbackRadioGroupProps;
42
+ /** Props of the checkbox group for the checkbox type, written as the props of CheckboxGroup. The group has no accessible name by default; name it with aria-label. */
37
43
  checkboxGroupProps?: FeedbackCheckboxGroupProps;
38
44
  /** With `okButtonProps.disabled` unset, the ok button is disabled until something is chosen. */
39
45
  okButtonProps?: FeedbackButtonProps;
46
+ /** Props of the cancel button. It is loading when either the built-in pending state or your loading says so. onclick runs before the built-in handling, which still runs. */
40
47
  cancelButtonProps?: FeedbackButtonProps;
41
48
  /** A returned Promise keeps the ok button loading until it settles and clears the value once it fulfills. */
42
49
  onOk?: (event: MouseEvent) => unknown;
43
50
  /** Cancel button, close button, Escape and (modal) mask click. `visible` becomes false once it returns, or once a returned Promise fulfills. */
44
51
  onCancel?: (event: MouseEvent | KeyboardEvent) => unknown;
52
+ /** Called when the feedback content changes, with the current value: a string for text, `{ emoji, text }` for emoji (text is the reason filled in after choosing the bad face), the value of the chosen option for radio, and an array of chosen values for checkbox. */
45
53
  onValueChange?: (value: FeedbackValue) => void;
54
+ /** Called after the panel has fully closed, in both modes. */
46
55
  afterClose?: () => void;
47
56
  /** Popup only. */
48
57
  afterVisibleChange?: (visible: boolean) => void;
58
+ /** Feedback content for type custom. */
49
59
  children?: Snippet;
50
60
  /** Wraps or replaces the built-in content, whatever the type. */
51
61
  content?: Snippet<[FeedbackContentSnippetProps]>;
52
62
  /** A snippet replaces the default buttons; null renders no footer area. */
53
63
  footer?: Snippet | null;
64
+ /** Icon inside the close button. */
54
65
  closeIcon?: Snippet;
55
66
  /** Modal only. A snippet replaces the default header; null renders no header. */
56
67
  header?: Snippet | null;
68
+ /** Modal mode only: icon before the title. */
57
69
  icon?: Snippet;
58
70
  /** Modal only. `modal` is the role="dialog" element; place it with `{@render modal()}`. */
59
71
  modal?: Snippet<[{
60
72
  modal: Snippet;
61
73
  }]>;
74
+ /** Snippet for the label of each item in radioGroupProps.options, with `{ option, index }` as its argument. */
62
75
  radioLabel?: Snippet<[FeedbackRadioSnippetProps]>;
76
+ /** Snippet for the extra text of each item in radioGroupProps.options, with `{ option, index }` as its argument. */
63
77
  radioExtra?: Snippet<[FeedbackRadioSnippetProps]>;
78
+ /** Snippet for the label of each item in checkboxGroupProps.options, with `{ option, index }` as its argument. */
64
79
  checkboxLabel?: Snippet<[FeedbackCheckboxSnippetProps]>;
80
+ /** Snippet for the extra text of each item in checkboxGroupProps.options, with `{ option, index }` as its argument. */
65
81
  checkboxExtra?: Snippet<[FeedbackCheckboxSnippetProps]>;
66
82
  }
67
83
  export interface FeedbackModalProps extends Omit<FeedbackOwnProps, 'mode'>, Omit<ModalProps, keyof FeedbackOwnProps> {
@@ -8,16 +8,25 @@ export type FloatButtonSize = ArrayElement<typeof strings.SIZE>;
8
8
  /** Badge props; a count that is not text or a number is the `badgeCount` snippet. Listeners reach the badge's root. */
9
9
  export type FloatButtonBadge = Omit<BadgeProps, 'children'>;
10
10
  export interface FloatButtonProps extends Omit<HTMLButtonAttributes, 'children' | 'type' | 'form' | 'formaction' | 'formenctype' | 'formmethod' | 'formnovalidate' | 'formtarget'> {
11
+ /** Badge props, same as Badge without children. class, style, onclick, onmouseenter and onmouseleave reach the Badge root element. */
11
12
  badge?: FloatButtonBadge;
13
+ /** Colorful float button. */
12
14
  colorful?: boolean;
15
+ /** Disabled state. */
13
16
  disabled?: boolean;
14
17
  /** Renders a link instead of a button; a disabled link drops it */
15
18
  href?: string;
19
+ /** Relationship to the link target. Only takes effect with href. */
16
20
  rel?: string;
21
+ /** Shape: round or square. */
17
22
  shape?: FloatButtonShape;
23
+ /** Size: default, small or large. */
18
24
  size?: FloatButtonSize;
25
+ /** Where to display the linked URL. Only takes effect with href. */
19
26
  target?: string;
27
+ /** Snippet for custom badge content, in place of badge.count. */
20
28
  badgeCount?: Snippet;
29
+ /** Snippet for the button icon. */
21
30
  icon?: Snippet;
22
31
  }
23
32
  export interface FloatButtonGroupItem extends Pick<FloatButtonProps, 'badge' | 'colorful' | 'disabled' | 'href' | 'rel' | 'shape' | 'size' | 'target'> {
@@ -41,11 +50,16 @@ export interface FloatButtonGroupItemSnippetArgs {
41
50
  index: number;
42
51
  }
43
52
  export interface FloatButtonGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
53
+ /** Disables every item. */
44
54
  disabled?: boolean;
55
+ /** List of items. */
45
56
  items: FloatButtonGroupItem[];
46
57
  /** Called with the clicked item's `value`, which is optional; not called for clicks outside an item */
47
58
  onClick?: (value: string | undefined, event: MouseEvent) => void;
59
+ /** Snippet for custom badge content of an item, with the argument `{ item, index }`. */
48
60
  badgeCount?: Snippet<[FloatButtonGroupItemSnippetArgs]>;
61
+ /** Snippet for custom content of an item, with the argument `{ item, index }`. Defaults to item.content. */
49
62
  content?: Snippet<[FloatButtonGroupItemSnippetArgs]>;
63
+ /** Snippet for the icon of an item, with the argument `{ item, index }`. */
50
64
  icon?: Snippet<[FloatButtonGroupItemSnippetArgs]>;
51
65
  }
@@ -17,15 +17,21 @@ export type ScrollOptions = ScrollIntoViewOptions;
17
17
  export interface LabelProps extends Omit<HTMLLabelAttributes, 'children'> {
18
18
  /** Content of the label; the `children` snippet takes precedence */
19
19
  text?: string | number;
20
+ /** Alignment of the Label text. */
20
21
  align?: string;
22
+ /** Whether it has the disabled style. */
21
23
  disabled?: boolean;
22
24
  /** Whether to display the required * symbol; hidden while `optional` is true */
23
25
  required?: boolean;
26
+ /** Whether the optional text of the locale follows the text. The required * is then hidden. */
24
27
  optional?: boolean;
28
+ /** The id of the labeled control, written to the for attribute of the label. */
25
29
  name?: string;
26
30
  /** Width of the label; a number is in px */
27
31
  width?: number | string;
32
+ /** Label content, which takes precedence over text. */
28
33
  children?: Snippet;
34
+ /** Content that follows the label text. */
29
35
  extra?: Snippet;
30
36
  /** Shown in a Tooltip by a help button beside the label, which is not part of the field's name */
31
37
  tooltip?: Snippet | string | number;
@@ -53,20 +59,33 @@ export type FormProps<Values extends Record<string, any> = any, Output = Values>
53
59
  export interface AllFormProps<Values extends Record<string, any> = any, Output = Values> extends Omit<HTMLFormAttributes, 'children' | 'onchange'> {
54
60
  /** Initial values of the fields, copied once when the Form is created; may leave out any part of the values */
55
61
  initValues?: DeepPartial<Values>;
62
+ /** Direction the fields are laid out in, vertical or horizontal. */
56
63
  layout?: 'horizontal' | 'vertical';
64
+ /** Label position applied to every field; inset is only supported by some fields, the others lay out as top. The same prop on a field takes precedence. */
57
65
  labelPosition?: 'top' | 'left' | 'inset';
66
+ /** Label width applied to every field; a number is in px. */
58
67
  labelWidth?: number | string;
68
+ /** Label text alignment applied to every field. The same prop on a field takes precedence. */
59
69
  labelAlign?: 'left' | 'right';
70
+ /** Label grid layout applied to every field, with the span, offset and other props of Col; set it together with wrapperCol. */
60
71
  labelCol?: ColProps;
72
+ /** Control grid layout applied to every field, with the span, offset and other props of Col; set it together with labelCol. */
61
73
  wrapperCol?: ColProps;
74
+ /** Position of extraText applied to every field: middle puts it between the Label and the control, bottom after the control. The same prop on a field takes precedence. */
62
75
  extraTextPosition?: 'middle' | 'bottom';
63
76
  /** Keep the key in the form values when a field value becomes undefined */
64
77
  allowEmpty?: boolean;
78
+ /** Whether to scroll to the failing field when submit or formApi.validate fails; an object is passed on as options of scroll-into-view-if-needed. */
65
79
  autoScrollToError?: boolean | ScrollOptions;
80
+ /** Whether the icon of the status shows before the validation message. */
66
81
  showValidateIcon?: boolean;
82
+ /** The disabled applied to every field; the disabled of a field takes precedence. */
67
83
  disabled?: boolean;
84
+ /** Whether validation with rules stops at the first failing rule. The same prop on a field takes precedence. */
68
85
  stopValidateWithError?: boolean;
86
+ /** When fields validate: change, blur, mount, custom or an array of them. The same prop on a field takes precedence. */
69
87
  trigger?: FieldValidateTriggerType;
88
+ /** Whether the submit and reset events stop bubbling, to keep a nested Form from triggering the outer Form. */
70
89
  stopPropagation?: {
71
90
  submit?: boolean;
72
91
  reset?: boolean;
@@ -79,20 +98,27 @@ export interface AllFormProps<Values extends Record<string, any> = any, Output =
79
98
  schemaDebounce?: number;
80
99
  /** Whether an unmounted field or ArrayField keeps its value, error and touched state; a field's own `keepState` wins */
81
100
  keepState?: boolean;
101
+ /** The formApi returned by useForm, to control the form from outside the Form. */
82
102
  form?: FormApi<Values, Output>;
83
103
  /** Also written to `x-form-id`; generated when missing */
84
104
  id?: string;
105
+ /** Called after the submit button or formApi.submitForm and a passing validation, with the values and the submit event. With `schema`, the values are the schema's output. */
85
106
  onSubmit?: (values: Output, e?: SubmitEvent) => void;
86
107
  /** `errors` is the error tree of the failed fields, or what the Form validator threw */
87
108
  onSubmitFail?: (errors: Partial<AllErrors<Values>> | unknown, values: Partial<Values>, e?: SubmitEvent) => void;
109
+ /** Called when the reset button or formApi.reset resets the form. */
88
110
  onReset?: () => void;
111
+ /** Called when the form state updates, including field mount, unmount, value change, blur, and changes of validation status and errors, with the formState. */
89
112
  onChange?: (formState: FormState<Values>) => void;
113
+ /** Called when a field value changes, with all values and the changed field values. */
90
114
  onValueChange?: (values: Values, changedValues: Partial<Values>) => void;
115
+ /** Called when the validation state updates, with all errors and the changed field errors. A batch such as validate, submit or reset calls it once, and silent validation does not call it. */
91
116
  onErrorChange?: (errors: AllErrors<Values>, changedError?: Partial<Record<FieldPath<Values>, FieldError>>) => void;
92
117
  /** scrollToField or focusField found nothing rendered at `field`: expand the collapsed container that holds it */
93
118
  onRevealField?: (field: FieldPath<Values>) => void;
94
119
  /** Called once when the Form mounts, to save the formApi reference */
95
120
  getFormApi?: (formApi: FormApi<Values, Output>) => void;
121
+ /** Content of the form, with `{ formState, formApi, values }`, for reading only; change the form through formApi. */
96
122
  children?: Snippet<[FormRenderProps<Values, Output>]>;
97
123
  }
98
124
  /** What a field reads; callers pass `rules` or `validator`, not both (`FieldProps` applies ExclusiveFieldValidation) */
@@ -205,50 +231,71 @@ export interface ArrayFieldSnippetProps {
205
231
  onMove: (from: number, to: number) => void;
206
232
  }
207
233
  export interface ArrayFieldProps {
234
+ /** Path of the array in formState.values, required. For row fields such as a[0].name and a[1].name, pass a. */
208
235
  field: string;
236
+ /** Initial value of the array, which must be an array; it takes precedence over the initValues of the Form. */
209
237
  initValue?: unknown[];
210
238
  /** Keeps the rows in the form values while the ArrayField is unmounted; unset follows the Form */
211
239
  keepState?: boolean;
240
+ /** Content of the rows, with `{ arrayFields, onAdd, onAddWithInitValue, onMove }`. `onMove(from, to)` moves a row with its values, errors and touched state, clamping indexes out of range. */
212
241
  children?: Snippet<[ArrayFieldSnippetProps]>;
213
242
  }
214
243
  export interface ErrorMessageProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
215
244
  /** The messages, joined with commas; `['']` fails without a text, and hides the help text too */
216
245
  error?: FieldError;
246
+ /** Whether the icon of validateStatus shows. */
217
247
  showValidateIcon?: boolean;
248
+ /** Validation status of the message: default, error, warning or success. */
218
249
  validateStatus?: ValidateStatus;
250
+ /** Whether it sits in an InputGroup; with true and showValidateIcon true, the error icon shows whatever validateStatus is. */
219
251
  isInInputGroup?: boolean;
220
252
  /** The id of the error text, the target of the control's aria-errormessage */
221
253
  errorMessageId?: string;
222
254
  /** The id of the help text, the target of the control's aria-describedby */
223
255
  helpTextId?: string;
256
+ /** Help text, shown when there is no error, in the same block as the error. */
224
257
  helpText?: Snippet;
258
+ /** Custom rendering of the error, with `{ error }`. */
225
259
  errorContent?: Snippet<[{
226
260
  error: FieldError;
227
261
  }]>;
228
262
  }
229
263
  export interface SectionProps extends Omit<HTMLFieldsetAttributes, 'children'> {
264
+ /** Title of the section; without content the title element is not rendered. */
230
265
  text?: Snippet;
231
266
  /** Shown below the title and describes the fieldset */
232
267
  extraText?: Snippet;
268
+ /** The fields in the section. */
233
269
  children?: Snippet;
234
270
  }
235
271
  export interface SlotProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
272
+ /** The Label text, or a Label configuration such as text, align, width, required, optional and id; the `fieldLabel` snippet takes precedence. */
236
273
  label?: string | number | FieldLabel;
274
+ /** Position of the Label, taken from the Form by default: top or left. */
237
275
  labelPosition?: 'top' | 'left';
276
+ /** Whether to leave out the Label; with both labelCol and wrapperCol set on the Form, the Label column stays. */
238
277
  noLabel?: boolean;
278
+ /** The error, a string array, rendered after the content; omitted when not given. */
239
279
  error?: FieldError;
280
+ /** The custom content to place. */
240
281
  children?: Snippet;
282
+ /** Label content, which takes precedence over the text in the label prop. */
241
283
  fieldLabel?: Snippet;
284
+ /** Content that follows the Label text. */
242
285
  labelExtra?: Snippet;
286
+ /** Custom rendering of the error, with `{ error }`. */
243
287
  errorContent?: Snippet<[{
244
288
  error: FieldError;
245
289
  }]>;
246
290
  }
247
291
  export interface InputGroupProps extends Omit<BaseInputGroupProps, 'label'> {
292
+ /** The Label of the whole Group: a string is the text, an object is a Label configuration whose id is the id of the Label; the `fieldLabel` snippet takes precedence. */
248
293
  label?: string | number | (FieldLabel & {
249
294
  id?: string;
250
295
  });
296
+ /** Position of extraText: middle puts it between the Label and the Group, bottom after the Group. */
251
297
  extraTextPosition?: 'bottom' | 'middle';
298
+ /** Extra hint, always shown, referred to by the aria-describedby of every control in the group. */
252
299
  extraText?: Snippet;
253
300
  }
254
301
  interface SchemaNodeContext {
@@ -4,21 +4,34 @@ import type { Gutter } from '@fibrae/semi-foundation/components/grid/gutter';
4
4
  import type { ColSize } from '@fibrae/semi-foundation/components/grid/utils';
5
5
  export type { Breakpoint, ColSize, Gutter };
6
6
  export interface RowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'align'> {
7
+ /** Vertical alignment of the children: top, middle or bottom. */
7
8
  align?: 'top' | 'middle' | 'bottom';
9
+ /** Horizontal arrangement of the children: start, end, center, space-around or space-between. */
8
10
  justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between';
9
11
  /** A pair is [horizontal, vertical] */
10
12
  gutter?: Gutter | [Gutter, Gutter];
11
13
  }
12
14
  export interface ColProps extends HTMLAttributes<HTMLDivElement> {
15
+ /** Number of columns the cell spans. 0 behaves like display: none. */
13
16
  span?: number;
17
+ /** Column order. */
14
18
  order?: number;
19
+ /** Number of columns to offset from the start side. No column can sit inside the offset. */
15
20
  offset?: number;
21
+ /** Number of columns to move toward the end side. */
16
22
  push?: number;
23
+ /** Number of columns to move toward the start side. */
17
24
  pull?: number;
25
+ /** Base-layer responsive grid. It applies at every screen width, as a column count or an object. */
18
26
  xs?: number | ColSize;
27
+ /** Responsive grid for screens ≥576px, as a column count or an object. */
19
28
  sm?: number | ColSize;
29
+ /** Responsive grid for screens ≥768px, as a column count or an object. */
20
30
  md?: number | ColSize;
31
+ /** Responsive grid for screens ≥992px, as a column count or an object. */
21
32
  lg?: number | ColSize;
33
+ /** Responsive grid for screens ≥1200px, as a column count or an object. */
22
34
  xl?: number | ColSize;
35
+ /** Responsive grid for screens ≥1600px, as a column count or an object. */
23
36
  xxl?: number | ColSize;
24
37
  }
@@ -10,11 +10,18 @@ export interface ComplexSearchWord {
10
10
  export type SearchWord = string | ComplexSearchWord | undefined;
11
11
  export type SearchWords = SearchWord[];
12
12
  export interface HighlightProps {
13
+ /** Whether to escape regular expression characters in searchWords. */
13
14
  autoEscape?: boolean;
15
+ /** Whether matching is case sensitive. */
14
16
  caseSensitive?: boolean;
17
+ /** Source text. */
15
18
  sourceString?: string;
19
+ /** Text to highlight: a string, a string array, or an array of objects with text, class and style. */
16
20
  searchWords?: string | SearchWords;
21
+ /** Class names of the highlight tag, keyed by highlight; values take anything class takes (string, array or object) and merge with the built-in classes. The class of a `searchWords` item is appended after them. */
17
22
  classNames?: Partial<Record<HighlightPart, ClassValue>>;
23
+ /** Style string of the highlight tag, keyed by highlight. The style of a `searchWords` item is applied after it. */
18
24
  styles?: Partial<Record<HighlightPart, string>>;
25
+ /** Tag name of the highlight element. */
19
26
  component?: string;
20
27
  }
@@ -2,9 +2,12 @@ import type { HTMLAttributes } from 'svelte/elements';
2
2
  export interface HotKeysProps extends HTMLAttributes<HTMLDivElement> {
3
3
  /** Keys that must be pressed together: any number of modifiers and exactly one other key */
4
4
  hotKeys: KeyboardEvent['key'][];
5
+ /** Key labels to show. Defaults to hotKeys. */
5
6
  content?: string[];
7
+ /** Whether the default behavior of the key combination is prevented. */
6
8
  preventDefault?: boolean;
7
9
  /** Element that listens for keydown; defaults to document.body */
8
10
  getListenerTarget?: () => HTMLElement | null | undefined;
11
+ /** Called when the full key combination is pressed, with the native KeyboardEvent. */
9
12
  onHotKey?: (event: KeyboardEvent) => void;
10
13
  }
@@ -14,44 +14,83 @@ export interface PreviewOptions {
14
14
  previewTitle?: string;
15
15
  /** One per entry of `src`; the title of the shown image wins over `previewTitle` */
16
16
  titles?: (string | undefined)[];
17
+ /** Alternative texts of the preview images, one per entry of src. */
17
18
  alts?: (string | undefined)[];
19
+ /** Whether clicking the mask closes the preview. */
18
20
  maskClosable?: boolean;
21
+ /** Whether to show the close button. */
19
22
  closable?: boolean;
23
+ /** Whether Esc closes the preview. */
20
24
  closeOnEsc?: boolean;
25
+ /** Whether switching loops around. */
21
26
  infinite?: boolean;
27
+ /** Whether to show tooltips on the bottom controls. */
22
28
  showTooltip?: boolean;
29
+ /** Whether to preload neighboring images. */
23
30
  preLoad?: boolean;
31
+ /** How many images ahead and behind to preload. */
24
32
  preLoadGap?: number;
33
+ /** Idle time in milliseconds before the preview controls hide. */
25
34
  viewerVisibleDelay?: number;
35
+ /** Zoom change per step. */
26
36
  zoomStep?: number;
37
+ /** Maximum zoom factor. */
27
38
  maxZoom?: number;
39
+ /** Minimum zoom factor. */
28
40
  minZoom?: number;
41
+ /** z-index of the preview layer. */
29
42
  zIndex?: number;
43
+ /** Whether to disable download. */
30
44
  disableDownload?: boolean;
45
+ /** Initial zoom factor of an image, applied once when it first opens or is switched to, clamped by minZoom and maxZoom. */
31
46
  initialZoom?: number;
47
+ /** The crossorigin attribute passed to the preview img element. */
32
48
  crossOrigin?: 'anonymous' | 'use-credentials';
49
+ /** Class names of the inner parts, keyed by `preview` (the preview layer, the `role="dialog"` element); merged with the built-in classes. */
33
50
  classNames?: Partial<Record<ImagePreviewPart, ClassValue>>;
51
+ /** Style strings of the inner parts, keyed like classNames. */
34
52
  styles?: Partial<Record<ImagePreviewPart, string>>;
53
+ /** Tip of the previous button. */
35
54
  prevTip?: string;
55
+ /** Tip of the next button. */
36
56
  nextTip?: string;
57
+ /** Tip of the zoom-in button. */
37
58
  zoomInTip?: string;
59
+ /** Tip of the zoom-out button. */
38
60
  zoomOutTip?: string;
61
+ /** Tip of the rotate button. */
39
62
  rotateTip?: string;
63
+ /** Tip of the download button. */
40
64
  downloadTip?: string;
65
+ /** Tip of the fit-to-page button. */
41
66
  adaptiveTip?: string;
67
+ /** Tip of the original-size button. */
42
68
  originTip?: string;
69
+ /** Parent DOM the preview renders into. A container other than document.body makes the preview non-modal; a custom container needs position: relative. */
43
70
  getPopupContainer?: () => HTMLElement;
71
+ /** Sets the download file name of an image. */
44
72
  setDownloadName?: (src: string) => string;
73
+ /** Called when visibility changes. */
45
74
  onVisibleChange?: (visible: boolean) => void;
75
+ /** Called when the image switches. */
46
76
  onChange?: (index: number) => void;
77
+ /** Called when closed with the close button or Esc; closing by the mask triggers onVisibleChange only. */
47
78
  onClose?: () => void;
79
+ /** Called when the image zooms in. */
48
80
  onZoomIn?: (zoom: number) => void;
81
+ /** Called when the image zooms out. */
49
82
  onZoomOut?: (zoom: number) => void;
83
+ /** Called when switching to the previous image. */
50
84
  onPrev?: (index: number) => void;
85
+ /** Called when switching to the next image. */
51
86
  onNext?: (index: number) => void;
87
+ /** Called when switching between original size and fit-to-page. */
52
88
  onRatioChange?: (type: RatioType) => void;
89
+ /** Called when the image rotates counterclockwise. */
53
90
  onRotateLeft?: (angle: number) => void;
91
+ /** Called when an image is downloaded. */
54
92
  onDownload?: (src: string, index: number) => void;
93
+ /** Called when a download fails. */
55
94
  onDownloadError?: (src: string) => void;
56
95
  }
57
96
  export type ImagePreviewProps = PreviewOptions;
@@ -92,10 +131,15 @@ export interface ImagePreviewIconSnippetProps {
92
131
  }
93
132
  /** Custom nodes of the preview; on Image they apply to its own preview only, not inside a group */
94
133
  export interface PreviewSnippets {
134
+ /** Replaces the content of the title section at the top of the preview; when there is a title, the dialog is named by the text the snippet renders. It applies to this Image's own preview only and has no effect inside an ImagePreview. */
95
135
  title?: Snippet<[ImagePreviewTitleSnippetProps]>;
136
+ /** Custom bottom menu of the preview. It applies to this Image's own preview only and has no effect inside an ImagePreview. */
96
137
  previewMenu?: Snippet<[MenuProps]>;
138
+ /** Custom previous icon. It applies to this Image's own preview only and has no effect inside an ImagePreview. */
97
139
  leftIcon?: Snippet<[ImagePreviewIconSnippetProps]>;
140
+ /** Custom next icon. It applies to this Image's own preview only and has no effect inside an ImagePreview. */
98
141
  rightIcon?: Snippet<[ImagePreviewIconSnippetProps]>;
142
+ /** Custom close icon. It applies to this Image's own preview only and has no effect inside an ImagePreview. */
99
143
  closeIcon?: Snippet;
100
144
  }
101
145
  type NativeKeys = 'children' | 'title' | 'onchange';
@@ -108,25 +152,40 @@ export interface PreviewProps extends Omit<HTMLAttributes<HTMLDivElement>, Nativ
108
152
  visible?: boolean;
109
153
  /** Bindable; leave it out for an uncontrolled preview. `bind:currentIndex={get, set}` makes it fully controlled */
110
154
  currentIndex?: number;
155
+ /** Whether to lazy-load the images of the group. */
111
156
  lazyLoad?: boolean;
157
+ /** The rootMargin of the lazy-load observer, relative to the viewport; scrolling ancestors still clip. */
112
158
  lazyLoadMargin?: string;
159
+ /** Snippet for the Image components to preview. */
113
160
  children?: Snippet;
114
161
  }
115
162
  type ImgNativeKeys = 'src' | 'width' | 'height' | 'alt' | 'crossorigin' | 'onload' | 'onerror' | 'children' | 'title' | 'placeholder';
116
163
  /** `class` and `style` go on the thumbnail element; the other attributes land on the img */
117
164
  export interface ImageProps extends Omit<HTMLImgAttributes, ImgNativeKeys>, PreviewSnippets {
165
+ /** Image source URL. */
118
166
  src?: string;
167
+ /** Display width of the image; a number is in px. */
119
168
  width?: string | number;
169
+ /** Display height of the image; a number is in px. */
120
170
  height?: string | number;
171
+ /** Image description, also the accessible name of a previewable thumbnail. */
121
172
  alt?: string;
173
+ /** The crossorigin attribute passed to the native img element. */
122
174
  crossOrigin?: 'anonymous' | 'use-credentials';
123
175
  /** A string is the src of the image shown when loading fails; a snippet renders instead of it */
124
176
  fallback?: string | Snippet;
177
+ /** Snippet for the placeholder content shown until the image has loaded. */
125
178
  placeholder?: Snippet;
179
+ /** Preview options; false disables preview. The object carries data and callbacks only; use the Image snippets for custom content. */
126
180
  preview?: boolean | ImagePreviewProps;
181
+ /** Class names of the inner parts, keyed by `img` (the inner img element); merged with the built-in classes. */
127
182
  classNames?: Partial<Record<ImagePart, ClassValue>>;
183
+ /** Style strings of the inner parts, keyed like classNames. */
128
184
  styles?: Partial<Record<ImagePart, string>>;
185
+ /** Sets the download file name of the image. */
129
186
  setDownloadName?: (src: string) => string;
187
+ /** Called when the image has loaded. */
130
188
  onLoad?: (event: Event) => void;
189
+ /** Called when the image fails to load. */
131
190
  onError?: (event: Event) => void;
132
191
  }
@@ -19,49 +19,81 @@ type NativeInputKeys = 'children' | 'value' | 'defaultValue' | 'size' | 'type' |
19
19
  export interface InputProps extends Omit<HTMLInputAttributes, NativeInputKeys> {
20
20
  /** Bindable; leave it out for an uncontrolled input. `bind:value={get, set}` makes it fully controlled */
21
21
  value?: string | number;
22
+ /** Input size: large, default or small. */
22
23
  size?: InputSize;
24
+ /** The type of the native input. */
23
25
  type?: string;
26
+ /** Input mode; password shows a button that reveals or hides the text. */
24
27
  mode?: InputMode;
28
+ /** Whether the input is disabled. */
25
29
  disabled?: boolean;
26
30
  /** Locks typing and hides the clear button; the native `readOnly` locks typing only */
27
31
  readonly?: boolean;
28
32
  /** Locks typing only, the clear button stays (pickers rely on it) */
29
33
  readOnly?: boolean;
34
+ /** Borderless mode. */
30
35
  borderless?: boolean;
36
+ /** Shows a clear button when the input has content and the pointer or focus is inside the component. */
31
37
  showClear?: boolean;
38
+ /** Hides the suffix while the clear button is shown; by default the two sit side by side. */
32
39
  hideSuffix?: boolean;
33
40
  /** internal prop, DatePicker use it */
34
41
  showClearIgnoreDisabled?: boolean;
35
42
  /** When enabled, `onChange` fires once after an IME composition ends instead of during it */
36
43
  composition?: boolean;
44
+ /** Whether the browser should avoid scrolling the document to show the newly focused element, for focus inside the component. */
37
45
  preventScroll?: boolean;
46
+ /** Focuses the input on mount, using preventScroll. */
38
47
  autofocus?: boolean;
39
48
  /** Counted by `getValueLength` when given, otherwise the native attribute */
40
49
  maxlength?: number;
50
+ /** Minimum length. With getValueLength it is converted accordingly; otherwise the native attribute applies. */
41
51
  minlength?: number;
52
+ /** Hint text shown while the input is empty. */
42
53
  placeholder?: string | number;
54
+ /** Validation status: default, error or warning; error outputs aria-invalid. */
43
55
  validateStatus?: ValidateStatus;
56
+ /** Class names of the inner parts, keyed by input (the native input element); values take any class binding and merge with the built-in classes. */
44
57
  classNames?: Partial<Record<InputPart, ClassValue>>;
58
+ /** Style strings of the inner parts, keyed like classNames. */
45
59
  styles?: Partial<Record<InputPart, string>>;
60
+ /** The id of the element around the insetLabel snippet, for aria-labelledby to point at. */
46
61
  insetLabelId?: string;
62
+ /** Custom string length calculation, used with maxlength and minlength. */
47
63
  getValueLength?: (value: string) => number;
64
+ /** Called when the content changes, with the new value and the event; in IME mode it is called once after the composition ends. This is the callback of Input, not the native change. */
48
65
  onChange?: (value: string, event: InputChangeEvent) => void;
66
+ /** Called when the clear button is activated. */
49
67
  onClear?: (event: MouseEvent) => void;
50
68
  /** focusin on the wrapper, so focus moving among the input and its buttons does not fire it */
51
69
  onFocus?: (event: FocusEvent) => void;
70
+ /** Called when focus leaves the component. The event is the focusout of the wrapper. */
52
71
  onBlur?: (event: FocusEvent) => void;
72
+ /** The native input event. */
53
73
  onInput?: (event: Event) => void;
74
+ /** The native keydown event. */
54
75
  onKeyDown?: (event: KeyboardEvent) => void;
76
+ /** The native keyup event. */
55
77
  onKeyUp?: (event: KeyboardEvent) => void;
78
+ /** Called when Enter is pressed (keydown); the Enter that commits an IME composition does not call it. */
56
79
  onEnterPress?: (event: KeyboardEvent) => void;
80
+ /** Called when an IME composition starts. */
57
81
  onCompositionStart?: (event: CompositionEvent) => void;
82
+ /** Called when an IME composition updates. */
58
83
  onCompositionUpdate?: (event: CompositionEvent) => void;
84
+ /** Called when an IME composition ends. */
59
85
  onCompositionEnd?: (event: CompositionEvent) => void;
86
+ /** Prefix. Text or a Semi icon alone gets horizontal spacing automatically. */
60
87
  prefix?: Snippet;
88
+ /** Suffix. Text or a Semi icon alone gets horizontal spacing automatically. */
61
89
  suffix?: Snippet;
90
+ /** Addon before the input. Text or a Semi icon alone gets horizontal spacing automatically. */
62
91
  addonBefore?: Snippet;
92
+ /** Addon after the input. Text or a Semi icon alone gets horizontal spacing automatically. */
63
93
  addonAfter?: Snippet;
94
+ /** Label inside the input. */
64
95
  insetLabel?: Snippet;
96
+ /** Custom icon of the clear button, effective when showClear is true. */
65
97
  clearIcon?: Snippet;
66
98
  }
67
99
  export interface InputState {
@@ -74,45 +106,76 @@ type NativeTextAreaKeys = 'children' | 'value' | 'defaultValue' | 'placeholder'
74
106
  export interface TextAreaProps extends Omit<HTMLTextareaAttributes, NativeTextAreaKeys> {
75
107
  /** Bindable; leave it out for an uncontrolled textarea. `bind:value={get, set}` makes it fully controlled */
76
108
  value?: string;
109
+ /** Whether the height follows the content; pass `{ minRows, maxRows }` to limit the rows. */
77
110
  autosize?: boolean | AutosizeRow;
111
+ /** Borderless mode. */
78
112
  borderless?: boolean;
113
+ /** Number of visible text lines. */
79
114
  rows?: number;
115
+ /** Visible width in average character widths. */
80
116
  cols?: number;
117
+ /** Hint text shown while the text area is empty. */
81
118
  placeholder?: string;
119
+ /** Maximum number of characters; setting it shows a counter, which turns red when exceeded. The input is not truncated. */
82
120
  maxCount?: number;
121
+ /** Whether to show the counter; it is always shown when maxCount is set. */
83
122
  showCounter?: boolean;
123
+ /** Shows a clear button when the text area has content and the pointer or focus is inside the component. */
84
124
  showClear?: boolean;
125
+ /** Whether the text area is disabled. */
85
126
  disabled?: boolean;
127
+ /** Whether the text area is read-only. */
86
128
  readonly?: boolean;
129
+ /** Focuses the text area on mount. */
87
130
  autofocus?: boolean;
131
+ /** Validation status: default, error or warning; error outputs aria-invalid. */
88
132
  validateStatus?: ValidateStatus;
133
+ /** Whether to enable IME mode; onChange is not called during a composition and is called once after it ends. */
89
134
  composition?: boolean;
90
135
  /** Internal, used by Chat: Enter does not start a new line, Shift+Enter does */
91
136
  disabledEnterStartNewLine?: boolean;
137
+ /** Whether to show line numbers. */
92
138
  showLineNumber?: boolean;
139
+ /** Starting line number. */
93
140
  lineNumberStart?: number;
141
+ /** Class names of the inner parts, keyed by textarea (the native textarea element) and lineNumber (the line number area); values take any class binding and merge with the built-in classes. */
94
142
  classNames?: Partial<Record<TextAreaPart, ClassValue>>;
143
+ /** Style strings of the inner parts, keyed like classNames; the size of textarea comes from autosize, resize and rows, which win on the same property. */
95
144
  styles?: Partial<Record<TextAreaPart, string>>;
96
145
  /** Only takes effect when given; ignored with autosize */
97
146
  resize?: 'none' | 'both' | 'horizontal' | 'vertical' | 'block' | 'inline';
147
+ /** Maximum length. With getValueLength the length is measured and truncated by it; otherwise the native attribute applies. */
98
148
  maxlength?: number;
149
+ /** Minimum length. With getValueLength it is converted accordingly; otherwise the native attribute applies. */
99
150
  minlength?: number;
151
+ /** Custom string length calculation, used with maxlength, minlength and maxCount. */
100
152
  getValueLength?: (value: string) => number;
153
+ /** Called when the content changes, with the new value and the event; in IME mode it is called once after the composition ends. This is the callback of TextArea, not the native change. */
101
154
  onChange?: (value: string, event: TextAreaChangeEvent) => void;
155
+ /** Called when the clear button is activated. */
102
156
  onClear?: (event: MouseEvent) => void;
157
+ /** Called when focus enters the component. */
103
158
  onFocus?: (event: FocusEvent) => void;
159
+ /** Called when focus leaves the component. */
104
160
  onBlur?: (event: FocusEvent) => void;
161
+ /** The native input event. */
105
162
  onInput?: (event: Event) => void;
163
+ /** The native keydown event. */
106
164
  onKeyDown?: (event: KeyboardEvent) => void;
165
+ /** The native keyup event. */
107
166
  onKeyUp?: (event: KeyboardEvent) => void;
167
+ /** Called when Enter is pressed (keydown); the Enter that commits an IME composition does not call it. */
108
168
  onEnterPress?: (event: KeyboardEvent) => void;
109
169
  /** autosize reports the border-box height; a native resize drag reports the content box */
110
170
  onResize?: (size: {
111
171
  height: number;
112
172
  width?: number;
113
173
  }) => void;
174
+ /** Called when an IME composition starts. */
114
175
  onCompositionStart?: (event: CompositionEvent) => void;
176
+ /** Called when an IME composition updates. */
115
177
  onCompositionUpdate?: (event: CompositionEvent) => void;
178
+ /** Called when an IME composition ends. */
116
179
  onCompositionEnd?: (event: CompositionEvent) => void;
117
180
  }
118
181
  export interface TextAreaState {
@@ -129,10 +192,14 @@ export interface InputGroupProps extends Omit<HTMLAttributes<HTMLSpanElement>, '
129
192
  disabled?: boolean;
130
193
  /** Renders a FormLabel that names the group; `name` becomes the group's id */
131
194
  label?: InputGroupLabel;
195
+ /** Label position: top or left. */
132
196
  labelPosition?: 'top' | 'left';
133
197
  /** Label content, in place of `label.text` */
134
198
  fieldLabel?: Snippet;
199
+ /** Extra content of the label. */
135
200
  labelExtra?: Snippet;
201
+ /** Called when an element in the group gains focus (focusin), including when focus moves between children; it is not passed to the children. */
136
202
  onFocus?: (event: FocusEvent) => void;
203
+ /** Called when an element in the group loses focus (focusout), including when focus moves between children; it is not passed to the children. */
137
204
  onBlur?: (event: FocusEvent) => void;
138
205
  }