glints-aries 4.0.249 → 4.0.251

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.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { IconNames } from '../Icon/icons/icons';
3
- export declare type BannerProps = {
3
+ export interface BannerProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  title?: string;
5
5
  /** If set will take precedent of status */
6
6
  iconName?: IconNames;
@@ -10,5 +10,7 @@ export declare type BannerProps = {
10
10
  secondaryAction?: React.ReactNode;
11
11
  dismissable?: boolean;
12
12
  onDismiss?: () => void;
13
- };
13
+ type?: 'static' | 'fixed';
14
+ showIcon?: boolean;
15
+ }
14
16
  export declare const Banner: React.ForwardRefExoticComponent<BannerProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- var _excluded = ["title", "status", "iconName", "children", "action", "secondaryAction", "dismissable", "onDismiss"];
3
+ var _excluded = ["title", "status", "iconName", "children", "action", "secondaryAction", "dismissable", "onDismiss", "type", "showIcon"];
4
4
  import React from 'react';
5
5
  import { ButtonGroup } from '../ButtonGroup';
6
6
  import { Icon } from '../Icon';
7
7
  import { Typography } from '../Typography';
8
8
  import { StyledBanner, StyledBannerContentContainer, StyledBannerTitle, StyledBannerTitleContainer, StyledCloseIconWrapper } from './BannerStyle';
9
+ import { StyledFixedBanner, StyledFixedIconWrapper, StyledFixedBannerContentContainer, StyledFixedBannerButtonContainer, StyledFixedCloseIconWrapper } from './FixedBannerStyle';
9
10
  var iconNameStatusMap = {
10
11
  success: 'ri-checkbox-circle-fill',
11
12
  info: 'ri-information-fill',
@@ -22,13 +23,18 @@ export var Banner = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
22
23
  _ref$dismissable = _ref.dismissable,
23
24
  dismissable = _ref$dismissable === void 0 ? true : _ref$dismissable,
24
25
  onDismiss = _ref.onDismiss,
26
+ _ref$type = _ref.type,
27
+ type = _ref$type === void 0 ? 'static' : _ref$type,
28
+ _ref$showIcon = _ref.showIcon,
29
+ showIcon = _ref$showIcon === void 0 ? true : _ref$showIcon,
25
30
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
26
31
  var iconByStatus = iconNameStatusMap[status];
27
32
  if (!iconByStatus) {
28
33
  console.warn("Status " + status + " is not valid, default style will be used");
29
34
  }
30
35
  var iconNameValue = iconName ? iconName : iconByStatus || iconNameStatusMap['info'];
31
- return /*#__PURE__*/React.createElement(StyledBanner, _extends({
36
+ var actionComponent = /*#__PURE__*/React.createElement(React.Fragment, null, (action || secondaryAction) && /*#__PURE__*/React.createElement(ButtonGroup, null, action, secondaryAction));
37
+ if (type === 'static') return /*#__PURE__*/React.createElement(StyledBanner, _extends({
32
38
  ref: ref,
33
39
  "data-titled": !!title,
34
40
  "data-status": status
@@ -47,5 +53,28 @@ export var Banner = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
47
53
  }))), /*#__PURE__*/React.createElement(StyledBannerContentContainer, null, /*#__PURE__*/React.createElement(Typography, {
48
54
  as: "div",
49
55
  variant: "body1"
50
- }, children)), /*#__PURE__*/React.createElement(StyledBannerContentContainer, null, action || secondaryAction && /*#__PURE__*/React.createElement(ButtonGroup, null, action, secondaryAction)));
56
+ }, children)), /*#__PURE__*/React.createElement(StyledBannerContentContainer, null, actionComponent));
57
+ return /*#__PURE__*/React.createElement(StyledFixedBanner, _extends({
58
+ ref: ref,
59
+ "data-status": status,
60
+ "data-nobutton": action ? '' : 'true'
61
+ }, props), showIcon && /*#__PURE__*/React.createElement(StyledFixedIconWrapper, {
62
+ "data-status": status
63
+ }, /*#__PURE__*/React.createElement(Icon, {
64
+ name: iconNameValue
65
+ })), /*#__PURE__*/React.createElement(StyledFixedBannerContentContainer, {
66
+ "data-noicon": showIcon ? '' : 'true'
67
+ }, /*#__PURE__*/React.createElement(Typography, {
68
+ as: "div",
69
+ variant: "body1"
70
+ }, children)), /*#__PURE__*/React.createElement(StyledFixedBannerButtonContainer, {
71
+ "data-noicon": showIcon ? '' : 'true'
72
+ }, actionComponent), dismissable && /*#__PURE__*/React.createElement(StyledFixedCloseIconWrapper, {
73
+ role: "button",
74
+ onClick: function onClick() {
75
+ return onDismiss == null ? void 0 : onDismiss();
76
+ }
77
+ }, /*#__PURE__*/React.createElement(Icon, {
78
+ name: "ri-close"
79
+ })));
51
80
  });
