diginet-core-ui 1.3.92 → 1.3.93-beta.2

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,22 +1,16 @@
1
1
  /** @jsxRuntime classic */
2
2
  /** @jsx jsx */
3
- import { memo, forwardRef, useRef, useMemo, useImperativeHandle } from 'react';
3
+ import { css, jsx } from '@emotion/core';
4
4
  import PropTypes from 'prop-types';
5
- import { jsx, css } from '@emotion/core';
6
- import { boxBorder, displayBlock, overflowHidden, parseHeight, pointerEventsNone, positionRelative, userSelectNone } from "../../styles/general";
5
+ import { forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
6
+ import { boxBorder, overflowHidden, parseHeight, pd, pointerEventsNone, positionRelative, textColor, userSelectNone } from "../../styles/general";
7
+ import { useTheme } from "../../theme";
7
8
  import { classNames } from "../../utils";
8
- import theme from "../../theme/settings";
9
9
  const {
10
- colors: {
11
- text: {
12
- main
13
- }
14
- },
15
10
  typography: {
16
11
  paragraph1
17
- },
18
- spacing
19
- } = theme;
12
+ }
13
+ } = useTheme();
20
14
  const AccordionDetails = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
21
15
  action = {},
22
16
  children,
@@ -24,6 +18,7 @@ const AccordionDetails = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
24
18
  id,
25
19
  style
26
20
  }, reference) => {
21
+ if (!reference) reference = useRef(null);
27
22
  const ref = useRef(null);
28
23
  useImperativeHandle(reference, () => {
29
24
  const currentRef = ref.current || {};
@@ -48,16 +43,15 @@ const AccordionDetails = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
48
43
  }, [children, className, id, style]);
49
44
  }));
50
45
  const DetailsRootCSS = css`
51
- ${displayBlock};
52
46
  ${positionRelative};
53
47
  ${overflowHidden};
54
48
  ${parseHeight(0)};
55
- transition: height 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
49
+ transition: height 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
56
50
  .DGN-UI-Accordion-Details-Content {
57
51
  ${boxBorder};
58
52
  ${paragraph1};
59
- padding: ${spacing([0, 6, 4, 6])};
60
- color: ${main};
53
+ ${pd([0, 6, 4, 6])};
54
+ ${textColor('text.main')};
61
55
  &.disabled {
62
56
  ${pointerEventsNone};
63
57
  ${userSelectNone};
@@ -1,14 +1,10 @@
1
1
  /** @jsxRuntime classic */
2
2
  /** @jsx jsx */
3
- import { memo, useRef, forwardRef, Children, cloneElement, useMemo, useImperativeHandle } from 'react';
3
+ import { css, jsx } from '@emotion/core';
4
4
  import PropTypes from 'prop-types';
5
- import { jsx, css } from '@emotion/core';
6
- import { borderRadius4px } from "../../styles/general";
7
- import classNames from "../../utils/classNames";
8
- import theme from "../../theme/settings";
9
- const {
10
- spacing
11
- } = theme;
5
+ import { Children, cloneElement, forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
6
+ import { borderRadius, borderRadius4px, mg } from "../../styles/general";
7
+ import { classNames } from "../../utils";
12
8
  const AccordionGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
13
9
  action = {},
14
10
  children,
@@ -16,6 +12,7 @@ const AccordionGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
16
12
  collapseOther,
17
13
  style
18
14
  }, reference) => {
15
+ if (!reference) reference = useRef(null);
19
16
  const ref = useRef(null);
20
17
  const onCollapseOther = (e, onExpand) => {
21
18
  if (collapseOther) {
@@ -60,7 +57,7 @@ const AccordionGroupRootCSS = css`
60
57
  }
