@zohodesk/components 1.5.6 → 1.5.7
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 +5 -0
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +2 -0
- package/assets/Appearance/light/mode/Component_LightMode.module.css +2 -0
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +2 -0
- package/es/ListItem/ListItem.module.css +13 -2
- package/es/ListItem/props/propTypes.js +3 -3
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +1 -1
- package/lib/ListItem/ListItem.module.css +13 -2
- package/lib/ListItem/props/propTypes.js +3 -3
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +5 -5
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
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.7
|
|
6
|
+
|
|
7
|
+
- **ListContainer, ListItem, ListItemWithIcon**
|
|
8
|
+
- `danger` value supported for the **palette** prop.
|
|
9
|
+
|
|
5
10
|
# 1.5.6
|
|
6
11
|
|
|
7
12
|
- **ListItemWithRadio, ListItemWithCheckBox**
|
|
@@ -183,6 +183,8 @@
|
|
|
183
183
|
--zdt_listitem_active_border: var(--zdt_cta_primary_border);
|
|
184
184
|
--zdt_listitem_primary_bg: var(--dot_listItemActive);
|
|
185
185
|
--zdt_listitem_secondary_bg: var(--zdtm_cta_primary_bg_default);
|
|
186
|
+
--zdt_listitem_danger_bg: rgba(255, 107, 107, 0.05);
|
|
187
|
+
--zdt_listitem_danger_text: hsla(0, 100.00%, calc(70.98% + var(--zdc_default_inverse_lower)), calc(1 + var(--zdc_alpha_low)));
|
|
186
188
|
--zdt_listitem_secondary_text: hsla(0, 0.00%, calc(12.94% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
187
189
|
|
|
188
190
|
/* ribbon */
|
|
@@ -183,6 +183,8 @@
|
|
|
183
183
|
--zdt_listitem_active_border: var(--zdt_cta_primary_border);
|
|
184
184
|
--zdt_listitem_primary_bg: var(--dot_listItemActive);
|
|
185
185
|
--zdt_listitem_secondary_bg: var(--zdtm_cta_primary_bg_default);
|
|
186
|
+
--zdt_listitem_danger_bg: rgb(253,243,243);
|
|
187
|
+
--zdt_listitem_danger_text: hsla(0, 71.91%, calc(53.92% + var(--zdc_default_inverse_lower)), calc(1 + var(--zdc_alpha_low)));
|
|
186
188
|
--zdt_listitem_secondary_text: hsla(0, 0.00%, calc(100.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
187
189
|
|
|
188
190
|
/* ribbon */
|
|
@@ -183,6 +183,8 @@
|
|
|
183
183
|
--zdt_listitem_active_border: var(--zdt_cta_primary_border);
|
|
184
184
|
--zdt_listitem_primary_bg: var(--dot_listItemActive);
|
|
185
185
|
--zdt_listitem_secondary_bg: var(--zdtm_cta_primary_bg_default);
|
|
186
|
+
--zdt_listitem_danger_bg: rgba(255, 107, 107, 0.05);
|
|
187
|
+
--zdt_listitem_danger_text: hsla(0, 100.00%, calc(70.98% + var(--zdc_default_inverse_lower)), calc(1 + var(--zdc_alpha_low)));
|
|
186
188
|
--zdt_listitem_secondary_text: hsla(0, 0.00%, calc(12.94% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
187
189
|
|
|
188
190
|
/* ribbon */
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
.lhsBox_large {
|
|
137
137
|
max-height: calc(var(--listitem_doubleline_content_height) + var(--zd_size15)); /* 15px = listitem min-height - (top + bottom padding) - doubleLine content height */
|
|
138
138
|
}
|
|
139
|
-
.defaultHover, .primaryHover, .secondaryHover, .darkHover {
|
|
139
|
+
.defaultHover, .primaryHover, .dangerHover, .secondaryHover, .darkHover {
|
|
140
140
|
background-color: var(--listitem_highlight_bg_color);
|
|
141
141
|
}
|
|
142
142
|
.activewithBorder {
|
|
@@ -155,6 +155,13 @@
|
|
|
155
155
|
{
|
|
156
156
|
--listitem_bg_color: var(--zdt_listitem_highlight_bg);
|
|
157
157
|
}
|
|
158
|
+
.activedanger,
|
|
159
|
+
.dangerHover,
|
|
160
|
+
.dangerEffect:hover {
|
|
161
|
+
--listitem_bg_color: var(--zdt_listitem_danger_bg);
|
|
162
|
+
--listitem_highlight_bg_color: var(--zdt_listitem_danger_bg);
|
|
163
|
+
--listitem_text_color: var(--zdt_listitem_danger_text)
|
|
164
|
+
}
|
|
158
165
|
.primaryHover,
|
|
159
166
|
.primaryEffect:hover
|
|
160
167
|
/* .primaryEffect:focus */
|
|
@@ -177,7 +184,7 @@
|
|
|
177
184
|
--listitem_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
178
185
|
--listitem_highlight_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
179
186
|
}
|
|
180
|
-
.activedefault, .activeprimary, .activesecondary, .activedark {
|
|
187
|
+
.activedefault, .activeprimary, .activedanger, .activesecondary, .activedark {
|
|
181
188
|
background-color: var(--listitem_active_bg_color);
|
|
182
189
|
}
|
|
183
190
|
.activedefault,
|
|
@@ -186,6 +193,10 @@
|
|
|
186
193
|
.activeprimary:hover {
|
|
187
194
|
--listitem_active_bg_color: var(--zdt_listitem_primary_bg);
|
|
188
195
|
}
|
|
196
|
+
.activedanger,
|
|
197
|
+
.activedanger:hover {
|
|
198
|
+
--listitem_active_bg_color: var(--zdt_listitem_danger_bg);
|
|
199
|
+
}
|
|
189
200
|
.activesecondary {
|
|
190
201
|
--listitem_active_bg_color: var(--zdt_listitem_secondary_bg);
|
|
191
202
|
--listitem_text_color: var(--zdt_listitem_secondary_text);
|
|
@@ -17,7 +17,7 @@ export const ListContainer_Props = {
|
|
|
17
17
|
onClick: PropTypes.func,
|
|
18
18
|
onMouseEnter: PropTypes.func,
|
|
19
19
|
onMouseOver: PropTypes.func,
|
|
20
|
-
palette: PropTypes.oneOf(['default', 'primary', 'secondary', 'dark']),
|
|
20
|
+
palette: PropTypes.oneOf(['default', 'primary', 'secondary', 'dark', 'danger']),
|
|
21
21
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
22
22
|
target: PropTypes.oneOf(['blank', 'self']),
|
|
23
23
|
title: PropTypes.string,
|
|
@@ -48,7 +48,7 @@ export const ListItem_Props = {
|
|
|
48
48
|
needTick: PropTypes.bool,
|
|
49
49
|
onClick: PropTypes.func,
|
|
50
50
|
onMouseEnter: PropTypes.func,
|
|
51
|
-
palette: PropTypes.oneOf(['default', 'primary', 'secondary', 'dark']),
|
|
51
|
+
palette: PropTypes.oneOf(['default', 'primary', 'secondary', 'dark', 'danger']),
|
|
52
52
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
53
53
|
target: PropTypes.oneOf(['blank', 'self']),
|
|
54
54
|
title: PropTypes.string,
|
|
@@ -172,7 +172,7 @@ export const ListItemWithIcon_Props = {
|
|
|
172
172
|
needTick: PropTypes.bool,
|
|
173
173
|
onClick: PropTypes.func,
|
|
174
174
|
onMouseEnter: PropTypes.func,
|
|
175
|
-
palette: PropTypes.
|
|
175
|
+
palette: PropTypes.oneOf(['default', 'primary', 'secondary', 'dark', 'danger']),
|
|
176
176
|
size: PropTypes.string,
|
|
177
177
|
title: PropTypes.string,
|
|
178
178
|
value: PropTypes.string,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import useDropboxPosCalc from "../../../DropBox/DropBoxElement/useDropboxPosCalc";
|
|
3
3
|
import cssJSLogic from "../../../DropBox/DropBoxElement/css/cssJSLogic";
|
|
4
|
-
import { positionMapping } from
|
|
4
|
+
import { positionMapping } from '@zohodesk/dotkit/es/react/components/Popup/utils/positioning';
|
|
5
5
|
import { DropBoxElementDefaultProps } from "./props/defaultProps";
|
|
6
6
|
import { DropBoxElementPropTypes } from "./props/propTypes";
|
|
7
7
|
import { mergeStyle } from '@zohodesk/utils';
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
.lhsBox_large {
|
|
137
137
|
max-height: calc(var(--listitem_doubleline_content_height) + var(--zd_size15)); /* 15px = listitem min-height - (top + bottom padding) - doubleLine content height */
|
|
138
138
|
}
|
|
139
|
-
.defaultHover, .primaryHover, .secondaryHover, .darkHover {
|
|
139
|
+
.defaultHover, .primaryHover, .dangerHover, .secondaryHover, .darkHover {
|
|
140
140
|
background-color: var(--listitem_highlight_bg_color);
|
|
141
141
|
}
|
|
142
142
|
.activewithBorder {
|
|
@@ -155,6 +155,13 @@
|
|
|
155
155
|
{
|
|
156
156
|
--listitem_bg_color: var(--zdt_listitem_highlight_bg);
|
|
157
157
|
}
|
|
158
|
+
.activedanger,
|
|
159
|
+
.dangerHover,
|
|
160
|
+
.dangerEffect:hover {
|
|
161
|
+
--listitem_bg_color: var(--zdt_listitem_danger_bg);
|
|
162
|
+
--listitem_highlight_bg_color: var(--zdt_listitem_danger_bg);
|
|
163
|
+
--listitem_text_color: var(--zdt_listitem_danger_text)
|
|
164
|
+
}
|
|
158
165
|
.primaryHover,
|
|
159
166
|
.primaryEffect:hover
|
|
160
167
|
/* .primaryEffect:focus */
|
|
@@ -177,7 +184,7 @@
|
|
|
177
184
|
--listitem_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
178
185
|
--listitem_highlight_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
179
186
|
}
|
|
180
|
-
.activedefault, .activeprimary, .activesecondary, .activedark {
|
|
187
|
+
.activedefault, .activeprimary, .activedanger, .activesecondary, .activedark {
|
|
181
188
|
background-color: var(--listitem_active_bg_color);
|
|
182
189
|
}
|
|
183
190
|
.activedefault,
|
|
@@ -186,6 +193,10 @@
|
|
|
186
193
|
.activeprimary:hover {
|
|
187
194
|
--listitem_active_bg_color: var(--zdt_listitem_primary_bg);
|
|
188
195
|
}
|
|
196
|
+
.activedanger,
|
|
197
|
+
.activedanger:hover {
|
|
198
|
+
--listitem_active_bg_color: var(--zdt_listitem_danger_bg);
|
|
199
|
+
}
|
|
189
200
|
.activesecondary {
|
|
190
201
|
--listitem_active_bg_color: var(--zdt_listitem_secondary_bg);
|
|
191
202
|
--listitem_text_color: var(--zdt_listitem_secondary_text);
|
|
@@ -33,7 +33,7 @@ var ListContainer_Props = {
|
|
|
33
33
|
onClick: _propTypes["default"].func,
|
|
34
34
|
onMouseEnter: _propTypes["default"].func,
|
|
35
35
|
onMouseOver: _propTypes["default"].func,
|
|
36
|
-
palette: _propTypes["default"].oneOf(['default', 'primary', 'secondary', 'dark']),
|
|
36
|
+
palette: _propTypes["default"].oneOf(['default', 'primary', 'secondary', 'dark', 'danger']),
|
|
37
37
|
size: _propTypes["default"].oneOf(['small', 'medium', 'large']),
|
|
38
38
|
target: _propTypes["default"].oneOf(['blank', 'self']),
|
|
39
39
|
title: _propTypes["default"].string,
|
|
@@ -65,7 +65,7 @@ var ListItem_Props = {
|
|
|
65
65
|
needTick: _propTypes["default"].bool,
|
|
66
66
|
onClick: _propTypes["default"].func,
|
|
67
67
|
onMouseEnter: _propTypes["default"].func,
|
|
68
|
-
palette: _propTypes["default"].oneOf(['default', 'primary', 'secondary', 'dark']),
|
|
68
|
+
palette: _propTypes["default"].oneOf(['default', 'primary', 'secondary', 'dark', 'danger']),
|
|
69
69
|
size: _propTypes["default"].oneOf(['small', 'medium', 'large']),
|
|
70
70
|
target: _propTypes["default"].oneOf(['blank', 'self']),
|
|
71
71
|
title: _propTypes["default"].string,
|
|
@@ -163,7 +163,7 @@ var ListItemWithIcon_Props = {
|
|
|
163
163
|
needTick: _propTypes["default"].bool,
|
|
164
164
|
onClick: _propTypes["default"].func,
|
|
165
165
|
onMouseEnter: _propTypes["default"].func,
|
|
166
|
-
palette: _propTypes["default"].
|
|
166
|
+
palette: _propTypes["default"].oneOf(['default', 'primary', 'secondary', 'dark', 'danger']),
|
|
167
167
|
size: _propTypes["default"].string,
|
|
168
168
|
title: _propTypes["default"].string,
|
|
169
169
|
value: _propTypes["default"].string,
|
|
@@ -11,7 +11,7 @@ var _useDropboxPosCalc2 = _interopRequireDefault(require("../../../DropBox/DropB
|
|
|
11
11
|
|
|
12
12
|
var _cssJSLogic2 = _interopRequireDefault(require("../../../DropBox/DropBoxElement/css/cssJSLogic"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _positioning = require("@zohodesk/dotkit/es/react/components/Popup/utils/positioning");
|
|
15
15
|
|
|
16
16
|
var _defaultProps = require("./props/defaultProps");
|
|
17
17
|
|
|
@@ -74,13 +74,13 @@ function DropBoxElement(props) {
|
|
|
74
74
|
ariaMultiselectable = a11y.ariaMultiselectable,
|
|
75
75
|
ariaLabelledby = a11y.ariaLabelledby;
|
|
76
76
|
boxPosition = boxPosition && boxPosition != 'undefined' ? boxPosition : 'bottomCenter';
|
|
77
|
-
var boxDirection =
|
|
77
|
+
var boxDirection = _positioning.positionMapping[boxPosition].direction;
|
|
78
78
|
|
|
79
79
|
if (isAbsolute) {
|
|
80
|
-
arrowPosition = arrowPosition ? arrowPosition :
|
|
81
|
-
boxPosition =
|
|
80
|
+
arrowPosition = arrowPosition ? arrowPosition : _positioning.positionMapping[boxPosition].arrowPosition;
|
|
81
|
+
boxPosition = _positioning.positionMapping[boxPosition].positionStyle;
|
|
82
82
|
} else {
|
|
83
|
-
arrowPosition =
|
|
83
|
+
arrowPosition = _positioning.positionMapping[boxPosition].arrowPosition;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
var _useDropboxPosCalc = (0, _useDropboxPosCalc2["default"])(props),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/components",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7",
|
|
4
4
|
"main": "es/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -80,9 +80,9 @@
|
|
|
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.6",
|
|
84
84
|
"@zohodesk/hooks": "2.0.6",
|
|
85
|
-
"@zohodesk/icons": "1.1.
|
|
85
|
+
"@zohodesk/icons": "1.1.6",
|
|
86
86
|
"@zohodesk/layout": "3.1.0",
|
|
87
87
|
"@zohodesk/svg": "1.2.6",
|
|
88
88
|
"@zohodesk/utils": "1.3.16",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"selectn": "1.1.2"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
|
-
"@zohodesk/icons": "1.1.
|
|
103
|
+
"@zohodesk/icons": "1.1.6",
|
|
104
104
|
"@zohodesk/variables": "1.2.0",
|
|
105
105
|
"@zohodesk/svg": "1.2.6",
|
|
106
106
|
"@zohodesk/virtualizer": "1.0.13",
|
|
@@ -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.6",
|
|
114
114
|
"color": "4.2.3"
|
|
115
115
|
}
|
|
116
116
|
}
|