@sito/ui 0.1.6 → 0.3.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 (79) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +88 -2
  3. package/dist/components/Button/Button.d.ts +2 -3
  4. package/dist/components/Button/index.d.ts +2 -2
  5. package/dist/components/Button/types.d.ts +33 -6
  6. package/dist/components/Dialog/Dialog.d.ts +7 -0
  7. package/dist/components/Dialog/DialogActions.d.ts +7 -0
  8. package/dist/components/Dialog/constants.d.ts +3 -0
  9. package/dist/components/Dialog/index.d.ts +3 -0
  10. package/dist/components/Dialog/types.d.ts +61 -0
  11. package/dist/components/Dialog/utils.d.ts +19 -0
  12. package/dist/components/IconButton/IconButton.d.ts +2 -3
  13. package/dist/components/IconButton/index.d.ts +2 -2
  14. package/dist/components/IconButton/types.d.ts +21 -5
  15. package/dist/components/index.d.ts +6 -10
  16. package/dist/hooks/index.d.ts +2 -2
  17. package/dist/hooks/useDialog/index.d.ts +2 -0
  18. package/dist/hooks/useDialog/types.d.ts +7 -0
  19. package/dist/hooks/useDialog/useDialog.d.ts +7 -0
  20. package/dist/main.d.ts +4 -3
  21. package/dist/styles.css +398 -0
  22. package/dist/theme.css +83 -0
  23. package/dist/ui.cjs +1 -11
  24. package/dist/ui.d.ts +2 -1
  25. package/dist/ui.js +261 -1732
  26. package/dist/utils/classNames.d.ts +6 -0
  27. package/dist/utils/index.d.ts +1 -0
  28. package/package.json +94 -54
  29. package/dist/components/Button/styles.d.ts +0 -5
  30. package/dist/components/Error/Error.d.ts +0 -3
  31. package/dist/components/Error/Handler.d.ts +0 -3
  32. package/dist/components/Error/index.d.ts +0 -4
  33. package/dist/components/Error/styles.d.ts +0 -4
  34. package/dist/components/Error/types.d.ts +0 -18
  35. package/dist/components/Image/Image.d.ts +0 -3
  36. package/dist/components/Image/index.d.ts +0 -3
  37. package/dist/components/Image/styles.d.ts +0 -9
  38. package/dist/components/Image/types.d.ts +0 -4
  39. package/dist/components/InputControl/Input.d.ts +0 -4
  40. package/dist/components/InputControl/Select.d.ts +0 -4
  41. package/dist/components/InputControl/Textarea.d.ts +0 -4
  42. package/dist/components/InputControl/index.d.ts +0 -5
  43. package/dist/components/InputControl/styles.d.ts +0 -4
  44. package/dist/components/InputControl/types.d.ts +0 -33
  45. package/dist/components/Loading/Loading.d.ts +0 -3
  46. package/dist/components/Loading/index.d.ts +0 -3
  47. package/dist/components/Loading/styles.d.ts +0 -11
  48. package/dist/components/Loading/types.d.ts +0 -8
  49. package/dist/components/Notification/Notification.d.ts +0 -2
  50. package/dist/components/Notification/index.d.ts +0 -3
  51. package/dist/components/Notification/styles.d.ts +0 -9
  52. package/dist/components/Notification/types.d.ts +0 -4
  53. package/dist/components/PrintAfter/PrintAfter.d.ts +0 -4
  54. package/dist/components/PrintAfter/index.d.ts +0 -3
  55. package/dist/components/PrintAfter/types.d.ts +0 -7
  56. package/dist/components/SplashScreen/SplashScreen.d.ts +0 -3
  57. package/dist/components/SplashScreen/index.d.ts +0 -3
  58. package/dist/components/SplashScreen/styles.d.ts +0 -9
  59. package/dist/components/SplashScreen/types.d.ts +0 -9
  60. package/dist/components/Switch/Switch.d.ts +0 -4
  61. package/dist/components/Switch/index.d.ts +0 -3
  62. package/dist/components/Switch/styles.d.ts +0 -4
  63. package/dist/components/Switch/types.d.ts +0 -8
  64. package/dist/hooks/useIsElementInViewport/index.d.ts +0 -5
  65. package/dist/hooks/useScreenHandler/index.d.ts +0 -7
  66. package/dist/lib/Notification.d.ts +0 -11
  67. package/dist/lib/index.d.ts +0 -3
  68. package/dist/main.css +0 -1
  69. package/dist/providers/ModeProvider/ModeProvider.d.ts +0 -3
  70. package/dist/providers/ModeProvider/index.d.ts +0 -2
  71. package/dist/providers/ModeProvider/types.d.ts +0 -10
  72. package/dist/providers/NotificationProvider/NotificationProvider.d.ts +0 -7
  73. package/dist/providers/NotificationProvider/index.d.ts +0 -2
  74. package/dist/providers/NotificationProvider/types.d.ts +0 -20
  75. package/dist/providers/StyleProvider/StyleProvider.d.ts +0 -4
  76. package/dist/providers/StyleProvider/data.d.ts +0 -4
  77. package/dist/providers/StyleProvider/index.d.ts +0 -3
  78. package/dist/providers/StyleProvider/types.d.ts +0 -27
  79. package/dist/providers/index.d.ts +0 -3
