@vsn-ux/gaia-styles 0.2.0 → 0.2.2
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/dist/all-no-reset-10pt.css +215 -6
- package/dist/all-no-reset.css +215 -6
- package/dist/all.css +215 -6
- package/dist/base.css +1 -1
- package/dist/components/avatar.css +1 -4
- package/dist/components/badge.css +1 -4
- package/dist/components/button.css +1 -4
- package/dist/components/card.css +1 -4
- package/dist/components/checkbox.css +1 -4
- package/dist/components/dropdown.css +111 -0
- package/dist/components/form-field.css +4 -4
- package/dist/components/input.css +1 -4
- package/dist/components/menu.css +1 -4
- package/dist/components/notification.css +1 -4
- package/dist/components/radio.css +4 -4
- package/dist/components/segmented-control.css +1 -4
- package/dist/components/select.css +141 -0
- package/dist/components/text-area.css +1 -4
- package/dist/components/tooltip.css +1 -4
- package/dist/components.css +215 -9
- package/package.json +1 -1
- package/src/styles/components/dropdown.css +51 -0
- package/src/styles/components/form-field.css +4 -0
- package/src/styles/components/radio.css +4 -0
- package/src/styles/components/select.css +59 -0
- package/src/styles/components.css +2 -0
package/dist/components.css
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.0.
|
|
2
|
-
:root, :host {
|
|
3
|
-
--spacing: 0.25rem;
|
|
4
|
-
}
|
|
1
|
+
/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
|
|
5
2
|
.ga-avatar {
|
|
6
3
|
display: inline-flex;
|
|
7
4
|
height: calc(0.25rem * 10);
|
|
@@ -301,10 +298,105 @@
|
|
|
301
298
|
}
|
|
302
299
|
}
|
|
303
300
|
}
|
|
301
|
+
.ga-dropdown {
|
|
302
|
+
display: flex;
|
|
303
|
+
min-width: calc(0.25rem * 36);
|
|
304
|
+
flex-direction: column;
|
|
305
|
+
align-items: stretch;
|
|
306
|
+
border-radius: var(--ga-radius);
|
|
307
|
+
border-style: var(--tw-border-style);
|
|
308
|
+
border-width: 1px;
|
|
309
|
+
border-color: var(--ga-color-border-primary);
|
|
310
|
+
background-color: var(--ga-color-surface-primary);
|
|
311
|
+
--tw-outline-style: none;
|
|
312
|
+
outline-style: none;
|
|
313
|
+
.ga-dropdown__item {
|
|
314
|
+
position: relative;
|
|
315
|
+
display: flex;
|
|
316
|
+
height: calc(0.25rem * 9);
|
|
317
|
+
cursor: pointer;
|
|
318
|
+
flex-direction: row;
|
|
319
|
+
align-items: center;
|
|
320
|
+
gap: calc(0.25rem * 2);
|
|
321
|
+
padding-inline: calc(0.25rem * 3);
|
|
322
|
+
padding-block: calc(0.25rem * 2);
|
|
323
|
+
text-align: left;
|
|
324
|
+
font-size: var(--ga-size-font-md);
|
|
325
|
+
line-height: var(--tw-leading, calc(var(--spacing) * 4 * 1.25));
|
|
326
|
+
letter-spacing: var(--tw-tracking, calc(var(--spacing) * 4 * -0.006));
|
|
327
|
+
--tw-leading: 1;
|
|
328
|
+
line-height: 1;
|
|
329
|
+
color: var(--ga-color-text-action);
|
|
330
|
+
&:first-child {
|
|
331
|
+
border-top-left-radius: var(--ga-radius);
|
|
332
|
+
border-top-right-radius: var(--ga-radius);
|
|
333
|
+
}
|
|
334
|
+
&:last-child {
|
|
335
|
+
border-bottom-right-radius: var(--ga-radius);
|
|
336
|
+
border-bottom-left-radius: var(--ga-radius);
|
|
337
|
+
}
|
|
338
|
+
&:focus {
|
|
339
|
+
--tw-outline-style: none;
|
|
340
|
+
outline-style: none;
|
|
341
|
+
}
|
|
342
|
+
&:hover, &:active {
|
|
343
|
+
background-color: var(--ga-color-surface-action-hover-2);
|
|
344
|
+
color: var(--ga-color-text-action-hover);
|
|
345
|
+
}
|
|
346
|
+
&.ga-dropdown__item--disabled {
|
|
347
|
+
cursor: default;
|
|
348
|
+
background-color: var(--ga-color-surface-disabled);
|
|
349
|
+
color: var(--ga-color-text-disable-selected);
|
|
350
|
+
}
|
|
351
|
+
&.ga-dropdown__item--selected {
|
|
352
|
+
background-color: var(--ga-color-surface-success);
|
|
353
|
+
--tw-font-weight: 600;
|
|
354
|
+
font-weight: 600;
|
|
355
|
+
color: var(--ga-color-text-body);
|
|
356
|
+
&.ga-dropdown__item--disabled {
|
|
357
|
+
background-color: var(--ga-color-surface-disable-selected);
|
|
358
|
+
color: var(--ga-color-text-on-action);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
&:not(:focus-within) .ga-dropdown__item.ga-dropdown__item--active, .ga-dropdown__item:focus-visible {
|
|
363
|
+
&::after {
|
|
364
|
+
position: absolute;
|
|
365
|
+
top: 2px;
|
|
366
|
+
left: 2px;
|
|
367
|
+
height: calc(100% - 4px);
|
|
368
|
+
width: calc(100% - 4px);
|
|
369
|
+
border-radius: var(--ga-radius);
|
|
370
|
+
border-style: var(--tw-border-style);
|
|
371
|
+
border-width: 2px;
|
|
372
|
+
border-color: var(--ga-color-border-focus);
|
|
373
|
+
--tw-content: '';
|
|
374
|
+
content: var(--tw-content);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
.ga-dropdown__caption {
|
|
378
|
+
padding-inline: calc(0.25rem * 3);
|
|
379
|
+
padding-top: calc(0.25rem * 3);
|
|
380
|
+
padding-bottom: calc(0.25rem * 2);
|
|
381
|
+
font-size: var(--ga-size-font-sm);
|
|
382
|
+
line-height: var(--tw-leading, calc(var(--spacing) * 4 * 1.25));
|
|
383
|
+
letter-spacing: var(--tw-tracking, 0);
|
|
384
|
+
--tw-font-weight: 600;
|
|
385
|
+
font-weight: 600;
|
|
386
|
+
}
|
|
387
|
+
.ga-dropdown__content-spinner {
|
|
388
|
+
margin-inline: auto;
|
|
389
|
+
margin-block: calc(0.25rem * 8);
|
|
390
|
+
display: inline-flex;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
304
393
|
.ga-form-field {
|
|
305
394
|
display: flex;
|
|
306
395
|
flex-direction: column;
|
|
307
396
|
gap: calc(0.25rem * 2);
|
|
397
|
+
> * {
|
|
398
|
+
width: 100%;
|
|
399
|
+
}
|
|
308
400
|
.ga-form-field__label {
|
|
309
401
|
padding-inline: calc(0.25rem * 1);
|
|
310
402
|
font-size: var(--ga-size-font-md);
|
|
@@ -608,6 +700,9 @@
|
|
|
608
700
|
letter-spacing: var(--tw-tracking, calc(var(--spacing) * 4 * -0.006));
|
|
609
701
|
--tw-leading: calc(0.25rem * 4);
|
|
610
702
|
line-height: calc(0.25rem * 4);
|
|
703
|
+
&:empty {
|
|
704
|
+
display: none;
|
|
705
|
+
}
|
|
611
706
|
}
|
|
612
707
|
}
|
|
613
708
|
.ga-segmented-control {
|
|
@@ -672,6 +767,117 @@
|
|
|
672
767
|
}
|
|
673
768
|
}
|
|
674
769
|
}
|
|
770
|
+
.ga-native-select {
|
|
771
|
+
position: relative;
|
|
772
|
+
select {
|
|
773
|
+
height: calc(0.25rem * 10);
|
|
774
|
+
appearance: none;
|
|
775
|
+
border-radius: var(--ga-radius);
|
|
776
|
+
border-style: var(--tw-border-style);
|
|
777
|
+
border-width: 1px;
|
|
778
|
+
border-color: var(--ga-color-border-primary);
|
|
779
|
+
background-color: var(--ga-color-surface-primary);
|
|
780
|
+
padding-block: calc(0.25rem * 2);
|
|
781
|
+
padding-right: calc(0.25rem * 9);
|
|
782
|
+
padding-left: calc(0.25rem * 3);
|
|
783
|
+
font-size: var(--ga-size-font-md);
|
|
784
|
+
line-height: var(--tw-leading, calc(var(--spacing) * 4 * 1.25));
|
|
785
|
+
letter-spacing: var(--tw-tracking, calc(var(--spacing) * 4 * -0.006));
|
|
786
|
+
--tw-leading: 1;
|
|
787
|
+
line-height: 1;
|
|
788
|
+
}
|
|
789
|
+
.ga-native-select__arrow {
|
|
790
|
+
pointer-events: none;
|
|
791
|
+
position: absolute;
|
|
792
|
+
top: calc(1/2 * 100%);
|
|
793
|
+
right: calc(0.25rem * 2);
|
|
794
|
+
--tw-translate-y: calc(calc(1/2 * 100%) * -1);
|
|
795
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
.ga-select {
|
|
799
|
+
display: inline-flex;
|
|
800
|
+
height: calc(0.25rem * 10);
|
|
801
|
+
width: calc(0.25rem * 50);
|
|
802
|
+
cursor: pointer;
|
|
803
|
+
appearance: none;
|
|
804
|
+
align-items: center;
|
|
805
|
+
gap: calc(0.25rem * 2);
|
|
806
|
+
border-radius: var(--ga-radius);
|
|
807
|
+
border-style: var(--tw-border-style);
|
|
808
|
+
border-width: 1px;
|
|
809
|
+
border-color: var(--ga-color-border-primary);
|
|
810
|
+
background-color: var(--ga-color-surface-primary);
|
|
811
|
+
padding-block: calc(0.25rem * 2);
|
|
812
|
+
padding-right: calc(0.25rem * 2);
|
|
813
|
+
padding-left: calc(0.25rem * 3);
|
|
814
|
+
text-align: left;
|
|
815
|
+
font-size: var(--ga-size-font-md);
|
|
816
|
+
line-height: var(--tw-leading, calc(var(--spacing) * 4 * 1.25));
|
|
817
|
+
letter-spacing: var(--tw-tracking, calc(var(--spacing) * 4 * -0.006));
|
|
818
|
+
--tw-leading: 1;
|
|
819
|
+
line-height: 1;
|
|
820
|
+
&.ga-select--expanded {
|
|
821
|
+
border-color: var(--ga-color-border-focus);
|
|
822
|
+
outline-style: var(--tw-outline-style);
|
|
823
|
+
outline-width: 1px;
|
|
824
|
+
outline-color: var(--ga-color-border-focus);
|
|
825
|
+
}
|
|
826
|
+
&:hover {
|
|
827
|
+
border-color: var(--ga-color-border-action-hover);
|
|
828
|
+
&:not(.ga-select--empty, .ga-select--disabled) {
|
|
829
|
+
background-color: var(--ga-color-surface-action-hover-2);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
&.ga-select--disabled {
|
|
833
|
+
cursor: not-allowed;
|
|
834
|
+
border-color: var(--ga-color-border-primary);
|
|
835
|
+
background-color: var(--ga-color-surface-disabled);
|
|
836
|
+
color: var(--ga-color-text-disable-selected);
|
|
837
|
+
}
|
|
838
|
+
&:focus-visible {
|
|
839
|
+
outline-style: var(--tw-outline-style);
|
|
840
|
+
outline-width: 2px;
|
|
841
|
+
outline-offset: 2px;
|
|
842
|
+
outline-color: var(--ga-color-border-focus);
|
|
843
|
+
}
|
|
844
|
+
&.ga-select--invalid {
|
|
845
|
+
border-color: var(--ga-color-border-error);
|
|
846
|
+
outline-style: var(--tw-outline-style);
|
|
847
|
+
outline-width: 1px;
|
|
848
|
+
outline-color: var(--ga-color-border-error);
|
|
849
|
+
&:not(.ga-select--empty) {
|
|
850
|
+
background-color: var(--ga-color-surface-error);
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
.ga-select__placeholder {
|
|
854
|
+
min-width: calc(0.25rem * 0);
|
|
855
|
+
flex: 1;
|
|
856
|
+
overflow: hidden;
|
|
857
|
+
text-overflow: ellipsis;
|
|
858
|
+
white-space: nowrap;
|
|
859
|
+
color: var(--ga-color-text-disabled);
|
|
860
|
+
}
|
|
861
|
+
.ga-select__value {
|
|
862
|
+
min-width: calc(0.25rem * 0);
|
|
863
|
+
flex: 1;
|
|
864
|
+
overflow: hidden;
|
|
865
|
+
text-overflow: ellipsis;
|
|
866
|
+
white-space: nowrap;
|
|
867
|
+
}
|
|
868
|
+
.ga-select__input {
|
|
869
|
+
height: calc(0.25rem * 6);
|
|
870
|
+
min-width: calc(0.25rem * 0);
|
|
871
|
+
flex: 1;
|
|
872
|
+
--tw-leading: calc(0.25rem * 6);
|
|
873
|
+
line-height: calc(0.25rem * 6);
|
|
874
|
+
--tw-outline-style: none;
|
|
875
|
+
outline-style: none;
|
|
876
|
+
&:is(input)::placeholder {
|
|
877
|
+
color: var(--ga-color-text-disabled);
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
}
|
|
675
881
|
.ga-text-area {
|
|
676
882
|
display: flex;
|
|
677
883
|
width: calc(0.25rem * 50);
|
|
@@ -889,6 +1095,11 @@
|
|
|
889
1095
|
inherits: false;
|
|
890
1096
|
initial-value: solid;
|
|
891
1097
|
}
|
|
1098
|
+
@property --tw-content {
|
|
1099
|
+
syntax: "*";
|
|
1100
|
+
inherits: false;
|
|
1101
|
+
initial-value: "";
|
|
1102
|
+
}
|
|
892
1103
|
@property --tw-translate-x {
|
|
893
1104
|
syntax: "*";
|
|
894
1105
|
inherits: false;
|
|
@@ -904,8 +1115,3 @@
|
|
|
904
1115
|
inherits: false;
|
|
905
1116
|
initial-value: 0;
|
|
906
1117
|
}
|
|
907
|
-
@property --tw-content {
|
|
908
|
-
syntax: "*";
|
|
909
|
-
inherits: false;
|
|
910
|
-
initial-value: "";
|
|
911
|
-
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.ga-dropdown {
|
|
2
|
+
@apply flex min-w-36 flex-col items-stretch rounded border border-(--ga-color-border-primary) bg-(--ga-color-surface-primary) outline-none;
|
|
3
|
+
|
|
4
|
+
.ga-dropdown__item {
|
|
5
|
+
@apply text-md relative flex h-9 cursor-pointer flex-row items-center gap-2 px-3 py-2 text-left leading-none text-(--ga-color-text-action);
|
|
6
|
+
|
|
7
|
+
&:first-child {
|
|
8
|
+
@apply rounded-t;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&:last-child {
|
|
12
|
+
@apply rounded-b;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:focus {
|
|
16
|
+
@apply outline-none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:hover,
|
|
20
|
+
&:active {
|
|
21
|
+
@apply bg-(--ga-color-surface-action-hover-2) text-(--ga-color-text-action-hover);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.ga-dropdown__item--disabled {
|
|
25
|
+
@apply cursor-default bg-(--ga-color-surface-disabled) text-(--ga-color-text-disable-selected);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&.ga-dropdown__item--selected {
|
|
29
|
+
@apply bg-(--ga-color-surface-success) font-semibold text-(--ga-color-text-body);
|
|
30
|
+
|
|
31
|
+
&.ga-dropdown__item--disabled {
|
|
32
|
+
@apply bg-(--ga-color-surface-disable-selected) text-(--ga-color-text-on-action);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:not(:focus-within) .ga-dropdown__item.ga-dropdown__item--active,
|
|
38
|
+
.ga-dropdown__item:focus-visible {
|
|
39
|
+
&::after {
|
|
40
|
+
@apply absolute top-[2px] left-[2px] h-[calc(100%-4px)] w-[calc(100%-4px)] rounded border-2 border-(--ga-color-border-focus) content-[''];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ga-dropdown__caption {
|
|
45
|
+
@apply px-3 pt-3 pb-2 text-sm font-semibold;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ga-dropdown__content-spinner {
|
|
49
|
+
@apply mx-auto my-8 inline-flex;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
.ga-native-select {
|
|
2
|
+
@apply relative;
|
|
3
|
+
|
|
4
|
+
select {
|
|
5
|
+
@apply text-md h-10 appearance-none rounded border border-(--ga-color-border-primary) bg-(--ga-color-surface-primary) py-2 pr-9 pl-3 leading-none;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ga-native-select__arrow {
|
|
9
|
+
@apply pointer-events-none absolute top-1/2 right-2 -translate-y-1/2;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ga-select {
|
|
14
|
+
@apply text-md inline-flex h-10 w-50 cursor-pointer appearance-none items-center gap-2 rounded border border-(--ga-color-border-primary) bg-(--ga-color-surface-primary) py-2 pr-2 pl-3 text-left leading-none;
|
|
15
|
+
|
|
16
|
+
&.ga-select--expanded {
|
|
17
|
+
@apply border-(--ga-color-border-focus) outline-1 outline-(--ga-color-border-focus);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:hover {
|
|
21
|
+
@apply border-(--ga-color-border-action-hover);
|
|
22
|
+
|
|
23
|
+
&:not(.ga-select--empty, .ga-select--disabled) {
|
|
24
|
+
@apply bg-(--ga-color-surface-action-hover-2);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&.ga-select--disabled {
|
|
29
|
+
@apply cursor-not-allowed border-(--ga-color-border-primary) bg-(--ga-color-surface-disabled) text-(--ga-color-text-disable-selected);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:focus-visible {
|
|
33
|
+
@apply outline-2 outline-offset-2 outline-(--ga-color-border-focus);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.ga-select--invalid {
|
|
37
|
+
@apply border-(--ga-color-border-error) outline outline-(--ga-color-border-error);
|
|
38
|
+
|
|
39
|
+
&:not(.ga-select--empty) {
|
|
40
|
+
@apply bg-(--ga-color-surface-error);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ga-select__placeholder {
|
|
45
|
+
@apply min-w-0 flex-1 truncate text-(--ga-color-text-disabled);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ga-select__value {
|
|
49
|
+
@apply min-w-0 flex-1 truncate;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ga-select__input {
|
|
53
|
+
@apply h-6 min-w-0 flex-1 leading-6 outline-none;
|
|
54
|
+
|
|
55
|
+
&:is(input)::placeholder {
|
|
56
|
+
@apply text-(--ga-color-text-disabled);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
@import './components/button.css';
|
|
4
4
|
@import './components/card.css';
|
|
5
5
|
@import './components/checkbox.css';
|
|
6
|
+
@import './components/dropdown.css';
|
|
6
7
|
@import './components/form-field.css';
|
|
7
8
|
@import './components/input.css';
|
|
8
9
|
@import './components/notification.css';
|
|
9
10
|
@import './components/menu.css';
|
|
10
11
|
@import './components/radio.css';
|
|
11
12
|
@import './components/segmented-control.css';
|
|
13
|
+
@import './components/select.css';
|
|
12
14
|
@import './components/text-area.css';
|
|
13
15
|
@import './components/tooltip.css';
|