diginet-core-ui 1.3.57 → 1.3.59
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/components/form-control/checkbox/index.js +4 -2
- package/components/form-control/dropdown/index.js +22 -15
- package/components/form-control/money-input/index.js +11 -11
- package/components/index.js +3 -1
- package/components/tree-view/index.js +132 -42
- package/icons/basic.js +100 -0
- package/package.json +1 -1
- package/readme.md +9 -0
|
@@ -44,6 +44,7 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
44
44
|
forTreeView,
|
|
45
45
|
width,
|
|
46
46
|
labelProps,
|
|
47
|
+
stopPropagation,
|
|
47
48
|
...props
|
|
48
49
|
}, reference) => {
|
|
49
50
|
if (!inputRef) {
|
|
@@ -68,7 +69,7 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
68
69
|
const _CheckBoxInputCSS = CheckBoxInputCSS(_CheckBoxSquareCSS.name, clMain);
|
|
69
70
|
|
|
70
71
|
const handleChange = event => {
|
|
71
|
-
event.stopPropagation();
|
|
72
|
+
stopPropagation && event.stopPropagation();
|
|
72
73
|
if (readOnly || inputProps.readOnly || disabled || inputProps.disabled) return;
|
|
73
74
|
const oldLogicChecked = inputRef.current.checked; //Use for TreeView
|
|
74
75
|
|
|
@@ -278,7 +279,8 @@ Checkbox.defaultProps = {
|
|
|
278
279
|
determinate: true,
|
|
279
280
|
inputProps: {},
|
|
280
281
|
labelProps: {},
|
|
281
|
-
width: 18
|
|
282
|
+
width: 18,
|
|
283
|
+
stopPropagation: true
|
|
282
284
|
};
|
|
283
285
|
Checkbox.propTypes = {
|
|
284
286
|
/** If `true`, the component is checked. */
|
|
@@ -115,6 +115,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
115
115
|
const searchRef = useRef(null);
|
|
116
116
|
const lastSearchRef = useRef(null);
|
|
117
117
|
const timeout = useRef(null);
|
|
118
|
+
const loadMoreTimer = useRef(null);
|
|
118
119
|
const [unique] = useState(randomString(6, {
|
|
119
120
|
allowNumber: false,
|
|
120
121
|
allowSymbol: false
|
|
@@ -720,22 +721,28 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
720
721
|
};
|
|
721
722
|
|
|
722
723
|
const onLoadMoreHandler = e => {
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
scrollHeight,
|
|
726
|
-
offsetHeight
|
|
727
|
-
} = e.target;
|
|
728
|
-
|
|
729
|
-
if (scrollHeight === Math.ceil(scrollTop) + offsetHeight && dropdownListRef.current) {
|
|
730
|
-
var _dropdownListRef$curr4, _currentObjectDefault3;
|
|
731
|
-
|
|
732
|
-
const length = ((_dropdownListRef$curr4 = dropdownListRef.current.children) === null || _dropdownListRef$curr4 === void 0 ? void 0 : _dropdownListRef$curr4.length) - (((_currentObjectDefault3 = currentObjectDefault[unique]) === null || _currentObjectDefault3 === void 0 ? void 0 : _currentObjectDefault3.length) || 0);
|
|
733
|
-
dropdownListRef.current.removeEventListener('scroll', onLoadMoreHandler);
|
|
734
|
-
!!onLoadMore && onLoadMore({
|
|
735
|
-
skip: length,
|
|
736
|
-
limit: limit
|
|
737
|
-
});
|
|
724
|
+
if (loadMoreTimer.current) {
|
|
725
|
+
clearTimeout(loadMoreTimer.current);
|
|
738
726
|
}
|
|
727
|
+
|
|
728
|
+
loadMoreTimer.current = setTimeout(() => {
|
|
729
|
+
const {
|
|
730
|
+
scrollTop,
|
|
731
|
+
scrollHeight,
|
|
732
|
+
offsetHeight
|
|
733
|
+
} = e.target;
|
|
734
|
+
|
|
735
|
+
if (scrollHeight === Math.ceil(scrollTop) + offsetHeight && dropdownListRef.current) {
|
|
736
|
+
var _dropdownListRef$curr4, _currentObjectDefault3;
|
|
737
|
+
|
|
738
|
+
const length = ((_dropdownListRef$curr4 = dropdownListRef.current.children) === null || _dropdownListRef$curr4 === void 0 ? void 0 : _dropdownListRef$curr4.length) - (((_currentObjectDefault3 = currentObjectDefault[unique]) === null || _currentObjectDefault3 === void 0 ? void 0 : _currentObjectDefault3.length) || 0);
|
|
739
|
+
dropdownListRef.current.removeEventListener('scroll', onLoadMoreHandler);
|
|
740
|
+
!!onLoadMore && onLoadMore({
|
|
741
|
+
skip: length,
|
|
742
|
+
limit: limit
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
});
|
|
739
746
|
};
|
|
740
747
|
|
|
741
748
|
const onPreventKeyDownHandler = e => {
|
|
@@ -548,10 +548,10 @@ MoneyInput.propTypes = {
|
|
|
548
548
|
/** style inline of input in MoneyInput component */
|
|
549
549
|
inputStyle: PropTypes.object,
|
|
550
550
|
|
|
551
|
-
/** validation value, argument can:<br/>
|
|
552
|
-
* * string: the validation rule. Example required.<br/>
|
|
553
|
-
* * object: the validation rule insist name, property, message. Example {name: 'min', compareValue: 9, message: 'Error'} or {max: 99}<br/>
|
|
554
|
-
* * array: the validation rule list, insist object/string
|
|
551
|
+
/** validation value, argument can:<br/>
|
|
552
|
+
* * string: the validation rule. Example required.<br/>
|
|
553
|
+
* * object: the validation rule insist name, property, message. Example {name: 'min', compareValue: 9, message: 'Error'} or {max: 99}<br/>
|
|
554
|
+
* * array: the validation rule list, insist object/string
|
|
555
555
|
*/
|
|
556
556
|
validates: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.array, PropTypes.func]),
|
|
557
557
|
|
|
@@ -564,13 +564,13 @@ MoneyInput.propTypes = {
|
|
|
564
564
|
/** on input function */
|
|
565
565
|
onInput: PropTypes.func,
|
|
566
566
|
|
|
567
|
-
/**
|
|
568
|
-
* on change function, return an object:<br/>
|
|
569
|
-
* {<br/>
|
|
570
|
-
* value: is a number or null value<br/>
|
|
571
|
-
* target.value: value of input<br/>
|
|
572
|
-
* ...element<br/>
|
|
573
|
-
* }
|
|
567
|
+
/**
|
|
568
|
+
* on change function, return an object:<br/>
|
|
569
|
+
* {<br/>
|
|
570
|
+
* value: is a number or null value<br/>
|
|
571
|
+
* target.value: value of input<br/>
|
|
572
|
+
* ...element<br/>
|
|
573
|
+
* }
|
|
574
574
|
*/
|
|
575
575
|
onChange: PropTypes.func,
|
|
576
576
|
|
package/components/index.js
CHANGED
|
@@ -57,7 +57,9 @@ export { default as Toggle } from './form-control/toggle'; // Grid
|
|
|
57
57
|
|
|
58
58
|
export { default as Grid } from './grid';
|
|
59
59
|
export { default as Row } from './grid/Row';
|
|
60
|
-
export { default as Col } from './grid/Col'; //
|
|
60
|
+
export { default as Col } from './grid/Col'; //Icon
|
|
61
|
+
|
|
62
|
+
export { default as Icon } from '../icons/index'; // List
|
|
61
63
|
|
|
62
64
|
export { default as List } from './list/list';
|
|
63
65
|
export { default as ListItem } from './list/list-item';
|
|
@@ -4,18 +4,27 @@
|
|
|
4
4
|
import { memo, useMemo, useState, useEffect, useRef, forwardRef, Fragment, useImperativeHandle } from 'react';
|
|
5
5
|
import { render } from 'react-dom';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { jsx } from '@emotion/core';
|
|
8
|
-
import { TreeViewRootCSS } from './css';
|
|
7
|
+
import { jsx, css } from '@emotion/core';
|
|
9
8
|
import { Accordion, AccordionSummary, AccordionDetails, Typography, Checkbox, Divider, InputBase, ButtonIcon } from '..';
|
|
10
9
|
import { mapParent, randomString, removeUnicode } from '../../utils';
|
|
11
10
|
import { getGlobal } from '../../global';
|
|
11
|
+
import { alignCenter, borderBox, cursorPointer, displayBlock, displayInlineBlock, flexRow, positionRelative } from '../../styles/general';
|
|
12
|
+
import theme from '../../theme/settings';
|
|
13
|
+
const {
|
|
14
|
+
colors: {
|
|
15
|
+
fill: {
|
|
16
|
+
focus: fillFocus,
|
|
17
|
+
hover: fillHover,
|
|
18
|
+
pressed: fillPressed
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
} = theme;
|
|
12
22
|
const separatorPattern = /\{\w+\}/g;
|
|
13
23
|
const currentValue = {},
|
|
14
24
|
itemsRenderAsync = {};
|
|
15
25
|
const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
16
26
|
expand,
|
|
17
27
|
disabled,
|
|
18
|
-
disabledMap,
|
|
19
28
|
selectBox,
|
|
20
29
|
multiple,
|
|
21
30
|
selectAll,
|
|
@@ -60,22 +69,20 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
60
69
|
if (multipleValueMode === 'multiple' || disabledRelevantValue) {
|
|
61
70
|
input.classList[determinate ? 'add' : 'remove']('determinate');
|
|
62
71
|
input.classList[determinate ? 'remove' : 'add']('indeterminate');
|
|
63
|
-
input.nextElementSibling.classList[determinate ? 'add' : 'remove']('determinate');
|
|
64
|
-
input.nextElementSibling.classList[determinate ? 'remove' : 'add']('indeterminate');
|
|
72
|
+
input.nextElementSibling.firstChild.classList[determinate ? 'add' : 'remove']('determinate');
|
|
73
|
+
input.nextElementSibling.firstChild.classList[determinate ? 'remove' : 'add']('indeterminate');
|
|
65
74
|
}
|
|
66
|
-
}; //
|
|
67
|
-
|
|
75
|
+
}; // const triggerCheckboxRecursion = (nodes, isChecked) => {
|
|
76
|
+
// nodes.forEach(el => {
|
|
77
|
+
// if (el.classList.contains('non-child')) {
|
|
78
|
+
// el.querySelector('input').checked = isChecked;
|
|
79
|
+
// } else {
|
|
80
|
+
// el.firstChild.querySelector('input').checked = isChecked;
|
|
81
|
+
// triggerCheckboxRecursion(Array.from(el.lastChild.firstChild.childNodes), isChecked);
|
|
82
|
+
// }
|
|
83
|
+
// });
|
|
84
|
+
// };
|
|
68
85
|
|
|
69
|
-
const triggerCheckboxRecursion = (nodes, isChecked) => {
|
|
70
|
-
nodes.forEach(el => {
|
|
71
|
-
if (el.classList.contains('non-child')) {
|
|
72
|
-
el.querySelector('input').checked = isChecked;
|
|
73
|
-
} else {
|
|
74
|
-
el.firstChild.querySelector('input').checked = isChecked;
|
|
75
|
-
triggerCheckboxRecursion(Array.from(el.lastChild.firstChild.childNodes), isChecked);
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
86
|
|
|
80
87
|
const checkedParentFollowValue = nodes => {
|
|
81
88
|
if (nodes && nodes !== null && nodes !== void 0 && nodes.length) {
|
|
@@ -331,6 +338,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
331
338
|
};
|
|
332
339
|
|
|
333
340
|
const onClickHandler = (e, data) => {
|
|
341
|
+
if (disabled) return;
|
|
334
342
|
const target = e.target;
|
|
335
343
|
const currentTarget = e.currentTarget;
|
|
336
344
|
let value = typeof data === 'object' ? data[valueExpr] : data;
|
|
@@ -665,9 +673,9 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
665
673
|
}, jsx(Checkbox, {
|
|
666
674
|
forTreeView: true,
|
|
667
675
|
checked: isTrue,
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
676
|
+
value: typeof data === 'object' ? data[valueExpr] : data,
|
|
677
|
+
stopPropagation: false,
|
|
678
|
+
disabled: disabled
|
|
671
679
|
})), renderContent(data, keyArr, index))), jsx(AccordionDetails, {
|
|
672
680
|
id: id
|
|
673
681
|
}, childItems.map((child, i) => renderTreeView(child, index + i, level + 1, sync, id))));
|
|
@@ -686,9 +694,9 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
686
694
|
}, jsx(Checkbox, {
|
|
687
695
|
forTreeView: true,
|
|
688
696
|
checked: isTrue,
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
697
|
+
value: typeof data === 'object' ? data[valueExpr] : data,
|
|
698
|
+
stopPropagation: false,
|
|
699
|
+
disabled: disabled
|
|
692
700
|
})), renderContent(data, keyArr, index));
|
|
693
701
|
};
|
|
694
702
|
|
|
@@ -702,6 +710,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
702
710
|
if (searchDelayTime) {
|
|
703
711
|
var _searchDelayTime$matc, _searchDelayTime$matc2;
|
|
704
712
|
|
|
713
|
+
if (searchDelayTime === true) searchDelayTime = getGlobal('delayOnInput');
|
|
705
714
|
const units = {
|
|
706
715
|
m: 60000,
|
|
707
716
|
s: 1000,
|
|
@@ -781,19 +790,6 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
781
790
|
};
|
|
782
791
|
}
|
|
783
792
|
}, [dataSource, value, multiple, selectBox]);
|
|
784
|
-
useEffect(() => {
|
|
785
|
-
if (disabled && ref.current) {
|
|
786
|
-
const childNodes = ref.current.childNodes;
|
|
787
|
-
Array.from(childNodes).forEach(node => {
|
|
788
|
-
node.classList.add('disabled');
|
|
789
|
-
});
|
|
790
|
-
return () => {
|
|
791
|
-
Array.from(childNodes).forEach(node => {
|
|
792
|
-
node.classList.remove('disabled');
|
|
793
|
-
});
|
|
794
|
-
};
|
|
795
|
-
}
|
|
796
|
-
}, [disabled]);
|
|
797
793
|
useEffect(() => {
|
|
798
794
|
var _Object$keys;
|
|
799
795
|
|
|
@@ -860,14 +856,111 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
860
856
|
forTreeView: true,
|
|
861
857
|
label: selectAllLabel,
|
|
862
858
|
onChange: onSelectAll,
|
|
863
|
-
inputRef: selectAllRef
|
|
859
|
+
inputRef: selectAllRef,
|
|
860
|
+
stopPropagation: false,
|
|
861
|
+
disabled: disabled
|
|
864
862
|
})), jsx(Divider, null)), jsx("div", {
|
|
865
863
|
ref: ref,
|
|
866
864
|
...props,
|
|
867
865
|
className: ['TreeView-Content', disabled ? 'disabled' : '', className].join(' ').trim().replace(/\s+/g, ' ')
|
|
868
|
-
},
|
|
869
|
-
}, [dataSource, value, multiple, selectBox, disabledBoldResult, autoExpandToResult, showChildrenOfResult, searchMode, onChange, searchProps]);
|
|
866
|
+
}, mapParent(dataSource, id, parentID, true).map((data, index) => renderTreeView(data, index.toString(), 0, sync))));
|
|
867
|
+
}, [dataSource, value, renderAsyncWithLength, disabled, showSelectedItems, allowSearch, multiple, selectAll, selectAllLabel, className, selectBox, id, parentID, disabledBoldResult, autoExpandToResult, showChildrenOfResult, searchMode, onChange, searchProps]);
|
|
870
868
|
}));
|
|
869
|
+
const TreeViewRootCSS = css`
|
|
870
|
+
${displayBlock};
|
|
871
|
+
${positionRelative};
|
|
872
|
+
.DGN-UI-Accordion {
|
|
873
|
+
box-shadow: none !important;
|
|
874
|
+
.DGN-UI-Accordion-Summary {
|
|
875
|
+
${alignCenter};
|
|
876
|
+
min-height: 40px;
|
|
877
|
+
padding: 0;
|
|
878
|
+
border-radius: 0;
|
|
879
|
+
&.focus {
|
|
880
|
+
background-color: ${theme.colors.focus};
|
|
881
|
+
}
|
|
882
|
+
.Accordion-Icon-Root {
|
|
883
|
+
${flexRow};
|
|
884
|
+
margin-right: 4px;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
.DGN-UI-Accordion-Details-Content {
|
|
888
|
+
padding: 0;
|
|
889
|
+
border-radius: 0;
|
|
890
|
+
}
|
|
891
|
+
.Accordion-Icon-Root {
|
|
892
|
+
${flexRow};
|
|
893
|
+
transition: opacity 0.2s ease-out;
|
|
894
|
+
opacity: 1;
|
|
895
|
+
&.DGN-Invisible {
|
|
896
|
+
opacity: 0;
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
&.DGN-Hidden {
|
|
900
|
+
display: none !important;
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
.TreeView-All,
|
|
904
|
+
.TreeView-Content {
|
|
905
|
+
${displayBlock};
|
|
906
|
+
${positionRelative};
|
|
907
|
+
.DGN-UI-Accordion {
|
|
908
|
+
margin-bottom: 0;
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
.TreeView-Item-Checkbox {
|
|
912
|
+
${displayInlineBlock};
|
|
913
|
+
${positionRelative};
|
|
914
|
+
height: 100%;
|
|
915
|
+
margin-right: 8px;
|
|
916
|
+
}
|
|
917
|
+
.TreeView-Item {
|
|
918
|
+
${flexRow};
|
|
919
|
+
${positionRelative};
|
|
920
|
+
${alignCenter};
|
|
921
|
+
${borderBox};
|
|
922
|
+
min-height: 40px;
|
|
923
|
+
text-align: left;
|
|
924
|
+
color: ${theme.colors.text.main};
|
|
925
|
+
width: 100%;
|
|
926
|
+
&.non-child {
|
|
927
|
+
${cursorPointer};
|
|
928
|
+
transition: background-color 300ms ease;
|
|
929
|
+
&.disabled {
|
|
930
|
+
color: ${theme.colors.disabled};
|
|
931
|
+
cursor: no-drop;
|
|
932
|
+
}
|
|
933
|
+
&:not(.disabled) {
|
|
934
|
+
&:hover {
|
|
935
|
+
background-color: ${fillHover};
|
|
936
|
+
}
|
|
937
|
+
&:focus {
|
|
938
|
+
background-color: ${fillFocus};
|
|
939
|
+
}
|
|
940
|
+
&:active {
|
|
941
|
+
background-color: ${fillPressed};
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
&.DGN-Hidden {
|
|
945
|
+
display: none !important;
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
&.focus {
|
|
949
|
+
background-color: ${theme.colors.focus};
|
|
950
|
+
}
|
|
951
|
+
&.TreeView-Item-active .DGN-UI-Typography {
|
|
952
|
+
font-weight: bold;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
&.expand-able {
|
|
956
|
+
.TreeView-All {
|
|
957
|
+
margin-left: 34px;
|
|
958
|
+
}
|
|
959
|
+
.TreeView-Item.non-child {
|
|
960
|
+
padding-left: 34px;
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
`;
|
|
871
964
|
TreeView.defaultProps = {
|
|
872
965
|
expand: false,
|
|
873
966
|
disabled: false,
|
|
@@ -903,9 +996,6 @@ TreeView.propTypes = {
|
|
|
903
996
|
/** prevent all event if true */
|
|
904
997
|
disabled: PropTypes.bool,
|
|
905
998
|
|
|
906
|
-
/** Will not map parent from data */
|
|
907
|
-
disabledMap: PropTypes.bool,
|
|
908
|
-
|
|
909
999
|
/** show checkbox in each item */
|
|
910
1000
|
selectBox: PropTypes.bool,
|
|
911
1001
|
|
package/icons/basic.js
CHANGED
|
@@ -1342,6 +1342,54 @@ export const ChatBubble = /*#__PURE__*/memo(({
|
|
|
1342
1342
|
fill: colors[color] || color
|
|
1343
1343
|
}));
|
|
1344
1344
|
});
|
|
1345
|
+
export const Checkin = /*#__PURE__*/memo(({
|
|
1346
|
+
width,
|
|
1347
|
+
height,
|
|
1348
|
+
color = '#7F828E',
|
|
1349
|
+
viewBox = false
|
|
1350
|
+
}) => {
|
|
1351
|
+
return viewBox ? /*#__PURE__*/React.createElement("svg", {
|
|
1352
|
+
width: width || 24,
|
|
1353
|
+
height: height || 24,
|
|
1354
|
+
viewBox: "0 0 24 24",
|
|
1355
|
+
fill: "none"
|
|
1356
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1357
|
+
d: "M11 7L9.6 8.4L12.2 11H2V13H12.2L9.6 15.6L11 17L16 12L11 7ZM20 19H12V21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3H12V5H20V19Z",
|
|
1358
|
+
fill: colors[color] || color
|
|
1359
|
+
})) : /*#__PURE__*/React.createElement("svg", {
|
|
1360
|
+
width: width || 20,
|
|
1361
|
+
height: height || 18,
|
|
1362
|
+
viewBox: "0 0 20 18",
|
|
1363
|
+
fill: "none"
|
|
1364
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1365
|
+
d: "M9 4L7.6 5.4L10.2 8H0V10H10.2L7.6 12.6L9 14L14 9L9 4ZM18 16H10V18H18C19.1 18 20 17.1 20 16V2C20 0.9 19.1 0 18 0H10V2H18V16Z",
|
|
1366
|
+
fill: colors[color] || color
|
|
1367
|
+
}));
|
|
1368
|
+
});
|
|
1369
|
+
export const Checkout = /*#__PURE__*/memo(({
|
|
1370
|
+
width,
|
|
1371
|
+
height,
|
|
1372
|
+
color = '#7F828E',
|
|
1373
|
+
viewBox = false
|
|
1374
|
+
}) => {
|
|
1375
|
+
return viewBox ? /*#__PURE__*/React.createElement("svg", {
|
|
1376
|
+
width: width || 24,
|
|
1377
|
+
height: height || 24,
|
|
1378
|
+
viewBox: "0 0 24 24",
|
|
1379
|
+
fill: "none"
|
|
1380
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1381
|
+
d: "M17 7L15.59 8.41L18.17 11H8V13H18.17L15.59 15.58L17 17L22 12L17 7ZM4 5H12V3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H12V19H4V5Z",
|
|
1382
|
+
fill: colors[color] || color
|
|
1383
|
+
})) : /*#__PURE__*/React.createElement("svg", {
|
|
1384
|
+
width: width || 20,
|
|
1385
|
+
height: height || 18,
|
|
1386
|
+
viewBox: "0 0 20 18",
|
|
1387
|
+
fill: "none"
|
|
1388
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1389
|
+
d: "M15 4L13.59 5.41L16.17 8H6V10H16.17L13.59 12.58L15 14L20 9L15 4ZM2 2H10V0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H10V16H2V2Z",
|
|
1390
|
+
fill: colors[color] || color
|
|
1391
|
+
}));
|
|
1392
|
+
});
|
|
1345
1393
|
export const CheckList = /*#__PURE__*/memo(({
|
|
1346
1394
|
width,
|
|
1347
1395
|
height,
|
|
@@ -2359,6 +2407,30 @@ export const Generate = /*#__PURE__*/memo(({
|
|
|
2359
2407
|
fill: colors[color] || color
|
|
2360
2408
|
}));
|
|
2361
2409
|
});
|
|
2410
|
+
export const Groups = /*#__PURE__*/memo(({
|
|
2411
|
+
width,
|
|
2412
|
+
height,
|
|
2413
|
+
color = '#7F828E',
|
|
2414
|
+
viewBox = false
|
|
2415
|
+
}) => {
|
|
2416
|
+
return viewBox ? /*#__PURE__*/React.createElement("svg", {
|
|
2417
|
+
width: width || 24,
|
|
2418
|
+
height: height || 24,
|
|
2419
|
+
viewBox: "0 0 24 24",
|
|
2420
|
+
fill: "none"
|
|
2421
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2422
|
+
d: "M12 12.75C13.63 12.75 15.07 13.14 16.24 13.65C17.32 14.13 18 15.21 18 16.38V18H6V16.39C6 15.21 6.68 14.13 7.76 13.66C8.93 13.14 10.37 12.75 12 12.75ZM4 13C5.1 13 6 12.1 6 11C6 9.9 5.1 9 4 9C2.9 9 2 9.9 2 11C2 12.1 2.9 13 4 13ZM5.13 14.1C4.76 14.04 4.39 14 4 14C3.01 14 2.07 14.21 1.22 14.58C0.48 14.9 0 15.62 0 16.43V18H4.5V16.39C4.5 15.56 4.73 14.78 5.13 14.1ZM20 13C21.1 13 22 12.1 22 11C22 9.9 21.1 9 20 9C18.9 9 18 9.9 18 11C18 12.1 18.9 13 20 13ZM24 16.43C24 15.62 23.52 14.9 22.78 14.58C21.93 14.21 20.99 14 20 14C19.61 14 19.24 14.04 18.87 14.1C19.27 14.78 19.5 15.56 19.5 16.39V18H24V16.43ZM12 6C13.66 6 15 7.34 15 9C15 10.66 13.66 12 12 12C10.34 12 9 10.66 9 9C9 7.34 10.34 6 12 6Z",
|
|
2423
|
+
fill: colors[color] || color
|
|
2424
|
+
})) : /*#__PURE__*/React.createElement("svg", {
|
|
2425
|
+
width: width || 24,
|
|
2426
|
+
height: height || 12,
|
|
2427
|
+
viewBox: "0 0 24 12",
|
|
2428
|
+
fill: "none"
|
|
2429
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2430
|
+
d: "M12 6.75C13.63 6.75 15.07 7.14 16.24 7.65C17.32 8.13 18 9.21 18 10.38V12H6V10.39C6 9.21 6.68 8.13 7.76 7.66C8.93 7.14 10.37 6.75 12 6.75ZM4 7C5.1 7 6 6.1 6 5C6 3.9 5.1 3 4 3C2.9 3 2 3.9 2 5C2 6.1 2.9 7 4 7ZM5.13 8.1C4.76 8.04 4.39 8 4 8C3.01 8 2.07 8.21 1.22 8.58C0.48 8.9 0 9.62 0 10.43V12H4.5V10.39C4.5 9.56 4.73 8.78 5.13 8.1ZM20 7C21.1 7 22 6.1 22 5C22 3.9 21.1 3 20 3C18.9 3 18 3.9 18 5C18 6.1 18.9 7 20 7ZM24 10.43C24 9.62 23.52 8.9 22.78 8.58C21.93 8.21 20.99 8 20 8C19.61 8 19.24 8.04 18.87 8.1C19.27 8.78 19.5 9.56 19.5 10.39V12H24V10.43ZM12 0C13.66 0 15 1.34 15 3C15 4.66 13.66 6 12 6C10.34 6 9 4.66 9 3C9 1.34 10.34 0 12 0Z",
|
|
2431
|
+
fill: colors[color] || color
|
|
2432
|
+
}));
|
|
2433
|
+
});
|
|
2362
2434
|
export const Guide = /*#__PURE__*/memo(({
|
|
2363
2435
|
width,
|
|
2364
2436
|
height,
|
|
@@ -4300,6 +4372,34 @@ export const Phone = /*#__PURE__*/memo(({
|
|
|
4300
4372
|
fill: colors[color] || color
|
|
4301
4373
|
}));
|
|
4302
4374
|
});
|
|
4375
|
+
export const Photo = /*#__PURE__*/memo(({
|
|
4376
|
+
width,
|
|
4377
|
+
height,
|
|
4378
|
+
color = '#7F828E',
|
|
4379
|
+
viewBox = false
|
|
4380
|
+
}) => {
|
|
4381
|
+
return viewBox ? /*#__PURE__*/React.createElement("svg", {
|
|
4382
|
+
width: width || 24,
|
|
4383
|
+
height: height || 24,
|
|
4384
|
+
viewBox: "0 0 24 24",
|
|
4385
|
+
fill: "none"
|
|
4386
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
4387
|
+
fillRule: "evenodd",
|
|
4388
|
+
clipRule: "evenodd",
|
|
4389
|
+
d: "M19 3C20.1 3 21 3.9 21 5V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H19ZM11 16.51L8.5 13.5L5 18H19L14.5 12L11 16.51Z",
|
|
4390
|
+
fill: colors[color] || color
|
|
4391
|
+
})) : /*#__PURE__*/React.createElement("svg", {
|
|
4392
|
+
width: width || 18,
|
|
4393
|
+
height: height || 18,
|
|
4394
|
+
viewBox: "0 0 18 18",
|
|
4395
|
+
fill: "none"
|
|
4396
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
4397
|
+
fillRule: "evenodd",
|
|
4398
|
+
clipRule: "evenodd",
|
|
4399
|
+
d: "M16 0C17.1 0 18 0.9 18 2V16C18 17.1 17.1 18 16 18H2C0.9 18 0 17.1 0 16V2C0 0.9 0.9 0 2 0H16ZM8 13.51L5.5 10.5L2 15H16L11.5 9L8 13.51Z",
|
|
4400
|
+
fill: colors[color] || color
|
|
4401
|
+
}));
|
|
4402
|
+
});
|
|
4303
4403
|
export const PlanePaper = /*#__PURE__*/memo(({
|
|
4304
4404
|
width,
|
|
4305
4405
|
height,
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -38,6 +38,15 @@ npm test
|
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## Changelog
|
|
41
|
+
## 1.3.59
|
|
42
|
+
- \[Added\]: Icon – Export component Icon
|
|
43
|
+
- \[Added\]: Icon – Groups, Photo
|
|
44
|
+
- \[Fixed\]: Dropdown – Fix load more handler
|
|
45
|
+
|
|
46
|
+
## 1.3.58
|
|
47
|
+
- \[Added\]: Icon– Checkin, Checkout
|
|
48
|
+
- \[Fixed\]: TreeView, Checkbox – Fix bug cannot select by click checkbox
|
|
49
|
+
|
|
41
50
|
## 1.3.57
|
|
42
51
|
- \[Added\]: MenuIcon – MHRM29N0005
|
|
43
52
|
- \[Changed\]: MoneyInput – Update PagingSelector with new design
|