dce-reactkit 3.0.0-beta.31 → 3.0.0-beta.34
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.
- package/README.md +1 -546
- package/dist/cjs/index.js +35 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/RadioButton.d.ts +20 -0
- package/dist/cjs/types/index.d.ts +2 -1
- package/dist/esm/index.js +36 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/RadioButton.d.ts +20 -0
- package/dist/esm/types/index.d.ts +2 -1
- package/dist/index.d.ts +28 -9
- package/package.json +2 -1
- package/src/components/AppWrapper.tsx +4 -1
- package/src/components/Modal.tsx +1 -0
- package/src/components/RadioButton.tsx +102 -0
- package/src/index.ts +2 -0
package/README.md
CHANGED
|
@@ -12,550 +12,5 @@ npm install dce-reactkit --save
|
|
|
12
12
|
2. Import `dce-reactkit` components into your React component:
|
|
13
13
|
|
|
14
14
|
```js
|
|
15
|
-
import
|
|
15
|
+
import { LoadingSpinner } from 'dce-reactkit';
|
|
16
16
|
```
|
|
17
|
-
|
|
18
|
-
See the full list of components below:
|
|
19
|
-
|
|
20
|
-
# Components by Type
|
|
21
|
-
|
|
22
|
-
- [Charts and Graphs](#charts-and-graphs)
|
|
23
|
-
- [Data and Utilities](#data-and-utilities)
|
|
24
|
-
- [Glyphs](#glyphs)
|
|
25
|
-
|
|
26
|
-
## Charts and Graphs
|
|
27
|
-
|
|
28
|
-
- [Bar](#bar)
|
|
29
|
-
- [Donut](#donut)
|
|
30
|
-
- [Histogram](#histogram)
|
|
31
|
-
- [Scatter](#scatter)
|
|
32
|
-
|
|
33
|
-
### Bar
|
|
34
|
-
|
|
35
|
-
```js
|
|
36
|
-
import Bar from 'dce-reactkit/Bar'
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Customize this component by setting its properties:
|
|
40
|
-
|
|
41
|
-
Property Name | Type | Description | Required/Default Value
|
|
42
|
-
:--- | :--- | :--- | :--
|
|
43
|
-
title | string | the title of the chart | `null`
|
|
44
|
-
data | bars[] | the bar data to show: array of `{ name [string or number], value [number], color [string, overrides default color]}` where color is optional | **required**
|
|
45
|
-
color | string | the default css color for the bars (e.g. '#123456' or 'white') | blue
|
|
46
|
-
width | string or number | the css width of the chart (e.g. '100%' or 50) | `100%`
|
|
47
|
-
height | string or number | the css height of the chart (e.g. '100%' or 50) | `500px`
|
|
48
|
-
nameLabel | string | the label for the name axis (the axis that displays the names of the bars) | `Name`
|
|
49
|
-
nameUnit | string | the unit for the name axis (the axis that displays the names of the bars) | `null`
|
|
50
|
-
valueLabel | string | the label for the value axis (the axis along which the bars lie) | `Value`
|
|
51
|
-
valueUnit | string | the unit for the value axis (the axis along which the bars lie) | `null`
|
|
52
|
-
horizontal | boolean | if true, the bar chart is a horizontal bar chart (bars lie horizontally) | `false`
|
|
53
|
-
noTooltipOnHover | boolean | if true, no tooltip is displayed when the user mouses over the chart | `false`
|
|
54
|
-
showLegend | boolean | if true, legend is included | `false`
|
|
55
|
-
noDownload | boolean | if true, no download button is shown | `false`
|
|
56
|
-
csvContents | string | the contents of the csv file to download (we auto-generate a csv from the data if this is excluded) | `auto-generated csv`
|
|
57
|
-
|
|
58
|
-
### Donut
|
|
59
|
-
|
|
60
|
-
```js
|
|
61
|
-
import Donut from 'dce-reactkit/Donut'
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Customize this component by setting its properties:
|
|
65
|
-
|
|
66
|
-
Property Name | Type | Description | Required/Default Value
|
|
67
|
-
:--- | :--- | :--- | :--
|
|
68
|
-
title | string | the title of the chart | `null`
|
|
69
|
-
data | slice[] | an array of slices to place in the donut of the form. An array of: `{name [string or number], value [number], color [string, overrides default color]}` where color is optional | **required**
|
|
70
|
-
color | string | the default css color for the slices (e.g. '#123456' or 'white') or use 'assortment' for random colors | `assortment`
|
|
71
|
-
width | string or number | the css width of the chart (e.g. '100%' or 50) | `100%`
|
|
72
|
-
height | string or number | the css height of the chart (e.g. '100%' or 50) | `500px`
|
|
73
|
-
noTooltipOnHover | boolean | if true, no tooltip is displayed when the user mouses over the chart | `false`
|
|
74
|
-
showLegend | boolean | if true, legend is included | `false`
|
|
75
|
-
noDownload | boolean | if true, no download button is shown | `false`
|
|
76
|
-
|
|
77
|
-
### Histogram
|
|
78
|
-
|
|
79
|
-
```js
|
|
80
|
-
import Histogram from 'dce-reactkit/Histogram'
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Customize this component by setting its properties:
|
|
84
|
-
|
|
85
|
-
Property Name | Type | Description | Required/Default Value
|
|
86
|
-
:--- | :--- | :--- | :--
|
|
87
|
-
title | string | the title of the chart | `null`
|
|
88
|
-
data | number[] | an array of numbers to chart in the histogram (they are sorted and put into buckets) | **required**
|
|
89
|
-
color | string | the default css color for the bars (e.g. '#123456' or 'white') | blue
|
|
90
|
-
width | string or number | the css width of the chart (e.g. '100%' or 50) | `100%`
|
|
91
|
-
height | string or number | the css height of the chart (e.g. '100%' or 50) | `500px`
|
|
92
|
-
startValue | number | the lowest value to start at (beginning of the first bucket) | `0`
|
|
93
|
-
endValue | number | the highest valueto count (ending of the last bucket) | `null (infinity)`
|
|
94
|
-
numBuckets | number | the number of buckets to divide the data into | 10
|
|
95
|
-
numDecimals | number | the number of decimals to display on the bucket axis. We recommend keeping this low for better formatting | `1`
|
|
96
|
-
bucketLabel | string | the label for the bucket axis | `Bucket`
|
|
97
|
-
bucketUnit | string | the unit for the bucket axis | `null`
|
|
98
|
-
valueLabel | string | the label for the value axis | `Num in Bucket`
|
|
99
|
-
valueUnit | string | the unit for the value axis | `null`
|
|
100
|
-
noTooltipOnHover | boolean | if true, no tooltip is displayed when the user mouses over the chart | `false`
|
|
101
|
-
showLegend | boolean | if true, legend is included | `false`
|
|
102
|
-
noDownload | boolean | if true, no download button is shown | `false`
|
|
103
|
-
|
|
104
|
-
### Scatter
|
|
105
|
-
|
|
106
|
-
```js
|
|
107
|
-
import Scatter from 'dce-reactkit/Scatter'
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Customize this component by setting its properties:
|
|
111
|
-
|
|
112
|
-
Property Name | Type | Description | Required/Default Value
|
|
113
|
-
:--- | :--- | :--- | :--
|
|
114
|
-
title | string | the title of the chart | `null`
|
|
115
|
-
data | point[] | an array of points to plot. Array of: `{x [number], y [number]}` | **required**
|
|
116
|
-
color | string | the default css color for the points (e.g. '#123456' or 'white') | blue
|
|
117
|
-
width | string or number | the css width of the chart (e.g. '100%' or 50) | `100%`
|
|
118
|
-
height | string or number | the css height of the chart (e.g. '100%' or 50) | `500px`
|
|
119
|
-
xLabel | string | label for the x axis | `x-axis`
|
|
120
|
-
xUnit | string | unit for the x axis | `null`
|
|
121
|
-
yLabel | string | label for the y axis | `y-axis`
|
|
122
|
-
yUnit | string | unit for the y axis | `null`
|
|
123
|
-
seriesName | string | the name of the series (included and required for the legend if `showLegend` is true) | `Chart`
|
|
124
|
-
noTooltipOnHover | boolean | if true, no tooltip is displayed when the user mouses over the chart | `false`
|
|
125
|
-
showLegend | boolean | if true, legend is included | `false`
|
|
126
|
-
noDownload | boolean | if true, no download button is shown | `false`
|
|
127
|
-
|
|
128
|
-
## Data and Utilities
|
|
129
|
-
|
|
130
|
-
- [DownloadButton](#downloadbutton)
|
|
131
|
-
|
|
132
|
-
### DownloadButton
|
|
133
|
-
|
|
134
|
-
```js
|
|
135
|
-
import DownloadButton from 'dce-reactkit/DownloadButton';
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Customize this component by setting its properties:
|
|
139
|
-
|
|
140
|
-
Property Name | Type | Description | Required/Default Value
|
|
141
|
-
:--- | :--- | :--- | :--
|
|
142
|
-
text | string | text of the download button | `Download`
|
|
143
|
-
filename | string | the name of the file once it's downloaded | **required**
|
|
144
|
-
contents | string | the contents of the file to download | **required**
|
|
145
|
-
large | boolean | if true, button is a bootstrap button | `false`
|
|
146
|
-
marginLeft | number | the left margin of the button | `null`
|
|
147
|
-
marginRight | number | the right margin of the button | `null`
|
|
148
|
-
marginTop | number | the top margin of the button | `null`
|
|
149
|
-
marginBottom | number | the bottom margin of the button | `null`
|
|
150
|
-
|
|
151
|
-
## Glyphs
|
|
152
|
-
|
|
153
|
-
To import glyphs, use the `glyph` subfolder:
|
|
154
|
-
|
|
155
|
-
```js
|
|
156
|
-
// Example:
|
|
157
|
-
import Arrow from 'dce-reactkit/glyph/Arrow';
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Full list of glyphs:
|
|
161
|
-
|
|
162
|
-
- [Adjust](#adjust)
|
|
163
|
-
- [Angle](#angle)
|
|
164
|
-
- [Archive](#archive)
|
|
165
|
-
- [Arrow](#arrow)
|
|
166
|
-
- [ArrowsHorizontal](#arrowshorizontal)
|
|
167
|
-
- [ArrowsVertical](#arrowsvertical)
|
|
168
|
-
- [Award](#award)
|
|
169
|
-
- [Ban](#ban)
|
|
170
|
-
- [Barcode](#barcode)
|
|
171
|
-
- [Bed](#bed)
|
|
172
|
-
- [Bell](#bell)
|
|
173
|
-
- [Bolt](#bolt)
|
|
174
|
-
- [Bookmark](#bookmark)
|
|
175
|
-
- [Bug](#bug)
|
|
176
|
-
- [Calendar](#calendar)
|
|
177
|
-
- [Check](#check)
|
|
178
|
-
- [Checkbox](#checkbox)
|
|
179
|
-
- [Chevron](#chevron)
|
|
180
|
-
- [Circle](#circle)
|
|
181
|
-
- [Cog](#cog)
|
|
182
|
-
- [DoubleAngle](#doubleangle)
|
|
183
|
-
- [Download](#download)
|
|
184
|
-
- [Ellipsis](#ellipsis)
|
|
185
|
-
- [Envelope](#envelope)
|
|
186
|
-
- [File](#file)
|
|
187
|
-
- [IdCard](#idcard)
|
|
188
|
-
- [Menu](#menu)
|
|
189
|
-
- [Minus](#minus)
|
|
190
|
-
- [Move](#move)
|
|
191
|
-
- [Plus](#plus)
|
|
192
|
-
- [Square](#square)
|
|
193
|
-
- [Teacher](#teacher)
|
|
194
|
-
- [TextAlign](#textalign)
|
|
195
|
-
- [Times](#times)
|
|
196
|
-
- [WarningTriangle](#warningtriangle)
|
|
197
|
-
|
|
198
|
-
### Adjust
|
|
199
|
-
|
|
200
|
-
This component looks like Font Awesome's adjust solid icon.
|
|
201
|
-
|
|
202
|
-
```js
|
|
203
|
-
import Adjust from 'dce-reactkit/glyph/Adjust';
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
### Angle
|
|
207
|
-
|
|
208
|
-
This component looks like Font Awesome's angle-up/down/right/left solid icon depending on its properties.
|
|
209
|
-
|
|
210
|
-
```js
|
|
211
|
-
import Angle from 'dce-reactkit/glyph/Angle';
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
Customize this component by setting its properties:
|
|
215
|
-
|
|
216
|
-
Property Name | Type | Description | Required/Default Value
|
|
217
|
-
:--- | :--- | :--- | :--
|
|
218
|
-
direction | string | the direction of the angle. Choose from `['up', 'down', 'left', 'right']` | `right`
|
|
219
|
-
|
|
220
|
-
### Archive
|
|
221
|
-
|
|
222
|
-
This component looks like Font Awesome's archive solid icon.
|
|
223
|
-
|
|
224
|
-
```js
|
|
225
|
-
import Archive from 'dce-reactkit/glyph/Archive';
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
### Arrow
|
|
229
|
-
|
|
230
|
-
This component looks like Font Awesome's arrow-up/down/right/left or arrow-circle/up/down/right/left solid icon depending on its properties.
|
|
231
|
-
|
|
232
|
-
```js
|
|
233
|
-
import Arrow from 'dce-reactkit/glyph/Arrow';
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
Customize this component by setting its properties:
|
|
237
|
-
|
|
238
|
-
Property Name | Type | Description | Required/Default Value
|
|
239
|
-
:--- | :--- | :--- | :--
|
|
240
|
-
circled | boolean | if true, the arrow appears inside of a solid circle. | `false`
|
|
241
|
-
direction | string | the direction of the arrow. Choose from `['up', 'down', 'left', 'right']` | `right`
|
|
242
|
-
|
|
243
|
-
### ArrowsHorizontal
|
|
244
|
-
|
|
245
|
-
This component looks like Font Awesome's arrows-alt-h solid icon.
|
|
246
|
-
|
|
247
|
-
```js
|
|
248
|
-
import ArrowsHorizontal from 'dce-reactkit/glyph/ArrowsHorizontal';
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
### ArrowsVertical
|
|
252
|
-
|
|
253
|
-
This component looks like Font Awesome's arrows-alt-h solid icon.
|
|
254
|
-
|
|
255
|
-
```js
|
|
256
|
-
import ArrowsVertical from 'dce-reactkit/glyph/ArrowsVertical';
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
### Award
|
|
260
|
-
|
|
261
|
-
This component looks like Font Awesome's award solid icon.
|
|
262
|
-
|
|
263
|
-
```js
|
|
264
|
-
import Award from 'dce-reactkit/glyph/Award';
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
### Ban
|
|
268
|
-
|
|
269
|
-
This component looks like Font Awesome's ban solid icon.
|
|
270
|
-
|
|
271
|
-
```js
|
|
272
|
-
import Ban from 'dce-reactkit/glyph/Ban';
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
### Barcode
|
|
276
|
-
|
|
277
|
-
This component looks like Font Awesome's barcode solid icon.
|
|
278
|
-
|
|
279
|
-
```js
|
|
280
|
-
import Barcode from 'dce-reactkit/glyph/Barcode';
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### Bed
|
|
284
|
-
|
|
285
|
-
This component looks like Font Awesome's bed solid icon.
|
|
286
|
-
|
|
287
|
-
```js
|
|
288
|
-
import Bed from 'dce-reactkit/glyph/Bed';
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
### Bell
|
|
292
|
-
|
|
293
|
-
This component looks like Font Awesome's bell or bell-slash icon depending on its properties.
|
|
294
|
-
|
|
295
|
-
```js
|
|
296
|
-
import Bell from 'dce-reactkit/glyph/Bell';
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
Customize this component by setting its properties:
|
|
300
|
-
|
|
301
|
-
Property Name | Type | Description | Required/Default Value
|
|
302
|
-
:--- | :--- | :--- | :--
|
|
303
|
-
slashed | boolean | if true, the bell has a slash through it | `false`
|
|
304
|
-
|
|
305
|
-
### Bolt
|
|
306
|
-
|
|
307
|
-
This component looks like Font Awesome's bolt solid icon.
|
|
308
|
-
|
|
309
|
-
```js
|
|
310
|
-
import Bolt from 'dce-reactkit/glyph/Bolt';
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
### Bookmark
|
|
314
|
-
|
|
315
|
-
This component looks like Font Awesome's bookmark solid or bookmark-outlined regular icon depending on its properties.
|
|
316
|
-
|
|
317
|
-
```js
|
|
318
|
-
import Bookmark from 'dce-reactkit/glyph/Bookmark';
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
Customize this component by setting its properties:
|
|
322
|
-
|
|
323
|
-
Property Name | Type | Description | Required/Default Value
|
|
324
|
-
:--- | :--- | :--- | :--
|
|
325
|
-
outlined | boolean | if true, the bookmark is outlined instead of filled | `false`
|
|
326
|
-
|
|
327
|
-
### Bug
|
|
328
|
-
|
|
329
|
-
This component looks like Font Awesome's bug solid icon.
|
|
330
|
-
|
|
331
|
-
```js
|
|
332
|
-
import Bug from 'dce-reactkit/glyph/Bug';
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
### Calendar
|
|
336
|
-
|
|
337
|
-
This component looks like Font Awesome's calendar solid icon.
|
|
338
|
-
|
|
339
|
-
```js
|
|
340
|
-
import Calendar from 'dce-reactkit/glyph/Calendar';
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
### Check
|
|
344
|
-
|
|
345
|
-
This component looks like Font Awesome's check solid icon.
|
|
346
|
-
|
|
347
|
-
```js
|
|
348
|
-
import Check from 'dce-reactkit/glyph/Check';
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
Customize this component by setting its properties:
|
|
352
|
-
|
|
353
|
-
Property Name | Type | Description | Required/Default Value
|
|
354
|
-
:--- | :--- | :--- | :--
|
|
355
|
-
grow | number | the multiplicity to grow the checkmark by (if set to 2, we will apply bootstrap's 'grow-2' class) | `null`
|
|
356
|
-
|
|
357
|
-
### Checkbox
|
|
358
|
-
|
|
359
|
-
This component looks like Font Awesome's square or check-square solid icon depending upon its properties.
|
|
360
|
-
|
|
361
|
-
```js
|
|
362
|
-
import Checkbox from 'dce-reactkit/glyph/Checkbox';
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
Customize this component by setting its properties:
|
|
366
|
-
|
|
367
|
-
Property Name | Type | Description | Required/Default Value
|
|
368
|
-
:--- | :--- | :--- | :--
|
|
369
|
-
checked | boolean | if true, the checkbox is checked | `false`
|
|
370
|
-
grow | number | the multiplicity to grow the checkbox by (if set to 2, we will apply bootstrap's 'grow-2' class) | `null`
|
|
371
|
-
|
|
372
|
-
### Chevron
|
|
373
|
-
|
|
374
|
-
This component looks like Font Awesome's chevron-up/down/right/left or chevron-circle/up/down/right/left solid icon depending on its properties.
|
|
375
|
-
|
|
376
|
-
```js
|
|
377
|
-
import Chevron from 'dce-reactkit/glyph/Chevron';
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
Customize this component by setting its properties:
|
|
381
|
-
|
|
382
|
-
Property Name | Type | Description | Required/Default Value
|
|
383
|
-
:--- | :--- | :--- | :--
|
|
384
|
-
circled | boolean | if true, the arrow appears inside of a solid circle. | `false`
|
|
385
|
-
direction | string | the direction of the chevron. Choose from `['up', 'down', 'left', 'right']` | `right`
|
|
386
|
-
|
|
387
|
-
### Circle
|
|
388
|
-
|
|
389
|
-
This component looks like Font Awesome's circle solid icon.
|
|
390
|
-
|
|
391
|
-
```js
|
|
392
|
-
import Circle from 'dce-reactkit/glyph/Circle';
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
### Cog
|
|
396
|
-
|
|
397
|
-
This component looks like Font Awesome's cog solid icon.
|
|
398
|
-
|
|
399
|
-
```js
|
|
400
|
-
import Cog from 'dce-reactkit/glyph/Cog';
|
|
401
|
-
```
|
|
402
|
-
|
|
403
|
-
### DoubleAngle
|
|
404
|
-
|
|
405
|
-
This component looks like Font Awesome's angle-double-up/down/right/left solid icon depending on its properties.
|
|
406
|
-
|
|
407
|
-
```js
|
|
408
|
-
import DoubleAngle from 'dce-reactkit/glyph/DoubleAngle';
|
|
409
|
-
```
|
|
410
|
-
|
|
411
|
-
Customize this component by setting its properties:
|
|
412
|
-
|
|
413
|
-
Property Name | Type | Description | Required/Default Value
|
|
414
|
-
:--- | :--- | :--- | :--
|
|
415
|
-
direction | string | the direction of the double angle. Choose from `['up', 'down', 'left', 'right']` | `right`
|
|
416
|
-
|
|
417
|
-
### Download
|
|
418
|
-
|
|
419
|
-
This component looks like Font Awesome's cloud-download-alt solid icon.
|
|
420
|
-
|
|
421
|
-
```js
|
|
422
|
-
import Download from 'dce-reactkit/glyph/Download';
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
### Ellipsis
|
|
426
|
-
|
|
427
|
-
This component looks like Font Awesome's ellipsis-h/v solid icon depending upon its properties.
|
|
428
|
-
|
|
429
|
-
```js
|
|
430
|
-
import Ellipsis from 'dce-reactkit/glyph/Ellipsis';
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
Customize this component by setting its properties:
|
|
434
|
-
|
|
435
|
-
Property Name | Type | Description | Required/Default Value
|
|
436
|
-
:--- | :--- | :--- | :--
|
|
437
|
-
vertical | boolean | if true, the ellipsis is vertical | `false`
|
|
438
|
-
|
|
439
|
-
### Envelope
|
|
440
|
-
|
|
441
|
-
This component looks like Font Awesome's envelope solid icon.
|
|
442
|
-
|
|
443
|
-
```js
|
|
444
|
-
import Envelope from 'dce-reactkit/glyph/Envelope';
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
### File
|
|
448
|
-
|
|
449
|
-
This component looks like Font Awesome's file or file-csv solid icon depending upon its properties.
|
|
450
|
-
|
|
451
|
-
```js
|
|
452
|
-
import File from 'dce-reactkit/glyph/File';
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
Customize this component by setting its properties:
|
|
456
|
-
|
|
457
|
-
Property Name | Type | Description | Required/Default Value
|
|
458
|
-
:--- | :--- | :--- | :--
|
|
459
|
-
type | string | the file type. Supported values: `['csv', null]` | `null`
|
|
460
|
-
|
|
461
|
-
### IdCard
|
|
462
|
-
|
|
463
|
-
This component looks like Font Awesome's id-card solid icon.
|
|
464
|
-
|
|
465
|
-
```js
|
|
466
|
-
import IdCard from 'dce-reactkit/glyph/IdCard';
|
|
467
|
-
```
|
|
468
|
-
|
|
469
|
-
### Menu
|
|
470
|
-
|
|
471
|
-
This component looks like Font Awesome's bars solid icon.
|
|
472
|
-
|
|
473
|
-
```js
|
|
474
|
-
import Menu from 'dce-reactkit/glyph/Menu';
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
### Minus
|
|
478
|
-
|
|
479
|
-
This component looks like Font Awesome's minus solid icon.
|
|
480
|
-
|
|
481
|
-
```js
|
|
482
|
-
import Minus from 'dce-reactkit/glyph/Minus';
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
### Move
|
|
486
|
-
|
|
487
|
-
This component looks like Font Awesome's arrows-alt solid icon.
|
|
488
|
-
|
|
489
|
-
```js
|
|
490
|
-
import Move from 'dce-reactkit/glyph/move';
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
### Plus
|
|
494
|
-
|
|
495
|
-
This component looks like Font Awesome's plus solid icon.
|
|
496
|
-
|
|
497
|
-
```js
|
|
498
|
-
import Plus from 'dce-reactkit/glyph/Plus';
|
|
499
|
-
```
|
|
500
|
-
|
|
501
|
-
### Square
|
|
502
|
-
|
|
503
|
-
This component looks like Font Awesome's square-filled solid or square regular icon depending upon its properties.
|
|
504
|
-
|
|
505
|
-
```js
|
|
506
|
-
import Adjust from 'dce-reactkit/glyph/Adjust';
|
|
507
|
-
```
|
|
508
|
-
|
|
509
|
-
Customize this component by setting its properties:
|
|
510
|
-
|
|
511
|
-
Property Name | Type | Description | Required/Default Value
|
|
512
|
-
:--- | :--- | :--- | :--
|
|
513
|
-
filled | boolean | if true, the square is filled | `false`
|
|
514
|
-
grow | number | the multiplicity to grow the square by (if set to 2, we will apply bootstrap's 'grow-2' class) | `null`
|
|
515
|
-
|
|
516
|
-
### Teacher
|
|
517
|
-
|
|
518
|
-
This component looks like Font Awesome's chalkboard-teacher solid icon.
|
|
519
|
-
|
|
520
|
-
```js
|
|
521
|
-
import Teacher from 'dce-reactkit/glyph/Teacher';
|
|
522
|
-
```
|
|
523
|
-
|
|
524
|
-
### TextAlign
|
|
525
|
-
|
|
526
|
-
This component looks like Font Awesome's align-center/left/right/justify solid icon depending upon its properties.
|
|
527
|
-
|
|
528
|
-
```js
|
|
529
|
-
import TextAlign from 'dce-reactkit/glyph/TextAlign';
|
|
530
|
-
```
|
|
531
|
-
|
|
532
|
-
Customize this component by setting its properties:
|
|
533
|
-
|
|
534
|
-
Property Name | Type | Description | Required/Default Value
|
|
535
|
-
:--- | :--- | :--- | :--
|
|
536
|
-
left | boolean | if true, we display the align left icon | `true`
|
|
537
|
-
right | boolean | if true, we display the align right icon | `false`
|
|
538
|
-
justify | boolean | if true, we display the justify align icon | `false`
|
|
539
|
-
center | boolean | if true, we display the align center icon | `false`
|
|
540
|
-
|
|
541
|
-
### Times
|
|
542
|
-
|
|
543
|
-
This component looks like Font Awesome's times solid icon.
|
|
544
|
-
|
|
545
|
-
```js
|
|
546
|
-
import Times from 'dce-reactkit/glyph/Times';
|
|
547
|
-
```
|
|
548
|
-
|
|
549
|
-
Customize this component by setting its properties:
|
|
550
|
-
|
|
551
|
-
Property Name | Type | Description | Required/Default Value
|
|
552
|
-
:--- | :--- | :--- | :--
|
|
553
|
-
grow | number | the multiplicity to grow the times icon by (if set to 2, we will apply bootstrap's 'grow-2' class) | `null`
|
|
554
|
-
|
|
555
|
-
### WarningTriangle
|
|
556
|
-
|
|
557
|
-
This component looks like Font Awesome's exclamation-triangle solid icon.
|
|
558
|
-
|
|
559
|
-
```js
|
|
560
|
-
import WarningTriangle from 'dce-reactkit/glyph/WarningTriangle';
|
|
561
|
-
```
|
package/dist/cjs/index.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var reactFontawesome = require('@fortawesome/react-fontawesome');
|
|
7
7
|
var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
|
|
8
|
+
var freeRegularSvgIcons = require('@fortawesome/free-regular-svg-icons');
|
|
8
9
|
|
|
9
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
11
|
|
|
@@ -474,7 +475,7 @@ const Modal = (props) => {
|
|
|
474
475
|
// Check if this button is last
|
|
475
476
|
const last = (i === ModalButtonTypes.length - 1);
|
|
476
477
|
// Create the button
|
|
477
|
-
return (React__default["default"].createElement("button", { type: "button", className: `Modal-${ModalButtonType}-button btn btn-${variant} ${last ? '' : 'me-1'}`, onClick: () => {
|
|
478
|
+
return (React__default["default"].createElement("button", { key: ModalButtonType, type: "button", className: `Modal-${ModalButtonType}-button btn btn-${variant} ${last ? '' : 'me-1'}`, onClick: () => {
|
|
478
479
|
handleClose(ModalButtonType);
|
|
479
480
|
} }, label));
|
|
480
481
|
});
|
|
@@ -710,8 +711,9 @@ const AppWrapper = (props) => {
|
|
|
710
711
|
let modal;
|
|
711
712
|
/* -------------- Alert ------------- */
|
|
712
713
|
if (alertInfo) {
|
|
713
|
-
modal = (React__default["default"].createElement(Modal, { title: alertInfo.title, type: ModalType$1.Okay, onClose: () => {
|
|
714
|
+
modal = (React__default["default"].createElement(Modal, { key: `alert-${alertInfo.title}-${alertInfo.text}`, title: alertInfo.title, type: ModalType$1.Okay, onClose: () => {
|
|
714
715
|
// Alert closed
|
|
716
|
+
setAlertInfo(undefined);
|
|
715
717
|
if (onAlertClosed) {
|
|
716
718
|
onAlertClosed();
|
|
717
719
|
}
|
|
@@ -719,11 +721,11 @@ const AppWrapper = (props) => {
|
|
|
719
721
|
}
|
|
720
722
|
/* ------------- Confirm ------------ */
|
|
721
723
|
if (confirmInfo) {
|
|
722
|
-
modal = (React__default["default"].createElement(Modal, { title: confirmInfo.title, type: ModalType$1.OkayCancel, onClose: (buttonType) => {
|
|
724
|
+
modal = (React__default["default"].createElement(Modal, { key: `confirm-${confirmInfo.title}-${confirmInfo.text}`, title: confirmInfo.title, type: ModalType$1.OkayCancel, onClose: (buttonType) => {
|
|
725
|
+
setConfirmInfo(undefined);
|
|
723
726
|
if (onConfirmClosed) {
|
|
724
727
|
onConfirmClosed(buttonType === ModalButtonType$1.Okay);
|
|
725
728
|
}
|
|
726
|
-
setConfirmInfo(undefined);
|
|
727
729
|
}, dontAllowBackdropExit: true }, confirmInfo.text));
|
|
728
730
|
}
|
|
729
731
|
/*----------------------------------------*/
|
|
@@ -932,6 +934,34 @@ const TabBox = (props) => {
|
|
|
932
934
|
React__default["default"].createElement("div", { className: "TabBox-children" }, children))));
|
|
933
935
|
};
|
|
934
936
|
|
|
937
|
+
/**
|
|
938
|
+
* A radio selection button
|
|
939
|
+
* @author Gabe Abrams
|
|
940
|
+
*/
|
|
941
|
+
/*------------------------------------------------------------------------*/
|
|
942
|
+
/* Component */
|
|
943
|
+
/*------------------------------------------------------------------------*/
|
|
944
|
+
const RadioButton = (props) => {
|
|
945
|
+
/*------------------------------------------------------------------------*/
|
|
946
|
+
/* Setup */
|
|
947
|
+
/*------------------------------------------------------------------------*/
|
|
948
|
+
/* -------------- Props ------------- */
|
|
949
|
+
const { text, onSelected, ariaLabel, title, selected, id, noMarginOnRight, selectedVariant = Variant$1.Primary, unselectedVariant = Variant$1.Light, small, } = props;
|
|
950
|
+
/*------------------------------------------------------------------------*/
|
|
951
|
+
/* Render */
|
|
952
|
+
/*------------------------------------------------------------------------*/
|
|
953
|
+
/*----------------------------------------*/
|
|
954
|
+
/* Main UI */
|
|
955
|
+
/*----------------------------------------*/
|
|
956
|
+
return (React__default["default"].createElement("button", { type: "button", id: id, title: title, className: `btn btn-${selected ? selectedVariant : unselectedVariant}${selected ? ' selected' : ''}${small ? ' btn-sm' : ''} m-0${noMarginOnRight ? '' : ' mr-2'}`, "aria-label": `${ariaLabel}${selected ? ': currently selected' : ''}`, onClick: () => {
|
|
957
|
+
if (!selected) {
|
|
958
|
+
onSelected();
|
|
959
|
+
}
|
|
960
|
+
} },
|
|
961
|
+
React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: selected ? freeSolidSvgIcons.faDotCircle : freeRegularSvgIcons.faCircle, className: "mr-1" }),
|
|
962
|
+
text));
|
|
963
|
+
};
|
|
964
|
+
|
|
935
965
|
/**
|
|
936
966
|
* Shorten text so it fits into a certain number of chars
|
|
937
967
|
* @author Gabe Abrams
|
|
@@ -1502,6 +1532,7 @@ exports.ModalButtonType = ModalButtonType$1;
|
|
|
1502
1532
|
exports.ModalSize = ModalSize$1;
|
|
1503
1533
|
exports.ModalType = ModalType$1;
|
|
1504
1534
|
exports.ParamType = ParamType$1;
|
|
1535
|
+
exports.RadioButton = RadioButton;
|
|
1505
1536
|
exports.ReactKitErrorCode = ReactKitErrorCode$1;
|
|
1506
1537
|
exports.TabBox = TabBox;
|
|
1507
1538
|
exports.Variant = Variant$1;
|