diginet-core-ui 1.4.56 → 1.4.57-beta.1
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/calendar/function.js +1 -1
- package/components/form-control/calendar/index.js +1 -1
- package/components/form-control/date-range-picker/index.js +1 -0
- package/components/form-control/dropdown/index.js +6 -1
- package/components/form-control/dropdown-box/index.js +63 -21
- package/components/form-control/number-input/index2.js +12 -6
- package/icons/basic.js +52 -0
- package/package.json +78 -44
- package/readme.md +4 -0
|
@@ -652,7 +652,7 @@ const renderNavigator = (className, refs, dbLeftFn, leftFn, rightFn, dbRightFn,
|
|
|
652
652
|
color: 'primary',
|
|
653
653
|
type: 'h3',
|
|
654
654
|
ref: refs.content,
|
|
655
|
-
format: ['
|
|
655
|
+
format: ['sentence']
|
|
656
656
|
}))), jsx("div", {
|
|
657
657
|
className: className.navigator.around
|
|
658
658
|
}, jsx(ButtonIcon, {
|
|
@@ -226,7 +226,7 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference)
|
|
|
226
226
|
* START EFFECT
|
|
227
227
|
*/
|
|
228
228
|
useEffect(() => {
|
|
229
|
-
if (defaultValue && defaultValue !== '' && isValidDate(defaultValue)) {
|
|
229
|
+
if (defaultValue && defaultValue !== '' && isValidDate(defaultValue) && !value) {
|
|
230
230
|
if (isBeforeLimit(min, defaultValue)) {
|
|
231
231
|
onUpdate(min);
|
|
232
232
|
} else if (isAfterLimit(max, defaultValue)) {
|
|
@@ -752,6 +752,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, ref
|
|
|
752
752
|
}
|
|
753
753
|
ipRef.current && ipRef.current.blur();
|
|
754
754
|
updateTempValues([]);
|
|
755
|
+
setOpenState(false);
|
|
755
756
|
};
|
|
756
757
|
const onClickOutside = e => {
|
|
757
758
|
if (ipConRef.current && !ipConRef.current.contains(e.target) && ipRef.current && !ipRef.current.contains(e.target) && pickerRef.current && !pickerRef.current.contains(e.target)) {
|
|
@@ -449,7 +449,12 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference)
|
|
|
449
449
|
value: value,
|
|
450
450
|
disabled: itemDisabled,
|
|
451
451
|
onChange: e => onChangeValue(e, displayText, value, icon, data, index)
|
|
452
|
-
},
|
|
452
|
+
}, jsx("div", {
|
|
453
|
+
style: {
|
|
454
|
+
display: 'flex',
|
|
455
|
+
alignItems: 'center'
|
|
456
|
+
}
|
|
457
|
+
}, icon, text))));
|
|
453
458
|
} else {
|
|
454
459
|
items.push(jsx("div", {
|
|
455
460
|
key: index,
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import { css, jsx } from '@emotion/core';
|
|
4
|
-
import { ButtonIcon, InputBase, Label, Popover, PopoverBody } from "../..";
|
|
4
|
+
import { ButtonIcon, InputBase, Label, Popover, PopoverBody, HelperText } from "../..";
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { Fragment, forwardRef, memo, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from 'react';
|
|
6
|
+
import { Fragment, forwardRef, memo, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState, useMemo } from 'react';
|
|
7
7
|
import { animation, borderColor, displayBlock, overflowHidden, parseHeight, parseMinWidth, positionRelative, scaleX } from "../../../styles/general";
|
|
8
8
|
import { useTheme } from "../../../theme";
|
|
9
9
|
import useThemeProps from "../../../theme/utils/useThemeProps";
|
|
10
10
|
import { classNames, getProp } from "../../../utils";
|
|
11
|
+
const regexBetween = /[^{}]+(?=})/g;
|
|
12
|
+
const regexInclude = /{|}/g;
|
|
11
13
|
const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference) => {
|
|
12
14
|
if (!reference) reference = useRef(null);
|
|
13
15
|
const theme = useTheme();
|
|
@@ -22,10 +24,14 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referen
|
|
|
22
24
|
});
|
|
23
25
|
const {
|
|
24
26
|
action = {},
|
|
27
|
+
allowInput,
|
|
25
28
|
bgColor: bgColorProp,
|
|
26
29
|
children,
|
|
27
30
|
className,
|
|
28
31
|
delayOnInput,
|
|
32
|
+
disabled,
|
|
33
|
+
displayExpr: displayExprProp,
|
|
34
|
+
error,
|
|
29
35
|
endIcon,
|
|
30
36
|
inputProps,
|
|
31
37
|
inputRef,
|
|
@@ -39,10 +45,19 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referen
|
|
|
39
45
|
placeholder,
|
|
40
46
|
startIcon,
|
|
41
47
|
style,
|
|
42
|
-
value,
|
|
43
|
-
|
|
48
|
+
value: valueProps,
|
|
49
|
+
valueExpr,
|
|
50
|
+
viewType,
|
|
51
|
+
helperTextProps
|
|
44
52
|
} = props;
|
|
53
|
+
let displayExpr = displayExprProp;
|
|
45
54
|
const bgColor = typeof bgColorProp === 'string' ? getProp(colors, bgColorProp, bgColorProp) : bgColorProp;
|
|
55
|
+
const ErrorView = useMemo(() => {
|
|
56
|
+
return error ? jsx(HelperText, {
|
|
57
|
+
...helperTextProps,
|
|
58
|
+
disabled: disabled
|
|
59
|
+
}, error) : null;
|
|
60
|
+
}, [disabled, error, helperTextProps]);
|
|
46
61
|
const ref = useRef(null);
|
|
47
62
|
const dropdownBoxRef = useRef(null);
|
|
48
63
|
const timer = useRef(null);
|
|
@@ -85,6 +100,28 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referen
|
|
|
85
100
|
onClosed === null || onClosed === void 0 ? void 0 : onClosed();
|
|
86
101
|
}
|
|
87
102
|
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Chuyển đổi data thành giá trị cần hiện thị dựa vào displayExpr [string, string object {field} - {field}], renderSelectedItem, displayExpr, valueExpr
|
|
106
|
+
* @param data {object} rowData of dataSource
|
|
107
|
+
* @return {string}
|
|
108
|
+
*/
|
|
109
|
+
const displayValue = data => {
|
|
110
|
+
let text = '';
|
|
111
|
+
if (data || data === 0) {
|
|
112
|
+
displayExpr = displayExpr || valueExpr;
|
|
113
|
+
let mask = data === null || data === void 0 ? void 0 : data[displayExpr];
|
|
114
|
+
// convert {id} - {name} to {<data[id]>} - {<data[name]>}
|
|
115
|
+
if (!mask && regexBetween.test(displayExpr)) {
|
|
116
|
+
var _displayExpr;
|
|
117
|
+
mask = (_displayExpr = displayExpr) === null || _displayExpr === void 0 ? void 0 : _displayExpr.replace(regexBetween, _ => (data === null || data === void 0 ? void 0 : data[_]) || '');
|
|
118
|
+
} else if (!mask) {
|
|
119
|
+
mask = typeof data !== 'object' ? data : '';
|
|
120
|
+
}
|
|
121
|
+
text = mask.toString().replace(regexInclude, '');
|
|
122
|
+
}
|
|
123
|
+
return text;
|
|
124
|
+
};
|
|
88
125
|
useLayoutEffect(() => {
|
|
89
126
|
if (ref.current) {
|
|
90
127
|
const {
|
|
@@ -130,15 +167,17 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referen
|
|
|
130
167
|
onClick: openOnClickAt === 'icon' ? onTriggerDropdown : null
|
|
131
168
|
}) : null;
|
|
132
169
|
};
|
|
170
|
+
const value = displayValue(valueProps);
|
|
133
171
|
return jsx(Fragment, null, jsx("div", {
|
|
134
172
|
ref: ref,
|
|
135
173
|
css: _DropdownBoxRootCSS,
|
|
136
|
-
className: classNames('DGN-UI-Dropdown-Box', className),
|
|
174
|
+
className: classNames('DGN-UI-Dropdown-Box', className, error && 'error'),
|
|
137
175
|
style: style
|
|
138
176
|
}, label ? jsx(Label, {
|
|
139
177
|
...labelProps
|
|
140
178
|
}, label) : null, jsx(InputBase, {
|
|
141
179
|
...inputProps,
|
|
180
|
+
readOnly: !allowInput,
|
|
142
181
|
style: inputStyle,
|
|
143
182
|
viewType: viewType,
|
|
144
183
|
inputRef: inputRef,
|
|
@@ -157,7 +196,7 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referen
|
|
|
157
196
|
anchor: ref.current,
|
|
158
197
|
width: popoverWidth,
|
|
159
198
|
onClose: closeDropdownBox
|
|
160
|
-
}, jsx(PopoverBody, null, children)));
|
|
199
|
+
}, jsx(PopoverBody, null, children)), ErrorView);
|
|
161
200
|
}));
|
|
162
201
|
const DropdownBoxRootCSS = (bgColorProp, {
|
|
163
202
|
colors
|
|
@@ -166,6 +205,17 @@ const DropdownBoxRootCSS = (bgColorProp, {
|
|
|
166
205
|
${positionRelative};
|
|
167
206
|
${parseMinWidth(150)};
|
|
168
207
|
${parseHeight('max-content')};
|
|
208
|
+
&.error {
|
|
209
|
+
.DGN-UI-InputBase {
|
|
210
|
+
${borderColor(getProp(colors, 'semantic/danger'))};
|
|
211
|
+
&::before {
|
|
212
|
+
${borderColor(getProp(colors, 'semantic/danger'))};
|
|
213
|
+
}
|
|
214
|
+
&::after {
|
|
215
|
+
${borderColor(getProp(colors, 'semantic/danger'))};
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
169
219
|
.DGN-UI-InputBase {
|
|
170
220
|
background: ${bgColorProp ? bgColorProp === true ? getProp(colors, 'fill/disabled') : bgColorProp : 'inherit'} !important;
|
|
171
221
|
${openState && css`
|
|
@@ -183,20 +233,6 @@ const DropdownBoxCSS = ({
|
|
|
183
233
|
margin-top: ${spacing([1])};
|
|
184
234
|
${overflowHidden};
|
|
185
235
|
`;
|
|
186
|
-
|
|
187
|
-
// DropdownBox.defaultProps = {
|
|
188
|
-
// className: '',
|
|
189
|
-
// label: '',
|
|
190
|
-
// placeholder: '',
|
|
191
|
-
// startIcon: 'Search',
|
|
192
|
-
// endIcon: 'ArrowDown',
|
|
193
|
-
// openOnClickAt: 'icon',
|
|
194
|
-
// viewType: 'underlined',
|
|
195
|
-
// inputProps: {},
|
|
196
|
-
// delayOnInput: 700,
|
|
197
|
-
// zIndex: zIndexCORE(1),
|
|
198
|
-
// };
|
|
199
|
-
|
|
200
236
|
DropdownBox.propTypes = {
|
|
201
237
|
/** class for dropdown */
|
|
202
238
|
className: PropTypes.string,
|
|
@@ -233,6 +269,12 @@ DropdownBox.propTypes = {
|
|
|
233
269
|
/** the function will run after open */
|
|
234
270
|
onOpened: PropTypes.func,
|
|
235
271
|
/** the function will run after close */
|
|
236
|
-
onClosed: PropTypes.func
|
|
272
|
+
onClosed: PropTypes.func,
|
|
273
|
+
/** Error message displayed below the input. */
|
|
274
|
+
error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
275
|
+
/** If `true`, the component is disabled. */
|
|
276
|
+
disabled: PropTypes.bool,
|
|
277
|
+
/** If `true`, the input is enable. */
|
|
278
|
+
allowInput: PropTypes.bool
|
|
237
279
|
};
|
|
238
280
|
export default DropdownBox;
|
|
@@ -49,7 +49,7 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
|
|
|
49
49
|
labelProps,
|
|
50
50
|
max: maxProp,
|
|
51
51
|
maxDigit,
|
|
52
|
-
min,
|
|
52
|
+
min: minProp,
|
|
53
53
|
nonStyle,
|
|
54
54
|
onBlur,
|
|
55
55
|
onChange,
|
|
@@ -69,9 +69,12 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
|
|
|
69
69
|
viewType
|
|
70
70
|
} = props;
|
|
71
71
|
let max = maxProp;
|
|
72
|
+
let min = minProp;
|
|
72
73
|
let thousandSymbol = thousandSeparator;
|
|
73
74
|
let decimalSymbol = decimalSymbolProp;
|
|
74
75
|
let valueProps = valueProp;
|
|
76
|
+
if (!min && min !== 0) min = -Infinity;
|
|
77
|
+
if (!max && max !== 0) max = Infinity;
|
|
75
78
|
const pos = useRef(null);
|
|
76
79
|
const ref = useRef(null);
|
|
77
80
|
const globalRef = useRef({});
|
|
@@ -166,20 +169,23 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
|
|
|
166
169
|
return number;
|
|
167
170
|
}, [decimalSymbol]);
|
|
168
171
|
const _onInput = useCallback((e, flag) => {
|
|
169
|
-
var _e$target$value;
|
|
172
|
+
var _e$target$value, _limitValueT$toString, _limitValueT$toString2, _limitValueT$toString3, _limitValueT$toString4, _limitValueT$toString5, _limitValueT$toString6;
|
|
170
173
|
let valueT = (_e$target$value = e.target.value) !== null && _e$target$value !== void 0 ? _e$target$value : e.value;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
if ((
|
|
174
|
+
// xóa các số "0" đứng trước giá trị ví dụ: 0100, 0200 để tránh lỗi Octal literals are not allowed in strict mode
|
|
175
|
+
let limitValueT = valueT.split(/([+\-*/])/).map(a => parseFloat(a) || a).join('');
|
|
176
|
+
if (disabledNegative && eval(((_limitValueT$toString = (_limitValueT$toString2 = limitValueT.toString().replaceAll(thousandSymbol, '')).replaceAll) === null || _limitValueT$toString === void 0 ? void 0 : _limitValueT$toString.call(_limitValueT$toString2, decimalSymbol, '.')) || 0) <= 0 || limitValueT.includes('-')) valueT = 0;
|
|
177
|
+
if ((min || min === 0) && eval((_limitValueT$toString3 = (_limitValueT$toString4 = limitValueT.toString().replaceAll(thousandSymbol, '')).replaceAll) === null || _limitValueT$toString3 === void 0 ? void 0 : _limitValueT$toString3.call(_limitValueT$toString4, decimalSymbol, '.')) <= min || min === 0 && limitValueT.includes('-')) valueT = min;
|
|
178
|
+
if ((max || max === 0) && eval((_limitValueT$toString5 = (_limitValueT$toString6 = limitValueT.toString().replaceAll(thousandSymbol, '')).replaceAll) === null || _limitValueT$toString5 === void 0 ? void 0 : _limitValueT$toString5.call(_limitValueT$toString6, decimalSymbol, '.')) >= max) valueT = max;
|
|
174
179
|
valueT = parseNumberToMoney(valueT);
|
|
175
180
|
const returnValue = convertMoneyToNumber(valueT);
|
|
176
181
|
e.value = globalRef.current.value = !isNaN(parseFloat(returnValue)) ? parseFloat(returnValue) : null;
|
|
177
182
|
// e.target.value = globalRef.current.valueString = valueT || '';
|
|
178
183
|
// globalRef.current.returnValue = returnValue || '';
|
|
179
184
|
e.target.value = globalRef.current.valueString = valueT || '';
|
|
185
|
+
e.value = valueT;
|
|
180
186
|
globalRef.current.returnValue = returnValue || '';
|
|
181
187
|
onInput === null || onInput === void 0 ? void 0 : onInput(e);
|
|
182
|
-
setValue(valueT);
|
|
188
|
+
setValue(eval(valueT));
|
|
183
189
|
if (flag) _onChange(e);
|
|
184
190
|
}, [min, max, decimalDigit]);
|
|
185
191
|
const _onBlur = useCallback(e => {
|
package/icons/basic.js
CHANGED
|
@@ -3108,6 +3108,30 @@ export const Home = /*#__PURE__*/memo(({
|
|
|
3108
3108
|
fill: fillColor(color)
|
|
3109
3109
|
}));
|
|
3110
3110
|
});
|
|
3111
|
+
export const HomeLocation = /*#__PURE__*/memo(({
|
|
3112
|
+
width,
|
|
3113
|
+
height,
|
|
3114
|
+
color = 'system/rest',
|
|
3115
|
+
viewBox = false
|
|
3116
|
+
}) => {
|
|
3117
|
+
return viewBox ? /*#__PURE__*/React.createElement("svg", {
|
|
3118
|
+
width: width || 24,
|
|
3119
|
+
height: height || 24,
|
|
3120
|
+
viewBox: "0 0 24 24",
|
|
3121
|
+
fill: "none"
|
|
3122
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
3123
|
+
d: "M12 15C12.8333 15 13.5417 14.7083 14.125 14.125C14.7083 13.5417 15 12.8333 15 12C15 11.1667 14.7083 10.4583 14.125 9.875C13.5417 9.29167 12.8333 9 12 9C11.1667 9 10.4583 9.29167 9.875 9.875C9.29167 10.4583 9 11.1667 9 12C9 12.8333 9.29167 13.5417 9.875 14.125C10.4583 14.7083 11.1667 15 12 15ZM6 19H18V18.725C18 18.4917 17.95 18.275 17.85 18.075C17.75 17.875 17.6 17.7167 17.4 17.6C16.5833 17.0833 15.7208 16.6875 14.8125 16.4125C13.9042 16.1375 12.9667 16 12 16C11.0333 16 10.0958 16.1375 9.1875 16.4125C8.27917 16.6875 7.41667 17.0833 6.6 17.6C6.4 17.7167 6.25 17.875 6.15 18.075C6.05 18.275 6 18.4917 6 18.725V19ZM4 21V9L12 3L20 9V21H4Z",
|
|
3124
|
+
fill: fillColor(color)
|
|
3125
|
+
})) : /*#__PURE__*/React.createElement("svg", {
|
|
3126
|
+
width: width || 16,
|
|
3127
|
+
height: height || 18,
|
|
3128
|
+
viewBox: "0 0 16 18",
|
|
3129
|
+
fill: "none"
|
|
3130
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
3131
|
+
d: "M8 12C8.83333 12 9.54167 11.7083 10.125 11.125C10.7083 10.5417 11 9.83333 11 9C11 8.16667 10.7083 7.45833 10.125 6.875C9.54167 6.29167 8.83333 6 8 6C7.16667 6 6.45833 6.29167 5.875 6.875C5.29167 7.45833 5 8.16667 5 9C5 9.83333 5.29167 10.5417 5.875 11.125C6.45833 11.7083 7.16667 12 8 12ZM2 16H14V15.725C14 15.4917 13.95 15.275 13.85 15.075C13.75 14.875 13.6 14.7167 13.4 14.6C12.5833 14.0833 11.7208 13.6875 10.8125 13.4125C9.90417 13.1375 8.96667 13 8 13C7.03333 13 6.09583 13.1375 5.1875 13.4125C4.27917 13.6875 3.41667 14.0833 2.6 14.6C2.4 14.7167 2.25 14.875 2.15 15.075C2.05 15.275 2 15.4917 2 15.725V16ZM0 18V6L8 0L16 6V18H0Z",
|
|
3132
|
+
fill: fillColor(color)
|
|
3133
|
+
}));
|
|
3134
|
+
});
|
|
3111
3135
|
export const HourGlass = /*#__PURE__*/memo(({
|
|
3112
3136
|
width,
|
|
3113
3137
|
height,
|
|
@@ -6780,6 +6804,34 @@ export const TwoSquare = /*#__PURE__*/memo(({
|
|
|
6780
6804
|
fill: fillColor(color)
|
|
6781
6805
|
}));
|
|
6782
6806
|
});
|
|
6807
|
+
export const TimeMore = /*#__PURE__*/memo(({
|
|
6808
|
+
width,
|
|
6809
|
+
height,
|
|
6810
|
+
color = 'system/rest',
|
|
6811
|
+
viewBox = false
|
|
6812
|
+
}) => {
|
|
6813
|
+
return viewBox ? /*#__PURE__*/React.createElement("svg", {
|
|
6814
|
+
width: width || 24,
|
|
6815
|
+
height: height || 24,
|
|
6816
|
+
viewBox: "0 0 24 24",
|
|
6817
|
+
fill: "none"
|
|
6818
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
6819
|
+
fillRule: "evenodd",
|
|
6820
|
+
clipRule: "evenodd",
|
|
6821
|
+
d: "M11 21C9.75 21 8.57917 20.7667 7.4875 20.3C6.39583 19.8333 5.44167 19.1917 4.625 18.375C3.80833 17.5583 3.16667 16.6042 2.7 15.5125C2.23333 14.4208 2 13.25 2 12C2 10.75 2.23333 9.57917 2.7 8.4875C3.16667 7.39583 3.80833 6.44167 4.625 5.625C5.44167 4.80833 6.39583 4.16667 7.4875 3.7C8.57917 3.23333 9.75 3 11 3C11.35 3 11.6875 3.02083 12.0125 3.0625C12.3375 3.10417 12.6667 3.16667 13 3.25V5.3C12.6667 5.2 12.3375 5.125 12.0125 5.075C11.6875 5.025 11.35 5 11 5C9.03333 5 7.375 5.675 6.025 7.025C4.675 8.375 4 10.0333 4 12C4 13.9667 4.675 15.625 6.025 16.975C7.375 18.325 9.03333 19 11 19C12.9667 19 14.625 18.325 15.975 16.975C17.325 15.625 18 13.9667 18 12C18 11.8167 17.9917 11.65 17.975 11.5C17.9583 11.35 17.9333 11.1833 17.9 11H19.95C19.9833 11.1833 20 11.35 20 11.5V12C20 13.25 19.7667 14.4208 19.3 15.5125C18.8333 16.6042 18.1917 17.5583 17.375 18.375C16.5583 19.1917 15.6042 19.8333 14.5125 20.3C13.4208 20.7667 12.25 21 11 21ZM13.8 16.2L10 12.4V7H12V11.6L15.2 14.8L13.8 16.2ZM18 9V6H15V4H18V1H20V4H23V6H20V9H18Z",
|
|
6822
|
+
fill: fillColor(color)
|
|
6823
|
+
})) : /*#__PURE__*/React.createElement("svg", {
|
|
6824
|
+
width: width || 21,
|
|
6825
|
+
height: height || 20,
|
|
6826
|
+
viewBox: "0 0 21 20",
|
|
6827
|
+
fill: "none"
|
|
6828
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
6829
|
+
fillRule: "evenodd",
|
|
6830
|
+
clipRule: "evenodd",
|
|
6831
|
+
d: "M9 20C7.75 20 6.57917 19.7667 5.4875 19.3C4.39583 18.8333 3.44167 18.1917 2.625 17.375C1.80833 16.5583 1.16667 15.6042 0.7 14.5125C0.233333 13.4208 0 12.25 0 11C0 9.75 0.233333 8.57917 0.7 7.4875C1.16667 6.39583 1.80833 5.44167 2.625 4.625C3.44167 3.80833 4.39583 3.16667 5.4875 2.7C6.57917 2.23333 7.75 2 9 2C9.35 2 9.6875 2.02083 10.0125 2.0625C10.3375 2.10417 10.6667 2.16667 11 2.25V4.3C10.6667 4.2 10.3375 4.125 10.0125 4.075C9.6875 4.025 9.35 4 9 4C7.03333 4 5.375 4.675 4.025 6.025C2.675 7.375 2 9.03333 2 11C2 12.9667 2.675 14.625 4.025 15.975C5.375 17.325 7.03333 18 9 18C10.9667 18 12.625 17.325 13.975 15.975C15.325 14.625 16 12.9667 16 11C16 10.8167 15.9917 10.65 15.975 10.5C15.9583 10.35 15.9333 10.1833 15.9 10H17.95C17.9833 10.1833 18 10.35 18 10.5V11C18 12.25 17.7667 13.4208 17.3 14.5125C16.8333 15.6042 16.1917 16.5583 15.375 17.375C14.5583 18.1917 13.6042 18.8333 12.5125 19.3C11.4208 19.7667 10.25 20 9 20ZM11.8 15.2L8 11.4V6H10V10.6L13.2 13.8L11.8 15.2ZM16 8V5H13V3H16V0H18V3H21V5H18V8H16Z",
|
|
6832
|
+
fill: fillColor(color)
|
|
6833
|
+
}));
|
|
6834
|
+
});
|
|
6783
6835
|
export const View = /*#__PURE__*/memo(({
|
|
6784
6836
|
width,
|
|
6785
6837
|
height,
|
package/package.json
CHANGED
|
@@ -1,44 +1,78 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "diginet-core-ui",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"scripts": {
|
|
8
|
-
"start
|
|
9
|
-
"start": "
|
|
10
|
-
"build": "
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "diginet-core-ui",
|
|
3
|
+
"version": "1.4.57-beta.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "npm-run-all --parallel start-sb eslint-test",
|
|
9
|
+
"start-sb": "start-storybook -p 9050",
|
|
10
|
+
"build-storybook": "build-storybook -c .storybook -s src",
|
|
11
|
+
"build": "run-script-os",
|
|
12
|
+
"build:windows": "rimraf dist && mkdirp dist/components && npm run compile && sass --style=compressed src/scss:dist/css && xcopy src\\\\assets dist\\\\assets\\ /e /y",
|
|
13
|
+
"build:darwin:linux:default": "rm -rf dist && npm run compile && sass --style=compressed src/scss:dist/css && cp -rf src/assets dist/assets",
|
|
14
|
+
"compile": "babel src --out-dir dist --ignore **/*.stories.js",
|
|
15
|
+
"pack": "npm run build && cp *.md dist/ && npm run version:bump --silent && npm run version:add --silent && cd dist && npm pack",
|
|
16
|
+
"production-keep-version": "npm run build && cp *.md dist/ && cp package.json dist/ && cd dist && npm publish",
|
|
17
|
+
"beta": "npm run build && cp *.md dist/ && cp package.json dist/ && cd dist && npm publish --tag beta",
|
|
18
|
+
"production": "npm run build && cp *.md dist/ && npm run version:bump --silent && npm run version:add --silent && cd dist && npm publish",
|
|
19
|
+
"version:add": "run-script-os",
|
|
20
|
+
"version:add:windows": "cat package.json.tmp | sed \"s/0.0.0/%npm_package_version%/g\" > dist/package.json",
|
|
21
|
+
"version:add:darwin:linux:default": "VERSION=$(npm run version:extract --silent) && cat package.json.tmp | sed \"s/0.0.0/${VERSION}/g\" > dist/package.json",
|
|
22
|
+
"version:bump": "npm version patch --no-git-tag-version --silent",
|
|
23
|
+
"version:extract": "cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]'",
|
|
24
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
25
|
+
"lint": "eslint --fix --config .eslintrc.js \"**/*.js\"",
|
|
26
|
+
"eslint-test": "onchange \"src/**/*.{js,jsx,json}\" -- eslint . --fix",
|
|
27
|
+
"freshtall": "npm cache clean --force && rm -rf node_modules && rm -f package-lock.json && npm install",
|
|
28
|
+
"test-storybook": "test-storybook --url http://localhost:9050",
|
|
29
|
+
"preinstall": "echo {} > package-lock.json"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@emotion/core": "^10.0.35",
|
|
33
|
+
"@emotion/css": "^11.11.0",
|
|
34
|
+
"@emotion/react": "^11.10.6",
|
|
35
|
+
"babel-plugin-module-resolver": "^4.1.0",
|
|
36
|
+
"date-fns": "^2.30.0",
|
|
37
|
+
"prop-types": "^15.7.2"
|
|
38
|
+
},
|
|
39
|
+
"lint-staged": {
|
|
40
|
+
"*/**/*.{js,jsx,json}": [
|
|
41
|
+
"prettier --write",
|
|
42
|
+
"git add"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@babel/cli": "^7.14.3",
|
|
47
|
+
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
|
48
|
+
"@babel/plugin-proposal-logical-assignment-operators": "^7.16.0",
|
|
49
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
|
|
50
|
+
"@babel/plugin-proposal-optional-chaining": "^7.14.2",
|
|
51
|
+
"@babel/plugin-proposal-private-methods": "^7.18.6",
|
|
52
|
+
"@babel/plugin-proposal-private-property-in-object": "^7.18.6",
|
|
53
|
+
"@babel/preset-react": "^7.13.13",
|
|
54
|
+
"@storybook/addon-actions": "6.2.9",
|
|
55
|
+
"@storybook/addon-essentials": "6.2.9",
|
|
56
|
+
"@storybook/addon-links": "6.2.9",
|
|
57
|
+
"@storybook/addon-postcss": "^2.0.0",
|
|
58
|
+
"@storybook/react": "6.2.9",
|
|
59
|
+
"@storybook/test-runner": "^0.7.1",
|
|
60
|
+
"autoprefixer": "^10.3.1",
|
|
61
|
+
"babel-loader": "^8.2.2",
|
|
62
|
+
"eslint": "^8.4.1",
|
|
63
|
+
"eslint-plugin-react": "^7.27.1",
|
|
64
|
+
"eslint-plugin-regex": "^1.10.0",
|
|
65
|
+
"husky": "^7.0.4",
|
|
66
|
+
"jest": "^27.5.1",
|
|
67
|
+
"lint-staged": "^12.1.2",
|
|
68
|
+
"mkdirp": "^1.0.4",
|
|
69
|
+
"npm-run-all": "^4.1.5",
|
|
70
|
+
"onchange": "^7.1.0",
|
|
71
|
+
"postcss-flexbugs-fixes": "^5.0.2",
|
|
72
|
+
"react": "^17.0.1",
|
|
73
|
+
"react-dom": "^17.0.1",
|
|
74
|
+
"rimraf": "^3.0.2",
|
|
75
|
+
"run-script-os": "^1.1.6",
|
|
76
|
+
"sass": "1.58.3"
|
|
77
|
+
}
|
|
78
|
+
}
|
package/readme.md
CHANGED
|
@@ -42,6 +42,10 @@ npm test
|
|
|
42
42
|
|
|
43
43
|
## Changelog
|
|
44
44
|
|
|
45
|
+
## 1.4.57
|
|
46
|
+
- \[Fixed\]: NumberInput – Fix NumberInput, even with the disabledNegative prop enabled, users can still paste negative values.
|
|
47
|
+
- \[Fixed\]: Dropdown – In the multiple dropdown, the avatar and name are wrapping to the next line
|
|
48
|
+
|
|
45
49
|
## 1.4.56
|
|
46
50
|
- \[Added\]: Icon – Add IconMenu MHRP29N0033, MHRP29N0034
|
|
47
51
|
- \[Added\]: Icon – Add Icon CelebrationColor
|