@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
@@ -100,64 +100,109 @@ export interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, NativeKe
100
100
  value?: TreeValue;
101
101
  /** Only a new array updates the tree: changes made in place are not seen */
102
102
  treeData?: TreeNodeData[];
103
+ /** Node data as a plain JSON object; the value is a JSON object holding the selected nodes. */
103
104
  treeDataSimpleJson?: TreeDataSimpleJson;
105
+ /** Custom field names for key, label and value in a node. When label is mapped and search is on, set treeNodeFilterProp to one of the keys in treeData or provide filterTreeNode. */
104
106
  keyMaps?: TreeKeyMapProps;
105
107
  /** Bindable, like `value` */
106
108
  expandedKeys?: string[];
109
+ /** Expands every node on mount. Later changes of treeData or treeDataSimpleJson do not affect it; use expandAll for that. */
107
110
  defaultExpandAll?: boolean;
111
+ /** Expands every node, and keeps doing so when the data changes. */
108
112
  expandAll?: boolean;
113
+ /** Whether the parents of the nodes in expandedKeys expand automatically when expandedKeys changes; they always do on mount. When on, a controlled tree collapses a parent only after its expanded children are collapsed. */
109
114
  autoExpandParent?: boolean;
115
+ /** Whether dragging over a collapsed node expands it. */
110
116
  autoExpandWhenDragEnter?: boolean;
117
+ /** When a parent is selected the value leaves out its descendants; applies when leafOnly is false. */
111
118
  autoMergeValue?: boolean;
119
+ /** Shows each node as a whole row, highlighting the row on hover and selection; when off only the label is highlighted. */
112
120
  blockNode?: boolean;
121
+ /** How the checked states of nodes relate in a multiple tree: related links parents and children, unRelated keeps them independent. */
113
122
  checkRelation?: CheckRelation;
123
+ /** Directory mode with built-in folder icons, which the icon snippet can replace. */
114
124
  directory?: boolean;
125
+ /** Disables the whole tree. A node with disabled: false does not lift it. */
115
126
  disabled?: boolean;
127
+ /** Strict disabling: a disabled node cannot change state through the selection of its parent or children. */
116
128
  disableStrictly?: boolean;
129
+ /** Whether nodes can be dragged, used together with onDrop. It cannot be combined with virtualize. */
117
130
  draggable?: boolean;
131
+ /** Hides the drag image of the node being dragged. */
118
132
  hideDraggingNode?: boolean;
133
+ /** How a node expands: false only through the arrow, click on a click, doubleClick on a double click. The keyboard does not use it. */
119
134
  expandAction?: ExpandAction;
135
+ /** In a multiple tree, the value and the payload of onChange hold leaf nodes only. */
120
136
  leafOnly?: boolean;
121
137
  /** Bindable, like `value` */
122
138
  loadedKeys?: string[];
139
+ /** Whether expanding and collapsing are animated; animation is off for a virtualized tree. */
123
140
  motion?: boolean;
141
+ /** Whether several nodes can be selected. A parent is checked automatically once all its children are. */
124
142
  multiple?: boolean;
143
+ /** When true the argument of onChange is the node object with value, label and other fields instead of the value; a controlled value must then be objects with a value. */
125
144
  onChangeWithObject?: boolean;
145
+ /** Whether the search box shows a clear button. */
126
146
  showClear?: boolean;
147
+ /** Shows only the filtered nodes while searching. */
127
148
  showFilteredOnly?: boolean;
149
+ /** Shows connecting lines between nodes. */
128
150
  showLine?: boolean;
151
+ /** The node field matched against the search input, label by default. */
129
152
  treeNodeFilterProp?: string;
130
153
  /** On by default for a virtualized tree */
131
154
  labelEllipsis?: boolean;
155
+ /** List virtualization for many nodes: height, width and itemSize (required). Animation is off once enabled. */
132
156
  virtualize?: TreeVirtualize;
157
+ /** Class names of the inner parts, keyed by search (the search box container); values take anything class takes (string, array or object) and merge with the built-in classes. */
133
158
  classNames?: Partial<Record<TreePart, ClassValue>>;
159
+ /** Style strings of the inner parts, keyed like classNames. */
134
160
  styles?: Partial<Record<TreePart, string>>;
161
+ /** Placeholder of the search box. */
135
162
  searchPlaceholder?: string;
163
+ /** Whether search is on. true matches by treeNodeFilterProp; a function customizes the match, with data as the node. */
136
164
  filterTreeNode?: boolean | ((inputValue: string, treeNodeString: string, data?: TreeNodeData) => boolean);
137
165
  /** Loads a node's children; a node without `isLeaf` shows the expand arrow while it is set */
138
166
  loadData?: (treeNode?: TreeNodeData) => Promise<void>;
167
+ /** Called when the selection changes, with the current value. */
139
168
  onChange?: (value: TreeValue) => void;
169
+ /** Called when a node expands or collapses, with the array of expanded keys and an info object holding expanded and node. */
140
170
  onExpand?: (expandedKeys: string[], info: TreeExpandedOtherProps) => void;
171
+ /** Called when a node has loaded, with the set of loaded nodes and the node just loaded. */
141
172
  onLoad?: (loadedKeys: Set<string>, node: TreeNodeData) => void;
