@7365admin1/layer-common 3.2.2-staging.135 → 3.2.2-staging.136

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.
@@ -13,10 +13,16 @@
13
13
  @update:modelValue="handleFileSelect"
14
14
  @click:clear="handleClear"
15
15
  :hide-input="hasHideInput"
16
+ class="filter-field"
16
17
  >
17
18
  <template v-slot:append v-if="hasLabel">
18
19
  <slot name="append">
19
- <v-btn color="primary" height="50px" @click="openCameraDialog">
20
+ <v-btn
21
+ variant="text"
22
+ class="screen-icon-btn"
23
+ aria-label="Take a picture"
24
+ @click="openCameraDialog"
25
+ >
20
26
  <v-icon>mdi-camera</v-icon>
21
27
  </v-btn>
22
28
  </slot>
@@ -29,7 +35,7 @@
29
35
  <template v-for="(file, index) in files" :key="file.name">
30
36
  <v-chip
31
37
  closable
32
- class="text-wrap text-caption custom-chip"
38
+ class="text-wrap custom-chip file-list__chip"
33
39
  @click:close="removeFile(index)"
34
40
  >
35
41
  <span class="chip-text">{{ file.name }}</span>
@@ -54,16 +60,18 @@
54
60
  width="800"
55
61
  max-width="800"
56
62
  >
57
- <v-card elevation="2" class="d-flex flex-column align-center pa-2">
58
- <v-toolbar>
59
- <v-card-title class="text-h5">Take a Picture</v-card-title>
60
- <v-spacer></v-spacer>
63
+ <v-card elevation="0" class="screen-modal d-flex flex-column align-center">
64
+ <v-card-title class="d-flex align-center">
65
+ Take a Picture
66
+ <v-spacer />
61
67
  <v-btn
62
- color="grey-darken-1"
68
+ variant="text"
63
69
  icon="mdi-close"
70
+ class="screen-modal__close"
71
+ aria-label="Close"
64
72
  @click="closeCameraDialog"
65
73
  ></v-btn>
66
- </v-toolbar>
74
+ </v-card-title>
67
75
 
68
76
  <div
69
77
  id="reader"
@@ -89,15 +97,25 @@
89
97
 
90
98
  <v-row align="center" justify="center">
91
99
  <v-col cols="6">
92
- <v-btn color="primary" icon class="mt-4" @click="switchCamera">
100
+ <v-btn
101
+ variant="text"
102
+ class="screen-icon-btn mt-4"
103
+ aria-label="Switch camera"
104
+ @click="switchCamera"
105
+ >
93
106
  <v-icon>mdi-camera-switch</v-icon>
94
107
  </v-btn>
95
108
  </v-col>
96
109
  <v-col cols="6">
110
+ <!--
111
+ Was `color="secondary"`, which is NOT one of the four theme
112
+ names `utils/theme.ts` maps onto the design's palette - it fell
113
+ through to Vuetify's own secondary and drew an off-palette slab.
114
+ This is the capture button, so it is the design's PRIMARY.
115
+ -->
97
116
  <v-btn
98
- color="secondary"
99
- icon
100
- class="mt-4"
117
+ class="screen-btn-primary mt-4"
118
+ aria-label="Take the picture"
101
119
  @click="captureImageFromCamera"
102
120
  >
103
121
  <v-icon large>mdi-camera-outline</v-icon>
