@plesk/ui-library 3.29.0 → 3.29.2

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.
@@ -4,7 +4,7 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
7
- <title>Plesk UI Library 3.29.0</title>
7
+ <title>Plesk UI Library 3.29.2</title>
8
8
  <meta name="msapplication-TileColor" content="#da532c">
9
9
  <meta name="theme-color" content="#ffffff">
10
10
  <link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
@@ -40,6 +40,6 @@
40
40
  </script>
41
41
  <noscript><div><img src="https://mc.yandex.ru/watch/56446840" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
42
42
  <!-- /Yandex.Metrika counter -->
43
- <script src="build/bundle.2a86713c.js"></script>
43
+ <script src="build/bundle.50b6043f.js"></script>
44
44
  </body>
45
45
  </html>
@@ -1,10 +1,12 @@
1
- /// <reference types="react" />
2
- import { IconName } from '../Icon';
1
+ import { ReactElement } from 'react';
2
+ import { IconName, IconProps } from '../Icon';
3
3
  import './IconsLoader.less';
4
4
  declare type IconsLoaderProps = {
5
5
  baseClassName?: string;
6
6
  className?: string;
7
- icons?: IconName[];
7
+ style?: object;
8
+ icons?: (IconName | IconProps | ReactElement<any>)[];
9
+ size?: IconProps['size'];
8
10
  };
9
- declare const IconsLoader: ({ baseClassName, className, icons, ...props }: IconsLoaderProps) => JSX.Element;
11
+ declare const IconsLoader: ({ baseClassName, className, icons, size, style, ...props }: IconsLoaderProps) => JSX.Element;
10
12
  export default IconsLoader;
@@ -1,34 +1,200 @@
1
- import React from 'react';
2
- import { FormInstanceHandles } from './types';
1
+ import React, { ReactNode, ComponentPropsWithRef, ReactElement, MutableRefObject, HTMLProps } from 'react';
2
+ import Button from '../Button';
3
+ import { FormInstanceHandles, FormValues, FormErrors } from './types';
3
4
  import './Form.less';
5
+ export declare type FormProps<FV extends FormValues> = {
6
+ /**
7
+ * Required mark.
8
+ * @since 0.0.54
9
+ */
10
+ requiredMark?: ReactNode;
11
+ /**
12
+ * Hide required legend.
13
+ * @ignore
14
+ * @deprecated
15
+ */
16
+ hideRequiredLegend?: boolean;
17
+ /**
18
+ * Form values.
19
+ * @since 0.0.57
20
+ */
21
+ values?: FV;
22
+ /**
23
+ * Form errors.
24
+ * @since 0.0.57
25
+ */
26
+ errors?: FormErrors;
27
+ /**
28
+ * Current active state
29
+ * @since 0.0.59
30
+ */
31
+ state?: 'submit' | 'apply' | 'cancel';
32
+ /**
33
+ * Content of the `Form`.
34
+ * @since 0.0.54
35
+ */
36
+ children?: ReactNode;
37
+ /**
38
+ * Submit button visibility or custom configuration
39
+ * @since 0.0.58
40
+ */
41
+ submitButton?: boolean | ComponentPropsWithRef<typeof Button>;
42
+ /**
43
+ * Apply button visibility or custom configuration
44
+ * @since 0.0.58
45
+ */
46
+ applyButton?: boolean | ComponentPropsWithRef<typeof Button>;
47
+ /**
48
+ * Cancel button visibility or custom configuration
49
+ * @since 0.0.58
50
+ */
51
+ cancelButton?: boolean | ComponentPropsWithRef<typeof Button>;
52
+ /**
53
+ * Additional buttons
54
+ * @since 0.0.58
55
+ */
56
+ additionalButtons?: ReactNode[];
57
+ /**
58
+ * A callback function, can be executed when some field value is changing.
59
+ * @since 3.1.0
60
+ */
61
+ onFieldChange?: (name: string, value: any) => void;
62
+ /**
63
+ * Submit handler
64
+ * @since 0.0.54
65
+ */
66
+ onSubmit?: (values: FV, isApply?: boolean) => void;
67
+ /**
68
+ * Additional class name for the buttons container.
69
+ * @since 0.0.66
70
+ */
71
+ footerClassName?: string;
72
+ /**
73
+ * Form responsive view will be switched automatically.
74
+ * Specify this parameter explicitly if you want disable this behaviour and choice vertical or horizontal form view.
75
+ * @since 0.4.1
76
+ */
77
+ vertical?: boolean;
78
+ /**
79
+ * @ignore
80
+ */
81
+ className?: string;
82
+ /**
83
+ * @ignore
84
+ */
85
+ baseClassName?: string;
86
+ /**
87
+ * @ignore
88
+ */
89
+ render?: (params: {
90
+ renderForm: (params: {
91
+ actionButtons?: ReactNode;
92
+ }) => ReactElement;
93
+ renderActionButtons: () => ReactElement;
94
+ }) => ReactNode;
95
+ /**
96
+ * @ignore
97
+ */
98
+ innerRef?: MutableRefObject<null | HTMLFormElement>;
99
+ } & Omit<HTMLProps<HTMLFormElement>, 'onSubmit' | 'ref'>;
4
100
  /**
5
101
  * `Form` component is used for entering and submitting of user data.
6
102
  * [More details about designing of forms.](#!/Good%20Forms)
7
103
  * @since 0.0.54
8
104
  */