173
+ /** Called when a node is selected or deselected, with its key, whether it is selected and its data. */
142
174
  onSelect?: (selectedKey: string, selected: boolean, node: TreeNodeData) => void;
175
+ /** Called when the search input changes; filteredExpandedKeys are the nodes expanded by the search or by value, which controlled expansion can use to show the results. */
143
176
  onSearch?: (input: string, filteredExpandedKeys: string[]) => void;
177
+ /** Called on a right click on a node, with the event and the node data. */
144
178
  onContextMenu?: (event: MouseEvent, node: TreeNodeData) => void;
179
+ /** Called on a double click on a node, with the event and the node data. */
145
180
  onDoubleClick?: (event: MouseEvent, node: TreeNodeData) => void;
181
+ /** Called when a node starts to be dragged. */
146
182
  onDragStart?: (info: TreeDragProps) => void;
183
+ /** Called when a drag enters a node; the argument holds expandedKeys when that expanded a collapsed node. */
147
184
  onDragEnter?: (info: TreeDragEnterProps) => void;
185
+ /** Called while a drag is over a node. */
148
186
  onDragOver?: (info: TreeDragProps) => void;
187
+ /** Called when a drag leaves a node. */
149
188
  onDragLeave?: (info: TreeDragProps) => void;
189
+ /** Called when a drag ends. */
150
190
  onDragEnd?: (info: TreeDragProps) => void;
191
+ /** Called when a node is dropped; the argument holds node, dragNode, dragNodesKeys, dropPosition and dropToGap. */
151
192
  onDrop?: (info: TreeOnDragProps) => void;
193
+ /** Content of a node's label, with `{ item, label, searchWord }` as its argument. Search still matches the label text in treeData. */
152
194
  label?: Snippet<[TreeLabelSnippetProps]>;
153
195
  /** A row's icon, in place of the directory icon */
154
196
  icon?: Snippet<[TreeIconSnippetProps]>;
197
+ /** The expand icon, with `{ onClick, class, expanded }` as its argument; put `class` and `onclick` on the element it renders. */
155
198
  expandIcon?: Snippet<[TreeExpandIconSnippetProps]>;
156
199
  /** Content of a whole row; the row element carrying the id, role and state wraps it */
157
200
  fullLabel?: Snippet<[TreeFullLabelSnippetProps]>;
158
201
  /** Replaces the search box; `false` hides it while `filterTreeNode` still filters */
159
202
  search?: Snippet<[TreeSearchSnippetProps]> | false;
203
+ /** Content shown when there are no nodes, or when the search finds none with showFilteredOnly on. */
160
204
  emptyContent?: Snippet;
205
+ /** The element the browser shows while a node is dragged, with the node element nodeInstance and the node data node as arguments; on dragstart the snippet is rendered into a detached container and used as the drag image, so only app-level context reaches it. */
161
206
  renderDraggingNode?: Snippet<[TreeDraggingNodeSnippetProps]>;
162
207
  }
163
208
  /** The methods on a Tree instance from `bind:this` */
