@kids-reporter/routing-ui 0.1.0-alpha.1
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/.prettierignore +17 -0
- package/babel.config.cjs +31 -0
- package/dist/components/button.d.ts +23 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +82 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +21 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/input.d.ts +20 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +143 -0
- package/dist/components/input.js.map +1 -0
- package/dist/constants/default-values.d.ts +12 -0
- package/dist/constants/default-values.d.ts.map +1 -0
- package/dist/constants/default-values.js +148 -0
- package/dist/constants/default-values.js.map +1 -0
- package/dist/footer.d.ts +10 -0
- package/dist/footer.d.ts.map +1 -0
- package/dist/footer.js +144 -0
- package/dist/footer.js.map +1 -0
- package/dist/header/desktop-header.d.ts +14 -0
- package/dist/header/desktop-header.d.ts.map +1 -0
- package/dist/header/desktop-header.js +85 -0
- package/dist/header/desktop-header.js.map +1 -0
- package/dist/header/header-context.d.ts +16 -0
- package/dist/header/header-context.d.ts.map +1 -0
- package/dist/header/header-context.js +37 -0
- package/dist/header/header-context.js.map +1 -0
- package/dist/header/index.d.ts +12 -0
- package/dist/header/index.d.ts.map +1 -0
- package/dist/header/index.js +72 -0
- package/dist/header/index.js.map +1 -0
- package/dist/header/menu/header-menu-item-group.d.ts +7 -0
- package/dist/header/menu/header-menu-item-group.d.ts.map +1 -0
- package/dist/header/menu/header-menu-item-group.js +31 -0
- package/dist/header/menu/header-menu-item-group.js.map +1 -0
- package/dist/header/menu/header-menu-item.d.ts +9 -0
- package/dist/header/menu/header-menu-item.d.ts.map +1 -0
- package/dist/header/menu/header-menu-item.js +92 -0
- package/dist/header/menu/header-menu-item.js.map +1 -0
- package/dist/header/menu/index.d.ts +15 -0
- package/dist/header/menu/index.d.ts.map +1 -0
- package/dist/header/menu/index.js +170 -0
- package/dist/header/menu/index.js.map +1 -0
- package/dist/header/mobile-header.d.ts +9 -0
- package/dist/header/mobile-header.d.ts.map +1 -0
- package/dist/header/mobile-header.js +46 -0
- package/dist/header/mobile-header.js.map +1 -0
- package/dist/header/post-title-setter.d.ts +6 -0
- package/dist/header/post-title-setter.d.ts.map +1 -0
- package/dist/header/post-title-setter.js +22 -0
- package/dist/header/post-title-setter.js.map +1 -0
- package/dist/header/shared-components.d.ts +31 -0
- package/dist/header/shared-components.d.ts.map +1 -0
- package/dist/header/shared-components.js +256 -0
- package/dist/header/shared-components.js.map +1 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +36 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-is-at-top.d.ts +3 -0
- package/dist/hooks/use-is-at-top.d.ts.map +1 -0
- package/dist/hooks/use-is-at-top.js +26 -0
- package/dist/hooks/use-is-at-top.js.map +1 -0
- package/dist/hooks/use-media-query.d.ts +7 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +47 -0
- package/dist/hooks/use-media-query.js.map +1 -0
- package/dist/hooks/use-scroll-level.d.ts +11 -0
- package/dist/hooks/use-scroll-level.d.ts.map +1 -0
- package/dist/hooks/use-scroll-level.js +53 -0
- package/dist/hooks/use-scroll-level.js.map +1 -0
- package/dist/icons/index.d.ts +17 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +341 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +101 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +475 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +6 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/cn.d.ts +8 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +27 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/generate-social-media-config.d.ts +9 -0
- package/dist/utils/generate-social-media-config.d.ts.map +1 -0
- package/dist/utils/generate-social-media-config.js +55 -0
- package/dist/utils/generate-social-media-config.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +28 -0
- package/dist/utils/index.js.map +1 -0
- package/eslint.config.mjs +55 -0
- package/package.json +51 -0
- package/prettier.config.mjs +13 -0
- package/scripts/build.sh +18 -0
- package/src/components/button.tsx +108 -0
- package/src/components/index.tsx +2 -0
- package/src/components/input.tsx +171 -0
- package/src/constants/default-values.tsx +153 -0
- package/src/footer.tsx +151 -0
- package/src/header/desktop-header.tsx +128 -0
- package/src/header/header-context.tsx +56 -0
- package/src/header/index.tsx +96 -0
- package/src/header/menu/header-menu-item-group.tsx +37 -0
- package/src/header/menu/header-menu-item.tsx +132 -0
- package/src/header/menu/index.tsx +206 -0
- package/src/header/mobile-header.tsx +61 -0
- package/src/header/post-title-setter.tsx +22 -0
- package/src/header/shared-components.tsx +326 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/use-is-at-top.ts +23 -0
- package/src/hooks/use-media-query.ts +57 -0
- package/src/hooks/use-scroll-level.ts +52 -0
- package/src/icons/index.tsx +358 -0
- package/src/index.ts +9 -0
- package/src/styles.css +475 -0
- package/src/types/index.ts +10 -0
- package/src/utils/cn.ts +41 -0
- package/src/utils/generate-social-media-config.ts +75 -0
- package/src/utils/index.ts +2 -0
- package/tsconfig.json +33 -0
package/src/styles.css
ADDED
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
/* Tailwind v4 Theme Configuration */
|
|
2
|
+
@theme {
|
|
3
|
+
/* Colors - Neutral */
|
|
4
|
+
--color-neutral-white: #ffffff;
|
|
5
|
+
--color-neutral-100: #f8f8f8;
|
|
6
|
+
--color-neutral-200: #eaeaea;
|
|
7
|
+
--color-neutral-300: #d9d9d9;
|
|
8
|
+
--color-neutral-400: #c6c6c6;
|
|
9
|
+
--color-neutral-500: #a3a3a3;
|
|
10
|
+
--color-neutral-600: #8e8e8e;
|
|
11
|
+
--color-neutral-700: #575757;
|
|
12
|
+
--color-neutral-800: #3b3b3b;
|
|
13
|
+
--color-neutral-900: #232323;
|
|
14
|
+
--color-neutral-black: #000000;
|
|
15
|
+
--color-neutral-border: #00000026;
|
|
16
|
+
|
|
17
|
+
/* Colors - Brand Red */
|
|
18
|
+
--color-red-100: #fff0f2;
|
|
19
|
+
--color-red-200: #ffc4ca;
|
|
20
|
+
--color-red-300: #ff98a2;
|
|
21
|
+
--color-red-400: #f76977;
|
|
22
|
+
--color-red-500: #bd4450;
|
|
23
|
+
--color-red-600: #a0343e;
|
|
24
|
+
--color-red-700: #82262f;
|
|
25
|
+
--color-red-800: #651a22;
|
|
26
|
+
|
|
27
|
+
/* Colors - Brand Blue */
|
|
28
|
+
--color-blue-100: #e9f8ff;
|
|
29
|
+
--color-blue-200: #b9e8ff;
|
|
30
|
+
--color-blue-300: #89d9ff;
|
|
31
|
+
--color-blue-400: #27b3f5;
|
|
32
|
+
--color-blue-500: #1696d3;
|
|
33
|
+
--color-blue-600: #087bb1;
|
|
34
|
+
--color-blue-700: #00618f;
|
|
35
|
+
--color-blue-800: #004a6d;
|
|
36
|
+
|
|
37
|
+
/* Colors - Brand Yellow */
|
|
38
|
+
--color-yellow-100: #fff9ec;
|
|
39
|
+
--color-yellow-200: #ffedc2;
|
|
40
|
+
--color-yellow-300: #ffe197;
|
|
41
|
+
--color-yellow-400: #f8c341;
|
|
42
|
+
--color-yellow-500: #d6a52d;
|
|
43
|
+
--color-yellow-600: #b4881d;
|
|
44
|
+
--color-yellow-700: #926c10;
|
|
45
|
+
--color-yellow-800: #705207;
|
|
46
|
+
|
|
47
|
+
/* Typography - Font Families */
|
|
48
|
+
--font-family-noto: 'Noto Sans TC', sans-serif;
|
|
49
|
+
--font-family-swei: 'SweiMarkerSansCJKtc-Regular', sans-serif;
|
|
50
|
+
|
|
51
|
+
/* Typography - Font Sizes */
|
|
52
|
+
--font-size-h1-large: 48px;
|
|
53
|
+
--font-size-h2-large: 40px;
|
|
54
|
+
--font-size-h3-large: 32px;
|
|
55
|
+
--font-size-h4-large: 28px;
|
|
56
|
+
--font-size-h5-large: 22px;
|
|
57
|
+
--font-size-h6-large: 18px;
|
|
58
|
+
|
|
59
|
+
--font-size-h1-small: 28px;
|
|
60
|
+
--font-size-h2-small: 24px;
|
|
61
|
+
--font-size-h3-small: 22px;
|
|
62
|
+
--font-size-h4-small: 18px;
|
|
63
|
+
--font-size-h5-small: 17px;
|
|
64
|
+
--font-size-h6-small: 16px;
|
|
65
|
+
|
|
66
|
+
--font-size-p1: 16px;
|
|
67
|
+
--font-size-p2: 14px;
|
|
68
|
+
--font-size-p3: 12px;
|
|
69
|
+
--font-size-p4: 10px;
|
|
70
|
+
|
|
71
|
+
/* Typography - Line Heights */
|
|
72
|
+
--line-height-tight: 1.25;
|
|
73
|
+
--line-height-normal: 1.6;
|
|
74
|
+
--line-height-relaxed: 1.75;
|
|
75
|
+
|
|
76
|
+
/* Typography - Letter Spacing */
|
|
77
|
+
--letter-spacing-wide: 0.05em;
|
|
78
|
+
|
|
79
|
+
/* Spacing - Grid System */
|
|
80
|
+
--spacing-grid-xs: 4px;
|
|
81
|
+
--spacing-grid-sm: 8px;
|
|
82
|
+
--spacing-grid-md: 16px;
|
|
83
|
+
--spacing-grid-lg: 24px;
|
|
84
|
+
--spacing-grid-xl: 32px;
|
|
85
|
+
--spacing-grid-2xl: 48px;
|
|
86
|
+
--spacing-grid-3xl: 64px;
|
|
87
|
+
--spacing-grid-4xl: 96px;
|
|
88
|
+
--spacing-grid-5xl: 128px;
|
|
89
|
+
|
|
90
|
+
/* Container Widths */
|
|
91
|
+
--container-mobile: 375px;
|
|
92
|
+
--container-tablet: 768px;
|
|
93
|
+
--container-desktop: 1024px;
|
|
94
|
+
--container-hd: 1440px;
|
|
95
|
+
|
|
96
|
+
/* Grid Gutters */
|
|
97
|
+
--gutter-mobile: 16px;
|
|
98
|
+
--gutter-tablet: 24px;
|
|
99
|
+
--gutter-desktop: 32px;
|
|
100
|
+
--gutter-hd: 32px;
|
|
101
|
+
|
|
102
|
+
/* Margins */
|
|
103
|
+
--margin-mobile: 24px;
|
|
104
|
+
--margin-tablet: 32px;
|
|
105
|
+
--margin-desktop: 48px;
|
|
106
|
+
--margin-hd: 120px;
|
|
107
|
+
|
|
108
|
+
/* Responsive Breakpoints */
|
|
109
|
+
--breakpoint-mobile: 375px;
|
|
110
|
+
--breakpoint-tablet: 768px;
|
|
111
|
+
--breakpoint-desktop: 1024px;
|
|
112
|
+
--breakpoint-hd: 1440px;
|
|
113
|
+
|
|
114
|
+
/* Header */
|
|
115
|
+
--mobile-header-height: 64px;
|
|
116
|
+
|
|
117
|
+
/* Legacy variables for backward compatibility */
|
|
118
|
+
--fontFamily: var(--font-family-noto);
|
|
119
|
+
--max-width: 1100px;
|
|
120
|
+
--border-radius: 12px;
|
|
121
|
+
|
|
122
|
+
/* Updated color palette using design system */
|
|
123
|
+
--paletteColor1: var(--color-blue-400);
|
|
124
|
+
--paletteColor2: var(--color-blue-600);
|
|
125
|
+
--paletteColor3: var(--color-neutral-gray-700);
|
|
126
|
+
--paletteColor4: var(--color-neutral-gray-900);
|
|
127
|
+
--paletteColor5: var(--color-red-400);
|
|
128
|
+
--paletteColor6: var(--color-yellow-400);
|
|
129
|
+
--paletteColor7: var(--color-neutral-gray-200);
|
|
130
|
+
--paletteColor8: var(--color-neutral-white);
|
|
131
|
+
--color: var(--paletteColor3);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* Design System CSS Variables for compatibility */
|
|
135
|
+
@layer base {
|
|
136
|
+
:root {
|
|
137
|
+
/* Colors - Neutral */
|
|
138
|
+
--color-neutral-white: #ffffff;
|
|
139
|
+
--color-neutral-gray-100: #f8f8f8;
|
|
140
|
+
--color-neutral-gray-200: #eaeaea;
|
|
141
|
+
--color-neutral-gray-300: #d9d9d9;
|
|
142
|
+
--color-neutral-gray-400: #c6c6c6;
|
|
143
|
+
--color-neutral-gray-500: #a3a3a3;
|
|
144
|
+
--color-neutral-gray-600: #8e8e8e;
|
|
145
|
+
--color-neutral-gray-700: #575757;
|
|
146
|
+
--color-neutral-gray-800: #3b3b3b;
|
|
147
|
+
--color-neutral-gray-900: #232323;
|
|
148
|
+
--color-neutral-black: #000000;
|
|
149
|
+
--color-neutral-border: #00000026;
|
|
150
|
+
|
|
151
|
+
/* Colors - Brand Red */
|
|
152
|
+
--color-red-100: #fff0f2;
|
|
153
|
+
--color-red-200: #ffc4ca;
|
|
154
|
+
--color-red-300: #ff98a2;
|
|
155
|
+
--color-red-400: #f76977;
|
|
156
|
+
--color-red-500: #bd4450;
|
|
157
|
+
--color-red-600: #a0343e;
|
|
158
|
+
--color-red-700: #82262f;
|
|
159
|
+
--color-red-800: #651a22;
|
|
160
|
+
|
|
161
|
+
/* Colors - Brand Blue */
|
|
162
|
+
--color-blue-100: #e9f8ff;
|
|
163
|
+
--color-blue-200: #b9e8ff;
|
|
164
|
+
--color-blue-300: #89d9ff;
|
|
165
|
+
--color-blue-400: #27b3f5;
|
|
166
|
+
--color-blue-500: #1696d3;
|
|
167
|
+
--color-blue-600: #087bb1;
|
|
168
|
+
--color-blue-700: #00618f;
|
|
169
|
+
--color-blue-800: #004a6d;
|
|
170
|
+
|
|
171
|
+
/* Colors - Brand Yellow */
|
|
172
|
+
--color-yellow-100: #fff9ec;
|
|
173
|
+
--color-yellow-200: #ffedc2;
|
|
174
|
+
--color-yellow-300: #ffe197;
|
|
175
|
+
--color-yellow-400: #f8c341;
|
|
176
|
+
--color-yellow-500: #d6a52d;
|
|
177
|
+
--color-yellow-600: #b4881d;
|
|
178
|
+
--color-yellow-700: #926c10;
|
|
179
|
+
--color-yellow-800: #705207;
|
|
180
|
+
|
|
181
|
+
/* Typography - Font Families */
|
|
182
|
+
--font-family-noto: 'Noto Sans TC', sans-serif;
|
|
183
|
+
--font-family-swei: 'SweiMarkerSansCJKtc-Regular', sans-serif;
|
|
184
|
+
|
|
185
|
+
/* Typography - Font Sizes */
|
|
186
|
+
--font-size-h1-large: 48px;
|
|
187
|
+
--font-size-h2-large: 40px;
|
|
188
|
+
--font-size-h3-large: 32px;
|
|
189
|
+
--font-size-h4-large: 28px;
|
|
190
|
+
--font-size-h5-large: 22px;
|
|
191
|
+
--font-size-h6-large: 18px;
|
|
192
|
+
|
|
193
|
+
--font-size-h1-small: 28px;
|
|
194
|
+
--font-size-h2-small: 24px;
|
|
195
|
+
--font-size-h3-small: 22px;
|
|
196
|
+
--font-size-h4-small: 18px;
|
|
197
|
+
--font-size-h5-small: 17px;
|
|
198
|
+
--font-size-h6-small: 16px;
|
|
199
|
+
|
|
200
|
+
--font-size-p1: 16px;
|
|
201
|
+
--font-size-p2: 14px;
|
|
202
|
+
--font-size-p3: 12px;
|
|
203
|
+
--font-size-p4: 10px;
|
|
204
|
+
|
|
205
|
+
/* Typography - Line Heights */
|
|
206
|
+
--line-height-tight: 1.25;
|
|
207
|
+
--line-height-normal: 1.6;
|
|
208
|
+
--line-height-relaxed: 1.75;
|
|
209
|
+
|
|
210
|
+
/* Typography - Letter Spacing */
|
|
211
|
+
--letter-spacing-wide: 0.05em;
|
|
212
|
+
|
|
213
|
+
/* Spacing - Grid System */
|
|
214
|
+
--spacing-grid-xs: 4px;
|
|
215
|
+
--spacing-grid-sm: 8px;
|
|
216
|
+
--spacing-grid-md: 16px;
|
|
217
|
+
--spacing-grid-lg: 24px;
|
|
218
|
+
--spacing-grid-xl: 32px;
|
|
219
|
+
--spacing-grid-2xl: 48px;
|
|
220
|
+
--spacing-grid-3xl: 64px;
|
|
221
|
+
--spacing-grid-4xl: 96px;
|
|
222
|
+
--spacing-grid-5xl: 128px;
|
|
223
|
+
|
|
224
|
+
/* Container Widths */
|
|
225
|
+
--container-mobile: 375px;
|
|
226
|
+
--container-tablet: 768px;
|
|
227
|
+
--container-desktop: 1024px;
|
|
228
|
+
--container-hd: 1440px;
|
|
229
|
+
|
|
230
|
+
/* Grid Gutters */
|
|
231
|
+
--gutter-mobile: 16px;
|
|
232
|
+
--gutter-tablet: 24px;
|
|
233
|
+
--gutter-desktop: 32px;
|
|
234
|
+
--gutter-hd: 32px;
|
|
235
|
+
|
|
236
|
+
/* Margins */
|
|
237
|
+
--margin-mobile: 24px;
|
|
238
|
+
--margin-tablet: 32px;
|
|
239
|
+
--margin-desktop: 48px;
|
|
240
|
+
--margin-hd: 120px;
|
|
241
|
+
|
|
242
|
+
/* Responsive Breakpoints */
|
|
243
|
+
--breakpoint-mobile: 375px;
|
|
244
|
+
--breakpoint-tablet: 768px;
|
|
245
|
+
--breakpoint-desktop: 1024px;
|
|
246
|
+
--breakpoint-hd: 1440px;
|
|
247
|
+
|
|
248
|
+
/* Header */
|
|
249
|
+
--mobile-header-height: 64px;
|
|
250
|
+
|
|
251
|
+
/* Legacy variables for backward compatibility */
|
|
252
|
+
--fontFamily: var(--font-family-noto);
|
|
253
|
+
--max-width: 1100px;
|
|
254
|
+
--border-radius: 12px;
|
|
255
|
+
|
|
256
|
+
/* Updated color palette using design system */
|
|
257
|
+
--paletteColor1: var(--color-blue-400);
|
|
258
|
+
--paletteColor2: var(--color-blue-600);
|
|
259
|
+
--paletteColor3: var(--color-neutral-gray-700);
|
|
260
|
+
--paletteColor4: var(--color-neutral-gray-900);
|
|
261
|
+
--paletteColor5: var(--color-red-400);
|
|
262
|
+
--paletteColor6: var(--color-yellow-400);
|
|
263
|
+
--paletteColor7: var(--color-neutral-gray-200);
|
|
264
|
+
--paletteColor8: var(--color-neutral-white);
|
|
265
|
+
--color: var(--paletteColor3);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
@layer utilities {
|
|
270
|
+
/* Typography Utilities - Headlines Large */
|
|
271
|
+
.prose-h1-large {
|
|
272
|
+
font-family: var(--font-family-noto);
|
|
273
|
+
font-size: var(--font-size-h1-large);
|
|
274
|
+
font-weight: 700;
|
|
275
|
+
line-height: var(--line-height-normal);
|
|
276
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.prose-h2-large {
|
|
280
|
+
font-family: var(--font-family-noto);
|
|
281
|
+
font-size: var(--font-size-h2-large);
|
|
282
|
+
font-weight: 700;
|
|
283
|
+
line-height: var(--line-height-normal);
|
|
284
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.prose-h3-large {
|
|
288
|
+
font-family: var(--font-family-noto);
|
|
289
|
+
font-size: var(--font-size-h3-large);
|
|
290
|
+
font-weight: 700;
|
|
291
|
+
line-height: var(--line-height-normal);
|
|
292
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.prose-h4-large {
|
|
296
|
+
font-family: var(--font-family-noto);
|
|
297
|
+
font-size: var(--font-size-h4-large);
|
|
298
|
+
font-weight: 700;
|
|
299
|
+
line-height: var(--line-height-normal);
|
|
300
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.prose-h5-large {
|
|
304
|
+
font-family: var(--font-family-noto);
|
|
305
|
+
font-size: var(--font-size-h5-large);
|
|
306
|
+
font-weight: 700;
|
|
307
|
+
line-height: var(--line-height-normal);
|
|
308
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.prose-h6-large {
|
|
312
|
+
font-family: var(--font-family-noto);
|
|
313
|
+
font-size: var(--font-size-h6-large);
|
|
314
|
+
font-weight: 700;
|
|
315
|
+
line-height: var(--line-height-normal);
|
|
316
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/* Typography Utilities - Headlines Small */
|
|
320
|
+
.prose-h1-small {
|
|
321
|
+
font-family: var(--font-family-noto);
|
|
322
|
+
font-size: var(--font-size-h1-small);
|
|
323
|
+
font-weight: 700;
|
|
324
|
+
line-height: var(--line-height-tight);
|
|
325
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.prose-h2-small {
|
|
329
|
+
font-family: var(--font-family-noto);
|
|
330
|
+
font-size: var(--font-size-h2-small);
|
|
331
|
+
font-weight: 700;
|
|
332
|
+
line-height: var(--line-height-tight);
|
|
333
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.prose-h3-small {
|
|
337
|
+
font-family: var(--font-family-noto);
|
|
338
|
+
font-size: var(--font-size-h3-small);
|
|
339
|
+
font-weight: 700;
|
|
340
|
+
line-height: var(--line-height-normal);
|
|
341
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.prose-h4-small {
|
|
345
|
+
font-family: var(--font-family-noto);
|
|
346
|
+
font-size: var(--font-size-h4-small);
|
|
347
|
+
font-weight: 700;
|
|
348
|
+
line-height: var(--line-height-normal);
|
|
349
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.prose-h5-small {
|
|
353
|
+
font-family: var(--font-family-noto);
|
|
354
|
+
font-size: var(--font-size-h5-small);
|
|
355
|
+
font-weight: 700;
|
|
356
|
+
line-height: var(--line-height-normal);
|
|
357
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.prose-h6-small {
|
|
361
|
+
font-family: var(--font-family-noto);
|
|
362
|
+
font-size: var(--font-size-h6-small);
|
|
363
|
+
font-weight: 700;
|
|
364
|
+
line-height: var(--line-height-normal);
|
|
365
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* Typography Utilities - Paragraphs */
|
|
369
|
+
.prose-p1 {
|
|
370
|
+
font-family: var(--font-family-noto);
|
|
371
|
+
font-size: var(--font-size-p1);
|
|
372
|
+
font-weight: 500;
|
|
373
|
+
line-height: var(--line-height-normal);
|
|
374
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.prose-p1-bold {
|
|
378
|
+
font-family: var(--font-family-noto);
|
|
379
|
+
font-size: var(--font-size-p1);
|
|
380
|
+
font-weight: 700;
|
|
381
|
+
line-height: var(--line-height-normal);
|
|
382
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.prose-p2 {
|
|
386
|
+
font-family: var(--font-family-noto);
|
|
387
|
+
font-size: var(--font-size-p2);
|
|
388
|
+
font-weight: 500;
|
|
389
|
+
line-height: var(--line-height-normal);
|
|
390
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.prose-p2-bold {
|
|
394
|
+
font-family: var(--font-family-noto);
|
|
395
|
+
font-size: var(--font-size-p2);
|
|
396
|
+
font-weight: 700;
|
|
397
|
+
line-height: var(--line-height-normal);
|
|
398
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.prose-p3 {
|
|
402
|
+
font-family: var(--font-family-noto);
|
|
403
|
+
font-size: var(--font-size-p3);
|
|
404
|
+
font-weight: 500;
|
|
405
|
+
line-height: var(--line-height-normal);
|
|
406
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.prose-p3-bold {
|
|
410
|
+
font-family: var(--font-family-noto);
|
|
411
|
+
font-size: var(--font-size-p3);
|
|
412
|
+
font-weight: 700;
|
|
413
|
+
line-height: var(--line-height-normal);
|
|
414
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.prose-p4 {
|
|
418
|
+
font-family: var(--font-family-noto);
|
|
419
|
+
font-size: var(--font-size-p4);
|
|
420
|
+
font-weight: 500;
|
|
421
|
+
line-height: var(--line-height-normal);
|
|
422
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.prose-p4-bold {
|
|
426
|
+
font-family: var(--font-family-noto);
|
|
427
|
+
font-size: var(--font-size-p4);
|
|
428
|
+
font-weight: 700;
|
|
429
|
+
line-height: var(--line-height-normal);
|
|
430
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/* Swei Marker Sans Font Variants */
|
|
434
|
+
.font-swei {
|
|
435
|
+
font-family: var(--font-family-swei);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* Theme Color Utilities */
|
|
439
|
+
.theme-red {
|
|
440
|
+
--theme-color: var(--color-red-400);
|
|
441
|
+
}
|
|
442
|
+
.theme-yellow {
|
|
443
|
+
--theme-color: var(--color-yellow-400);
|
|
444
|
+
}
|
|
445
|
+
.theme-blue {
|
|
446
|
+
--theme-color: var(--color-blue-400);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/* Custom Scrollbar Utilities */
|
|
450
|
+
.scrollbar-thin {
|
|
451
|
+
scrollbar-width: thin;
|
|
452
|
+
scrollbar-color: var(--color-neutral-gray-300) transparent;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.scrollbar-thin::-webkit-scrollbar {
|
|
456
|
+
width: 6px;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.scrollbar-thin::-webkit-scrollbar-track {
|
|
460
|
+
background: transparent;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.scrollbar-thin::-webkit-scrollbar-thumb {
|
|
464
|
+
background: transparent;
|
|
465
|
+
border-radius: 3px;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
|
|
469
|
+
background: transparent;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
body.no-scroll {
|
|
473
|
+
overflow: hidden;
|
|
474
|
+
}
|
|
475
|
+
}
|
package/src/utils/cn.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ClassValue, clsx } from 'clsx'
|
|
2
|
+
import { extendTailwindMerge } from 'tailwind-merge'
|
|
3
|
+
|
|
4
|
+
const twMerge = extendTailwindMerge({
|
|
5
|
+
extend: {
|
|
6
|
+
classGroups: {
|
|
7
|
+
// Add custom prose classes in font-size group since we follow the design system
|
|
8
|
+
'font-size': [
|
|
9
|
+
'prose-p1',
|
|
10
|
+
'prose-p1-bold',
|
|
11
|
+
'prose-p2',
|
|
12
|
+
'prose-p2-bold',
|
|
13
|
+
'prose-p3',
|
|
14
|
+
'prose-p3-bold',
|
|
15
|
+
'prose-p4',
|
|
16
|
+
'prose-p4-bold',
|
|
17
|
+
'prose-h1-large',
|
|
18
|
+
'prose-h2-large',
|
|
19
|
+
'prose-h3-large',
|
|
20
|
+
'prose-h4-large',
|
|
21
|
+
'prose-h5-large',
|
|
22
|
+
'prose-h6-large',
|
|
23
|
+
'prose-h1-small',
|
|
24
|
+
'prose-h2-small',
|
|
25
|
+
'prose-h3-small',
|
|
26
|
+
'prose-h4-small',
|
|
27
|
+
'prose-h5-small',
|
|
28
|
+
'prose-h6-small',
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Combines clsx and tailwind-merge for optimal class merging.
|
|
36
|
+
* @param inputs - Class names or conditional class values.
|
|
37
|
+
* @returns A single string with merged class names.
|
|
38
|
+
*/
|
|
39
|
+
export const cn = (...inputs: ClassValue[]): string => {
|
|
40
|
+
return twMerge(clsx(inputs))
|
|
41
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { JSX } from 'react'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
FBIcon,
|
|
5
|
+
IGIcon,
|
|
6
|
+
MediumIcon,
|
|
7
|
+
RSSIcon,
|
|
8
|
+
ThreadsIcon,
|
|
9
|
+
YouTubeIcon,
|
|
10
|
+
} from '../icons'
|
|
11
|
+
import { SocialMediaHrefs } from '../types'
|
|
12
|
+
|
|
13
|
+
export type SocialMediaConfig = {
|
|
14
|
+
label: string
|
|
15
|
+
href: string
|
|
16
|
+
icon: (() => JSX.Element) | null
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function generateSocialMediaConfig(
|
|
20
|
+
socialMediaHrefs: SocialMediaHrefs
|
|
21
|
+
): SocialMediaConfig[] {
|
|
22
|
+
return socialMediaHrefs.map((href) => {
|
|
23
|
+
// Extract domain from URL to determine the social media platform
|
|
24
|
+
let label = 'Unknown'
|
|
25
|
+
let icon = null
|
|
26
|
+
try {
|
|
27
|
+
const url = new URL(href)
|
|
28
|
+
const hostname = url.hostname.toLowerCase()
|
|
29
|
+
|
|
30
|
+
// Check for specific patterns
|
|
31
|
+
if (hostname.includes('facebook.com')) {
|
|
32
|
+
label = 'Facebook'
|
|
33
|
+
icon = FBIcon
|
|
34
|
+
} else if (hostname.includes('instagram.com')) {
|
|
35
|
+
label = 'Instagram'
|
|
36
|
+
icon = IGIcon
|
|
37
|
+
} else if (
|
|
38
|
+
hostname.includes('youtube.com') ||
|
|
39
|
+
hostname.includes('youtu.be')
|
|
40
|
+
) {
|
|
41
|
+
label = 'YouTube'
|
|
42
|
+
icon = YouTubeIcon
|
|
43
|
+
} else if (
|
|
44
|
+
hostname.includes('threads.net') ||
|
|
45
|
+
hostname.includes('threads.com')
|
|
46
|
+
) {
|
|
47
|
+
label = 'Threads'
|
|
48
|
+
icon = ThreadsIcon
|
|
49
|
+
} else if (hostname.includes('medium.com')) {
|
|
50
|
+
label = 'Medium'
|
|
51
|
+
icon = MediumIcon
|
|
52
|
+
} else if (href.includes('rss.xml') || href.includes('rss')) {
|
|
53
|
+
label = 'RSS'
|
|
54
|
+
icon = RSSIcon
|
|
55
|
+
}
|
|
56
|
+
} catch {
|
|
57
|
+
console.warn(`Invalid URL provided: ${href}`)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (!icon) {
|
|
61
|
+
console.warn(`No icon found for social media platform: ${label}`)
|
|
62
|
+
return {
|
|
63
|
+
label,
|
|
64
|
+
href,
|
|
65
|
+
icon: null, // or a default icon component
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
label,
|
|
71
|
+
href,
|
|
72
|
+
icon,
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["DOM", "DOM.Iterable", "ES6"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": false,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "react-jsx",
|
|
15
|
+
"plugins": [
|
|
16
|
+
{
|
|
17
|
+
"name": "next"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"baseUrl": ".",
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": ["./src/*"]
|
|
23
|
+
},
|
|
24
|
+
"outDir": "./dist",
|
|
25
|
+
"rootDir": "./src",
|
|
26
|
+
"declaration": true,
|
|
27
|
+
"declarationMap": true,
|
|
28
|
+
"sourceMap": true,
|
|
29
|
+
"emitDeclarationOnly": true
|
|
30
|
+
},
|
|
31
|
+
"include": ["src/**/*"],
|
|
32
|
+
"exclude": ["node_modules", "dist"]
|
|
33
|
+
}
|