@ringcentral/juno 1.12.1-beta.5746-a8a4867a → 1.12.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.
Files changed (90) hide show
  1. package/components/Dialer/DialPad/index.d.ts +2 -0
  2. package/components/Dialer/DialPad/index.js +2 -0
  3. package/components/Dialer/DialTextField/DialTextField.d.ts +1 -1
  4. package/components/Downshift/Downshift.d.ts +1 -1
  5. package/components/Downshift/SuggestionList/SuggestionList.d.ts +1 -1
  6. package/components/Downshift/styles/StyledTextField.d.ts +1 -1
  7. package/components/Forms/Picker/styles/StyledPickerTextField.d.ts +1 -1
  8. package/components/Forms/Select/utils/SelectInput/SelectInput.d.ts +1 -1
  9. package/components/Forms/TextField/TextField.d.ts +2 -2
  10. package/components/Forms/Textarea/Textarea.d.ts +1 -1
  11. package/components/Forms/Textarea/Textarea.js +8 -3
  12. package/components/Icon/assets/icon-Description.svg +5 -0
  13. package/components/Icon/assets/icon-poll.svg +5 -0
  14. package/components/Icon/assets/icon-poll_border.svg +5 -0
  15. package/components/Icon/icon-symbol.d.ts +1 -1
  16. package/components/Icon/icon-symbol.js +1 -1
  17. package/components/Virtuoso/react-virtuoso/Grid.d.ts +1 -1
  18. package/components/Virtuoso/react-virtuoso/List.d.ts +1 -1
  19. package/es6/components/Dialer/DialPad/index.js +2 -0
  20. package/es6/components/Forms/Textarea/Textarea.js +8 -3
  21. package/es6/components/Icon/assets/icon-Description.svg +5 -0
  22. package/es6/components/Icon/assets/icon-poll.svg +5 -0
  23. package/es6/components/Icon/assets/icon-poll_border.svg +5 -0
  24. package/es6/components/Icon/icon-symbol.js +1 -1
  25. package/es6/foundation/hooks/index.js +1 -0
  26. package/es6/foundation/hooks/useInterval/index.js +1 -0
  27. package/es6/foundation/hooks/useInterval/useInterval.js +86 -0
  28. package/es6/icon/DefaultFile.js +1 -1
  29. package/es6/icon/DefaultGdrive.js +1 -1
  30. package/es6/icon/DefaultMusic.js +1 -1
  31. package/es6/icon/DefaultVideo.js +1 -1
  32. package/es6/icon/DeletedFile.js +1 -1
  33. package/es6/icon/Description.js +7 -0
  34. package/es6/icon/Doc.js +1 -1
  35. package/es6/icon/Excel.js +1 -1
  36. package/es6/icon/GifFile.js +1 -1
  37. package/es6/icon/GoogleDoc.js +1 -1
  38. package/es6/icon/GoogleSheet.js +1 -1
  39. package/es6/icon/GoogleSlide.js +1 -1
  40. package/es6/icon/ImageBroken.js +1 -1
  41. package/es6/icon/ImagePreview.js +1 -1
  42. package/es6/icon/MacKeynote.js +1 -1
  43. package/es6/icon/MacNumbers.js +1 -1
  44. package/es6/icon/MacPages.js +1 -1
  45. package/es6/icon/Pdf.js +1 -1
  46. package/es6/icon/Poll.js +7 -0
  47. package/es6/icon/PollBorder.js +7 -0
  48. package/es6/icon/Ppt.js +1 -1
  49. package/es6/icon/Zip.js +1 -1
  50. package/es6/icon/index.js +3 -0
  51. package/es6/icons/icon-Description.svg +5 -0
  52. package/es6/icons/icon-poll.svg +5 -0
  53. package/es6/icons/icon-poll_border.svg +5 -0
  54. package/foundation/hooks/index.d.ts +1 -0
  55. package/foundation/hooks/index.js +1 -0
  56. package/foundation/hooks/useInterval/index.d.ts +1 -0
  57. package/foundation/hooks/useInterval/index.js +4 -0
  58. package/foundation/hooks/useInterval/useInterval.d.ts +43 -0
  59. package/foundation/hooks/useInterval/useInterval.js +88 -0
  60. package/icon/DefaultFile.js +1 -1
  61. package/icon/DefaultGdrive.js +1 -1
  62. package/icon/DefaultMusic.js +1 -1
  63. package/icon/DefaultVideo.js +1 -1
  64. package/icon/DeletedFile.js +1 -1
  65. package/icon/Description.d.ts +3 -0
  66. package/icon/Description.js +9 -0
  67. package/icon/Doc.js +1 -1
  68. package/icon/Excel.js +1 -1
  69. package/icon/GifFile.js +1 -1
  70. package/icon/GoogleDoc.js +1 -1
  71. package/icon/GoogleSheet.js +1 -1
  72. package/icon/GoogleSlide.js +1 -1
  73. package/icon/ImageBroken.js +1 -1
  74. package/icon/ImagePreview.js +1 -1
  75. package/icon/MacKeynote.js +1 -1
  76. package/icon/MacNumbers.js +1 -1
  77. package/icon/MacPages.js +1 -1
  78. package/icon/Pdf.js +1 -1
  79. package/icon/Poll.d.ts +3 -0
  80. package/icon/Poll.js +9 -0
  81. package/icon/PollBorder.d.ts +3 -0
  82. package/icon/PollBorder.js +9 -0
  83. package/icon/Ppt.js +1 -1
  84. package/icon/Zip.js +1 -1
  85. package/icon/index.d.ts +3 -0
  86. package/icon/index.js +6 -0
  87. package/icons/icon-Description.svg +5 -0
  88. package/icons/icon-poll.svg +5 -0
  89. package/icons/icon-poll_border.svg +5 -0
  90. package/package.json +1 -1
