@anyblades/blades 3.1.0-alpha.2 → 3.1.0-beta.4

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 (93) hide show
  1. package/README.md +48 -23
  2. package/css/blades.css +301 -593
  3. package/css/blades.min.css +4 -148
  4. package/css/blades.ninja.css +4204 -0
  5. package/css/blades.ninja.min.css +12 -0
  6. package/css/float-label.css +207 -0
  7. package/css/float-label.min.css +6 -0
  8. package/css/{pico.layered.css → layered/blades.layered.css} +589 -17
  9. package/css/layered/blades.layered.min.css +14 -0
  10. package/css/layered/compact.css +54 -0
  11. package/css/layered/components/accordion.css +85 -0
  12. package/css/layered/components/card.css +48 -0
  13. package/css/layered/components/dropdown.css +191 -0
  14. package/css/layered/components/group.css +208 -0
  15. package/css/layered/components/loading.css +61 -0
  16. package/css/layered/components/modal.css +158 -0
  17. package/css/layered/components/nav.css +117 -0
  18. package/css/layered/components/progress.css +76 -0
  19. package/css/layered/components/tooltip.css +176 -0
  20. package/css/layered/components.css +1099 -0
  21. package/css/layered/content/button.css +208 -0
  22. package/css/layered/content/code.css +64 -0
  23. package/css/layered/content/embedded-content.css +41 -0
  24. package/css/layered/content/figure.css +15 -0
  25. package/css/layered/content/link.css +84 -0
  26. package/css/layered/content/misc.css +22 -0
  27. package/css/layered/content/table.css +33 -0
  28. package/css/layered/content/typography.css +159 -0
  29. package/css/layered/content.css +611 -0
  30. package/css/layered/forms/basics.css +338 -0
  31. package/css/layered/forms/checkbox-radio-switch.css +164 -0
  32. package/css/layered/forms/input-color.css +20 -0
  33. package/css/layered/forms/input-datetime.css +57 -0
  34. package/css/layered/forms/input-file.css +29 -0
  35. package/css/layered/forms/input-range.css +121 -0
  36. package/css/layered/forms/input-search.css +66 -0
  37. package/css/layered/forms.css +778 -0
  38. package/css/layered/layout/container.css +42 -0
  39. package/css/layered/layout/document.css +48 -0
  40. package/css/layered/layout/grid.css +22 -0
  41. package/css/layered/layout/landmarks.css +12 -0
  42. package/css/layered/layout/overflow-auto.css +9 -0
  43. package/css/layered/layout/section.css +9 -0
  44. package/css/layered/layout.css +119 -0
  45. package/css/layered/utilities.css +35 -0
  46. package/css/layered/variables.css +365 -0
  47. package/css/pico.conditional.css +34 -16
  48. package/css/pico.conditional.min.css +2 -111
  49. package/css/pico.css +34 -16
  50. package/css/pico.min.css +2 -111
  51. package/package.json +16 -12
  52. package/src/blades/_compact.css +51 -0
  53. package/src/blades/_dropdown-popover.css +107 -0
  54. package/src/blades/_index.css +28 -0
  55. package/src/blades/_modal.css +26 -0
  56. package/src/blades/float-label/_index.css +2 -0
  57. package/src/{standalone/forms/_float-label.theme.css → blades/float-label/_theme.css} +5 -1
  58. package/src/blades.css +2 -2
  59. package/src/blades.ninja.css +3 -0
  60. package/src/float-label.css +1 -0
  61. package/src/ninja/LICENSE +22 -0
  62. package/src/ninja/README.md +1 -0
  63. package/src/ninja/_index.css +19 -0
  64. package/src/{standalone → ninja}/_theme.css +0 -2
  65. package/src/{ninja.css → ninja/_utilities.css} +55 -6
  66. package/src/pico/_variables.css +6 -5
  67. package/src/pico/components/_loading.css +27 -1
  68. package/src/pico/content/_button.css +1 -1
  69. package/src/pico/layout/_document.css +9 -0
  70. package/src/pico/layout/_index.css +0 -1
  71. package/src/pico/layout/_landmarks.css +1 -9
  72. package/src/pico.css +1 -0
  73. package/css/blades.standalone.css +0 -860
  74. package/css/blades.standalone.min.css +0 -37
  75. package/css/ninja.css +0 -83
  76. package/css/ninja.min.css +0 -5
  77. package/css/pico.layered.min.css +0 -118
  78. package/src/blades.standalone.css +0 -2
  79. package/src/standalone/_core.css +0 -32
  80. package/src/standalone/_utilities.css +0 -55
  81. package/src/standalone/forms/_float-label.css +0 -2
  82. /package/src/{standalone/content → blades}/_code.css +0 -0
  83. /package/src/{standalone/layout → blades}/_columns.css +0 -0
  84. /package/src/{standalone/components/_icon-helper.css → blades/_icon.css} +0 -0
  85. /package/src/{standalone/components → blades}/_timeline.css +0 -0
  86. /package/src/{standalone → blades}/_variables.css +0 -0
  87. /package/src/{standalone/forms/_float-label.core.css → blades/float-label/_core.css} +0 -0
  88. /package/src/{standalone/layout/_breakout.css → ninja/_container-breakout.css} +0 -0
  89. /package/src/{standalone/content/_typography.css → ninja/_heading-anchor.css} +0 -0
  90. /package/src/{standalone/content/_list.css → ninja/_list-helpers.css} +0 -0
  91. /package/src/{standalone/layout/_scroller.css → ninja/_page-anchors.css} +0 -0
  92. /package/src/{standalone/content/_table.css → ninja/_table-helpers.css} +0 -0
  93. /package/src/{standalone/content → ninja}/_table-responsive.css +0 -0
