@7365admin1/layer-common 3.2.2-staging.97 → 3.2.2-staging.98

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.
@@ -343,6 +343,31 @@
343
343
  /* The card. */
344
344
  /* ------------------------------------------------------------------ */
345
345
 
346
+ /**
347
+ * THE WIDE-TABLE BLOWOUT.
348
+ *
349
+ * The card sits in a `v-col`, i.e. a flex item, and a flex item's automatic
350
+ * minimum size is its content's minimum - so a table with 8 columns set a
351
+ * ~686px floor the column could not shrink below, and the PAGE scrolled
352
+ * sideways at 360 and 768 instead of the table doing it. `min-width: 0` lets
353
+ * it shrink; the table then scrolls INSIDE the card, which is how the design
354
+ * draws it - the row is deliberately not restacked into key/value blocks,
355
+ * because a column carries meaning by its position. Same decision as
356
+ * `.app-table-scroll` in `primitives.css`.
357
+ *
358
+ * It is on BOTH of this component's own flex boxes - its root `v-row` (which
359
+ * is itself an item of the CALLER's row) and the column holding the card -
360
+ * because the content's minimum walks all the way up the chain, and stopping
361
+ * it at the inner column alone left the page still scrolling sideways.
362
+ */
363
+ .table-card__shrink {
364
+ min-width: 0;
365
+ }
366
+
367
+ .table-card .v-table__wrapper {
368
+ overflow-x: auto;
369
+ }
370
+
346
371
  .table-card {
347
372
  font-family: var(--font-sans);
348
373
  background: var(--card);
@@ -12,7 +12,10 @@
12
12
  -->
13
13
  <template>
14
14
  <div class="app-page-head">
15
- <div>
15
+ <!-- A caller with actions but no page name (the shared table card, when the
16
+ screen has not given it a title) gets just the action group, at the
17
+ left, rather than an empty heading holding a line of blank space. -->
18
+ <div v-if="title || $slots.title || subtitle || $slots.subtitle">
16
19
  <h1 class="app-page-head__title">
17
20
  <slot name="title">{{ title }}</slot>
18
21
  </h1>
@@ -14,7 +14,7 @@
14
14
  passed its own `no-data` slot.
15
15
  -->
16
16
  <template>
17
- <v-row no-gutters>
17
+ <v-row no-gutters class="table-card__shrink">
18
18
  <!--
19
19
  THE DESIGN'S PAGE TITLE (Phase 9).
20
20
 
@@ -29,57 +29,69 @@
29
29
  Placement only. No caller changes, no slot moves, no behaviour: a screen
30
30
  that passes no title renders exactly what it rendered before.
31
31
  -->
32
- <v-col cols="12" v-if="title">
33
- <PageHeader :title="title" />
34
- </v-col>
32
+ <!--
33
+ The actions used to be drawn on a SECOND row underneath that heading,
34
+ which is not where the design puts them - the design's title row is the
35
+ page name on the left and the screen's actions on the right of the SAME
36
+ line, which is why every screen converted so far had to bypass this
37
+ component and draw its own `PageHeader` above it. They are on the title
38
+ row now, in `PageHeader`'s own `actions` slot.
35
39
 
36
- <!-- Top Actions -->
37
- <v-col cols="12" class="mb-2" v-if="canCreate || $slots.actions">
38
- <v-row no-gutters>
39
- <slot name="actions">
40
- <v-col cols="12">
41
- <v-row no-gutters class="ga-2 align-center table-card__actions">
42
- <!--
43
- The design's primary button: the accent fill that may carry a
44
- white label (`--accent-strong`; white on `--accent` is 3.23:1),
45
- 40px, 10px radius, leading icon. Same click, same label.
46
- -->
47
- <v-btn
48
- v-if="canCreate"
49
- class="text-none table-card__primary"
50
- variant="flat"
51
- prepend-icon="mdi-plus"
52
- @click="emits('create')"
53
- >
54
- {{ createLabel }}
55
- </v-btn>
56
- <v-text-field
57
- v-if="canSearch"
58
- v-model="searchInput"
59
- density="compact"
60
- placeholder="Search"
61
- clearable
62
- max-width="300"
63
- append-inner-icon="mdi-magnify"
64
- hide-details
65
- class="table-card__search"
66
- />
67
- <!-- Ghost/secondary, as the design specifies for Scan QR Code. -->
68
- <v-btn
69
- v-if="canScanVisitorQRCode"
70
- text="Scan QR Code"
71
- class="text-none ml-2 table-card__ghost"
72
- variant="outlined"
73
- @click="emits('scan')"
74
- />
75
- </v-row>
76
- </v-col>
77
- </slot>
78
- </v-row>
40
+ Same buttons, same slot name, same content, same events - one row instead
41
+ of two. A screen with no title still gets its actions at the left, where
42
+ they have always been, because the title block is not drawn at all.
43
+ -->
44
+ <v-col cols="12" v-if="title || canCreate || $slots.actions">
45
+ <PageHeader :title="title">
46
+ <template v-if="canCreate || $slots.actions" #actions>
47
+ <slot name="actions">
48
+ <!--
49
+ The design's primary button: the accent fill that may carry a
50
+ white label (`--accent-strong`; white on `--accent` is 3.23:1),
51
+ 40px, 10px radius, leading icon. Same click, same label.
52
+ -->
53
+ <v-btn
54
+ v-if="canCreate"
55
+ class="text-none table-card__primary"
56
+ variant="flat"
57
+ prepend-icon="mdi-plus"
58
+ @click="emits('create')"
59
+ >
60
+ {{ createLabel }}
61
+ </v-btn>
62
+ <v-text-field
63
+ v-if="canSearch"
64
+ v-model="searchInput"
65
+ density="compact"
66
+ placeholder="Search"
67
+ clearable
68
+ max-width="300"
69
+ append-inner-icon="mdi-magnify"
70
+ hide-details
71
+ class="table-card__search"
72
+ />
73
+ <!-- Ghost/secondary, as the design specifies for Scan QR Code. -->
74
+ <v-btn
75
+ v-if="canScanVisitorQRCode"
76
+ text="Scan QR Code"
77
+ class="text-none table-card__ghost"
78
+ variant="outlined"
79
+ @click="emits('scan')"
80
+ />
81
+ </slot>
82
+ </template>
83
+ </PageHeader>
79
84
  </v-col>
80
85
 
81
86
  <!-- Table Card -->
82
- <v-col cols="12">
87
+ <!--
88
+ `table-card__shrink` is the fix for the wide-table blowout: this column is a
89
+ flex item, and a flex item's automatic minimum size is its CONTENT's, so
90
+ a table with enough columns set a floor the column would not shrink below
91
+ and the whole page scrolled sideways at 360 and 768. The table scrolls
92
+ inside the card instead - see `.table-card__shrink` in `screens.css`.
93
+ -->
94
+ <v-col cols="12" class="table-card__shrink">
83
95
  <!--
84
96
  THE DESIGN'S CARD AND ITS IN-CARD TOP ROW (Phase 9).
85
97
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "3.2.2-staging.97",
5
+ "version": "3.2.2-staging.98",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "publishConfig": {