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.
Files changed (170) hide show
  1. package/lib/alerts/AlertContainer.d.ts +2 -0
  2. package/lib/alerts/AlertProvider.d.ts +2 -0
  3. package/lib/alerts/BaseAlert.d.ts +2 -0
  4. package/lib/alerts/Message.d.ts +2 -0
  5. package/lib/alerts/Message.js +1 -1
  6. package/lib/alerts/helpers.d.ts +2 -0
  7. package/lib/alerts/index.d.ts +2 -0
  8. package/lib/alerts/types.d.ts +3 -1
  9. package/lib/alerts/withAlert.d.ts +2 -0
  10. package/lib/assets/styles/dialog.scss +0 -2
  11. package/lib/assets/styles/drawers.scss +9 -0
  12. package/lib/assets/styles/radio.scss +52 -8
  13. package/lib/assets/styles/table.scss +30 -0
  14. package/lib/assets/styles/tooltip.scss +42 -2
  15. package/lib/buttons/ActivateButton.d.ts +2 -0
  16. package/lib/buttons/AddButton.d.ts +2 -0
  17. package/lib/buttons/Button.d.ts +2 -0
  18. package/lib/buttons/CancelButton.d.ts +2 -0
  19. package/lib/buttons/DangerButton.d.ts +2 -0
  20. package/lib/buttons/DefaultButton.d.ts +2 -0
  21. package/lib/buttons/DefaultButton.js +16 -4
  22. package/lib/buttons/DestroyButton.d.ts +2 -0
  23. package/lib/buttons/EditButton.d.ts +2 -0
  24. package/lib/buttons/InactivateButton.d.ts +2 -0
  25. package/lib/buttons/InfoButton.d.ts +2 -0
  26. package/lib/buttons/PrimaryButton.d.ts +2 -0
  27. package/lib/buttons/RestoreButton.d.ts +2 -0
  28. package/lib/buttons/SaveButton.d.ts +2 -0
  29. package/lib/buttons/SuccessButton.d.ts +2 -0
  30. package/lib/buttons/WarningButton.d.ts +2 -0
  31. package/lib/buttons/index.d.ts +2 -0
  32. package/lib/buttons/split_button/index.d.ts +2 -0
  33. package/lib/buttons/types.d.ts +6 -2
  34. package/lib/dialog/Alert.d.ts +2 -0
  35. package/lib/dialog/Custom.d.ts +2 -0
  36. package/lib/dialog/Custom.js +1 -1
  37. package/lib/dialog/Error.d.ts +2 -0
  38. package/lib/dialog/Information.d.ts +2 -0
  39. package/lib/dialog/Question.d.ts +2 -0
  40. package/lib/dialog/Warning.d.ts +2 -0
  41. package/lib/dialog/base/Content.d.ts +2 -0
  42. package/lib/dialog/base/Footer.d.ts +2 -0
  43. package/lib/dialog/base/Header.d.ts +2 -0
  44. package/lib/dialog/base/index.d.ts +2 -0
  45. package/lib/dialog/base/index.js +5 -2
  46. package/lib/dialog/form/index.d.ts +2 -0
  47. package/lib/dialog/index.d.ts +2 -0
  48. package/lib/dialog/types.d.ts +4 -2
  49. package/lib/drawer/Content.d.ts +2 -0
  50. package/lib/drawer/Drawer.d.ts +3 -1
  51. package/lib/drawer/Drawer.js +25 -2
  52. package/lib/drawer/Header.d.ts +2 -0
  53. package/lib/drawer/helpers.d.ts +2 -0
  54. package/lib/drawer/index.d.ts +2 -0
  55. package/lib/drawer/types.d.ts +4 -1
  56. package/lib/dropdown/Popup.js +7 -0
  57. package/lib/form/Field.js +3 -2
  58. package/lib/form/FieldNumber.d.ts +2 -2
  59. package/lib/form/index.d.ts +2 -1
  60. package/lib/form/index.js +10 -1
  61. package/lib/form/types.d.ts +2 -5
  62. package/lib/form/withFormSecurity.js +2 -1
  63. package/lib/icons/index.d.ts +2 -0
  64. package/lib/icons/types.d.ts +3 -1
  65. package/lib/index.d.ts +3 -1
  66. package/lib/inputs/base/InputTextBase.js +7 -1
  67. package/lib/inputs/inputHOC.d.ts +2 -0
  68. package/lib/inputs/mask/helpers.d.ts +2 -0
  69. package/lib/inputs/mask/imaskHOC.d.ts +2 -0
  70. package/lib/inputs/mask/imaskHOC.js +1 -1
  71. package/lib/inputs/multiSelect/ActionButtons.d.ts +1 -1
  72. package/lib/inputs/multiSelect/ActionButtons.js +4 -1
  73. package/lib/inputs/multiSelect/Dropdown.js +1 -1
  74. package/lib/inputs/multiSelect/helper.d.ts +8 -6
  75. package/lib/inputs/multiSelect/helper.js +7 -1
  76. package/lib/inputs/multiSelect/index.js +5 -2
  77. package/lib/inputs/multiSelect/types.d.ts +11 -3
  78. package/lib/inputs/number/BaseNumber.d.ts +2 -0
  79. package/lib/inputs/number/Currency.d.ts +2 -0
  80. package/lib/inputs/number/Decimal.d.ts +2 -0
  81. package/lib/inputs/number/index.d.ts +2 -0
  82. package/lib/inputs/number/types.d.ts +2 -0
  83. package/lib/inputs/period/index.js +8 -8
  84. package/lib/inputs/period/types.d.ts +2 -2
  85. package/lib/inputs/search/index.d.ts +2 -0
  86. package/lib/inputs/select/ActionButtons.d.ts +2 -0
  87. package/lib/inputs/select/Dropdown.d.ts +2 -0
  88. package/lib/inputs/select/Dropdown.js +1 -1
  89. package/lib/inputs/select/helper.d.ts +6 -9
  90. package/lib/inputs/select/helper.js +16 -2
  91. package/lib/inputs/select/index.js +7 -6
  92. package/lib/inputs/select/multiple/Selecteds.js +1 -1
  93. package/lib/inputs/select/multiple/index.js +13 -10
  94. package/lib/inputs/select/simple/index.js +35 -12
  95. package/lib/inputs/select/types.d.ts +21 -7
  96. package/lib/inputs/types.d.ts +4 -1
  97. package/lib/internals/types.d.ts +1 -0
  98. package/lib/internals/withTooltip.js +13 -6
  99. package/lib/labelMessages/index.d.ts +2 -0
  100. package/lib/labelMessages/index.js +3 -4
  101. package/lib/labelMessages/types.d.ts +3 -1
  102. package/lib/labels/DangerLabel.d.ts +2 -0
  103. package/lib/labels/DefaultLabel.d.ts +2 -0
  104. package/lib/labels/InfoLabel.d.ts +2 -0
  105. package/lib/labels/PrimaryLabel.d.ts +2 -0
  106. package/lib/labels/SuccessLabel.d.ts +2 -0
  107. package/lib/labels/WarningLabel.d.ts +2 -0
  108. package/lib/labels/index.d.ts +2 -0
  109. package/lib/labels/types.d.ts +3 -1
  110. package/lib/list/Header.d.ts +2 -0
  111. package/lib/list/Item.d.ts +2 -0
  112. package/lib/list/helpers.d.ts +2 -0
  113. package/lib/list/index.d.ts +2 -0
  114. package/lib/list/types.d.ts +4 -2
  115. package/lib/menus/float/MenuItem.d.ts +2 -0
  116. package/lib/menus/float/helpers.d.ts +2 -0
  117. package/lib/menus/float/index.d.ts +2 -0
  118. package/lib/menus/float/types.d.ts +3 -1
  119. package/lib/menus/index.d.ts +2 -0
  120. package/lib/menus/sidenav/ExpandMenu.d.ts +2 -0
  121. package/lib/menus/sidenav/MenuLink.d.ts +2 -0
  122. package/lib/menus/sidenav/NavMenuGroup.d.ts +2 -0
  123. package/lib/menus/sidenav/NavMenuItem.d.ts +2 -0
  124. package/lib/menus/sidenav/NavSubMenuItem.d.ts +2 -0
  125. package/lib/menus/sidenav/helpers.d.ts +2 -0
  126. package/lib/menus/sidenav/index.d.ts +2 -0
  127. package/lib/menus/sidenav/popup_menu_search/EmptyList.d.ts +2 -0
  128. package/lib/menus/sidenav/popup_menu_search/index.d.ts +2 -0
  129. package/lib/menus/sidenav/types.d.ts +4 -2
  130. package/lib/panel/Content.d.ts +3 -1
  131. package/lib/panel/DangerPanel.d.ts +3 -1
  132. package/lib/panel/Default.d.ts +3 -1
  133. package/lib/panel/Header.d.ts +3 -1
  134. package/lib/panel/Header.js +3 -4
  135. package/lib/panel/InfoPanel.d.ts +3 -1
  136. package/lib/panel/PrimaryPanel.d.ts +3 -1
  137. package/lib/panel/SuccessPanel.d.ts +3 -1
  138. package/lib/panel/ToolBar.d.ts +3 -1
  139. package/lib/panel/WarningPanel.d.ts +3 -1
  140. package/lib/panel/helpers.d.ts +3 -1
  141. package/lib/panel/index.d.ts +3 -1
  142. package/lib/panel/types.d.ts +3 -1
  143. package/lib/popover/PopoverText.d.ts +2 -0
  144. package/lib/popover/PopoverTitle.d.ts +2 -0
  145. package/lib/popover/index.d.ts +2 -0
  146. package/lib/popover/index.js +1 -2
  147. package/lib/popover/types.d.ts +3 -1
  148. package/lib/radio/index.d.ts +2 -1
  149. package/lib/radio/index.js +3 -1
  150. package/lib/radio/types.d.ts +2 -0
  151. package/lib/table/Row.js +20 -3
  152. package/lib/table/types.d.ts +5 -0
  153. package/lib/tabs/DropdownItems.d.ts +2 -0
  154. package/lib/tabs/Menu.d.ts +2 -0
  155. package/lib/tabs/MenuItems.d.ts +2 -0
  156. package/lib/tabs/Panel.d.ts +2 -0
  157. package/lib/tabs/index.d.ts +2 -0
  158. package/lib/tabs/tabHelpers.d.ts +2 -0
  159. package/lib/tabs/types.d.ts +3 -1
  160. package/lib/toolbar/ButtonBar.d.ts +2 -0
  161. package/lib/toolbar/LabelBar.d.ts +2 -0
  162. package/lib/toolbar/ToolBarGroup.d.ts +2 -0
  163. package/lib/toolbar/helpers.d.ts +2 -0
  164. package/lib/toolbar/index.d.ts +2 -0
  165. package/lib/toolbar/types.d.ts +4 -2
  166. package/lib/tooltip/index.d.ts +1 -1
  167. package/lib/tooltip/index.js +5 -1
  168. package/lib/tooltip/types.d.ts +1 -0
  169. package/lib/{types-3c6f1c20.d.ts → types-c1d83632.d.ts} +2 -1
  170. 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;
