linear-react-components-ui 1.0.10-beta.12 → 1.0.10-beta.13
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/lib/alerts/AlertContainer.d.ts +2 -0
- package/lib/alerts/AlertProvider.d.ts +2 -0
- package/lib/alerts/BaseAlert.d.ts +2 -0
- package/lib/alerts/Message.d.ts +2 -0
- package/lib/alerts/Message.js +1 -1
- package/lib/alerts/helpers.d.ts +2 -0
- package/lib/alerts/index.d.ts +2 -0
- package/lib/alerts/types.d.ts +3 -1
- package/lib/alerts/withAlert.d.ts +2 -0
- package/lib/assets/styles/dialog.scss +0 -2
- package/lib/assets/styles/drawers.scss +9 -0
- package/lib/assets/styles/radio.scss +52 -8
- package/lib/assets/styles/table.scss +30 -0
- package/lib/assets/styles/tooltip.scss +42 -2
- package/lib/buttons/ActivateButton.d.ts +2 -0
- package/lib/buttons/AddButton.d.ts +2 -0
- package/lib/buttons/Button.d.ts +2 -0
- package/lib/buttons/CancelButton.d.ts +2 -0
- package/lib/buttons/DangerButton.d.ts +2 -0
- package/lib/buttons/DefaultButton.d.ts +2 -0
- package/lib/buttons/DefaultButton.js +16 -4
- package/lib/buttons/DestroyButton.d.ts +2 -0
- package/lib/buttons/EditButton.d.ts +2 -0
- package/lib/buttons/InactivateButton.d.ts +2 -0
- package/lib/buttons/InfoButton.d.ts +2 -0
- package/lib/buttons/PrimaryButton.d.ts +2 -0
- package/lib/buttons/RestoreButton.d.ts +2 -0
- package/lib/buttons/SaveButton.d.ts +2 -0
- package/lib/buttons/SuccessButton.d.ts +2 -0
- package/lib/buttons/WarningButton.d.ts +2 -0
- package/lib/buttons/index.d.ts +2 -0
- package/lib/buttons/split_button/index.d.ts +2 -0
- package/lib/buttons/types.d.ts +6 -2
- package/lib/dialog/Alert.d.ts +2 -0
- package/lib/dialog/Custom.d.ts +2 -0
- package/lib/dialog/Custom.js +1 -1
- package/lib/dialog/Error.d.ts +2 -0
- package/lib/dialog/Information.d.ts +2 -0
- package/lib/dialog/Question.d.ts +2 -0
- package/lib/dialog/Warning.d.ts +2 -0
- package/lib/dialog/base/Content.d.ts +2 -0
- package/lib/dialog/base/Footer.d.ts +2 -0
- package/lib/dialog/base/Header.d.ts +2 -0
- package/lib/dialog/base/index.d.ts +2 -0
- package/lib/dialog/base/index.js +5 -2
- package/lib/dialog/form/index.d.ts +2 -0
- package/lib/dialog/index.d.ts +2 -0
- package/lib/dialog/types.d.ts +4 -2
- package/lib/drawer/Content.d.ts +2 -0
- package/lib/drawer/Drawer.d.ts +3 -1
- package/lib/drawer/Drawer.js +25 -2
- package/lib/drawer/Header.d.ts +2 -0
- package/lib/drawer/helpers.d.ts +2 -0
- package/lib/drawer/index.d.ts +2 -0
- package/lib/drawer/types.d.ts +4 -1
- package/lib/dropdown/Popup.js +7 -0
- package/lib/form/Field.js +3 -2
- package/lib/form/FieldNumber.d.ts +2 -2
- package/lib/form/index.d.ts +2 -1
- package/lib/form/index.js +10 -1
- package/lib/form/types.d.ts +2 -5
- package/lib/form/withFormSecurity.js +2 -1
- package/lib/icons/index.d.ts +2 -0
- package/lib/icons/types.d.ts +3 -1
- package/lib/index.d.ts +3 -1
- package/lib/inputs/base/InputTextBase.js +7 -1
- package/lib/inputs/inputHOC.d.ts +2 -0
- package/lib/inputs/mask/helpers.d.ts +2 -0
- package/lib/inputs/mask/imaskHOC.d.ts +2 -0
- package/lib/inputs/mask/imaskHOC.js +1 -1
- package/lib/inputs/multiSelect/ActionButtons.d.ts +1 -1
- package/lib/inputs/multiSelect/ActionButtons.js +4 -1
- package/lib/inputs/multiSelect/Dropdown.js +1 -1
- package/lib/inputs/multiSelect/helper.d.ts +8 -6
- package/lib/inputs/multiSelect/helper.js +7 -1
- package/lib/inputs/multiSelect/index.js +5 -2
- package/lib/inputs/multiSelect/types.d.ts +11 -3
- package/lib/inputs/number/BaseNumber.d.ts +2 -0
- package/lib/inputs/number/Currency.d.ts +2 -0
- package/lib/inputs/number/Decimal.d.ts +2 -0
- package/lib/inputs/number/index.d.ts +2 -0
- package/lib/inputs/number/types.d.ts +2 -0
- package/lib/inputs/period/index.js +8 -8
- package/lib/inputs/period/types.d.ts +2 -2
- package/lib/inputs/search/index.d.ts +2 -0
- package/lib/inputs/select/ActionButtons.d.ts +2 -0
- package/lib/inputs/select/Dropdown.d.ts +2 -0
- package/lib/inputs/select/Dropdown.js +1 -1
- package/lib/inputs/select/helper.d.ts +6 -9
- package/lib/inputs/select/helper.js +16 -2
- package/lib/inputs/select/index.js +7 -6
- package/lib/inputs/select/multiple/Selecteds.js +1 -1
- package/lib/inputs/select/multiple/index.js +13 -10
- package/lib/inputs/select/simple/index.js +35 -12
- package/lib/inputs/select/types.d.ts +21 -7
- package/lib/inputs/types.d.ts +4 -1
- package/lib/internals/types.d.ts +1 -0
- package/lib/internals/withTooltip.js +13 -6
- package/lib/labelMessages/index.d.ts +2 -0
- package/lib/labelMessages/index.js +3 -4
- package/lib/labelMessages/types.d.ts +3 -1
- package/lib/labels/DangerLabel.d.ts +2 -0
- package/lib/labels/DefaultLabel.d.ts +2 -0
- package/lib/labels/InfoLabel.d.ts +2 -0
- package/lib/labels/PrimaryLabel.d.ts +2 -0
- package/lib/labels/SuccessLabel.d.ts +2 -0
- package/lib/labels/WarningLabel.d.ts +2 -0
- package/lib/labels/index.d.ts +2 -0
- package/lib/labels/types.d.ts +3 -1
- package/lib/list/Header.d.ts +2 -0
- package/lib/list/Item.d.ts +2 -0
- package/lib/list/helpers.d.ts +2 -0
- package/lib/list/index.d.ts +2 -0
- package/lib/list/types.d.ts +4 -2
- package/lib/menus/float/MenuItem.d.ts +2 -0
- package/lib/menus/float/helpers.d.ts +2 -0
- package/lib/menus/float/index.d.ts +2 -0
- package/lib/menus/float/types.d.ts +3 -1
- package/lib/menus/index.d.ts +2 -0
- package/lib/menus/sidenav/ExpandMenu.d.ts +2 -0
- package/lib/menus/sidenav/MenuLink.d.ts +2 -0
- package/lib/menus/sidenav/NavMenuGroup.d.ts +2 -0
- package/lib/menus/sidenav/NavMenuItem.d.ts +2 -0
- package/lib/menus/sidenav/NavSubMenuItem.d.ts +2 -0
- package/lib/menus/sidenav/helpers.d.ts +2 -0
- package/lib/menus/sidenav/index.d.ts +2 -0
- package/lib/menus/sidenav/popup_menu_search/EmptyList.d.ts +2 -0
- package/lib/menus/sidenav/popup_menu_search/index.d.ts +2 -0
- package/lib/menus/sidenav/types.d.ts +4 -2
- package/lib/panel/Content.d.ts +3 -1
- package/lib/panel/DangerPanel.d.ts +3 -1
- package/lib/panel/Default.d.ts +3 -1
- package/lib/panel/Header.d.ts +3 -1
- package/lib/panel/Header.js +3 -4
- package/lib/panel/InfoPanel.d.ts +3 -1
- package/lib/panel/PrimaryPanel.d.ts +3 -1
- package/lib/panel/SuccessPanel.d.ts +3 -1
- package/lib/panel/ToolBar.d.ts +3 -1
- package/lib/panel/WarningPanel.d.ts +3 -1
- package/lib/panel/helpers.d.ts +3 -1
- package/lib/panel/index.d.ts +3 -1
- package/lib/panel/types.d.ts +3 -1
- package/lib/popover/PopoverText.d.ts +2 -0
- package/lib/popover/PopoverTitle.d.ts +2 -0
- package/lib/popover/index.d.ts +2 -0
- package/lib/popover/index.js +1 -2
- package/lib/popover/types.d.ts +3 -1
- package/lib/radio/index.d.ts +2 -1
- package/lib/radio/index.js +3 -1
- package/lib/radio/types.d.ts +2 -0
- package/lib/table/Row.js +20 -3
- package/lib/table/types.d.ts +5 -0
- package/lib/tabs/DropdownItems.d.ts +2 -0
- package/lib/tabs/Menu.d.ts +2 -0
- package/lib/tabs/MenuItems.d.ts +2 -0
- package/lib/tabs/Panel.d.ts +2 -0
- package/lib/tabs/index.d.ts +2 -0
- package/lib/tabs/tabHelpers.d.ts +2 -0
- package/lib/tabs/types.d.ts +3 -1
- package/lib/toolbar/ButtonBar.d.ts +2 -0
- package/lib/toolbar/LabelBar.d.ts +2 -0
- package/lib/toolbar/ToolBarGroup.d.ts +2 -0
- package/lib/toolbar/helpers.d.ts +2 -0
- package/lib/toolbar/index.d.ts +2 -0
- package/lib/toolbar/types.d.ts +4 -2
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/tooltip/index.js +5 -1
- package/lib/tooltip/types.d.ts +1 -0
- package/lib/{types-3c6f1c20.d.ts → types-c1d83632.d.ts} +2 -1
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IMessageProps, DefaultMessageConfigType } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../@types/PositionAlert.js';
|
|
4
|
+
import '../@types/Icon.js';
|
|
5
|
+
import '../icons/helper.js';
|
|
4
6
|
|
|
5
7
|
declare class AlertContainer {
|
|
6
8
|
pushAlert: (params: IMessageProps) => void;
|
package/lib/alerts/Message.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IMessageProps } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../@types/PositionAlert.js';
|
|
4
|
+
import '../@types/Icon.js';
|
|
5
|
+
import '../icons/helper.js';
|
|
4
6
|
|
|
5
7
|
declare const Message: ({ handleClose, message, id, color, icon, iconName, timeout, customClass, closeButton, className, position, }: IMessageProps) => JSX.Element;
|
|
6
8
|
|
package/lib/alerts/Message.js
CHANGED
|
@@ -48,7 +48,7 @@ var Message = function Message(_ref2) {
|
|
|
48
48
|
_ref2$icon = _ref2.icon,
|
|
49
49
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
50
50
|
_ref2$iconName = _ref2.iconName,
|
|
51
|
-
iconName = _ref2$iconName === void 0 ?
|
|
51
|
+
iconName = _ref2$iconName === void 0 ? null : _ref2$iconName,
|
|
52
52
|
_ref2$timeout = _ref2.timeout,
|
|
53
53
|
timeout = _ref2$timeout === void 0 ? 3000 : _ref2$timeout,
|
|
54
54
|
_ref2$customClass = _ref2.customClass,
|
package/lib/alerts/helpers.d.ts
CHANGED
package/lib/alerts/index.d.ts
CHANGED
package/lib/alerts/types.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { PositionAlert } from '../@types/PositionAlert.js';
|
|
3
|
+
import { IconNames } from '../@types/Icon.js';
|
|
4
|
+
import '../icons/helper.js';
|
|
3
5
|
|
|
4
6
|
declare type AlertContainerMethods = {
|
|
5
7
|
default: (messageConfig: DefaultMessageConfigType) => void;
|
|
@@ -25,7 +27,7 @@ interface IMessageProps {
|
|
|
25
27
|
color?: string;
|
|
26
28
|
customClass?: string;
|
|
27
29
|
icon?: ReactNode | null;
|
|
28
|
-
iconName?:
|
|
30
|
+
iconName?: IconNames | null;
|
|
29
31
|
timeout?: number;
|
|
30
32
|
}
|
|
31
33
|
interface IBaseAlertProps {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { WithAlertContextProps } from './types.js';
|
|
3
3
|
import '../@types/PositionAlert.js';
|
|
4
|
+
import '../@types/Icon.js';
|
|
5
|
+
import '../icons/helper.js';
|
|
4
6
|
|
|
5
7
|
declare const withAlert: <ComponentProps extends WithAlertContextProps>(WrapperComponent: React__default.ComponentType<ComponentProps>) => (props: ComponentProps) => JSX.Element;
|
|
6
8
|
|
|
@@ -37,14 +37,26 @@ $radio-button-ripple-size: 15px;
|
|
|
37
37
|
left: -9999px;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
.radio-component:focus + label:before {
|
|
41
|
+
box-shadow: 0 0 2px 1px $radio-button-checked-color;
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
.radio-component:checked + .description,
|
|
41
45
|
.radio-component:not(:checked) + .description {
|
|
42
46
|
position: relative;
|
|
43
|
-
padding-left:
|
|
47
|
+
padding-left: 1.35rem;
|
|
44
48
|
cursor: pointer;
|
|
45
49
|
line-height: 20px;
|
|
46
50
|
display: inline-block;
|
|
47
|
-
color: $font-color-soft;
|
|
51
|
+
color: $font-color-soft;
|
|
52
|
+
&.-medium {
|
|
53
|
+
padding-left: 1.6rem;
|
|
54
|
+
padding-top: 0.1rem;
|
|
55
|
+
}
|
|
56
|
+
&.-large {
|
|
57
|
+
padding-left: 1.875rem;
|
|
58
|
+
padding-top: 0.2rem;
|
|
59
|
+
}
|
|
48
60
|
}
|
|
49
61
|
|
|
50
62
|
.disabled + .description {
|
|
@@ -57,22 +69,54 @@ $radio-button-ripple-size: 15px;
|
|
|
57
69
|
position: absolute;
|
|
58
70
|
left: 0;
|
|
59
71
|
top: 0;
|
|
60
|
-
width: 20px;
|
|
61
|
-
height: 20px;
|
|
62
72
|
border: 1px solid $component-border-color;
|
|
63
73
|
border-radius: 100%;
|
|
64
74
|
background: $default-color;
|
|
65
75
|
}
|
|
66
76
|
|
|
77
|
+
.-small:before{
|
|
78
|
+
width: 16px;
|
|
79
|
+
height: 16px;
|
|
80
|
+
top: 0.225rem;
|
|
81
|
+
left: 0.265rem;
|
|
82
|
+
}
|
|
83
|
+
.-medium:before{
|
|
84
|
+
width: 20px;
|
|
85
|
+
height: 20px;
|
|
86
|
+
top: 0.245rem;
|
|
87
|
+
left: 0.285rem;
|
|
88
|
+
}
|
|
89
|
+
.-large:before{
|
|
90
|
+
width: 24px;
|
|
91
|
+
height: 24px;
|
|
92
|
+
top: 0.245rem;
|
|
93
|
+
left: 0.285rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.-small:after{
|
|
97
|
+
width: 8px;
|
|
98
|
+
height: 8px;
|
|
99
|
+
top: 0.23rem;
|
|
100
|
+
left: 0.27rem;
|
|
101
|
+
}
|
|
102
|
+
.-medium:after{
|
|
103
|
+
width: 12px;
|
|
104
|
+
height: 12px;
|
|
105
|
+
top: 0.24rem;
|
|
106
|
+
left: 0.26rem;
|
|
107
|
+
}
|
|
108
|
+
.-large:after{
|
|
109
|
+
width: 16px;
|
|
110
|
+
height: 16px;
|
|
111
|
+
top: 0.245rem;
|
|
112
|
+
left: 0.285rem;
|
|
113
|
+
}
|
|
114
|
+
|
|
67
115
|
.radio-component:checked + .description:after,
|
|
68
116
|
.radio-component:not(:checked) + .description:after {
|
|
69
117
|
content: '';
|
|
70
|
-
width: 12px;
|
|
71
|
-
height: 12px;
|
|
72
118
|
background: $radio-button-checked-color;
|
|
73
119
|
position: absolute;
|
|
74
|
-
top: 4px;
|
|
75
|
-
left: 4px;
|
|
76
120
|
border-radius: 100%;
|
|
77
121
|
-webkit-transition: all 0.2s ease;
|
|
78
122
|
transition: all 0.2s ease;
|
|
@@ -26,12 +26,18 @@
|
|
|
26
26
|
&.skeleton-transparency::before {
|
|
27
27
|
@extend %skeleton-transparency;
|
|
28
28
|
}
|
|
29
|
+
&.-disabled{
|
|
30
|
+
@extend %component-disabled;
|
|
31
|
+
}
|
|
29
32
|
}
|
|
30
33
|
> .headercontainer > .innertable > .theader > .trow,
|
|
31
34
|
> .bodycontainer > .innertable > .tbody > .trow,
|
|
32
35
|
> .theader > .trow,
|
|
33
36
|
> .tbody > .trow {
|
|
34
37
|
height: 45px;
|
|
38
|
+
}
|
|
39
|
+
> .tbody > .trow-divider {
|
|
40
|
+
height: 45px;
|
|
35
41
|
}
|
|
36
42
|
> .headercontainer > .innertable > .theader > .trow > .headercolumn,
|
|
37
43
|
> .bodycontainer > .innertable > .tbody > .trow > .rowcolumn,
|
|
@@ -60,6 +66,30 @@
|
|
|
60
66
|
background-color: $component-bg-selected-color !important;
|
|
61
67
|
color: $font-selected-color;
|
|
62
68
|
}
|
|
69
|
+
.-divider {
|
|
70
|
+
color: $font-color-second;
|
|
71
|
+
font-family: 'Titillium Web';
|
|
72
|
+
font-weight: 700;
|
|
73
|
+
font-size: 16px;
|
|
74
|
+
text-align: center;
|
|
75
|
+
padding: .35rem;
|
|
76
|
+
&.-primary {
|
|
77
|
+
background-color: $primary-color;
|
|
78
|
+
}
|
|
79
|
+
&.-warning {
|
|
80
|
+
background-color: $warning-color;
|
|
81
|
+
}
|
|
82
|
+
&.-danger {
|
|
83
|
+
background-color: $danger-color;
|
|
84
|
+
}
|
|
85
|
+
&.-success {
|
|
86
|
+
background-color: $success-color;
|
|
87
|
+
}
|
|
88
|
+
&.-info {
|
|
89
|
+
background-color: $info-color;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
63
93
|
&:hover {
|
|
64
94
|
> .rowcolumn > .rowhover {
|
|
65
95
|
display: table;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import "colors.scss";
|
|
2
|
+
|
|
1
3
|
.tooltip-component {
|
|
2
4
|
font-family: 'Roboto', sans-serif;
|
|
3
5
|
position: absolute;
|
|
@@ -5,7 +7,7 @@
|
|
|
5
7
|
background: rgba(black, 0.85);
|
|
6
8
|
border-radius: 5px;
|
|
7
9
|
color: white;
|
|
8
|
-
box-shadow: 2px 2px 3px rgba(0
|
|
10
|
+
box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
|
|
9
11
|
text-align: center;
|
|
10
12
|
font-size: 13px;
|
|
11
13
|
z-index: 999999;
|
|
@@ -45,11 +47,49 @@
|
|
|
45
47
|
&.bottom::after {
|
|
46
48
|
content: " ";
|
|
47
49
|
position: absolute;
|
|
48
|
-
bottom: 100%;
|
|
50
|
+
bottom: 100%;
|
|
49
51
|
left: 50%;
|
|
50
52
|
margin-left: -5px;
|
|
51
53
|
border-width: 5px;
|
|
52
54
|
border-style: solid;
|
|
53
55
|
border-color: transparent transparent rgba(black, 0.85) transparent;
|
|
54
56
|
}
|
|
57
|
+
&.tooltip-error {
|
|
58
|
+
background: $danger-hover-color;
|
|
59
|
+
color: $default-color;
|
|
60
|
+
z-index: 99999;
|
|
61
|
+
&::before {
|
|
62
|
+
content: '';
|
|
63
|
+
position: absolute;
|
|
64
|
+
left: 0;
|
|
65
|
+
top: 0;
|
|
66
|
+
right: 0;
|
|
67
|
+
bottom: 0;
|
|
68
|
+
height: 100%;
|
|
69
|
+
width: 100%;
|
|
70
|
+
background: inherit;
|
|
71
|
+
border-radius: inherit;
|
|
72
|
+
z-index: -1;
|
|
73
|
+
opacity: 0.7;
|
|
74
|
+
animation: tooltip-component 2s ease-out infinite;
|
|
75
|
+
}
|
|
76
|
+
@keyframes tooltip-component {
|
|
77
|
+
100% {
|
|
78
|
+
transform: scale(1.05, 1.25);
|
|
79
|
+
opacity: 0;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
&.left::after {
|
|
83
|
+
border-left-color: $danger-hover-color;
|
|
84
|
+
}
|
|
85
|
+
&.right::after {
|
|
86
|
+
border-right-color: $danger-hover-color;
|
|
87
|
+
}
|
|
88
|
+
&.top::after {
|
|
89
|
+
border-top-color: $danger-hover-color;
|
|
90
|
+
}
|
|
91
|
+
&.bottom::after {
|
|
92
|
+
border-bottom-color: $danger-hover-color;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
55
95
|
}
|
package/lib/buttons/Button.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
import '../@types/Size.js';
|
|
6
|
+
import '../@types/Icon.js';
|
|
7
|
+
import '../icons/helper.js';
|
|
6
8
|
|
|
7
9
|
declare const CancelButton: ({ customClass, ...rest }: IButtonProps) => JSX.Element;
|
|
8
10
|
|
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
import '../@types/Size.js';
|
|
6
|
+
import '../@types/Icon.js';
|
|
7
|
+
import '../icons/helper.js';
|
|
6
8
|
|
|
7
9
|
declare const DangerButton: ({ customClass, ...rest }: IButtonProps) => JSX.Element;
|
|
8
10
|
|
|
@@ -9,6 +9,8 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
13
|
+
|
|
12
14
|
var _icons = _interopRequireDefault(require("../../lib/icons"));
|
|
13
15
|
|
|
14
16
|
var _withTooltip = _interopRequireDefault(require("../internals/withTooltip"));
|
|
@@ -19,7 +21,7 @@ var _withDropdown = _interopRequireDefault(require("../dropdown/withDropdown"));
|
|
|
19
21
|
|
|
20
22
|
var _permissionValidations = require("../permissionValidations");
|
|
21
23
|
|
|
22
|
-
var _excluded = ["dropdown", "onClick", "disabled", "iconName", "icon", "targetRef", "tabIndex", "isLoading", "label", "showDropdown", "getDropdownPopup", "isDropdownOpened", "showIconDropdown", "content", "style", "toggleable", "activeIconColor", "iconStyle", "visible", "customClass", "className", "size", "iconAlign", "boxShadow", "transparent", "round", "permissionAttr", "skeletonize", "tooltipPosition", "tooltipWidth", "isFloatMenu", "dropdownAlign", "customClassForDropdown"];
|
|
24
|
+
var _excluded = ["dropdown", "onClick", "disabled", "iconName", "icon", "targetRef", "tabIndex", "isLoading", "label", "showDropdown", "getDropdownPopup", "isDropdownOpened", "showIconDropdown", "content", "style", "toggleable", "activeIconColor", "iconStyle", "visible", "customClass", "className", "size", "iconAlign", "boxShadow", "transparent", "round", "permissionAttr", "skeletonize", "tooltipPosition", "errorMessage", "tooltipWidth", "isFloatMenu", "dropdownAlign", "customClassForDropdown", "buttonRef"];
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
@@ -80,10 +82,12 @@ var DefaultButton = function DefaultButton(_ref) {
|
|
|
80
82
|
permissionAttr = _ref.permissionAttr,
|
|
81
83
|
skeletonize = _ref.skeletonize,
|
|
82
84
|
tooltipPosition = _ref.tooltipPosition,
|
|
85
|
+
errorMessage = _ref.errorMessage,
|
|
83
86
|
tooltipWidth = _ref.tooltipWidth,
|
|
84
87
|
isFloatMenu = _ref.isFloatMenu,
|
|
85
88
|
dropdownAlign = _ref.dropdownAlign,
|
|
86
89
|
customClassForDropdown = _ref.customClassForDropdown,
|
|
90
|
+
buttonRef = _ref.buttonRef,
|
|
87
91
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
88
92
|
|
|
89
93
|
var options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible];
|
|
@@ -97,7 +101,7 @@ var DefaultButton = function DefaultButton(_ref) {
|
|
|
97
101
|
_useState4 = _slicedToArray(_useState3, 1),
|
|
98
102
|
onDenied = _useState4[0];
|
|
99
103
|
|
|
100
|
-
var
|
|
104
|
+
var refButton = (0, _react.useRef)(null);
|
|
101
105
|
var disabledIconColor = 'rgb(193, 193, 193)';
|
|
102
106
|
|
|
103
107
|
var shouldDisable = function shouldDisable() {
|
|
@@ -160,8 +164,16 @@ var DefaultButton = function DefaultButton(_ref) {
|
|
|
160
164
|
disabled: shouldDisable(),
|
|
161
165
|
className: "".concat(getClass(), " ").concat(activeButton ? '-toggleable' : '', " ").concat(skeletonize ? '-skeletonized' : ''),
|
|
162
166
|
ref: function ref(r) {
|
|
167
|
+
if (buttonRef) {
|
|
168
|
+
if (!_lodash.default.isFunction(buttonRef)) {
|
|
169
|
+
refButton.current = r;
|
|
170
|
+
} else {
|
|
171
|
+
buttonRef(r);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
163
175
|
if (targetRef) targetRef(r);
|
|
164
|
-
|
|
176
|
+
refButton.current = r;
|
|
165
177
|
},
|
|
166
178
|
tabIndex: tabIndex
|
|
167
179
|
}), content, getIcon(), label || '', isLoading && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -169,7 +181,7 @@ var DefaultButton = function DefaultButton(_ref) {
|
|
|
169
181
|
}, /*#__PURE__*/_react.default.createElement(_spinner.default, {
|
|
170
182
|
align: "none",
|
|
171
183
|
delayTime: 0
|
|
172
|
-
}))), dropdown &&
|
|
184
|
+
}))), dropdown && refButton.current && getDropdownPopup && getDropdownPopup(refButton.current));
|
|
173
185
|
};
|
|
174
186
|
|
|
175
187
|
var _default = (0, _withDropdown.default)((0, _withTooltip.default)(DefaultButton));
|
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
import '../@types/Size.js';
|
|
6
|
+
import '../@types/Icon.js';
|
|
7
|
+
import '../icons/helper.js';
|
|
6
8
|
|
|
7
9
|
declare const InfoButton: ({ customClass, ...rest }: IButtonProps) => JSX.Element;
|
|
8
10
|
|
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
import '../@types/Size.js';
|
|
6
|
+
import '../@types/Icon.js';
|
|
7
|
+
import '../icons/helper.js';
|
|
6
8
|
|
|
7
9
|
declare const PrimaryButton: ({ customClass, ...rest }: IButtonProps) => JSX.Element;
|
|
8
10
|
|
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
import '../@types/Size.js';
|
|
6
|
+
import '../@types/Icon.js';
|
|
7
|
+
import '../icons/helper.js';
|
|
6
8
|
|
|
7
9
|
declare const SaveButton: ({ customClass, ...rest }: IButtonProps) => JSX.Element;
|
|
8
10
|
|
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
import '../@types/Size.js';
|
|
6
|
+
import '../@types/Icon.js';
|
|
7
|
+
import '../icons/helper.js';
|
|
6
8
|
|
|
7
9
|
declare const SuccessButton: ({ customClass, ...rest }: IButtonProps) => JSX.Element;
|
|
8
10
|
|
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
import '../@types/Size.js';
|
|
6
|
+
import '../@types/Icon.js';
|
|
7
|
+
import '../icons/helper.js';
|
|
6
8
|
|
|
7
9
|
declare const WarningButton: ({ customClass, ...rest }: IButtonProps) => JSX.Element;
|
|
8
10
|
|
package/lib/buttons/index.d.ts
CHANGED
package/lib/buttons/types.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, ReactNode, CSSProperties, ReactElement, MouseEvent } from 'react';
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode, CSSProperties, ReactElement, MutableRefObject, MouseEvent } from 'react';
|
|
2
2
|
import { PermissionAttr } from '../@types/PermissionAttr.js';
|
|
3
3
|
import { Position } from '../@types/Position.js';
|
|
4
4
|
import { Size } from '../@types/Size.js';
|
|
5
|
+
import { IconNames } from '../@types/Icon.js';
|
|
6
|
+
import '../icons/helper.js';
|
|
5
7
|
|
|
6
8
|
interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
9
|
label?: string;
|
|
@@ -10,12 +12,13 @@ interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
10
12
|
disabled?: boolean;
|
|
11
13
|
content?: ReactNode;
|
|
12
14
|
size?: Size;
|
|
13
|
-
iconName?:
|
|
15
|
+
iconName?: IconNames;
|
|
14
16
|
customClass?: string;
|
|
15
17
|
iconAlign?: Position;
|
|
16
18
|
iconStyle?: CSSProperties;
|
|
17
19
|
boxShadow?: boolean;
|
|
18
20
|
icon?: ReactElement;
|
|
21
|
+
buttonRef?: MutableRefObject<HTMLButtonElement | null> | ((ref: HTMLButtonElement | null) => void);
|
|
19
22
|
targetRef?: (ref: HTMLButtonElement) => void;
|
|
20
23
|
dropdown?: boolean;
|
|
21
24
|
dropdownOnHover?: boolean;
|
|
@@ -39,6 +42,7 @@ interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
39
42
|
dropdownAlign?: 'left' | 'right';
|
|
40
43
|
onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
41
44
|
closeDropdownOnClickOutside?: boolean;
|
|
45
|
+
errorMessage?: string;
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
export { IButtonProps };
|
package/lib/dialog/Alert.d.ts
CHANGED
package/lib/dialog/Custom.d.ts
CHANGED
package/lib/dialog/Custom.js
CHANGED
|
@@ -41,7 +41,7 @@ var Custom = function Custom(props) {
|
|
|
41
41
|
_props$height = props.height,
|
|
42
42
|
height = _props$height === void 0 ? 'auto' : _props$height,
|
|
43
43
|
_props$iconName = props.iconName,
|
|
44
|
-
iconName = _props$iconName === void 0 ?
|
|
44
|
+
iconName = _props$iconName === void 0 ? null : _props$iconName;
|
|
45
45
|
return /*#__PURE__*/_react.default.createElement(_base.default, _extends({
|
|
46
46
|
width: width,
|
|
47
47
|
height: height
|
package/lib/dialog/Error.d.ts
CHANGED
package/lib/dialog/Question.d.ts
CHANGED