@@ -3,3 +3,6 @@ declare const _default: Meta<import("@storybook/react").Args>;
3
3
  export default _default;
4
4
  export declare const Interactive: any;
5
5
  export declare const WithButtons: any;
6
+ export declare const WithTwoButtons: any;
7
+ export declare const FixedBanner: any;
8
+ export declare const FixedBannerWithButtons: any;
@@ -0,0 +1,5 @@
1
+ export declare const StyledFixedBanner: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const StyledFixedIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const StyledFixedBannerContentContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const StyledFixedBannerButtonContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const StyledFixedCloseIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,23 @@
1
+ import styled from 'styled-components';
2
+ import * as Breakpoints from '../utilities/breakpoints';
3
+ import { Blue, Green, Neutral, Orange, Red } from '../utilities/colors';
4
+ export var StyledFixedBanner = styled.div.withConfig({
5
+ displayName: "FixedBannerStyle__StyledFixedBanner",
6
+ componentId: "sc-1clh4a2-0"
7
+ })(["position:fixed;left:0;right:0;height:56px;display:flex;justify-content:center;align-items:center;padding-inline:48px;background:", ";color:", ";svg{position:static;fill:", ";height:20px;width:20px;margin-top:4px;}&[data-status='success']{background:", ";}&[data-status='info']{background:", ";}&[data-status='warning']{background:", ";}&[data-status='critical']{background:", ";}@media (max-width:", "){padding:16px;height:100px;svg{margin-top:0px;}&[data-nobutton='true']{height:52px;}}"], Neutral.B99, Neutral.B18, Neutral.B40, Green.B89, Blue.S08, Orange.S21, Red.B100, Breakpoints.large);
8
+ export var StyledFixedIconWrapper = styled.div.withConfig({
9
+ displayName: "FixedBannerStyle__StyledFixedIconWrapper",
10
+ componentId: "sc-1clh4a2-1"
11
+ })(["padding-right:12px;&[data-status='success'] svg{fill:", ";}&[data-status='info'] svg{fill:", ";}&[data-status='warning'] svg{fill:", ";}&[data-status='critical'] svg{fill:", ";}@media (max-width:", "){position:absolute;left:16px;top:16px;}"], Green.B61, Blue.S99, Orange.S87, Red.B93, Breakpoints.large);
12
+ export var StyledFixedBannerContentContainer = styled.div.withConfig({
13
+ displayName: "FixedBannerStyle__StyledFixedBannerContentContainer",
14
+ componentId: "sc-1clh4a2-2"
15
+ })(["padding-right:16px;@media (max-width:", "){position:absolute;top:16px;left:52px;&[data-noicon='true']{left:16px;}}"], Breakpoints.large);
16
+ export var StyledFixedBannerButtonContainer = styled.div.withConfig({
17
+ displayName: "FixedBannerStyle__StyledFixedBannerButtonContainer",
18
+ componentId: "sc-1clh4a2-3"
19
+ })(["@media (max-width:", "){position:absolute;top:48px;left:52px;&[data-noicon='true']{left:16px;}}"], Breakpoints.large);
20
+ export var StyledFixedCloseIconWrapper = styled.div.withConfig({
21
+ displayName: "FixedBannerStyle__StyledFixedCloseIconWrapper",
22
+ componentId: "sc-1clh4a2-4"
23
+ })(["cursor:pointer;position:absolute;color:", ";right:48px;padding-left:16px;svg{fill:", ";}@media (max-width:", "){top:16px;right:16px;}"], Neutral.B40, Neutral.B40, Breakpoints.large);
@@ -7,3 +7,4 @@ export declare const WithOverflowContent: any;
7
7
  export declare const WithLockedScrollableBackdrop: any;
8
8
  export declare const WithSpinner: any;
9
9
  export declare const WithCustomActions: any;
10
+ export declare const WithNumberInputAndTooltip: any;
@@ -5,6 +5,7 @@ export declare type TooltipProps = {
5
5
  preferredPosition?: TooltipPosition;
6
6
  children: React.ReactNode;
7
7
  content: React.ReactNode;
8
+ zIndex?: number;
8
9
  };
9
- export declare const Tooltip: ({ children, content, preferredPosition, }: TooltipProps) => JSX.Element;
10
+ export declare const Tooltip: ({ children, content, preferredPosition, zIndex, }: TooltipProps) => JSX.Element;
10
11
  export {};
