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

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 (108) hide show
  1. package/README.md +78 -3
  2. package/css/blades.css +371 -978
  3. package/css/blades.min.css +74 -37
  4. package/css/blades.ninja.css +4057 -0
  5. package/css/blades.ninja.min.css +190 -0
  6. package/css/float-label.css +207 -0
  7. package/css/float-label.min.css +55 -0
  8. package/css/{pico.layered.css → layered/blades.layered.css} +654 -397
  9. package/css/layered/blades.layered.min.css +184 -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 +43 -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 +1082 -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 +229 -396
  48. package/css/pico.conditional.min.css +42 -31
  49. package/css/pico.css +229 -396
  50. package/css/pico.min.css +42 -31
  51. package/package.json +24 -11
  52. package/src/_compact.css +51 -0
  53. package/src/blades/_index.css +23 -0
  54. package/src/blades/float-label/_index.css +2 -0
  55. package/src/{standalone/forms/_float-label.theme.css → blades/float-label/_theme.css} +5 -1
  56. package/src/blades.css +3 -2
  57. package/src/blades.ninja.css +3 -0
  58. package/src/float-label.css +1 -0
  59. package/src/ninja/_index.css +19 -0
  60. package/src/{standalone → ninja}/_theme.css +0 -2
  61. package/src/{ninja.css → ninja/_utilities.css} +55 -6
  62. package/src/pico/_variables.css +77 -386
  63. package/src/pico/components/_accordion.css +8 -0
  64. package/src/pico/components/_card.css +14 -0
  65. package/src/pico/components/_dropdown.css +9 -0
  66. package/src/pico/components/_group.css +38 -0
  67. package/src/pico/components/_loading.css +9 -0
  68. package/src/pico/components/_modal.css +13 -0
  69. package/src/pico/components/_nav.css +6 -0
  70. package/src/pico/components/_progress.css +6 -0
  71. package/src/pico/components/_tooltip.css +6 -0
  72. package/src/pico/content/_button.css +1 -1
  73. package/src/pico/forms/_checkbox-radio-switch.css +13 -0
  74. package/src/pico/forms/_input-datetime.css +6 -0
  75. package/src/pico/forms/_input-range.css +9 -0
  76. package/src/pico/forms/_input-search.css +5 -0
  77. package/src/pico/layout/_document.css +9 -0
  78. package/src/pico/layout/_index.css +0 -1
  79. package/src/pico/layout/_landmarks.css +1 -9
  80. package/src/pico.css +1 -0
  81. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -25
  82. package/.github/ISSUE_TEMPLATE/config.yml +0 -8
  83. package/.prettierignore +0 -3
  84. package/CODE_OF_CONDUCT.md +0 -92
  85. package/context7.json +0 -4
  86. package/css/blades.standalone.css +0 -860
  87. package/css/blades.standalone.min.css +0 -37
  88. package/css/ninja.css +0 -83
  89. package/css/ninja.min.css +0 -5
  90. package/css/pico.layered.min.css +0 -107
  91. package/css/postcss.config.js +0 -23
  92. package/index.html +0 -63
  93. package/src/blades.standalone.css +0 -2
  94. package/src/standalone/_core.css +0 -32
  95. package/src/standalone/_utilities.css +0 -55
  96. package/src/standalone/forms/_float-label.css +0 -2
  97. /package/src/{standalone/content → blades}/_code.css +0 -0
  98. /package/src/{standalone/layout → blades}/_columns.css +0 -0
  99. /package/src/{standalone/components/_icon-helper.css → blades/_icon.css} +0 -0
  100. /package/src/{standalone/components → blades}/_timeline.css +0 -0
  101. /package/src/{standalone → blades}/_variables.css +0 -0
  102. /package/src/{standalone/forms/_float-label.core.css → blades/float-label/_core.css} +0 -0
  103. /package/src/{standalone/layout/_breakout.css → ninja/_container-breakout.css} +0 -0
  104. /package/src/{standalone/content/_typography.css → ninja/_heading-anchor.css} +0 -0
  105. /package/src/{standalone/content/_list.css → ninja/_list-helpers.css} +0 -0
  106. /package/src/{standalone/layout/_scroller.css → ninja/_page-anchors.css} +0 -0
  107. /package/src/{standalone/content/_table.css → ninja/_table-helpers.css} +0 -0
  108. /package/src/{standalone/content → ninja}/_table-responsive.css +0 -0