@@ -9,6 +9,7 @@ export * from './useForceUpdate';
9
9
  export * from './useForkRef';
10
10
  export * from './useHiddenTabindex';
11
11
  export * from './useId';
12
+ export * from './useInterval';
12
13
  export * from './useKeyDownOnce';
13
14
  export * from './useKeyboardMoveFocus';
14
15
  export * from './useLongPress';
@@ -0,0 +1 @@
1
+ export * from './useInterval';
@@ -0,0 +1,86 @@
1
+ import { useEffect, useRef, useCallback } from 'react';
2
+ import { useEventCallback } from '../useEventCallback';
3
+ /**
4
+ * controllable interval, provide easy way to control interval
5
+ *
6
+ * - cancel: cancel current interval
7
+ * - pause: pause current interval
8
+ * - play: play current interval
9
+ * - getRunning: return current interval running state
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const { cancel, play, pause } = useInterval(() => {
14
+ * console.log('interval be triggered');
15
+ * }, 1000)
16
+ *
17
+ * // get current run times
18
+ * useInterval((times) => {
19
+ * console.log('current times start from 1', times);
20
+ * }, 2000)
21
+ *
22
+ * // not start interval immediately
23
+ * useInterval((times) => {
24
+ * console.log('current times start from 1', times);
25
+ * }, 2000, false)
26
+ * ```
27
+ */
28
+ export var useInterval = function (
29
+ /** callback with times, times start from 1 */
30
+ callback,
31
+ /** what delay time of that interval */
32
+ delay,
33
+ /** is that start interval immediately */
34
+ startImmediately) {
35
+ if (delay === void 0) { delay = 0; }
36
+ if (startImmediately === void 0) { startImmediately = true; }
37
+ var intervalRef = useRef();
38
+ var countRef = useRef(0);
39
+ var getRunning = useEventCallback(function () { return !!intervalRef.current; });
40
+ var savedCallback = useEventCallback(function (times) {
41
+ callback(times);
42
+ });
43
+ var pause = useCallback(function () {
44
+ if (intervalRef.current) {
45
+ clearInterval(intervalRef.current);
46
+ intervalRef.current = undefined;
47
+ }
48
+ }, []);
49
+ var cancel = useCallback(function () {
50
+ pause();
51
+ countRef.current = 0;
52
+ }, [pause]);
53
+ var play = useCallback(function () {
54
+ var isRunning = getRunning();
55
+ if (isRunning)
56
+ return;
57
+ intervalRef.current = window.setInterval(function () {
58
+ countRef.current++;
59
+ savedCallback(countRef.current);
60
+ }, delay);
61
+ }, [delay, getRunning, savedCallback]);
62
+ useEffect(function () {
63
+ if (startImmediately) {
64
+ play();
65
+ }
66
+ return function () { return cancel(); };
67
+ }, [cancel, play, startImmediately]);
68
+ return {
69
+ /**
70
+ * cancel current interval
71
+ */
72
+ cancel: cancel,
73
+ /**
74
+ * pause current interval
75
+ */
76
+ pause: pause,
77
+ /**
78
+ * play current interval
79
+ */
80
+ play: play,
81
+ /**
82
+ * return current interval running state
83
+ */
84
+ getRunning: getRunning,
85
+ };
86
+ };
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import DefaultFileD from './DefaultFileD';
5
5
  var DefaultFile = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import DefaultGdriveD from './DefaultGdriveD';
