@zohodesk/components 1.0.0-temp-250 → 1.0.0-temp-253
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 +29 -0
- package/assets/Appearance/dark/mode/Component_v1_DarkMode.module.css +68 -0
- package/assets/Appearance/light/mode/Component_v1_LightMode.module.css +68 -0
- package/assets/Appearance/pureDark/mode/Component_v1_PureDarkMode.module.css +68 -0
- package/es/Avatar/Avatar.module.css +8 -8
- package/es/AvatarTeam/AvatarTeam.module.css +189 -189
- package/es/Button/css/Button.module.css +19 -19
- package/es/Buttongroup/Buttongroup.module.css +85 -107
- package/es/Card/Card.module.css +6 -4
- package/es/CheckBox/CheckBox.module.css +3 -10
- package/es/DateTime/DateTime.module.css +22 -35
- package/es/DateTime/DateWidget.module.css +1 -1
- package/es/DateTime/YearView.module.css +8 -10
- package/es/DropBox/DropBoxElement/DropBoxElement.js +10 -1
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +8 -3
- package/es/DropBox/DropBoxElement/props/propTypes.js +2 -1
- package/es/DropBox/css/DropBox.module.css +58 -58
- package/es/DropDown/DropDown.module.css +2 -1
- package/es/DropDown/DropDownHeading.module.css +53 -53
- package/es/DropDown/DropDownItem.module.css +87 -94
- package/es/DropDown/DropDownSearch.module.css +3 -3
- package/es/DropDown/DropDownSeparator.module.css +2 -1
- package/es/Label/Label.module.css +5 -5
- package/es/ListItem/ListItem.module.css +23 -45
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +4 -3
- package/es/MultiSelect/MultiSelect.module.css +21 -34
- package/es/MultiSelect/SelectedOptions.module.css +6 -10
- package/es/PopOver/PopOver.module.css +8 -8
- package/es/Radio/Radio.module.css +11 -12
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +1 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +1 -1
- package/es/Ribbon/Ribbon.module.css +499 -505
- package/es/RippleEffect/RippleEffect.module.css +55 -17
- package/es/Select/Select.module.css +22 -17
- package/es/Stencils/Stencils.module.css +30 -14
- package/es/Switch/Switch.module.css +121 -128
- package/es/Tab/Tab.module.css +8 -15
- package/es/Tab/Tabs.module.css +12 -22
- package/es/Tag/Tag.module.css +255 -255
- package/es/TextBox/TextBox.module.css +9 -9
- package/es/TextBoxIcon/TextBoxIcon.module.css +1 -1
- package/es/Textarea/Textarea.module.css +18 -18
- package/es/Tooltip/Tooltip.module.css +5 -4
- package/es/Typography/Typography.js +18 -8
- package/es/Typography/__tests__/Typography.spec.js +198 -6
- package/es/Typography/__tests__/__snapshots__/Typography.spec.js.snap +1235 -2
- package/es/Typography/css/Typography.module.css +4 -0
- package/es/Typography/css/cssJSLogic.js +53 -21
- package/es/Typography/props/defaultProps.js +4 -3
- package/es/Typography/props/propTypes.js +68 -26
- package/es/Typography/utils/textHighlighter.js +4 -2
- package/es/common/avatarsizes.module.css +16 -16
- package/es/common/customscroll.module.css +141 -141
- package/es/shared/ArrowIcon/ArrowIcon.module.css +3 -2
- package/es/shared/InputFieldLine/InputFieldLine.module.css +2 -2
- package/es/v1/Button/Button.js +201 -0
- package/es/v1/Button/README.md +110 -0
- package/es/v1/Button/__tests__/Button.spec.js +272 -0
- package/es/v1/Button/__tests__/__snapshots__/Button.spec.js.snap +1160 -0
- package/es/v1/Button/_shared/Loader/Loader.js +33 -0
- package/es/v1/Button/_shared/Loader/Loader_v1.module.css +42 -0
- package/es/v1/Button/_shared/Loader/__tests__/Loader.spec.js +21 -0
- package/es/v1/Button/_shared/Loader/__tests__/__snapshots__/Loader.spec.js.snap +49 -0
- package/es/v1/Button/_shared/Loader/props/defaultProps.js +4 -0
- package/es/v1/Button/_shared/Loader/props/propTypes.js +7 -0
- package/es/v1/Button/_shared/SuccessTick/SuccessTick.js +25 -0
- package/es/v1/Button/_shared/SuccessTick/SuccessTick_v1.module.css +21 -0
- package/es/v1/Button/_shared/SuccessTick/__tests__/SuccessTick.spec.js +21 -0
- package/es/v1/Button/_shared/SuccessTick/__tests__/__snapshots__/SuccessTick.spec.js.snap +31 -0
- package/es/v1/Button/_shared/SuccessTick/props/defaultProps.js +4 -0
- package/es/v1/Button/_shared/SuccessTick/props/propTypes.js +7 -0
- package/es/v1/Button/constants/index.js +82 -0
- package/es/v1/Button/css/Button_v1.module.css +119 -0
- package/es/v1/Button/css/cssJSLogic.js +96 -0
- package/es/v1/Button/index.js +2 -0
- package/es/v1/Button/props/defaultProps.js +26 -0
- package/es/v1/Button/props/propTypes.js +43 -0
- package/es/v1/Switch/css/Switch_v1.module.css +28 -28
- package/es/v1/helpers/colorHelpers/background/backgroundColor.module.css +629 -0
- package/es/v1/helpers/colorHelpers/border/borderColor.module.css +489 -0
- package/es/v1/helpers/colorHelpers/colorHelper.js +176 -0
- package/es/v1/helpers/colorHelpers/constants/index.js +79 -0
- package/es/v1/helpers/colorHelpers/index.js +4 -0
- package/es/v1/helpers/colorHelpers/paletteUtilities.README.md +415 -0
- package/es/v1/helpers/colorHelpers/text/textColor.module.css +368 -0
- package/lib/Avatar/Avatar.module.css +8 -8
- package/lib/AvatarTeam/AvatarTeam.module.css +189 -189
- package/lib/Button/css/Button.module.css +19 -19
- package/lib/Buttongroup/Buttongroup.module.css +85 -107
- package/lib/Card/Card.module.css +6 -4
- package/lib/CheckBox/CheckBox.module.css +3 -10
- package/lib/DateTime/DateTime.module.css +22 -35
- package/lib/DateTime/DateWidget.module.css +1 -1
- package/lib/DateTime/YearView.module.css +8 -10
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +10 -1
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +8 -3
- package/lib/DropBox/DropBoxElement/props/propTypes.js +2 -1
- package/lib/DropBox/css/DropBox.module.css +58 -58
- package/lib/DropDown/DropDown.module.css +2 -1
- package/lib/DropDown/DropDownHeading.module.css +53 -53
- package/lib/DropDown/DropDownItem.module.css +87 -94
- package/lib/DropDown/DropDownSearch.module.css +3 -3
- package/lib/DropDown/DropDownSeparator.module.css +2 -1
- package/lib/Label/Label.module.css +5 -5
- package/lib/ListItem/ListItem.module.css +23 -45
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +4 -3
- package/lib/MultiSelect/MultiSelect.module.css +21 -34
- package/lib/MultiSelect/SelectedOptions.module.css +6 -10
- package/lib/PopOver/PopOver.module.css +8 -8
- package/lib/Radio/Radio.module.css +11 -12
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +1 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +1 -1
- package/lib/Ribbon/Ribbon.module.css +499 -505
- package/lib/RippleEffect/RippleEffect.module.css +55 -17
- package/lib/Select/Select.module.css +22 -17
- package/lib/Stencils/Stencils.module.css +30 -14
- package/lib/Switch/Switch.module.css +121 -128
- package/lib/Tab/Tab.module.css +8 -15
- package/lib/Tab/Tabs.module.css +12 -22
- package/lib/Tag/Tag.module.css +255 -255
- package/lib/TextBox/TextBox.module.css +9 -9
- package/lib/TextBoxIcon/TextBoxIcon.module.css +1 -1
- package/lib/Textarea/Textarea.module.css +18 -18
- package/lib/Tooltip/Tooltip.module.css +5 -4
- package/lib/Typography/Typography.js +15 -5
- package/lib/Typography/__tests__/Typography.spec.js +284 -92
- package/lib/Typography/__tests__/__snapshots__/Typography.spec.js.snap +1235 -2
- package/lib/Typography/css/Typography.module.css +4 -0
- package/lib/Typography/css/cssJSLogic.js +38 -6
- package/lib/Typography/props/defaultProps.js +6 -3
- package/lib/Typography/props/propTypes.js +67 -23
- package/lib/Typography/utils/textHighlighter.js +6 -3
- package/lib/common/avatarsizes.module.css +16 -16
- package/lib/common/customscroll.module.css +141 -141
- package/lib/shared/ArrowIcon/ArrowIcon.module.css +3 -2
- package/lib/shared/InputFieldLine/InputFieldLine.module.css +2 -2
- package/lib/v1/Button/Button.js +239 -0
- package/lib/v1/Button/README.md +110 -0
- package/lib/v1/Button/__tests__/Button.spec.js +293 -0
- package/lib/v1/Button/__tests__/__snapshots__/Button.spec.js.snap +1160 -0
- package/lib/v1/Button/_shared/Loader/Loader.js +43 -0
- package/lib/v1/Button/_shared/Loader/Loader_v1.module.css +42 -0
- package/lib/v1/Button/_shared/Loader/__tests__/Loader.spec.js +28 -0
- package/lib/v1/Button/_shared/Loader/__tests__/__snapshots__/Loader.spec.js.snap +49 -0
- package/lib/v1/Button/_shared/Loader/props/defaultProps.js +11 -0
- package/lib/v1/Button/_shared/Loader/props/propTypes.js +18 -0
- package/lib/v1/Button/_shared/SuccessTick/SuccessTick.js +35 -0
- package/lib/v1/Button/_shared/SuccessTick/SuccessTick_v1.module.css +21 -0
- package/lib/v1/Button/_shared/SuccessTick/__tests__/SuccessTick.spec.js +28 -0
- package/lib/v1/Button/_shared/SuccessTick/__tests__/__snapshots__/SuccessTick.spec.js.snap +31 -0
- package/lib/v1/Button/_shared/SuccessTick/props/defaultProps.js +11 -0
- package/lib/v1/Button/_shared/SuccessTick/props/propTypes.js +18 -0
- package/lib/v1/Button/constants/index.js +114 -0
- package/lib/v1/Button/css/Button_v1.module.css +119 -0
- package/lib/v1/Button/css/cssJSLogic.js +88 -0
- package/lib/v1/Button/index.js +21 -0
- package/lib/v1/Button/props/defaultProps.js +36 -0
- package/lib/v1/Button/props/propTypes.js +56 -0
- package/lib/v1/Switch/css/Switch_v1.module.css +28 -28
- package/lib/v1/helpers/colorHelpers/background/backgroundColor.module.css +629 -0
- package/lib/v1/helpers/colorHelpers/border/borderColor.module.css +489 -0
- package/lib/v1/helpers/colorHelpers/colorHelper.js +190 -0
- package/lib/v1/helpers/colorHelpers/constants/index.js +87 -0
- package/lib/v1/helpers/colorHelpers/index.js +57 -0
- package/lib/v1/helpers/colorHelpers/paletteUtilities.README.md +415 -0
- package/lib/v1/helpers/colorHelpers/text/textColor.module.css +368 -0
- package/package.json +17 -14
- package/_react-cli.config.js +0 -24
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Button", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _Button["default"];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "default", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _Button["default"];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _Button = _interopRequireDefault(require("./Button"));
|
|
20
|
+
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _constants = require("@zohodesk/dotkit/es/utils/constants");
|
|
9
|
+
|
|
10
|
+
var _constants2 = require("../constants");
|
|
11
|
+
|
|
12
|
+
var defaultProps = {
|
|
13
|
+
palette: _constants2.DEFAULT_PALETTE,
|
|
14
|
+
bgAppearance: _constants2.DEFAULT_BG_APPEARANCE,
|
|
15
|
+
borderAppearance: _constants2.DEFAULT_BORDER_APPEARANCE,
|
|
16
|
+
variant: _constants2.DEFAULT_VARIANT,
|
|
17
|
+
size: _constants2.DEFAULT_SIZE,
|
|
18
|
+
status: _constants2.DEFAULT_STATUS,
|
|
19
|
+
loaderPlacement: _constants2.DEFAULT_LOADER_PLACEMENT,
|
|
20
|
+
iconPlacement: _constants2.DEFAULT_ICON_PLACEMENT,
|
|
21
|
+
iconSize: _constants2.DEFAULT_ICON_SIZE,
|
|
22
|
+
paletteShade: _constants2.DEFAULT_PALETTE_SHADE,
|
|
23
|
+
disabledAppearance: _constants2.DEFAULT_DISABLED_APPEARANCE,
|
|
24
|
+
isDisabled: false,
|
|
25
|
+
isReadOnly: false,
|
|
26
|
+
isSelected: false,
|
|
27
|
+
shape: _constants2.DEFAULT_SHAPE,
|
|
28
|
+
type: _constants2.DEFAULT_BUTTON_TYPE,
|
|
29
|
+
onClick: _constants.DUMMY_FUNCTION,
|
|
30
|
+
customClass: _constants.DUMMY_OBJECT,
|
|
31
|
+
customProps: _constants.DUMMY_OBJECT,
|
|
32
|
+
customAttributes: _constants.DUMMY_OBJECT,
|
|
33
|
+
a11yAttributes: _constants.DUMMY_OBJECT
|
|
34
|
+
};
|
|
35
|
+
var _default = defaultProps;
|
|
36
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var renderSlotType = _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].func]);
|
|
15
|
+
|
|
16
|
+
var propTypes = {
|
|
17
|
+
palette: _propTypes["default"].oneOf(Object.values(_constants.PALETTE)),
|
|
18
|
+
bgAppearance: _propTypes["default"].oneOf(Object.values(_constants.BG_APPEARANCE)),
|
|
19
|
+
borderAppearance: _propTypes["default"].oneOf(Object.values(_constants.BORDER_APPEARANCE)),
|
|
20
|
+
variant: _propTypes["default"].oneOf(Object.values(_constants.VARIANT)),
|
|
21
|
+
size: _propTypes["default"].oneOf(Object.values(_constants.SIZE)),
|
|
22
|
+
status: _propTypes["default"].oneOf(Object.values(_constants.STATUS)),
|
|
23
|
+
loaderPlacement: _propTypes["default"].oneOf(Object.values(_constants.LOADER_PLACEMENT)),
|
|
24
|
+
iconName: _propTypes["default"].string,
|
|
25
|
+
iconSize: _propTypes["default"].number,
|
|
26
|
+
iconPlacement: _propTypes["default"].oneOf(Object.values(_constants.ICON_PLACEMENT)),
|
|
27
|
+
paletteShade: _propTypes["default"].oneOf(Object.values(_constants.PALETTE_SHADE)),
|
|
28
|
+
disabledAppearance: _propTypes["default"].oneOf(Object.values(_constants.DISABLED_APPEARANCE)),
|
|
29
|
+
renderIcon: renderSlotType,
|
|
30
|
+
renderBefore: renderSlotType,
|
|
31
|
+
renderAfter: renderSlotType,
|
|
32
|
+
renderLoader: renderSlotType,
|
|
33
|
+
renderSuccess: renderSlotType,
|
|
34
|
+
children: _propTypes["default"].node,
|
|
35
|
+
type: _propTypes["default"].oneOf(Object.values(_constants.BUTTON_TYPE)),
|
|
36
|
+
onClick: _propTypes["default"].func,
|
|
37
|
+
isDisabled: _propTypes["default"].bool,
|
|
38
|
+
isReadOnly: _propTypes["default"].bool,
|
|
39
|
+
isSelected: _propTypes["default"].bool,
|
|
40
|
+
shape: _propTypes["default"].oneOf(Object.values(_constants.SHAPE)),
|
|
41
|
+
title: _propTypes["default"].string,
|
|
42
|
+
customClass: _propTypes["default"].shape({
|
|
43
|
+
wrapper: _propTypes["default"].string,
|
|
44
|
+
text: _propTypes["default"].string
|
|
45
|
+
}),
|
|
46
|
+
customProps: _propTypes["default"].shape({
|
|
47
|
+
text: _propTypes["default"].object,
|
|
48
|
+
icon: _propTypes["default"].object
|
|
49
|
+
}),
|
|
50
|
+
customAttributes: _propTypes["default"].object,
|
|
51
|
+
a11yAttributes: _propTypes["default"].object,
|
|
52
|
+
customId: _propTypes["default"].string,
|
|
53
|
+
testId: _propTypes["default"].string
|
|
54
|
+
};
|
|
55
|
+
var _default = propTypes;
|
|
56
|
+
exports["default"] = _default;
|
|
@@ -4,47 +4,47 @@
|
|
|
4
4
|
gap: var(--zd_size6) ;
|
|
5
5
|
}
|
|
6
6
|
.small {
|
|
7
|
-
--local-switch-track-width:
|
|
8
|
-
--local-switch-track-height:
|
|
7
|
+
--local-switch-track-width: var(--zd_size22);
|
|
8
|
+
--local-switch-track-height: var(--zd_size12);
|
|
9
9
|
--local-switch-track-border-radius: 8px;
|
|
10
|
-
--local-switch-thumb-size:
|
|
11
|
-
--local-switch-onLabel-height:
|
|
12
|
-
--local-switch-onLabel-left:
|
|
13
|
-
--local-switch-offLabel-size:
|
|
14
|
-
--local-switch-offLabel-right:
|
|
10
|
+
--local-switch-thumb-size: var(--zd_size10);
|
|
11
|
+
--local-switch-onLabel-height: var(--zd_size6);
|
|
12
|
+
--local-switch-onLabel-left: var(--zd_size5);
|
|
13
|
+
--local-switch-offLabel-size: var(--zd_size7);
|
|
14
|
+
--local-switch-offLabel-right: var(--zd_size2);
|
|
15
15
|
--local-switch-onLabel-scaleX: 1.2;
|
|
16
16
|
}
|
|
17
17
|
.medium {
|
|
18
|
-
--local-switch-track-width:
|
|
19
|
-
--local-switch-track-height:
|
|
18
|
+
--local-switch-track-width: var(--zd_size28);
|
|
19
|
+
--local-switch-track-height: var(--zd_size16);
|
|
20
20
|
--local-switch-track-border-radius: 16px;
|
|
21
|
-
--local-switch-thumb-size:
|
|
22
|
-
--local-switch-onLabel-height:
|
|
23
|
-
--local-switch-onLabel-left:
|
|
24
|
-
--local-switch-offLabel-size:
|
|
25
|
-
--local-switch-offLabel-right:
|
|
21
|
+
--local-switch-thumb-size: var(--zd_size14);
|
|
22
|
+
--local-switch-onLabel-height: var(--zd_size8);
|
|
23
|
+
--local-switch-onLabel-left: var(--zd_size6);
|
|
24
|
+
--local-switch-offLabel-size: var(--zd_size8);
|
|
25
|
+
--local-switch-offLabel-right: var(--zd_size3);
|
|
26
26
|
--local-switch-onLabel-scaleX: 1.4;
|
|
27
27
|
}
|
|
28
28
|
.large {
|
|
29
|
-
--local-switch-track-width:
|
|
30
|
-
--local-switch-track-height:
|
|
29
|
+
--local-switch-track-width: var(--zd_size34);
|
|
30
|
+
--local-switch-track-height: var(--zd_size20);
|
|
31
31
|
--local-switch-track-border-radius: 10px;
|
|
32
|
-
--local-switch-thumb-size:
|
|
33
|
-
--local-switch-onLabel-height:
|
|
34
|
-
--local-switch-onLabel-left:
|
|
35
|
-
--local-switch-offLabel-size:
|
|
36
|
-
--local-switch-offLabel-right:
|
|
32
|
+
--local-switch-thumb-size: var(--zd_size18);
|
|
33
|
+
--local-switch-onLabel-height: var(--zd_size10);
|
|
34
|
+
--local-switch-onLabel-left: var(--zd_size7);
|
|
35
|
+
--local-switch-offLabel-size: var(--zd_size9);
|
|
36
|
+
--local-switch-offLabel-right: var(--zd_size4);
|
|
37
37
|
--local-switch-onLabel-scaleX: 1.6;
|
|
38
38
|
}
|
|
39
39
|
.xlarge {
|
|
40
|
-
--local-switch-track-width:
|
|
41
|
-
--local-switch-track-height:
|
|
40
|
+
--local-switch-track-width: var(--zd_size40);
|
|
41
|
+
--local-switch-track-height: var(--zd_size24);
|
|
42
42
|
--local-switch-track-border-radius: 12px;
|
|
43
|
-
--local-switch-thumb-size:
|
|
44
|
-
--local-switch-onLabel-height:
|
|
45
|
-
--local-switch-onLabel-left:
|
|
46
|
-
--local-switch-offLabel-size:
|
|
47
|
-
--local-switch-offLabel-right:
|
|
43
|
+
--local-switch-thumb-size: var(--zd_size22);
|
|
44
|
+
--local-switch-onLabel-height: var(--zd_size12);
|
|
45
|
+
--local-switch-onLabel-left: var(--zd_size8);
|
|
46
|
+
--local-switch-offLabel-size: var(--zd_size10);
|
|
47
|
+
--local-switch-offLabel-right: var(--zd_size5);
|
|
48
48
|
--local-switch-onLabel-scaleX: 1.8;
|
|
49
49
|
}
|
|
50
50
|
.disabled, .readonly {
|