@orfium/ictinus 4.80.2 → 4.81.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/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.ts +1 -1
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Menu/Menu.js +31 -28
- package/dist/components/Menu/Menu.style.d.ts +0 -1
- package/dist/components/Menu/Menu.style.js +6 -22
- package/dist/components/TextArea/TextArea.style.js +1 -4
- package/dist/components/utils/DropdownOptions/index.js +1 -1
- package/dist/hooks/useBreakpoints.d.ts +2 -2
- package/dist/hooks/useBreakpoints.js +28 -20
- package/package.json +2 -2
|
@@ -6,5 +6,5 @@ export declare type Props = ButtonBaseProps & TestProps & onClickProp;
|
|
|
6
6
|
declare type onClickProp = {
|
|
7
7
|
onClick: ClickHandler;
|
|
8
8
|
};
|
|
9
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonBaseProps & TestProps & onClickProp & Partial<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "
|
|
9
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonBaseProps & TestProps & onClickProp & Partial<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "size" | "css" | "onBlur" | "onClick">> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
10
|
export default Button;
|
|
@@ -38,5 +38,5 @@ export declare type Props = {
|
|
|
38
38
|
container?: CSSObject;
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
|
-
declare const ButtonBase: React.ForwardRefExoticComponent<Partial<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "
|
|
41
|
+
declare const ButtonBase: React.ForwardRefExoticComponent<Partial<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "size" | "css" | "onBlur" | "onClick">> & Props & TestProps & EventButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
42
42
|
export default ButtonBase;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const Chip: React.ForwardRefExoticComponent<import("./Chip.types").Props & import("../../utils/types").TestProps & Partial<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "
|
|
2
|
+
declare const Chip: React.ForwardRefExoticComponent<import("./Chip.types").Props & import("../../utils/types").TestProps & Partial<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "size" | "css" | "onBlur" | "onClick">> & React.RefAttributes<HTMLButtonElement | HTMLDivElement>>;
|
|
3
3
|
export default Chip;
|
|
@@ -12,8 +12,8 @@ var _utils = require("../Button/utils");
|
|
|
12
12
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
13
13
|
var _ClickAwayListener = _interopRequireDefault(require("../utils/ClickAwayListener"));
|
|
14
14
|
var _DropdownOptions = require("../utils/DropdownOptions");
|
|
15
|
-
var _Menu = require("./Menu.style");
|
|
16
15
|
var _List = _interopRequireDefault(require("../List"));
|
|
16
|
+
var _PositionInScreen = _interopRequireDefault(require("../utils/PositionInScreen"));
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
18
|
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); }
|
|
19
19
|
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; }
|
|
@@ -54,33 +54,36 @@ var Menu = function Menu(props) {
|
|
|
54
54
|
return setOpen(false);
|
|
55
55
|
}
|
|
56
56
|
}, (0, _react2.jsx)("div", {
|
|
57
|
-
css: (0, _Menu.wrapperStyle)(),
|
|
58
57
|
"data-testid": dataTestId
|
|
59
|
-
}, (0, _react2.jsx)(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
58
|
+
}, (0, _react2.jsx)(_PositionInScreen["default"], {
|
|
59
|
+
visible: open,
|
|
60
|
+
offsetY: 8,
|
|
61
|
+
parent: (0, _react2.jsx)(_Button["default"], {
|
|
62
|
+
size: size,
|
|
63
|
+
onClick: function onClick() {
|
|
64
|
+
return setOpen(!open);
|
|
65
|
+
},
|
|
66
|
+
type: buttonType,
|
|
67
|
+
color: color,
|
|
68
|
+
disabled: disabled,
|
|
69
|
+
filled: filled,
|
|
70
|
+
iconRight: rightIconName ? (0, _react2.jsx)(_Icon["default"], {
|
|
71
|
+
name: rightIconName,
|
|
72
|
+
color: iconColor,
|
|
73
|
+
size: iconSize
|
|
74
|
+
}) : null,
|
|
75
|
+
iconLeft: !(0, _isEmpty["default"])(avatar) ? (0, _react2.jsx)(_Avatar["default"], {
|
|
76
|
+
size: 'sm',
|
|
77
|
+
src: avatar == null ? void 0 : avatar.src,
|
|
78
|
+
color: avatar == null ? void 0 : avatar.color,
|
|
79
|
+
iconName: 'user'
|
|
80
|
+
}, avatar == null ? void 0 : avatar.letter) : leftIconName ? (0, _react2.jsx)(_Icon["default"], {
|
|
81
|
+
name: leftIconName,
|
|
82
|
+
color: iconColor,
|
|
83
|
+
size: iconSize
|
|
84
|
+
}) : null
|
|
85
|
+
}, (0, _react2.jsx)("span", null, buttonText))
|
|
86
|
+
}, (0, _react2.jsx)("div", {
|
|
84
87
|
css: (0, _DropdownOptions.optionsStyle)({
|
|
85
88
|
menuPosition: menuPosition
|
|
86
89
|
})(theme)
|
|
@@ -91,6 +94,6 @@ var Menu = function Menu(props) {
|
|
|
91
94
|
setOpen(false);
|
|
92
95
|
onSelect(option);
|
|
93
96
|
}
|
|
94
|
-
}))));
|
|
97
|
+
})))));
|
|
95
98
|
};
|
|
96
99
|
var _default = exports["default"] = Menu;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Theme } from '../../theme';
|
|
2
2
|
import { RequiredProperties } from '../../utils/common';
|
|
3
3
|
import { Props } from '../Button/Button';
|
|
4
|
-
export declare const wrapperStyle: () => () => import("@emotion/react").SerializedStyles;
|
|
5
4
|
export declare const buttonSpanStyle: ({ size, iconLeft, iconRight, hasChildren, }: RequiredProperties<import("../ButtonBase/ButtonBase").Props & import("../../utils/types").TestProps & {
|
|
6
5
|
onClick: import("../../hooks/useLoading").ClickHandler;
|
|
7
6
|
} & {
|
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} : {
|
|
11
|
-
name: "1yhb7nc-wrapperStyle",
|
|
12
|
-
styles: "position:relative;display:inline-block;label:wrapperStyle;",
|
|
13
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL01lbnUvTWVudS5zdH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wgaWNvblJpZ2h0ID8gKHNpemUgPT09ICdzbScgPyB0aGVtZS5zcGFjaW5nLnNtIDogdGhlbWUuc3BhY2luZy5tZCkgOiAwLFxuICAgIG1hcmdpblJpZ2h0OiBoYXNDaGlsZHJlbiA/IHRoZW1lLnNwYWNpbmcuc20gOiAwLFxuICB9LFxufSk7XG4iXX0= */",
|
|
14
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
15
|
-
};
|
|
16
|
-
var wrapperStyle = exports.wrapperStyle = function wrapperStyle() {
|
|
17
|
-
return function () {
|
|
18
|
-
return _ref;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
var buttonSpanStyle = exports.buttonSpanStyle = function buttonSpanStyle(_ref2) {
|
|
22
|
-
var size = _ref2.size,
|
|
23
|
-
iconLeft = _ref2.iconLeft,
|
|
24
|
-
iconRight = _ref2.iconRight,
|
|
25
|
-
hasChildren = _ref2.hasChildren;
|
|
4
|
+
exports.buttonSpanStyle = void 0;
|
|
5
|
+
var buttonSpanStyle = exports.buttonSpanStyle = function buttonSpanStyle(_ref) {
|
|
6
|
+
var size = _ref.size,
|
|
7
|
+
iconLeft = _ref.iconLeft,
|
|
8
|
+
iconRight = _ref.iconRight,
|
|
9
|
+
hasChildren = _ref.hasChildren;
|
|
26
10
|
return function (theme) {
|
|
27
11
|
return {
|
|
28
12
|
display: iconLeft || iconRight ? 'flex' : 'block',
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.sxProp = void 0;
|
|
5
|
-
var _utils = require("../../theme/utils");
|
|
6
|
-
var _config = require("../TextInputBase/config");
|
|
7
5
|
var sxProp = exports.sxProp = function sxProp(resizeEnabled, theme) {
|
|
8
6
|
return {
|
|
9
7
|
wrapper: {
|
|
@@ -14,8 +12,7 @@ var sxProp = exports.sxProp = function sxProp(resizeEnabled, theme) {
|
|
|
14
12
|
padding: theme.spacing.sm
|
|
15
13
|
},
|
|
16
14
|
input: {
|
|
17
|
-
|
|
18
|
-
minWidth: (0, _utils.rem)(_config.MIN_WIDTH),
|
|
15
|
+
maxWidth: '100%',
|
|
19
16
|
resize: !resizeEnabled ? 'none' : 'both'
|
|
20
17
|
}
|
|
21
18
|
};
|
|
@@ -10,7 +10,7 @@ var optionsStyle = exports.optionsStyle = function optionsStyle(_ref) {
|
|
|
10
10
|
return (
|
|
11
11
|
/*#__PURE__*/
|
|
12
12
|
/*#__PURE__*/
|
|
13
|
-
(0, _react.css)("max-height:", (0, _utils.rem)(253), ";overflow-y:auto;position:absolute;
|
|
13
|
+
(0, _react.css)("max-height:", (0, _utils.rem)(253), ";overflow-y:auto;position:absolute;left:", menuPosition === 'left' ? 0 : 'initial', ";right:0;min-width:", (0, _utils.rem)(150), ";max-width:", (0, _utils.rem)(620), ";width:fit-content;height:auto;background-color:", theme.palette.white, ";box-shadow:", theme.elevation['02'], ";border-radius:", (0, _utils.rem)(4), ";z-index:1;" + (process.env.NODE_ENV === "production" ? "" : ";label:optionsStyle;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL0Ryb3Bkb3duT3B0aW9ucy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBV29GIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL0Ryb3Bkb3duT3B0aW9ucy9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW0gfSBmcm9tICd0aGVtZS91dGlscyc7XG5cbmltcG9ydCB7IFRoZW1lIH0gZnJvbSAnLi4vLi4vLi4vdGhlbWUnO1xuXG5leHBvcnQgdHlwZSBNZW51UG9zaXRpb25BbGxvd2VkID0gJ2xlZnQnIHwgJ3JpZ2h0JztcblxuZXhwb3J0IHR5cGUgTWVudU9wdGlvbnMgPSB7XG4gIG1lbnVQb3NpdGlvbj86IE1lbnVQb3NpdGlvbkFsbG93ZWQ7XG59O1xuXG5leHBvcnQgY29uc3Qgb3B0aW9uc1N0eWxlID0gKHsgbWVudVBvc2l0aW9uIH06IE1lbnVPcHRpb25zKSA9PiAodGhlbWU6IFRoZW1lKSA9PiBjc3NgXG4gIG1heC1oZWlnaHQ6ICR7cmVtKDI1Myl9O1xuICBvdmVyZmxvdy15OiBhdXRvO1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIGxlZnQ6ICR7bWVudVBvc2l0aW9uID09PSAnbGVmdCcgPyAwIDogJ2luaXRpYWwnfTtcbiAgcmlnaHQ6IDA7XG4gIG1pbi13aWR0aDogJHtyZW0oMTUwKX07XG4gIG1heC13aWR0aDogJHtyZW0oNjIwKX07XG4gIHdpZHRoOiBmaXQtY29udGVudDtcbiAgaGVpZ2h0OiBhdXRvO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAke3RoZW1lLnBhbGV0dGUud2hpdGV9O1xuICBib3gtc2hhZG93OiAke3RoZW1lLmVsZXZhdGlvblsnMDInXX07XG4gIGJvcmRlci1yYWRpdXM6ICR7cmVtKDQpfTtcbiAgei1pbmRleDogMTtcbmA7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:optionsStyle;")
|
|
14
14
|
);
|
|
15
15
|
};
|
|
16
16
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const queriesKeys: readonly ["des1920", "des1440", "des1366", "des1200", "tab1024", "tab970", "tab750", "mob480", "mob320"];
|
|
2
|
-
export declare const queriesSizes: Record<typeof queriesKeys[number],
|
|
3
|
-
declare const useBreakpoints: () =>
|
|
2
|
+
export declare const queriesSizes: Record<(typeof queriesKeys)[number], number>;
|
|
3
|
+
export declare const useBreakpoints: () => Record<"des1920" | "des1440" | "des1366" | "des1200" | "tab1024" | "tab970" | "tab750" | "mob480" | "mob320", boolean>;
|
|
4
4
|
export default useBreakpoints;
|
|
@@ -1,29 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.queriesSizes = exports.queriesKeys = exports["default"] = void 0;
|
|
5
|
-
var
|
|
6
|
-
var _reactMedia = require("react-media");
|
|
7
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
4
|
+
exports.useBreakpoints = exports.queriesSizes = exports.queriesKeys = exports["default"] = void 0;
|
|
5
|
+
var _reactResponsive = require("react-responsive");
|
|
8
6
|
var queriesKeys = exports.queriesKeys = ['des1920', 'des1440', 'des1366', 'des1200', 'tab1024', 'tab970', 'tab750', 'mob480', 'mob320'];
|
|
9
7
|
var queriesSizes = exports.queriesSizes = {
|
|
10
|
-
des1920:
|
|
11
|
-
des1440:
|
|
12
|
-
des1366:
|
|
13
|
-
des1200:
|
|
14
|
-
tab1024:
|
|
15
|
-
tab970:
|
|
16
|
-
tab750:
|
|
17
|
-
mob480:
|
|
18
|
-
mob320:
|
|
8
|
+
des1920: 1920,
|
|
9
|
+
des1440: 1440,
|
|
10
|
+
des1366: 1366,
|
|
11
|
+
des1200: 1200,
|
|
12
|
+
tab1024: 1024,
|
|
13
|
+
tab970: 970,
|
|
14
|
+
tab750: 750,
|
|
15
|
+
mob480: 480,
|
|
16
|
+
mob320: 320
|
|
19
17
|
};
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, {});
|
|
24
|
-
var useBreakpoints = function useBreakpoints() {
|
|
25
|
-
return (0, _reactMedia.useMedia)({
|
|
26
|
-
queries: queries
|
|
18
|
+
var useIctinusMediaQuery = function useIctinusMediaQuery(key) {
|
|
19
|
+
return (0, _reactResponsive.useMediaQuery)({
|
|
20
|
+
minWidth: queriesSizes[key]
|
|
27
21
|
});
|
|
28
22
|
};
|
|
23
|
+
var useBreakpoints = exports.useBreakpoints = function useBreakpoints() {
|
|
24
|
+
var breakpoints = {
|
|
25
|
+
des1920: useIctinusMediaQuery('des1920'),
|
|
26
|
+
des1440: useIctinusMediaQuery('des1440'),
|
|
27
|
+
des1366: useIctinusMediaQuery('des1366'),
|
|
28
|
+
des1200: useIctinusMediaQuery('des1200'),
|
|
29
|
+
tab1024: useIctinusMediaQuery('tab1024'),
|
|
30
|
+
tab970: useIctinusMediaQuery('tab970'),
|
|
31
|
+
tab750: useIctinusMediaQuery('tab750'),
|
|
32
|
+
mob480: useIctinusMediaQuery('mob480'),
|
|
33
|
+
mob320: useIctinusMediaQuery('mob320')
|
|
34
|
+
};
|
|
35
|
+
return breakpoints;
|
|
36
|
+
};
|
|
29
37
|
var _default = exports["default"] = useBreakpoints;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orfium/ictinus",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.81.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
"polished": "^3.4.4",
|
|
107
107
|
"react-fast-compare": "^3.2.0",
|
|
108
108
|
"react-highlight-words": "^0.20.0",
|
|
109
|
-
"react-media": "^2.0.0-rc.1",
|
|
110
109
|
"react-range": "^1.8.12",
|
|
110
|
+
"react-responsive": "^9.0.2",
|
|
111
111
|
"react-switch": "^6.0.0",
|
|
112
112
|
"react-window": "^1.8.6",
|
|
113
113
|
"recharts": "^2.8.0",
|