@filip.mazev/common-parts 0.0.4 → 0.0.6

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,8 +1,9 @@
1
1
  {
2
2
  "name": "@filip.mazev/common-parts",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "exports": {
5
5
  "./mixins": "./lib/styles/_mixins.scss",
6
+ "./theme": "./lib/styles/_theme.scss",
6
7
  "./package.json": {
7
8
  "default": "./package.json"
8
9
  },
@@ -0,0 +1,33 @@
1
+ @use "sass:map";
2
+
3
+ $breakpoints: (
4
+ xs: 360px,
5
+
6
+ sm: 640px,
7
+ md: 768px,
8
+
9
+ lg: 1024px,
10
+ xl: 1280px,
11
+
12
+ 2xl: 1536px,
13
+ 3xl: 1920px,
14
+ 4xl: 2560px
15
+ ) !default;
16
+
17
+ @mixin respond-up($size) {
18
+ @media (min-width: map.get($breakpoints, $size)) {
19
+ @content;
20
+ }
21
+ }
22
+
23
+ @mixin respond-down($size) {
24
+ @media (max-width: map.get($breakpoints, $size)) {
25
+ @content;
26
+ }
27
+ }
28
+
29
+ @mixin respond-between($min, $max) {
30
+ @media (min-width: map.get($breakpoints, $min)) and (max-width: map.get($breakpoints, $max)) {
31
+ @content;
32
+ }
33
+ }
@@ -0,0 +1,81 @@
1
+ :root {
2
+ /* --- GRAYSCALE (Neutral) --- */
3
+ --fm-color-gray-50: #f9fafb;
4
+ --fm-color-gray-100: #f3f4f6;
5
+ --fm-color-gray-200: #e5e7eb;
6
+ --fm-color-gray-300: #d1d5db;
7
+ --fm-color-gray-400: #9ca3af;
8
+ --fm-color-gray-500: #6b7280;
9
+ --fm-color-gray-600: #4b5563;
10
+ --fm-color-gray-700: #374151;
11
+ --fm-color-gray-800: #1f2937;
12
+ --fm-color-gray-900: #111827;
13
+
14
+ /* --- WARNING (Amber/Yellow) --- */
15
+ --fm-color-warning-50: #fffbeb;
16
+ --fm-color-warning-100: #fef3c7;
17
+ --fm-color-warning-200: #fde68a;
18
+ --fm-color-warning-300: #fcd34d;
19
+ --fm-color-warning-400: #fbbf24;
20
+ --fm-color-warning-500: #f59e0b; /* Base Warning */
21
+ --fm-color-warning-600: #d97706;
22
+ --fm-color-warning-700: #b45309;
23
+ --fm-color-warning-800: #92400e;
24
+ --fm-color-warning-900: #78350f;
25
+
26
+ /* Accents (Saturated) */
27
+ --fm-color-warning-A100: #ffe16a;
28
+ --fm-color-warning-A200: #ffd740;
29
+ --fm-color-warning-A400: #ffc400;
30
+ --fm-color-warning-A700: #ffab00;
31
+
32
+ /* --- ERROR (Red) --- */
33
+ --fm-color-error-50: #fef2f2;
34
+ --fm-color-error-100: #fee2e2;
35
+ --fm-color-error-200: #fecaca;
36
+ --fm-color-error-300: #fca5a5;
37
+ --fm-color-error-400: #f87171;
38
+ --fm-color-error-500: #ef4444; /* Base Error */
39
+ --fm-color-error-600: #dc2626;
40
+ --fm-color-error-700: #b91c1c;
41
+ --fm-color-error-800: #991b1b;
42
+ --fm-color-error-900: #7f1d1d;
43
+
44
+ /* Accents (Saturated Reds) */
45
+ --fm-color-error-A100: #ff8a80;
46
+ --fm-color-error-A200: #ff5252;
47
+ --fm-color-error-A400: #ff1744;
48
+ --fm-color-error-A700: #d50000;
49
+
50
+ /* --- CONTRAST COLORS (Text on top of color) --- */
51
+ --fm-contrast-gray-50: var(--fm-color-gray-900);
52
+ --fm-contrast-gray-100: var(--fm-color-gray-900);
53
+ --fm-contrast-gray-500: #ffffff;
54
+ --fm-contrast-gray-900: #ffffff;
55
+
56
+ --fm-contrast-warning-50: var(--fm-color-gray-900);
57
+ --fm-contrast-warning-500: var(--fm-color-gray-900);
58
+ --fm-contrast-warning-900: #ffffff;
59
+ --fm-contrast-warning-A400: var(--fm-color-gray-900);
60
+
61
+ /* --- SEMANTIC MAPPINGS --- */
62
+
63
+ --fm-bg-canvas: var(--fm-color-gray-50); /* Page background */
64
+ --fm-bg-surface: #ffffff; /* Modals, Cards, Popups */
65
+ --fm-bg-element: var(--fm-color-gray-100); /* Inputs, secondary buttons */
66
+ --fm-text-main: var(--fm-color-gray-900);
67
+ --fm-border: var(--fm-color-gray-200);
68
+ --fm-status-warning: var(--fm-color-warning-500);
69
+ --fm-status-error: var(--fm-color-error-500);
70
+ --fm-bg-error-subtle: var(--fm-color-error-50);
71
+ }
72
+
73
+ [data-theme='dark'] {
74
+ --fm-bg-canvas: var(--fm-color-gray-900); /* Page background */
75
+ --fm-bg-surface: #1e1e1e; /* Modals, Cards, Popups */
76
+ --fm-bg-element: var(--fm-color-gray-800); /* Inputs, secondary buttons */
77
+ --fm-text-main: var(--fm-color-gray-50);
78
+ --fm-border: var(--fm-color-gray-700);
79
+ --fm-status-error: var(--fm-color-error-400);
80
+ --fm-bg-error-subtle: rgba(239, 68, 68, 0.15);
81
+ }