glints-aries 4.0.206 → 4.0.208
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/es/@next/Banner/Banner.js +2 -2
- package/es/@next/Banner/BannerStyle.d.ts +1 -0
- package/es/@next/Banner/BannerStyle.js +6 -1
- package/es/@next/Checkbox/Checkbox.d.ts +2 -2
- package/es/@next/Modal/Modal.d.ts +2 -2
- package/es/@next/Modal/Modal.js +7 -3
- package/lib/@next/Banner/Banner.js +1 -1
- package/lib/@next/Banner/BannerStyle.d.ts +1 -0
- package/lib/@next/Banner/BannerStyle.js +8 -2
- package/lib/@next/Checkbox/Checkbox.d.ts +2 -2
- package/lib/@next/Modal/Modal.d.ts +2 -2
- package/lib/@next/Modal/Modal.js +7 -3
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import { ButtonGroup } from '../ButtonGroup';
|
|
6
6
|
import { Icon } from '../Icon';
|
|
7
7
|
import { Typography } from '../Typography';
|
|
8
|
-
import { StyledBanner, StyledBannerContentContainer, StyledBannerTitleContainer, StyledCloseIconWrapper } from './BannerStyle';
|
|
8
|
+
import { StyledBanner, StyledBannerContentContainer, StyledBannerTitle, StyledBannerTitleContainer, StyledCloseIconWrapper } from './BannerStyle';
|
|
9
9
|
var iconNameStatusMap = {
|
|
10
10
|
success: 'ri-checkbox-circle-fill',
|
|
11
11
|
info: 'ri-information-fill',
|
|
@@ -34,7 +34,7 @@ export var Banner = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
|
|
|
34
34
|
"data-status": status
|
|
35
35
|
}, props), /*#__PURE__*/React.createElement(StyledBannerTitleContainer, null, /*#__PURE__*/React.createElement(Icon, {
|
|
36
36
|
name: iconNameValue
|
|
37
|
-
}), /*#__PURE__*/React.createElement(
|
|
37
|
+
}), title && /*#__PURE__*/React.createElement(StyledBannerTitle, null, /*#__PURE__*/React.createElement(Typography, {
|
|
38
38
|
as: "span",
|
|
39
39
|
variant: "subtitle1"
|
|
40
40
|
}, title)), dismissable && /*#__PURE__*/React.createElement(StyledCloseIconWrapper, {
|
|
@@ -2,3 +2,4 @@ export declare const StyledCloseIconWrapper: import("styled-components").StyledC
|
|
|
2
2
|
export declare const StyledBanner: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const StyledBannerContentContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const StyledBannerTitleContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const StyledBannerTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -2,6 +2,7 @@ import styled from 'styled-components';
|
|
|
2
2
|
import * as Breakpoints from '../utilities/breakpoints';
|
|
3
3
|
import { borderRadius8 } from '../utilities/borderRadius';
|
|
4
4
|
import { Blue, Green, Neutral, Orange, Red } from '../utilities/colors';
|
|
5
|
+
import { space4 } from '../utilities/spacing';
|
|
5
6
|
export var StyledCloseIconWrapper = styled.div.withConfig({
|
|
6
7
|
displayName: "BannerStyle__StyledCloseIconWrapper",
|
|
7
8
|
componentId: "sc-1suv683-0"
|
|
@@ -17,4 +18,8 @@ export var StyledBannerContentContainer = styled.div.withConfig({
|
|
|
17
18
|
export var StyledBannerTitleContainer = styled.div.withConfig({
|
|
18
19
|
displayName: "BannerStyle__StyledBannerTitleContainer",
|
|
19
20
|
componentId: "sc-1suv683-3"
|
|
20
|
-
})(["position:relative;"]);
|
|
21
|
+
})(["position:relative;"]);
|
|
22
|
+
export var StyledBannerTitle = styled.div.withConfig({
|
|
23
|
+
displayName: "BannerStyle__StyledBannerTitle",
|
|
24
|
+
componentId: "sc-1suv683-4"
|
|
25
|
+
})(["margin-bottom:", ";padding-left:40px;button{margin-top:10px;}"], space4);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> {
|
|
3
3
|
id?: string;
|
|
4
|
-
label?:
|
|
4
|
+
label?: ReactNode;
|
|
5
5
|
hasError?: boolean;
|
|
6
6
|
indeterminate?: boolean;
|
|
7
7
|
checked?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentAction } from '../../types/componentAction';
|
|
3
|
-
export
|
|
3
|
+
export interface ModalProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
isOpen?: boolean;
|
|
5
5
|
header?: string;
|
|
6
6
|
headerDescription?: string;
|
|
@@ -19,5 +19,5 @@ export declare type ModalProps = {
|
|
|
19
19
|
closeOnClickOutside?: boolean;
|
|
20
20
|
onClose?: () => void;
|
|
21
21
|
onBack?: () => void;
|
|
22
|
-
}
|
|
22
|
+
}
|
|
23
23
|
export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
|
package/es/@next/Modal/Modal.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["isOpen", "header", "headerDescription", "children", "secondaryAction", "primaryAction", "customActions", "showBackButton", "showCloseButton", "showHeaderBorder", "closeOnClickOutside", "onClose", "onBack"];
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import { Button, PrimaryButton } from '../Button';
|
|
3
6
|
import { ButtonGroup } from '../ButtonGroup';
|
|
@@ -20,7 +23,8 @@ export var Modal = /*#__PURE__*/React.forwardRef(function Modal(_ref, ref) {
|
|
|
20
23
|
showHeaderBorder = _ref$showHeaderBorder === void 0 ? true : _ref$showHeaderBorder,
|
|
21
24
|
closeOnClickOutside = _ref.closeOnClickOutside,
|
|
22
25
|
onClose = _ref.onClose,
|
|
23
|
-
onBack = _ref.onBack
|
|
26
|
+
onBack = _ref.onBack,
|
|
27
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
24
28
|
if (!isOpen) {
|
|
25
29
|
return null;
|
|
26
30
|
}
|
|
@@ -49,12 +53,12 @@ export var Modal = /*#__PURE__*/React.forwardRef(function Modal(_ref, ref) {
|
|
|
49
53
|
onClick: function onClick() {
|
|
50
54
|
return handleClickOutside();
|
|
51
55
|
}
|
|
52
|
-
}, /*#__PURE__*/React.createElement(StyledModalContainer, {
|
|
56
|
+
}, /*#__PURE__*/React.createElement(StyledModalContainer, _extends({
|
|
53
57
|
ref: ref,
|
|
54
58
|
onClick: function onClick(e) {
|
|
55
59
|
return e.stopPropagation();
|
|
56
60
|
}
|
|
57
|
-
}, header && /*#__PURE__*/React.createElement(StyledModalHeader, {
|
|
61
|
+
}, props), header && /*#__PURE__*/React.createElement(StyledModalHeader, {
|
|
58
62
|
"data-show-border": showHeaderBorder
|
|
59
63
|
}, showBackButton && /*#__PURE__*/React.createElement(StyledButtonContainer, null, /*#__PURE__*/React.createElement(StyledModalBackButton, {
|
|
60
64
|
"data-testid": "modal-back-btn",
|
|
@@ -39,7 +39,7 @@ var Banner = /*#__PURE__*/_react["default"].forwardRef(function Banner(_ref, ref
|
|
|
39
39
|
"data-status": status
|
|
40
40
|
}, props), /*#__PURE__*/_react["default"].createElement(_BannerStyle.StyledBannerTitleContainer, null, /*#__PURE__*/_react["default"].createElement(_Icon.Icon, {
|
|
41
41
|
name: iconNameValue
|
|
42
|
-
}), /*#__PURE__*/_react["default"].createElement(_BannerStyle.
|
|
42
|
+
}), title && /*#__PURE__*/_react["default"].createElement(_BannerStyle.StyledBannerTitle, null, /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
|
|
43
43
|
as: "span",
|
|
44
44
|
variant: "subtitle1"
|
|
45
45
|
}, title)), dismissable && /*#__PURE__*/_react["default"].createElement(_BannerStyle.StyledCloseIconWrapper, {
|
|
@@ -2,3 +2,4 @@ export declare const StyledCloseIconWrapper: import("styled-components").StyledC
|
|
|
2
2
|
export declare const StyledBanner: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const StyledBannerContentContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const StyledBannerTitleContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const StyledBannerTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
|
-
exports.StyledCloseIconWrapper = exports.StyledBannerTitleContainer = exports.StyledBannerContentContainer = exports.StyledBanner = void 0;
|
|
5
|
+
exports.StyledCloseIconWrapper = exports.StyledBannerTitleContainer = exports.StyledBannerTitle = exports.StyledBannerContentContainer = exports.StyledBanner = void 0;
|
|
6
6
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
7
7
|
var Breakpoints = _interopRequireWildcard(require("../utilities/breakpoints"));
|
|
8
8
|
var _borderRadius = require("../utilities/borderRadius");
|
|
9
9
|
var _colors = require("../utilities/colors");
|
|
10
|
+
var _spacing = require("../utilities/spacing");
|
|
10
11
|
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); }
|
|
11
12
|
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
13
|
var StyledCloseIconWrapper = _styledComponents["default"].div.withConfig({
|
|
@@ -28,4 +29,9 @@ var StyledBannerTitleContainer = _styledComponents["default"].div.withConfig({
|
|
|
28
29
|
displayName: "BannerStyle__StyledBannerTitleContainer",
|
|
29
30
|
componentId: "sc-1suv683-3"
|
|
30
31
|
})(["position:relative;"]);
|
|
31
|
-
exports.StyledBannerTitleContainer = StyledBannerTitleContainer;
|
|
32
|
+
exports.StyledBannerTitleContainer = StyledBannerTitleContainer;
|
|
33
|
+
var StyledBannerTitle = _styledComponents["default"].div.withConfig({
|
|
34
|
+
displayName: "BannerStyle__StyledBannerTitle",
|
|
35
|
+
componentId: "sc-1suv683-4"
|
|
36
|
+
})(["margin-bottom:", ";padding-left:40px;button{margin-top:10px;}"], _spacing.space4);
|
|
37
|
+
exports.StyledBannerTitle = StyledBannerTitle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> {
|
|
3
3
|
id?: string;
|
|
4
|
-
label?:
|
|
4
|
+
label?: ReactNode;
|
|
5
5
|
hasError?: boolean;
|
|
6
6
|
indeterminate?: boolean;
|
|
7
7
|
checked?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentAction } from '../../types/componentAction';
|
|
3
|
-
export
|
|
3
|
+
export interface ModalProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
isOpen?: boolean;
|
|
5
5
|
header?: string;
|
|
6
6
|
headerDescription?: string;
|
|
@@ -19,5 +19,5 @@ export declare type ModalProps = {
|
|
|
19
19
|
closeOnClickOutside?: boolean;
|
|
20
20
|
onClose?: () => void;
|
|
21
21
|
onBack?: () => void;
|
|
22
|
-
}
|
|
22
|
+
}
|
|
23
23
|
export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
|
package/lib/@next/Modal/Modal.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports.Modal = void 0;
|
|
6
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
6
8
|
var _react = _interopRequireDefault(require("react"));
|
|
7
9
|
var _Button = require("../Button");
|
|
8
10
|
var _ButtonGroup = require("../ButtonGroup");
|
|
@@ -10,6 +12,7 @@ var _Icon = require("../Icon");
|
|
|
10
12
|
var _Portal = require("../Portal/Portal");
|
|
11
13
|
var _Typography = require("../Typography");
|
|
12
14
|
var _ModalStyle = require("./ModalStyle");
|
|
15
|
+
var _excluded = ["isOpen", "header", "headerDescription", "children", "secondaryAction", "primaryAction", "customActions", "showBackButton", "showCloseButton", "showHeaderBorder", "closeOnClickOutside", "onClose", "onBack"];
|
|
13
16
|
var Modal = /*#__PURE__*/_react["default"].forwardRef(function Modal(_ref, ref) {
|
|
14
17
|
var isOpen = _ref.isOpen,
|
|
15
18
|
header = _ref.header,
|
|
@@ -25,7 +28,8 @@ var Modal = /*#__PURE__*/_react["default"].forwardRef(function Modal(_ref, ref)
|
|
|
25
28
|
showHeaderBorder = _ref$showHeaderBorder === void 0 ? true : _ref$showHeaderBorder,
|
|
26
29
|
closeOnClickOutside = _ref.closeOnClickOutside,
|
|
27
30
|
onClose = _ref.onClose,
|
|
28
|
-
onBack = _ref.onBack
|
|
31
|
+
onBack = _ref.onBack,
|
|
32
|
+
props = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
29
33
|
if (!isOpen) {
|
|
30
34
|
return null;
|
|
31
35
|
}
|
|
@@ -54,12 +58,12 @@ var Modal = /*#__PURE__*/_react["default"].forwardRef(function Modal(_ref, ref)
|
|
|
54
58
|
onClick: function onClick() {
|
|
55
59
|
return handleClickOutside();
|
|
56
60
|
}
|
|
57
|
-
}, /*#__PURE__*/_react["default"].createElement(_ModalStyle.StyledModalContainer, {
|
|
61
|
+
}, /*#__PURE__*/_react["default"].createElement(_ModalStyle.StyledModalContainer, (0, _extends2["default"])({
|
|
58
62
|
ref: ref,
|
|
59
63
|
onClick: function onClick(e) {
|
|
60
64
|
return e.stopPropagation();
|
|
61
65
|
}
|
|
62
|
-
}, header && /*#__PURE__*/_react["default"].createElement(_ModalStyle.StyledModalHeader, {
|
|
66
|
+
}, props), header && /*#__PURE__*/_react["default"].createElement(_ModalStyle.StyledModalHeader, {
|
|
63
67
|
"data-show-border": showHeaderBorder
|
|
64
68
|
}, showBackButton && /*#__PURE__*/_react["default"].createElement(_ModalStyle.StyledButtonContainer, null, /*#__PURE__*/_react["default"].createElement(_ModalStyle.StyledModalBackButton, {
|
|
65
69
|
"data-testid": "modal-back-btn",
|