@orfium/ictinus 4.80.1 → 4.80.3

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.
@@ -62,6 +62,10 @@ var Filter = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
62
62
  var _React$useState3 = _react["default"].useState((_selectedItem$label = selectedItem == null ? void 0 : selectedItem.label) != null ? _selectedItem$label : defaultValue.label),
63
63
  filterLabel = _React$useState3[0],
64
64
  setFilterLabel = _React$useState3[1];
65
+ _react["default"].useEffect(function () {
66
+ var _selectedItem$label2;
67
+ setFilterLabel((_selectedItem$label2 = selectedItem == null ? void 0 : selectedItem.label) != null ? _selectedItem$label2 : defaultValue.label);
68
+ }, [defaultValue.label, selectedItem == null ? void 0 : selectedItem.label]);
65
69
  var hasSelectedValue = Boolean(selectedItem == null ? void 0 : selectedItem.value) && (selectedItem == null ? void 0 : selectedItem.value) !== defaultValue.value;
66
70
  var iconName = isOpen ? 'triangleUp' : 'triangleDown';
67
71
  var _useMultiFilterUtils = (0, _useMultiFilterUtils2["default"])({
@@ -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)(_Button["default"], {
60
- size: size,
61
- onClick: function onClick() {
62
- return setOpen(!open);
63
- },
64
- type: buttonType,
65
- color: color,
66
- disabled: disabled,
67
- filled: filled,
68
- iconRight: rightIconName ? (0, _react2.jsx)(_Icon["default"], {
69
- name: rightIconName,
70
- color: iconColor,
71
- size: iconSize
72
- }) : null,
73
- iconLeft: !(0, _isEmpty["default"])(avatar) ? (0, _react2.jsx)(_Avatar["default"], {
74
- size: 'sm',
75
- src: avatar == null ? void 0 : avatar.src,
76
- color: avatar == null ? void 0 : avatar.color,
77
- iconName: 'user'
78
- }, avatar == null ? void 0 : avatar.letter) : leftIconName ? (0, _react2.jsx)(_Icon["default"], {
79
- name: leftIconName,
80
- color: iconColor,
81
- size: iconSize
82
- }) : null
83
- }, (0, _react2.jsx)("span", null, buttonText)), open && (0, _react2.jsx)("div", {
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.wrapperStyle = exports.buttonSpanStyle = void 0;
5
- var _react = require("@emotion/react");
6
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
7
- var _ref = process.env.NODE_ENV === "production" ? {
8
- name: "1nrevy2",
9
- styles: "position:relative;display:inline-block"
10
- } : {
11
- name: "1yhb7nc-wrapperStyle",
12
- styles: "position:relative;display:inline-block;label:wrapperStyle;",
13
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL01lbnUvTWVudS5zdHlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNMkMiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvTWVudS9NZW51LnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQgeyBUaGVtZSB9IGZyb20gJy4uLy4uL3RoZW1lJztcbmltcG9ydCB7IFJlcXVpcmVkUHJvcGVydGllcyB9IGZyb20gJy4uLy4uL3V0aWxzL2NvbW1vbic7XG5pbXBvcnQgeyBQcm9wcyB9IGZyb20gJy4uL0J1dHRvbi9CdXR0b24nO1xuXG5leHBvcnQgY29uc3Qgd3JhcHBlclN0eWxlID0gKCkgPT4gKCkgPT4gY3NzYFxuICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBidXR0b25TcGFuU3R5bGUgPSAoe1xuICBzaXplLFxuICBpY29uTGVmdCxcbiAgaWNvblJpZ2h0LFxuICBoYXNDaGlsZHJlbixcbn06IFJlcXVpcmVkUHJvcGVydGllczxQcm9wcyAmIHsgaGFzQ2hpbGRyZW46IGJvb2xlYW4gfT4pID0+ICh0aGVtZTogVGhlbWUpID0+ICh7XG4gIGRpc3BsYXk6IGljb25MZWZ0IHx8IGljb25SaWdodCA/ICdmbGV4JyA6ICdibG9jaycsXG4gIGZsZXhEaXJlY3Rpb246IGljb25MZWZ0IHx8IGljb25SaWdodCA/ICdyb3cnIDogJ2NvbHVtbicsXG4gIGFsaWduSXRlbXM6IGljb25MZWZ0IHx8IGljb25SaWdodCA/ICgnY2VudGVyJyBhcyBjb25zdCkgOiAoJ2ZsZXgtc3RhcnQnIGFzIGNvbnN0KSxcbiAgJz4gOmZpcnN0LW9mLXR5cGUnOiB7XG4gICAgbWFyZ2luTGVmdDogaWNvbkxlZnQgfHwgaWNvblJpZ2h0ID8gKHNpemUgPT09ICdzbScgPyB0aGVtZS5zcGFjaW5nLnNtIDogdGhlbWUuc3BhY2luZy5tZCkgOiAwLFxuICAgIG1hcmdpblJpZ2h0OiBoYXNDaGlsZHJlbiA/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
- width: (0, _utils.rem)(_config.MIN_WIDTH),
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;top:", (0, _utils.rem)(48), ";left:", menuPosition === 'left' ? 0 : 'initial', ";right:0;min-width:", (0, _utils.rem)(150), ";width:100%;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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL0Ryb3Bkb3duT3B0aW9ucy9pbmRleC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBV29GIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL0Ryb3Bkb3duT3B0aW9ucy9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW0gfSBmcm9tICd0aGVtZS91dGlscyc7XG5cbmltcG9ydCB7IFRoZW1lIH0gZnJvbSAnLi4vLi4vLi4vdGhlbWUnO1xuXG5leHBvcnQgdHlwZSBNZW51UG9zaXRpb25BbGxvd2VkID0gJ2xlZnQnIHwgJ3JpZ2h0JztcblxuZXhwb3J0IHR5cGUgTWVudU9wdGlvbnMgPSB7XG4gIG1lbnVQb3NpdGlvbj86IE1lbnVQb3NpdGlvbkFsbG93ZWQ7XG59O1xuXG5leHBvcnQgY29uc3Qgb3B0aW9uc1N0eWxlID0gKHsgbWVudVBvc2l0aW9uIH06IE1lbnVPcHRpb25zKSA9PiAodGhlbWU6IFRoZW1lKSA9PiBjc3NgXG4gIG1heC1oZWlnaHQ6ICR7cmVtKDI1Myl9O1xuICBvdmVyZmxvdy15OiBhdXRvO1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHRvcDogJHtyZW0oNDgpfTtcbiAgbGVmdDogJHttZW51UG9zaXRpb24gPT09ICdsZWZ0JyA/IDAgOiAnaW5pdGlhbCd9O1xuICByaWdodDogMDtcbiAgbWluLXdpZHRoOiAke3JlbSgxNTApfTtcbiAgd2lkdGg6IDEwMCU7XG4gIGhlaWdodDogYXV0bztcbiAgYmFja2dyb3VuZC1jb2xvcjogJHt0aGVtZS5wYWxldHRlLndoaXRlfTtcbiAgYm94LXNoYWRvdzogJHt0aGVtZS5lbGV2YXRpb25bJzAyJ119O1xuICBib3JkZXItcmFkaXVzOiAke3JlbSg0KX07XG4gIHotaW5kZXg6IDE7XG5gO1xuIl19 */", process.env.NODE_ENV === "production" ? "" : ";label:optionsStyle;")
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL0Ryb3Bkb3duT3B0aW9ucy9pbmRleC50c3giXSwibmFtZXMi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bmA7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:optionsStyle;")
14
14
  );
15
15
  };
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orfium/ictinus",
3
- "version": "4.80.1",
3
+ "version": "4.80.3",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "MIT",