@7365admin1/layer-common 3.2.2-staging.127 → 3.2.2-staging.129

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.
@@ -4,32 +4,25 @@
4
4
  transition="dialog-top-transition"
5
5
  max-width="1000"
6
6
  >
7
- <v-card class="pa-1">
8
- <v-toolbar>
9
- <v-spacer></v-spacer>
10
- <v-btn icon="mdi-close" @click="emit('onCloseDialog')" />
11
- </v-toolbar>
12
- <canvas id="imageCanvas" />
13
- <v-card-title class="text-end">
7
+ <v-card class="screen-modal">
8
+ <div class="draw-image__head">
14
9
  <v-btn
15
- color="orange-darken-3"
16
- size="small"
17
- variant="flat"
18
- style="height: 40px; margin-right: 12px"
19
- @click="onClearDrawing()"
20
- >
10
+ class="screen-modal__close"
11
+ variant="text"
12
+ icon="mdi-close"
13
+ aria-label="Close"
14
+ @click="emit('onCloseDialog')"
15
+ />
16
+ </div>
17
+ <canvas id="imageCanvas" />
18
+ <div class="screen-modal__footer">
19
+ <v-btn class="screen-btn-ghost" variant="outlined" @click="onClearDrawing()">
21
20
  Clear Drawing
22
21
  </v-btn>
23
- <v-btn
24
- color="blue-darken-3"
25
- size="small"
26
- variant="flat"
27
- style="height: 40px"
28
- @click="submit"
29
- >
22
+ <v-btn class="screen-btn-primary" variant="flat" @click="submit">
30
23
  Submit
31
24
  </v-btn>
32
- </v-card-title>
25
+ </div>
33
26
  </v-card>
34
27
  </v-dialog>
35
28
  </template>
@@ -170,3 +163,18 @@ async function onClearDrawing() {
170
163
  ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
171
164
  }
172
165
  </script>
166
+
167
+ <style scoped>
168
+ /* The design's modal has a title row; this dialog has never had a title, only
169
+ a close - so the row keeps that and just moves the close onto the design's
170
+ borderless 32px square. No copy invented. */
171
+ .draw-image__head {
172
+ display: flex;
173
+ justify-content: flex-end;
174
+ padding: 12px 12px 0;
175
+ }
176
+
177
+ /* The canvas itself is untouched: its width/height are computed in script from
178
+ its own bounding box, so a layout rule here would quietly move the drawing
179
+ coordinates - a behaviour change no render can prove. */
180
+ </style>
@@ -13,6 +13,7 @@
13
13
  v-model="month"
14
14
  :items="props.months"
15
15
  label="Month"
16
+ class="filter-field"
16
17
  density="comfortable"
17
18
  :name="props.name + 'custom-input-date-month'"
18
19
  hide-details
@@ -28,6 +29,7 @@
28
29
  label="Day"
29
30
  hide-details
30
31
  placeholder="DD"
32
+ class="filter-field"
31
33
  density="comfortable"
32
34
  :name="props.name + 'custom-input-date-day'"
33
35
  :error="!!validationErrMsg"
@@ -42,6 +44,7 @@
42
44
  label="Year"
43
45
  hide-details
44
46
  placeholder="YYYY"
47
+ class="filter-field"
45
48
  density="comfortable"
46
49
  :name="props.name + 'custom-input-date-year'"
47
50
  :error="!!validationErrMsg"
@@ -11,7 +11,7 @@
11
11
  "
12
12
  >
13
13
  <div
14
- class="d-flex align-center justify-center pa-4 rounded-lg border-dashed border border-grey"
14
+ class="file-drop d-flex align-center justify-center pa-4"
15
15
  @dragover.prevent
16
16
  @drop="handleDrop"
17
17
  style="position: relative; z-index: 1"
@@ -35,12 +35,10 @@
35
35
  class="d-flex align-center"
36
36
  style="z-index: 1; pointer-events: none"
37
37
  >
38
- <v-icon size="28" class="mr-2" color="primary"
38
+ <v-icon size="28" class="file-drop__icon mr-2"
39
39
  >mdi-cloud-upload-outline</v-icon
40
40
  >
41
- <span class="text-body-1 font-weight-medium"
42
- >Drag and drop files here</span
43
- >
41
+ <span class="file-drop__hint">Drag and drop files here</span>
44
42
  </div>
45
43
  </div>
46
44
  </v-col>
@@ -55,11 +53,10 @@
55
53
  "
56
54
  >
57
55
  <v-btn
58
- color="primary-button"
59
- min-width="55"
60
- width="55"
61
- height="55"
56
+ class="screen-btn-primary file-camera"
57
+ variant="flat"
62
58
  elevation="0"
59
+ aria-label="Take a photo"
63
60
  @click="selectAttachment"
64
61
  >
65
62
  <v-icon size="20">mdi-camera-outline</v-icon>
@@ -73,7 +70,7 @@
73
70
  v-for="(file, index) in attachments"
74
71
  :key="index"
75
72
  cols="12"
76
- class="d-flex align-center pa-2 mr-2 mb-2 rounded bg-white border-sm"
73
+ class="file-row d-flex align-center pa-2 mr-2 mb-2"
77
74
  >
78
75
  <div class="mr-3">
79
76
  <!-- <v-img
@@ -108,6 +105,8 @@
108
105
 
109
106
  <v-icon
110
107
  size="small"
108
+ class="file-row__remove"
109
+ aria-label="Remove file"
111
110
  @click.stop="$emit('delete', file)"
112
111
  v-if="
113
112
  props.createdFrom === 'feedback' && props.attachments.length > 0
@@ -234,3 +233,49 @@ defineExpose({
234
233
  },
235
234
  });
236
235
  </script>
