@raketa-builder/ui 0.2.2-alpha → 0.4.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.
package/src/styles.css CHANGED
@@ -1,27 +1,28 @@
1
1
  @layer raketa-builder {
2
2
  :root {
3
- --true-black: #000;
4
- --black: #2c2c2c;
5
- --darker-gray: #4b4b4b;
6
- --dark-gray: #6e6e6e;
7
- --gray: #b3b3b3;
8
- --light-gray: #e1e1e1;
9
- --lighter-gray: #f5f5f5;
10
- --white: #fafafa;
11
- --true-white: #fff;
12
- --primary-darker: #095aba;
13
- --primary-dark: #0d66d0;
14
- --primary: #1473e6;
15
- --primaryRGB06: rgba(20, 115, 230, 0.6);
16
- --primary-light: #2680eb;
17
- --success-darker: #107154;
18
- --success-dark: #12805c;
19
- --success: #268e6c;
20
- --success-light: #2d9d78;
21
- --danger-darker: #bb121a;
22
- --danger-dark: #c9252d;
23
- --danger: #d7373f;
24
- --danger-light: #e34850;
3
+ --r-true-black: #000;
4
+ --r-black: #2c2c2c;
5
+ --r-darker-gray: #4b4b4b;
6
+ --r-dark-gray: #6e6e6e;
7
+ --r-gray: #b3b3b3;
8
+ --r-light-gray: #e1e1e1;
9
+ --r-lighter-gray: #f5f5f5;
10
+ --r-white: #fafafa;
11
+ --r-true-white: #fff;
12
+ --r-primary-darker: #095aba;
13
+ --r-primary-dark: #0d66d0;
14
+ --r-primary: #1473e6;
15
+ --r-primaryRGB06: rgba(20, 115, 230, 0.6);
16
+ --r-primary-light: #2680eb;
17
+ --r-success-darker: #107154;
18
+ --r-success-dark: #12805c;
19
+ --r-success: #268e6c;
20
+ --r-success-light: #2d9d78;
21
+ --r-danger-darker: #bb121a;
22
+ --r-danger-dark: #c9252d;
23
+ --r-danger: #d7373f;
24
+ --r-danger-light: #e34850;
25
+ --r-dark-green: #0a0a;
25
26
  }
26
27
 
27
28
  /* Resets */
@@ -29,7 +30,7 @@
29
30
  box-sizing: border-box;
30
31
  margin: 0;
31
32
  padding: 0;
32
- color: var(--black);
33
+ color: var(--r-black);
33
34
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
34
35
  Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
35
36
  sans-serif;
@@ -82,14 +83,14 @@
82
83
  margin-right: 0.25em;
83
84
  padding: 0.5em 1em;
84
85
  border-radius: 48px;
85
- font-weight: 700;
86
+ font-weight: 600;
86
87
  line-height: 1;
87
88
  transition: 0.2s ease-in-out all;
88
89
 
89
- border: 2px solid var(--black);
90
+ border: 2px solid var(--r-black);
90
91
  background-color: transparent;
91
- color: var(--black);
92
- font-size: 1em;
92
+ color: var(--r-black);
93
+ font-size: 14px;
93
94
  }
94
95
 
95
96
  .r-button:last-of-type {
@@ -97,15 +98,15 @@
97
98
  }
98
99
 
99
100
  .r-button:hover {
100
- border-color: var(--dark-gray);
101
- color: var(--true-white);
102
- background-color: var(--dark-gray);
101
+ border-color: var(--r-dark-gray);
102
+ color: var(--r-true-white);
103
+ background-color: var(--r-dark-gray);
103
104
  }
104
105
 
105
106
  .r-button:active {
106
- border-color: var(--darker-gray);
107
- color: var(--true-white);
108
- background-color: var(--darker-gray);
107
+ border-color: var(--r-darker-gray);
108
+ color: var(--r-true-white);
109
+ background-color: var(--r-darker-gray);
109
110
  }
110
111
 
111
112
  .r-button:disabled {
@@ -114,27 +115,27 @@
114
115
  }
115
116
 
116
117
  .r-button-sm {
117
- font-size: 0.85em;
118
+ font-size: 12px;
118
119
  }
119
120
 
120
121
  .r-button-lg {
121
- font-size: 1.3em;
122
+ font-size: 18px;
122
123
  }
123
124
 
124
125
  .r-button-primary {
125
- border-color: var(--primary);
126
- color: var(--true-white);
127
- background-color: var(--primary);
126
+ border-color: var(--r-primary);
127
+ color: var(--r-true-white);
128
+ background-color: var(--r-primary);
128
129
  }
