@fea-ui/styles 0.0.0-canary.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.
Files changed (38) hide show
  1. package/README.md +3 -0
  2. package/package.json +54 -0
  3. package/src/components/accordion.css +50 -0
  4. package/src/components/alert-dialog.css +50 -0
  5. package/src/components/alert.css +46 -0
  6. package/src/components/avatar.css +24 -0
  7. package/src/components/button-group.css +16 -0
  8. package/src/components/button.css +78 -0
  9. package/src/components/card.css +36 -0
  10. package/src/components/checkbox-group.css +4 -0
  11. package/src/components/checkbox.css +32 -0
  12. package/src/components/chip.css +40 -0
  13. package/src/components/container.css +4 -0
  14. package/src/components/dialog.css +50 -0
  15. package/src/components/drawer.css +84 -0
  16. package/src/components/field.css +12 -0
  17. package/src/components/fieldset.css +9 -0
  18. package/src/components/form.css +4 -0
  19. package/src/components/index.css +34 -0
  20. package/src/components/input.css +35 -0
  21. package/src/components/label.css +8 -0
  22. package/src/components/link.css +35 -0
  23. package/src/components/list.css +8 -0
  24. package/src/components/menu.css +48 -0
  25. package/src/components/meter.css +72 -0
  26. package/src/components/navbar.css +36 -0
  27. package/src/components/popover.css +51 -0
  28. package/src/components/progress.css +72 -0
  29. package/src/components/radio.css +31 -0
  30. package/src/components/separator.css +12 -0
  31. package/src/components/sidebar.css +80 -0
  32. package/src/components/slider.css +25 -0
  33. package/src/components/switch.css +40 -0
  34. package/src/components/table.css +32 -0
  35. package/src/components/tabs.css +49 -0
  36. package/src/components/text.css +4 -0
  37. package/src/components/toggle-button.css +8 -0
  38. package/src/styles.css +125 -0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # FeaUI Styles