5
5
  var DefaultGdrive = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import DefaultMusicD from './DefaultMusicD';
5
5
  var DefaultMusic = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import DefaultVideoD from './DefaultVideoD';
5
5
  var DefaultVideo = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import DeletedFileD from './DeletedFileD';
5
5
  var DeletedFile = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -0,0 +1,7 @@
1
+ import { __assign } from "tslib";
2
+ import React, { forwardRef, memo } from 'react';
3
+ var Description = memo(forwardRef(function (props, svgRef) { return (React.createElement("svg", __assign({ viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ref: svgRef }, props),
4
+ React.createElement("path", { d: "M19.25 24c.414 0 .75.448.75 1s-.336 1-.75 1H2.75c-.414 0-.75-.448-.75-1s.336-1 .75-1h16.5zm9.583-9c.644 0 1.167.448 1.167 1s-.522 1-1.167 1H3.166c-.644 0-1.167-.448-1.167-1s.522-1 1.167-1h25.667zm0-9C29.477 6 30 6.448 30 7s-.522 1-1.167 1H3.166c-.644 0-1.167-.448-1.167-1s.522-1 1.167-1h25.667z" }))); }));
5
+ Description.displayName = 'Description';
6
+ Description['iconName'] = 'Description';
7
+ export default Description;
package/es6/icon/Doc.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import DocD from './DocD';
5
5
  var Doc = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
package/es6/icon/Excel.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import ExcelD from './ExcelD';
5
5
  var Excel = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import GifFileD from './GifFileD';
5
5
  var GifFile = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import GoogleDocD from './GoogleDocD';
5
5
  var GoogleDoc = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import GoogleSheetD from './GoogleSheetD';
5
5
  var GoogleSheet = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import GoogleSlideD from './GoogleSlideD';
5
5
  var GoogleSlide = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import ImageBrokenD from './ImageBrokenD';
5
5
  var ImageBroken = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import ImagePreviewD from './ImagePreviewD';
5
5
  var ImagePreview = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import MacKeynoteD from './MacKeynoteD';
5
5
  var MacKeynote = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import MacNumbersD from './MacNumbersD';
5
5
  var MacNumbers = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import MacPagesD from './MacPagesD';
5
5
  var MacPages = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
package/es6/icon/Pdf.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import PdfD from './PdfD';
5
5
  var Pdf = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
