dash-core-components 4.0.0-rc1 → 4.0.0-rc3

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 (103) hide show
  1. package/dash_core_components/async-datepicker.js +1 -1
  2. package/dash_core_components/async-datepicker.js.map +1 -1
  3. package/dash_core_components/async-dropdown.js +1 -2
  4. package/dash_core_components/async-dropdown.js.map +1 -1
  5. package/dash_core_components/async-graph.js +1 -1
  6. package/dash_core_components/async-graph.js.map +1 -1
  7. package/dash_core_components/async-highlight.js +1 -1
  8. package/dash_core_components/async-highlight.js.map +1 -1
  9. package/dash_core_components/async-markdown.js +1 -1
  10. package/dash_core_components/async-markdown.js.map +1 -1
  11. package/dash_core_components/async-mathjax.js +1 -1
  12. package/dash_core_components/async-slider.js +1 -1
  13. package/dash_core_components/async-slider.js.map +1 -1
  14. package/dash_core_components/async-upload.js +1 -1
  15. package/dash_core_components/async-upload.js.map +1 -1
  16. package/dash_core_components/dash_core_components-shared.js +1 -1
  17. package/dash_core_components/dash_core_components-shared.js.map +1 -1
  18. package/dash_core_components/dash_core_components.js +1 -1
  19. package/dash_core_components/dash_core_components.js.map +1 -1
  20. package/dash_core_components/proptypes.js +209 -6
  21. package/lib/components/Checklist.tsx +67 -0
  22. package/lib/components/Clipboard.react.js +1 -1
  23. package/lib/components/DatePickerRange.tsx +70 -0
  24. package/lib/components/DatePickerSingle.tsx +72 -0
  25. package/lib/components/Dropdown.tsx +19 -3
  26. package/lib/components/Input.tsx +1 -1
  27. package/lib/components/Loading.tsx +185 -0
  28. package/lib/components/RadioItems.tsx +69 -0
  29. package/lib/components/RangeSlider.tsx +5 -1
  30. package/lib/components/Slider.tsx +12 -1
  31. package/lib/components/Tab.tsx +19 -0
  32. package/lib/components/Tabs.tsx +311 -0
  33. package/lib/components/Textarea.tsx +79 -0
  34. package/lib/components/Tooltip.tsx +66 -0
  35. package/lib/components/css/calendar.css +66 -0
  36. package/lib/components/css/checklist.css +4 -0
  37. package/lib/components/css/datepickers.css +233 -0
  38. package/lib/components/css/dcc.css +3 -0
  39. package/lib/components/css/dropdown.css +34 -50
  40. package/lib/components/css/input.css +29 -7
  41. package/lib/components/css/optionslist.css +34 -0
  42. package/lib/components/css/radioitems.css +4 -0
  43. package/lib/components/css/sliders.css +33 -7
  44. package/lib/components/css/tabs.css +113 -0
  45. package/lib/components/css/textarea.css +21 -0
  46. package/lib/components/css/tooltip.css +127 -0
  47. package/lib/fragments/DatePickerRange.tsx +444 -0
  48. package/lib/fragments/DatePickerSingle.tsx +249 -0
  49. package/lib/fragments/Dropdown.tsx +212 -272
  50. package/lib/fragments/Graph.react.js +18 -45
  51. package/lib/fragments/Loading/spinners/CircleSpinner.tsx +185 -0
  52. package/lib/fragments/Loading/spinners/CubeSpinner.tsx +193 -0
  53. package/lib/fragments/Loading/spinners/DebugTitle.tsx +11 -0
  54. package/lib/fragments/Loading/spinners/DefaultSpinner.tsx +110 -0
  55. package/lib/fragments/Loading/spinners/DotSpinner.tsx +96 -0
  56. package/lib/fragments/Loading/spinners/GraphSpinner.tsx +332 -0
  57. package/lib/fragments/Loading/types.ts +13 -0
  58. package/lib/fragments/RangeSlider.tsx +195 -63
  59. package/lib/index.ts +9 -11
  60. package/lib/types.ts +797 -132
  61. package/lib/utils/DatePickerPersistence.ts +14 -0
  62. package/lib/utils/LazyLoader/datePickerRange.ts +4 -0
  63. package/lib/utils/LazyLoader/datePickerSingle.ts +4 -0
  64. package/lib/utils/calendar/Calendar.tsx +382 -0
  65. package/lib/utils/calendar/CalendarDay.tsx +75 -0
  66. package/lib/utils/calendar/CalendarDayPadding.tsx +15 -0
  67. package/lib/utils/calendar/CalendarMonth.tsx +247 -0
  68. package/lib/utils/calendar/CalendarMonthHeader.tsx +23 -0
  69. package/lib/utils/calendar/createMonthGrid.ts +28 -0
  70. package/lib/utils/calendar/helpers.ts +272 -0
  71. package/lib/utils/computeSliderMarkers.ts +71 -116
  72. package/lib/utils/dropdownSearch.ts +4 -4
  73. package/lib/utils/optionRendering.tsx +175 -0
  74. package/lib/utils/optionTypes.ts +5 -5
  75. package/lib/utils/sliderRendering.tsx +63 -6
  76. package/package.json +16 -14
  77. package/lib/components/Checklist.react.js +0 -193
  78. package/lib/components/DatePickerRange.react.js +0 -244
  79. package/lib/components/DatePickerSingle.react.js +0 -209
  80. package/lib/components/Dropdown.react.js.old +0 -228
  81. package/lib/components/Input.react.js.old +0 -507
  82. package/lib/components/Loading.react.js +0 -254
  83. package/lib/components/RadioItems.react.js +0 -192
  84. package/lib/components/Slider.react.js.old +0 -214
  85. package/lib/components/Tab.react.js +0 -80
  86. package/lib/components/Tabs.react.js +0 -295
  87. package/lib/components/Textarea.react.js +0 -223
  88. package/lib/components/Textarea.react.js.old +0 -287
  89. package/lib/components/Tooltip.react.js +0 -120
  90. package/lib/components/css/Dropdown.css +0 -8
  91. package/lib/fragments/DatePickerRange.react.js +0 -188
  92. package/lib/fragments/DatePickerSingle.react.js +0 -132
  93. package/lib/fragments/Loading/spinners/CircleSpinner.js +0 -68
  94. package/lib/fragments/Loading/spinners/CubeSpinner.js +0 -57
  95. package/lib/fragments/Loading/spinners/DebugTitle.js +0 -15
  96. package/lib/fragments/Loading/spinners/DefaultSpinner.js +0 -54
  97. package/lib/fragments/Loading/spinners/DotSpinner.js +0 -50
  98. package/lib/fragments/Loading/spinners/GraphSpinner.js +0 -68
  99. package/lib/utils/DatePickerPersistence.js +0 -18
  100. package/lib/utils/LazyLoader/datePickerRange.js +0 -8
  101. package/lib/utils/LazyLoader/datePickerSingle.js +0 -8
  102. package/lib/utils/convertToMoment.js +0 -30
  103. package/lib/utils/optionTypes.js +0 -39
