@plesk/ui-library 3.34.2 → 3.35.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/cjs/components/ContentLoader/IconsLoader.js +1 -2
- package/cjs/components/Dropdown/Dropdown.js +0 -2
- package/cjs/components/Dropdown/index.js +15 -2
- package/cjs/components/Figure/Figure.js +1 -33
- package/cjs/components/Figure/index.js +15 -2
- package/cjs/components/Form/Form.js +3 -3
- package/cjs/components/Form/ScrollableElementFormContext.js +1 -1
- package/cjs/components/Form/index.js +19 -3
- package/cjs/components/FormFieldPassword/PasswordMeter.js +4 -4
- package/cjs/components/Icon/constants.js +2 -2
- package/cjs/components/Icon/images/symbols.svg +23 -1
- package/cjs/components/Link/Link.js +11 -18
- package/cjs/components/Overlay/Overlay.js +3 -4
- package/cjs/components/Popper/Popper.js +14 -79
- package/cjs/components/Popper/index.js +15 -2
- package/cjs/components/Progress/Progress.js +8 -28
- package/cjs/components/ProgressStep/ProgressStep.js +4 -46
- package/cjs/components/ProgressStep/index.js +36 -12
- package/cjs/components/Section/Section.js +1 -2
- package/cjs/components/Skeleton/SkeletonText.js +1 -1
- package/cjs/components/SplitButton/SplitButton.js +10 -49
- package/cjs/components/SplitButton/index.js +15 -2
- package/cjs/components/Switch/Switch.js +43 -118
- package/cjs/components/Tooltip/Tooltip.js +35 -64
- package/cjs/components/Translate/Translate.js +10 -78
- package/cjs/components/Translate/index.js +4 -4
- package/cjs/components/Translate/isLikeText.js +27 -0
- package/cjs/components/utils.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/tests/index.js +13 -0
- package/cjs/tests/renderer.js +27 -0
- package/dist/.DS_Store +0 -0
- package/dist/images/default.svg +1 -0
- package/dist/images/filtered.svg +1 -0
- package/dist/images/symbols.svg +23 -1
- package/dist/plesk-ui-library-rtl.css +1 -1
- package/dist/plesk-ui-library-rtl.css.map +1 -1
- package/dist/plesk-ui-library.css +1 -1
- package/dist/plesk-ui-library.css.map +1 -1
- package/dist/plesk-ui-library.js +472 -725
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +5 -5
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/ContentLoader/IconsLoader.js +1 -2
- package/esm/components/Dropdown/Dropdown.js +0 -2
- package/esm/components/Dropdown/index.js +2 -1
- package/esm/components/Figure/Figure.js +1 -33
- package/esm/components/Figure/index.js +2 -1
- package/esm/components/Form/Form.js +3 -3
- package/esm/components/Form/ScrollableElementFormContext.js +1 -1
- package/esm/components/Form/index.js +1 -0
- package/esm/components/FormFieldPassword/PasswordMeter.js +4 -4
- package/esm/components/Icon/constants.js +2 -2
- package/esm/components/Icon/images/symbols.svg +23 -1
- package/esm/components/Link/Link.js +11 -18
- package/esm/components/Overlay/Overlay.js +3 -4
- package/esm/components/Popper/Popper.js +14 -79
- package/esm/components/Popper/index.js +2 -1
- package/esm/components/Progress/Progress.js +8 -26
- package/esm/components/ProgressStep/ProgressStep.js +6 -48
- package/esm/components/ProgressStep/index.js +1 -2
- package/esm/components/Section/Section.js +1 -2
- package/esm/components/Skeleton/SkeletonText.js +1 -1
- package/esm/components/SplitButton/SplitButton.js +10 -47
- package/esm/components/SplitButton/index.js +2 -1
- package/esm/components/Switch/Switch.js +43 -116
- package/esm/components/Tooltip/Tooltip.js +36 -62
- package/esm/components/Translate/Translate.js +9 -73
- package/esm/components/Translate/index.js +2 -1
- package/esm/components/Translate/isLikeText.js +19 -0
- package/esm/components/utils.js +1 -1
- package/esm/index.js +1 -1
- package/esm/tests/index.js +3 -0
- package/esm/tests/renderer.js +19 -0
- package/package.json +19 -18
- package/styleguide/build/bundle.edc3f2a1.js +2 -0
- package/styleguide/images/symbols.svg +23 -1
- package/styleguide/index.html +2 -2
- package/types/src/components/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/types/src/components/Dialog/Dialog.d.ts +29 -9
- package/types/src/components/Drawer/Drawer.d.ts +10 -12
- package/types/src/components/Drawer/DrawerProgress.d.ts +3 -3
- package/types/src/components/Dropdown/Dropdown.d.ts +3 -4
- package/types/src/components/Dropdown/index.d.ts +2 -0
- package/types/src/components/Figure/Figure.d.ts +28 -0
- package/types/src/components/Figure/index.d.ts +2 -0
- package/types/src/components/Form/Form.d.ts +8 -103
- package/types/src/components/Form/ScrollableElementFormContext.d.ts +2 -0
- package/types/src/components/Form/index.d.ts +1 -0
- package/types/src/components/Form/types.d.ts +5 -3
- package/types/src/components/Icon/constants.d.ts +1 -1
- package/types/src/components/ItemList/index.d.ts +1 -0
- package/types/src/components/Link/Link.d.ts +14 -12
- package/types/src/components/Link/index.d.ts +1 -0
- package/types/src/components/Overlay/Overlay.d.ts +1 -1
- package/types/src/components/Pagination/index.d.ts +1 -0
- package/types/src/components/Panel/index.d.ts +1 -0
- package/types/src/components/Popper/Popper.d.ts +96 -0
- package/types/src/components/Popper/index.d.ts +2 -0
- package/types/src/components/Progress/Progress.d.ts +49 -0
- package/types/src/components/Progress/index.d.ts +2 -0
- package/types/src/components/ProgressStep/ProgressStep.d.ts +69 -0
- package/types/src/components/ProgressStep/index.d.ts +2 -0
- package/types/src/components/SplitButton/SplitButton.d.ts +53 -0
- package/types/src/components/SplitButton/index.d.ts +2 -0
- package/types/src/components/Switch/Switch.d.ts +58 -0
- package/types/src/components/Switch/index.d.ts +2 -0
- package/types/src/components/TextArea/index.d.ts +1 -0
- package/types/src/components/Tooltip/Tooltip.d.ts +61 -0
- package/types/src/components/Tooltip/index.d.ts +2 -0
- package/types/src/components/Translate/Translate.d.ts +56 -0
- package/types/src/components/Translate/index.d.ts +3 -0
- package/types/src/components/Translate/isLikeText.d.ts +2 -0
- package/types/src/components/index.d.ts +11 -0
- package/types/src/components/utils.d.ts +6 -4
- package/types/src/tests/index.d.ts +1 -0
- package/types/src/tests/renderer.d.ts +23 -0
- package/styleguide/build/bundle.70f167a3.js +0 -2
- /package/styleguide/build/{bundle.70f167a3.js.LICENSE.txt → bundle.edc3f2a1.js.LICENSE.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="16" height="
|
|
1
|
+
<svg width="16" height="11856" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
2
2
|
<defs>
|
|
3
3
|
<symbol viewBox="0 0 12 12" id="archive:12">
|
|
4
4
|
<path d="M2 1h7v.5a.5.5 0 0 0 1 0V1a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-.5a.5.5 0 0 0-1 0v.5H2V1z" />
|
|
@@ -58,6 +58,12 @@
|
|
|
58
58
|
<symbol viewBox="0 0 16 16" id="arrow-left:16">
|
|
59
59
|
<path d="M.2018 8.0966A.4945.4945 0 0 0 0 8.498V8.5a.4945.4945 0 0 0 .2018.4034l3.4513 3.4513a.4961.4961 0 0 0 .7016-.7016L1.7016 9H15.5a.5.5 0 0 0 0-1H1.7016l2.6531-2.6531a.496.496 0 0 0-.7016-.7016L.2018 8.0966z" />
|
|
60
60
|
</symbol>
|
|
61
|
+
<symbol viewBox="0 0 12 12" id="arrow-right-circle-filled:12">
|
|
62
|
+
<path fill-rule="evenodd" d="M1 6.5a5.5 5.5 0 1 0 11 0 5.5 5.5 0 0 0-11 0ZM2.5 6a.5.5 0 0 0 0 1h5.8L6.65 8.65a.5.5 0 0 0 .7.7L9.8 6.9a.5.5 0 0 0 .2-.4.5.5 0 0 0-.2-.4L7.35 3.65a.5.5 0 0 0-.7.7L8.3 6H2.5Z" clip-rule="evenodd" />
|
|
63
|
+
</symbol>
|
|
64
|
+
<symbol viewBox="0 0 16 16" id="arrow-right-circle-filled:16">
|
|
65
|
+
<path fill-rule="evenodd" d="M8.5 16a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15Zm.15-3.65a.5.5 0 0 1 0-.7L11.3 9H3.5a.5.5 0 0 1 0-1h7.8L8.65 5.35a.5.5 0 0 1 .7-.7L12.8 8.1a.5.5 0 0 1 .2.4.5.5 0 0 1-.2.4l-3.45 3.45c-.2.2-.51.2-.7 0Z" clip-rule="evenodd" />
|
|
66
|
+
</symbol>
|
|
61
67
|
<symbol viewBox="0 0 12 12" id="arrow-right-in:12">
|
|
62
68
|
<path d="M2 2h9v9H2v-1a.5.5 0 00-1 0v1a1 1 0 001 1h9a1 1 0 001-1V2a1 1 0 00-1-1H2a1 1 0 00-1 1v1a.5.5 0 001 0V2z" />
|
|
63
69
|
<path d="M5.645 4.347a.496.496 0 01.702-.702l2.451 2.452A.499.499 0 019 6.498v.004a.495.495 0 01-.202.401L6.347 9.355a.496.496 0 01-.702-.702L7.298 7H.5a.5.5 0 010-1h6.798L5.645 4.347z" />
|
|
@@ -181,6 +187,14 @@
|
|
|
181
187
|
<path d="M4.145 11.855a.496.496 0 0 1 0-.702L13.298 2H9.5a.5.5 0 0 1 0-1h5.002a.495.495 0 0 1 .498.5v5a.5.5 0 0 1-1 0V2.702l-9.153 9.153a.496.496 0 0 1-.702 0z" />
|
|
182
188
|
<path d="M1.5 15a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 1 0V14h12.5a.5.5 0 0 1 0 1h-13z" />
|
|
183
189
|
</symbol>
|
|
190
|
+
<symbol viewBox="0 0 12 12" id="bar-chart-vertical-lock:12">
|
|
191
|
+
<path d="M4 .5a.5.5 0 0 1 1 0v9a.5.5 0 0 1-1 0v-9zM1.5 5a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 1 0v-4a.5.5 0 0 0-.5-.5zM.5 11a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zM7.5 3a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 1 0v-1a.5.5 0 0 0-.5-.5zM10 1.5a.5.5 0 0 1 1 0v3a.5.5 0 0 1-1 0v-3z" />
|
|
192
|
+
<path d="M7 9a1 1 0 0 1 1-1V7a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V9zm3-1V7H9v1h1z" />
|
|
193
|
+
</symbol>
|
|
194
|
+
<symbol viewBox="0 0 16 16" id="bar-chart-vertical-lock:16">
|
|
195
|
+
<path d="M13 .5a.5.5 0 0 1 1 0v7a.5.5 0 0 1-1 0v-7zM4.5 2a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 1 0v-11a.5.5 0 0 0-.5-.5zM1 9.5a.5.5 0 0 1 1 0v4a.5.5 0 0 1-1 0v-4zm-1 6a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 0 1h-8a.5.5 0 0 1-.5-.5zm7-9a.5.5 0 0 1 1 0v7a.5.5 0 0 1-1 0v-7zM10.5 4a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 1 0v-3a.5.5 0 0 0-.5-.5z" />
|
|
196
|
+
<path d="M10 12a1 1 0 0 1 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1v-3zm3-1v-1h-1v1h1z" />
|
|
197
|
+
</symbol>
|
|
184
198
|
<symbol viewBox="0 0 12 12" id="bar-chart-vertical:12">
|
|
185
199
|
<path d="M0 11.5a.5.5 0 01.5-.5h11a.5.5 0 010 1H.5a.5.5 0 01-.5-.5zM1 5.5a.5.5 0 011 0v4a.5.5 0 01-1 0v-4zM4 .5a.5.5 0 011 0v9a.5.5 0 01-1 0v-9zM7 4.5a.5.5 0 011 0v5a.5.5 0 01-1 0v-5zM10 2.5a.5.5 0 011 0v7a.5.5 0 01-1 0v-7z" />
|
|
186
200
|
</symbol>
|
|
@@ -1310,6 +1324,14 @@
|
|
|
1310
1324
|
<symbol viewBox="0 0 16 16" id="puzzle:16">
|
|
1311
1325
|
<path fill-rule="evenodd" d="M7 0a2 2 0 0 0-2 2v1H1a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h1a1 1 0 0 1 0 2H1a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-1a1 1 0 1 1 2 0v1a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-4h1a2 2 0 1 0 0-4h-1V4a1 1 0 0 0-1-1H9V2a2 2 0 0 0-2-2zM2 11H1v4h4v-1a2 2 0 1 1 4 0v1h3v-4a1 1 0 0 1 1-1h1a1 1 0 1 0 0-2h-1a1 1 0 0 1-1-1V4H9a1 1 0 0 1-1-1V2a1 1 0 0 0-2 0v1a1 1 0 0 1-1 1H1v3h1a2 2 0 1 1 0 4z" clip-rule="evenodd" />
|
|
1312
1326
|
</symbol>
|
|
1327
|
+
<symbol viewBox="0 0 12 12" id="python:12">
|
|
1328
|
+
<path d="M6 2a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0zm.5 8.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z" />
|
|
1329
|
+
<path fill-rule="evenodd" d="M8.5 8.5v2.78a4.68 4.68 0 0 1-5 0V8.5H.69a8.08 8.08 0 0 1-.41-.98C.14 7.12 0 6.56 0 6s.14-1.11.28-1.52c.1-.34.25-.66.4-.98H3.5V.72A4.67 4.67 0 0 1 6 0c.9 0 1.74.25 2.5.72V3.5h2.81c.16.32.3.64.41.98A5 5 0 0 1 12 6c0 .56-.14 1.11-.27 1.52-.12.34-.26.66-.41.98H8.5zm-4-5V1.3a3.83 3.83 0 0 1 3 0v3.2c0 .87-.4 1-.5 1H5c-.9 0-1.5.87-1.5 2H1.33a6.06 6.06 0 0 1-.1-.3C1.1 6.84 1 6.4 1 6c0-.4.1-.84.23-1.2a6.06 6.06 0 0 1 .1-.3H6v-1H4.5zm4 1c0 1.13-.6 2-1.5 2H5c-.1 0-.5.13-.5 1v3.2a3.83 3.83 0 0 0 3 0V8.5H6v-1h4.67l.1-.3c.12-.36.23-.8.23-1.2 0-.4-.1-.84-.23-1.2a6.1 6.1 0 0 0-.1-.3H8.5z" clip-rule="evenodd" />
|
|
1330
|
+
</symbol>
|
|
1331
|
+
<symbol viewBox="0 0 16 16" id="python:16">
|
|
1332
|
+
<path d="M8 2.5a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0zM8.5 14a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z" />
|
|
1333
|
+
<path fill-rule="evenodd" d="M5 11H.66a10.9 10.9 0 0 1-.4-1.17C.15 9.33 0 8.66 0 8a7.45 7.45 0 0 1 .45-2.44L.65 5H5V.66c.39-.15.77-.29 1.17-.4C6.67.15 7.34 0 8 0c.66 0 1.33.14 1.83.27.4.1.78.24 1.17.39V5h4.34c.26.66.04-.18.4 1.17.12.5.26 1.17.26 1.83 0 .66-.14 1.33-.27 1.83-.1.4-.24.78-.39 1.17H11v4.34c-.39.15-.77.29-1.17.4A7.4 7.4 0 0 1 8 16a7.4 7.4 0 0 1-1.83-.27 9.96 9.96 0 0 1-.6-.18l-.57-.2V11zm1-6V1.36l.43-.13A6.46 6.46 0 0 1 8 1a6.46 6.46 0 0 1 2 .36V6.5c0 .38-.13.65-.26.8a.62.62 0 0 1-.24.2h-3c-.37 0-.75.24-1 .56-.3.33-.5.82-.5 1.44v.5H1.36a9.1 9.1 0 0 1-.13-.43A6.5 6.5 0 0 1 1 8c0-.54.11-1.12.23-1.57A9.09 9.09 0 0 1 1.36 6H8V5H6zm4 6H8v-1h6.64a9.11 9.11 0 0 0 .13-.43c.12-.45.23-1.03.23-1.57s-.11-1.12-.23-1.57a9.1 9.1 0 0 0-.13-.43H11v.5c0 .62-.2 1.1-.49 1.45-.26.3-.64.55-1.01.55h-3c.01 0 0 0 0 0a.62.62 0 0 0-.24.2c-.13.16-.26.42-.26.8v5.14l.43.13c.45.12 1.03.23 1.57.23a6.5 6.5 0 0 0 2-.36V11z" clip-rule="evenodd" />
|
|
1334
|
+
</symbol>
|
|
1313
1335
|
<symbol viewBox="0 0 12 12" id="question-mark-circle-filled:12">
|
|
1314
1336
|
<path fill-rule="evenodd" d="M12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0zM6.5 6a1 1 0 1 0-1-1 .5.5 0 0 1-1 .005V5A2 2 0 1 1 7 6.937V7a.5.5 0 0 1-1 0v-.5a.5.5 0 0 1 .5-.5zm.625 3a.625.625 0 1 1-1.25 0 .625.625 0 0 1 1.25 0z" clip-rule="evenodd" />
|
|
1315
1337
|
</symbol>
|
package/styleguide/index.html
CHANGED
|
@@ -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.
|
|
7
|
+
<title>Plesk UI Library 3.35.1</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">
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KWST26V"
|
|
27
27
|
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
|
28
28
|
<!-- End Google Tag Manager (noscript) -->
|
|
29
|
-
<script src="build/bundle.
|
|
29
|
+
<script src="build/bundle.edc3f2a1.js"></script>
|
|
30
30
|
</body>
|
|
31
31
|
</html>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode, Ref } from 'react';
|
|
1
|
+
import { FunctionComponent, ReactNode, Ref, HTMLAttributes } from 'react';
|
|
2
2
|
import './ButtonGroup.less';
|
|
3
3
|
declare type ButtonGroupProps = {
|
|
4
4
|
/**
|
|
@@ -18,7 +18,7 @@ declare type ButtonGroupProps = {
|
|
|
18
18
|
* @ignore
|
|
19
19
|
*/
|
|
20
20
|
innerRef?: Ref<HTMLDivElement>;
|
|
21
|
-
}
|
|
21
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
22
22
|
/**
|
|
23
23
|
* `ButtonGroup` component is used for visual grouping of several [Buttons](#!/Button) together.
|
|
24
24
|
* @since 0.0.37
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode, HTMLAttributes, ReactElement, CSSProperties } from 'react';
|
|
2
2
|
import { OverlayProps } from '../Overlay';
|
|
3
|
-
import Form from '../Form';
|
|
3
|
+
import Form, { FormProps, FormValues } from '../Form';
|
|
4
4
|
import { ButtonProps } from '../Button';
|
|
5
5
|
import '../../helpers/base.less';
|
|
6
6
|
import './Dialog.less';
|
|
7
7
|
declare type ImageType = string | ReactElement | HTMLAttributes<HTMLImageElement>;
|
|
8
|
-
export declare type DialogProps = {
|
|
8
|
+
export declare type DialogProps<FV extends FormValues = FormValues> = {
|
|
9
9
|
/**
|
|
10
10
|
* Toggles visibility.
|
|
11
11
|
* @since 0.0.68
|
|
@@ -71,13 +71,9 @@ export declare type DialogProps = {
|
|
|
71
71
|
actions?: ReactNode;
|
|
72
72
|
/**
|
|
73
73
|
* Wraps children into [Form](#!/Form) if not empty.
|
|
74
|
-
* @type ComponentProps<typeof Form> | typeof Form
|
|
75
74
|
* @since 0.0.68
|
|
76
75
|
*/
|
|
77
|
-
form?:
|
|
78
|
-
values?: any;
|
|
79
|
-
onSubmit?: any;
|
|
80
|
-
}) | typeof Form;
|
|
76
|
+
form?: FormProps<FV> | typeof Form;
|
|
81
77
|
/**
|
|
82
78
|
* Dialog width
|
|
83
79
|
* @since 0.0.68
|
|
@@ -122,5 +118,29 @@ export declare type DialogProps = {
|
|
|
122
118
|
* `Dialog` is a modal window that asks users to make a decision or enter additional information.
|
|
123
119
|
* @since 0.0.68
|
|
124
120
|
*/
|
|
125
|
-
declare const Dialog:
|
|
121
|
+
declare const Dialog: {
|
|
122
|
+
<FV extends FormValues = FormValues>({ baseClassName, className, children, actions, isOpen, banner, image, title, subtitle, cancelTitle, cancelButton, buttons, form, size, closable, onClose, closingConfirmation, canClose, ...props }: DialogProps<FV>): JSX.Element;
|
|
123
|
+
defaultProps: {
|
|
124
|
+
isOpen: boolean;
|
|
125
|
+
banner: undefined;
|
|
126
|
+
sideBanner: undefined;
|
|
127
|
+
sideBannerContainer: undefined;
|
|
128
|
+
image: undefined;
|
|
129
|
+
title: undefined;
|
|
130
|
+
subtitle: undefined;
|
|
131
|
+
cancelTitle: undefined;
|
|
132
|
+
cancelButton: undefined;
|
|
133
|
+
buttons: undefined;
|
|
134
|
+
actions: undefined;
|
|
135
|
+
form: undefined;
|
|
136
|
+
size: string;
|
|
137
|
+
closable: boolean;
|
|
138
|
+
canClose: boolean;
|
|
139
|
+
onClose: undefined;
|
|
140
|
+
closingConfirmation: undefined;
|
|
141
|
+
children: undefined;
|
|
142
|
+
className: undefined;
|
|
143
|
+
baseClassName: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
126
146
|
export default Dialog;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ReactNode, ReactElement, HTMLAttributes,
|
|
2
|
-
import Form from '../Form';
|
|
1
|
+
import { ReactNode, ReactElement, HTMLAttributes, CSSProperties } from 'react';
|
|
2
|
+
import Form, { FormProps, FormValues } from '../Form';
|
|
3
3
|
import { DrawerProgressProps } from './DrawerProgress';
|
|
4
4
|
import '../../helpers/base.less';
|
|
5
5
|
import './Drawer.less';
|
|
6
|
-
export interface DrawerProps {
|
|
6
|
+
export interface DrawerProps<FV extends FormValues = FormValues> {
|
|
7
7
|
/**
|
|
8
8
|
* Toggles visibility.
|
|
9
9
|
* @since 0.0.65
|
|
@@ -58,14 +58,9 @@ export interface DrawerProps {
|
|
|
58
58
|
/**
|
|
59
59
|
* Wraps children into [Form](#!/Form) if not empty.<br>
|
|
60
60
|
* **Note:** in case of *element* you should take care of providing additional form props from [Drawer](#!/Drawer) through your custom component. See example below for more details
|
|
61
|
-
*
|
|
62
|
-
* @type ComponentProps<typeof Form> | typeof Form
|
|
63
61
|
* @since 0.0.66
|
|
64
62
|
*/
|
|
65
|
-
form?:
|
|
66
|
-
values?: any;
|
|
67
|
-
onSubmit?: any;
|
|
68
|
-
}) | typeof Form;
|
|
63
|
+
form?: FormProps<FV> | typeof Form;
|
|
69
64
|
/**
|
|
70
65
|
* Block with an image, placed at the side of the component
|
|
71
66
|
* @type string | ReactElement | HTMLAttributes<HTMLImageElement>
|
|
@@ -78,7 +73,7 @@ export interface DrawerProps {
|
|
|
78
73
|
*/
|
|
79
74
|
sideBannerContainer?: {
|
|
80
75
|
background: string;
|
|
81
|
-
align
|
|
76
|
+
align?: CSSProperties['alignItems'];
|
|
82
77
|
};
|
|
83
78
|
/**
|
|
84
79
|
* Content of the `Drawer`.
|
|
@@ -89,7 +84,7 @@ export interface DrawerProps {
|
|
|
89
84
|
* Adds [Progress](#!/Progress) into footer.
|
|
90
85
|
* @since 1.11.0
|
|
91
86
|
*/
|
|
92
|
-
progress?: DrawerProgressProps;
|
|
87
|
+
progress?: DrawerProgressProps | null;
|
|
93
88
|
/**
|
|
94
89
|
* @ignore
|
|
95
90
|
*/
|
|
@@ -104,5 +99,8 @@ export interface DrawerProps {
|
|
|
104
99
|
* [Read more when to use Drawer](#!/Drawers%2C%20pages%2C%20popovers).
|
|
105
100
|
* @since 0.0.65
|
|
106
101
|
*/
|
|
107
|
-
declare const Drawer:
|
|
102
|
+
declare const Drawer: {
|
|
103
|
+
<FV extends FormValues = FormValues>({ baseClassName, className, children, title, subtitle, backButton, hideButton, tabs, onClose, form, progress, closingConfirmation, ...props }: DrawerProps<FV>): JSX.Element;
|
|
104
|
+
defaultProps: Partial<DrawerProps<FormValues>>;
|
|
105
|
+
};
|
|
108
106
|
export default Drawer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, ReactNode, ReactElement } from 'react';
|
|
2
|
-
import { ProgressStepProps } from '../ProgressStep';
|
|
2
|
+
import { ProgressStepProps, Status } from '../ProgressStep';
|
|
3
3
|
import './DrawerProgress.less';
|
|
4
4
|
declare type RenderParams = {
|
|
5
5
|
content: ReactElement;
|
|
@@ -18,7 +18,7 @@ export declare type DrawerProgressProps = {
|
|
|
18
18
|
onFail?: () => void;
|
|
19
19
|
cancelable?: boolean;
|
|
20
20
|
onClosableChange?: (closable: boolean) => void;
|
|
21
|
-
onStatusChange?: (status:
|
|
21
|
+
onStatusChange?: (status: Status) => void;
|
|
22
22
|
render?: (params: RenderParams) => ReactNode;
|
|
23
23
|
};
|
|
24
24
|
declare type DrawerProgressState = {
|
|
@@ -37,7 +37,7 @@ declare class DrawerProgress extends Component<DrawerProgressProps, DrawerProgre
|
|
|
37
37
|
componentDidUpdate(_prevProps: DrawerProgressProps, prevState: DrawerProgressState): void;
|
|
38
38
|
componentWillUnmount(): void;
|
|
39
39
|
closeTimeout?: number;
|
|
40
|
-
handleStatusChange: (status:
|
|
40
|
+
handleStatusChange: (status: Status) => void;
|
|
41
41
|
handleClose: () => void;
|
|
42
42
|
handleCancel: () => void;
|
|
43
43
|
render(): ReactNode;
|
|
@@ -2,10 +2,9 @@ import { ReactNode, ReactElement, FunctionComponent, ReactChild } from 'react';
|
|
|
2
2
|
import '../../helpers/base.less';
|
|
3
3
|
import '../Menu/Menu.less';
|
|
4
4
|
import './Dropdown.less';
|
|
5
|
-
|
|
6
|
-
declare type
|
|
7
|
-
export
|
|
8
|
-
interface DropdownProps {
|
|
5
|
+
import { Placement } from 'popper.js';
|
|
6
|
+
export declare type PopoverPlacement = Placement;
|
|
7
|
+
export interface DropdownProps {
|
|
9
8
|
/**
|
|
10
9
|
* Dropdown [menu](#!/Menu).
|
|
11
10
|
* @type ReactElement
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import './Figure.less';
|
|
3
|
+
export interface FigureProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
/**
|
|
5
|
+
* External link
|
|
6
|
+
* @since 0.0.42
|
|
7
|
+
*/
|
|
8
|
+
href?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Bottom content
|
|
11
|
+
* @since 0.0.42
|
|
12
|
+
*/
|
|
13
|
+
caption?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* @ignore
|
|
16
|
+
*/
|
|
17
|
+
baseClassName?: string;
|
|
18
|
+
/**
|
|
19
|
+
* @ignore
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Figure component.
|
|
25
|
+
* @since 0.0.42
|
|
26
|
+
*/
|
|
27
|
+
declare const Figure: ({ baseClassName, className, href, caption, children, ...props }: FigureProps) => JSX.Element;
|
|
28
|
+
export default Figure;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, ReactElement, MutableRefObject, HTMLProps } from 'react';
|
|
1
|
+
import { ReactNode, ReactElement, MutableRefObject, HTMLProps, ForwardedRef } from 'react';
|
|
2
2
|
import { ButtonProps } from '../Button';
|
|
3
3
|
import { FormInstanceHandles, FormValues, FormErrors } from './types';
|
|
4
4
|
import './Form.less';
|
|
@@ -58,7 +58,7 @@ export declare type FormProps<FV extends FormValues> = {
|
|
|
58
58
|
* A callback function, can be executed when some field value is changing.
|
|
59
59
|
* @since 3.1.0
|
|
60
60
|
*/
|
|
61
|
-
onFieldChange?: (name:
|
|
61
|
+
onFieldChange?: <Key extends keyof FV>(name: Key, value: FV[Key]) => void;
|
|
62
62
|
/**
|
|
63
63
|
* Submit handler
|
|
64
64
|
* @since 0.0.54
|
|
@@ -97,104 +97,9 @@ export declare type FormProps<FV extends FormValues> = {
|
|
|
97
97
|
*/
|
|
98
98
|
innerRef?: MutableRefObject<null | HTMLFormElement>;
|
|
99
99
|
} & Omit<HTMLProps<HTMLFormElement>, 'onSubmit' | 'ref'>;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Required mark.
|
|
108
|
-
* @since 0.0.54
|
|
109
|
-
*/
|
|
110
|
-
requiredMark?: ReactNode;
|
|
111
|
-
/**
|
|
112
|
-
* Hide required legend.
|
|
113
|
-
* @ignore
|
|
114
|
-
* @deprecated
|
|
115
|
-
*/
|
|
116
|
-
hideRequiredLegend?: boolean | undefined;
|
|
117
|
-
/**
|
|
118
|
-
* Form values.
|
|
119
|
-
* @since 0.0.57
|
|
120
|
-
*/
|
|
121
|
-
values?: FormValues | undefined;
|
|
122
|
-
/**
|
|
123
|
-
* Form errors.
|
|
124
|
-
* @since 0.0.57
|
|
125
|
-
*/
|
|
126
|
-
errors?: FormErrors | undefined;
|
|
127
|
-
/**
|
|
128
|
-
* Current active state
|
|
129
|
-
* @since 0.0.59
|
|
130
|
-
*/
|
|
131
|
-
state?: "cancel" | "submit" | "apply" | undefined;
|
|
132
|
-
/**
|
|
133
|
-
* Content of the `Form`.
|
|
134
|
-
* @since 0.0.54
|
|
135
|
-
*/
|
|
136
|
-
children?: ReactNode;
|
|
137
|
-
/**
|
|
138
|
-
* Submit button visibility or custom configuration
|
|
139
|
-
* @since 0.0.58
|
|
140
|
-
*/
|
|
141
|
-
submitButton?: boolean | Partial<ButtonProps<"button">> | undefined;
|
|
142
|
-
/**
|
|
143
|
-
* Apply button visibility or custom configuration
|
|
144
|
-
* @since 0.0.58
|
|
145
|
-
*/
|
|
146
|
-
applyButton?: boolean | Partial<ButtonProps<"button">> | undefined;
|
|
147
|
-
/**
|
|
148
|
-
* Cancel button visibility or custom configuration
|
|
149
|
-
* @since 0.0.58
|
|
150
|
-
*/
|
|
151
|
-
cancelButton?: boolean | Partial<ButtonProps<"button">> | undefined;
|
|
152
|
-
/**
|
|
153
|
-
* Additional buttons
|
|
154
|
-
* @since 0.0.58
|
|
155
|
-
*/
|
|
156
|
-
additionalButtons?: ReactNode[] | undefined;
|
|
157
|
-
/**
|
|
158
|
-
* A callback function, can be executed when some field value is changing.
|
|
159
|
-
* @since 3.1.0
|
|
160
|
-
*/
|
|
161
|
-
onFieldChange?: ((name: string, value: any) => void) | undefined;
|
|
162
|
-
/**
|
|
163
|
-
* Submit handler
|
|
164
|
-
* @since 0.0.54
|
|
165
|
-
*/
|
|
166
|
-
onSubmit?: ((values: FormValues, isApply?: boolean | undefined) => void) | undefined;
|
|
167
|
-
/**
|
|
168
|
-
* Additional class name for the buttons container.
|
|
169
|
-
* @since 0.0.66
|
|
170
|
-
*/
|
|
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
|
-
*/
|
|
177
|
-
vertical?: boolean | undefined;
|
|
178
|
-
/**
|
|
179
|
-
* @ignore
|
|
180
|
-
*/
|
|
181
|
-
className?: string | undefined;
|
|
182
|
-
/**
|
|
183
|
-
* @ignore
|
|
184
|
-
*/
|
|
185
|
-
baseClassName?: string | undefined;
|
|
186
|
-
/**
|
|
187
|
-
* @ignore
|
|
188
|
-
*/
|
|
189
|
-
render?: ((params: {
|
|
190
|
-
renderForm: (params?: {
|
|
191
|
-
actionButtons?: ReactNode;
|
|
192
|
-
} | undefined) => ReactElement;
|
|
193
|
-
renderActionButtons: () => ReactElement;
|
|
194
|
-
}) => ReactNode) | undefined;
|
|
195
|
-
/**
|
|
196
|
-
* @ignore
|
|
197
|
-
*/
|
|
198
|
-
innerRef?: MutableRefObject<HTMLFormElement | null> | undefined;
|
|
199
|
-
} & Omit<HTMLProps<HTMLFormElement>, "ref" | "onSubmit"> & import("react").RefAttributes<FormInstanceHandles>>;
|
|
200
|
-
export default RefForwardingForm;
|
|
100
|
+
export type { FormValues, FormInstanceHandles };
|
|
101
|
+
declare type FormComponent = <FV extends FormValues>(props: FormProps<FV> & {
|
|
102
|
+
ref?: ForwardedRef<FormInstanceHandles>;
|
|
103
|
+
}) => ReactElement;
|
|
104
|
+
declare const _default: FormComponent;
|
|
105
|
+
export default _default;
|
|
@@ -3,6 +3,7 @@ export declare type FormInstanceHandles = {
|
|
|
3
3
|
submit: () => void;
|
|
4
4
|
};
|
|
5
5
|
export declare type FormValues = Record<string, any>;
|
|
6
|
+
export declare type FormFieldErrors = Record<string, any>;
|
|
6
7
|
export declare type FormErrors = Record<string, any>;
|
|
7
8
|
export declare type FormState<FV> = {
|
|
8
9
|
values?: FV;
|
|
@@ -13,6 +14,9 @@ export declare type FormState<FV> = {
|
|
|
13
14
|
prevErrors?: FormErrors;
|
|
14
15
|
prevRequiredMark?: ReactNode;
|
|
15
16
|
};
|
|
17
|
+
export declare type Field = {
|
|
18
|
+
focus: (errors: FormFieldErrors) => void;
|
|
19
|
+
};
|
|
16
20
|
export declare type FormContextProps = {
|
|
17
21
|
getValues: () => Readonly<FormValues> | undefined;
|
|
18
22
|
getValue: (name: string, def?: any) => any;
|
|
@@ -21,9 +25,7 @@ export declare type FormContextProps = {
|
|
|
21
25
|
[key: string]: any;
|
|
22
26
|
};
|
|
23
27
|
setRequiredField: (name: string, required: boolean) => void;
|
|
24
|
-
registerField: (name: string, field:
|
|
25
|
-
focus: () => void;
|
|
26
|
-
}) => void;
|
|
28
|
+
registerField: (name: string, field: Field) => void;
|
|
27
29
|
unregisterField: (name: string) => void;
|
|
28
30
|
getRequiredMark: () => ReactNode;
|
|
29
31
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const NAMES_12: IconName[];
|
|
2
|
-
export declare type IconName = 'archive' | 'arrow-back' | 'arrow-diagonal-out' | 'arrow-down' | 'arrow-down-in' | 'arrow-down-out' | 'arrow-down-tray' | 'arrow-left' | 'arrow-right' | 'arrow-right-in' | 'arrow-right-out' | 'arrow-up' | 'arrow-up-circle' | 'arrow-up-in' | 'arrow-up-in-cloud' | 'arrow-up-out' | 'arrow-up-tray' | 'arrows-four-directions' | 'arrows-inward' | 'arrows-loop' | 'arrows-opposite' | 'arrows-outward' | 'backup' | 'backup2' | 'bar-chart-vertical' | 'bar-chart-vertical-arrow-up' | 'bell' | 'book-email' | 'boundary' | 'box-diagonal-bottom-in' | 'box-diagonal-top-in' | 'brush' | 'bug' | 'calendar' | 'calendar-clock' | 'camera' | 'card' | 'card-ribbon' | 'card-row' | 'card-tile' | 'cd' | 'cd-up-in-cloud' | 'chain' | 'chain-broken' | 'chat' | 'check-list' | 'check-mark' | 'check-mark-circle' | 'check-mark-circle-filled' | 'chevron-double-down' | 'chevron-double-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle-diagonal' | 'clean' | 'clip' | 'clock' | 'clone' | 'cloud' | 'cloud-checkmark' | 'cloud-crossed' | 'cloud-graph' | 'code' | 'connection' | 'console' | 'console-filled' | 'copy' | 'copy-indicator' | 'cpu' | 'crane' | 'credit-cards' | 'cross-mark' | 'cross-mark-circle' | 'cross-mark-circle-filled' | 'crown-transfer' | 'dashboard' | 'database' | 'database-box' | 'database-filled' | 'database-plus' | 'deploy' | 'docker-filled' | 'dollar' | 'dollar-filled' | 'dot' | 'emoticon-confused' | 'emoticon-dead' | 'emoticon-excited' | 'emoticon-happy' | 'emoticon-neutral' | 'emoticon-sad' | 'emoticon-smile' | 'enter' | 'exclamation-mark-circle' | 'exclamation-mark-circle-filled' | 'eye' | 'eye-closed' | 'facebook' | 'facebook-filled' | 'feedback' | 'filter' | 'filter-check-mark' | 'fire' | 'flag' | 'flag-filled' | 'flag-globe' | 'floppy-disk' | 'folder-closed' | 'folder-key' | 'folder-network' | 'folder-open' | 'folders-tree' | 'forward-circle-filled' | 'four-squares' | 'gear' | 'git' | 'github' | 'globe' | 'hard-drive' | 'hard-drive-key' | 'hat' | 'hexagons' | 'home' | 'info-circle' | 'info-circle-filled' | 'ip-addresses' | 'joomla' | 'kebab' | 'key' | 'laravel' | 'lifebuoy' | 'lightbulb' | 'limit' | 'linux' | 'list' | 'list-check-mark' | 'location' | 'lock-closed' | 'lock-closed-check' | 'lock-closed-filled' | 'lock-open' | 'lock-open-cross' | 'lock-open-filled' | 'mail' | 'mail-circle-filled' | 'mail-settings' | 'megaphone' | 'menu' | 'menu-thin' | 'microsoft' | 'minimize' | 'minus' | 'minus-circle' | 'minus-circle-filled' | 'monitoring' | 'monitoring-off' | 'my-little-admin' | 'net' | 'nine-dots' | 'node-js' | 'package' | 'panel' | 'panel-check' | 'panel-eye' | 'panel-key' | 'panel-settings' | 'panels' | 'pause-circle' | 'pencil' | 'pencil-dialog' | 'php' | 'phpmyadmin' | 'pin' | 'pipette' | 'plans' | 'plugins' | 'plus' | 'power' | 'projects' | 'puzzle' | 'question-mark-circle' | 'question-mark-circle-filled' | 'ram' | 'react-js' | 'recycle' | 'redirect-circle-filled' | 'refresh' | 'reload' | 'remove' | 'reset' | 'resource' | 'ribbon' | 'rocket' | 'ruby' | 'sand-clock' | 'scan' | 'screen' | 'search' | 'security-check' | 'send' | 'server' | 'servers' | 'share' | 'shield' | 'shield-attention-filled' | 'shield-chain' | 'shield-filled' | 'shopping-cart' | 'sidebar-right-hide' | 'sidebar-right-show' | 'signal-light' | 'site-page' | 'sleep' | 'sliders' | 'square-with-circles' | 'star' | 'star-circle-filled' | 'star-filled' | 'star-half-filled' | 'start' | 'start-circle' | 'start-filled' | 'stop' | 'stop-circle' | 'storage' | 'themes' | 'three-dots-horizontal' | 'three-dots-vertical' | 'tools' | 'transfer' | 'triangle-exclamation-mark' | 'triangle-exclamation-mark-filled' | 'unarchive' | 'user' | 'volume' | 'web' | 'web-plus' | 'web-settings' | 'windows' | 'woocommerce' | 'wordpress' | 'zero-circle-filled';
|
|
2
|
+
export declare type IconName = 'archive' | 'arrow-back' | 'arrow-diagonal-out' | 'arrow-down' | 'arrow-down-in' | 'arrow-down-out' | 'arrow-down-tray' | 'arrow-left' | 'arrow-right' | 'arrow-right-circle-filled' | 'arrow-right-in' | 'arrow-right-out' | 'arrow-up' | 'arrow-up-circle' | 'arrow-up-in' | 'arrow-up-in-cloud' | 'arrow-up-out' | 'arrow-up-tray' | 'arrows-four-directions' | 'arrows-inward' | 'arrows-loop' | 'arrows-opposite' | 'arrows-outward' | 'backup' | 'backup2' | 'bar-chart-vertical' | 'bar-chart-vertical-arrow-up' | 'bar-chart-vertical-lock' | 'bell' | 'book-email' | 'boundary' | 'box-diagonal-bottom-in' | 'box-diagonal-top-in' | 'brush' | 'bug' | 'calendar' | 'calendar-clock' | 'camera' | 'card' | 'card-ribbon' | 'card-row' | 'card-tile' | 'cd' | 'cd-up-in-cloud' | 'chain' | 'chain-broken' | 'chat' | 'check-list' | 'check-mark' | 'check-mark-circle' | 'check-mark-circle-filled' | 'chevron-double-down' | 'chevron-double-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle-diagonal' | 'clean' | 'clip' | 'clock' | 'clone' | 'cloud' | 'cloud-checkmark' | 'cloud-crossed' | 'cloud-graph' | 'code' | 'connection' | 'console' | 'console-filled' | 'copy' | 'copy-indicator' | 'cpu' | 'crane' | 'credit-cards' | 'cross-mark' | 'cross-mark-circle' | 'cross-mark-circle-filled' | 'crown-transfer' | 'dashboard' | 'database' | 'database-box' | 'database-filled' | 'database-plus' | 'deploy' | 'docker-filled' | 'dollar' | 'dollar-filled' | 'dot' | 'emoticon-confused' | 'emoticon-dead' | 'emoticon-excited' | 'emoticon-happy' | 'emoticon-neutral' | 'emoticon-sad' | 'emoticon-smile' | 'enter' | 'exclamation-mark-circle' | 'exclamation-mark-circle-filled' | 'eye' | 'eye-closed' | 'facebook' | 'facebook-filled' | 'feedback' | 'filter' | 'filter-check-mark' | 'fire' | 'flag' | 'flag-filled' | 'flag-globe' | 'floppy-disk' | 'folder-closed' | 'folder-key' | 'folder-network' | 'folder-open' | 'folders-tree' | 'forward-circle-filled' | 'four-squares' | 'gear' | 'git' | 'github' | 'globe' | 'hard-drive' | 'hard-drive-key' | 'hat' | 'hexagons' | 'home' | 'info-circle' | 'info-circle-filled' | 'ip-addresses' | 'joomla' | 'kebab' | 'key' | 'laravel' | 'lifebuoy' | 'lightbulb' | 'limit' | 'linux' | 'list' | 'list-check-mark' | 'location' | 'lock-closed' | 'lock-closed-check' | 'lock-closed-filled' | 'lock-open' | 'lock-open-cross' | 'lock-open-filled' | 'mail' | 'mail-circle-filled' | 'mail-settings' | 'megaphone' | 'menu' | 'menu-thin' | 'microsoft' | 'minimize' | 'minus' | 'minus-circle' | 'minus-circle-filled' | 'monitoring' | 'monitoring-off' | 'my-little-admin' | 'net' | 'nine-dots' | 'node-js' | 'package' | 'panel' | 'panel-check' | 'panel-eye' | 'panel-key' | 'panel-settings' | 'panels' | 'pause-circle' | 'pencil' | 'pencil-dialog' | 'php' | 'phpmyadmin' | 'pin' | 'pipette' | 'plans' | 'plugins' | 'plus' | 'power' | 'projects' | 'puzzle' | 'python' | 'question-mark-circle' | 'question-mark-circle-filled' | 'ram' | 'react-js' | 'recycle' | 'redirect-circle-filled' | 'refresh' | 'reload' | 'remove' | 'reset' | 'resource' | 'ribbon' | 'rocket' | 'ruby' | 'sand-clock' | 'scan' | 'screen' | 'search' | 'security-check' | 'send' | 'server' | 'servers' | 'share' | 'shield' | 'shield-attention-filled' | 'shield-chain' | 'shield-filled' | 'shopping-cart' | 'sidebar-right-hide' | 'sidebar-right-show' | 'signal-light' | 'site-page' | 'sleep' | 'sliders' | 'square-with-circles' | 'star' | 'star-circle-filled' | 'star-filled' | 'star-half-filled' | 'start' | 'start-circle' | 'start-filled' | 'stop' | 'stop-circle' | 'storage' | 'themes' | 'three-dots-horizontal' | 'three-dots-vertical' | 'tools' | 'transfer' | 'triangle-exclamation-mark' | 'triangle-exclamation-mark-filled' | 'unarchive' | 'user' | 'volume' | 'web' | 'web-plus' | 'web-settings' | 'windows' | 'woocommerce' | 'wordpress' | 'zero-circle-filled';
|
|
3
3
|
export declare const NAMES: IconName[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ItemList';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementType, SyntheticEvent, ReactNode } from 'react';
|
|
2
|
+
import { PolymorphicComponentProps } from '../../utils/types';
|
|
2
3
|
import './Link.less';
|
|
3
|
-
export declare type
|
|
4
|
+
export declare type BaseLinkProps = {
|
|
4
5
|
/**
|
|
5
6
|
* @ignore
|
|
6
7
|
*/
|
|
@@ -13,7 +14,7 @@ export declare type LinkProps<P> = {
|
|
|
13
14
|
* Content of the link.
|
|
14
15
|
* @since 1.9.0
|
|
15
16
|
*/
|
|
16
|
-
children
|
|
17
|
+
children?: ReactNode;
|
|
17
18
|
/**
|
|
18
19
|
* @ignore
|
|
19
20
|
*/
|
|
@@ -29,19 +30,20 @@ export declare type LinkProps<P> = {
|
|
|
29
30
|
* @since 1.9.0
|
|
30
31
|
*/
|
|
31
32
|
pseudo?: boolean;
|
|
33
|
+
};
|
|
34
|
+
export declare type LinkProps<Component extends ElementType = 'a'> = {
|
|
32
35
|
/**
|
|
33
36
|
* Component to render as the root element. Useful when rendering a `Link` as other component or tag.
|
|
34
|
-
* @since
|
|
37
|
+
* @since 0.0.42
|
|
38
|
+
* @type ElementType
|
|
39
|
+
* @default a
|
|
35
40
|
*/
|
|
36
|
-
component?:
|
|
37
|
-
} &
|
|
38
|
-
/**
|
|
39
|
-
* FIXME: With the following code all @ts-ignore comments can be removed, but react-docgen cannot parse it.
|
|
40
|
-
* const Link = <P extends any>({ ... }: LinkProps<P>) => {
|
|
41
|
-
*/
|
|
41
|
+
component?: Component;
|
|
42
|
+
} & PolymorphicComponentProps<Component, BaseLinkProps>;
|
|
42
43
|
/**
|
|
43
44
|
* `Link` is used for navigation purposes.
|
|
44
|
-
*
|
|
45
|
+
*
|
|
46
|
+
* Since: 1.9.0
|
|
45
47
|
*/
|
|
46
|
-
declare const Link: <
|
|
48
|
+
declare const Link: <Component extends ElementType<any> = "a">({ baseClassName, className, onClick, disabled, pseudo, component, children, ...other }: LinkProps<Component>) => JSX.Element;
|
|
47
49
|
export default Link;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, ITEMS_PER_PAGE_OPTIONS } from './Pagination';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Panel';
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import PopperJs, { Behavior, ModifierFn, Placement, Position } from 'popper.js';
|
|
2
|
+
import { Component, CSSProperties, PropsWithChildren, ReactElement, RefObject } from 'react';
|
|
3
|
+
export interface PopperState {
|
|
4
|
+
popperStyle: CSSStyleDeclaration | null;
|
|
5
|
+
arrowStyle: CSSStyleDeclaration | null;
|
|
6
|
+
actualPlacement: Placement | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare type PopperProps = PropsWithChildren<{
|
|
9
|
+
/**
|
|
10
|
+
* Target for popper.
|
|
11
|
+
*/
|
|
12
|
+
target: ReactElement;
|
|
13
|
+
/**
|
|
14
|
+
* A React reference to the DOM element that needs for calculating the position of the popup.
|
|
15
|
+
*/
|
|
16
|
+
targetRef?: RefObject<HTMLElement | undefined>;
|
|
17
|
+
/**
|
|
18
|
+
* Arrow element of popper
|
|
19
|
+
*/
|
|
20
|
+
arrow?: ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* Whether show popper content.
|
|
23
|
+
*/
|
|
24
|
+
show?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Boundaries element for preventOverflow property.
|
|
27
|
+
*/
|
|
28
|
+
boundariesElement?: 'scrollParent' | 'window' | 'viewport' | HTMLElement;
|
|
29
|
+
/**
|
|
30
|
+
* The behavior used to change the popper's placement.
|
|
31
|
+
*/
|
|
32
|
+
behavior?: Behavior | Position[];
|
|
33
|
+
/**
|
|
34
|
+
* Placement for popper.
|
|
35
|
+
*/
|
|
36
|
+
placement?: Placement;
|
|
37
|
+
/**
|
|
38
|
+
* zIndex value.
|
|
39
|
+
*/
|
|
40
|
+
zIndex?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Shift your popper on both axis.
|
|
43
|
+
*/
|
|
44
|
+
offset?: number | string;
|
|
45
|
+
/**
|
|
46
|
+
* Update callback function
|
|
47
|
+
*/
|
|
48
|
+
onUpdate?: (state: PopperState) => void;
|
|
49
|
+
/**
|
|
50
|
+
* @ignore
|
|
51
|
+
*/
|
|
52
|
+
style?: CSSProperties;
|
|
53
|
+
/**
|
|
54
|
+
* @ignore
|
|
55
|
+
*/
|
|
56
|
+
className?: string;
|
|
57
|
+
/**
|
|
58
|
+
* @ignore
|
|
59
|
+
*/
|
|
60
|
+
baseClassName?: string;
|
|
61
|
+
}>;
|
|
62
|
+
/**
|
|
63
|
+
* `Popper` component.
|
|
64
|
+
*/
|
|
65
|
+
declare class Popper extends Component<PopperProps, PopperState> {
|
|
66
|
+
static defaultProps: {
|
|
67
|
+
show: boolean;
|
|
68
|
+
children: null;
|
|
69
|
+
arrow: null;
|
|
70
|
+
placement: string;
|
|
71
|
+
behavior: string;
|
|
72
|
+
offset: string;
|
|
73
|
+
onUpdate: null;
|
|
74
|
+
className: null;
|
|
75
|
+
baseClassName: string;
|
|
76
|
+
zIndex: null;
|
|
77
|
+
boundariesElement: string;
|
|
78
|
+
style: undefined;
|
|
79
|
+
targetRef: undefined;
|
|
80
|
+
};
|
|
81
|
+
state: {
|
|
82
|
+
popperStyle: null;
|
|
83
|
+
arrowStyle: null;
|
|
84
|
+
actualPlacement: PopperJs.Placement | undefined;
|
|
85
|
+
};
|
|
86
|
+
componentDidMount(): void;
|
|
87
|
+
componentDidUpdate(prevProps: PopperProps): void;
|
|
88
|
+
componentWillUnmount(): void;
|
|
89
|
+
popper: PopperJs | null;
|
|
90
|
+
contentRef: RefObject<HTMLDivElement>;
|
|
91
|
+
arrowRef: Element | null;
|
|
92
|
+
updatePopper({ show, boundariesElement, placement, offset, behavior, arrow, targetRef, }: PopperProps): void;
|
|
93
|
+
extractStyles: ModifierFn;
|
|
94
|
+
render(): JSX.Element;
|
|
95
|
+
}
|
|
96
|
+
export default Popper;
|