@fea-ui/styles 0.1.0-alpha.1 → 0.1.0-alpha.10

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 (39) hide show
  1. package/README.md +2 -14
  2. package/package.json +7 -8
  3. package/src/components/accordion.css +22 -26
  4. package/src/components/alert-dialog.css +50 -0
  5. package/src/components/alert.css +46 -0
  6. package/src/components/button-group.css +4 -4
  7. package/src/components/button.css +42 -32
  8. package/src/components/card.css +1 -1
  9. package/src/components/checkbox-group.css +1 -1
  10. package/src/components/checkbox.css +1 -1
  11. package/src/components/chip.css +10 -10
  12. package/src/components/container.css +1 -1
  13. package/src/components/description.css +3 -0
  14. package/src/components/dialog.css +13 -1
  15. package/src/components/drawer.css +84 -0
  16. package/src/components/field-error.css +3 -0
  17. package/src/components/fieldset.css +9 -0
  18. package/src/components/index.css +27 -17
  19. package/src/components/input.css +25 -27
  20. package/src/components/label.css +5 -1
  21. package/src/components/link.css +22 -16
  22. package/src/components/list.css +2 -2
  23. package/src/components/menu.css +48 -0
  24. package/src/components/meter.css +1 -1
  25. package/src/components/navbar.css +12 -14
  26. package/src/components/popover.css +11 -0
  27. package/src/components/progress.css +72 -0
  28. package/src/components/radio.css +31 -0
  29. package/src/components/sidebar.css +65 -0
  30. package/src/components/slider.css +25 -0
  31. package/src/components/switch.css +19 -19
  32. package/src/components/table.css +31 -0
  33. package/src/components/tabs.css +32 -32
  34. package/src/components/text-field.css +4 -0
  35. package/src/components/text.css +1 -1
  36. package/src/components/toggle-button.css +4 -4
  37. package/src/styles.css +99 -104
  38. package/src/components/field.css +0 -12
  39. package/src/components/textarea.css +0 -1
package/README.md CHANGED
@@ -1,15 +1,3 @@
1
- # styles
1
+ # FeaUI Styles
2
2
 
3
- To install dependencies:
4
-
5
- ```bash
6
- bun install
7
- ```
8
-
9
- To run:
10
-
11
- ```bash
12
- bun run index.ts
13
- ```
14
-
15
- This project was created using `bun init` in bun v1.3.4. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
3
+ This package contains the core styles and design tokens for the FeaUI component library. It provides a consistent look and feel across all components and can be easily integrated into your projects.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fea-ui/styles",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.10",
4
4
  "description": "FeaUI Styles - Tailwind CSS styles for FeaUI components",
5
5
  "keywords": [
6
6
  "fea-ui",
@@ -11,7 +11,7 @@
11
11
  "styles",
12
12
  "react"
13
13
  ],
14
- "homepage": "https://feaui.aydinthefirst.com",
14
+ "homepage": "https://ui.aydinthefirst.com",
15
15
  "bugs": {
16
16
  "url": "https://github.com/aydinthefirst/fea-ui/issues"
17
17
  },
@@ -34,17 +34,16 @@
34
34
  "src"
35
35
  ],
36
36
  "scripts": {
37
- "build:css": "bunx @tailwindcss/cli -i src/styles.css -o dist/index.css --minify"
37
+ "build:css": "bunx @tailwindcss/cli -i src/styles.css -o dist/index.css --minify",
38
+ "check": "biome check --write",
39
+ "gen:exports": "bun run scripts/gen-exports.mjs"
38
40
  },
39
41
  "dependencies": {
40
- "tailwindcss": "^4.0.0"
42
+ "tailwindcss": "^4.1.18"
41
43
  },
42
44
  "devDependencies": {
43
45
  "@biomejs/biome": "2.3.10",
44
- "@types/bun": "latest",
45
- "prettier": "^3.7.4",
46
- "prettier-plugin-packagejson": "^2.5.20",
47
- "prettier-plugin-tailwindcss": "^0.7.2"
46
+ "@types/bun": "^1.3.5"
48
47
  },
