@orfium/ictinus 4.83.0 → 4.84.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/README.md CHANGED
@@ -4,6 +4,7 @@ An internal UI kit library that is opinionated. Primary focus is to solve UI dup
4
4
 
5
5
  <hr />
6
6
 
7
+ [![Static Badge](https://img.shields.io/badge/documentation-8A2BE2?)](https://designlab-v4.orfium.com/)
7
8
  ![npm](https://img.shields.io/npm/v/@orfium/ictinus)
8
9
  [![pan](https://github.com/Orfium/orfium-ictinus/workflows/CI/badge.svg)](https://github.com/Orfium/orfium-ictinus/actions)
9
10
  ![min size](https://img.shields.io/bundlephobia/min/@orfium/ictinus)
@@ -5,12 +5,12 @@ exports["default"] = void 0;
5
5
  var _lodash = require("lodash");
6
6
  var _react = _interopRequireWildcard(require("react"));
7
7
  var _helpers = require("../../utils/helpers");
8
- var _ClickAwayListener = _interopRequireDefault(require("../utils/ClickAwayListener"));
9
8
  var _FilterBase = _interopRequireDefault(require("./components/FilterBase"));
10
9
  var _MultiFilter = _interopRequireDefault(require("./components/MultiFilter/MultiFilter"));
11
10
  var _SingleFilter = _interopRequireDefault(require("./components/SingleFilter/SingleFilter"));
12
11
  var _useMultiFilterUtils2 = _interopRequireDefault(require("./hooks/useMultiFilterUtils"));
13
12
  var _utils = require("./utils");
13
+ var _ClickAwayListener = _interopRequireDefault(require("../utils/ClickAwayListener"));
14
14
  var _handleSearch = _interopRequireDefault(require("../utils/handleSearch"));
15
15
  var _PositionInScreen = _interopRequireDefault(require("../utils/PositionInScreen/PositionInScreen"));
16
16
  var _react2 = require("@emotion/react");
@@ -186,7 +186,7 @@ var Filter = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
186
186
  styleType: styleType,
187
187
  multi: multi
188
188
  })
189
- }, isOpen && getFilter()));
189
+ }, getFilter()));
190
190
  });
191
191
  Filter.displayName = 'Filter';
192
192
  var _default = exports["default"] = Filter;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Row, TableType } from './Table';
