@inglorious/ui 7.3.0 → 7.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/ui",
3
- "version": "7.3.0",
3
+ "version": "7.4.0",
4
4
  "description": "A design system for Inglorious Web with render-function components and customizable themes",
5
5
  "author": "Matteo Antony Mistretta <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
6
6
  "license": "MIT",
@@ -1,3 +1,7 @@
1
+ /* The size is a floor, not a fixed box. A font glyph takes the size's
2
+ font-size and fits it exactly; content that sizes itself (a Material icon
3
+ at lg, an SVG with its own width, a button) grows the box instead of
4
+ overflowing it or being squeezed into it. */
1
5
  .iw-icon {
2
6
  display: inline-flex;
3
7
  align-items: center;
@@ -5,20 +9,20 @@
5
9
  cursor: pointer;
6
10
 
7
11
  &.iw-icon-sm {
8
- width: var(--iw-space-3);
9
- height: var(--iw-space-3);
12
+ min-width: var(--iw-space-3);
13
+ min-height: var(--iw-space-3);
10
14
  font-size: var(--iw-font-size-sm);
11
15
  }
12
16
 
13
17
  &.iw-icon-md {
14
- width: var(--iw-space-4);
15
- height: var(--iw-space-4);
18
+ min-width: var(--iw-space-4);
19
+ min-height: var(--iw-space-4);
16
20
  font-size: var(--iw-font-size-base);
17
21
  }
18
22
 
19
23
  &.iw-icon-lg {
20
- width: var(--iw-space-6);
21
- height: var(--iw-space-6);
24
+ min-width: var(--iw-space-6);
25
+ min-height: var(--iw-space-6);
22
26
  font-size: var(--iw-font-size-2xl);
23
27
  }
24
28
  }
@@ -42,12 +42,21 @@
42
42
  color 0.15s ease;
43
43
  }
44
44
 
45
+ /* The leading icon is an Icon of size lg, which fixes its own width and
46
+ height. Its spacing therefore goes outside it, as margin: padding on the
47
+ same element fought that fixed size, and under border-box it ate the box,
48
+ leaving 32px of padding around a glyph that overflowed. */
45
49
  .iw-list-item-icon {
46
- padding: var(--iw-space-4);
50
+ margin: var(--iw-list-icon-spacing, var(--iw-space-4));
47
51
  }
48
52
 
53
+ /* An item without an icon lines its text up with the items that have one:
54
+ the icon, the margin either side of it, and the row gap. */
49
55
  .iw-list-item-inset .iw-list-item-content {
50
- margin-left: calc(var(--iw-space-3) + var(--iw-list-icon-size, 1.25rem));
56
+ margin-left: calc(
57
+ var(--iw-list-icon-size, var(--iw-space-6)) + 2 *
58
+ var(--iw-list-icon-spacing, var(--iw-space-4)) + var(--iw-space-2)
59
+ );
51
60
  }
52
61
 
53
62
  .iw-list-title {
@@ -40,7 +40,6 @@ export const AppDrawer = {
40
40
  title: Flex.render({
41
41
  align: "center",
42
42
  gap: "sm",
43
- padding: "md",
44
43
  className: "iw-dashboard-brand",
45
44
  children: [
46
45
  Avatar.render({ src: "/transparent.png", shape: "square" }),
@@ -14,7 +14,10 @@
14
14
  bottom: 0;
15
15
  z-index: var(--iw-z-modal, 1050);
16
16
 
17
+ /* As tall as an app bar, so the line under a drawer and the app bar beside
18
+ it runs straight across. */
17
19
  .iw-drawer-header {
20
+ min-height: var(--iw-space-16);
18
21
  border-bottom: 1px solid var(--iw-color-border);
19
22
  flex-shrink: 0;
20
23
 
@@ -65,6 +68,28 @@
65
68
  opacity: 0;
66
69
  }
67
70
 
71
+ /* The header keeps only what fits the rail, such as a brand mark, so
72
+ it centres it. */
73
+ .iw-drawer-header {
74
+ justify-content: center;
75
+ }
76
+
77
+ /* Only the icon is left, centred in the rail. The label also has to
78
+ leave the row: faded out, it still took its width and pushed the
79
+ icon off centre, as did the icon's side margin. */
80
+ .iw-list-item > .iw-flex {
81
+ justify-content: center;
82
+ }
83
+
84
+ .iw-list-item-icon {
85
+ margin-inline: 0;
86
+ }
87
+
88
+ .iw-list-item-content,
89
+ .iw-list-item-trailing {
90
+ display: none;
91
+ }
92
+
68
93
  .iw-drawer-toggler > span {
69
94
  transform: rotate(180deg);
70
95
  }
@@ -65,6 +65,7 @@ export function render(props) {
65
65
  align: "center",
66
66
  justify: "between",
67
67
  gap: "sm",
68
+ padding: "sm",
68
69
  className: "iw-drawer-header",
69
70
  children: [
70
71
  when(