linear-react-components-ui 1.0.10-beta.8 → 1.0.10-rc.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/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/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 +13 -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 +5 -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 +2 -0
- 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 +3 -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/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/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/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/helper.d.ts +2 -0
- package/lib/inputs/select/simple/index.js +25 -9
- package/lib/inputs/types.d.ts +2 -0
- 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/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/{types-90c43ae1.d.ts → types-c1e2d0c9.d.ts} +2 -1
- package/package.json +1 -1
- package/demo/06c001f4d19c06397d470bb43ff3fe49.png +0 -0
- package/demo/270084ef02ed3bddc3f735fd91ee3cae.png +0 -0
- package/demo/882f8e819d18f5f2dc08d23ebd28a7d5.png +0 -0
- package/demo/bundle.js +0 -2
- package/demo/bundle.js.LICENSE.txt +0 -65
- package/demo/cbc3b4bd6342c551db7afafe26dc458c.jpg +0 -0
- package/demo/edc9476523b940deab91951066981a31.png +0 -0
- package/demo/fb44e7c36db6d95bb85a745d4f060fb2.png +0 -0
- package/demo/fonts/Roboto-Black.woff +0 -0
- package/demo/fonts/Roboto-Black.woff2 +0 -0
- package/demo/fonts/Roboto-Bold.woff +0 -0
- package/demo/fonts/Roboto-Bold.woff2 +0 -0
- package/demo/fonts/Roboto-Light.woff +0 -0
- package/demo/fonts/Roboto-Light.woff2 +0 -0
- package/demo/fonts/Roboto-Medium.woff +0 -0
- package/demo/fonts/Roboto-Medium.woff2 +0 -0
- package/demo/fonts/Roboto-Regular.woff +0 -0
- package/demo/fonts/Roboto-Regular.woff2 +0 -0
- package/demo/fonts/Roboto-Thin.woff +0 -0
- package/demo/fonts/Roboto-Thin.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-Black.woff +0 -0
- package/demo/fonts/TitilliumWeb-Black.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-Bold.woff +0 -0
- package/demo/fonts/TitilliumWeb-Bold.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-ExtraLight.woff +0 -0
- package/demo/fonts/TitilliumWeb-ExtraLight.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-Light.woff +0 -0
- package/demo/fonts/TitilliumWeb-Light.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-Regular.woff +0 -0
- package/demo/fonts/TitilliumWeb-Regular.woff2 +0 -0
- package/demo/fonts/TitilliumWeb-SemiBold.woff +0 -0
- package/demo/fonts/TitilliumWeb-SemiBold.woff2 +0 -0
- package/demo/index.html +0 -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
|
@@ -38,7 +38,7 @@ var Message = function Message(_ref2) {
|
|
|
38
38
|
_ref2$icon = _ref2.icon,
|
|
39
39
|
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
40
40
|
_ref2$iconName = _ref2.iconName,
|
|
41
|
-
iconName = _ref2$iconName === void 0 ?
|
|
41
|
+
iconName = _ref2$iconName === void 0 ? null : _ref2$iconName,
|
|
42
42
|
_ref2$timeout = _ref2.timeout,
|
|
43
43
|
timeout = _ref2$timeout === void 0 ? 3000 : _ref2$timeout,
|
|
44
44
|
_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
|
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
|
|
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
|
|
|
@@ -6,12 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
9
10
|
var _icons = _interopRequireDefault(require("../../lib/icons"));
|
|
10
11
|
var _withTooltip = _interopRequireDefault(require("../internals/withTooltip"));
|
|
11
12
|
var _spinner = _interopRequireDefault(require("../spinner"));
|
|
12
13
|
var _withDropdown = _interopRequireDefault(require("../dropdown/withDropdown"));
|
|
13
14
|
var _permissionValidations = require("../permissionValidations");
|
|
14
|
-
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"];
|
|
15
|
+
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", "buttonRef"];
|
|
15
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
17
|
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); }
|
|
17
18
|
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; }
|
|
@@ -63,6 +64,7 @@ var DefaultButton = function DefaultButton(_ref) {
|
|
|
63
64
|
isFloatMenu = _ref.isFloatMenu,
|
|
64
65
|
dropdownAlign = _ref.dropdownAlign,
|
|
65
66
|
customClassForDropdown = _ref.customClassForDropdown,
|
|
67
|
+
buttonRef = _ref.buttonRef,
|
|
66
68
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
67
69
|
var options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible];
|
|
68
70
|
var _useState = (0, _react.useState)(false),
|
|
@@ -72,7 +74,7 @@ var DefaultButton = function DefaultButton(_ref) {
|
|
|
72
74
|
var _useState3 = (0, _react.useState)((0, _permissionValidations.actionsOnPermissionDenied)(options, permissionAttr)),
|
|
73
75
|
_useState4 = _slicedToArray(_useState3, 1),
|
|
74
76
|
onDenied = _useState4[0];
|
|
75
|
-
var
|
|
77
|
+
var refButton = (0, _react.useRef)(null);
|
|
76
78
|
var disabledIconColor = 'rgb(193, 193, 193)';
|
|
77
79
|
var shouldDisable = function shouldDisable() {
|
|
78
80
|
return !!onDenied.disabled || disabled;
|
|
@@ -126,8 +128,15 @@ var DefaultButton = function DefaultButton(_ref) {
|
|
|
126
128
|
disabled: shouldDisable(),
|
|
127
129
|
className: "".concat(getClass(), " ").concat(activeButton ? '-toggleable' : '', " ").concat(skeletonize ? '-skeletonized' : ''),
|
|
128
130
|
ref: function ref(r) {
|
|
131
|
+
if (buttonRef) {
|
|
132
|
+
if (!_lodash.default.isFunction(buttonRef)) {
|
|
133
|
+
refButton.current = r;
|
|
134
|
+
} else {
|
|
135
|
+
buttonRef(r);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
129
138
|
if (targetRef) targetRef(r);
|
|
130
|
-
|
|
139
|
+
refButton.current = r;
|
|
131
140
|
},
|
|
132
141
|
tabIndex: tabIndex
|
|
133
142
|
}), content, getIcon(), label || '', isLoading && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -135,7 +144,7 @@ var DefaultButton = function DefaultButton(_ref) {
|
|
|
135
144
|
}, /*#__PURE__*/_react.default.createElement(_spinner.default, {
|
|
136
145
|
align: "none",
|
|
137
146
|
delayTime: 0
|
|
138
|
-
}))), dropdown &&
|
|
147
|
+
}))), dropdown && refButton.current && getDropdownPopup && getDropdownPopup(refButton.current));
|
|
139
148
|
};
|
|
140
149
|
var _default = (0, _withDropdown.default)((0, _withTooltip.default)(DefaultButton));
|
|
141
150
|
exports.default = _default;
|
|
@@ -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;
|
package/lib/dialog/Alert.d.ts
CHANGED
package/lib/dialog/Custom.d.ts
CHANGED
package/lib/dialog/Custom.js
CHANGED
|
@@ -30,7 +30,7 @@ var Custom = function Custom(props) {
|
|
|
30
30
|
_props$height = props.height,
|
|
31
31
|
height = _props$height === void 0 ? 'auto' : _props$height,
|
|
32
32
|
_props$iconName = props.iconName,
|
|
33
|
-
iconName = _props$iconName === void 0 ?
|
|
33
|
+
iconName = _props$iconName === void 0 ? null : _props$iconName;
|
|
34
34
|
return /*#__PURE__*/_react.default.createElement(_base.default, _extends({
|
|
35
35
|
width: width,
|
|
36
36
|
height: height
|
package/lib/dialog/Error.d.ts
CHANGED
package/lib/dialog/Question.d.ts
CHANGED
package/lib/dialog/Warning.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IHeaderProps } 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 Header: ({ showCloseButton, handlerClose, title, icon, titleIcon, }: IHeaderProps) => JSX.Element;
|
|
6
8
|
|
package/lib/dialog/base/index.js
CHANGED
|
@@ -32,6 +32,7 @@ var BaseDialog = function BaseDialog(props) {
|
|
|
32
32
|
overlayEl.current = document.createElement('div');
|
|
33
33
|
overlayEl.current.className = 'modal-overlay';
|
|
34
34
|
overlayEl.current.dataset.testid = 'modal-overlay';
|
|
35
|
+
overlayEl.current.style.zIndex = "".concat(99998 + document.body.getElementsByClassName('modal-overlay').length);
|
|
35
36
|
body.appendChild(overlayEl.current);
|
|
36
37
|
}
|
|
37
38
|
var handleClickOutside = function handleClickOutside(event) {
|
|
@@ -48,8 +49,9 @@ var BaseDialog = function BaseDialog(props) {
|
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
51
|
var setModalContainer = function setModalContainer() {
|
|
52
|
+
var zIndexDynamicModalContainers = "".concat(99999 + document.body.getElementsByClassName('modalcontainer').length);
|
|
51
53
|
modalContainerEl.current.className = 'modalcontainer';
|
|
52
|
-
|
|
54
|
+
modalContainerEl.current.style.zIndex = zIndex || zIndexDynamicModalContainers;
|
|
53
55
|
body.appendChild(modalContainerEl.current);
|
|
54
56
|
modalContainerEl.current.appendChild(dialogEl.current);
|
|
55
57
|
};
|
|
@@ -58,7 +60,8 @@ var BaseDialog = function BaseDialog(props) {
|
|
|
58
60
|
document.body.removeChild(modalComponent[modalComponent.length - 1]);
|
|
59
61
|
};
|
|
60
62
|
var removeOverlay = function removeOverlay() {
|
|
61
|
-
var
|
|
63
|
+
var countModalOverlays = document.body.getElementsByClassName('modal-overlay').length;
|
|
64
|
+
var modalOverlay = document.getElementsByClassName('modal-overlay')[countModalOverlays - 1];
|
|
62
65
|
body.removeChild(modalOverlay);
|
|
63
66
|
};
|
|
64
67
|
(0, _react.useEffect)(function () {
|
package/lib/dialog/index.d.ts
CHANGED
package/lib/dialog/types.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ReactNode, CSSProperties, ReactElement } from 'react';
|
|
2
2
|
import { TextAlign } from '../@types/Align.js';
|
|
3
|
+
import { IconNames } from '../@types/Icon.js';
|
|
4
|
+
import '../icons/helper.js';
|
|
3
5
|
|
|
4
6
|
interface IContentProps {
|
|
5
7
|
children: ReactNode | ReactNode[];
|
|
@@ -13,7 +15,7 @@ interface IHeaderProps {
|
|
|
13
15
|
showCloseButton?: boolean;
|
|
14
16
|
title?: string;
|
|
15
17
|
icon?: JSX.Element;
|
|
16
|
-
titleIcon?:
|
|
18
|
+
titleIcon?: IconNames;
|
|
17
19
|
}
|
|
18
20
|
interface IBaseProps {
|
|
19
21
|
wrapperClassName: string;
|
|
@@ -64,7 +66,7 @@ interface ICustomProps {
|
|
|
64
66
|
text?: string;
|
|
65
67
|
height?: string;
|
|
66
68
|
width?: string;
|
|
67
|
-
iconName?:
|
|
69
|
+
iconName?: IconNames | null;
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
export { IBaseProps, ICommonDialogProps, IContentProps, ICustomProps, IFooterProps, IFormProps, IHeaderProps, IQuestionProps };
|
package/lib/drawer/Content.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { IDrawerProps } from './types.js';
|
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
|
+
import '../@types/Icon.js';
|
|
6
|
+
import '../icons/helper.js';
|
|
5
7
|
|
|
6
8
|
declare const Content: ({ children, style }: IDrawerProps) => JSX.Element;
|
|
7
9
|
|
package/lib/drawer/Drawer.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import React__default from 'react';
|
|
|
2
2
|
import { IDrawerProps } from './types.js';
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
|
+
import '../@types/Icon.js';
|
|
6
|
+
import '../icons/helper.js';
|
|
5
7
|
|
|
6
8
|
declare const BaseDrawer: ({ position, customClass, children, style, customClassForContent, targetId, closeOnEsc, overlay, permissionAttr, skeletonize, handlerClose, customClassForDrawer, content, title, isWaiting, ...rest }: IDrawerProps) => React__default.ReactPortal;
|
|
7
9
|
|
package/lib/drawer/Header.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { IDrawerHeaderProps } from './types.js';
|
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
|
+
import '../@types/Icon.js';
|
|
6
|
+
import '../icons/helper.js';
|
|
5
7
|
|
|
6
8
|
declare const Header: ({ showCloseButton, title, subTitle, icon, titleIcon, customClass, titleContent, subTitleContent, titleRightContent, }: IDrawerHeaderProps) => JSX.Element;
|
|
7
9
|
|
package/lib/drawer/helpers.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import React__default from 'react';
|
|
|
2
2
|
import { IDrawerContext } from './types.js';
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
|
+
import '../@types/Icon.js';
|
|
6
|
+
import '../icons/helper.js';
|
|
5
7
|
|
|
6
8
|
declare const DrawerContext: React__default.Context<IDrawerContext>;
|
|
7
9
|
|
package/lib/drawer/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export { default as DrawerContent } from './Content.js';
|
|
|
4
4
|
import 'react';
|
|
5
5
|
import '../@types/PermissionAttr.js';
|
|
6
6
|
import '../@types/Position.js';
|
|
7
|
+
import '../@types/Icon.js';
|
|
8
|
+
import '../icons/helper.js';
|
|
7
9
|
|
|
8
10
|
declare const _default: (props: IDrawerProps) => JSX.Element;
|
|
9
11
|
|
package/lib/drawer/types.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React__default, { ReactNode, ReactElement } from 'react';
|
|
2
2
|
import { PermissionAttr } from '../@types/PermissionAttr.js';
|
|
3
3
|
import { Position } from '../@types/Position.js';
|
|
4
|
+
import { IconNames } from '../@types/Icon.js';
|
|
5
|
+
import '../icons/helper.js';
|
|
4
6
|
|
|
5
7
|
interface IDrawerProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
6
8
|
overlay?: boolean;
|
|
@@ -28,7 +30,7 @@ interface IDrawerHeaderProps extends React__default.HTMLAttributes<HTMLDivElemen
|
|
|
28
30
|
subTitle?: string;
|
|
29
31
|
subTitleContent?: ReactElement;
|
|
30
32
|
icon?: ReactElement;
|
|
31
|
-
titleIcon?:
|
|
33
|
+
titleIcon?: IconNames;
|
|
32
34
|
}
|
|
33
35
|
interface IDrawerContext {
|
|
34
36
|
handlerClose?: () => void;
|
package/lib/icons/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { IIconProps } from './types.js';
|
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../@types/PointerEvents.js';
|
|
4
4
|
import '../@types/SizePixels.js';
|
|
5
|
+
import '../@types/Icon.js';
|
|
6
|
+
import './helper.js';
|
|
5
7
|
|
|
6
8
|
declare const Icon: ({ name, onClick, svgStruct, size, style, visible, disabled, customClass, color, pointerEvents, }: IIconProps) => JSX.Element | null;
|
|
7
9
|
|