@wavelengthusaf/components 5.0.3 → 5.0.5
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 +113 -0
- package/dist/cjs/index.cjs +492 -7
- package/dist/cjs/index.d.cts +39 -4
- package/dist/esm/index.d.ts +39 -4
- package/dist/esm/index.js +735 -250
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -14,6 +14,119 @@ npm install @wavelengthusaf/components
|
|
|
14
14
|
|
|
15
15
|
## Release Notes
|
|
16
16
|
|
|
17
|
+
### 5.0.5
|
|
18
|
+
|
|
19
|
+
- 6/26/2026
|
|
20
|
+
- Cleaned up unused and deprecated MUI-based React components.
|
|
21
|
+
- Removed MUI dependencies from the package (`@mui/material`, `@mui/icons-material`, `@emotion/react`, `@emotion/styled`).
|
|
22
|
+
- Deleted the following components: `WavelengthAlert`, `WavelengthStandardSnackbar`, `WavelengthDropdownButton`, `WavelengthBox`, and `WavelengthFooter`.
|
|
23
|
+
### 4.27.3
|
|
24
|
+
|
|
25
|
+
- 6/23/2026
|
|
26
|
+
- Added Jest informational test for the `sample-component` web component.
|
|
27
|
+
|
|
28
|
+
### 4.27.2
|
|
29
|
+
|
|
30
|
+
- 6/17/2026
|
|
31
|
+
- Added Jest test for the `wavelength-alert` web component.
|
|
32
|
+
|
|
33
|
+
### 4.27.1
|
|
34
|
+
|
|
35
|
+
- 6/15/2026
|
|
36
|
+
- Added Jest test for the `wavelength-date-picker` web component.
|
|
37
|
+
|
|
38
|
+
### 4.26.17
|
|
39
|
+
|
|
40
|
+
- 6/8/2026
|
|
41
|
+
- Added Jest test for the `wavelength-search` web component.
|
|
42
|
+
|
|
43
|
+
### 4.26.16
|
|
44
|
+
|
|
45
|
+
- 6/8/2026
|
|
46
|
+
- Added Jest test for the `wavelength-data-grid` web component.
|
|
47
|
+
|
|
48
|
+
### 4.26.15
|
|
49
|
+
|
|
50
|
+
- 6/5/2026
|
|
51
|
+
- Added Jest test for the `wavelength-confirmation-modal` web component.
|
|
52
|
+
|
|
53
|
+
### 4.26.14
|
|
54
|
+
|
|
55
|
+
- 6/4/2026
|
|
56
|
+
- Added Jest test for the `wavelength-dialog` web component.
|
|
57
|
+
|
|
58
|
+
### 4.26.13
|
|
59
|
+
|
|
60
|
+
- 6/3/2026
|
|
61
|
+
- Added Jest test for the `wavelength-pagination` web component.
|
|
62
|
+
|
|
63
|
+
### 4.26.12
|
|
64
|
+
|
|
65
|
+
- 6/3/2026
|
|
66
|
+
- Added Jest test for the `wavelength-planetrail` web component.
|
|
67
|
+
|
|
68
|
+
### 4.26.11
|
|
69
|
+
|
|
70
|
+
- 6/2/2026
|
|
71
|
+
- Added Jest test for the `wavelength-manyplanes` web component.
|
|
72
|
+
|
|
73
|
+
### 4.26.10
|
|
74
|
+
|
|
75
|
+
- 6/2/2026
|
|
76
|
+
- Added Jest tests for the `wavelength-comment-display` web component.
|
|
77
|
+
|
|
78
|
+
### 4.26.9
|
|
79
|
+
|
|
80
|
+
- 6/1/2026
|
|
81
|
+
- Added Jest tests for the `wavelength-switch` web component.
|
|
82
|
+
|
|
83
|
+
### 4.26.8
|
|
84
|
+
|
|
85
|
+
- 6/1/2026
|
|
86
|
+
- Added Jest tests for the `wavelength-menu` web component.
|
|
87
|
+
|
|
88
|
+
### 4.26.7
|
|
89
|
+
|
|
90
|
+
- 5/26/2026
|
|
91
|
+
- Added Jest test file for the `wavelength-slider` web component.
|
|
92
|
+
|
|
93
|
+
### 4.26.6
|
|
94
|
+
|
|
95
|
+
- 5/26/2026
|
|
96
|
+
- Added Jest tests for the `wavelength-snackbar` web component.
|
|
97
|
+
|
|
98
|
+
### 4.26.5
|
|
99
|
+
|
|
100
|
+
- 5/28/2026
|
|
101
|
+
- Added a Jest test file for the `wavelength-popup-menu` web component.
|
|
102
|
+
|
|
103
|
+
### 4.26.4
|
|
104
|
+
|
|
105
|
+
- 5/26/2026
|
|
106
|
+
- Added Jest tests for the `wavelength-tooltip` web component.
|
|
107
|
+
|
|
108
|
+
### 4.26.3
|
|
109
|
+
|
|
110
|
+
- 5/21/2026
|
|
111
|
+
- Added Jest test for `wavelength-title-bar` web component
|
|
112
|
+
|
|
113
|
+
### 4.26.2
|
|
114
|
+
|
|
115
|
+
- 5/19/2026
|
|
116
|
+
- Added Jest test for `wavelength-dropdown` web component
|
|
117
|
+
|
|
118
|
+
## 4.26.1 Rollback
|
|
119
|
+
|
|
120
|
+
### 5.0.4
|
|
121
|
+
|
|
122
|
+
- 5/19/2026
|
|
123
|
+
- Added Jest test for `wavelength-checkbox-list` web component
|
|
124
|
+
|
|
125
|
+
### 5.0.3
|
|
126
|
+
|
|
127
|
+
- 5/18/2026
|
|
128
|
+
- Added Jest test for `wavelength-badge` web component
|
|
129
|
+
|
|
17
130
|
### 5.0.2
|
|
18
131
|
|
|
19
132
|
- 5/15/2026
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -92,6 +92,423 @@ WavelengthButton.displayName = "WavelengthButton";
|
|
|
92
92
|
// src/index.ts
|
|
93
93
|
|
|
94
94
|
|
|
95
|
+
// src/components/buttons/WavelengthButton/WavelengthStyledButton.tsx
|
|
96
|
+
var _styledcomponents = require('styled-components'); var _styledcomponents2 = _interopRequireDefault(_styledcomponents);
|
|
97
|
+
|
|
98
|
+
var ButtonPresets = {
|
|
99
|
+
default: {
|
|
100
|
+
width: "130px",
|
|
101
|
+
height: "45px",
|
|
102
|
+
display: "flex",
|
|
103
|
+
flexDirection: "row",
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
justifyContent: "center",
|
|
106
|
+
borderRadius: "8px",
|
|
107
|
+
border: "none",
|
|
108
|
+
fontSize: "",
|
|
109
|
+
fontWeight: 600,
|
|
110
|
+
color: "",
|
|
111
|
+
margin: "",
|
|
112
|
+
padding: "",
|
|
113
|
+
backgroundColor: "",
|
|
114
|
+
hover: {
|
|
115
|
+
backgroundColor: "",
|
|
116
|
+
color: "",
|
|
117
|
+
cursor: "pointer",
|
|
118
|
+
width: "",
|
|
119
|
+
height: "",
|
|
120
|
+
border: "",
|
|
121
|
+
fontSize: ""
|
|
122
|
+
},
|
|
123
|
+
disabled: {
|
|
124
|
+
cursor: "",
|
|
125
|
+
opacity: ""
|
|
126
|
+
},
|
|
127
|
+
active: {
|
|
128
|
+
backgroundColor: "",
|
|
129
|
+
boxShadow: "",
|
|
130
|
+
transition: "",
|
|
131
|
+
border: ""
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
ewdms_primary: {
|
|
135
|
+
width: "130px",
|
|
136
|
+
height: "45px",
|
|
137
|
+
display: "flex",
|
|
138
|
+
flexDirection: "row",
|
|
139
|
+
alignItems: "center",
|
|
140
|
+
justifyContent: "center",
|
|
141
|
+
borderRadius: "8px",
|
|
142
|
+
border: "none",
|
|
143
|
+
fontSize: "16px",
|
|
144
|
+
fontWeight: 600,
|
|
145
|
+
color: "white",
|
|
146
|
+
margin: "",
|
|
147
|
+
padding: "12px 32px",
|
|
148
|
+
backgroundColor: "rgba(26, 128, 131, 1)",
|
|
149
|
+
hover: {
|
|
150
|
+
backgroundColor: "rgba(38, 186, 190, 1)",
|
|
151
|
+
color: "rgba(247, 247, 249, 1)",
|
|
152
|
+
cursor: "pointer",
|
|
153
|
+
width: "",
|
|
154
|
+
height: "",
|
|
155
|
+
border: "",
|
|
156
|
+
fontSize: ""
|
|
157
|
+
},
|
|
158
|
+
disabled: {
|
|
159
|
+
cursor: "not-allowed",
|
|
160
|
+
opacity: "0.4"
|
|
161
|
+
},
|
|
162
|
+
active: {
|
|
163
|
+
backgroundColor: "#67a8aa",
|
|
164
|
+
boxShadow: "",
|
|
165
|
+
transition: "background-color 0.2s ease-in",
|
|
166
|
+
border: ""
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
ewdms_secondary: {
|
|
170
|
+
width: "130px",
|
|
171
|
+
height: "45px",
|
|
172
|
+
display: "flex",
|
|
173
|
+
flexDirection: "row",
|
|
174
|
+
alignItems: "center",
|
|
175
|
+
justifyContent: "center",
|
|
176
|
+
borderRadius: "8px",
|
|
177
|
+
border: "1px solid rgba(26, 128, 131, 1)",
|
|
178
|
+
fontSize: "16px",
|
|
179
|
+
fontWeight: 600,
|
|
180
|
+
margin: "",
|
|
181
|
+
color: "rgba(26, 128, 131, 1)",
|
|
182
|
+
padding: "12px 32px",
|
|
183
|
+
backgroundColor: "transparent",
|
|
184
|
+
hover: {
|
|
185
|
+
backgroundColor: "rgba(26, 128, 131, 0.1)",
|
|
186
|
+
color: "rgba(26, 128, 131, 1)",
|
|
187
|
+
cursor: "pointer",
|
|
188
|
+
width: "",
|
|
189
|
+
height: "",
|
|
190
|
+
border: "",
|
|
191
|
+
fontSize: ""
|
|
192
|
+
},
|
|
193
|
+
disabled: {
|
|
194
|
+
cursor: "not-allowed",
|
|
195
|
+
opacity: "0.4"
|
|
196
|
+
},
|
|
197
|
+
active: {
|
|
198
|
+
backgroundColor: "#bad7da",
|
|
199
|
+
boxShadow: "",
|
|
200
|
+
transition: "background-color 0.2s ease-in",
|
|
201
|
+
border: ""
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
ewdms_tertiary: {
|
|
205
|
+
width: "130px",
|
|
206
|
+
height: "45px",
|
|
207
|
+
display: "flex",
|
|
208
|
+
margin: "",
|
|
209
|
+
flexDirection: "row",
|
|
210
|
+
alignItems: "center",
|
|
211
|
+
justifyContent: "center",
|
|
212
|
+
borderRadius: "8px",
|
|
213
|
+
border: "none",
|
|
214
|
+
fontSize: "16px",
|
|
215
|
+
fontWeight: 600,
|
|
216
|
+
color: "rgba(26, 128, 131, 1)",
|
|
217
|
+
padding: "12px 32px",
|
|
218
|
+
backgroundColor: "transparent",
|
|
219
|
+
hover: {
|
|
220
|
+
backgroundColor: "rgba(26, 128, 131, 0.1)",
|
|
221
|
+
color: "rgba(26, 128, 131, 1)",
|
|
222
|
+
cursor: "pointer",
|
|
223
|
+
width: "",
|
|
224
|
+
height: "",
|
|
225
|
+
border: "",
|
|
226
|
+
fontSize: ""
|
|
227
|
+
},
|
|
228
|
+
disabled: {
|
|
229
|
+
cursor: "not-allowed",
|
|
230
|
+
opacity: "0.4"
|
|
231
|
+
},
|
|
232
|
+
active: {
|
|
233
|
+
backgroundColor: "#445C71",
|
|
234
|
+
boxShadow: "",
|
|
235
|
+
transition: "background-color 0.2s ease-in",
|
|
236
|
+
border: ""
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
channel_one_launch: {
|
|
240
|
+
width: "62px",
|
|
241
|
+
height: "24px",
|
|
242
|
+
display: "flex",
|
|
243
|
+
margin: "",
|
|
244
|
+
flexDirection: "row",
|
|
245
|
+
alignItems: "center",
|
|
246
|
+
justifyContent: "center",
|
|
247
|
+
borderRadius: "20px",
|
|
248
|
+
border: "none",
|
|
249
|
+
fontSize: "10px",
|
|
250
|
+
fontWeight: 700,
|
|
251
|
+
color: "white",
|
|
252
|
+
padding: "0px 0px",
|
|
253
|
+
backgroundColor: "#24A818",
|
|
254
|
+
hover: {
|
|
255
|
+
height: "28px",
|
|
256
|
+
border: "0.5px solid white",
|
|
257
|
+
fontSize: "12px",
|
|
258
|
+
width: "72px",
|
|
259
|
+
backgroundColor: "",
|
|
260
|
+
color: "",
|
|
261
|
+
cursor: "pointer"
|
|
262
|
+
},
|
|
263
|
+
disabled: {
|
|
264
|
+
cursor: "not-allowed",
|
|
265
|
+
opacity: "0.4"
|
|
266
|
+
},
|
|
267
|
+
active: {
|
|
268
|
+
backgroundColor: "#6FC36E",
|
|
269
|
+
boxShadow: "",
|
|
270
|
+
transition: "background-color 0.2s ease-in",
|
|
271
|
+
border: ""
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
channel_one_request: {
|
|
275
|
+
width: "100px",
|
|
276
|
+
height: "24px",
|
|
277
|
+
display: "flex",
|
|
278
|
+
flexDirection: "row",
|
|
279
|
+
alignItems: "center",
|
|
280
|
+
margin: "",
|
|
281
|
+
justifyContent: "center",
|
|
282
|
+
borderRadius: "20px",
|
|
283
|
+
border: "none",
|
|
284
|
+
fontSize: "10px",
|
|
285
|
+
fontWeight: 700,
|
|
286
|
+
color: "white",
|
|
287
|
+
padding: "0px 0px",
|
|
288
|
+
backgroundColor: "#1D31E4",
|
|
289
|
+
hover: {
|
|
290
|
+
height: "28px",
|
|
291
|
+
border: "0.5px solid white",
|
|
292
|
+
fontSize: "12px",
|
|
293
|
+
width: "110px",
|
|
294
|
+
backgroundColor: "",
|
|
295
|
+
color: "",
|
|
296
|
+
cursor: "pointer"
|
|
297
|
+
},
|
|
298
|
+
disabled: {
|
|
299
|
+
cursor: "not-allowed",
|
|
300
|
+
opacity: "0.4"
|
|
301
|
+
},
|
|
302
|
+
active: {
|
|
303
|
+
backgroundColor: "#5D78ED",
|
|
304
|
+
boxShadow: "",
|
|
305
|
+
transition: "background-color 0.2s ease-in",
|
|
306
|
+
border: ""
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
channel_one_pending: {
|
|
310
|
+
width: "62px",
|
|
311
|
+
height: "24px",
|
|
312
|
+
display: "flex",
|
|
313
|
+
flexDirection: "row",
|
|
314
|
+
alignItems: "center",
|
|
315
|
+
justifyContent: "center",
|
|
316
|
+
borderRadius: "20px",
|
|
317
|
+
border: "none",
|
|
318
|
+
fontSize: "10px",
|
|
319
|
+
fontWeight: 700,
|
|
320
|
+
color: "white",
|
|
321
|
+
padding: "0px 0px",
|
|
322
|
+
margin: "",
|
|
323
|
+
backgroundColor: "#F88805",
|
|
324
|
+
hover: {
|
|
325
|
+
height: "28px",
|
|
326
|
+
border: "0.5px solid white",
|
|
327
|
+
fontSize: "12px",
|
|
328
|
+
width: "72px",
|
|
329
|
+
backgroundColor: "",
|
|
330
|
+
color: "",
|
|
331
|
+
cursor: "pointer"
|
|
332
|
+
},
|
|
333
|
+
disabled: {
|
|
334
|
+
cursor: "not-allowed",
|
|
335
|
+
opacity: "0.4"
|
|
336
|
+
},
|
|
337
|
+
active: {
|
|
338
|
+
backgroundColor: "#FAAD68",
|
|
339
|
+
boxShadow: "",
|
|
340
|
+
transition: "background-color 0.2s ease-in",
|
|
341
|
+
border: ""
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
channel_one_disabled: {
|
|
345
|
+
width: "100px",
|
|
346
|
+
height: "24px",
|
|
347
|
+
display: "flex",
|
|
348
|
+
margin: "",
|
|
349
|
+
flexDirection: "row",
|
|
350
|
+
alignItems: "center",
|
|
351
|
+
justifyContent: "center",
|
|
352
|
+
borderRadius: "20px",
|
|
353
|
+
border: "none",
|
|
354
|
+
fontSize: "10px",
|
|
355
|
+
fontWeight: 700,
|
|
356
|
+
color: "white",
|
|
357
|
+
padding: "0px 0px",
|
|
358
|
+
backgroundColor: "#9E9E9E",
|
|
359
|
+
hover: {
|
|
360
|
+
height: "",
|
|
361
|
+
border: "",
|
|
362
|
+
fontSize: "",
|
|
363
|
+
width: "",
|
|
364
|
+
backgroundColor: "",
|
|
365
|
+
color: "",
|
|
366
|
+
cursor: ""
|
|
367
|
+
},
|
|
368
|
+
disabled: {
|
|
369
|
+
cursor: "not-allowed",
|
|
370
|
+
opacity: "0.4"
|
|
371
|
+
},
|
|
372
|
+
active: {
|
|
373
|
+
backgroundColor: "",
|
|
374
|
+
boxShadow: "",
|
|
375
|
+
transition: "",
|
|
376
|
+
border: ""
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
channel_one_transparent: {
|
|
380
|
+
width: "70px",
|
|
381
|
+
height: "25px",
|
|
382
|
+
display: "flex",
|
|
383
|
+
flexDirection: "row",
|
|
384
|
+
alignItems: "center",
|
|
385
|
+
margin: "",
|
|
386
|
+
justifyContent: "center",
|
|
387
|
+
borderRadius: "6px",
|
|
388
|
+
border: "1px solid white",
|
|
389
|
+
fontSize: "10px",
|
|
390
|
+
fontWeight: 500,
|
|
391
|
+
color: "white",
|
|
392
|
+
padding: "0px !important",
|
|
393
|
+
backgroundColor: "transparent",
|
|
394
|
+
hover: {
|
|
395
|
+
height: "",
|
|
396
|
+
border: "",
|
|
397
|
+
fontSize: "",
|
|
398
|
+
width: "",
|
|
399
|
+
backgroundColor: "",
|
|
400
|
+
color: "",
|
|
401
|
+
cursor: "pointer"
|
|
402
|
+
},
|
|
403
|
+
disabled: {
|
|
404
|
+
cursor: "",
|
|
405
|
+
opacity: ""
|
|
406
|
+
},
|
|
407
|
+
active: {
|
|
408
|
+
backgroundColor: "rgba(255, 255, 255, 0.22)",
|
|
409
|
+
boxShadow: "",
|
|
410
|
+
transition: "background-color 0.2s ease-in",
|
|
411
|
+
border: ""
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
brewery: {
|
|
415
|
+
width: "138px",
|
|
416
|
+
height: "44px",
|
|
417
|
+
display: "flex",
|
|
418
|
+
flexDirection: "row",
|
|
419
|
+
alignItems: "center",
|
|
420
|
+
justifyContent: "center",
|
|
421
|
+
borderRadius: "6px",
|
|
422
|
+
border: "none",
|
|
423
|
+
fontSize: "16px",
|
|
424
|
+
margin: "",
|
|
425
|
+
fontWeight: 500,
|
|
426
|
+
color: "white",
|
|
427
|
+
padding: "12px 16px",
|
|
428
|
+
backgroundColor: "#D16A2F",
|
|
429
|
+
hover: {
|
|
430
|
+
height: "",
|
|
431
|
+
border: "",
|
|
432
|
+
fontSize: "",
|
|
433
|
+
width: "",
|
|
434
|
+
backgroundColor: "#D16A2F",
|
|
435
|
+
color: "",
|
|
436
|
+
cursor: "pointer"
|
|
437
|
+
},
|
|
438
|
+
disabled: {
|
|
439
|
+
cursor: "not-allowed",
|
|
440
|
+
opacity: "0.4"
|
|
441
|
+
},
|
|
442
|
+
active: {
|
|
443
|
+
backgroundColor: "",
|
|
444
|
+
boxShadow: "0 0 5px black",
|
|
445
|
+
transition: "",
|
|
446
|
+
border: ""
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
var Button = _styledcomponents2.default.button`
|
|
451
|
+
${({ type }) => {
|
|
452
|
+
const preset = ButtonPresets[type];
|
|
453
|
+
return `
|
|
454
|
+
width: ${preset.width};
|
|
455
|
+
height: ${preset.height};
|
|
456
|
+
display: ${preset.display};
|
|
457
|
+
flex-direction: ${preset.flexDirection};
|
|
458
|
+
align-items: ${preset.alignItems};
|
|
459
|
+
justify-content: ${preset.justifyContent};
|
|
460
|
+
border-radius: ${preset.borderRadius};
|
|
461
|
+
border: ${preset.border};
|
|
462
|
+
font-size: ${preset.fontSize};
|
|
463
|
+
font-weight: ${preset.fontWeight};
|
|
464
|
+
color: ${preset.color};
|
|
465
|
+
padding: ${preset.padding};
|
|
466
|
+
background-color: ${preset.backgroundColor};
|
|
467
|
+
margin: ${preset.margin};
|
|
468
|
+
|
|
469
|
+
&:hover {
|
|
470
|
+
background-color: ${preset.hover.backgroundColor};
|
|
471
|
+
color: ${preset.hover.color};
|
|
472
|
+
cursor: ${preset.hover.cursor};
|
|
473
|
+
width:${preset.hover.width};
|
|
474
|
+
height:${preset.hover.height};
|
|
475
|
+
border:${preset.hover.border};
|
|
476
|
+
font-size:${preset.hover.fontSize};
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
&:disabled {
|
|
480
|
+
cursor: ${preset.disabled.cursor};
|
|
481
|
+
opacity: ${preset.disabled.opacity};
|
|
482
|
+
}
|
|
483
|
+
&:active {
|
|
484
|
+
background-color: ${preset.active.backgroundColor};
|
|
485
|
+
box-shadow: ${preset.active.boxShadow};
|
|
486
|
+
border: ${preset.active.border};
|
|
487
|
+
transition: ${preset.active.transition};
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
`;
|
|
491
|
+
}}
|
|
492
|
+
|
|
493
|
+
${({ styles }) => styles && { ...styles }}
|
|
494
|
+
${({ hoverstyles }) => hoverstyles && {
|
|
495
|
+
"&:hover": { ...hoverstyles }
|
|
496
|
+
}}
|
|
497
|
+
${({ activestyles }) => activestyles && {
|
|
498
|
+
"&:active": { ...activestyles }
|
|
499
|
+
}}
|
|
500
|
+
${({ disabledstyles }) => disabledstyles && {
|
|
501
|
+
"&:disabled": { ...disabledstyles }
|
|
502
|
+
}}
|
|
503
|
+
`;
|
|
504
|
+
function WavelengthStyledButton({ type = "default", styles, children, disabled = false, hoverstyles, icon, onClick, disabledstyles, activestyles, id, name }) {
|
|
505
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { type, styles, hoverstyles, disabledstyles, disabled, activestyles, onClick, children: [
|
|
506
|
+
icon,
|
|
507
|
+
children
|
|
508
|
+
] });
|
|
509
|
+
}
|
|
510
|
+
WavelengthStyledButton.displayName = "WavelengthStyledButton";
|
|
511
|
+
|
|
95
512
|
// src/themes/WavelengthAppTheme.tsx
|
|
96
513
|
|
|
97
514
|
var WavelengthAppTheme = _react.createContext.call(void 0, {});
|
|
@@ -990,11 +1407,11 @@ var WavelengthFileDropZone = _react.forwardRef.call(void 0,
|
|
|
990
1407
|
);
|
|
991
1408
|
WavelengthFileDropZone.displayName = "WavelengthFileDropZone";
|
|
992
1409
|
|
|
993
|
-
// src/components/SnackBar/
|
|
1410
|
+
// src/components/SnackBar/WavelengthSnackbar.tsx
|
|
994
1411
|
|
|
995
1412
|
|
|
996
1413
|
|
|
997
|
-
var
|
|
1414
|
+
var WavelengthSnackbar = ({
|
|
998
1415
|
message,
|
|
999
1416
|
duration,
|
|
1000
1417
|
backgroundColor,
|
|
@@ -1161,6 +1578,75 @@ function WavelengthPermissionAlert({
|
|
|
1161
1578
|
}
|
|
1162
1579
|
WavelengthPermissionAlert.displayName = "WavelengthPermissionAlert";
|
|
1163
1580
|
|
|
1581
|
+
// src/components/PageComponents/WavelengthDragAndDrop.tsx
|
|
1582
|
+
|
|
1583
|
+
function WavelengthDragAndDrop({
|
|
1584
|
+
width = "550px",
|
|
1585
|
+
height = "230px",
|
|
1586
|
+
onFilesSelected,
|
|
1587
|
+
border,
|
|
1588
|
+
textColor,
|
|
1589
|
+
fontSize = "12px",
|
|
1590
|
+
allowedFileMIME,
|
|
1591
|
+
allowedFileExtensions,
|
|
1592
|
+
backgroundColor = "transparent",
|
|
1593
|
+
dataTestId,
|
|
1594
|
+
id
|
|
1595
|
+
}) {
|
|
1596
|
+
const handleFileChange = (event) => {
|
|
1597
|
+
const selectedFiles = event.target.files;
|
|
1598
|
+
if (selectedFiles && selectedFiles.length > 0) {
|
|
1599
|
+
const newFiles = Array.from(selectedFiles);
|
|
1600
|
+
onFilesSelected(newFiles);
|
|
1601
|
+
}
|
|
1602
|
+
};
|
|
1603
|
+
const handleDrop = (event) => {
|
|
1604
|
+
event.preventDefault();
|
|
1605
|
+
const droppedFiles = event.dataTransfer.files;
|
|
1606
|
+
if (droppedFiles.length > 0) {
|
|
1607
|
+
const newFiles = Array.from(droppedFiles);
|
|
1608
|
+
const allowedTypes = allowedFileMIME ? allowedFileMIME : "*/*";
|
|
1609
|
+
const validFiles = newFiles.filter((file) => allowedTypes === "*/*" || allowedTypes.includes(file.type));
|
|
1610
|
+
if (validFiles.length > 0) {
|
|
1611
|
+
onFilesSelected(validFiles);
|
|
1612
|
+
} else {
|
|
1613
|
+
alert(`Invalid file type`);
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
};
|
|
1617
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1618
|
+
"div",
|
|
1619
|
+
{
|
|
1620
|
+
id,
|
|
1621
|
+
"data-testid": dataTestId,
|
|
1622
|
+
style: {
|
|
1623
|
+
backgroundColor,
|
|
1624
|
+
border: border ? border : "1px dashed rgba(14, 178, 178, 1)",
|
|
1625
|
+
borderRadius: "8px",
|
|
1626
|
+
paddingTop: "10px",
|
|
1627
|
+
boxSizing: "border-box",
|
|
1628
|
+
width,
|
|
1629
|
+
height,
|
|
1630
|
+
cursor: "pointer",
|
|
1631
|
+
display: "flex",
|
|
1632
|
+
flexDirection: "column",
|
|
1633
|
+
justifyContent: "center",
|
|
1634
|
+
alignItems: "center",
|
|
1635
|
+
overflow: "scroll"
|
|
1636
|
+
},
|
|
1637
|
+
onDrop: handleDrop,
|
|
1638
|
+
onDragOver: (event) => event.preventDefault(),
|
|
1639
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { fontSize, color: textColor }, children: [
|
|
1640
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { type: "file", hidden: true, multiple: true, id: "browse", onChange: handleFileChange, accept: allowedFileExtensions }),
|
|
1641
|
+
"Drag File here or",
|
|
1642
|
+
" ",
|
|
1643
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "browse", style: { textDecoration: "underline", cursor: "pointer" }, children: "select from files" })
|
|
1644
|
+
] })
|
|
1645
|
+
}
|
|
1646
|
+
);
|
|
1647
|
+
}
|
|
1648
|
+
WavelengthDragAndDrop.displayName = "WavelengthDragAndDrop";
|
|
1649
|
+
|
|
1164
1650
|
// src/components/PageComponents/WavelengthToolTip.tsx
|
|
1165
1651
|
|
|
1166
1652
|
|
|
@@ -2205,7 +2691,7 @@ WavelengthInput.displayName = "WavelengthInput";
|
|
|
2205
2691
|
|
|
2206
2692
|
// src/components/DataTable/WavelengthDataTable.tsx
|
|
2207
2693
|
|
|
2208
|
-
|
|
2694
|
+
|
|
2209
2695
|
|
|
2210
2696
|
var ModalInputDiv = _styledcomponents2.default.div`
|
|
2211
2697
|
display: flex;
|
|
@@ -3658,9 +4144,6 @@ var WavelengthNotificationPanel = ({
|
|
|
3658
4144
|
_react.useEffect.call(void 0, () => {
|
|
3659
4145
|
const el = ref.current;
|
|
3660
4146
|
if (!el) return;
|
|
3661
|
-
if (typeof rest.onSignOut === "function") {
|
|
3662
|
-
el.onSignOut = rest.onSignOut;
|
|
3663
|
-
}
|
|
3664
4147
|
if (username !== void 0) {
|
|
3665
4148
|
el.username = username;
|
|
3666
4149
|
}
|
|
@@ -3796,5 +4279,7 @@ WavelengthCheckboxList.displayName = "WavelengthCheckboxList";
|
|
|
3796
4279
|
|
|
3797
4280
|
|
|
3798
4281
|
|
|
3799
|
-
|
|
4282
|
+
|
|
4283
|
+
|
|
4284
|
+
exports.ChildDataTable = ChildDataTable2; exports.ChildDataTableElement = _webcomponents.ChildDataTable; exports.NestedDataTable = NestedDataTable; exports.SampleComponent = SampleComponent; exports.SampleComponentElement = _webcomponents.SampleComponent; exports.WavelengthAppLogo = WavelengthAppLogo; exports.WavelengthAppTheme = WavelengthAppTheme; exports.WavelengthAutoComplete = WavelengthAutoComplete; exports.WavelengthBadge = WavelengthBadge; exports.WavelengthBanner = WavelengthBanner; exports.WavelengthBannerElement = _webcomponents.WavelengthBanner; exports.WavelengthButton = WavelengthButton; exports.WavelengthButtonElement = _webcomponents.WavelengthButton; exports.WavelengthCard = WavelengthCard; exports.WavelengthCheckbox = WavelengthCheckbox; exports.WavelengthCheckboxList = WavelengthCheckboxList; exports.WavelengthCommentDisplay = WavelengthCommentDisplay; exports.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDataGrid = WavelengthDataGrid; exports.WavelengthDataTable = WavelengthDataTable; exports.WavelengthDatePicker = WavelengthDatePicker; exports.WavelengthDatePickerElement = _webcomponents.WavelengthDatePicker; exports.WavelengthDefaultIcon = WavelengthDefaultIcon; exports.WavelengthDialog = WavelengthDialog; exports.WavelengthDragAndDrop = WavelengthDragAndDrop; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDropZone = WavelengthFileDropZone; exports.WavelengthForm = WavelengthForm; exports.WavelengthFormElement = _webcomponents.WavelengthForm; exports.WavelengthInput = WavelengthInput; exports.WavelengthInputElement = _webcomponents.WavelengthInput; exports.WavelengthManyPlanes = WavelengthManyPlanes; exports.WavelengthMenu = WavelengthMenu; exports.WavelengthMultiSelectAutocomplete = WavelengthMultiSelectAutocomplete; exports.WavelengthMultiSelectAutocompleteElement = _webcomponents.WavelengthMultiSelectAutocomplete; exports.WavelengthNavBar = WavelengthNavBar; exports.WavelengthNotAvailablePage = WavelengthNotAvailablePage; exports.WavelengthNotificationPanel = WavelengthNotificationPanel; exports.WavelengthPagination = WavelengthPagination; exports.WavelengthPaginationElement = _webcomponents.WavelengthPagination; exports.WavelengthPermissionAlert = WavelengthPermissionAlert; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; exports.WavelengthProgressBar = WavelengthProgressBar; exports.WavelengthProgressBarElement = _webcomponents.WavelengthProgressBar; exports.WavelengthSearch = WavelengthSearch; exports.WavelengthSideBar = WavelengthSideBar; exports.WavelengthSlider = WavelengthSlider; exports.WavelengthSnackbar = WavelengthSnackbar; exports.WavelengthSpinningLogo = WavelengthSpinningLogo; exports.WavelengthStyledButton = WavelengthStyledButton; exports.WavelengthSwitch = WavelengthSwitch; exports.WavelengthTitleBar = WavelengthTitleBar; exports.WavelengthTitleBarElement = _webcomponents.WavelengthTitleBar; exports.WavelengthToolTip = WavelengthToolTip; exports.add = add; exports.concat = concat; exports.useThemeContext = useThemeContext;
|
|
3800
4285
|
//# sourceMappingURL=index.cjs.map
|