129
130
 
130
131
  .r-button-primary:hover {
131
- border-color: var(--primary-dark);
132
- background-color: var(--primary-dark);
132
+ border-color: var(--r-primary-dark);
133
+ background-color: var(--r-primary-dark);
133
134
  }
134
135
 
135
136
  .r-button-primary:active {
136
- border-color: var(--primary-darker);
137
- background-color: var(--primary-darker);
137
+ border-color: var(--r-primary-darker);
138
+ background-color: var(--r-primary-darker);
138
139
  }
139
140
 
140
141
  .r-button-secondary {
@@ -142,58 +143,289 @@
142
143
  }
143
144
 
144
145
  .r-button-success {
145
- border-color: var(--success);
146
- color: var(--true-white);
147
- background-color: var(--success);
146
+ border-color: var(--r-success);
147
+ color: var(--r-true-white);
148
+ background-color: var(--r-success);
148
149
  }
149
150
 
150
151
  .r-button-success:hover {
151
- border-color: var(--success-dark);
152
- background-color: var(--success-dark);
152
+ border-color: var(--r-success-dark);
153
+ background-color: var(--r-success-dark);
153
154
  }
154
155
 
155
156
  .r-button-success:active {
156
- border-color: var(--success-darker);
157
- background-color: var(--success-darker);
157
+ border-color: var(--r-success-darker);
158
+ background-color: var(--r-success-darker);
158
159
  }
159
160
 
160
161
  .r-button-danger {
161
- border-color: var(--danger);
162
- color: var(--true-white);
163
- background-color: var(--danger);
162
+ border-color: var(--r-danger);
163
+ color: var(--r-true-white);
164
+ background-color: var(--r-danger);
164
165
  }
165
166
 
166
167
  .r-button-danger:hover {
167
- border-color: var(--danger-dark);
168
- color: var(--true-white);
169
- background-color: var(--danger-dark);
168
+ border-color: var(--r-danger-dark);
169
+ color: var(--r-true-white);
170
+ background-color: var(--r-danger-dark);
170
171
  }
171
172
 
172
173
  .r-button-danger:active {
173
- border-color: var(--danger-darker);
174
- color: var(--true-white);
175
- background-color: var(--danger-darker);
174
+ border-color: var(--r-danger-darker);
175
+ color: var(--r-true-white);
176
+ background-color: var(--r-danger-darker);
177
+ }
178
+
179
+ /* Tabs */
180
+ .r-tab-wrapper {
181
+ display: inline-flex;
182
+ margin-bottom: 1em;
183
+ border-bottom: 3px solid var(--r-light-gray);
184
+ }
185
+
186
+ .r-tab-button {
187
+ position: relative;
188
+ top: 3px;
189
+ margin-right: 2em;
190
+ padding-bottom: 0.5em;
191
+ border-bottom: 3px solid transparent;
192
+ font-weight: 500;
193
+ color: var(--r-dark-gray);
194
+ }
195
+
196
+ .r-tab-button:hover {
197
+ border-color: var(--r-true-black);
198
+ }
199
+
200
+ .r-tab-button-active {
201
+ border-bottom: 3px solid var(--r-true-black);
202
+ color: var(--r-true-black);
203
+ }
204
+
205
+ /* Navigation */
206
+
207
+ .r-navigation {
208
+ position: fixed;
209
+ top: 0;
210
+ bottom: 0;
211
+ left: 0;
212
+ display: flex;
213
+ gap: 8px;
214
+ flex-direction: column;
215
+ align-items: center;
216
+ width: 64px;
217
+ padding: 8px 0;
218
+ background-color: var(--r-true-black);
219
+ }
220
+
221
+ .r-navigation-item {
222
+ width: 48px;
223
+ height: 48px;
224
+ border-radius: 4px;
225
+ background-color: transparent;
226
+ transition: all 0.2s ease-in-out;
227
+ }
228
+
229
+ .r-navigation-item a,
230
+ .r-navigation-item .r-button {
231
+ display: flex;
232
+ justify-content: center;
233
+ align-items: center;
234
+ width: 100%;
235
+ height: 100%;
236
+ }
237
+ .r-navigation-item:hover {
238
+ background-color: var(--r-darker-gray);
239
+ }
240
+
241
+ .r-navigation-item-active {
242
+ background-color: var(--r-darker-gray);
243
+ }
244
+
245
+ /* Panels */
246
+
247
+ .r-panel {
248
+ margin-bottom: 0.5em;
249
+ border: 1px solid var(--r-lighter-gray);
250
+ border-radius: 3px;
251
+ background-color: var(--r-true-white);
252
+ }
253
+
254
+ .r-panel .sortable-selected {
255
+ background-color: var(--r-dark-green);
256
+ }
257
+ .r-panel-content {
258
+ padding: 1em;
259
+ }
260
+ .r-panel-title {
261
+ display: flex;
262
+ justify-content: space-between;
263
+ align-items: center;
264
+ padding: 0.25em 0.25em 0.25em;
265
+ border-bottom: 1px solid var(--r-light-gray);
266
+ background-color: var(--r-lighter-gray);
267
+ font-weight: 700;
176
268
  }