@@ -0,0 +1,191 @@
1
+ @layer blades {
2
+ /**
3
+ * Dropdown (details.dropdown)
4
+ */
5
+ :where(:scope, [data-theme="light"], [data-theme="dark"]),
6
+ :host {
7
+ --pico-dropdown-background-color: light-dark(#fff, #181c25);
8
+ --pico-dropdown-border-color: light-dark(#eff1f4, #202632);
9
+ --pico-dropdown-box-shadow: var(--pico-box-shadow);
10
+ --pico-dropdown-color: var(--pico-color);
11
+ --pico-dropdown-hover-background-color: light-dark(#eff1f4, #202632);
12
+ }
13
+
14
+ details.dropdown {
15
+ position: relative;
16
+ border-bottom: none;
17
+ }
18
+ details.dropdown > summary::after,
19
+ details.dropdown > button::after,
20
+ details.dropdown > a::after {
21
+ display: block;
22
+ width: 1rem;
23
+ height: calc(1rem * var(--pico-line-height, 1.5));
24
+ margin-inline-start: 0.25rem;
25
+ float: right;
26
+ transform: rotate(0deg) translateX(0.2rem);
27
+ background-image: var(--pico-icon-chevron);
28
+ background-position: right center;
29
+ background-size: 1rem auto;
30
+ background-repeat: no-repeat;
31
+ content: "";
32
+ }
33
+
34
+ nav details.dropdown {
35
+ margin-bottom: 0;
36
+ }
37
+
38
+ 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
+ );
43
+ padding: var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal);
44
+ border: var(--pico-border-width) solid var(--pico-form-element-border-color);
45
+ border-radius: var(--pico-border-radius);
46
+ background-color: var(--pico-form-element-background-color);
47
+ color: var(--pico-form-element-placeholder-color);
48
+ line-height: inherit;
49
+ cursor: pointer;
50
+ -webkit-user-select: none;
51
+ -moz-user-select: none;
52
+ transition:
53
+ background-color var(--pico-transition),
54
+ border-color var(--pico-transition),
55
+ color var(--pico-transition),
56
+ box-shadow var(--pico-transition);
57
+ user-select: none;
58
+ }
59
+ details.dropdown > summary:not([role]):active,
60
+ details.dropdown > summary:not([role]):focus {
61
+ border-color: var(--pico-form-element-active-border-color);
62
+ background-color: var(--pico-form-element-active-background-color);
63
+ }
64
+ details.dropdown > summary:not([role]):focus {
65
+ box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-focus-color);
66
+ }
67
+ details.dropdown > summary:not([role]):focus-visible {
68
+ outline: none;
69
+ }
70
+ details.dropdown > summary:not([role])[aria-invalid="false"] {
71
+ --pico-form-element-border-color: var(--pico-form-element-valid-border-color);
72
+ --pico-form-element-active-border-color: var(--pico-form-element-valid-focus-color);
73
+ --pico-form-element-focus-color: var(--pico-form-element-valid-focus-color);
74
+ }
75
+ details.dropdown > summary:not([role])[aria-invalid="true"] {
76
+ --pico-form-element-border-color: var(--pico-form-element-invalid-border-color);
77
+ --pico-form-element-active-border-color: var(--pico-form-element-invalid-focus-color);
78
+ --pico-form-element-focus-color: var(--pico-form-element-invalid-focus-color);
79
+ }
80
+
81
+ nav details.dropdown {
82
+ display: inline-block;
83
+ margin: calc(var(--pico-nav-element-spacing-vertical) * -1) 0;
84
+ }
85
+ nav details.dropdown > summary::after {
86
+ transform: rotate(0deg) translateX(0rem);
87
+ }
88
+ nav details.dropdown > summary:not([role]) {
89
+ height: calc(1rem * var(--pico-line-height) + var(--pico-nav-link-spacing-vertical) * 2);
90
+ padding: calc(var(--pico-nav-link-spacing-vertical) - var(--pico-border-width) * 2)
91
+ var(--pico-nav-link-spacing-horizontal);
92
+ }
93
+ nav details.dropdown > summary:not([role]):focus-visible {
94
+ box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-primary-focus);
95
+ }
96
+
97
+ details.dropdown > summary + ul {
98
+ display: flex;
99
+ z-index: 99;
100
+ position: absolute;
101
+ left: 0;
102
+ flex-direction: column;
103
+ width: 100%;
104
+ min-width: -moz-fit-content;
105
+ min-width: fit-content;
106
+ margin: 0;
107
+ margin-top: var(--pico-outline-width);
108
+ padding: 0;
109
+ border: var(--pico-border-width) solid var(--pico-dropdown-border-color);
110
+ border-radius: var(--pico-border-radius);
111
+ background-color: var(--pico-dropdown-background-color);
112
+ box-shadow: var(--pico-dropdown-box-shadow);
113
+ color: var(--pico-dropdown-color);
114
+ white-space: nowrap;
115
+ opacity: 0;
116
+ transition:
117
+ opacity var(--pico-transition),
118
+ transform 0s ease-in-out 1s;
119
+ }
120
+ details.dropdown > summary + ul[dir="rtl"] {
121
+ right: 0;
122
+ left: auto;
123
+ }
124
+ details.dropdown > summary + ul li {
125
+ width: 100%;
126
+ margin-bottom: 0;
127
+ padding: calc(var(--pico-form-element-spacing-vertical) * 0.5)
128
+ var(--pico-form-element-spacing-horizontal);
129
+ list-style: none;
130
+ }
131
+ details.dropdown > summary + ul li:first-of-type {
132
+ margin-top: calc(var(--pico-form-element-spacing-vertical) * 0.5);
133
+ }
134
+ details.dropdown > summary + ul li:last-of-type {
135
+ margin-bottom: calc(var(--pico-form-element-spacing-vertical) * 0.5);
136
+ }
137
+ details.dropdown > summary + ul li a {
138
+ display: block;
139
+ margin: calc(var(--pico-form-element-spacing-vertical) * -0.5)
140
+ calc(var(--pico-form-element-spacing-horizontal) * -1);
141
+ padding: calc(var(--pico-form-element-spacing-vertical) * 0.5)
142
+ var(--pico-form-element-spacing-horizontal);
143
+ overflow: hidden;
144
+ border-radius: 0;
145
+ color: var(--pico-dropdown-color);
146
+ text-decoration: none;
147
+ text-overflow: ellipsis;
148
+ }
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"]) {
154
+ background-color: var(--pico-dropdown-hover-background-color);
155
+ }
156
+ details.dropdown > summary + ul li label {
157
+ width: 100%;
158
+ }
159
+ details.dropdown > summary + ul li:has(label):hover {
160
+ background-color: var(--pico-dropdown-hover-background-color);
161
+ }
162
+
163
+ details.dropdown[open] > summary {
164
+ margin-bottom: 0;
165
+ }
166
+
167
+ details.dropdown[open] > summary + ul {
168
+ transform: scaleY(1);
169
+ opacity: 1;
170
+ transition:
171
+ opacity var(--pico-transition),
172
+ transform 0s ease-in-out 0s;
173
+ }
174
+
175
+ details.dropdown[open] > summary::before {
176
+ display: block;
177
+ z-index: 1;
178
+ position: fixed;
179
+ width: 100vw;
180
+ height: 100vh;
181
+ inset: 0;
182
+ background: none;
183
+ content: "";
184
+ cursor: default;
185
+ }
186
+
187
+ label > details.dropdown {
188
+ margin-top: calc(var(--pico-spacing) * 0.25);
189
+ }
190
+
191
+ }
@@ -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,43 @@
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) {
15
+ white-space: nowrap;
16
+ }
17
+ [aria-busy="true"]:not(input, select, textarea, html, form)::before {
18
+ display: inline-block;
19
+ width: 1em;
20
+ height: 1em;
21
+ background-image: var(--pico-icon-loading);
22
+ background-size: 1em auto;
23
+ background-repeat: no-repeat;
24
+ content: "";
25
+ vertical-align: -0.125em;
26
+ }
27
+ [aria-busy="true"]:not(input, select, textarea, html, form):not(:empty)::before {
28
+ margin-inline-end: calc(var(--pico-spacing) * 0.5);
29
+ }
30
+ [aria-busy="true"]:not(input, select, textarea, html, form):empty {
31
+ text-align: center;
32
+ }
33
+
34
+ button[aria-busy="true"],
35
+ [type="submit"][aria-busy="true"],
36
+ [type="button"][aria-busy="true"],
37
+ [type="reset"][aria-busy="true"],
38
+ [role="button"][aria-busy="true"],
39
+ a[aria-busy="true"] {
40
+ pointer-events: none;
41
+ }
42
+
43
+ }
@@ -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
+ }