@orfium/ictinus 3.12.0 → 3.14.1

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.
@@ -9,6 +9,9 @@ export declare const buttonSpanStyle: () => () => {
9
9
  };
10
10
  export declare const iconStyle: () => () => {
11
11
  display: string;
12
+ '& > span': {
13
+ padding: number;
14
+ };
12
15
  };
13
16
  export declare const childrenWrapperStyle: ({ iconLeft, iconRight, hasChildren, }: RequiredProperties<Omit<Props, "onClick" | "dataTestId" | "block" | "buttonType" | "isIconButton"> & {
14
17
  hasChildren: boolean;
@@ -24,7 +24,14 @@ exports.buttonSpanStyle = buttonSpanStyle;
24
24
  var iconStyle = function iconStyle() {
25
25
  return function () {
26
26
  return {
27
- display: 'inline-flex'
27
+ display: 'inline-flex',
28
+ // This fixes the issue in DS3, where the alignment of the button was wrong because
29
+ // of the icon's extra height. It can and should be removed in DS4, in case this
30
+ // somehow makes it there. We could remove the padding in icon ( which is a better solution )
31
+ // but it would affect the alignment in all the icons.
32
+ '& > span': {
33
+ padding: 0
34
+ }
28
35
  };
29
36
  };
30
37
  };
@@ -52,7 +59,7 @@ var centralizedLoader = function centralizedLoader(clientWidth) {
52
59
  /*#__PURE__*/
53
60
 
54
61
  /*#__PURE__*/
55
- (0, _react.css)("width:", clientWidth ? (0, _utils.rem)(clientWidth) : 'auto', ";", _functions.flex, ";justify-content:center;" + (process.env.NODE_ENV === "production" ? "" : ";label:centralizedLoader;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0J1dHRvbi9CdXR0b24uc3R5bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0MrRiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9CdXR0b24vQnV0dG9uLnN0eWxlLnRzIiwic291cmNl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IGxlZnRJY29uRXhpc3RzID0gaGFzQ2hpbGRyZW4gJiYgaWNvbkxlZnQ7XG5cbiAgcmV0dXJuIHtcbiAgICBtYXJnaW5MZWZ0OiBsZWZ0SWNvbkV4aXN0cyA/IHRoZW1lLnNwYWNpbmcuc20gOiAwLFxuICAgIG1hcmdpblJpZ2h0OiByaWdodEljb25FeGlzdHMgPyB0aGVtZS5zcGFjaW5nLnNtIDogMCxcbiAgfTtcbn07XG5cbmV4cG9ydCBjb25zdCBjZW50cmFsaXplZExvYWRlcjogKGNsaWVudFdpZHRoPzogbnVtYmVyKSA9PiBTZXJpYWxpemVkU3R5bGVzID0gY2xpZW50V2lkdGggPT4gY3NzYFxuICB3aWR0aDogJHtjbGllbnRXaWR0aCA/IHJlbShjbGllbnRXaWR0aCkgOiAnYXV0byd9O1xuICAke2ZsZXh9O1xuICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbmA7XG4iXX0= */", process.env.NODE_ENV === "production" ? "" : ";label:centralizedLoader;")
62
+ (0, _react.css)("width:", clientWidth ? (0, _utils.rem)(clientWidth) : 'auto', ";", _functions.flex, ";justify-content:center;" + (process.env.NODE_ENV === "production" ? "" : ";label:centralizedLoader;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0J1dHRvbi9CdXR0b24uc3R5bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBOEMrRiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9CdXR0b24vQnV0dG9uLnN0eWxlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgVGhlbWUgfSBmcm9tICd0aGVtZSc7XG5pbX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Z0LFxuICBpY29uUmlnaHQsXG4gIGhhc0NoaWxkcmVuLFxufTogUmVxdWlyZWRQcm9wZXJ0aWVzPFxuICBPbWl0PFByb3BzLCAnYmxvY2snIHwgJ2lzSWNvbkJ1dHRvbicgfCAnYnV0dG9uVHlwZScgfCAnZGF0YVRlc3RJZCcgfCAnb25DbGljayc+ICYge1xuICAgIGhhc0NoaWxkcmVuOiBib29sZWFuO1xuICB9XG4+KSA9PiAodGhlbWU6IFRoZW1lKSA9PiB7XG4gIGNvbnN0IHJpZ2h0SWNvbkV4aXN0cyA9IGhhc0NoaWxkcmVuICYmIGljb25SaWdodDtcbiAgY29uc3QgbGVmdEljb25FeGlzdHMgPSBoYXNDaGlsZHJlbiAmJiBpY29uTGVmdDtcblxuICByZXR1cm4ge1xuICAgIG1hcmdpbkxlZnQ6IGxlZnRJY29uRXhpc3RzID8gdGhlbWUuc3BhY2luZy5zbSA6IDAsXG4gICAgbWFyZ2luUmlnaHQ6IHJpZ2h0SWNvbkV4aXN0cyA/IHRoZW1lLnNwYWNpbmcuc20gOiAwLFxuICB9O1xufTtcblxuZXhwb3J0IGNvbnN0IGNlbnRyYWxpemVkTG9hZGVyOiAoY2xpZW50V2lkdGg/OiBudW1iZXIpID0+IFNlcmlhbGl6ZWRTdHlsZXMgPSBjbGllbnRXaWR0aCA9PiBjc3NgXG4gIHdpZHRoOiAke2NsaWVudFdpZHRoID8gcmVtKGNsaWVudFdpZHRoKSA6ICdhdXRvJ307XG4gICR7ZmxleH07XG4gIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuYDtcbiJdfQ== */", process.env.NODE_ENV === "production" ? "" : ";label:centralizedLoader;")
56
63
  );
57
64
  };
58
65
 
@@ -42,6 +42,9 @@ var ListItem = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
42
42
  }),
43
43
  ref: selected ? ref : null,
44
44
  onClick: handleListItemSelect,
45
+ onMouseDown: function onMouseDown(event) {
46
+ event.preventDefault();
47
+ },
45
48
  "data-testid": dataTestId != null ? dataTestId : 'ictinus_list' + ('_item_' + index)
46
49
  }, (0, _react2.jsx)("div", {
47
50
  css: (0, _ListItem.contentStyle)()
@@ -9,7 +9,7 @@ declare type Props = {
9
9
  placement?: TooltipPlacement;
10
10
  /** Whether the tooltip is transparent or not - for cases
11
11
  * where the content is a custom component
12
- */
12
+ */
13
13
  /** @default false */
14
14
  isTransparent?: boolean;
15
15
  /** The unique id in order to link content and tooltip */
@@ -18,6 +18,14 @@ declare type Props = {
18
18
  /** The size of the tooltip to define different style */
19
19
  /** @default medium */
20
20
  size?: TooltipSize;
21
+ /** Determines if the tooltip is interactive, i.e. it can be
22
+ * hovered over or clicked without hiding */
23
+ /** @default false */
24
+ interactive?: boolean;
25
+ /** Number in ms to debounce the internal onMouseMove handler
26
+ * which determines when an interactive tooltip should hide. */
27
+ /** @default 100 */
28
+ delay?: number;
21
29
  children: React.ReactElement;
22
30
  };
23
31
  declare const Tooltip: React.FC<Props>;
@@ -22,7 +22,11 @@ var Tooltip = function Tooltip(_ref) {
22
22
  _ref$placement = _ref.placement,
23
23
  placement = _ref$placement === void 0 ? 'top' : _ref$placement,
24
24
  _ref$isTransparent = _ref.isTransparent,
25
- isTransparent = _ref$isTransparent === void 0 ? false : _ref$isTransparent;
25
+ isTransparent = _ref$isTransparent === void 0 ? false : _ref$isTransparent,
26
+ _ref$interactive = _ref.interactive,
27
+ interactive = _ref$interactive === void 0 ? false : _ref$interactive,
28
+ _ref$delay = _ref.delay,
29
+ delay = _ref$delay === void 0 ? 100 : _ref$delay;
26
30
  return (0, _react3.jsx)(_react["default"], {
27
31
  "data-testid": id,
28
32
  css: (0, _Tooltip.tooltipStyle)({
@@ -30,7 +34,9 @@ var Tooltip = function Tooltip(_ref) {
30
34
  isTransparent: isTransparent
31
35
  }),
32
36
  content: content,
33
- placement: placement
37
+ placement: placement,
38
+ interactive: interactive,
39
+ interactiveDebounce: delay
34
40
  }, children);
35
41
  };
36
42
 
@@ -1,5 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { ButtonHTMLAttributes } from 'react';
3
+ /** URL currently used for figma */
4
+ export declare const FIGMA_URL = "https://www.figma.com/file/8kMPBNYHHXz2AtkzeeDmk5/Design-System-V4---%E2%9A%A0%EF%B8%8F-Working-File-(do-not-update-libraries)";
3
5
  /** A type to turn any type optional properties to required */
4
6
  export declare type RequiredProperties<T> = {
5
7
  [K in keyof T]-?: T[K];
@@ -1,3 +1,10 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ exports.__esModule = true;
4
+ exports.FIGMA_URL = void 0;
5
+
6
+ /** URL currently used for figma */
7
+ var FIGMA_URL = 'https://www.figma.com/file/8kMPBNYHHXz2AtkzeeDmk5/Design-System-V4---%E2%9A%A0%EF%B8%8F-Working-File-(do-not-update-libraries)';
8
+ /** A type to turn any type optional properties to required */
9
+
10
+ exports.FIGMA_URL = FIGMA_URL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orfium/ictinus",
3
- "version": "3.12.0",
3
+ "version": "3.14.1",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "MIT",
@@ -75,6 +75,7 @@
75
75
  "react-router-dom": "^5.2.0",
76
76
  "react-test-renderer": "^16.13.1",
77
77
  "rimraf": "^3.0.2",
78
+ "storybook-addon-designs": "^6.1.0",
78
79
  "styled-components": "^5.2.0",
79
80
  "ts-jest": "^26.5.6",
80
81
  "ts-loader": "^9.1.2",