49
48
  "peerDependencies": {
50
49
  "tailwindcss": ">=4.0.0"
@@ -1,54 +1,50 @@
1
- /** Base Styling */
2
1
  .accordion {
3
- @apply flex w-96 max-w-[calc(100vw-8rem)] flex-col justify-center gap-4;
4
- @apply bg-accordion text-accordion-foreground;
5
- }
6
-
7
- .accordion__item {
8
- @apply border-border border-b;
9
- }
10
-
11
- .accordion__header {
12
- @apply m-0;
2
+ @apply bg-surface text-surface-foreground flex w-full max-w-md flex-col justify-center;
13
3
  }
14
4
 
15
5
  .accordion__trigger {
16
6
  @apply cursor-pointer;
17
7
 
18
- @apply relative flex w-full items-baseline justify-between gap-4;
8
+ @apply flex w-full items-center justify-between border-b p-3;
19
9
 
20
- @media (hover: hover) {
21
- &:hover {
22
- @apply bg-accordion/90;
23
- }
10
+ @apply transition-colors motion-reduce:transition-none;
11
+
12
+ &:hover {
13
+ @apply bg-primary/10;
24
14
  }
25
15
 
26
- &:focus-visible {
27
- @apply status-focused;
16
+ &:focus {
17
+ @apply outline-none;
28
18
  }
29
19
  }
30
20
 
21
+ .accordion__title {
22
+ @apply text-left font-medium;
23
+ }
24
+
31
25
  .accordion__trigger-icon {
32
- @apply size-4;
26
+ @apply text-muted-foreground size-5;
33
27
 
34
- @apply transition-transform motion-reduce:transform-none;
28
+ @apply transition-transform duration-300 motion-reduce:transition-none;
35
29
 
36
- [data-panel-open] & {
37
- @apply rotate-45;
30
+ [data-panel-open] > & {
31
+ @apply rotate-180;
38
32
  }
39
33
  }
40
34
 
41
35
  .accordion__panel {
36
+ height: var(--accordion-panel-height);
37
+
42
38
  @apply overflow-hidden;
43
39
 
44
40
  @apply transition-[height] motion-reduce:transition-none;
45
41
 
46
- &[data-starting-style],
47
- &[data-ending-style] {
48
- height: 0;
42
+ &[data-ending-style],
43
+ &[data-starting-style] {
44
+ @apply h-0;
49
45
  }
50
46
  }
51
47
 
52
48
  .accordion__content {
53
- @apply p-2;
49
+ @apply p-4;
54
50
  }
@@ -0,0 +1,50 @@
1
+ /** Base Styling */
2
+ .alert-dialog__backdrop {
3
+ @apply fixed inset-0 bg-black/50 opacity-20 backdrop-blur-sm;
4
+
5
+ @apply transition-opacity motion-reduce:transition-none;
6
+
7
+ &[data-starting-style],
8
+ &[data-ending-style] {
9
+ @apply opacity-0;
10
+ }
11
+ }
12
+
13
+ .alert-dialog__popup {
14
+ @apply bg-popover rounded border p-6 shadow;
15
+
16
+ @apply w-full max-w-lg;
17
+
18
+ @apply fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2;
19
+
20
+ @apply transition-[scale,opacity] motion-reduce:transition-none;
21
+
22
+ &[data-starting-style],
23
+ &[data-ending-style] {
24
+ @apply scale-95 opacity-0;
25
+ }
26
+ }
27
+
28
+ .alert-dialog__title {
29
+ @apply text-lg font-semibold;
30
+ }
31
+
32
+ .alert-dialog__description {
33
+ @apply text-muted-foreground text-sm;
34
+ }
35
+
36
+ .alert-dialog__close {
37
+ @apply cursor-pointer;
38
+
39
+ @apply absolute top-0 right-0 m-2;
40
+
41
+ svg {
42
+ @apply text-muted-foreground size-5;
43
+
44
+ @apply transition-colors motion-reduce:transition-none;
45
+
46
+ &:hover {
47
+ @apply text-foreground;
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,46 @@
1
+ .alert {
2
+ @apply flex items-start justify-between p-5 rounded border bg-surface shadow;
3
+
4
+ @apply w-full;
5
+ }
6
+
7
+ .alert__indicator {
8
+ @apply shrink-0 mr-4 mt-1;
9
+
10
+ svg {
11
+ @apply size-5;
12
+ }
13
+ }
14
+
15
+ .alert__content {
16
+ @apply flex-1 flex flex-col gap-1;
17
+ }
18
+
19
+ .alert__title {
20
+ @apply font-medium;
21
+ }
22
+
23
+ .alert__description {
24
+ @apply text-sm text-muted-foreground;
25
+ }
26
+
27
+ /* Variants */
28
+ .alert--primary {
29
+ @apply text-primary;
30
+ }
31
+
32
+ .alert--danger {
33
+ @apply text-red-500;
34
+ }
35
+
36
+ .alert--success {
37
+ @apply text-green-500;
38
+ }
39
+
40
+ .alert--warning {
41
+ @apply text-yellow-500;
42
+ }
43
+
44
+ .alert--info {
45
+ @apply text-blue-500;
46
+ }
@@ -1,16 +1,16 @@
1
1
  /** Base Styling */
2
2
  .button-group {
3
- @apply inline-flex items-center;
3
+ @apply inline-flex items-center;
4
4
  }
5
5
 
6
6
  .button-group .button {
7
- @apply rounded-none;
7
+ @apply rounded-none;
8
8
  }
9
9
 
10
10
  .button-group .button:first-child {
11
- @apply rounded-l;
11
+ @apply rounded-l;
12
12
  }
13
13
 
14
14
  .button-group .button:last-child {
15
- @apply rounded-r;
15
+ @apply rounded-r;
16
16
  }
@@ -1,76 +1,86 @@
1
1
  /** Base Styling */
2
2
  .button {
3
- @apply cursor-pointer;
3
+ @apply cursor-pointer;
4
4
 
5
- @apply inline-flex items-center justify-center gap-2 rounded border font-medium text-nowrap;
5
+ @apply inline-flex items-center justify-center gap-2 rounded border font-medium text-nowrap;
6
6
 
7
- @apply w-fit px-4 py-4;
7
+ @apply w-fit px-4 py-4;
8
8
 
9
- @apply transition-all motion-reduce:transition-none;
9
+ @apply transition-[scale] motion-reduce:transition-none;
10
10
 
11
- @media (hover: hover) {
12
- &:hover:not([data-disabled]) {
13
- @apply brightness-90;
14
- }
15
- }
11
+ &[data-hovered] {
12
+ @apply brightness-90;
13
+ }
16
14
 
17
- &:active {
18
- @apply scale-95;
19
- }
15
+ &[data-focused] {
16
+ @apply status-focused;
17
+ }
20
18
 
21
- &:focus-visible {
22
- @apply status-focused;
23
- }
19
+ &:active {
20
+ @apply scale-95;
21
+ }
24
22
 
25
- &[data-disabled] {
26
- @apply status-disabled;
27
- }
23
+ &[data-disabled] {
24
+ @apply status-disabled;
25
+ }
28
26
 
29
- svg {
30
- @apply size-5 shrink-0;
31
- }
27
+ &[data-pending] {
28
+ @apply status-pending;
29
+ }
30
+
31
+ svg {
32
+ @apply size-5 shrink-0;
33
+ }
32
34
  }
33
35
 
34
36
  .button--sm {
35
- @apply h-8 text-sm;
37
+ @apply h-8 text-sm;
38
+
39
+ svg {
40
+ @apply size-4;
41
+ }
36
42
  }
37
43
 
38
44
  .button--md {
39
- @apply h-10;
45
+ @apply h-10;
40
46
  }
41
47
 
42
48
  .button--lg {
43
- @apply h-12;
49
+ @apply h-12;
44
50
  }
45
51
 
46
52
  .button--primary {
47
- @apply bg-primary text-primary-foreground;
53
+ @apply bg-primary text-primary-foreground;
48
54
  }
49
55
 
50
56
  .button--secondary {
51
- @apply bg-secondary text-secondary-foreground;
57
+ @apply bg-secondary text-secondary-foreground;
52
58
  }
53
59
 
54
60
  .button--outline {
55
- @apply bg-background text-foreground;
61
+ @apply bg-background text-foreground;
56
62
  }
57
63
 
58
64
  .button--danger {
59
- @apply bg-danger text-danger-foreground;
65
+ @apply bg-danger text-danger-foreground;
60
66
  }
61
67
 
62
68
  .button--ghost {
63
- @apply hover:bg-primary/10 border-0 bg-transparent;
69
+ @apply border-0 bg-transparent text-foreground;
70
+
71
+ &:hover:not([data-disabled]) {
72
+ @apply bg-secondary/10;
73
+ }
64
74
  }
65
75
 
66
76
  .button--icon-only {
67
- @apply size-10;
77
+ @apply size-10;
68
78
  }
69
79
 
70
80
  .button--icon-only.button--sm {
71
- @apply size-8;
81
+ @apply size-8;
72
82
  }
73
83
 
74
84
  .button--icon-only.button--lg {
75
- @apply size-12;
85
+ @apply size-12;
76
86
  }
@@ -7,7 +7,7 @@
7
7
 
8
8
  /** Variants */
9
9
  .card--default {
10
- @apply bg-card text-card-foreground;
10
+ @apply bg-surface text-surface-foreground;
11
11
  }
12
12
 
13
13
  .card--transparent {
@@ -1,4 +1,4 @@
1
1
  /** Base Styling */
2
2
  .checkbox-group {
3
- @apply flex flex-col items-start gap-4;
3
+ @apply flex flex-col;
4
4
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  @apply size-6 outline-none;
6
6
 
7
- @apply transition-all motion-reduce:transition-none;
7
+ @apply transition-[visibility] motion-reduce:transition-none;
8
8
 
9
9
  &[data-unchecked] {
10
10
  @apply bg-input/50;
@@ -1,40 +1,40 @@
1
1
  /** Base Styling */
2
2
  .chip {
3
- @apply inline-flex items-center justify-center gap-2 rounded-full border px-2 font-medium text-nowrap;
3
+ @apply inline-flex items-center justify-center gap-2 rounded-full border px-2 font-medium text-nowrap;
4
4
  }
5
5
 
6
6
  .chip--sm {
7
- @apply h-4 text-sm;
7
+ @apply h-4 text-sm;
8
8
  }
9
9
 
10
10
  .chip--md {
11
- @apply h-6;
11
+ @apply h-6;
12
12
  }
13
13
 
14
14
  .chip--lg {
15
- @apply h-8;
15
+ @apply h-8;
16
16
  }
17
17
 
18
18
  .chip--primary {
19
- @apply bg-primary text-primary-foreground;
19
+ @apply bg-primary text-primary-foreground;
20
20
  }
21
21
 
22
22
  .chip--secondary {
23
- @apply bg-secondary text-secondary-foreground;
23
+ @apply bg-secondary text-secondary-foreground;
24
24
  }
25
25
 
26
26
  .chip--outline {
27
- @apply bg-transparent;
27
+ @apply bg-transparent;
28
28
  }
29
29
 
30
30
  .chip--danger {
31
- @apply bg-danger text-danger-foreground;
31
+ @apply bg-danger text-danger-foreground;
32
32
  }
33
33
 
34
34
  .chip--ghost {
35
- @apply border-none bg-transparent;
35
+ @apply border-none bg-transparent;
36
36
  }
37
37
 
38
38
  .chip--success {
39
- @apply bg-success text-success-foreground;
39
+ @apply bg-success text-success-foreground;
40
40
  }
@@ -1,4 +1,4 @@
1
1
  /** Base Styling */
2
2
  .container {
3
- @apply mx-auto px-4;
3
+ @apply mx-auto px-4;
4
4
  }
@@ -0,0 +1,3 @@
1
+ .description {
2
+ @apply text-muted-foreground text-sm;
3
+ }
@@ -17,7 +17,7 @@
17
17
 
18
18
  @apply fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2;
19
19
 
20
- @apply transition-all motion-reduce:transition-none;
20
+ @apply transition-[scale,opacity] motion-reduce:transition-none;
21
21
 
22
22
  &[data-starting-style],
23
23
  &[data-ending-style] {
@@ -34,5 +34,17 @@
34
34
  }
35
35
 
36
36
  .dialog__close {
37
+ @apply cursor-pointer;
38
+
37
39
  @apply absolute top-0 right-0 m-2;
40
+
41
+ svg {
42
+ @apply text-muted-foreground size-5;
43
+
44
+ @apply transition-colors motion-reduce:transition-none;
45
+
46
+ &:hover {
47
+ @apply text-foreground;
48
+ }
49
+ }
38
50
  }
@@ -0,0 +1,84 @@
1
+ .drawer__backdrop {
2
+ @apply fixed inset-0 bg-black/50 opacity-50;
3
+
4
+ @apply transition-opacity motion-reduce:transition-none;
5
+
6
+ &[data-starting-style],
7
+ &[data-ending-style] {
8
+ @apply opacity-0;
9
+ }
10
+ }
11
+
12
+ .drawer__popup {
13
+ @apply fixed p-3 z-50;
14
+
15
+ @apply bg-surface text-surface-foreground shadow;
16
+
17
+ @apply transition-[translate] motion-reduce:transition-none;
18
+ }
19
+
20
+ .drawer__title {
21
+ @apply text-lg font-medium;
22
+ }
23
+
24
+ .drawer__description {
25
+ @apply text-sm text-muted-foreground;
26
+ }
27
+
28
+ .drawer__close {
29
+ @apply cursor-pointer;
30
+
31
+ @apply absolute top-0 end-0 m-3 rounded-full;
32
+
33
+ @apply text-muted-foreground;
34
+
35
+ @apply transition-colors motion-reduce:transition-none;
36
+
37
+ &:hover {
38
+ @apply bg-secondary/10;
39
+ }
40
+
41
+ &:focus {
42
+ @apply outline-none;
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Variants
48
+ */
49
+
50
+ .drawer--right.drawer__popup {
51
+ @apply end-0 top-0 w-96 max-w-[calc(100vw-2rem)] h-full rounded-l;
52
+
53
+ &[data-starting-style],
54
+ &[data-ending-style] {
55
+ @apply translate-x-full;
56
+ }
57
+ }
58
+
59
+ .drawer--left.drawer__popup {
60
+ @apply start-0 top-0 w-96 h-full rounded-r max-w-[calc(100vw-2rem)];
61
+
62
+ &[data-starting-style],
63
+ &[data-ending-style] {
64
+ @apply -translate-x-full;
65
+ }
66
+ }
67
+
68
+ .drawer--top.drawer__popup {
69
+ @apply top-0 start-0 w-full h-96 rounded-b;
70
+
71
+ &[data-starting-style],
72
+ &[data-ending-style] {
73
+ @apply -translate-y-full;
74
+ }
75
+ }
76
+
77
+ .drawer--bottom.drawer__popup {
78
+ @apply bottom-0 start-0 w-full h-96 rounded-t;
79
+
80
+ &[data-starting-style],
81
+ &[data-ending-style] {
82
+ @apply translate-y-full;
83
+ }
84
+ }
@@ -0,0 +1,3 @@
1
+ .field-error {
2
+ @apply text-danger text-sm;
3
+ }
@@ -0,0 +1,9 @@
1
+ .fieldset {
2
+ @apply flex w-full max-w-md flex-col gap-1;
3
+ }
4
+
5
+ .fieldset__legend {
6
+ @apply border-b pb-4;
7
+
8
+ @apply text-lg font-semibold;
9
+ }
@@ -1,26 +1,36 @@
1
- @import "./input.css";
2
- @import "./textarea.css";
3
1
  @import "./meter.css";
2
+ @import "./label.css";
3
+ @import "./toggle-button.css";
4
4
  @import "./list.css";
5
- @import "./navbar.css";
6
- @import "./checkbox-group.css";
7
- @import "./card.css";
8
- @import "./avatar.css";
9
- @import "./button-group.css";
5
+ @import "./radio.css";
10
6
  @import "./accordion.css";
11
- @import "./label.css";
12
- @import "./menu.css";
13
- @import "./chip.css";
14
7
  @import "./link.css";
15
- @import "./container.css";
8
+ @import "./checkbox.css";
16
9
  @import "./tabs.css";
17
- @import "./button.css";
10
+ @import "./drawer.css";
11
+ @import "./fieldset.css";
12
+ @import "./button-group.css";
13
+ @import "./checkbox-group.css";
14
+ @import "./description.css";
15
+ @import "./chip.css";
16
+ @import "./container.css";
17
+ @import "./navbar.css";
18
+ @import "./slider.css";
19
+ @import "./avatar.css";
20
+ @import "./text-field.css";
18
21
  @import "./text.css";
19
- @import "./form.css";
20
- @import "./separator.css";
21
22
  @import "./switch.css";
22
- @import "./checkbox.css";
23
- @import "./field.css";
24
- @import "./toggle-button.css";
23
+ @import "./popover.css";
24
+ @import "./input.css";
25
25
  @import "./table.css";
26
+ @import "./alert-dialog.css";
27
+ @import "./progress.css";
28
+ @import "./card.css";
29
+ @import "./form.css";
30
+ @import "./field-error.css";
26
31
  @import "./dialog.css";
32
+ @import "./menu.css";
33
+ @import "./button.css";
34
+ @import "./separator.css";
35
+ @import "./alert.css";
36
+ @import "./sidebar.css";