@zohodesk/components 1.0.0-temp-242.3 → 1.0.0-temp-242.4
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 +11 -0
- package/es/AppContainer/AppContainer.module.css +1 -1
- package/es/ListItem/ListItemWithCheckBox.js +2 -0
- package/es/ListItem/ListItemWithRadio.js +2 -0
- package/es/ListItem/props/defaultProps.js +2 -0
- package/es/ListItem/props/propTypes.js +2 -0
- package/es/Modal/Portal/Portal.js +11 -10
- package/es/shared/ArrowIcon/ArrowIcon.module.css +2 -3
- package/lib/AppContainer/AppContainer.module.css +1 -1
- package/lib/ListItem/ListItemWithCheckBox.js +2 -0
- package/lib/ListItem/ListItemWithRadio.js +2 -0
- package/lib/ListItem/props/defaultProps.js +2 -0
- package/lib/ListItem/props/propTypes.js +2 -0
- package/lib/Modal/Portal/Portal.js +17 -10
- package/lib/shared/ArrowIcon/ArrowIcon.module.css +2 -3
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Dot UI is a customizable React component library built to deliver a clean, accessible, and developer-friendly UI experience. It offers a growing set of reusable components designed to align with modern design systems and streamline application development across projects.
|
|
4
4
|
|
|
5
|
+
# 1.5.6
|
|
6
|
+
|
|
7
|
+
- **ListItemWithRadio, ListItemWithCheckBox**
|
|
8
|
+
- `needBorder` prop supported
|
|
9
|
+
|
|
10
|
+
- **ArrowIcon**
|
|
11
|
+
- Fixes of visible state and color from the container hover
|
|
12
|
+
|
|
13
|
+
- **AppContainer**
|
|
14
|
+
- The --zd-font-family variable now includes an empty string ('') as its fallback font-family value.
|
|
15
|
+
|
|
5
16
|
# 1.5.5
|
|
6
17
|
|
|
7
18
|
- **Popup**
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
.container, .container button, .container input, .container textarea ,.container select {
|
|
12
12
|
/* font-family: var(--zd_regular); */
|
|
13
|
-
font-family: var(--zd-font-family), var(--zd_fallback_font, ZDLato);
|
|
13
|
+
font-family: var(--zd-font-family, ''), var(--zd_fallback_font, ZDLato);
|
|
14
14
|
}
|
|
15
15
|
.tooltip {
|
|
16
16
|
height: 0 ;
|
|
@@ -52,6 +52,7 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
52
52
|
checked,
|
|
53
53
|
autoHover,
|
|
54
54
|
palette,
|
|
55
|
+
needBorder,
|
|
55
56
|
dataId,
|
|
56
57
|
dataSelectorId,
|
|
57
58
|
title,
|
|
@@ -88,6 +89,7 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
88
89
|
isDisabled: isDisabled,
|
|
89
90
|
active: active,
|
|
90
91
|
autoHover: autoHover,
|
|
92
|
+
needBorder: needBorder,
|
|
91
93
|
customClass: customListItem,
|
|
92
94
|
dataId: `${dataId ? dataId : value}_ListItemWithCheckBox`,
|
|
93
95
|
dataSelectorId: dataSelectorId,
|
|
@@ -52,6 +52,7 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
52
52
|
checked,
|
|
53
53
|
autoHover,
|
|
54
54
|
palette,
|
|
55
|
+
needBorder,
|
|
55
56
|
id,
|
|
56
57
|
dataId,
|
|
57
58
|
dataSelectorId,
|
|
@@ -89,6 +90,7 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
89
90
|
isDisabled: isDisabled,
|
|
90
91
|
active: active,
|
|
91
92
|
autoHover: autoHover,
|
|
93
|
+
needBorder: needBorder,
|
|
92
94
|
customClass: customListItem,
|
|
93
95
|
dataId: dataId,
|
|
94
96
|
dataSelectorId: dataSelectorId,
|
|
@@ -56,6 +56,7 @@ export const ListItemWithCheckBoxDefaultProps = {
|
|
|
56
56
|
autoHover: false,
|
|
57
57
|
checked: false,
|
|
58
58
|
highlight: false,
|
|
59
|
+
needBorder: true,
|
|
59
60
|
palette: 'default',
|
|
60
61
|
size: 'medium',
|
|
61
62
|
value: 'List',
|
|
@@ -91,6 +92,7 @@ export const ListItemWithRadioDefaultProps = {
|
|
|
91
92
|
autoHover: false,
|
|
92
93
|
checked: false,
|
|
93
94
|
highlight: false,
|
|
95
|
+
needBorder: true,
|
|
94
96
|
palette: 'default',
|
|
95
97
|
size: 'medium',
|
|
96
98
|
value: 'List',
|
|
@@ -137,6 +137,7 @@ export const ListItemWithCheckBox_Props = {
|
|
|
137
137
|
title: PropTypes.string,
|
|
138
138
|
value: PropTypes.string,
|
|
139
139
|
secondaryValue: PropTypes.string,
|
|
140
|
+
needBorder: PropTypes.bool,
|
|
140
141
|
renderValueRightPlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
141
142
|
lhsAlignContent: PropTypes.oneOf(['start', 'center', 'end']),
|
|
142
143
|
lhsJustifyContent: PropTypes.oneOf(['start', 'center', 'end']),
|
|
@@ -213,6 +214,7 @@ export const ListItemWithRadio_Props = {
|
|
|
213
214
|
title: PropTypes.string,
|
|
214
215
|
value: PropTypes.string,
|
|
215
216
|
secondaryValue: PropTypes.string,
|
|
217
|
+
needBorder: PropTypes.bool,
|
|
216
218
|
renderValueRightPlaceholderNode: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
217
219
|
lhsAlignContent: PropTypes.oneOf(['start', 'center', 'end']),
|
|
218
220
|
lhsJustifyContent: PropTypes.oneOf(['start', 'center', 'end']),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useCallback, useMemo } from "react";
|
|
2
2
|
import BasePortal from '@zohodesk/dotkit/es/react/components/Portal/Portal';
|
|
3
3
|
import { getLibraryConfig } from "../../Provider/Config";
|
|
4
4
|
import { defaultProps } from "./props/defaultProps";
|
|
@@ -8,13 +8,11 @@ export default function Portal(_ref) {
|
|
|
8
8
|
children,
|
|
9
9
|
portalId
|
|
10
10
|
} = _ref;
|
|
11
|
-
const
|
|
11
|
+
const getPortalContainer = useCallback(() => {
|
|
12
|
+
const getConfigPortalContainer = getLibraryConfig('getPortalContainer');
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (getPortalContainer && typeof getPortalContainer === 'function') {
|
|
17
|
-
const portal = getPortalContainer();
|
|
14
|
+
if (getConfigPortalContainer && typeof getConfigPortalContainer === 'function') {
|
|
15
|
+
const portal = getConfigPortalContainer();
|
|
18
16
|
|
|
19
17
|
if (portal) {
|
|
20
18
|
return portal;
|
|
@@ -22,10 +20,13 @@ export default function Portal(_ref) {
|
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
return null;
|
|
25
|
-
};
|
|
26
|
-
|
|
23
|
+
}, []);
|
|
24
|
+
const memoizedPortalId = useMemo(() => {
|
|
25
|
+
const portalPrefix = getLibraryConfig("portalPrefix");
|
|
26
|
+
return `${portalPrefix ? `${portalPrefix}` : ''}${portalId}`;
|
|
27
|
+
}, [portalId]);
|
|
27
28
|
return /*#__PURE__*/React.createElement(BasePortal, {
|
|
28
|
-
portalId:
|
|
29
|
+
portalId: memoizedPortalId,
|
|
29
30
|
getFallbackElement: getPortalContainer
|
|
30
31
|
}, children);
|
|
31
32
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
visibility: hidden;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.transparentContainer .
|
|
16
|
+
.transparentContainer .active,
|
|
17
17
|
.transparentContainer:hover .arrowIcon {
|
|
18
18
|
opacity: 1;
|
|
19
19
|
visibility: visible;
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
.rotated,
|
|
31
31
|
.active,
|
|
32
|
-
.arrowContainer:hover .arrowIcon
|
|
33
|
-
.transparentContainer:hover .arrowIcon {
|
|
32
|
+
.arrowContainer:hover .arrowIcon {
|
|
34
33
|
--local-arrowIcon-color: var(--zdt_arrowicon_hover_icon);
|
|
35
34
|
}
|
|
36
35
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
.container, .container button, .container input, .container textarea ,.container select {
|
|
12
12
|
/* font-family: var(--zd_regular); */
|
|
13
|
-
font-family: var(--zd-font-family), var(--zd_fallback_font, ZDLato);
|
|
13
|
+
font-family: var(--zd-font-family, ''), var(--zd_fallback_font, ZDLato);
|
|
14
14
|
}
|
|
15
15
|
.tooltip {
|
|
16
16
|
height: 0 ;
|
|
@@ -110,6 +110,7 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
110
110
|
checked = _this$props4.checked,
|
|
111
111
|
autoHover = _this$props4.autoHover,
|
|
112
112
|
palette = _this$props4.palette,
|
|
113
|
+
needBorder = _this$props4.needBorder,
|
|
113
114
|
dataId = _this$props4.dataId,
|
|
114
115
|
dataSelectorId = _this$props4.dataSelectorId,
|
|
115
116
|
title = _this$props4.title,
|
|
@@ -148,6 +149,7 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
148
149
|
isDisabled: isDisabled,
|
|
149
150
|
active: active,
|
|
150
151
|
autoHover: autoHover,
|
|
152
|
+
needBorder: needBorder,
|
|
151
153
|
customClass: customListItem,
|
|
152
154
|
dataId: "".concat(dataId ? dataId : value, "_ListItemWithCheckBox"),
|
|
153
155
|
dataSelectorId: dataSelectorId,
|
|
@@ -110,6 +110,7 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
110
110
|
checked = _this$props4.checked,
|
|
111
111
|
autoHover = _this$props4.autoHover,
|
|
112
112
|
palette = _this$props4.palette,
|
|
113
|
+
needBorder = _this$props4.needBorder,
|
|
113
114
|
id = _this$props4.id,
|
|
114
115
|
dataId = _this$props4.dataId,
|
|
115
116
|
dataSelectorId = _this$props4.dataSelectorId,
|
|
@@ -149,6 +150,7 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
149
150
|
isDisabled: isDisabled,
|
|
150
151
|
active: active,
|
|
151
152
|
autoHover: autoHover,
|
|
153
|
+
needBorder: needBorder,
|
|
152
154
|
customClass: customListItem,
|
|
153
155
|
dataId: dataId,
|
|
154
156
|
dataSelectorId: dataSelectorId,
|
|
@@ -65,6 +65,7 @@ var ListItemWithCheckBoxDefaultProps = {
|
|
|
65
65
|
autoHover: false,
|
|
66
66
|
checked: false,
|
|
67
67
|
highlight: false,
|
|
68
|
+
needBorder: true,
|
|
68
69
|
palette: 'default',
|
|
69
70
|
size: 'medium',
|
|
70
71
|
value: 'List',
|
|
@@ -102,6 +103,7 @@ var ListItemWithRadioDefaultProps = {
|
|
|
102
103
|
autoHover: false,
|
|
103
104
|
checked: false,
|
|
104
105
|
highlight: false,
|
|
106
|
+
needBorder: true,
|
|
105
107
|
palette: 'default',
|
|
106
108
|
size: 'medium',
|
|
107
109
|
value: 'List',
|
|
@@ -127,6 +127,7 @@ var ListItemWithCheckBox_Props = {
|
|
|
127
127
|
title: _propTypes["default"].string,
|
|
128
128
|
value: _propTypes["default"].string,
|
|
129
129
|
secondaryValue: _propTypes["default"].string,
|
|
130
|
+
needBorder: _propTypes["default"].bool,
|
|
130
131
|
renderValueRightPlaceholderNode: _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].func]),
|
|
131
132
|
lhsAlignContent: _propTypes["default"].oneOf(['start', 'center', 'end']),
|
|
132
133
|
lhsJustifyContent: _propTypes["default"].oneOf(['start', 'center', 'end']),
|
|
@@ -205,6 +206,7 @@ var ListItemWithRadio_Props = {
|
|
|
205
206
|
title: _propTypes["default"].string,
|
|
206
207
|
value: _propTypes["default"].string,
|
|
207
208
|
secondaryValue: _propTypes["default"].string,
|
|
209
|
+
needBorder: _propTypes["default"].bool,
|
|
208
210
|
renderValueRightPlaceholderNode: _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].func]),
|
|
209
211
|
lhsAlignContent: _propTypes["default"].oneOf(['start', 'center', 'end']),
|
|
210
212
|
lhsJustifyContent: _propTypes["default"].oneOf(['start', 'center', 'end']),
|
|
@@ -1,11 +1,13 @@
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = Portal;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _Portal = _interopRequireDefault(require("@zohodesk/dotkit/es/react/components/Portal/Portal"));
|
|
11
13
|
|
|
@@ -17,16 +19,18 @@ var _propTypes = require("./props/propTypes");
|
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
20
26
|
function Portal(_ref) {
|
|
21
27
|
var children = _ref.children,
|
|
22
28
|
portalId = _ref.portalId;
|
|
23
|
-
var
|
|
29
|
+
var getPortalContainer = (0, _react.useCallback)(function () {
|
|
30
|
+
var getConfigPortalContainer = (0, _Config.getLibraryConfig)('getPortalContainer');
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (getPortalContainer && typeof getPortalContainer === 'function') {
|
|
29
|
-
var portal = getPortalContainer();
|
|
32
|
+
if (getConfigPortalContainer && typeof getConfigPortalContainer === 'function') {
|
|
33
|
+
var portal = getConfigPortalContainer();
|
|
30
34
|
|
|
31
35
|
if (portal) {
|
|
32
36
|
return portal;
|
|
@@ -34,10 +38,13 @@ function Portal(_ref) {
|
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
return null;
|
|
37
|
-
};
|
|
38
|
-
|
|
41
|
+
}, []);
|
|
42
|
+
var memoizedPortalId = (0, _react.useMemo)(function () {
|
|
43
|
+
var portalPrefix = (0, _Config.getLibraryConfig)("portalPrefix");
|
|
44
|
+
return "".concat(portalPrefix ? "".concat(portalPrefix) : '').concat(portalId);
|
|
45
|
+
}, [portalId]);
|
|
39
46
|
return /*#__PURE__*/_react["default"].createElement(_Portal["default"], {
|
|
40
|
-
portalId:
|
|
47
|
+
portalId: memoizedPortalId,
|
|
41
48
|
getFallbackElement: getPortalContainer
|
|
42
49
|
}, children);
|
|
43
50
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
visibility: hidden;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.transparentContainer .
|
|
16
|
+
.transparentContainer .active,
|
|
17
17
|
.transparentContainer:hover .arrowIcon {
|
|
18
18
|
opacity: 1;
|
|
19
19
|
visibility: visible;
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
.rotated,
|
|
31
31
|
.active,
|
|
32
|
-
.arrowContainer:hover .arrowIcon
|
|
33
|
-
.transparentContainer:hover .arrowIcon {
|
|
32
|
+
.arrowContainer:hover .arrowIcon {
|
|
34
33
|
--local-arrowIcon-color: var(--zdt_arrowicon_hover_icon);
|
|
35
34
|
}
|
|
36
35
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/components",
|
|
3
|
-
"version": "1.0.0-temp-242.
|
|
3
|
+
"version": "1.0.0-temp-242.4",
|
|
4
4
|
"main": "es/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"sstest": "npm run init && react-cli sstest",
|
|
50
50
|
"build:external": "npm run clean && npm run init && npm run docsjs:build && npm run build:externalDocCopy && react-cli build:component:umd && npm run externalDocHTMLChange",
|
|
51
51
|
"download": "npm run download_only && cd ../ && npm run download",
|
|
52
|
-
"download_only": "react-cli clean ./node_modules ./package-lock.json && npm install",
|
|
52
|
+
"download_only": "react-cli clean ./node_modules ./package-lock.json && npm install --legacy-peer-deps",
|
|
53
53
|
"expublish": "npm publish --tag experimental-version",
|
|
54
54
|
"css:lineheight:validate": "node ./node_modules/@zohodesk-private/node-plugins/es/lineheight_automation/lineHeightErrorCheck.js ./src/",
|
|
55
55
|
"cssVariableConvert": "react-cli variableConverter ./lib ./lib && react-cli variableConverter ./es ./es",
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
"@zohodesk-private/react-prop-validator": "1.2.3",
|
|
81
81
|
"@zohodesk/a11y": "2.3.8",
|
|
82
82
|
"@zohodesk/docstool": "1.0.0-alpha-2",
|
|
83
|
-
"@zohodesk/dotkit": "1.0.
|
|
83
|
+
"@zohodesk/dotkit": "1.0.0-temp-2.5",
|
|
84
84
|
"@zohodesk/hooks": "2.0.6",
|
|
85
|
-
"@zohodesk/icons": "1.1.
|
|
85
|
+
"@zohodesk/icons": "1.1.5",
|
|
86
86
|
"@zohodesk/layout": "3.1.0",
|
|
87
|
-
"@zohodesk/svg": "1.2.
|
|
87
|
+
"@zohodesk/svg": "1.2.6",
|
|
88
88
|
"@zohodesk/utils": "1.3.16",
|
|
89
89
|
"@zohodesk/variables": "1.2.0",
|
|
90
90
|
"@zohodesk/virtualizer": "1.0.13",
|
|
@@ -100,9 +100,9 @@
|
|
|
100
100
|
"selectn": "1.1.2"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
|
-
"@zohodesk/icons": "1.1.
|
|
103
|
+
"@zohodesk/icons": "1.1.5",
|
|
104
104
|
"@zohodesk/variables": "1.2.0",
|
|
105
|
-
"@zohodesk/svg": "1.2.
|
|
105
|
+
"@zohodesk/svg": "1.2.6",
|
|
106
106
|
"@zohodesk/virtualizer": "1.0.13",
|
|
107
107
|
"velocity-react": "1.4.3",
|
|
108
108
|
"react-sortable-hoc": "^0.8.3",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"@zohodesk/utils": "1.3.16",
|
|
111
111
|
"@zohodesk/a11y": "2.3.8",
|
|
112
112
|
"@zohodesk/layout": "3.1.0",
|
|
113
|
-
"@zohodesk/dotkit": "1.0.
|
|
113
|
+
"@zohodesk/dotkit": "1.0.5",
|
|
114
114
|
"color": "4.2.3"
|
|
115
115
|
}
|
|
116
116
|
}
|