9
105
  declare const RefForwardingForm: React.ForwardRefExoticComponent<{
106
+ /**
107
+ * Required mark.
108
+ * @since 0.0.54
109
+ */
10
110
  requiredMark?: React.ReactNode;
111
+ /**
112
+ * Hide required legend.
113
+ * @ignore
114
+ * @deprecated
115
+ */
11
116
  hideRequiredLegend?: boolean | undefined;
117
+ /**
118
+ * Form values.
119
+ * @since 0.0.57
120
+ */
12
121
  values?: Record<string, any> | undefined;
122
+ /**
123
+ * Form errors.
124
+ * @since 0.0.57
125
+ */
13
126
  errors?: Record<string, any> | undefined;
127
+ /**
128
+ * Current active state
129
+ * @since 0.0.59
130
+ */
14
131
  state?: "cancel" | "submit" | "apply" | undefined;
132
+ /**
133
+ * Content of the `Form`.
134
+ * @since 0.0.54
135
+ */
15
136
  children?: React.ReactNode;
137
+ /**
138
+ * Submit button visibility or custom configuration
139
+ * @since 0.0.58
140
+ */
16
141
  submitButton?: boolean | {} | undefined;
142
+ /**
143
+ * Apply button visibility or custom configuration
144
+ * @since 0.0.58
145
+ */
17
146
  applyButton?: boolean | {} | undefined;
147
+ /**
148
+ * Cancel button visibility or custom configuration
149
+ * @since 0.0.58
150
+ */
18
151
  cancelButton?: boolean | {} | undefined;
152
+ /**
153
+ * Additional buttons
154
+ * @since 0.0.58
155
+ */
19
156
  additionalButtons?: React.ReactNode[] | undefined;
157
+ /**
158
+ * A callback function, can be executed when some field value is changing.
159
+ * @since 3.1.0
160
+ */
20
161
  onFieldChange?: ((name: string, value: any) => void) | undefined;
162
+ /**
163
+ * Submit handler
164
+ * @since 0.0.54
165
+ */
21
166
  onSubmit?: ((values: Record<string, any>, isApply?: boolean | undefined) => void) | undefined;
167
+ /**
168
+ * Additional class name for the buttons container.
169
+ * @since 0.0.66
170
+ */
22
171
  footerClassName?: string | undefined;
172
+ /**
173
+ * Form responsive view will be switched automatically.
174
+ * Specify this parameter explicitly if you want disable this behaviour and choice vertical or horizontal form view.
175
+ * @since 0.4.1
176
+ */
23
177
  vertical?: boolean | undefined;
178
+ /**
179
+ * @ignore
180
+ */
24
181
  className?: string | undefined;
182
+ /**
183
+ * @ignore
184
+ */
25
185
  baseClassName?: string | undefined;
186
+ /**
187
+ * @ignore
188
+ */
26
189
  render?: ((params: {
27
190
  renderForm: (params: {
28
191
  actionButtons?: React.ReactNode;
29
192
  }) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
30
193
  renderActionButtons: () => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
31
194
  }) => React.ReactNode) | undefined;
195
+ /**
196
+ * @ignore
197
+ */
32
198
  innerRef?: React.MutableRefObject<HTMLFormElement | null> | undefined;
33
199
  } & Pick<React.HTMLProps<HTMLFormElement>, "max" | "required" | "low" | "high" | "disabled" | "default" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "async" | "defer" | "manifest" | "color" | "content" | "size" | "wrap" | "multiple" | "key" | "children" | "list" | "step" | "target" | "role" | "resource" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "name" | "nonce" | "noValidate" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "type" | "useMap" | "value" | "width" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<FormInstanceHandles>>;