@@ -0,0 +1,398 @@
1
+ :root {
2
+ --sito-ui-color-text: #101010;
3
+ --sito-ui-color-surface: #ffffff;
4
+ --sito-ui-color-border: #d9dde4;
5
+
6
+ --sito-ui-color-default-text: #101010;
7
+ --sito-ui-color-default-light: #f4f6f8;
8
+ --sito-ui-color-default-default: #e9edf2;
9
+ --sito-ui-color-default-hover: #dfe5ec;
10
+
11
+ --sito-ui-color-primary-text: #ededed;
12
+ --sito-ui-color-primary-light: rgb(205 33 42 / 10%);
13
+ --sito-ui-color-primary-default: #cd212a;
14
+ --sito-ui-color-primary-hover: #d74d54;
15
+
16
+ --sito-ui-color-secondary-text: #f7f7f7;
17
+ --sito-ui-color-secondary-light: rgb(4 30 66 / 10%);
18
+ --sito-ui-color-secondary-default: #041e42;
19
+ --sito-ui-color-secondary-hover: #364b67;
20
+
21
+ --sito-ui-color-error-text: #f7f7f7;
22
+ --sito-ui-color-error-light: rgb(204 0 0 / 10%);
23
+ --sito-ui-color-error-default: #cc0000;
24
+ --sito-ui-color-error-hover: #d63333;
25
+
26
+ --sito-ui-color-warning-text: #101010;
27
+ --sito-ui-color-warning-light: rgb(219 175 0 / 10%);
28
+ --sito-ui-color-warning-default: #dbaf00;
29
+ --sito-ui-color-warning-hover: #e2bf33;
30
+
31
+ --sito-ui-color-success-text: #f7f7f7;
32
+ --sito-ui-color-success-light: rgb(0 119 51 / 10%);
33
+ --sito-ui-color-success-default: #007733;
34
+ --sito-ui-color-success-hover: #559b33;
35
+
36
+ --sito-ui-color-info-text: #f7f7f7;
37
+ --sito-ui-color-info-light: rgb(0 126 168 / 10%);
38
+ --sito-ui-color-info-default: #007ea8;
39
+ --sito-ui-color-info-hover: #3397b9;
40
+
41
+ --sito-ui-space-0: 0;
42
+ --sito-ui-space-1: 0.25rem;
43
+ --sito-ui-space-2: 0.5rem;
44
+ --sito-ui-space-3: 0.75rem;
45
+ --sito-ui-space-4: 1rem;
46
+ --sito-ui-space-5: 1.25rem;
47
+
48
+ --sito-ui-size-button-sm: 32px;
49
+ --sito-ui-size-button-md: 40px;
50
+ --sito-ui-size-button-lg: 48px;
51
+ --sito-ui-size-icon-button-sm: 28px;
52
+ --sito-ui-size-icon-button-md: 40px;
53
+ --sito-ui-size-icon-button-lg: 48px;
54
+ --sito-ui-size-icon-button: var(--sito-ui-size-icon-button-md);
55
+ --sito-ui-size-icon-button-icon: 1.25rem;
56
+ --sito-ui-size-button-spinner: 1em;
57
+
58
+ --sito-ui-radius-pill: 1.5rem;
59
+ --sito-ui-radius-round: 100%;
60
+ --sito-ui-radius-dialog: 1rem;
61
+
62
+ --sito-ui-border-width-thin: 1px;
63
+ --sito-ui-button-spinner-border-width: 2px;
64
+
65
+ --sito-ui-font-weight-semibold: 600;
66
+ --sito-ui-font-size-button: 0.875rem;
67
+ --sito-ui-font-size-dialog-title: 1.25rem;
68
+ --sito-ui-line-height-button: 1.25rem;
69
+ --sito-ui-line-height-dialog-title: 1.75rem;
70
+
71
+ --sito-ui-motion-duration-normal: 300ms;
72
+ --sito-ui-motion-duration-spin: 600ms;
73
+ --sito-ui-motion-duration-spin-reduced: 1500ms;
74
+ --sito-ui-motion-easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
75
+
76
+ --sito-ui-shadow-dialog: 0 1rem 3rem rgb(16 24 40 / 18%);
77
+ --sito-ui-z-index-dialog: 50;
78
+
79
+ --sito-ui-button-disabled-opacity: 0.6;
80
+ --sito-ui-button-active-scale: 0.97;
81
+ --sito-ui-dialog-backdrop-background: rgb(16 24 40 / 20%);
82
+ --sito-ui-dialog-backdrop-filter: blur(1rem);
83
+ }
84
+
85
+ .sito-ui-button {
86
+ --sito-ui-button-text: var(--sito-ui-color-default-text);
87
+ --sito-ui-button-light: var(--sito-ui-color-default-light);
88
+ --sito-ui-button-default: var(--sito-ui-color-default-default);
89
+ --sito-ui-button-hover: var(--sito-ui-color-default-hover);
90
+ --sito-ui-button-height: var(--sito-ui-size-button-md, 40px);
91
+ --sito-ui-button-padding-block: var(--sito-ui-space-2);
92
+ --sito-ui-button-padding-inline: var(--sito-ui-space-4);
93
+
94
+ display: flex;
95
+ box-sizing: border-box;
96
+ gap: var(--sito-ui-space-2);
97
+ font-weight: var(--sito-ui-font-weight-semibold);
98
+ cursor: default;
99
+ align-items: center;
100
+ justify-content: center;
101
+ height: var(--sito-ui-button-height);
102
+ padding: var(--sito-ui-button-padding-block)
103
+ var(--sito-ui-button-padding-inline);
104
+ border-radius: var(--sito-ui-radius-pill);
105
+ border: var(--sito-ui-border-width-thin) solid transparent;
106
+ background-color: transparent;
107
+ color: var(--sito-ui-color-text);
108
+ font-size: var(--sito-ui-font-size-button);
109
+ line-height: var(--sito-ui-line-height-button);
110
+ transition-duration: var(--sito-ui-motion-duration-normal);
111
+ transition-property:
112
+ color, background-color, border-color, text-decoration-color, fill, stroke,
113
+ opacity, box-shadow, transform, filter, backdrop-filter;
114
+ transition-timing-function: var(--sito-ui-motion-easing-standard);
115
+ }
116
+
117
+ .sito-ui-button--sm {
118
+ --sito-ui-button-height: var(--sito-ui-size-button-sm, 32px);
119
+ --sito-ui-button-padding-block: var(--sito-ui-space-1);
120
+ --sito-ui-button-padding-inline: var(--sito-ui-space-3);
121
+ }
122
+
123
+ .sito-ui-button--md {
124
+ --sito-ui-button-height: var(--sito-ui-size-button-md, 40px);
125
+ --sito-ui-button-padding-block: var(--sito-ui-space-2);
126
+ --sito-ui-button-padding-inline: var(--sito-ui-space-4);
127
+ }
128
+
129
+ .sito-ui-button--lg {
130
+ --sito-ui-button-height: var(--sito-ui-size-button-lg, 48px);
131
+ --sito-ui-button-padding-block: var(--sito-ui-space-3);
132
+ --sito-ui-button-padding-inline: var(--sito-ui-space-5);
133
+ }
134
+
135
+ .sito-ui-button:enabled:not([aria-disabled="true"]) {
136
+ cursor: pointer;
137
+ }
138
+
139
+ .sito-ui-button--default {
140
+ --sito-ui-button-text: var(--sito-ui-color-default-text);
141
+ --sito-ui-button-light: var(--sito-ui-color-default-light);
142
+ --sito-ui-button-default: var(--sito-ui-color-default-default);
143
+ --sito-ui-button-hover: var(--sito-ui-color-default-hover);
144
+ }
145
+
146
+ .sito-ui-button--primary {
147
+ --sito-ui-button-text: var(--sito-ui-color-primary-text);
148
+ --sito-ui-button-light: var(--sito-ui-color-primary-light);
149
+ --sito-ui-button-default: var(--sito-ui-color-primary-default);
150
+ --sito-ui-button-hover: var(--sito-ui-color-primary-hover);
151
+ }
152
+
153
+ .sito-ui-button--secondary {
154
+ --sito-ui-button-text: var(--sito-ui-color-secondary-text);
155
+ --sito-ui-button-light: var(--sito-ui-color-secondary-light);
156
+ --sito-ui-button-default: var(--sito-ui-color-secondary-default);
157
+ --sito-ui-button-hover: var(--sito-ui-color-secondary-hover);
158
+ }
159
+
160
+ .sito-ui-button--error {
161
+ --sito-ui-button-text: var(--sito-ui-color-error-text);
162
+ --sito-ui-button-light: var(--sito-ui-color-error-light);
163
+ --sito-ui-button-default: var(--sito-ui-color-error-default);
164
+ --sito-ui-button-hover: var(--sito-ui-color-error-hover);
165
+ }
166
+
167
+ .sito-ui-button--warning {
168
+ --sito-ui-button-text: var(--sito-ui-color-warning-text);
169
+ --sito-ui-button-light: var(--sito-ui-color-warning-light);
170
+ --sito-ui-button-default: var(--sito-ui-color-warning-default);
171
+ --sito-ui-button-hover: var(--sito-ui-color-warning-hover);
172
+ }
173
+
174
+ .sito-ui-button--success {
175
+ --sito-ui-button-text: var(--sito-ui-color-success-text);
176
+ --sito-ui-button-light: var(--sito-ui-color-success-light);
177
+ --sito-ui-button-default: var(--sito-ui-color-success-default);
178
+ --sito-ui-button-hover: var(--sito-ui-color-success-hover);
179
+ }
180
+
181
+ .sito-ui-button--info {
182
+ --sito-ui-button-text: var(--sito-ui-color-info-text);
183
+ --sito-ui-button-light: var(--sito-ui-color-info-light);
184
+ --sito-ui-button-default: var(--sito-ui-color-info-default);
185
+ --sito-ui-button-hover: var(--sito-ui-color-info-hover);
186
+ }
187
+
188
+ .sito-ui-button--text {
189
+ color: var(--sito-ui-color-text);
190
+ }
191
+
192
+ .sito-ui-button--text.sito-ui-button--primary,
193
+ .sito-ui-button--text.sito-ui-button--secondary,
194
+ .sito-ui-button--text.sito-ui-button--error,
195
+ .sito-ui-button--text.sito-ui-button--warning,
196
+ .sito-ui-button--text.sito-ui-button--success,
197
+ .sito-ui-button--text.sito-ui-button--info {
198
+ color: var(--sito-ui-button-default);
199
+ }
200
+
201
+ .sito-ui-button--text:enabled:not([aria-disabled="true"]):hover {
202
+ background-color: var(--sito-ui-button-light);
203
+ }
204
+
205
+ .sito-ui-button--submit {
206
+ color: var(--sito-ui-button-text);
207
+ background-color: var(--sito-ui-button-default);
208
+ }
209
+
210
+ .sito-ui-button--submit:enabled:not([aria-disabled="true"]):hover {
211
+ background-color: var(--sito-ui-button-hover);
212
+ }
213
+
214
+ .sito-ui-button--outlined {
215
+ color: var(--sito-ui-button-default);
216
+ border-color: var(--sito-ui-button-default);
217
+ background-color: transparent;
218
+ }
219
+
220
+ .sito-ui-button--outlined.sito-ui-button--default {
221
+ color: var(--sito-ui-color-text);
222
+ border-color: var(--sito-ui-color-border);
223
+ }
224
+
225
+ .sito-ui-button--outlined:enabled:not([aria-disabled="true"]):hover {
226
+ color: var(--sito-ui-button-text);
227
+ border-color: var(--sito-ui-button-hover);
228
+ background-color: var(--sito-ui-button-hover);
229
+ }
230
+
231
+ .sito-ui-button:enabled:not([aria-disabled="true"]):active {
232
+ transform: scale(var(--sito-ui-button-active-scale));
233
+ }
234
+
235
+ .sito-ui-button__spinner {
236
+ width: var(--sito-ui-size-button-spinner);
237
+ height: var(--sito-ui-size-button-spinner);
238
+ flex: 0 0 auto;
239
+ border: var(--sito-ui-button-spinner-border-width) solid currentColor;
240
+ border-right-color: transparent;
241
+ border-radius: var(--sito-ui-radius-round);
242
+ animation: sito-ui-button-spin var(--sito-ui-motion-duration-spin) linear
243
+ infinite;
244
+ }
245
+
246
+ .sito-ui-button__loading-label {
247
+ position: absolute;
248
+ width: 1px;
249
+ height: 1px;
250
+ overflow: hidden;
251
+ clip: rect(0, 0, 0, 0);
252
+ white-space: nowrap;
253
+ }
254
+
255
+ .sito-ui-button:disabled,
256
+ .sito-ui-button[aria-disabled="true"] {
257
+ cursor: not-allowed;
258
+ opacity: var(--sito-ui-button-disabled-opacity);
259
+ }
260
+
261
+ @media (prefers-reduced-motion: reduce) {
262
+ .sito-ui-button__spinner {
263
+ animation-duration: var(--sito-ui-motion-duration-spin-reduced);
264
+ }
265
+ }
266
+
267
+ @keyframes sito-ui-button-spin {
268
+ to {
269
+ transform: rotate(360deg);
270
+ }
271
+ }
272
+
273
+ .sito-ui-icon-button {
274
+ --sito-ui-icon-button-container-size: var(--sito-ui-size-icon-button-md);
275
+ --sito-ui-icon-button-icon-size: var(--sito-ui-size-icon-button-icon);
276
+ --sito-ui-size-button-spinner: var(--sito-ui-icon-button-icon-size);
277
+
278
+ box-sizing: border-box;
279
+ min-width: var(--sito-ui-icon-button-container-size);
280
+ min-height: var(--sito-ui-icon-button-container-size);
281
+ width: var(--sito-ui-icon-button-container-size);
282
+ height: var(--sito-ui-icon-button-container-size);
283
+ border-radius: var(--sito-ui-radius-round);
284
+ padding: var(--sito-ui-space-0);
285
+ }
286
+
287
+ .sito-ui-icon-button--sm {
288
+ --sito-ui-icon-button-container-size: var(--sito-ui-size-icon-button-sm);
289
+ }
290
+
291
+ .sito-ui-icon-button--md {
292
+ --sito-ui-icon-button-container-size: var(--sito-ui-size-icon-button-md);
293
+ }
294
+
295
+ .sito-ui-icon-button--lg {
296
+ --sito-ui-icon-button-container-size: var(--sito-ui-size-icon-button-lg);
297
+ }
298
+
299
+ .sito-ui-icon-button--with-content {
300
+ width: auto;
301
+ height: auto;
302
+ padding: var(--sito-ui-button-padding-block)
303
+ var(--sito-ui-button-padding-inline);
304
+ border-radius: var(--sito-ui-radius-pill);
305
+ font-size: var(--sito-ui-font-size-button);
306
+ line-height: var(--sito-ui-line-height-button);
307
+ }
308
+
309
+ .sito-ui-icon-button__icon {
310
+ display: inline-flex;
311
+ flex: 0 0 auto;
312
+ align-items: center;
313
+ justify-content: center;
314
+ width: var(--sito-ui-icon-button-icon-size);
315
+ height: var(--sito-ui-icon-button-icon-size);
316
+ font-size: var(--sito-ui-icon-button-icon-size);
317
+ line-height: 1;
318
+ }
319
+
320
+ .sito-ui-dialog-backdrop {
321
+ position: fixed;
322
+ inset: 0;
323
+ z-index: var(--sito-ui-z-index-dialog);
324
+ display: flex;
325
+ align-items: center;
326
+ justify-content: center;
327
+ width: 100%;
328
+ min-height: 100vh;
329
+ padding: var(--sito-ui-space-4);
330
+ background-color: var(--sito-ui-dialog-backdrop-background);
331
+ backdrop-filter: var(--sito-ui-dialog-backdrop-filter);
332
+ }
333
+
334
+ .sito-ui-dialog-backdrop--closing {
335
+ pointer-events: none;
336
+ }
337
+
338
+ .sito-ui-dialog {
339
+ position: relative;
340
+ display: flex;
341
+ flex-direction: column;
342
+ width: min(100%, var(--sito-ui-dialog-max-width));
343
+ max-height: calc(100vh - (var(--sito-ui-space-4) * 2));
344
+ overflow: auto;
345
+ padding: var(--sito-ui-space-5);
346
+ border: var(--sito-ui-border-width-thin) solid var(--sito-ui-color-border);
347
+ border-radius: var(--sito-ui-radius-dialog);
348
+ background-color: var(--sito-ui-color-surface);
349
+ color: var(--sito-ui-color-text);
350
+ box-shadow: var(--sito-ui-shadow-dialog);
351
+ }
352
+
353
+ .sito-ui-dialog--mobile-full-screen {
354
+ width: 100%;
355
+ }
356
+
357
+ .sito-ui-dialog__header {
358
+ display: flex;
359
+ align-items: center;
360
+ justify-content: space-between;
361
+ gap: var(--sito-ui-space-2);
362
+ margin-bottom: var(--sito-ui-space-5);
363
+ }
364
+
365
+ .sito-ui-dialog__title {
366
+ margin: 0;
367
+ color: var(--sito-ui-color-text);
368
+ font-size: var(--sito-ui-font-size-dialog-title);
369
+ font-weight: var(--sito-ui-font-weight-semibold);
370
+ line-height: var(--sito-ui-line-height-dialog-title);
371
+ }
372
+
373
+ .sito-ui-dialog__close {
374
+ flex: none;
375
+ margin-left: auto;
376
+ }
377
+
378
+ .sito-ui-dialog-actions {
379
+ display: flex;
380
+ flex-wrap: wrap;
381
+ gap: var(--sito-ui-space-2);
382
+ margin-top: var(--sito-ui-space-2);
383
+ }
384
+
385
+ .sito-ui-dialog-actions--end {
386
+ justify-content: flex-end;
387
+ }
388
+
389
+ @media (max-width: 40rem) {
390
+ .sito-ui-dialog--mobile-full-screen {
391
+ width: 100vw;
392
+ height: 100vh;
393
+ max-height: 100vh;
394
+ border: 0;
395
+ border-radius: 0;
396
+ }
397
+ }
398
+
package/dist/theme.css ADDED
@@ -0,0 +1,83 @@
1
+ :root {
2
+ --sito-ui-color-text: #101010;
3
+ --sito-ui-color-surface: #ffffff;
4
+ --sito-ui-color-border: #d9dde4;
5
+
6
+ --sito-ui-color-default-text: #101010;
7
+ --sito-ui-color-default-light: #f4f6f8;
8
+ --sito-ui-color-default-default: #e9edf2;
9
+ --sito-ui-color-default-hover: #dfe5ec;
10
+
11
+ --sito-ui-color-primary-text: #ededed;
12
+ --sito-ui-color-primary-light: rgb(205 33 42 / 10%);
13
+ --sito-ui-color-primary-default: #cd212a;
14
+ --sito-ui-color-primary-hover: #d74d54;
15
+
16
+ --sito-ui-color-secondary-text: #f7f7f7;
17
+ --sito-ui-color-secondary-light: rgb(4 30 66 / 10%);
18
+ --sito-ui-color-secondary-default: #041e42;
19
+ --sito-ui-color-secondary-hover: #364b67;
20
+
21
+ --sito-ui-color-error-text: #f7f7f7;
22
+ --sito-ui-color-error-light: rgb(204 0 0 / 10%);
23
+ --sito-ui-color-error-default: #cc0000;
24
+ --sito-ui-color-error-hover: #d63333;
25
+
26
+ --sito-ui-color-warning-text: #101010;
27
+ --sito-ui-color-warning-light: rgb(219 175 0 / 10%);
28
+ --sito-ui-color-warning-default: #dbaf00;
29
+ --sito-ui-color-warning-hover: #e2bf33;
30
+
31
+ --sito-ui-color-success-text: #f7f7f7;
32
+ --sito-ui-color-success-light: rgb(0 119 51 / 10%);
33
+ --sito-ui-color-success-default: #007733;
34
+ --sito-ui-color-success-hover: #559b33;
35
+
36
+ --sito-ui-color-info-text: #f7f7f7;
37
+ --sito-ui-color-info-light: rgb(0 126 168 / 10%);
38
+ --sito-ui-color-info-default: #007ea8;
39
+ --sito-ui-color-info-hover: #3397b9;
40
+
41
+ --sito-ui-space-0: 0;
42
+ --sito-ui-space-1: 0.25rem;
43
+ --sito-ui-space-2: 0.5rem;
44
+ --sito-ui-space-3: 0.75rem;
45
+ --sito-ui-space-4: 1rem;
46
+ --sito-ui-space-5: 1.25rem;
47
+
48
+ --sito-ui-size-button-sm: 32px;
49
+ --sito-ui-size-button-md: 40px;
50
+ --sito-ui-size-button-lg: 48px;
51
+ --sito-ui-size-icon-button-sm: 28px;
52
+ --sito-ui-size-icon-button-md: 40px;
53
+ --sito-ui-size-icon-button-lg: 48px;
54
+ --sito-ui-size-icon-button: var(--sito-ui-size-icon-button-md);
55
+ --sito-ui-size-icon-button-icon: 1.25rem;
56
+ --sito-ui-size-button-spinner: 1em;
57
+
58
+ --sito-ui-radius-pill: 1.5rem;
59
+ --sito-ui-radius-round: 100%;
60
+ --sito-ui-radius-dialog: 1rem;
61
+
62
+ --sito-ui-border-width-thin: 1px;
63
+ --sito-ui-button-spinner-border-width: 2px;
64
+
65
+ --sito-ui-font-weight-semibold: 600;
66
+ --sito-ui-font-size-button: 0.875rem;
67
+ --sito-ui-font-size-dialog-title: 1.25rem;
68
+ --sito-ui-line-height-button: 1.25rem;
69
+ --sito-ui-line-height-dialog-title: 1.75rem;
70
+
71
+ --sito-ui-motion-duration-normal: 300ms;
72
+ --sito-ui-motion-duration-spin: 600ms;
73
+ --sito-ui-motion-duration-spin-reduced: 1500ms;
74
+ --sito-ui-motion-easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
75
+
76
+ --sito-ui-shadow-dialog: 0 1rem 3rem rgb(16 24 40 / 18%);
77
+ --sito-ui-z-index-dialog: 50;
78
+
79
+ --sito-ui-button-disabled-opacity: 0.6;
80
+ --sito-ui-button-active-scale: 0.97;
81
+ --sito-ui-dialog-backdrop-background: rgb(16 24 40 / 20%);
82
+ --sito-ui-dialog-backdrop-filter: blur(1rem);
83
+ }
package/dist/ui.cjs CHANGED
@@ -1,11 +1 @@
1
- var Cr=require("./main.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react/jsx-runtime"),j=require("react");function et(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const se=et(j);function tt(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function rt(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var nt=function(){function e(r){var n=this;this._insertTag=function(s){var i;n.tags.length===0?n.insertionPoint?i=n.insertionPoint.nextSibling:n.prepend?i=n.container.firstChild:i=n.before:i=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(s,i),n.tags.push(s)},this.isSpeedy=r.speedy===void 0?process.env.NODE_ENV==="production":r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(rt(this));var s=this.tags[this.tags.length-1];if(process.env.NODE_ENV!=="production"){var i=n.charCodeAt(0)===64&&n.charCodeAt(1)===105;i&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
2
- `+n+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!i}if(this.isSpeedy){var c=tt(s);try{c.insertRule(n,c.cssRules.length)}catch(o){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(n)&&console.error('There was a problem inserting the following rule: "'+n+'"',o)}}else s.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},e}(),p="-ms-",X="-moz-",f="-webkit-",ue="comm",Ne="rule",le="decl",st="@import",Ee="@keyframes",it="@layer",ot=Math.abs,te=String.fromCharCode,ct=Object.assign;function at(e,t){return T(e,0)^45?(((t<<2^T(e,0))<<2^T(e,1))<<2^T(e,2))<<2^T(e,3):0}function ke(e){return e.trim()}function Mt(e,t){return(e=t.exec(e))?e[0]:e}function d(e,t,r){return e.replace(t,r)}function ce(e,t){return e.indexOf(t)}function T(e,t){return e.charCodeAt(t)|0}function B(e,t,r){return e.slice(t,r)}function b(e){return e.length}function je(e){return e.length}function H(e,t){return t.push(e),e}function ut(e,t){return e.map(t).join("")}var re=1,R=1,Ce=0,L=0,A=0,V="";function ne(e,t,r,n,s,i,c){return{value:e,root:t,parent:r,type:n,props:s,children:i,line:re,column:R,length:c,return:""}}function _(e,t){return ct(ne("",null,null,"",null,null,0),e,{length:-e.length},t)}function Nt(){return A}function lt(){return A=L>0?T(V,--L):0,R--,A===10&&(R=1,re--),A}function m(){return A=L<Ce?T(V,L++):0,R++,A===10&&(R=1,re++),A}function v(){return T(V,L)}function J(){return L}function Z(e,t){return B(V,e,t)}function F(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function be(e){return re=R=1,Ce=b(V=e),L=0,[]}function ve(e){return V="",e}function K(e){return ke(Z(L-1,ae(e===91?e+2:e===40?e+1:e)))}function jt(e){for(;(A=v())&&A<33;)m();return F(e)>2||F(A)>3?"":" "}function gt(e,t){for(;--t&&m()&&!(A<48||A>102||A>57&&A<65||A>70&&A<97););return Z(e,J()+(t<6&&v()==32&&m()==32))}function ae(e){for(;m();)switch(A){case e:return L;case 34:case 39:e!==34&&e!==39&&ae(A);break;case 40:e===41&&ae(e);break;case 92:m();break}return L}function ft(e,t){for(;m()&&e+A!==47+10;)if(e+A===42+42&&v()===47)break;return"/*"+Z(t,L-1)+"*"+te(e===47?e:m())}function dt(e){for(;!F(v());)m();return Z(e,L)}function Dt(e){return ve(q("",null,null,null,[""],e=be(e),0,[0],e))}function q(e,t,r,n,s,i,c,o,a){for(var u=0,M=0,l=c,D=0,z=0,I=0,g=1,x=1,h=1,O=0,E="",P=s,Q=i,k=n,y=E;x;)switch(I=O,O=m()){case 40:if(I!=108&&T(y,l-1)==58){ce(y+=d(K(O),"&","&\f"),"&\f")!=-1&&(h=-1);break}case 34:case 39:case 91:y+=K(O);break;case 9:case 10:case 13:case 32:y+=jt(I);break;case 92:y+=gt(J()-1,7);continue;case 47:switch(v()){case 42:case 47:H(yt(ft(m(),J()),t,r),a);break;default:y+="/"}break;case 123*g:o[u++]=b(y)*h;case 125*g:case 59:case 0:switch(O){case 0:case 125:x=0;case 59+M:h==-1&&(y=d(y,/\f/g,"")),z>0&&b(y)-l&&H(z>32?ye(y+";",n,r,l-1):ye(d(y," ","")+";",n,r,l-2),a);break;case 59:y+=";";default:if(H(k=De(y,t,r,u,M,s,o,E,P=[],Q=[],l),i),O===123)if(M===0)q(y,t,k,k,P,i,l,o,Q);else switch(D===99&&T(y,3)===110?100:D){case 100:case 108:case 109:case 115:q(e,k,k,n&&H(De(e,k,k,0,0,s,o,E,s,P=[],l),Q),s,Q,l,o,n?P:Q);break;default:q(y,k,k,k,[""],Q,0,o,Q)}}u=M=z=0,g=h=1,E=y="",l=c;break;case 58:l=1+b(y),z=I;default:if(g<1){if(O==123)--g;else if(O==125&&g++==0&&lt()==125)continue}switch(y+=te(O),O*g){case 38:h=M>0?1:(y+="\f",-1);break;case 44:o[u++]=(b(y)-1)*h,h=1;break;case 64:v()===45&&(y+=K(m())),D=v(),M=l=b(E=y+=dt(J())),O++;break;case 45:I===45&&b(y)==2&&(g=0)}}return i}function De(e,t,r,n,s,i,c,o,a,u,M){for(var l=s-1,D=s===0?i:[""],z=je(D),I=0,g=0,x=0;I<n;++I)for(var h=0,O=B(e,l+1,l=ot(g=c[I])),E=e;h<z;++h)(E=ke(g>0?D[h]+" "+O:d(O,/&\f/g,D[h])))&&(a[x++]=E);return ne(e,t,r,s===0?Ne:o,a,u,M)}function yt(e,t,r){return ne(e,t,r,ue,te(Nt()),B(e,2,-2),0)}function ye(e,t,r,n){return ne(e,t,r,le,B(e,0,n),B(e,n+1,-1),n)}function Y(e,t){for(var r="",n=je(e),s=0;s<n;s++)r+=t(e[s],s,e,t)||"";return r}function It(e,t,r,n){switch(e.type){case it:if(e.children.length)break;case st:case le:return e.return=e.return||e.value;case ue:return"";case Ee:return e.return=e.value+"{"+Y(e.children,n)+"}";case Ne:e.value=e.props.join(",")}return b(r=Y(e.children,n))?e.return=e.value+"{"+r+"}":""}function zt(e){var t=je(e);return function(r,n,s,i){for(var c="",o=0;o<t;o++)c+=e[o](r,n,s,i)||"";return c}}function ht(e){return function(t){t.root||(t=t.return)&&e(t)}}function At(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var xt=function(t,r,n){for(var s=0,i=0;s=i,i=v(),s===38&&i===12&&(r[n]=1),!F(i);)m();return Z(t,L)},Ot=function(t,r){var n=-1,s=44;do switch(F(s)){case 0:s===38&&v()===12&&(r[n]=1),t[n]+=xt(L-1,r,n);break;case 2:t[n]+=K(s);break;case 4:if(s===44){t[++n]=v()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=te(s)}while(s=m());return t},Tt=function(t,r){return ve(Ot(be(t),r))},Ie=new WeakMap,pt=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,s=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!Ie.get(n))&&!s){Ie.set(t,!0);for(var i=[],c=Tt(r,i),o=n.props,a=0,u=0;a<c.length;a++)for(var M=0;M<o.length;M++,u++)t.props[u]=i[a]?c[a].replace(/&\f/g,o[M]):o[M]+" "+c[a]}}},Lt=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}},mt="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",wt=function(t){return t.type==="comm"&&t.children.indexOf(mt)>-1},St=function(t){return function(r,n,s){if(!(r.type!=="rule"||t.compat)){var i=r.value.match(/(:first|:nth|:nth-last)-child/g);if(i){for(var c=!!r.parent,o=c?r.parent.children:s,a=o.length-1;a>=0;a--){var u=o[a];if(u.line<r.line)break;if(u.column<r.column){if(wt(u))return;break}}i.forEach(function(M){console.error('The pseudo class "'+M+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+M.split("-child")[0]+'-of-type".')})}}}},Qe=function(t){return t.type.charCodeAt(1)===105&&t.type.charCodeAt(0)===64},Et=function(t,r){for(var n=t-1;n>=0;n--)if(!Qe(r[n]))return!0;return!1},ze=function(t){t.type="",t.value="",t.return="",t.children="",t.props=""},kt=function(t,r,n){Qe(t)&&(t.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),ze(t)):Et(r,n)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),ze(t)))};function Ue(e,t){switch(at(e,t)){case 5103:return f+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return f+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return f+e+X+e+p+e+e;case 6828:case 4268:return f+e+p+e+e;case 6165:return f+e+p+"flex-"+e+e;case 5187:return f+e+d(e,/(\w+).+(:[^]+)/,f+"box-$1$2"+p+"flex-$1$2")+e;case 5443:return f+e+p+"flex-item-"+d(e,/flex-|-self/,"")+e;case 4675:return f+e+p+"flex-line-pack"+d(e,/align-content|flex-|-self/,"")+e;case 5548:return f+e+p+d(e,"shrink","negative")+e;case 5292:return f+e+p+d(e,"basis","preferred-size")+e;case 6060:return f+"box-"+d(e,"-grow","")+f+e+p+d(e,"grow","positive")+e;case 4554:return f+d(e,/([^-])(transform)/g,"$1"+f+"$2")+e;case 6187:return d(d(d(e,/(zoom-|grab)/,f+"$1"),/(image-set)/,f+"$1"),e,"")+e;case 5495:case 3959:return d(e,/(image-set\([^]*)/,f+"$1$`$1");case 4968:return d(d(e,/(.+:)(flex-)?(.*)/,f+"box-pack:$3"+p+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+f+e+e;case 4095:case 3583:case 4068:case 2532:return d(e,/(.+)-inline(.+)/,f+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(b(e)-1-t>6)switch(T(e,t+1)){case 109:if(T(e,t+4)!==45)break;case 102:return d(e,/(.+:)(.+)-([^]+)/,"$1"+f+"$2-$3$1"+X+(T(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ce(e,"stretch")?Ue(d(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(T(e,t+1)!==115)break;case 6444:switch(T(e,b(e)-3-(~ce(e,"!important")&&10))){case 107:return d(e,":",":"+f)+e;case 101:return d(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+f+(T(e,14)===45?"inline-":"")+"box$3$1"+f+"$2$3$1"+p+"$2box$3")+e}break;case 5936:switch(T(e,t+11)){case 114:return f+e+p+d(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return f+e+p+d(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return f+e+p+d(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return f+e+p+e+e}return e}var Ct=function(t,r,n,s){if(t.length>-1&&!t.return)switch(t.type){case le:t.return=Ue(t.value,t.length);break;case Ee:return Y([_(t,{value:d(t.value,"@","@"+f)})],s);case Ne:if(t.length)return ut(t.props,function(i){switch(Mt(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Y([_(t,{props:[d(i,/:(read-\w+)/,":"+X+"$1")]})],s);case"::placeholder":return Y([_(t,{props:[d(i,/:(plac\w+)/,":"+f+"input-$1")]}),_(t,{props:[d(i,/:(plac\w+)/,":"+X+"$1")]}),_(t,{props:[d(i,/:(plac\w+)/,p+"input-$1")]})],s)}return""})}},bt=[Ct],vt=function(t){var r=t.key;if(process.env.NODE_ENV!=="production"&&!r)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
3
- If multiple caches share the same key they might "fight" for each other's style elements.`);if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(g){var x=g.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var s=t.stylisPlugins||bt;if(process.env.NODE_ENV!=="production"&&/[^a-z-]/.test(r))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+r+'" was passed');var i={},c,o=[];c=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(g){for(var x=g.getAttribute("data-emotion").split(" "),h=1;h<x.length;h++)i[x[h]]=!0;o.push(g)});var a,u=[pt,Lt];process.env.NODE_ENV!=="production"&&u.push(St({get compat(){return I.compat}}),kt);{var M,l=[It,process.env.NODE_ENV!=="production"?function(g){g.root||(g.return?M.insert(g.return):g.value&&g.type!==ue&&M.insert(g.value+"{}"))}:ht(function(g){M.insert(g)})],D=zt(u.concat(s,l)),z=function(x){return Y(Dt(x),D)};a=function(x,h,O,E){M=O,process.env.NODE_ENV!=="production"&&h.map!==void 0&&(M={insert:function(Q){O.insert(Q+h.map)}}),z(x?x+"{"+h.styles+"}":h.styles),E&&(I.inserted[h.name]=!0)}}var I={key:r,sheet:new nt({key:r,container:c,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:a};return I.sheet.hydrate(o),I};function Qt(e){for(var t=0,r,n=0,s=e.length;s>=4;++n,s-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Ut={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},he=`You have illegal escape sequence in your template literal, most likely inside content's property value.
4
- Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
5
- You can read more about this here:
6
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,Yt="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",$t=/[A-Z]|^ms/g,Ye=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ge=function(t){return t.charCodeAt(1)===45},Ae=function(t){return t!=null&&typeof t!="boolean"},ie=At(function(e){return ge(e)?e:e.replace($t,"-$&").toLowerCase()}),ee=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Ye,function(n,s,i){return w={name:s,styles:i,next:w},s})}return Ut[t]!==1&&!ge(t)&&typeof r=="number"&&r!==0?r+"px":r};if(process.env.NODE_ENV!=="production"){var Rt=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,Vt=["normal","none","initial","inherit","unset"],Pt=ee,_t=/^-ms-/,Wt=/-(.)/g,xe={};ee=function(t,r){if(t==="content"&&(typeof r!="string"||Vt.indexOf(r)===-1&&!Rt.test(r)&&(r.charAt(0)!==r.charAt(r.length-1)||r.charAt(0)!=='"'&&r.charAt(0)!=="'")))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+r+"\"'`");var n=Pt(t,r);return n!==""&&!ge(t)&&t.indexOf("-")!==-1&&xe[t]===void 0&&(xe[t]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+t.replace(_t,"ms-").replace(Wt,function(s,i){return i.toUpperCase()})+"?")),n}}var $e="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function G(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0){if(process.env.NODE_ENV!=="production"&&r.toString()==="NO_COMPONENT_SELECTOR")throw new Error($e);return r}switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return w={name:r.name,styles:r.styles,next:w},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)w={name:n.name,styles:n.styles,next:w},n=n.next;var s=r.styles+";";return process.env.NODE_ENV!=="production"&&r.map!==void 0&&(s+=r.map),s}return Bt(e,t,r)}case"function":{if(e!==void 0){var i=w,c=r(e);return w=i,G(e,t,c)}else process.env.NODE_ENV!=="production"&&console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break}case"string":if(process.env.NODE_ENV!=="production"){var o=[],a=r.replace(Ye,function(M,l,D){var z="animation"+o.length;return o.push("const "+z+" = keyframes`"+D.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+z+"}"});o.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(o,["`"+a+"`"]).join(`
7
- `)+`
8
-
9
- You should wrap it with \`css\` like this:
10
-
11
- `+("css`"+a+"`"))}break}if(t==null)return r;var u=t[r];return u!==void 0?u:r}function Bt(e,t,r){var n="";if(Array.isArray(r))for(var s=0;s<r.length;s++)n+=G(e,t,r[s])+";";else for(var i in r){var c=r[i];if(typeof c!="object")t!=null&&t[c]!==void 0?n+=i+"{"+t[c]+"}":Ae(c)&&(n+=ie(i)+":"+ee(i,c)+";");else{if(i==="NO_COMPONENT_SELECTOR"&&process.env.NODE_ENV!=="production")throw new Error($e);if(Array.isArray(c)&&typeof c[0]=="string"&&(t==null||t[c[0]]===void 0))for(var o=0;o<c.length;o++)Ae(c[o])&&(n+=ie(i)+":"+ee(i,c[o])+";");else{var a=G(e,t,c);switch(i){case"animation":case"animationName":{n+=ie(i)+":"+a+";";break}default:process.env.NODE_ENV!=="production"&&i==="undefined"&&console.error(Yt),n+=i+"{"+a+"}"}}}}return n}var Oe=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Re;process.env.NODE_ENV!=="production"&&(Re=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);var w,oe=function(t,r,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var s=!0,i="";w=void 0;var c=t[0];c==null||c.raw===void 0?(s=!1,i+=G(n,r,c)):(process.env.NODE_ENV!=="production"&&c[0]===void 0&&console.error(he),i+=c[0]);for(var o=1;o<t.length;o++)i+=G(n,r,t[o]),s&&(process.env.NODE_ENV!=="production"&&c[o]===void 0&&console.error(he),i+=c[o]);var a;process.env.NODE_ENV!=="production"&&(i=i.replace(Re,function(D){return a=D,""})),Oe.lastIndex=0;for(var u="",M;(M=Oe.exec(i))!==null;)u+="-"+M[1];var l=Qt(i)+u;return process.env.NODE_ENV!=="production"?{name:l,styles:i,map:a,next:w,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}:{name:l,styles:i,next:w}},Ft=!0;function Ve(e,t,r){var n="";return r.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):n+=s+" "}),n}var Gt=function(t,r,n){var s=t.key+"-"+r.name;(n===!1||Ft===!1)&&t.registered[s]===void 0&&(t.registered[s]=r.styles)},Zt=function(t,r,n){Gt(t,r,n);var s=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var i=r;do t.insert(r===i?"."+s:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function Te(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function pe(e,t,r){var n=[],s=Ve(e,n,r);return n.length<2?r:s+t(n)}var Ht=function(t){var r=vt(t);r.sheet.speedy=function(o){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=o},r.compat=!0;var n=function(){for(var a=arguments.length,u=new Array(a),M=0;M<a;M++)u[M]=arguments[M];var l=oe(u,r.registered,void 0);return Zt(r,l,!1),r.key+"-"+l.name},s=function(){for(var a=arguments.length,u=new Array(a),M=0;M<a;M++)u[M]=arguments[M];var l=oe(u,r.registered),D="animation-"+l.name;return Te(r,{name:l.name,styles:"@keyframes "+D+"{"+l.styles+"}"}),D},i=function(){for(var a=arguments.length,u=new Array(a),M=0;M<a;M++)u[M]=arguments[M];var l=oe(u,r.registered);Te(r,l)},c=function(){for(var a=arguments.length,u=new Array(a),M=0;M<a;M++)u[M]=arguments[M];return pe(r.registered,n,Jt(u))};return{css:n,cx:c,injectGlobal:i,keyframes:s,hydrate:function(a){a.forEach(function(u){r.inserted[u]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:Ve.bind(null,r.registered),merge:pe.bind(null,r.registered,n)}},Jt=function e(t){for(var r="",n=0;n<t.length;n++){var s=t[n];if(s!=null){var i=void 0;switch(typeof s){case"boolean":break;case"object":{if(Array.isArray(s))i=e(s);else{i="";for(var c in s)s[c]&&c&&(i&&(i+=" "),i+=c)}break}default:i=s}i&&(r&&(r+=" "),r+=i)}}return r},Pe=Ht({key:"css"}),Kt=Pe.injectGlobal,U=Pe.css;const _e=j.createContext({}),qt=e=>{const{children:t,defaultMode:r}=e,[n,s]=j.useState((r||localStorage.theme)??"dark"),i=j.useCallback(()=>{s(n==="dark"?"light":"dark")},[n]);j.useEffect(()=>{n==="dark"?(localStorage.theme="dark",document.documentElement.classList.add("dark")):(localStorage.theme="light",document.documentElement.classList.remove("dark")),n==="OS"&&localStorage.removeItem("theme")},[n]);const c={mode:n,setMode:s,toggleMode:i};return N.jsx(_e.Provider,{value:c,children:t})},We=()=>{const e=j.useContext(_e);if(!e)throw new Error("modeContext must be used within a Provider");return e},Xt={text:"#f7f7f7",dark:"#101010",default:"#202020",light:"#303030"},er={text:"#101010",dark:"#e1e1e1",default:"#ededed",light:"#f7f7f7"},Le={primary:{text:"#ededed",light:"#d74d54",default:"#CD212A",dark:"#8f171d"},secondary:{text:"#f7f7f7",light:"#364b67",default:"#041E42",dark:"#02152e"},error:{text:"#f7f7f7",light:"#d63333",default:"#CC0000",dark:"#8e0000"},warning:{text:"#101010",light:"#e2bf33",default:"#DBAF00",dark:"#997a00"},success:{text:"#f7f7f7",light:"#559b33",default:"#007733",dark:"#1e5b00"},info:{text:"#f7f7f7",light:"#3397b9",default:"#007EA8",dark:"#005875"}},me=(e,t)=>({basics:e,...t}),W={dark:me(Xt,Le),light:me(er,Le)},Be=j.createContext({}),C=(e,t,r="")=>`${e==="light"?"":`.${e}`} ${r}${t.length&&t!=="body"?".":""}${t}`,tr=e=>{const{mode:t}=We(),{children:r,theme:n}=e,s=j.useMemo(()=>n?n[t]||W[t]||W.dark:W[t]||W.light,[t]);return j.useEffect(()=>{const i={},c={...W,...n};for(const o of Object.keys(c)){i[C(o,"body")]={backgroundColor:c[o].basics.dark,color:c[o].basics.text};for(const a of Object.keys(c[o])){const u=a;i[C(o,a)]={color:a==="basics"?c[o][u].text:c[o][u].default};const M={color:c[o][u].light,backgroundColor:`${c[o][u].light}2f`};i[C(o,a,".button:hover")]=M,i[C(o,a,"button:hover")]=M;const l={color:c[o][u].text,backgroundColor:c[o][u].default};i[C(o,a,".filled")]=l;const D={color:c[o][u].text,backgroundColor:c[o][u].light};i[C(o,a,".button.filled:hover")]=D,i[C(o,a,"button.filled:hover")]=D;const z={color:c[o][u].default,borderColor:c[o][u].default};i[C(o,a,".outlined")]=z;const I={color:c[o][u].text,borderColor:c[o][u].light,backgroundColor:c[o][u].light};i[C(o,a,".button.outlined:hover")]=I,i[C(o,a,"button.outlined:hover")]=I}}Kt({...i})},[]),N.jsx(Be.Provider,{value:{colors:s},children:r})},S=()=>{const e=j.useContext(Be);if(!e)throw new Error("modeContext must be used within a Provider");return e},rr=(e,t,r)=>{const n={},s={filled:()=>{n.color=e[t].text,n.backgroundColor=e[t].default,n["&:hover"]={backgroundColor:e[t].light}},outlined:()=>{t!=="basics"?(n.color=e[t].default,n.borderColor=e[t].default,n["&:hover"]={color:e[t].text,borderColor:e[t].light,backgroundColor:e[t].light}):(n.color=e[t].text,n.borderColor=e[t].default,n["&:hover"]={color:e[t].text,borderColor:e[t].light,backgroundColor:e[t].light})},text:()=>{t==="basics"?n.color=e[t].text:n.color=e[t].default,n["&:hover"]={color:t==="basics"?e[t].text:e[t].default,backgroundColor:`${e[t].light}2f`}}};return(s[r]||s.text)(),{root:U({...n})}},nr=j.forwardRef(function(e,t){const{color:r="primary",type:n="button",shape:s="text",...i}=e,{colors:c}=S(),o=rr(c,r,s);return N.jsx("button",{type:n,ref:t,...i,className:`button ${s} ${o.root} ${i.className}`,children:i.children})}),fe=nr,sr=j.forwardRef(function(e,t){const{icon:r,size:n="normal",className:s="",...i}=e;return N.jsx(fe,{...i,ref:t,type:"button",className:`icon-button ${n} ${s}`,children:r})}),Fe=sr,de=(e,t)=>{const r={color:e[t].text,backgroundColor:e[t].default,option:{color:e[t].text,backgroundColor:e[t].default}};return{input:U({...r})}},ir=j.forwardRef(function(e,t){const{helperText:r="",helperTextClassName:n="basics",orientation:s="column",color:i="basics",labelClassName:c="basics",label:o,...a}=e,{colors:u}=S(),M=de(u,i);return N.jsxs("div",{className:`input-control ${s}`,children:[N.jsx("label",{className:c,htmlFor:e.id,children:o}),N.jsx("textarea",{...a,className:`${M.input} ${a.className??""}`,ref:t}),r&&r.length?N.jsx("p",{className:n,children:r}):null]})}),or=ir,cr=j.forwardRef(function(e,t){const{helperText:r="",helperTextClassName:n="basics",orientation:s="column",color:i="basics",leftComponent:c,rightComponent:o,label:a,labelClassName:u="basics",...M}=e,{colors:l}=S(),D=de(l,i),z=j.useMemo(()=>N.jsx("select",{...M,ref:t,className:`${c?"s-no-padding-left":""} ${o?"s-no-padding-right":""} ${D.input} ${M.className??""}`,children:M.children}),[c,o,M,t,D]);return N.jsxs("div",{className:`input-control ${s}`,children:[N.jsx("label",{className:u,htmlFor:e.id,children:a}),c||o?N.jsxs("div",{className:`sub ${D.input}`,children:[c&&c!==null?N.jsx("div",{children:c}):null,z,o&&o!==null?N.jsx("div",{children:o}):null]}):z,r&&r.length?N.jsx("p",{className:n,children:r}):null]})}),ar=cr,Mr=j.forwardRef(function(e,t){const{helperText:r="",helperTextClassName:n="basics",orientation:s="column",color:i="basics",labelClassName:c="basics",leftComponent:o,rightComponent:a,label:u,type:M="text",...l}=e,D=j.useMemo(()=>["date","datetime-local","email","number","password","search","tel","time","url"].includes(M)?M:"text",[M]),{colors:z}=S(),I=de(z,i);return N.jsxs("div",{className:`input-control ${s}`,children:[N.jsx("label",{className:c,htmlFor:e.id,children:u}),o||a?N.jsxs("div",{className:`sub ${I.input}`,children:[o&&o!==null?o:null,N.jsx("input",{...l,type:D,ref:t,className:`no-border-radius ${o?"s-small-padding-left":""} ${a?"s-small-padding-right":""} ${I.input} ${l.className??""}`}),a&&a!==null?a:null]}):N.jsx("input",{...l,type:M,className:`${I.input} ${l.className??""}`,ref:t}),r&&r.length?N.jsx("p",{className:n,children:r}):null]})}),ur=Mr,Nr=(e,t,r)=>{const n=s=>({backgroundColor:e[s].default,"& .ball":{backgroundColor:e[s].text}});return{root:U({".s-active":n(t),".s-inactive":n(r)})}},lr=j.forwardRef(function(e,t){const{label:r,value:n=!1,onChange:s,activeColor:i="primary",inactiveColor:c="secondary",id:o,className:a}=e,{colors:u}=S(),M=Nr(u,i,c);return N.jsxs("div",{className:`switcher-root ${M.root} ${a}`,onClick:s,children:[N.jsx("input",{id:o,ref:t,checked:n,onChange:s,className:"check-input",type:"checkbox"}),N.jsx("div",{className:`switcher ${n?"s-active":"s-inactive"}`,children:N.jsx("div",{className:`ball ${n?"activated":"deactivated"}`})}),N.jsx("label",{className:"",children:r})]})}),jr=lr;var $=(e=>(e.success="success",e.error="error",e.warning="warning",e.info="info",e))($||{});const Ge=j.createContext({});function gr(e){const{children:t,container:r=document.body}=e,[n,s]=j.useReducer((M,l)=>{const{type:D,items:z,index:I}=l;switch(D){case"set":return(z==null?void 0:z.map((g,x)=>({...g,id:x})))??[];case"remove":return I?M.filter((g,x)=>x!==I):[]}return M},[],()=>[]),i=M=>s({type:"set",items:[{...M,type:$.error}]}),c=M=>s({type:"set",items:[{...M}]}),o=M=>s({type:"set",items:M}),a=M=>s({type:"set",items:[{...M,type:$.success}]}),u=M=>s({type:"remove",index:M});return N.jsx(Ge.Provider,{value:{notification:n,container:r,removeNotification:u,showErrorNotification:i,showNotification:c,showSuccessNotification:a,showStackNotifications:o},children:t})}const Ze=()=>{const e=j.useContext(Ge);if(e===void 0)throw new Error("NotificationContext must be used within a Provider");return e},fr=e=>({root:U({backgroundImage:`linear-gradient(to right, ${e.basics.default} calc(50% - 100px), ${e.basics.dark} 50%, ${e.basics.default} calc(50% - 100px));`})});function dr(e){const{container:t={},...r}=e,[n,s]=j.useState(!1),{colors:i}=S(),c=fr(i);return N.jsx("div",{...t,className:`${n?null:`box ${c.root}`} ${t.className}`,children:N.jsx("img",{onLoad:()=>s(!0),...r})})}const He=()=>{const[e,t]=j.useState(!1),r=j.useRef(null);return j.useEffect(()=>{const n=new IntersectionObserver(s=>{s.forEach(i=>{t(i.isIntersecting)})});return r.current&&n.observe(r.current),()=>{r.current&&n.unobserve(r.current)}},[]),{elementRef:r,isElementInViewport:e}};function Dr(e){const{children:t,delay:r=100,animation:n="appear",onVisible:s=!1}=e,{elementRef:i,isElementInViewport:c}=He(),[o,a]=j.useState(s!==!0),[u,M]=j.useState(!1);return j.useEffect(()=>{const l=setTimeout(()=>{o&&M(!0)},r);return()=>clearTimeout(l)},[r,o]),j.useEffect(()=>{!o&&c&&a(!0)},[c]),N.jsx("div",{ref:i,className:u&&o?n:"invisible",children:t})}const Je=j.memo(e=>N.jsx(Dr,{...e}),yr);Je.displayName="PrintAfter";function yr(e,t){return e.delay===t.delay&&e.animation===t.animation&&e.children===t.children&&e.onVisible===t.onVisible}const Ir=Je,zr=(e,t)=>{const r={color:e[t].text,backgroundColor:e[t].default,".close-notification-icon":{fill:e[t].text}};return{root:U(r)}};function hr(e){const{closeProps:t}=e,{notification:r,container:n,removeNotification:s}=Ze(),i=j.useCallback(a=>s(a),[s]),c=j.useCallback(a=>{switch(a){case $.info:return"info";case $.warning:return"warning";case $.success:return"success";default:return"error"}},[]);j.useEffect(()=>(r!=null&&r.length&&window.addEventListener("click",()=>i()),()=>{r!=null&&r.length&&window.removeEventListener("click",()=>i())}),[r,i]);const{colors:o}=S();return N.jsx("div",{className:`notification-portal ${r!=null&&r.length?"w-screen h-screen":""}`,children:r!=null&&r.length?r==null?void 0:r.map(({id:a,type:u,message:M},l)=>{const D=zr(o,c(u));return N.jsxs("div",{className:`notification-root ${D.root}`,children:[N.jsx(Fe,{name:"close-notification",...t,icon:N.jsx("svg",{className:"close-notification-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:N.jsx("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"})}),ref:null,color:"basics",onClick:()=>i(l),size:"small",className:`notification-close-button ${t==null?void 0:t.className}`}),N.jsx("p",{children:M})]},a)}):null})}const Ar=(e,t,r)=>{const n={};return r?(n.backgroundColor=e[t].text,n["& .path"]={stroke:e[t].default}):(n.backgroundColor=e[t].default,n["& .path"]={stroke:e[t].text}),{root:U({...n})}},xr=e=>{const{color:t="primary",colorInverted:r=!1,loaderClass:n="",strokeWidth:s="4",...i}=e,{colors:c}=S(),o=Ar(c,t,r);return N.jsx("div",{...i,className:`loading ${o.root} ${i.className}`,children:N.jsx("div",{className:"loader-container",children:N.jsx("div",{className:`loader ${n}`,children:N.jsx("svg",{className:"circular",viewBox:"25 25 50 50",children:N.jsx("circle",{className:"path",cx:"50",cy:"50",r:"20",fill:"none",strokeWidth:s,strokeMiterlimit:"10"})})})})})},Ke=xr,we="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODUiIGhlaWdodD0iNDQiIHZpZXdCb3g9IjAgMCA4NSA0NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik0xOC43NjQ3IDMxLjkwNzhDMTcuMjg3MiAzMS45MDc4IDE1Ljk2MzEgMzEuNjY3OSAxNC43OTI2IDMxLjE4ODNDMTMuNjIyMSAzMC43MDg2IDEyLjY4MTkgMjkuOTk4NSAxMS45NzE5IDI5LjA1ODNDMTEuMjgxMSAyOC4xMTgxIDEwLjkxNjUgMjYuOTg1OSAxMC44NzgxIDI1LjY2MTlIMTYuMTE2N0MxNi4xOTM0IDI2LjQxMDMgMTYuNDUyNSAyNi45ODU5IDE2Ljg5MzggMjcuMzg4OUMxNy4zMzUxIDI3Ljc3MjcgMTcuOTEwOCAyNy45NjQ2IDE4LjYyMDggMjcuOTY0NkMxOS4zNSAyNy45NjQ2IDE5LjkyNTYgMjcuODAxNSAyMC4zNDc4IDI3LjQ3NTJDMjAuNzY5OSAyNy4xMjk4IDIwL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N0g3My40ODA3VjI5LjEwMjhDNzMuNDgwNyAyOS40NDcxIDczLjUzNTQgMjkuNzI4MiA3My42NDQyIDI5Ljk0NjFDNzMuNzUzIDMwLjE2NCA3My45MDk2IDMwLjMyMzkgNzQuMTEzMyAzMC40MjU3Qzc0LjMyMDYgMzAuNTI3NiA3NC41NjQ4IDMwLjU3ODQgNzQuODQ1OSAzMC41Nzg0Qzc1LjEzNCAzMC41Nzg0IDc1LjM3ODIgMzAuNTI3NiA3NS41Nzg1IDMwLjQyNTdDNzUuNzgyMyAzMC4zMjM5IDc1LjkzNjcgMzAuMTY0IDc2LjA0MjIgMjkuOTQ2MUM3Ni4xNTEgMjkuNzI4MiA3Ni4yMDU3IDI5LjQ0NzEgNzYuMjA1NyAyOS4xMDI4VjI0LjAzMjdaTTgwLjc2NDQgMjQuMDMyN1YzMS43MDYzSDc5LjE4ODVWMjQuMDMyN0g4MC43NjQ0WiIgZmlsbD0iI0U4MzYzNiIvPg0KPHBhdGggZD0iTTcxLjA0NDEgMjAuODAwNEw2Ny4yOTE1IDMxLjkxMDNINjUuNzg3Nkw2OS41NDAyIDIwLjgwMDRINzEuMDQ0MVoiIGZpbGw9IiNDRDIxMkEiLz4NCjwvc3ZnPg0K",Or=(e,t)=>{const r={backgroundColor:e[t].default,WebkitMask:`url('${we}') no-repeat center`,mask:`url('${we}') no-repeat center`},n={backgroundColor:e.basics.dark};return{root:U({...n,".sito-logo":r})}};function Tr(e){const{color:t="primary",logo:r,logoClass:n,appName:s,visible:i=!0}=e,{colors:c}=S(),o=Or(c,t),[a,u]=j.useState(!1);j.useEffect(()=>{setTimeout(()=>u(!0),2500)},[]);const[M,l]=j.useState(!0);return j.useEffect(()=>{i!==void 0&&(i?l(!0):setTimeout(()=>l(!1),501))},[i]),M?N.jsxs("div",{className:`splash-screen ${o.root} ${i?"splash-loading-show ":"splash-loading-hide"}`,children:[N.jsxs("div",{className:"logo-container",children:[typeof r=="string"?N.jsx("img",{alt:s,className:`puff-in-center splash-image ${n}`}):N.jsx("div",{className:`puff-in-center ${n}`,children:r}),N.jsx("div",{className:`splash-loading ${a?"splash-loading-show":"splash-loading-hide"} pointer-events-none`,children:N.jsx(Ke,{colorInverted:!0,className:"splash-loading",color:t,strokeWidth:"6"})})]}),N.jsxs("div",{className:"animated slideInUp brand",children:[N.jsx("p",{children:"made width"}),N.jsx("div",{className:"splash-sito-logo sito-logo"})]})]}):null}const pr=e=>({root:U({".dark .s-error-title":{color:e.error.light},".s-error-title":{color:e.error.default}})}),qe=e=>{const t=j.useRef(null),{colors:r}=S(),n=pr(r),{onRetry:s=()=>window.location.reload(),className:i="",title:c="Something went wrong",text:o,button:a="Try again",buttonProps:u}=e;return N.jsxs("div",{role:"alert",className:`error-root ${n.root} ${i}`,children:[N.jsx("svg",{className:"s-error-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:N.jsx("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"})}),N.jsx("p",{className:"s-error-title",children:c}),N.jsx("pre",{className:"s-error-body",children:o}),s?N.jsx(fe,{name:"reload",onClick:s,shape:"filled",color:"primary","aria-label":"click to reload",...u,ref:t,children:a}):null]})};function Me(e,t){return Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Me(e,t)}function Lr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Me(e,t)}var mr=function(t,r){return t===void 0&&(t=[]),r===void 0&&(r=[]),t.length!==r.length||t.some(function(n,s){return!Object.is(n,r[s])})},Se={error:null},wr=function(e){Lr(t,e);function t(){for(var n,s=arguments.length,i=new Array(s),c=0;c<s;c++)i[c]=arguments[c];return n=e.call.apply(e,[this].concat(i))||this,n.state=Se,n.resetErrorBoundary=function(){for(var o,a=arguments.length,u=new Array(a),M=0;M<a;M++)u[M]=arguments[M];n.props.onReset==null||(o=n.props).onReset.apply(o,u),n.reset()},n}t.getDerivedStateFromError=function(s){return{error:s}};var r=t.prototype;return r.reset=function(){this.setState(Se)},r.componentDidCatch=function(s,i){var c,o;(c=(o=this.props).onError)==null||c.call(o,s,i)},r.componentDidUpdate=function(s,i){var c=this.state.error,o=this.props.resetKeys;if(c!==null&&i.error!==null&&mr(s.resetKeys,o)){var a,u;(a=(u=this.props).onResetKeysChange)==null||a.call(u,s.resetKeys,o),this.reset()}},r.render=function(){var s=this.state.error,i=this.props,c=i.fallbackRender,o=i.FallbackComponent,a=i.fallback;if(s!==null){var u={error:s,resetErrorBoundary:this.resetErrorBoundary};if(se.isValidElement(a))return a;if(typeof c=="function")return c(u);if(o)return se.createElement(o,u);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(se.Component);const Xe=e=>{const{error:t,resetErrorBoundary:r}=e;return N.jsx(qe,{onRetry:r,text:t.message})};function Sr(e){const{children:t,onRetry:r}=e;return N.jsx(wr,{FallbackComponent:Xe,onReset:r,children:t})}const Er=e=>{const[t,r]=j.useState(!1);return j.useEffect(()=>{const n=window.matchMedia(e);n.matches!==t&&r(n.matches);const s=()=>r(n.matches);return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[t,e]),t},kr=()=>{const[e,t]=j.useState({width:window.innerWidth,height:window.innerHeight}),r=j.useMemo(()=>{const{width:s}=e;switch(!0){case s<=400:return"xs";case s<=600:return"sm";case s<=900:return"md";case s<=1200:return"lg";case s<=1536:return"xl";default:return"2xl"}},[e]),n=j.useCallback(()=>{},[t]);return j.useEffect(()=>(window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)),[n]),{width:e.width,height:e.height,breakpoint:r}};exports.Button=fe;exports.Error=qe;exports.ErrorFallback=Xe;exports.Handler=Sr;exports.IconButton=Fe;exports.Image=dr;exports.InputControl=ur;exports.Loading=Ke;exports.ModeProvider=qt;exports.Notification=hr;exports.NotificationProvider=gr;exports.PrintAfter=Ir;exports.SelectControl=ar;exports.SplashScreen=Tr;exports.StyleProvider=tr;exports.Switcher=jr;exports.TextareaControl=or;exports.useIsElementInViewport=He;exports.useMediaQuery=Er;exports.useMode=We;exports.useNotification=Ze;exports.useScreenHandler=kr;exports.useStyle=S;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime"),n=require("react-dom");var r=(...e)=>e.filter(Boolean).join(` `),i={DEFAULT:`default`,PRIMARY:`primary`,SECONDARY:`secondary`,ERROR:`error`,WARNING:`warning`,SUCCESS:`success`,INFO:`info`},a={TEXT:`text`,SUBMIT:`submit`,OUTLINED:`outlined`},o={SM:`sm`,MD:`md`,LG:`lg`},s=(0,e.forwardRef)(function(e,n){let{color:s=i.DEFAULT,size:c=o.MD,type:l=`button`,variant:u=a.TEXT,loading:d=!1,loadingIndicator:f,loadingLabel:p=`Loading`,disabled:m,className:h,children:g,..._}=e,v=r(`sito-ui-button`,`sito-ui-button--${u}`,`sito-ui-button--${s}`,`sito-ui-button--${c}`,d&&`sito-ui-button--loading`,h),y=f===void 0?(0,t.jsx)(`span`,{className:`sito-ui-button__spinner`,"aria-hidden":`true`,"data-sito-ui":`button-spinner`}):f;return(0,t.jsxs)(`button`,{"data-sito-ui":`button`,..._,type:l,ref:n,disabled:m||d,"aria-busy":d||_[`aria-busy`],className:v,children:[d?(0,t.jsxs)(t.Fragment,{children:[y,(0,t.jsx)(`span`,{className:`sito-ui-button__loading-label`,children:p})]}):null,g]})}),c={SM:`sm`,MD:`md`,LG:`lg`},l=e=>{if(e!==void 0)return typeof e==`number`?`${e}px`:e},u=(0,e.forwardRef)(function(e,n){let{children:i,icon:a,iconClassName:o,type:u=`button`,variant:d=`text`,color:f=`default`,loading:p=!1,size:m=c.MD,iconSize:h,className:g,style:_,...v}=e,y=i!=null&&typeof i!=`boolean`,b=l(h),x=b===void 0?_:{..._,"--sito-ui-icon-button-icon-size":b},S=r(`sito-ui-icon-button`,`sito-ui-icon-button--${m}`,y&&`sito-ui-icon-button--with-content`,g);return(0,t.jsxs)(s,{...v,ref:n,type:u,variant:d,color:f,size:m,loading:p,"data-sito-ui":`icon-button`,className:S,style:x,children:[p?null:(0,t.jsx)(`span`,{className:r(`sito-ui-icon-button__icon`,o),"aria-hidden":`true`,children:a}),i]})}),d=`input:not([type="hidden"]):not([disabled]), textarea:not([disabled]), select:not([disabled])`,f=`button[type="submit"]:not([disabled]), input[type="submit"]:not([disabled])`,p=[`a[href]`,`button:not([disabled])`,`textarea:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`,`),m=0,h=null,g=()=>typeof document<`u`&&!!document.body,_=()=>{g()&&(m===0&&(h=document.body.style.overflow,document.body.style.overflow=`hidden`),m+=1)},v=()=>{!g()||m===0||(--m,m===0&&(document.body.style.overflow=h??``,h=null))},y=e=>Array.from(e.querySelectorAll(p)).filter(e=>e.getAttribute(`aria-disabled`)!==`true`),b=()=>typeof document>`u`?null:document.activeElement instanceof HTMLElement?document.activeElement:null,x=typeof window>`u`?e.useEffect:e.useLayoutEffect,S=i=>{let a=(0,e.useId)(),o=(0,e.useRef)(null),s=(0,e.useRef)(null),c=(0,e.useRef)(null),l=(0,e.useRef)(void 0),{dialogId:p,title:m,ariaLabel:h,children:g,onClose:S,initialFocus:C=`none`,closeOnBackdropClick:w=!1,closeOnEscape:T=!0,lockBodyScroll:E=!0,onSubmit:D,open:O=!1,mobileFullScreen:k=!1,containerClassName:A,className:j,closeLabel:M=`Close dialog`,closeIcon:N=`x`,showCloseButton:P=!0,portalContainer:F,exitDurationMs:I=0,onExitComplete:L}=i,[R,z]=(0,e.useState)(O),[B,V]=(0,e.useState)(!1),H=m?`${p??a}-title`:void 0,U=B?`closing`:`open`,W=O&&!B;(0,e.useEffect)(()=>{l.current=L},[L]);let G=(0,e.useCallback)(()=>{c.current!==null&&(window.clearTimeout(c.current),c.current=null)},[]),K=(0,e.useCallback)(()=>{z(!1),V(!1),l.current?.(),c.current=null},[]);x(()=>{if(O){G(),z(!0),V(!1);return}if(!R)return;let e=Math.max(0,I);if(e===0){G(),K();return}V(!0),G(),c.current=window.setTimeout(K,e)},[G,I,K,O,R]),(0,e.useEffect)(()=>()=>{G()},[G]);let q=(0,e.useCallback)(e=>{if(e.key===`Escape`&&W&&T){S();return}if(e.key!==`Tab`||!W)return;let t=o.current;if(!t)return;let n=y(t);if(n.length===0){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1],a=b(),s=!a||!t.contains(a);if(e.shiftKey&&(s||a===r)){e.preventDefault(),i.focus();return}!e.shiftKey&&(s||a===i)&&(e.preventDefault(),r.focus())},[T,W,S]);(0,e.useEffect)(()=>{if(!(!W||typeof window>`u`))return window.addEventListener(`keydown`,q),()=>{window.removeEventListener(`keydown`,q)}},[q,W]),x(()=>{if(O)return s.current=b(),()=>{s.current?.isConnected&&s.current.focus(),s.current=null}},[O]),x(()=>{if(!O)return;let e=o.current;if(e){if(C===`first-input`){let t=e.querySelector(d);if(t){t.focus();return}}if(C===`submit`){let t=e.querySelector(f);if(t){t.focus();return}}e.focus()}},[C,O]),(0,e.useEffect)(()=>{if(!(!R||!E))return _(),()=>{v()}},[E,R]);let J=(0,e.useCallback)(e=>{W&&w&&e.target===e.currentTarget&&S()},[w,W,S]),Y=(0,e.useCallback)(e=>{e.preventDefault(),D?.(e)},[D]);if(!R||typeof document>`u`)return null;let X=D?(0,t.jsx)(`form`,{onSubmit:Y,children:g}):g,Z=typeof N==`string`?(0,t.jsx)(`span`,{"aria-hidden":`true`,children:N}):N;return(0,n.createPortal)((0,t.jsx)(`div`,{id:p?`backdrop-${p}`:void 0,"data-sito-ui":`dialog-backdrop`,"data-state":U,onClick:J,className:r(`sito-ui-dialog-backdrop`,`sito-ui-dialog-backdrop--${U}`,A),children:(0,t.jsxs)(`div`,{id:p,ref:o,role:`dialog`,"aria-modal":`true`,"aria-label":m?void 0:h,"aria-labelledby":H,tabIndex:-1,"data-sito-ui":`dialog`,"data-state":U,className:r(`sito-ui-dialog`,`sito-ui-dialog--${U}`,k&&`sito-ui-dialog--mobile-full-screen`,j),children:[(0,t.jsxs)(`div`,{className:`sito-ui-dialog__header`,children:[m?(0,t.jsx)(`h3`,{id:H,className:`sito-ui-dialog__title`,children:m}):null,P?(0,t.jsx)(u,{icon:Z,disabled:!W,"aria-disabled":!W,onClick:S,variant:`text`,color:`error`,className:`sito-ui-dialog__close`,"aria-label":M}):null]}),X]})}),F??document.body)},C=e=>{let{primaryText:n,cancelText:i,onPrimaryClick:a,onCancel:o,isLoading:c=!1,loadingIndicator:l,disabled:u=!1,primaryType:d=`submit`,containerClassName:f,primaryClassName:p,cancelClassName:m,alignEnd:h=!1,primaryName:g,primaryAriaLabel:_,cancelName:v,cancelAriaLabel:y,extraActions:b=[]}=e;return(0,t.jsxs)(`div`,{"data-sito-ui":`dialog-actions`,className:r(`sito-ui-dialog-actions`,h&&`sito-ui-dialog-actions--end`,f),children:[(0,t.jsx)(s,{type:d,color:`primary`,variant:`submit`,className:p,disabled:u,loading:c,loadingIndicator:l,onClick:a,name:g,"aria-label":_,children:n}),b.map(({id:e,...n})=>(0,t.jsx)(s,{...n},e)),(0,t.jsx)(s,{type:`button`,variant:`outlined`,className:m,disabled:u||c,onClick:o,name:v,"aria-label":y,children:i})]})},w=(t=!1)=>{let[n,r]=(0,e.useState)(t);return{open:n,setOpen:r,handleClose:()=>r(!1),handleOpen:()=>r(!0)}};exports.Button=s,exports.Dialog=S,exports.DialogActions=C,exports.IconButton=u,exports.useDialog=w;
package/dist/ui.d.ts CHANGED
@@ -1 +1,2 @@
1
- export * from './main'
1
+ export * from './main.js'
2
+ export {}