@@ -52,7 +52,8 @@ export var Tooltip = function Tooltip(_ref) {
52
52
  var children = _ref.children,
53
53
  content = _ref.content,
54
54
  _ref$preferredPositio = _ref.preferredPosition,
55
- preferredPosition = _ref$preferredPositio === void 0 ? defaultPosition : _ref$preferredPositio;
55
+ preferredPosition = _ref$preferredPositio === void 0 ? defaultPosition : _ref$preferredPositio,
56
+ zIndex = _ref.zIndex;
56
57
  var tooltipRef = useRef(null);
57
58
  var elRef = useRef(null);
58
59
  var tooltipPositionsHandlerRef = useRef(null);
@@ -122,6 +123,7 @@ export var Tooltip = function Tooltip(_ref) {
122
123
  }, children), isActive && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(StyledTooltip, {
123
124
  "data-position": position,
124
125
  ref: tooltipRef,
126
+ zIndex: zIndex,
125
127
  style: {
126
128
  top: (toolTipCoord == null ? void 0 : toolTipCoord.top) + 'px',
127
129
  left: (toolTipCoord == null ? void 0 : toolTipCoord.left) + 'px',
@@ -1,3 +1,5 @@
1
1
  export declare const StyledTooltipContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const StyledTooltip: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const StyledTooltip: import("styled-components").StyledComponent<"div", any, {
3
+ zIndex?: number;
4
+ }, never>;
3
5
  export declare const StyledTooltipArrow: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -11,11 +11,13 @@ var background = Neutral.B18;
11
11
  export var StyledTooltipContainer = styled.div.withConfig({
12
12
  displayName: "TooltipStyle__StyledTooltipContainer",
13
13
  componentId: "sc-37e5z7-0"
14
- })(["display:inline-block;position:relative;*{display:block;}"]);
14
+ })(["display:inline-block;position:relative;> svg{display:block;}"]);
15
15
  export var StyledTooltip = styled.div.withConfig({
16
16
  displayName: "TooltipStyle__StyledTooltip",
17
17
  componentId: "sc-37e5z7-1"
18
- })(["position:fixed;text-align:left;height:fit-content;width:fit-content;max-width:320px;border-radius:", ";gap:10px;left:50%;transform:translateX(-50%);padding:", " ", ";color:", ";background:", ";z-index:100;overflow-wrap:break-word;line-height:1;&[data-position='top-left'],&[data-position='bottom-left']{transform:translateX( calc(100% * -1 + ", " + ", ") );}&[data-position='top-right'],&[data-position='bottom-right']{transform:translateX(calc((", " + ", ") * -1));}&[data-position='right-middle']{transform:translateX(0) translateY(-50%);}&[data-position='left-bottom'],&[data-position='right-bottom']{transform:translateY(calc((", " + ", ") * -1));}&[data-position='left-top'],&[data-position='right-top']{transform:translateY( calc(100% * -1 + (", " + ", ")) );}&[data-position='bottom-center'],&[data-position='bottom-left'],&[data-position='bottom-right']{top:calc((100% + ", "));}&[data-position='left-middle']{transform:translateX(0) translateY(-50%);}&[data-position='top-center'] .arrow,&[data-position='top-left'] .arrow,&[data-position='top-right'] .arrow{top:100%;border-top-color:", ";}&[data-position='top-left'] .arrow,&[data-position='bottom-left'] .arrow{left:calc(100% - ", " - ", ");}&[data-position='top-right'] .arrow,&[data-position='bottom-right'] .arrow{left:calc(", " + ", ");}&[data-position='right-middle'] .arrow,&[data-position='right-top'] .arrow,&[data-position='right-bottom'] .arrow{top:50%;left:calc(", " * -1);border-right-color:", ";}&[data-position='right-middle'] .arrow{transform:translateX(0) translateY(-50%);}&[data-position='left-bottom'] .arrow,&[data-position='right-bottom'] .arrow{top:", ";}&[data-position='bottom-center'] .arrow,&[data-position='bottom-left'] .arrow,&[data-position='bottom-right'] .arrow{bottom:100%;border-bottom-color:", ";}&[data-position='left-middle'] .arrow,&[data-position='left-top'] .arrow,&[data-position='left-bottom'] .arrow{left:auto;right:calc(", " * -2);border-left-color:", ";}&[data-position='left-middle'] .arrow{top:50%;transform:translateX(0) translateY(-50%);}&[data-position='left-top'] .arrow,&[data-position='right-top'] .arrow{top:unset;bottom:", ";}@media (max-width:", "){min-width:69px;}"], borderRadius2, space8, space12, Neutral.B100, background, arrowSize, nonCentralArrowMargin, arrowSize, nonCentralArrowMargin, nonCentralArrowMargin, arrowSize, nonCentralArrowMargin, arrowSize, verticalMargin, background, arrowSize, nonCentralArrowMargin, arrowSize, nonCentralArrowMargin, arrowSize, background, nonCentralArrowMargin, background, arrowSize, background, nonCentralArrowMargin, Breakpoints.large);
18
+ })(["position:fixed;text-align:left;height:fit-content;width:fit-content;max-width:320px;border-radius:", ";gap:10px;left:50%;transform:translateX(-50%);padding:", " ", ";color:", ";background:", ";overflow-wrap:break-word;line-height:1;z-index:", ";&[data-position='top-left'],&[data-position='bottom-left']{transform:translateX( calc(100% * -1 + ", " + ", ") );}&[data-position='top-right'],&[data-position='bottom-right']{transform:translateX(calc((", " + ", ") * -1));}&[data-position='right-middle']{transform:translateX(0) translateY(-50%);}&[data-position='left-bottom'],&[data-position='right-bottom']{transform:translateY(calc((", " + ", ") * -1));}&[data-position='left-top'],&[data-position='right-top']{transform:translateY( calc(100% * -1 + (", " + ", ")) );}&[data-position='bottom-center'],&[data-position='bottom-left'],&[data-position='bottom-right']{top:calc((100% + ", "));}&[data-position='left-middle']{transform:translateX(0) translateY(-50%);}&[data-position='top-center'] .arrow,&[data-position='top-left'] .arrow,&[data-position='top-right'] .arrow{top:100%;border-top-color:", ";}&[data-position='top-left'] .arrow,&[data-position='bottom-left'] .arrow{left:calc(100% - ", " - ", ");}&[data-position='top-right'] .arrow,&[data-position='bottom-right'] .arrow{left:calc(", " + ", ");}&[data-position='right-middle'] .arrow,&[data-position='right-top'] .arrow,&[data-position='right-bottom'] .arrow{top:50%;left:calc(", " * -1);border-right-color:", ";}&[data-position='right-middle'] .arrow{transform:translateX(0) translateY(-50%);}&[data-position='left-bottom'] .arrow,&[data-position='right-bottom'] .arrow{top:", ";}&[data-position='bottom-center'] .arrow,&[data-position='bottom-left'] .arrow,&[data-position='bottom-right'] .arrow{bottom:100%;border-bottom-color:", ";}&[data-position='left-middle'] .arrow,&[data-position='left-top'] .arrow,&[data-position='left-bottom'] .arrow{left:auto;right:calc(", " * -2);border-left-color:", ";}&[data-position='left-middle'] .arrow{top:50%;transform:translateX(0) translateY(-50%);}&[data-position='left-top'] .arrow,&[data-position='right-top'] .arrow{top:unset;bottom:", ";}@media (max-width:", "){min-width:69px;}"], borderRadius2, space8, space12, Neutral.B100, background, function (props) {
19
+ return props.zIndex ? props.zIndex : 100;
20
+ }, arrowSize, nonCentralArrowMargin, arrowSize, nonCentralArrowMargin, nonCentralArrowMargin, arrowSize, nonCentralArrowMargin, arrowSize, verticalMargin, background, arrowSize, nonCentralArrowMargin, arrowSize, nonCentralArrowMargin, arrowSize, background, nonCentralArrowMargin, background, arrowSize, background, nonCentralArrowMargin, Breakpoints.large);
19
21
  export var StyledTooltipArrow = styled.div.withConfig({
20
22
  displayName: "TooltipStyle__StyledTooltipArrow",
21
23
  componentId: "sc-37e5z7-2"
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { IconNames } from '../Icon/icons/icons';
3
- export declare type BannerProps = {
3
+ export interface BannerProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  title?: string;
5
5
  /** If set will take precedent of status */
6
6
  iconName?: IconNames;
@@ -10,5 +10,7 @@ export declare type BannerProps = {
10
10
  secondaryAction?: React.ReactNode;
11
11
  dismissable?: boolean;
12
12
  onDismiss?: () => void;
13
- };
13
+ type?: 'static' | 'fixed';
14
+ showIcon?: boolean;
15
+ }
14
16
  export declare const Banner: React.ForwardRefExoticComponent<BannerProps & React.RefAttributes<HTMLDivElement>>;
@@ -10,7 +10,8 @@ var _ButtonGroup = require("../ButtonGroup");
10
10
  var _Icon = require("../Icon");
11
11
  var _Typography = require("../Typography");
12
12
  var _BannerStyle = require("./BannerStyle");
13
- var _excluded = ["title", "status", "iconName", "children", "action", "secondaryAction", "dismissable", "onDismiss"];
13
+ var _FixedBannerStyle = require("./FixedBannerStyle");
14
+ var _excluded = ["title", "status", "iconName", "children", "action", "secondaryAction", "dismissable", "onDismiss", "type", "showIcon"];
14
15
  var iconNameStatusMap = {
15
16
  success: 'ri-checkbox-circle-fill',
16
17
  info: 'ri-information-fill',
@@ -27,13 +28,18 @@ var Banner = /*#__PURE__*/_react["default"].forwardRef(function Banner(_ref, ref
27
28
  _ref$dismissable = _ref.dismissable,
28
29
  dismissable = _ref$dismissable === void 0 ? true : _ref$dismissable,
29
30
  onDismiss = _ref.onDismiss,
31
+ _ref$type = _ref.type,
32
+ type = _ref$type === void 0 ? 'static' : _ref$type,
33
+ _ref$showIcon = _ref.showIcon,
34
+ showIcon = _ref$showIcon === void 0 ? true : _ref$showIcon,
30
35
  props = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
31
36
  var iconByStatus = iconNameStatusMap[status];
32
37
  if (!iconByStatus) {
33
38
  console.warn("Status " + status + " is not valid, default style will be used");
34
39
  }
35
40
  var iconNameValue = iconName ? iconName : iconByStatus || iconNameStatusMap['info'];
36
- return /*#__PURE__*/_react["default"].createElement(_BannerStyle.StyledBanner, (0, _extends2["default"])({
41
+ var actionComponent = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (action || secondaryAction) && /*#__PURE__*/_react["default"].createElement(_ButtonGroup.ButtonGroup, null, action, secondaryAction));
42
+ if (type === 'static') return /*#__PURE__*/_react["default"].createElement(_BannerStyle.StyledBanner, (0, _extends2["default"])({
37
43
  ref: ref,
38
44
  "data-titled": !!title,
39
45
  "data-status": status
@@ -52,6 +58,29 @@ var Banner = /*#__PURE__*/_react["default"].forwardRef(function Banner(_ref, ref
52
58
  }))), /*#__PURE__*/_react["default"].createElement(_BannerStyle.StyledBannerContentContainer, null, /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
53
59
  as: "div",
54
60
  variant: "body1"
55
- }, children)), /*#__PURE__*/_react["default"].createElement(_BannerStyle.StyledBannerContentContainer, null, action || secondaryAction && /*#__PURE__*/_react["default"].createElement(_ButtonGroup.ButtonGroup, null, action, secondaryAction)));
61
+ }, children)), /*#__PURE__*/_react["default"].createElement(_BannerStyle.StyledBannerContentContainer, null, actionComponent));
62
+ return /*#__PURE__*/_react["default"].createElement(_FixedBannerStyle.StyledFixedBanner, (0, _extends2["default"])({
63
+ ref: ref,
64
+ "data-status": status,
65
+ "data-nobutton": action ? '' : 'true'
66
+ }, props), showIcon && /*#__PURE__*/_react["default"].createElement(_FixedBannerStyle.StyledFixedIconWrapper, {
67
+ "data-status": status
68
+ }, /*#__PURE__*/_react["default"].createElement(_Icon.Icon, {
69
+ name: iconNameValue
70
+ })), /*#__PURE__*/_react["default"].createElement(_FixedBannerStyle.StyledFixedBannerContentContainer, {
71
+ "data-noicon": showIcon ? '' : 'true'
72
+ }, /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
73
+ as: "div",
74
+ variant: "body1"
75
+ }, children)), /*#__PURE__*/_react["default"].createElement(_FixedBannerStyle.StyledFixedBannerButtonContainer, {
76
+ "data-noicon": showIcon ? '' : 'true'
77
+ }, actionComponent), dismissable && /*#__PURE__*/_react["default"].createElement(_FixedBannerStyle.StyledFixedCloseIconWrapper, {
78
+ role: "button",
79
+ onClick: function onClick() {
80
+ return onDismiss == null ? void 0 : onDismiss();
81
+ }
82
+ }, /*#__PURE__*/_react["default"].createElement(_Icon.Icon, {
83
+ name: "ri-close"
84
+ })));
56
85
  });
