diginet-core-ui 1.3.76 → 1.3.77
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/avatar/index.js +4 -3
- package/components/badge/index.js +5 -5
- package/components/form-control/checkbox/index.js +4 -4
- package/components/form-control/date-range-picker/index.js +331 -318
- package/components/form-control/dropdown/index.js +24 -8
- package/components/form-control/label/index.js +2 -3
- package/components/form-control/number-input/index2.js +18 -18
- package/components/paging/page-info.js +23 -23
- package/components/paging/page-selector2.js +23 -23
- package/components/popover/index.js +4 -2
- package/components/progress/circular.js +6 -6
- package/components/tab/tab-container.js +4 -5
- package/components/tab/tab.js +2 -2
- package/components/tree-view/index.js +38 -38
- package/components/typography/index.js +71 -81
- package/icons/effect.js +15 -15
- package/package.json +1 -1
- package/readme.md +10 -2
- package/styles/general.js +4 -0
- package/styles/typography.js +63 -72
- package/theme/index.js +1 -1
- package/theme/set-theme.js +5 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { Fragment, memo, useRef, forwardRef, useState, useEffect, useMemo, useImperativeHandle } from 'react';
|
|
4
|
+
import { Fragment, memo, useRef, forwardRef, useState, useEffect, useMemo, useImperativeHandle, isValidElement } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { jsx, css, keyframes } from '@emotion/core';
|
|
7
7
|
import OptionWrapper from '../others/option-wrapper';
|
|
@@ -149,9 +149,10 @@ const Avatar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
149
149
|
};
|
|
150
150
|
|
|
151
151
|
const renderData = () => {
|
|
152
|
+
if ( /*#__PURE__*/isValidElement(data)) return data;
|
|
152
153
|
const info = Object.keys(data || {});
|
|
153
154
|
|
|
154
|
-
if (info.length) {
|
|
155
|
+
if (info !== null && info !== void 0 && info.length) {
|
|
155
156
|
return info.map((key, index) => {
|
|
156
157
|
return jsx(Typography, {
|
|
157
158
|
key: index,
|
|
@@ -441,7 +442,7 @@ Avatar.propTypes = {
|
|
|
441
442
|
* data to display when hoverAble is true<br />
|
|
442
443
|
* data is an object or function return a jsx element
|
|
443
444
|
*/
|
|
444
|
-
data: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
|
|
445
|
+
data: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.node]),
|
|
445
446
|
|
|
446
447
|
/**
|
|
447
448
|
* it is used to display the default if there is no src<br />
|
|
@@ -213,11 +213,11 @@ Badge.propTypes = {
|
|
|
213
213
|
/** other icon props when use prop name */
|
|
214
214
|
iconProps: PropTypes.object,
|
|
215
215
|
|
|
216
|
-
/** size of Badge
|
|
217
|
-
*
|
|
218
|
-
* * medium (dot 8px, typography p3)
|
|
219
|
-
* * large (button 10px, typography p2)
|
|
220
|
-
* * giant (button 12px, typography p1)
|
|
216
|
+
/** size of Badge
|
|
217
|
+
*
|
|
218
|
+
* * medium (dot 8px, typography p3)
|
|
219
|
+
* * large (button 10px, typography p2)
|
|
220
|
+
* * giant (button 12px, typography p1)
|
|
221
221
|
* */
|
|
222
222
|
size: PropTypes.oneOf(['medium', 'large', 'giant']),
|
|
223
223
|
|
|
@@ -328,10 +328,10 @@ Checkbox.propTypes = {
|
|
|
328
328
|
/** The name of the Checkbox corresponds to the label displayed on the interface. */
|
|
329
329
|
name: PropTypes.string,
|
|
330
330
|
|
|
331
|
-
/**
|
|
332
|
-
* Callback fired when the state is changed.
|
|
333
|
-
*
|
|
334
|
-
* You can pull out the new checked state by accessing `event.value` or `event.target.checked` (boolean).
|
|
331
|
+
/**
|
|
332
|
+
* Callback fired when the state is changed.
|
|
333
|
+
*
|
|
334
|
+
* You can pull out the new checked state by accessing `event.value` or `event.target.checked` (boolean).
|
|
335
335
|
*/
|
|
336
336
|
onChange: PropTypes.func,
|
|
337
337
|
|