@sanvika/ui 0.1.0
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/README.md +36 -0
- package/package.json +60 -0
- package/src/components/buttons/Button.jsx +96 -0
- package/src/components/buttons/FavoriteHeartButton.jsx +41 -0
- package/src/components/buttons/ScrollButton.jsx +36 -0
- package/src/components/buttons/ThreeDotButton.jsx +36 -0
- package/src/components/common/Container.jsx +38 -0
- package/src/components/common/Section.jsx +60 -0
- package/src/components/icons/BellIcon.jsx +10 -0
- package/src/components/icons/ChevronDown.jsx +20 -0
- package/src/components/icons/EmailIcon.jsx +9 -0
- package/src/components/icons/FaAngleDown.jsx +9 -0
- package/src/components/icons/FaAngleRight.jsx +9 -0
- package/src/components/icons/FaArrowDown.jsx +9 -0
- package/src/components/icons/FaArrowLeft.jsx +9 -0
- package/src/components/icons/FaArrowUp.jsx +9 -0
- package/src/components/icons/FaBell.jsx +9 -0
- package/src/components/icons/FaBullhorn.jsx +10 -0
- package/src/components/icons/FaCalendarAlt.jsx +9 -0
- package/src/components/icons/FaCheck.jsx +9 -0
- package/src/components/icons/FaCheckCircle.jsx +9 -0
- package/src/components/icons/FaCheckDouble.jsx +9 -0
- package/src/components/icons/FaChevronDown.jsx +9 -0
- package/src/components/icons/FaChevronRight.jsx +9 -0
- package/src/components/icons/FaCircle.jsx +9 -0
- package/src/components/icons/FaComments.jsx +9 -0
- package/src/components/icons/FaEye.jsx +9 -0
- package/src/components/icons/FaEyeSlash.jsx +9 -0
- package/src/components/icons/FaHome.jsx +9 -0
- package/src/components/icons/FaKeyboard.jsx +9 -0
- package/src/components/icons/FaLocationArrow.jsx +9 -0
- package/src/components/icons/FaMapMarkerAlt.jsx +9 -0
- package/src/components/icons/FaMoon.jsx +9 -0
- package/src/components/icons/FaPaperPlane.jsx +9 -0
- package/src/components/icons/FaPaperclip.jsx +9 -0
- package/src/components/icons/FaSignInAlt.jsx +9 -0
- package/src/components/icons/FaSmile.jsx +9 -0
- package/src/components/icons/FaStar.jsx +9 -0
- package/src/components/icons/FaTag.jsx +9 -0
- package/src/components/icons/FaThumbsDown.jsx +9 -0
- package/src/components/icons/FaThumbsUp.jsx +9 -0
- package/src/components/icons/FaTrash.jsx +9 -0
- package/src/components/icons/FaUser.jsx +9 -0
- package/src/components/icons/FaUserCircle.jsx +9 -0
- package/src/components/icons/FacebookIcon.jsx +9 -0
- package/src/components/icons/HalfMoonIcon.jsx +18 -0
- package/src/components/icons/HeartIcon.jsx +9 -0
- package/src/components/icons/InstagramIcon.jsx +9 -0
- package/src/components/icons/LinkedInIcon.jsx +9 -0
- package/src/components/icons/MapMarkerIcon.jsx +9 -0
- package/src/components/icons/MdWbSunny.jsx +9 -0
- package/src/components/icons/ReFreshIcon.jsx +49 -0
- package/src/components/icons/SearchIcon.jsx +20 -0
- package/src/components/icons/StarIcon.jsx +9 -0
- package/src/components/icons/TelegramIcon.jsx +9 -0
- package/src/components/icons/TwitterIcon.jsx +9 -0
- package/src/components/icons/UserIcon.jsx +9 -0
- package/src/components/icons/WhatsappIcon.jsx +9 -0
- package/src/components/icons/YoutubeIcon.jsx +9 -0
- package/src/components/icons/index.js +60 -0
- package/src/components/layout/Footer.jsx +142 -0
- package/src/components/layout/Navbar.jsx +65 -0
- package/src/components/modals/Modal.jsx +74 -0
- package/src/components/progressBar/ProgressBar.jsx +113 -0
- package/src/context/ThemeContext.jsx +91 -0
- package/src/index.js +29 -0
- package/src/styles/base/elements.css +71 -0
- package/src/styles/base/reset.css +52 -0
- package/src/styles/base/typography.css +80 -0
- package/src/styles/components/buttons/Button.module.css +160 -0
- package/src/styles/components/buttons/FavoriteHeartButton.module.css +35 -0
- package/src/styles/components/buttons/ThreeDotButton.module.css +41 -0
- package/src/styles/components/common/Container.module.css +25 -0
- package/src/styles/components/common/Section.module.css +54 -0
- package/src/styles/components/layouts/Footer.module.css +100 -0
- package/src/styles/components/layouts/Layout.module.css +21 -0
- package/src/styles/components/layouts/Navbar.module.css +121 -0
- package/src/styles/components/modals/Modal.module.css +39 -0
- package/src/styles/components/progressBar/ProgressBar.module.css +28 -0
- package/src/styles/fouc-prevention.css +19 -0
- package/src/styles/index.css +27 -0
- package/src/styles/tokens/dark.css +121 -0
- package/src/styles/tokens/light.css +158 -0
- package/src/styles/utilities/colors.css +59 -0
- package/src/styles/utilities/transitions.css +40 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/* src/styles/tokens/light.css */
|
|
2
|
+
|
|
3
|
+
/* ========================================== */
|
|
4
|
+
/* LIGHT THEME VARIABLES (DESIGN TOKENS) */
|
|
5
|
+
/* ========================================== */
|
|
6
|
+
:root {
|
|
7
|
+
/* ===== PRIMARY BACKGROUND COLORS ===== */
|
|
8
|
+
--bg-color: #fafafa;
|
|
9
|
+
--card-bg: #fafafa;
|
|
10
|
+
--input-bg: #dddddd;
|
|
11
|
+
--light-bg: #dddddd;
|
|
12
|
+
--section-bg: #f5f5f5;
|
|
13
|
+
--form-card-bg: #fafafa;
|
|
14
|
+
--hover-color: #f2ecec;
|
|
15
|
+
--table-stripe-bg: #dddddd;
|
|
16
|
+
--muted-bg: #f2f2f2;
|
|
17
|
+
--disabled-bg: #e9ecef;
|
|
18
|
+
|
|
19
|
+
/* ===== TEXT & CONTENT COLORS ===== */
|
|
20
|
+
--text-color: #000000;
|
|
21
|
+
--heading-color: #101010;
|
|
22
|
+
--label-color: #000000;
|
|
23
|
+
--placeholder-color: #242222;
|
|
24
|
+
--secondary-text-color: #121111;
|
|
25
|
+
|
|
26
|
+
/* ===== INTERACTIVE ELEMENTS ===== */
|
|
27
|
+
--link-color: #0066cc;
|
|
28
|
+
--link-hover-color: #004c99;
|
|
29
|
+
--focus-border-color: #007bff;
|
|
30
|
+
--focus-shadow-color: rgba(0, 123, 255, 0.25);
|
|
31
|
+
|
|
32
|
+
/* ===== BORDERS & ACCENTS ===== */
|
|
33
|
+
--border-color: #fa7d08;
|
|
34
|
+
--border-color-light: #e0e0e0;
|
|
35
|
+
--muted-border: #dcdcdc;
|
|
36
|
+
--shadow-color: rgba(0, 0, 0, 0.1);
|
|
37
|
+
|
|
38
|
+
/* ===== BRAND & PRIMARY COLORS ===== */
|
|
39
|
+
--primary-color: #0984e3;
|
|
40
|
+
--secondary-color: #6c757d;
|
|
41
|
+
--accent-color: #007bff;
|
|
42
|
+
--accent-btn-bg: #007bff;
|
|
43
|
+
--accent-btn-hover-bg: #0056b3;
|
|
44
|
+
|
|
45
|
+
/* ===== NAVIGATION SPECIFIC COLORS ===== */
|
|
46
|
+
--nav-bg: #000000;
|
|
47
|
+
--nav-text: #ffffff;
|
|
48
|
+
--nav-primary-color: #0984e3;
|
|
49
|
+
--nav-accent-color: #007bff;
|
|
50
|
+
--nav-link-color: #0066cc;
|
|
51
|
+
--nav-link-hover: #004c99;
|
|
52
|
+
--nav-highlight: #4ade80;
|
|
53
|
+
--nav-highlight-bg: rgba(74, 222, 128, 0.1);
|
|
54
|
+
--error-bg-light: rgba(239, 68, 68, 0.1);
|
|
55
|
+
--error-hover-color: #ef4444;
|
|
56
|
+
|
|
57
|
+
/* ===== STATUS & FEEDBACK COLORS ===== */
|
|
58
|
+
--success-color: #28a745;
|
|
59
|
+
--error-color: #dc3545;
|
|
60
|
+
--warning-color: #ffc107;
|
|
61
|
+
--info-color: #17a2b8;
|
|
62
|
+
|
|
63
|
+
/* Status Background Colors */
|
|
64
|
+
--success-bg: #d1e7dd;
|
|
65
|
+
--success-border: #badbcc;
|
|
66
|
+
--error-bg: #f8d7da;
|
|
67
|
+
--error-border: #f5c2c7;
|
|
68
|
+
--warning-bg: #fff3cd;
|
|
69
|
+
--warning-border: #ffecb5;
|
|
70
|
+
--info-bg: #cff4fc;
|
|
71
|
+
--info-border: #b6effb;
|
|
72
|
+
|
|
73
|
+
/* ===== ALIASES (BACKWARD COMPATIBILITY) ===== */
|
|
74
|
+
--danger-color: var(--error-color);
|
|
75
|
+
--danger-color-hover: var(--error-color);
|
|
76
|
+
--muted-color: var(--secondary-text-color);
|
|
77
|
+
|
|
78
|
+
/* ===== FORM & TABLE ELEMENTS ===== */
|
|
79
|
+
--tag-bg: #e9ecef;
|
|
80
|
+
--table-header-bg: #007bff;
|
|
81
|
+
--table-header-text: #ffffff;
|
|
82
|
+
|
|
83
|
+
/* ===== FORM THEME SPECIFICS ===== */
|
|
84
|
+
--form-bg: linear-gradient(135deg, #f3f4f6 0%, #e6e7ea 100%);
|
|
85
|
+
--form-header-border: #e6e7ea;
|
|
86
|
+
--form-title: #2c3e50;
|
|
87
|
+
--form-subtitle: #6c757d;
|
|
88
|
+
|
|
89
|
+
/* ===== BUTTON VARIABLES ===== */
|
|
90
|
+
--btn-primary-bg: #0077cc;
|
|
91
|
+
--btn-primary-hover-bg: #0a6ed1;
|
|
92
|
+
--btn-primary-text: #ffffff;
|
|
93
|
+
--btn-primary-hover-text: #ffffff;
|
|
94
|
+
|
|
95
|
+
--btn-secondary-bg: #6c757d;
|
|
96
|
+
--btn-secondary-hover-bg: #495057;
|
|
97
|
+
--btn-secondary-text: #ffffff;
|
|
98
|
+
--btn-secondary-hover-text: #ffffff;
|
|
99
|
+
|
|
100
|
+
--btn-danger-bg: #dc3545;
|
|
101
|
+
--btn-danger-hover-bg: #b02a37;
|
|
102
|
+
--btn-danger-text: #ffffff;
|
|
103
|
+
--btn-danger-hover-text: #ffffff;
|
|
104
|
+
|
|
105
|
+
--btn-success-bg: #28a745;
|
|
106
|
+
--btn-success-hover-bg: #1e7a34;
|
|
107
|
+
--btn-success-text: #ffffff;
|
|
108
|
+
--btn-success-hover-text: #ffffff;
|
|
109
|
+
|
|
110
|
+
/* ===== LAYOUT ===== */
|
|
111
|
+
--container-max-width: 1280px;
|
|
112
|
+
--section-padding-y: clamp(2rem, 5vw, 5rem);
|
|
113
|
+
--section-padding-x: clamp(1rem, 4vw, 2rem);
|
|
114
|
+
|
|
115
|
+
/* ===== RADIUS & SPACING ===== */
|
|
116
|
+
--radius-sm: 4px;
|
|
117
|
+
--radius-md: 8px;
|
|
118
|
+
--radius-lg: 12px;
|
|
119
|
+
--radius-full: 9999px;
|
|
120
|
+
|
|
121
|
+
--space-1: 0.25rem;
|
|
122
|
+
--space-2: 0.5rem;
|
|
123
|
+
--space-3: 0.75rem;
|
|
124
|
+
--space-4: 1rem;
|
|
125
|
+
--space-6: 1.5rem;
|
|
126
|
+
--space-8: 2rem;
|
|
127
|
+
--space-12: 3rem;
|
|
128
|
+
--space-16: 4rem;
|
|
129
|
+
|
|
130
|
+
/* ===== TYPOGRAPHY ===== */
|
|
131
|
+
--font-sans:
|
|
132
|
+
"Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial,
|
|
133
|
+
sans-serif;
|
|
134
|
+
--font-mono: "Geist Mono", "Fira Code", monospace;
|
|
135
|
+
|
|
136
|
+
--text-xs: 0.75rem;
|
|
137
|
+
--text-sm: 0.875rem;
|
|
138
|
+
--text-base: 1rem;
|
|
139
|
+
--text-lg: 1.125rem;
|
|
140
|
+
--text-xl: 1.25rem;
|
|
141
|
+
--text-2xl: 1.5rem;
|
|
142
|
+
--text-3xl: 1.875rem;
|
|
143
|
+
--text-4xl: 2.25rem;
|
|
144
|
+
|
|
145
|
+
/* ===== LOADING/SKELETON ===== */
|
|
146
|
+
--skeleton-base-color: #a0c1e4;
|
|
147
|
+
--skeleton-highlight-color: #e6f2ff;
|
|
148
|
+
|
|
149
|
+
/* ===== SHADOWS (use var(--shadow-color) — theme-aware) ===== */
|
|
150
|
+
--shadow-sm: 0 1px 3px var(--shadow-color);
|
|
151
|
+
--shadow-md: 0 4px 12px var(--shadow-color);
|
|
152
|
+
--shadow-lg: 0 8px 24px var(--shadow-color);
|
|
153
|
+
|
|
154
|
+
/* ===== TRANSITIONS ===== */
|
|
155
|
+
--transition-fast: 0.15s ease;
|
|
156
|
+
--transition-base: 0.25s ease;
|
|
157
|
+
--transition-slow: 0.4s ease;
|
|
158
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* src/styles/utilities/colors.css */
|
|
2
|
+
|
|
3
|
+
/* ========================================== */
|
|
4
|
+
/* UTILITY CLASSES FOR THEME COLORS */
|
|
5
|
+
/* ========================================== */
|
|
6
|
+
|
|
7
|
+
/* Text colors */
|
|
8
|
+
.text-primary {
|
|
9
|
+
color: var(--primary-color);
|
|
10
|
+
}
|
|
11
|
+
.text-secondary {
|
|
12
|
+
color: var(--secondary-text-color);
|
|
13
|
+
}
|
|
14
|
+
.text-muted {
|
|
15
|
+
color: var(--secondary-text-color);
|
|
16
|
+
}
|
|
17
|
+
.text-success {
|
|
18
|
+
color: var(--success-color);
|
|
19
|
+
}
|
|
20
|
+
.text-error {
|
|
21
|
+
color: var(--error-color);
|
|
22
|
+
}
|
|
23
|
+
.text-warning {
|
|
24
|
+
color: var(--warning-color);
|
|
25
|
+
}
|
|
26
|
+
.text-info {
|
|
27
|
+
color: var(--info-color);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Background colors */
|
|
31
|
+
.bg-primary {
|
|
32
|
+
background-color: var(--bg-color);
|
|
33
|
+
}
|
|
34
|
+
.bg-card {
|
|
35
|
+
background-color: var(--card-bg);
|
|
36
|
+
}
|
|
37
|
+
.bg-section {
|
|
38
|
+
background-color: var(--section-bg);
|
|
39
|
+
}
|
|
40
|
+
.bg-success {
|
|
41
|
+
background-color: var(--success-bg);
|
|
42
|
+
}
|
|
43
|
+
.bg-error {
|
|
44
|
+
background-color: var(--error-bg);
|
|
45
|
+
}
|
|
46
|
+
.bg-warning {
|
|
47
|
+
background-color: var(--warning-bg);
|
|
48
|
+
}
|
|
49
|
+
.bg-info {
|
|
50
|
+
background-color: var(--info-bg);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Border utilities */
|
|
54
|
+
.border {
|
|
55
|
+
border: 1px solid var(--border-color-light);
|
|
56
|
+
}
|
|
57
|
+
.border-accent {
|
|
58
|
+
border: 1px solid var(--border-color);
|
|
59
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* src/styles/utilities/transitions.css */
|
|
2
|
+
|
|
3
|
+
/* ========================================== */
|
|
4
|
+
/* THEME TRANSITION & ANIMATION SYSTEM */
|
|
5
|
+
/* ========================================== */
|
|
6
|
+
|
|
7
|
+
:root[data-theme] * {
|
|
8
|
+
transition:
|
|
9
|
+
background-color var(--transition-base),
|
|
10
|
+
color var(--transition-base),
|
|
11
|
+
border-color var(--transition-base),
|
|
12
|
+
box-shadow var(--transition-base);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Theme change transition helper */
|
|
16
|
+
.theme-transitioning * {
|
|
17
|
+
transition:
|
|
18
|
+
background-color 0.3s ease,
|
|
19
|
+
color 0.3s ease,
|
|
20
|
+
border-color 0.3s ease !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Preserve button hover transitions separately */
|
|
24
|
+
.theme-transitioning button {
|
|
25
|
+
transition:
|
|
26
|
+
background-color 0.3s ease,
|
|
27
|
+
color 0.3s ease,
|
|
28
|
+
transform 0.15s ease !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Disable transitions during theme switch for inputs (prevent double-flash) */
|
|
32
|
+
.theme-transitioning input,
|
|
33
|
+
.theme-transitioning select,
|
|
34
|
+
.theme-transitioning textarea {
|
|
35
|
+
transition: none !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
html[data-theme] {
|
|
39
|
+
visibility: visible;
|
|
40
|
+
}
|