diginet-core-ui 1.4.2 → 1.4.3-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/avatar/index.js +21 -23
- package/components/card/body.js +17 -2
- package/components/card/extra.js +17 -2
- package/components/card/footer.js +17 -2
- package/components/card/header.js +17 -2
- package/components/card/index.js +17 -2
- package/components/form-control/attachment/index.js +438 -353
- package/components/form-control/calendar/function.js +36 -47
- package/components/form-control/calendar/index.js +12 -5
- package/components/form-control/calendar/v2/function.js +757 -0
- package/components/form-control/calendar/v2/index.js +293 -0
- package/components/form-control/date-picker/index.js +2 -1
- package/components/form-control/date-picker/v2/index.js +611 -0
- package/components/form-control/date-range-picker/index.js +8 -11
- package/components/form-control/dropdown/index.js +43 -43
- package/components/form-control/input-base/index.js +95 -114
- package/components/form-control/number-input/index2.js +28 -11
- package/components/form-control/time-picker/v2/index.js +764 -0
- package/components/grid/index.js +5 -3
- package/components/image/index.js +9 -4
- package/components/index.js +2 -1
- package/components/others/option-wrapper/index.js +3 -3
- package/global/index.js +4 -0
- package/package.json +62 -31
- package/readme.md +3 -0
- package/styles/sx/index.js +11 -9
- package/utils/index.js +1 -0
- package/utils/isUndefined.js +2 -0
|
@@ -9,7 +9,7 @@ import PropTypes from 'prop-types';
|
|
|
9
9
|
import { forwardRef, Fragment, isValidElement, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
10
10
|
import { borderNone, borderRadius, boxContent, cursorInherit, cursorPointer, displayBlock, displayFlex, displayInlineFlex, displayNone, flexCol, itemsCenter, overflowHidden, parseMinWidth, parseWidthHeight, pd, positionAbsolute, positionRelative, userSelectNone, z } from "../../styles/general";
|
|
11
11
|
import { useTheme } from "../../theme";
|
|
12
|
-
import { classNames, isMobile } from "../../utils";
|
|
12
|
+
import { classNames, isMobile, refType as ref } from "../../utils";
|
|
13
13
|
const {
|
|
14
14
|
colors: {
|
|
15
15
|
system: {
|
|
@@ -319,14 +319,14 @@ Avatar.propTypes = {
|
|
|
319
319
|
className: PropTypes.string,
|
|
320
320
|
/** If `true`, display remove avatar icon. */
|
|
321
321
|
clearAble: PropTypes.bool,
|
|
322
|
-
/**
|
|
323
|
-
* data to display when hoverAble is true<br />
|
|
324
|
-
* data is an object or function return a jsx element
|
|
322
|
+
/**
|
|
323
|
+
* data to display when hoverAble is true<br />
|
|
324
|
+
* data is an object or function return a jsx element
|
|
325
325
|
*/
|
|
326
326
|
data: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.node]),
|
|
327
|
-
/**
|
|
328
|
-
* it is used to display the default if there is no src<br />
|
|
329
|
-
* if undefined, will display icons available in the icons store
|
|
327
|
+
/**
|
|
328
|
+
* it is used to display the default if there is no src<br />
|
|
329
|
+
* if undefined, will display icons available in the icons store
|
|
330
330
|
*/
|
|
331
331
|
defaultSrc: PropTypes.string,
|
|
332
332
|
/** the direction to display more info */
|
|
@@ -363,23 +363,21 @@ Avatar.propTypes = {
|
|
|
363
363
|
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
364
364
|
/** the error to show on wrong type */
|
|
365
365
|
wrongTypeError: PropTypes.string,
|
|
366
|
-
/**
|
|
367
|
-
* ref methods
|
|
368
|
-
*
|
|
369
|
-
* * option(): Gets all UI component properties
|
|
370
|
-
* * Returns value - object
|
|
371
|
-
* * option(optionName): Gets the value of a single property
|
|
372
|
-
* * @param {optionName} - string
|
|
373
|
-
* * Returns value - any
|
|
374
|
-
* * option(optionName, optionValue): Updates the value of a single property
|
|
375
|
-
* * @param {optionName} - string
|
|
376
|
-
* * @param {optionValue} - any
|
|
377
|
-
* * option(options): Updates the values of several properties
|
|
378
|
-
* * @param {options} - object
|
|
366
|
+
/**
|
|
367
|
+
* ref methods (ref.current.instance.*method*)
|
|
368
|
+
*
|
|
369
|
+
* * option(): Gets all UI component properties
|
|
370
|
+
* * Returns value - object
|
|
371
|
+
* * option(optionName): Gets the value of a single property
|
|
372
|
+
* * @param {optionName} - string
|
|
373
|
+
* * Returns value - any
|
|
374
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
375
|
+
* * @param {optionName} - string
|
|
376
|
+
* * @param {optionValue} - any
|
|
377
|
+
* * option(options): Updates the values of several properties
|
|
378
|
+
* * @param {options} - object
|
|
379
379
|
*/
|
|
380
|
-
|
|
381
|
-
current: PropTypes.instanceOf(Element)
|
|
382
|
-
})])
|
|
380
|
+
ref: ref
|
|
383
381
|
};
|
|
384
382
|
export { Avatar };
|
|
385
383
|
export default OptionWrapper(Avatar);
|
package/components/card/body.js
CHANGED
|
@@ -4,7 +4,7 @@ import { memo, useRef, useMemo, forwardRef, useImperativeHandle } from 'react';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { jsx } from '@emotion/core';
|
|
6
6
|
import OptionWrapper from "../others/option-wrapper";
|
|
7
|
-
import { classNames } from "../../utils";
|
|
7
|
+
import { classNames, refType as ref } from "../../utils";
|
|
8
8
|
const CardBody = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
9
9
|
action = {},
|
|
10
10
|
children,
|
|
@@ -45,7 +45,22 @@ CardBody.propTypes = {
|
|
|
45
45
|
/** If `true`, will have divider between body and footer. */
|
|
46
46
|
style: PropTypes.object,
|
|
47
47
|
/** The title of the component's header. */
|
|
48
|
-
title: PropTypes.string
|
|
48
|
+
title: PropTypes.string,
|
|
49
|
+
/**
|
|
50
|
+
* ref methods (ref.current.instance.*method*)
|
|
51
|
+
*
|
|
52
|
+
* * option(): Gets all UI component properties
|
|
53
|
+
* * Returns value - object
|
|
54
|
+
* * option(optionName): Gets the value of a single property
|
|
55
|
+
* * @param {optionName} - string
|
|
56
|
+
* * Returns value - any
|
|
57
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
58
|
+
* * @param {optionName} - string
|
|
59
|
+
* * @param {optionValue} - any
|
|
60
|
+
* * option(options): Updates the values of several properties
|
|
61
|
+
* * @param {options} - object
|
|
62
|
+
*/
|
|
63
|
+
ref: ref
|
|
49
64
|
};
|
|
50
65
|
export { CardBody };
|
|
51
66
|
export default OptionWrapper(CardBody);
|
package/components/card/extra.js
CHANGED
|
@@ -4,7 +4,7 @@ import { memo, useRef, useMemo, forwardRef, useImperativeHandle } from 'react';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { jsx } from '@emotion/core';
|
|
6
6
|
import OptionWrapper from "../others/option-wrapper";
|
|
7
|
-
import { classNames } from "../../utils";
|
|
7
|
+
import { classNames, refType as ref } from "../../utils";
|
|
8
8
|
const CardExtra = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
9
9
|
action = {},
|
|
10
10
|
children,
|
|
@@ -45,7 +45,22 @@ CardExtra.propTypes = {
|
|
|
45
45
|
/** If `true`, will have divider between body and footer. */
|
|
46
46
|
style: PropTypes.object,
|
|
47
47
|
/** The title of the component's header. */
|
|
48
|
-
title: PropTypes.string
|
|
48
|
+
title: PropTypes.string,
|
|
49
|
+
/**
|
|
50
|
+
* ref methods (ref.current.instance.*method*)
|
|
51
|
+
*
|
|
52
|
+
* * option(): Gets all UI component properties
|
|
53
|
+
* * Returns value - object
|
|
54
|
+
* * option(optionName): Gets the value of a single property
|
|
55
|
+
* * @param {optionName} - string
|
|
56
|
+
* * Returns value - any
|
|
57
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
58
|
+
* * @param {optionName} - string
|
|
59
|
+
* * @param {optionValue} - any
|
|
60
|
+
* * option(options): Updates the values of several properties
|
|
61
|
+
* * @param {options} - object
|
|
62
|
+
*/
|
|
63
|
+
ref: ref
|
|
49
64
|
};
|
|
50
65
|
export { CardExtra };
|
|
51
66
|
export default OptionWrapper(CardExtra);
|
|
@@ -4,7 +4,7 @@ import { memo, useRef, useMemo, forwardRef, useImperativeHandle } from 'react';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { jsx } from '@emotion/core';
|
|
6
6
|
import OptionWrapper from "../others/option-wrapper";
|
|
7
|
-
import { classNames } from "../../utils";
|
|
7
|
+
import { classNames, refType as ref } from "../../utils";
|
|
8
8
|
const CardFooter = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
9
9
|
action = {},
|
|
10
10
|
children,
|
|
@@ -45,7 +45,22 @@ CardFooter.propTypes = {
|
|
|
45
45
|
/** If `true`, will have divider between body and footer. */
|
|
46
46
|
style: PropTypes.object,
|
|
47
47
|
/** The title of the component's header. */
|
|
48
|
-
title: PropTypes.string
|
|
48
|
+
title: PropTypes.string,
|
|
49
|
+
/**
|
|
50
|
+
* ref methods (ref.current.instance.*method*)
|
|
51
|
+
*
|
|
52
|
+
* * option(): Gets all UI component properties
|
|
53
|
+
* * Returns value - object
|
|
54
|
+
* * option(optionName): Gets the value of a single property
|
|
55
|
+
* * @param {optionName} - string
|
|
56
|
+
* * Returns value - any
|
|
57
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
58
|
+
* * @param {optionName} - string
|
|
59
|
+
* * @param {optionValue} - any
|
|
60
|
+
* * option(options): Updates the values of several properties
|
|
61
|
+
* * @param {options} - object
|
|
62
|
+
*/
|
|
63
|
+
ref: ref
|
|
49
64
|
};
|
|
50
65
|
export { CardFooter };
|
|
51
66
|
export default OptionWrapper(CardFooter);
|
|
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import { jsx } from '@emotion/core';
|
|
6
6
|
import OptionWrapper from "../others/option-wrapper";
|
|
7
7
|
import Typography from "../typography";
|
|
8
|
-
import { classNames } from "../../utils";
|
|
8
|
+
import { classNames, refType as ref } from "../../utils";
|
|
9
9
|
const CardHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
10
10
|
action = {},
|
|
11
11
|
children,
|
|
@@ -48,7 +48,22 @@ CardHeader.propTypes = {
|
|
|
48
48
|
/** If `true`, will have divider between body and footer. */
|
|
49
49
|
style: PropTypes.object,
|
|
50
50
|
/** The title of the component's header. */
|
|
51
|
-
title: PropTypes.string
|
|
51
|
+
title: PropTypes.string,
|
|
52
|
+
/**
|
|
53
|
+
* ref methods (ref.current.instance.*method*)
|
|
54
|
+
*
|
|
55
|
+
* * option(): Gets all UI component properties
|
|
56
|
+
* * Returns value - object
|
|
57
|
+
* * option(optionName): Gets the value of a single property
|
|
58
|
+
* * @param {optionName} - string
|
|
59
|
+
* * Returns value - any
|
|
60
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
61
|
+
* * @param {optionName} - string
|
|
62
|
+
* * @param {optionValue} - any
|
|
63
|
+
* * option(options): Updates the values of several properties
|
|
64
|
+
* * @param {options} - object
|
|
65
|
+
*/
|
|
66
|
+
ref: ref
|
|
52
67
|
};
|
|
53
68
|
export { CardHeader };
|
|
54
69
|
export default OptionWrapper(CardHeader);
|
package/components/card/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import CardHeader from "./header";
|
|
|
10
10
|
import { CardFooter } from "./footer";
|
|
11
11
|
import { CardBody } from "./body";
|
|
12
12
|
import { getColor } from "../../styles/utils";
|
|
13
|
-
import { classNames } from "../../utils";
|
|
13
|
+
import { classNames, refType as ref } from "../../utils";
|
|
14
14
|
const {
|
|
15
15
|
colors: {
|
|
16
16
|
system: {
|
|
@@ -173,7 +173,22 @@ Card.propTypes = {
|
|
|
173
173
|
/** The title of the component's header. */
|
|
174
174
|
title: PropTypes.string,
|
|
175
175
|
/** Width of the component. */
|
|
176
|
-
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
176
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
177
|
+
/**
|
|
178
|
+
* ref methods (ref.current.instance.*method*)
|
|
179
|
+
*
|
|
180
|
+
* * option(): Gets all UI component properties
|
|
181
|
+
* * Returns value - object
|
|
182
|
+
* * option(optionName): Gets the value of a single property
|
|
183
|
+
* * @param {optionName} - string
|
|
184
|
+
* * Returns value - any
|
|
185
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
186
|
+
* * @param {optionName} - string
|
|
187
|
+
* * @param {optionValue} - any
|
|
188
|
+
* * option(options): Updates the values of several properties
|
|
189
|
+
* * @param {options} - object
|
|
190
|
+
*/
|
|
191
|
+
ref: ref
|
|
177
192
|
};
|
|
178
193
|
export { Card };
|
|
179
194
|
export default OptionWrapper(Card);
|