@zohodesk/dot 1.0.0-beta.254 → 1.0.0-beta.256
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 +15 -3
- package/assets/Appearance/dark/mode/dotDarkMode.module.css +11 -0
- package/assets/Appearance/default/mode/dotDefaultMode.module.css +11 -0
- package/assets/Appearance/pureDark/mode/dotPureDarkMode.module.css +11 -0
- package/es/Drawer/Drawer.js +2 -3
- package/es/FreezeLayer/useFreezeLayer.js +0 -2
- package/es/TagWithIcon/TagWithIcon.js +41 -0
- package/es/TagWithIcon/TagWithIcon.module.css +56 -0
- package/es/TagWithIcon/props/defaultProps.js +8 -0
- package/es/TagWithIcon/props/propTypes.js +12 -0
- package/es/version2/AlertClose/AlertClose.js +2 -1
- package/lib/Drawer/Drawer.js +2 -3
- package/lib/FreezeLayer/useFreezeLayer.js +0 -2
- package/lib/TagWithIcon/TagWithIcon.js +71 -0
- package/lib/TagWithIcon/TagWithIcon.module.css +56 -0
- package/lib/TagWithIcon/props/defaultProps.js +15 -0
- package/lib/TagWithIcon/props/propTypes.js +20 -0
- package/lib/version2/AlertClose/AlertClose.js +2 -1
- package/package.json +2 -2
- package/es/common/dot_docStyle.module.css +0 -35
- package/lib/common/dot_docStyle.module.css +0 -35
package/README.md
CHANGED
|
@@ -2,14 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
+
# 1.0.0-beta.256
|
|
6
|
+
|
|
7
|
+
- **Drawer** - CancelBubblingEffect reverted coz that produces many issues.
|
|
8
|
+
|
|
9
|
+
# 1.0.0-beta.255
|
|
10
|
+
|
|
11
|
+
- **TagWithIcon** - New component Added.
|
|
12
|
+
|
|
13
|
+
- **FreezeLayer** - cancel click preventing issue solved.
|
|
14
|
+
|
|
5
15
|
# 1.0.0-beta.254
|
|
6
16
|
|
|
7
|
-
- Contrast option implemented through preprocess. Category key value added for all color variables.
|
|
8
|
-
|
|
17
|
+
- `Contrast` option implemented through preprocess. Category key value added for all color variables.
|
|
18
|
+
|
|
19
|
+
- BoxShadow Values Separated for Contrast.
|
|
9
20
|
|
|
10
21
|
# 1.0.0-beta.253
|
|
11
22
|
|
|
12
|
-
- **FreezeLayer** - onClick event issue solved
|
|
23
|
+
- **FreezeLayer** - onClick event issue solved.
|
|
24
|
+
|
|
13
25
|
- cancelBubblingEffect function replaced to all stopPropagation used placed
|
|
14
26
|
|
|
15
27
|
# 1.0.0-beta.252
|
|
@@ -528,4 +528,15 @@
|
|
|
528
528
|
--zdt_separator_default_text: hsla(216, 23%, calc(32% + var(--zd_dark_default_inverse_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
529
529
|
--zdt_separator_primary_text: var(--zdt_cta_primary_text);
|
|
530
530
|
--zdt_separator_secondary_text: hsla(210, 7%, calc(89% + var(--zd_dark_default_inverse_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
531
|
+
|
|
532
|
+
/* tag with icon */
|
|
533
|
+
--zdt_tagWithIconGrey_bg: rgba(255, 255, 255, 0.03);
|
|
534
|
+
--zdt_tagWithIconGrey_border: hsla(0, calc(0 * 1%), calc(100% + var(--zd_dark_default_inverse_medium_lValue)), calc( 0.2 + var(--zd_alpha_low)));
|
|
535
|
+
--zdt_tagWithIconGrey_text: hsla(210, 7%, calc(89% + var(--zd_dark_default_inverse_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
536
|
+
--zdt_tagWithIconBlue_bg: hsla(215, 28%, calc(20% + var(--zd_dark_darker_lowest_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
537
|
+
--zdt_tagWithIconBlue_border: hsla(213, 40%, calc(29% + var(--zd_dark_default_inverse_low_lValue)), calc(1 + var(--zd_alpha_low)));
|
|
538
|
+
--zdt_tagWithIconBlue_text: hsla(212, 100%, calc(64% + var(--zd_dark_default_inverse_low_lValue)), calc(1 + var(--zd_alpha_low)));
|
|
539
|
+
--zdt_tagWithIconYellow_bg: hsla(215, 12%, calc(20% + var(--zd_dark_darker_lowest_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
540
|
+
--zdt_tagWithIconYellow_border: hsla(35, 18%, calc(29% + var(--zd_dark_default_inverse_low_lValue)), calc(1 + var(--zd_alpha_low)));
|
|
541
|
+
--zdt_tagWithIconYellow_text: hsla(37, 91%, calc(61% + var(--zd_dark_default_inverse_low_lValue)), calc(1 + var(--zd_alpha_low)));
|
|
531
542
|
}
|
|
@@ -528,4 +528,15 @@
|
|
|
528
528
|
--zdt_separator_default_text: hsla(0, calc(0 * 1%), calc(79% + var(--zd_default_default_inverse_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
529
529
|
--zdt_separator_primary_text: var(--zdt_cta_primary_text);
|
|
530
530
|
--zdt_separator_secondary_text: hsla(0, calc(0 * 1%), calc(0% + var(--zd_default_default_inverse_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
531
|
+
|
|
532
|
+
/* tag with icon */
|
|
533
|
+
--zdt_tagWithIconGrey_bg: var(--zdt_m_cta_grey_20_bg_ignore);
|
|
534
|
+
--zdt_tagWithIconGrey_border: var(--zdt_cta_grey_35_border);
|
|
535
|
+
--zdt_tagWithIconGrey_text: hsla(0, calc(0 * 1%), calc(0% + var(--zd_default_default_inverse_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
536
|
+
--zdt_tagWithIconBlue_bg: hsla(213, 85%, calc(95% + var(--zd_default_darker_lowest_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
537
|
+
--zdt_tagWithIconBlue_border: hsla(212, 83%, calc(86% + var(--zd_default_default_inverse_low_lValue)), calc(1 + var(--zd_alpha_low)));
|
|
538
|
+
--zdt_tagWithIconBlue_text: hsla(212, 92%, calc(48% + var(--zd_default_default_inverse_low_lValue)), calc(1 + var(--zd_alpha_low)));
|
|
539
|
+
--zdt_tagWithIconYellow_bg: hsla(49, 92%, calc(95% + var(--zd_default_darker_lowest_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
540
|
+
--zdt_tagWithIconYellow_border: hsla(49, 84%, calc(83% + var(--zd_default_default_inverse_low_lValue)), calc(1 + var(--zd_alpha_low)));
|
|
541
|
+
--zdt_tagWithIconYellow_text: hsla(29, 90%, calc(66% + var(--zd_default_default_inverse_low_lValue)), calc(1 + var(--zd_alpha_low)));
|
|
531
542
|
}
|
|
@@ -528,4 +528,15 @@
|
|
|
528
528
|
--zdt_separator_default_text: hsla(0, calc(0 * 1%), calc(35% + var(--zd_pureDark_default_inverse_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
529
529
|
--zdt_separator_primary_text: var(--zdt_cta_primary_text);
|
|
530
530
|
--zdt_separator_secondary_text: hsla(210, 7%, calc(89% + var(--zd_pureDark_default_inverse_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
531
|
+
|
|
532
|
+
/* tag with icon */
|
|
533
|
+
--zdt_tagWithIconGrey_bg: rgba(255, 255, 255, 0.03);
|
|
534
|
+
--zdt_tagWithIconGrey_border: hsla(0, calc(0 * 1%), calc(100% + var(--zd_pureDark_default_inverse_medium_lValue)), calc( 0.2 + var(--zd_alpha_low)));
|
|
535
|
+
--zdt_tagWithIconGrey_text: hsla(210, 7%, calc(89% + var(--zd_pureDark_default_inverse_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
536
|
+
--zdt_tagWithIconBlue_bg: hsla(215, 28%, calc(20% + var(--zd_pureDark_darker_lowest_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
537
|
+
--zdt_tagWithIconBlue_border: hsla(213, 40%, calc(29% + var(--zd_pureDark_default_inverse_low_lValue)), calc(1 + var(--zd_alpha_low)));
|
|
538
|
+
--zdt_tagWithIconBlue_text: hsla(212, 100%, calc(64% + var(--zd_pureDark_default_inverse_low_lValue)), calc(1 + var(--zd_alpha_low)));
|
|
539
|
+
--zdt_tagWithIconYellow_bg: hsla(215, 12%, calc(20% + var(--zd_pureDark_darker_lowest_lValue)), calc(1 + var(--zd_alpha_high)));
|
|
540
|
+
--zdt_tagWithIconYellow_border: hsla(35, 18%, calc(29% + var(--zd_pureDark_default_inverse_low_lValue)), calc(1 + var(--zd_alpha_low)));
|
|
541
|
+
--zdt_tagWithIconYellow_text: hsla(37, 91%, calc(61% + var(--zd_pureDark_default_inverse_low_lValue)), calc(1 + var(--zd_alpha_low)));
|
|
531
542
|
}
|
package/es/Drawer/Drawer.js
CHANGED
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { Header_defaultProps, Footer_defaultProps, Drawer_defaultProps } from './props/defaultProps';
|
|
3
3
|
import { Header_propTypes, Content_propTypes, Footer_propTypes, Drawer_propTypes } from './props/propTypes';
|
|
4
4
|
import FreezeLayer from '../FreezeLayer/FreezeLayer';
|
|
5
|
-
import { cancelBubblingEffect } from '@zohodesk/components/es/utils/Common';
|
|
6
5
|
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
7
6
|
import { Card, CardHeader, CardContent } from '@zohodesk/components/lib/Card';
|
|
8
7
|
import FormAction from '../FormAction/FormAction';
|
|
@@ -167,7 +166,7 @@ export default class Drawer extends React.Component {
|
|
|
167
166
|
eleRef: this.createRef
|
|
168
167
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
169
168
|
onClick: e => {
|
|
170
|
-
|
|
169
|
+
e && e.stopPropagation && e.stopPropagation();
|
|
171
170
|
onBodyClick(e);
|
|
172
171
|
}
|
|
173
172
|
}, childrenWithProps));
|
|
@@ -179,7 +178,7 @@ export default class Drawer extends React.Component {
|
|
|
179
178
|
}, /*#__PURE__*/React.createElement(ResponsiveSender, null, /*#__PURE__*/React.createElement(Container, {
|
|
180
179
|
className: styleByResolutions,
|
|
181
180
|
onClick: e => {
|
|
182
|
-
|
|
181
|
+
e && e.stopPropagation && e.stopPropagation();
|
|
183
182
|
}
|
|
184
183
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
185
184
|
flexible: true
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { defaultProps } from './props/defaultProps';
|
|
3
|
+
import { propTypes } from './props/propTypes';
|
|
4
|
+
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
5
|
+
import Icon from '@zohodesk/icons/es/Icon';
|
|
6
|
+
import style from './TagWithIcon.module.css';
|
|
7
|
+
export default class TagWithIcon extends React.Component {
|
|
8
|
+
render() {
|
|
9
|
+
const {
|
|
10
|
+
text,
|
|
11
|
+
iconName,
|
|
12
|
+
iconSize,
|
|
13
|
+
palette,
|
|
14
|
+
iconClass,
|
|
15
|
+
isBold,
|
|
16
|
+
size,
|
|
17
|
+
dataId,
|
|
18
|
+
className,
|
|
19
|
+
title
|
|
20
|
+
} = this.props;
|
|
21
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
22
|
+
isInline: true,
|
|
23
|
+
alignBox: "row",
|
|
24
|
+
align: "vertical",
|
|
25
|
+
isCover: false,
|
|
26
|
+
className: `${style.wrapper} ${style[palette]} ${style[size]} ${className}`,
|
|
27
|
+
dataId: dataId,
|
|
28
|
+
title: title
|
|
29
|
+
}, iconName ? /*#__PURE__*/React.createElement(Icon, {
|
|
30
|
+
name: iconName,
|
|
31
|
+
size: iconSize,
|
|
32
|
+
iconClass: `${text ? style.iconSpace : ''} ${iconClass} `
|
|
33
|
+
}) : null, text ? /*#__PURE__*/React.createElement(Box, {
|
|
34
|
+
shrink: true,
|
|
35
|
+
"data-title": text,
|
|
36
|
+
className: `${style.text} ${style[size]}_text ${isBold ? style.bold : ''}`
|
|
37
|
+
}, text) : null);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
TagWithIcon.propTypes = propTypes;
|
|
41
|
+
TagWithIcon.defaultProps = defaultProps;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.varClass {
|
|
2
|
+
--tag_bg_color: var(--zdt_tagWithIconGrey_bg);
|
|
3
|
+
--tag_text_color: var(--zdt_tagWithIconGrey_text);
|
|
4
|
+
--tag_border_color: var(--zdt_tagWithIconGrey_border);
|
|
5
|
+
--tag_small_fontSize: var(--zd_font_size10);
|
|
6
|
+
--tag_large_fontSize: var(--zd_font_size12);
|
|
7
|
+
}
|
|
8
|
+
.wrapper {
|
|
9
|
+
composes: varClass;
|
|
10
|
+
color: var(--tag_text_color);
|
|
11
|
+
background-color: var(--tag_bg_color);
|
|
12
|
+
}
|
|
13
|
+
.small,
|
|
14
|
+
.large {
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
height: var(--zd_size18);
|
|
17
|
+
}
|
|
18
|
+
.small, .large {
|
|
19
|
+
border: 1px solid;
|
|
20
|
+
border-color: var(--tag_border_color);
|
|
21
|
+
border-radius: var(--zd_size4);
|
|
22
|
+
padding: 0 var(--zd_size6);
|
|
23
|
+
}
|
|
24
|
+
.bold {
|
|
25
|
+
composes: semibold from '~@zohodesk/components/lib/common/common.module.css';
|
|
26
|
+
}
|
|
27
|
+
.small_text {
|
|
28
|
+
font-size: var(--tag_small_fontSize);
|
|
29
|
+
}
|
|
30
|
+
.large_text {
|
|
31
|
+
font-size: var(--tag_large_fontSize);
|
|
32
|
+
}
|
|
33
|
+
.text {
|
|
34
|
+
composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
|
|
35
|
+
}
|
|
36
|
+
[dir=ltr] .iconSpace{
|
|
37
|
+
margin-right: var(--zd_size4);
|
|
38
|
+
}
|
|
39
|
+
[dir=rtl] .iconSpace{
|
|
40
|
+
margin-left: var(--zd_size4);
|
|
41
|
+
}
|
|
42
|
+
.yellow {
|
|
43
|
+
--tag_bg_color: var(--zdt_tagWithIconYellow_bg);
|
|
44
|
+
--tag_text_color: var(--zdt_tagWithIconYellow_text);
|
|
45
|
+
--tag_border_color: var(--zdt_tagWithIconYellow_border);
|
|
46
|
+
}
|
|
47
|
+
.grey {
|
|
48
|
+
--tag_bg_color: var(--zdt_tagWithIconGrey_bg);
|
|
49
|
+
--tag_text_color: var(--zdt_tagWithIconGrey_text);
|
|
50
|
+
--tag_border_color: var(--zdt_tagWithIconGrey_border);
|
|
51
|
+
}
|
|
52
|
+
.blue {
|
|
53
|
+
--tag_bg_color: var(--zdt_tagWithIconBlue_bg);
|
|
54
|
+
--tag_text_color: var(--zdt_tagWithIconBlue_text);
|
|
55
|
+
--tag_border_color: var(--zdt_tagWithIconBlue_border);
|
|
56
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export const propTypes = {
|
|
3
|
+
iconClass: PropTypes.string,
|
|
4
|
+
iconName: PropTypes.string,
|
|
5
|
+
iconSize: PropTypes.string,
|
|
6
|
+
title: PropTypes.string,
|
|
7
|
+
isBold: PropTypes.bool,
|
|
8
|
+
palette: PropTypes.oneOf(['yellow', 'blue', 'grey']),
|
|
9
|
+
size: PropTypes.oneOf('small', 'large'),
|
|
10
|
+
className: PropTypes.string,
|
|
11
|
+
text: PropTypes.string
|
|
12
|
+
};
|
|
@@ -21,7 +21,8 @@ export default class AlertClose extends PureComponent {
|
|
|
21
21
|
align: "both",
|
|
22
22
|
isInline: true,
|
|
23
23
|
alignBox: "row",
|
|
24
|
-
isCover: false
|
|
24
|
+
isCover: false,
|
|
25
|
+
tabIndex: "0"
|
|
25
26
|
}, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Icon, {
|
|
26
27
|
name: "GC-cross",
|
|
27
28
|
isBold: true,
|
package/lib/Drawer/Drawer.js
CHANGED
|
@@ -9,7 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _defaultProps = require("./props/defaultProps");
|
|
10
10
|
var _propTypes = require("./props/propTypes");
|
|
11
11
|
var _FreezeLayer = _interopRequireDefault(require("../FreezeLayer/FreezeLayer"));
|
|
12
|
-
var _Common = require("@zohodesk/components/es/utils/Common");
|
|
13
12
|
var _Layout = require("@zohodesk/components/lib/Layout");
|
|
14
13
|
var _Card = require("@zohodesk/components/lib/Card");
|
|
15
14
|
var _FormAction = _interopRequireDefault(require("../FormAction/FormAction"));
|
|
@@ -222,7 +221,7 @@ var Drawer = /*#__PURE__*/function (_React$Component4) {
|
|
|
222
221
|
eleRef: this.createRef
|
|
223
222
|
}, /*#__PURE__*/_react["default"].createElement(_Card.Card, {
|
|
224
223
|
onClick: function onClick(e) {
|
|
225
|
-
|
|
224
|
+
e && e.stopPropagation && e.stopPropagation();
|
|
226
225
|
onBodyClick(e);
|
|
227
226
|
}
|
|
228
227
|
}, childrenWithProps));
|
|
@@ -234,7 +233,7 @@ var Drawer = /*#__PURE__*/function (_React$Component4) {
|
|
|
234
233
|
}, /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveSender, null, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
235
234
|
className: styleByResolutions,
|
|
236
235
|
onClick: function onClick(e) {
|
|
237
|
-
|
|
236
|
+
e && e.stopPropagation && e.stopPropagation();
|
|
238
237
|
}
|
|
239
238
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
240
239
|
flexible: true
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _defaultProps = require("./props/defaultProps");
|
|
10
|
+
var _propTypes = require("./props/propTypes");
|
|
11
|
+
var _Layout = require("@zohodesk/components/es/Layout");
|
|
12
|
+
var _Icon = _interopRequireDefault(require("@zohodesk/icons/es/Icon"));
|
|
13
|
+
var _TagWithIconModule = _interopRequireDefault(require("./TagWithIcon.module.css"));
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
17
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
21
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
22
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
23
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
24
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
26
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
27
|
+
var TagWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
28
|
+
_inherits(TagWithIcon, _React$Component);
|
|
29
|
+
var _super = _createSuper(TagWithIcon);
|
|
30
|
+
function TagWithIcon() {
|
|
31
|
+
_classCallCheck(this, TagWithIcon);
|
|
32
|
+
return _super.apply(this, arguments);
|
|
33
|
+
}
|
|
34
|
+
_createClass(TagWithIcon, [{
|
|
35
|
+
key: "render",
|
|
36
|
+
value: function render() {
|
|
37
|
+
var _this$props = this.props,
|
|
38
|
+
text = _this$props.text,
|
|
39
|
+
iconName = _this$props.iconName,
|
|
40
|
+
iconSize = _this$props.iconSize,
|
|
41
|
+
palette = _this$props.palette,
|
|
42
|
+
iconClass = _this$props.iconClass,
|
|
43
|
+
isBold = _this$props.isBold,
|
|
44
|
+
size = _this$props.size,
|
|
45
|
+
dataId = _this$props.dataId,
|
|
46
|
+
className = _this$props.className,
|
|
47
|
+
title = _this$props.title;
|
|
48
|
+
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
49
|
+
isInline: true,
|
|
50
|
+
alignBox: "row",
|
|
51
|
+
align: "vertical",
|
|
52
|
+
isCover: false,
|
|
53
|
+
className: "".concat(_TagWithIconModule["default"].wrapper, " ").concat(_TagWithIconModule["default"][palette], " ").concat(_TagWithIconModule["default"][size], " ").concat(className),
|
|
54
|
+
dataId: dataId,
|
|
55
|
+
title: title
|
|
56
|
+
}, iconName ? /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
57
|
+
name: iconName,
|
|
58
|
+
size: iconSize,
|
|
59
|
+
iconClass: "".concat(text ? _TagWithIconModule["default"].iconSpace : '', " ").concat(iconClass, " ")
|
|
60
|
+
}) : null, text ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
61
|
+
shrink: true,
|
|
62
|
+
"data-title": text,
|
|
63
|
+
className: "".concat(_TagWithIconModule["default"].text, " ").concat(_TagWithIconModule["default"][size], "_text ").concat(isBold ? _TagWithIconModule["default"].bold : '')
|
|
64
|
+
}, text) : null);
|
|
65
|
+
}
|
|
66
|
+
}]);
|
|
67
|
+
return TagWithIcon;
|
|
68
|
+
}(_react["default"].Component);
|
|
69
|
+
exports["default"] = TagWithIcon;
|
|
70
|
+
TagWithIcon.propTypes = _propTypes.propTypes;
|
|
71
|
+
TagWithIcon.defaultProps = _defaultProps.defaultProps;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.varClass {
|
|
2
|
+
--tag_bg_color: var(--zdt_tagWithIconGrey_bg);
|
|
3
|
+
--tag_text_color: var(--zdt_tagWithIconGrey_text);
|
|
4
|
+
--tag_border_color: var(--zdt_tagWithIconGrey_border);
|
|
5
|
+
--tag_small_fontSize: var(--zd_font_size10);
|
|
6
|
+
--tag_large_fontSize: var(--zd_font_size12);
|
|
7
|
+
}
|
|
8
|
+
.wrapper {
|
|
9
|
+
composes: varClass;
|
|
10
|
+
color: var(--tag_text_color);
|
|
11
|
+
background-color: var(--tag_bg_color);
|
|
12
|
+
}
|
|
13
|
+
.small,
|
|
14
|
+
.large {
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
height: var(--zd_size18);
|
|
17
|
+
}
|
|
18
|
+
.small, .large {
|
|
19
|
+
border: 1px solid;
|
|
20
|
+
border-color: var(--tag_border_color);
|
|
21
|
+
border-radius: var(--zd_size4);
|
|
22
|
+
padding: 0 var(--zd_size6);
|
|
23
|
+
}
|
|
24
|
+
.bold {
|
|
25
|
+
composes: semibold from '~@zohodesk/components/lib/common/common.module.css';
|
|
26
|
+
}
|
|
27
|
+
.small_text {
|
|
28
|
+
font-size: var(--tag_small_fontSize);
|
|
29
|
+
}
|
|
30
|
+
.large_text {
|
|
31
|
+
font-size: var(--tag_large_fontSize);
|
|
32
|
+
}
|
|
33
|
+
.text {
|
|
34
|
+
composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
|
|
35
|
+
}
|
|
36
|
+
[dir=ltr] .iconSpace{
|
|
37
|
+
margin-right: var(--zd_size4);
|
|
38
|
+
}
|
|
39
|
+
[dir=rtl] .iconSpace{
|
|
40
|
+
margin-left: var(--zd_size4);
|
|
41
|
+
}
|
|
42
|
+
.yellow {
|
|
43
|
+
--tag_bg_color: var(--zdt_tagWithIconYellow_bg);
|
|
44
|
+
--tag_text_color: var(--zdt_tagWithIconYellow_text);
|
|
45
|
+
--tag_border_color: var(--zdt_tagWithIconYellow_border);
|
|
46
|
+
}
|
|
47
|
+
.grey {
|
|
48
|
+
--tag_bg_color: var(--zdt_tagWithIconGrey_bg);
|
|
49
|
+
--tag_text_color: var(--zdt_tagWithIconGrey_text);
|
|
50
|
+
--tag_border_color: var(--zdt_tagWithIconGrey_border);
|
|
51
|
+
}
|
|
52
|
+
.blue {
|
|
53
|
+
--tag_bg_color: var(--zdt_tagWithIconBlue_bg);
|
|
54
|
+
--tag_text_color: var(--zdt_tagWithIconBlue_text);
|
|
55
|
+
--tag_border_color: var(--zdt_tagWithIconBlue_border);
|
|
56
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultProps = void 0;
|
|
7
|
+
var defaultProps = {
|
|
8
|
+
iconSize: '9',
|
|
9
|
+
size: 'large',
|
|
10
|
+
iconClass: '',
|
|
11
|
+
isBold: true,
|
|
12
|
+
palette: 'grey',
|
|
13
|
+
className: ''
|
|
14
|
+
};
|
|
15
|
+
exports.defaultProps = defaultProps;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.propTypes = void 0;
|
|
7
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
var propTypes = {
|
|
10
|
+
iconClass: _propTypes["default"].string,
|
|
11
|
+
iconName: _propTypes["default"].string,
|
|
12
|
+
iconSize: _propTypes["default"].string,
|
|
13
|
+
title: _propTypes["default"].string,
|
|
14
|
+
isBold: _propTypes["default"].bool,
|
|
15
|
+
palette: _propTypes["default"].oneOf(['yellow', 'blue', 'grey']),
|
|
16
|
+
size: _propTypes["default"].oneOf('small', 'large'),
|
|
17
|
+
className: _propTypes["default"].string,
|
|
18
|
+
text: _propTypes["default"].string
|
|
19
|
+
};
|
|
20
|
+
exports.propTypes = propTypes;
|
|
@@ -49,7 +49,8 @@ var AlertClose = /*#__PURE__*/function (_PureComponent) {
|
|
|
49
49
|
align: "both",
|
|
50
50
|
isInline: true,
|
|
51
51
|
alignBox: "row",
|
|
52
|
-
isCover: false
|
|
52
|
+
isCover: false,
|
|
53
|
+
tabIndex: "0"
|
|
53
54
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
54
55
|
name: "GC-cross",
|
|
55
56
|
isBold: true,
|
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
[data-mode='default']:global(.zd-contrast) {
|
|
2
|
-
color: #000;
|
|
3
|
-
background: #fff;
|
|
4
|
-
border-color: #000;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
[data-mode='dark']:global(.zd-contrast) {
|
|
8
|
-
color: #fff;
|
|
9
|
-
background-color: #101319;
|
|
10
|
-
border-color: #fff;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
[data-mode='pureDark']:global(.zd-contrast) {
|
|
14
|
-
color: #fff;
|
|
15
|
-
background-color: #080808;
|
|
16
|
-
border-color: #fff;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
:global(.zd-contrast) {
|
|
20
|
-
--zd_bs_contrast_outline: 0 0 2px var(--zdt_contrast_shadow);
|
|
21
|
-
--zd_bs_contrast_none: 0 0 0 transparent;
|
|
22
|
-
--zd_lightmode_grey_bg: -0%;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
:global(.zd-contrast-level1) {
|
|
26
|
-
--zd_contrastLevel: 10;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
:global(.zd-contrast-level2) {
|
|
30
|
-
--zd_contrastLevel: 20;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
:global(.zd-contrast-level3) {
|
|
34
|
-
--zd_contrastLevel: 40;
|
|
35
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
[data-mode='default']:global(.zd-contrast) {
|
|
2
|
-
color: #000;
|
|
3
|
-
background: #fff;
|
|
4
|
-
border-color: #000;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
[data-mode='dark']:global(.zd-contrast) {
|
|
8
|
-
color: #fff;
|
|
9
|
-
background-color: #101319;
|
|
10
|
-
border-color: #fff;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
[data-mode='pureDark']:global(.zd-contrast) {
|
|
14
|
-
color: #fff;
|
|
15
|
-
background-color: #080808;
|
|
16
|
-
border-color: #fff;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
:global(.zd-contrast) {
|
|
20
|
-
--zd_bs_contrast_outline: 0 0 2px var(--zdt_contrast_shadow);
|
|
21
|
-
--zd_bs_contrast_none: 0 0 0 transparent;
|
|
22
|
-
--zd_lightmode_grey_bg: -0%;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
:global(.zd-contrast-level1) {
|
|
26
|
-
--zd_contrastLevel: 10;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
:global(.zd-contrast-level2) {
|
|
30
|
-
--zd_contrastLevel: 20;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
:global(.zd-contrast-level3) {
|
|
34
|
-
--zd_contrastLevel: 40;
|
|
35
|
-
}
|