34
200
  export default RefForwardingForm;
@@ -1,105 +1,9 @@
1
- import { ComponentPropsWithRef, HTMLProps, MutableRefObject, ReactElement, ReactNode } from 'react';
2
- import Button from '../Button';
1
+ import { ReactNode } from 'react';
3
2
  export declare type FormInstanceHandles = {
4
3
  submit: () => void;
5
4
  };
6
5
  export declare type FormValues = Record<string, any>;
7
6
  export declare type FormErrors = Record<string, any>;
8
- export declare type FormProps<FV extends FormValues> = {
9
- /**
10
- * Required mark.
11
- * @since 0.0.54
12
- */
13
- requiredMark?: ReactNode;
14
- /**
15
- * Hide required legend.
16
- * @ignore
17
- * @deprecated
18
- */
19
- hideRequiredLegend?: boolean;
20
- /**
21
- * Form values.
22
- * @since 0.0.57
23
- */
24
- values?: FV;
25
- /**
26
- * Form errors.
27
- * @since 0.0.57
28
- */
29
- errors?: FormErrors;
30
- /**
31
- * Current active state
32
- * @since 0.0.59
33
- */
34
- state?: 'submit' | 'apply' | 'cancel';
35
- /**
36
- * Content of the `Form`.
37
- * @since 0.0.54
38
- */
39
- children?: ReactNode;
40
- /**
41
- * Submit button visibility or custom configuration
42
- * @since 0.0.58
43
- */
44
- submitButton?: boolean | ComponentPropsWithRef<typeof Button>;
45
- /**
46
- * Apply button visibility or custom configuration
47
- * @since 0.0.58
48
- */
49
- applyButton?: boolean | ComponentPropsWithRef<typeof Button>;
50
- /**
51
- * Cancel button visibility or custom configuration
52
- * @since 0.0.58
53
- */
54
- cancelButton?: boolean | ComponentPropsWithRef<typeof Button>;
55
- /**
56
- * Additional buttons
57
- * @since 0.0.58
58
- */
59
- additionalButtons?: ReactNode[];
60
- /**
61
- * A callback function, can be executed when some field value is changing.
62
- * @since 3.1.0
63
- */
64
- onFieldChange?: (name: string, value: any) => void;
65
- /**
66
- * Submit handler
67
- * @since 0.0.54
68
- */
69
- onSubmit?: (values: FV, isApply?: boolean) => void;
70
- /**
71
- * Additional class name for the buttons container.
72
- * @since 0.0.66
73
- */
74
- footerClassName?: string;
75
- /**
76
- * Form responsive view will be switched automatically.
77
- * Specify this parameter explicitly if you want disable this behaviour and choice vertical or horizontal form view.
78
- * @since 0.4.1
79
- */
80
- vertical?: boolean;
81
- /**
82
- * @ignore
83
- */
84
- className?: string;
85
- /**
86
- * @ignore
87
- */
88
- baseClassName?: string;
89
- /**
90
- * @ignore
91
- */
92
- render?: (params: {
93
- renderForm: (params: {
94
- actionButtons?: ReactNode;
95
- }) => ReactElement;
96
- renderActionButtons: () => ReactElement;
97
- }) => ReactNode;
98
- /**
99
- * @ignore
100
- */
101
- innerRef?: MutableRefObject<null | HTMLFormElement>;
102
- } & Omit<HTMLProps<HTMLFormElement>, 'onSubmit' | 'ref'>;
103
7
  export declare type FormState<FV> = {
104
8
  values?: FV;
105
9
  vertical: boolean;