@@ -0,0 +1,208 @@
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);
8
+ --pico-group-box-shadow-focus-with-button: 0 0 0 var(--pico-outline-width)
9
+ var(--pico-primary-focus);
10
+ --pico-group-box-shadow-focus-with-input: 0 0 0 0.0625rem var(--pico-form-element-border-color);
11
+ }
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
+ ) {
24
+ --pico-group-box-shadow-focus-with-button: 0 0 0 var(--pico-outline-width)
25
+ var(--pico-secondary-focus);
26
+ }
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
+ ) {
39
+ --pico-group-box-shadow-focus-with-button: 0 0 0 var(--pico-outline-width)
40
+ var(--pico-contrast-focus);
41
+ }
42
+
43
+ [role="search"],
44
+ [role="group"] {
45
+ display: inline-flex;
46
+ position: relative;
47
+ width: 100%;
48
+ margin-bottom: var(--pico-spacing);
49
+ border-radius: var(--pico-border-radius);
50
+ box-shadow: var(--pico-group-box-shadow, 0 0 0 rgba(0, 0, 0, 0));
51
+ vertical-align: middle;
52
+ 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 {
60
+ position: relative;
61
+ flex: 1 1 auto;
62
+ margin-bottom: 0;
63
+ }
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;
71
+ border-top-left-radius: 0;
72
+ border-bottom-left-radius: 0;
73
+ }
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) {
80
+ border-top-right-radius: 0;
81
+ border-bottom-right-radius: 0;
82
+ }
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 {
89
+ z-index: 2;
90
+ }
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) {
105
+ margin-left: calc(var(--pico-border-width) * -1);
106
+ }
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"] {
117
+ width: auto;
118
+ }
119
+ @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
+ ) {
132
+ --pico-group-box-shadow: var(--pico-group-box-shadow-focus-with-button);
133
+ }
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;
163
+ }
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) {
166
+ --pico-group-box-shadow: var(--pico-group-box-shadow-focus-with-input);
167
+ }
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"] {
182
+ --pico-button-box-shadow: 0 0 0 var(--pico-border-width) var(--pico-primary-border);
183
+ --pico-button-hover-box-shadow: 0 0 0 var(--pico-border-width) var(--pico-primary-hover-border);
184
+ }
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 {
195
+ box-shadow: none;
196
+ }
197
+ }
198
+
199
+ [role="search"] > *:first-child {
200
+ border-top-left-radius: 5rem;
201
+ border-bottom-left-radius: 5rem;
202
+ }
203
+ [role="search"] > *:last-child {
204
+ border-top-right-radius: 5rem;
205
+ border-bottom-right-radius: 5rem;
206
+ }
207
+
208
+ }
@@ -0,0 +1,61 @@
1
+ @layer blades {
2
+ /**
3
+ * Loading ([aria-busy=true])
4
+ */
5
+ :where(:scope),
6
+ :host {
7
+ --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
+ }
9
+ :where(:scope, [data-theme="light"], [data-theme="dark"]),
10
+ :host {
11
+ --pico-loading-spinner-opacity: 0.5;
12
+ }
13
+
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 */
19
+ white-space: nowrap;
20
+ }
21
+ [aria-busy="true"]:not(input, select, textarea, html, form)::before {
22
+ display: inline-block;
23
+ width: 1em;
24
+ height: 1em;
25
+ background-image: var(--pico-icon-loading);
26
+ background-size: 1em auto;
27
+ background-repeat: no-repeat;
28
+ content: "";
29
+ vertical-align: -0.125em;
30
+ }
31
+ [aria-busy="true"]:not(input, select, textarea, html, form):not(:empty)::before {
32
+ margin-inline-end: calc(var(--pico-spacing) * 0.5);
33
+ }
34
+ [aria-busy="true"]:not(input, select, textarea, html, form):empty {
35
+ text-align: center;
36
+ }
37
+
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"] {
44
+ pointer-events: none;
45
+ }
46
+
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) {
49
+ 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) > * {
53
+ opacity: 0;
54
+ }
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;
57
+ margin: auto;
58
+ inset: 0;
59
+ }
60
+
61
+ }
@@ -0,0 +1,158 @@
1
+ @layer blades {
2
+ /**
3
+ * Modal (<dialog>)
4
+ */
5
+ :where(:scope),
6
+ :host {
7
+ --pico-modal-overlay-backdrop-filter: blur(0.375rem);
8
+ --pico-icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
9
+ }
10
+ :where(:scope, [data-theme="light"], [data-theme="dark"]),
11
+ :host {
12
+ --pico-modal-overlay-background-color: light-dark(
13
+ rgba(232, 234, 237, 0.75),
14
+ rgba(7.5, 8.5, 10, 0.75)
15
+ );
16
+ }
17
+
18
+ :scope,
19
+ :host {
20
+ --pico-scrollbar-width: 0px;
21
+ }
22
+
23
+ dialog {
24
+ display: flex;
25
+ z-index: 999;
26
+ position: fixed;
27
+ top: 0;
28
+ right: 0;
29
+ bottom: 0;
30
+ left: 0;
31
+ align-items: center;
32
+ justify-content: center;
33
+ width: inherit;
34
+ min-width: 100%;
35
+ height: inherit;
36
+ min-height: 100%;
37
+ padding: 0;
38
+ border: 0;
39
+ backdrop-filter: var(--pico-modal-overlay-backdrop-filter);
40
+ background-color: var(--pico-modal-overlay-background-color);
41
+ color: var(--pico-color);
42
+ }
43
+ dialog > article {
44
+ width: 100%;
45
+ max-height: calc(100vh - var(--pico-spacing) * 2);
46
+ margin: var(--pico-spacing);
47
+ overflow: auto;
48
+ }
49
+ @media (min-width: 576px) {
50
+ dialog > article {
51
+ max-width: 510px;
52
+ }
53
+ }
54
+ @media (min-width: 768px) {
55
+ dialog > article {
56
+ max-width: 700px;
57
+ }
58
+ }
59
+ dialog > article > header > * {
60
+ margin-bottom: 0;
61
+ }
62
+ dialog > article > header .close,
63
+ dialog > article > header :is(a, button)[rel="prev"] {
64
+ margin: 0;
65
+ margin-left: var(--pico-spacing);
66
+ padding: 0;
67
+ float: right;
68
+ }
69
+ dialog > article > footer {
70
+ text-align: end;
71
+ }
72
+ dialog > article > footer button,
73
+ dialog > article > footer [role="button"] {
74
+ margin-bottom: 0;
75
+ }
76
+ dialog > article > footer button:not(:first-of-type),
77
+ dialog > article > footer [role="button"]:not(:first-of-type) {
78
+ margin-left: calc(var(--pico-spacing) * 0.5);
79
+ }
80
+ dialog > article .close,
81
+ dialog > article :is(a, button)[rel="prev"] {
82
+ display: block;
83
+ width: 1rem;
84
+ height: 1rem;
85
+ margin-top: calc(var(--pico-spacing) * -1);
86
+ margin-bottom: var(--pico-spacing);
87
+ margin-left: auto;
88
+ border: none;
89
+ background-image: var(--pico-icon-close);
90
+ background-position: center;
91
+ background-size: auto 1rem;
92
+ background-repeat: no-repeat;
93
+ background-color: transparent;
94
+ opacity: 0.5;
95
+ transition: opacity var(--pico-transition);
96
+ }
97
+ dialog > article .close:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus),
98
+ dialog
99
+ > article
100
+ :is(a, button)[rel="prev"]:is(
101
+ [aria-current]:not([aria-current="false"]),
102
+ :hover,
103
+ :active,
104
+ :focus
105
+ ) {
106
+ opacity: 1;
107
+ }
108
+ dialog:not([open]),
109
+ dialog[open="false"] {
110
+ display: none;
111
+ }
112
+
113
+ .modal-is-open {
114
+ padding-right: var(--pico-scrollbar-width, 0px);
115
+ overflow: hidden;
116
+ pointer-events: none;
117
+ touch-action: none;
118
+ }
119
+ .modal-is-open dialog {
120
+ pointer-events: auto;
121
+ touch-action: auto;
122
+ }
123
+
124
+ :where(.modal-is-opening, .modal-is-closing) dialog,
125
+ :where(.modal-is-opening, .modal-is-closing) dialog > article {
126
+ animation-duration: 0.2s;
127
+ animation-timing-function: ease-in-out;
128
+ animation-fill-mode: both;
129
+ }
130
+ :where(.modal-is-opening, .modal-is-closing) dialog {
131
+ animation-duration: 0.8s;
132
+ animation-name: modal-overlay;
133
+ }
134
+ :where(.modal-is-opening, .modal-is-closing) dialog > article {
135
+ animation-delay: 0.2s;
136
+ animation-name: modal;
137
+ }
138
+
139
+ .modal-is-closing dialog,
140
+ .modal-is-closing dialog > article {
141
+ animation-delay: 0s;
142
+ animation-direction: reverse;
143
+ }
144
+
145
+ @keyframes modal-overlay {
146
+ from {
147
+ backdrop-filter: none;
148
+ background-color: transparent;
149
+ }
150
+ }
151
+ @keyframes modal {
152
+ from {
153
+ transform: translateY(-100%);
154
+ opacity: 0;
155
+ }
156
+ }
157
+
158
+ }
@@ -0,0 +1,117 @@
1
+ @layer blades {
2
+ /**
3
+ * Nav
4
+ */
5
+ :where(:scope),
6
+ :host {
7
+ --pico-nav-element-spacing-horizontal: 0.5rem;
8
+ --pico-nav-breadcrumb-divider: ">";
9
+ }
10
+
11
+ :where(nav li)::before {
12
+ float: left;
13
+ content: "​";
14
+ }
15
+
16
+ nav,
17
+ nav ul {
18
+ display: flex;
19
+ }
20
+
21
+ nav {
22
+ justify-content: space-between;
23
+ overflow: visible;
24
+ }
25
+ nav ol,
26
+ nav ul {
27
+ align-items: center;
28
+ margin-bottom: 0;
29
+ padding: 0;
30
+ list-style: none;
31
+ }
32
+ nav ol:first-of-type,
33
+ nav ul:first-of-type {
34
+ margin-left: calc(var(--pico-nav-element-spacing-horizontal) * -1);
35
+ }
36
+ nav ol:last-of-type,
37
+ nav ul:last-of-type {
38
+ margin-right: calc(var(--pico-nav-element-spacing-horizontal) * -1);
39
+ }
40
+ nav li {
41
+ display: inline-block;
42
+ margin: 0;
43
+ padding: var(--pico-nav-element-spacing-vertical) var(--pico-nav-element-spacing-horizontal);
44
+ }
45
+ nav li :where(a, [role="link"]) {
46
+ display: inline-block;
47
+ margin: calc(var(--pico-nav-link-spacing-vertical) * -1)
48
+ calc(var(--pico-nav-link-spacing-horizontal) * -1);
49
+ padding: var(--pico-nav-link-spacing-vertical) var(--pico-nav-link-spacing-horizontal);
50
+ border-radius: var(--pico-border-radius);
51
+ }
52
+ nav li :where(a, [role="link"]):not(:hover) {
53
+ text-decoration: none;
54
+ }
55
+ nav li button,
56
+ nav li [role="button"],
57
+ nav li [type="button"],
58
+ nav li input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]),
59
+ nav li select {
60
+ height: auto;
61
+ margin-right: inherit;
62
+ margin-bottom: 0;
63
+ margin-left: inherit;
64
+ padding: calc(var(--pico-nav-link-spacing-vertical) - var(--pico-border-width) * 2)
65
+ var(--pico-nav-link-spacing-horizontal);
66
+ }
67
+ nav[aria-label="breadcrumb"] {
68
+ align-items: center;
69
+ justify-content: start;
70
+ }
71
+ nav[aria-label="breadcrumb"] ul li:not(:first-child) {
72
+ margin-inline-start: var(--pico-nav-link-spacing-horizontal);
73
+ }
74
+ nav[aria-label="breadcrumb"] ul li a {
75
+ margin: calc(var(--pico-nav-link-spacing-vertical) * -1) 0;
76
+ margin-inline-start: calc(var(--pico-nav-link-spacing-horizontal) * -1);
77
+ }
78
+ nav[aria-label="breadcrumb"] ul li:not(:last-child)::after {
79
+ display: inline-block;
80
+ position: absolute;
81
+ width: calc(var(--pico-nav-link-spacing-horizontal) * 4);
82
+ margin: 0 calc(var(--pico-nav-link-spacing-horizontal) * -1);
83
+ content: var(--pico-nav-breadcrumb-divider);
84
+ color: var(--pico-muted-color);
85
+ text-align: center;
86
+ text-decoration: none;
87
+ white-space: nowrap;
88
+ }
89
+ nav[aria-label="breadcrumb"] a[aria-current]:not([aria-current="false"]) {
90
+ background-color: transparent;
91
+ color: inherit;
92
+ text-decoration: none;
93
+ pointer-events: none;
94
+ }
95
+
96
+ aside nav,
97
+ aside ol,
98
+ aside ul,
99
+ aside li {
100
+ display: block;
101
+ }
102
+ aside li {
103
+ padding: calc(var(--pico-nav-element-spacing-vertical) * 0.5)
104
+ var(--pico-nav-element-spacing-horizontal);
105
+ }
106
+ aside li a {
107
+ display: block;
108
+ }
109
+ aside li [role="button"] {
110
+ margin: inherit;
111
+ }
112
+
113
+ [dir="rtl"] nav[aria-label="breadcrumb"] ul li:not(:last-child)::after {
114
+ content: "\\";
115
+ }
116
+
117
+ }
@@ -0,0 +1,76 @@
1
+ @layer blades {
2
+ /**
3
+ * Progress
4
+ */
5
+ :where(:scope, [data-theme="light"], [data-theme="dark"]),
6
+ :host {
7
+ --pico-progress-background-color: light-dark(#dfe3eb, #202632);
8
+ --pico-progress-color: var(--pico-primary-background);
9
+ }
10
+
11
+ progress {
12
+ display: inline-block;
13
+ vertical-align: baseline;
14
+ }
15
+
16
+ progress {
17
+ -webkit-appearance: none;
18
+ -moz-appearance: none;
19
+ display: inline-block;
20
+ appearance: none;
21
+ width: 100%;
22
+ height: 0.5rem;
23
+ margin-bottom: calc(var(--pico-spacing) * 0.5);
24
+ overflow: hidden;
25
+ border: 0;
26
+ border-radius: var(--pico-border-radius);
27
+ background-color: var(--pico-progress-background-color);
28
+ color: var(--pico-progress-color);
29
+ }
30
+ progress::-webkit-progress-bar {
31
+ border-radius: var(--pico-border-radius);
32
+ background: none;
33
+ }
34
+ progress[value]::-webkit-progress-value {
35
+ background-color: var(--pico-progress-color);
36
+ -webkit-transition: inline-size var(--pico-transition);
37
+ transition: inline-size var(--pico-transition);
38
+ }
39
+ progress::-moz-progress-bar {
40
+ background-color: var(--pico-progress-color);
41
+ }
42
+ @media (prefers-reduced-motion: no-preference) {
43
+ progress:indeterminate {
44
+ background: var(--pico-progress-background-color)
45
+ linear-gradient(
46
+ to right,
47
+ var(--pico-progress-color) 30%,
48
+ var(--pico-progress-background-color) 30%
49
+ )
50
+ top left/150% 150% no-repeat;
51
+ animation: progress-indeterminate 1s linear infinite;
52
+ }
53
+ progress:indeterminate[value]::-webkit-progress-value {
54
+ background-color: transparent;
55
+ }
56
+ progress:indeterminate::-moz-progress-bar {
57
+ background-color: transparent;
58
+ }
59
+ }
60
+
61
+ @media (prefers-reduced-motion: no-preference) {
62
+ [dir="rtl"] progress:indeterminate {
63
+ animation-direction: reverse;
64
+ }
65
+ }
66
+
67
+ @keyframes progress-indeterminate {
68
+ 0% {
69
+ background-position: 200% 0;
70
+ }
71
+ 100% {
72
+ background-position: -200% 0;
73
+ }
74
+ }
75
+
76
+ }