@anyblades/blades 3.1.0-beta.4 → 3.1.0-beta.6

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.
Files changed (90) hide show
  1. package/.prettierrc.json +0 -7
  2. package/README.md +20 -10
  3. package/_includes/.prettierrc.json +12 -0
  4. package/_includes/package.json +10 -0
  5. package/css/blades.css +942 -1805
  6. package/css/blades.min.css +11 -1
  7. package/css/blades.ninja.css +1124 -2265
  8. package/css/blades.ninja.min.css +16 -1
  9. package/css/float-label.css +34 -187
  10. package/css/float-label.min.css +1 -1
  11. package/css/layered/blades.layered.css +942 -1805
  12. package/css/layered/blades.layered.min.css +11 -1
  13. package/css/layered/compact.css +10 -31
  14. package/css/layered/components/accordion.css +32 -21
  15. package/css/layered/components/card.css +8 -16
  16. package/css/layered/components/dropdown-popover.css +92 -0
  17. package/css/layered/components/dropdown.css +61 -61
  18. package/css/layered/components/group.css +40 -156
  19. package/css/layered/components/loading.css +28 -35
  20. package/css/layered/components/modal-modern.css +20 -0
  21. package/css/layered/components/modal.css +54 -65
  22. package/css/layered/components/nav.css +36 -36
  23. package/css/layered/components/progress.css +18 -23
  24. package/css/layered/components/timeline.css +10 -0
  25. package/css/layered/components/tooltip.css +88 -103
  26. package/css/layered/components.css +371 -517
  27. package/css/layered/content/button.css +37 -117
  28. package/css/layered/content/code-block.css +20 -0
  29. package/css/layered/content/code.css +11 -26
  30. package/css/layered/content/embedded-content.css +5 -10
  31. package/css/layered/content/figure.css +3 -5
  32. package/css/layered/content/icon.css +33 -0
  33. package/css/layered/content/link.css +18 -40
  34. package/css/layered/content/misc.css +1 -5
  35. package/css/layered/content/table.css +4 -10
  36. package/css/layered/content/typography.css +22 -41
  37. package/css/layered/content.css +102 -254
  38. package/css/layered/forms/basics.css +64 -142
  39. package/css/layered/forms/checkbox-radio-switch.css +46 -75
  40. package/css/layered/forms/float-label/core.css +31 -0
  41. package/css/layered/forms/float-label/theme.css +28 -0
  42. package/css/layered/forms/float-label.css +57 -0
  43. package/css/layered/forms/input-color.css +5 -5
  44. package/css/layered/forms/input-datetime.css +9 -26
  45. package/css/layered/forms/input-file.css +7 -8
  46. package/css/layered/forms/input-range.css +43 -50
  47. package/css/layered/forms/input-search.css +16 -47
  48. package/css/layered/forms.css +197 -355
  49. package/css/layered/layout/columns.css +10 -0
  50. package/css/layered/layout/container.css +13 -13
  51. package/css/layered/layout/document.css +4 -12
  52. package/css/layered/layout/grid.css +6 -8
  53. package/css/layered/layout/landmarks.css +1 -7
  54. package/css/layered/layout/overflow-auto.css +0 -3
  55. package/css/layered/layout/section.css +0 -3
  56. package/css/layered/layout.css +26 -39
  57. package/css/layered/utilities.css +6 -15
  58. package/css/layered/variables-blades.css +11 -0
  59. package/css/layered/variables.css +77 -181
  60. package/css/pico.conditional.css +785 -1368
  61. package/css/pico.conditional.min.css +1 -1
  62. package/css/pico.css +785 -1368
  63. package/css/pico.min.css +1 -1
  64. package/package.json +13 -26
  65. package/src/blades/_index.css +9 -9
  66. package/src/blades/{_dropdown-popover.css → components/_dropdown-popover.css} +3 -3
  67. package/src/blades/forms/float-label/_index.css +2 -0
  68. package/src/blades.css +2 -2
  69. package/src/blades.ninja.css +3 -3
  70. package/src/float-label.css +1 -1
  71. package/src/ninja/_index.css +7 -8
  72. package/src/pico/_index.css +6 -6
  73. package/src/pico/components/_index.css +9 -9
  74. package/src/pico/content/_index.css +8 -8
  75. package/src/pico/forms/_index.css +7 -7
  76. package/src/pico/layout/_index.css +5 -5
  77. package/src/pico.css +2 -2
  78. package/_includes/blades/links.liquid +0 -21
  79. package/_includes/blades/links.njk +0 -9
  80. package/_includes/blades/links.twig +0 -18
  81. package/src/blades/float-label/_index.css +0 -2
  82. package/src/ninja/_page-anchors.css +0 -10
  83. /package/src/blades/{_variables.css → _variables-blades.css} +0 -0
  84. /package/src/blades/{_modal.css → components/_modal-modern.css} +0 -0
  85. /package/src/blades/{_timeline.css → components/_timeline.css} +0 -0
  86. /package/src/blades/{_code.css → content/_code-block.css} +0 -0
  87. /package/src/blades/{_icon.css → content/_icon.css} +0 -0
  88. /package/src/blades/{float-label → forms/float-label}/_core.css +0 -0
  89. /package/src/blades/{float-label → forms/float-label}/_theme.css +0 -0
  90. /package/src/blades/{_columns.css → layout/_columns.css} +0 -0
