@nordcode/ui 2.0.6 → 2.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/CHANGELOG.md +12 -0
- package/README.md +1 -12
- package/out/bundle.css +32 -14
- package/out/bundle_configless.css +32 -14
- package/out/complete.css +152 -124
- package/out/complete_configless.css +152 -124
- package/package.json +4 -3
- package/src/styles/components/buttons.css +47 -57
- package/src/styles/components/card.css +1 -1
- package/src/styles/components/dialogs.css +4 -4
- package/src/styles/components/inputs/base.css +24 -12
- package/src/styles/components/inputs/switch.css +1 -1
- package/src/styles/components/notifications.css +3 -3
- package/src/styles/utils/bundle.css +1 -0
- package/src/styles/utils/conditionalRadius.css +7 -0
- package/src/styles/utils/easings.css +48 -12
- package/src/styles/utils/reset.css +2 -8
- package/transform.js +1 -8
|
@@ -99,14 +99,8 @@
|
|
|
99
99
|
border-width: 0;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
:
|
|
104
|
-
transition: outline-offset var(--transition-duration-short) var(--ease-2);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
:where(:not(:active):focus-visible) {
|
|
108
|
-
transition-duration: var(--transition-duration-base);
|
|
109
|
-
}
|
|
102
|
+
:where(:focus-visible) {
|
|
103
|
+
transition: outline-offset var(--transition-duration-quick-1) var(--ease-2);
|
|
110
104
|
}
|
|
111
105
|
|
|
112
106
|
:where(:not(:active):focus-visible) {
|
|
@@ -985,21 +979,37 @@
|
|
|
985
979
|
--ease-bounce-3: linear(0, .004, .016, .035, .062, .098, .141 11.4%, .25, .39, .562, .764, 1 30.3%, .847 34.8%, .787, .737, .699, .672, .655, .65, .656, .672, .699, .738, .787, .847 61.7%, 1 66.2%, .946, .908, .885 74.2%, .879, .878, .879, .885 79.5%, .908, .946, 1 87.4%, .981, .968, .96, .957, .96, .968, .981, 1);
|
|
986
980
|
--ease-bounce-4: linear(0, .004, .016 3%, .062, .141, .25, .391, .562 18.2%, 1 24.3%, .81, .676 32.3%, .629, .595, .575, .568, .575, .595, .629, .676 48.2%, .811, 1 56.2%, .918, .86, .825, .814, .825, .86, .918, 1 77.2%, .94 80.6%, .925, .92, .925, .94 87.5%, 1 90.9%, .974, .965, .974, 1);
|
|
987
981
|
--ease-bounce-5: linear(0, .004, .016 2.5%, .063, .141, .25 10.1%, .562, 1 20.2%, .783, .627, .534 30.9%, .511, .503, .511, .534 38%, .627, .782, 1 48.7%, .892, .815, .769 56.3%, .757, .753, .757, .769 61.3%, .815, .892, 1 68.8%, .908 72.4%, .885, .878, .885, .908 79.4%, 1 83%, .954 85.5%, .943, .939, .943, .954 90.5%, 1 93%, .977, .97, .977, 1);
|
|
982
|
+
--easing-entry: cubic-bezier(.1, 0, 0, 1);
|
|
983
|
+
--easing-exit: cubic-bezier(.3, 0, 1, .8);
|
|
988
984
|
--transition-duration-instant: 0s;
|
|
989
|
-
--transition-duration-
|
|
990
|
-
--transition-duration-
|
|
991
|
-
--transition-duration-
|
|
985
|
+
--transition-duration-quick-1: 80ms;
|
|
986
|
+
--transition-duration-quick-2: .12s;
|
|
987
|
+
--transition-duration-moderate-1: .18s;
|
|
988
|
+
--transition-duration-moderate-2: .26s;
|
|
989
|
+
--transition-duration-gentle-1: .32s;
|
|
990
|
+
--transition-duration-gentle-2: .42s;
|
|
991
|
+
--transition-duration-short: var(--transition-duration-quick-1);
|
|
992
|
+
--transition-duration-base: var(--transition-duration-moderate-1);
|
|
993
|
+
--transition-duration-long: var(--transition-duration-gentle-1);
|
|
992
994
|
--transition-duration-entry: 0s;
|
|
993
995
|
--transition-duration-exit: 0s;
|
|
994
996
|
--transition-target-scale: .9;
|
|
997
|
+
--animated-element-distance: 0;
|
|
998
|
+
--animated-element-width: 0;
|
|
999
|
+
--animated-element-height: 0;
|
|
1000
|
+
--transition-duration-calculated: calc(( .5 * var(--animated-element-distance, 0) + .35 * var(--animated-element-width, 0) + .3 * var(--animated-element-height, 0)) * 1ms);
|
|
995
1001
|
}
|
|
996
1002
|
|
|
997
1003
|
@media (prefers-reduced-motion: reduce) {
|
|
998
1004
|
:where(html) {
|
|
1005
|
+
--transition-duration-quick-1: 80ms;
|
|
1006
|
+
--transition-duration-quick-2: .12s;
|
|
1007
|
+
--transition-duration-moderate-1: .18s;
|
|
1008
|
+
--transition-duration-moderate-2: .26s;
|
|
1009
|
+
--transition-duration-gentle-1: .32s;
|
|
1010
|
+
--transition-duration-gentle-2: .42s;
|
|
1011
|
+
--transition-duration-calculated: 0;
|
|
999
1012
|
--transition-duration-instant: 0s;
|
|
1000
|
-
--transition-duration-short: 0s;
|
|
1001
|
-
--transition-duration-base: 0s;
|
|
1002
|
-
--transition-duration-long: 0s;
|
|
1003
1013
|
--transition-duration-entry: 0s;
|
|
1004
1014
|
--transition-duration-exit: 0s;
|
|
1005
1015
|
}
|
|
@@ -1122,6 +1132,14 @@
|
|
|
1122
1132
|
}
|
|
1123
1133
|
}
|
|
1124
1134
|
|
|
1135
|
+
@layer helpers.conditionalRadius {
|
|
1136
|
+
:where(html) {
|
|
1137
|
+
--border-radius-cond-small: clamp(0px, calc(100vw - 100%) * 100000, var(--border-radius-small));
|
|
1138
|
+
--border-radius-cond-medium: clamp(0px, calc(100vw - 100%) * 100000, var(--border-radius-medium));
|
|
1139
|
+
--border-radius-cond-large: clamp(0px, calc(100vw - 100%) * 100000, var(--border-radius-large));
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1125
1143
|
:where(.text-assistive, .sr-only) {
|
|
1126
1144
|
clip: rect(0 0 0 0);
|
|
1127
1145
|
white-space: nowrap;
|
|
@@ -1308,7 +1326,7 @@
|
|
|
1308
1326
|
}
|
|
1309
1327
|
|
|
1310
1328
|
@layer components.buttons {
|
|
1311
|
-
:where(button
|
|
1329
|
+
:where(button, button, input[type="button"], input[type="submit"], input[type="reset"], input[type="file"], .nc-button) {
|
|
1312
1330
|
--_button-background: var(--button-background, var(--surface-hover));
|
|
1313
1331
|
--_button-color: var(--button-color, var(--text-hover));
|
|
1314
1332
|
--_button-border-color: var(--button-border-color, var(--surface-hover));
|
|
@@ -1331,7 +1349,6 @@
|
|
|
1331
1349
|
font-weight: var(--font-weight-default);
|
|
1332
1350
|
font-size: inherit;
|
|
1333
1351
|
cursor: pointer;
|
|
1334
|
-
box-sizing: border-box;
|
|
1335
1352
|
text-align: center;
|
|
1336
1353
|
transition: var(--transition-duration-base) var(--ease-2);
|
|
1337
1354
|
-webkit-text-decoration: unset;
|
|
@@ -1339,31 +1356,36 @@
|
|
|
1339
1356
|
box-shadow: var(--_button-box-shadow);
|
|
1340
1357
|
-webkit-user-select: none;
|
|
1341
1358
|
user-select: none;
|
|
1359
|
+
justify-content: center;
|
|
1360
|
+
align-items: center;
|
|
1361
|
+
gap: var(--control-spacing-tiny, .25em);
|
|
1342
1362
|
-webkit-tap-highlight-color: transparent;
|
|
1343
1363
|
-webkit-touch-callout: none;
|
|
1344
1364
|
line-height: var(--line-height-base);
|
|
1345
|
-
justify-content: center;
|
|
1346
|
-
align-items: center;
|
|
1347
1365
|
padding-block: 0;
|
|
1348
1366
|
transition-property: box-shadow, transform;
|
|
1349
1367
|
display: inline-flex;
|
|
1350
1368
|
position: relative;
|
|
1351
1369
|
}
|
|
1352
1370
|
|
|
1353
|
-
:where(button
|
|
1371
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button):hover {
|
|
1354
1372
|
background: var(--_button-background-hover);
|
|
1355
1373
|
color: var(--_button-color-hover);
|
|
1356
1374
|
border-color: var(--_button-border-color-hover);
|
|
1357
1375
|
box-shadow: var(--_button-hover-shadow);
|
|
1358
1376
|
}
|
|
1359
1377
|
|
|
1360
|
-
:where(button
|
|
1378
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button)[aria-pressed="true"] {
|
|
1361
1379
|
box-shadow: none;
|
|
1362
1380
|
font-weight: var(--font-weight-active);
|
|
1363
1381
|
transform: none;
|
|
1364
1382
|
}
|
|
1365
1383
|
|
|
1366
|
-
:where(button
|
|
1384
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button) > svg {
|
|
1385
|
+
pointer-events: none;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button):is(:active, .-active) {
|
|
1367
1389
|
background-color: var(--_button-background-hover);
|
|
1368
1390
|
color: var(--_button-color-hover);
|
|
1369
1391
|
border-color: var(--_button-border-color-hover);
|
|
@@ -1374,58 +1396,45 @@
|
|
|
1374
1396
|
transform: none;
|
|
1375
1397
|
}
|
|
1376
1398
|
|
|
1377
|
-
:where(button
|
|
1378
|
-
--_button-border-color-hover: var(--_button-border-color);
|
|
1379
|
-
filter: contrast(.72) opacity(.72);
|
|
1380
|
-
cursor: not-allowed;
|
|
1381
|
-
--_button-background: none !important;
|
|
1382
|
-
--_button-background-hover: none !important;
|
|
1383
|
-
--_button-color: var(--color-text-subtle) !important;
|
|
1384
|
-
--_button-color-hover: var(--_button-color) !important;
|
|
1385
|
-
--_button-border-color: var(--color-text-subtle) !important;
|
|
1386
|
-
box-shadow: none !important;
|
|
1387
|
-
transform: none !important;
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
:where(button:not([class]), button[type]:not([class]), input[type="button"]:not([class]), input[type="submit"]:not([class]), input[type="reset"]:not([class]), .nc-button).-outline {
|
|
1399
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button).-outline {
|
|
1391
1400
|
color: var(--text);
|
|
1392
1401
|
border-color: var(--border);
|
|
1393
1402
|
background-color: #0000;
|
|
1394
1403
|
}
|
|
1395
1404
|
|
|
1396
|
-
:where(button
|
|
1405
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button).-outline:hover {
|
|
1397
1406
|
background-color: var(--_button-background-hover-light);
|
|
1398
1407
|
color: var(--text);
|
|
1399
1408
|
border-color: var(--border-hover);
|
|
1400
1409
|
}
|
|
1401
1410
|
|
|
1402
|
-
:where(button
|
|
1411
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button).-stealth {
|
|
1403
1412
|
color: var(--text);
|
|
1404
1413
|
background-color: #0000;
|
|
1405
1414
|
border-color: #0000;
|
|
1406
1415
|
}
|
|
1407
1416
|
|
|
1408
|
-
:where(button
|
|
1417
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button).-stealth:hover {
|
|
1409
1418
|
background-color: var(--_button-background-hover-light);
|
|
1410
1419
|
color: var(--text);
|
|
1411
1420
|
border-color: #0000;
|
|
1412
1421
|
}
|
|
1413
1422
|
|
|
1414
|
-
:where(button
|
|
1423
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button).-stealth {
|
|
1415
1424
|
box-shadow: none !important;
|
|
1416
1425
|
transform: none !important;
|
|
1417
1426
|
}
|
|
1418
1427
|
|
|
1419
|
-
:where(button
|
|
1428
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button).-small {
|
|
1420
1429
|
--_button-padding-inline: var(--control-spacing-near, .5em);
|
|
1421
1430
|
min-block-size: var(--control-height-small);
|
|
1422
1431
|
}
|
|
1423
1432
|
|
|
1424
|
-
:where(button
|
|
1433
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button).-round {
|
|
1425
1434
|
--_button-border-radius: var(--border-radius-round);
|
|
1426
1435
|
}
|
|
1427
1436
|
|
|
1428
|
-
:where(button
|
|
1437
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button).-offset {
|
|
1429
1438
|
--_button-offset-distance: var(--button-offset-distance, calc(-1 * var(--control-spacing-minimal)));
|
|
1430
1439
|
--_button-offset-distance-hover: var(--button-offset-distance-hover, calc(-.5 * var(--control-spacing-minimal)));
|
|
1431
1440
|
--_button-transform: translate(var(--_button-offset-distance), var(--_button-offset-distance));
|
|
@@ -1437,22 +1446,26 @@
|
|
|
1437
1446
|
inset-inline-start: calc(var(--_button-offset-distance) * -1);
|
|
1438
1447
|
}
|
|
1439
1448
|
|
|
1440
|
-
:where(button
|
|
1449
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button).-offset:hover {
|
|
1441
1450
|
transform: var(--_button-hover-transform);
|
|
1442
1451
|
}
|
|
1443
1452
|
|
|
1444
|
-
:where(button
|
|
1445
|
-
|
|
1453
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button).-icon.-small {
|
|
1454
|
+
padding: 0;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button).-aligned {
|
|
1458
|
+
margin-inline: calc(-1 * var(--_button-padding-inline));
|
|
1446
1459
|
}
|
|
1447
1460
|
|
|
1448
|
-
:
|
|
1461
|
+
:is([aria-label], .-icon):where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button) {
|
|
1449
1462
|
--_button-border-radius: var(--border-radius-round);
|
|
1450
1463
|
aspect-ratio: 1;
|
|
1451
1464
|
fill: currentColor;
|
|
1452
1465
|
padding: 0;
|
|
1453
1466
|
}
|
|
1454
1467
|
|
|
1455
|
-
:is(
|
|
1468
|
+
:is([aria-label], .-icon):where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button):after {
|
|
1456
1469
|
content: "";
|
|
1457
1470
|
inline-size: max(var(--control-height-base), 100%);
|
|
1458
1471
|
block-size: max(var(--control-height-base), 100%);
|
|
@@ -1465,16 +1478,17 @@
|
|
|
1465
1478
|
inset-inline-start: calc(-.5 * (var(--control-height-base) - 100%));
|
|
1466
1479
|
}
|
|
1467
1480
|
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1481
|
+
[disabled]:where(button, button[type], input[type="button"], input[type="submit"], input[type="reset"], .nc-button) {
|
|
1482
|
+
--_button-border-color-hover: var(--_button-border-color);
|
|
1483
|
+
filter: contrast(.72) opacity(.72);
|
|
1484
|
+
cursor: not-allowed;
|
|
1485
|
+
--_button-background: none !important;
|
|
1486
|
+
--_button-background-hover: none !important;
|
|
1487
|
+
--_button-color: var(--color-text-subtle) !important;
|
|
1488
|
+
--_button-color-hover: var(--_button-color) !important;
|
|
1489
|
+
--_button-border-color: var(--color-text-subtle) !important;
|
|
1490
|
+
box-shadow: none !important;
|
|
1491
|
+
transform: none !important;
|
|
1478
1492
|
}
|
|
1479
1493
|
|
|
1480
1494
|
:where(input[type="file"]) {
|
|
@@ -1519,7 +1533,7 @@
|
|
|
1519
1533
|
transform: none;
|
|
1520
1534
|
}
|
|
1521
1535
|
|
|
1522
|
-
:where(button[type="reset"]
|
|
1536
|
+
:where(button[type="reset"], .nc-button.-destructive) {
|
|
1523
1537
|
--text: var(--color-status-danger-emphasis);
|
|
1524
1538
|
--color: var(--color-status-danger-base);
|
|
1525
1539
|
--surface: var(--color-status-danger-surface);
|
|
@@ -1564,7 +1578,7 @@
|
|
|
1564
1578
|
background-color: var(--_card-background-color);
|
|
1565
1579
|
border-radius: var(--_card-border-radius);
|
|
1566
1580
|
box-shadow: var(--_card-shadow);
|
|
1567
|
-
transition: border-color var(--transition-duration-
|
|
1581
|
+
transition: border-color var(--transition-duration-quick-2) var(--ease-2);
|
|
1568
1582
|
display: inline-block;
|
|
1569
1583
|
overflow: hidden;
|
|
1570
1584
|
}
|
|
@@ -1623,13 +1637,13 @@
|
|
|
1623
1637
|
--_dialog-padding-inline: var(--dialog-padding-inline, var(--spacing-base));
|
|
1624
1638
|
--_dialog-layout-padding: var(--layout-padding, var(--spacing-base));
|
|
1625
1639
|
--_dialog-close-size: var(--dialog-close-size, var(--control-height-base));
|
|
1626
|
-
--_dialog-transition-duration: var(--dialog-transition-duration, var(--transition-duration-
|
|
1640
|
+
--_dialog-transition-duration: var(--dialog-transition-duration, var(--transition-duration-moderate-2));
|
|
1627
1641
|
--_dialog-max-block-size: var(--dialog-max-block-size, 90dvh);
|
|
1628
1642
|
--_dialog-max-inline-size: var(--dialog-max-inline-size, 28rem);
|
|
1629
1643
|
--_dialog-radius: 0;
|
|
1630
1644
|
z-index: var(--layer-important);
|
|
1631
|
-
animation: close-dialog var(--_dialog-transition-duration)
|
|
1632
|
-
transition: opacity var(--_dialog-transition-duration)
|
|
1645
|
+
animation: close-dialog var(--_dialog-transition-duration) var(--easing-exit) forwards;
|
|
1646
|
+
transition: opacity var(--_dialog-transition-duration) var(--easing-exit);
|
|
1633
1647
|
border: var(--border-width-thin) solid var(--color-border-base);
|
|
1634
1648
|
block-size: max-content;
|
|
1635
1649
|
inline-size: 100dvw;
|
|
@@ -1658,7 +1672,7 @@
|
|
|
1658
1672
|
}
|
|
1659
1673
|
|
|
1660
1674
|
:where(.nc-dialog)[open] {
|
|
1661
|
-
animation: open-dialog var(--_dialog-transition-duration)
|
|
1675
|
+
animation: open-dialog var(--_dialog-transition-duration) var(--easing-entry);
|
|
1662
1676
|
}
|
|
1663
1677
|
|
|
1664
1678
|
:where(.nc-dialog):not([open]) {
|
|
@@ -1907,8 +1921,8 @@
|
|
|
1907
1921
|
}
|
|
1908
1922
|
}
|
|
1909
1923
|
|
|
1910
|
-
@layer
|
|
1911
|
-
:where(label
|
|
1924
|
+
@layer base.inputs {
|
|
1925
|
+
:where(label, .nc-input-label) {
|
|
1912
1926
|
font-family: var(--font-family-default);
|
|
1913
1927
|
letter-spacing: var(--tracking-tight);
|
|
1914
1928
|
font-weight: var(--font-weight-active);
|
|
@@ -1919,7 +1933,7 @@
|
|
|
1919
1933
|
display: inline-flex;
|
|
1920
1934
|
}
|
|
1921
1935
|
|
|
1922
|
-
:where(input
|
|
1936
|
+
:where(input, textarea, select, .nc-input, .nc-select, .nc-textarea, .nc-input-checkbox, .nc-input-radio, .nc-input-label, .nc-input-color, .nc-input-field, .nc-input-error, .nc-checkbox-wrapper, .nc-input-switch, .nc-radio-field, .nc-checkbox-field) {
|
|
1923
1937
|
--_input-background: var(--input-background, var(--color-surface-subtle));
|
|
1924
1938
|
--_input-background-active: var(--input-background-active, var(--color-surface-base));
|
|
1925
1939
|
--_input-color: var(--input-color, var(--color-text-base));
|
|
@@ -1933,7 +1947,7 @@
|
|
|
1933
1947
|
--_input-hover-background: var(--input-hover-background, var(--color-brand-primary-hover));
|
|
1934
1948
|
}
|
|
1935
1949
|
|
|
1936
|
-
:where(input
|
|
1950
|
+
:where(input, textarea, select, .nc-input) {
|
|
1937
1951
|
font: inherit;
|
|
1938
1952
|
letter-spacing: inherit;
|
|
1939
1953
|
word-spacing: inherit;
|
|
@@ -1949,39 +1963,51 @@
|
|
|
1949
1963
|
line-height: var(--line-height-base);
|
|
1950
1964
|
}
|
|
1951
1965
|
|
|
1952
|
-
:where(input
|
|
1966
|
+
:where(input, textarea, select, .nc-input):focus, :where(input, textarea, select, .nc-input):hover:focus {
|
|
1953
1967
|
--current-background: var(--_input-background-active);
|
|
1954
1968
|
outline: var(--_input-outline);
|
|
1955
1969
|
outline-offset: 0;
|
|
1956
1970
|
background-color: var(--_input-background-active);
|
|
1957
1971
|
}
|
|
1958
1972
|
|
|
1959
|
-
:where(input
|
|
1973
|
+
:where(input, textarea, select, .nc-input):disabled {
|
|
1960
1974
|
filter: var(--_input-disabled-filter);
|
|
1961
1975
|
cursor: not-allowed;
|
|
1962
1976
|
}
|
|
1963
1977
|
|
|
1964
|
-
:where(input
|
|
1978
|
+
:where(input, textarea, select, .nc-input):hover {
|
|
1965
1979
|
--current-background: var(--_input-hover-background);
|
|
1966
1980
|
background-color: var(--_input-hover-background);
|
|
1967
1981
|
}
|
|
1968
1982
|
|
|
1969
|
-
:where(input
|
|
1983
|
+
:where(input, textarea, select, .nc-input)[required] {
|
|
1970
1984
|
border-inline-start-width: var(--border-width-thick);
|
|
1971
1985
|
}
|
|
1972
1986
|
|
|
1973
|
-
:where(input
|
|
1987
|
+
:where(input, textarea, select, .nc-input)::placeholder {
|
|
1974
1988
|
color: var(--color-text-subtle);
|
|
1975
1989
|
}
|
|
1976
1990
|
|
|
1977
|
-
:where(select
|
|
1991
|
+
:where(input, textarea, select, .nc-input).-validate:user-valid {
|
|
1992
|
+
outline: var(--_input-outline);
|
|
1993
|
+
outline-offset: 0;
|
|
1994
|
+
outline-color: var(--color-status-success-base);
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
:where(input, textarea, select, .nc-input).-validate:user-invalid {
|
|
1998
|
+
outline: var(--_input-outline);
|
|
1999
|
+
outline-offset: 0;
|
|
2000
|
+
outline-color: var(--color-status-danger-base);
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
:where(select, .nc-select) {
|
|
1978
2004
|
background-image: var(--triangle-down-url);
|
|
1979
2005
|
background-position: right .5em top 50%;
|
|
1980
2006
|
background-size: 1em .75em;
|
|
1981
2007
|
padding-inline-end: 1.75em;
|
|
1982
2008
|
}
|
|
1983
2009
|
|
|
1984
|
-
:where(textarea
|
|
2010
|
+
:where(textarea, .nc-textarea) {
|
|
1985
2011
|
min-block-size: calc(8lh + 2 * var(--_input-padding-block));
|
|
1986
2012
|
max-block-size: 80svh;
|
|
1987
2013
|
min-inline-size: var(--input-inline-size, 100%);
|
|
@@ -1991,14 +2017,14 @@
|
|
|
1991
2017
|
field-sizing: content;
|
|
1992
2018
|
}
|
|
1993
2019
|
|
|
1994
|
-
:where(input[type="checkbox"]
|
|
2020
|
+
:where(input[type="checkbox"], input[type="radio"], .nc-input-checkbox, .nc-input-radio, .nc-input-switch) {
|
|
1995
2021
|
appearance: none;
|
|
1996
2022
|
border: var(--_input-border);
|
|
1997
2023
|
--current-background: var(--_input-background);
|
|
1998
2024
|
background: var(--current-background);
|
|
1999
2025
|
block-size: 1lh;
|
|
2000
2026
|
inline-size: 1lh;
|
|
2001
|
-
transition: var(--transition-duration-
|
|
2027
|
+
transition: var(--transition-duration-quick-1) background var(--ease-2);
|
|
2002
2028
|
box-shadow: var(--_input-box-shadow);
|
|
2003
2029
|
justify-content: center;
|
|
2004
2030
|
align-items: center;
|
|
@@ -2006,18 +2032,18 @@
|
|
|
2006
2032
|
display: inline-flex;
|
|
2007
2033
|
}
|
|
2008
2034
|
|
|
2009
|
-
:where(input[type="checkbox"]
|
|
2035
|
+
:where(input[type="checkbox"], .nc-input-checkbox) {
|
|
2010
2036
|
--_transition-duration: 0s;
|
|
2011
2037
|
border-radius: var(--_input-border-radius);
|
|
2012
2038
|
overflow: hidden;
|
|
2013
2039
|
}
|
|
2014
2040
|
|
|
2015
|
-
:where(input[type="checkbox"]
|
|
2041
|
+
:where(input[type="checkbox"], .nc-input-checkbox):before {
|
|
2016
2042
|
content: "";
|
|
2017
2043
|
background-color: var(--color-brand-primary-contrast);
|
|
2018
2044
|
block-size: .75lh;
|
|
2019
2045
|
inline-size: .75lh;
|
|
2020
|
-
transition: transform var(--ease-out-2) var(--transition-duration-
|
|
2046
|
+
transition: transform var(--ease-out-2) var(--transition-duration-quick-1);
|
|
2021
2047
|
font-family: var(--font-family-sans);
|
|
2022
2048
|
--font-weight: var(--font-weight-active);
|
|
2023
2049
|
color: var(--_input-background);
|
|
@@ -2029,11 +2055,11 @@
|
|
|
2029
2055
|
transform: scale(.8)translateY(2em);
|
|
2030
2056
|
}
|
|
2031
2057
|
|
|
2032
|
-
:where(input[type="checkbox"]
|
|
2058
|
+
:where(input[type="checkbox"], .nc-input-checkbox):checked {
|
|
2033
2059
|
--current-background: var(--color-brand-primary-base);
|
|
2034
2060
|
}
|
|
2035
2061
|
|
|
2036
|
-
:where(input[type="checkbox"]
|
|
2062
|
+
:where(input[type="checkbox"], .nc-input-checkbox):checked:before {
|
|
2037
2063
|
transform: scale(1)translateY(0%);
|
|
2038
2064
|
}
|
|
2039
2065
|
|
|
@@ -2048,7 +2074,7 @@
|
|
|
2048
2074
|
background-color: var(--color-brand-primary-contrast);
|
|
2049
2075
|
block-size: 50%;
|
|
2050
2076
|
inline-size: 50%;
|
|
2051
|
-
transition: transform var(--ease-out-2) var(--transition-duration-
|
|
2077
|
+
transition: transform var(--ease-out-2) var(--transition-duration-quick-1);
|
|
2052
2078
|
display: inline-flex;
|
|
2053
2079
|
transform: scale(.8)translateY(2em);
|
|
2054
2080
|
}
|
|
@@ -2064,7 +2090,7 @@
|
|
|
2064
2090
|
:where(input[type="color"], .nc-input-color) {
|
|
2065
2091
|
aspect-ratio: 1;
|
|
2066
2092
|
inline-size: auto;
|
|
2067
|
-
padding: var(--control-spacing-
|
|
2093
|
+
padding: var(--control-spacing-nearest, .125em);
|
|
2068
2094
|
}
|
|
2069
2095
|
|
|
2070
2096
|
:where(input[type="date"], .nc-input-date) {
|
|
@@ -2108,43 +2134,6 @@
|
|
|
2108
2134
|
background-color: var(--color-brand-primary-base);
|
|
2109
2135
|
border-color: var(--color-brand-primary-base);
|
|
2110
2136
|
}
|
|
2111
|
-
|
|
2112
|
-
:where(.nc-tag-select-field) {
|
|
2113
|
-
--_tag-select-checked-text-color: var(--tag-select-checked-text-color, var(--color-brand-primary-contrast));
|
|
2114
|
-
--_tag-select-checked-surface-color: var(--tag-select-checked-surface-color, var(--color-brand-primary-base));
|
|
2115
|
-
--_tag-select-border-radius: var(--tag-select-border-radius, var(--_input-border-radius));
|
|
2116
|
-
--nc-legend-spacing: var(--control-spacing-near, .5em);
|
|
2117
|
-
}
|
|
2118
|
-
|
|
2119
|
-
:where(.nc-tag-select-field):focus-within:has(:focus-visible) {
|
|
2120
|
-
outline-offset: var(--controls-spacing-near, .5em);
|
|
2121
|
-
outline: var(--_input-outline);
|
|
2122
|
-
border-radius: var(--_tag-select-border-radius);
|
|
2123
|
-
}
|
|
2124
|
-
|
|
2125
|
-
:where(.nc-tag-select-field) input {
|
|
2126
|
-
opacity: 0;
|
|
2127
|
-
position: absolute;
|
|
2128
|
-
}
|
|
2129
|
-
|
|
2130
|
-
:where(.nc-tag-select-field) label {
|
|
2131
|
-
display: grid;
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
:where(.nc-tag-select-field) label:hover, :where(.nc-tag-select-field) label:focus-within {
|
|
2135
|
-
background-color: var(--_input-hover-background);
|
|
2136
|
-
}
|
|
2137
|
-
|
|
2138
|
-
:where(.nc-tag-select-field) label:has(input:checked) {
|
|
2139
|
-
background: var(--_tag-select-checked-surface-color);
|
|
2140
|
-
color: var(--_tag-select-checked-text-color);
|
|
2141
|
-
box-shadow: var(--shadow-near);
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
|
-
:where(.nc-tag-select-field) label:has(input:disabled) {
|
|
2145
|
-
filter: var(--_input-disabled-filter);
|
|
2146
|
-
cursor: not-allowed;
|
|
2147
|
-
}
|
|
2148
2137
|
}
|
|
2149
2138
|
|
|
2150
2139
|
@layer components.input-fields {
|
|
@@ -2355,7 +2344,7 @@
|
|
|
2355
2344
|
border-radius: var(--_input-border-radius);
|
|
2356
2345
|
box-shadow: var(--shadow-near);
|
|
2357
2346
|
transition: transform, background-color;
|
|
2358
|
-
transition-duration: var(--transition-duration-
|
|
2347
|
+
transition-duration: var(--transition-duration-quick-2);
|
|
2359
2348
|
transition-timing-function: var(--ease-2);
|
|
2360
2349
|
display: block;
|
|
2361
2350
|
}
|
|
@@ -2369,6 +2358,45 @@
|
|
|
2369
2358
|
}
|
|
2370
2359
|
}
|
|
2371
2360
|
|
|
2361
|
+
@layer components.inputs {
|
|
2362
|
+
:where(.nc-tag-select-field) {
|
|
2363
|
+
--_tag-select-checked-text-color: var(--tag-select-checked-text-color, var(--color-brand-primary-contrast));
|
|
2364
|
+
--_tag-select-checked-surface-color: var(--tag-select-checked-surface-color, var(--color-brand-primary-base));
|
|
2365
|
+
--_tag-select-border-radius: var(--tag-select-border-radius, var(--_input-border-radius));
|
|
2366
|
+
--nc-legend-spacing: var(--control-spacing-near, .5em);
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
:where(.nc-tag-select-field):focus-within:has(:focus-visible) {
|
|
2370
|
+
outline-offset: var(--controls-spacing-near, .5em);
|
|
2371
|
+
outline: var(--_input-outline);
|
|
2372
|
+
border-radius: var(--_tag-select-border-radius);
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
:where(.nc-tag-select-field) input {
|
|
2376
|
+
opacity: 0;
|
|
2377
|
+
position: absolute;
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
:where(.nc-tag-select-field) label {
|
|
2381
|
+
display: grid;
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
:where(.nc-tag-select-field) label:hover, :where(.nc-tag-select-field) label:focus-within {
|
|
2385
|
+
background-color: var(--_input-hover-background);
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
:where(.nc-tag-select-field) label:has(input:checked) {
|
|
2389
|
+
background: var(--_tag-select-checked-surface-color);
|
|
2390
|
+
color: var(--_tag-select-checked-text-color);
|
|
2391
|
+
box-shadow: var(--shadow-near);
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
:where(.nc-tag-select-field) label:has(input:disabled) {
|
|
2395
|
+
filter: var(--_input-disabled-filter);
|
|
2396
|
+
cursor: not-allowed;
|
|
2397
|
+
}
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2372
2400
|
@layer components.lists {
|
|
2373
2401
|
:where(.nc-meta-list) {
|
|
2374
2402
|
inline-size: 100%;
|
|
@@ -2435,7 +2463,7 @@
|
|
|
2435
2463
|
backdrop-filter: blur(3px);
|
|
2436
2464
|
background-color: var(--_notification-center-background);
|
|
2437
2465
|
block-size: 100%;
|
|
2438
|
-
transition: transform var(--transition-duration-
|
|
2466
|
+
transition: transform var(--transition-duration-moderate-2) var(--ease-in-out-2);
|
|
2439
2467
|
transform: translate(100%);
|
|
2440
2468
|
}
|
|
2441
2469
|
|
|
@@ -2478,7 +2506,7 @@
|
|
|
2478
2506
|
border-radius: var(--border-radius-small);
|
|
2479
2507
|
inline-size: 100%;
|
|
2480
2508
|
box-shadow: var(--shadow-far);
|
|
2481
|
-
animation: pop-in var(--transition-duration-
|
|
2509
|
+
animation: pop-in var(--transition-duration-moderate-2) var(--easing-entry);
|
|
2482
2510
|
color: var(--color-text-base);
|
|
2483
2511
|
pointer-events: all;
|
|
2484
2512
|
flex-direction: column;
|
|
@@ -2518,7 +2546,7 @@
|
|
|
2518
2546
|
}
|
|
2519
2547
|
|
|
2520
2548
|
:where(.nc-notification.-closing) {
|
|
2521
|
-
animation: remove-notification var(--transition-duration-
|
|
2549
|
+
animation: remove-notification var(--transition-duration-moderate-2) var(--easing-exit) forwards;
|
|
2522
2550
|
}
|
|
2523
2551
|
|
|
2524
2552
|
@keyframes pop-in {
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"type": "git",
|
|
13
13
|
"url": "https://github.com/nordcode-agency/nordcode/tree/main/packages/ui"
|
|
14
14
|
},
|
|
15
|
-
"version": "2.0
|
|
15
|
+
"version": "2.1.0",
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
@@ -68,8 +68,9 @@
|
|
|
68
68
|
"./fonts": "./src/assets/fonts/fonts.css"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"browserslist": "^4.
|
|
72
|
-
"lightningcss": "^1.30.2"
|
|
71
|
+
"browserslist": "^4.28.0",
|
|
72
|
+
"lightningcss": "^1.30.2",
|
|
73
|
+
"browserslist-config-baseline": "^0.5.0"
|
|
73
74
|
},
|
|
74
75
|
"scripts": {
|
|
75
76
|
"lib:transform": "node transform.js",
|