@fea-ui/styles 0.0.0 → 0.0.1
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/package.json +1 -1
- package/src/components/autocomplete.css +52 -0
- package/src/components/combobox.css +54 -0
- package/src/components/context-menu.css +34 -0
- package/src/components/index.css +12 -5
- package/src/components/menu.css +2 -2
- package/src/components/navigation-menu.css +45 -0
- package/src/components/number-field.css +46 -0
- package/src/components/preview-card.css +16 -0
- package/src/components/scroll-area.css +3 -0
- package/src/components/select.css +58 -27
- package/src/styles.css +5 -1
package/package.json
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.autocomplete__input {
|
|
2
|
+
@apply bg-input text-input-foreground hover-safe:bg-input/80 rounded border shadow;
|
|
3
|
+
@apply px-3 py-2 w-fit h-10;
|
|
4
|
+
|
|
5
|
+
&::placeholder {
|
|
6
|
+
@apply text-muted-foreground;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&:focus-visible {
|
|
10
|
+
@apply status-focused;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.autocomplete__positioner {
|
|
15
|
+
@apply outline-0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.autocomplete__popup {
|
|
19
|
+
width: var(--anchor-width);
|
|
20
|
+
max-width: var(--available-width);
|
|
21
|
+
|
|
22
|
+
@apply bg-surface text-surface-foreground rounded border shadow;
|
|
23
|
+
|
|
24
|
+
@apply px-3 py-2;
|
|
25
|
+
|
|
26
|
+
@apply transition-[scale,opacity] motion-reduce:transition-none;
|
|
27
|
+
|
|
28
|
+
&[data-starting-style],
|
|
29
|
+
&[data-ending-style] {
|
|
30
|
+
@apply scale-95 opacity-0;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.autocomplete__list {
|
|
35
|
+
@apply max-h-56 overflow-y-auto overscroll-contain scroll-p-2;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.autocomplete__item {
|
|
39
|
+
@apply cursor-pointer;
|
|
40
|
+
|
|
41
|
+
@apply hover-safe:bg-primary hover-safe:text-primary-foreground;
|
|
42
|
+
|
|
43
|
+
@apply px-2 py-1 rounded;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.autocomplete__separator {
|
|
47
|
+
@apply h-px bg-border my-2;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.autocomplete__empty {
|
|
51
|
+
@apply px-2 py-1 text-sm text-muted-foreground;
|
|
52
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.combobox__input {
|
|
2
|
+
@apply bg-input text-input-foreground hover-safe:bg-input/80 rounded border shadow;
|
|
3
|
+
@apply px-3 py-2 w-fit h-10;
|
|
4
|
+
|
|
5
|
+
&::placeholder {
|
|
6
|
+
@apply text-muted-foreground;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&:focus-visible {
|
|
10
|
+
@apply status-focused;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.combobox__positioner {
|
|
15
|
+
@apply outline-0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.combobox__popup {
|
|
19
|
+
width: var(--anchor-width);
|
|
20
|
+
max-width: var(--available-width);
|
|
21
|
+
|
|
22
|
+
@apply bg-surface text-surface-foreground rounded border shadow;
|
|
23
|
+
|
|
24
|
+
@apply px-3 py-2;
|
|
25
|
+
|
|
26
|
+
@apply transition-[scale,opacity] motion-reduce:transition-none;
|
|
27
|
+
|
|
28
|
+
&[data-starting-style],
|
|
29
|
+
&[data-ending-style] {
|
|
30
|
+
@apply scale-95 opacity-0;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.combobox__list {
|
|
35
|
+
@apply max-h-56 overflow-y-auto overscroll-contain scroll-p-2;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.combobox__item {
|
|
39
|
+
@apply cursor-pointer;
|
|
40
|
+
|
|
41
|
+
@apply flex items-center gap-2;
|
|
42
|
+
|
|
43
|
+
@apply hover-safe:bg-primary hover-safe:text-primary-foreground;
|
|
44
|
+
|
|
45
|
+
@apply px-2 py-1 rounded;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.combobox__separator {
|
|
49
|
+
@apply h-px bg-border my-2;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.autocomplete__empty {
|
|
53
|
+
@apply px-2 py-1 text-sm text-muted-foreground;
|
|
54
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.context-menu__trigger {
|
|
2
|
+
@apply select-none;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.context-menu__positioner {
|
|
6
|
+
@apply outline-0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.context-menu__popup {
|
|
10
|
+
transform-origin: var(--transform-origin);
|
|
11
|
+
|
|
12
|
+
@apply bg-surface text-surface-foreground rounded border p-3 shadow;
|
|
13
|
+
|
|
14
|
+
@apply transition-[transform,scale,opacity] motion-reduce:transition-none;
|
|
15
|
+
|
|
16
|
+
&[data-starting-style],
|
|
17
|
+
&[data-ending-style] {
|
|
18
|
+
@apply opacity-0 scale-90;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.context-menu__item {
|
|
23
|
+
@apply cursor-pointer;
|
|
24
|
+
|
|
25
|
+
@apply flex items-center gap-2;
|
|
26
|
+
|
|
27
|
+
@apply hover-safe:bg-primary hover-safe:text-primary-foreground;
|
|
28
|
+
|
|
29
|
+
@apply px-2 py-1 rounded;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.context-menu__separator {
|
|
33
|
+
@apply h-px bg-border my-2;
|
|
34
|
+
}
|
package/src/components/index.css
CHANGED
|
@@ -8,10 +8,13 @@
|
|
|
8
8
|
@import "./accordion.css";
|
|
9
9
|
@import "./link.css";
|
|
10
10
|
@import "./checkbox.css";
|
|
11
|
+
@import "./scroll-area.css";
|
|
12
|
+
@import "./spinner.css";
|
|
11
13
|
@import "./tabs.css";
|
|
12
14
|
@import "./drawer.css";
|
|
13
15
|
@import "./fieldset.css";
|
|
14
16
|
@import "./sidebar.css";
|
|
17
|
+
@import "./number-field.css";
|
|
15
18
|
@import "./button-group.css";
|
|
16
19
|
@import "./checkbox-group.css";
|
|
17
20
|
@import "./chip.css";
|
|
@@ -19,21 +22,25 @@
|
|
|
19
22
|
@import "./navbar.css";
|
|
20
23
|
@import "./slider.css";
|
|
21
24
|
@import "./avatar.css";
|
|
25
|
+
@import "./select.css";
|
|
22
26
|
@import "./text.css";
|
|
23
27
|
@import "./switch.css";
|
|
24
28
|
@import "./popover.css";
|
|
29
|
+
@import "./collapsible.css";
|
|
30
|
+
@import "./context-menu.css";
|
|
25
31
|
@import "./input.css";
|
|
32
|
+
@import "./preview-card.css";
|
|
26
33
|
@import "./table.css";
|
|
34
|
+
@import "./navigation-menu.css";
|
|
27
35
|
@import "./alert-dialog.css";
|
|
28
36
|
@import "./progress.css";
|
|
29
37
|
@import "./card.css";
|
|
38
|
+
@import "./tooltip.css";
|
|
39
|
+
@import "./combobox.css";
|
|
30
40
|
@import "./form.css";
|
|
41
|
+
@import "./autocomplete.css";
|
|
31
42
|
@import "./dialog.css";
|
|
43
|
+
@import "./toast.css";
|
|
32
44
|
@import "./menu.css";
|
|
33
45
|
@import "./button.css";
|
|
34
46
|
@import "./separator.css";
|
|
35
|
-
@import "./spinner.css";
|
|
36
|
-
@import "./tooltip.css";
|
|
37
|
-
@import "./toast.css";
|
|
38
|
-
@import "./collapsible.css";
|
|
39
|
-
@import "./select.css";
|
package/src/components/menu.css
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.navigation-menu {
|
|
2
|
+
@apply min-w-max;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.navigation-menu__list {
|
|
6
|
+
@apply flex items-center gap-4;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.navigation-menu__trigger {
|
|
10
|
+
@apply cursor-pointer;
|
|
11
|
+
|
|
12
|
+
@apply text-muted-foreground hover-safe:text-primary;
|
|
13
|
+
@apply flex items-center justify-center gap-1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.navigation-menu__icon {
|
|
17
|
+
@apply transition-transform motion-reduce:transition-none;
|
|
18
|
+
|
|
19
|
+
&[data-popup-open] {
|
|
20
|
+
@apply rotate-180;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
& svg {
|
|
24
|
+
@apply size-4;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.navigation-menu__popup {
|
|
29
|
+
@apply bg-surface text-surface-foreground rounded border p-6 shadow;
|
|
30
|
+
|
|
31
|
+
@apply w-fit max-w-[calc(100vw-1rem)];
|
|
32
|
+
|
|
33
|
+
@apply transition-[scale,opacity] motion-reduce:transition-none;
|
|
34
|
+
|
|
35
|
+
&[data-starting-style],
|
|
36
|
+
&[data-ending-style] {
|
|
37
|
+
@apply scale-95 opacity-0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.navigation-menu__arrow {
|
|
42
|
+
clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
|
|
43
|
+
@apply bg-surface;
|
|
44
|
+
@apply size-4 z-50 -top-3 relative;
|
|
45
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.number-field {
|
|
2
|
+
@apply flex flex-col gap-1 items-start;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.number-field__scrub-area {
|
|
6
|
+
cursor: ew-resize;
|
|
7
|
+
@apply select-none font-bold;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.number-field__scrub-area-cursor {
|
|
11
|
+
filter: drop-shadow(0 1px 1px var(--color-primary));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.number-field__group {
|
|
15
|
+
@apply flex;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.number-field__input {
|
|
19
|
+
@apply bg-input text-input-foreground hover-safe:bg-input/80 shadow border-y;
|
|
20
|
+
@apply px-3 py-2 h-10 w-fit;
|
|
21
|
+
|
|
22
|
+
&:focus-visible {
|
|
23
|
+
@apply status-focused;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.number-field__increment,
|
|
28
|
+
.number-field__decrement {
|
|
29
|
+
@apply cursor-pointer;
|
|
30
|
+
|
|
31
|
+
@apply bg-secondary text-secondary-foreground hover-safe:bg-secondary/80 border shadow;
|
|
32
|
+
@apply flex items-center justify-center;
|
|
33
|
+
@apply p-2 size-10;
|
|
34
|
+
|
|
35
|
+
&:first-of-type {
|
|
36
|
+
@apply rounded-l;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:last-of-type {
|
|
40
|
+
@apply rounded-r;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:focus-visible {
|
|
44
|
+
@apply status-focused;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.preview-card__positioner {
|
|
2
|
+
@apply outline-0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.preview-card__popup {
|
|
6
|
+
@apply bg-surface text-surface-foreground rounded border shadow;
|
|
7
|
+
|
|
8
|
+
@apply px-3 py-2;
|
|
9
|
+
|
|
10
|
+
@apply transition-[transform,scale,opacity] motion-reduce:transition-none;
|
|
11
|
+
|
|
12
|
+
&[data-starting-style],
|
|
13
|
+
&[data-ending-style] {
|
|
14
|
+
@apply opacity-0 scale-90;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,51 +1,82 @@
|
|
|
1
|
-
.select {
|
|
2
|
-
@apply w-full;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
.select__trigger {
|
|
6
|
-
@apply
|
|
7
|
-
@apply hover-safe:bg-
|
|
8
|
-
@apply
|
|
9
|
-
|
|
10
|
-
@apply
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
@apply cursor-pointer;
|
|
3
|
+
@apply bg-input text-input-foreground hover-safe:bg-input/80;
|
|
4
|
+
@apply border border-border rounded;
|
|
5
|
+
|
|
6
|
+
@apply flex items-center justify-between gap-2;
|
|
7
|
+
@apply h-10 px-3 py-2 w-fit min-w-56;
|
|
8
|
+
|
|
9
|
+
&:focus-visible {
|
|
10
|
+
@apply status-focused;
|
|
14
11
|
}
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
.select__icon {
|
|
18
|
-
@apply
|
|
15
|
+
@apply flex;
|
|
16
|
+
|
|
17
|
+
& svg {
|
|
18
|
+
@apply size-4 text-muted-foreground;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.select__positioner {
|
|
23
|
+
@apply outline-none z-10 select-none;
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
.select__popup {
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
min-width: var(--anchor-width);
|
|
28
|
+
transform-origin: var(--transform-origin);
|
|
29
|
+
|
|
30
|
+
@apply bg-surface text-surface-foreground rounded border-border shadow;
|
|
31
|
+
|
|
32
|
+
@apply fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 px-3 py-3;
|
|
33
|
+
|
|
34
|
+
@apply transition-[scale,opacity] motion-reduce:transition-none;
|
|
24
35
|
|
|
25
|
-
|
|
26
|
-
|
|
36
|
+
&[data-starting-style],
|
|
37
|
+
&[data-ending-style] {
|
|
38
|
+
@apply scale-95 opacity-0;
|
|
27
39
|
}
|
|
28
40
|
}
|
|
29
41
|
|
|
42
|
+
.select__list {
|
|
43
|
+
@apply overflow-y-auto scroll-pb-6 max-h-56;
|
|
44
|
+
}
|
|
45
|
+
|
|
30
46
|
.select__item {
|
|
31
|
-
@apply
|
|
32
|
-
@apply
|
|
33
|
-
|
|
47
|
+
@apply flex items-center gap-2 outline-0;
|
|
48
|
+
@apply cursor-pointer select-none;
|
|
49
|
+
|
|
50
|
+
@apply px-2 py-1 rounded;
|
|
51
|
+
@apply hover-safe:bg-primary hover-safe:text-primary-foreground;
|
|
34
52
|
}
|
|
35
53
|
|
|
36
54
|
.select__item-indicator {
|
|
37
|
-
|
|
55
|
+
& svg {
|
|
56
|
+
@apply size-4 block;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.select__value {
|
|
61
|
+
@apply flex-1 text-left overflow-hidden text-ellipsis whitespace-nowrap;
|
|
38
62
|
}
|
|
39
63
|
|
|
40
|
-
.
|
|
41
|
-
@apply -
|
|
64
|
+
.select__group {
|
|
65
|
+
@apply overflow-hidden;
|
|
42
66
|
}
|
|
43
67
|
|
|
44
68
|
.select__group-label {
|
|
45
|
-
@apply px-2 py-1
|
|
69
|
+
@apply px-2 py-1 text-sm font-medium text-muted-foreground;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.autocomplete__separator {
|
|
73
|
+
@apply h-px bg-border my-2;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.select__backdrop {
|
|
77
|
+
@apply fixed inset-0 z-0;
|
|
46
78
|
}
|
|
47
79
|
|
|
48
|
-
.
|
|
49
|
-
|
|
50
|
-
@apply flex cursor-default items-center justify-center py-1;
|
|
80
|
+
.select__arrow {
|
|
81
|
+
@apply hidden;
|
|
51
82
|
}
|