2
+
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 ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@fea-ui/styles",
3
+ "version": "0.0.0-canary.2",
4
+ "description": "FeaUI Styles - Tailwind CSS styles for FeaUI components",
5
+ "keywords": [
6
+ "fea-ui",
7
+ "ui",
8
+ "design-system",
9
+ "tailwind",
10
+ "components",
11
+ "styles",
12
+ "react"
13
+ ],
14
+ "homepage": "https://ui.aydinthefirst.com",
15
+ "bugs": {
16
+ "url": "https://github.com/aydinthefirst/fea-ui/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/aydinthefirst/fea-ui.git",
21
+ "directory": "packages/styles"
22
+ },
23
+ "license": "MIT",
24
+ "author": "Halil Aydın <aydinhalil980@gmail.com>",
25
+ "sideEffects": false,
26
+ "type": "module",
27
+ "exports": {
28
+ ".": {
29
+ "style": "./src/styles.css",
30
+ "default": "./src/styles.css"
31
+ }
32
+ },
33
+ "files": [
34
+ "src"
35
+ ],
36
+ "scripts": {
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"
40
+ },
41
+ "dependencies": {
42
+ "tailwindcss": "^4.1.18"
43
+ },
44
+ "devDependencies": {
45
+ "@biomejs/biome": "2.3.10",
46
+ "@types/bun": "^1.3.5"
47
+ },
48
+ "peerDependencies": {
49
+ "tailwindcss": ">=4.0.0"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ }
54
+ }
@@ -0,0 +1,50 @@
1
+ .accordion {
2
+ @apply bg-surface text-surface-foreground flex w-full max-w-md flex-col justify-center;
3
+ }
4
+
5
+ .accordion__trigger {
6
+ @apply cursor-pointer;
7
+
8
+ @apply flex w-full items-center justify-between border-b p-3;
9
+
10
+ @apply transition-colors motion-reduce:transition-none;
11
+
12
+ &:hover {
13
+ @apply bg-primary/10;
14
+ }
15
+
16
+ &:focus {
17
+ @apply outline-none;
18
+ }
19
+ }
20
+
21
+ .accordion__title {
22
+ @apply text-left font-medium;
23
+ }
24
+
25
+ .accordion__trigger-icon {
26
+ @apply text-muted-foreground size-5;
27
+
28
+ @apply transition-transform duration-300 motion-reduce:transition-none;
29
+
30
+ [data-panel-open] > & {
31
+ @apply rotate-180;
32
+ }
33
+ }
34
+
35
+ .accordion__panel {
36
+ height: var(--accordion-panel-height);
37
+
38
+ @apply overflow-hidden;
39
+
40
+ @apply transition-[height] motion-reduce:transition-none;
41
+
42
+ &[data-ending-style],
43
+ &[data-starting-style] {
44
+ @apply h-0;
45
+ }
46
+ }
47
+
48
+ .accordion__content {
49
+ @apply p-4;
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-overlay rounded border p-6 shadow text-overlay-foreground;
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
+ }
@@ -0,0 +1,24 @@
1
+ /** Base Styling */
2
+ .avatar {
3
+ @apply bg-secondary text-secondary-foreground inline-flex items-center justify-center overflow-hidden rounded-full align-middle select-none;
4
+ }
5
+
6
+ .avatar--sm {
7
+ @apply size-10;
8
+ }
9
+
10
+ .avatar--md {
11
+ @apply size-12;
12
+ }
13
+
14
+ .avatar--lg {
15
+ @apply size-14;
16
+ }
17
+
18
+ .avatar__image {
19
+ @apply h-full w-full object-cover;
20
+ }
21
+
22
+ .avatar__fallback {
23
+ @apply flex h-full w-full items-center justify-center;
24
+ }
@@ -0,0 +1,16 @@
1
+ /** Base Styling */
2
+ .button-group {
3
+ @apply inline-flex items-center;
4
+ }
5
+
6
+ .button-group .button {
7
+ @apply rounded-none;
8
+ }
9
+
10
+ .button-group .button:first-child {
11
+ @apply rounded-l;
12
+ }
13
+
14
+ .button-group .button:last-child {
15
+ @apply rounded-r;
16
+ }
@@ -0,0 +1,78 @@
1
+ /** Base Styling */
2
+ .button {
3
+ @apply cursor-pointer;
4
+
5
+ @apply inline-flex items-center justify-center gap-2 rounded border font-medium text-nowrap;
6
+
7
+ @apply w-fit px-4 py-4;
8
+
9
+ @apply transition-[scale,background-color] motion-reduce:transition-none;
10
+
11
+ &[data-focused] {
12
+ @apply status-focused;
13
+ }
14
+
15
+ &:active {
16
+ @apply scale-95;
17
+ }
18
+
19
+ &[data-disabled] {
20
+ @apply status-disabled;
21
+ }
22
+
23
+ &[data-pending] {
24
+ @apply status-pending;
25
+ }
26
+
27
+ svg {
28
+ @apply size-5 shrink-0;
29
+ }
30
+ }
31
+
32
+ .button--sm {
33
+ @apply h-8 text-sm;
34
+
35
+ svg {
36
+ @apply size-4;
37
+ }
38
+ }
39
+
40
+ .button--md {
41
+ @apply h-10;
42
+ }
43
+
44
+ .button--lg {
45
+ @apply h-12;
46
+ }
47
+
48
+ .button--primary {
49
+ @apply bg-primary text-primary-foreground hover-safe:bg-primary/90;
50
+ }
51
+
52
+ .button--secondary {
53
+ @apply bg-secondary text-secondary-foreground hover-safe:bg-secondary/90;
54
+ }
55
+
56
+ .button--outline {
57
+ @apply bg-background text-foreground hover-safe:bg-secondary/10;
58
+ }
59
+
60
+ .button--danger {
61
+ @apply bg-danger text-danger-foreground hover-safe:bg-danger/90;
62
+ }
63
+
64
+ .button--ghost {
65
+ @apply border-0 bg-transparent text-foreground hover-safe:bg-secondary/10;
66
+ }
67
+
68
+ .button--icon-only {
69
+ @apply size-10;
70
+ }
71
+
72
+ .button--icon-only.button--sm {
73
+ @apply size-8;
74
+ }
75
+
76
+ .button--icon-only.button--lg {
77
+ @apply size-12;
78
+ }
@@ -0,0 +1,36 @@
1
+ /** Base Styling */
2
+
3
+ .card {
4
+ @apply w-full max-w-md rounded shadow;
5
+ @apply flex flex-col gap-3 p-5;
6
+ }
7
+
8
+ /** Variants */
9
+ .card--default {
10
+ @apply bg-surface text-surface-foreground;
11
+ }
12
+
13
+ .card--transparent {
14
+ @apply bg-transparent;
15
+ }
16
+
17
+ /** Slots */
18
+ .card__header {
19
+ @apply flex flex-col gap-1;
20
+ }
21
+
22
+ .card__title {
23
+ @apply text-2xl font-bold;
24
+ }
25
+
26
+ .card__description {
27
+ @apply text-muted-foreground text-base;
28
+ }
29
+
30
+ .card__body {
31
+ @apply flex flex-col gap-3;
32
+ }
33
+
34
+ .card__footer {
35
+ @apply flex items-center gap-3;
36
+ }
@@ -0,0 +1,4 @@
1
+ /** Base Styling */
2
+ .checkbox-group {
3
+ @apply flex flex-col;
4
+ }
@@ -0,0 +1,32 @@
1
+ /** Base Styling */
2
+ .checkbox {
3
+ @apply flex items-center justify-center rounded border;
4
+
5
+ @apply size-6 outline-none;
6
+
7
+ @apply transition-[visibility] motion-reduce:transition-none;
8
+
9
+ &[data-unchecked] {
10
+ @apply bg-input/50;
11
+ }
12
+
13
+ &[data-checked] {
14
+ @apply bg-input;
15
+ }
16
+
17
+ &:focus-visible {
18
+ @apply status-focused;
19
+ }
20
+ }
21
+
22
+ .checkbox__indicator {
23
+ @apply text-input-foreground flex;
24
+
25
+ &[data-unchecked] {
26
+ @apply hidden;
27
+ }
28
+ }
29
+
30
+ .checkbox__icon {
31
+ @apply size-4;
32
+ }
@@ -0,0 +1,40 @@
1
+ /** Base Styling */
2
+ .chip {
3
+ @apply inline-flex items-center justify-center gap-2 rounded-full border px-2 font-medium text-nowrap;
4
+ }
5
+
6
+ .chip--sm {
7
+ @apply h-4 text-sm;
8
+ }
9
+
10
+ .chip--md {
11
+ @apply h-6;
12
+ }
13
+
14
+ .chip--lg {
15
+ @apply h-8;
16
+ }
17
+
18
+ .chip--primary {
19
+ @apply bg-primary text-primary-foreground;
20
+ }
21
+
22
+ .chip--secondary {
23
+ @apply bg-secondary text-secondary-foreground;
24
+ }
25
+
26
+ .chip--outline {
27
+ @apply bg-transparent;
28
+ }
29
+
30
+ .chip--danger {
31
+ @apply bg-danger text-danger-foreground;
32
+ }
33
+
34
+ .chip--ghost {
35
+ @apply border-none bg-transparent;
36
+ }
37
+
38
+ .chip--success {
39
+ @apply bg-success text-success-foreground;
40
+ }
@@ -0,0 +1,4 @@
1
+ /** Base Styling */
2
+ .container {
3
+ @apply mx-auto px-4;
4
+ }
@@ -0,0 +1,50 @@
1
+ /** Base Styling */
2
+ .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
+ .dialog__popup {
14
+ @apply bg-overlay text-overlay-foreground 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
+ .dialog__title {
29
+ @apply text-lg font-semibold;
30
+ }
31
+
32
+ .dialog__description {
33
+ @apply text-muted-foreground text-sm;
34
+ }
35
+
36
+ .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,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,12 @@
1
+ /** Base Styling */
2
+ .field {
3
+ @apply flex flex-col gap-1;
4
+ }
5
+
6
+ .field__description {
7
+ @apply text-sm text-gray-500;
8
+ }
9
+
10
+ .field__error {
11
+ @apply text-sm text-red-600;
12
+ }
@@ -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
+ }
@@ -0,0 +1,4 @@
1
+ /** Base Styling */
2
+ .form {
3
+ @apply flex w-full flex-col gap-4;
4
+ }
@@ -0,0 +1,34 @@
1
+ @import "./meter.css";
2
+ @import "./alert.css";
3
+ @import "./label.css";
4
+ @import "./toggle-button.css";
5
+ @import "./field.css";
6
+ @import "./list.css";
7
+ @import "./radio.css";
8
+ @import "./accordion.css";
9
+ @import "./link.css";
10
+ @import "./checkbox.css";
11
+ @import "./tabs.css";
12
+ @import "./drawer.css";
13
+ @import "./fieldset.css";
14
+ @import "./sidebar.css";
15
+ @import "./button-group.css";
16
+ @import "./checkbox-group.css";
17
+ @import "./chip.css";
18
+ @import "./container.css";
19
+ @import "./navbar.css";
20
+ @import "./slider.css";
21
+ @import "./avatar.css";
22
+ @import "./text.css";
23
+ @import "./switch.css";
24
+ @import "./popover.css";
25
+ @import "./input.css";
26
+ @import "./table.css";
27
+ @import "./alert-dialog.css";
28
+ @import "./progress.css";
29
+ @import "./card.css";
30
+ @import "./form.css";
31
+ @import "./dialog.css";
32
+ @import "./menu.css";
33
+ @import "./button.css";
34
+ @import "./separator.css";
@@ -0,0 +1,35 @@
1
+ .input,
2
+ .textarea {
3
+ @apply bg-input text-input-foreground rounded border;
4
+ @apply w-full px-3 py-2;
5
+
6
+ @apply transition-[brightness] motion-reduce:transition-none;
7
+
8
+ &::placeholder {
9
+ @apply text-muted-foreground;
10
+ }
11
+
12
+ &[data-focused] {
13
+ @apply status-focused;
14
+ }
15
+
16
+ &:disabled {
17
+ @apply status-disabled;
18
+ }
19
+
20
+ &[data-invalid] {
21
+ @apply border-danger;
22
+ }
23
+ }
24
+
25
+ .input--sm {
26
+ @apply h-8 text-sm;
27
+ }
28
+
29
+ .input--md {
30
+ @apply h-10;
31
+ }
32
+
33
+ .input--lg {
34
+ @apply h-12;
35
+ }
@@ -0,0 +1,8 @@
1
+ /** Base Styling */
2
+ .label {
3
+ @apply font-medium text-foreground leading-none;
4
+ }
5
+
6
+ [data-required="true"] .label {
7
+ @apply after:content-['*'] after:ml-0.5 after:text-danger;
8
+ }