@bi-digital/css 0.10.0 → 0.11.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.
@@ -112,7 +112,7 @@
112
112
  }
113
113
  }
114
114
 
115
- .bi-dialog > button[command="close"]:first-child, .bi-dialog > form[method="dialog"]:first-child > button:only-child {
115
+ .bi-dialog > button[command="close"]:first-child {
116
116
  top: var(--bic-dialog-icon-spacing);
117
117
  right: var(--bic-dialog-icon-spacing);
118
118
  position: absolute;
@@ -127,7 +127,7 @@
127
127
  display: flex;
128
128
  }
129
129
 
130
- .bi-dialog:has( > form[method="dialog"], > button[command="close"]:first-child) .bi-dialog--header {
130
+ .bi-dialog:has( > button[command="close"]:first-child) .bi-dialog--header {
131
131
  padding-right: var(--bi-scale-14x);
132
132
  }
133
133
 
@@ -1341,7 +1341,7 @@ details.bi-details > *:not(summary) + * {
1341
1341
  }
1342
1342
  }
1343
1343
 
1344
- .bi-dialog > button[command="close"]:first-child, .bi-dialog > form[method="dialog"]:first-child > button:only-child {
1344
+ .bi-dialog > button[command="close"]:first-child {
1345
1345
  top: var(--bic-dialog-icon-spacing);
1346
1346
  right: var(--bic-dialog-icon-spacing);
1347
1347
  position: absolute;
@@ -1356,7 +1356,7 @@ details.bi-details > *:not(summary) + * {
1356
1356
  display: flex;
1357
1357
  }
1358
1358
 
1359
- .bi-dialog:has( > form[method="dialog"], > button[command="close"]:first-child) .bi-dialog--header {
1359
+ .bi-dialog:has( > button[command="close"]:first-child) .bi-dialog--header {
1360
1360
  padding-right: var(--bi-scale-14x);
1361
1361
  }
1362
1362
 
@@ -1411,95 +1411,6 @@ body:has(.bi-dialog:modal) {
1411
1411
  }
1412
1412
  }
1413
1413
 
1414
- .bi-dialog.bi-drawer {
1415
- --bic-dialog-max-height: unset;
1416
- --bic-drawer-closed-translate-x: 0;
1417
- --bic-drawer-closed-translate-y: 0;
1418
- --bic-drawer-min-width: 23.5rem;
1419
- --bic-drawer-max-width: 40rem;
1420
- --bic-drawer-min-height: 20rem;
1421
- --bic-drawer-border-radius: var(--bi-radius-medium);
1422
- transition: display var(--bic-dialog-animation-duration) allow-discrete,
1423
- overlay var(--bic-dialog-animation-duration) allow-discrete;
1424
- transform: translate(var(--bic-drawer-closed-translate-x), var(--bic-drawer-closed-translate-y));
1425
- animation: bi-drawer-slide-out-animation var(--bic-dialog-animation-duration) ease-in-out forwards;
1426
- }
1427
-
1428
- .bi-dialog.bi-drawer[open] {
1429
- animation: bi-drawer-slide-in-animation var(--bic-dialog-animation-duration) ease-in-out forwards;
1430
- transform: translate(0);
1431
- }
1432
-
1433
- @media (prefers-reduced-motion: reduce) {
1434
- .bi-dialog.bi-drawer {
1435
- transition: none;
1436
- }
1437
-
1438
- .bi-dialog.bi-drawer[open] {
1439
- animation: none;
1440
- }
1441
- }
1442
-
1443
- .bi-dialog.bi-drawer[data-anchor="left"] {
1444
- --bic-drawer-closed-translate-x: -100%;
1445
- right: unset;
1446
- border-radius: 0 var(--bic-drawer-border-radius) var(--bic-drawer-border-radius) 0;
1447
- }
1448
-
1449
- .bi-dialog.bi-drawer[data-anchor="right"] {
1450
- --bic-drawer-closed-translate-x: 100%;
1451
- left: unset;
1452
- border-radius: var(--bic-drawer-border-radius) 0 0 var(--bic-drawer-border-radius);
1453
- }
1454
-
1455
- .bi-dialog.bi-drawer[data-anchor="top"] {
1456
- --bic-drawer-closed-translate-y: -100%;
1457
- bottom: unset;
1458
- border-radius: 0 0 var(--bic-drawer-border-radius) var(--bic-drawer-border-radius);
1459
- }
1460
-
1461
- .bi-dialog.bi-drawer[data-anchor="bottom"] {
1462
- --bic-drawer-closed-translate-y: 100%;
1463
- top: unset;
1464
- border-radius: var(--bic-drawer-border-radius) var(--bic-drawer-border-radius) 0 0;
1465
- }
1466
-
1467
- .bi-dialog.bi-drawer[data-anchor="left"], .bi-dialog.bi-drawer[data-anchor="right"] {
1468
- min-width: var(--bic-drawer-min-width);
1469
- max-width: var(--bic-drawer-max-width);
1470
- width: fit-content;
1471
- height: 100dvh;
1472
- }
1473
-
1474
- .bi-dialog.bi-drawer[data-anchor="top"], .bi-dialog.bi-drawer[data-anchor="bottom"] {
1475
- min-height: var(--bic-drawer-min-height);
1476
- max-height: calc(100dvh - var(--bi-layout-navbar-height));
1477
- width: 100%;
1478
- max-width: 100dvw;
1479
- }
1480
-
1481
- @keyframes bi-drawer-slide-in-animation {
1482
- from {
1483
- transform: translate(var(--bic-drawer-closed-translate-x), var(--bic-drawer-closed-translate-y));
1484
- }
1485
-
1486
- to {
1487
- transform: translate(0);
1488
- }
1489
- }
1490
-
1491
- @keyframes bi-drawer-slide-out-animation {
1492
- from {
1493
- opacity: 1;
1494
- transform: translate(0);
1495
- }
1496
-
1497
- to {
1498
- transform: translate(var(--bic-drawer-closed-translate-x), var(--bic-drawer-closed-translate-y));
1499
- opacity: 0;
1500
- }
1501
- }
1502
-
1503
1414
  .bi-popover {
1504
1415
  --bic-popover-arrow-size: var(--bi-scale-3x);
1505
1416
  --bic-popover-background: var(--bi-basic-white);
@@ -1567,7 +1567,7 @@ details.bi-details > *:not(summary) + * {
1567
1567
  }
1568
1568
  }
1569
1569
 
1570
- .bi-dialog > button[command="close"]:first-child, .bi-dialog > form[method="dialog"]:first-child > button:only-child {
1570
+ .bi-dialog > button[command="close"]:first-child {
1571
1571
  top: var(--bic-dialog-icon-spacing);
1572
1572
  right: var(--bic-dialog-icon-spacing);
1573
1573
  position: absolute;
@@ -1582,7 +1582,7 @@ details.bi-details > *:not(summary) + * {
1582
1582
  display: flex;
1583
1583
  }
1584
1584
 
1585
- .bi-dialog:has( > form[method="dialog"], > button[command="close"]:first-child) .bi-dialog--header {
1585
+ .bi-dialog:has( > button[command="close"]:first-child) .bi-dialog--header {
1586
1586
  padding-right: var(--bi-scale-14x);
1587
1587
  }
1588
1588
 
@@ -1637,95 +1637,6 @@ body:has(.bi-dialog:modal) {
1637
1637
  }
1638
1638
  }
1639
1639
 
1640
- .bi-dialog.bi-drawer {
1641
- --bic-dialog-max-height: unset;
1642
- --bic-drawer-closed-translate-x: 0;
1643
- --bic-drawer-closed-translate-y: 0;
1644
- --bic-drawer-min-width: 23.5rem;
1645
- --bic-drawer-max-width: 40rem;
1646
- --bic-drawer-min-height: 20rem;
1647
- --bic-drawer-border-radius: var(--bi-radius-medium);
1648
- transition: display var(--bic-dialog-animation-duration) allow-discrete,
1649
- overlay var(--bic-dialog-animation-duration) allow-discrete;
1650
- transform: translate(var(--bic-drawer-closed-translate-x), var(--bic-drawer-closed-translate-y));
1651
- animation: bi-drawer-slide-out-animation var(--bic-dialog-animation-duration) ease-in-out forwards;
1652
- }
1653
-
1654
- .bi-dialog.bi-drawer[open] {
1655
- animation: bi-drawer-slide-in-animation var(--bic-dialog-animation-duration) ease-in-out forwards;
1656
- transform: translate(0);
1657
- }
1658
-
1659
- @media (prefers-reduced-motion: reduce) {
1660
- .bi-dialog.bi-drawer {
1661
- transition: none;
1662
- }
1663
-
1664
- .bi-dialog.bi-drawer[open] {
1665
- animation: none;
1666
- }
1667
- }
1668
-
1669
- .bi-dialog.bi-drawer[data-anchor="left"] {
1670
- --bic-drawer-closed-translate-x: -100%;
1671
- right: unset;
1672
- border-radius: 0 var(--bic-drawer-border-radius) var(--bic-drawer-border-radius) 0;
1673
- }
1674
-
1675
- .bi-dialog.bi-drawer[data-anchor="right"] {
1676
- --bic-drawer-closed-translate-x: 100%;
1677
- left: unset;
1678
- border-radius: var(--bic-drawer-border-radius) 0 0 var(--bic-drawer-border-radius);
1679
- }
1680
-
1681
- .bi-dialog.bi-drawer[data-anchor="top"] {
1682
- --bic-drawer-closed-translate-y: -100%;
1683
- bottom: unset;
1684
- border-radius: 0 0 var(--bic-drawer-border-radius) var(--bic-drawer-border-radius);
1685
- }
1686
-
1687
- .bi-dialog.bi-drawer[data-anchor="bottom"] {
1688
- --bic-drawer-closed-translate-y: 100%;
1689
- top: unset;
1690
- border-radius: var(--bic-drawer-border-radius) var(--bic-drawer-border-radius) 0 0;
1691
- }
1692
-
1693
- .bi-dialog.bi-drawer[data-anchor="left"], .bi-dialog.bi-drawer[data-anchor="right"] {
1694
- min-width: var(--bic-drawer-min-width);
1695
- max-width: var(--bic-drawer-max-width);
1696
- width: fit-content;
1697
- height: 100dvh;
1698
- }
1699
-
1700
- .bi-dialog.bi-drawer[data-anchor="top"], .bi-dialog.bi-drawer[data-anchor="bottom"] {
1701
- min-height: var(--bic-drawer-min-height);
1702
- max-height: calc(100dvh - var(--bi-layout-navbar-height));
1703
- width: 100%;
1704
- max-width: 100dvw;
1705
- }
1706
-
1707
- @keyframes bi-drawer-slide-in-animation {
1708
- from {
1709
- transform: translate(var(--bic-drawer-closed-translate-x), var(--bic-drawer-closed-translate-y));
1710
- }
1711
-
1712
- to {
1713
- transform: translate(0);
1714
- }
1715
- }
1716
-
1717
- @keyframes bi-drawer-slide-out-animation {
1718
- from {
1719
- opacity: 1;
1720
- transform: translate(0);
1721
- }
1722
-
1723
- to {
1724
- transform: translate(var(--bic-drawer-closed-translate-x), var(--bic-drawer-closed-translate-y));
1725
- opacity: 0;
1726
- }
1727
- }
1728
-
1729
1640
  .bi-popover {
1730
1641
  --bic-popover-arrow-size: var(--bi-scale-3x);
1731
1642
  --bic-popover-background: var(--bi-basic-white);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bi-digital/css",
3
3
  "type": "module",
4
- "version": "0.10.0",
4
+ "version": "0.11.0",
5
5
  "description": "CSS for the BI Design System",
6
6
  "author": "BI Digital",
7
7
  "homepage": "https://designsystem.bi.no/",
@@ -28,14 +28,12 @@
28
28
  ],
29
29
  "devDependencies": {
30
30
  "browserslist": "^4.28.1",
31
- "glob": "^13.0.6",
32
31
  "lightningcss": "^1.32.0",
33
32
  "modern-normalize": "^3.0.1",
34
- "rimraf": "^6.1.2",
35
- "@bi-digital/tokens": "0.10.0"
33
+ "@bi-digital/tokens": "0.11.0"
36
34
  },
37
35
  "scripts": {
38
- "build": "rimraf dist && node config.js",
39
- "dev": "rimraf dist && node --watch-path=./src config.js"
36
+ "build": "node config.js",
37
+ "dev": "node --watch-path=./src config.js"
40
38
  }
41
39
  }
@@ -1,88 +0,0 @@
1
- .bi-dialog.bi-drawer {
2
- --bic-dialog-max-height: unset;
3
- --bic-drawer-closed-translate-x: 0;
4
- --bic-drawer-closed-translate-y: 0;
5
- --bic-drawer-min-width: 23.5rem;
6
- --bic-drawer-max-width: 40rem;
7
- --bic-drawer-min-height: 20rem;
8
- --bic-drawer-border-radius: var(--bi-radius-medium);
9
- transition: display var(--bic-dialog-animation-duration) allow-discrete,
10
- overlay var(--bic-dialog-animation-duration) allow-discrete;
11
- transform: translate(var(--bic-drawer-closed-translate-x), var(--bic-drawer-closed-translate-y));
12
- animation: bi-drawer-slide-out-animation var(--bic-dialog-animation-duration) ease-in-out forwards;
13
- }
14
-
15
- .bi-dialog.bi-drawer[open] {
16
- animation: bi-drawer-slide-in-animation var(--bic-dialog-animation-duration) ease-in-out forwards;
17
- transform: translate(0);
18
- }
19
-
20
- @media (prefers-reduced-motion: reduce) {
21
- .bi-dialog.bi-drawer {
22
- transition: none;
23
- }
24
-
25
- .bi-dialog.bi-drawer[open] {
26
- animation: none;
27
- }
28
- }
29
-
30
- .bi-dialog.bi-drawer[data-anchor="left"] {
31
- --bic-drawer-closed-translate-x: -100%;
32
- right: unset;
33
- border-radius: 0 var(--bic-drawer-border-radius) var(--bic-drawer-border-radius) 0;
34
- }
35
-
36
- .bi-dialog.bi-drawer[data-anchor="right"] {
37
- --bic-drawer-closed-translate-x: 100%;
38
- left: unset;
39
- border-radius: var(--bic-drawer-border-radius) 0 0 var(--bic-drawer-border-radius);
40
- }
41
-
42
- .bi-dialog.bi-drawer[data-anchor="top"] {
43
- --bic-drawer-closed-translate-y: -100%;
44
- bottom: unset;
45
- border-radius: 0 0 var(--bic-drawer-border-radius) var(--bic-drawer-border-radius);
46
- }
47
-
48
- .bi-dialog.bi-drawer[data-anchor="bottom"] {
49
- --bic-drawer-closed-translate-y: 100%;
50
- top: unset;
51
- border-radius: var(--bic-drawer-border-radius) var(--bic-drawer-border-radius) 0 0;
52
- }
53
-
54
- .bi-dialog.bi-drawer[data-anchor="left"], .bi-dialog.bi-drawer[data-anchor="right"] {
55
- min-width: var(--bic-drawer-min-width);
56
- max-width: var(--bic-drawer-max-width);
57
- width: fit-content;
58
- height: 100dvh;
59
- }
60
-
61
- .bi-dialog.bi-drawer[data-anchor="top"], .bi-dialog.bi-drawer[data-anchor="bottom"] {
62
- min-height: var(--bic-drawer-min-height);
63
- max-height: calc(100dvh - var(--bi-layout-navbar-height));
64
- width: 100%;
65
- max-width: 100dvw;
66
- }
67
-
68
- @keyframes bi-drawer-slide-in-animation {
69
- from {
70
- transform: translate(var(--bic-drawer-closed-translate-x), var(--bic-drawer-closed-translate-y));
71
- }
72
-
73
- to {
74
- transform: translate(0);
75
- }
76
- }
77
-
78
- @keyframes bi-drawer-slide-out-animation {
79
- from {
80
- opacity: 1;
81
- transform: translate(0);
82
- }
83
-
84
- to {
85
- transform: translate(var(--bic-drawer-closed-translate-x), var(--bic-drawer-closed-translate-y));
86
- opacity: 0;
87
- }
88
- }