3
+ import { ExtendedColumn } from 'components/Table/types';
3
4
  export declare type TableRowContextProps<T extends {
4
5
  [key: string]: unknown;
5
6
  }> = {
@@ -9,7 +10,7 @@ export declare type TableRowContextProps<T extends {
9
10
  onSelectionChangeExist: boolean;
10
11
  isRowSelected: boolean;
11
12
  columnCount: number;
12
- columns: string[];
13
+ columns: (string | ExtendedColumn)[];
13
14
  fixedHeader: boolean;
14
15
  tChange: () => void;
15
16
  type: TableType;
@@ -3,6 +3,9 @@
3
3
  exports.__esModule = true;
4
4
  exports["default"] = void 0;
5
5
  var React = _interopRequireWildcard(require("react"));
6
+ var _ContentCell = _interopRequireDefault(require("./components/ContentCell"));
7
+ var _ExpandedButtonCell = _interopRequireDefault(require("./components/ExpandedButtonCell"));
8
+ var _RenderRowOrNestedRow = require("./RenderRowOrNestedRow.style");
6
9
  var _useToggle2 = _interopRequireDefault(require("../../../../hooks/useToggle"));
7
10
  var _helpers = require("../../../../utils/helpers");
8
11
  var _CheckBox = _interopRequireDefault(require("../../../CheckBox"));
@@ -10,9 +13,6 @@ var _Table = require("../../Table.style");
10
13
  var _TableRowContext = require("../../TableRowContext");
11
14
  var _TableCell = _interopRequireDefault(require("../TableCell"));
12
15
  var _TableRow = _interopRequireDefault(require("../TableRow"));
13
- var _ContentCell = _interopRequireDefault(require("./components/ContentCell"));
14
- var _ExpandedButtonCell = _interopRequireDefault(require("./components/ExpandedButtonCell"));
15
- var _RenderRowOrNestedRow = require("./RenderRowOrNestedRow.style");
16
16
  var _react2 = require("@emotion/react");
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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); }
@@ -77,7 +77,7 @@ var RenderRowWithCells = /*#__PURE__*/React.memo(function (_ref) {
77
77
  cellCounter: index,
78
78
  columnWidth: columnsWithWidth[index],
79
79
  columns: columns,
80
- tooltipContent: hasTruncatedTooltip ? (0, _helpers.isComponentFunctionType)(content) ? tooltipContent : tooltipContent != null ? tooltipContent : content.toString() : undefined,
80
+ tooltipContent: hasTruncatedTooltip ? tooltipContent : null,
81
81
  padded: padded,
82
82
  colSpan: colSpan,
83
83
  content: content,
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import { ContentComponent, TableType } from '../../../../Table';
3
+ import { ExtendedColumn } from 'components/Table/types';
3
4
  declare type Props = {
4
- columns: string[];
5
+ columns: (string | ExtendedColumn)[];
5
6
  padded: boolean;
6
- tooltipContent?: string;
7
+ tooltipContent: string | undefined | null;
7
8
  columnWidth?: number;
8
9
  content: number | string | ContentComponent<any>;
9
10
  colSpan?: number;
@@ -2,14 +2,17 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports["default"] = void 0;
5
- var _react = _interopRequireDefault(require("react"));
5
+ var _react = _interopRequireWildcard(require("react"));
6
6
  var _helpers = require("../../../../../../utils/helpers");
7
+ var _ContentCell = require("./ContentCell.style");
7
8
  var _TruncatedContent = _interopRequireDefault(require("../../../../../TruncatedContent"));
8
9
  var _TableCell = _interopRequireDefault(require("../../../TableCell"));
9
- var _ContentCell = require("./ContentCell.style");
10
10
  var _react2 = require("@emotion/react");
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
+ 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); }
13
+ 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; }
12
14
  var ContentCell = function ContentCell(_ref) {
15
+ var _ref2;
13
16
  var columns = _ref.columns,
14
17
  padded = _ref.padded,
15
18
  columnWidth = _ref.columnWidth,
@@ -24,6 +27,10 @@ var ContentCell = function ContentCell(_ref) {
24
27
  rowIndex = _ref.rowIndex,
25
28
  index = _ref.index;
26
29
  var isNumeral = !Number.isNaN(Number(content));
30
+ var _useState = (0, _react.useState)(null),
31
+ contentElementRef = _useState[0],
32
+ setContentElementRef = _useState[1];
33
+ var col = columns[cellCounter];
27
34
  return (0, _react2.jsx)(_TableCell["default"], {
28
35
  textAlign: align ? align : isNumeral ? 'right' : 'left',
29
36
  colSpan: colSpan,
@@ -35,14 +42,17 @@ var ContentCell = function ContentCell(_ref) {
35
42
  index: index
36
43
  }, rowType === 'nested-header' && (0, _react2.jsx)("div", {
37
44
  css: (0, _ContentCell.nestedHeaderStyle)()
38
- }, columns[cellCounter]), (0, _react2.jsx)(_TruncatedContent["default"], {
45
+ }, typeof col === 'string' ? col : col.content.label), (0, _react2.jsx)(_TruncatedContent["default"], {
39
46
  placement: 'bottom',
40
- tooltipContent: tooltipContent
47
+ tooltipContent: tooltipContent === null ? undefined : (_ref2 = tooltipContent != null ? tooltipContent : contentElementRef == null ? void 0 : contentElementRef.textContent) != null ? _ref2 : ''
48
+ }, (0, _react2.jsx)("span", {
49
+ ref: function ref(el) {
50
+ setContentElementRef(el);
51
+ },
52
+ "data-column": col
41
53
  }, (0, _helpers.isComponentFunctionType)(content) ? content({
42
54
  content: content,
43
55
  colSpan: colSpan
44
- }) : (0, _react2.jsx)("span", {
45
- "data-column": columns[cellCounter]
46
- }, content)));
56
+ }) : content)));
47
57
  };
48
58
  var _default = exports["default"] = /*#__PURE__*/_react["default"].memo(ContentCell);
@@ -1,4 +1,5 @@
1
1
  import { Row, Selection, TableType } from '../../Table';