@@ -289,6 +307,21 @@ onUnmounted(() => {
289
307
  </script>
290
308
 
291
309
  <style scoped>
310
+ /**
311
+ * The attachment tags under the field. They were Vuetify's default chip on
312
+ * `text-caption` - a grey pill on the Roboto scale - which is the one thing in
313
+ * the chat composer that did not match the tags the rest of the product draws.
314
+ * The design's tag radius and chip type, on tokens, so it follows the theme.
315
+ */
316
+ .file-list__chip {
317
+ border-radius: var(--r-tag);
318
+ background: var(--hover);
319
+ color: var(--text2);
320
+ font-family: var(--font-sans);
321
+ font-size: var(--fs-chip);
322
+ font-weight: var(--fw-chip);
323
+ }
324
+
292
325
  .custom-chip {
293
326
  max-width: 100%;
294
327
  height: auto !important;
@@ -17,9 +17,10 @@
17
17
  zIndex: 3000
18
18
  }"
19
19
  no-data-text="No countries available"
20
+ class="filter-field"
20
21
  >
21
22
  <template #selection="{ item }">
22
- <span class="text-body-2">{{ item.raw.dialCode }}</span>
23
+ <span class="phone-input__code">{{ item.raw.dialCode }}</span>
23
24
  </template>
24
25
  <template #item="{ item }">
25
26
  <v-list-item-title>
@@ -38,6 +39,7 @@
38
39
  :rules="phoneValidationRules"
39
40
  hide-details="auto"
40
41
  type="tel"
42
+ class="filter-field"
41
43
  @input="handlePhoneInput"
42
44
  />
43
45
  </v-col>
@@ -186,3 +188,21 @@ watch(localDialCode, () => {
186
188
  }
187
189
  });
188
190
  </script>
191
+
192
+ <style scoped>
193
+ /**
194
+ * The dial-code selector and the number beside it. Both were factory Vuetify
195
+ * fields - Roboto, 4px radius, Vuetify's own border - inside forms whose every
196
+ * other field is already the design's. `.filter-field` is that field, and it is
197
+ * what `MemberInformation`, `VehicleForm` and `VisitorForm` already put around
198
+ * this control, so the two halves now match their own row.
199
+ *
200
+ * The selected dial code was `text-body-2`, Vuetify's 14px/400 Roboto scale.
201
+ * It is the same ink as a table cell, so it takes the cell's tokens.
202
+ */
203
+ .phone-input__code {
204
+ font-family: var(--font-sans);
205
+ font-size: var(--fs-cell);
206
+ color: var(--text);
207
+ }
208
+ </style>
@@ -13,7 +13,7 @@
13
13
  :prepend-icon="prop.icon"
14
14
  append-icon="mdi-chevron-down"
15
15
  :to="props.route"
16
- class="text-subtitle-2 font-weight-bold"
16
+ class="switch-context__activator"
17
17
  >
18
18
  <!-- The design prints the organisation and site names in full.
19
19
  Vuetify's list-item title truncates by default, which cut them
@@ -25,8 +25,8 @@
25
25
  </v-list>
26
26
  </template>
27
27
 
28
- <v-card width="300px" rounded="lg" class="pa-4">
29
- <span class="text-subtitle-2 font-weight-bold">
28
+ <v-card width="300px" elevation="0" class="switch-context__panel">
29
+ <span class="switch-context__heading">
30
30
  Switch {{ prop.title }} context
31
31
  </span>
32
32
  <v-text-field
@@ -35,7 +35,7 @@
35
35
  density="compact"
36
36
  width="100%"
37
37
  hide-details
38
- class="mb-2"
38
+ class="filter-field mb-2"
39
39
  >
40
40
  <template #prepend-inner>
41
41
  <v-icon>mdi-magnify</v-icon>
@@ -45,7 +45,7 @@
45
45
  <v-list class="pa-0 my-2" density="compact" max-height="200px">
46
46
  <v-list-item
47
47
  density="compact"
48
- class="text-caption font-weight-bold"
48
+ class="switch-context__row"
49
49
  v-for="item in prop.items"
50
50
  :key="item.value"
51
51
  @click="selectItem(item.value)"
@@ -129,6 +129,55 @@ const selectItem = (value: string) => {
129
129
  </script>
130
130
 
131
131
  <style scoped>
132
+ /**
133
+ * The rail's context selector and the panel it opens.
134
+ *
135
+ * The panel was a factory `v-card` with `pa-4` and Vuetify's `text-subtitle-2`
136
+ * / `text-caption` scale, so it was the one menu in the shell that did NOT
137
+ * match the profile menu the top bar already draws. It takes the SAME surface
138
+ * as `Layout/Header`'s `.app-profile-menu` - 14px radius, the design's menu
139
+ * shadow, a 1px border - rather than a third treatment invented here.
140
+ *
141
+ * The typography utilities also sat on elements that CONTAIN icons
142
+ * (`prepend-icon`, the chevron, the tick), which is the exact shape the central
143
+ * icon-font guard exists to catch. Tokens carry no such risk.
144
+ */
145
+ .switch-context__activator {
146
+ font-size: var(--fs-nav);
147
+ font-weight: 700;
148
+ color: var(--text);
149
+ }
150
+
151
+ .switch-context__panel {
152
+ border-radius: var(--r-menu);
153
+ box-shadow: var(--shadow-menu);
154
+ border: 1px solid var(--border);
155
+ background: var(--card);
156
+ padding: 14px;
157
+ }
158
+
159
+ .switch-context__heading {
160
+ display: block;
161
+ font-size: var(--fs-btn);
162
+ font-weight: 800;
163
+ line-height: 1.3;
164
+ color: var(--text);
165
+ margin-bottom: 10px;
166
+ }
167
+
168
+ /* The profile menu's row, to the pixel - same padding, same radius, same
169
+ weight - because it is the same control one panel over. */
170
+ .switch-context__row {
171
+ border-radius: var(--r-inner-sm);
172
+ font-size: var(--fs-btn);
173
+ font-weight: var(--fw-btn);
174
+ color: var(--text2);
175
+ }
176
+
177
+ .switch-context__row:hover {
178
+ background: var(--hover);
179
+ }
180
+
132
181
  /* Wrap onto a second line instead of truncating - the design shows the full
133
182
  organisation and site names. */
134
183
  .switch-context__name {
@@ -1,12 +1,10 @@
1
1
  <template>
2
- <v-card
3
- width="100%"
4
- variant="outlined"
5
- border="thin"
6
- rounded="lg"
7
- :loading="loading"
8
- >
9
- <v-toolbar density="compact" class="px-3 border-b-sm" color="transparent">
2
+ <v-card width="100%" elevation="0" class="table-card" :loading="loading">
3
+ <v-toolbar
4
+ density="compact"
5
+ class="table-card__toolbar px-3"
6
+ color="transparent"
7
+ >
10
8
  <template #prepend>
11
9
  <v-checkbox v-model="selectAll" hide-details class="mx-1"></v-checkbox>
12
10
 
@@ -17,7 +15,7 @@
17
15
 
18
16
  <template #append>
19
17
  <v-row no-gutters justify="end" align="center">
20
- <span class="mr-2 text-caption text-fontgray">
18
+ <span class="table-card__range mr-2">
21
19
  {{ props.pageRange }}
22
20
  </span>
23
21
  <div class="arrow-navigation">
@@ -41,7 +39,9 @@
41
39
  </template>
42
40
 
43
41
  <template v-if="$slots.extension" v-slot:extension>
44
- <slot name="extension"></slot>
42
+ <div class="table-card__extension">
43
+ <slot name="extension"></slot>
44
+ </div>
45
45
  </template>
46
46
  </v-toolbar>
47
47
  <div :style="{ overflowY: 'auto', height }">
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.135",
5
+ "version": "3.2.2-staging.136",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",