@@ -69,74 +69,120 @@ type NativeKeys = 'children' | 'prefix' | 'placeholder' | 'onchange' | 'onselect
69
69
  export interface TreeSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, NativeKeys> {
70
70
  /** Bindable; leave it out for an uncontrolled TreeSelect. `bind:value={get, set}` makes it fully controlled */
71
71
  value?: TreeSelectValue;
72
+ /** Whether several nodes can be selected. */
72
73
  multiple?: boolean;
73
74
  /** Only a new array updates the options: changes made in place are not seen */
74
75
  treeData?: TreeNodeData[];
76
+ /** Custom names of the key, label, value, disabled, children, isLeaf and icon fields in a node. If you rename the label field and enable search, set `treeNodeFilterProp` to one of the fields in `treeData`, or pass a custom search function to `filterTreeNode`. */
75
77
  keyMaps?: TreeSelectKeyMapProps;
78
+ /** Property of `TreeNodeData` used to display the text. */
76
79
  treeNodeLabelProp?: string;
80
+ /** Property of `TreeNodeData` matched by search. */
77
81
  treeNodeFilterProp?: string;
82
+ /** Whether the component is searchable, or a function that customizes the search; its third argument is the node data `data`. */
78
83
  filterTreeNode?: boolean | ((inputValue: string, treeNodeString: string, data?: TreeNodeData) => boolean);
84
+ /** Whether only the filtered results are displayed while searching. */
79
85
  showFilteredOnly?: boolean;
86
+ /** Position of the search box: `dropdown` or `trigger`. */
80
87
  searchPosition?: TreeSelectSearchPosition;
88
+ /** Placeholder of the search box in the dropdown. */
81
89
  searchPlaceholder?: string;
90
+ /** Whether the search box is focused on mount. */
82
91
  searchAutoFocus?: boolean;
92
+ /** Whether the search box in the dropdown can be cleared. */
83
93
  showSearchClear?: boolean;
94
+ /** Whether remote search is enabled. When enabled, input skips local filtering and only triggers `onSearch`; the caller fetches the data and updates `treeData`. */
84
95
  remote?: boolean;
96
+ /** Whether to expand all nodes by default. The expansion still follows this prop after `treeData` changes. */
85
97
  expandAll?: boolean;
98
+ /** Whether to expand all nodes on initialization. After `treeData` changes this prop no longer takes effect; use `expandAll` if you need that. */
86
99
  defaultExpandAll?: boolean;
87
100
  /** Bindable, like `value` */
88
101
  expandedKeys?: string[];
102
+ /** Whether parent nodes expand automatically. */
89
103
  autoExpandParent?: boolean;
104
+ /** How a node expands: `false` (only the expand icon expands it), `click` or `doubleClick`. */
90
105
  expandAction?: TreeSelectExpandAction;
106
+ /** Whether expanding and collapsing nodes animates. */
91
107
  motionExpand?: boolean;
92
108
  /** Loads a node's children; a node without `isLeaf` shows the expand arrow while it is set */
93
109
  loadData?: (data: TreeNodeData) => Promise<void>;
94
110
  /** Bindable, like `value` */
95
111
  loadedKeys?: string[];
112
+ /** In multiple mode, whether only leaf nodes are displayed as tags, and the values passed to `onChange` are leaf nodes only. */
96
113
  leafOnly?: boolean;
114
+ /** In multiple mode, the relationship between the checked states of nodes: `related` or `unRelated`. With `unRelated`, the checked states of nodes do not affect each other. */
97
115
  checkRelation?: CheckRelation;
116
+ /** Strict disabling: when a node is disabled, its checked state cannot be changed through its parent or child nodes. */
98
117
  disableStrictly?: boolean;
118
+ /** Whether to merge the value: when on, selecting a parent node keeps its descendants out of the value. Works only when `leafOnly` is false. */
99
119
  autoMergeValue?: boolean;
100
120
  /** `value` and `onChange` carry the nodes instead of their values */
101
121
  onChangeWithObject?: boolean;
122
+ /** Maximum number of tags displayed; the rest are shown as +N. */
102
123
  maxTagCount?: number;
124
+ /** When the number of tags exceeds `maxTagCount`, whether hovering +N shows the remaining tags in a Popover. */
103
125
  showRestTagsPopover?: boolean;
126
+ /** Popover configuration for the collapsed tags beyond `maxTagCount`. */
104
127
  restTagsPopoverProps?: PopoverProps;
105
128
  /** On by default for a virtualized list */
106
129
  labelEllipsis?: boolean;
130
+ /** Whether the nodes in the option panel show connecting lines. */
107
131
  showLine?: boolean;
132
+ /** Virtual list configuration: an object with `itemSize` (required, the height of each row), `height` (the height of the dropdown, a number recommended) and `width`. Animation is disabled when virtualized. */
108
133
  virtualize?: TreeVirtualize;
134
+ /** Placeholder of the input box. */
109
135
  placeholder?: string;
136
+ /** Whether the component is disabled. */
110
137
  disabled?: boolean;
138
+ /** Size of the input box: `large`, `small` or `default`. */
111
139
  size?: TreeSelectSize;
140
+ /** Whether to use the borderless style. */
112
141
  borderless?: boolean;
142
+ /** Validation status: `warning`, `error` or `default`. It only affects the background color of the component. */
113
143
  validateStatus?: ValidateStatus;
114
144
  /** The id of the element around the `insetLabel` snippet */
115
145
  insetLabelId?: string;
146
+ /** Whether the trigger shows the clear button when the value is not empty. */
116
147
  showClear?: boolean;
117
148
  /** Closes the dropdown once a node is selected in single mode */
118
149
  clickToHide?: boolean;
150
+ /** When the panel is open, whether clicking the trigger closes it. */
119
151
  clickTriggerToHide?: boolean;
120
152
  /** Opens the dropdown on mount; TreeSelect has no controlled open state */
121
153
  defaultOpen?: boolean;
154
+ /** Whether the dropdown animates in and out. */
122
155
  motion?: boolean;
156
+ /** Whether the popup flips its direction automatically when it is covered. */
123
157
  autoAdjustOverflow?: boolean;
158
+ /** Position of the popup; the values follow the position of Tooltip. Defaults to `bottomLeft` (`bottomRight` in RTL). */
124
159
  position?: Position;
160
+ /** Whether click events on the dropdown panel stop bubbling. */
125
161
  stopPropagation?: boolean | string;
162
+ /** Class names of the inner parts, keyed by dropdown (the dropdown panel) and optionList (the option list, the role="tree" element); values take anything class takes (string, array or object) and merge with the built-in classes. */
126
163
  classNames?: Partial<Record<TreeSelectPart, ClassValue>>;
164
+ /** Style strings of the inner parts, keyed like classNames. */
127
165
  styles?: Partial<Record<TreeSelectPart, string>>;
166
+ /** Whether the minimum width of the dropdown panel matches the width of the select box. */
128
167
  dropdownMatchSelectWidth?: boolean;
168
+ /** Whether the browser avoids scrolling the document to show the newly focused element when the component calls `focus` internally. It does not apply to elements passed in by the user. */
129
169
  preventScroll?: boolean;
170
+ /** Whether selected tags wrap onto multiple lines within the trigger. Only works when `multiple` and search are enabled and `searchPosition` is `trigger`. */
130
171
  triggerTagWrap?: boolean;
131
172
  /** With `onChangeWithObject` the value and the node are both the node */
132
173
  onChange?: (value: TreeSelectValue | undefined, node: TreeNodeData | TreeNodeData[] | undefined, event: TreeSelectChangeEvent) => void;
174
+ /** Called when a node expands or collapses, with the array of expanded keys and `{ expanded, node }`. */
133
175
  onExpand?: (expandedKeys: string[], info: {
134
176
  expanded: boolean;
135
177
  node: TreeNodeData;
136
178
  }) => void;
179
+ /** Called when a node has finished loading. */
137
180
  onLoad?: (loadedKeys: Set<string>, node: TreeNodeData) => void;
181
+ /** Called when a node is selected or deselected, with the key of the node, whether it is selected, and the node data. */
138
182
  onSelect?: (selectedKey: string, selected: boolean, node: TreeNodeData) => void;
183
+ /** Called when the search value changes, with the search value, `filteredExpandedKeys` (keys of the nodes expanded by the search or by the value, useful when the expansion is controlled) and `filteredNodes` (the nodes that match the search). */
139
184
  onSearch?: (input: string, filteredExpandedKeys: string[], filteredNodes: TreeNodeData[]) => void;
185
+ /** Called when the dropdown panel is shown or hidden, with whether it is visible. */
140
186
  onVisibleChange?: (visible: boolean) => void;
141
187
  /**
142
188
  * Focus entering the trigger or the dropdown from outside (the focusin); moving within them does not fire it again.
@@ -148,8 +194,11 @@ export interface TreeSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, Na
148
194
  * the trigger and the dropdown
149
195
  */
150
196
  onBlur?: (event: MouseEvent | KeyboardEvent | FocusEvent) => void;
197
+ /** Called when the clear button is clicked. */
151
198
  onClear?: (event: TreeSelectChangeEvent) => void;
199
+ /** Snippet for a node's label, receiving `{ item, label, searchWord }`: the node data, the original label and the search word; usage is the same as the `label` of Tree. */
152
200
  label?: Snippet<[TreeLabelSnippetProps]>;
201
+ /** Snippet for a node's icon, receiving `{ item, level, expanded, isLeaf, loading, selected, checked, halfChecked }`; usage is the same as the `icon` of Tree. */
153
202
  icon?: Snippet<[TreeIconSnippetProps]>;
154
203
  /** A single element gets the class and the click that expands */
155
204
  expandIcon?: Snippet<[TreeExpandIconSnippetProps]>;
@@ -159,19 +208,25 @@ export interface TreeSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, Na
159
208
  selectedItem?: Snippet<[TreeSelectSelectedItemSnippetProps]>;
160
209
  /** Replaces each tag in multiple mode, ahead of `selectedItem` */
161
210
  tag?: Snippet<[TreeSelectSelectedItemSnippetProps]>;
211
+ /** Snippet that replaces the trigger content. Its parameters are `value` (the data of the selected nodes), `inputValue`, `placeholder`, `disabled`, `componentProps` (all the props given to TreeSelect), `onSearch` (updates the search keyword; needs `filterTreeNode` and a `searchPosition` of `trigger`), `onClear` (pass the click event when bound to a control inside the trigger, so the click does not open the dropdown) and `onRemove` (unchecks the node with the key). */
162
212
  trigger?: Snippet<[TreeSelectTriggerSnippetProps]>;
163
213
  /** Replaces the search box; `false` hides it while `filterTreeNode` still filters */
164
214
  search?: Snippet<[TreeSelectSearchSnippetProps]> | false;
215
+ /** Snippet for the content in front of the select box. */
165
216
  prefix?: Snippet;
217
+ /** Snippet for the content after the select box. */
166
218
  suffix?: Snippet;
219
+ /** Snippet for a label inside the select box, which also names the dropdown tree. It is not rendered, and does not name the component, when `prefix` is used. */
167
220
  insetLabel?: Snippet;
168
221
  /** `null` hides the arrow */
169
222
  arrowIcon?: Snippet | null;
223
+ /** Snippet for the icon of the clear button, effective when `showClear` is true. */
170
224
  clearIcon?: Snippet;
171
225
  /** `null` hides the empty state */
172
226
  emptyContent?: Snippet | null;
173
227
  /** Above the tree; it takes the place of the dropdown search box */
174
228
  outerTopSlot?: Snippet;
229
+ /** Snippet rendered at the bottom of the dropdown panel, at the same level as the option list. */
175
230
  outerBottomSlot?: Snippet;
176
231
  }