@@ -1,6 +1,8 @@
1
1
  import { IAlertProviderProps } 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 AlertProvider: (props: IAlertProviderProps) => JSX.Element;
6
8
 
@@ -1,6 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { IBaseAlertProps } 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 BaseAlert: ({ children }: IBaseAlertProps) => React.ReactPortal;
6
8
 
@@ -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
 
@@ -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 ? '' : _ref2$iconName,
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,
@@ -1,6 +1,8 @@
1
1
  import * as React 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 AlertProviderContext: React.Context<WithAlertContextProps>;
6
8
 
@@ -4,3 +4,5 @@ export { default as AlertProvider } from './AlertProvider.js';
4
4
  import 'react';
5
5
  import './types.js';
6
6
  import '../@types/PositionAlert.js';
7
+ import '../@types/Icon.js';
8
+ import '../icons/helper.js';
@@ -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?: string;
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
 
@@ -5,7 +5,6 @@
5
5
  font-family: 'Roboto', sans-serif;
6
6
  line-height: 22px;
7
7
  font-size: 14px;
8
- z-index: 99999;
9
8
  position: fixed;
10
9
  top: 0;
11
10
  bottom: 0;
@@ -176,5 +175,4 @@
176
175
  width: 100%;
177
176
  top: 0;
178
177
  left: 0;
