linear-react-components-ui 1.1.20-beta.12 → 1.1.20-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/BaseAlert.js +1 -1
- package/lib/alerts/Message.js +1 -1
- package/lib/assets/styles/button.scss +0 -1
- package/lib/assets/styles/select.scss +2 -1
- package/lib/assets/styles/table.scss +10 -6
- package/lib/assets/styles/toolbar.scss +3 -0
- package/lib/assets/styles/wizard.scss +125 -0
- package/lib/avatar/index.js +8 -9
- package/lib/badge/index.js +4 -4
- package/lib/buttons/DangerButton.js +1 -1
- package/lib/buttons/DefaultButton.js +5 -17
- package/lib/buttons/InfoButton.js +1 -1
- package/lib/buttons/PrimaryButton.js +1 -1
- package/lib/buttons/SuccessButton.js +1 -1
- package/lib/buttons/WarningButton.js +1 -1
- package/lib/buttons/button_container/index.js +1 -1
- package/lib/buttons/split_button/index.js +1 -1
- package/lib/buttons/types.d.ts +0 -1
- package/lib/calendar/base/Day.js +1 -1
- package/lib/calendar/base/Month.js +1 -1
- package/lib/calendar/base/helpers.js +2 -2
- package/lib/calendar/base/index.js +1 -1
- package/lib/dialog/Custom.js +1 -1
- package/lib/dialog/base/Content.d.ts +1 -1
- package/lib/dialog/base/Content.js +3 -2
- package/lib/dialog/base/Header.js +2 -2
- package/lib/dialog/base/index.js +6 -4
- package/lib/dialog/form/index.js +8 -3
- package/lib/dialog/types.d.ts +34 -4
- package/lib/dialog/wizard/index.d.ts +13 -0
- package/lib/dialog/wizard/index.js +74 -0
- package/lib/dialog/wizard/progressbar.d.ts +13 -0
- package/lib/dialog/wizard/progressbar.js +36 -0
- package/lib/dialog/wizard/step.d.ts +9 -0
- package/lib/dialog/wizard/step.js +22 -0
- package/lib/dialog/wizard/useWizard.d.ts +9 -0
- package/lib/dialog/wizard/useWizard.js +48 -0
- package/lib/drawer/Drawer.js +3 -3
- package/lib/drawer/Header.js +1 -1
- package/lib/dropdown/Popup.d.ts +1 -1
- package/lib/dropdown/Popup.js +22 -43
- package/lib/dropdown/helper.js +1 -1
- package/lib/dropdown/types.d.ts +2 -6
- package/lib/dropdown/withDropdown.js +6 -7
- package/lib/fieldset/index.js +7 -7
- package/lib/form/Field.js +11 -24
- package/lib/form/FieldArray.js +10 -25
- package/lib/form/FieldNumber.js +9 -21
- package/lib/form/FieldPeriod.js +5 -5
- package/lib/form/index.js +9 -6
- package/lib/form/types.d.ts +10 -6
- package/lib/form/withFieldHOC.js +2 -2
- package/lib/gridlayout/GridCol.js +5 -5
- package/lib/gridlayout/GridRow.js +1 -4
- package/lib/gridlayout/types.d.ts +1 -1
- package/lib/hint/index.js +1 -7
- package/lib/icons/helper.d.ts +20 -0
- package/lib/icons/helper.js +20 -0
- package/lib/icons/index.js +27 -24
- package/lib/inputs/base/InputTextBase.js +9 -6
- package/lib/inputs/base/Label.js +1 -1
- package/lib/inputs/base/helpers.js +3 -7
- package/lib/inputs/date/helpers.js +1 -4
- package/lib/inputs/date/index.js +15 -9
- package/lib/inputs/errorMessage/index.js +1 -1
- package/lib/inputs/file/DefaultFile.js +6 -5
- package/lib/inputs/file/DragDropFile.js +17 -15
- package/lib/inputs/file/File.js +4 -3
- package/lib/inputs/mask/BaseMask.js +1 -1
- package/lib/inputs/mask/imaskHOC.js +203 -0
- package/lib/inputs/multiSelect/Dropdown.js +10 -9
- package/lib/inputs/multiSelect/helper.js +2 -1
- package/lib/inputs/multiSelect/index.js +9 -7
- package/lib/inputs/number/BaseNumber.d.ts +1 -1
- package/lib/inputs/number/BaseNumber.js +2 -9
- package/lib/inputs/number/Currency.d.ts +1 -1
- package/lib/inputs/number/Currency.js +4 -11
- package/lib/inputs/number/index.js +1 -1
- package/lib/inputs/period/PeriodList.js +1 -1
- package/lib/inputs/period/helper.js +1 -3
- package/lib/inputs/period/index.js +14 -9
- package/lib/inputs/search/index.js +1 -1
- package/lib/inputs/select/Dropdown.js +1 -1
- package/lib/inputs/select/helper.js +13 -10
- package/lib/inputs/select/multiple/Selecteds.js +1 -1
- package/lib/inputs/select/multiple/index.js +19 -12
- package/lib/inputs/select/simple/index.js +22 -13
- package/lib/inputs/select/types.d.ts +1 -0
- package/lib/inputs/textarea/index.js +1 -1
- package/lib/internals/withTooltip.js +9 -9
- package/lib/labelMessages/index.js +3 -4
- package/lib/labels/DefaultLabel.js +1 -4
- package/lib/labels/label_container/index.js +1 -1
- package/lib/list/Header.js +1 -1
- package/lib/list/Item.js +7 -9
- package/lib/list/index.js +1 -1
- package/lib/menus/float/MenuItem.js +2 -2
- package/lib/menus/float/SubMenuContainer.js +1 -1
- package/lib/menus/float/index.js +1 -1
- package/lib/menus/sidenav/ExpandMenu.js +1 -1
- package/lib/menus/sidenav/NavMenuGroup.js +1 -1
- package/lib/menus/sidenav/NavMenuItem.js +9 -7
- package/lib/menus/sidenav/NavSubMenuItem.js +1 -1
- package/lib/menus/sidenav/helpers.js +1 -1
- package/lib/menus/sidenav/index.js +5 -5
- package/lib/menus/sidenav/popup_menu_help/index.js +85 -0
- package/lib/panel/Content.js +7 -5
- package/lib/panel/Default.js +2 -2
- package/lib/panel/Header.js +3 -3
- package/lib/permissionValidations.js +1 -1
- package/lib/popover/PopoverText.d.ts +2 -3
- package/lib/popover/PopoverText.js +8 -5
- package/lib/popover/PopoverTitle.d.ts +0 -1
- package/lib/popover/index.d.ts +5 -3
- package/lib/popover/index.js +14 -20
- package/lib/popover/types.d.ts +1 -12
- package/lib/progress/Bar.js +6 -6
- package/lib/radio/index.d.ts +1 -1
- package/lib/radio/index.js +4 -4
- package/lib/radio/types.d.ts +2 -1
- package/lib/shortcuts/index.js +1 -1
- package/lib/skeleton/SkeletonContainer.js +1 -2
- package/lib/skeleton/index.js +1 -4
- package/lib/spinner/index.js +2 -2
- package/lib/split/Split.js +1 -1
- package/lib/split/SplitSide.js +3 -3
- package/lib/table/Body.js +3 -3
- package/lib/table/Header.js +11 -8
- package/lib/table/HeaderColumn.d.ts +1 -1
- package/lib/table/HeaderColumn.js +7 -6
- package/lib/table/Row.js +3 -3
- package/lib/table/RowColumn.js +3 -2
- package/lib/table/index.js +1 -6
- package/lib/table/types.d.ts +4 -2
- package/lib/tabs/DropdownItems.js +62 -0
- package/lib/tabs/DropdownTabs.js +1 -1
- package/lib/tabs/Menu.js +1 -1
- package/lib/tabs/MenuItems.js +70 -0
- package/lib/tabs/MenuTabs.js +2 -2
- package/lib/tabs/Panel.js +7 -5
- package/lib/tabs/context.js +6 -3
- package/lib/textContent/index.js +1 -1
- package/lib/toolbar/ButtonBar.js +1 -1
- package/lib/toolbar/index.js +1 -1
- package/lib/tooltip/index.js +7 -7
- package/lib/treetable/Body.js +1 -1
- package/lib/treetable/Header.js +2 -2
- package/lib/treetable/Row.js +10 -13
- package/lib/treeview/Header.js +1 -1
- package/lib/treeview/Node.js +15 -11
- package/lib/treeview/index.js +11 -7
- package/lib/treeview/types.d.ts +4 -0
- package/lib/treeview_old/Header.js +29 -0
- package/lib/treeview_old/Node.js +68 -0
- package/lib/treeview_old/index.js +43 -0
- package/lib/uitour/index.js +8 -6
- package/package.json +2 -2
package/lib/alerts/BaseAlert.js
CHANGED
|
@@ -26,7 +26,7 @@ const BaseAlert = _ref => {
|
|
|
26
26
|
alert.appendChild(messageContainerEl);
|
|
27
27
|
}
|
|
28
28
|
return () => {
|
|
29
|
-
alert
|
|
29
|
+
alert === null || alert === void 0 ? void 0 : alert.removeChild(messageContainerEl);
|
|
30
30
|
};
|
|
31
31
|
}, []);
|
|
32
32
|
return /*#__PURE__*/_reactDom.default.createPortal(children, messageContainerEl);
|
package/lib/alerts/Message.js
CHANGED
|
@@ -104,7 +104,6 @@ $shadow-button-inset-default: inset 0 0 0 1px $default-border-color, $shadow-but
|
|
|
104
104
|
opacity: 0.7;
|
|
105
105
|
border: solid 1px $font-color-disabled;
|
|
106
106
|
pointer-events: auto;
|
|
107
|
-
cursor: not-allowed;
|
|
108
107
|
}
|
|
109
108
|
&.-shadowsdisabled {
|
|
110
109
|
box-shadow: none!important;
|
|
@@ -58,12 +58,16 @@
|
|
|
58
58
|
&.-noborder {
|
|
59
59
|
border-bottom: 0;
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.menu-column {
|
|
64
|
+
text-align: center;
|
|
65
|
+
width: 96px;
|
|
66
|
+
svg {
|
|
67
|
+
margin: 0;
|
|
68
|
+
}
|
|
69
|
+
span {
|
|
70
|
+
width: 100%;
|
|
67
71
|
}
|
|
68
72
|
}
|
|
69
73
|
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
@import "colors.scss";
|
|
2
|
+
|
|
3
|
+
.wizard-dialog {
|
|
4
|
+
.wizard-wrapper {
|
|
5
|
+
.wizard-content {
|
|
6
|
+
display: flex !important;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
.wizard-progresbar {
|
|
9
|
+
width: 100%;
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-auto-columns: 1fr;
|
|
12
|
+
grid-auto-flow: column;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
padding: 20px;
|
|
15
|
+
margin-bottom: 20px;
|
|
16
|
+
border-bottom: 2px solid $component-border-color;
|
|
17
|
+
gap: 10px;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
> .title {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
position: relative;
|
|
26
|
+
flex: 1;
|
|
27
|
+
text-align: center;
|
|
28
|
+
&:first-child {
|
|
29
|
+
.step {
|
|
30
|
+
align-self: flex-start;
|
|
31
|
+
}
|
|
32
|
+
.step-title {
|
|
33
|
+
align-self: flex-start;
|
|
34
|
+
text-align: left;
|
|
35
|
+
}
|
|
36
|
+
&:before {
|
|
37
|
+
right: auto;
|
|
38
|
+
left: 45px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
&:last-child {
|
|
42
|
+
.step {
|
|
43
|
+
align-self: flex-end;
|
|
44
|
+
}
|
|
45
|
+
.step-title {
|
|
46
|
+
align-self: flex-end;
|
|
47
|
+
text-align: right;
|
|
48
|
+
}
|
|
49
|
+
&:after {
|
|
50
|
+
left: auto;
|
|
51
|
+
right: 45px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
&::after, &::before {
|
|
55
|
+
content: "";
|
|
56
|
+
position: absolute;
|
|
57
|
+
height: 2px;
|
|
58
|
+
background-color: $component-border-color;
|
|
59
|
+
top: 18px;
|
|
60
|
+
width: calc(100% - 25px);
|
|
61
|
+
transition: all 0.2s ease-in-out;
|
|
62
|
+
}
|
|
63
|
+
&::after {
|
|
64
|
+
left: calc(50% + 18px);
|
|
65
|
+
}
|
|
66
|
+
&::before {
|
|
67
|
+
right: calc(50% + 18px);
|
|
68
|
+
}
|
|
69
|
+
&[data-completed="true"] {
|
|
70
|
+
&::after {
|
|
71
|
+
background-color: $success-color !important;
|
|
72
|
+
}
|
|
73
|
+
+ .title::before {
|
|
74
|
+
background-color: $success-color !important;
|
|
75
|
+
}
|
|
76
|
+
&:first-child::before {
|
|
77
|
+
background-color: $success-color !important;
|
|
78
|
+
}
|
|
79
|
+
& + .title:after {
|
|
80
|
+
background-color: $success-color !important;
|
|
81
|
+
}
|
|
82
|
+
> .step {
|
|
83
|
+
> .number {
|
|
84
|
+
background-color: $success-color;
|
|
85
|
+
border-color: $success-color;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
&[data-disabled="true"] .step {
|
|
90
|
+
opacity: 0.3;
|
|
91
|
+
}
|
|
92
|
+
> .step {
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
width: 54px;
|
|
98
|
+
> .number {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
font-size: 20px;
|
|
103
|
+
font-weight: 600;
|
|
104
|
+
width: 36px;
|
|
105
|
+
height: 36px;
|
|
106
|
+
border-radius: 100%;
|
|
107
|
+
color: #fff;
|
|
108
|
+
background-color: $color-light-dark;
|
|
109
|
+
z-index: 1;
|
|
110
|
+
transition: all 0.2s ease-in-out;
|
|
111
|
+
border: 2px solid $color-light-dark;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
> .step-title {
|
|
115
|
+
max-width: 150px;
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
margin-top: 6px;
|
|
118
|
+
font-weight: 500;
|
|
119
|
+
color: $font-color-soft;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
package/lib/avatar/index.js
CHANGED
|
@@ -23,8 +23,7 @@ const getClass = _ref => {
|
|
|
23
23
|
disabled,
|
|
24
24
|
size = 'default'
|
|
25
25
|
} = _ref;
|
|
26
|
-
return
|
|
27
|
-
${square && '-square'} ${size && `-${size}`}`;
|
|
26
|
+
return "avatar-component ".concat(className).concat(disabled && '-disabled', " \n ").concat(square && '-square', " ").concat(size && "-".concat(size));
|
|
28
27
|
};
|
|
29
28
|
const getIcon = (iconName, icon) => {
|
|
30
29
|
if (icon) {
|
|
@@ -71,18 +70,18 @@ const Avatar = props => {
|
|
|
71
70
|
if (targetRef) targetRef(r);
|
|
72
71
|
dropdownRef.current = r;
|
|
73
72
|
},
|
|
74
|
-
className:
|
|
73
|
+
className: "".concat(getClass(props), " ").concat(customClass),
|
|
75
74
|
style: _objectSpread({
|
|
76
|
-
width:
|
|
77
|
-
height:
|
|
78
|
-
backgroundColor:
|
|
79
|
-
cursor:
|
|
75
|
+
width: "".concat(width),
|
|
76
|
+
height: "".concat(height),
|
|
77
|
+
backgroundColor: "".concat(color),
|
|
78
|
+
cursor: "".concat(dropdown ? 'pointer' : 'normal')
|
|
80
79
|
}, style)
|
|
81
80
|
}, (iconName || icon) && !src && getIcon(iconName, icon), src && /*#__PURE__*/_react.default.createElement("img", {
|
|
82
81
|
className: "imgavatar",
|
|
83
82
|
style: {
|
|
84
|
-
width:
|
|
85
|
-
height:
|
|
83
|
+
width: "".concat(width),
|
|
84
|
+
height: "".concat(height)
|
|
86
85
|
},
|
|
87
86
|
src: src,
|
|
88
87
|
alt: srcAlt
|
package/lib/badge/index.js
CHANGED
|
@@ -18,12 +18,12 @@ const Badge = props => {
|
|
|
18
18
|
right = '-11px'
|
|
19
19
|
} = props;
|
|
20
20
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
21
|
-
className:
|
|
21
|
+
className: "badge-component ".concat(customClass)
|
|
22
22
|
}, children, /*#__PURE__*/_react.default.createElement("span", {
|
|
23
|
-
className:
|
|
23
|
+
className: "badge -".concat(color, " ").concat(customClassForBadge),
|
|
24
24
|
style: {
|
|
25
|
-
top:
|
|
26
|
-
right:
|
|
25
|
+
top: "".concat(top),
|
|
26
|
+
right: "".concat(right)
|
|
27
27
|
}
|
|
28
28
|
}, content));
|
|
29
29
|
};
|
|
@@ -17,7 +17,7 @@ const DangerButton = _ref => {
|
|
|
17
17
|
} = _ref,
|
|
18
18
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_Button.default, _extends({
|
|
20
|
-
customClass:
|
|
20
|
+
customClass: "-danger ".concat(customClass)
|
|
21
21
|
}, rest));
|
|
22
22
|
};
|
|
23
23
|
var _default = exports.default = DangerButton;
|
|
@@ -11,7 +11,7 @@ var _withTooltip = _interopRequireWildcard(require("../internals/withTooltip"));
|
|
|
11
11
|
var _spinner = _interopRequireDefault(require("../spinner"));
|
|
12
12
|
var _withDropdown = _interopRequireDefault(require("../dropdown/withDropdown"));
|
|
13
13
|
var _permissionValidations = require("../permissionValidations");
|
|
14
|
-
const _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", "errorMessage", "isFloatMenu", "dropdownAlign", "customClassForDropdown", "buttonRef", "
|
|
14
|
+
const _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", "errorMessage", "tooltipWidth", "isFloatMenu", "dropdownAlign", "customClassForDropdown", "buttonRef", "onDeniedText"];
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -54,15 +54,12 @@ const DefaultButton = _ref => {
|
|
|
54
54
|
permissionAttr,
|
|
55
55
|
skeletonize,
|
|
56
56
|
errorMessage,
|
|
57
|
+
tooltipWidth,
|
|
57
58
|
isFloatMenu,
|
|
58
59
|
dropdownAlign,
|
|
59
60
|
customClassForDropdown,
|
|
60
61
|
buttonRef,
|
|
61
|
-
|
|
62
|
-
onDeniedText = 'Permissão Negada! Consulte o Administrador do sistema.',
|
|
63
|
-
tooltip,
|
|
64
|
-
tooltipWidth,
|
|
65
|
-
tooltipPosition
|
|
62
|
+
onDeniedText = 'Permissão Negada! Consulte o Administrador do sistema.'
|
|
66
63
|
} = _ref,
|
|
67
64
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
68
65
|
const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible];
|
|
@@ -75,16 +72,7 @@ const DefaultButton = _ref => {
|
|
|
75
72
|
const {
|
|
76
73
|
handlerSetOnDeniedText
|
|
77
74
|
} = (0, _react.useContext)(_withTooltip.TooltipContext);
|
|
78
|
-
const getClass = () =>
|
|
79
|
-
${customClass}
|
|
80
|
-
${transparent && '-transparent'}
|
|
81
|
-
${isDisabled && '-disabled'}
|
|
82
|
-
${size && `-${size}`}
|
|
83
|
-
${dropdown && !round && 'icon-right'}
|
|
84
|
-
${dropdown && round && 'icon-center'}
|
|
85
|
-
${iconAlign && !dropdown && `icon-${iconAlign}`}
|
|
86
|
-
${boxShadow ? '' : '-shadowsdisabled'}
|
|
87
|
-
${round && '-round'}`;
|
|
75
|
+
const getClass = () => "button-component ".concat(className, "\n ").concat(customClass, "\n ").concat(transparent && '-transparent', "\n ").concat(isDisabled && '-disabled', "\n ").concat(size && "-".concat(size), "\n ").concat(dropdown && !round && 'icon-right', "\n ").concat(dropdown && round && 'icon-center', "\n ").concat(iconAlign && !dropdown && "icon-".concat(iconAlign), "\n ").concat(boxShadow ? '' : '-shadowsdisabled', "\n ").concat(round && '-round');
|
|
88
76
|
const returnPadlockIcon = resultantStyle => /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
89
77
|
name: "padlock",
|
|
90
78
|
size: 16,
|
|
@@ -145,7 +133,7 @@ const DefaultButton = _ref => {
|
|
|
145
133
|
if (dropdown && showDropdown) showDropdown();
|
|
146
134
|
if (onClick && toggleable) setActiveButton(!activeButton);
|
|
147
135
|
},
|
|
148
|
-
className:
|
|
136
|
+
className: "".concat(getClass(), " ").concat(activeButton ? '-toggleable' : '', " ").concat(skeletonize ? '-skeletonized' : ''),
|
|
149
137
|
ref: r => {
|
|
150
138
|
if (buttonRef) {
|
|
151
139
|
if (!_lodash.default.isFunction(buttonRef)) {
|
|
@@ -17,7 +17,7 @@ const InfoButton = _ref => {
|
|
|
17
17
|
} = _ref,
|
|
18
18
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_Button.default, _extends({
|
|
20
|
-
customClass:
|
|
20
|
+
customClass: "-info ".concat(customClass)
|
|
21
21
|
}, rest));
|
|
22
22
|
};
|
|
23
23
|
var _default = exports.default = InfoButton;
|
|
@@ -17,7 +17,7 @@ const PrimaryButton = _ref => {
|
|
|
17
17
|
} = _ref,
|
|
18
18
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_Button.default, _extends({
|
|
20
|
-
customClass:
|
|
20
|
+
customClass: "-primary ".concat(customClass)
|
|
21
21
|
}, rest));
|
|
22
22
|
};
|
|
23
23
|
var _default = exports.default = PrimaryButton;
|
|
@@ -17,7 +17,7 @@ const SuccessButton = _ref => {
|
|
|
17
17
|
} = _ref,
|
|
18
18
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_Button.default, _extends({}, rest, {
|
|
20
|
-
customClass:
|
|
20
|
+
customClass: "-success ".concat(customClass)
|
|
21
21
|
}));
|
|
22
22
|
};
|
|
23
23
|
var _default = exports.default = SuccessButton;
|
|
@@ -17,7 +17,7 @@ const WarningButton = _ref => {
|
|
|
17
17
|
} = _ref,
|
|
18
18
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_Button.default, _extends({}, rest, {
|
|
20
|
-
customClass:
|
|
20
|
+
customClass: "-warning ".concat(customClass)
|
|
21
21
|
}));
|
|
22
22
|
};
|
|
23
23
|
var _default = exports.default = WarningButton;
|
|
@@ -23,7 +23,7 @@ const ButtonContainer = _ref => {
|
|
|
23
23
|
} = _ref;
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
25
25
|
"data-testid": "button-container",
|
|
26
|
-
className:
|
|
26
|
+
className: "btn-container ".concat(customClass),
|
|
27
27
|
style: getStyles(style, position)
|
|
28
28
|
}, children);
|
|
29
29
|
};
|
|
@@ -37,7 +37,7 @@ const SplitButton = props => {
|
|
|
37
37
|
}
|
|
38
38
|
})), /*#__PURE__*/_react.default.createElement(_DefaultButton.default, _extends({}, splitProps, {
|
|
39
39
|
iconName: "down",
|
|
40
|
-
customClass:
|
|
40
|
+
customClass: "".concat(customClass, " -transparenttext"),
|
|
41
41
|
iconStyle: {
|
|
42
42
|
marginRight: -7,
|
|
43
43
|
marginLeft: 0
|
package/lib/buttons/types.d.ts
CHANGED
|
@@ -41,7 +41,6 @@ interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
41
41
|
customClassForDropdown?: string;
|
|
42
42
|
dropdownAlign?: 'left' | 'right';
|
|
43
43
|
onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
44
|
-
handlerClose?: (cb: () => void) => void;
|
|
45
44
|
closeDropdownOnClickOutside?: boolean;
|
|
46
45
|
errorMessage?: string;
|
|
47
46
|
onDeniedText?: string;
|
package/lib/calendar/base/Day.js
CHANGED
|
@@ -25,7 +25,7 @@ const Day = _ref => {
|
|
|
25
25
|
onClick: () => {
|
|
26
26
|
if (handleDateChange) handleDateChange(day);
|
|
27
27
|
},
|
|
28
|
-
customClass:
|
|
28
|
+
customClass: " ".concat((0, _helpers.getDayCssClass)(currentDate, day), " numberdaycalendar"),
|
|
29
29
|
label: day.format('D')
|
|
30
30
|
}));
|
|
31
31
|
};
|
|
@@ -21,7 +21,7 @@ const Month = _ref => {
|
|
|
21
21
|
const week = /*#__PURE__*/_react.default.createElement(_Week.default, {
|
|
22
22
|
currentDate: currentDate,
|
|
23
23
|
weekStartDate: startOfWeek,
|
|
24
|
-
key:
|
|
24
|
+
key: "week-".concat(startOfWeek.format('YYYYMMDD'))
|
|
25
25
|
});
|
|
26
26
|
weeks = [...weeks, week];
|
|
27
27
|
weekIndex += 1;
|
|
@@ -89,8 +89,8 @@ function getCalendarCssClass(_ref) {
|
|
|
89
89
|
customClass,
|
|
90
90
|
colorStyle
|
|
91
91
|
} = _ref;
|
|
92
|
-
let cssClass =
|
|
93
|
-
cssClass +=
|
|
92
|
+
let cssClass = "calendar-component ".concat(customClass);
|
|
93
|
+
cssClass += " -".concat(colorStyle);
|
|
94
94
|
cssClass += unpadding ? ' -unpadding' : '';
|
|
95
95
|
cssClass += drawGridLines ? ' -draw-grid-lines' : '';
|
|
96
96
|
return cssClass;
|
|
@@ -71,7 +71,7 @@ const Calendar = props => {
|
|
|
71
71
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
72
72
|
className: "daynames"
|
|
73
73
|
}, (0, _helpers.dayNames)().map(name => /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
-
key:
|
|
74
|
+
key: "day-".concat(name)
|
|
75
75
|
}, name))), /*#__PURE__*/_react.default.createElement(_Month.default, {
|
|
76
76
|
currentDate: dataAtual
|
|
77
77
|
})));
|
package/lib/dialog/Custom.js
CHANGED
|
@@ -48,7 +48,7 @@ const Custom = props => {
|
|
|
48
48
|
}, props.text)), props.buttons && props.buttons.length > 0 && /*#__PURE__*/_react.default.createElement(_Footer.default, props, /*#__PURE__*/_react.default.createElement(_buttons.ButtonContainer, {
|
|
49
49
|
position: "right"
|
|
50
50
|
}, props.buttons.map(button => /*#__PURE__*/_react.default.cloneElement(button, {
|
|
51
|
-
key:
|
|
51
|
+
key: "button-".concat(uuid.v1())
|
|
52
52
|
})))));
|
|
53
53
|
};
|
|
54
54
|
var _default = exports.default = Custom;
|
|
@@ -4,6 +4,6 @@ import '../../@types/Align.js';
|
|
|
4
4
|
import '../../@types/Icon.js';
|
|
5
5
|
import '../../icons/helper.js';
|
|
6
6
|
|
|
7
|
-
declare const Content: ({ children, styleForContent }: IContentProps) => JSX.Element;
|
|
7
|
+
declare const Content: ({ children, styleForContent, className }: IContentProps) => JSX.Element;
|
|
8
8
|
|
|
9
9
|
export { Content as default };
|
|
@@ -10,11 +10,12 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
10
10
|
const Content = _ref => {
|
|
11
11
|
let {
|
|
12
12
|
children,
|
|
13
|
-
styleForContent
|
|
13
|
+
styleForContent,
|
|
14
|
+
className = ''
|
|
14
15
|
} = _ref;
|
|
15
16
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
16
17
|
id: "modal-dialog-content",
|
|
17
|
-
className: "dialog-content",
|
|
18
|
+
className: "dialog-content ".concat(className),
|
|
18
19
|
style: styleForContent
|
|
19
20
|
}, children);
|
|
20
21
|
};
|
|
@@ -46,10 +46,10 @@ const Header = _ref => {
|
|
|
46
46
|
tabIndex: -1,
|
|
47
47
|
onFocus: () => {},
|
|
48
48
|
onBlur: () => {},
|
|
49
|
-
ref: formDialogContext
|
|
49
|
+
ref: formDialogContext === null || formDialogContext === void 0 ? void 0 : formDialogContext.headerRef,
|
|
50
50
|
className: "dialog-header"
|
|
51
51
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
52
|
-
className:
|
|
52
|
+
className: "".concat(icon !== null || titleIcon !== null ? 'left' : '')
|
|
53
53
|
}, getIcon(titleIcon, icon)), /*#__PURE__*/_react.default.createElement("div", {
|
|
54
54
|
className: "right"
|
|
55
55
|
}, /*#__PURE__*/_react.default.createElement("h5", {
|
package/lib/dialog/base/index.js
CHANGED
|
@@ -21,7 +21,8 @@ const BaseDialog = props => {
|
|
|
21
21
|
overlay = true,
|
|
22
22
|
closeOnEsc,
|
|
23
23
|
closeOnOutsideClick,
|
|
24
|
-
wrapperClassName,
|
|
24
|
+
wrapperClassName = '',
|
|
25
|
+
className = '',
|
|
25
26
|
children,
|
|
26
27
|
open: openProp,
|
|
27
28
|
onOpenChange,
|
|
@@ -74,7 +75,7 @@ const BaseDialog = props => {
|
|
|
74
75
|
let y = positionY <= 0 ? 0 : positionY;
|
|
75
76
|
if (x + width >= window.innerWidth) x = window.innerWidth - width;
|
|
76
77
|
if (y + height >= window.innerHeight) y = window.innerHeight - height;
|
|
77
|
-
wrapperEl.current.style.transform =
|
|
78
|
+
wrapperEl.current.style.transform = "translate(".concat(x, "px, ").concat(y, "px)");
|
|
78
79
|
wrapperEl.current.style.transition = 'none';
|
|
79
80
|
wrapperEl.current.style.left = '0';
|
|
80
81
|
wrapperEl.current.style.top = '0';
|
|
@@ -94,8 +95,9 @@ const BaseDialog = props => {
|
|
|
94
95
|
}
|
|
95
96
|
};
|
|
96
97
|
const onMouseDown = event => {
|
|
98
|
+
var _headerRef$current;
|
|
97
99
|
const element = event.target;
|
|
98
|
-
const isHeader = headerRef
|
|
100
|
+
const isHeader = headerRef === null || headerRef === void 0 ? void 0 : (_headerRef$current = headerRef.current) === null || _headerRef$current === void 0 ? void 0 : _headerRef$current.contains(element);
|
|
99
101
|
if (wrapperEl.current && isHeader) setIsDragging(true);
|
|
100
102
|
};
|
|
101
103
|
const onMouseUp = () => {
|
|
@@ -111,7 +113,7 @@ const BaseDialog = props => {
|
|
|
111
113
|
className: "modal-overlay",
|
|
112
114
|
"data-testid": "modal-overlay"
|
|
113
115
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
114
|
-
className: "dialog",
|
|
116
|
+
className: "dialog ".concat(className),
|
|
115
117
|
"data-testid": "dialog-component"
|
|
116
118
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
117
119
|
className: wrapperClassName,
|
package/lib/dialog/form/index.js
CHANGED
|
@@ -29,7 +29,10 @@ const ModalForm = props => {
|
|
|
29
29
|
width = '50%',
|
|
30
30
|
height = '50%',
|
|
31
31
|
content,
|
|
32
|
-
children
|
|
32
|
+
children,
|
|
33
|
+
className = '',
|
|
34
|
+
wrapperClassName = '',
|
|
35
|
+
contentClassName = ''
|
|
33
36
|
} = props;
|
|
34
37
|
const headerRef = (0, _react.useRef)(null);
|
|
35
38
|
const context = (0, _react.useContext)(_withFormSecurity.FormSecurityContext);
|
|
@@ -56,7 +59,8 @@ const ModalForm = props => {
|
|
|
56
59
|
width: width,
|
|
57
60
|
height: height
|
|
58
61
|
}, props, {
|
|
59
|
-
wrapperClassName: "dialog-form-wrapper"
|
|
62
|
+
wrapperClassName: "dialog-form-wrapper ".concat(wrapperClassName),
|
|
63
|
+
className: className
|
|
60
64
|
}), props.title && /*#__PURE__*/_react.default.createElement("div", {
|
|
61
65
|
className: "header-form"
|
|
62
66
|
}, /*#__PURE__*/_react.default.createElement(_Header.default, {
|
|
@@ -64,7 +68,8 @@ const ModalForm = props => {
|
|
|
64
68
|
handlerClose: props.handlerClose,
|
|
65
69
|
icon: props.icon
|
|
66
70
|
})), /*#__PURE__*/_react.default.createElement(_Content.default, {
|
|
67
|
-
styleForContent: _objectSpread(_objectSpread({}, props.styleForContent), overlayStyle)
|
|
71
|
+
styleForContent: _objectSpread(_objectSpread({}, props.styleForContent), overlayStyle),
|
|
72
|
+
className: contentClassName
|
|
68
73
|
}, content || children), getSpinner(), showFooter && props.buttons && /*#__PURE__*/_react.default.createElement(_Footer.default, null, /*#__PURE__*/_react.default.createElement(_index.ButtonContainer, _extends({}, props, {
|
|
69
74
|
style: _objectSpread({}, overlayStyle)
|
|
70
75
|
}), _react.default.Children.toArray(props.buttons.map(button => {
|
package/lib/dialog/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, CSSProperties, ReactElement } from 'react';
|
|
1
|
+
import { ReactNode, CSSProperties, ReactElement, Dispatch } from 'react';
|
|
2
2
|
import { TextAlign } from '../@types/Align.js';
|
|
3
3
|
import { IconNames } from '../@types/Icon.js';
|
|
4
4
|
import '../icons/helper.js';
|
|
@@ -6,6 +6,7 @@ import '../icons/helper.js';
|
|
|
6
6
|
interface IContentProps {
|
|
7
7
|
children: ReactNode | ReactNode[];
|
|
8
8
|
styleForContent?: CSSProperties;
|
|
9
|
+
className?: string;
|
|
9
10
|
}
|
|
10
11
|
interface IFooterProps {
|
|
11
12
|
children: ReactElement | ReactElement[];
|
|
@@ -18,10 +19,11 @@ interface IHeaderProps {
|
|
|
18
19
|
titleIcon?: IconNames;
|
|
19
20
|
}
|
|
20
21
|
interface IBaseProps {
|
|
21
|
-
wrapperClassName
|
|
22
|
+
wrapperClassName?: string;
|
|
22
23
|
width?: string;
|
|
23
24
|
height?: string;
|
|
24
25
|
children: ReactNode | ReactNode[];
|
|
26
|
+
className?: string;
|
|
25
27
|
closeOnEsc?: boolean;
|
|
26
28
|
closeOnOutsideClick?: boolean;
|
|
27
29
|
overlay?: boolean;
|
|
@@ -31,7 +33,7 @@ interface IBaseProps {
|
|
|
31
33
|
onOpenChange?: (open: boolean) => void;
|
|
32
34
|
handlerClose?: () => void;
|
|
33
35
|
}
|
|
34
|
-
interface IFormProps extends Omit<IBaseProps, 'textAlign' | 'zIndex'
|
|
36
|
+
interface IFormProps extends Omit<IBaseProps, 'textAlign' | 'zIndex'> {
|
|
35
37
|
buttons?: JSX.Element[];
|
|
36
38
|
styleForContent?: CSSProperties;
|
|
37
39
|
title?: string;
|
|
@@ -39,6 +41,7 @@ interface IFormProps extends Omit<IBaseProps, 'textAlign' | 'zIndex' | 'wrapperC
|
|
|
39
41
|
isWaiting?: boolean;
|
|
40
42
|
icon?: JSX.Element;
|
|
41
43
|
content?: ReactNode;
|
|
44
|
+
contentClassName?: string;
|
|
42
45
|
}
|
|
43
46
|
interface ICommonDialogProps {
|
|
44
47
|
onConfirmClick?: () => void;
|
|
@@ -66,5 +69,32 @@ interface ICustomProps {
|
|
|
66
69
|
interface IFormDialogContext {
|
|
67
70
|
headerRef?: React.RefObject<HTMLDivElement>;
|
|
68
71
|
}
|
|
72
|
+
interface WizardComponentProps extends Omit<IFormProps, 'content'> {
|
|
73
|
+
children: React.ReactNode;
|
|
74
|
+
buttons?: JSX.Element[];
|
|
75
|
+
showProgressbar?: boolean;
|
|
76
|
+
title?: string;
|
|
77
|
+
handlerClose?: () => void;
|
|
78
|
+
controls: WizardControls;
|
|
79
|
+
}
|
|
80
|
+
interface WizardStepComponentProps {
|
|
81
|
+
children: React.ReactNode;
|
|
82
|
+
title: string;
|
|
83
|
+
customClass?: string;
|
|
84
|
+
customStyle?: CSSProperties;
|
|
85
|
+
}
|
|
86
|
+
interface WizardControls extends Omit<UseWizardReturn, 'controls'> {
|
|
87
|
+
setTotalSteps: Dispatch<React.SetStateAction<number>>;
|
|
88
|
+
}
|
|
89
|
+
interface UseWizardReturn {
|
|
90
|
+
changeStep: (nextStep: number) => void;
|
|
91
|
+
nextStep: () => void;
|
|
92
|
+
hasNextStep: boolean;
|
|
93
|
+
previousStep: () => void;
|
|
94
|
+
hasPreviousStep: boolean;
|
|
95
|
+
currentStep: number;
|
|
96
|
+
totalSteps: number;
|
|
97
|
+
controls: WizardControls;
|
|
98
|
+
}
|
|
69
99
|
|
|
70
|
-
export { IBaseProps, ICommonDialogProps, IContentProps, ICustomProps, IFooterProps, IFormDialogContext, IFormProps, IHeaderProps, IQuestionProps };
|
|
100
|
+
export { IBaseProps, ICommonDialogProps, IContentProps, ICustomProps, IFooterProps, IFormDialogContext, IFormProps, IHeaderProps, IQuestionProps, UseWizardReturn, WizardComponentProps, WizardControls, WizardStepComponentProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { WizardControls, WizardComponentProps } from '../types.js';
|
|
3
|
+
export { WizardStep as Step } from './step.js';
|
|
4
|
+
export { useWizard } from './useWizard.js';
|
|
5
|
+
import '../../@types/Align.js';
|
|
6
|
+
import '../../@types/Icon.js';
|
|
7
|
+
import '../../icons/helper.js';
|
|
8
|
+
|
|
9
|
+
declare const WizardContext: React__default.Context<WizardControls | null>;
|
|
10
|
+
declare const useWizardContext: () => WizardControls | null;
|
|
11
|
+
declare function Wizard({ children, controls, showProgressbar, ...dialogProps }: Readonly<WizardComponentProps>): JSX.Element;
|
|
12
|
+
|
|
13
|
+
export { Wizard as Container, WizardContext, Wizard as default, useWizardContext };
|