57
86
  exports.Banner = Banner;
@@ -3,3 +3,6 @@ declare const _default: Meta<import("@storybook/react").Args>;
3
3
  export default _default;
4
4
  export declare const Interactive: any;
5
5
  export declare const WithButtons: any;
6
+ export declare const WithTwoButtons: any;
7
+ export declare const FixedBanner: any;
8
+ export declare const FixedBannerWithButtons: any;
@@ -0,0 +1,5 @@
1
+ export declare const StyledFixedBanner: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const StyledFixedIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const StyledFixedBannerContentContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const StyledFixedBannerButtonContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const StyledFixedCloseIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ exports.__esModule = true;
5
+ exports.StyledFixedIconWrapper = exports.StyledFixedCloseIconWrapper = exports.StyledFixedBannerContentContainer = exports.StyledFixedBannerButtonContainer = exports.StyledFixedBanner = void 0;
6
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
7
+ var Breakpoints = _interopRequireWildcard(require("../utilities/breakpoints"));
8
+ var _colors = require("../utilities/colors");
9
+ 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); }
10
+ 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; }
11
+ var StyledFixedBanner = _styledComponents["default"].div.withConfig({
12
+ displayName: "FixedBannerStyle__StyledFixedBanner",
13
+ componentId: "sc-1clh4a2-0"
14
+ })(["position:fixed;left:0;right:0;height:56px;display:flex;justify-content:center;align-items:center;padding-inline:48px;background:", ";color:", ";svg{position:static;fill:", ";height:20px;width:20px;margin-top:4px;}&[data-status='success']{background:", ";}&[data-status='info']{background:", ";}&[data-status='warning']{background:", ";}&[data-status='critical']{background:", ";}@media (max-width:", "){padding:16px;height:100px;svg{margin-top:0px;}&[data-nobutton='true']{height:52px;}}"], _colors.Neutral.B99, _colors.Neutral.B18, _colors.Neutral.B40, _colors.Green.B89, _colors.Blue.S08, _colors.Orange.S21, _colors.Red.B100, Breakpoints.large);
15
+ exports.StyledFixedBanner = StyledFixedBanner;
16
+ var StyledFixedIconWrapper = _styledComponents["default"].div.withConfig({
17
+ displayName: "FixedBannerStyle__StyledFixedIconWrapper",
18
+ componentId: "sc-1clh4a2-1"
19
+ })(["padding-right:12px;&[data-status='success'] svg{fill:", ";}&[data-status='info'] svg{fill:", ";}&[data-status='warning'] svg{fill:", ";}&[data-status='critical'] svg{fill:", ";}@media (max-width:", "){position:absolute;left:16px;top:16px;}"], _colors.Green.B61, _colors.Blue.S99, _colors.Orange.S87, _colors.Red.B93, Breakpoints.large);
20
+ exports.StyledFixedIconWrapper = StyledFixedIconWrapper;
21
+ var StyledFixedBannerContentContainer = _styledComponents["default"].div.withConfig({
22
+ displayName: "FixedBannerStyle__StyledFixedBannerContentContainer",
23
+ componentId: "sc-1clh4a2-2"
24
+ })(["padding-right:16px;@media (max-width:", "){position:absolute;top:16px;left:52px;&[data-noicon='true']{left:16px;}}"], Breakpoints.large);
25
+ exports.StyledFixedBannerContentContainer = StyledFixedBannerContentContainer;
26
+ var StyledFixedBannerButtonContainer = _styledComponents["default"].div.withConfig({
27
+ displayName: "FixedBannerStyle__StyledFixedBannerButtonContainer",
28
+ componentId: "sc-1clh4a2-3"
29
+ })(["@media (max-width:", "){position:absolute;top:48px;left:52px;&[data-noicon='true']{left:16px;}}"], Breakpoints.large);
30
+ exports.StyledFixedBannerButtonContainer = StyledFixedBannerButtonContainer;
31
+ var StyledFixedCloseIconWrapper = _styledComponents["default"].div.withConfig({
32
+ displayName: "FixedBannerStyle__StyledFixedCloseIconWrapper",
33
+ componentId: "sc-1clh4a2-4"
34
+ })(["cursor:pointer;position:absolute;color:", ";right:48px;padding-left:16px;svg{fill:", ";}@media (max-width:", "){top:16px;right:16px;}"], _colors.Neutral.B40, _colors.Neutral.B40, Breakpoints.large);
35
+ exports.StyledFixedCloseIconWrapper = StyledFixedCloseIconWrapper;
@@ -7,3 +7,4 @@ export declare const WithOverflowContent: any;
7
7
  export declare const WithLockedScrollableBackdrop: any;