179
- z-index: 99998;
180
178
  }
@@ -132,6 +132,15 @@
132
132
  }
133
133
  }
134
134
  }
135
+ > .waitingspinner {
136
+ position: absolute;
137
+ top: 50%;
138
+ left: 50%;
139
+ width: 60px;
140
+ height: 60px;
141
+ margin-left: -30px;
142
+ margin-top: -30px;
143
+ }
135
144
  }
136
145
  }
137
146
 
@@ -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: 28px;
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 ,0, 0, 0.3);
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
  }
@@ -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 ActivateButton: (props: 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 AddButton: (props: 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
  interface ButtonProps extends IButtonProps {
8
10
  split?: boolean;
@@ -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
 
@@ -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 _default: {
8
10
  (props: Omit<IButtonProps, "split">): JSX.Element;
@@ -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 buttonRef = (0, _react.useRef)(null);
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
- buttonRef.current = r;
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 && buttonRef.current && getDropdownPopup && getDropdownPopup(buttonRef.current));
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 DestroyButton: ({ icon, ...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 EditButton: (props: 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 InactivateButton: (props: 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 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 RestoreButton: (props: 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
 
@@ -19,3 +19,5 @@ import '../@types/Position.js';
19
19
  import './types.js';
20
20
  import '../@types/PermissionAttr.js';
21
21
  import '../@types/Size.js';
22
+ import '../@types/Icon.js';
23
+ import '../icons/helper.js';
@@ -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 SplitButton: (props: IButtonProps) => JSX.Element;
8
10
 
@@ -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?: string;
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 };
@@ -1,6 +1,8 @@
1
1
  import { ICommonDialogProps } from './types.js';
2
2
  import 'react';
3
3
  import '../@types/Align.js';
4
+ import '../@types/Icon.js';
5
+ import '../icons/helper.js';
4
6
 
5
7
  declare const Alert: (props: ICommonDialogProps) => JSX.Element;
6
8
 
@@ -1,6 +1,8 @@
1
1
  import { ICustomProps } from './types.js';
2
2
  import 'react';
3
3
  import '../@types/Align.js';
4
+ import '../@types/Icon.js';
5
+ import '../icons/helper.js';
4
6
 
5
7
  declare const Custom: (props: ICustomProps) => JSX.Element;
6
8
 
@@ -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 ? '' : _props$iconName;
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
@@ -1,6 +1,8 @@
1
1
  import { ICommonDialogProps } from './types.js';
2
2
  import 'react';
3
3
  import '../@types/Align.js';
4
+ import '../@types/Icon.js';
5
+ import '../icons/helper.js';
4
6
 
5
7
  declare const Error: (props: ICommonDialogProps) => JSX.Element;
6
8
 
@@ -1,6 +1,8 @@
1
1
  import { ICommonDialogProps } from './types.js';
2
2
  import 'react';
3
3
  import '../@types/Align.js';
4
+ import '../@types/Icon.js';
5
+ import '../icons/helper.js';
4
6
 
5
7
  declare const Information: (props: ICommonDialogProps) => JSX.Element;
6
8
 
@@ -1,6 +1,8 @@
1
1
  import { IQuestionProps } from './types.js';
2
2
  import 'react';
3
3
  import '../@types/Align.js';
4
+ import '../@types/Icon.js';
5
+ import '../icons/helper.js';
4
6
 
5
7
  declare const Question: (props: IQuestionProps) => JSX.Element | null;
6
8