61
58
  &.expanding {
62
59
  ${borderRadius4px};
63
- margin: ${spacing([0, 0, 4, 0])};
60
+ ${mg([0, 0, 4, 0])};
64
61
  .DGN-UI-Divider {
65
62
  display: none !important;
66
63
  }
@@ -73,7 +70,7 @@ const AccordionGroupRootCSS = css`
73
70
  }
74
71
  &.expanding {
75
72
  ${borderRadius4px};
76
- margin: ${spacing([4, 0, 0, 0])};
73
+ ${mg([4, 0, 0, 0])};
77
74
  .DGN-UI-Accordion-Summary {
78
75
  border-radius: 4px 4px 0px 0px;
79
76
  }
@@ -85,11 +82,11 @@ const AccordionGroupRootCSS = css`
85
82
  &:not(:first-of-type):not(:last-child) {
86
83
  &,
87
84
  .DGN-UI-Accordion-Summary {
88
- border-radius: 0px;
85
+ ${borderRadius(0)};
89
86
  }
90
87
  &.expanding {
91
88
  ${borderRadius4px};
92
- margin: ${spacing([4, 0])};
89
+ ${mg([4, 0])};
93
90
  .DGN-UI-Accordion-Summary {
94
91
  border-radius: 4px 4px 0px 0px;
95
92
  }
@@ -1,20 +1,40 @@
1
1
  /** @jsxRuntime classic */
2
2
  /** @jsx jsx */
3
- import { memo, useEffect, useRef, forwardRef, useState, useMemo, useImperativeHandle } from 'react';
3
+ import { css, jsx } from '@emotion/core';
4
+ import { Divider } from "./..";
4
5
  import PropTypes from 'prop-types';
5
- import { jsx, css } from '@emotion/core';
6
+ import { forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
7
+ import { borderRadius4px, cursorNotAllowed, displayBlock, parseHeight, parseWidth, positionRelative, shadowNone } from "../../styles/general";
8
+ import { useTheme } from "../../theme";
9
+ import { classNames } from "../../utils";
6
10
  import AccordionContext from "./context";
7
- import Divider from "../divider";
8
- import { borderRadius4px, displayBlock, parseWidth, positionRelative } from "../../styles/general";
9
- import classNames from "../../utils/classNames";
10
- import theme from "../../theme/settings";
11
11
  const {
12
12
  colors: {
13
13
  line: {
14
- category
14
+ category: lineCategory
15
15
  }
16
16
  }
17
- } = theme;
17
+ } = useTheme();
18
+ const handleTransition = (timer, el, beginHeight, endHeight = null) => {
19
+ const getAutoHeightDuration = height => {
20
+ if (!height) {
21
+ return 0;
22
+ }
23
+ const constant = height / 36;
24
+
25
+ // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10
26
+ return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);
27
+ };
28
+ const duration = getAutoHeightDuration(beginHeight);
29
+ el.style.transitionDuration = `${duration}ms`;
30
+ el.style.height = `${beginHeight}px`;
31
+ if (timer.current) {
32
+ clearTimeout(timer.current);
33
+ }
34
+ timer.current = setTimeout(() => {
35
+ el.style.height = endHeight;
36
+ }, duration);
37
+ };
18
38
  const Accordion = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
19
39
  action = {},
20
40
  boxShadow,
@@ -23,16 +43,24 @@ const Accordion = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
23
43
  disabled,
24
44
  expand,
25
45
  expanded,
46
+ fullHeight,
26
47
  id,
27
48
  onClick,
28
49
  onCollapse,
29
50
  onExpand,
30
51
  style
31
52
  }, reference) => {
53
+ if (!reference) reference = useRef(null);
32
54
  const ref = useRef(null);
55
+ const timer = useRef(null);
33
56
  const [expandState, setExpandState] = useState(expanded || expand);
57
+ const _AccordionRootCSS = AccordionRootCSS(fullHeight, expandState);
34
58
  useEffect(() => {
35
59
  if (ref.current) {
60
+ if (fullHeight) {
61
+ handleTransition(timer, ref.current, ref.current.clientHeight, expandState ? '100%' : null);
62
+ }
63
+ // Handle margin top bot when in group
36
64
  const previous = ref.current.previousElementSibling;
37
65
  if (previous) {
38
66
  expandState ? previous.classList.add('previousExpanding') : previous.classList.remove('previousExpanding');
@@ -58,12 +86,13 @@ const Accordion = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
58
86
  return currentRef;
59
87
  });
60
88
  return useMemo(() => {
89
+ var _ref$current;
61
90
  return jsx("div", {
62
91
  id: id,
63
- css: AccordionRootCSS,
92
+ css: [_AccordionRootCSS, boxShadow && AccordionRootBoxShadowCSS, disabled && AccordionRootDisabledCSS],
64
93
  ref: ref,
65
94
  style: style,
66
- className: classNames('DGN-UI-Accordion', disabled && 'disabled', boxShadow === true && 'boxShadow', expandState && 'expanding', className)
95
+ className: classNames('DGN-UI-Accordion', disabled && 'disabled', expandState && 'expanding', className)
67
96
  }, jsx(AccordionContext.Provider, {
68
97
  value: {
69
98
  expanded,
@@ -72,41 +101,45 @@ const Accordion = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
72
101
  onClickAccordion: onClick ? onClickAccordion : null,
73
102
  onExpand,
74
103
  onCollapse,
75
- setExpandState
104
+ setExpandState,
105
+ handleTransition,
106
+ fullHeight: fullHeight ? ((_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.clientHeight) || 0 : 0
76
107
  }
77
108
  }, children, jsx(Divider, {
78
- color: category,
109
+ color: lineCategory,
79
110
  style: {
80
111
  margin: 0,
81
112
  display: 'none'
82
113
  }
83
114
  })));
84
- }, [boxShadow, children, className, disabled, expanded, id, onClick, onCollapse, onExpand, style, expandState]);
115
+ }, [boxShadow, children, className, disabled, expand, expanded, fullHeight, id, onClick, onCollapse, onExpand, style, expandState]);
85
116
  }));
