@anyblades/blades 3.1.0-beta.5 → 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 (77) hide show
  1. package/.prettierrc.json +0 -7
  2. package/README.md +4 -3
  3. package/_includes/.prettierrc.json +12 -0
  4. package/_includes/package.json +10 -0
  5. package/css/blades.css +941 -1804
  6. package/css/blades.min.css +11 -1
  7. package/css/blades.ninja.css +1123 -2264
  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 +941 -1804
  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 +44 -59
  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 +7 -15
  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 +5 -19
  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 +11 -23
  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 +20 -47
  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 +13 -85
  41. package/css/layered/forms/float-label/theme.css +22 -104
  42. package/css/layered/forms/float-label.css +34 -187
  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 +4 -24
  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 +4 -16
  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 +12 -25
  65. package/src/blades/_index.css +9 -9
  66. package/src/blades/forms/float-label/_index.css +2 -2
  67. package/src/blades.css +2 -2
  68. package/src/blades.ninja.css +3 -3
  69. package/src/float-label.css +1 -1
  70. package/src/ninja/_index.css +7 -8
  71. package/src/pico/_index.css +6 -6
  72. package/src/pico/components/_index.css +9 -9
  73. package/src/pico/content/_index.css +8 -8
  74. package/src/pico/forms/_index.css +7 -7
  75. package/src/pico/layout/_index.css +5 -5
  76. package/src/pico.css +2 -2
  77. package/src/ninja/_scroll-to.css +0 -10
package/.prettierrc.json CHANGED
@@ -1,18 +1,11 @@
1
1
  {
2
2
  "printWidth": 120,
3
- "plugins": ["prettier-plugin-jinja-template"],
4
3
  "overrides": [
5
4
  {
6
5
  "files": "*.css",
7
6
  "options": {
8
7
  "printWidth": 100
9
8
  }
10
- },
11
- {
12
- "files": ["*.njk", "*.html"],
13
- "options": {
14
- "parser": "jinja-template"
15
- }
16
9
  }
17
10
  ]
18
11
  }
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [V]: https://img.shields.io/npm/v/@anyblades/blades?label=&color=brightgreen
6
6
  [NEXT_V]: https://img.shields.io/github/v/release/anyblades/blades?include_prereleases&label=next&color=blue
7
7
  [LIC]: https://img.shields.io/badge/license-MIT-blue
8
- [X]: https://img.shields.io/twitter/follow/BladesCSS?label=Twitter
8
+ [X]: https://img.shields.io/badge/78-white?logo=x&style=social
9
9
  [X_URL]: https://x.com/BladesCSS
10
10
  [B]: https://img.shields.io/bluesky/followers/blades.dev?label=
11
11
  [B_URL]: https://bsky.app/profile/blades.dev
@@ -113,6 +113,7 @@ import "@anyblades/blades/layered/forms/basics";
113
113
  // in the component that renders a <dialog>
114
114
  import "@anyblades/blades/layered/components/card";
115
115
  import "@anyblades/blades/layered/components/modal";
116
+ import "@anyblades/blades/layered/components/modal-modern"; // optional: open animation without JS
116
117
  ```
117
118
 
118
119
  ```html
@@ -125,9 +126,9 @@ import "@anyblades/blades/layered/components/modal";
125
126
  ```
126
127
 
127
128
  - Bundlers dedupe JS-side CSS imports and split them per route, so each part is downloaded and cached once and only where it's used.
128
- - Two layered `components/*` parts also carry Blades' own additions, as in `blades.css`: `components/modal` includes the CSS-only open animation for `showModal()`, and `components/dropdown-popover` styles `<ul popover>` / `<menu popover>` menus opened by a button.
129
+ - Blades' own parts are layered too, mostly in the same folders as Pico's: e.g. `components/modal-modern` adds the CSS-only open animation for `showModal()` on top of `components/modal`, and `components/dropdown-popover` styles `<ul popover>` / `<menu popover>` menus opened by a button. The others are `variables-blades`, `layout/columns`, `content/code-block`, `content/icon`, `forms/float-label`, `components/timeline` and `compact` (import it last, see below).
129
130
  - Override in your component's `<style>` or `app.css`, or set `--pico-*` variables on `:root` or on an element. Unlayered CSS always wins over `@layer blades`. The usual layer caveats apply: Blades' own `!important` declarations beat yours, and if you use other layered CSS, declare the order once, before anything else is loaded. For Tailwind v4 that is `@layer theme, base, blades, components, utilities;` at the top of the CSS file you import first (before `@import "tailwindcss"`), and that file has to be imported before any `layered/*` part, because the first `@layer` the browser sees fixes the order.
130
- - Parts don't `@import` the parts they build on (e.g. `components/modal` expects `components/card`, `components/group` and `components/dropdown` expect `content/button` and `forms/basics`, `components/dropdown-popover` expects `components/dropdown`, and the `forms/*` extras expect `forms/basics`). If they did, every route chunk would carry its own copy. Import those shared parts once, at the root or next to the part that needs them; bundlers dedupe the imports.
131
+ - Parts don't `@import` the parts they build on (e.g. `components/modal` expects `components/card`, `components/group` and `components/dropdown` expect `content/button` and `forms/basics`, `components/modal-modern` expects `components/modal`, `components/dropdown-popover` expects `components/dropdown`, and the `forms/*` extras expect `forms/basics`). If they did, every route chunk would carry its own copy. Import those shared parts once, at the root or next to the part that needs them; bundlers dedupe the imports.
131
132
  - An `@import` inside a scoped `<style>` (Svelte, Astro, Vue `scoped`) is processed as that component's own styles. The rules get scoped to the component's markup (Svelte also prunes the unused ones) and are duplicated in every component that imports them.
132
133
  - Landmark padding: `pico.css` and `blades.ninja.css` pad `body > header`, `body > main` and `body > footer` like Pico, which doesn't match when the framework wraps the page in an element (SvelteKit's `<div style="display: contents">`, Next.js pages router `#__next`, Nuxt `#__nuxt`, a SPA's `#root` / `#app`). `blades.css` doesn't pad them; with per-part imports, add `layout/landmarks` (or `layered/layout/landmarks`) for Pico's `body >` padding.
133
134
 
@@ -0,0 +1,12 @@
1
+ {
2
+ "printWidth": 120,
3
+ "plugins": ["prettier-plugin-jinja-template"],
4
+ "overrides": [
5
+ {
6
+ "files": ["*.njk", "*.html"],
7
+ "options": {
8
+ "parser": "jinja-template"
9
+ }
10
+ }
11
+ ]
12
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "private": true,
3
+ "scripts": {
4
+ "lint": "prettier --write 'blades/*.njk'"
5
+ },
6
+ "devDependencies": {
7
+ "prettier": "^3.5.3",
8
+ "prettier-plugin-jinja-template": "^2.1.0"
9
+ }
10
+ }