@anyblades/blades 3.1.0-beta.2 → 3.1.0-beta.5

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 (47) hide show
  1. package/README.md +21 -18
  2. package/css/blades.css +148 -1
  3. package/css/blades.min.css +4 -174
  4. package/css/blades.ninja.css +148 -1
  5. package/css/blades.ninja.min.css +4 -182
  6. package/css/float-label.min.css +2 -51
  7. package/css/layered/blades.layered.css +148 -1
  8. package/css/layered/blades.layered.min.css +4 -174
  9. package/css/layered/components/dropdown-popover.css +107 -0
  10. package/css/layered/components/loading.css +19 -1
  11. package/css/layered/components/modal-modern.css +28 -0
  12. package/css/layered/components/timeline.css +24 -0
  13. package/css/layered/components.css +18 -1
  14. package/css/layered/content/code-block.css +32 -0
  15. package/css/layered/content/icon.css +60 -0
  16. package/css/layered/forms/float-label/core.css +103 -0
  17. package/css/layered/forms/float-label/theme.css +110 -0
  18. package/css/layered/forms/float-label.css +210 -0
  19. package/css/layered/layout/columns.css +30 -0
  20. package/css/layered/variables-blades.css +23 -0
  21. package/css/pico.conditional.css +18 -1
  22. package/css/pico.conditional.min.css +2 -111
  23. package/css/pico.css +18 -1
  24. package/css/pico.min.css +2 -111
  25. package/package.json +7 -7
  26. package/src/blades/_index.css +11 -6
  27. package/src/blades/components/_dropdown-popover.css +107 -0
  28. package/src/blades/components/_modal-modern.css +26 -0
  29. package/src/blades.css +0 -1
  30. package/src/float-label.css +1 -1
  31. package/src/ninja/LICENSE +22 -0
  32. package/src/ninja/README.md +1 -0
  33. package/src/ninja/_index.css +1 -1
  34. package/src/pico/components/_loading.css +27 -1
  35. package/_includes/blades/links.liquid +0 -21
  36. package/_includes/blades/links.njk +0 -9
  37. package/_includes/blades/links.twig +0 -18
  38. /package/src/{_compact.css → blades/_compact.css} +0 -0
  39. /package/src/blades/{_variables.css → _variables-blades.css} +0 -0
  40. /package/src/blades/{_timeline.css → components/_timeline.css} +0 -0
  41. /package/src/blades/{_code.css → content/_code-block.css} +0 -0
  42. /package/src/blades/{_icon.css → content/_icon.css} +0 -0
  43. /package/src/blades/{float-label → forms/float-label}/_core.css +0 -0
  44. /package/src/blades/{float-label → forms/float-label}/_index.css +0 -0
  45. /package/src/blades/{float-label → forms/float-label}/_theme.css +0 -0
  46. /package/src/blades/{_columns.css → layout/_columns.css} +0 -0
  47. /package/src/ninja/{_page-anchors.css → _scroll-to.css} +0 -0
@@ -0,0 +1,26 @@
1
+ /*<!--section:docs-->
2
+
3
+ A `<dialog>` opened with `dialog.showModal()` fades in and its `<article>` zooms in, without JS classes.
4
+ Pico's modal JS (`.modal-is-open`, `.modal-is-opening`, `.modal-is-closing`) still works on top of it.
5
+
6
+ - `dialog.close()` closes it at once, as before.
7
+ - `<dialog open>` in markup and non-modal `dialog.show()` aren't animated.
8
+ - Browsers without `@starting-style`, and reduced motion, open it at once.
9
+
10
+ <!--section:code-->```css */
11
+ dialog:modal {
12
+ transition: opacity var(--pico-transition);
13
+
14
+ > article {
15
+ transition: transform var(--pico-transition);
16
+ }
17
+ }
18
+ @starting-style {
19
+ dialog:modal {
20
+ opacity: 0;
21
+
22
+ > article {
23
+ transform: scale(0.96);
24
+ }
25
+ }
26
+ }
package/src/blades.css CHANGED
@@ -5,4 +5,3 @@
5
5
  */
