@nordcode/ui 2.0.5 → 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 +14 -1
- package/LICENSE.md +159 -159
- package/README.md +1 -14
- package/out/bundle.css +44 -26
- package/out/bundle_configless.css +32 -14
- package/out/complete.css +170 -144
- package/out/complete_configless.css +158 -132
- package/package.json +4 -3
- package/src/assets/icons/ArrowRightSolid.svelte +3 -1
- package/src/assets/icons/arrow-right-solid.svg +5 -1
- package/src/assets/icons/favicon.svg +13 -4
- package/src/assets/logos/nordcode-logo-icon.svg +6 -1
- package/src/assets/logos/nordcode-logo.svg +46 -13
- package/src/modules/dialogs/svelte/dialog.svelte +14 -15
- package/src/modules/dialogs/ts/dialogs.ts +80 -79
- package/src/modules/notifications/js/notifications.js +3 -6
- package/src/modules/notifications/svelte/NotificationTemplate.svelte +0 -2
- package/src/styles/components/buttons.css +70 -93
- package/src/styles/components/card.css +1 -1
- package/src/styles/components/dialogs.css +4 -5
- package/src/styles/components/forms.css +3 -7
- package/src/styles/components/gallery.css +12 -8
- package/src/styles/components/inputs/base.css +24 -72
- package/src/styles/components/inputs/segmented.css +4 -8
- package/src/styles/components/inputs/switch.css +2 -4
- package/src/styles/components/notifications.css +3 -4
- package/src/styles/config/config.css +352 -305
- package/src/styles/theme/colors.css +182 -124
- package/src/styles/theme/colors_processed.css +254 -80
- package/src/styles/utils/base.css +2 -13
- package/src/styles/utils/bundle.css +1 -0
- package/src/styles/utils/conditionalRadius.css +7 -0
- package/src/styles/utils/easings.css +360 -304
- package/src/styles/utils/layouts.css +12 -18
- package/src/styles/utils/reset.css +5 -38
- package/transform.js +2 -9
|
@@ -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;
|
|
1446
1455
|
}
|
|
1447
1456
|
|
|
1448
|
-
:where(button
|
|
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));
|
|
1459
|
+
}
|
|
1460
|
+
|
|
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,63 +1478,62 @@
|
|
|
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
|
-
:where(input[type="file"]
|
|
1494
|
+
:where(input[type="file"]) {
|
|
1481
1495
|
color: var(--_input-color);
|
|
1482
1496
|
background-color: var(--_input-background);
|
|
1483
1497
|
border: var(--_input-border);
|
|
1484
1498
|
min-block-size: var(--control-height-base);
|
|
1485
1499
|
border-radius: var(--_input-border-radius);
|
|
1486
|
-
padding-inline-start: 0;
|
|
1487
1500
|
padding-inline-end: var(--contol-spacing-near, .5em);
|
|
1501
|
+
padding-inline-start: 0 !important;
|
|
1488
1502
|
}
|
|
1489
1503
|
|
|
1490
|
-
:where(input[type="file"]
|
|
1504
|
+
:where(input[type="file"])::-webkit-file-upload-button {
|
|
1491
1505
|
background-color: var(--_button-background);
|
|
1492
1506
|
color: var(--_button-color);
|
|
1493
1507
|
padding-inline: var(--_button-padding-inline);
|
|
1494
1508
|
cursor: pointer;
|
|
1495
1509
|
box-shadow: none;
|
|
1496
|
-
min-block-size: calc(var(--control-height-base) - var(--border-width-thin));
|
|
1497
1510
|
border: none;
|
|
1498
|
-
border-inline-end: var(--border-width-thin) solid var(--color-border-base);
|
|
1499
1511
|
border-start-end-radius: 0;
|
|
1500
1512
|
border-end-end-radius: 0;
|
|
1513
|
+
min-block-size: 100%;
|
|
1501
1514
|
margin-inline-end: var(--contol-spacing-near, .5em);
|
|
1502
1515
|
inset-block-start: 0;
|
|
1503
1516
|
inset-inline-start: 0;
|
|
1504
1517
|
transform: none;
|
|
1505
1518
|
}
|
|
1506
1519
|
|
|
1507
|
-
:where(input[type="file"]
|
|
1520
|
+
:where(input[type="file"])::file-selector-button {
|
|
1508
1521
|
background-color: var(--_button-background);
|
|
1509
1522
|
color: var(--_button-color);
|
|
1510
1523
|
padding-inline: var(--_button-padding-inline);
|
|
1511
1524
|
cursor: pointer;
|
|
1512
1525
|
box-shadow: none;
|
|
1513
|
-
min-block-size: calc(var(--control-height-base) - var(--border-width-thin));
|
|
1514
1526
|
border: none;
|
|
1515
|
-
border-inline-end: var(--border-width-thin) solid var(--color-border-base);
|
|
1516
1527
|
border-start-end-radius: 0;
|
|
1517
1528
|
border-end-end-radius: 0;
|
|
1529
|
+
min-block-size: 100%;
|
|
1518
1530
|
margin-inline-end: var(--contol-spacing-near, .5em);
|
|
1519
1531
|
inset-block-start: 0;
|
|
1520
1532
|
inset-inline-start: 0;
|
|
1521
1533
|
transform: none;
|
|
1522
1534
|
}
|
|
1523
1535
|
|
|
1524
|
-
:where(button[type="reset"]
|
|
1536
|
+
:where(button[type="reset"], .nc-button.-destructive) {
|
|
1525
1537
|
--text: var(--color-status-danger-emphasis);
|
|
1526
1538
|
--color: var(--color-status-danger-base);
|
|
1527
1539
|
--surface: var(--color-status-danger-surface);
|
|
@@ -1566,7 +1578,7 @@
|
|
|
1566
1578
|
background-color: var(--_card-background-color);
|
|
1567
1579
|
border-radius: var(--_card-border-radius);
|
|
1568
1580
|
box-shadow: var(--_card-shadow);
|
|
1569
|
-
transition: border-color var(--transition-duration-
|
|
1581
|
+
transition: border-color var(--transition-duration-quick-2) var(--ease-2);
|
|
1570
1582
|
display: inline-block;
|
|
1571
1583
|
overflow: hidden;
|
|
1572
1584
|
}
|
|
@@ -1625,13 +1637,13 @@
|
|
|
1625
1637
|
--_dialog-padding-inline: var(--dialog-padding-inline, var(--spacing-base));
|
|
1626
1638
|
--_dialog-layout-padding: var(--layout-padding, var(--spacing-base));
|
|
1627
1639
|
--_dialog-close-size: var(--dialog-close-size, var(--control-height-base));
|
|
1628
|
-
--_dialog-transition-duration: var(--dialog-transition-duration, var(--transition-duration-
|
|
1640
|
+
--_dialog-transition-duration: var(--dialog-transition-duration, var(--transition-duration-moderate-2));
|
|
1629
1641
|
--_dialog-max-block-size: var(--dialog-max-block-size, 90dvh);
|
|
1630
1642
|
--_dialog-max-inline-size: var(--dialog-max-inline-size, 28rem);
|
|
1631
1643
|
--_dialog-radius: 0;
|
|
1632
1644
|
z-index: var(--layer-important);
|
|
1633
|
-
animation: close-dialog var(--_dialog-transition-duration)
|
|
1634
|
-
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);
|
|
1635
1647
|
border: var(--border-width-thin) solid var(--color-border-base);
|
|
1636
1648
|
block-size: max-content;
|
|
1637
1649
|
inline-size: 100dvw;
|
|
@@ -1660,7 +1672,7 @@
|
|
|
1660
1672
|
}
|
|
1661
1673
|
|
|
1662
1674
|
:where(.nc-dialog)[open] {
|
|
1663
|
-
animation: open-dialog var(--_dialog-transition-duration)
|
|
1675
|
+
animation: open-dialog var(--_dialog-transition-duration) var(--easing-entry);
|
|
1664
1676
|
}
|
|
1665
1677
|
|
|
1666
1678
|
:where(.nc-dialog):not([open]) {
|
|
@@ -1909,8 +1921,8 @@
|
|
|
1909
1921
|
}
|
|
1910
1922
|
}
|
|
1911
1923
|
|
|
1912
|
-
@layer
|
|
1913
|
-
:where(label
|
|
1924
|
+
@layer base.inputs {
|
|
1925
|
+
:where(label, .nc-input-label) {
|
|
1914
1926
|
font-family: var(--font-family-default);
|
|
1915
1927
|
letter-spacing: var(--tracking-tight);
|
|
1916
1928
|
font-weight: var(--font-weight-active);
|
|
@@ -1921,7 +1933,7 @@
|
|
|
1921
1933
|
display: inline-flex;
|
|
1922
1934
|
}
|
|
1923
1935
|
|
|
1924
|
-
: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) {
|
|
1925
1937
|
--_input-background: var(--input-background, var(--color-surface-subtle));
|
|
1926
1938
|
--_input-background-active: var(--input-background-active, var(--color-surface-base));
|
|
1927
1939
|
--_input-color: var(--input-color, var(--color-text-base));
|
|
@@ -1935,7 +1947,7 @@
|
|
|
1935
1947
|
--_input-hover-background: var(--input-hover-background, var(--color-brand-primary-hover));
|
|
1936
1948
|
}
|
|
1937
1949
|
|
|
1938
|
-
:where(input
|
|
1950
|
+
:where(input, textarea, select, .nc-input) {
|
|
1939
1951
|
font: inherit;
|
|
1940
1952
|
letter-spacing: inherit;
|
|
1941
1953
|
word-spacing: inherit;
|
|
@@ -1951,39 +1963,51 @@
|
|
|
1951
1963
|
line-height: var(--line-height-base);
|
|
1952
1964
|
}
|
|
1953
1965
|
|
|
1954
|
-
:where(input
|
|
1966
|
+
:where(input, textarea, select, .nc-input):focus, :where(input, textarea, select, .nc-input):hover:focus {
|
|
1955
1967
|
--current-background: var(--_input-background-active);
|
|
1956
1968
|
outline: var(--_input-outline);
|
|
1957
1969
|
outline-offset: 0;
|
|
1958
1970
|
background-color: var(--_input-background-active);
|
|
1959
1971
|
}
|
|
1960
1972
|
|
|
1961
|
-
:where(input
|
|
1973
|
+
:where(input, textarea, select, .nc-input):disabled {
|
|
1962
1974
|
filter: var(--_input-disabled-filter);
|
|
1963
1975
|
cursor: not-allowed;
|
|
1964
1976
|
}
|
|
1965
1977
|
|
|
1966
|
-
:where(input
|
|
1978
|
+
:where(input, textarea, select, .nc-input):hover {
|
|
1967
1979
|
--current-background: var(--_input-hover-background);
|
|
1968
1980
|
background-color: var(--_input-hover-background);
|
|
1969
1981
|
}
|
|
1970
1982
|
|
|
1971
|
-
:where(input
|
|
1983
|
+
:where(input, textarea, select, .nc-input)[required] {
|
|
1972
1984
|
border-inline-start-width: var(--border-width-thick);
|
|
1973
1985
|
}
|
|
1974
1986
|
|
|
1975
|
-
:where(input
|
|
1987
|
+
:where(input, textarea, select, .nc-input)::placeholder {
|
|
1976
1988
|
color: var(--color-text-subtle);
|
|
1977
1989
|
}
|
|
1978
1990
|
|
|
1979
|
-
: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) {
|
|
1980
2004
|
background-image: var(--triangle-down-url);
|
|
1981
2005
|
background-position: right .5em top 50%;
|
|
1982
2006
|
background-size: 1em .75em;
|
|
1983
2007
|
padding-inline-end: 1.75em;
|
|
1984
2008
|
}
|
|
1985
2009
|
|
|
1986
|
-
:where(textarea
|
|
2010
|
+
:where(textarea, .nc-textarea) {
|
|
1987
2011
|
min-block-size: calc(8lh + 2 * var(--_input-padding-block));
|
|
1988
2012
|
max-block-size: 80svh;
|
|
1989
2013
|
min-inline-size: var(--input-inline-size, 100%);
|
|
@@ -1993,14 +2017,14 @@
|
|
|
1993
2017
|
field-sizing: content;
|
|
1994
2018
|
}
|
|
1995
2019
|
|
|
1996
|
-
:where(input[type="checkbox"]
|
|
2020
|
+
:where(input[type="checkbox"], input[type="radio"], .nc-input-checkbox, .nc-input-radio, .nc-input-switch) {
|
|
1997
2021
|
appearance: none;
|
|
1998
2022
|
border: var(--_input-border);
|
|
1999
2023
|
--current-background: var(--_input-background);
|
|
2000
2024
|
background: var(--current-background);
|
|
2001
2025
|
block-size: 1lh;
|
|
2002
2026
|
inline-size: 1lh;
|
|
2003
|
-
transition: var(--transition-duration-
|
|
2027
|
+
transition: var(--transition-duration-quick-1) background var(--ease-2);
|
|
2004
2028
|
box-shadow: var(--_input-box-shadow);
|
|
2005
2029
|
justify-content: center;
|
|
2006
2030
|
align-items: center;
|
|
@@ -2008,18 +2032,18 @@
|
|
|
2008
2032
|
display: inline-flex;
|
|
2009
2033
|
}
|
|
2010
2034
|
|
|
2011
|
-
:where(input[type="checkbox"]
|
|
2035
|
+
:where(input[type="checkbox"], .nc-input-checkbox) {
|
|
2012
2036
|
--_transition-duration: 0s;
|
|
2013
2037
|
border-radius: var(--_input-border-radius);
|
|
2014
2038
|
overflow: hidden;
|
|
2015
2039
|
}
|
|
2016
2040
|
|
|
2017
|
-
:where(input[type="checkbox"]
|
|
2041
|
+
:where(input[type="checkbox"], .nc-input-checkbox):before {
|
|
2018
2042
|
content: "";
|
|
2019
2043
|
background-color: var(--color-brand-primary-contrast);
|
|
2020
2044
|
block-size: .75lh;
|
|
2021
2045
|
inline-size: .75lh;
|
|
2022
|
-
transition: transform var(--ease-out-2) var(--transition-duration-
|
|
2046
|
+
transition: transform var(--ease-out-2) var(--transition-duration-quick-1);
|
|
2023
2047
|
font-family: var(--font-family-sans);
|
|
2024
2048
|
--font-weight: var(--font-weight-active);
|
|
2025
2049
|
color: var(--_input-background);
|
|
@@ -2031,11 +2055,11 @@
|
|
|
2031
2055
|
transform: scale(.8)translateY(2em);
|
|
2032
2056
|
}
|
|
2033
2057
|
|
|
2034
|
-
:where(input[type="checkbox"]
|
|
2058
|
+
:where(input[type="checkbox"], .nc-input-checkbox):checked {
|
|
2035
2059
|
--current-background: var(--color-brand-primary-base);
|
|
2036
2060
|
}
|
|
2037
2061
|
|
|
2038
|
-
:where(input[type="checkbox"]
|
|
2062
|
+
:where(input[type="checkbox"], .nc-input-checkbox):checked:before {
|
|
2039
2063
|
transform: scale(1)translateY(0%);
|
|
2040
2064
|
}
|
|
2041
2065
|
|
|
@@ -2050,7 +2074,7 @@
|
|
|
2050
2074
|
background-color: var(--color-brand-primary-contrast);
|
|
2051
2075
|
block-size: 50%;
|
|
2052
2076
|
inline-size: 50%;
|
|
2053
|
-
transition: transform var(--ease-out-2) var(--transition-duration-
|
|
2077
|
+
transition: transform var(--ease-out-2) var(--transition-duration-quick-1);
|
|
2054
2078
|
display: inline-flex;
|
|
2055
2079
|
transform: scale(.8)translateY(2em);
|
|
2056
2080
|
}
|
|
@@ -2066,7 +2090,7 @@
|
|
|
2066
2090
|
:where(input[type="color"], .nc-input-color) {
|
|
2067
2091
|
aspect-ratio: 1;
|
|
2068
2092
|
inline-size: auto;
|
|
2069
|
-
padding: var(--control-spacing-
|
|
2093
|
+
padding: var(--control-spacing-nearest, .125em);
|
|
2070
2094
|
}
|
|
2071
2095
|
|
|
2072
2096
|
:where(input[type="date"], .nc-input-date) {
|
|
@@ -2110,43 +2134,6 @@
|
|
|
2110
2134
|
background-color: var(--color-brand-primary-base);
|
|
2111
2135
|
border-color: var(--color-brand-primary-base);
|
|
2112
2136
|
}
|
|
2113
|
-
|
|
2114
|
-
:where(.nc-tag-select-field) {
|
|
2115
|
-
--_tag-select-checked-text-color: var(--tag-select-checked-text-color, var(--color-brand-primary-contrast));
|
|
2116
|
-
--_tag-select-checked-surface-color: var(--tag-select-checked-surface-color, var(--color-brand-primary-base));
|
|
2117
|
-
--_tag-select-border-radius: var(--tag-select-border-radius, var(--_input-border-radius));
|
|
2118
|
-
--nc-legend-spacing: var(--control-spacing-near, .5em);
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
|
-
:where(.nc-tag-select-field):focus-within:has(:focus-visible) {
|
|
2122
|
-
outline-offset: var(--controls-spacing-near, .5em);
|
|
2123
|
-
outline: var(--_input-outline);
|
|
2124
|
-
border-radius: var(--_tag-select-border-radius);
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
:where(.nc-tag-select-field) input {
|
|
2128
|
-
opacity: 0;
|
|
2129
|
-
position: absolute;
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
:where(.nc-tag-select-field) label {
|
|
2133
|
-
display: grid;
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2136
|
-
:where(.nc-tag-select-field) label:hover, :where(.nc-tag-select-field) label:focus-within {
|
|
2137
|
-
background-color: var(--_input-hover-background);
|
|
2138
|
-
}
|
|
2139
|
-
|
|
2140
|
-
:where(.nc-tag-select-field) label:has(input:checked) {
|
|
2141
|
-
background: var(--_tag-select-checked-surface-color);
|
|
2142
|
-
color: var(--_tag-select-checked-text-color);
|
|
2143
|
-
box-shadow: var(--shadow-near);
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
:where(.nc-tag-select-field) label:has(input:disabled) {
|
|
2147
|
-
filter: var(--_input-disabled-filter);
|
|
2148
|
-
cursor: not-allowed;
|
|
2149
|
-
}
|
|
2150
2137
|
}
|
|
2151
2138
|
|
|
2152
2139
|
@layer components.input-fields {
|
|
@@ -2357,7 +2344,7 @@
|
|
|
2357
2344
|
border-radius: var(--_input-border-radius);
|
|
2358
2345
|
box-shadow: var(--shadow-near);
|
|
2359
2346
|
transition: transform, background-color;
|
|
2360
|
-
transition-duration: var(--transition-duration-
|
|
2347
|
+
transition-duration: var(--transition-duration-quick-2);
|
|
2361
2348
|
transition-timing-function: var(--ease-2);
|
|
2362
2349
|
display: block;
|
|
2363
2350
|
}
|
|
@@ -2371,6 +2358,45 @@
|
|
|
2371
2358
|
}
|
|
2372
2359
|
}
|
|
2373
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
|
+
|
|
2374
2400
|
@layer components.lists {
|
|
2375
2401
|
:where(.nc-meta-list) {
|
|
2376
2402
|
inline-size: 100%;
|
|
@@ -2437,7 +2463,7 @@
|
|
|
2437
2463
|
backdrop-filter: blur(3px);
|
|
2438
2464
|
background-color: var(--_notification-center-background);
|
|
2439
2465
|
block-size: 100%;
|
|
2440
|
-
transition: transform var(--transition-duration-
|
|
2466
|
+
transition: transform var(--transition-duration-moderate-2) var(--ease-in-out-2);
|
|
2441
2467
|
transform: translate(100%);
|
|
2442
2468
|
}
|
|
2443
2469
|
|
|
@@ -2480,7 +2506,7 @@
|
|
|
2480
2506
|
border-radius: var(--border-radius-small);
|
|
2481
2507
|
inline-size: 100%;
|
|
2482
2508
|
box-shadow: var(--shadow-far);
|
|
2483
|
-
animation: pop-in var(--transition-duration-
|
|
2509
|
+
animation: pop-in var(--transition-duration-moderate-2) var(--easing-entry);
|
|
2484
2510
|
color: var(--color-text-base);
|
|
2485
2511
|
pointer-events: all;
|
|
2486
2512
|
flex-direction: column;
|
|
@@ -2520,7 +2546,7 @@
|
|
|
2520
2546
|
}
|
|
2521
2547
|
|
|
2522
2548
|
:where(.nc-notification.-closing) {
|
|
2523
|
-
animation: remove-notification var(--transition-duration-
|
|
2549
|
+
animation: remove-notification var(--transition-duration-moderate-2) var(--easing-exit) forwards;
|
|
2524
2550
|
}
|
|
2525
2551
|
|
|
2526
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.
|
|
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",
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
<svg class="nc-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor"
|
|
1
|
+
<svg class="nc-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor">
|
|
2
|
+
<path d="M 18.71875 6.78125 L 17.28125 8.21875 L 24.0625 15 L 4 15 L 4 17 L 24.0625 17 L 17.28125 23.78125 L 18.71875 25.21875 L 27.21875 16.71875 L 27.90625 16 L 27.21875 15.28125 Z" />
|
|
3
|
+
</svg>
|