eco-vue-js 0.28.0 → 0.28.1

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.
@@ -70,6 +70,36 @@ Frame variables are sizes too: `pt---header-height`, `pl---nav-bar-width`, `px--
70
70
 
71
71
  On a page (`w-page`) and in modals, content beside a wide list stays in view automatically while it scrolls sideways (see [List page](../recipes/list-page.md#content-beside-the-list)). Pages don't use these sizes for positioning — they're for what the kit doesn't place, like a fixed overlay.
72
72
 
73
+ ### The page box
74
+
75
+ The content box is where text starts. The page box is where sections and cards sit: the content box less the gutter a card or glass layout's sections reach into. In flat they're the same. Place anything that should line up with the sections, such as a side panel over the page or a toolbar of your own, by the page box:
76
+
77
+ | Variable | Utility size | Value |
78
+ | --- | --- | --- |
79
+ | `--w-page-top` | `---page-top` | Under the header bar, and its gap where the bars float. |
80
+ | `--w-page-bottom` | `---page-bottom` | The gap off the screen's bottom edge where the bars float, `0` docked. |
81
+ | `--w-page-left` | `---page-left` | The sections' left edge; `0` on phones, where they span the screen. |
82
+ | `--w-page-right` | `---page-right` | The same on the right. |
83
+ | `--w-page-width` | `---page-width` | Between the two. |
84
+ | `--w-page-height` | `---page-height` | Between the top and the bottom. |
85
+
86
+ ```vue
87
+ <aside class="fixed top---page-top bottom---page-bottom right---page-right w-96 rounded-lg">
88
+ ```
89
+
90
+ These and the content box are the layout variables to build on. The ones they're made of — the frame margins, `--w-chrome-gap`, `--w-page-bleed`, the bar widths — are theme tokens and may change with the layout.
91
+
92
+ ### Backdrops
93
+
94
+ A backdrop of the app's own, such as behind a side panel, takes `w-page-backdrop`: it covers the page and the bars and leaves the header bar's row out, so the header stays sharp and its search and menus stay usable. Put it above the nav (`z-index` over 30) and the panel above it:
95
+
96
+ ```vue
97
+ <button class="w-page-backdrop fixed inset-0 z-38 backdrop-blur-sm" @click="close" />
98
+ <aside class="fixed top---page-top bottom---page-bottom right---page-right z-39 w-96">
99
+ ```
100
+
101
+ The header's background is one blurred box, which grows over a stuck list toolbar when the bars are docked, so a backdrop can't go between the header and the page: it leaves the header out instead.
102
+
73
103
  ## Layout component
74
104
 
75
105
  The root layout mounts the three bars; its main area is `w-page`, which pads content by the frame (see [Page layout](../recipes/page-layout.md)):
package/docs/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # eco-vue-js
2
2
 
3
- > Vue 3 UI kit with Tailwind v4 — components, utilities, icons and recipes. These are the docs of version 0.28.0, the one installed next to them. Start with Getting started and Conventions; each component page lists its props, events and slots with examples.
3
+ > Vue 3 UI kit with Tailwind v4 — components, utilities, icons and recipes. These are the docs of version 0.28.1, the one installed next to them. Start with Getting started and Conventions; each component page lists its props, events and slots with examples.
4
4
 
5
5
  Release notes, for what changed between versions: https://github.com/rsmple/eco-vue-js/releases. The docs site, with live demos: https://rsmple.github.io/eco-vue-js/
6
6
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.28.0",
7
+ "version": "0.28.1",
8
8
  "homepage": "https://rsmple.github.io/eco-vue-js/",
9
9
  "dependencies": {
10
10
  "@eslint/css-tree": "4.1.2",
@@ -166,8 +166,8 @@
166
166
  :root[data-w-page-table] & {
167
167
  @variant sm {
168
168
  position: sticky;
169
- left: calc(var(--w-left-inner) - var(--w-page-bleed, 0px));
170
- max-width: calc(var(--w-width-inner) + var(--w-page-bleed, 0px) * 2);
169
+ left: var(--w-page-left);
170
+ max-width: var(--w-page-width);
171
171
  }
172
172
  }
173
173
  }
@@ -256,8 +256,8 @@
256
256
  :root[data-w-page-table] & {
257
257
  @variant sm {
258
258
  position: sticky;
259
- left: calc(var(--w-left-inner) - var(--w-page-bleed, 0px));
260
- max-width: calc(var(--w-width-inner) + var(--w-page-bleed, 0px) * 2);
259
+ left: var(--w-page-left);
260
+ max-width: var(--w-page-width);
261
261
  }
262
262
  }
263
263
  }
@@ -302,6 +302,30 @@
302
302
  }
303
303
  }
304
304
 
305
+ /*
306
+ * A backdrop of the app's own over the page and the bars, such as behind a side panel, that leaves the header bar out:
307
+ * the header stays sharp and usable, and the nav and the page dim. The header's background is one blurred box, as a
308
+ * second one beside it would draw an edge where they meet, so the backdrop cuts the header's row out of itself rather
309
+ * than stacking under the header. Below the header's row, where a docked header grows over a stuck list toolbar, it
310
+ * covers the toolbar with the page.
311
+ */
312
+ @utility w-page-backdrop {
313
+ --w-backdrop-hole-left: calc(var(--w-left-inner) - var(--inner-margin, 0px));
314
+ --w-backdrop-hole-right: calc(100% - var(--w-right-inner) + var(--inner-margin, 0px));
315
+ --w-backdrop-hole-top: var(--w-chrome-gap);
316
+ --w-backdrop-hole-bottom: calc(var(--w-chrome-gap) + var(--header-height, 0px));
317
+
318
+ clip-path: polygon(
319
+ evenodd,
320
+ 0 0, 100% 0, 100% 100%, 0 100%, 0 0,
321
+ var(--w-backdrop-hole-left) var(--w-backdrop-hole-top),
322
+ var(--w-backdrop-hole-right) var(--w-backdrop-hole-top),
323
+ var(--w-backdrop-hole-right) var(--w-backdrop-hole-bottom),
324
+ var(--w-backdrop-hole-left) var(--w-backdrop-hole-bottom),
325
+ var(--w-backdrop-hole-left) var(--w-backdrop-hole-top)
326
+ );
327
+ }
328
+
305
329
  /* Reaches into the page gutter like a section: for a row of cards on the canvas. On phones the cards keep the page inset. */
306
330
  @utility w-page-bleed {
307
331
  margin-inline: calc(var(--w-page-bleed, 0px) * -1);
@@ -313,8 +337,8 @@
313
337
  :root[data-w-page-table] & {
314
338
  @variant sm {
315
339
  position: sticky;
316
- left: calc(var(--w-left-inner) - var(--w-page-bleed, 0px));
317
- max-width: calc(var(--w-width-inner) + var(--w-page-bleed, 0px) * 2);
340
+ left: var(--w-page-left);
341
+ max-width: var(--w-page-width);
318
342
  }
319
343
  }
320
344
  }
@@ -710,6 +734,11 @@
710
734
  top: var(--w-chrome-gap);
711
735
  padding-left: calc(var(--w-left-inner) - var(--inner-margin, 0px));
712
736
  padding-right: calc(var(--w-right-inner) - var(--inner-margin, 0px));
737
+
738
+ /* On phones the page's inset leaves out the gap the bars float off the screen edges by: the header keeps it. */
739
+ @variant sm-not {
740
+ padding-inline: var(--w-chrome-gap);
741
+ }
713
742
  }
714
743
 
715
744
  /*
@@ -722,6 +751,10 @@
722
751
  /* Floating, from the page's edges less its inner margin: the edges of the sections under it. */
723
752
  left: calc((var(--w-left-inner) - var(--inner-margin, 0px)) * var(--w-chrome-float));
724
753
  right: calc((var(--w-right-inner) - var(--inner-margin, 0px)) * var(--w-chrome-float));
754
+
755
+ @variant sm-not {
756
+ inset-inline: var(--w-chrome-gap);
757
+ }
725
758
  border: var(--w-chrome-border) solid var(--w-line-subtle);
726
759
  border-radius: calc(var(--w-chrome-rounded) * var(--w-chrome-float));
727
760
  backdrop-filter: var(--w-chrome-backdrop, blur(8px));
@@ -1144,8 +1177,11 @@
1144
1177
  }
1145
1178
  }
1146
1179
 
1147
- /* What a page sets in the list's header, such as its title, keeps the page inset there. */
1148
- .w-list-page .w-list-header {
1180
+ /*
1181
+ * What a page sets in the list's header, such as its title, and a row's expansion keep the page inset there, as the
1182
+ * rows' content does.
1183
+ */
1184
+ .w-list-page :is(.w-list-header, .w-list-item-expansion) {
1149
1185
  @variant sm-not {
1150
1186
  padding-inline: var(--w-page-inset, 0px);
1151
1187
  }
@@ -1196,7 +1232,7 @@
1196
1232
  top: var(--w-header-inner);
1197
1233
  height: min(
1198
1234
  calc(100% + var(--w-section-padding) * 2),
1199
- calc(100vh - var(--w-header-inner) - var(--w-chrome-gap))
1235
+ var(--w-page-height)
1200
1236
  );
1201
1237
  }
1202
1238
  }
@@ -1514,9 +1550,11 @@
1514
1550
 
1515
1551
  /*
1516
1552
  * The edge, over the canvas: from the section's padding above the stuck header down to its bottom. It stays over
1517
- * the section while the list scrolls sideways under it, as the frame does. The frame casts its shadow.
1553
+ * the section while the list scrolls sideways under it, as the frame does. The frame casts its shadow. It only
1554
+ * paints: its canvas reaches up over the header bar, and would take the header's clicks.
1518
1555
  */
1519
1556
  .w-list-page .w-infinite-list-header-edge {
1557
+ pointer-events: none;
1520
1558
  position: sticky;
1521
1559
  left: var(--w-band-start);
1522
1560
  z-index: -1;
@@ -141,6 +141,12 @@
141
141
  --spacing---width-inner: var(--w-width-inner);
142
142
  --spacing---height-inner: var(--w-height-inner);
143
143
  --spacing---bottom-inner: var(--w-bottom-inner);
144
+ --spacing---page-top: var(--w-page-top);
145
+ --spacing---page-bottom: var(--w-page-bottom);
146
+ --spacing---page-left: var(--w-page-left);
147
+ --spacing---page-right: var(--w-page-right);
148
+ --spacing---page-width: var(--w-page-width);
149
+ --spacing---page-height: var(--w-page-height);
144
150
  --spacing---modal-header-height: var(--w-modal-header-height, 0px);
145
151
  --spacing---modal-footer-height: var(--w-modal-footer-height, 0px);
146
152
  --spacing---modal-content-height: var(--w-modal-content-height, 0px);
@@ -20,6 +20,24 @@ const pluginDefault = plugin(function ({addBase, addUtilities, theme}) {
20
20
  // In a page list, the section's bottom edge stuck to the bottom of the screen counts too.
21
21
  '--w-bottom-inner': 'var(--w-list-end-inner, 0px)',
22
22
  '--w-height-inner': 'calc(100vh - var(--w-top-inner, 0px) - var(--w-bottom-inner, 0px))',
23
+
24
+ // The page box: where sections and cards sit, the content box less the gutter they reach into.
25
+ '--w-page-top': 'var(--w-header-inner)',
26
+ '--w-page-bottom': 'var(--w-chrome-gap, 0px)',
27
+ '--w-page-left': 'calc(var(--w-left-inner) - var(--w-page-bleed, 0px))',
28
+ '--w-page-right': 'calc(var(--w-right-inner) - var(--w-page-bleed, 0px))',
29
+ '--w-page-width': 'calc(100vw - var(--vw-scroll-bar-width, 0px) - var(--w-page-left) - var(--w-page-right))',
30
+ '--w-page-height': 'calc(100vh - var(--w-page-top) - var(--w-page-bottom))',
31
+ },
32
+ // On phones nothing is beside the page: sections span the screen and the content keeps the inner margin, even where
33
+ // the bars float off the screen edges.
34
+ '@media (width < 40rem)': {
35
+ '*': {
36
+ '--w-left-inner': 'calc(var(--w-left-margin, 0px) + var(--nav-bar-width, 0px) + var(--inner-margin, 0px))',
37
+ '--w-right-inner': 'calc(var(--w-right-margin, 0px) + var(--actions-bar-width, 0px) + var(--inner-margin, 0px))',
38
+ '--w-page-left': '0px',
39
+ '--w-page-right': '0px',
40
+ },
23
41
  },
24
42
  '.w-modal-wrapper *': {
25
43
  '--w-left-inner': 'var(--w-modal-wrapper-padding, 0px)',