6
6
  @import "./pico/_index";
7
7
  @import "./blades/_index";
8
- @import "./_compact";
@@ -1 +1 @@
1
- @import "./blades/float-label/_index";
1
+ @import "./blades/forms/float-label/_index";
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Anton Staroverov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1 @@
1
+ # Ninja CSS add-ons for Blades CSS
@@ -6,7 +6,7 @@
6
6
 
7
7
  /* Layout */
8
8
  @import "./_container-breakout";
9
- @import "./_page-anchors";
9
+ @import "./_scroll-to";
10
10
 
11
11
  /* Content */
12
12
  @import "./_heading-anchor";
@@ -10,7 +10,11 @@
10
10
  --pico-loading-spinner-opacity: 0.5;
11
11
  }
12
12
 
13
- [aria-busy="true"]:not(input, select, textarea, html, form) {
13
+ [aria-busy="true"]:not(input, select, textarea, html, form):not(
14
+ :where(button, [type="submit"], [type="button"], [type="reset"], [role="button"])
15
+ ) {
16
+ /* :where() zeroes the specificity of the button list inside :not(), so this rule stays
17
+ * low-specificity and doesn't override the more specific button rules below */
14
18
  white-space: nowrap;
15
19
  }
16
20
  [aria-busy="true"]:not(input, select, textarea, html, form)::before {
@@ -38,3 +42,25 @@ button[aria-busy="true"],
38
42
  a[aria-busy="true"] {
39
43
  pointer-events: none;
40
44
  }
45
+
46
+ /* Buttons keep their size: the label stays in place but hidden, the spinner sits on top */
47
+ button,
48
+ [type="submit"],
49
+ [type="button"],
50
+ [type="reset"],
51
+ [role="button"] {
52
+ &[aria-busy="true"]:not(:empty) {
53
+ position: relative;
54
+ color: transparent;
55
+
56
+ > * {
57
+ opacity: 0;
58
+ }
59
+
60
+ &::before {
61
+ position: absolute;
62
+ inset: 0;
63
+ margin: auto;
64
+ }
65
+ }
66
+ }
@@ -1,21 +0,0 @@
1
- {% comment %}<!--section:code-->```liquid{% endcomment %}
2
- <ul>
3
- {%- for link in links %}
4
- <li>
5
- {% # prettier-ignore %}
6
- <a href="{{ link.url }}" {% if link.url == current_url %}aria-current="page"{% endif %}>
7
- {{- link.title -}}
8
- </a>
9
- </li>
10
- {%- endfor %}
11
- </ul>
12
- {% # prettier-ignore %}
13
- {% comment %}```
14
- <!--section:docs-->
15
- Usage example for https://www.11ty.dev/docs/plugins/navigation/#bring-your-own-html-render-the-menu-items-manually:
16
-
17
- ```liquid
18
- {% assign links = collections.all | eleventyNavigation %}
19
- {% render blades/links, links: links, current_url: page.url %}
20
- ```
21
- <!--section-->{% endcomment %}
@@ -1,9 +0,0 @@
1
- <ul>
2
- {%- for link in links %}
3
- <li>
4
- <a href="{{ link.url }}" {% if link.url == current_url %}aria-current="page"{% endif %}>
5
- {{- link.title | safe -}}
6
- </a>
7
- </li>
8
- {%- endfor %}
9
- </ul>
@@ -1,18 +0,0 @@
1
- {# <!--section:code-->```twig #}
2
- <ul>
3
- {%- for link in links %}
4
- <li>
5
- <a href="{{ link.url }}" {% if link.url == current_url %}aria-current="page"{% endif %}>
6
- {{- link.title -}}
7
- </a>
8
- </li>
9
- {%- endfor %}
10
- </ul>
11
- {#```
12
- <!--section:docs-->
13
- Pass the links and the current URL explicitly so nothing else leaks into scope:
14
-
15
- ```twig
16
- {% include 'blades/links.twig' with { links: menu, current_url: app.request.pathInfo } only %}
17
- ```
18
- <!--section--> #}
File without changes
File without changes
File without changes