@@ -0,0 +1,92 @@
1
+ @layer blades {
2
+ :is(ul, menu)[popover] {
3
+ border: var(--pico-border-width) solid var(--pico-dropdown-border-color);
4
+ border-radius: var(--pico-border-radius);
5
+ background-color: var(--pico-dropdown-background-color);
6
+ min-width: fit-content;
7
+ box-shadow: var(--pico-dropdown-box-shadow);
8
+ color: var(--pico-dropdown-color);
9
+ white-space: nowrap;
10
+ opacity: 0;
11
+ transition: opacity var(--pico-transition),
12
+ overlay var(--pico-transition) allow-discrete,
13
+ display var(--pico-transition) allow-discrete;
14
+ margin: auto;
15
+ padding: 0;
16
+
17
+ &:not(:popover-open) {
18
+ display: none;
19
+ }
20
+
21
+ &:popover-open {
22
+ opacity: 1;
23
+ display: block;
24
+ }
25
+
26
+ & li {
27
+ padding: calc(var(--pico-form-element-spacing-vertical) * .5)
28
+ var(--pico-form-element-spacing-horizontal);
29
+ margin-bottom: 0;
30
+ list-style: none;
31
+ display: block;
32
+
33
+ &:first-of-type {
34
+ margin-top: calc(var(--pico-form-element-spacing-vertical) * .5);
35
+ }
36
+
37
+ &:last-of-type {
38
+ margin-bottom: calc(var(--pico-form-element-spacing-vertical) * .5);
39
+ }
40
+
41
+ &:has(label):hover {
42
+ background-color: var(--pico-dropdown-hover-background-color);
43
+ }
44
+ }
45
+
46
+ & li a {
47
+ margin: calc(var(--pico-form-element-spacing-vertical) * -.5)
48
+ calc(var(--pico-form-element-spacing-horizontal) * -1);
49
+ padding: calc(var(--pico-form-element-spacing-vertical) * .5)
50
+ var(--pico-form-element-spacing-horizontal);
51
+ color: var(--pico-dropdown-color);
52
+ text-overflow: ellipsis;
53
+ border-radius: 0;
54
+ text-decoration: none;
55
+ display: block;
56
+ overflow: hidden;
57
+
58
+ &:is(:hover, :focus, :active, :focus-visible, [aria-current]:not([aria-current="false"])) {
59
+ background-color: var(--pico-dropdown-hover-background-color);
60
+ }
61
+ }
62
+
63
+ & li label {
64
+ width: 100%;
65
+ }
66
+ }
67
+
68
+ nav :is(ul, menu)[popover]:not(.does-not-exist) {
69
+ margin: auto;
70
+ }
71
+
72
+ @starting-style {
73
+ :is(ul, menu)[popover]:popover-open {
74
+ opacity: 0;
75
+ }
76
+ }
77
+
78
+ @supports (position-area: bottom) {
79
+ :is(ul, menu)[popover], nav :is(ul, menu)[popover]:not(.does-not-exist) {
80
+ margin: 0;
81
+ margin-top: var(--pico-outline-width);
82
+ position-area: bottom span-right;
83
+ position-try-fallbacks: flip-block, flip-inline;
84
+ inset: auto;
85
+
86
+ &:dir(rtl) {
87
+ position-area: bottom span-left;
88
+ }
89
+ }
90
+ }
91
+
92
+ }
@@ -1,9 +1,5 @@
1
1
  @layer blades {
2
- /**
3
- * Dropdown (details.dropdown)
4
- */
5
- :where(:scope, [data-theme="light"], [data-theme="dark"]),
6
- :host {
2
+ :where(:scope, [data-theme="light"], [data-theme="dark"]), :host {
7
3
  --pico-dropdown-background-color: light-dark(#fff, #181c25);
8
4
  --pico-dropdown-border-color: light-dark(#eff1f4, #202632);
9
5
  --pico-dropdown-box-shadow: var(--pico-box-shadow);
@@ -12,23 +8,22 @@
12
8
  }
13
9
 
14
10
  details.dropdown {
15
- position: relative;
16
11
  border-bottom: none;
12
+ position: relative;
17
13
  }
18
- details.dropdown > summary::after,
19
- details.dropdown > button::after,
20
- details.dropdown > a::after {
21
- display: block;
14
+
15
+ details.dropdown > summary:after, details.dropdown > button:after, details.dropdown > a:after {
22
16
  width: 1rem;
23
17
  height: calc(1rem * var(--pico-line-height, 1.5));
24
- margin-inline-start: 0.25rem;
25
18
  float: right;
26
- transform: rotate(0deg) translateX(0.2rem);
27
19
  background-image: var(--pico-icon-chevron);
28
- background-position: right center;
29
- background-size: 1rem auto;
30
- background-repeat: no-repeat;
31
20
  content: "";
21
+ background-position: 100%;
22
+ background-repeat: no-repeat;
23
+ background-size: 1rem;
24
+ margin-inline-start: .25rem;
25
+ display: block;
26
+ transform: rotate(0) translateX(.2rem);
32
27
  }
33
28
 
34
29
  nav details.dropdown {
@@ -36,10 +31,8 @@ nav details.dropdown {
36
31
  }
37
32
 
38
33
  details.dropdown > summary:not([role]) {
39
- height: calc(
40
- 1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 +
41
- var(--pico-border-width) * 2
42
- );
34
+ height: calc(1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 +
35
+ var(--pico-border-width) * 2);
43
36
  padding: var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal);
44
37
  border: var(--pico-border-width) solid var(--pico-form-element-border-color);
45
38
  border-radius: var(--pico-border-radius);
@@ -49,29 +42,32 @@ details.dropdown > summary:not([role]) {
49
42
  cursor: pointer;
50
43
  -webkit-user-select: none;
51
44
  -moz-user-select: none;
52
- transition:
53
- background-color var(--pico-transition),
45
+ user-select: none;
46
+ transition: background-color var(--pico-transition),
54
47
  border-color var(--pico-transition),
55
48
  color var(--pico-transition),
56
49
  box-shadow var(--pico-transition);
57
- user-select: none;
58
50
  }
59
- details.dropdown > summary:not([role]):active,
60
- details.dropdown > summary:not([role]):focus {
51
+
52
+ details.dropdown > summary:not([role]):active, details.dropdown > summary:not([role]):focus {
61
53
  border-color: var(--pico-form-element-active-border-color);
62
54
  background-color: var(--pico-form-element-active-background-color);
63
55
  }
56
+
64
57
  details.dropdown > summary:not([role]):focus {
65
58
  box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-focus-color);
66
59
  }
60
+
67
61
  details.dropdown > summary:not([role]):focus-visible {
68
62
  outline: none;
69
63
  }
64
+
70
65
  details.dropdown > summary:not([role])[aria-invalid="false"] {
71
66
  --pico-form-element-border-color: var(--pico-form-element-valid-border-color);
72
67
  --pico-form-element-active-border-color: var(--pico-form-element-valid-focus-color);
73
68
  --pico-form-element-focus-color: var(--pico-form-element-valid-focus-color);
74
69
  }
70
+
75
71
  details.dropdown > summary:not([role])[aria-invalid="true"] {
76
72
  --pico-form-element-border-color: var(--pico-form-element-invalid-border-color);
77
73
  --pico-form-element-active-border-color: var(--pico-form-element-invalid-focus-color);
@@ -79,33 +75,30 @@ details.dropdown > summary:not([role])[aria-invalid="true"] {
79
75
  }
80
76
 
81
77
  nav details.dropdown {
82
- display: inline-block;
83
78
  margin: calc(var(--pico-nav-element-spacing-vertical) * -1) 0;
79
+ display: inline-block;
84
80
  }
85
- nav details.dropdown > summary::after {
86
- transform: rotate(0deg) translateX(0rem);
81
+
82
+ nav details.dropdown > summary:after {
83
+ transform: rotate(0) translateX(0);
87
84
  }
85
+
88
86
  nav details.dropdown > summary:not([role]) {
89
87
  height: calc(1rem * var(--pico-line-height) + var(--pico-nav-link-spacing-vertical) * 2);
90
88
  padding: calc(var(--pico-nav-link-spacing-vertical) - var(--pico-border-width) * 2)
91
89
  var(--pico-nav-link-spacing-horizontal);
92
90
  }
91
+
93
92
  nav details.dropdown > summary:not([role]):focus-visible {
94
93
  box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-primary-focus);
95
94
  }
96
95
 
97
96
  details.dropdown > summary + ul {
98
- display: flex;
99
97
  z-index: 99;
100
- position: absolute;
101
- left: 0;
102
- flex-direction: column;
103
98
  width: 100%;
104
- min-width: -moz-fit-content;
105
99
  min-width: fit-content;
106
100
  margin: 0;
107
101
  margin-top: var(--pico-outline-width);
108
- padding: 0;
109
102
  border: var(--pico-border-width) solid var(--pico-dropdown-border-color);
110
103
  border-radius: var(--pico-border-radius);
111
104
  background-color: var(--pico-dropdown-background-color);
@@ -113,49 +106,57 @@ details.dropdown > summary + ul {
113
106
  color: var(--pico-dropdown-color);
114
107
  white-space: nowrap;
115
108
  opacity: 0;
116
- transition:
117
- opacity var(--pico-transition),
109
+ transition: opacity var(--pico-transition),
118
110
  transform 0s ease-in-out 1s;
111
+ flex-direction: column;
112
+ padding: 0;
113
+ display: flex;
114
+ position: absolute;
115
+ left: 0;
119
116
  }
117
+
120
118
  details.dropdown > summary + ul[dir="rtl"] {
121
- right: 0;
122
119
  left: auto;
120
+ right: 0;
123
121
  }
122
+
124
123
  details.dropdown > summary + ul li {
125
124
  width: 100%;
126
- margin-bottom: 0;
127
- padding: calc(var(--pico-form-element-spacing-vertical) * 0.5)
125
+ padding: calc(var(--pico-form-element-spacing-vertical) * .5)
128
126
  var(--pico-form-element-spacing-horizontal);
127
+ margin-bottom: 0;
129
128
  list-style: none;
130
129
  }
130
+
131
131
  details.dropdown > summary + ul li:first-of-type {
132
- margin-top: calc(var(--pico-form-element-spacing-vertical) * 0.5);
132
+ margin-top: calc(var(--pico-form-element-spacing-vertical) * .5);
133
133
  }
134
+
134
135
  details.dropdown > summary + ul li:last-of-type {
135
- margin-bottom: calc(var(--pico-form-element-spacing-vertical) * 0.5);
136
+ margin-bottom: calc(var(--pico-form-element-spacing-vertical) * .5);
136
137
  }
138
+
137
139
  details.dropdown > summary + ul li a {
138
- display: block;
139
- margin: calc(var(--pico-form-element-spacing-vertical) * -0.5)
140
+ margin: calc(var(--pico-form-element-spacing-vertical) * -.5)
140
141
  calc(var(--pico-form-element-spacing-horizontal) * -1);
141
- padding: calc(var(--pico-form-element-spacing-vertical) * 0.5)
142
+ padding: calc(var(--pico-form-element-spacing-vertical) * .5)
142
143
  var(--pico-form-element-spacing-horizontal);
143
- overflow: hidden;
144
- border-radius: 0;
145
144
  color: var(--pico-dropdown-color);
146
- text-decoration: none;
147
145
  text-overflow: ellipsis;
146
+ border-radius: 0;
147
+ text-decoration: none;
148
+ display: block;
149
+ overflow: hidden;
148
150
  }
149
- details.dropdown > summary + ul li a:hover,
150
- details.dropdown > summary + ul li a:focus,
151
- details.dropdown > summary + ul li a:active,
152
- details.dropdown > summary + ul li a:focus-visible,
153
- details.dropdown > summary + ul li a[aria-current]:not([aria-current="false"]) {
151
+
152
+ details.dropdown > summary + ul li a:hover, details.dropdown > summary + ul li a:focus, details.dropdown > summary + ul li a:active, details.dropdown > summary + ul li a:focus-visible, details.dropdown > summary + ul li a[aria-current]:not([aria-current="false"]) {
154
153
  background-color: var(--pico-dropdown-hover-background-color);
155
154
  }
155
+
156
156
  details.dropdown > summary + ul li label {
157
157
  width: 100%;
158
158
  }
159
+
159
160
  details.dropdown > summary + ul li:has(label):hover {
160
161
  background-color: var(--pico-dropdown-hover-background-color);
161
162
  }
@@ -165,27 +166,26 @@ details.dropdown[open] > summary {
165
166
  }
166
167
 
167
168
  details.dropdown[open] > summary + ul {
168
- transform: scaleY(1);
169
169
  opacity: 1;
170
- transition:
171
- opacity var(--pico-transition),
170
+ transition: opacity var(--pico-transition),
172
171
  transform 0s ease-in-out 0s;
172
+ transform: scaleY(1);
173
173
  }
174
174
 
175
- details.dropdown[open] > summary::before {
176
- display: block;
175
+ details.dropdown[open] > summary:before {
177
176
  z-index: 1;
178
- position: fixed;
177
+ content: "";
178
+ cursor: default;
179
+ background: none;
179
180
  width: 100vw;
180
181
  height: 100vh;
182
+ display: block;
183
+ position: fixed;
181
184
  inset: 0;
182
- background: none;
183
- content: "";
184
- cursor: default;
185
185
  }
186
186
 
187
187
  label > details.dropdown {
188
- margin-top: calc(var(--pico-spacing) * 0.25);
188
+ margin-top: calc(var(--pico-spacing) * .25);
189
189
  }
190
190
 
191
191
  }
@@ -1,206 +1,90 @@
1
1
  @layer blades {
2
- /**
3
- * Group ([role="group"], [role="search"])
4
- */
5
- :where(:scope),
6
- :host {
7
- --pico-group-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
2
+ :where(:scope), :host {
3
+ --pico-group-box-shadow: 0 0 0 #0000;
8
4
  --pico-group-box-shadow-focus-with-button: 0 0 0 var(--pico-outline-width)
9
5
  var(--pico-primary-focus);
10
- --pico-group-box-shadow-focus-with-input: 0 0 0 0.0625rem var(--pico-form-element-border-color);
6
+ --pico-group-box-shadow-focus-with-input: 0 0 0 .0625rem var(--pico-form-element-border-color);
11
7
  }
12
- [role="search"]:has(
13
- button.secondary:focus,
14
- [type="submit"].secondary:focus,
15
- [type="button"].secondary:focus,
16
- [role="button"].secondary:focus
17
- ),
18
- [role="group"]:has(
19
- button.secondary:focus,
20
- [type="submit"].secondary:focus,
21
- [type="button"].secondary:focus,
22
- [role="button"].secondary:focus
23
- ) {
8
+
9
+ [role="search"]:has(button.secondary:focus, [type="submit"].secondary:focus, [type="button"].secondary:focus, [role="button"].secondary:focus), [role="group"]:has(button.secondary:focus, [type="submit"].secondary:focus, [type="button"].secondary:focus, [role="button"].secondary:focus) {
24
10
  --pico-group-box-shadow-focus-with-button: 0 0 0 var(--pico-outline-width)
25
11
  var(--pico-secondary-focus);
26
12
  }
27
- [role="search"]:has(
28
- button.contrast:focus,
29
- [type="submit"].contrast:focus,
30
- [type="button"].contrast:focus,
31
- [role="button"].contrast:focus
32
- ),
33
- [role="group"]:has(
34
- button.contrast:focus,
35
- [type="submit"].contrast:focus,
36
- [type="button"].contrast:focus,
37
- [role="button"].contrast:focus
38
- ) {
13
+
14
+ [role="search"]:has(button.contrast:focus, [type="submit"].contrast:focus, [type="button"].contrast:focus, [role="button"].contrast:focus), [role="group"]:has(button.contrast:focus, [type="submit"].contrast:focus, [type="button"].contrast:focus, [role="button"].contrast:focus) {
39
15
  --pico-group-box-shadow-focus-with-button: 0 0 0 var(--pico-outline-width)
40
16
  var(--pico-contrast-focus);
41
17
  }
42
18
 
43
- [role="search"],
44
- [role="group"] {
45
- display: inline-flex;
46
- position: relative;
19
+ [role="search"], [role="group"] {
47
20
  width: 100%;
48
21
  margin-bottom: var(--pico-spacing);
49
22
  border-radius: var(--pico-border-radius);
50
- box-shadow: var(--pico-group-box-shadow, 0 0 0 rgba(0, 0, 0, 0));
23
+ box-shadow: var(--pico-group-box-shadow, 0 0 0 #0000);
51
24
  vertical-align: middle;
52
25
  transition: box-shadow var(--pico-transition);
53
- }
54
- [role="search"] > *,
55
- [role="search"] input:not([type="checkbox"], [type="radio"]),
56
- [role="search"] select,
57
- [role="group"] > *,
58
- [role="group"] input:not([type="checkbox"], [type="radio"]),
59
- [role="group"] select {
26
+ display: inline-flex;
60
27
  position: relative;
61
- flex: 1 1 auto;
28
+ }
29
+
30
+ [role="search"] > *, [role="search"] input:not([type="checkbox"], [type="radio"]), [role="search"] select, [role="group"] > *, [role="group"] input:not([type="checkbox"], [type="radio"]), [role="group"] select {
31
+ flex: auto;
62
32
  margin-bottom: 0;
33
+ position: relative;
63
34
  }
64
- [role="search"] > *:not(:first-child),
65
- [role="search"] input:not([type="checkbox"], [type="radio"]):not(:first-child),
66
- [role="search"] select:not(:first-child),
67
- [role="group"] > *:not(:first-child),
68
- [role="group"] input:not([type="checkbox"], [type="radio"]):not(:first-child),
69
- [role="group"] select:not(:first-child) {
70
- margin-left: 0;
35
+
36
+ [role="search"] > :not(:first-child), [role="search"] input:not([type="checkbox"], [type="radio"]):not(:first-child), [role="search"] select:not(:first-child), [role="group"] > :not(:first-child), [role="group"] input:not([type="checkbox"], [type="radio"]):not(:first-child), [role="group"] select:not(:first-child) {
71
37
  border-top-left-radius: 0;
72
38
  border-bottom-left-radius: 0;
39
+ margin-left: 0;
73
40
  }
74
- [role="search"] > *:not(:last-child),
75
- [role="search"] input:not([type="checkbox"], [type="radio"]):not(:last-child),
76
- [role="search"] select:not(:last-child),
77
- [role="group"] > *:not(:last-child),
78
- [role="group"] input:not([type="checkbox"], [type="radio"]):not(:last-child),
79
- [role="group"] select:not(:last-child) {
41
+
42
+ [role="search"] > :not(:last-child), [role="search"] input:not([type="checkbox"], [type="radio"]):not(:last-child), [role="search"] select:not(:last-child), [role="group"] > :not(:last-child), [role="group"] input:not([type="checkbox"], [type="radio"]):not(:last-child), [role="group"] select:not(:last-child) {
80
43
  border-top-right-radius: 0;
81
44
  border-bottom-right-radius: 0;
82
45
  }
83
- [role="search"] > *:focus,
84
- [role="search"] input:not([type="checkbox"], [type="radio"]):focus,
85
- [role="search"] select:focus,
86
- [role="group"] > *:focus,
87
- [role="group"] input:not([type="checkbox"], [type="radio"]):focus,
88
- [role="group"] select:focus {
46
+
47
+ [role="search"] > :focus, [role="search"] input:not([type="checkbox"], [type="radio"]):focus, [role="search"] select:focus, [role="group"] > :focus, [role="group"] input:not([type="checkbox"], [type="radio"]):focus, [role="group"] select:focus {
89
48
  z-index: 2;
90
49
  }
91
- [role="search"] button:not(:first-child),
92
- [role="search"] [type="submit"]:not(:first-child),
93
- [role="search"] [type="reset"]:not(:first-child),
94
- [role="search"] [type="button"]:not(:first-child),
95
- [role="search"] [role="button"]:not(:first-child),
96
- [role="search"] input:not([type="checkbox"], [type="radio"]):not(:first-child),
97
- [role="search"] select:not(:first-child),
98
- [role="group"] button:not(:first-child),
99
- [role="group"] [type="submit"]:not(:first-child),
100
- [role="group"] [type="reset"]:not(:first-child),
101
- [role="group"] [type="button"]:not(:first-child),
102
- [role="group"] [role="button"]:not(:first-child),
103
- [role="group"] input:not([type="checkbox"], [type="radio"]):not(:first-child),
104
- [role="group"] select:not(:first-child) {
50
+
51
+ [role="search"] button:not(:first-child), [role="search"] [type="submit"]:not(:first-child), [role="search"] [type="reset"]:not(:first-child), [role="search"] [type="button"]:not(:first-child), [role="search"] [role="button"]:not(:first-child), [role="search"] input:not([type="checkbox"], [type="radio"]):not(:first-child), [role="search"] select:not(:first-child), [role="group"] button:not(:first-child), [role="group"] [type="submit"]:not(:first-child), [role="group"] [type="reset"]:not(:first-child), [role="group"] [type="button"]:not(:first-child), [role="group"] [role="button"]:not(:first-child), [role="group"] input:not([type="checkbox"], [type="radio"]):not(:first-child), [role="group"] select:not(:first-child) {
105
52
  margin-left: calc(var(--pico-border-width) * -1);
106
53
  }
107
- [role="search"] button,
108
- [role="search"] [type="submit"],
109
- [role="search"] [type="reset"],
110
- [role="search"] [type="button"],
111
- [role="search"] [role="button"],
112
- [role="group"] button,
113
- [role="group"] [type="submit"],
114
- [role="group"] [type="reset"],
115
- [role="group"] [type="button"],
116
- [role="group"] [role="button"] {
54
+
55
+ [role="search"] button, [role="search"] [type="submit"], [role="search"] [type="reset"], [role="search"] [type="button"], [role="search"] [role="button"], [role="group"] button, [role="group"] [type="submit"], [role="group"] [type="reset"], [role="group"] [type="button"], [role="group"] [role="button"] {
117
56
  width: auto;
118
57
  }
58
+
119
59
  @supports selector(:has(*)) {
120
- [role="search"]:has(
121
- button:focus,
122
- [type="submit"]:focus,
123
- [type="button"]:focus,
124
- [role="button"]:focus
125
- ),
126
- [role="group"]:has(
127
- button:focus,
128
- [type="submit"]:focus,
129
- [type="button"]:focus,
130
- [role="button"]:focus
131
- ) {
60
+ [role="search"]:has(button:focus, [type="submit"]:focus, [type="button"]:focus, [role="button"]:focus), [role="group"]:has(button:focus, [type="submit"]:focus, [type="button"]:focus, [role="button"]:focus) {
132
61
  --pico-group-box-shadow: var(--pico-group-box-shadow-focus-with-button);
133
62
  }
134
- [role="search"]:has(
135
- button:focus,
136
- [type="submit"]:focus,
137
- [type="button"]:focus,
138
- [role="button"]:focus
139
- )
140
- input:not([type="checkbox"], [type="radio"]),
141
- [role="search"]:has(
142
- button:focus,
143
- [type="submit"]:focus,
144
- [type="button"]:focus,
145
- [role="button"]:focus
146
- )
147
- select,
148
- [role="group"]:has(
149
- button:focus,
150
- [type="submit"]:focus,
151
- [type="button"]:focus,
152
- [role="button"]:focus
153
- )
154
- input:not([type="checkbox"], [type="radio"]),
155
- [role="group"]:has(
156
- button:focus,
157
- [type="submit"]:focus,
158
- [type="button"]:focus,
159
- [role="button"]:focus
160
- )
161
- select {
162
- border-color: transparent;
63
+
64
+ [role="search"]:has(button:focus, [type="submit"]:focus, [type="button"]:focus, [role="button"]:focus) input:not([type="checkbox"], [type="radio"]), [role="search"]:has(button:focus, [type="submit"]:focus, [type="button"]:focus, [role="button"]:focus) select, [role="group"]:has(button:focus, [type="submit"]:focus, [type="button"]:focus, [role="button"]:focus) input:not([type="checkbox"], [type="radio"]), [role="group"]:has(button:focus, [type="submit"]:focus, [type="button"]:focus, [role="button"]:focus) select {
65
+ border-color: #0000;
163
66
  }
164
- [role="search"]:has(input:not([type="submit"], [type="button"]):focus, select:focus),
165
- [role="group"]:has(input:not([type="submit"], [type="button"]):focus, select:focus) {
67
+
68
+ [role="search"]:has(input:not([type="submit"], [type="button"]):focus, select:focus), [role="group"]:has(input:not([type="submit"], [type="button"]):focus, select:focus) {
166
69
  --pico-group-box-shadow: var(--pico-group-box-shadow-focus-with-input);
167
70
  }
168
- [role="search"]:has(input:not([type="submit"], [type="button"]):focus, select:focus) button,
169
- [role="search"]:has(input:not([type="submit"], [type="button"]):focus, select:focus)
170
- [type="submit"],
171
- [role="search"]:has(input:not([type="submit"], [type="button"]):focus, select:focus)
172
- [type="button"],
173
- [role="search"]:has(input:not([type="submit"], [type="button"]):focus, select:focus)
174
- [role="button"],
175
- [role="group"]:has(input:not([type="submit"], [type="button"]):focus, select:focus) button,
176
- [role="group"]:has(input:not([type="submit"], [type="button"]):focus, select:focus)
177
- [type="submit"],
178
- [role="group"]:has(input:not([type="submit"], [type="button"]):focus, select:focus)
179
- [type="button"],
180
- [role="group"]:has(input:not([type="submit"], [type="button"]):focus, select:focus)
181
- [role="button"] {
71
+
72
+ [role="search"]:has(input:not([type="submit"], [type="button"]):focus, select:focus) button, [role="search"]:has(input:not([type="submit"], [type="button"]):focus, select:focus) [type="submit"], [role="search"]:has(input:not([type="submit"], [type="button"]):focus, select:focus) [type="button"], [role="search"]:has(input:not([type="submit"], [type="button"]):focus, select:focus) [role="button"], [role="group"]:has(input:not([type="submit"], [type="button"]):focus, select:focus) button, [role="group"]:has(input:not([type="submit"], [type="button"]):focus, select:focus) [type="submit"], [role="group"]:has(input:not([type="submit"], [type="button"]):focus, select:focus) [type="button"], [role="group"]:has(input:not([type="submit"], [type="button"]):focus, select:focus) [role="button"] {
182
73
  --pico-button-box-shadow: 0 0 0 var(--pico-border-width) var(--pico-primary-border);
183
74
  --pico-button-hover-box-shadow: 0 0 0 var(--pico-border-width) var(--pico-primary-hover-border);
184
75
  }
185
- [role="search"] button:focus,
186
- [role="search"] [type="submit"]:focus,
187
- [role="search"] [type="reset"]:focus,
188
- [role="search"] [type="button"]:focus,
189
- [role="search"] [role="button"]:focus,
190
- [role="group"] button:focus,
191
- [role="group"] [type="submit"]:focus,
192
- [role="group"] [type="reset"]:focus,
193
- [role="group"] [type="button"]:focus,
194
- [role="group"] [role="button"]:focus {
76
+
77
+ [role="search"] button:focus, [role="search"] [type="submit"]:focus, [role="search"] [type="reset"]:focus, [role="search"] [type="button"]:focus, [role="search"] [role="button"]:focus, [role="group"] button:focus, [role="group"] [type="submit"]:focus, [role="group"] [type="reset"]:focus, [role="group"] [type="button"]:focus, [role="group"] [role="button"]:focus {
195
78
  box-shadow: none;
196
79
  }
197
80
  }
198
81
 
199
- [role="search"] > *:first-child {
82
+ [role="search"] > :first-child {
200
83
  border-top-left-radius: 5rem;
201
84
  border-bottom-left-radius: 5rem;
202
85
  }
203
- [role="search"] > *:last-child {
86
+
87
+ [role="search"] > :last-child {
204
88
  border-top-right-radius: 5rem;
205
89
  border-bottom-right-radius: 5rem;
206
90
  }
@@ -1,61 +1,54 @@
1
1
  @layer blades {
2
- /**
3
- * Loading ([aria-busy=true])
4
- */
5
- :where(:scope),
6
- :host {
2
+ :where(:scope), :host {
7
3
  --pico-icon-loading: url("data:image/svg+xml,%3Csvg fill='none' height='24' width='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E g %7B animation: rotate 2s linear infinite; transform-origin: center center; %7D circle %7B stroke-dasharray: 75,100; stroke-dashoffset: -5; animation: dash 1.5s ease-in-out infinite; stroke-linecap: round; %7D @keyframes rotate %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D @keyframes dash %7B 0%25 %7B stroke-dasharray: 1,100; stroke-dashoffset: 0; %7D 50%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -17.5; %7D 100%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -62; %7D %7D %3C/style%3E%3Cg%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='rgb(136, 145, 164)' stroke-width='4' /%3E%3C/g%3E%3C/svg%3E");
8
4
  }
9
- :where(:scope, [data-theme="light"], [data-theme="dark"]),
10
- :host {
11
- --pico-loading-spinner-opacity: 0.5;
5
+
6
+ :where(:scope, [data-theme="light"], [data-theme="dark"]), :host {
7
+ --pico-loading-spinner-opacity: .5;
12
8
  }
13
9
 
14
- [aria-busy="true"]:not(input, select, textarea, html, form):not(
15
- :where(button, [type="submit"], [type="button"], [type="reset"], [role="button"])
16
- ) {
17
- /* :where() zeroes the specificity of the button list inside :not(), so this rule stays
18
- * low-specificity and doesn't override the more specific button rules below */
10
+ [aria-busy="true"]:not(input, select, textarea, html, form):not(:where(button, [type="submit"], [type="button"], [type="reset"], [role="button"])) {
19
11
  white-space: nowrap;
20
12
  }
21
- [aria-busy="true"]:not(input, select, textarea, html, form)::before {
22
- display: inline-block;
23
- width: 1em;
24
- height: 1em;
13
+
14
+ [aria-busy="true"]:not(input, select, textarea, html, form):before {
25
15
  background-image: var(--pico-icon-loading);
26
- background-size: 1em auto;
27
- background-repeat: no-repeat;
28
16
  content: "";
29
- vertical-align: -0.125em;
17
+ vertical-align: -.125em;
18
+ background-repeat: no-repeat;
19
+ background-size: 1em;
20
+ width: 1em;
21
+ height: 1em;
22
+ display: inline-block;
30
23
  }
31
- [aria-busy="true"]:not(input, select, textarea, html, form):not(:empty)::before {
32
- margin-inline-end: calc(var(--pico-spacing) * 0.5);
24
+
25
+ [aria-busy="true"]:not(input, select, textarea, html, form):not(:empty):before {
26
+ margin-inline-end: calc(var(--pico-spacing) * .5);
33
27
  }
28
+
34
29
  [aria-busy="true"]:not(input, select, textarea, html, form):empty {
35
30
  text-align: center;
36
31
  }
37
32
 
38
- button[aria-busy="true"],
39
- [type="submit"][aria-busy="true"],
40
- [type="button"][aria-busy="true"],
41
- [type="reset"][aria-busy="true"],
42
- [role="button"][aria-busy="true"],
43
- a[aria-busy="true"] {
33
+ button[aria-busy="true"], [type="submit"][aria-busy="true"], [type="button"][aria-busy="true"], [type="reset"][aria-busy="true"], [role="button"][aria-busy="true"], a[aria-busy="true"] {
44
34
  pointer-events: none;
45
35
  }
46
36
 
47
- /* Buttons keep their size: the label stays in place but hidden, the spinner sits on top */
48
- button[aria-busy="true"]:not(:empty), [type="submit"][aria-busy="true"]:not(:empty), [type="button"][aria-busy="true"]:not(:empty), [type="reset"][aria-busy="true"]:not(:empty), [role="button"][aria-busy="true"]:not(:empty) {
37
+ button, [type="submit"], [type="button"], [type="reset"], [role="button"] {
38
+ &[aria-busy="true"]:not(:empty) {
39
+ color: #0000;
49
40
  position: relative;
50
- color: transparent;
51
- }
52
- button[aria-busy="true"]:not(:empty) > *, [type="submit"][aria-busy="true"]:not(:empty) > *, [type="button"][aria-busy="true"]:not(:empty) > *, [type="reset"][aria-busy="true"]:not(:empty) > *, [role="button"][aria-busy="true"]:not(:empty) > * {
41
+
42
+ & > * {
53
43
  opacity: 0;
54
44
  }
55
- button[aria-busy="true"]:not(:empty)::before, [type="submit"][aria-busy="true"]:not(:empty)::before, [type="button"][aria-busy="true"]:not(:empty)::before, [type="reset"][aria-busy="true"]:not(:empty)::before, [role="button"][aria-busy="true"]:not(:empty)::before {
56
- position: absolute;
45
+
46
+ &:before {
57
47
  margin: auto;
48
+ position: absolute;
58
49
  inset: 0;
59
50
  }
51
+ }
52
+ }
60
53
 
61
54
  }