@zohodesk/dot 1.0.0-temp-187.19 → 1.0.0-temp-187.21
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 +12 -0
- package/es/form/fields/RadioField/RadioField.js +3 -3
- package/es/form/fields/ValidationMessage/ValidationMessage.js +57 -16
- package/es/form/fields/ValidationMessage/__tests__/__snapshots__/ValidationMessage.spec.js.snap +2 -2
- package/es/form/fields/ValidationMessage/props/defaultProps.js +2 -1
- package/es/form/fields/ValidationMessage/props/propTypes.js +18 -4
- package/es/list/status/StatusListItem/StatusListItem.js +4 -2
- package/es/list/status/StatusListItem/StatusListItem.module.css +12 -17
- package/lib/form/fields/RadioField/RadioField.js +3 -3
- package/lib/form/fields/ValidationMessage/ValidationMessage.js +73 -18
- package/lib/form/fields/ValidationMessage/__tests__/__snapshots__/ValidationMessage.spec.js.snap +2 -2
- package/lib/form/fields/ValidationMessage/props/defaultProps.js +2 -1
- package/lib/form/fields/ValidationMessage/props/propTypes.js +18 -4
- package/lib/list/status/StatusListItem/StatusListItem.js +4 -2
- package/lib/list/status/StatusListItem/StatusListItem.module.css +12 -17
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
+
# 1.8.5
|
|
6
|
+
|
|
7
|
+
- **RadioField**
|
|
8
|
+
- Focus using ref not working - Issue fixed
|
|
9
|
+
|
|
10
|
+
# 1.8.4
|
|
11
|
+
|
|
12
|
+
- **ValidationMessage**
|
|
13
|
+
- `renderLeftChildren`, `renderRightChildren`,`a11yAttributes`,`alignChildren`, `tagAttributes` & `id` prop supports added.
|
|
14
|
+
- Wrapper _Flex_ support ,`customProps` prop supports added.
|
|
15
|
+
- a11y prop removed
|
|
16
|
+
|
|
5
17
|
# 1.8.3
|
|
6
18
|
|
|
7
19
|
- **RadioField**
|
|
@@ -15,13 +15,13 @@ import style from "../Fields.module.css";
|
|
|
15
15
|
export default class RadioField extends PureComponent {
|
|
16
16
|
constructor(props) {
|
|
17
17
|
super(props);
|
|
18
|
+
this.handleChange = this.handleChange.bind(this);
|
|
19
|
+
this.updateData = this.updateData.bind(this);
|
|
20
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
18
21
|
this.data = {
|
|
19
22
|
radios: {},
|
|
20
23
|
focus: this.handleFocus
|
|
21
24
|
};
|
|
22
|
-
this.handleChange = this.handleChange.bind(this);
|
|
23
|
-
this.updateData = this.updateData.bind(this);
|
|
24
|
-
this.handleFocus = this.handleFocus.bind(this);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
componentDidMount() {
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { defaultProps } from "./props/defaultProps";
|
|
3
3
|
import { propTypes } from "./props/propTypes";
|
|
4
|
+
import Flex from '@zohodesk/layout/es/Flex/Flex';
|
|
5
|
+
import { renderNode, isRenderable } from '@zohodesk/utils';
|
|
4
6
|
import Label from '@zohodesk/components/es/Label/Label';
|
|
5
7
|
import colors from '@zohodesk/components/es/Label/LabelColors.module.css';
|
|
6
|
-
import style from "./ValidationMessage.module.css";
|
|
7
8
|
import { Icon } from '@zohodesk/icons';
|
|
9
|
+
import { DUMMY_OBJECT } from '@zohodesk/components/es/utils/Common';
|
|
10
|
+
import style from "./ValidationMessage.module.css";
|
|
8
11
|
export default class ValidationMessage extends React.Component {
|
|
12
|
+
constructor(props) {
|
|
13
|
+
super(props);
|
|
14
|
+
this.a11yMerged = {};
|
|
15
|
+
this.tagMerged = {};
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
render() {
|
|
10
19
|
let {
|
|
11
20
|
palette,
|
|
@@ -16,21 +25,52 @@ export default class ValidationMessage extends React.Component {
|
|
|
16
25
|
size,
|
|
17
26
|
dataId,
|
|
18
27
|
clipped,
|
|
19
|
-
|
|
28
|
+
alignChildren,
|
|
20
29
|
tooltip,
|
|
21
|
-
dataSelectorId
|
|
30
|
+
dataSelectorId,
|
|
31
|
+
renderLeftChildren,
|
|
32
|
+
renderRightChildren,
|
|
33
|
+
id,
|
|
34
|
+
customProps,
|
|
35
|
+
a11yAttributes,
|
|
36
|
+
tagAttributes,
|
|
37
|
+
customClass
|
|
22
38
|
} = this.props;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
const {
|
|
40
|
+
wrapper: wrapperProps
|
|
41
|
+
} = customProps || DUMMY_OBJECT;
|
|
42
|
+
const {
|
|
43
|
+
label: customLabelClass = '',
|
|
44
|
+
wrapper: customWrapperClass = ''
|
|
45
|
+
} = customClass || DUMMY_OBJECT;
|
|
46
|
+
const {
|
|
47
|
+
wrapper: wrapperA11y
|
|
48
|
+
} = a11yAttributes || DUMMY_OBJECT;
|
|
49
|
+
const {
|
|
50
|
+
wrapper: wrapperTagAttr
|
|
51
|
+
} = tagAttributes || DUMMY_OBJECT;
|
|
52
|
+
const isLeftChildrenRenderable = isRenderable(renderLeftChildren);
|
|
53
|
+
const isRightChildrenRenderable = isRenderable(renderRightChildren);
|
|
54
|
+
this.a11yMerged = {
|
|
55
|
+
wrapper: { ...wrapperA11y,
|
|
56
|
+
role: 'alert'
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
this.tagMerged = {
|
|
60
|
+
wrapper: { ...wrapperTagAttr,
|
|
61
|
+
'data-selector-id': dataSelectorId
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
return /*#__PURE__*/React.createElement(Flex, { ...wrapperProps,
|
|
65
|
+
$ui_alignItems: alignChildren,
|
|
66
|
+
$ui_displayMode: isRightChildrenRenderable || isLeftChildrenRenderable ? 'flex' : null,
|
|
67
|
+
$event_onClick: onClick,
|
|
68
|
+
testId: "errorMsgContainer",
|
|
69
|
+
customId: "errorMsgContainer",
|
|
70
|
+
$ui_className: `${type === 'primary' ? style.primary : style.secondary} ${customWrapperClass}`,
|
|
71
|
+
$a11yAttributes_container: this.a11yMerged.wrapper,
|
|
72
|
+
$tagAttributes_container: this.tagMerged.wrapper
|
|
73
|
+
}, renderNode(renderLeftChildren), /*#__PURE__*/React.createElement(Label, {
|
|
34
74
|
text: text,
|
|
35
75
|
htmlFor: htmlFor,
|
|
36
76
|
palette: palette,
|
|
@@ -38,14 +78,15 @@ export default class ValidationMessage extends React.Component {
|
|
|
38
78
|
dataId: dataId,
|
|
39
79
|
clipped: clipped,
|
|
40
80
|
title: clipped ? text : '',
|
|
41
|
-
customClass: style.lable
|
|
81
|
+
customClass: `${style.lable} ${customLabelClass}`,
|
|
82
|
+
id: id
|
|
42
83
|
}), tooltip ? /*#__PURE__*/React.createElement("span", {
|
|
43
84
|
className: `${style.icon} ${colors[palette]}`,
|
|
44
85
|
"data-title": tooltip
|
|
45
86
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
46
87
|
name: "ZD-information57",
|
|
47
88
|
size: "14"
|
|
48
|
-
})) : null);
|
|
89
|
+
})) : null, renderNode(renderRightChildren));
|
|
49
90
|
}
|
|
50
91
|
|
|
51
92
|
}
|
package/es/form/fields/ValidationMessage/__tests__/__snapshots__/ValidationMessage.spec.js.snap
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports[`ValidationMessage rendering the defult props 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<div
|
|
6
|
-
class="primary"
|
|
6
|
+
class="primary "
|
|
7
7
|
data-id="errorMsgContainer"
|
|
8
8
|
data-selector-id="validationMessage"
|
|
9
9
|
data-test-id="errorMsgContainer"
|
|
@@ -11,7 +11,7 @@ exports[`ValidationMessage rendering the defult props 1`] = `
|
|
|
11
11
|
>
|
|
12
12
|
<label
|
|
13
13
|
class="label title xsmall mandatory font_default
|
|
14
|
-
cursor lable
|
|
14
|
+
cursor lable "
|
|
15
15
|
data-id="label"
|
|
16
16
|
data-selector-id="label"
|
|
17
17
|
data-test-id="label"
|
|
@@ -6,11 +6,25 @@ export const propTypes = {
|
|
|
6
6
|
size: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large']),
|
|
7
7
|
text: PropTypes.string,
|
|
8
8
|
type: PropTypes.oneOf(['primary', 'secondary']),
|
|
9
|
-
a11y: PropTypes.shape({
|
|
10
|
-
role: PropTypes.string
|
|
11
|
-
}),
|
|
12
9
|
tooltip: PropTypes.string,
|
|
13
10
|
htmlFor: PropTypes.string,
|
|
14
11
|
dataId: PropTypes.string,
|
|
15
|
-
dataSelectorId: PropTypes.string
|
|
12
|
+
dataSelectorId: PropTypes.string,
|
|
13
|
+
renderLeftChildren: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
14
|
+
renderRightChildren: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
15
|
+
id: PropTypes.string,
|
|
16
|
+
alignChildren: PropTypes.oneOf(['start', 'center', 'end', 'baseline']),
|
|
17
|
+
customProps: PropTypes.shape({
|
|
18
|
+
wrapper: PropTypes.object
|
|
19
|
+
}),
|
|
20
|
+
tagAttributes: PropTypes.shape({
|
|
21
|
+
wrapper: PropTypes.object
|
|
22
|
+
}),
|
|
23
|
+
a11yAttributes: PropTypes.shape({
|
|
24
|
+
wrapper: PropTypes.object
|
|
25
|
+
}),
|
|
26
|
+
customClass: PropTypes.shape({
|
|
27
|
+
label: PropTypes.string,
|
|
28
|
+
wrapper: PropTypes.string
|
|
29
|
+
})
|
|
16
30
|
};
|
|
@@ -90,7 +90,7 @@ export default class StatusListItem extends React.Component {
|
|
|
90
90
|
"aria-label": ariaLabel,
|
|
91
91
|
"data-a11y-inset-focus": insetFocus,
|
|
92
92
|
isCover: false,
|
|
93
|
-
align: "
|
|
93
|
+
align: "vertical",
|
|
94
94
|
alignBox: "row",
|
|
95
95
|
className: `${style.list} ${style[size]} ${style[palette]} ${active ? style.active : highlight && !isDisabled ? style.hover : ''} ${autoHover && !isDisabled ? style.effect : ''} ${needTick ? style.withTick : ''} ${isDisabled ? CssProvider('isDisable') : ''} ${needBorder ? style.withBorder : ''} ${customClass}`,
|
|
96
96
|
dataId: String(value).replace("'", '_'),
|
|
@@ -102,6 +102,8 @@ export default class StatusListItem extends React.Component {
|
|
|
102
102
|
tabindex: isDisabled ? '-1' : '0',
|
|
103
103
|
...options,
|
|
104
104
|
...a11y
|
|
105
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
106
|
+
className: style.contentWrapper
|
|
105
107
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
106
108
|
className: `${style.statusType} ${style[bulletColor]}`
|
|
107
109
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
@@ -120,7 +122,7 @@ export default class StatusListItem extends React.Component {
|
|
|
120
122
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
121
123
|
name: "ZD-ticknew",
|
|
122
124
|
size: "8"
|
|
123
|
-
})) : null);
|
|
125
|
+
})) : null));
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
padding: var(--zd_size7) var(--zd_size20) ;
|
|
30
30
|
}
|
|
31
31
|
.large {
|
|
32
|
-
|
|
32
|
+
--statuslistitem_min_height: var(--zd_size48);
|
|
33
33
|
}
|
|
34
34
|
[dir=ltr] .large {
|
|
35
35
|
padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25) ;
|
|
@@ -94,25 +94,20 @@
|
|
|
94
94
|
[dir=rtl] .active.withTick {
|
|
95
95
|
padding-left: var(--zd_size39) ;
|
|
96
96
|
}
|
|
97
|
+
.contentWrapper {
|
|
98
|
+
composes: dflex flexrow alignVertical from '~@zohodesk/components/es/common/common.module.css';
|
|
99
|
+
width: 100% ;
|
|
100
|
+
}
|
|
97
101
|
/* Status Type */
|
|
98
|
-
/* .statusType {
|
|
99
|
-
--status_listitem_bullet_min_height: 8px;
|
|
100
|
-
--status_listitem_bullet_min_width: 8px;
|
|
101
|
-
height: var(--status_listitem_bullet_min_height);
|
|
102
|
-
width: var(--status_listitem_bullet_min_width);
|
|
103
|
-
border-radius: 50%;
|
|
104
|
-
margin-right: 13px;
|
|
105
|
-
} */
|
|
106
102
|
.statusType{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
min-width: var(--zd_size20) ;
|
|
103
|
+
position: relative;
|
|
104
|
+
composes: dflex alignVertical alignHorizontal from '~@zohodesk/components/es/common/common.module.css';
|
|
105
|
+
align-self: flex-start;
|
|
106
|
+
min-height: calc(var(--statuslistitem_font_size) * var(--statuslistitem_multiline_lineheight));
|
|
107
|
+
min-width: var(--zd_size20) ;
|
|
113
108
|
}
|
|
114
109
|
.statusType::after{
|
|
115
|
-
content: '
|
|
110
|
+
content: '';
|
|
116
111
|
--status_listitem_bullet_min_height: var(--zd_size8);
|
|
117
112
|
--status_listitem_bullet_min_width: var(--zd_size8);
|
|
118
113
|
height: var(--status_listitem_bullet_min_height);
|
|
@@ -136,4 +131,4 @@
|
|
|
136
131
|
}
|
|
137
132
|
.green.statusType::after {
|
|
138
133
|
background-color: var(--zdt_statuslistitem_green_bg);
|
|
139
|
-
}
|
|
134
|
+
}
|
|
@@ -70,13 +70,13 @@ var RadioField = /*#__PURE__*/function (_PureComponent) {
|
|
|
70
70
|
_classCallCheck(this, RadioField);
|
|
71
71
|
|
|
72
72
|
_this = _super.call(this, props);
|
|
73
|
+
_this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
|
|
74
|
+
_this.updateData = _this.updateData.bind(_assertThisInitialized(_this));
|
|
75
|
+
_this.handleFocus = _this.handleFocus.bind(_assertThisInitialized(_this));
|
|
73
76
|
_this.data = {
|
|
74
77
|
radios: {},
|
|
75
78
|
focus: _this.handleFocus
|
|
76
79
|
};
|
|
77
|
-
_this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
|
|
78
|
-
_this.updateData = _this.updateData.bind(_assertThisInitialized(_this));
|
|
79
|
-
_this.handleFocus = _this.handleFocus.bind(_assertThisInitialized(_this));
|
|
80
80
|
return _this;
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -13,16 +13,30 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
13
13
|
|
|
14
14
|
var _propTypes = require("./props/propTypes");
|
|
15
15
|
|
|
16
|
+
var _Flex = _interopRequireDefault(require("@zohodesk/layout/es/Flex/Flex"));
|
|
17
|
+
|
|
18
|
+
var _utils = require("@zohodesk/utils");
|
|
19
|
+
|
|
16
20
|
var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
|
|
17
21
|
|
|
18
22
|
var _LabelColorsModule = _interopRequireDefault(require("@zohodesk/components/es/Label/LabelColors.module.css"));
|
|
19
23
|
|
|
20
|
-
var _ValidationMessageModule = _interopRequireDefault(require("./ValidationMessage.module.css"));
|
|
21
|
-
|
|
22
24
|
var _icons = require("@zohodesk/icons");
|
|
23
25
|
|
|
26
|
+
var _Common = require("@zohodesk/components/es/utils/Common");
|
|
27
|
+
|
|
28
|
+
var _ValidationMessageModule = _interopRequireDefault(require("./ValidationMessage.module.css"));
|
|
29
|
+
|
|
24
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
31
|
|
|
32
|
+
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); }
|
|
33
|
+
|
|
34
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
35
|
+
|
|
36
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
37
|
+
|
|
38
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
|
+
|
|
26
40
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
41
|
|
|
28
42
|
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, descriptor.key, descriptor); } }
|
|
@@ -48,10 +62,15 @@ var ValidationMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
48
62
|
|
|
49
63
|
var _super = _createSuper(ValidationMessage);
|
|
50
64
|
|
|
51
|
-
function ValidationMessage() {
|
|
65
|
+
function ValidationMessage(props) {
|
|
66
|
+
var _this;
|
|
67
|
+
|
|
52
68
|
_classCallCheck(this, ValidationMessage);
|
|
53
69
|
|
|
54
|
-
|
|
70
|
+
_this = _super.call(this, props);
|
|
71
|
+
_this.a11yMerged = {};
|
|
72
|
+
_this.tagMerged = {};
|
|
73
|
+
return _this;
|
|
55
74
|
}
|
|
56
75
|
|
|
57
76
|
_createClass(ValidationMessage, [{
|
|
@@ -66,19 +85,54 @@ var ValidationMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
66
85
|
size = _this$props.size,
|
|
67
86
|
dataId = _this$props.dataId,
|
|
68
87
|
clipped = _this$props.clipped,
|
|
69
|
-
|
|
88
|
+
alignChildren = _this$props.alignChildren,
|
|
70
89
|
tooltip = _this$props.tooltip,
|
|
71
|
-
dataSelectorId = _this$props.dataSelectorId
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
90
|
+
dataSelectorId = _this$props.dataSelectorId,
|
|
91
|
+
renderLeftChildren = _this$props.renderLeftChildren,
|
|
92
|
+
renderRightChildren = _this$props.renderRightChildren,
|
|
93
|
+
id = _this$props.id,
|
|
94
|
+
customProps = _this$props.customProps,
|
|
95
|
+
a11yAttributes = _this$props.a11yAttributes,
|
|
96
|
+
tagAttributes = _this$props.tagAttributes,
|
|
97
|
+
customClass = _this$props.customClass;
|
|
98
|
+
|
|
99
|
+
var _ref = customProps || _Common.DUMMY_OBJECT,
|
|
100
|
+
wrapperProps = _ref.wrapper;
|
|
101
|
+
|
|
102
|
+
var _ref2 = customClass || _Common.DUMMY_OBJECT,
|
|
103
|
+
_ref2$label = _ref2.label,
|
|
104
|
+
customLabelClass = _ref2$label === void 0 ? '' : _ref2$label,
|
|
105
|
+
_ref2$wrapper = _ref2.wrapper,
|
|
106
|
+
customWrapperClass = _ref2$wrapper === void 0 ? '' : _ref2$wrapper;
|
|
107
|
+
|
|
108
|
+
var _ref3 = a11yAttributes || _Common.DUMMY_OBJECT,
|
|
109
|
+
wrapperA11y = _ref3.wrapper;
|
|
110
|
+
|
|
111
|
+
var _ref4 = tagAttributes || _Common.DUMMY_OBJECT,
|
|
112
|
+
wrapperTagAttr = _ref4.wrapper;
|
|
113
|
+
|
|
114
|
+
var isLeftChildrenRenderable = (0, _utils.isRenderable)(renderLeftChildren);
|
|
115
|
+
var isRightChildrenRenderable = (0, _utils.isRenderable)(renderRightChildren);
|
|
116
|
+
this.a11yMerged = {
|
|
117
|
+
wrapper: _objectSpread(_objectSpread({}, wrapperA11y), {}, {
|
|
118
|
+
role: 'alert'
|
|
119
|
+
})
|
|
120
|
+
};
|
|
121
|
+
this.tagMerged = {
|
|
122
|
+
wrapper: _objectSpread(_objectSpread({}, wrapperTagAttr), {}, {
|
|
123
|
+
'data-selector-id': dataSelectorId
|
|
124
|
+
})
|
|
125
|
+
};
|
|
126
|
+
return /*#__PURE__*/_react["default"].createElement(_Flex["default"], _extends({}, wrapperProps, {
|
|
127
|
+
$ui_alignItems: alignChildren,
|
|
128
|
+
$ui_displayMode: isRightChildrenRenderable || isLeftChildrenRenderable ? 'flex' : null,
|
|
129
|
+
$event_onClick: onClick,
|
|
130
|
+
testId: "errorMsgContainer",
|
|
131
|
+
customId: "errorMsgContainer",
|
|
132
|
+
$ui_className: "".concat(type === 'primary' ? _ValidationMessageModule["default"].primary : _ValidationMessageModule["default"].secondary, " ").concat(customWrapperClass),
|
|
133
|
+
$a11yAttributes_container: this.a11yMerged.wrapper,
|
|
134
|
+
$tagAttributes_container: this.tagMerged.wrapper
|
|
135
|
+
}), (0, _utils.renderNode)(renderLeftChildren), /*#__PURE__*/_react["default"].createElement(_Label["default"], {
|
|
82
136
|
text: text,
|
|
83
137
|
htmlFor: htmlFor,
|
|
84
138
|
palette: palette,
|
|
@@ -86,14 +140,15 @@ var ValidationMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
86
140
|
dataId: dataId,
|
|
87
141
|
clipped: clipped,
|
|
88
142
|
title: clipped ? text : '',
|
|
89
|
-
customClass: _ValidationMessageModule["default"].lable
|
|
143
|
+
customClass: "".concat(_ValidationMessageModule["default"].lable, " ").concat(customLabelClass),
|
|
144
|
+
id: id
|
|
90
145
|
}), tooltip ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
91
146
|
className: "".concat(_ValidationMessageModule["default"].icon, " ").concat(_LabelColorsModule["default"][palette]),
|
|
92
147
|
"data-title": tooltip
|
|
93
148
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
94
149
|
name: "ZD-information57",
|
|
95
150
|
size: "14"
|
|
96
|
-
})) : null);
|
|
151
|
+
})) : null, (0, _utils.renderNode)(renderRightChildren));
|
|
97
152
|
}
|
|
98
153
|
}]);
|
|
99
154
|
|
package/lib/form/fields/ValidationMessage/__tests__/__snapshots__/ValidationMessage.spec.js.snap
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports[`ValidationMessage rendering the defult props 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<div
|
|
6
|
-
class="primary"
|
|
6
|
+
class="primary "
|
|
7
7
|
data-id="errorMsgContainer"
|
|
8
8
|
data-selector-id="validationMessage"
|
|
9
9
|
data-test-id="errorMsgContainer"
|
|
@@ -11,7 +11,7 @@ exports[`ValidationMessage rendering the defult props 1`] = `
|
|
|
11
11
|
>
|
|
12
12
|
<label
|
|
13
13
|
class="label title xsmall mandatory font_default
|
|
14
|
-
cursor lable
|
|
14
|
+
cursor lable "
|
|
15
15
|
data-id="label"
|
|
16
16
|
data-selector-id="label"
|
|
17
17
|
data-test-id="label"
|
|
@@ -16,12 +16,26 @@ var propTypes = {
|
|
|
16
16
|
size: _propTypes["default"].oneOf(['xsmall', 'small', 'medium', 'large']),
|
|
17
17
|
text: _propTypes["default"].string,
|
|
18
18
|
type: _propTypes["default"].oneOf(['primary', 'secondary']),
|
|
19
|
-
a11y: _propTypes["default"].shape({
|
|
20
|
-
role: _propTypes["default"].string
|
|
21
|
-
}),
|
|
22
19
|
tooltip: _propTypes["default"].string,
|
|
23
20
|
htmlFor: _propTypes["default"].string,
|
|
24
21
|
dataId: _propTypes["default"].string,
|
|
25
|
-
dataSelectorId: _propTypes["default"].string
|
|
22
|
+
dataSelectorId: _propTypes["default"].string,
|
|
23
|
+
renderLeftChildren: _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].func]),
|
|
24
|
+
renderRightChildren: _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].func]),
|
|
25
|
+
id: _propTypes["default"].string,
|
|
26
|
+
alignChildren: _propTypes["default"].oneOf(['start', 'center', 'end', 'baseline']),
|
|
27
|
+
customProps: _propTypes["default"].shape({
|
|
28
|
+
wrapper: _propTypes["default"].object
|
|
29
|
+
}),
|
|
30
|
+
tagAttributes: _propTypes["default"].shape({
|
|
31
|
+
wrapper: _propTypes["default"].object
|
|
32
|
+
}),
|
|
33
|
+
a11yAttributes: _propTypes["default"].shape({
|
|
34
|
+
wrapper: _propTypes["default"].object
|
|
35
|
+
}),
|
|
36
|
+
customClass: _propTypes["default"].shape({
|
|
37
|
+
label: _propTypes["default"].string,
|
|
38
|
+
wrapper: _propTypes["default"].string
|
|
39
|
+
})
|
|
26
40
|
};
|
|
27
41
|
exports.propTypes = propTypes;
|
|
@@ -135,7 +135,7 @@ var StatusListItem = /*#__PURE__*/function (_React$Component) {
|
|
|
135
135
|
"aria-label": ariaLabel,
|
|
136
136
|
"data-a11y-inset-focus": insetFocus,
|
|
137
137
|
isCover: false,
|
|
138
|
-
align: "
|
|
138
|
+
align: "vertical",
|
|
139
139
|
alignBox: "row",
|
|
140
140
|
className: "".concat(_StatusListItemModule["default"].list, " ").concat(_StatusListItemModule["default"][size], " ").concat(_StatusListItemModule["default"][palette], " ").concat(active ? _StatusListItemModule["default"].active : highlight && !isDisabled ? _StatusListItemModule["default"].hover : '', " ").concat(autoHover && !isDisabled ? _StatusListItemModule["default"].effect : '', " ").concat(needTick ? _StatusListItemModule["default"].withTick : '', " ").concat(isDisabled ? (0, _CssProvider["default"])('isDisable') : '', " ").concat(needBorder ? _StatusListItemModule["default"].withBorder : '', " ").concat(customClass),
|
|
141
141
|
dataId: String(value).replace("'", '_'),
|
|
@@ -146,6 +146,8 @@ var StatusListItem = /*#__PURE__*/function (_React$Component) {
|
|
|
146
146
|
"data-title": isDisabled ? disableTitle : null,
|
|
147
147
|
tabindex: isDisabled ? '-1' : '0'
|
|
148
148
|
}, options, a11y), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
149
|
+
className: _StatusListItemModule["default"].contentWrapper
|
|
150
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
149
151
|
className: "".concat(_StatusListItemModule["default"].statusType, " ").concat(_StatusListItemModule["default"][bulletColor])
|
|
150
152
|
}), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
151
153
|
flexible: true,
|
|
@@ -163,7 +165,7 @@ var StatusListItem = /*#__PURE__*/function (_React$Component) {
|
|
|
163
165
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
164
166
|
name: "ZD-ticknew",
|
|
165
167
|
size: "8"
|
|
166
|
-
})) : null);
|
|
168
|
+
})) : null));
|
|
167
169
|
}
|
|
168
170
|
}]);
|
|
169
171
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
padding: var(--zd_size7) var(--zd_size20) ;
|
|
30
30
|
}
|
|
31
31
|
.large {
|
|
32
|
-
|
|
32
|
+
--statuslistitem_min_height: var(--zd_size48);
|
|
33
33
|
}
|
|
34
34
|
[dir=ltr] .large {
|
|
35
35
|
padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25) ;
|
|
@@ -94,25 +94,20 @@
|
|
|
94
94
|
[dir=rtl] .active.withTick {
|
|
95
95
|
padding-left: var(--zd_size39) ;
|
|
96
96
|
}
|
|
97
|
+
.contentWrapper {
|
|
98
|
+
composes: dflex flexrow alignVertical from '~@zohodesk/components/es/common/common.module.css';
|
|
99
|
+
width: 100% ;
|
|
100
|
+
}
|
|
97
101
|
/* Status Type */
|
|
98
|
-
/* .statusType {
|
|
99
|
-
--status_listitem_bullet_min_height: 8px;
|
|
100
|
-
--status_listitem_bullet_min_width: 8px;
|
|
101
|
-
height: var(--status_listitem_bullet_min_height);
|
|
102
|
-
width: var(--status_listitem_bullet_min_width);
|
|
103
|
-
border-radius: 50%;
|
|
104
|
-
margin-right: 13px;
|
|
105
|
-
} */
|
|
106
102
|
.statusType{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
min-width: var(--zd_size20) ;
|
|
103
|
+
position: relative;
|
|
104
|
+
composes: dflex alignVertical alignHorizontal from '~@zohodesk/components/es/common/common.module.css';
|
|
105
|
+
align-self: flex-start;
|
|
106
|
+
min-height: calc(var(--statuslistitem_font_size) * var(--statuslistitem_multiline_lineheight));
|
|
107
|
+
min-width: var(--zd_size20) ;
|
|
113
108
|
}
|
|
114
109
|
.statusType::after{
|
|
115
|
-
content: '
|
|
110
|
+
content: '';
|
|
116
111
|
--status_listitem_bullet_min_height: var(--zd_size8);
|
|
117
112
|
--status_listitem_bullet_min_width: var(--zd_size8);
|
|
118
113
|
height: var(--status_listitem_bullet_min_height);
|
|
@@ -136,4 +131,4 @@
|
|
|
136
131
|
}
|
|
137
132
|
.green.statusType::after {
|
|
138
133
|
background-color: var(--zdt_statuslistitem_green_bg);
|
|
139
|
-
}
|
|
134
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/dot",
|
|
3
|
-
"version": "1.0.0-temp-187.
|
|
3
|
+
"version": "1.0.0-temp-187.21",
|
|
4
4
|
"main": "lib/index",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -83,13 +83,13 @@
|
|
|
83
83
|
"@zohodesk/virtualizer": "1.0.13",
|
|
84
84
|
"react-sortable-hoc": "^0.8.3",
|
|
85
85
|
"velocity-react": "1.4.3",
|
|
86
|
-
"@zohodesk/dotkit": "1.0.
|
|
86
|
+
"@zohodesk/dotkit": "1.0.7",
|
|
87
87
|
"@zohodesk/react-cli": "1.1.27"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"velocity-react": "1.4.3",
|
|
91
91
|
"@zohodesk/variables": "1.2.0",
|
|
92
|
-
"@zohodesk/components": "1.5.
|
|
92
|
+
"@zohodesk/components": "1.5.8",
|
|
93
93
|
"@zohodesk/icons": "1.1.6",
|
|
94
94
|
"@zohodesk/svg": "1.2.6",
|
|
95
95
|
"@zohodesk/virtualizer": "1.0.13",
|