diginet-core-ui 1.3.59-beta.2 → 1.3.59-beta.3

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.
@@ -1,6 +1,6 @@
1
1
  import { css } from '@emotion/core';
2
2
  import theme from '../../theme/settings';
3
- import { alignCenter, alignStart, backgroundTransparent, borderBox, borderRadius4px, breakWord, cursorPointer, displayInlineBlock, flexRow, flexRowReverse, inlineFlex, justifyBetween, justifyCenter, justifyEnd, parseWidthHeight, pointerEventsNone, positionAbsolute, positionRelative, userSelectNone } from '../../styles/general';
3
+ import { alignCenter, backgroundTransparent, borderBox, borderRadius4px, breakWord, cursorPointer, displayInlineBlock, flexRow, flexRowReverse, inlineFlex, justifyBetween, justifyCenter, justifyEnd, parseWidthHeight, pointerEventsNone, positionAbsolute, positionRelative, userSelectNone } from '../../styles/general';
4
4
  const {
5
5
  colors: {
6
6
  system: {
@@ -24,13 +24,13 @@ export const SummaryRootCSS = background => css`
24
24
  ${flexRow};
25
25
  ${positionRelative};
26
26
  ${justifyBetween};
27
- ${alignStart};
27
+ ${alignCenter};
28
28
  ${cursorPointer};
29
29
  ${borderBox};
30
30
  ${borderRadius4px};
31
31
  width: 100%;
32
32
  min-height: 56px;
33
- padding: ${spacing(4)}px ${spacing(6)}px;
33
+ padding: ${spacing([4, 6])};
34
34
  ${background && `background-color: ${background === true ? headerbar : theme.colors[background] || background};`};
35
35
  .Accordion-Expand-Icon,
36
36
  .Accordion-Collapse-Icon {
@@ -61,7 +61,7 @@ export const SummaryRootCSS = background => css`
61
61
  ${flexRowReverse};
62
62
  ${justifyEnd};
63
63
  .Accordion-Icon.rotate-able {
64
- margin-right: ${spacing(2)}px;
64
+ margin-right: ${spacing([2])};
65
65
  &.TreeView {
66
66
  transform: rotateZ(-90deg);
67
67
  }
@@ -69,7 +69,7 @@ export const SummaryRootCSS = background => css`
69
69
  }
70
70
  &.end {
71
71
  .Accordion-Icon.rotate-able {
72
- margin-left: ${spacing(2)}px;
72
+ margin-left: ${spacing([2])};
73
73
  &.TreeView {
74
74
  transform: rotateZ(90deg);
75
75
  }
@@ -131,10 +131,10 @@ export const SummaryRootCSS = background => css`
131
131
  ${heading3};
132
132
  ${flexRow};
133
133
  ${positionRelative};
134
- ${alignCenter};
135
134
  ${breakWord};
136
135
  ${userSelectNone};
137
136
  ${borderBox}
137
+ ${alignCenter};
138
138
  color: ${active};
139
139
  width: 100%;
140
140
  min-height: 24px;
@@ -20,19 +20,14 @@ const {
20
20
  const AccordionDetails = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
21
21
  children,
22
22
  className,
23
- style,
24
- id
23
+ id,
24
+ style
25
25
  }, reference) => {
26
26
  const ref = useRef(null);
27
- useImperativeHandle(reference, () => {
28
- const currentRef = ref.current || {};
29
- const _instance = {}; // methods
30
-
31
- _instance.__proto__ = {}; // hidden methods
32
-
33
- currentRef.instance = _instance;
34
- return currentRef;
35
- });
27
+ useImperativeHandle(reference, () => ({
28
+ element: ref.current,
29
+ instance: {}
30
+ }));
36
31
  return useMemo(() => {
37
32
  return jsx("div", {
38
33
  css: DetailsRootCSS,
@@ -54,7 +49,7 @@ const DetailsRootCSS = css`
54
49
  .DGN-UI-Accordion-Details-Content {
55
50
  ${borderBox};
56
51
  ${paragraph1};
57
- padding: 0 ${spacing(6)}px ${spacing(4)}px ${spacing(6)}px;
52
+ padding: ${spacing([0, 6, 4, 6])};
58
53
  color: ${main};
59
54
  &.disabled {
60
55
  ${pointerEventsNone}
@@ -64,17 +59,17 @@ const DetailsRootCSS = css`
64
59
  `;
65
60
  AccordionDetails.defaultProps = {
66
61
  className: '',
67
- style: {},
68
- id: ''
62
+ id: '',
63
+ style: {}
69
64
  };
70
65
  AccordionDetails.propTypes = {
71
66
  /** The content of the component. */
72
67
  children: PropTypes.node,
73
68
 
74
- /** Style inline of component. */
75
- style: PropTypes.object,
76
-
77
69
  /** Class for component. */
78
- className: PropTypes.string
70
+ className: PropTypes.string,
71
+
72
+ /** Style inline of component. */
73
+ style: PropTypes.object
79
74
  };
80
75
  export default AccordionDetails;
@@ -5,9 +5,13 @@ import { memo, useRef, forwardRef, Children, cloneElement, useMemo, useImperativ
5
5
  import PropTypes from 'prop-types';
6
6
  import { jsx, css } from '@emotion/core';
7
7
  import { borderRadius4px } from '../../styles/general';
8
+ import theme from '../../theme/settings';
9
+ const {
10
+ spacing
11
+ } = theme;
8
12
  const AccordionGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
9
- className,
10
13
  children,
14
+ className,
11
15
  collapseOther,
12
16
  style
13
17
  }, reference) => {
@@ -26,15 +30,10 @@ const AccordionGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
26
30
  }
27
31
  };
28
32
 
29
- useImperativeHandle(reference, () => {
30
- const currentRef = ref.current || {};
31
- const _instance = {}; // methods
32
-
33
- _instance.__proto__ = {}; // hidden methods
34
-
35
- currentRef.instance = _instance;
36
- return currentRef;
37
- });
33
+ useImperativeHandle(reference, () => ({
34
+ element: ref.current,
35
+ instance: {}
36
+ }));
38
37
  return useMemo(() => {
39
38
  return jsx("div", {
40
39
  css: AccordionGroupRootCSS,
@@ -56,7 +55,7 @@ const AccordionGroupRootCSS = css`
56
55
  }
57
56
  &.expanding {
58
57
  ${borderRadius4px};
59
- margin: 0 0 16px 0;
58
+ margin: ${spacing([0, 0, 4, 0])};
60
59
  .DGN-UI-Divider {
61
60
  display: none !important;
62
61
  }
@@ -69,7 +68,7 @@ const AccordionGroupRootCSS = css`
69
68
  }
70
69
  &.expanding {
71
70
  ${borderRadius4px};
72
- margin: 16px 0 0 0;
71
+ margin: ${spacing([4, 0, 0, 0])};
73
72
  .DGN-UI-Accordion-Summary {
74
73
  border-radius: 4px 4px 0px 0px;
75
74
  }
@@ -85,7 +84,7 @@ const AccordionGroupRootCSS = css`
85
84
  }
86
85
  &.expanding {
87
86
  ${borderRadius4px};
88
- margin: 16px 0;
87
+ margin: ${spacing([4, 0])};
89
88
  .DGN-UI-Accordion-Summary {
90
89
  border-radius: 4px 4px 0px 0px;
91
90
  }
@@ -116,13 +115,13 @@ AccordionGroup.propTypes = {
116
115
  /** The content of the component. */
117
116
  children: PropTypes.node,
118
117
 
119
- /** Style inline of component. */
120
- style: PropTypes.object,
121
-
122
118
  /** Class for component. */
123
119
  className: PropTypes.string,
124
120
 
125
121
  /** If `true`, collapse other when expand */
126
- collapseOther: PropTypes.bool
122
+ collapseOther: PropTypes.bool,
123
+
124
+ /** Style inline of component. */
125
+ style: PropTypes.object
127
126
  };
128
127
  export default AccordionGroup;
@@ -16,16 +16,16 @@ const {
16
16
  }
17
17
  } = theme;
18
18
  const Accordion = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
19
- id,
19
+ boxShadow,
20
+ children,
21
+ className,
20
22
  disabled,
21
23
  expand,
22
24
  expanded,
25
+ id,
23
26
  onClick,
24
- onExpand,
25
27
  onCollapse,
26
- boxShadow,
27
- className,
28
- children,
28
+ onExpand,
29
29
  style
30
30
  }, reference) => {
31
31
  const ref = useRef(null);
@@ -49,22 +49,17 @@ const Accordion = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
49
49
  });
50
50
  };
51
51
 
52
- useImperativeHandle(reference, () => {
53
- const currentRef = ref.current || {};
54
- const _instance = {}; // methods
55
-
56
- _instance.__proto__ = {}; // hidden methods
57
-
58
- currentRef.instance = _instance;
59
- return currentRef;
60
- });
52
+ useImperativeHandle(reference, () => ({
53
+ element: ref.current,
54
+ instance: {}
55
+ }));
61
56
  return useMemo(() => {
62
57
  return jsx("div", {
63
58
  id: id,
64
59
  css: AccordionRootCSS,
65
60
  ref: ref,
66
61
  style: style,
67
- className: ['DGN-UI-Accordion', disabled ? 'disabled' : '', className, boxShadow === true ? 'boxShadow' : '', expandState ? 'expanding' : ''].join(' ').trim().replace(/\s+/g, ' ')
62
+ className: ['DGN-UI-Accordion', disabled ? 'disabled' : '', boxShadow === true ? 'boxShadow' : '', expandState ? 'expanding' : '', className].join(' ').trim().replace(/\s+/g, ' ')
68
63
  }, jsx(AccordionContext.Provider, {
69
64
  value: {
70
65
  expanded,
@@ -106,12 +101,12 @@ Accordion.defaultProps = {
106
101
  style: {}
107
102
  };
108
103
  Accordion.propTypes = {
104
+ /** The box-shadow of component. */
105
+ boxShadow: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
106
+
109
107
  /** The content of the component (insist <AccordionSummary />, <AccordionDetails />). */
110
108
  children: PropTypes.node,
111
109
 
112
- /** Style inline of component. */
113
- style: PropTypes.object,
114
-
115
110
  /** Class for component. */
116
111
  className: PropTypes.string,
117
112
 
@@ -124,13 +119,13 @@ Accordion.propTypes = {
124
119
  /** Expand state of accordion (should use this). */
125
120
  expanded: PropTypes.bool,
126
121
 
127
- /** The box-shadow of component. */
128
- boxShadow: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
122
+ /** Callback fired when Accordion is collapsed. */
123
+ onCollapse: PropTypes.func,
129
124
 
130
125
  /** Callback fired when Accordion is expanded. */
131
126
  onExpand: PropTypes.func,
132
127
 
133
- /** Callback fired when Accordion is collapsed. */
134
- onCollapse: PropTypes.func
128
+ /** Style inline of component. */
129
+ style: PropTypes.object
135
130
  };
136
131
  export default Accordion;
@@ -4,20 +4,31 @@
4
4
  import { memo, useEffect, useRef, useContext, forwardRef, useMemo, useImperativeHandle } from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { jsx } from '@emotion/core';
7
- import { renderIcon } from '../../utils';
8
7
  import { SummaryRootCSS } from './css';
9
8
  import AccordionContext from './context';
9
+ import { ButtonIcon, Typography } from '..';
10
+ import theme from '../../theme/settings';
11
+ const {
12
+ colors: {
13
+ system: {
14
+ active,
15
+ disabled: systemDisabled
16
+ }
17
+ },
18
+ spacing
19
+ } = theme;
10
20
  const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
11
- id,
12
- expandIcon,
13
- collapseIcon,
14
- expandIconAt,
15
21
  background,
16
- className,
17
- onClick,
18
22
  children,
23
+ className,
24
+ collapseIcon,
25
+ expandIcon,
26
+ expandIconAt,
19
27
  expandIconProps,
20
- style
28
+ id,
29
+ onClick,
30
+ style,
31
+ title
21
32
  }, reference) => {
22
33
  const {
23
34
  expanded,
@@ -102,15 +113,10 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
102
113
  showHideDetailHandler('hide');
103
114
  }
104
115
  }, [expandState]);
105
- useImperativeHandle(reference, () => {
106
- const currentRef = ref.current || {};
107
- const _instance = {}; // methods
108
-
109
- _instance.__proto__ = {}; // hidden methods
110
-
111
- currentRef.instance = _instance;
112
- return currentRef;
113
- });
116
+ useImperativeHandle(reference, () => ({
117
+ element: ref.current,
118
+ instance: {}
119
+ }));
114
120
  return useMemo(() => {
115
121
  return jsx("div", {
116
122
  id: id,
@@ -122,16 +128,27 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
122
128
  className: ['DGN-UI-Accordion-Summary', disabled ? 'disabled' : '', expandIcon ? expandIconAt : '', expandState ? 'expanding' : '', className].join(' ').trim().replace(/\s+/g, ' ')
123
129
  }, jsx("div", {
124
130
  className: 'DGN-UI-Accordion-Summary-Content'
125
- }, children), !!expandIcon && jsx("div", {
131
+ }, jsx(Typography, {
132
+ type: 'h3',
133
+ lineClamp: 2,
134
+ color: disabled ? systemDisabled : active,
135
+ style: {
136
+ marginRight: children && title ? spacing([4]) : 0
137
+ }
138
+ }, title || ''), children), !!expandIcon && jsx("div", {
126
139
  className: 'Accordion-Icon-Root'
127
140
  }, jsx("div", { ...expandIconProps,
128
141
  ref: expandIconRef,
129
142
  className: ['Accordion-Icon', collapseIcon ? '' : 'rotate-able', expandIconProps.className ? expandIconProps.className : ''].join(' ').trim().replace(/\s+/g, ' ')
130
- }, typeof expandIcon === 'string' ? renderIcon(expandIcon, 'effect', {
143
+ }, typeof expandIcon === 'string' ? jsx(ButtonIcon, {
144
+ viewType: 'ghost',
145
+ name: expandIcon,
131
146
  className: 'Accordion-Expand-Icon'
132
147
  }) : jsx("span", {
133
148
  className: 'Accordion-Expand-Icon effect'
134
- }, expandIcon), !!collapseIcon && (typeof collapseIcon === 'string' ? renderIcon(collapseIcon, 'effect', {
149
+ }, expandIcon), !!collapseIcon && (typeof collapseIcon === 'string' ? jsx(ButtonIcon, {
150
+ viewType: 'ghost',
151
+ name: collapseIcon,
135
152
  className: 'Accordion-Collapse-Icon'
136
153
  }) : jsx("span", {
137
154
  className: 'Accordion-Collapse-Icon effect'
@@ -139,35 +156,41 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
139
156
  }, [id, expandIcon, expandIconAt, className, background, children, collapseIcon, expandIconProps, style, expandState, disabled]);
140
157
  }));
141
158
  AccordionSummary.defaultProps = {
142
- expandIconAt: 'start',
143
- expandIconProps: {},
144
159
  className: '',
145
160
  expandIcon: 'ArrowRight',
161
+ expandIconAt: 'start',
162
+ expandIconProps: {},
146
163
  style: {}
147
164
  };
148
165
  AccordionSummary.propTypes = {
166
+ /** Background for label summary. */
167
+ background: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
168
+
149
169
  /** The content of the component. */
150
170
  children: PropTypes.node,
151
171
 
152
- /** Style inline of component. */
153
- style: PropTypes.object,
154
-
155
172
  /** Class for component. */
156
173
  className: PropTypes.string,
157
174
 
158
- /** Icon display for expand icon. */
159
- expandIcon: PropTypes.any,
160
-
161
175
  /** Icon display for collapse icon. */
162
176
  collapseIcon: PropTypes.any,
163
177
 
178
+ /** Icon display for expand icon. */
179
+ expandIcon: PropTypes.any,
180
+
164
181
  /** Position to render icon. */
165
182
  expandIconAt: PropTypes.oneOf(['start', 'end']),
166
183
 
167
- /** Background for label summary. */
168
- background: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
169
-
170
184
  /** Other props of icons. */
171
- expandIconProps: PropTypes.any
185
+ expandIconProps: PropTypes.any,
186
+
187
+ /** Callback fired when the component is clicked. */
188
+ onClick: PropTypes.func,
189
+
190
+ /** Style inline of component. */
191
+ style: PropTypes.object,
192
+
193
+ /** The title of the component. */
194
+ title: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
172
195
  };
173
196
  export default AccordionSummary;
@@ -241,15 +241,10 @@ const Avatar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
241
241
  }
242
242
  }
243
243
  }, [src]);
244
- useImperativeHandle(reference, () => {
245
- const currentRef = ref.current || {};
246
- const _instance = {}; // methods
247
-
248
- _instance.__proto__ = {}; // hidden methods
249
-
250
- currentRef.instance = _instance;
251
- return currentRef;
252
- });
244
+ useImperativeHandle(reference, () => ({
245
+ element: ref.current,
246
+ instance: {}
247
+ }));
253
248
  return useMemo(() => {
254
249
  return jsx(Fragment, null, jsx("div", {
255
250
  css: _AvatarContainerCSS,
@@ -463,18 +458,18 @@ Avatar.propTypes = {
463
458
  /** source of file (http:// or https://) */
464
459
  src: PropTypes.string,
465
460
 
466
- /**
467
- * it is used to display the default if there is no src<br />
468
- * if undefined, will display icons available in the icons store
461
+ /**
462
+ * it is used to display the default if there is no src<br />
463
+ * if undefined, will display icons available in the icons store
469
464
  */
470
465
  defaultSrc: PropTypes.string,
471
466
 
472
467
  /** the direction to display more info */
473
468
  direction: PropTypes.oneOf(['top', 'bottom', 'left', 'right']),
474
469
 
475
- /**
476
- * data to display when hoverAble is true<br />
477
- * data is an object or function return a jsx element
470
+ /**
471
+ * data to display when hoverAble is true<br />
472
+ * data is an object or function return a jsx element
478
473
  */
479
474
  data: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
480
475
 
@@ -490,19 +485,19 @@ Avatar.propTypes = {
490
485
  /** lazy loading */
491
486
  lazyLoading: PropTypes.bool,
492
487
 
493
- /**
494
- * ref methods
495
- *
496
- * * option(): Gets all UI component properties
497
- * * Returns value - object
498
- * * option(optionName): Gets the value of a single property
499
- * * @param {optionName} - string
500
- * * Returns value - any
501
- * * option(optionName, optionValue): Updates the value of a single property
502
- * * @param {optionName} - string
503
- * * @param {optionValue} - any
504
- * * option(options): Updates the values of several properties
505
- * * @param {options} - object
488
+ /**
489
+ * ref methods
490
+ *
491
+ * * option(): Gets all UI component properties
492
+ * * Returns value - object
493
+ * * option(optionName): Gets the value of a single property
494
+ * * @param {optionName} - string
495
+ * * Returns value - any
496
+ * * option(optionName, optionValue): Updates the value of a single property
497
+ * * @param {optionName} - string
498
+ * * @param {optionValue} - any
499
+ * * option(options): Updates the values of several properties
500
+ * * @param {options} - object
506
501
  */
507
502
  reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
508
503
  current: PropTypes.instanceOf(Element)
@@ -98,15 +98,10 @@ const Badge = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
98
98
 
99
99
  const _BadgeRootCSS = BadgeRootCSS(children, name, dotPos, _BadgeNumberCSS);
100
100
 
101
- useImperativeHandle(reference, () => {
102
- const currentRef = ref.current || {};
103
- const _instance = {}; // methods
104
-
105
- _instance.__proto__ = {}; // hidden methods
106
-
107
- currentRef.instance = _instance;
108
- return currentRef;
109
- });
101
+ useImperativeHandle(reference, () => ({
102
+ element: ref.current,
103
+ instance: {}
104
+ }));
110
105
  return useMemo(() => {
111
106
  let node = children;
112
107
 
@@ -210,11 +205,11 @@ Badge.propTypes = {
210
205
  /** other icon props when use prop name */
211
206
  iconProps: PropTypes.object,
212
207
 
213
- /** size of Badge
214
- *
215
- * * medium (dot 8px, typography p3)
216
- * * large (button 10px, typography p2)
217
- * * giant (button 12px, typography p1)
208
+ /** size of Badge
209
+ *
210
+ * * medium (dot 8px, typography p3)
211
+ * * large (button 10px, typography p2)
212
+ * * giant (button 12px, typography p1)
218
213
  * */
219
214
  size: PropTypes.oneOf(['medium', 'large', 'giant']),
220
215
 
@@ -104,15 +104,10 @@ const ButtonIcon = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
104
104
 
105
105
  const _ButtonRootCSS = ButtonRootCSS(circular, size, width, _width, height, _height, buttonSize, iconSize, colorHover, color, _color, name);
106
106
 
107
- useImperativeHandle(reference, () => {
108
- const currentRef = ref.current || {};
109
- const _instance = {}; // methods
110
-
111
- _instance.__proto__ = {}; // hidden methods
112
-
113
- currentRef.instance = _instance;
114
- return currentRef;
115
- });
107
+ useImperativeHandle(reference, () => ({
108
+ element: ref.current,
109
+ instance: {}
110
+ }));
116
111
 
117
112
  const _onClick = event => {
118
113
  event.persist();
@@ -370,14 +365,14 @@ ButtonIcon.propTypes = {
370
365
  /** Name of [icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic). */
371
366
  name: PropTypes.string,
372
367
 
373
- /**
374
- * The size of the component.
375
- *
376
- * * tiny (button 24px, icon 16px)
377
- * * small (button 32px, icon 20px)
378
- * * medium (button 40px, icon 24px)
379
- * * large (button 48px, icon 32px)
380
- * * giant (button 56px, icon 40px)
368
+ /**
369
+ * The size of the component.
370
+ *
371
+ * * tiny (button 24px, icon 16px)
372
+ * * small (button 32px, icon 20px)
373
+ * * medium (button 40px, icon 24px)
374
+ * * large (button 48px, icon 32px)
375
+ * * giant (button 56px, icon 40px)
381
376
  * */
382
377
  size: PropTypes.oneOf(['tiny', 'small', 'medium', 'large', 'giant']),
383
378
 
@@ -393,19 +388,19 @@ ButtonIcon.propTypes = {
393
388
  /** Width of the component. */
394
389
  width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
395
390
 
396
- /**
397
- * ref methods (ref.current.instance.*method*)
398
- *
399
- * * option(): Gets all UI component properties
400
- * * Returns value - object
401
- * * option(optionName): Gets the value of a single property
402
- * * @param {optionName} - string
403
- * * Returns value - any
404
- * * option(optionName, optionValue): Updates the value of a single property
405
- * * @param {optionName} - string
406
- * * @param {optionValue} - any
407
- * * option(options): Updates the values of several properties
408
- * * @param {options} - object
391
+ /**
392
+ * ref methods (ref.current.instance.*method*)
393
+ *
394
+ * * option(): Gets all UI component properties
395
+ * * Returns value - object
396
+ * * option(optionName): Gets the value of a single property
397
+ * * @param {optionName} - string
398
+ * * Returns value - any
399
+ * * option(optionName, optionValue): Updates the value of a single property
400
+ * * @param {optionName} - string
401
+ * * @param {optionValue} - any
402
+ * * option(options): Updates the values of several properties
403
+ * * @param {options} - object
409
404
  */
410
405
  reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
411
406
  current: PropTypes.instanceOf(Element)