177
269
 
178
270
  /* Inputs */
179
271
  .r-input {
272
+ appearance: none;
180
273
  border: 0;
181
274
  outline: 0;
182
275
  border-radius: 4px;
183
276
  border: 0;
184
277
  width: 100%;
185
- padding: 0.5em 0.75em;
186
- border: 1px solid var(--gray);
187
- background-color: var(--true-white);
188
- color: var(--true-black);
278
+ padding: 0.75em;
279
+ border: 1px solid var(--r-gray);
280
+ background-color: var(--r-true-white);
281
+ color: var(--r-true-black);
189
282
  transition: all 0.2s ease-in-out;
190
283
  }
191
284
 
192
285
  .r-input:focus {
193
- border-color: var(--primary);
286
+ border-color: var(--r-primary);
287
+ }
288
+
289
+ .r-select {
290
+ background-size: 16px;
291
+ background-repeat: no-repeat;
292
+ background-position: center right 0.5em;
293
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWNoZXZyb24tZG93biI+PHBvbHlsaW5lIHBvaW50cz0iNiA5IDEyIDE1IDE4IDkiPjwvcG9seWxpbmU+PC9zdmc+);
294
+ }
295
+
296
+ .r-textarea {
297
+ height: 100px;
298
+ }
299
+
300
+ .r-label {
301
+ display: inline-block;
302
+ margin-bottom: 0.25em;
303
+ color: var(--r-dark-gray);
304
+ font-weight: 600;
305
+ cursor: pointer;
306
+ }
307
+
308
+ .r-hint {
309
+ padding-top: 0.5em;
310
+ opacity: 0.7;
311
+ }
312
+
313
+ .r-hint-error {
314
+ color: var(--r-danger);
315
+ }
316
+
317
+ .r-form-group {
318
+ width: 100%;
319
+ margin-bottom: 16px;
320
+ }
321
+
322
+ /* Table */
323
+
324
+ .r-table {
325
+ border-collapse: collapse;
326
+ width: 100%;
327
+ margin-bottom: 1em;
328
+ }
329
+
330
+ .r-table a {
331
+ color: var(--r-primary);
332
+ }
333
+
334
+ .r-table .actions {
335
+ width: 50px;
336
+ white-space: nowrap;
337
+ }
338
+
339
+ .r-table .actions div:first-of-type {
340
+ display: flex;
341
+ align-items: center;
342
+ }
343
+
344
+ .r-table .actions a,
345
+ .r-table .actions button {
346
+ margin-left: 0.5em;
347
+ }
348
+
349
+ .r-table th,
350
+ .r-table td {
351
+ padding: 0.5em;
352
+ text-align: left;
353
+ }
354
+
355
+ .r-table tr {
356
+ border-bottom: 1px solid var(--r-light-gray);
357
+ transition: all 0.3s ease-in-out;
358
+ }
359
+
360
+ .r-table tbody th:hover {
361
+ border-color: var(--r-gray);
362
+ }
363
+
364
+ .r-table tbody th:hover td {
365
+ background-color: var(--r-lighter-gray);
194
366
  }
195
367
 
196
368
  /* Base Blocks */
