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.
@@ -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
- reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
381
- current: PropTypes.instanceOf(Element)
382
- })])
380
+ ref: ref
383
381
  };
384
382
  export { Avatar };
385
383
  export default OptionWrapper(Avatar);
@@ -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);
@@ -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);
@@ -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);