linear-react-components-ui 1.1.13 → 1.1.14-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +77 -45
- package/.gitlab-ci.yml +5 -13
- package/.tool-versions +1 -0
- package/.vscode/settings.json +3 -12
- package/babel.config.json +4 -4
- package/lib/@types/SizePixels.d.ts +1 -1
- package/lib/alerts/AlertContainer.js +56 -47
- package/lib/alerts/AlertProvider.js +51 -33
- package/lib/alerts/BaseAlert.js +18 -11
- package/lib/alerts/Message.d.ts +1 -1
- package/lib/alerts/Message.js +44 -77
- package/lib/alerts/helpers.js +3 -2
- package/lib/alerts/index.js +3 -2
- package/lib/alerts/types.d.ts +0 -1
- package/lib/alerts/withAlert.js +9 -8
- package/lib/assets/styles/alerts.scss +7 -4
- package/lib/assets/styles/button.scss +9 -11
- package/lib/assets/styles/checkbox.scss +38 -45
- package/lib/assets/styles/colors.scss +1 -3
- package/lib/assets/styles/commons.scss +0 -1
- package/lib/assets/styles/dialog.scss +20 -37
- package/lib/assets/styles/drawers.scss +6 -9
- package/lib/assets/styles/fieldset.scss +0 -3
- package/lib/assets/styles/gridlayout.scss +2 -0
- package/lib/assets/styles/hint.scss +0 -21
- package/lib/assets/styles/icon.scss +4 -31
- package/lib/assets/styles/input.scss +7 -7
- package/lib/assets/styles/multiSelect.scss +1 -6
- package/lib/assets/styles/radio.scss +35 -37
- package/lib/assets/styles/select.scss +7 -13
- package/lib/assets/styles/table.scss +1 -9
- package/lib/assets/styles/tabs.scss +18 -28
- package/lib/avatar/index.js +39 -39
- package/lib/badge/index.js +13 -11
- package/lib/buttons/ActivateButton.js +7 -4
- package/lib/buttons/AddButton.js +10 -7
- package/lib/buttons/Button.js +9 -8
- package/lib/buttons/ButtonGroups.js +4 -5
- package/lib/buttons/CancelButton.js +5 -6
- package/lib/buttons/DangerButton.js +5 -6
- package/lib/buttons/DefaultButton.js +85 -85
- package/lib/buttons/DestroyButton.js +5 -6
- package/lib/buttons/EditButton.js +7 -4
- package/lib/buttons/InactivateButton.js +7 -4
- package/lib/buttons/InfoButton.js +5 -6
- package/lib/buttons/PrimaryButton.js +5 -6
- package/lib/buttons/RestoreButton.js +7 -4
- package/lib/buttons/SaveButton.js +5 -6
- package/lib/buttons/SuccessButton.js +5 -6
- package/lib/buttons/WarningButton.js +5 -6
- package/lib/buttons/button_container/index.js +19 -15
- package/lib/buttons/index.js +16 -15
- package/lib/buttons/split_button/index.js +23 -20
- package/lib/buttons/types.d.ts +0 -1
- package/lib/calendar/DangerCalendar.js +5 -6
- package/lib/calendar/InfoCalendar.js +5 -6
- package/lib/calendar/PrimaryCalendar.js +5 -6
- package/lib/calendar/SuccessCalendar.js +5 -6
- package/lib/calendar/WarningCalendar.js +5 -6
- package/lib/calendar/base/Day.js +11 -12
- package/lib/calendar/base/Month.js +17 -12
- package/lib/calendar/base/Week.js +17 -12
- package/lib/calendar/base/helpers.js +11 -11
- package/lib/calendar/base/index.js +43 -29
- package/lib/calendar/index.js +7 -6
- package/lib/checkbox/Label.js +9 -19
- package/lib/checkbox/index.d.ts +2 -2
- package/lib/checkbox/index.js +95 -81
- package/lib/checkbox/types.d.ts +1 -2
- package/lib/dialog/Alert.js +4 -3
- package/lib/dialog/Custom.js +16 -14
- package/lib/dialog/Error.js +4 -3
- package/lib/dialog/Information.js +4 -3
- package/lib/dialog/Question.js +12 -11
- package/lib/dialog/Warning.js +5 -5
- package/lib/dialog/base/Content.js +5 -7
- package/lib/dialog/base/Footer.js +7 -4
- package/lib/dialog/base/Header.js +28 -28
- package/lib/dialog/base/index.d.ts +2 -8
- package/lib/dialog/base/index.js +104 -108
- package/lib/dialog/base/style.js +10 -7
- package/lib/dialog/form/index.js +35 -36
- package/lib/dialog/index.js +8 -7
- package/lib/dialog/types.d.ts +13 -8
- package/lib/drawer/Content.js +10 -11
- package/lib/drawer/Drawer.js +83 -69
- package/lib/drawer/Header.js +36 -33
- package/lib/drawer/helpers.js +3 -2
- package/lib/drawer/index.js +4 -3
- package/lib/dropdown/Popup.d.ts +1 -1
- package/lib/dropdown/Popup.js +39 -38
- package/lib/dropdown/helper.js +5 -3
- package/lib/dropdown/types.d.ts +0 -1
- package/lib/dropdown/withDropdown.js +58 -37
- package/lib/fieldset/index.js +56 -50
- package/lib/fieldset/types.d.ts +0 -2
- package/lib/form/Field.d.ts +0 -2
- package/lib/form/Field.js +74 -68
- package/lib/form/FieldArray.d.ts +0 -2
- package/lib/form/FieldArray.js +90 -66
- package/lib/form/FieldNumber.d.ts +0 -2
- package/lib/form/FieldNumber.js +53 -33
- package/lib/form/FieldPeriod.d.ts +0 -2
- package/lib/form/FieldPeriod.js +52 -46
- package/lib/form/helpers.d.ts +0 -2
- package/lib/form/helpers.js +26 -21
- package/lib/form/index.d.ts +0 -2
- package/lib/form/index.js +143 -111
- package/lib/form/types.d.ts +4 -7
- package/lib/form/withFieldHOC.d.ts +0 -2
- package/lib/form/withFieldHOC.js +38 -31
- package/lib/form/withFormSecurity.d.ts +0 -2
- package/lib/form/withFormSecurity.js +34 -26
- package/lib/gridlayout/GridCol.js +13 -13
- package/lib/gridlayout/GridRow.js +11 -17
- package/lib/gridlayout/index.js +3 -2
- package/lib/gridlayout/types.d.ts +1 -1
- package/lib/hint/index.d.ts +1 -2
- package/lib/hint/index.js +28 -17
- package/lib/hint/types.d.ts +0 -3
- package/lib/icons/helper.d.ts +0 -4
- package/lib/icons/helper.js +4 -7
- package/lib/icons/index.d.ts +2 -3
- package/lib/icons/index.js +47 -42
- package/lib/icons/types.d.ts +9 -22
- package/lib/index.d.ts +1 -2
- package/lib/index.js +9 -9
- package/lib/inputs/base/InputTextBase.d.ts +0 -2
- package/lib/inputs/base/InputTextBase.js +111 -143
- package/lib/inputs/base/helpers.d.ts +2 -3
- package/lib/inputs/base/helpers.js +25 -20
- package/lib/inputs/base/types.d.ts +3 -17
- package/lib/inputs/color/index.js +38 -27
- package/lib/inputs/date/Dialog.d.ts +0 -2
- package/lib/inputs/date/Dialog.js +9 -8
- package/lib/inputs/date/Dropdown.d.ts +0 -2
- package/lib/inputs/date/Dropdown.js +10 -11
- package/lib/inputs/date/helpers.d.ts +0 -2
- package/lib/inputs/date/helpers.js +13 -13
- package/lib/inputs/date/index.d.ts +0 -2
- package/lib/inputs/date/index.js +150 -125
- package/lib/inputs/date/types.d.ts +1 -4
- package/lib/inputs/file/DefaultFile.d.ts +0 -2
- package/lib/inputs/file/DefaultFile.js +72 -45
- package/lib/inputs/file/DragDropFile.d.ts +0 -2
- package/lib/inputs/file/DragDropFile.js +147 -95
- package/lib/inputs/file/File.d.ts +1 -3
- package/lib/inputs/file/File.js +28 -22
- package/lib/inputs/file/FileButtonSettings.d.ts +0 -2
- package/lib/inputs/file/FileButtonSettings.js +12 -12
- package/lib/inputs/file/helpers.d.ts +0 -2
- package/lib/inputs/file/helpers.js +6 -4
- package/lib/inputs/file/index.d.ts +0 -2
- package/lib/inputs/file/index.js +4 -3
- package/lib/inputs/file/types.d.ts +0 -2
- package/lib/inputs/inputHOC.d.ts +1 -2
- package/lib/inputs/inputHOC.js +32 -19
- package/lib/inputs/mask/BaseMask.d.ts +5 -4
- package/lib/inputs/mask/BaseMask.js +34 -121
- package/lib/inputs/mask/Cnpj.d.ts +0 -2
- package/lib/inputs/mask/Cnpj.js +29 -16
- package/lib/inputs/mask/Cpf.d.ts +0 -2
- package/lib/inputs/mask/Cpf.js +35 -18
- package/lib/inputs/mask/Phone.d.ts +0 -2
- package/lib/inputs/mask/Phone.js +4 -5
- package/lib/inputs/mask/ZipCode.d.ts +0 -2
- package/lib/inputs/mask/ZipCode.js +7 -4
- package/lib/inputs/mask/helpers.d.ts +12 -53
- package/lib/inputs/mask/helpers.js +36 -90
- package/lib/inputs/{errorMessage/index.d.ts → mask/imaskHOC.d.ts} +7 -5
- package/lib/inputs/mask/imaskHOC.js +224 -0
- package/lib/inputs/mask/index.d.ts +2 -4
- package/lib/inputs/mask/index.js +6 -5
- package/lib/inputs/mask/types.d.ts +18 -22
- package/lib/inputs/multiSelect/ActionButtons.d.ts +0 -2
- package/lib/inputs/multiSelect/ActionButtons.js +21 -22
- package/lib/inputs/multiSelect/Dropdown.d.ts +0 -2
- package/lib/inputs/multiSelect/Dropdown.js +65 -48
- package/lib/inputs/multiSelect/helper.d.ts +0 -2
- package/lib/inputs/multiSelect/helper.js +7 -8
- package/lib/inputs/multiSelect/index.d.ts +0 -2
- package/lib/inputs/multiSelect/index.js +132 -80
- package/lib/inputs/multiSelect/types.d.ts +0 -2
- package/lib/inputs/number/BaseNumber.d.ts +2 -3
- package/lib/inputs/number/BaseNumber.js +21 -22
- package/lib/inputs/number/Currency.d.ts +2 -3
- package/lib/inputs/number/Currency.js +6 -6
- package/lib/inputs/number/Decimal.d.ts +2 -3
- package/lib/inputs/number/Decimal.js +5 -2
- package/lib/inputs/number/format_number.js +5 -5
- package/lib/inputs/number/index.d.ts +2 -3
- package/lib/inputs/number/index.js +49 -18
- package/lib/inputs/number/types.d.ts +14 -15
- package/lib/inputs/period/Dialog.d.ts +1 -3
- package/lib/inputs/period/Dialog.js +9 -8
- package/lib/inputs/period/Dropdown.d.ts +0 -2
- package/lib/inputs/period/Dropdown.js +8 -7
- package/lib/inputs/period/PeriodList.d.ts +0 -2
- package/lib/inputs/period/PeriodList.js +12 -13
- package/lib/inputs/period/helper.d.ts +0 -2
- package/lib/inputs/period/helper.js +36 -33
- package/lib/inputs/period/index.d.ts +0 -2
- package/lib/inputs/period/index.js +194 -160
- package/lib/inputs/period/types.d.ts +1 -3
- package/lib/inputs/search/index.d.ts +1 -2
- package/lib/inputs/search/index.js +63 -40
- package/lib/inputs/select/ActionButtons.d.ts +1 -2
- package/lib/inputs/select/ActionButtons.js +34 -24
- package/lib/inputs/select/Dropdown.d.ts +1 -2
- package/lib/inputs/select/Dropdown.js +58 -39
- package/lib/inputs/select/helper.d.ts +1 -2
- package/lib/inputs/select/helper.js +43 -49
- package/lib/inputs/select/index.d.ts +0 -2
- package/lib/inputs/select/index.js +8 -9
- package/lib/inputs/select/multiple/Selecteds.d.ts +1 -3
- package/lib/inputs/select/multiple/Selecteds.js +21 -16
- package/lib/inputs/select/multiple/index.d.ts +0 -2
- package/lib/inputs/select/multiple/index.js +176 -128
- package/lib/inputs/select/simple/index.d.ts +0 -2
- package/lib/inputs/select/simple/index.js +179 -151
- package/lib/inputs/select/types.d.ts +2 -5
- package/lib/inputs/text/index.js +5 -2
- package/lib/inputs/textarea/index.d.ts +0 -2
- package/lib/inputs/textarea/index.js +9 -9
- package/lib/inputs/textarea/types.d.ts +0 -2
- package/lib/inputs/types.d.ts +7 -12
- package/lib/internals/colorStyles.js +3 -2
- package/lib/internals/constants.js +4 -2
- package/lib/internals/types.d.ts +2 -5
- package/lib/internals/withTooltip.d.ts +2 -3
- package/lib/internals/withTooltip.js +74 -74
- package/lib/labelMessages/index.js +41 -21
- package/lib/labels/DangerLabel.js +5 -6
- package/lib/labels/DefaultLabel.js +39 -25
- package/lib/labels/InfoLabel.js +5 -6
- package/lib/labels/PrimaryLabel.js +5 -6
- package/lib/labels/SuccessLabel.js +5 -6
- package/lib/labels/WarningLabel.js +5 -6
- package/lib/labels/index.js +8 -7
- package/lib/labels/label_container/index.js +7 -7
- package/lib/list/Header.js +7 -8
- package/lib/list/Item.js +68 -72
- package/lib/list/Separator.js +7 -4
- package/lib/list/helpers.js +5 -3
- package/lib/list/index.js +100 -73
- package/lib/menus/float/MenuItem.js +19 -18
- package/lib/menus/float/SubMenuContainer.js +32 -26
- package/lib/menus/float/helpers.js +3 -2
- package/lib/menus/float/index.js +17 -16
- package/lib/menus/float/types.d.ts +1 -1
- package/lib/menus/index.js +2 -1
- package/lib/menus/sidenav/ExpandMenu.js +7 -8
- package/lib/menus/sidenav/MenuLink.js +8 -9
- package/lib/menus/sidenav/NavMenuGroup.js +11 -12
- package/lib/menus/sidenav/NavMenuItem.js +60 -46
- package/lib/menus/sidenav/NavSubMenuItem.js +24 -19
- package/lib/menus/sidenav/helpers.js +8 -5
- package/lib/menus/sidenav/index.js +111 -83
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +6 -6
- package/lib/menus/sidenav/popup_menu_search/index.js +83 -63
- package/lib/menus/sidenav/types.d.ts +1 -1
- package/lib/noPermission/index.js +16 -13
- package/lib/panel/Content.d.ts +1 -1
- package/lib/panel/Content.js +56 -43
- package/lib/panel/DangerPanel.d.ts +1 -1
- package/lib/panel/DangerPanel.js +7 -4
- package/lib/panel/Default.d.ts +1 -1
- package/lib/panel/Default.js +56 -41
- package/lib/panel/Header.d.ts +1 -1
- package/lib/panel/Header.js +26 -28
- package/lib/panel/InfoPanel.d.ts +1 -1
- package/lib/panel/InfoPanel.js +7 -4
- package/lib/panel/PrimaryPanel.d.ts +1 -1
- package/lib/panel/PrimaryPanel.js +7 -4
- package/lib/panel/SuccessPanel.d.ts +1 -1
- package/lib/panel/SuccessPanel.js +7 -4
- package/lib/panel/ToolBar.d.ts +1 -1
- package/lib/panel/ToolBar.js +4 -5
- package/lib/panel/WarningPanel.d.ts +1 -1
- package/lib/panel/WarningPanel.js +7 -4
- package/lib/panel/helpers.d.ts +2 -7
- package/lib/panel/helpers.js +23 -11
- package/lib/panel/index.d.ts +1 -1
- package/lib/panel/index.js +9 -8
- package/lib/panel/types.d.ts +5 -46
- package/lib/permissionValidations.js +29 -24
- package/lib/popover/PopoverText.js +4 -5
- package/lib/popover/PopoverTitle.js +4 -5
- package/lib/popover/index.js +18 -14
- package/lib/progress/Bar.js +36 -30
- package/lib/progress/index.js +18 -16
- package/lib/radio/index.js +55 -34
- package/lib/shortcuts/index.js +8 -9
- package/lib/skeleton/SkeletonContainer.js +10 -9
- package/lib/skeleton/index.js +32 -25
- package/lib/spinner/SpinnerLoading.js +7 -6
- package/lib/spinner/index.js +36 -22
- package/lib/split/Split.js +110 -93
- package/lib/split/SplitSide.js +18 -19
- package/lib/split/helpers.js +3 -2
- package/lib/split/index.js +3 -2
- package/lib/table/Body.js +44 -41
- package/lib/table/Header.js +31 -28
- package/lib/table/HeaderColumn.d.ts +1 -1
- package/lib/table/HeaderColumn.js +21 -34
- package/lib/table/Row.js +47 -44
- package/lib/table/RowColumn.js +37 -36
- package/lib/table/helpers.js +12 -6
- package/lib/table/index.js +98 -78
- package/lib/table/types.d.ts +0 -3
- package/lib/tabs/{MenuTabs.d.ts → DropdownItems.d.ts} +3 -3
- package/lib/tabs/DropdownItems.js +65 -0
- package/lib/tabs/Menu.d.ts +1 -1
- package/lib/tabs/Menu.js +20 -32
- package/lib/tabs/MenuItems.d.ts +11 -0
- package/lib/tabs/MenuItems.js +76 -0
- package/lib/tabs/Panel.d.ts +1 -1
- package/lib/tabs/Panel.js +65 -69
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/index.js +221 -42
- package/lib/tabs/tabHelpers.d.ts +15 -4
- package/lib/tabs/tabHelpers.js +41 -36
- package/lib/tabs/types.d.ts +15 -48
- package/lib/toolbar/ButtonBar.js +39 -35
- package/lib/toolbar/LabelBar.js +36 -32
- package/lib/toolbar/Separator.js +7 -4
- package/lib/toolbar/ToolBarGroup.js +6 -6
- package/lib/toolbar/helpers.js +3 -2
- package/lib/toolbar/index.js +21 -19
- package/lib/toolbar/types.d.ts +0 -1
- package/lib/tooltip/index.js +32 -27
- package/lib/treetable/Body.js +32 -20
- package/lib/treetable/Header.js +14 -11
- package/lib/treetable/Row.js +137 -85
- package/lib/treetable/helpers.js +24 -15
- package/lib/treetable/index.js +10 -8
- package/lib/treeview/Header.js +6 -7
- package/lib/treeview/Node.js +132 -92
- package/lib/treeview/constants.js +2 -1
- package/lib/treeview/index.js +214 -148
- package/lib/treeview_old/Header.js +28 -0
- package/lib/treeview_old/Node.js +88 -0
- package/lib/treeview_old/index.js +42 -0
- package/lib/types-c2a0f035.d.ts +50 -0
- package/lib/uitour/helpers.js +7 -4
- package/lib/uitour/index.d.ts +1 -2
- package/lib/uitour/index.js +99 -112
- package/lib/uitour/types.d.ts +1 -9
- package/package.json +82 -77
- package/tsconfig.json +0 -1
- package/.eslintcache +0 -1
- package/.nvmrc +0 -1
- package/lib/assets/styles/error.scss +0 -9
- package/lib/assets/styles/textContent.scss +0 -9
- package/lib/hint/helpers.d.ts +0 -3
- package/lib/hint/helpers.js +0 -21
- package/lib/inputs/base/Label.d.ts +0 -14
- package/lib/inputs/base/Label.js +0 -35
- package/lib/inputs/errorMessage/index.js +0 -26
- package/lib/tabs/DropdownTabs.d.ts +0 -11
- package/lib/tabs/DropdownTabs.js +0 -71
- package/lib/tabs/MenuTabs.js +0 -82
- package/lib/tabs/context.d.ts +0 -12
- package/lib/tabs/context.js +0 -130
- package/lib/tabs/useTabs.d.ts +0 -11
- package/lib/tabs/useTabs.js +0 -11
- package/lib/textContent/index.d.ts +0 -8
- package/lib/textContent/index.js +0 -30
|
@@ -1,47 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.default = exports.FormSecurityContext = void 0;
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
function _getRequireWildcardCache(
|
|
9
|
-
function _interopRequireWildcard(
|
|
9
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
+
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; }
|
|
10
11
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
15
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
16
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
17
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
+
var FormSecurityContext = /*#__PURE__*/_react.default.createContext({});
|
|
19
|
+
exports.FormSecurityContext = FormSecurityContext;
|
|
20
|
+
var withFormSecurity = function withFormSecurity(WrappedComponent) {
|
|
21
|
+
var EnhancedComponent = function EnhancedComponent(props) {
|
|
22
|
+
var handlerClose = props.handlerClose;
|
|
23
|
+
var changedData = (0, _react.useRef)(false);
|
|
24
|
+
var securityBeforeUnload = (0, _react.useRef)(false);
|
|
25
|
+
var _useState = (0, _react.useState)(false),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
showQuestion = _useState2[0],
|
|
28
|
+
setShowQuestion = _useState2[1];
|
|
29
|
+
var newHandlerClose = function newHandlerClose() {
|
|
22
30
|
if (changedData.current && securityBeforeUnload.current) {
|
|
23
31
|
setShowQuestion(true);
|
|
24
|
-
} else if (
|
|
32
|
+
} else if (handlerClose) handlerClose();
|
|
25
33
|
};
|
|
26
|
-
|
|
27
|
-
if (onOpenChange) onOpenChange(false);
|
|
34
|
+
var onConfirmClick = function onConfirmClick() {
|
|
28
35
|
if (handlerClose) handlerClose();
|
|
29
36
|
};
|
|
30
|
-
|
|
37
|
+
var onUnconfirmClick = function onUnconfirmClick() {
|
|
31
38
|
setShowQuestion(false);
|
|
32
39
|
};
|
|
33
|
-
|
|
40
|
+
var onChangedData = function onChangedData(value) {
|
|
34
41
|
changedData.current = value;
|
|
35
42
|
};
|
|
36
|
-
|
|
43
|
+
var setSecurityBeforeUnload = function setSecurityBeforeUnload(value) {
|
|
37
44
|
securityBeforeUnload.current = value;
|
|
38
45
|
};
|
|
39
|
-
|
|
40
|
-
onChangedData,
|
|
41
|
-
showQuestion,
|
|
42
|
-
onConfirmClick,
|
|
43
|
-
onUnconfirmClick,
|
|
44
|
-
setSecurityBeforeUnload,
|
|
46
|
+
var contextValues = {
|
|
47
|
+
onChangedData: onChangedData,
|
|
48
|
+
showQuestion: showQuestion,
|
|
49
|
+
onConfirmClick: onConfirmClick,
|
|
50
|
+
onUnconfirmClick: onUnconfirmClick,
|
|
51
|
+
setSecurityBeforeUnload: setSecurityBeforeUnload,
|
|
45
52
|
securityBeforeUnload: securityBeforeUnload.current
|
|
46
53
|
};
|
|
47
54
|
return /*#__PURE__*/_react.default.createElement(FormSecurityContext.Provider, {
|
|
@@ -52,4 +59,5 @@ const withFormSecurity = WrappedComponent => {
|
|
|
52
59
|
};
|
|
53
60
|
return EnhancedComponent;
|
|
54
61
|
};
|
|
55
|
-
var _default =
|
|
62
|
+
var _default = withFormSecurity;
|
|
63
|
+
exports.default = _default;
|
|
@@ -7,28 +7,28 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
require("../assets/styles/gridlayout.scss");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
var getClass = function getClass(col) {
|
|
11
|
+
var cols = col ? col.split(' ') : [];
|
|
12
|
+
var classes = 'grid-container ';
|
|
13
13
|
if (cols[0]) classes += "col-xs-".concat(cols[0]);
|
|
14
14
|
if (cols[1]) classes += " col-sm-".concat(cols[1]);
|
|
15
15
|
if (cols[2]) classes += " col-md-".concat(cols[2]);
|
|
16
16
|
if (cols[3]) classes += " col-lg-".concat(cols[3]);
|
|
17
17
|
return classes;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
visible = true
|
|
26
|
-
|
|
27
|
-
const gridClasses = getClass(cols || '');
|
|
19
|
+
var GridCol = function GridCol(props) {
|
|
20
|
+
var cols = props.cols,
|
|
21
|
+
customClass = props.customClass,
|
|
22
|
+
children = props.children,
|
|
23
|
+
style = props.style,
|
|
24
|
+
_props$visible = props.visible,
|
|
25
|
+
visible = _props$visible === void 0 ? true : _props$visible;
|
|
26
|
+
var gridClasses = getClass(cols || '');
|
|
28
27
|
if (!visible) return null;
|
|
29
28
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
30
29
|
className: "".concat(customClass, " ").concat(gridClasses),
|
|
31
30
|
style: style
|
|
32
31
|
}, children);
|
|
33
32
|
};
|
|
34
|
-
var _default =
|
|
33
|
+
var _default = GridCol;
|
|
34
|
+
exports.default = _default;
|
|
@@ -7,25 +7,19 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
require("../assets/styles/gridlayout.scss");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
style,
|
|
19
|
-
children,
|
|
20
|
-
verticalAlign = 'start',
|
|
21
|
-
visible = true
|
|
22
|
-
} = props;
|
|
10
|
+
var getClass = function getClass(props) {
|
|
11
|
+
return "row ".concat(props.customClass, "\n ").concat(props.withTrim && ' -withtrim', "\n ").concat(props.verticalAlign && " align-".concat(props.verticalAlign), "\n ").concat(props.horizontalAlign && " justify-content-".concat(props.horizontalAlign));
|
|
12
|
+
};
|
|
13
|
+
var GridRow = function GridRow(props) {
|
|
14
|
+
var style = props.style,
|
|
15
|
+
children = props.children,
|
|
16
|
+
_props$visible = props.visible,
|
|
17
|
+
visible = _props$visible === void 0 ? true : _props$visible;
|
|
23
18
|
if (!visible) return null;
|
|
24
19
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
25
20
|
style: style,
|
|
26
|
-
className: getClass(
|
|
27
|
-
verticalAlign
|
|
28
|
-
}))
|
|
21
|
+
className: getClass(props)
|
|
29
22
|
}, children);
|
|
30
23
|
};
|
|
31
|
-
var _default =
|
|
24
|
+
var _default = GridRow;
|
|
25
|
+
exports.default = _default;
|
package/lib/gridlayout/index.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "GridRow", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function () {
|
|
8
|
+
get: function get() {
|
|
9
9
|
return _GridRow.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
@@ -13,4 +13,5 @@ exports.default = void 0;
|
|
|
13
13
|
var _GridRow = _interopRequireDefault(require("./GridRow"));
|
|
14
14
|
var _GridCol = _interopRequireDefault(require("./GridCol"));
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
var _default =
|
|
16
|
+
var _default = _GridCol.default;
|
|
17
|
+
exports.default = _default;
|
|
@@ -9,7 +9,7 @@ interface IGridCol {
|
|
|
9
9
|
}
|
|
10
10
|
interface IGridRow {
|
|
11
11
|
children: ReactNode | ReactNode[];
|
|
12
|
-
verticalAlign?:
|
|
12
|
+
verticalAlign?: string;
|
|
13
13
|
horizontalAlign?: string;
|
|
14
14
|
style?: CSSProperties;
|
|
15
15
|
withTrim?: boolean;
|
package/lib/hint/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HintProps } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import '../@types/ColorStyles.js';
|
|
4
3
|
|
|
5
|
-
declare const Hint: ({ visible, description, customClass, skeletonize, style,
|
|
4
|
+
declare const Hint: ({ visible, description, customClass, skeletonize, style, }: HintProps) => JSX.Element | null;
|
|
6
5
|
|
|
7
6
|
export { Hint as default };
|
package/lib/hint/index.js
CHANGED
|
@@ -5,26 +5,37 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _helpers = require("./helpers");
|
|
9
8
|
require("../assets/styles/hint.scss");
|
|
10
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
visible = true,
|
|
14
|
-
description,
|
|
15
|
-
customClass,
|
|
16
|
-
skeletonize =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
color
|
|
20
|
-
} = _ref;
|
|
10
|
+
var Hint = function Hint(_ref) {
|
|
11
|
+
var _ref$visible = _ref.visible,
|
|
12
|
+
visible = _ref$visible === void 0 ? true : _ref$visible,
|
|
13
|
+
description = _ref.description,
|
|
14
|
+
customClass = _ref.customClass,
|
|
15
|
+
_ref$skeletonize = _ref.skeletonize,
|
|
16
|
+
skeletonize = _ref$skeletonize === void 0 ? false : _ref$skeletonize,
|
|
17
|
+
style = _ref.style;
|
|
21
18
|
if (!visible || !description) return null;
|
|
19
|
+
var showHintList = function showHintList(arrayHint) {
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
21
|
+
className: "rules-list",
|
|
22
|
+
style: {
|
|
23
|
+
padding: '15px 0px'
|
|
24
|
+
}
|
|
25
|
+
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
26
|
+
style: {
|
|
27
|
+
listStyleType: 'none'
|
|
28
|
+
}
|
|
29
|
+
}, arrayHint.map(function (hint, index) {
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement("li", {
|
|
31
|
+
key: index.toString()
|
|
32
|
+
}, "- ", hint);
|
|
33
|
+
})));
|
|
34
|
+
};
|
|
22
35
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
23
|
-
"aria-disabled": disabled,
|
|
24
36
|
style: style,
|
|
25
|
-
className: "\n hint-component\n ".concat(customClass, "\n ").concat(skeletonize ? '-skeletonized' : '', "\n
|
|
26
|
-
}, Array.isArray(description) ?
|
|
27
|
-
"aria-disabled": disabled
|
|
28
|
-
}, description));
|
|
37
|
+
className: "\n hint-component\n ".concat(customClass, "\n ").concat(skeletonize ? '-skeletonized' : '', "\n ")
|
|
38
|
+
}, Array.isArray(description) ? showHintList(description) : /*#__PURE__*/_react.default.createElement("span", null, description));
|
|
29
39
|
};
|
|
30
|
-
var _default =
|
|
40
|
+
var _default = Hint;
|
|
41
|
+
exports.default = _default;
|
package/lib/hint/types.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
import { ColorStyles } from '../@types/ColorStyles.js';
|
|
3
2
|
|
|
4
3
|
interface HintProps {
|
|
5
4
|
description?: string | string[];
|
|
6
5
|
visible?: boolean;
|
|
7
6
|
customClass?: string;
|
|
8
7
|
skeletonize?: boolean;
|
|
9
|
-
disabled?: boolean;
|
|
10
8
|
style?: CSSProperties;
|
|
11
|
-
color?: ColorStyles;
|
|
12
9
|
}
|
|
13
10
|
|
|
14
11
|
export { HintProps };
|
package/lib/icons/helper.d.ts
CHANGED
package/lib/icons/helper.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _default =
|
|
7
|
+
var _default = {
|
|
8
8
|
paperplane: {
|
|
9
9
|
viewbox: '0 0 16 16',
|
|
10
10
|
paths: ['M7 11l6.151 2.195 2.849-12.459zM5 10.311l11-9.575-16 7.913zM7 12.062v3.938l2.902-2.902z']
|
|
@@ -575,7 +575,7 @@ var _default = exports.default = {
|
|
|
575
575
|
},
|
|
576
576
|
cash3: {
|
|
577
577
|
viewbox: '0 0 17 16',
|
|
578
|
-
paths: ['
|
|
578
|
+
paths: ['9h1v1h-1v-1z', 'M0 6v9h17v-9h-17zM3 14h-2v-2h1v1h1v1zM3 8h-1v1h-1v-2h2v1zM10.5 10c0.276 0 0.5 0.224 0.5 0.5v2c0 0.276-0.224 0.5-0.5 0.5h-1.5v0.5c0 0.276-0.224 0.5-0.5 0.5s-0.5-0.224-0.5-0.5v-0.5h-1.5c-0.276 0-0.5-0.224-0.5-0.5s0.224-0.5 0.5-0.5h1.5v-1h-1.5c-0.276 0-0.5-0.224-0.5-0.5v-2c0-0.276 0.224-0.5 0.5-0.5h1.5v-0.5c0-0.276 0.224-0.5 0.5-0.5s0.5 0.224 0.5 0.5v0.5h1.5c0.276 0 0.5 0.224 0.5 0.5s-0.224 0.5-0.5 0.5h-1.5v1h1.5zM16 14h-2v-1h1v-1h1v2zM16 9h-1v-1h-1v-1h2v2z', 'M9 11h1v1h-1v-1z', 'M1 4h15v1.5h-15v-1.5z', 'M2 2h13v1.5h-13v-1.5z']
|
|
579
579
|
},
|
|
580
580
|
wallet: {
|
|
581
581
|
viewbox: '0 0 17 16',
|
|
@@ -608,9 +608,6 @@ var _default = exports.default = {
|
|
|
608
608
|
videoCamOutline: {
|
|
609
609
|
viewbox: '0 0 16 16',
|
|
610
610
|
paths: ['M15.294 4.004c-0.165 0-0.335 0.058-0.491 0.168l-2.803 1.978v-1.651c0-0.825-0.675-1.5-1.5-1.5h-9c-0.825 0-1.5 0.675-1.5 1.5v7c0 0.825 0.675 1.5 1.5 1.5h9c0.825 0 1.5-0.675 1.5-1.5v-1.65l2.803 1.978c0.156 0.11 0.326 0.168 0.491 0.168 0 0 0 0 0 0 0.22 0 0.421-0.101 0.551-0.278 0.101-0.137 0.154-0.313 0.154-0.51v-6.415c-0-0.518-0.355-0.788-0.706-0.788zM15 10.743l-2.469-1.743h-1.531v2.5c0 0.271-0.229 0.5-0.5 0.5h-9c-0.271 0-0.5-0.229-0.5-0.5v-7c0-0.271 0.229-0.5 0.5-0.5h9c0.271 0 0.5 0.229 0.5 0.5v2.5h1.531l2.469-1.743v5.486z', 'M4 5l5 3-5 3z']
|
|
611
|
-
},
|
|
612
|
-
user_block: {
|
|
613
|
-
viewbox: '0 0 16 16',
|
|
614
|
-
paths: ['M7.5 16h-6.977c-0.14 0-0.274-0.059-0.369-0.163s-0.141-0.242-0.129-0.382c0.11-1.22 0.585-2.363 1.373-3.305 0.697-0.832 1.59-1.452 2.602-1.809l0-0.475c-0.562-0.385-1.037-0.926-1.385-1.582-0.402-0.758-0.615-1.634-0.615-2.535 0-1.251 0.405-2.431 1.139-3.323 0.758-0.92 1.774-1.427 2.861-1.427 2.119 0 3.874 1.966 3.993 4.476 0.013 0.276-0.2 0.51-0.476 0.523s-0.51-0.2-0.523-0.476c-0.094-1.976-1.41-3.524-2.995-3.524-1.654 0-3 1.682-3 3.75 0 1.457 0.687 2.795 1.75 3.408 0.155 0.089 0.25 0.254 0.25 0.433l-0 1.116c0 0.224-0.149 0.42-0.364 0.481-0.967 0.274-1.822 0.828-2.471 1.604-0.538 0.643-0.901 1.397-1.064 2.208h6.4c0.276 0 0.5 0.224 0.5 0.5s-0.224 0.5-0.5 0.5z', 'M11.5 7c-2.481 0-4.5 2.019-4.5 4.5s2.019 4.5 4.5 4.5 4.5-2.019 4.5-4.5-2.019-4.5-4.5-4.5zM8 11.5c0-1.93 1.57-3.5 3.5-3.5 0.785 0 1.511 0.26 2.095 0.698l-4.897 4.897c-0.438-0.584-0.698-1.31-0.698-2.095zM11.5 15c-0.785 0-1.511-0.26-2.095-0.698l4.897-4.897c0.438 0.584 0.698 1.31 0.698 2.095 0 1.93-1.57 3.5-3.5 3.5z']
|
|
615
611
|
}
|
|
616
|
-
};
|
|
612
|
+
};
|
|
613
|
+
exports.default = _default;
|
package/lib/icons/index.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IIconProps } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../@types/PointerEvents.js';
|
|
4
4
|
import '../@types/SizePixels.js';
|
|
5
5
|
import '../@types/Icon.js';
|
|
6
6
|
import './helper.js';
|
|
7
7
|
import '../@types/Position.js';
|
|
8
|
-
import '../@types/ColorStyles.js';
|
|
9
8
|
|
|
10
9
|
declare const _default: {
|
|
11
|
-
(props:
|
|
10
|
+
(props: IIconProps): JSX.Element;
|
|
12
11
|
displayName: string;
|
|
13
12
|
};
|
|
14
13
|
|
package/lib/icons/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -9,66 +10,70 @@ var _helper = _interopRequireDefault(require("./helper"));
|
|
|
9
10
|
var _withTooltip = _interopRequireDefault(require("../internals/withTooltip"));
|
|
10
11
|
require("../assets/styles/icon.scss");
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
function _getRequireWildcardCache(
|
|
13
|
-
function _interopRequireWildcard(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
size = 16,
|
|
22
|
-
style =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
13
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
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; }
|
|
15
|
+
var listIcon = _helper.default;
|
|
16
|
+
var disabledIconColor = 'rgb(193, 193, 193)';
|
|
17
|
+
var Icon = function Icon(_ref) {
|
|
18
|
+
var name = _ref.name,
|
|
19
|
+
_onClick = _ref.onClick,
|
|
20
|
+
svgStruct = _ref.svgStruct,
|
|
21
|
+
_ref$size = _ref.size,
|
|
22
|
+
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
23
|
+
_ref$style = _ref.style,
|
|
24
|
+
style = _ref$style === void 0 ? {} : _ref$style,
|
|
25
|
+
_ref$visible = _ref.visible,
|
|
26
|
+
visible = _ref$visible === void 0 ? true : _ref$visible,
|
|
27
|
+
_ref$disabled = _ref.disabled,
|
|
28
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
29
|
+
_ref$customClass = _ref.customClass,
|
|
30
|
+
customClass = _ref$customClass === void 0 ? '' : _ref$customClass,
|
|
31
|
+
_ref$customClassForCo = _ref.customClassForContainer,
|
|
32
|
+
customClassForContainer = _ref$customClassForCo === void 0 ? '' : _ref$customClassForCo,
|
|
33
|
+
_ref$color = _ref.color,
|
|
34
|
+
color = _ref$color === void 0 ? '#676464' : _ref$color,
|
|
35
|
+
_ref$pointerEvents = _ref.pointerEvents,
|
|
36
|
+
pointerEvents = _ref$pointerEvents === void 0 ? 'none' : _ref$pointerEvents,
|
|
37
|
+
targetRef = _ref.targetRef,
|
|
38
|
+
tooltip = _ref.tooltip;
|
|
39
|
+
var refSvg = (0, _react.useRef)(null);
|
|
40
|
+
var getPaths = function getPaths() {
|
|
41
|
+
return name ? listIcon[name].paths : svgStruct === null || svgStruct === void 0 ? void 0 : svgStruct.paths;
|
|
42
|
+
};
|
|
43
|
+
var getSvg = function getSvg() {
|
|
40
44
|
var _getPaths;
|
|
41
45
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
42
46
|
"data-testid": "icon",
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (onClick && !disabled) onClick();
|
|
47
|
+
onClick: function onClick() {
|
|
48
|
+
if (_onClick && !disabled) _onClick();
|
|
46
49
|
},
|
|
47
|
-
ref: r
|
|
50
|
+
ref: function ref(r) {
|
|
48
51
|
refSvg.current = r;
|
|
49
52
|
},
|
|
50
53
|
width: "".concat(size, "px"),
|
|
51
54
|
height: "".concat(size, "px"),
|
|
52
|
-
fill: disabled ? disabledIconColor :
|
|
53
|
-
viewBox:
|
|
55
|
+
fill: disabled ? disabledIconColor : color,
|
|
56
|
+
viewBox: name ? listIcon[name].viewbox : svgStruct === null || svgStruct === void 0 ? void 0 : svgStruct.viewbox,
|
|
54
57
|
className: "icon-component ".concat(customClass),
|
|
55
58
|
pointerEvents: pointerEvents,
|
|
56
59
|
style: style
|
|
57
|
-
}, (_getPaths = getPaths()) === null || _getPaths === void 0 ? void 0 : _getPaths.map(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
}, (_getPaths = getPaths()) === null || _getPaths === void 0 ? void 0 : _getPaths.map(function (value) {
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement("path", {
|
|
62
|
+
"data-testid": "icon-path",
|
|
63
|
+
d: value,
|
|
64
|
+
key: value
|
|
65
|
+
});
|
|
66
|
+
}));
|
|
62
67
|
};
|
|
63
|
-
if (color && colorStyle !== 'default') throw new Error('Expected only one of the two properties: colorStyle or color');
|
|
64
68
|
if (!name && !svgStruct) throw new Error('One of the "name" and "svgStruct" props must be filled');
|
|
65
69
|
if (!visible) return null;
|
|
66
70
|
if (!tooltip) return getSvg();
|
|
67
71
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
68
72
|
className: "icon-component-container ".concat(customClassForContainer),
|
|
69
|
-
ref: r
|
|
73
|
+
ref: function ref(r) {
|
|
70
74
|
if (targetRef && r) targetRef(r);
|
|
71
75
|
}
|
|
72
76
|
}, getSvg());
|
|
73
77
|
};
|
|
74
|
-
var _default =
|
|
78
|
+
var _default = (0, _withTooltip.default)(Icon);
|
|
79
|
+
exports.default = _default;
|
package/lib/icons/types.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { PointerEvents } from '../@types/PointerEvents.js';
|
|
|
3
3
|
import { SizePixels } from '../@types/SizePixels.js';
|
|
4
4
|
import { IconNames } from '../@types/Icon.js';
|
|
5
5
|
import { Position } from '../@types/Position.js';
|
|
6
|
-
import { ColorStyles } from '../@types/ColorStyles.js';
|
|
7
6
|
import './helper.js';
|
|
8
7
|
|
|
9
8
|
type ListIconType = {
|
|
@@ -12,38 +11,26 @@ type ListIconType = {
|
|
|
12
11
|
paths: Array<string>;
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
|
-
|
|
16
|
-
viewbox: string;
|
|
17
|
-
paths: Array<string>;
|
|
18
|
-
};
|
|
19
|
-
type BaseIconProps = {
|
|
14
|
+
interface IIconProps {
|
|
20
15
|
size?: SizePixels;
|
|
16
|
+
color?: string;
|
|
21
17
|
customClass?: string;
|
|
22
18
|
customClassForContainer?: string;
|
|
23
19
|
style?: CSSProperties;
|
|
24
20
|
visible?: boolean;
|
|
25
21
|
disabled?: boolean;
|
|
26
22
|
pointerEvents?: PointerEvents;
|
|
23
|
+
name?: IconNames;
|
|
27
24
|
viewBox?: string;
|
|
25
|
+
svgStruct?: {
|
|
26
|
+
viewbox: string;
|
|
27
|
+
paths: Array<string>;
|
|
28
|
+
};
|
|
28
29
|
onClick?: () => void;
|
|
29
30
|
tooltipPosition?: Exclude<Position, 'center'>;
|
|
30
31
|
tooltipWidth?: string | number;
|
|
31
32
|
tooltip?: string;
|
|
32
33
|
targetRef?: (ref: HTMLDivElement) => void;
|
|
33
|
-
}
|
|
34
|
-
type ColorProps = ({
|
|
35
|
-
colorStyle?: ColorStyles | 'default';
|
|
36
|
-
color?: null;
|
|
37
|
-
} | {
|
|
38
|
-
color?: string;
|
|
39
|
-
colorStyle?: undefined;
|
|
40
|
-
});
|
|
41
|
-
type IconProps = BaseIconProps & ColorProps & ({
|
|
42
|
-
name: IconNames;
|
|
43
|
-
svgStruct?: null;
|
|
44
|
-
} | {
|
|
45
|
-
svgStruct: SvgStruct;
|
|
46
|
-
name?: null;
|
|
47
|
-
});
|
|
34
|
+
}
|
|
48
35
|
|
|
49
|
-
export {
|
|
36
|
+
export { IIconProps, ListIconType };
|
package/lib/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { default as List } from './list/index.js';
|
|
|
7
7
|
export { default as Radio } from './radio/index.js';
|
|
8
8
|
export { default as Tab } from './tabs/index.js';
|
|
9
9
|
export { default as Dialog } from './dialog/base/index.js';
|
|
10
|
-
import './
|
|
10
|
+
import './types-c2a0f035.js';
|
|
11
11
|
import 'react';
|
|
12
12
|
import './@types/PermissionAttr.js';
|
|
13
13
|
import './internals/colorStyles.js';
|
|
@@ -27,7 +27,6 @@ import './labels/types.js';
|
|
|
27
27
|
import './icons/types.js';
|
|
28
28
|
import './@types/PointerEvents.js';
|
|
29
29
|
import './@types/SizePixels.js';
|
|
30
|
-
import './@types/ColorStyles.js';
|
|
31
30
|
import './list/Header.js';
|
|
32
31
|
import './list/types.js';
|
|
33
32
|
import './list/Item.js';
|
package/lib/index.js
CHANGED
|
@@ -5,55 +5,55 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "Button", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function () {
|
|
8
|
+
get: function get() {
|
|
9
9
|
return _buttons.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "Dialog", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () {
|
|
14
|
+
get: function get() {
|
|
15
15
|
return _base.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "Icon", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () {
|
|
20
|
+
get: function get() {
|
|
21
21
|
return _icons.default;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "Label", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () {
|
|
26
|
+
get: function get() {
|
|
27
27
|
return _labels.default;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "List", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () {
|
|
32
|
+
get: function get() {
|
|
33
33
|
return _list.default;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "Panel", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () {
|
|
38
|
+
get: function get() {
|
|
39
39
|
return _panel.default;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "Radio", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () {
|
|
44
|
+
get: function get() {
|
|
45
45
|
return _radio.default;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "Tab", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () {
|
|
50
|
+
get: function get() {
|
|
51
51
|
return _tabs.default;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "Toolbar", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () {
|
|
56
|
+
get: function get() {
|
|
57
57
|
return _toolbar.default;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
@@ -3,8 +3,6 @@ import 'react';
|
|
|
3
3
|
import '../../@types/Align.js';
|
|
4
4
|
import '../../@types/Period.js';
|
|
5
5
|
import '../../@types/PermissionAttr.js';
|
|
6
|
-
import '../../internals/types.js';
|
|
7
|
-
import '../../@types/Position.js';
|
|
8
6
|
|
|
9
7
|
declare const _default: (props: IBaseProps) => JSX.Element;
|
|
10
8
|
|