@@ -0,0 +1,7 @@
1
+ import { __assign } from "tslib";
2
+ import React, { forwardRef, memo } from 'react';
3
+ var Poll = memo(forwardRef(function (props, svgRef) { return (React.createElement("svg", __assign({ viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ref: svgRef }, props),
4
+ React.createElement("path", { d: "M25 5a2 2 0 012 2v18a2 2 0 01-2 2H7a2 2 0 01-2-2V7a2 2 0 012-2h18zm-14 8a1 1 0 00-1 1v7a1 1 0 002 0v-7a1 1 0 00-1-1zm5-3a1 1 0 00-1 1v10a1 1 0 002 0V11a1 1 0 00-1-1zm5 5a1 1 0 00-1 1v5a1 1 0 002 0v-5a1 1 0 00-1-1z" }))); }));
5
+ Poll.displayName = 'Poll';
6
+ Poll['iconName'] = 'poll';
7
+ export default Poll;
@@ -0,0 +1,7 @@
1
+ import { __assign } from "tslib";
2
+ import React, { forwardRef, memo } from 'react';
3
+ var PollBorder = memo(forwardRef(function (props, svgRef) { return (React.createElement("svg", __assign({ viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ref: svgRef }, props),
4
+ React.createElement("path", { d: "M25 5a2 2 0 012 2v18a2 2 0 01-2 2H7a2 2 0 01-2-2V7a2 2 0 012-2h18zm-1 2H8a1 1 0 00-.993.883L7 8v16a1 1 0 00.883.993L8 25h16a1 1 0 00.993-.883L25 24V8a1 1 0 00-1-1zm-13 6a1 1 0 011 1v7a1 1 0 01-2 0v-7a1 1 0 011-1zm5-3a1 1 0 011 1v10a1 1 0 01-2 0V11a1 1 0 011-1zm5 5a1 1 0 011 1v5a1 1 0 01-2 0v-5a1 1 0 011-1z" }))); }));
5
+ PollBorder.displayName = 'PollBorder';
6
+ PollBorder['iconName'] = 'poll_border';
7
+ export default PollBorder;
package/es6/icon/Ppt.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import PptD from './PptD';
5
5
  var Ppt = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
package/es6/icon/Zip.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, memo } from 'react';
3
2
  import { useTheme } from '@material-ui/core';
3
+ import React, { forwardRef, memo } from 'react';
4
4
  import ZipD from './ZipD';