@@ -0,0 +1,332 @@
1
+ import React from 'react';
2
+ import DebugTitle from './DebugTitle';
3
+ import {SpinnerProps} from '../types';
4
+
5
+ const GraphSpinner = ({
6
+ status,
7
+ fullscreen,
8
+ debug,
9
+ className,
10
+ style,
11
+ }: SpinnerProps) => {
12
+ let debugTitle;
13
+ if (debug && status) {
14
+ debugTitle = status.map((s, i) => <DebugTitle key={i} {...s} />);
15
+ }
16
+ let spinnerClass = fullscreen ? 'dash-spinner-container' : '';
17
+ if (className) {
18
+ spinnerClass += ` ${className}`;
19
+ }
20
+ return (
21
+ <div style={style ? style : {}} className={spinnerClass}>
22
+ <div>
23
+ {debugTitle}
24
+ <div className="dash-spinner dash-graph-spinner">
25
+ <div className="dash-graph-spinner__bottom">
26
+ <div className="dash-bar dash-bar__one" />
27
+ <div className="dash-bar dash-bar__two" />
28
+ <div className="dash-bar dash-bar__three" />
29
+ </div>
30
+ <div className="dash-graph-spinner__background">
31
+ <div className="dash-dot dash-dot__one" />
32
+ <div className="dash-dot dash-dot__two" />
33
+ <div className="dash-dot dash-dot__three" />
34
+ <div className="dash-dot dash-dot__four" />
35
+ <div className="dash-graph-spinner__bottom">
36
+ <div className="dash-vert dash-vert__one" />
37
+ <div className="dash-vert dash-vert__two" />
38
+ <div className="dash-vert dash-vert__three" />
39
+ <div className="dash-vert dash-vert__four" />
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ <style>
45
+ {`
46
+ .dash-spinner-container {
47
+ position: fixed;
48
+ width: 100vw;
49
+ height: 100vh;
50
+ top: 0;
51
+ left: 0;
52
+ background-color: white;
53
+ z-index: 99;
54
+ display: flex;
55
+ justify-content: center;
56
+ align-items: center;
57
+ }
58
+ .dash-loading-title {
59
+ text-align: center;
60
+ }
61
+ .dash-graph-spinner {
62
+ display: flex;
63
+ margin: 0 auto;
64
+ width: 200px;
65
+ height: 128px;
66
+ position: relative;
67
+ z-index: -2;
68
+ border-radius: 4px;
69
+ }
70
+ .dash-graph-spinner__bottom {
71
+ display: flex;
72
+ margin-top: auto;
73
+ flex-direction: column;
74
+ height: 12px;
75
+ width: 100%;
76
+ }
77
+ .dash-graph-spinner__background {
78
+ width: 100%;
79
+ height: 100%;
80
+ display: block;
81
+ position: absolute;
82
+ z-index: -1;
83
+ display: flex;
84
+ }
85
+ .dash-bar {
86
+ height: 40px;
87
+ background-color: #119DFF;
88
+ animation: bar-one 2s infinite;
89
+ transform-origin: 0% 0%;
90
+ display: inline-flex;
91
+ border-radius: 8px;
92
+ }
93
+ .dash-bar__one {
94
+ transform: rotate(-45deg);
95
+ bottom: -10px;
96
+ left: 16px;
97
+ position: relative;
98
+ }
99
+ .dash-bar__two {
100
+ transform: rotate(25deg);
101
+ animation: bar-two 2s infinite;
102
+ left: 72px;
103
+ bottom: 48px;
104
+ position: relative;
105
+ animation-delay: 2s infinite;
106
+ }
107
+ .dash-bar__three {
108
+ transform: rotate(-30deg);
109
+ animation: bar-three 2s infinite;
110
+ left: 114px;
111
+ bottom: 27px;
112
+ position: relative;
113
+ animation-delay: 2s infinite;
114
+ }
115
+ .dash-vert {
116
+ display: inline-block;
117
+ transform-origin: 0% 0%;
118
+ position: absolute;
119
+ bottom: 0px;
120
+ width: 40px;
121
+ }
122
+ .dash-vert__one {
123
+ animation: vert-one 2s infinite;
124
+ background-color: #e763fa;
125
+ }
126
+ .dash-vert__two {
127
+ animation: vert-two 2s infinite;
128
+ left: 50px;
129
+ background-color: #636efa;
130
+ }
131
+ .dash-vert__three {
132
+ animation: vert-three 2s infinite;
133
+ left: 100px;
134
+ background-color: #00cc96;
135
+ }
136
+ .dash-vert__four {
137
+ animation: vert-four 2s infinite;
138
+ left: 150px;
139
+ background-color: #EF553B;
140
+ }
141
+ .dash-dot {
142
+ width: 10px;
143
+ height: 10px;
144
+ border-radius: 100%;
145
+ display: block;
146
+ background-color: #119DFF;
147
+ position: absolute;
148
+ z-index: 2;
149
+ }
150
+ .dash-dot__one {
151
+ bottom: 0px;
152
+ left: 16px;
153
+ animation: dot-one 2s infinite;
154
+ }
155
+ .dash-dot__two {
156
+ bottom: 48px;
157
+ left: 66px;
158
+ animation: dot-two 2s infinite;
159
+ }
160
+ .dash-dot__three {
161
+ bottom: 27px;
162
+ left: 114px;
163
+ animation: dot-three 2s infinite;
164
+ }
165
+ .dash-dot__four {
166
+ bottom: 56px;
167
+ left: 166px;
168
+ animation: dot-four 2s infinite;
169
+ }
170
+ @keyframes dot-one {
171
+ 0%{
172
+ opacity: 0;
173
+ }
174
+ 30% {
175
+ opacity: 1;
176
+ }
177
+ 100% {
178
+ opacity: 1;
179
+ }
180
+ }
181
+ @keyframes dot-two {
182
+ 0%{
183
+ opacity: 0;
184
+ }
185
+ 30% {
186
+ opacity: 1;
187
+ }
188
+ 60% {
189
+ opacity: 1;
190
+ }
191
+ 100% {
192
+ opacity: 1;
193
+ }
194
+ }
195
+ @keyframes dot-three {
196
+ 0%{
197
+ opacity: 0;
198
+ }
199
+ 30% {
200
+ opacity: 0;
201
+ }
202
+ 60% {
203
+ opacity: 1;
204
+ }
205
+ 100% {
206
+ opacity: 1;
207
+ }
208
+ }
209
+ @keyframes dot-four {
210
+ 0%{
211
+ opacity: 0;
212
+ }
213
+ 30% {
214
+ opacity: 0;
215
+ }
216
+ 60% {
217
+ opacity: 0;
218
+ }
219
+ 100% {
220
+ opacity: 1;
221
+ }
222
+ }
223
+ @keyframes vert-one {
224
+ 0% {
225
+ height: 0px;
226
+ }
227
+ 100% {
228
+ height: 80px;
229
+ }
230
+ }
231
+ @keyframes vert-two {
232
+ 0% {
233
+ height: 0px;
234
+ }
235
+ 30% {
236
+ height: 0px;
237
+ }
238
+ 100% {
239
+ height: 120px;
240
+ }
241
+ }
242
+ @keyframes vert-three {
243
+ 0% {
244
+ height: 0px;
245
+ }
246
+ 30% {
247
+ height: 0px;
248
+ }
249
+ 50% {
250
+ height: 0px;
251
+ }
252
+ 100% {
253
+ height: 100px;
254
+ }
255
+ }
256
+ @keyframes vert-four {
257
+ 0% {
258
+ height: 0px;
259
+ }
260
+ 30% {
261
+ height: 0px;
262
+ }
263
+ 50% {
264
+ height: 0px;
265
+ }
266
+ 60% {
267
+ height: 0px;
268
+ }
269
+ 100% {
270
+ height: 60px;
271
+ }
272
+ }
273
+ @keyframes bar-one {
274
+ 0% {
275
+ width: 0%;
276
+ }
277
+ 30% {
278
+ width: 40%;
279
+ }
280
+ 60% {
281
+ width: 40%;
282
+ }
283
+ 100% {
284
+ width: 40%;
285
+ }
286
+ }
287
+ @keyframes bar-two {
288
+ 0% {
289
+ width: 0%;
290
+ }
291
+ 30% {
292
+ width: 0%;
293
+ }
294
+ 60% {
295
+ width: 28%;
296
+ }
297
+ 100% {
298
+ width: 28%;
299
+ }
300
+ }
301
+ @keyframes bar-three {
302
+ 0% {
303
+ width: 0%;
304
+ }
305
+ 30% {
306
+ width: 0%;
307
+ }
308
+ 60% {
309
+ width: 0%;
310
+ }
311
+ 100% {
312
+ width: 33%;
313
+ }
314
+ }
315
+ @keyframes dash-title {
316
+ 0% {
317
+ opacity: 0.1;
318
+ }
319
+ 50% {
320
+ opacity: 1;
321
+ }
322
+ 100% {
323
+ opacity: 0.1;
324
+ }
325
+ }
326
+ `}
327
+ </style>
328
+ </div>
329
+ );
330
+ };
331
+
332
+ export default GraphSpinner;
@@ -0,0 +1,13 @@
1
+ export interface DebugTitleProps {
2
+ id: string;
3
+ property: string;
4
+ }
5
+
6
+ export interface SpinnerProps {
7
+ status: DebugTitleProps[] | null;
8
+ color?: string;
9
+ className?: string;
10
+ fullscreen?: boolean;
11
+ style?: React.CSSProperties;
12
+ debug?: boolean;
13
+ }