@zohodesk/dot 1.0.0-beta.251 → 1.0.0-beta.252
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 +6 -0
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +9 -3
- package/es/dropdown/ToggleDropDown/props/defaultProps.js +2 -1
- package/es/dropdown/ToggleDropDown/props/propTypes.js +5 -1
- package/es/list/status/StatusListItem/StatusListItem.js +1 -1
- package/es/list/status/StatusListItem/StatusListItem.module.css +7 -5
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +9 -3
- package/lib/dropdown/ToggleDropDown/props/defaultProps.js +2 -1
- package/lib/dropdown/ToggleDropDown/props/propTypes.js +5 -1
- package/lib/list/status/StatusListItem/StatusListItem.js +1 -1
- package/lib/list/status/StatusListItem/StatusListItem.module.css +7 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
+
# 1.0.0-beta.252
|
|
6
|
+
|
|
7
|
+
- **ToggleDropdown** - customClass (customDropBox and customListBox) Support added.
|
|
8
|
+
|
|
9
|
+
- **StatusDropdown** - align item value changed (center => baseline) and Line-height changed(18px => 20px)
|
|
10
|
+
|
|
5
11
|
# 1.0.0-beta.251
|
|
6
12
|
|
|
7
13
|
- **ToggleDropdown, StatusDropdown, StatusListItem** - Added New Prop `needMultiLineText`
|
|
@@ -520,7 +520,8 @@ export class ToggleDropDown extends Component {
|
|
|
520
520
|
palette,
|
|
521
521
|
getFooter,
|
|
522
522
|
customProps,
|
|
523
|
-
needMultiLineText
|
|
523
|
+
needMultiLineText,
|
|
524
|
+
customClass
|
|
524
525
|
} = this.props;
|
|
525
526
|
let {
|
|
526
527
|
ToggleDropDownProps = {},
|
|
@@ -529,6 +530,10 @@ export class ToggleDropDown extends Component {
|
|
|
529
530
|
ListItemWithIconProps = {},
|
|
530
531
|
ListItemProps = {}
|
|
531
532
|
} = customProps;
|
|
533
|
+
let {
|
|
534
|
+
customDropBox = '',
|
|
535
|
+
customListBox = ''
|
|
536
|
+
} = customClass;
|
|
532
537
|
const isPopupOpen = needExternalPopupState ? isPopupActive && isOpen : isOpen;
|
|
533
538
|
const Component = isToggleStateNeeded ? children.type : null,
|
|
534
539
|
componentProps = isToggleStateNeeded ? children.props : null;
|
|
@@ -613,7 +618,8 @@ export class ToggleDropDown extends Component {
|
|
|
613
618
|
isAnimate: true,
|
|
614
619
|
getRef: getContainerRef,
|
|
615
620
|
customClass: {
|
|
616
|
-
customDropBoxWrap: style.dropBoxContainer
|
|
621
|
+
customDropBoxWrap: style.dropBoxContainer,
|
|
622
|
+
customDropBox: customDropBox
|
|
617
623
|
},
|
|
618
624
|
needResponsive: needResponsive,
|
|
619
625
|
isPadding: isPadding,
|
|
@@ -659,7 +665,7 @@ export class ToggleDropDown extends Component {
|
|
|
659
665
|
scroll: "vertical",
|
|
660
666
|
preventParentScroll: "vertical",
|
|
661
667
|
dataId: `${dataId}_list`,
|
|
662
|
-
className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}`,
|
|
668
|
+
className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt} ${customListBox}`,
|
|
663
669
|
eleRef: this.scrollContentRef,
|
|
664
670
|
onScroll: this.handleScroll,
|
|
665
671
|
role: isSearch ? 'listbox' : undefined,
|
|
@@ -68,5 +68,9 @@ export const propTypes = {
|
|
|
68
68
|
ListItemProps: PropTypes.object
|
|
69
69
|
}),
|
|
70
70
|
preventPopupClose: PropTypes.bool,
|
|
71
|
-
needMultiLineText: PropTypes.bool
|
|
71
|
+
needMultiLineText: PropTypes.bool,
|
|
72
|
+
customClass: PropTypes.shape({
|
|
73
|
+
customDropBox: PropTypes.string,
|
|
74
|
+
customListBox: PropTypes.string
|
|
75
|
+
})
|
|
72
76
|
};
|
|
@@ -77,7 +77,7 @@ export default class StatusListItem extends React.Component {
|
|
|
77
77
|
role: role,
|
|
78
78
|
"aria-selected": ariaSelected,
|
|
79
79
|
isCover: false,
|
|
80
|
-
align: "
|
|
80
|
+
align: "baseline",
|
|
81
81
|
alignBox: "row",
|
|
82
82
|
className: `${style.list} ${style[size]} ${style[palette]} ${active ? style.active : highlight && !isDisabled ? style.hover : ''} ${autoHover && !isDisabled ? style.effect : ''} ${needTick ? style.withTick : ''} ${isDisabled ? CssProvider('isDisable') : ''} ${needBorder ? style.withBorder : ''}`,
|
|
83
83
|
dataId: String(value).replace("'", '_'),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
font-size: var(--zd_font_size13);
|
|
4
4
|
position: relative;
|
|
5
5
|
list-style: none;
|
|
6
|
+
min-height: var(--zd_size35);
|
|
6
7
|
cursor: pointer;
|
|
7
8
|
}
|
|
8
9
|
[dir=ltr] .withBorder {
|
|
@@ -12,13 +13,13 @@
|
|
|
12
13
|
border-right: 1px solid var(--zdt_statuslistitem_default_border);
|
|
13
14
|
}
|
|
14
15
|
[dir=ltr] .small {
|
|
15
|
-
padding: var(--
|
|
16
|
+
padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5);
|
|
16
17
|
}
|
|
17
18
|
[dir=rtl] .small {
|
|
18
|
-
padding: var(--
|
|
19
|
+
padding: var(--zd_size7) var(--zd_size5) var(--zd_size7) var(--zd_size3);
|
|
19
20
|
}
|
|
20
21
|
.medium {
|
|
21
|
-
padding: var(--
|
|
22
|
+
padding: var(--zd_size7) var(--zd_size20);
|
|
22
23
|
}
|
|
23
24
|
.large {
|
|
24
25
|
height: var(--zd_size48);
|
|
@@ -29,13 +30,14 @@
|
|
|
29
30
|
[dir=rtl] .large {
|
|
30
31
|
padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size3);
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
+
.value,.multiLineValue {
|
|
34
|
+
line-height: var(--zd_size20);
|
|
35
|
+
}
|
|
33
36
|
.value {
|
|
34
37
|
composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
|
|
35
38
|
}
|
|
36
39
|
.multiLineValue{
|
|
37
40
|
word-break: break-word;
|
|
38
|
-
line-height: var(--zd_size18);
|
|
39
41
|
composes: clamp from '~@zohodesk/components/lib/common/common.module.css';
|
|
40
42
|
}
|
|
41
43
|
[dir=ltr] .withBorder.active {
|
|
@@ -569,7 +569,8 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
569
569
|
palette = _this$props12.palette,
|
|
570
570
|
getFooter = _this$props12.getFooter,
|
|
571
571
|
customProps = _this$props12.customProps,
|
|
572
|
-
needMultiLineText = _this$props12.needMultiLineText
|
|
572
|
+
needMultiLineText = _this$props12.needMultiLineText,
|
|
573
|
+
customClass = _this$props12.customClass;
|
|
573
574
|
var _customProps$ToggleDr = customProps.ToggleDropDownProps,
|
|
574
575
|
ToggleDropDownProps = _customProps$ToggleDr === void 0 ? {} : _customProps$ToggleDr,
|
|
575
576
|
_customProps$DropBoxP = customProps.DropBoxProps,
|
|
@@ -580,6 +581,10 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
580
581
|
ListItemWithIconProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
581
582
|
_customProps$ListItem2 = customProps.ListItemProps,
|
|
582
583
|
ListItemProps = _customProps$ListItem2 === void 0 ? {} : _customProps$ListItem2;
|
|
584
|
+
var _customClass$customDr = customClass.customDropBox,
|
|
585
|
+
customDropBox = _customClass$customDr === void 0 ? '' : _customClass$customDr,
|
|
586
|
+
_customClass$customLi = customClass.customListBox,
|
|
587
|
+
customListBox = _customClass$customLi === void 0 ? '' : _customClass$customLi;
|
|
583
588
|
var isPopupOpen = needExternalPopupState ? isPopupActive && isOpen : isOpen;
|
|
584
589
|
var Component = isToggleStateNeeded ? children.type : null,
|
|
585
590
|
componentProps = isToggleStateNeeded ? children.props : null;
|
|
@@ -661,7 +666,8 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
661
666
|
isAnimate: true,
|
|
662
667
|
getRef: getContainerRef,
|
|
663
668
|
customClass: {
|
|
664
|
-
customDropBoxWrap: _ToggleDropDownModule["default"].dropBoxContainer
|
|
669
|
+
customDropBoxWrap: _ToggleDropDownModule["default"].dropBoxContainer,
|
|
670
|
+
customDropBox: customDropBox
|
|
665
671
|
},
|
|
666
672
|
needResponsive: needResponsive,
|
|
667
673
|
isPadding: isPadding,
|
|
@@ -707,7 +713,7 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
707
713
|
scroll: "vertical",
|
|
708
714
|
preventParentScroll: "vertical",
|
|
709
715
|
dataId: "".concat(dataId, "_list"),
|
|
710
|
-
className: "".concat(tabletMode ? _ToggleDropDownModule["default"].responsivemaxHgt : _ToggleDropDownModule["default"].maxHgt),
|
|
716
|
+
className: "".concat(tabletMode ? _ToggleDropDownModule["default"].responsivemaxHgt : _ToggleDropDownModule["default"].maxHgt, " ").concat(customListBox),
|
|
711
717
|
eleRef: _this6.scrollContentRef,
|
|
712
718
|
onScroll: _this6.handleScroll,
|
|
713
719
|
role: isSearch ? 'listbox' : undefined,
|
|
@@ -75,6 +75,10 @@ var propTypes = {
|
|
|
75
75
|
ListItemProps: _propTypes["default"].object
|
|
76
76
|
}),
|
|
77
77
|
preventPopupClose: _propTypes["default"].bool,
|
|
78
|
-
needMultiLineText: _propTypes["default"].bool
|
|
78
|
+
needMultiLineText: _propTypes["default"].bool,
|
|
79
|
+
customClass: _propTypes["default"].shape({
|
|
80
|
+
customDropBox: _propTypes["default"].string,
|
|
81
|
+
customListBox: _propTypes["default"].string
|
|
82
|
+
})
|
|
79
83
|
};
|
|
80
84
|
exports.propTypes = propTypes;
|
|
@@ -102,7 +102,7 @@ var StatusListItem = /*#__PURE__*/function (_React$Component) {
|
|
|
102
102
|
role: role,
|
|
103
103
|
"aria-selected": ariaSelected,
|
|
104
104
|
isCover: false,
|
|
105
|
-
align: "
|
|
105
|
+
align: "baseline",
|
|
106
106
|
alignBox: "row",
|
|
107
107
|
className: "".concat(_StatusListItemModule["default"].list, " ").concat(_StatusListItemModule["default"][size], " ").concat(_StatusListItemModule["default"][palette], " ").concat(active ? _StatusListItemModule["default"].active : highlight && !isDisabled ? _StatusListItemModule["default"].hover : '', " ").concat(autoHover && !isDisabled ? _StatusListItemModule["default"].effect : '', " ").concat(needTick ? _StatusListItemModule["default"].withTick : '', " ").concat(isDisabled ? (0, _CssProvider["default"])('isDisable') : '', " ").concat(needBorder ? _StatusListItemModule["default"].withBorder : ''),
|
|
108
108
|
dataId: String(value).replace("'", '_'),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
font-size: var(--zd_font_size13);
|
|
4
4
|
position: relative;
|
|
5
5
|
list-style: none;
|
|
6
|
+
min-height: var(--zd_size35);
|
|
6
7
|
cursor: pointer;
|
|
7
8
|
}
|
|
8
9
|
[dir=ltr] .withBorder {
|
|
@@ -12,13 +13,13 @@
|
|
|
12
13
|
border-right: 1px solid var(--zdt_statuslistitem_default_border);
|
|
13
14
|
}
|
|
14
15
|
[dir=ltr] .small {
|
|
15
|
-
padding: var(--
|
|
16
|
+
padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5);
|
|
16
17
|
}
|
|
17
18
|
[dir=rtl] .small {
|
|
18
|
-
padding: var(--
|
|
19
|
+
padding: var(--zd_size7) var(--zd_size5) var(--zd_size7) var(--zd_size3);
|
|
19
20
|
}
|
|
20
21
|
.medium {
|
|
21
|
-
padding: var(--
|
|
22
|
+
padding: var(--zd_size7) var(--zd_size20);
|
|
22
23
|
}
|
|
23
24
|
.large {
|
|
24
25
|
height: var(--zd_size48);
|
|
@@ -29,13 +30,14 @@
|
|
|
29
30
|
[dir=rtl] .large {
|
|
30
31
|
padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size3);
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
+
.value,.multiLineValue {
|
|
34
|
+
line-height: var(--zd_size20);
|
|
35
|
+
}
|
|
33
36
|
.value {
|
|
34
37
|
composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
|
|
35
38
|
}
|
|
36
39
|
.multiLineValue{
|
|
37
40
|
word-break: break-word;
|
|
38
|
-
line-height: var(--zd_size18);
|
|
39
41
|
composes: clamp from '~@zohodesk/components/lib/common/common.module.css';
|
|
40
42
|
}
|
|
41
43
|
[dir=ltr] .withBorder.active {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/dot",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.252",
|
|
4
4
|
"main": "lib/index",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"velocity-react": "1.4.3",
|
|
45
45
|
"@zohodesk/variables": "1.0.0-beta.30",
|
|
46
46
|
"@zohodesk/i18n": "1.0.0-beta.7",
|
|
47
|
-
"@zohodesk/components": "1.0.0-alpha-
|
|
47
|
+
"@zohodesk/components": "1.0.0-alpha-263",
|
|
48
48
|
"@zohodesk/icons": "1.0.0-beta.119",
|
|
49
49
|
"@zohodesk/svg": "1.0.0-beta.54",
|
|
50
50
|
"@zohodesk/virtualizer": "1.0.3",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"velocity-react": "1.4.3",
|
|
56
56
|
"@zohodesk/variables": "1.0.0-beta.30",
|
|
57
57
|
"@zohodesk/i18n": "1.0.0-beta.7",
|
|
58
|
-
"@zohodesk/components": "1.0.0-alpha-
|
|
58
|
+
"@zohodesk/components": "1.0.0-alpha-263",
|
|
59
59
|
"@zohodesk/icons": "1.0.0-beta.119",
|
|
60
60
|
"@zohodesk/svg": "1.0.0-beta.54",
|
|
61
61
|
"@zohodesk/virtualizer": "1.0.3",
|