5
5
  var Zip = memo(forwardRef(function (inProps, svgRef) {
6
6
  var theme = useTheme();
package/es6/icon/index.js CHANGED
@@ -10,6 +10,7 @@ export { default as Svg8 } from './8';
10
10
  export { default as Svg9 } from './9';
11
11
  export { default as CompanySetupBorder } from './CompanySetupBorder';
12
12
  export { default as CompanySetup } from './CompanySetup';
13
+ export { default as Description } from './Description';
13
14
  export { default as Hud } from './Hud';
14
15
  export { default as Logout } from './Logout';
15
16
  export { default as NewEmail } from './NewEmail';
@@ -280,6 +281,8 @@ export { default as PlayBorder } from './PlayBorder';
280
281
  export { default as PlayCircle } from './PlayCircle';
281
282
  export { default as PlayCircleBorder } from './PlayCircleBorder';
282
283
  export { default as Play } from './Play';
284
+ export { default as PollBorder } from './PollBorder';
285
+ export { default as Poll } from './Poll';
283
286
  export { default as PoorConnection } from './PoorConnection';
284
287
  export { default as PptD } from './PptD';
285
288
  export { default as Ppt } from './Ppt';
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>Description</title>
4
+ <path d="M19.25 24c0.414 0 0.75 0.448 0.75 1s-0.336 1-0.75 1h-16.5c-0.414 0-0.75-0.448-0.75-1s0.336-1 0.75-1h16.5zM28.833 15c0.644 0 1.167 0.448 1.167 1s-0.522 1-1.167 1h-25.667c-0.644 0-1.167-0.448-1.167-1s0.522-1 1.167-1h25.667zM28.833 6c0.644 0 1.167 0.448 1.167 1s-0.522 1-1.167 1h-25.667c-0.644 0-1.167-0.448-1.167-1s0.522-1 1.167-1h25.667z"></path>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>poll</title>
4
+ <path d="M25 5c1.105 0 2 0.895 2 2v18c0 1.105-0.895 2-2 2h-18c-1.105 0-2-0.895-2-2v-18c0-1.105 0.895-2 2-2h18zM11 13c-0.552 0-1 0.448-1 1v0 7c0 0.552 0.448 1 1 1s1-0.448 1-1v0-7c0-0.552-0.448-1-1-1zM16 10c-0.552 0-1 0.448-1 1v0 10c0 0.552 0.448 1 1 1s1-0.448 1-1v0-10c0-0.552-0.448-1-1-1zM21 15c-0.552 0-1 0.448-1 1v0 5c0 0.552 0.448 1 1 1s1-0.448 1-1v0-5c0-0.552-0.448-1-1-1z"></path>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>poll_border</title>
4
+ <path d="M25 5c1.105 0 2 0.895 2 2v18c0 1.105-0.895 2-2 2h-18c-1.105 0-2-0.895-2-2v-18c0-1.105 0.895-2 2-2h18zM24 7h-16c-0.513 0-0.936 0.386-0.993 0.883l-0.007 0.117v16c0 0.513 0.386 0.936 0.883 0.993l0.117 0.007h16c0.513 0 0.936-0.386 0.993-0.883l0.007-0.117v-16c0-0.552-0.448-1-1-1zM11 13c0.552 0 1 0.448 1 1v7c0 0.552-0.448 1-1 1s-1-0.448-1-1v-7c0-0.552 0.448-1 1-1zM16 10c0.552 0 1 0.448 1 1v10c0 0.552-0.448 1-1 1s-1-0.448-1-1v-10c0-0.552 0.448-1 1-1zM21 15c0.552 0 1 0.448 1 1v5c0 0.552-0.448 1-1 1s-1-0.448-1-1v-5c0-0.552 0.448-1 1-1z"></path>
5
+ </svg>
@@ -9,6 +9,7 @@ export * from './useForceUpdate';
9
9
  export * from './useForkRef';
10
10
  export * from './useHiddenTabindex';
11
11
  export * from './useId';
12
+ export * from './useInterval';
12
13
  export * from './useKeyDownOnce';
13
14
  export * from './useKeyboardMoveFocus';
14
15
  export * from './useLongPress';
@@ -12,6 +12,7 @@ tslib_1.__exportStar(require("./useForceUpdate"), exports);
12
12
  tslib_1.__exportStar(require("./useForkRef"), exports);
13
13
  tslib_1.__exportStar(require("./useHiddenTabindex"), exports);
14
14
  tslib_1.__exportStar(require("./useId"), exports);
15
+ tslib_1.__exportStar(require("./useInterval"), exports);
15
16
  tslib_1.__exportStar(require("./useKeyDownOnce"), exports);
16
17
  tslib_1.__exportStar(require("./useKeyboardMoveFocus"), exports);
17
18
  tslib_1.__exportStar(require("./useLongPress"), exports);
@@ -0,0 +1 @@
1
+ export * from './useInterval';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./useInterval"), exports);
@@ -0,0 +1,43 @@
1
+ /**
2
+ * controllable interval, provide easy way to control interval
3
+ *
4
+ * - cancel: cancel current interval
5
+ * - pause: pause current interval
6
+ * - play: play current interval
7
+ * - getRunning: return current interval running state
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const { cancel, play, pause } = useInterval(() => {
12
+ * console.log('interval be triggered');
13
+ * }, 1000)
14
+ *
15
+ * // get current run times
16
+ * useInterval((times) => {
17
+ * console.log('current times start from 1', times);
18
+ * }, 2000)
19
+ *
20
+ * // not start interval immediately
21
+ * useInterval((times) => {
22
+ * console.log('current times start from 1', times);
23
+ * }, 2000, false)
24
+ * ```
25
+ */
26
+ export declare const useInterval: (callback: (times: number) => void, delay?: number, startImmediately?: boolean) => {
27
+ /**
28
+ * cancel current interval
29
+ */
30
+ cancel: () => void;
31
+ /**
32
+ * pause current interval
33
+ */
34
+ pause: () => void;
35
+ /**
36
+ * play current interval
37
+ */
38
+ play: () => void;
39
+ /**
40
+ * return current interval running state
41
+ */
42
+ getRunning: () => boolean;
43
+ };
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var react_1 = require("react");
4
+ var useEventCallback_1 = require("../useEventCallback");
5
+ /**
6
+ * controllable interval, provide easy way to control interval
7
+ *
8
+ * - cancel: cancel current interval
9
+ * - pause: pause current interval
10
+ * - play: play current interval
11
+ * - getRunning: return current interval running state
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const { cancel, play, pause } = useInterval(() => {
16
+ * console.log('interval be triggered');
17
+ * }, 1000)
18
+ *
19
+ * // get current run times
20
+ * useInterval((times) => {
21
+ * console.log('current times start from 1', times);
22
+ * }, 2000)
23
+ *
24
+ * // not start interval immediately
25
+ * useInterval((times) => {
26
+ * console.log('current times start from 1', times);
27
+ * }, 2000, false)
28
+ * ```
29
+ */
30
+ exports.useInterval = function (
31
+ /** callback with times, times start from 1 */
32
+ callback,
33
+ /** what delay time of that interval */
34
+ delay,
35
+ /** is that start interval immediately */
36
+ startImmediately) {
37
+ if (delay === void 0) { delay = 0; }
38
+ if (startImmediately === void 0) { startImmediately = true; }
39
+ var intervalRef = react_1.useRef();
40
+ var countRef = react_1.useRef(0);
41
+ var getRunning = useEventCallback_1.useEventCallback(function () { return !!intervalRef.current; });
42
+ var savedCallback = useEventCallback_1.useEventCallback(function (times) {
43
+ callback(times);
44
+ });
45
+ var pause = react_1.useCallback(function () {
46
+ if (intervalRef.current) {
47
+ clearInterval(intervalRef.current);
48
+ intervalRef.current = undefined;
49
+ }
50
+ }, []);
51
+ var cancel = react_1.useCallback(function () {
52
+ pause();
53
+ countRef.current = 0;
54
+ }, [pause]);
55
+ var play = react_1.useCallback(function () {
56
+ var isRunning = getRunning();
57
+ if (isRunning)
58
+ return;
59
+ intervalRef.current = window.setInterval(function () {
60
+ countRef.current++;
61
+ savedCallback(countRef.current);
62
+ }, delay);
63
+ }, [delay, getRunning, savedCallback]);
64
+ react_1.useEffect(function () {
65
+ if (startImmediately) {
66
+ play();
67
+ }
68
+ return function () { return cancel(); };
69
+ }, [cancel, play, startImmediately]);
70
+ return {
71
+ /**
72
+ * cancel current interval
73
+ */
74
+ cancel: cancel,
75
+ /**
76
+ * pause current interval
77
+ */
78
+ pause: pause,
79
+ /**
80
+ * play current interval
81
+ */
82
+ play: play,
83
+ /**
84
+ * return current interval running state
85
+ */
86
+ getRunning: getRunning,
87
+ };
88
+ };
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
- var react_1 = tslib_1.__importStar(require("react"));
5
4
  var core_1 = require("@material-ui/core");
5
+ var react_1 = tslib_1.__importStar(require("react"));
6
6
  var DefaultFileD_1 = tslib_1.__importDefault(require("./DefaultFileD"));
7
7
  var DefaultFile = react_1.memo(react_1.forwardRef(function (inProps, svgRef) {
8
8
  var theme = core_1.useTheme();
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
- var react_1 = tslib_1.__importStar(require("react"));
5
4
  var core_1 = require("@material-ui/core");
5
+ var react_1 = tslib_1.__importStar(require("react"));
6
6
  var DefaultGdriveD_1 = tslib_1.__importDefault(require("./DefaultGdriveD"));
7
7
  var DefaultGdrive = react_1.memo(react_1.forwardRef(function (inProps, svgRef) {
8
8
  var theme = core_1.useTheme();
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
- var react_1 = tslib_1.__importStar(require("react"));
5
4
  var core_1 = require("@material-ui/core");
5
+ var react_1 = tslib_1.__importStar(require("react"));
6
6
  var DefaultMusicD_1 = tslib_1.__importDefault(require("./DefaultMusicD"));
7
7
  var DefaultMusic = react_1.memo(react_1.forwardRef(function (inProps, svgRef) {
8
8
  var theme = core_1.useTheme();
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
- var react_1 = tslib_1.__importStar(require("react"));
5
4
  var core_1 = require("@material-ui/core");
5
+ var react_1 = tslib_1.__importStar(require("react"));
6
6
  var DefaultVideoD_1 = tslib_1.__importDefault(require("./DefaultVideoD"));
7
7
  var DefaultVideo = react_1.memo(react_1.forwardRef(function (inProps, svgRef) {
8
8
  var theme = core_1.useTheme();
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
- var react_1 = tslib_1.__importStar(require("react"));
5
4
  var core_1 = require("@material-ui/core");
5
+ var react_1 = tslib_1.__importStar(require("react"));
6
6
  var DeletedFileD_1 = tslib_1.__importDefault(require("./DeletedFileD"));
7
7
  var DeletedFile = react_1.memo(react_1.forwardRef(function (inProps, svgRef) {
8
8
  var theme = core_1.useTheme();
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Description: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<React.SVGProps<SVGSVGElement>, "string" | "key" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "className" | "color" | "height" | "id" | "lang" | "max" | "media" | "method" | "min" | "name" | "style" | "target" | "type" | "width" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPath" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filter" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "mask" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "path" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<SVGSVGElement>>>;
3
+ export default Description;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var react_1 = tslib_1.__importStar(require("react"));
5
+ var Description = react_1.memo(react_1.forwardRef(function (props, svgRef) { return (react_1.default.createElement("svg", tslib_1.__assign({ viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ref: svgRef }, props),
6
+ react_1.default.createElement("path", { d: "M19.25 24c.414 0 .75.448.75 1s-.336 1-.75 1H2.75c-.414 0-.75-.448-.75-1s.336-1 .75-1h16.5zm9.583-9c.644 0 1.167.448 1.167 1s-.522 1-1.167 1H3.166c-.644 0-1.167-.448-1.167-1s.522-1 1.167-1h25.667zm0-9C29.477 6 30 6.448 30 7s-.522 1-1.167 1H3.166c-.644 0-1.167-.448-1.167-1s.522-1 1.167-1h25.667z" }))); }));
7
+ Description.displayName = 'Description';
8
+ Description['iconName'] = 'Description';
9
+ exports.default = Description;
package/icon/Doc.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
- var react_1 = tslib_1.__importStar(require("react"));
5
4
  var core_1 = require("@material-ui/core");
5
+ var react_1 = tslib_1.__importStar(require("react"));
6
6
  var DocD_1 = tslib_1.__importDefault(require("./DocD"));
7
7
  var Doc = react_1.memo(react_1.forwardRef(function (inProps, svgRef) {
8
8
  var theme = core_1.useTheme();
package/icon/Excel.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
- var react_1 = tslib_1.__importStar(require("react"));
5
4
  var core_1 = require("@material-ui/core");
5
+ var react_1 = tslib_1.__importStar(require("react"));
6
6
  var ExcelD_1 = tslib_1.__importDefault(require("./ExcelD"));
7
7
  var Excel = react_1.memo(react_1.forwardRef(function (inProps, svgRef) {
8
8
  var theme = core_1.useTheme();
package/icon/GifFile.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
- var react_1 = tslib_1.__importStar(require("react"));
5
4
  var core_1 = require("@material-ui/core");
5
+ var react_1 = tslib_1.__importStar(require("react"));
6
6
  var GifFileD_1 = tslib_1.__importDefault(require("./GifFileD"));
7
7
  var GifFile = react_1.memo(react_1.forwardRef(function (inProps, svgRef) {
8
8
  var theme = core_1.useTheme();