@zohodesk/components 1.6.8 → 1.6.11
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 +7 -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/Buttongroup/Buttongroup.module.css +10 -30
- package/es/CheckBox/CheckBox.module.css +3 -10
- package/es/DateTime/DateTime.module.css +22 -35
- package/es/DateTime/YearView.module.css +8 -10
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +3 -2
- package/es/DropDown/DropDown.module.css +2 -1
- package/es/DropDown/DropDownItem.module.css +1 -8
- package/es/DropDown/DropDownSeparator.module.css +2 -1
- package/es/ListItem/ListItem.module.css +4 -15
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +3 -2
- package/es/MultiSelect/MultiSelect.module.css +21 -34
- package/es/MultiSelect/SelectedOptions.module.css +6 -10
- package/es/Radio/Radio.module.css +3 -3
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +1 -1
- package/es/Ribbon/Ribbon.module.css +9 -12
- package/es/Select/Select.module.css +22 -17
- package/es/Switch/Switch.module.css +1 -8
- package/es/Tab/Tab.module.css +8 -15
- package/es/Tab/Tabs.module.css +12 -22
- package/es/Tag/Tag.module.css +4 -3
- package/es/Tooltip/Tooltip.module.css +3 -2
- package/es/shared/ArrowIcon/ArrowIcon.module.css +3 -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.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.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/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/Buttongroup/Buttongroup.module.css +10 -30
- package/lib/CheckBox/CheckBox.module.css +3 -10
- package/lib/DateTime/DateTime.module.css +22 -35
- package/lib/DateTime/YearView.module.css +8 -10
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +3 -2
- package/lib/DropDown/DropDown.module.css +2 -1
- package/lib/DropDown/DropDownItem.module.css +1 -8
- package/lib/DropDown/DropDownSeparator.module.css +2 -1
- package/lib/ListItem/ListItem.module.css +4 -15
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +3 -2
- package/lib/MultiSelect/MultiSelect.module.css +21 -34
- package/lib/MultiSelect/SelectedOptions.module.css +6 -10
- package/lib/Radio/Radio.module.css +3 -3
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +1 -1
- package/lib/Ribbon/Ribbon.module.css +9 -12
- package/lib/Select/Select.module.css +22 -17
- package/lib/Switch/Switch.module.css +1 -8
- package/lib/Tab/Tab.module.css +8 -15
- package/lib/Tab/Tabs.module.css +12 -22
- package/lib/Tag/Tag.module.css +4 -3
- package/lib/Tooltip/Tooltip.module.css +3 -2
- package/lib/shared/ArrowIcon/ArrowIcon.module.css +3 -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.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.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/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 +4 -4
|
@@ -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;
|