236
+
237
+ <style scoped>
238
+ /* The drop zone was `border-dashed border border-grey` with a `primary` glyph -
239
+ `primary` being the FOREGROUND token, used here as an icon colour, and the
240
+ grey a fixed light-theme hairline. */
241
+ .file-drop {
242
+ border: 1px dashed var(--border);
243
+ border-radius: var(--r-inner);
244
+ position: relative;
245
+ z-index: 1;
246
+ }
247
+
248
+ .file-drop__icon {
249
+ color: var(--accent-text);
250
+ }
251
+
252
+ .file-drop__hint {
253
+ font-family: var(--font-sans);
254
+ font-size: var(--fs-cell);
255
+ font-weight: 600;
256
+ color: var(--text);
257
+ }
258
+
259
+ /* Was a 55px square. The design's button is 40px, which is what
260
+ .screen-btn-primary carries; this only keeps it square. */
261
+ .file-camera {
262
+ min-width: var(--btn-h) !important;
263
+ width: var(--btn-h);
264
+ padding: 0 !important;
265
+ }
266
+
267
+ /* Each attachment row was `bg-white border-sm` - a hard white slab drawn on the
268
+ dark theme as well. */
269
+ .file-row {
270
+ background: var(--card);
271
+ border: 1px solid var(--border);
272
+ border-radius: var(--r-inner);
273
+ font-family: var(--font-sans);
274
+ font-size: var(--fs-cell);
275
+ color: var(--text);
276
+ }
277
+
278
+ .file-row__remove {
279
+ color: var(--err);
280
+ }
281
+ </style>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <v-input v-bind="attrs">
3
- <v-card width="100%" v-bind="attrs">
3
+ <v-card class="perm-list screen-card" elevation="0" width="100%" v-bind="attrs">
4
4
  <v-list
5
5
  v-model:selected="selected"
6
6
  lines="two"
@@ -18,14 +18,14 @@
18
18
  <v-list-group :value="permissionKey" fluid>
19
19
  <template v-slot:activator="{ props }">
20
20
  <v-list-item v-bind="props" density="compact">
21
- <span class="text-capitalize">
21
+ <span class="perm-list__group text-capitalize">
22
22
  {{ formatResourceLabel(String(permissionKey)) }}
23
23
  </span>
24
24
 
25
25
  <template #prepend>
26
- <v-chip class="mr-2" small>
26
+ <span class="perm-list__count mr-2">
27
27
  {{ selectedActionCount(String(permissionKey)) }}
28
- </v-chip>
28
+ </span>
29
29
  </template>
30
30
  </v-list-item>
31
31
  </template>
@@ -34,13 +34,13 @@
34
34
  <v-divider></v-divider>
35
35
  <v-list-item v-if="attrs.readonly" density="compact">
36
36
  <template #title class="pl-2">
37
- <span class="text-subtitle-2 text-capitalize">
37
+ <span class="perm-list__title text-capitalize">
38
38
  {{ String(itemKey).replace(/-/g, " ") }}
39
39
  </span>
40
40
  </template>
41
41
 
42
42
  <template #subtitle class="pl-2">
43
- <span class="text-subtitle-2">{{ item.description }}</span>
43
+ <span class="perm-list__sub">{{ item.description }}</span>
44
44
  </template>
45
45
  </v-list-item>
46
46
 
@@ -50,13 +50,13 @@
50
50
  density="compact"
51
51
  >
52
52
  <template #title class="pl-2">
53
- <span class="text-subtitle-2 text-capitalize">
53
+ <span class="perm-list__title text-capitalize">
54
54
  {{ String(itemKey).replace(/-/g, " ") }}
55
55
  </span>
56
56
  </template>
57
57
 
58
58
  <template #subtitle class="pl-2">
59
- <span class="text-subtitle-2 text-capitalize">
59
+ <span class="perm-list__sub text-capitalize">
60
60
  {{ String(item.description).replace(/-/g, " ") }}
61
61
  </span>
62
62
  </template>
@@ -101,3 +101,51 @@ const selectedActionCount = (resource: string) => {
101
101
  .length;
102
102
  };
103
103
  </script>
104
+
105
+ <style scoped>
106
+ .perm-list {
107
+ font-family: var(--font-sans);
108
+ }
109
+
110
+ .perm-list__group {
111
+ font-size: var(--fs-cell);
112
+ font-weight: 600;
113
+ color: var(--text);
114
+ }
115
+
116
+ /**
117
+ * The count beside each permission group. The handoff draws no counter here at
118
+ * all, so this is the neutral chip's own geometry - 999px, 12px/700, the tone
119
+ * wash - rather than a new shape: a `v-chip small`, which is what it was, is
120
+ * 24px of Vuetify grey with its own font.
121
+ */
122
+ .perm-list__count {
123
+ display: inline-flex;
124
+ align-items: center;
125
+ justify-content: center;
126
+ min-width: 24px;
127
+ height: 20px;
128
+ padding: 0 8px;
129
+ border-radius: var(--r-pill);
130
+ background: var(--hover);
131
+ color: var(--text2);
132
+ font-size: var(--fs-chip);
133
+ font-weight: 700;
134
+ }
135
+
136
+ /* A ticked row was Vuetify's own rgb(224,224,224) slab - a light-theme grey
137
+ painted on the dark theme too. Same emphasis, on the design's hover wash. */
138
+ .perm-list :deep(.v-list-item--active) {
139
+ background: var(--hover);
140
+ }
141
+
142
+ .perm-list__title {
143
+ font-size: var(--fs-cell);
144
+ color: var(--text);
145
+ }
146
+
147
+ .perm-list__sub {
148
+ font-size: var(--fs-cell-dense);
149
+ color: var(--muted);
150
+ }
151
+ </style>