@uicraft/core 1.0.0 → 1.1.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/package.json CHANGED
@@ -1,14 +1,17 @@
1
1
  {
2
2
  "name": "@uicraft/core",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "uicraft — beautifully designed UI components built with semantic CSS utility classes",
5
- "main": "uicraft.css",
5
+ "main": "uicraft.js",
6
6
  "style": "uicraft.css",
7
7
  "files": [
8
8
  "uicraft.css",
9
9
  "uicraft.min.css",
10
+ "uicraft.js",
11
+ "uicraft.min.js",
10
12
  "theme-manifest.json",
11
- "themes/"
13
+ "themes/",
14
+ "generated/"
12
15
  ],
13
16
  "keywords": [
14
17
  "ui",
@@ -9,6 +9,13 @@
9
9
  "2xl": "20px",
10
10
  "3xl": "24px"
11
11
  },
12
+ "borderWidth": {
13
+ "none": "0px",
14
+ "thin": "0.5px",
15
+ "default": "1px",
16
+ "medium": "1.5px",
17
+ "thick": "2px"
18
+ },
12
19
  "spacing": {
13
20
  "0": "0",
14
21
  "0.5": "0.125rem",
@@ -80,10 +87,12 @@
80
87
  "neutralsEmphasis": "0 5% 92%",
81
88
  "borderDefault": "0 5% 92%",
82
89
  "borderStrong": "245 10% 78%",
90
+ "accentsBrand": "213 87% 49%",
83
91
  "accentsGreen": "162 86% 40%",
84
92
  "accentsBlue": "219 88% 54%",
85
93
  "accentsRed": "4 83% 55%",
86
94
  "accentsOrange": "30 100% 55%",
95
+ "tintBrand": "213 40% 93%",
87
96
  "tintRed": "0 100% 95%",
88
97
  "tintGreen": "152 39% 89%",
89
98
  "tintBlue": "217 100% 92%",
@@ -102,10 +111,12 @@
102
111
  "neutralsEmphasis": "228 4% 25%",
103
112
  "borderDefault": "240 4% 15%",
104
113
  "borderStrong": "228 4% 25%",
114
+ "accentsBrand": "213 87% 56%",
105
115
  "accentsGreen": "162 86% 40%",
106
116
  "accentsBlue": "219 88% 54%",
107
117
  "accentsRed": "4 83% 55%",
108
118
  "accentsOrange": "30 100% 55%",
119
+ "tintBrand": "213 50% 17%",
109
120
  "tintRed": "356 89% 17%",
110
121
  "tintGreen": "150 60% 3%",
111
122
  "tintBlue": "216 82% 17%",
@@ -9,6 +9,13 @@
9
9
  "2xl": "18px",
10
10
  "3xl": "22px"
11
11
  },
12
+ "borderWidth": {
13
+ "none": "0px",
14
+ "thin": "0.5px",
15
+ "default": "1px",
16
+ "medium": "1.5px",
17
+ "thick": "2px"
18
+ },
12
19
  "spacing": {
13
20
  "0": "0",
14
21
  "0.5": "0.125rem",
@@ -80,10 +87,12 @@
80
87
  "neutralsEmphasis": "34 18% 88%",
81
88
  "borderDefault": "34 16% 86%",
82
89
  "borderStrong": "31 14% 72%",
90
+ "accentsBrand": "213 87% 49%",
83
91
  "accentsGreen": "155 58% 34%",
84
92
  "accentsBlue": "211 74% 45%",
85
93
  "accentsRed": "3 68% 52%",
86
94
  "accentsOrange": "28 80% 49%",
95
+ "tintBrand": "213 40% 93%",
87
96
  "tintRed": "0 100% 96%",
88
97
  "tintGreen": "153 40% 90%",
89
98
  "tintBlue": "212 100% 94%",
@@ -102,10 +111,12 @@
102
111
  "neutralsEmphasis": "23 10% 20%",
103
112
  "borderDefault": "23 10% 19%",
104
113
  "borderStrong": "25 10% 29%",
114
+ "accentsBrand": "213 87% 56%",
105
115
  "accentsGreen": "155 58% 43%",
106
116
  "accentsBlue": "211 74% 56%",
107
117
  "accentsRed": "3 72% 60%",
108
118
  "accentsOrange": "30 84% 57%",
119
+ "tintBrand": "213 50% 17%",
109
120
  "tintRed": "356 60% 16%",
110
121
  "tintGreen": "153 46% 11%",
111
122
  "tintBlue": "211 53% 16%",
@@ -9,6 +9,13 @@
9
9
  "2xl": "24px",
10
10
  "3xl": "28px"
11
11
  },
12
+ "borderWidth": {
13
+ "none": "0px",
14
+ "thin": "0.5px",
15
+ "default": "1px",
16
+ "medium": "1.5px",
17
+ "thick": "2px"
18
+ },
12
19
  "spacing": {
13
20
  "0": "0",
14
21
  "0.5": "0.125rem",
@@ -80,10 +87,12 @@
80
87
  "neutralsEmphasis": "220 16% 90%",
81
88
  "borderDefault": "220 14% 90%",
82
89
  "borderStrong": "221 15% 78%",
90
+ "accentsBrand": "213 87% 49%",
83
91
  "accentsGreen": "160 84% 38%",
84
92
  "accentsBlue": "221 84% 55%",
85
93
  "accentsRed": "0 78% 56%",
86
94
  "accentsOrange": "28 96% 56%",
95
+ "tintBrand": "213 40% 93%",
87
96
  "tintRed": "0 100% 96%",
88
97
  "tintGreen": "154 48% 91%",
89
98
  "tintBlue": "214 100% 95%",
@@ -102,10 +111,12 @@
102
111
  "neutralsEmphasis": "224 16% 22%",
103
112
  "borderDefault": "224 15% 20%",
104
113
  "borderStrong": "224 13% 30%",
114
+ "accentsBrand": "213 87% 56%",
105
115
  "accentsGreen": "160 84% 45%",
106
116
  "accentsBlue": "221 84% 62%",
107
117
  "accentsRed": "0 84% 63%",
108
118
  "accentsOrange": "32 98% 62%",
119
+ "tintBrand": "213 50% 17%",
109
120
  "tintRed": "355 76% 16%",
110
121
  "tintGreen": "157 58% 11%",
111
122
  "tintBlue": "219 63% 17%",
package/uicraft.css CHANGED
@@ -64,10 +64,12 @@
64
64
  --neutrals-emphasis: 0 5% 92%;
65
65
  --border-default: 0 5% 92%;
66
66
  --border-strong: 245 10% 78%;
67
+ --accents-brand: 213 87% 49%;
67
68
  --accents-green: 162 86% 40%;
68
69
  --accents-blue: 219 88% 54%;
69
70
  --accents-red: 4 83% 55%;
70
71
  --accents-orange: 30 100% 55%;
72
+ --tint-brand: 213 40% 93%;
71
73
  --tint-red: 0 100% 95%;
72
74
  --tint-green: 152 39% 89%;
73
75
  --tint-blue: 217 100% 92%;
@@ -137,10 +139,12 @@ html[data-theme=editorial] {
137
139
  --neutrals-emphasis: 34 18% 88%;
138
140
  --border-default: 34 16% 86%;
139
141
  --border-strong: 31 14% 72%;
142
+ --accents-brand: 213 87% 49%;
140
143
  --accents-green: 155 58% 34%;
141
144
  --accents-blue: 211 74% 45%;
142
145
  --accents-red: 3 68% 52%;
143
146
  --accents-orange: 28 80% 49%;
147
+ --tint-brand: 213 40% 93%;
144
148
  --tint-red: 0 100% 96%;
145
149
  --tint-green: 153 40% 90%;
146
150
  --tint-blue: 212 100% 94%;
@@ -210,10 +214,12 @@ html[data-theme=rounded-sans] {
210
214
  --neutrals-emphasis: 220 16% 90%;
211
215
  --border-default: 220 14% 90%;
212
216
  --border-strong: 221 15% 78%;
217
+ --accents-brand: 213 87% 49%;
213
218
  --accents-green: 160 84% 38%;
214
219
  --accents-blue: 221 84% 55%;
215
220
  --accents-red: 0 78% 56%;
216
221
  --accents-orange: 28 96% 56%;
222
+ --tint-brand: 213 40% 93%;
217
223
  --tint-red: 0 100% 96%;
218
224
  --tint-green: 154 48% 91%;
219
225
  --tint-blue: 214 100% 95%;
@@ -232,10 +238,12 @@ html.dark:not([data-theme]), html.dark[data-theme=default] {
232
238
  --neutrals-emphasis: 228 4% 25%;
233
239
  --border-default: 240 4% 15%;
234
240
  --border-strong: 228 4% 25%;
241
+ --accents-brand: 213 87% 56%;
235
242
  --accents-green: 162 86% 40%;
236
243
  --accents-blue: 219 88% 54%;
237
244
  --accents-red: 4 83% 55%;
238
245
  --accents-orange: 30 100% 55%;
246
+ --tint-brand: 213 50% 17%;
239
247
  --tint-red: 356 89% 17%;
240
248
  --tint-green: 150 60% 3%;
241
249
  --tint-blue: 216 82% 17%;
@@ -254,10 +262,12 @@ html.dark[data-theme=editorial] {
254
262
  --neutrals-emphasis: 23 10% 20%;
255
263
  --border-default: 23 10% 19%;
256
264
  --border-strong: 25 10% 29%;
265
+ --accents-brand: 213 87% 56%;
257
266
  --accents-green: 155 58% 43%;
258
267
  --accents-blue: 211 74% 56%;
259
268
  --accents-red: 3 72% 60%;
260
269
  --accents-orange: 30 84% 57%;
270
+ --tint-brand: 213 50% 17%;
261
271
  --tint-red: 356 60% 16%;
262
272
  --tint-green: 153 46% 11%;
263
273
  --tint-blue: 211 53% 16%;
@@ -276,10 +286,12 @@ html.dark[data-theme=rounded-sans] {
276
286
  --neutrals-emphasis: 224 16% 22%;
277
287
  --border-default: 224 15% 20%;
278
288
  --border-strong: 224 13% 30%;
289
+ --accents-brand: 213 87% 56%;
279
290
  --accents-green: 160 84% 45%;
280
291
  --accents-blue: 221 84% 62%;
281
292
  --accents-red: 0 84% 63%;
282
293
  --accents-orange: 32 98% 62%;
294
+ --tint-brand: 213 50% 17%;
283
295
  --tint-red: 355 76% 16%;
284
296
  --tint-green: 157 58% 11%;
285
297
  --tint-blue: 219 63% 17%;
@@ -1054,6 +1066,7 @@ body {
1054
1066
  height: calc(100vh - 3rem);
1055
1067
  display: none;
1056
1068
  flex-direction: column;
1069
+ overflow: hidden;
1057
1070
  }
1058
1071
  @media (min-width: 768px) {
1059
1072
  .uc-sidebar {
@@ -1077,6 +1090,7 @@ body {
1077
1090
  flex: 1;
1078
1091
  min-height: 0;
1079
1092
  overflow-y: auto;
1093
+ overscroll-behavior: contain;
1080
1094
  padding: 0 var(--spacing-2) var(--spacing-3);
1081
1095
  }
1082
1096
 
@@ -1084,6 +1098,7 @@ body {
1084
1098
  flex-shrink: 0;
1085
1099
  padding: var(--spacing-3) var(--spacing-4);
1086
1100
  border-top: 0.5px solid hsl(var(--border-default));
1101
+ overflow: hidden;
1087
1102
  }
1088
1103
 
1089
1104
  .uc-sidebar-link {
@@ -1167,7 +1182,7 @@ body {
1167
1182
  }
1168
1183
  .uc-toc-link.uc-active {
1169
1184
  color: hsl(var(--fg-primary));
1170
- border-left-color: hsl(var(--accents-blue));
1185
+ border-left-color: hsl(var(--accents-brand));
1171
1186
  font-weight: 500;
1172
1187
  }
1173
1188
 
@@ -1189,7 +1204,7 @@ body {
1189
1204
  }
1190
1205
  .uc-btn:focus-visible {
1191
1206
  outline: none;
1192
- box-shadow: 0 0 0 2px hsl(var(--neutrals-background)), 0 0 0 4px hsl(var(--accents-blue));
1207
+ box-shadow: 0 0 0 3px hsl(var(--accents-brand)/0.25);
1193
1208
  }
1194
1209
  .uc-btn:disabled, .uc-btn.uc-disabled {
1195
1210
  opacity: 0.5;
@@ -1198,11 +1213,11 @@ body {
1198
1213
  }
1199
1214
 
1200
1215
  .uc-btn-primary {
1201
- background: hsl(var(--accents-blue));
1216
+ background: hsl(var(--accents-brand));
1202
1217
  color: hsl(var(--constant-white));
1203
1218
  }
1204
1219
  .uc-btn-primary:hover {
1205
- background: hsl(var(--accents-blue)/0.9);
1220
+ background: hsl(var(--accents-brand)/0.9);
1206
1221
  }
1207
1222
 
1208
1223
  .uc-btn-secondary {
@@ -1240,7 +1255,7 @@ body {
1240
1255
 
1241
1256
  .uc-btn-link {
1242
1257
  background: transparent;
1243
- color: hsl(var(--accents-blue));
1258
+ color: hsl(var(--accents-brand));
1244
1259
  text-underline-offset: 4px;
1245
1260
  }
1246
1261
  .uc-btn-link:hover {
@@ -1259,7 +1274,7 @@ body {
1259
1274
  .uc-btn-sm {
1260
1275
  height: 2.25rem;
1261
1276
  padding: 0.375rem 0.75rem;
1262
- font-size: 0.8125rem;
1277
+ font-size: 0.75rem;
1263
1278
  }
1264
1279
 
1265
1280
  .uc-btn-lg {
@@ -1301,18 +1316,32 @@ body {
1301
1316
  }
1302
1317
  .uc-input:focus-visible {
1303
1318
  outline: none;
1304
- box-shadow: 0 0 0 2px hsl(var(--neutrals-background)), 0 0 0 4px hsl(var(--accents-blue));
1319
+ border-color: hsl(var(--accents-brand));
1320
+ box-shadow: 0 0 0 3px hsl(var(--accents-brand)/0.15);
1305
1321
  }
1306
1322
  .uc-input:disabled {
1307
1323
  opacity: 0.5;
1308
1324
  cursor: not-allowed;
1309
1325
  }
1310
1326
 
1327
+ .uc-input.uc-pl-9 {
1328
+ padding-left: 2.25rem;
1329
+ }
1330
+
1331
+ .uc-input.uc-pl-10 {
1332
+ padding-left: 2.5rem;
1333
+ }
1334
+
1335
+ .uc-input.uc-pr-9 {
1336
+ padding-right: 2.25rem;
1337
+ }
1338
+
1311
1339
  .uc-input-error {
1312
1340
  border-color: hsl(var(--accents-red));
1313
1341
  }
1314
1342
  .uc-input-error:focus-visible {
1315
- box-shadow: 0 0 0 2px hsl(var(--neutrals-background)), 0 0 0 4px hsl(var(--accents-red));
1343
+ border-color: hsl(var(--accents-red));
1344
+ box-shadow: 0 0 0 3px hsl(var(--accents-red)/0.15);
1316
1345
  }
1317
1346
 
1318
1347
  .uc-textarea {
@@ -1333,7 +1362,8 @@ body {
1333
1362
  }
1334
1363
  .uc-textarea:focus-visible {
1335
1364
  outline: none;
1336
- box-shadow: 0 0 0 2px hsl(var(--neutrals-background)), 0 0 0 4px hsl(var(--accents-blue));
1365
+ border-color: hsl(var(--accents-brand));
1366
+ box-shadow: 0 0 0 3px hsl(var(--accents-brand)/0.15);
1337
1367
  }
1338
1368
  .uc-textarea:disabled {
1339
1369
  opacity: 0.5;
@@ -1344,7 +1374,8 @@ body {
1344
1374
  border-color: hsl(var(--accents-red));
1345
1375
  }
1346
1376
  .uc-textarea-error:focus-visible {
1347
- box-shadow: 0 0 0 2px hsl(var(--neutrals-background)), 0 0 0 4px hsl(var(--accents-red));
1377
+ border-color: hsl(var(--accents-red));
1378
+ box-shadow: 0 0 0 3px hsl(var(--accents-red)/0.15);
1348
1379
  }
1349
1380
 
1350
1381
  .uc-label {
@@ -1387,7 +1418,7 @@ body {
1387
1418
  }
1388
1419
 
1389
1420
  .uc-badge-primary {
1390
- background: hsl(var(--accents-blue));
1421
+ background: hsl(var(--accents-brand));
1391
1422
  color: hsl(var(--constant-white));
1392
1423
  }
1393
1424
 
@@ -1416,6 +1447,22 @@ body {
1416
1447
  color: hsl(var(--constant-white));
1417
1448
  }
1418
1449
 
1450
+ .uc-kbd {
1451
+ display: inline-flex;
1452
+ align-items: center;
1453
+ justify-content: center;
1454
+ border-radius: var(--radius-sm);
1455
+ border: 1px solid hsl(var(--border-default));
1456
+ background: hsl(var(--neutrals-muted));
1457
+ padding: 0.125rem 0.375rem;
1458
+ font-size: 0.75rem;
1459
+ font-family: ui-monospace, monospace;
1460
+ font-weight: 500;
1461
+ line-height: 1.4;
1462
+ color: hsl(var(--fg-secondary));
1463
+ white-space: nowrap;
1464
+ }
1465
+
1419
1466
  .uc-alert {
1420
1467
  display: flex;
1421
1468
  gap: 0.75rem;
@@ -1470,15 +1517,54 @@ body {
1470
1517
  }
1471
1518
 
1472
1519
  .uc-separator-h {
1473
- height: 0.5px;
1520
+ height: 1px;
1474
1521
  width: 100%;
1475
1522
  }
1476
1523
 
1477
1524
  .uc-separator-v {
1478
- width: 0.5px;
1525
+ width: 1px;
1479
1526
  height: 100%;
1480
1527
  }
1481
1528
 
1529
+ .uc-btn-group {
1530
+ display: inline-flex;
1531
+ border: 1px solid hsl(var(--border-strong));
1532
+ border-radius: var(--radius-lg);
1533
+ overflow: hidden;
1534
+ }
1535
+ .uc-btn-group > button + button,
1536
+ .uc-btn-group > a + a,
1537
+ .uc-btn-group > button + a,
1538
+ .uc-btn-group > a + button {
1539
+ border-left: 1px solid hsl(var(--border-strong));
1540
+ }
1541
+
1542
+ .uc-btn-group-inverted {
1543
+ display: inline-flex;
1544
+ border-radius: var(--radius-lg);
1545
+ overflow: hidden;
1546
+ }
1547
+ .uc-btn-group-inverted > button + button,
1548
+ .uc-btn-group-inverted > a + a,
1549
+ .uc-btn-group-inverted > button + a,
1550
+ .uc-btn-group-inverted > a + button {
1551
+ border-left: 1px solid rgba(255, 255, 255, 0.2);
1552
+ }
1553
+
1554
+ .uc-btn-group-vertical {
1555
+ display: inline-flex;
1556
+ flex-direction: column;
1557
+ border: 1px solid hsl(var(--border-strong));
1558
+ border-radius: var(--radius-lg);
1559
+ overflow: hidden;
1560
+ }
1561
+ .uc-btn-group-vertical > button + button,
1562
+ .uc-btn-group-vertical > a + a,
1563
+ .uc-btn-group-vertical > button + a,
1564
+ .uc-btn-group-vertical > a + button {
1565
+ border-top: 1px solid hsl(var(--border-strong));
1566
+ }
1567
+
1482
1568
  .uc-component-card {
1483
1569
  border: 0.5px solid hsl(var(--border-default));
1484
1570
  border-radius: var(--radius-2xl);
@@ -1488,7 +1574,7 @@ body {
1488
1574
  flex-direction: column;
1489
1575
  }
1490
1576
  .uc-component-card:hover {
1491
- border-color: hsl(var(--accents-blue));
1577
+ border-color: hsl(var(--accents-brand));
1492
1578
  }
1493
1579
  .uc-component-card > .uc-px-4.uc-py-3 h3 {
1494
1580
  font-size: 0.8125rem;
@@ -1540,7 +1626,7 @@ body {
1540
1626
  flex-shrink: 0;
1541
1627
  }
1542
1628
  .uc-switch-mini.uc-active {
1543
- background: hsl(var(--accents-blue));
1629
+ background: hsl(var(--accents-brand));
1544
1630
  }
1545
1631
  .uc-switch-mini .thumb {
1546
1632
  position: absolute;
@@ -1561,19 +1647,19 @@ body {
1561
1647
  width: 14px;
1562
1648
  height: 14px;
1563
1649
  border-radius: var(--radius-sm);
1564
- border: 1.5px solid hsl(var(--accents-blue));
1650
+ border: 1.5px solid hsl(var(--accents-brand));
1565
1651
  display: flex;
1566
1652
  align-items: center;
1567
1653
  justify-content: center;
1568
1654
  flex-shrink: 0;
1569
- background: hsl(var(--accents-blue));
1655
+ background: hsl(var(--accents-brand));
1570
1656
  }
1571
1657
 
1572
1658
  .uc-radio-mini {
1573
1659
  width: 14px;
1574
1660
  height: 14px;
1575
1661
  border-radius: 50%;
1576
- border: 1.5px solid hsl(var(--accents-blue));
1662
+ border: 1.5px solid hsl(var(--accents-brand));
1577
1663
  display: flex;
1578
1664
  align-items: center;
1579
1665
  justify-content: center;
@@ -1583,7 +1669,7 @@ body {
1583
1669
  width: 7px;
1584
1670
  height: 7px;
1585
1671
  border-radius: 50%;
1586
- background: hsl(var(--accents-blue));
1672
+ background: hsl(var(--accents-brand));
1587
1673
  }
1588
1674
 
1589
1675
  .uc-example-block {
@@ -1659,7 +1745,8 @@ body {
1659
1745
 
1660
1746
  .uc-example-panel[data-panel=preview] {
1661
1747
  position: relative;
1662
- padding: 1.5rem;
1748
+ padding: 2rem 1.5rem;
1749
+ min-height: 8rem;
1663
1750
  background: transparent;
1664
1751
  overflow: visible;
1665
1752
  }
@@ -1830,7 +1917,7 @@ body {
1830
1917
  }
1831
1918
  .uc-tabs-trigger-underline.uc-active {
1832
1919
  color: hsl(var(--fg-primary));
1833
- border-bottom-color: hsl(var(--accents-blue));
1920
+ border-bottom-color: hsl(var(--accents-brand));
1834
1921
  }
1835
1922
 
1836
1923
  .uc-toast {
@@ -1858,7 +1945,7 @@ body {
1858
1945
  }
1859
1946
 
1860
1947
  .uc-dialog {
1861
- background: hsl(var(--neutrals-background));
1948
+ background: hsl(var(--neutrals-surface));
1862
1949
  border: 1px solid hsl(var(--border-default));
1863
1950
  border-radius: var(--radius-2xl);
1864
1951
  max-width: 480px;
@@ -1900,7 +1987,7 @@ body {
1900
1987
  .uc-progress-bar {
1901
1988
  height: 100%;
1902
1989
  border-radius: 9999px;
1903
- background: hsl(var(--accents-blue));
1990
+ background: hsl(var(--accents-brand));
1904
1991
  transition: width 0.3s ease;
1905
1992
  }
1906
1993