@kentico/xperience-admin-base 31.7.4 → 31.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/entry.d.ts CHANGED
@@ -127,7 +127,13 @@ declare enum ActionType {
127
127
  * Represents basic set of additional action properties.
128
128
  */
129
129
  declare interface AdditionalActionProps {
130
+ /**
131
+ * Unique identifier of the action.
132
+ */
130
133
  readonly identifier: string;
134
+ /**
135
+ * Name of the client component that renders the action.
136
+ */
131
137
  readonly componentName?: string;
132
138
  }
133
139
 
@@ -182,21 +188,69 @@ export declare interface AssetUploadPlaceholderData {
182
188
  }
183
189
 
184
190
  declare interface BaseButtonProps extends UITestProps {
191
+ /**
192
+ * Render callback producing the interactive element, receiving the computed classes and content.
193
+ */
185
194
  readonly renderComponent: (props: InjectedProps) => React.ReactNode;
195
+ /**
196
+ * Size of the button. Defaults to M.
197
+ */
186
198
  readonly size?: ButtonSize;
199
+ /**
200
+ * Visual variant of the button. Defaults to Secondary.
201
+ */
187
202
  readonly color?: ButtonColor;
203
+ /**
204
+ * Text of the button. Without it the button renders icon-only.
205
+ */
188
206
  readonly label?: string;
207
+ /**
208
+ * Icon rendered before the label. Destructive buttons default to the bin icon.
209
+ */
189
210
  readonly icon?: IconName;
211
+ /**
212
+ * Icon rendered after the label.
213
+ */
190
214
  readonly trailingIcon?: IconName;
215
+ /**
216
+ * Applies the pressed visual state.
217
+ */
191
218
  readonly active?: boolean;
219
+ /**
220
+ * Renders a notification dot in the corner of the button.
221
+ */
192
222
  readonly badge?: boolean;
223
+ /**
224
+ * Stretches the button to the full width of its parent.
225
+ */
193
226
  readonly fillContainer?: boolean;
227
+ /**
228
+ * Applies the destructive styling.
229
+ */
194
230
  readonly destructive?: boolean;
231
+ /**
232
+ * Shows a spinner instead of the icon and disables the button.
233
+ */
195
234
  readonly inProgress?: boolean;
235
+ /**
236
+ * Disables the button.
237
+ */
196
238
  readonly disabled?: boolean;
239
+ /**
240
+ * Applies the flat borderless styling.
241
+ */
197
242
  readonly borderless?: boolean;
243
+ /**
244
+ * Tab index of the button element.
245
+ */
198
246
  readonly tabIndex?: number;
247
+ /**
248
+ * Drag handle props from @hello-pangea/dnd making the button act as a drag handle.
249
+ */
199
250
  readonly dragHandleProps?: DraggableProvidedDragHandleProps | null;
251
+ /**
252
+ * Additional class name of the button element.
253
+ */
200
254
  readonly className?: string;
201
255
  }
202
256
 
@@ -208,8 +262,17 @@ declare enum ButtonColor {
208
262
  }
209
263
 
210
264
  declare interface ButtonProps extends HTMLButtonProps, Omit<BaseButtonProps, 'renderComponent'> {
265
+ /**
266
+ * HTML type of the button element. Defaults to 'button'.
267
+ */
211
268
  readonly type?: ButtonType;
269
+ /**
270
+ * Ref to the button element, typically used to anchor drop-down menus.
271
+ */
212
272
  readonly buttonRef?: RefObject<HTMLButtonElement>;
273
+ /**
274
+ * Element the tooltip popup is appended to.
275
+ */
213
276
  readonly tooltipAppendTo?: Element;
214
277
  }
215
278
 
@@ -326,7 +389,13 @@ declare interface DialogAction extends Omit<DialogFooterActionProps, 'color'> {}
326
389
 
327
390
  declare interface DialogFooterActionProps
328
391
  extends Pick<ButtonProps, 'icon' | 'trailingIcon' | 'destructive' | 'disabled' | 'inProgress' | 'color' | 'onClick'>, UITestProps {
392
+ /**
393
+ * Label of the action button.
394
+ */
329
395
  readonly label: string;
396
+ /**
397
+ * Tooltip of the action button.
398
+ */
330
399
  readonly tooltipText?: string;
331
400
  }
332
401
 
@@ -342,7 +411,13 @@ declare interface DialogHandlers {
342
411
  * Represents information about form field.
343
412
  */
344
413
  export declare interface FieldInfo<TValues extends FieldInfoValueType = FieldInfoValueType> {
414
+ /**
415
+ * Name of the field. Serves as the field's key in the form value store.
416
+ */
345
417
  readonly name: string;
418
+ /**
419
+ * Snapshot of all current form field values keyed by field name. Supplied by the form runtime for cross-field logic such as validation rules.
420
+ */
346
421
  readonly fieldValues: TValues;
347
422
  }
348
423
 
@@ -421,7 +496,8 @@ export declare interface FormComponentProps<TValue extends FormFieldValue = Form
421
496
  readonly labelActionsElement?: React.ReactNode;
422
497
  /**
423
498
  * The callback function called when the value of the form component changes.
424
- * * @argument value changed value of the form component.
499
+ *
500
+ * @param value Changed value of the form component.
425
501
  */
426
502
  readonly onChange?: (value?: TValue) => void;
427
503
  /**
@@ -970,8 +1046,17 @@ export declare interface ValidationRule<P extends ValidationRuleProps, TValue ex
970
1046
  * Represents basic set of validation rule properties.
971
1047
  */
972
1048
  export declare interface ValidationRuleProps {
1049
+ /**
1050
+ * Name of the validation rule.
1051
+ */
973
1052
  readonly ruleName: string;
1053
+ /**
1054
+ * Indicates whether the rule is currently satisfied.
1055
+ */
974
1056
  readonly isValid: boolean;
1057
+ /**
1058
+ * Error message displayed when the rule is not satisfied.
1059
+ */
975
1060
  readonly errorMessage: string | null;
976
1061
  }
977
1062