8
8
  export declare const WithSpinner: any;
9
9
  export declare const WithCustomActions: any;
10
+ export declare const WithNumberInputAndTooltip: any;
@@ -5,6 +5,7 @@ export declare type TooltipProps = {
5
5
  preferredPosition?: TooltipPosition;
6
6
  children: React.ReactNode;
7
7
  content: React.ReactNode;
8
+ zIndex?: number;
8
9
  };
9
- export declare const Tooltip: ({ children, content, preferredPosition, }: TooltipProps) => JSX.Element;
10
+ export declare const Tooltip: ({ children, content, preferredPosition, zIndex, }: TooltipProps) => JSX.Element;
10
11
  export {};
@@ -58,7 +58,8 @@ var Tooltip = function Tooltip(_ref) {
58
58
  var children = _ref.children,
59
59
  content = _ref.content,
60
60
  _ref$preferredPositio = _ref.preferredPosition,
61
- preferredPosition = _ref$preferredPositio === void 0 ? defaultPosition : _ref$preferredPositio;
61
+ preferredPosition = _ref$preferredPositio === void 0 ? defaultPosition : _ref$preferredPositio,
62
+ zIndex = _ref.zIndex;
62
63
  var tooltipRef = (0, _react.useRef)(null);
63
64
  var elRef = (0, _react.useRef)(null);
64
65
  var tooltipPositionsHandlerRef = (0, _react.useRef)(null);
@@ -128,6 +129,7 @@ var Tooltip = function Tooltip(_ref) {
128
129
  }, children), isActive && /*#__PURE__*/_react["default"].createElement(_Portal.Portal, null, /*#__PURE__*/_react["default"].createElement(_TooltipStyle.StyledTooltip, {
129
130
  "data-position": position,
130
131
  ref: tooltipRef,
132
+ zIndex: zIndex,
131
133
  style: {
132
134
  top: (toolTipCoord == null ? void 0 : toolTipCoord.top) + 'px',
133
135
  left: (toolTipCoord == null ? void 0 : toolTipCoord.left) + 'px',
@@ -1,3 +1,5 @@
1
1
  export declare const StyledTooltipContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const StyledTooltip: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const StyledTooltip: import("styled-components").StyledComponent<"div", any, {
3
+ zIndex?: number;
4
+ }, never>;
3
5
  export declare const StyledTooltipArrow: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -18,12 +18,14 @@ var background = _colors.Neutral.B18;
18
18
  var StyledTooltipContainer = _styledComponents["default"].div.withConfig({
19
19
  displayName: "TooltipStyle__StyledTooltipContainer",
20
20
  componentId: "sc-37e5z7-0"
21
- })(["display:inline-block;position:relative;*{display:block;}"]);
21
+ })(["display:inline-block;position:relative;> svg{display:block;}"]);
22
22
  exports.StyledTooltipContainer = StyledTooltipContainer;
23
23
  var StyledTooltip = _styledComponents["default"].div.withConfig({
24
24
  displayName: "TooltipStyle__StyledTooltip",
25
25
  componentId: "sc-37e5z7-1"
26
- })(["position:fixed;text-align:left;height:fit-content;width:fit-content;max-width:320px;border-radius:", ";gap:10px;left:50%;transform:translateX(-50%);padding:", " ", ";color:", ";background:", ";z-index:100;overflow-wrap:break-word;line-height:1;&[data-position='top-left'],&[data-position='bottom-left']{transform:translateX( calc(100% * -1 + ", " + ", ") );}&[data-position='top-right'],&[data-position='bottom-right']{transform:translateX(calc((", " + ", ") * -1));}&[data-position='right-middle']{transform:translateX(0) translateY(-50%);}&[data-position='left-bottom'],&[data-position='right-bottom']{transform:translateY(calc((", " + ", ") * -1));}&[data-position='left-top'],&[data-position='right-top']{transform:translateY( calc(100% * -1 + (", " + ", ")) );}&[data-position='bottom-center'],&[data-position='bottom-left'],&[data-position='bottom-right']{top:calc((100% + ", "));}&[data-position='left-middle']{transform:translateX(0) translateY(-50%);}&[data-position='top-center'] .arrow,&[data-position='top-left'] .arrow,&[data-position='top-right'] .arrow{top:100%;border-top-color:", ";}&[data-position='top-left'] .arrow,&[data-position='bottom-left'] .arrow{left:calc(100% - ", " - ", ");}&[data-position='top-right'] .arrow,&[data-position='bottom-right'] .arrow{left:calc(", " + ", ");}&[data-position='right-middle'] .arrow,&[data-position='right-top'] .arrow,&[data-position='right-bottom'] .arrow{top:50%;left:calc(", " * -1);border-right-color:", ";}&[data-position='right-middle'] .arrow{transform:translateX(0) translateY(-50%);}&[data-position='left-bottom'] .arrow,&[data-position='right-bottom'] .arrow{top:", ";}&[data-position='bottom-center'] .arrow,&[data-position='bottom-left'] .arrow,&[data-position='bottom-right'] .arrow{bottom:100%;border-bottom-color:", ";}&[data-position='left-middle'] .arrow,&[data-position='left-top'] .arrow,&[data-position='left-bottom'] .arrow{left:auto;right:calc(", " * -2);border-left-color:", ";}&[data-position='left-middle'] .arrow{top:50%;transform:translateX(0) translateY(-50%);}&[data-position='left-top'] .arrow,&[data-position='right-top'] .arrow{top:unset;bottom:", ";}@media (max-width:", "){min-width:69px;}"], _borderRadius.borderRadius2, _spacing.space8, _spacing.space12, _colors.Neutral.B100, background, arrowSize, nonCentralArrowMargin, arrowSize, nonCentralArrowMargin, nonCentralArrowMargin, arrowSize, nonCentralArrowMargin, arrowSize, verticalMargin, background, arrowSize, nonCentralArrowMargin, arrowSize, nonCentralArrowMargin, arrowSize, background, nonCentralArrowMargin, background, arrowSize, background, nonCentralArrowMargin, Breakpoints.large);
26
+ })(["position:fixed;text-align:left;height:fit-content;width:fit-content;max-width:320px;border-radius:", ";gap:10px;left:50%;transform:translateX(-50%);padding:", " ", ";color:", ";background:", ";overflow-wrap:break-word;line-height:1;z-index:", ";&[data-position='top-left'],&[data-position='bottom-left']{transform:translateX( calc(100% * -1 + ", " + ", ") );}&[data-position='top-right'],&[data-position='bottom-right']{transform:translateX(calc((", " + ", ") * -1));}&[data-position='right-middle']{transform:translateX(0) translateY(-50%);}&[data-position='left-bottom'],&[data-position='right-bottom']{transform:translateY(calc((", " + ", ") * -1));}&[data-position='left-top'],&[data-position='right-top']{transform:translateY( calc(100% * -1 + (", " + ", ")) );}&[data-position='bottom-center'],&[data-position='bottom-left'],&[data-position='bottom-right']{top:calc((100% + ", "));}&[data-position='left-middle']{transform:translateX(0) translateY(-50%);}&[data-position='top-center'] .arrow,&[data-position='top-left'] .arrow,&[data-position='top-right'] .arrow{top:100%;border-top-color:", ";}&[data-position='top-left'] .arrow,&[data-position='bottom-left'] .arrow{left:calc(100% - ", " - ", ");}&[data-position='top-right'] .arrow,&[data-position='bottom-right'] .arrow{left:calc(", " + ", ");}&[data-position='right-middle'] .arrow,&[data-position='right-top'] .arrow,&[data-position='right-bottom'] .arrow{top:50%;left:calc(", " * -1);border-right-color:", ";}&[data-position='right-middle'] .arrow{transform:translateX(0) translateY(-50%);}&[data-position='left-bottom'] .arrow,&[data-position='right-bottom'] .arrow{top:", ";}&[data-position='bottom-center'] .arrow,&[data-position='bottom-left'] .arrow,&[data-position='bottom-right'] .arrow{bottom:100%;border-bottom-color:", ";}&[data-position='left-middle'] .arrow,&[data-position='left-top'] .arrow,&[data-position='left-bottom'] .arrow{left:auto;right:calc(", " * -2);border-left-color:", ";}&[data-position='left-middle'] .arrow{top:50%;transform:translateX(0) translateY(-50%);}&[data-position='left-top'] .arrow,&[data-position='right-top'] .arrow{top:unset;bottom:", ";}@media (max-width:", "){min-width:69px;}"], _borderRadius.borderRadius2, _spacing.space8, _spacing.space12, _colors.Neutral.B100, background, function (props) {
27
+ return props.zIndex ? props.zIndex : 100;
28
+ }, arrowSize, nonCentralArrowMargin, arrowSize, nonCentralArrowMargin, nonCentralArrowMargin, arrowSize, nonCentralArrowMargin, arrowSize, verticalMargin, background, arrowSize, nonCentralArrowMargin, arrowSize, nonCentralArrowMargin, arrowSize, background, nonCentralArrowMargin, background, arrowSize, background, nonCentralArrowMargin, Breakpoints.large);
27
29
  exports.StyledTooltip = StyledTooltip;
28
30
  var StyledTooltipArrow = _styledComponents["default"].div.withConfig({
29
31
  displayName: "TooltipStyle__StyledTooltipArrow",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glints-aries",
3
- "version": "4.0.249",
3
+ "version": "4.0.251",
4
4
  "description": "Glints ui-kit for frontend",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",