@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,41 @@
|
|
|
1
|
+
/* src/styles/components/buttons/ThreeDotButton.module.css */
|
|
2
|
+
|
|
3
|
+
.threeDotButton {
|
|
4
|
+
min-width: 44px !important;
|
|
5
|
+
width: 44px !important;
|
|
6
|
+
max-width: 44px !important;
|
|
7
|
+
height: 44px !important;
|
|
8
|
+
padding: 6px !important;
|
|
9
|
+
gap: 0 !important;
|
|
10
|
+
background: transparent !important;
|
|
11
|
+
background-color: transparent !important;
|
|
12
|
+
border: none !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.threeDotButton:hover,
|
|
16
|
+
.threeDotButton:active {
|
|
17
|
+
background: transparent !important;
|
|
18
|
+
background-color: transparent !important;
|
|
19
|
+
border: none !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.threeDotButton:focus-visible {
|
|
23
|
+
outline: 2px solid var(--accent-color, #007bff);
|
|
24
|
+
border-radius: var(--radius-sm, 4px);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.dotsWrapper {
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
gap: 3px;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.dot {
|
|
36
|
+
width: 4px;
|
|
37
|
+
height: 4px;
|
|
38
|
+
background: currentColor;
|
|
39
|
+
border-radius: 50%;
|
|
40
|
+
display: inline-block;
|
|
41
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* src/styles/components/common/Container.module.css */
|
|
2
|
+
|
|
3
|
+
.container {
|
|
4
|
+
width: 100%;
|
|
5
|
+
max-width: var(--container-max-width, 1280px);
|
|
6
|
+
margin-left: auto;
|
|
7
|
+
margin-right: auto;
|
|
8
|
+
padding-left: var(--section-padding-x);
|
|
9
|
+
padding-right: var(--section-padding-x);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Narrow variant for content-heavy pages */
|
|
13
|
+
.narrow {
|
|
14
|
+
max-width: 768px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Wide variant — nearly full-bleed */
|
|
18
|
+
.wide {
|
|
19
|
+
max-width: 1536px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Full — no max-width cap */
|
|
23
|
+
.full {
|
|
24
|
+
max-width: none;
|
|
25
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* src/styles/components/common/Section.module.css */
|
|
2
|
+
|
|
3
|
+
.section {
|
|
4
|
+
width: 100%;
|
|
5
|
+
padding-top: var(--section-padding-y);
|
|
6
|
+
padding-bottom: var(--section-padding-y);
|
|
7
|
+
background-color: var(--bg-color);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* Alternate section — subtle contrast */
|
|
11
|
+
.alternate {
|
|
12
|
+
background-color: var(--section-bg);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Card surface */
|
|
16
|
+
.card {
|
|
17
|
+
background-color: var(--card-bg);
|
|
18
|
+
border-radius: var(--radius-lg);
|
|
19
|
+
box-shadow: var(--shadow-sm);
|
|
20
|
+
border: 1px solid var(--border-color-light);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Tight padding */
|
|
24
|
+
.tight {
|
|
25
|
+
padding-top: calc(var(--section-padding-y) * 0.5);
|
|
26
|
+
padding-bottom: calc(var(--section-padding-y) * 0.5);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* No padding */
|
|
30
|
+
.flush {
|
|
31
|
+
padding-top: 0;
|
|
32
|
+
padding-bottom: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.header {
|
|
36
|
+
margin-bottom: var(--space-8);
|
|
37
|
+
text-align: center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.title {
|
|
41
|
+
font-size: clamp(var(--text-xl), 4vw, var(--text-3xl));
|
|
42
|
+
font-weight: 700;
|
|
43
|
+
color: var(--heading-color);
|
|
44
|
+
margin-bottom: var(--space-3);
|
|
45
|
+
line-height: 1.2;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.subtitle {
|
|
49
|
+
font-size: clamp(var(--text-sm), 2vw, var(--text-base));
|
|
50
|
+
color: var(--secondary-text-color);
|
|
51
|
+
max-width: 640px;
|
|
52
|
+
margin-left: auto;
|
|
53
|
+
margin-right: auto;
|
|
54
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* src/styles/components/layouts/Footer.module.css */
|
|
2
|
+
|
|
3
|
+
.footer {
|
|
4
|
+
width: 100%;
|
|
5
|
+
background-color: var(--card-bg);
|
|
6
|
+
border-top: 1px solid var(--border-color);
|
|
7
|
+
border-bottom: 1px solid var(--border-color);
|
|
8
|
+
padding: clamp(6px, 1.5vw, 12px) clamp(8px, 3vw, 24px);
|
|
9
|
+
min-height: clamp(40px, 8vw, 56px);
|
|
10
|
+
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
gap: clamp(4px, 1vw, 8px);
|
|
16
|
+
|
|
17
|
+
transition:
|
|
18
|
+
background-color 0.3s ease,
|
|
19
|
+
color 0.3s ease;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.content {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: center;
|
|
26
|
+
width: 100%;
|
|
27
|
+
max-width: clamp(300px, 90vw, 480px);
|
|
28
|
+
gap: clamp(4px, 0.8vw, 8px);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Social icons row */
|
|
32
|
+
.social {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: clamp(12px, 3vw, 24px);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.socialLink {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
color: var(--text-color);
|
|
43
|
+
font-size: clamp(1.25rem, 4vw, 1.5rem);
|
|
44
|
+
transition: color 0.3s ease;
|
|
45
|
+
text-decoration: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.socialLink:hover {
|
|
49
|
+
opacity: 0.8;
|
|
50
|
+
text-decoration: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Legal links row */
|
|
54
|
+
.links {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
flex-wrap: wrap;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
gap: clamp(8px, 2vw, 16px);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.link {
|
|
63
|
+
font-size: clamp(0.65rem, 2vw, 0.75rem);
|
|
64
|
+
color: var(--text-color);
|
|
65
|
+
text-decoration: none;
|
|
66
|
+
white-space: nowrap;
|
|
67
|
+
transition: color 0.3s ease;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.link:hover {
|
|
71
|
+
color: var(--link-hover-color);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Copyright / trust line */
|
|
75
|
+
.trust {
|
|
76
|
+
font-size: clamp(0.6rem, 1.8vw, 0.68rem);
|
|
77
|
+
color: var(--text-color);
|
|
78
|
+
text-align: center;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.trustBadge {
|
|
82
|
+
display: inline-flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: clamp(2px, 0.5vw, 4px);
|
|
85
|
+
color: var(--text-color);
|
|
86
|
+
font-size: inherit;
|
|
87
|
+
text-decoration: none;
|
|
88
|
+
transition: color 0.3s ease;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.trustBadge:hover {
|
|
92
|
+
color: var(--success-color);
|
|
93
|
+
text-decoration: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.checkIcon {
|
|
97
|
+
color: var(--success-color);
|
|
98
|
+
font-size: 0.75rem;
|
|
99
|
+
font-weight: 700;
|
|
100
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* src/styles/components/layouts/Layout.module.css */
|
|
2
|
+
|
|
3
|
+
.wrapper {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
min-height: 100vh;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* Push content down to clear the fixed header */
|
|
10
|
+
.content {
|
|
11
|
+
flex: 1 0 auto;
|
|
12
|
+
margin-top: clamp(48px, 10vw, 64px); /* matches header min-height */
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.main {
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.footerWrapper {
|
|
20
|
+
flex-shrink: 0;
|
|
21
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/* src/styles/components/layouts/Navbar.module.css */
|
|
2
|
+
|
|
3
|
+
.header {
|
|
4
|
+
width: 100%;
|
|
5
|
+
position: fixed;
|
|
6
|
+
top: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
right: 0;
|
|
9
|
+
z-index: 1000;
|
|
10
|
+
background-color: var(--card-bg);
|
|
11
|
+
border-top: 1px solid var(--border-color);
|
|
12
|
+
border-bottom: 1px solid var(--border-color);
|
|
13
|
+
box-shadow: 0 2px 4px var(--shadow-color);
|
|
14
|
+
min-height: clamp(48px, 10vw, 64px);
|
|
15
|
+
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: auto 1fr auto;
|
|
18
|
+
align-items: center;
|
|
19
|
+
column-gap: clamp(8px, 2vw, 20px);
|
|
20
|
+
padding: 0 clamp(8px, 3vw, 24px);
|
|
21
|
+
|
|
22
|
+
transition: background-color 0.3s ease;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Left: logo area */
|
|
26
|
+
.left {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: var(--space-2);
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
color: inherit;
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.logo {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: var(--space-2);
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
color: var(--text-color);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.logoMark {
|
|
44
|
+
width: clamp(28px, 8vw, 40px);
|
|
45
|
+
height: clamp(28px, 8vw, 40px);
|
|
46
|
+
object-fit: contain;
|
|
47
|
+
border-radius: var(--radius-md);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.logoText {
|
|
51
|
+
font-size: clamp(var(--text-base), 3vw, var(--text-lg));
|
|
52
|
+
font-weight: 700;
|
|
53
|
+
color: var(--text-color);
|
|
54
|
+
letter-spacing: -0.02em;
|
|
55
|
+
white-space: nowrap;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Center: nav links */
|
|
59
|
+
.nav {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
gap: clamp(4px, 1.5vw, 24px);
|
|
64
|
+
list-style: none;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.navLink {
|
|
69
|
+
font-size: clamp(var(--text-xs), 2.5vw, var(--text-sm));
|
|
70
|
+
font-weight: 500;
|
|
71
|
+
color: var(--text-color);
|
|
72
|
+
text-decoration: none;
|
|
73
|
+
padding: var(--space-1) var(--space-2);
|
|
74
|
+
border-radius: var(--radius-sm);
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
transition:
|
|
77
|
+
color 0.3s ease,
|
|
78
|
+
background-color 0.3s ease;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.navLink:hover {
|
|
82
|
+
color: var(--nav-link-hover);
|
|
83
|
+
background-color: var(--hover-color);
|
|
84
|
+
text-decoration: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.navLinkActive {
|
|
88
|
+
color: var(--primary-color);
|
|
89
|
+
font-weight: 600;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Right: actions */
|
|
93
|
+
.right {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
gap: clamp(4px, 1vw, 12px);
|
|
97
|
+
flex-shrink: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Theme toggle button */
|
|
101
|
+
.themeToggle {
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
width: clamp(32px, 8vw, 40px);
|
|
106
|
+
height: clamp(32px, 8vw, 40px);
|
|
107
|
+
border-radius: var(--radius-full);
|
|
108
|
+
border: 1px solid var(--border-color-light);
|
|
109
|
+
background: transparent;
|
|
110
|
+
color: var(--text-color);
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
font-size: var(--text-base);
|
|
113
|
+
transition:
|
|
114
|
+
background-color 0.3s ease,
|
|
115
|
+
border-color 0.3s ease;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.themeToggle:hover {
|
|
119
|
+
background-color: var(--hover-color);
|
|
120
|
+
border-color: var(--border-color);
|
|
121
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* src/styles/components/modals/Modal.module.css */
|
|
2
|
+
|
|
3
|
+
.modalOverlay {
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
background-color: rgba(0, 0, 0, 0.7);
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
z-index: 10000;
|
|
14
|
+
animation: fadeIn 0.25s ease;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.modalContent {
|
|
18
|
+
background-color: var(--card-bg);
|
|
19
|
+
padding: clamp(16px, 4vw, 24px);
|
|
20
|
+
border-radius: var(--radius-md, 8px);
|
|
21
|
+
border: 1px solid var(--border-color-light);
|
|
22
|
+
width: clamp(300px, 90vw, 480px);
|
|
23
|
+
max-height: 90vh;
|
|
24
|
+
overflow-y: auto;
|
|
25
|
+
position: relative;
|
|
26
|
+
box-shadow: 0 4px 20px var(--shadow-color, rgba(0, 0, 0, 0.2));
|
|
27
|
+
transition: background-color 0.3s ease;
|
|
28
|
+
animation: slideIn 0.25s ease;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes fadeIn {
|
|
32
|
+
from { opacity: 0; }
|
|
33
|
+
to { opacity: 1; }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@keyframes slideIn {
|
|
37
|
+
from { transform: translateY(-12px); opacity: 0; }
|
|
38
|
+
to { transform: translateY(0); opacity: 1; }
|
|
39
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* src/styles/components/progressBar/ProgressBar.module.css */
|
|
2
|
+
|
|
3
|
+
.wrapper {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 4px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.track {
|
|
11
|
+
width: 100%;
|
|
12
|
+
border-radius: var(--radius-full, 9999px);
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
background-color: var(--progress-bg, rgba(0, 0, 0, 0.1));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.bar {
|
|
18
|
+
height: 100%;
|
|
19
|
+
border-radius: var(--radius-full, 9999px);
|
|
20
|
+
background: var(--primary-color, #007bff);
|
|
21
|
+
transition: width 0ms; /* animation handled via JS RAF */
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.label {
|
|
25
|
+
font-size: var(--text-xs, 11px);
|
|
26
|
+
color: var(--secondary-text-color);
|
|
27
|
+
text-align: right;
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* src/styles/fouc-prevention.css */
|
|
2
|
+
|
|
3
|
+
/* ========================================== */
|
|
4
|
+
/* FLASH OF UNSTYLED CONTENT PREVENTION */
|
|
5
|
+
/* ========================================== */
|
|
6
|
+
|
|
7
|
+
/* Hide content until theme is applied to prevent flash */
|
|
8
|
+
:root:not([data-theme]) {
|
|
9
|
+
visibility: hidden;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
html[data-theme] {
|
|
13
|
+
visibility: visible;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
[data-theme] {
|
|
17
|
+
visibility: visible;
|
|
18
|
+
transition: none;
|
|
19
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* src/styles/index.css */
|
|
2
|
+
/* @sanvika/ui — main styles entry point
|
|
3
|
+
* Import this ONCE in your project root layout:
|
|
4
|
+
* import "@sanvika/ui/styles";
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* 1. Design tokens — light theme (default) */
|
|
8
|
+
@import "./tokens/light.css";
|
|
9
|
+
|
|
10
|
+
/* 2. Design tokens — dark theme overrides */
|
|
11
|
+
@import "./tokens/dark.css";
|
|
12
|
+
|
|
13
|
+
/* 3. Base reset & HTML element defaults */
|
|
14
|
+
@import "./base/reset.css";
|
|
15
|
+
|
|
16
|
+
/* 4. Typography */
|
|
17
|
+
@import "./base/typography.css";
|
|
18
|
+
|
|
19
|
+
/* 5. HTML element base styles */
|
|
20
|
+
@import "./base/elements.css";
|
|
21
|
+
|
|
22
|
+
/* 6. FOUC prevention (theme flash) */
|
|
23
|
+
@import "./fouc-prevention.css";
|
|
24
|
+
|
|
25
|
+
/* 7. Utility classes */
|
|
26
|
+
@import "./utilities/colors.css";
|
|
27
|
+
@import "./utilities/transitions.css";
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/* src/styles/tokens/dark.css */
|
|
2
|
+
|
|
3
|
+
/* ========================================== */
|
|
4
|
+
/* DARK THEME VARIABLES (DESIGN TOKENS) */
|
|
5
|
+
/* ========================================== */
|
|
6
|
+
[data-theme="dark"] {
|
|
7
|
+
/* ===== PRIMARY BACKGROUND COLORS ===== */
|
|
8
|
+
--bg-color: #111111;
|
|
9
|
+
--card-bg: #111111;
|
|
10
|
+
--input-bg: #111111;
|
|
11
|
+
--light-bg: #171616;
|
|
12
|
+
--section-bg: #1a1a1a;
|
|
13
|
+
--form-card-bg: #090909;
|
|
14
|
+
--hover-color: #1d1c1c;
|
|
15
|
+
--table-stripe-bg: #1a1919;
|
|
16
|
+
--muted-bg: #1f1f1f;
|
|
17
|
+
--disabled-bg: #505050;
|
|
18
|
+
|
|
19
|
+
/* ===== TEXT & CONTENT COLORS ===== */
|
|
20
|
+
--text-color: #ffffff;
|
|
21
|
+
--heading-color: #ffffff;
|
|
22
|
+
--label-color: #ffffff;
|
|
23
|
+
--placeholder-color: #efeaea;
|
|
24
|
+
--secondary-text-color: #ffffff;
|
|
25
|
+
|
|
26
|
+
/* ===== INTERACTIVE ELEMENTS ===== */
|
|
27
|
+
--link-color: #88c5ff;
|
|
28
|
+
--link-hover-color: #b3d9ff;
|
|
29
|
+
--focus-border-color: #007bff;
|
|
30
|
+
--focus-shadow-color: rgba(0, 123, 255, 0.25);
|
|
31
|
+
|
|
32
|
+
/* ===== BORDERS & ACCENTS ===== */
|
|
33
|
+
--border-color: #fbad05;
|
|
34
|
+
--border-color-light: #8fb6f5;
|
|
35
|
+
--muted-border: #2a2a2a;
|
|
36
|
+
--shadow-color: rgba(0, 0, 0, 0.3);
|
|
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: #161f2c;
|
|
47
|
+
--nav-text: #f0f0f0;
|
|
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.15);
|
|
54
|
+
--error-bg-light: rgba(239, 68, 68, 0.15);
|
|
55
|
+
--error-hover-color: #f87171;
|
|
56
|
+
|
|
57
|
+
/* ===== STATUS & FEEDBACK COLORS ===== */
|
|
58
|
+
--success-color: #25a03a;
|
|
59
|
+
--error-color: #b20c0c;
|
|
60
|
+
--warning-color: #e0aa12;
|
|
61
|
+
--info-color: #1a9eb0;
|
|
62
|
+
|
|
63
|
+
--success-bg: #133b24;
|
|
64
|
+
--success-border: #1a542f;
|
|
65
|
+
--error-bg: #3b1212;
|
|
66
|
+
--error-border: #4f1c1c;
|
|
67
|
+
--warning-bg: #3b2c10;
|
|
68
|
+
--warning-border: #543e17;
|
|
69
|
+
--info-bg: #0e3842;
|
|
70
|
+
--info-border: #164d58;
|
|
71
|
+
|
|
72
|
+
/* ===== ALIASES (BACKWARD COMPATIBILITY) ===== */
|
|
73
|
+
--danger-color: var(--error-color);
|
|
74
|
+
--danger-color-hover: var(--error-color);
|
|
75
|
+
--muted-color: var(--secondary-text-color);
|
|
76
|
+
|
|
77
|
+
/* ===== FORM & TABLE ELEMENTS ===== */
|
|
78
|
+
--tag-bg: #505050;
|
|
79
|
+
--table-header-bg: #007bff;
|
|
80
|
+
--table-header-text: #ffffff;
|
|
81
|
+
|
|
82
|
+
/* ===== FORM THEME SPECIFICS ===== */
|
|
83
|
+
--form-bg: linear-gradient(135deg, #23272f 0%, #181a1b 100%);
|
|
84
|
+
--form-header-border: #23272f;
|
|
85
|
+
--form-title: #ffd700;
|
|
86
|
+
--form-subtitle: #b0b8c1;
|
|
87
|
+
|
|
88
|
+
/* ===== BUTTON VARIABLES ===== */
|
|
89
|
+
--btn-primary-bg: #0077cc;
|
|
90
|
+
--btn-primary-hover-bg: #0a6ed1;
|
|
91
|
+
--btn-primary-text: #ffffff;
|
|
92
|
+
--btn-primary-hover-text: #ffffff;
|
|
93
|
+
|
|
94
|
+
--btn-secondary-bg: #666666;
|
|
95
|
+
--btn-secondary-hover-bg: #555555;
|
|
96
|
+
--btn-secondary-text: #ffffff;
|
|
97
|
+
--btn-secondary-hover-text: #ffffff;
|
|
98
|
+
|
|
99
|
+
--btn-danger-bg: #dc2626;
|
|
100
|
+
--btn-danger-hover-bg: #b91c1c;
|
|
101
|
+
--btn-danger-text: #ffffff;
|
|
102
|
+
--btn-danger-hover-text: #ffffff;
|
|
103
|
+
|
|
104
|
+
--btn-success-bg: #16a34a;
|
|
105
|
+
--btn-success-hover-bg: #15803d;
|
|
106
|
+
--btn-success-text: #ffffff;
|
|
107
|
+
--btn-success-hover-text: #ffffff;
|
|
108
|
+
|
|
109
|
+
/* ===== LOADING/SKELETON ===== */
|
|
110
|
+
/* Note: Skeleton variables stay same as light theme */
|
|
111
|
+
--skeleton-base-color: #a0c1e4;
|
|
112
|
+
--skeleton-highlight-color: #e6f2ff;
|
|
113
|
+
|
|
114
|
+
/* ===== SHADOWS (use var(--shadow-color) - theme-aware) ===== */
|
|
115
|
+
--shadow-sm: 0 1px 3px var(--shadow-color);
|
|
116
|
+
--shadow-md: 0 4px 12px var(--shadow-color);
|
|
117
|
+
--shadow-lg: 0 8px 24px var(--shadow-color);
|
|
118
|
+
|
|
119
|
+
/* ===== THEME SYSTEM SETTINGS ===== */
|
|
120
|
+
color-scheme: dark;
|
|
121
|
+
}
|