@inglorious/ui 7.2.4 → 7.3.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/ui",
3
- "version": "7.2.4",
3
+ "version": "7.3.1",
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 {
@@ -1,6 +1,6 @@
1
1
  .iw-drawer {
2
2
  width: 16rem;
3
- background: var(--iw-color-surface);
3
+ background: var(--iw-drawer-bg, var(--iw-color-surface));
4
4
  color: var(--iw-color-text);
5
5
  transition:
6
6
  margin var(--iw-transition-fast),
@@ -65,6 +65,28 @@
65
65
  opacity: 0;
66
66
  }
67
67
 
68
+ /* The header keeps only what fits the rail, such as a brand mark, so
69
+ it centres it. */
70
+ .iw-drawer-header {
71
+ justify-content: center;
72
+ }
73
+
74
+ /* Only the icon is left, centred in the rail. The label also has to
75
+ leave the row: faded out, it still took its width and pushed the
76
+ icon off centre, as did the icon's side margin. */
77
+ .iw-list-item > .iw-flex {
78
+ justify-content: center;
79
+ }
80
+
81
+ .iw-list-item-icon {
82
+ margin-inline: 0;
83
+ }
84
+
85
+ .iw-list-item-content,
86
+ .iw-list-item-trailing {
87
+ display: none;
88
+ }
89
+
68
90
  .iw-drawer-toggler > span {
69
91
  transform: rotate(180deg);
70
92
  }
@@ -67,6 +67,12 @@
67
67
  --iw-input-radius: var(--iw-radius-md);
68
68
  --iw-input-shadow-focus: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
69
69
 
70
+ /* App bar */
71
+ --iw-app-bar-bg: var(--iw-color-surface);
72
+
73
+ /* Drawer */
74
+ --iw-drawer-bg: var(--iw-color-surface);
75
+
70
76
  /* Card */
71
77
  --iw-card-bg: var(--iw-color-surface);
72
78
  --iw-card-border: var(--iw-color-border);
@@ -78,11 +84,11 @@
78
84
  --iw-badge-radius: var(--iw-radius-md);
79
85
 
80
86
  /* List */
81
- --iw-list-item: var(--iw-color-white);
87
+ --iw-list-item: transparent;
82
88
  --iw-list-item-selected: color-mix(
83
89
  in srgb,
84
90
  var(--iw-color-primary) 8%,
85
- var(--iw-color-white)
91
+ transparent
86
92
  );
87
93
 
88
94
  /* Alert */
@@ -126,11 +132,11 @@
126
132
  --iw-button-ghost-bg-hover: #343a40;
127
133
  --iw-button-ghost-text: var(--iw-color-text);
128
134
 
129
- --iw-list-item: #2c3036;
135
+ --iw-list-item: transparent;
130
136
  --iw-list-item-active: #343a40;
131
137
  --iw-list-item-selected: color-mix(
132
138
  in srgb,
133
139
  var(--iw-color-primary) 12%,
134
- #2c3036
140
+ transparent
135
141
  );
136
142
  }
@@ -81,6 +81,12 @@
81
81
  --iw-input-shadow-focus:
82
82
  0 0 0 1px var(--iw-color-primary), 0 0 10px rgba(0, 255, 136, 0.3);
83
83
 
84
+ /* App bar */
85
+ --iw-app-bar-bg: var(--iw-color-surface);
86
+
87
+ /* Drawer */
88
+ --iw-drawer-bg: var(--iw-color-surface);
89
+
84
90
  /* Card */
85
91
  --iw-card-bg: var(--iw-color-surface);
86
92
  --iw-card-border: var(--iw-color-border);
@@ -92,11 +98,11 @@
92
98
  --iw-badge-radius: var(--iw-radius-none);
93
99
 
94
100
  /* List */
95
- --iw-list-item: var(--iw-color-gray-800);
101
+ --iw-list-item: transparent;
96
102
  --iw-list-item-selected: color-mix(
97
103
  in srgb,
98
104
  var(--iw-color-primary) 8%,
99
- var(--iw-color-gray-800)
105
+ transparent
100
106
  );
101
107
 
102
108
  /* Alert */
@@ -126,12 +132,12 @@
126
132
  --iw-button-shadow-hover: 0 0 10px var(--iw-color-primary);
127
133
  --iw-card-shadow-hover: var(--iw-shadow-xl), 0 0 15px rgba(0, 255, 136, 0.2);
128
134
 
129
- --iw-list-item: var(--iw-color-white);
135
+ --iw-list-item: transparent;
130
136
  --iw-list-item-active: var(--iw-color-gray-100);
131
137
  --iw-list-item-selected: color-mix(
132
138
  in srgb,
133
139
  var(--iw-color-primary) 8%,
134
- var(--iw-color-white)
140
+ transparent
135
141
  );
136
142
  }
137
143
 
@@ -69,6 +69,12 @@
69
69
  --iw-input-radius: var(--iw-radius-xs);
70
70
  --iw-input-shadow-focus: none;
71
71
 
72
+ /* App bar */
73
+ --iw-app-bar-bg: var(--iw-color-surface);
74
+
75
+ /* Drawer */
76
+ --iw-drawer-bg: var(--iw-color-surface);
77
+
72
78
  /* Card */
73
79
  --iw-card-bg: var(--iw-color-surface);
74
80
  --iw-card-border: transparent;
@@ -82,11 +88,11 @@
82
88
  --iw-badge-radius: var(--iw-radius-sm);
83
89
 
84
90
  /* List */
85
- --iw-list-item: var(--iw-color-white);
91
+ --iw-list-item: transparent;
86
92
  --iw-list-item-selected: color-mix(
87
93
  in srgb,
88
94
  var(--iw-color-primary) 8%,
89
- var(--iw-color-white)
95
+ transparent
90
96
  );
91
97
 
92
98
  /* Alert */
@@ -132,11 +138,11 @@
132
138
  --iw-card-shadow:
133
139
  0 1px 2px 0 rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
134
140
 
135
- --iw-list-item: #1e1e1e;
141
+ --iw-list-item: transparent;
136
142
  --iw-list-item-active: #2d2d2d;
137
143
  --iw-list-item-selected: color-mix(
138
144
  in srgb,
139
145
  var(--iw-color-primary) 12%,
140
- #1e1e1e
146
+ transparent
141
147
  );
142
148
  }
@@ -3,7 +3,7 @@
3
3
  align-items: center;
4
4
  min-height: var(--iw-space-16);
5
5
  /* gap: var(--iw-space-3); */
6
- background: var(--iw-color-surface);
6
+ background: var(--iw-app-bar-bg, var(--iw-color-surface));
7
7
  color: var(--iw-color-text);
8
8
  border-bottom: 1px solid var(--iw-color-border);
9
9
  }
@@ -51,7 +51,7 @@
51
51
  }
52
52
 
53
53
  .iw-app-bar-color-default {
54
- background: var(--iw-color-surface);
54
+ background: var(--iw-app-bar-bg, var(--iw-color-surface));
55
55
  color: var(--iw-color-text);
56
56
  }
57
57