@n3wth/ui 0.4.0 → 0.4.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/dist/atoms/Button/Button.d.ts +9 -1
- package/dist/atoms/Button/Button.d.ts.map +1 -1
- package/dist/atoms/Button/index.d.ts +1 -1
- package/dist/atoms/Button/index.d.ts.map +1 -1
- package/dist/atoms/Shape/Shape.d.ts +28 -2
- package/dist/atoms/Shape/Shape.d.ts.map +1 -1
- package/dist/atoms/Shape/index.d.ts +1 -1
- package/dist/atoms/Shape/index.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +3 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useMediaQuery.d.ts +53 -1
- package/dist/hooks/useMediaQuery.d.ts.map +1 -1
- package/dist/hooks/useReducedMotion.d.ts +41 -0
- package/dist/hooks/useReducedMotion.d.ts.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2015 -5029
- package/dist/index.js.map +1 -0
- package/dist/styles.css +340 -0
- package/package.json +2 -2
- package/tailwind.preset.js +32 -0
package/dist/styles.css
CHANGED
|
@@ -213,6 +213,25 @@ body {
|
|
|
213
213
|
font-variant-numeric: tabular-nums;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
+
/* Apple-style text shadow for readability over shapes/backgrounds */
|
|
217
|
+
.text-glow {
|
|
218
|
+
text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5),
|
|
219
|
+
0 1px 3px rgba(0, 0, 0, 0.3);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.text-glow-subtle {
|
|
223
|
+
text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
[data-theme='light'] .text-glow {
|
|
227
|
+
text-shadow: 0 2px 20px rgba(255, 255, 255, 0.5),
|
|
228
|
+
0 1px 3px rgba(255, 255, 255, 0.3);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
[data-theme='light'] .text-glow-subtle {
|
|
232
|
+
text-shadow: 0 1px 12px rgba(255, 255, 255, 0.4);
|
|
233
|
+
}
|
|
234
|
+
|
|
216
235
|
/* Hero gradient text animation - enhanced with more dimension */
|
|
217
236
|
.hero-gradient-text {
|
|
218
237
|
background: linear-gradient(
|
|
@@ -875,6 +894,230 @@ body {
|
|
|
875
894
|
border-width: 0;
|
|
876
895
|
}
|
|
877
896
|
|
|
897
|
+
/* ============================================================
|
|
898
|
+
Mobile-First Responsive Utilities
|
|
899
|
+
============================================================ */
|
|
900
|
+
|
|
901
|
+
/* Touch-friendly minimum target sizes (WCAG 2.5.5 AAA = 44px) */
|
|
902
|
+
.touch-target {
|
|
903
|
+
min-width: 44px;
|
|
904
|
+
min-height: 44px;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
.touch-target-sm {
|
|
908
|
+
min-width: 36px;
|
|
909
|
+
min-height: 36px;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
/* Safe area insets for notched devices */
|
|
913
|
+
.safe-area-top {
|
|
914
|
+
padding-top: env(safe-area-inset-top);
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
.safe-area-bottom {
|
|
918
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
.safe-area-left {
|
|
922
|
+
padding-left: env(safe-area-inset-left);
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
.safe-area-right {
|
|
926
|
+
padding-right: env(safe-area-inset-right);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
.safe-area-inset {
|
|
930
|
+
padding-top: env(safe-area-inset-top);
|
|
931
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
932
|
+
padding-left: env(safe-area-inset-left);
|
|
933
|
+
padding-right: env(safe-area-inset-right);
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
/* Mobile viewport height (accounts for mobile browser chrome) */
|
|
937
|
+
.min-h-screen-mobile {
|
|
938
|
+
min-height: 100vh;
|
|
939
|
+
min-height: 100dvh;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
.h-screen-mobile {
|
|
943
|
+
height: 100vh;
|
|
944
|
+
height: 100dvh;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
/* Disable hover effects on touch devices */
|
|
948
|
+
@media (hover: none) and (pointer: coarse) {
|
|
949
|
+
.glass-pill:hover,
|
|
950
|
+
.glass-card:hover,
|
|
951
|
+
.skill-card:hover,
|
|
952
|
+
.glow-white:hover,
|
|
953
|
+
.glow-accent:hover,
|
|
954
|
+
.link-hover:hover::after,
|
|
955
|
+
.gradient-border:hover::before,
|
|
956
|
+
.shine-sweep:hover::after {
|
|
957
|
+
transform: none;
|
|
958
|
+
box-shadow: none;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
/* Use active states for touch feedback */
|
|
962
|
+
.glass-pill:active {
|
|
963
|
+
background: var(--glass-highlight);
|
|
964
|
+
transform: scale(0.98);
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
.glass-card:active,
|
|
968
|
+
.skill-card:active {
|
|
969
|
+
background: var(--glass-bg);
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
/* Disable shine sweep on touch */
|
|
973
|
+
.shine-sweep::after {
|
|
974
|
+
display: none;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
/* Improved tap highlight for iOS */
|
|
979
|
+
@supports (-webkit-touch-callout: none) {
|
|
980
|
+
.tap-highlight-none {
|
|
981
|
+
-webkit-tap-highlight-color: transparent;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
button,
|
|
985
|
+
a,
|
|
986
|
+
[role="button"] {
|
|
987
|
+
-webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
[data-theme='light'] button,
|
|
991
|
+
[data-theme='light'] a,
|
|
992
|
+
[data-theme='light'] [role="button"] {
|
|
993
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
/* Mobile-specific text sizing for readability */
|
|
998
|
+
@media (max-width: 767px) {
|
|
999
|
+
.text-fluid-sm {
|
|
1000
|
+
font-size: clamp(0.75rem, 2.5vw, 0.875rem);
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
.text-fluid-base {
|
|
1004
|
+
font-size: clamp(0.875rem, 3vw, 1rem);
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
.text-fluid-lg {
|
|
1008
|
+
font-size: clamp(1rem, 4vw, 1.25rem);
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
.text-fluid-xl {
|
|
1012
|
+
font-size: clamp(1.25rem, 5vw, 1.5rem);
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
.text-fluid-2xl {
|
|
1016
|
+
font-size: clamp(1.5rem, 6vw, 2rem);
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
.text-fluid-3xl {
|
|
1020
|
+
font-size: clamp(1.875rem, 8vw, 3rem);
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
/* Prevent zoom on input focus (iOS) */
|
|
1024
|
+
input[type="text"],
|
|
1025
|
+
input[type="email"],
|
|
1026
|
+
input[type="password"],
|
|
1027
|
+
input[type="search"],
|
|
1028
|
+
input[type="tel"],
|
|
1029
|
+
input[type="url"],
|
|
1030
|
+
input[type="number"],
|
|
1031
|
+
select,
|
|
1032
|
+
textarea {
|
|
1033
|
+
font-size: 16px;
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
/* Responsive spacing utilities */
|
|
1038
|
+
.gap-responsive {
|
|
1039
|
+
gap: 1rem;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
@media (min-width: 768px) {
|
|
1043
|
+
.gap-responsive {
|
|
1044
|
+
gap: 1.5rem;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
@media (min-width: 1024px) {
|
|
1049
|
+
.gap-responsive {
|
|
1050
|
+
gap: 2rem;
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.p-responsive {
|
|
1055
|
+
padding: 1rem;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
@media (min-width: 768px) {
|
|
1059
|
+
.p-responsive {
|
|
1060
|
+
padding: 1.5rem;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
@media (min-width: 1024px) {
|
|
1065
|
+
.p-responsive {
|
|
1066
|
+
padding: 2rem;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
/* Mobile container padding */
|
|
1071
|
+
.container-mobile {
|
|
1072
|
+
padding-left: 1rem;
|
|
1073
|
+
padding-right: 1rem;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
@media (min-width: 640px) {
|
|
1077
|
+
.container-mobile {
|
|
1078
|
+
padding-left: 1.5rem;
|
|
1079
|
+
padding-right: 1.5rem;
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
@media (min-width: 768px) {
|
|
1084
|
+
.container-mobile {
|
|
1085
|
+
padding-left: 2rem;
|
|
1086
|
+
padding-right: 2rem;
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
@media (min-width: 1024px) {
|
|
1091
|
+
.container-mobile {
|
|
1092
|
+
padding-left: 2.5rem;
|
|
1093
|
+
padding-right: 2.5rem;
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
/* Landscape orientation handling */
|
|
1098
|
+
@media (max-height: 500px) and (orientation: landscape) {
|
|
1099
|
+
.landscape-compact {
|
|
1100
|
+
padding-top: 0.5rem;
|
|
1101
|
+
padding-bottom: 0.5rem;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
.landscape-hidden {
|
|
1105
|
+
display: none;
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
/* Stack on mobile, row on larger screens */
|
|
1110
|
+
.stack-mobile {
|
|
1111
|
+
display: flex;
|
|
1112
|
+
flex-direction: column;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
@media (min-width: 768px) {
|
|
1116
|
+
.stack-mobile {
|
|
1117
|
+
flex-direction: row;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
|
|
878
1121
|
/* ============================================================
|
|
879
1122
|
Reduced Motion Preferences
|
|
880
1123
|
============================================================ */
|
|
@@ -963,4 +1206,101 @@ body {
|
|
|
963
1206
|
.connection-line {
|
|
964
1207
|
animation: none !important;
|
|
965
1208
|
}
|
|
1209
|
+
|
|
1210
|
+
/* Disable gradient animations */
|
|
1211
|
+
.gradient-border::before {
|
|
1212
|
+
transition: none !important;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
/* Disable glow effects */
|
|
1216
|
+
.glow-white,
|
|
1217
|
+
.glow-accent,
|
|
1218
|
+
.focus-glow:focus-within {
|
|
1219
|
+
box-shadow: none !important;
|
|
1220
|
+
transition: none !important;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
/* Disable shine sweep */
|
|
1224
|
+
.shine-sweep::after {
|
|
1225
|
+
display: none !important;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/* Ensure instant state changes */
|
|
1229
|
+
button,
|
|
1230
|
+
a,
|
|
1231
|
+
[role="button"],
|
|
1232
|
+
.glass-pill,
|
|
1233
|
+
.glass-card,
|
|
1234
|
+
.skill-card,
|
|
1235
|
+
.copy-btn,
|
|
1236
|
+
.command-box {
|
|
1237
|
+
transition: none !important;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
/* Keep functional focus indicators */
|
|
1241
|
+
.focus-ring:focus-visible {
|
|
1242
|
+
outline: 2px solid var(--color-accent);
|
|
1243
|
+
outline-offset: 2px;
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
/* ============================================================
|
|
1248
|
+
Responsive Shape Component
|
|
1249
|
+
============================================================ */
|
|
1250
|
+
|
|
1251
|
+
.shape-responsive {
|
|
1252
|
+
width: var(--shape-size-base, 48px);
|
|
1253
|
+
height: var(--shape-size-base, 48px);
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
@media (min-width: 640px) {
|
|
1257
|
+
.shape-responsive {
|
|
1258
|
+
width: var(--shape-size-sm, var(--shape-size-base, 48px));
|
|
1259
|
+
height: var(--shape-size-sm, var(--shape-size-base, 48px));
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
@media (min-width: 768px) {
|
|
1264
|
+
.shape-responsive {
|
|
1265
|
+
width: var(--shape-size-md, var(--shape-size-sm, var(--shape-size-base, 48px)));
|
|
1266
|
+
height: var(--shape-size-md, var(--shape-size-sm, var(--shape-size-base, 48px)));
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
@media (min-width: 1024px) {
|
|
1271
|
+
.shape-responsive {
|
|
1272
|
+
width: var(--shape-size-lg, var(--shape-size-md, var(--shape-size-sm, var(--shape-size-base, 48px))));
|
|
1273
|
+
height: var(--shape-size-lg, var(--shape-size-md, var(--shape-size-sm, var(--shape-size-base, 48px))));
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
/* ============================================================
|
|
1278
|
+
High Contrast Mode Support
|
|
1279
|
+
============================================================ */
|
|
1280
|
+
|
|
1281
|
+
@media (prefers-contrast: high) {
|
|
1282
|
+
:root,
|
|
1283
|
+
[data-theme='dark'] {
|
|
1284
|
+
--glass-border: rgba(255, 255, 255, 0.3);
|
|
1285
|
+
--glass-highlight: rgba(255, 255, 255, 0.5);
|
|
1286
|
+
--color-grey-400: #a1a1a6;
|
|
1287
|
+
--color-grey-600: #8e8e93;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
[data-theme='light'] {
|
|
1291
|
+
--glass-border: rgba(0, 0, 0, 0.3);
|
|
1292
|
+
--glass-highlight: rgba(0, 0, 0, 0.5);
|
|
1293
|
+
--color-grey-400: #636366;
|
|
1294
|
+
--color-grey-600: #48484a;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
.glass-card,
|
|
1298
|
+
.glass-pill,
|
|
1299
|
+
.command-box {
|
|
1300
|
+
border-width: 2px;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
.focus-ring:focus-visible {
|
|
1304
|
+
outline-width: 3px;
|
|
1305
|
+
}
|
|
966
1306
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n3wth/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Atomic design system for Newth sites - flat, minimal, iOS-inspired",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"build": "tsc && vite build && node -e \"const fs=require('fs');const css=fs.readFileSync('src/styles.css','utf8').replace(/@import 'tailwindcss';\\n\\n/,'');fs.writeFileSync('dist/styles.css',css)\"",
|
|
27
27
|
"lint": "eslint src",
|
|
28
28
|
"prepublishOnly": "npm run build",
|
|
29
|
-
"release:patch": "npm version patch -m 'chore: bump version to %s' && git push && git push --tags && gh release create v$(node -p \"require('./package.json').version\") --generate-notes",
|
|
29
|
+
"release:patch": "npm version patch -m 'chore: bump version to %s' && git add . && git commit -m 'chore: add v0 compatibility config' && git push && git push --tags && gh release create v$(node -p \"require('./package.json').version\") --generate-notes",
|
|
30
30
|
"release:minor": "npm version minor -m 'chore: bump version to %s' && git push && git push --tags && gh release create v$(node -p \"require('./package.json').version\") --generate-notes",
|
|
31
31
|
"release:major": "npm version major -m 'chore: bump version to %s' && git push && git push --tags && gh release create v$(node -p \"require('./package.json').version\") --generate-notes"
|
|
32
32
|
},
|
package/tailwind.preset.js
CHANGED
|
@@ -54,6 +54,38 @@ module.exports = {
|
|
|
54
54
|
'50%': { backgroundPosition: '100% 50%' },
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
|
+
// Mobile-first spacing scale
|
|
58
|
+
spacing: {
|
|
59
|
+
'safe-top': 'env(safe-area-inset-top)',
|
|
60
|
+
'safe-bottom': 'env(safe-area-inset-bottom)',
|
|
61
|
+
'safe-left': 'env(safe-area-inset-left)',
|
|
62
|
+
'safe-right': 'env(safe-area-inset-right)',
|
|
63
|
+
},
|
|
64
|
+
// Touch-friendly minimum sizes (WCAG 2.5.5)
|
|
65
|
+
minWidth: {
|
|
66
|
+
'touch': '44px',
|
|
67
|
+
'touch-sm': '36px',
|
|
68
|
+
},
|
|
69
|
+
minHeight: {
|
|
70
|
+
'touch': '44px',
|
|
71
|
+
'touch-sm': '36px',
|
|
72
|
+
'screen-dvh': '100dvh',
|
|
73
|
+
},
|
|
74
|
+
height: {
|
|
75
|
+
'screen-dvh': '100dvh',
|
|
76
|
+
},
|
|
77
|
+
// Fluid typography scale
|
|
78
|
+
fontSize: {
|
|
79
|
+
'fluid-xs': 'clamp(0.75rem, 2vw, 0.875rem)',
|
|
80
|
+
'fluid-sm': 'clamp(0.875rem, 2.5vw, 1rem)',
|
|
81
|
+
'fluid-base': 'clamp(1rem, 3vw, 1.125rem)',
|
|
82
|
+
'fluid-lg': 'clamp(1.125rem, 3.5vw, 1.25rem)',
|
|
83
|
+
'fluid-xl': 'clamp(1.25rem, 4vw, 1.5rem)',
|
|
84
|
+
'fluid-2xl': 'clamp(1.5rem, 5vw, 2rem)',
|
|
85
|
+
'fluid-3xl': 'clamp(1.875rem, 6vw, 2.5rem)',
|
|
86
|
+
'fluid-4xl': 'clamp(2.25rem, 8vw, 3.5rem)',
|
|
87
|
+
'fluid-5xl': 'clamp(3rem, 10vw, 4.5rem)',
|
|
88
|
+
},
|
|
57
89
|
},
|
|
58
90
|
},
|
|
59
91
|
}
|