@plesk/ui-library 3.35.0 → 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/Icon/constants.js +2 -2
- package/cjs/components/Icon/images/symbols.svg +15 -1
- 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/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/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 +15 -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 +295 -468
- 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/Icon/constants.js +2 -2
- package/esm/components/Icon/images/symbols.svg +15 -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/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/index.js +1 -1
- package/esm/tests/index.js +3 -0
- package/esm/tests/renderer.js +19 -0
- package/package.json +13 -9
- package/styleguide/build/bundle.edc3f2a1.js +2 -0
- package/styleguide/images/symbols.svg +15 -1
- package/styleguide/index.html +2 -2
- package/types/src/components/Drawer/DrawerProgress.d.ts +3 -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/Pagination/index.d.ts +1 -0
- package/types/src/components/Panel/index.d.ts +1 -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/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 +5 -0
- package/types/src/tests/index.d.ts +1 -0
- package/types/src/tests/renderer.d.ts +23 -0
- package/styleguide/build/bundle.2a886a79.js +0 -2
- /package/styleguide/build/{bundle.2a886a79.js.LICENSE.txt → bundle.edc3f2a1.js.LICENSE.txt} +0 -0
|
@@ -7,7 +7,7 @@ exports.NAMES_12 = exports.NAMES = void 0;
|
|
|
7
7
|
/* eslint-disable max-len */
|
|
8
8
|
// This file is generated by create-svg-sprite. Do not edit.
|
|
9
9
|
|
|
10
|
-
const NAMES_12 = ['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', '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', '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'];
|
|
10
|
+
const NAMES_12 = ['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'];
|
|
11
11
|
exports.NAMES_12 = NAMES_12;
|
|
12
|
-
const NAMES = ['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', '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', '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'];
|
|
12
|
+
const NAMES = ['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'];
|
|
13
13
|
exports.NAMES = NAMES;
|
|
@@ -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" />
|
|
@@ -1318,6 +1324,14 @@
|
|
|
1318
1324
|
<symbol viewBox="0 0 16 16" id="puzzle:16">
|
|
1319
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" />
|
|
1320
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>
|
|
1321
1335
|
<symbol viewBox="0 0 12 12" id="question-mark-circle-filled:12">
|
|
1322
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" />
|
|
1323
1337
|
</symbol>
|
|
@@ -6,15 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react =
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _react = require("react");
|
|
11
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
11
|
var _constants = require("../../constants");
|
|
13
12
|
var _utils = require("../utils");
|
|
14
13
|
var _ProgressStep = require("../ProgressStep");
|
|
15
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
15
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
19
16
|
|
|
20
17
|
/**
|
|
@@ -70,16 +67,19 @@ class Progress extends _react.Component {
|
|
|
70
67
|
const {
|
|
71
68
|
onStatusChange
|
|
72
69
|
} = this.props;
|
|
70
|
+
if (!status) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
73
|
(0, _utils.safeInvoke)(onStatusChange, status);
|
|
74
74
|
}
|
|
75
|
-
componentDidUpdate(
|
|
75
|
+
componentDidUpdate(_, prevState) {
|
|
76
76
|
const {
|
|
77
77
|
status
|
|
78
78
|
} = this.state;
|
|
79
79
|
const {
|
|
80
80
|
onStatusChange
|
|
81
81
|
} = this.props;
|
|
82
|
-
if (prevState.status !== status) {
|
|
82
|
+
if (prevState.status !== status && status) {
|
|
83
83
|
(0, _utils.safeInvoke)(onStatusChange, status);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -98,31 +98,11 @@ class Progress extends _react.Component {
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
Progress
|
|
102
|
-
/**
|
|
103
|
-
* On overall status event handler.
|
|
104
|
-
* @since 1.10.0
|
|
105
|
-
*/
|
|
106
|
-
onStatusChange: _propTypes.default.func,
|
|
107
|
-
/**
|
|
108
|
-
* Content of the `Progress`.
|
|
109
|
-
* @since 1.10.0
|
|
110
|
-
*/
|
|
111
|
-
children: _propTypes.default.node,
|
|
112
|
-
/**
|
|
113
|
-
* @ignore
|
|
114
|
-
*/
|
|
115
|
-
className: _propTypes.default.string,
|
|
116
|
-
/**
|
|
117
|
-
* @ignore
|
|
118
|
-
*/
|
|
119
|
-
baseClassName: _propTypes.default.string
|
|
120
|
-
};
|
|
121
|
-
Progress.defaultProps = {
|
|
101
|
+
(0, _defineProperty2.default)(Progress, "defaultProps", {
|
|
122
102
|
onStatusChange: null,
|
|
123
103
|
children: null,
|
|
124
104
|
className: null,
|
|
125
105
|
baseClassName: `${_constants.CLS_PREFIX}progress`
|
|
126
|
-
};
|
|
106
|
+
});
|
|
127
107
|
var _default = Progress;
|
|
128
108
|
exports.default = _default;
|
|
@@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.STATUS_WARNING = exports.STATUS_RUNNING = exports.STATUS_NOT_STARTED = exports.STATUS_ERROR = exports.STATUS_DONE = exports.STATUS_CANCELED = void 0;
|
|
8
|
-
var _react =
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
+
var _react = require("react");
|
|
10
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
10
|
var _Icon = _interopRequireWildcard(require("../Icon"));
|
|
12
11
|
var _Status = _interopRequireDefault(require("../Status"));
|
|
@@ -29,22 +28,21 @@ exports.STATUS_WARNING = STATUS_WARNING;
|
|
|
29
28
|
const STATUS_ERROR = 'error';
|
|
30
29
|
exports.STATUS_ERROR = STATUS_ERROR;
|
|
31
30
|
const STATUS_CANCELED = 'canceled';
|
|
32
|
-
|
|
31
|
+
exports.STATUS_CANCELED = STATUS_CANCELED;
|
|
33
32
|
/**
|
|
34
33
|
* `ProgressStep` is a part of the [Progress](#!/Progress) component.
|
|
35
34
|
* @since 1.10.0
|
|
36
35
|
*/
|
|
37
|
-
exports.STATUS_CANCELED = STATUS_CANCELED;
|
|
38
36
|
const ProgressStep = _ref => {
|
|
39
37
|
let {
|
|
40
|
-
baseClassName,
|
|
41
38
|
className,
|
|
42
39
|
children,
|
|
43
40
|
icon,
|
|
44
41
|
title,
|
|
42
|
+
statusText,
|
|
45
43
|
progress,
|
|
46
44
|
status,
|
|
47
|
-
|
|
45
|
+
baseClassName,
|
|
48
46
|
...props
|
|
49
47
|
} = _ref;
|
|
50
48
|
let intent = null;
|
|
@@ -120,46 +118,6 @@ const ProgressStep = _ref => {
|
|
|
120
118
|
})]
|
|
121
119
|
});
|
|
122
120
|
};
|
|
123
|
-
ProgressStep.propTypes = {
|
|
124
|
-
/**
|
|
125
|
-
* Title of the step
|
|
126
|
-
* @since 1.10.0
|
|
127
|
-
*/
|
|
128
|
-
title: _propTypes.default.node,
|
|
129
|
-
/**
|
|
130
|
-
* Status for the step
|
|
131
|
-
* @since 1.10.0
|
|
132
|
-
*/
|
|
133
|
-
status: _propTypes.default.oneOf([STATUS_NOT_STARTED, STATUS_RUNNING, STATUS_DONE, STATUS_WARNING, STATUS_ERROR, STATUS_CANCELED]),
|
|
134
|
-
/**
|
|
135
|
-
* Text description for the status of the step
|
|
136
|
-
* @since 1.10.0
|
|
137
|
-
*/
|
|
138
|
-
statusText: _propTypes.default.node,
|
|
139
|
-
/**
|
|
140
|
-
* Progress indication in numbers
|
|
141
|
-
* @since 1.10.0
|
|
142
|
-
*/
|
|
143
|
-
progress: _propTypes.default.number,
|
|
144
|
-
/**
|
|
145
|
-
* Content of the `ProgressStep`.
|
|
146
|
-
* @since 1.10.0
|
|
147
|
-
*/
|
|
148
|
-
children: _propTypes.default.node,
|
|
149
|
-
/**
|
|
150
|
-
* Name of icon or [Icon](#!/Icon) component
|
|
151
|
-
* @ignore
|
|
152
|
-
*/
|
|
153
|
-
icon: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.element]),
|
|
154
|
-
/**
|
|
155
|
-
* @ignore
|
|
156
|
-
*/
|
|
157
|
-
className: _propTypes.default.string,
|
|
158
|
-
/**
|
|
159
|
-
* @ignore
|
|
160
|
-
*/
|
|
161
|
-
baseClassName: _propTypes.default.string
|
|
162
|
-
};
|
|
163
121
|
ProgressStep.defaultProps = {
|
|
164
122
|
icon: null,
|
|
165
123
|
title: null,
|
|
@@ -3,7 +3,42 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
6
|
+
Object.defineProperty(exports, "STATUS_CANCELED", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _ProgressStep.STATUS_CANCELED;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "STATUS_DONE", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _ProgressStep.STATUS_DONE;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "STATUS_ERROR", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _ProgressStep.STATUS_ERROR;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "STATUS_NOT_STARTED", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _ProgressStep.STATUS_NOT_STARTED;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "STATUS_RUNNING", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _ProgressStep.STATUS_RUNNING;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "STATUS_WARNING", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _ProgressStep.STATUS_WARNING;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
7
42
|
Object.defineProperty(exports, "default", {
|
|
8
43
|
enumerable: true,
|
|
9
44
|
get: function () {
|
|
@@ -11,16 +46,5 @@ Object.defineProperty(exports, "default", {
|
|
|
11
46
|
}
|
|
12
47
|
});
|
|
13
48
|
var _ProgressStep = _interopRequireWildcard(require("./ProgressStep"));
|
|
14
|
-
Object.keys(_ProgressStep).forEach(function (key) {
|
|
15
|
-
if (key === "default" || key === "__esModule") return;
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
17
|
-
if (key in exports && exports[key] === _ProgressStep[key]) return;
|
|
18
|
-
Object.defineProperty(exports, key, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _ProgressStep[key];
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
49
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
26
50
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -5,15 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
9
|
var _constants = require("../../constants");
|
|
13
10
|
var _Tooltip = _interopRequireDefault(require("../Tooltip"));
|
|
14
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
12
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
18
13
|
|
|
19
14
|
/**
|
|
@@ -21,121 +16,51 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
21
16
|
* It provides immediate results that is why it should not be used in Form.
|
|
22
17
|
* @since 0.0.42
|
|
23
18
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
children,
|
|
42
|
-
onChange,
|
|
43
|
-
tooltip,
|
|
44
|
-
intent,
|
|
45
|
-
checked,
|
|
46
|
-
defaultChecked,
|
|
47
|
-
disabled,
|
|
48
|
-
loading,
|
|
49
|
-
...props
|
|
50
|
-
} = this.props;
|
|
51
|
-
let result = /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
|
|
52
|
-
className: (0, _classnames.default)(baseClassName, {
|
|
53
|
-
[`${baseClassName}--${intent}`]: intent,
|
|
54
|
-
[`${baseClassName}--loading`]: loading
|
|
55
|
-
}, className),
|
|
56
|
-
...props,
|
|
57
|
-
children: [children ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
58
|
-
className: `${baseClassName}__label`,
|
|
59
|
-
children: children
|
|
60
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
61
|
-
type: "checkbox",
|
|
62
|
-
onChange: this.handleChange,
|
|
63
|
-
checked: checked,
|
|
64
|
-
defaultChecked: checked === null || checked === undefined ? defaultChecked : undefined,
|
|
65
|
-
disabled: disabled || loading
|
|
66
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
67
|
-
className: `${baseClassName}__indicator`
|
|
68
|
-
})]
|
|
69
|
-
});
|
|
70
|
-
if (tooltip) {
|
|
71
|
-
result = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
72
|
-
title: tooltip,
|
|
73
|
-
children: result
|
|
74
|
-
});
|
|
19
|
+
const Switch = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
className,
|
|
22
|
+
children,
|
|
23
|
+
onChange,
|
|
24
|
+
tooltip,
|
|
25
|
+
intent,
|
|
26
|
+
checked,
|
|
27
|
+
defaultChecked,
|
|
28
|
+
baseClassName = `${_constants.CLS_PREFIX}switch`,
|
|
29
|
+
disabled = false,
|
|
30
|
+
loading = false,
|
|
31
|
+
...props
|
|
32
|
+
} = _ref;
|
|
33
|
+
const handleChange = event => {
|
|
34
|
+
if (!disabled && onChange) {
|
|
35
|
+
onChange(event.target.checked);
|
|
75
36
|
}
|
|
76
|
-
|
|
37
|
+
};
|
|
38
|
+
const result = /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
|
|
39
|
+
className: (0, _classnames.default)(baseClassName, {
|
|
40
|
+
[`${baseClassName}--${intent}`]: intent,
|
|
41
|
+
[`${baseClassName}--loading`]: loading
|
|
42
|
+
}, className),
|
|
43
|
+
...props,
|
|
44
|
+
children: [children ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
45
|
+
className: `${baseClassName}__label`,
|
|
46
|
+
children: children
|
|
47
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
48
|
+
type: "checkbox",
|
|
49
|
+
onChange: handleChange,
|
|
50
|
+
checked: checked,
|
|
51
|
+
defaultChecked: checked === null || checked === undefined ? defaultChecked : undefined,
|
|
52
|
+
disabled: disabled || loading
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
54
|
+
className: `${baseClassName}__indicator`
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
if (tooltip) {
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
59
|
+
title: tooltip,
|
|
60
|
+
children: result
|
|
61
|
+
});
|
|
77
62
|
}
|
|
78
|
-
|
|
79
|
-
Switch.propTypes = {
|
|
80
|
-
/**
|
|
81
|
-
* Determine whether the `Switch` is checked.
|
|
82
|
-
* @since 0.0.42
|
|
83
|
-
*/
|
|
84
|
-
checked: _propTypes.default.bool,
|
|
85
|
-
/**
|
|
86
|
-
* @ignore
|
|
87
|
-
*/
|
|
88
|
-
defaultChecked: _propTypes.default.bool,
|
|
89
|
-
/**
|
|
90
|
-
* A callback function, can be executed when the checked state is changing.
|
|
91
|
-
* @since 0.0.42
|
|
92
|
-
*/
|
|
93
|
-
onChange: _propTypes.default.func,
|
|
94
|
-
/**
|
|
95
|
-
* Tooltip for component
|
|
96
|
-
* @since 0.0.42
|
|
97
|
-
*/
|
|
98
|
-
tooltip: _propTypes.default.any,
|
|
99
|
-
/**
|
|
100
|
-
* Visual intent color to apply to component.
|
|
101
|
-
* @since 0.3.0
|
|
102
|
-
*/
|
|
103
|
-
intent: _propTypes.default.oneOf(['warning', 'danger']),
|
|
104
|
-
/**
|
|
105
|
-
* Is `Switch` disabled?
|
|
106
|
-
* @since 0.0.42
|
|
107
|
-
*/
|
|
108
|
-
disabled: _propTypes.default.bool,
|
|
109
|
-
/**
|
|
110
|
-
* Loading indication
|
|
111
|
-
* @since 0.3.0
|
|
112
|
-
*/
|
|
113
|
-
loading: _propTypes.default.bool,
|
|
114
|
-
/**
|
|
115
|
-
* Label of the `Switch`
|
|
116
|
-
* @since 0.0.42
|
|
117
|
-
*/
|
|
118
|
-
children: _propTypes.default.node,
|
|
119
|
-
/**
|
|
120
|
-
* @ignore
|
|
121
|
-
*/
|
|
122
|
-
className: _propTypes.default.string,
|
|
123
|
-
/**
|
|
124
|
-
* @ignore
|
|
125
|
-
*/
|
|
126
|
-
baseClassName: _propTypes.default.string
|
|
127
|
-
};
|
|
128
|
-
Switch.defaultProps = {
|
|
129
|
-
checked: undefined,
|
|
130
|
-
defaultChecked: undefined,
|
|
131
|
-
onChange: undefined,
|
|
132
|
-
tooltip: undefined,
|
|
133
|
-
intent: undefined,
|
|
134
|
-
disabled: false,
|
|
135
|
-
loading: false,
|
|
136
|
-
children: undefined,
|
|
137
|
-
className: undefined,
|
|
138
|
-
baseClassName: `${_constants.CLS_PREFIX}switch`
|
|
63
|
+
return result;
|
|
139
64
|
};
|
|
140
65
|
var _default = Switch;
|
|
141
66
|
exports.default = _default;
|