86
- const AccordionRootCSS = css`
117
+ const AccordionRootCSS = (fullHeight, expandState) => css`
87
118
  ${displayBlock};
88
119
  ${positionRelative};
89
120
  ${borderRadius4px};
90
121
  ${parseWidth('100%')};
91
- transition: margin 300ms ease;
92
- &.boxShadow {
93
- box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);
94
- }
95
- &.disabled {
96
- cursor: no-drop;
97
- box-shadow: none;
98
- }
122
+ ${fullHeight && expandState && parseHeight('100%')};
123
+ transition: margin 300ms ease, height 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
124
+ `;
125
+ const AccordionRootBoxShadowCSS = css`
126
+ box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);
127
+ `;
128
+ const AccordionRootDisabledCSS = css`
129
+ ${cursorNotAllowed};
130
+ ${shadowNone};
99
131
  `;
100
132
  Accordion.defaultProps = {
101
133
  boxShadow: true,
102
134
  className: '',
103
135
  disabled: false,
104
136
  expand: false,
137
+ fullHeight: false,
105
138
  style: {}
106
139
  };
107
140
  Accordion.propTypes = {
108
141
  /** The box-shadow of component. */
109
- boxShadow: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
142
+ boxShadow: PropTypes.bool,
110
143
  /** The content of the component (insist <AccordionSummary />, <AccordionDetails />). */
111
144
  children: PropTypes.node,
112
145
  /** Class for component. */
@@ -117,6 +150,8 @@ Accordion.propTypes = {
117
150
  expand: PropTypes.bool,
118
151
  /** Expand state of accordion (should use this). */
119
152
  expanded: PropTypes.bool,
153
+ /** If `true`, Accordion height will 100% of it parent. */
154
+ fullHeight: PropTypes.bool,
120
155
  /** Callback fired when Accordion is collapsed. */
121
156
  onCollapse: PropTypes.func,
122
157
  /** Callback fired when Accordion is expanded. */
@@ -1,22 +1,25 @@
1
1
  /** @jsxRuntime classic */
2
2
  /** @jsx jsx */
3
- import { memo, useEffect, useRef, useContext, forwardRef, useMemo, useImperativeHandle } from 'react';
3
+ import { css, jsx } from '@emotion/core';
4
+ import { ButtonIcon, Typography } from "./..";
4
5
  import PropTypes from 'prop-types';
5
- import { jsx } from '@emotion/core';
6
- import { SummaryRootCSS } from "./css";
7
- import AccordionContext from "./context";
8
- import { ButtonIcon, Typography } from '..';
6
+ import { forwardRef, memo, useContext, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
7
+ import { bgColor, bgTransparent, borderRadius4px, boxBorder, breakWord, cursorPointer, displayFlex, displayInlineBlock, displayInlineFlex, flexRow, flexRowReverse, inset, itemsCenter, justifyBetween, justifyCenter, justifyEnd, mgl, mgr, parseMaxWidthHeight, parseMinHeight, parseMinWidthHeight, parseWidth, parseWidthHeight, pd, pointerEventsInitial, pointerEventsNone, positionAbsolute, positionRelative, textColor, userSelectNone } from "../../styles/general";
8
+ import { useTheme } from "../../theme";
9
9
  import { classNames } from "../../utils";
10
- import theme from "../../theme/settings";
10
+ import AccordionContext from "./context";
11
11
  const {
12
12
  colors: {
13
13
  system: {
14
- active,
14
+ active: systemActive,
15
15
  disabled: systemDisabled
16
16
  }
17
17
  },
18
+ typography: {
19
+ heading3
20
+ },
18
21
  spacing
19
- } = theme;
22
+ } = useTheme();
20
23
  const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
21
24
  action = {},
22
25
  background,
@@ -31,6 +34,7 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
31
34
  style,
32
35
  title
33
36
  }, reference) => {
37
+ if (!reference) reference = useRef(null);
34
38
  const {
35
39
  expanded,
36
40
  expandState,
@@ -38,7 +42,9 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
38
42
  onClickAccordion,
39
43
  onExpand,
40
44
  onCollapse,
41
- setExpandState
45
+ setExpandState,
46
+ handleTransition,
47
+ fullHeight
42
48
  } = useContext(AccordionContext);
43
49
  const ref = useRef(null);
44
50
  const expandIconRef = useRef(null);
@@ -64,32 +70,17 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
64
70
  }
65
71
  };
66
72
  const showHideDetailHandler = type => {
67
- if (ref.current) {
68
- const detailsEl = ref.current.nextElementSibling;
73
+ if (!ref.current) return;
74
+ const detailEl = ref.current.nextElementSibling;
75
+ if (detailEl) {
76
+ const summaryHeight = ref.current.clientHeight;
69
77
  if (type === 'show') {
70
- if (detailsEl) {
71
- const scrollHeight = detailsEl.scrollHeight;
72
- const duration = Math.max(Math.min(scrollHeight, 1500), 200);
73
- detailsEl.style.height = scrollHeight + 'px';
74
- if (!detailsEl.style.transitionDuration) {
75
- detailsEl.style.transitionDuration = duration + 'ms';
76
- }
77
- if (timer.current) {
78
- clearTimeout(timer.current);
79
- }
80
- timer.current = setTimeout(() => {
81
- detailsEl.style.height = 'auto';
82
- }, (detailsEl.firstChild.childNodes.length || 2.5) * 100);
83
- }
78
+ const height = Math.max(detailEl.scrollHeight, fullHeight - summaryHeight);
79
+ handleTransition(timer, detailEl, height, `calc(100% - ${summaryHeight}px)`);
84
80
  } else {
85
- if (detailsEl && detailsEl.style.height) {
86
- detailsEl.style.height = detailsEl.scrollHeight + 'px';
87
- if (timer.current) {
88
- clearTimeout(timer.current);
89
- }
90
- timer.current = setTimeout(() => {
91
- detailsEl.style.height = null;
92
- }, 10);
81
+ if (detailEl.style.height) {
82
+ const height = detailEl.scrollHeight;
83
+ handleTransition(timer, detailEl, height);
93
84
  }
94
85
  }
95
86
  }
@@ -125,7 +116,7 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
125
116
  }, jsx(Typography, {
126
117
  type: 'h3',
127
118
  lineClamp: 2,
128
- color: disabled ? systemDisabled : active,
119
+ color: disabled ? systemDisabled : systemActive,
129
120
  style: {
130
121
  marginRight: children && title ? spacing([4]) : 0
131
122
  }
@@ -150,6 +141,156 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
150
141
  }, collapseIcon)))));
151
142
  }, [background, children, className, collapseIcon, expandIcon, expandIconAt, expandIconProps, id, onClick, style, title, disabled, expanded, expandState, onClickAccordion, onCollapse, onExpand]);
152
143
  }));
144
+ const SummaryRootCSS = background => css`
145
+ ${displayFlex};
146
+ ${flexRow};
147
+ ${positionRelative};
148
+ ${justifyBetween};
149
+ ${itemsCenter};
150
+ ${cursorPointer};
151
+ ${boxBorder};
152
+ ${borderRadius4px};
153
+ ${parseWidth('100%')};
154
+ ${parseMinHeight(56)};
155
+ ${pd([4, 6])};
156
+ ${background && bgColor(background === true ? 'fill.headerbar' : background)};
157
+ .Accordion-Expand-Icon,
158
+ .Accordion-Collapse-Icon {
159
+ ${cursorPointer};
160
+ color: ${systemActive} !important;
161
+ &:active,
162
+ &:focus,
163
+ &:hover {
164
+ ${bgTransparent};
165
+ ${textColor('system.active')};
166
+ }
167
+ }
168
+ .Accordion-Icon-Root {
169
+ ${displayFlex};
170
+ ${flexRow};
171
+ .Accordion-Icon.rotate-able {
172
+ ${boxBorder};
173
+ ${parseWidthHeight(24)};
174
+ &:not(.TreeView) {
175
+ transform: rotateZ(0deg);
176
+ transform-origin: center;
177
+ }
178
+ &.TreeView {
179
+ transform-origin: center;
180
+ }
181
+ }
182
+ }
183
+ &.start {
184
+ ${flexRowReverse};
185
+ ${justifyEnd};
186
+ .Accordion-Icon.rotate-able {
187
+ ${mgr([2])};
188
+ &.TreeView {
189
+ transform: rotateZ(-90deg);
190
+ }
191
+ }
192
+ }
193
+ &.end {
194
+ .Accordion-Icon.rotate-able {
195
+ ${mgl([2])};
196
+ &.TreeView {
197
+ transform: rotateZ(90deg);
198
+ }
199
+ }
200
+ }
201
+ &.expanding {
202
+ border-radius: 4px 4px 0px 0px;
203
+ .Accordion-Icon.rotate-able {
204
+ &:not(.TreeView) {
205
+ transform: rotateZ(90deg);
206
+ }
207
+ &.TreeView {
208
+ transform: rotateZ(0deg);
209
+ }
210
+ }
211
+ .Accordion-Icon:not(.rotate-able) {
212
+ .Accordion-Expand-Icon {
213
+ transform: scale(0);
214
+ }
215
+ .Accordion-Collapse-Icon {
216
+ transform: scale(1);
217
+ }
218
+ }
219
+ }
220
+ &:not(.disabled) {
221
+ transition: background-color 300ms ease;
222
+ &:hover {
223
+ ${bgColor('fill.hover')};
224
+ }
225
+ &:focus {
226
+ ${bgColor('fill.focus')};
227
+ }
228
+ &:active {
229
+ ${bgColor('fill.pressed')};
230
+ }
231
+ }
232
+ &.disabled {
233
+ ${pointerEventsNone};
234
+ ${bgColor('fill.disabled')};
235
+ .DGN-UI-Accordion-Summary-Content,
236
+ .Accordion-Expand-Icon {
237
+ color: ${systemDisabled} !important;
238
+ }
239
+ }
240
+ &.treeview-disabled {
241
+ ${pointerEventsNone};
242
+ &:hover {
243
+ ${bgTransparent};
244
+ }
245
+ .TreeView-Item {
246
+ ${textColor('system.disabled')};
247
+ }
248
+ .Accordion-Icon.rotate-able.TreeView .DGN-UI-Icon {
249
+ ${cursorPointer};
250
+ ${pointerEventsInitial};
251
+ }
252
+ }
253
+ .DGN-UI-Accordion-Summary-Content {
254
+ ${heading3};
255
+ ${flexRow};
256
+ ${positionRelative};
257
+ ${breakWord};
258
+ ${userSelectNone};
259
+ ${boxBorder}
260
+ ${itemsCenter};
261
+ ${textColor('system.active')};
262
+ ${parseWidth('100%')};
263
+ ${parseMinHeight(24)};
264
+ }
265
+ .Accordion-Icon {
266
+ ${displayInlineBlock};
267
+ ${positionRelative};
268
+ ${cursorPointer};
269
+ ${parseWidthHeight(24)};
270
+ transition: transform 200ms linear;
271
+ .Accordion-Expand-Icon {
272
+ transform: scale(1);
273
+ transition: transform 200ms linear;
274
+ &.effect {
275
+ ${positionRelative};
276
+ }
277
+ }
278
+ .Accordion-Collapse-Icon {
279
+ ${positionAbsolute};
280
+ ${inset(0)};
281
+ transform: scale(0);
282
+ transition: transform 200ms linear;
283
+ }
284
+ .effect {
285
+ ${displayInlineFlex};
286
+ ${justifyCenter};
287
+ ${itemsCenter};
288
+ ${cursorPointer};
289
+ ${parseMinWidthHeight(24)};
290
+ ${parseMaxWidthHeight(34)};
291
+ }
292
+ }
293
+ `;
153
294
  AccordionSummary.defaultProps = {
154
295
  className: '',
155
296
  expandIcon: 'ArrowRight',
@@ -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,19 +363,19 @@ 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
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
380
  reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
381
381
  current: PropTypes.instanceOf(Element)