177
232
  /** The methods on a TreeSelect instance from `bind:this` */
@@ -44,14 +44,23 @@ export interface TypographyProps extends HTMLAttributes<HTMLElement> {
44
44
  }
45
45
  /** Props every Typography component takes besides the attributes of its root element */
46
46
  export interface TypographyCommonProps {
47
+ /** Tag name of the element to render. Defaults to span. */
47
48
  component?: string;
49
+ /** Whether the text can be copied; pass an object for the Copyable Config. */
48
50
  copyable?: TypographyCopyableConfig | boolean;
51
+ /** Adds a strikethrough. */
49
52
  delete?: boolean;
53
+ /** Disables the text. */
50
54
  disabled?: boolean;
55
+ /** Whether the text is a link; with an object, its attributes (href, target, class, style, onclick and so on) are applied to the a element. */
51
56
  link?: LinkType;
57
+ /** Adds a highlight. */
52
58
  mark?: boolean;
59
+ /** Whether the text is bold. */
53
60
  strong?: boolean;
61
+ /** Text type. */
54
62
  type?: TypographyBaseType;
63
+ /** Adds an underline. */
55
64
  underline?: boolean;
56
65
  }
57
66
  export interface TypographyCopyActionProps {
@@ -60,9 +69,13 @@ export interface TypographyCopyActionProps {
60
69
  config: TypographyCopyableConfig;
61
70
  }
62
71
  export interface TypographyCopySnippets {
72
+ /** Snippet for the content of the copy button; a single node with an aria-label names the button, otherwise the locale's "Copy" does. */
63
73
  copyIcon?: Snippet;
74
+ /** Snippet for the tooltip content of the copy button. */
64
75
  copyTip?: Snippet;
76
+ /** Snippet for the content shown after a successful copy. */
65
77
  copySuccessTip?: Snippet;
78
+ /** Snippet that replaces the whole copy node, with the argument `{ copied, copy, config }`; `copy` takes the click event. */
66
79
  copyAction?: Snippet<[TypographyCopyActionProps]>;
67
80
  }
68
81
  export interface TypographyEllipsisTooltipProps {
@@ -71,32 +84,52 @@ export interface TypographyEllipsisTooltipProps {
71
84
  trigger: Snippet;
72
85
  }
73
86
  export interface TypographyEllipsisSnippets {
87
+ /** Snippet for the content of the floating layer when truncated; defaults to the full text. */
74
88
  ellipsisContent?: Snippet;
89
+ /** Snippet for a custom floating layer, rendered only when the text overflows; its argument is `{ content, trigger }`, where `content` is the full text and `trigger` is a snippet of the text element, to be placed in your own layer with `{@render trigger()}`. */
75
90
  ellipsisTooltip?: Snippet<[TypographyEllipsisTooltipProps]>;
76
91
  }
77
92
  export interface TypographyTextProps extends HTMLAttributes<HTMLSpanElement>, TypographyCommonProps, TypographyCopySnippets, TypographyEllipsisSnippets {
93
+ /** Whether the text is wrapped in a code element. */
78
94
  code?: boolean;
95
+ /** Truncates overflowing text; pass an object for the Ellipsis Config. */
79
96
  ellipsis?: Ellipsis | boolean;
97
+ /** Text size; inherit takes the size of the enclosing Text or Paragraph. */
80
98
  size?: TypographyBaseSize;
99
+ /** Font weight as a number. */
81
100
  weight?: number;
101
+ /** Snippet for the prefix icon; a Semi icon is set to small or default according to size. */
82
102
  icon?: Snippet;
83
103
  }
84
104
  export interface TypographyTitleProps extends HTMLAttributes<HTMLHeadingElement>, TypographyCommonProps, TypographyCopySnippets, TypographyEllipsisSnippets {
105
+ /** Truncates overflowing text; pass an object for the Ellipsis Config. */
85
106
  ellipsis?: Ellipsis | boolean;
107
+ /** Heading level, matching h1 to h6. */
86
108
  heading?: ArrayElement<typeof strings.HEADING>;
109
+ /** Font weight: light, regular, medium, semibold, bold, default, or a number. */
87
110
  weight?: ArrayElement<typeof strings.WEIGHT> | number;
88
111
  }
89
112
  export interface TypographyParagraphProps extends HTMLAttributes<HTMLParagraphElement>, TypographyCommonProps, TypographyCopySnippets, TypographyEllipsisSnippets {
113
+ /** Truncates overflowing text; pass an object for the Ellipsis Config. */
90
114
  ellipsis?: Ellipsis | boolean;
115
+ /** Text size; inherit takes the size of the enclosing Text or Paragraph. */
91
116
  size?: TypographyBaseSize;
117
+ /** Line spacing; extended is looser. */
92
118
  spacing?: TypographyBaseSpacing;
93
119
  }
94
120
  export interface TypographyNumeralProps extends HTMLAttributes<HTMLSpanElement>, TypographyCommonProps, TypographyCopySnippets {
121
+ /** Whether the text is wrapped in a code element. */
95
122
  code?: boolean;
123
+ /** Custom number parser. */
96
124
  parser?: (value: string) => string;
125
+ /** Number of decimal places to keep. */
97
126
  precision?: number;
127
+ /** Parsing rule: text only rounds, numbers filters out non-numeric characters, bytes-decimal and bytes-binary convert byte units, percentages converts to percent, exponential converts to scientific notation. */
98
128
  rule?: TypographyBaseRule;
129
+ /** Text size; inherit takes the size of the enclosing Text or Paragraph. */
99
130
  size?: TypographyBaseSize;
131
+ /** How the kept decimals are rounded, matching Math.round, Math.ceil and Math.floor. */
100
132
  truncate?: TypographyBaseTruncate;
133
+ /** Snippet for the prefix icon; a Semi icon is set to small or default according to size. */
101
134
  icon?: Snippet;
102
135
  }
@@ -110,92 +110,142 @@ export interface UploadHandle {
110
110
  }
111
111
  /** The snippets a card renders; Upload forwards its own of the same names to each card */
112
112
  export interface FileCardSnippets {
113
+ /** Custom preview that replaces the thumbnail. Only applies in list mode. It does not fall back to the default thumbnail when empty. */
113
114
  previewFile?: Snippet<[UploadFileItemSlotProps]>;
115
+ /** Custom picture wall thumbnail. Only applies in picture mode. */
114
116
  thumbnail?: Snippet<[UploadFileItemSlotProps]>;
117
+ /** Custom picture wall information. Only applies in picture mode with showPicInfo set to true. */
115
118
  picInfo?: Snippet<[UploadFileItemSlotProps]>;
119
+ /** Custom preview icon shown on hover in the picture wall. Only applies in picture mode. */
116
120
  picPreviewIcon?: Snippet<[UploadFileItemSlotProps]>;
121
+ /** Custom close button of the picture wall, with class and onRemove. Only applies in picture mode. */
117
122
  picClose?: Snippet<[UploadPicCloseSlotProps]>;
123
+ /** Custom operation area of a list item. */
118
124
  fileOperation?: Snippet<[UploadFileItemSlotProps]>;
119
125
  /** Replaces a card's validate message, which the snippet gets as `validateMessage` */
120
126
  fileValidateMessage?: Snippet<[UploadFileItemSlotProps]>;
127
+ /** Custom popup content for a truncated file name, with content and trigger; trigger is the file name element to place in the popup. */
121
128
  ellipsisTooltip?: Snippet<[TypographyEllipsisTooltipProps]>;
122
129
  }
123
130
  export interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onchange' | 'ondrop' | 'onerror' | 'onprogress' | 'children'>, FileCardSnippets {
131
+ /** Accepted file types, written like the accept attribute of input: file extensions such as `.jpg` or MIME types, separated by commas. */
124
132
  accept?: string;
133
+ /** Upload URL. Required. */
125
134
  action: string;
126
135
  /** Adds the files pasted anywhere on the page */
127
136
  addOnPasting?: boolean;
137
+ /** Hook after an upload completes without error. The returned object updates the file status, validate message, name and preview URL. Async results are not supported. */
128
138
  afterUpload?: (object: AfterUploadProps) => AfterUploadResult;
139
+ /** Called before the list is cleared. Returning false, or a Promise that resolves to false or rejects, blocks the clear. */
129
140
  beforeClear?: (fileList: FileItem[]) => boolean | Promise<boolean>;
130
141
  /**
131
142
  * Called once, with the first selected image, before the crop modal opens; its result decides cropping for the
132
143
  * whole batch. `false` (or a Promise resolving to it) uploads without cropping.
133
144
  */
134
145
  beforeCrop?: (file: File, fileList: File[]) => boolean | Promise<boolean>;
146
+ /** Called before a file is removed. Returning false, or a Promise that resolves to false or rejects, blocks the removal. */
135
147
  beforeRemove?: (file: FileItem, fileList: FileItem[]) => boolean | Promise<boolean>;
148
+ /** Hook before a file is uploaded. The returned object updates the file status and decides whether to upload. A boolean means pass or fail; for a Promise, resolve passes and reject fails. */
136
149
  beforeUpload?: (object: BeforeUploadProps) => BeforeUploadObjectResult | Promise<BeforeUploadObjectResult> | boolean;
150
+ /** How media is captured: user or environment. true renders the attribute with an empty value, false omits it. */
137
151
  capture?: boolean | 'user' | 'environment';
152
+ /** Class names of the inner parts, keyed by `item` (each file card); merged with the built-in classes. */
138
153
  classNames?: Partial<Record<UploadPart, ClassValue>>;
139
154
  /** `true` crops with the defaults; an object configures the cropper */
140
155
  crop?: boolean | UploadCropProps;
156
+ /** Props of the crop Modal. visible, title, okText, cancelText, onOk, onCancel and children belong to Upload; style and every value of styles are style strings. */
141
157
  cropModalProps?: UploadCropModalProps;
142
158
  /** Replaces the built-in XMLHttpRequest */
143
159
  customRequest?: (object: UploadCustomRequestArgs) => void;
160
+ /** Extra parameters sent with the upload, or a function that returns them for a file. */
144
161
  data?: Record<string, any> | ((file: File) => Record<string, unknown>);
162
+ /** Whether to upload a folder. */
145
163
  directory?: boolean;
164
+ /** Whether Upload is disabled. A disabled Upload no longer shows the remove, retry, replace and clear actions. */
146
165
  disabled?: boolean;
166
+ /** Whether dragging files to upload is supported. */
147
167
  draggable?: boolean;
148
168
  /** Bindable; the list on screen. `undefined` leaves the list to the component */
149
169
  fileList?: FileItem[];
170
+ /** Same as name. Mainly used in FormUpload to avoid clashing with the name of Field. */
150
171
  fileName?: string;
172
+ /** Headers sent with the upload, or a function that returns them for a file. */
151
173
  headers?: Record<string, any> | ((file: File) => Record<string, string>);
152
174
  /** Where the picture wall's add button sits */
153
175
  hotSpotLocation?: 'start' | 'end';
176
+ /** Maximum number of files. With 1, the newest file always replaces the current one and onExceed is not called. */
154
177
  limit?: number;
178
+ /** How the file list is displayed: list, picture or none. none renders no file list, only the trigger area. */
155
179
  listType?: UploadListType;
156
180
  /** KB */
157
181
  maxSize?: number;
158
182
  /** KB */
159
183
  minSize?: number;
184
+ /** Whether several files can be selected at once. */
160
185
  multiple?: boolean;
186
+ /** Field name used for the file when uploading. */
161
187
  name?: string;
188
+ /** Display height of the pictures in picture mode. */
162
189
  picHeight?: string | number;
190
+ /** Display width of the pictures in picture mode. */
163
191
  picWidth?: string | number;
192
+ /** Position of the prompt: left, right or bottom. In list mode it is relative to the trigger, in picture mode to the picture list. */
164
193
  promptPosition?: PromptPositionType;
194
+ /** In list mode, whether to show the clear button when limit is not 1 and there is at least one file. */
165
195
  showClear?: boolean;
196
+ /** Whether to show picture information. Only applies in picture mode. */
166
197
  showPicInfo?: boolean;
198
+ /** Whether the file card shows a replace button after a successful upload. */
167
199
  showReplace?: boolean;
200
+ /** Whether the file card shows a retry button when the upload fails. */
168
201
  showRetry?: boolean;
169
202
  /** Tooltip of a truncated file name; its custom popup is the `ellipsisTooltip` snippet */
170
203
  showTooltip?: boolean | ShowTooltip;
204
+ /** Whether to show the file list. */
171
205
  showUploadList?: boolean;
206
+ /** Style strings of the inner parts, keyed like classNames; in the picture wall `item` is merged with picWidth and picHeight, and the latter win. */
172
207
  styles?: Partial<Record<UploadPart, string>>;
208
+ /** Called after a file is selected and before it is uploaded; returns the File to upload. */
173
209
  transformFile?: (file: File) => File;
210
+ /** When uploading starts: auto uploads on selection, custom waits for the upload method. */
174
211
  uploadTrigger?: 'auto' | 'custom';
212
+ /** Validation status, which styles the root element: default, error, warning or success. */
175
213
  validateStatus?: ValidateStatus;
214
+ /** Whether the upload request carries cookies. */
176
215
  withCredentials?: boolean;
177
216
  /** While present the cards are clickable and get a preview button */
178
217
  onPreviewClick?: (fileItem: FileItem) => void;
179
218
  /** `change` of the Upload, not the native event of the hidden input */
180
219
  onChange?: (object: UploadOnChangeProps) => void;
220
+ /** Called when received files do not match accept, with those files. */
181
221
  onAcceptInvalid?: (files: File[]) => void;
222
+ /** Called after the list is cleared. */
182
223
  onClear?: () => void;
224
+ /** Called when cropping an image fails. */
183
225
  onCropError?: (error: Error) => void;
226
+ /** Called when a dragged element is released on the drag area, with the native drop event, the dropped files and the current file list. */
184
227
  onDrop?: (e: DragEvent, files: File[], fileList: FileItem[]) => void;
185
228
  /** `xhr` is the object a customRequest passed to its onError */
186
229
  onError?: (e: UploadCustomError, file: CustomFile, fileList: FileItem[], xhr: XMLHttpRequest | {
187
230
  status?: number;
188
231
  }) => void;
232
+ /** Called when the total number of files exceeds limit, with the originally selected files before truncation. */
189
233
  onExceed?: (fileList: File[]) => void;
234
+ /** Called after files are selected. */
190
235
  onFileChange?: (files: File[]) => void;
236
+ /** Called when the system file dialog opens. */
191
237
  onOpenFileDialog?: () => void;
192
238
  /** A pasted clipboard file could not be read */
193
239
  onPastingError?: (error: Error) => void;
240
+ /** Called while uploading, with the percentage, the file and the current file list. */
194
241
  onProgress?: (percent: number, file: CustomFile, fileList: FileItem[]) => void;
195
242
  /** `currentFile` is undefined for an item that came without its File, e.g. from an initial fileList */
196
243
  onRemove?: (currentFile: CustomFile | undefined, fileList: FileItem[], currentFileItem: FileItem) => void;
244
+ /** Called when retry is clicked. */
197
245
  onRetry?: (fileItem: FileItem) => void;
246
+ /** Called when a file size violates maxSize or minSize. */
198
247
  onSizeError?: (file: CustomFile, fileList: FileItem[]) => void;
248
+ /** Called after a successful upload, with the server response, the file and the current file list. */
199
249
  onSuccess?: (responseBody: any, file: CustomFile, fileList: FileItem[]) => void;
200
250
  /** The trigger content; in draggable mode it replaces the whole default drag area content */
201
251
  children?: Snippet;
@@ -203,8 +253,11 @@ export interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'oncha
203
253
  dragIcon?: Snippet;
204
254
  /** Falls back to the locale text */
205
255
  dragMainText?: Snippet;
256
+ /** Help text of the drag area. */
206
257
  dragSubText?: Snippet;
258
+ /** Prompt text. Unlike content in children, clicking it does not trigger an upload. */
207
259
  prompt?: Snippet;
260
+ /** Validate message of the whole Upload. */
208
261
  validateMessage?: Snippet;
209
262
  /** Replaces the list title text; the clear button stays */
210
263
  fileListTitle?: Snippet;
@@ -214,23 +267,34 @@ export interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'oncha
214
267
  fileItem?: Snippet<[UploadFileItemSlotProps]>;
215
268
  }
216
269
  export interface FileCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'>, FileCardSnippets {
270
+ /** The file to show. Required. */
217
271
  file: FileItem;
272
+ /** Position of the file in the list. */
218
273
  index?: number;
274
+ /** Display type of the card: list, picture or none. none renders no card. */
219
275
  listType?: UploadListType;
276
+ /** Whether the card is disabled. A disabled card shows no remove, retry or replace button. */
220
277
  disabled?: boolean;
221
278
  /** The file's own `showRetry` wins */
222
279
  showRetry?: boolean;
223
280
  /** The file's own `showReplace` wins */
224
281
  showReplace?: boolean;
282
+ /** Whether to show picture information. Only applies in picture mode. */
225
283
  showPicInfo?: boolean;
284
+ /** Whether a truncated file name shows a tooltip, or the tooltip type and the props passed to it. */
226
285
  showTooltip?: boolean | ShowTooltip;
286
+ /** Width of the picture in picture mode. */
227
287
  picWidth?: string | number;
288
+ /** Height of the picture in picture mode. */
228
289
  picHeight?: string | number;
229
290
  /** Wins over `file.validateMessage` */
230
291
  validateMessage?: string;
231
292
  /** While present the card is clickable and gets a preview button */
232
293
  onPreviewClick?: () => void;
294
+ /** Called when remove is clicked. */
233
295
  onRemove?: () => void;
296
+ /** Called when retry is clicked. */
234
297
  onRetry?: () => void;
298
+ /** Called when replace is clicked. */
235
299
  onReplace?: () => void;
236
300
  }
