@qtoggle/qui 1.20.0-beta.2 → 1.20.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/less/base.less CHANGED
@@ -73,6 +73,10 @@ body {
73
73
  overflow-x: hidden;
74
74
  transition: opacity @transition-duration linear;
75
75
  line-height: 1.15em;
76
+
77
+ /* A pixel-moving filter, even one that changes nothing, keeps Chrome from running background-color transitions on
78
+ * the compositor, which sometimes shows a transition's first frame again once it ends. */
79
+ filter: blur(0);
76
80
  }
77
81
 
78
82
  body.disable-transitions * {
@@ -58,40 +58,14 @@ div.qui-icon-label-view {
58
58
  background: @background-color;
59
59
  color: @interactive-color;
60
60
 
61
- /* The pressed shade is an overlay faded by opacity, which the compositor animates without repainting the row. A
62
- * background transition repaints it on every frame, and slow devices feel that as tap lag. */
63
- position: relative;
64
-
65
- &::before {
66
- content: '';
67
- position: absolute;
68
- top: 0;
69
- right: 0;
70
- bottom: 0;
71
- left: 0;
61
+ &.active {
72
62
  background: @background-active-color;
73
- opacity: 0;
74
- transition: opacity @transition-duration ease;
75
- pointer-events: none;
76
- }
77
-
78
- /* Keeps the icon and labels above the overlay */
79
- & > * {
80
- position: relative;
81
- }
82
-
83
- &.active::before {
84
- opacity: 1;
85
63
  }
86
64
 
87
65
  &.selected {
88
66
  background: @interactive-color;
89
67
  color: @background-color;
90
68
 
91
- &::before {
92
- background: @interactive-active-color;
93
- }
94
-
95
69
  & > div.labels > div.sub-label {
96
70
  color: @background-color;
97
71
  background-color: fade(@interactive-active-color, 50%);
@@ -99,6 +73,11 @@ div.qui-icon-label-view {
99
73
 
100
74
  }
101
75
 
76
+ &.active.selected {
77
+ background: @interactive-active-color;
78
+ color: @background-color;
79
+ }
80
+
102
81
  }
103
82
 
104
83
  }
package/less/icons.less CHANGED
@@ -5,6 +5,10 @@
5
5
  .qui-icon {
6
6
  display: inline-block;
7
7
  position: relative;
8
+
9
+ /* Keeps the z-indexes of the state layers and the decoration inside the icon, so they cannot rise above a sticky
10
+ * header or an overlay that the icon scrolls under */
11
+ z-index: 0;
8
12
  }
9
13
 
10
14
  .qui-icon > div.qui-icon-normal,
package/less/lists.less CHANGED
@@ -8,6 +8,14 @@ div.qui-list {
8
8
  background: @background-color;
9
9
  }
10
10
 
11
+ /* A sticky child sticks inside its nearest ancestor that clips. `clip` clips like `hidden` without making a scroll
12
+ * container, so the search box sticks to the scrolling page instead; older browsers keep `hidden` and scroll it away. */
13
+ div.qui-list.qui-structured-view,
14
+ div.qui-list > div.qui-structured-view-body {
15
+ overflow: hidden;
16
+ overflow: clip;
17
+ }
18
+
11
19
 
12
20
  /* Children */
13
21
 
@@ -55,8 +63,48 @@ div.qui-list-child.qui-list-item {
55
63
 
56
64
  /* Search */
57
65
 
66
+ div.qui-list-child.qui-list-search {
67
+ /* Stays at the top of the page while the rows scroll under it */
68
+ position: sticky;
69
+ top: 0;
70
+ z-index: 1;
71
+ background: @background-color;
72
+ border-bottom-color: @interactive-color;
73
+
74
+ /* Casts the top bar's shadow on the rows while stuck; browsers without scroll-state queries just show none */
75
+ container-type: scroll-state;
76
+ overflow: visible;
77
+
78
+ &::after {
79
+ content: '';
80
+ position: absolute;
81
+ top: 0;
82
+ right: 0;
83
+ bottom: -0.0625em; /* Below the border, like the top bar's shadow */
84
+ left: 0;
85
+ z-index: -1;
86
+ box-shadow: 0 0.3125em 0.5em -0.3125em @bar-shadow-color;
87
+ opacity: 0;
88
+ transition: opacity @transition-duration ease;
89
+ pointer-events: none;
90
+ }
91
+
92
+ /* The focused field fills with the interactive color, so a line of that color would merge with a selected row
93
+ * below it */
94
+ &:focus-within {
95
+ border-bottom-color: @border-color;
96
+ }
97
+ }
98
+
99
+ @container scroll-state(stuck: top) {
100
+ div.qui-list-child.qui-list-search::after {
101
+ opacity: 1;
102
+ }
103
+ }
104
+
58
105
  div.qui-list-child.qui-list-search > div.qui-list-search-wrapper {
59
106
  position: relative;
107
+ overflow: hidden; /* Clips the field's focus ring, now that the search box lets its shadow out */
60
108
 
61
109
  & > input[type=text] {
62
110
  width: 100%;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qtoggle/qui",
3
3
  "description": "A JavaScript UI library with batteries included.",
4
- "version": "1.20.0-beta.2",
4
+ "version": "1.20.1",
5
5
  "author": {
6
6
  "name": "Calin Crisan",
7
7
  "email": "ccrisan@gmail.com"
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "qui-server"
3
- version = "1.20.0-beta.2"
3
+ version = "1.20.1"
4
4
  description = "A fully fledged qToggle implementation written in Python"
5
5
  authors = [
6
6
  {name = "Calin Crisan", email = "ccrisan@gmail.com"},
@@ -24,14 +24,14 @@ function getQueryArgument(name, def = null) {
24
24
  if (queryArguments == null) {
25
25
  let queryString = self.location.search.substring(1)
26
26
  queryArguments = new Map(queryString.split('&').map(function (keyValuePair) {
27
- let splits = keyValuePair.split('=');
28
- let key = decodeURIComponent(splits[0]);
29
- let value = decodeURIComponent(splits[1]);
27
+ let splits = keyValuePair.split('=')
28
+ let key = decodeURIComponent(splits[0])
29
+ let value = decodeURIComponent(splits[1])
30
30
  if (value.indexOf(',') >= 0) {
31
- value = value.split(',');
31
+ value = value.split(',')
32
32
  }
33
33
 
34
- return [key, value];
34
+ return [key, value]
35
35
  }))
36
36
  }
37
37