@zohodesk/components 1.0.0-temp-232 → 1.0.0-temp-233
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/.cli/propValidation_report.html +1 -1
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +4 -4
- package/assets/Appearance/dark/mode/Component_v1_DarkMode.module.css +0 -3
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkModifyCategory.module.css +8 -461
- package/assets/Appearance/dark/themes/green/green_CTA_DarkModifyCategory.module.css +8 -461
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkModifyCategory.module.css +8 -461
- package/assets/Appearance/dark/themes/red/red_CTA_DarkModifyCategory.module.css +8 -461
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkModifyCategory.module.css +8 -461
- package/assets/Appearance/light/mode/Component_LightMode.module.css +6 -6
- package/assets/Appearance/light/mode/Component_v1_LightMode.module.css +0 -3
- package/assets/Appearance/light/themes/blue/blue_CTA_LightModifyCategory.module.css +8 -461
- package/assets/Appearance/light/themes/green/green_CTA_LightModifyCategory.module.css +8 -461
- package/assets/Appearance/light/themes/orange/orange_CTA_LightModifyCategory.module.css +8 -461
- package/assets/Appearance/light/themes/red/red_CTA_LightModifyCategory.module.css +8 -461
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightModifyCategory.module.css +8 -461
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +3 -3
- package/assets/Appearance/pureDark/mode/Component_v1_PureDarkMode.module.css +0 -3
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkModifyCategory.module.css +8 -461
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkModifyCategory.module.css +8 -461
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkModifyCategory.module.css +8 -461
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkModifyCategory.module.css +8 -461
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkModifyCategory.module.css +8 -461
- package/es/v1/Label/Label.js +33 -82
- package/es/v1/Label/props/defaultProps.js +10 -8
- package/es/v1/Label/props/propTypes.js +14 -22
- package/lib/v1/Label/Label.js +35 -90
- package/lib/v1/Label/props/defaultProps.js +12 -10
- package/lib/v1/Label/props/propTypes.js +16 -24
- package/package.json +4 -4
- package/es/v1/Label/css/Label_v1.module.css +0 -47
- package/es/v1/Label/css/cssJSLogic.js +0 -29
- package/lib/v1/Label/css/Label_v1.module.css +0 -47
- package/lib/v1/Label/css/cssJSLogic.js +0 -31
package/es/v1/Label/Label.js
CHANGED
|
@@ -1,89 +1,40 @@
|
|
|
1
|
-
import React
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { mergeStyle } from '@zohodesk/utils'; // component registry
|
|
8
|
-
|
|
9
|
-
import { withComponentRegistrar } from '@zohodesk/dotkit/es/react/ComponentRegistry'; // components
|
|
10
|
-
|
|
11
|
-
import Flex from '@zohodesk/layout/es/Flex/Flex';
|
|
12
|
-
import Typography from "../../Typography/Typography"; // css
|
|
13
|
-
|
|
14
|
-
import defaultStyle from "./css/Label_v1.module.css";
|
|
15
|
-
|
|
16
|
-
const Label = props => {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { defaultProps } from "./props/defaultProps";
|
|
3
|
+
import { propTypes } from "./props/propTypes";
|
|
4
|
+
import style from "../../Label/Label.module.css";
|
|
5
|
+
import colors from "../../Label/LabelColors.module.css";
|
|
6
|
+
export default function Label(props) {
|
|
17
7
|
const {
|
|
8
|
+
text,
|
|
9
|
+
type,
|
|
10
|
+
palette,
|
|
11
|
+
size,
|
|
12
|
+
clipped,
|
|
18
13
|
htmlFor,
|
|
14
|
+
title,
|
|
19
15
|
onClick,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
customProps,
|
|
27
|
-
isRequired,
|
|
28
|
-
isInlineField,
|
|
29
|
-
requiredType,
|
|
30
|
-
shouldHighlightRequired
|
|
16
|
+
dataId,
|
|
17
|
+
dataSelectorId,
|
|
18
|
+
variant,
|
|
19
|
+
customClass,
|
|
20
|
+
id,
|
|
21
|
+
a11y = {}
|
|
31
22
|
} = props;
|
|
32
23
|
const {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} = cssJSLogic({
|
|
49
|
-
props: { ...props,
|
|
50
|
-
requiredType,
|
|
51
|
-
shouldHighlightRequired,
|
|
52
|
-
isRequired,
|
|
53
|
-
isInlineField
|
|
54
|
-
},
|
|
55
|
-
style
|
|
56
|
-
});
|
|
57
|
-
return /*#__PURE__*/React.createElement(Flex, {
|
|
58
|
-
$ui_displayMode: "inline",
|
|
59
|
-
$ui_alignItems: "center",
|
|
60
|
-
$tagAttributes_container: {
|
|
61
|
-
'data-selector-id': customId,
|
|
62
|
-
...tagAttributes_container
|
|
63
|
-
},
|
|
64
|
-
$a11yAttributes_container: a11yAttributes_container,
|
|
65
|
-
testId: testId,
|
|
66
|
-
customId: customId,
|
|
67
|
-
...customProps_container
|
|
68
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
69
|
-
$ui_tagName: "label",
|
|
70
|
-
$ui_className: labelClass,
|
|
71
|
-
$i18n_dataTitle: text,
|
|
72
|
-
$tagAttributes_text: {
|
|
73
|
-
htmlFor: htmlFor,
|
|
74
|
-
onClick: onClick,
|
|
75
|
-
...tagAttributes_label
|
|
76
|
-
},
|
|
77
|
-
$a11yAttributes_text: a11yAttributes_label,
|
|
78
|
-
...customProps_label
|
|
79
|
-
}, text), isRequired && requiredType === 'text' ? /*#__PURE__*/React.createElement(Typography, {
|
|
80
|
-
$ui_tagName: "span",
|
|
81
|
-
$ui_className: requiredClass
|
|
82
|
-
}, "(Required)") : '');
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export default withComponentRegistrar(Label, {
|
|
86
|
-
name: 'ZDC_Label'
|
|
87
|
-
});
|
|
24
|
+
tabIndex
|
|
25
|
+
} = a11y;
|
|
26
|
+
return /*#__PURE__*/React.createElement("label", {
|
|
27
|
+
className: `${style.label} ${style[type]} ${style[size]} ${colors[palette]} ${style[`font_${variant}`]}
|
|
28
|
+
${clipped ? style.dotted : ''} ${onClick ? style.pointer : style.cursor} ${customClass} `,
|
|
29
|
+
htmlFor: htmlFor,
|
|
30
|
+
"data-title": title,
|
|
31
|
+
"data-id": dataId,
|
|
32
|
+
"data-test-id": dataId,
|
|
33
|
+
"data-selector-id": dataSelectorId,
|
|
34
|
+
onClick: onClick,
|
|
35
|
+
id: id,
|
|
36
|
+
tabIndex: tabIndex
|
|
37
|
+
}, text);
|
|
38
|
+
}
|
|
88
39
|
Label.defaultProps = defaultProps;
|
|
89
40
|
Label.propTypes = propTypes;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
export const defaultProps = {
|
|
2
|
+
clipped: false,
|
|
3
|
+
dataId: 'label',
|
|
4
|
+
palette: 'default',
|
|
5
|
+
size: 'medium',
|
|
6
|
+
text: 'Label',
|
|
7
|
+
type: 'title',
|
|
8
|
+
variant: 'default',
|
|
9
|
+
customClass: '',
|
|
10
|
+
dataSelectorId: 'label'
|
|
9
11
|
};
|
|
@@ -1,27 +1,19 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
export
|
|
2
|
+
export const propTypes = {
|
|
3
|
+
clipped: PropTypes.bool,
|
|
4
|
+
dataId: PropTypes.string,
|
|
5
|
+
dataSelectorId: PropTypes.string,
|
|
3
6
|
htmlFor: PropTypes.string,
|
|
4
|
-
text: PropTypes.string,
|
|
5
7
|
onClick: PropTypes.func,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
customProps: PropTypes.shape({
|
|
16
|
-
container: PropTypes.object,
|
|
17
|
-
label: PropTypes.object
|
|
8
|
+
palette: PropTypes.oneOf(['default', 'primary', 'secondary', 'danger', 'mandatory', 'disable', 'dark']),
|
|
9
|
+
size: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large']),
|
|
10
|
+
text: PropTypes.string,
|
|
11
|
+
title: PropTypes.string,
|
|
12
|
+
type: PropTypes.oneOf(['title', 'subtitle']),
|
|
13
|
+
variant: PropTypes.oneOf(['primary', 'default']),
|
|
14
|
+
customClass: PropTypes.string,
|
|
15
|
+
a11y: PropTypes.shape({
|
|
16
|
+
tabIndex: PropTypes.string
|
|
18
17
|
}),
|
|
19
|
-
|
|
20
|
-
testId: PropTypes.string,
|
|
21
|
-
customStyle: PropTypes.object,
|
|
22
|
-
requiredType: PropTypes.oneOf(['asterisk', 'text']),
|
|
23
|
-
shouldHighlightRequired: PropTypes.bool,
|
|
24
|
-
// clipped: PropTypes.bool,
|
|
25
|
-
isRequired: PropTypes.bool,
|
|
26
|
-
isInlineField: PropTypes.bool
|
|
18
|
+
id: PropTypes.string
|
|
27
19
|
};
|
package/lib/v1/Label/Label.js
CHANGED
|
@@ -1,106 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
exports["default"] =
|
|
6
|
+
exports["default"] = Label;
|
|
9
7
|
|
|
10
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
12
|
-
var _defaultProps =
|
|
10
|
+
var _defaultProps = require("./props/defaultProps");
|
|
13
11
|
|
|
14
12
|
var _propTypes = require("./props/propTypes");
|
|
15
13
|
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
var _utils = require("@zohodesk/utils");
|
|
19
|
-
|
|
20
|
-
var _ComponentRegistry = require("@zohodesk/dotkit/es/react/ComponentRegistry");
|
|
21
|
-
|
|
22
|
-
var _Flex = _interopRequireDefault(require("@zohodesk/layout/es/Flex/Flex"));
|
|
14
|
+
var _LabelModule = _interopRequireDefault(require("../../Label/Label.module.css"));
|
|
23
15
|
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
var _Label_v1Module = _interopRequireDefault(require("./css/Label_v1.module.css"));
|
|
16
|
+
var _LabelColorsModule = _interopRequireDefault(require("../../Label/LabelColors.module.css"));
|
|
27
17
|
|
|
28
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
19
|
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
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; }
|
|
39
|
-
|
|
40
|
-
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; }
|
|
41
|
-
|
|
42
|
-
var Label = function Label(props) {
|
|
43
|
-
var htmlFor = props.htmlFor,
|
|
20
|
+
function Label(props) {
|
|
21
|
+
var text = props.text,
|
|
22
|
+
type = props.type,
|
|
23
|
+
palette = props.palette,
|
|
24
|
+
size = props.size,
|
|
25
|
+
clipped = props.clipped,
|
|
26
|
+
htmlFor = props.htmlFor,
|
|
27
|
+
title = props.title,
|
|
44
28
|
onClick = props.onClick,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
shouldHighlightRequired: shouldHighlightRequired,
|
|
68
|
-
isRequired: isRequired,
|
|
69
|
-
isInlineField: isInlineField
|
|
70
|
-
}),
|
|
71
|
-
style: style
|
|
72
|
-
}),
|
|
73
|
-
labelClass = _cssJSLogic.labelClass,
|
|
74
|
-
requiredClass = _cssJSLogic.requiredClass;
|
|
75
|
-
|
|
76
|
-
return /*#__PURE__*/_react["default"].createElement(_Flex["default"], _extends({
|
|
77
|
-
$ui_displayMode: "inline",
|
|
78
|
-
$ui_alignItems: "center",
|
|
79
|
-
$tagAttributes_container: _objectSpread({
|
|
80
|
-
'data-selector-id': customId
|
|
81
|
-
}, tagAttributes_container),
|
|
82
|
-
$a11yAttributes_container: a11yAttributes_container,
|
|
83
|
-
testId: testId,
|
|
84
|
-
customId: customId
|
|
85
|
-
}, customProps_container), /*#__PURE__*/_react["default"].createElement(_Typography["default"], _extends({
|
|
86
|
-
$ui_tagName: "label",
|
|
87
|
-
$ui_className: labelClass,
|
|
88
|
-
$i18n_dataTitle: text,
|
|
89
|
-
$tagAttributes_text: _objectSpread({
|
|
90
|
-
htmlFor: htmlFor,
|
|
91
|
-
onClick: onClick
|
|
92
|
-
}, tagAttributes_label),
|
|
93
|
-
$a11yAttributes_text: a11yAttributes_label
|
|
94
|
-
}, customProps_label), text), isRequired && requiredType === 'text' ? /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
95
|
-
$ui_tagName: "span",
|
|
96
|
-
$ui_className: requiredClass
|
|
97
|
-
}, "(Required)") : '');
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
var _default = (0, _ComponentRegistry.withComponentRegistrar)(Label, {
|
|
101
|
-
name: 'ZDC_Label'
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
exports["default"] = _default;
|
|
105
|
-
Label.defaultProps = _defaultProps["default"];
|
|
29
|
+
dataId = props.dataId,
|
|
30
|
+
dataSelectorId = props.dataSelectorId,
|
|
31
|
+
variant = props.variant,
|
|
32
|
+
customClass = props.customClass,
|
|
33
|
+
id = props.id,
|
|
34
|
+
_props$a11y = props.a11y,
|
|
35
|
+
a11y = _props$a11y === void 0 ? {} : _props$a11y;
|
|
36
|
+
var tabIndex = a11y.tabIndex;
|
|
37
|
+
return /*#__PURE__*/_react["default"].createElement("label", {
|
|
38
|
+
className: "".concat(_LabelModule["default"].label, " ").concat(_LabelModule["default"][type], " ").concat(_LabelModule["default"][size], " ").concat(_LabelColorsModule["default"][palette], " ").concat(_LabelModule["default"]["font_".concat(variant)], "\n ").concat(clipped ? _LabelModule["default"].dotted : '', " ").concat(onClick ? _LabelModule["default"].pointer : _LabelModule["default"].cursor, " ").concat(customClass, " "),
|
|
39
|
+
htmlFor: htmlFor,
|
|
40
|
+
"data-title": title,
|
|
41
|
+
"data-id": dataId,
|
|
42
|
+
"data-test-id": dataId,
|
|
43
|
+
"data-selector-id": dataSelectorId,
|
|
44
|
+
onClick: onClick,
|
|
45
|
+
id: id,
|
|
46
|
+
tabIndex: tabIndex
|
|
47
|
+
}, text);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
Label.defaultProps = _defaultProps.defaultProps;
|
|
106
51
|
Label.propTypes = _propTypes.propTypes;
|
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
exports.defaultProps = void 0;
|
|
7
|
+
var defaultProps = {
|
|
8
|
+
clipped: false,
|
|
9
|
+
dataId: 'label',
|
|
10
|
+
palette: 'default',
|
|
11
|
+
size: 'medium',
|
|
12
|
+
text: 'Label',
|
|
13
|
+
type: 'title',
|
|
14
|
+
variant: 'default',
|
|
15
|
+
customClass: '',
|
|
16
|
+
dataSelectorId: 'label'
|
|
15
17
|
};
|
|
16
|
-
exports
|
|
18
|
+
exports.defaultProps = defaultProps;
|
|
@@ -3,36 +3,28 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.propTypes = void 0;
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var propTypes = {
|
|
13
|
+
clipped: _propTypes["default"].bool,
|
|
14
|
+
dataId: _propTypes["default"].string,
|
|
15
|
+
dataSelectorId: _propTypes["default"].string,
|
|
13
16
|
htmlFor: _propTypes["default"].string,
|
|
14
|
-
text: _propTypes["default"].string,
|
|
15
17
|
onClick: _propTypes["default"].func,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
customProps: _propTypes["default"].shape({
|
|
26
|
-
container: _propTypes["default"].object,
|
|
27
|
-
label: _propTypes["default"].object
|
|
18
|
+
palette: _propTypes["default"].oneOf(['default', 'primary', 'secondary', 'danger', 'mandatory', 'disable', 'dark']),
|
|
19
|
+
size: _propTypes["default"].oneOf(['xsmall', 'small', 'medium', 'large']),
|
|
20
|
+
text: _propTypes["default"].string,
|
|
21
|
+
title: _propTypes["default"].string,
|
|
22
|
+
type: _propTypes["default"].oneOf(['title', 'subtitle']),
|
|
23
|
+
variant: _propTypes["default"].oneOf(['primary', 'default']),
|
|
24
|
+
customClass: _propTypes["default"].string,
|
|
25
|
+
a11y: _propTypes["default"].shape({
|
|
26
|
+
tabIndex: _propTypes["default"].string
|
|
28
27
|
}),
|
|
29
|
-
|
|
30
|
-
testId: _propTypes["default"].string,
|
|
31
|
-
customStyle: _propTypes["default"].object,
|
|
32
|
-
requiredType: _propTypes["default"].oneOf(['asterisk', 'text']),
|
|
33
|
-
shouldHighlightRequired: _propTypes["default"].bool,
|
|
34
|
-
// clipped: PropTypes.bool,
|
|
35
|
-
isRequired: _propTypes["default"].bool,
|
|
36
|
-
isInlineField: _propTypes["default"].bool
|
|
28
|
+
id: _propTypes["default"].string
|
|
37
29
|
};
|
|
38
|
-
exports
|
|
30
|
+
exports.propTypes = propTypes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/components",
|
|
3
|
-
"version": "1.0.0-temp-
|
|
3
|
+
"version": "1.0.0-temp-233",
|
|
4
4
|
"main": "es/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"build:css:umd": "npm run clean && npm run init && react-cli build:css:umd",
|
|
40
40
|
"coverage": "react-cli coverage",
|
|
41
41
|
"prepare": "npm run init && npm run css:build ",
|
|
42
|
-
"prepublishOnly": "node prePublish.js
|
|
42
|
+
"prepublishOnly": "node prePublish.js npm run download",
|
|
43
43
|
"postpublish": "node postPublish.js",
|
|
44
44
|
"report": "react-cli publish:report",
|
|
45
45
|
"test": "react-cli test",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@testing-library/react": "^11.2.5",
|
|
74
74
|
"@testing-library/react-hooks": "^7.0.2",
|
|
75
75
|
"@testing-library/user-event": "^13.0.10",
|
|
76
|
-
"@zohodesk-private/color-variable-preprocessor": "1.
|
|
76
|
+
"@zohodesk-private/color-variable-preprocessor": "1.0.0-temp-12",
|
|
77
77
|
"@zohodesk-private/css-variable-migrator": "1.0.9",
|
|
78
78
|
"@zohodesk-private/node-plugins": "1.1.13",
|
|
79
79
|
"@zohodesk-private/react-prop-validator": "1.2.3",
|
|
@@ -110,4 +110,4 @@
|
|
|
110
110
|
"@zohodesk/layout": "3.1.0",
|
|
111
111
|
"@zohodesk/dotkit": "1.0.3"
|
|
112
112
|
}
|
|
113
|
-
}
|
|
113
|
+
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
.label {
|
|
2
|
-
font-size: var(--zd_font_size14) ;
|
|
3
|
-
color: var(--zdt_v1_label_text);
|
|
4
|
-
cursor: pointer;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.dotted {
|
|
8
|
-
composes: dotted from '../../../common/common.module.css';
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.required {
|
|
12
|
-
color: var(--zdt_v1_label_mandatory_text);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.asterisk:after {
|
|
16
|
-
content: "*";
|
|
17
|
-
color: var(--zdt_v1_label_mandatory_text);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
[dir=ltr] .asterisk:after {
|
|
21
|
-
padding-left: var(--zd_size2) ;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
[dir=rtl] .asterisk:after {
|
|
25
|
-
padding-right: var(--zd_size2) ;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.requiredTxt {
|
|
29
|
-
color: var(--zdt_v1_label_mandatory_text);
|
|
30
|
-
font-size: var(--zd_font_size14) ;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
[dir=ltr] .requiredTxt {
|
|
34
|
-
margin-left: var(--zd_size5) ;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
[dir=rtl] .requiredTxt {
|
|
38
|
-
margin-right: var(--zd_size5) ;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
[dir=ltr] .inlineField {
|
|
42
|
-
margin-left: var(--zd_size5) ;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
[dir=rtl] .inlineField {
|
|
46
|
-
margin-right: var(--zd_size5) ;
|
|
47
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import compileClassNames from '@zohodesk/utils/es/compileClassNames';
|
|
2
|
-
export default function cssJSLogic(_ref) {
|
|
3
|
-
let {
|
|
4
|
-
props,
|
|
5
|
-
style
|
|
6
|
-
} = _ref;
|
|
7
|
-
const {
|
|
8
|
-
clipped,
|
|
9
|
-
requiredType,
|
|
10
|
-
shouldHighlightRequired,
|
|
11
|
-
isRequired,
|
|
12
|
-
isInlineField
|
|
13
|
-
} = props; // const shouldHighlightMandatory = localStorage?.getItem('mandatoryAppearance') === 'true';
|
|
14
|
-
|
|
15
|
-
let labelClass = compileClassNames({
|
|
16
|
-
[style.label]: true,
|
|
17
|
-
[style.dotted]: clipped,
|
|
18
|
-
[style.asterisk]: isRequired && requiredType === 'asterisk',
|
|
19
|
-
[style.required]: isRequired && shouldHighlightRequired,
|
|
20
|
-
[style.inlineField]: isInlineField
|
|
21
|
-
});
|
|
22
|
-
let requiredClass = compileClassNames({
|
|
23
|
-
[style.requiredTxt]: true
|
|
24
|
-
});
|
|
25
|
-
return {
|
|
26
|
-
labelClass,
|
|
27
|
-
requiredClass
|
|
28
|
-
};
|
|
29
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
.label {
|
|
2
|
-
font-size: var(--zd_font_size14) ;
|
|
3
|
-
color: var(--zdt_v1_label_text);
|
|
4
|
-
cursor: pointer;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.dotted {
|
|
8
|
-
composes: dotted from '../../../common/common.module.css';
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.required {
|
|
12
|
-
color: var(--zdt_v1_label_mandatory_text);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.asterisk:after {
|
|
16
|
-
content: "*";
|
|
17
|
-
color: var(--zdt_v1_label_mandatory_text);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
[dir=ltr] .asterisk:after {
|
|
21
|
-
padding-left: var(--zd_size2) ;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
[dir=rtl] .asterisk:after {
|
|
25
|
-
padding-right: var(--zd_size2) ;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.requiredTxt {
|
|
29
|
-
color: var(--zdt_v1_label_mandatory_text);
|
|
30
|
-
font-size: var(--zd_font_size14) ;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
[dir=ltr] .requiredTxt {
|
|
34
|
-
margin-left: var(--zd_size5) ;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
[dir=rtl] .requiredTxt {
|
|
38
|
-
margin-right: var(--zd_size5) ;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
[dir=ltr] .inlineField {
|
|
42
|
-
margin-left: var(--zd_size5) ;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
[dir=rtl] .inlineField {
|
|
46
|
-
margin-right: var(--zd_size5) ;
|
|
47
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = cssJSLogic;
|
|
7
|
-
|
|
8
|
-
var _compileClassNames3 = _interopRequireDefault(require("@zohodesk/utils/es/compileClassNames"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
|
-
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; }
|
|
13
|
-
|
|
14
|
-
function cssJSLogic(_ref) {
|
|
15
|
-
var _compileClassNames;
|
|
16
|
-
|
|
17
|
-
var props = _ref.props,
|
|
18
|
-
style = _ref.style;
|
|
19
|
-
var clipped = props.clipped,
|
|
20
|
-
requiredType = props.requiredType,
|
|
21
|
-
shouldHighlightRequired = props.shouldHighlightRequired,
|
|
22
|
-
isRequired = props.isRequired,
|
|
23
|
-
isInlineField = props.isInlineField; // const shouldHighlightMandatory = localStorage?.getItem('mandatoryAppearance') === 'true';
|
|
24
|
-
|
|
25
|
-
var labelClass = (0, _compileClassNames3["default"])((_compileClassNames = {}, _defineProperty(_compileClassNames, style.label, true), _defineProperty(_compileClassNames, style.dotted, clipped), _defineProperty(_compileClassNames, style.asterisk, isRequired && requiredType === 'asterisk'), _defineProperty(_compileClassNames, style.required, isRequired && shouldHighlightRequired), _defineProperty(_compileClassNames, style.inlineField, isInlineField), _compileClassNames));
|
|
26
|
-
var requiredClass = (0, _compileClassNames3["default"])(_defineProperty({}, style.requiredTxt, true));
|
|
27
|
-
return {
|
|
28
|
-
labelClass: labelClass,
|
|
29
|
-
requiredClass: requiredClass
|
|
30
|
-
};
|
|
31
|
-
}
|