@@ -30,25 +30,39 @@ export interface UserGuideProps {
30
30
  style?: string;
31
31
  /** Bindable. Undefined lets the component keep it; a bound or function-bound value makes the guide follow it. */
32
32
  current?: number;
33
+ /** Text of the finish button on the last step. When empty, the text from the locale pack is used. */
33
34
  finishText?: string;
35
+ /** In modal mode the dialog is rendered into this DOM node. In popup mode body scrolling is not locked when it points to an element other than body. The popover card sits in the top layer and is not affected. */
34
36
  getPopupContainer?: () => HTMLElement;
37
+ /** Whether to show the mask. A step's own mask overrides it. */
35
38
  mask?: boolean;
39
+ /** Guide mode: popup for a bubble card, modal for a dialog. */
36
40
  mode?: 'popup' | 'modal';
37
41
  /** `onclick` runs before the built-in next or finish handling, which still runs. */
38
42
  nextButtonProps?: UserGuideButtonProps;
43
+ /** Position of the bubble card relative to the target element. A step's own position overrides it. */
39
44
  position?: Position;
45
+ /** Props of the previous button. onclick is called before the built-in handling; use the prevText snippet for the button text. */
40
46
  prevButtonProps?: UserGuideButtonProps;
47
+ /** Whether to show the previous button. It is never shown on the first step. */
41
48
  showPrevButton?: boolean;
49
+ /** Whether to show the skip button. It is never shown on the last step. */
42
50
  showSkipButton?: boolean;
51
+ /** Extra space in pixels around the highlighted area. A step's own spotlightPadding overrides it; 5 when neither is set. */
43
52
  spotlightPadding?: number;
53
+ /** Data of the guide steps. A title or description is a string or a snippet, a cover is a snippet; a snippet receives `{ item, index }`. */
44
54
  steps?: UserGuideStepItem[];
55
+ /** Theme of the popup mode. A step's own theme overrides it. */
45
56
  theme?: 'default' | 'primary';
46
57
  /** Bindable. Skip, Escape and finish write `false`. */
47
58
  visible?: boolean;
59
+ /** The z-index of the mask in popup mode and of the dialog in modal mode. The popover card sits in the top layer, always above the mask. */
48
60
  zIndex?: number;
49
61
  /** The new step index, after `current` was written. */
50
62
  onChange?: (current: number) => void;
63
+ /** Called with the new index when the next button is clicked. The last step calls onFinish instead. */
51
64
  onNext?: (current: number) => void;
65
+ /** Called with the new index when the previous button is clicked. */
52
66
  onPrev?: (current: number) => void;
53
67
  /** Skip button and Escape, after `visible` was written. */
54
68
  onSkip?: () => void;
@@ -56,6 +70,7 @@ export interface UserGuideProps {
56
70
  onFinish?: () => void;
57
71
  /** Text of the next button except on the last step, which shows `finishText`. */
58
72
  nextText?: Snippet;
73
+ /** Snippet for the text of the previous button. Without it the text from the locale pack is used. */
59
74
  prevText?: Snippet;
60
75
  }
61
76
  export type { UserGuideBaseState as UserGuideState } from '@fibrae/semi-foundation/components/user-guide/foundation';