dash-core-components 4.0.0-rc1 → 4.0.0-rc2

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 (55) hide show
  1. package/dash_core_components/async-dropdown.js +1 -1
  2. package/dash_core_components/async-dropdown.js.map +1 -1
  3. package/dash_core_components/async-slider.js +1 -1
  4. package/dash_core_components/async-slider.js.map +1 -1
  5. package/dash_core_components/dash_core_components.js +1 -1
  6. package/dash_core_components/dash_core_components.js.map +1 -1
  7. package/dash_core_components/proptypes.js +102 -3
  8. package/lib/components/Checklist.tsx +67 -0
  9. package/lib/components/Dropdown.tsx +19 -3
  10. package/lib/components/Loading.tsx +185 -0
  11. package/lib/components/RadioItems.tsx +69 -0
  12. package/lib/components/RangeSlider.tsx +5 -1
  13. package/lib/components/Slider.tsx +12 -1
  14. package/lib/components/Tab.react.js.old +79 -0
  15. package/lib/components/Textarea.tsx +79 -0
  16. package/lib/components/Tooltip.tsx +66 -0
  17. package/lib/components/css/checklist.css +4 -0
  18. package/lib/components/css/dcc.css +2 -0
  19. package/lib/components/css/dropdown.css +30 -49
  20. package/lib/components/css/input.css +22 -6
  21. package/lib/components/css/optionslist.css +34 -0
  22. package/lib/components/css/radioitems.css +4 -0
  23. package/lib/components/css/sliders.css +11 -7
  24. package/lib/components/css/textarea.css +21 -0
  25. package/lib/components/css/tooltip.css +127 -0
  26. package/lib/fragments/Dropdown.tsx +205 -269
  27. package/lib/fragments/Loading/spinners/CircleSpinner.tsx +185 -0
  28. package/lib/fragments/Loading/spinners/CubeSpinner.tsx +193 -0
  29. package/lib/fragments/Loading/spinners/DebugTitle.tsx +11 -0
  30. package/lib/fragments/Loading/spinners/DefaultSpinner.tsx +110 -0
  31. package/lib/fragments/Loading/spinners/DotSpinner.tsx +96 -0
  32. package/lib/fragments/Loading/spinners/GraphSpinner.tsx +332 -0
  33. package/lib/fragments/Loading/types.ts +13 -0
  34. package/lib/fragments/RangeSlider.tsx +193 -63
  35. package/lib/index.ts +5 -5
  36. package/lib/types.ts +455 -116
  37. package/lib/utils/dropdownSearch.ts +4 -4
  38. package/lib/utils/optionRendering.tsx +168 -0
  39. package/lib/utils/optionTypes.ts +5 -5
  40. package/lib/utils/sliderRendering.tsx +23 -4
  41. package/package.json +1 -2
  42. package/lib/components/Checklist.react.js +0 -193
  43. package/lib/components/Input.react.js.old +0 -507
  44. package/lib/components/Loading.react.js +0 -254
  45. package/lib/components/RadioItems.react.js +0 -192
  46. package/lib/components/Slider.react.js.old +0 -214
  47. package/lib/components/Textarea.react.js +0 -223
  48. package/lib/components/Tooltip.react.js +0 -120
  49. package/lib/components/css/Dropdown.css +0 -8
  50. package/lib/fragments/Loading/spinners/CircleSpinner.js +0 -68
  51. package/lib/fragments/Loading/spinners/CubeSpinner.js +0 -57
  52. package/lib/fragments/Loading/spinners/DebugTitle.js +0 -15
  53. package/lib/fragments/Loading/spinners/DefaultSpinner.js +0 -54
  54. package/lib/fragments/Loading/spinners/DotSpinner.js +0 -50
  55. package/lib/fragments/Loading/spinners/GraphSpinner.js +0 -68
@@ -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
+ }