linear-react-components-ui 1.1.20-beta.28 → 1.1.20-beta.29
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/assets/styles/wizard.scss +1 -3
- package/lib/dialog/types.d.ts +0 -2
- package/lib/dialog/wizard/index.d.ts +1 -1
- package/lib/dialog/wizard/index.js +4 -8
- package/lib/inputs/mask/helpers.d.ts +1 -1
- package/lib/inputs/number/index.js +1 -1
- package/lib/menus/sidenav/index.js +35 -27
- package/lib/menus/sidenav/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -5,9 +5,6 @@
|
|
|
5
5
|
.wizard-content {
|
|
6
6
|
display: flex !important;
|
|
7
7
|
flex-direction: column;
|
|
8
|
-
.wizard-body{
|
|
9
|
-
overflow: auto;
|
|
10
|
-
}
|
|
11
8
|
.wizard-progresbar {
|
|
12
9
|
width: 100%;
|
|
13
10
|
display: grid;
|
|
@@ -18,6 +15,7 @@
|
|
|
18
15
|
margin-bottom: 20px;
|
|
19
16
|
border-bottom: 2px solid $component-border-color;
|
|
20
17
|
gap: 10px;
|
|
18
|
+
overflow: hidden;
|
|
21
19
|
> .title {
|
|
22
20
|
font-size: 16px;
|
|
23
21
|
font-weight: 600;
|
package/lib/dialog/types.d.ts
CHANGED
|
@@ -81,8 +81,6 @@ interface WizardComponentProps extends Omit<IFormProps, 'content'> {
|
|
|
81
81
|
title?: string;
|
|
82
82
|
handlerClose?: () => void;
|
|
83
83
|
controls: WizardControls;
|
|
84
|
-
customStyleForProgressBar?: CSSProperties;
|
|
85
|
-
customStyleForBody?: CSSProperties;
|
|
86
84
|
}
|
|
87
85
|
interface WizardStepComponentProps {
|
|
88
86
|
children: React.ReactNode;
|
|
@@ -8,6 +8,6 @@ import '../../icons/helper.js';
|
|
|
8
8
|
|
|
9
9
|
declare const WizardContext: React__default.Context<WizardControls | null>;
|
|
10
10
|
declare const useWizardContext: () => WizardControls | null;
|
|
11
|
-
declare function Wizard({ children, controls, showProgressbar,
|
|
11
|
+
declare function Wizard({ children, controls, showProgressbar, ...dialogProps }: Readonly<WizardComponentProps>): JSX.Element;
|
|
12
12
|
|
|
13
13
|
export { Wizard as Container, WizardContext, Wizard as default, useWizardContext };
|
|
@@ -25,7 +25,7 @@ var _progressbar = require("./progressbar");
|
|
|
25
25
|
require("../../assets/styles/wizard.scss");
|
|
26
26
|
var _step = require("./step");
|
|
27
27
|
var _useWizard = require("./useWizard");
|
|
28
|
-
const _excluded = ["children", "controls", "showProgressbar"
|
|
28
|
+
const _excluded = ["children", "controls", "showProgressbar"];
|
|
29
29
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
30
30
|
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); }
|
|
31
31
|
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; }
|
|
@@ -39,9 +39,7 @@ function Wizard(_ref) {
|
|
|
39
39
|
let {
|
|
40
40
|
children,
|
|
41
41
|
controls,
|
|
42
|
-
showProgressbar = true
|
|
43
|
-
customStyleForProgressBar,
|
|
44
|
-
customStyleForBody
|
|
42
|
+
showProgressbar = true
|
|
45
43
|
} = _ref,
|
|
46
44
|
dialogProps = _objectWithoutProperties(_ref, _excluded);
|
|
47
45
|
const {
|
|
@@ -68,11 +66,9 @@ function Wizard(_ref) {
|
|
|
68
66
|
wrapperClassName: "wizard-wrapper",
|
|
69
67
|
contentClassName: "wizard-content"
|
|
70
68
|
}, dialogProps), showProgressbar && /*#__PURE__*/_react.default.createElement(_progressbar.Progressbar, {
|
|
71
|
-
stepsTitle: stepsTitle
|
|
72
|
-
customStyle: customStyleForProgressBar
|
|
69
|
+
stepsTitle: stepsTitle
|
|
73
70
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
-
className: "wizard-body"
|
|
75
|
-
style: customStyleForBody
|
|
71
|
+
className: "wizard-body"
|
|
76
72
|
}, currentStepElement)));
|
|
77
73
|
}
|
|
78
74
|
var _default = exports.default = Wizard;
|
|
@@ -42,7 +42,7 @@ declare const getMaskOptions: ({ isDateField, placeholderChar, min, max, lazy, p
|
|
|
42
42
|
mask?: any;
|
|
43
43
|
hint?: string | string[] | undefined;
|
|
44
44
|
hintPosition?: "below" | "onLabelRight" | undefined;
|
|
45
|
-
themePopover?: "
|
|
45
|
+
themePopover?: "dark" | "light" | undefined;
|
|
46
46
|
popoverAlign?: "left" | "right" | undefined;
|
|
47
47
|
placeholderChar: string;
|
|
48
48
|
min: any;
|
|
@@ -50,7 +50,7 @@ const NumberField = props => {
|
|
|
50
50
|
if (props.onChange) props.onChange(event);
|
|
51
51
|
};
|
|
52
52
|
(0, _react.useEffect)(() => {
|
|
53
|
-
setNumberValue(value
|
|
53
|
+
setNumberValue(value?.toString() ?? '');
|
|
54
54
|
}, [value]);
|
|
55
55
|
return /*#__PURE__*/_react.default.createElement(_InputTextBase.default, _extends({}, props, {
|
|
56
56
|
value: numberValue,
|
|
@@ -42,7 +42,11 @@ var _popup_menu_search = _interopRequireDefault(require("./popup_menu_search"));
|
|
|
42
42
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
43
43
|
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); }
|
|
44
44
|
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; }
|
|
45
|
-
function
|
|
45
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
46
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
47
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
48
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
49
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
46
50
|
const SideNav = props => {
|
|
47
51
|
const {
|
|
48
52
|
customClass,
|
|
@@ -52,7 +56,8 @@ const SideNav = props => {
|
|
|
52
56
|
menuSize = 'medium',
|
|
53
57
|
onExpandMenuClick,
|
|
54
58
|
children,
|
|
55
|
-
enableMenuSearch
|
|
59
|
+
enableMenuSearch,
|
|
60
|
+
menuSearchCustomComponent
|
|
56
61
|
} = props;
|
|
57
62
|
const [isExpanded, setIsExpanded] = (0, _react.useState)(expanded);
|
|
58
63
|
const [menuItemsContent, setMenuItemsContent] = (0, _react.useState)([]);
|
|
@@ -126,31 +131,34 @@ const SideNav = props => {
|
|
|
126
131
|
setIsExpanded(expanded);
|
|
127
132
|
}, [expanded]);
|
|
128
133
|
const returnMenuItems = () => menuItemsContent.filter(item => item.content !== '');
|
|
129
|
-
const getPopupMenuSearch = () =>
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
134
|
+
const getPopupMenuSearch = () => {
|
|
135
|
+
const searchProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
136
|
+
style: getPopupMenuSearchStyle(),
|
|
137
|
+
handlerClose: closeSearchMenuPopup,
|
|
138
|
+
menuItemsContent: menuItemsContent && returnMenuItems()
|
|
139
|
+
});
|
|
140
|
+
return /*#__PURE__*/_react.default.createElement(_NavMenuGroup.default, {
|
|
141
|
+
key: `popup-menusearch-${uuid.v1()}`
|
|
142
|
+
}, /*#__PURE__*/_react.default.createElement(_NavMenuItem.default, {
|
|
143
|
+
childrenIsSubMenu: false,
|
|
144
|
+
customClass: "-customsidenavitem",
|
|
145
|
+
tooltip: "Pesquisar funcionalidades (CTRL+SHIFT+F)",
|
|
146
|
+
tooltipPosition: "right"
|
|
147
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
148
|
+
key: "searchMenuIcon",
|
|
149
|
+
className: "searchmenubutton",
|
|
150
|
+
role: "button",
|
|
151
|
+
tabIndex: -1,
|
|
152
|
+
onKeyDown: () => {},
|
|
153
|
+
onClick: () => {
|
|
154
|
+
openSearchMenu();
|
|
155
|
+
}
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
157
|
+
name: "search",
|
|
158
|
+
customClass: "searchmenuicon",
|
|
159
|
+
size: menuSize === 'small' && 16 || menuSize === 'medium' && 22 || menuSize === 'large' && 32 || 16
|
|
160
|
+
})), openSearchMenuPopup && (menuSearchCustomComponent ? menuSearchCustomComponent(searchProps) : /*#__PURE__*/_react.default.createElement(_popup_menu_search.default, searchProps))));
|
|
161
|
+
};
|
|
154
162
|
const getSideNavContent = () => {
|
|
155
163
|
if (!enableMenuSearch) return children;
|
|
156
164
|
const items = [...children];
|
|
@@ -17,6 +17,7 @@ interface ISideNavProps {
|
|
|
17
17
|
enableMenuSearch?: boolean;
|
|
18
18
|
menuSearchEmptyMessage?: string;
|
|
19
19
|
menuSearchPlaceholder?: string;
|
|
20
|
+
menuSearchCustomComponent?: (props: IPopupMenuSearchProps) => ReactElement;
|
|
20
21
|
}
|
|
21
22
|
interface ISideNavDimensions {
|
|
22
23
|
left: number;
|