@indico-data/design-system 2.17.1 → 2.18.0

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 (38) hide show
  1. package/lib/index.css +616 -151
  2. package/lib/index.d.ts +9 -9
  3. package/lib/index.esm.css +616 -151
  4. package/lib/index.esm.js +5 -453
  5. package/lib/index.esm.js.map +1 -1
  6. package/lib/index.js +5 -453
  7. package/lib/index.js.map +1 -1
  8. package/lib/src/components/button/Button.stories.d.ts +1 -0
  9. package/lib/src/components/table/Table.d.ts +1 -10
  10. package/lib/src/components/table/types.d.ts +10 -0
  11. package/lib/src/legacy/components/modals/ModalBase/ModalBase.d.ts +0 -1
  12. package/lib/src/types.d.ts +2 -0
  13. package/package.json +1 -1
  14. package/src/components/button/Button.mdx +6 -3
  15. package/src/components/button/Button.stories.tsx +8 -0
  16. package/src/components/button/Button.tsx +14 -6
  17. package/src/components/button/__tests__/Button.test.tsx +38 -0
  18. package/src/components/button/styles/Button.scss +14 -22
  19. package/src/components/button/styles/_variables.scss +77 -4
  20. package/src/components/forms/checkbox/styles/Checkbox.scss +3 -3
  21. package/src/components/forms/input/styles/Input.scss +2 -4
  22. package/src/components/forms/passwordInput/styles/PasswordInput.scss +2 -4
  23. package/src/components/forms/radio/styles/Radio.scss +3 -3
  24. package/src/components/forms/select/styles/Select.scss +21 -4
  25. package/src/components/forms/textarea/styles/Textarea.scss +2 -3
  26. package/src/components/forms/toggle/styles/Toggle.scss +2 -2
  27. package/src/components/table/Table.tsx +1 -16
  28. package/src/components/table/types.ts +20 -0
  29. package/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.scss +441 -0
  30. package/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.tsx +3 -4
  31. package/src/legacy/components/modals/ModalBase/ModalBase.tsx +5 -1
  32. package/src/styles/globals.scss +11 -0
  33. package/src/styles/index.scss +2 -2
  34. package/src/styles/variables/themes/dark.scss +8 -7
  35. package/src/styles/variables/themes/light.scss +1 -0
  36. package/src/types.ts +3 -0
  37. package/lib/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.styles.d.ts +0 -1
  38. package/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.styles.ts +0 -449