369
+
370
+ .r-container {
371
+ width: 100%;
372
+ padding: 0 calc(1em / 2);
373
+ }
374
+
375
+ @media (min-width: 1184px) {
376
+ .r-container {
377
+ width: 98%;
378
+ margin: 0 auto;
379
+ }
380
+ }
381
+
382
+ .r-row {
383
+ display: grid;
384
+ grid-template-columns: repeat(12, 1fr);
385
+ margin: 0;
386
+ }
387
+
388
+ .r-stack {
389
+ display: flex;
390
+ gap: 1rem;
391
+ }
392
+
393
+ .r-stack-justify-beteen {
394
+ justify-content: space-between;
395
+ }
396
+
397
+ .r-stack-justify-start {
398
+ justify-content: flex-start;
399
+ }
400
+
401
+ .r-stack-justify-end {
402
+ justify-content: flex-end;
403
+ }
404
+
405
+ .r-stack-justify-center {
406
+ justify-content: center;
407
+ }
408
+
409
+ .r-stack-justify-around {
410
+ justify-content: space-around;
411
+ }
412
+
413
+ .r-stack-align-start {
414
+ align-items: flex-start;
415
+ }
416
+
417
+ .r-stack-align-center {
418
+ align-items: center;
419
+ }
420
+
421
+ .r-stack-align-end {
422
+ align-items: flex-end;
423
+ }
424
+
425
+ .r-stack-direction-col {
426
+ flex-direction: column;
427
+ }
428
+
197
429
  .r-heading {
198
430
  padding-bottom: 0.5em;
199
431
  font-weight: 700;
@@ -203,4 +435,231 @@
203
435
  .r-paragraph {
204
436
  padding-bottom: 1em;
205
437
  }
438
+
439
+ .r-page-title {
440
+ margin: 1em 0;
441
+ }
442
+
443
+ /* Components */
444
+ .r-drag-handle {
445
+ width: 32px;
446
+ height: 32px;
447
+ background-size: 50%;
448
+ background-repeat: no-repeat;
449
+ background-position: center;
450
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLW1vcmUtdmVydGljYWwiPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEiPjwvY2lyY2xlPjxjaXJjbGUgY3g9IjEyIiBjeT0iNSIgcj0iMSI+PC9jaXJjbGU+PGNpcmNsZSBjeD0iMTIiIGN5PSIxOSIgcj0iMSI+PC9jaXJjbGU+PC9zdmc+);
451
+ cursor: grab;
452
+ }
453
+
454
+ .r-drag-handle:active {
455
+ cursor: grabbing;
456
+ }
457
+
458
+ .r-toolbar {
459
+ display: flex;
460
+ align-items: center;
461
+ gap: 0.5em;
462
+ }
463
+
464
+ .r-default-avatar {
465
+ display: flex;
466
+ justify-content: center;
467
+ align-items: center;
468
+ border-radius: 50%;
469
+ color: var(--r-true-white);
470
+ text-shadow: 1px 1px rgba(0, 0, 0, 0.1);
471
+ }
472
+
473
+ .r-image-avatar {
474
+ display: block;
475
+ border-radius: 50%;
476
+ }
477
+
478
+ /* Language Switcher */
479
+
480
+ .r-language-switcher {
481
+ position: relative;
482
+ display: flex;
483
+ flex-wrap: nowrap;
484
+ width: 100%;
485
+ height: 100%;
486
+ color: var(--r-true-white);
487
+ }
488
+
489
+ .r-language-switcher:hover [data-switcher] {
490
+ left: 48px;
491
+ opacity: 1;
492
+ }
493
+
494
+ .r-language-menu {
495
+ position: absolute;
496
+ z-index: 90;
497
+ left: -1000px;
498
+ display: flex;
499
+ flex-wrap: nowrap;
500
+ height: 100%;
501
+ background-color: var(--r-true-black);
502
+ opacity: 0;
503
+ transition: all ease-in-out 0.3s;
504
+ }
505
+ .r-language-item {
506
+ display: flex;
507
+ justify-content: center;
508
+ align-items: center;
509
+ width: 48px;
510
+ height: 48px;
511
+ background-color: var(--r-true-black);
512
+ text-transform: uppercase;
513
+ }
514
+ .r-language-item a:hover {
515
+ background-color: var(--r-primaryRGB06);
516
+ }
517
+ .r-language-item a {
518
+ color: var(--r-true-white);
519
+ font-weight: 500;
520
+ text-decoration: none;
521
+ }
522
+
523
+ .r-language-new-item {
524
+ position: relative;
525
+ width: 48px;
526
+ height: 48px;
527
+ background-color: var(--r-true-black);
528
+ text-transform: uppercase;
529
+ }
530
+
531
+ .r-language-new-item a {
532
+ position: absolute;
533
+ top: 0;
534
+ bottom: 0;
535
+ left: 0;
536
+ right: 0;
537
+ z-index: 30;
538
+ color: var(--r-true-white);
539
+ font-weight: 700;
540
+ text-decoration: none;
541
+ }
542
+ .r-language-new-item a:hover {
543
+ background-color: var(--r-primaryRGB06);
544
+ }
545
+
546
+ .r-language-new-item span {
547
+ display: flex;
548
+ justify-content: center;
549
+ align-items: center;
550
+ width: 100%;
551
+ height: 100%;
552
+ opacity: 0.6;
553
+ color: var(--r-true-white);
554
+ font-weight: 500;
555
+ text-decoration: none;
556
+ }
557
+ .r-language-current-item {
558
+ position: relative;
559
+ z-index: 100;
560
+ display: flex;
561
+ justify-content: center;
562
+ align-items: center;
563
+ width: 100%;
564
+ height: 100%;
565
+ border-radius: 4px;
566
+ background-color: var(--r-primary);
567
+ text-transform: uppercase;
568
+ cursor: pointer;
569
+ }
570
+
571
+ /* Modal */
572
+
573
+ .r-modal {
574
+ position: fixed;
575
+ top: 0;
576
+ right: 0;
577
+ bottom: 0;
578
+ left: 0;
579
+ z-index: 1200;
580
+ display: flex;
581
+ justify-content: center;
582
+ align-items: center;
583
+ pointer-events: none;
584
+ }
585
+ .r-modal-overlay {
586
+ position: fixed;
587
+ top: 0;
588
+ right: 0;
589
+ bottom: 0;
590
+ left: 0;
591
+ z-index: 1100;
592
+ background-color: rgba(0, 0, 0, 0.6);
593
+ cursor: pointer;
594
+ }
595
+ .r-modal-inner {
596
+ width: 80%;
597
+ border-radius: 5px;
598
+ background-color: var(--r-lighter-gray);
599
+ box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
600
+ pointer-events: all;
601
+ }
602
+ .r-modal-content {
603
+ padding: 0.5em 1em 1em 1em;
604
+ }
605
+ .r-modal-title {
606
+ font-size: 1.25em;
607
+ font-weight: 500;
608
+ }
609
+ .r-modal-title-bar {
610
+ display: flex;
611
+ justify-content: space-between;
612
+ align-items: center;
613
+ padding: 1em;
614
+ border-bottom: 2px solid var(--r-light-gray);
615
+ }
616
+ .r-modal-close-btn {
617
+ position: relative;
618
+ right: -4px;
619
+ z-index: 1300;
620
+ width: 2em;
621
+ height: 2em;
622
+ margin: 0;
623
+ padding: 0;
624
+ background-repeat: no-repeat;
625
+ background-size: 80%;
626
+ background-position: center;
627
+ background-image: var(--close-btn);
628
+ font-size: 1em;
629
+ overflow: hidden;
630
+ text-indent: -9999px;
631
+ }
632
+
633
+ /* Pagination */
634
+
635
+ .r-pagination a,
636
+ .r-pagination span {
637
+ display: block;
638
+ min-width: 1.25em;
639
+ padding: 0.5em 0.75em;
640
+ font-weight: 500;
641
+ text-align: center;
642
+ }
643
+ .r-pagination a {
644
+ color: var(--r-primary);
645
+ border: 1px solid var(--r-light-gray);
646
+ border-radius: 4px;
647
+ transition: all 0.2s ease-in-out;
648
+ }
649
+ .r-pagination a:hover {
650
+ border-color: var(--r-primary);
651
+ background-color: var(--r-primary);
652
+ color: var(--r-white);
653
+ }
654
+ .r-pagination {
655
+ display: flex;
656
+ justify-content: center;
657
+ flex-wrap: wrap;
658
+ gap: 0.25em;
659
+ padding: 1em 0 1em 0;
660
+ }
661
+ }
662
+
663
+ :root {
664
+ --close-btn: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLXgiPjxsaW5lIHgxPSIxOCIgeTE9IjYiIHgyPSI2IiB5Mj0iMTgiPjwvbGluZT48bGluZSB4MT0iNiIgeTE9IjYiIHgyPSIxOCIgeTI9IjE4Ij48L2xpbmU+PC9zdmc+);
206
665
  }
package/src/Container.js DELETED
@@ -1,16 +0,0 @@
1
- import styled from "styled-components";
2
- import reset from "./reset";
3
-
4
- export default styled.div`
5
- ${reset};
6
- width: 100%;
7
- padding: 0 calc(1em / 2);
8
-
9
- padding-top: ${(props) => props.top && "1em"};
10
- padding-bottom: ${(props) => props.bottom && "1em"};
11
-
12
- @media (min-width: 1184px) {
13
- width: 98%;
14
- margin: 0 auto;
15
- }
16
- `;
package/src/FormGroup.js DELETED
@@ -1,8 +0,0 @@
1
- import styled from "styled-components";
2
- import reset from "./reset";
3
-
4
- export default styled.div`
5
- ${reset};
6
- width: 100%;
7
- margin-bottom: 1em;
8
- `;