2
+ import { ExtendedColumn } from 'components/Table/types';
2
3
  declare type TableRowWrapperProps<T> = {
3
4
  row: Row<T>;
4
5
  isRowSelected: boolean;
@@ -7,7 +8,7 @@ declare type TableRowWrapperProps<T> = {
7
8
  padded: boolean;
8
9
  onSelectionChangeExist: boolean;
9
10
  columnCount: number;
10
- columns: string[];
11
+ columns: (string | ExtendedColumn)[];
11
12
  fixedHeader: boolean;
12
13
  type: TableType;
13
14
  expanded: boolean;
@@ -20,8 +20,12 @@ var PositionInScreen = function PositionInScreen(_ref) {
20
20
  offsetY = _ref$offsetY === void 0 ? 0 : _ref$offsetY,
21
21
  sx = _ref.sx,
22
22
  children = _ref.children;
23
- var wrapperRef = (0, _react.useRef)(null);
24
- var itemRef = (0, _react.useRef)(null);
23
+ var _useState = (0, _react.useState)(null),
24
+ wrapperRef = _useState[0],
25
+ setWrapperRef = _useState[1];
26
+ var _useState2 = (0, _react.useState)(null),
27
+ itemRef = _useState2[0],
28
+ setItemRef = _useState2[1];
25
29
  var _useWrapperWidth = (0, _hooks.useWrapperWidth)(hasWrapperWidth, wrapperRef),
26
30
  wrapperWidth = _useWrapperWidth[0];
27
31
  var _usePositionInScreen = (0, _hooks.usePositionInScreen)(wrapperRef, itemRef, offsetX, offsetY, visible),
@@ -29,12 +33,16 @@ var PositionInScreen = function PositionInScreen(_ref) {
29
33
  y = _usePositionInScreen.y;
30
34
  var showTooltip = visible && x !== -1 && y !== -1;
31
35
  return (0, _react2.jsx)("div", {
32
- css: (0, _PositionInScreen.container)(withOverflow, showTooltip, sx),
33
- ref: wrapperRef
34
- }, parent, showTooltip && (0, _react2.jsx)("div", {
35
- css: (0, _PositionInScreen.itemContainer)(x, y, wrapperWidth, sx),
36
- id: 'unique-tooltip-id',
37
- ref: itemRef
36
+ css: (0, _PositionInScreen.container)(withOverflow, sx),
37
+ ref: function ref(_ref3) {
38
+ setWrapperRef(_ref3);
39
+ }
40
+ }, parent, (0, _react2.jsx)("div", {
41
+ css: (0, _PositionInScreen.itemContainer)(x, y, showTooltip, wrapperWidth, sx),
42
+ className: 'unique-tooltip-id',
43
+ ref: function ref(_ref2) {
44
+ setItemRef(_ref2);
45
+ }
38
46
  }, children));
39
47
  };
40
48
  var _default = exports["default"] = PositionInScreen;
@@ -1,10 +1,10 @@
1
1
  import { SerializedStyles } from '@emotion/react';
2
2
  import { CSSObject } from '@emotion/serialize';
3
- export declare const container: (withOverflow?: boolean | undefined, visible?: boolean | undefined, sx?: {
3
+ export declare const container: (withOverflow?: boolean | undefined, sx?: {
4
4
  container?: CSSObject | undefined;
5
5
  itemContainer?: CSSObject | undefined;
6
6
  } | undefined) => () => SerializedStyles;
7
- export declare const itemContainer: (clientX: number, clientY: number, width?: number | undefined, sx?: {
7
+ export declare const itemContainer: (clientX: number, clientY: number, visible: boolean, width?: number | undefined, sx?: {
8
8
  container?: CSSObject | undefined;
9
9
  itemContainer?: CSSObject | undefined;
10
10
  } | undefined) => () => SerializedStyles;
@@ -5,7 +5,7 @@ exports.itemContainer = exports.container = void 0;
5
5
  var _react = require("@emotion/react");
6
6
  var _polished = require("polished");
7
7
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
8
- var container = exports.container = function container(withOverflow, visible, sx) {
8
+ var container = exports.container = function container(withOverflow, sx) {
9
9
  return function () {
10
10
  return (
11
11
  /*#__PURE__*/
@@ -15,28 +15,27 @@ var container = exports.container = function container(withOverflow, visible, sx
15
15
  textOverflow: withOverflow ? 'ellipsis' : 'inherit',
16
16
  width: '100%',
17
17
  height: 'inherit',
18
- position: 'relative',
19
- '#unique-tooltip-id': {
20
- display: visible ? 'block !important' : 'none !important'
21
- }
22
- }, sx == null ? void 0 : sx.container), process.env.NODE_ENV === "production" ? "" : ";label:container;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL1Bvc2l0aW9uSW5TY3JlZW4vUG9zaXRpb25JblNjcmVlbi5zdHlsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBV0kiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvdXRpbHMvUG9zaXRpb25JblNjcmVlbi9Qb3NpdGlvbkluU2NyZWVuLnN0eWxlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcywgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IENTU09iamVjdCB9IGZyb20gJ0BlbW90aW9uL3NlcmlhbGl6ZSc7XG5pbXBvcnQgeyByZW0gfSBmcm9tICdwb2xpc2hlZCc7XG5cbmV4cG9ydCBjb25zdCBjb250YWluZXIgPVxuICAoXG4gICAgd2l0aE92ZXJmbG93PzogYm9vbGVhbixcbiAgICB2aXNpYmxlPzogYm9vbGVhbixcbiAgICBzeD86IHsgY29udGFpbmVyPzogQ1NTT2JqZWN0OyBpdGVtQ29udGFpbmVyPzogQ1NTT2JqZWN0IH1cbiAgKSA9PlxuICAoKTogU2VyaWFsaXplZFN0eWxlcyA9PlxuICAgIGNzcyh7XG4gICAgICBvdmVyZmxvdzogd2l0aE92ZXJmbG93ID8gJ2hpZGRlbicgOiAnaW5oZXJpdCcsXG4gICAgICB0ZXh0T3ZlcmZsb3c6IHdpdGhPdmVyZmxvdyA/ICdlbGxpcHNpcycgOiAnaW5oZXJpdCcsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgICAgaGVpZ2h0OiAnaW5oZXJpdCcsXG4gICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcblxuICAgICAgJyN1bmlxdWUtdG9vbHRpcC1pZCc6IHtcbiAgICAgICAgZGlzcGxheTogdmlzaWJsZSA/ICdibG9jayAhaW1wb3J0YW50JyA6ICdub25lICFpbXBvcnRhbnQnLFxuICAgICAgfSxcbiAgICAgIC4uLnN4Py5jb250YWluZXIsXG4gICAgfSk7XG5cbmV4cG9ydCBjb25zdCBpdGVtQ29udGFpbmVyID1cbiAgKFxuICAgIGNsaWVudFg6IG51bWJlcixcbiAgICBjbGllbnRZOiBudW1iZXIsXG4gICAgd2lkdGg/OiBudW1iZXIsXG4gICAgc3g/OiB7IGNvbnRhaW5lcj86IENTU09iamVjdDsgaXRlbUNvbnRhaW5lcj86IENTU09iamVjdCB9XG4gICkgPT5cbiAgKCk6IFNlcmlhbGl6ZWRTdHlsZXMgPT5cbiAgICBjc3Moe1xuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBvcGFjaXR5OiAnMSAhaW1wb3J0YW50JyxcbiAgICAgIHRvcDogcmVtKGNsaWVudFkpLFxuICAgICAgbGVmdDogcmVtKGNsaWVudFgpLFxuICAgICAgekluZGV4OiA5OTk5OTk5OTksXG4gICAgICB3aWR0aDogd2lkdGggPyByZW0od2lkdGgpIDogYGZpdC1jb250ZW50YCxcbiAgICAgIGhlaWdodDogJ2ZpdC1jb250ZW50JyxcbiAgICAgIC4uLnN4Py5pdGVtQ29udGFpbmVyLFxuICAgIH0pO1xuIl19 */", process.env.NODE_ENV === "production" ? "" : ";label:container;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpb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6ICdub25lICFpbXBvcnRhbnQnLFxuICAgICAgfSxcbiAgICAgIC4uLnN4Py5jb250YWluZXIsXG4gICAgfSk7XG5cbmV4cG9ydCBjb25zdCBpdGVtQ29udGFpbmVyID1cbiAgKFxuICAgIGNsaWVudFg6IG51bWJlcixcbiAgICBjbGllbnRZOiBudW1iZXIsXG4gICAgd2lkdGg/OiBudW1iZXIsXG4gICAgc3g/OiB7IGNvbnRhaW5lcj86IENTU09iamVjdDsgaXRlbUNvbnRhaW5lcj86IENTU09iamVjdCB9XG4gICkgPT5cbiAgKCk6IFNlcmlhbGl6ZWRTdHlsZXMgPT5cbiAgICBjc3Moe1xuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBvcGFjaXR5OiAnMSAhaW1wb3J0YW50JyxcbiAgICAgIHRvcDogcmVtKGNsaWVudFkpLFxuICAgICAgbGVmdDogcmVtKGNsaWVudFgpLFxuICAgICAgekluZGV4OiA5OTk5OTk5OTksXG4gICAgICB3aWR0aDogd2lkdGggPyByZW0od2lkdGgpIDogYGZpdC1jb250ZW50YCxcbiAgICAgIGhlaWdodDogJ2ZpdC1jb250ZW50JyxcbiAgICAgIC4uLnN4Py5pdGVtQ29udGFpbmVyLFxuICAgIH0pO1xuIl19 */")
18
+ position: 'relative'
19
+ }, sx == null ? void 0 : sx.container), process.env.NODE_ENV === "production" ? "" : ";label:container;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL1Bvc2l0aW9uSW5TY3JlZW4vUG9zaXRpb25JblNjcmVlbi5zdHlsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBT0kiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvdXRpbHMvUG9zaXRpb25JblNjcmVlbi9Qb3NpdGlvbklu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ICdoaWRkZW4nLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICB0b3A6IHJlbShjbGllbnRZKSxcbiAgICAgIGxlZnQ6IHJlbShjbGllbnRYKSxcbiAgICAgIHpJbmRleDogOTk5OTk5OTk5LFxuICAgICAgd2lkdGg6IHdpZHRoID8gcmVtKHdpZHRoKSA6IGBmaXQtY29udGVudGAsXG4gICAgICBoZWlnaHQ6ICdmaXQtY29udGVudCcsXG4gICAgICB2aXNpYmlsaXR5OiB2aXNpYmxlID8gJ3Zpc2libGUnIDogJ2hpZGRlbicsXG4gICAgICBvcGFjaXR5OiBgJHt2aXNpYmxlID8gMSA6IDB9ICFpbXBvcnRhbnRgLFxuICAgICAgLi4uc3g/Lml0ZW1Db250YWluZXIsXG4gICAgfSk7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:container;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL1Bvc2l0aW9uSW5TY3JlZW4vUG9zaXRpb25JblNjcmVlbi5zdHlsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBT0kiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvdXRpbHMvUG9zaXRpb25JblNjcmVlbi9Qb3NpdGlvbkluU2NyZWVuLnN0eWxlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcywgU2VyaWFsaXplZFN0eWxlcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IENTU09iamVjdCB9IGZyb20gJ0BlbW90aW9uL3NlcmlhbGl6ZSc7XG5pbXBvcnQgeyByZW0gfSBmcm9tICdwb2xpc2hlZCc7XG5cbmV4cG9ydCBjb25zdCBjb250YWluZXIgPVxuICAod2l0aE92ZX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B2aXNpYmxlID8gJ3Zpc2libGUnIDogJ2hpZGRlbicsXG4gICAgICBvcGFjaXR5OiBgJHt2aXNpYmxlID8gMSA6IDB9ICFpbXBvcnRhbnRgLFxuICAgICAgLi4uc3g/Lml0ZW1Db250YWluZXIsXG4gICAgfSk7XG4iXX0= */")
23
20
  );
24
21
  };
25
22
  };
26
- var itemContainer = exports.itemContainer = function itemContainer(clientX, clientY, width, sx) {
23
+ var itemContainer = exports.itemContainer = function itemContainer(clientX, clientY, visible, width, sx) {
27
24
  return function () {
28
25
  return (
29
26
  /*#__PURE__*/
30
27
  /*#__PURE__*/
31
28
  (0, _react.css)(_extends({
29
+ overflow: visible ? 'visible' : 'hidden',
32
30
  position: 'absolute',
33
- opacity: '1 !important',
34
31
  top: (0, _polished.rem)(clientY),
35
32
  left: (0, _polished.rem)(clientX),
36
33
  zIndex: 999999999,
37
34
  width: width ? (0, _polished.rem)(width) : "fit-content",
38
- height: 'fit-content'
39
- }, sx == null ? void 0 : sx.itemContainer), process.env.NODE_ENV === "production" ? "" : ";label:itemContainer;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL1Bvc2l0aW9uSW5TY3JlZW4vUG9zaXRpb25JblNjcmVlbi5zdHlsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0NJIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL1Bvc2l0aW9uSW5TY3JlZW4vUG9zaXRpb25JblNjcmVlbi5zdHlsZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MsIFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBDU1NPYmplY3QgfSBmcm9tICdAZW1vd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BhY2l0eTogJzEgIWltcG9ydGFudCcsXG4gICAgICB0b3A6IHJlbShjbGllbnRZKSxcbiAgICAgIGxlZnQ6IHJlbShjbGllbnRYKSxcbiAgICAgIHpJbmRleDogOTk5OTk5OTk5LFxuICAgICAgd2lkdGg6IHdpZHRoID8gcmVtKHdpZHRoKSA6IGBmaXQtY29udGVudGAsXG4gICAgICBoZWlnaHQ6ICdmaXQtY29udGVudCcsXG4gICAgICAuLi5zeD8uaXRlbUNvbnRhaW5lcixcbiAgICB9KTtcbiJdfQ== */", process.env.NODE_ENV === "production" ? "" : ";label:itemContainer;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL1Bvc2l0aW9uSW5TY3JlZW4vUG9zaXRpb25JblNjcmVlbi5zdHlsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0NJIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL1Bvc2l0aW9uSW5TY3JlZW4vUG9zaXRpb25JblNjcmVlbi5zdHlsZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MsIFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBDU1NPYmplY3QgfSBmcm9tICdAZW1vdGlvbi9zZXJpYWxpemUnO1xuaW1wb3J0IHsgcmVtIH0gZnJvbSAncG9saXNoZWQnO1xuXG5leHBvcnQgY29uc3QgY29udGFpbmVyID1cbiAgKFxuICAgIHdpdGhPdmVyZmxvdz86IGJvb2xlYW4sXG4gICAgdmlzaWJsZT86IGJvb2xlYW4sXG4gICAgc3g/OiB7IGNvbnRhaW5lcj86IENTU09iamVjdDsgaXRlbUNvbnRhaW5lcj86IENTU09iamVjdCB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lbUNvbnRhaW5lcixcbiAgICB9KTtcbiJdfQ== */")
35
+ height: 'fit-content',
36
+ visibility: visible ? 'visible' : 'hidden',
37
+ opacity: (visible ? 1 : 0) + " !important"
38
+ }, sx == null ? void 0 : sx.itemContainer), process.env.NODE_ENV === "production" ? "" : ";label:itemContainer;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL1Bvc2l0aW9uSW5TY3JlZW4vUG9zaXRpb25JblNjcmVlbi5zdHlsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBeUJJIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3V0aWxzL1Bvc2l0aW9uSW5TY3JlZW4vUG9zaXRpb25JblNjcmVlbi5zdHlsZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MsIFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBDU1NPYmplY3QgfSBmcm9tICdAZW1vdGlvbi9zZXJpYWxpemUnO1xuaW1wb3J0IHsgcmVtIH0gZnJvbSAncG9saXNoZWQnO1xuXG5leHBvcnQgY29uc3QgY29udGFpbmVyID1cbiAgKHdpdGhPdmVyZmxvdz86IGJvb2xlYW4sIHN4PzogeyBjb250YWluZXI/OiBDU1NPYmplY3Q7IGl0ZW1Db250YWluZXI/OiBDU1NPYmplY3QgfSkgPT5cbiAgKCk6IFNlcmlhbGl6ZWRTdHlsZXMgPT5cbiAgICBjc3Moe1xuICAgICAgb3ZlcmZsb3c6IHdpdGhPdmVyZmxvdyA/ICdoaWRkZW4nIDogJ2luaGVyaXQnLFxuICAgICAgdGV4dE92ZXJmbG93OiB3aXRoT3ZlcmZsb3cgPyAnZWxsaXBzaXMnIDogJ2luaGVyaXQnLFxuICAgICAgd2lkdGg6ICcxMDAlJyxcbiAgICAgIGhlaWdodDogJ2luaGVyaXQnLFxuICAgICAgcG9zaXRpb246ICdyZWxhdGl2ZScsXG4gICAgICAuLi5zeD8uY29udGFpbmVyLFxuICAgIH0pO1xuXG5leHBvcnQgY29uc3QgaXRlbUNvbnRhaW5lciA9XG4gIChcbiAgICBjbGllbnRYOiBudW1iZXIsXG4gICAgY2xpZW50WTogbnVtYmVyLFxuICAgIHZpc2libGU6IGJvb2xlYW4sXG4gICAgd2lkdGg/OiBudW1iZXIsXG4gICAgc3g/OiB7IGNvbnRhaW5lcj86IENTU09iamVjdDsgaXRlbUNvbnRhaW5lcj86IENTU09iamVjdCB9XG4gICkgPT5cbiAgKCk6IFNlcmlhbGl6ZWRTdHlsZXMgPT5cbiAgICBjc3Moe1xuICAgICAgb3ZlcmZsb3c6IHZpc2libGUgPyAndmlzaWJsZScgOiAnaGlkZGVuJyxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgdG9wOiByZW0oY2xpZW50WSksXG4gICAgICBsZWZ0OiByZW0oY2xpZW50WCksXG4gICAgICB6SW5kZXg6IDk5OTk5OTk5OSxcbiAgICAgIHdpZHRoOiB3aWR0aCA/IHJlbSh3aWR0aCkgOiBgZml0LWNvbnRlbnRgLFxuICAgICAgaGVpZ2h0OiAnZml0LWNvbnRlbnQnLFxuICAgICAgdmlzaWJpbGl0eTogdmlzaWJsZSA/ICd2aXNpYmxlJyA6ICdoaWRkZW4nLFxuICAgICAgb3BhY2l0eTogYCR7dmlzaWJsZSA/IDEgOiAwfSAhaW1wb3J0YW50YCxcbiAgICAgIC4uLnN4Py5pdGVtQ29udGFpbmVyLFxuICAgIH0pO1xuIl19 */", process.env.NODE_ENV === "production" ? "" : ";label:itemContainer;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjp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yLFxuICAgIHZpc2libGU6IGJvb2xlYW4sXG4gICAgd2lkdGg/OiBudW1iZXIsXG4gICAgc3g/OiB7IGNvbnRhaW5lcj86IENTU09iamVjdDsgaXRlbUNvbnRhaW5lcj86IENTU09iamVjdCB9XG4gICkgPT5cbiAgKCk6IFNlcmlhbGl6ZWRTdHlsZXMgPT5cbiAgICBjc3Moe1xuICAgICAgb3ZlcmZsb3c6IHZpc2libGUgPyAndmlzaWJsZScgOiAnaGlkZGVuJyxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgdG9wOiByZW0oY2xpZW50WSksXG4gICAgICBsZWZ0OiByZW0oY2xpZW50WCksXG4gICAgICB6SW5kZXg6IDk5OTk5OTk5OSxcbiAgICAgIHdpZHRoOiB3aWR0aCA/IHJlbSh3aWR0aCkgOiBgZml0LWNvbnRlbnRgLFxuICAgICAgaGVpZ2h0OiAnZml0LWNvbnRlbnQnLFxuICAgICAgdmlzaWJpbGl0eTogdmlzaWJsZSA/ICd2aXNpYmxlJyA6ICdoaWRkZW4nLFxuICAgICAgb3BhY2l0eTogYCR7dmlzaWJsZSA/IDEgOiAwfSAhaW1wb3J0YW50YCxcbiAgICAgIC4uLnN4Py5pdGVtQ29udGFpbmVyLFxuICAgIH0pO1xuIl19 */")
40
39
  );
41
40
  };
42
41
  };
@@ -1,5 +1,5 @@
1
- export declare const usePositionInScreen: (parentRef: React.MutableRefObject<any>, itemRef: React.MutableRefObject<any>, offsetX: number, offsetY: number, visible?: boolean | undefined) => {
1
+ export declare const usePositionInScreen: (parentRef: HTMLDivElement | null, itemRef: HTMLDivElement | null, offsetX: number, offsetY: number, visible?: boolean | undefined) => {
2
2
  x: number;
3
3
  y: number;
4
4
  };
5
- export declare const useWrapperWidth: (hasWrapperWidth: boolean, wrapperRef: React.MutableRefObject<any>) => (number | undefined)[];
5
+ export declare const useWrapperWidth: (hasWrapperWidth: boolean, wrapperRef: HTMLDivElement | null) => (number | undefined)[];
@@ -7,7 +7,6 @@ var _react = require("react");
7
7
  var _utils = require("./utils");
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
9
  var useHeights = function useHeights(parentRef, itemRef) {
10
- var _itemRef$current2;
11
10
  var _useState = (0, _react.useState)(0),
12
11
  parentHeight = _useState[0],
13
12
  setParentHeight = _useState[1];
@@ -21,10 +20,10 @@ var useHeights = function useHeights(parentRef, itemRef) {
21
20
  * and will increase/decrease as more Chips (Selected Options) are added/deleted.
22
21
  * Therefore the parentHeight is stored on the useState above.
23
22
  */
24
- (0, _react.useEffect)(function () {
25
- if (!parentRef.current) return;
23
+ (0, _react.useLayoutEffect)(function () {
24
+ if (!parentRef) return;
26
25
  var parentResizeObserver = (0, _utils.resizeObserverHandler)(setParentHeight);
27
- parentResizeObserver.observe(parentRef.current);
26
+ parentResizeObserver.observe(parentRef);
28
27
  return function () {
29
28
  return parentResizeObserver.disconnect();
30
29
  };
@@ -35,16 +34,15 @@ var useHeights = function useHeights(parentRef, itemRef) {
35
34
  * This is necessary for the case where the SelectMenu is rendered above the TextField, we need to track the
36
35
  * dynamic height of the SelectMenu in order to keep the gap between SelectMenu and TextField fixed.
37
36
  */
38
- (0, _react.useEffect)(function () {
39
- var _itemRef$current;
40
- var dropdownElement = (0, _head["default"])((_itemRef$current = itemRef.current) == null ? void 0 : _itemRef$current.children);
37
+ (0, _react.useLayoutEffect)(function () {
38
+ var dropdownElement = (0, _head["default"])(itemRef == null ? void 0 : itemRef.children);
41
39
  if (!dropdownElement) return;
42
40
  var childResizeObserver = (0, _utils.resizeObserverHandler)(setChildHeight);
43
41
  childResizeObserver.observe(dropdownElement);
44
42
  return function () {
45
43
  return childResizeObserver.disconnect();
46
44
  };
47
- }, [itemRef, (_itemRef$current2 = itemRef.current) == null ? void 0 : _itemRef$current2.children]);
45
+ }, [itemRef]);
48
46
  return {
49
47
  parentHeight: parentHeight,
50
48
  childHeight: childHeight
@@ -60,11 +58,10 @@ var usePositionInScreen = exports.usePositionInScreen = function usePositionInSc
60
58
  var _useHeights = useHeights(parentRef, itemRef),
61
59
  parentHeight = _useHeights.parentHeight,
62
60
  childHeight = _useHeights.childHeight;
63
- (0, _react.useEffect)(function () {
64
- var _parentRef$current, _itemRef$current3;
61
+ (0, _react.useLayoutEffect)(function () {
65
62
  // x,y are cordinates in screen
66
63
  // width is wrapper elements dimensions
67
- var _ref = parentRef != null && parentRef.current ? parentRef == null || (_parentRef$current = parentRef.current) == null ? void 0 : _parentRef$current.getBoundingClientRect() : {
64
+ var _ref = parentRef ? parentRef == null ? void 0 : parentRef.getBoundingClientRect() : {
68
65
  x: 0,
69
66
  y: 0,
70
67
  width: 0
@@ -74,7 +71,7 @@ var usePositionInScreen = exports.usePositionInScreen = function usePositionInSc
74
71
  parentWidth = _ref.width;
75
72
 
76
73
  // width is the element's that's going to be positioned dimensions
77
- var _ref2 = itemRef != null && itemRef.current ? itemRef == null || (_itemRef$current3 = itemRef.current) == null || (_itemRef$current3 = _itemRef$current3.children[0]) == null ? void 0 : _itemRef$current3.getBoundingClientRect() : {
74
+ var _ref2 = itemRef && itemRef.children[0] ? itemRef.children[0].getBoundingClientRect() : {
78
75
  width: 0
79
76
  },
80
77
  width = _ref2.width;
@@ -120,10 +117,10 @@ var useWrapperWidth = exports.useWrapperWidth = function useWrapperWidth(hasWrap
120
117
  var _useState4 = (0, _react.useState)(),
121
118
  width = _useState4[0],
122
119
  setWidth = _useState4[1];
123
- (0, _react.useEffect)(function () {
120
+ (0, _react.useLayoutEffect)(function () {
124
121
  if (hasWrapperWidth) {
125
- var _wrapperRef$current;
126
- setWidth(wrapperRef == null || (_wrapperRef$current = wrapperRef.current) == null || (_wrapperRef$current = _wrapperRef$current.getBoundingClientRect()) == null ? void 0 : _wrapperRef$current.width);
122
+ var _wrapperRef$getBoundi;
123
+ setWidth(wrapperRef == null || (_wrapperRef$getBoundi = wrapperRef.getBoundingClientRect()) == null ? void 0 : _wrapperRef$getBoundi.width);
127
124
  }
128
125
  }, [hasWrapperWidth, wrapperRef]);
129
126
  return [width];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orfium/ictinus",
3
- "version": "4.83.0",
3
+ "version": "4.84.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "MIT",