@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fea-ui/styles",
3
- "version": "0.0.0",
3
+ "version": "0.0.1",
4
4
  "description": "FeaUI Styles - Tailwind CSS styles for FeaUI components",
5
5
  "keywords": [
6
6
  "fea-ui",
@@ -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
+ }
@@ -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";
@@ -43,6 +43,6 @@
43
43
  }
44
44
  }
45
45
 
46
- .menu__separator {
47
- @apply my-2 h-px bg-border;
46
+ .autocomplete__separator {
47
+ @apply h-px bg-border my-2;
48
48
  }
@@ -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
+ }
@@ -0,0 +1,3 @@
1
+ .scroll-area {
2
+ @apply relative overflow-auto;
3
+ }
@@ -1,51 +1,82 @@
1
- .select {
2
- @apply w-full;
3
- }
4
-
5
1
  .select__trigger {
6
- @apply flex w-full items-center justify-between rounded-md border bg-surface px-3 py-2 text-sm text-surface-foreground;
7
- @apply hover-safe:bg-secondary/10 transition-all;
8
- @apply outline-none ring-offset-surface focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2;
9
- @apply placeholder:text-muted-foreground;
10
- @apply disabled:cursor-not-allowed disabled:opacity-50;
11
-
12
- &[data-state="open"] {
13
- @apply ring-2 ring-ring ring-offset-2;
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 text-muted-foreground h-4 w-4 opacity-50;
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
- @apply min-w-32 overflow-hidden rounded-md border bg-overlay text-overlay-foreground shadow-md;
23
- @apply transition-[transform,scale,opacity] motion-reduce:transition-none;
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
- @starting-style {
26
- @apply opacity-0 scale-95;
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 relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none;
32
- @apply focus:bg-secondary focus:text-secondary-foreground;
33
- @apply data-disabled:pointer-events-none data-disabled:opacity-50;
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
- @apply absolute left-2 flex h-3.5 w-3.5 items-center justify-center;
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
- .select__separator {
41
- @apply -mx-1 my-1 h-px bg-muted;
64
+ .select__group {
65
+ @apply overflow-hidden;
42
66
  }
43
67
 
44
68
  .select__group-label {
45
- @apply px-2 py-1.5 text-sm font-semibold;
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
- .select__scroll-up-arrow,
49
- .select__scroll-down-arrow {
50
- @apply flex cursor-default items-center justify-center py-1;
80
+ .select__arrow {
81
+ @apply hidden;
51
82
  }
package/src/styles.css CHANGED
@@ -115,6 +115,10 @@
115
115
  }
116
116
 
117
117
  body {
118
- @apply bg-background text-foreground;
118
+ @apply relative bg-background text-foreground;
119
+ }
120
+
121
+ .root {
122
+ @apply antialiased isolate;
119
123
  }
120
124
  }