@trebired/frontend 21.3.0 → 21.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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 21.4.0
4
+
5
+ - Popovers and dropdown menus take the adaptive colour for their text, their muted text and their rules, so they suit wherever they open rather than wherever they were configured. The dropdown was reaching past the frontend for a site's own `--text-color-muted` and `--border-surface-1`, which are fixed at the root, so a menu opening over a dark surface kept the colours chosen for a light page.
6
+
3
7
  ## 21.3.0
4
8
 
5
9
  - A popover takes the colours of wherever it opens. Its panel came with a background of `transparent`, a border of `currentColor` and a colour of `currentColor` written into the defaults, which are fixed at the root: a panel could not read its surroundings, and a site that did not override all three got a see-through menu. The defaults are gone, so the panel falls back to the surface colour, the text colour and the border colour as read where the panel actually is.
@@ -3,8 +3,8 @@
3
3
 
4
4
  #{ns.class("options")}#{ns.data("dropdown-portaled", "true")} {
5
5
  position: fixed;
6
- background: var(#{ns.css-var("ui-dropdown-menu-bg")}, var(--background-surface-1, transparent));
7
- border: var(--border-width) solid var(--border-surface-1);
6
+ background: var(#{ns.css-var("ui-dropdown-menu-bg")}, var(#{ns.css-var("surface")}, #fff));
7
+ border: var(--border-width) solid var(#{ns.css-var("adaptive-border")}, currentColor);
8
8
  border-radius: var(--radius-lg);
9
9
  margin: 0;
10
10
  padding: 0;
@@ -46,7 +46,7 @@
46
46
 
47
47
  #{ns.class("options")}#{ns.data("dropdown-portaled", "true")} #{ns.class("dropdown-top")} {
48
48
  padding: 10px;
49
- border-bottom: var(--border-width) solid var(--border-surface-1);
49
+ border-bottom: var(--border-width) solid var(#{ns.css-var("adaptive-border")}, currentColor);
50
50
  }
51
51
 
52
52
  #{ns.class("options")}#{ns.data("dropdown-portaled", "true")} #{ns.class("dropdown-top")} #{ns.class("input")} {
@@ -130,7 +130,7 @@ li#{ns.data("dropdown-selected", "true")} {
130
130
  #{ns.class("dropdown-list")}
131
131
 
132
132
  li#{ns.data("dropdown-placeholder-option")} {
133
- color: var(--text-color-muted);
133
+ color: var(#{ns.css-var("adaptive-muted")}, currentColor);
134
134
  cursor: default;
135
135
  }
136
136
 
@@ -139,14 +139,14 @@ li#{ns.data("dropdown-placeholder-option")} {
139
139
  #{ns.class("dropdown-list")}
140
140
 
141
141
  li#{ns.data("dropdown-unselect", "true")} {
142
- color: var(--text-color-muted);
142
+ color: var(#{ns.css-var("adaptive-muted")}, currentColor);
143
143
  }
144
144
 
145
145
  #{ns.class("options")}#{ns.data("dropdown-portaled", "true")} #{ns.class("dropdown-list")} li#{ns.class("dropdown-section")} {
146
146
  height: auto;
147
147
  min-height: 0;
148
148
  padding: 9px 10px 5px;
149
- color: var(--text-color-muted);
149
+ color: var(#{ns.css-var("adaptive-muted")}, currentColor);
150
150
  cursor: default;
151
151
  font-size: 11px;
152
152
  font-weight: 700;
@@ -9,9 +9,12 @@
9
9
  min-width: var(#{ns.css-var("overlay-popover-panel-min-w")}, 220px);
10
10
  max-width: min(320px, calc(100vw - 24px));
11
11
  padding: var(#{ns.css-var("overlay-popover-panel-padding")}, 8px);
12
- border: var(#{ns.css-var("overlay-popover-panel-border")}, var(#{ns.css-var("border-width")}, 1px) solid var(#{ns.css-var("border")}, #000));
12
+ border: var(
13
+ #{ns.css-var("overlay-popover-panel-border")},
14
+ var(#{ns.css-var("border-width")}, 1px) solid var(#{ns.css-var("adaptive-border")}, currentColor)
15
+ );
13
16
  border-radius: var(#{ns.css-var("overlay-popover-panel-radius")}, var(#{ns.css-var("radius")}, 0));
14
- color: var(#{ns.css-var("overlay-popover-panel-color")}, var(#{ns.css-var("text")}, #000));
17
+ color: var(#{ns.css-var("overlay-popover-panel-color")}, var(#{ns.css-var("adaptive")}, currentColor));
15
18
  background: var(#{ns.css-var("overlay-popover-panel-bg")}, var(#{ns.css-var("surface")}, #fff));
16
19
  box-shadow: var(#{ns.css-var("overlay-popover-panel-shadow")}, var(#{ns.css-var("shadow")}, 0 0 0 1px #000));
17
20
  visibility: hidden;
@@ -54,7 +57,7 @@
54
57
  overflow: hidden;
55
58
  border: var(#{ns.css-var("overlay-popover-item-root-border")}, 0);
56
59
  border-radius: var(#{ns.css-var("overlay-popover-item-root-radius")}, var(#{ns.css-var("radius-sm")}, var(#{ns.css-var("radius")}, 0)));
57
- color: var(#{ns.css-var("overlay-popover-item-root-color")}, var(#{ns.css-var("text-muted")}, #666));
60
+ color: var(#{ns.css-var("overlay-popover-item-root-color")}, var(#{ns.css-var("adaptive-muted")}, currentColor));
58
61
  background: var(#{ns.css-var("overlay-popover-item-root-bg")}, transparent);
59
62
  cursor: pointer;
60
63
  font: inherit;
@@ -84,7 +87,7 @@
84
87
  #{ns.data("popover")} > :where(a, button):hover,
85
88
 
86
89
  #{ns.data("popover")} > :where(a, button):focus {
87
- color: var(#{ns.css-var("overlay-popover-item-state-hover-color")}, var(#{ns.css-var("text")}, #000));
90
+ color: var(#{ns.css-var("overlay-popover-item-state-hover-color")}, var(#{ns.css-var("adaptive")}, currentColor));
88
91
  background: var(#{ns.css-var("overlay-popover-item-state-hover-bg")}, var(#{ns.css-var("surface-muted")}, #f4f4f4));
89
92
  }
90
93
 
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  }
9
9
  },
10
10
  "name": "@trebired/frontend",
11
- "version": "21.3.0",
11
+ "version": "21.4.0",
12
12
  "description": "Generic browser runtime systems for Trebired frontend packages and applications.",
13
13
  "type": "module",
14
14
  "private": false,