@@ -1,449 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- export const StyledNoInputDatePicker = styled.div`
4
- /************************************
5
- * Default react-day-picker styling - this needed to be added because we were unable to import styling as specified by the docs (most likely because we are not using webpack)
6
- *************************************/
7
-
8
- .rdp {
9
- --rdp-cell-size: 40px;
10
- --rdp-accent-color: #6833d0;
11
- --rdp-background-color: #ffffff;
12
- --rdp-accent-color-dark: #3003e1;
13
- --rdp-background-color-dark: #180270;
14
- --rdp-outline: 2px solid var(--rdp-accent-color); /* Outline border for focused elements */
15
- --rdp-outline-selected: 3px solid var(--rdp-accent-color); /* Outline border for focused _and_ selected elements */
16
-
17
- margin: 1em;
18
- }
19
-
20
- /* Hide elements for devices that are not screen readers */
21
- .rdp-vhidden {
22
- box-sizing: border-box;
23
- padding: 0;
24
- margin: 0;
25
- background: transparent;
26
- border: 0;
27
- -moz-appearance: none;
28
- -webkit-appearance: none;
29
- appearance: none;
30
- position: absolute !important;
31
- top: 0;
32
- width: 1px !important;
33
- height: 1px !important;
34
- padding: 0 !important;
35
- overflow: hidden !important;
36
- clip: rect(1px, 1px, 1px, 1px) !important;
37
- border: 0 !important;
38
- }
39
-
40
- /* Buttons */
41
- .rdp-button_reset {
42
- appearance: none;
43
- position: relative;
44
- margin: 0;
45
- padding: 0;
46
- cursor: default;
47
- color: inherit;
48
- background: none;
49
- font: inherit;
50
-
51
- -moz-appearance: none;
52
- -webkit-appearance: none;
53
- }
54
-
55
- .rdp-button_reset:focus-visible {
56
- /* Make sure to reset outline only when :focus-visible is supported */
57
- outline: none;
58
- }
59
-
60
- .rdp-button {
61
- border: 2px solid transparent;
62
- }
63
-
64
- .rdp-button[disabled]:not(.rdp-day_selected) {
65
- opacity: 0.25;
66
- }
67
-
68
- .rdp-button:not([disabled]) {
69
- cursor: pointer;
70
- }
71
-
72
- .rdp-button:focus-visible:not([disabled]) {
73
- color: inherit;
74
- background-color: var(--rdp-background-color);
75
- border: var(--rdp-outline);
76
- }
77
-
78
- .rdp-months {
79
- display: flex;
80
- }
81
-
82
- .rdp-month {
83
- margin: 0 1em;
84
- }
85
-
86
- .rdp-month:first-child {
87
- margin-left: 0;
88
- }
89
-
90
- .rdp-month:last-child {
91
- margin-right: 0;
92
- }
93
-
94
- .rdp-table {
95
- margin: 0;
96
- max-width: calc(var(--rdp-cell-size) * 7);
97
- border-collapse: collapse;
98
- }
99
-
100
- .rdp-with_weeknumber .rdp-table {
101
- max-width: calc(var(--rdp-cell-size) * 8);
102
- border-collapse: collapse;
103
- }
104
-
105
- .rdp-caption {
106
- display: flex;
107
- align-items: center;
108
- justify-content: space-between;
109
- padding: 0;
110
- text-align: left;
111
- }
112
-
113
- .rdp-multiple_months .rdp-caption {
114
- position: relative;
115
- display: block;
116
- text-align: center;
117
- }
118
-
119
- .rdp-caption_dropdowns {
120
- position: relative;
121
- display: inline-flex;
122
- }
123
-
124
- .rdp-caption_label {
125
- position: relative;
126
- z-index: 1;
127
- display: inline-flex;
128
- align-items: center;
129
- margin: 0;
130
- padding: 0 0.25em;
131
- white-space: nowrap;
132
- color: currentColor;
133
- border: 0;
134
- border: 2px solid transparent;
135
- font-family: inherit;
136
- font-size: 140%;
137
- font-weight: bold;
138
- }
139
-
140
- .rdp-nav {
141
- white-space: nowrap;
142
- }
143
-
144
- .rdp-multiple_months .rdp-caption_start .rdp-nav {
145
- position: absolute;
146
- top: 50%;
147
- left: 0;
148
- transform: translateY(-50%);
149
- }
150
-
151
- .rdp-multiple_months .rdp-caption_end .rdp-nav {
152
- position: absolute;
153
- top: 50%;
154
- right: 0;
155
- transform: translateY(-50%);
156
- }
157
-
158
- .rdp-nav_button {
159
- display: inline-flex;
160
- align-items: center;
161
- justify-content: center;
162
- width: var(--rdp-cell-size);
163
- height: var(--rdp-cell-size);
164
- padding: 0.25em;
165
- border-radius: 100%;
166
- }
167
-
168
- /* ---------- */
169
- /* Dropdowns */
170
- /* ---------- */
171
-
172
- .rdp-dropdown_year,
173
- .rdp-dropdown_month {
174
- position: relative;
175
- display: inline-flex;
176
- align-items: center;
177
- }
178
-
179
- .rdp-dropdown {
180
- appearance: none;
181
- position: absolute;
182
- z-index: 2;
183
- top: 0;
184
- bottom: 0;
185
- left: 0;
186
- width: 100%;
187
- margin: 0;
188
- padding: 0;
189
- cursor: inherit;
190
- opacity: 0;
191
- border: none;
192
- background-color: transparent;
193
- font-family: inherit;
194
- font-size: inherit;
195
- line-height: inherit;
196
- }
197
-
198
- .rdp-dropdown[disabled] {
199
- opacity: unset;
200
- color: unset;
201
- }
202
-
203
- .rdp-dropdown:focus-visible:not([disabled]) + .rdp-caption_label {
204
- background-color: var(--rdp-background-color);
205
- border: var(--rdp-outline);
206
- border-radius: 6px;
207
- }
208
-
209
- .rdp-dropdown_icon {
210
- margin: 0 0 0 5px;
211
- }
212
-
213
- .rdp-head {
214
- border: 0;
215
- }
216
-
217
- .rdp-head_row,
218
- .rdp-row {
219
- height: 100%;
220
- }
221
-
222
- .rdp-head_cell {
223
- vertical-align: middle;
224
- font-size: 0.75em;
225
- font-weight: 700;
226
- text-align: center;
227
- height: 100%;
228
- height: var(--rdp-cell-size);
229
- padding: 0;
230
- }
231
-
232
- .rdp-tbody {
233
- border: 0;
234
- }
235
-
236
- .rdp-tfoot {
237
- margin: 0.5em;
238
- }
239
-
240
- .rdp-cell {
241
- width: var(--rdp-cell-size);
242
- height: 100%;
243
- height: var(--rdp-cell-size);
244
- padding: 0;
245
- text-align: center;
246
- }
247
-
248
- .rdp-weeknumber {
249
- font-size: 0.75em;
250
- }
251
-
252
- .rdp-weeknumber,
253
- .rdp-day {
254
- display: flex;
255
- overflow: hidden;
256
- align-items: center;
257
- justify-content: center;
258
- box-sizing: border-box;
259
- width: var(--rdp-cell-size);
260
- max-width: var(--rdp-cell-size);
261
- height: var(--rdp-cell-size);
262
- margin: 0;
263
- border: 2px solid transparent;
264
- border-radius: 100%;
265
- }
266
-
267
- .rdp-day_today:not(.rdp-day_outside) {
268
- font-weight: bold;
269
- }
270
-
271
- .rdp-day_selected,
272
- .rdp-day_selected:focus-visible,
273
- .rdp-day_selected:hover {
274
- color: white;
275
- opacity: 1;
276
- background-color: var(--rdp-accent-color);
277
- }
278
-
279
- .rdp-day_outside {
280
- opacity: 0.5;
281
- }
282
-
283
- .rdp-day_selected:focus-visible {
284
- /* Since the background is the same use again the outline */
285
- outline: var(--rdp-outline);
286
- outline-offset: 2px;
287
- z-index: 1;
288
- }
289
-
290
- .rdp:not([dir='rtl']) .rdp-day_range_start:not(.rdp-day_range_end) {
291
- border-top-right-radius: 0;
292
- border-bottom-right-radius: 0;
293
- }
294
-
295
- .rdp:not([dir='rtl']) .rdp-day_range_end:not(.rdp-day_range_start) {
296
- border-top-left-radius: 0;
297
- border-bottom-left-radius: 0;
298
- }
299
-
300
- .rdp[dir='rtl'] .rdp-day_range_start:not(.rdp-day_range_end) {
301
- border-top-left-radius: 0;
302
- border-bottom-left-radius: 0;
303
- }
304
-
305
- .rdp[dir='rtl'] .rdp-day_range_end:not(.rdp-day_range_start) {
306
- border-top-right-radius: 0;
307
- border-bottom-right-radius: 0;
308
- }
309
-
310
- .rdp-day_range_end.rdp-day_range_start {
311
- border-radius: 100%;
312
- }
313
-
314
- .rdp-day_range_middle {
315
- border-radius: 0;
316
- }
317
-
318
- /*# sourceMappingURL=style.css.map */
319
-
320
- /******************************
321
- * Indico Custom Styling For Insights
322
- *******************************/
323
- .rdp-button:hover:not([disabled]):not(.rdp-day_selected) {
324
- background-color: #976cec;
325
- }
326
- .rdp-button,
327
- .rdp-day {
328
- box-shadow: none;
329
- color: #000000;
330
- &:hover {
331
- background-color: #6833d0;
332
- color: white;
333
- }
334
- }
335
-
336
- .rdp-head_cell,
337
- .rdp-cell {
338
- border: none;
339
- }
340
-
341
- .DayPickerInput-Overlay {
342
- border-radius: 4px;
343
- z-index: 999;
344
- .rdp {
345
- background: white;
346
- z-index: 999;
347
- border: solid 1px #000000;
348
- border-radius: 4px;
349
- box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.4);
350
- }
351
- }
352
-
353
- .rdp-caption_label {
354
- font-weight: 400;
355
- font-size: 14px;
356
- color: #000000;
357
- }
358
-
359
- .rdp-day_today {
360
- background-color: #dbd5e6;
361
- color: #ffffff;
362
- font-weight: 400;
363
- }
364
-
365
- .rdp-button_reset {
366
- &.rdp-button {
367
- &.rdp-day {
368
- &.rdp-day_selected {
369
- background-color: #6833d0;
370
- color: white;
371
-
372
- &:focus {
373
- color: white;
374
- }
375
- &:active {
376
- color: white;
377
- }
378
- }
379
- }
380
- }
381
- }
382
-
383
- .rdp-head_cell {
384
- color: #6833d0;
385
- font-weight: 400;
386
- }
387
-
388
- .date__picker__trigger {
389
- color: #000000;
390
- cursor: pointer;
391
- }
392
-
393
- .custom__caption {
394
- display: flex;
395
- justify-content: space-between;
396
- align-items: center;
397
- padding: 15px 5px 15px 5px;
398
-
399
- .custom__caption__text {
400
- font-size: 14px;
401
- color: #000000;
402
- margin: 0;
403
- }
404
-
405
- .custom__caption__action__button {
406
- background: none;
407
- border: none;
408
- cursor: pointer;
409
- box-shadow: none;
410
- padding: 0 5px 0 5px;
411
-
412
- border-radius: 60px;
413
- color: #6833d0;
414
- height: 20px;
415
- width: 20px;
416
-
417
- &:hover {
418
- background-color: #6833d0;
419
- color: #ffffff;
420
- border-radius: 20px;
421
-
422
- .rdp-nav_icon {
423
- color: #ffffff;
424
- }
425
- }
426
-
427
- .rdp-nav_icon {
428
- color: #6833d0;
429
- }
430
- }
431
- }
432
-
433
- .visually-hidden,
434
- .visually-hidden-focusable:not(:focus):not(:focus-within) {
435
- border: 0 !important;
436
- clip: rect(0, 0, 0, 0) !important;
437
- height: 1px !important;
438
- margin: -1px !important;
439
- overflow: hidden !important;
440
- padding: 0 !important;
441
- white-space: nowrap !important;
442
- width: 1px !important;
443
- }
444
-
445
- .visually-hidden:not(caption),
446
- .visually-hidden-focusable:not(:focus):not(:focus-within):not(caption) {
447
- position: absolute !important;
448
- }
449
- `;