@qtoggle/qui 1.20.0 → 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 * {
@@ -57,53 +57,15 @@ div.qui-icon-label-view {
57
57
  &.qui-base-button {
58
58
  background: @background-color;
59
59
  color: @interactive-color;
60
- transition: color @transition-duration ease,
61
- opacity @transition-duration ease;
62
-
63
- /* The selected fill and the pressed shade are overlays faded by opacity, which the compositor animates without
64
- * repainting the row. Chrome sometimes shows a background transition's first frame again once it ends. */
65
- position: relative;
66
- z-index: 0;
67
-
68
- /* Negative z-index keeps both overlays above the row's background but below its content */
69
- &::before,
70
- &::after {
71
- content: '';
72
- position: absolute;
73
- top: 0;
74
- right: 0;
75
- bottom: 0;
76
- left: 0;
77
- opacity: 0;
78
- transition: opacity @transition-duration ease;
79
- pointer-events: none;
80
- }
81
-
82
- &::before {
83
- background: @interactive-color;
84
- z-index: -2;
85
- }
86
60
 
87
- &::after {
61
+ &.active {
88
62
  background: @background-active-color;
89
- z-index: -1;
90
- }
91
-
92
- &.active::after {
93
- opacity: 1;
94
63
  }
95
64
 
96
65
  &.selected {
66
+ background: @interactive-color;
97
67
  color: @background-color;
98
68
 
99
- &::before {
100
- opacity: 1;
101
- }
102
-
103
- &::after {
104
- background: @interactive-active-color;
105
- }
106
-
107
69
  & > div.labels > div.sub-label {
108
70
  color: @background-color;
109
71
  background-color: fade(@interactive-active-color, 50%);
@@ -111,6 +73,11 @@ div.qui-icon-label-view {
111
73
 
112
74
  }
113
75
 
76
+ &.active.selected {
77
+ background: @interactive-active-color;
78
+ color: @background-color;
79
+ }
80
+
114
81
  }
115
82
 
116
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",
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"
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