@7365admin1/layer-common 3.2.2-staging.111 → 3.2.2-staging.113

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.
@@ -2,69 +2,66 @@
2
2
  <v-dialog
3
3
  :model-value="modelValue"
4
4
  @update:model-value="(v) => emit('update:modelValue', v)"
5
- max-width="450"
5
+ max-width="520"
6
6
  >
7
- <v-card>
8
- <v-toolbar>
9
- <template v-if="$slots.header">
10
- <slot
11
- name="header"
12
- :title="
13
- mode === 'edit' ? `Edit ${entityType}` : `Add New ${entityType}`
14
- "
15
- :onClose="onClose"
16
- />
17
- </template>
18
- <template v-else>
19
- <v-row no-gutters class="fill-height px-6" align="center">
20
- <span class="font-weight-bold text-h6 text-capitalize">{{
21
- mode === "edit" ? `Edit ${entityType}` : `Add New ${entityType}`
22
- }}</span>
23
- </v-row>
24
- </template>
25
- </v-toolbar>
7
+ <!-- 520px is the handoff's `--modal-w`, and the card wears `.screen-modal`
8
+ for the 16px corner, the `--card` surface and the modal shadow. The
9
+ two `v-toolbar`s standing in for the title row and the footer were
10
+ fixed grey slabs that stay grey on the dark theme, and the Create
11
+ button was a hardcoded `color="black"` fill on a `rounded-0` square. -->
12
+ <v-card class="screen-modal">
13
+ <template v-if="$slots.header">
14
+ <slot
15
+ name="header"
16
+ :title="
17
+ mode === 'edit' ? `Edit ${entityType}` : `Add New ${entityType}`
18
+ "
19
+ :onClose="onClose"
20
+ />
21
+ </template>
22
+ <v-card-title v-else class="text-capitalize">{{
23
+ mode === "edit" ? `Edit ${entityType}` : `Add New ${entityType}`
24
+ }}</v-card-title>
26
25
 
27
- <v-card-text>
26
+ <v-card-text class="screen-modal__body">
28
27
  <v-form ref="formRef" v-model="valid">
29
28
  <v-row>
30
29
  <v-col cols="12">
31
30
  <InputLabel for="name" :title="label" required />
32
- <v-text-field v-model="nameValue" :rules="[requiredRule]" />
31
+ <!-- Still a `v-text-field`: Submit is gated on `valid`, which
32
+ only exists because this `:rules` runs. `.filter-field` gives
33
+ it the design's 40px / 10px / 13.5px shape without taking the
34
+ validation away. -->
35
+ <v-text-field
36
+ v-model="nameValue"
37
+ class="filter-field"
38
+ :rules="[requiredRule]"
39
+ />
33
40
  </v-col>
34
41
  </v-row>
35
42
  </v-form>
36
43
  </v-card-text>
37
44
 
38
- <v-toolbar class="pa-0" density="compact">
39
- <v-row no-gutters>
40
- <v-col cols="6" class="pa-0">
41
- <v-btn
42
- block
43
- variant="text"
44
- class="text-none"
45
- size="large"
46
- @click="close"
47
- height="48"
48
- >
49
- Cancel
50
- </v-btn>
51
- </v-col>
45
+ <div class="screen-modal__footer">
46
+ <v-btn
47
+ variant="outlined"
48
+ class="screen-btn-ghost"
49
+ @click="close"
50
+ >
51
+ Cancel
52
+ </v-btn>
52
53
 
53
- <v-col cols="6" class="pa-0">
54
- <v-btn
55
- block
56
- variant="flat"
57
- color="black"
58
- class="text-none font-weight-bold rounded-0"
59
- height="48"
60
- :loading="submitting"
61
- @click="submit"
62
- >
63
- {{ mode === "edit" ? "Save" : "Create" }}
64
- </v-btn>
65
- </v-col>
66
- </v-row>
67
- </v-toolbar>
54
+ <!-- Kept a `v-btn`: `loading` is the only in-flight signal this form
55
+ has, and `AppButton` has no equivalent. -->
56
+ <v-btn
57
+ variant="flat"
58
+ class="screen-btn-primary"
59
+ :loading="submitting"
60
+ @click="submit"
61
+ >
62
+ {{ mode === "edit" ? "Save" : "Create" }}
63
+ </v-btn>
64
+ </div>
68
65
  </v-card>
69
66
  </v-dialog>
70
67
  </template>
@@ -1,74 +1,62 @@
1
1
  <template>
2
- <v-card width="100%">
3
- <v-toolbar>
4
- <template v-if="$slots.header">
5
- <slot name="header" :title="title" :onClose="onClose" />
6
- </template>
7
- <template v-else>
8
- <v-row no-gutters class="fill-height px-6" align="center">
9
- <span class="font-weight-bold text-h5 text-capitalize">{{
10
- title
11
- }}</span>
12
- </v-row>
13
- </template>
14
- </v-toolbar>
2
+ <!-- The schedule-area copy of `Dialog/UpdateMoreAction`, converted the same
3
+ way: two `v-toolbar`s (fixed grey slabs that stay grey on the dark
4
+ theme) for the title row and the footer, and a hardcoded `color="black"`
5
+ fill on a square 48px tile. -->
6
+ <v-card class="screen-modal" width="100%">
7
+ <template v-if="$slots.header">
8
+ <slot name="header" :title="title" :onClose="onClose" />
9
+ </template>
10
+ <v-card-title v-else class="text-capitalize">{{ title }}</v-card-title>
15
11
 
16
- <v-card-text style="max-height: 100vh; overflow-y: auto" class="pb-0">
12
+ <v-card-text class="screen-modal__body pb-0">
17
13
  <slot name="content" />
18
14
  </v-card-text>
19
15
 
20
- <v-toolbar class="pa-0" density="compact">
21
- <v-row no-gutters>
22
- <v-col cols="6" class="pa-0">
16
+ <div class="screen-modal__footer">
17
+ <v-btn
18
+ variant="outlined"
19
+ class="screen-btn-ghost"
20
+ @click="emit('close')"
21
+ >
22
+ Close
23
+ </v-btn>
24
+
25
+ <v-menu>
26
+ <template #activator="{ props }">
23
27
  <v-btn
24
- block
25
- variant="text"
26
- class="text-none"
27
- size="large"
28
- @click="emit('close')"
29
- height="48"
28
+ variant="flat"
29
+ class="screen-btn-primary"
30
+ v-bind="props"
30
31
  >
31
- Close
32
+ More actions
32
33
  </v-btn>
33
- </v-col>
34
-
35
- <v-col cols="6" class="pa-0">
36
- <v-menu>
37
- <template #activator="{ props }">
38
- <v-btn
39
- block
40
- variant="flat"
41
- color="black"
42
- class="text-none"
43
- height="48"
44
- v-bind="props"
45
- tile
46
- >
47
- More actions
48
- </v-btn>
49
- </template>
34
+ </template>
50
35
 
51
- <v-list class="pa-0">
52
- <v-list-item v-if="canUpdate" @click="emit('edit')">
53
- <v-list-item-title class="text-subtitle-2">
54
- {{ editButtonLabel }}
55
- </v-list-item-title>
56
- </v-list-item>
36
+ <!-- Dropdown shape left as Vuetify draws it - the handoff specifies
37
+ the profile dropdown only. `text-red` (Vuetify's fixed #f44336,
38
+ the same red on both themes) becomes `text-error`, which is
39
+ `--v-theme-error`, i.e. the design's `--err`, matching the
40
+ handoff's "red Logout row (err color, err-bg hover)". -->
41
+ <v-list class="pa-0 area-more__list">
42
+ <v-list-item v-if="canUpdate" @click="emit('edit')">
43
+ <v-list-item-title>
44
+ {{ editButtonLabel }}
45
+ </v-list-item-title>
46
+ </v-list-item>
57
47
 
58
- <v-list-item
59
- v-if="canDelete"
60
- @click="emit('delete')"
61
- class="text-red"
62
- >
63
- <v-list-item-title class="text-subtitle-2">
64
- {{ deleteButtonLabel }}
65
- </v-list-item-title>
66
- </v-list-item>
67
- </v-list>
68
- </v-menu>
69
- </v-col>
70
- </v-row>
71
- </v-toolbar>
48
+ <v-list-item
49
+ v-if="canDelete"
50
+ @click="emit('delete')"
51
+ class="text-error"
52
+ >
53
+ <v-list-item-title>
54
+ {{ deleteButtonLabel }}
55
+ </v-list-item-title>
56
+ </v-list-item>
57
+ </v-list>
58
+ </v-menu>
59
+ </div>
72
60
  </v-card>
73
61
  </template>
74
62
 
@@ -106,4 +94,11 @@ const {
106
94
  } = prop;
107
95
  </script>
108
96
 
109
- <style scoped></style>
97
+ <style scoped>
98
+ /* `text-subtitle-2` was Vuetify's 0.875rem/500; the handoff names no type for
99
+ a menu row, so it takes the established cell type. */
100
+ .area-more__list :deep(.v-list-item-title) {
101
+ font-size: var(--fs-cell);
102
+ font-weight: var(--fw-cell);
103
+ }
104
+ </style>
@@ -1,21 +1,29 @@
1
1
  <template>
2
- <v-card width="100%">
3
- <v-toolbar>
4
- <v-row no-gutters class="fill-height px-6" align="center">
5
- <span class="font-weight-bold text-h5">
6
- {{ props.title }}
7
- </span>
8
- </v-row>
9
- </v-toolbar>
10
- <v-card-text style="max-height: 100vh; overflow-y: auto">
2
+ <!--
3
+ A dialog card, so it wears `.screen-modal` (16px corner, the modal shadow,
4
+ the `--card` surface) rather than Vuetify's 4px factory card. The two
5
+ `v-toolbar`s this used to have were grey slabs standing in for a title row
6
+ and a footer; a `v-card-title` and a `v-card-actions` are those two rows
7
+ without the slab, and they follow the theme instead of staying grey in dark.
8
+ -->
9
+ <v-card width="100%" class="screen-modal">
10
+ <v-card-title>{{ props.title }}</v-card-title>
11
+
12
+ <v-card-text class="screen-modal__body">
11
13
  <v-form v-model="validForm" :disabled="disable">
12
14
  <v-row no-gutters>
13
15
  <v-col cols="12" class="mt-2">
14
16
  <v-row no-gutters>
15
17
  <InputLabel class="text-capitalize" title="Email" required />
16
18
  <v-col cols="12">
19
+ <!-- Still a `v-text-field`, not an `AppField`: the Submit
20
+ button is gated on `validForm`, which only exists because
21
+ these `:rules` run. `.filter-field` is the established way
22
+ to give a Vuetify input the design's 40px/10px/13.5px shape
23
+ without taking its validation away. -->
17
24
  <v-text-field
18
25
  v-model="email"
26
+ class="filter-field"
19
27
  density="comfortable"
20
28
  :rules="[requiredRule, emailRule]"
21
29
  ></v-text-field>
@@ -38,27 +46,28 @@
38
46
  </v-form>
39
47
  </v-card-text>
40
48
 
41
- <v-toolbar>
42
- <v-row class="px-6">
43
- <v-col cols="6">
49
+ <!-- The two-across, full-width footer is kept: the handoff draws no modal,
50
+ so its layout is not specified and changing it would be invention.
51
+ What changes is the chrome - `color="black"` was a hardcoded fill that
52
+ ignored the theme, and the bare text Cancel had no shape at all. -->
53
+ <v-card-actions class="screen-modal__footer">
54
+ <v-row class="px-4" no-gutters>
55
+ <v-col cols="6" class="pr-2">
44
56
  <v-btn
45
57
  block
46
- variant="text"
47
- class="text-none"
48
- size="large"
58
+ variant="outlined"
59
+ class="text-none screen-btn-ghost"
49
60
  @click="cancel"
50
61
  >
51
62
  Cancel
52
63
  </v-btn>
53
64
  </v-col>
54
65
 
55
- <v-col cols="6">
66
+ <v-col cols="6" class="pl-2">
56
67
  <v-btn
57
68
  block
58
69
  variant="flat"
59
- color="black"
60
- class="text-none"
61
- size="large"
70
+ class="text-none screen-btn-primary"
62
71
  :disabled="!validForm"
63
72
  @click="submit"
64
73
  >
@@ -66,7 +75,7 @@
66
75
  </v-btn>
67
76
  </v-col>
68
77
  </v-row>
69
- </v-toolbar>
78
+ </v-card-actions>
70
79
  </v-card>
71
80
  </template>
72
81
 
@@ -1,37 +1,36 @@
1
1
  <template>
2
- <v-card
3
- v-if="invitation"
4
- width="100%"
5
- rounded="lg"
6
- variant="outlined"
7
- border="thin"
8
- class="sp-invite-prompt"
9
- >
10
- <v-card-item>
11
- <template #prepend>
12
- <v-avatar color="primary" variant="tonal" size="44">
13
- <v-icon>mdi-office-building-marker-outline</v-icon>
14
- </v-avatar>
15
- </template>
16
- <v-card-title class="text-wrap sp-invite-prompt-title">
17
- {{ invitation.orgName }} has invited you to {{ invitation.siteName }}
18
- </v-card-title>
19
- <v-card-subtitle class="text-wrap">
20
- Approved by Seven365 · {{ expiryLine }}
21
- </v-card-subtitle>
22
- </v-card-item>
2
+ <!-- `AppCard` is the design's card - 14px radius, a 1px `--border` rule and
3
+ the one-pixel shadow on `--card`. The `v-card rounded="lg"
4
+ variant="outlined"` it replaced was Vuetify's own card at its own
5
+ radius and border weight. -->
6
+ <AppCard v-if="invitation" class="sp-invite-prompt">
7
+ <div class="d-flex align-start ga-3 pa-4">
8
+ <v-avatar color="primary" variant="tonal" size="44">
9
+ <v-icon>mdi-office-building-marker-outline</v-icon>
10
+ </v-avatar>
11
+ <div class="flex-grow-1">
12
+ <div class="screen-card-title">
13
+ {{ invitation.orgName }} has invited you to {{ invitation.siteName }}
14
+ </div>
15
+ <div class="screen-hint sp-invite-prompt__sub">
16
+ Approved by Seven365 · {{ expiryLine }}
17
+ </div>
18
+ </div>
19
+ </div>
23
20
 
24
- <v-card-text class="text-body-2">
21
+ <div class="px-4 sp-invite-prompt__body">
25
22
  {{ invitation.orgName }} would like your company to provide services at
26
23
  <strong>{{ invitation.siteName }}</strong
27
24
  >. If you accept, this site will be added to your list of sites.
28
- </v-card-text>
25
+ </div>
29
26
 
30
- <v-card-actions class="px-4 pb-4">
27
+ <div class="d-flex align-center ga-2 px-4 py-4">
28
+ <!-- Both stay `v-btn`s: `loading` is the only signal that an accept or a
29
+ decline is in flight, and `AppButton` has no equivalent. They take
30
+ the design's two button classes instead. -->
31
31
  <v-btn
32
32
  variant="flat"
33
- color="primary"
34
- class="text-none"
33
+ class="screen-btn-primary"
35
34
  :loading="working === 'accept'"
36
35
  :disabled="Boolean(working) || !open"
37
36
  @click="accept"
@@ -40,7 +39,7 @@
40
39
  </v-btn>
41
40
  <v-btn
42
41
  variant="outlined"
43
- class="text-none ml-2"
42
+ class="screen-btn-ghost"
44
43
  :loading="working === 'decline'"
45
44
  :disabled="Boolean(working) || !open"
46
45
  @click="decline"
@@ -48,21 +47,21 @@
48
47
  Decline
49
48
  </v-btn>
50
49
  <v-spacer />
51
- <v-chip
50
+ <!-- Was a raw `v-chip` on Vuetify's fixed `success` green, or no colour
51
+ at all for every other outcome. `StatusChip` maps the status WORD
52
+ through the shared `utils/status.ts` tones, so "complete" and
53
+ "declined" come out the same colours they do everywhere else. -->
54
+ <StatusChip
52
55
  v-if="!open"
53
- size="small"
54
- variant="tonal"
55
- class="text-none"
56
- :color="invitation.status === 'complete' ? 'success' : undefined"
57
- >
58
- {{ invitation.statusLabel }}
59
- </v-chip>
60
- </v-card-actions>
61
- </v-card>
56
+ :status="invitation.status"
57
+ :label="invitation.statusLabel"
58
+ />
59
+ </div>
60
+ </AppCard>
62
61
 
63
- <v-card v-else-if="error" width="100%" rounded="lg" variant="outlined" border="thin">
64
- <v-card-text class="text-body-2">{{ error }}</v-card-text>
65
- </v-card>
62
+ <AppCard v-else-if="error">
63
+ <div class="pa-4 sp-invite-prompt__body">{{ error }}</div>
64
+ </AppCard>
66
65
  </template>
67
66
 
68
67
  <script setup lang="ts">
@@ -142,9 +141,15 @@ await load();
142
141
  </script>
143
142
 
144
143
  <style scoped>
145
- .sp-invite-prompt-title {
146
- font-size: 1.05rem;
147
- font-weight: 600;
144
+ /* The title was a hand-set 1.05rem/600; `.screen-card-title` is the design's
145
+ 15.5px/800, so only the wrap and the leading are left here. */
146
+ .sp-invite-prompt :deep(.screen-card-title) {
147
+ display: block;
148
148
  line-height: 1.35;
149
149
  }
150
+
151
+ .sp-invite-prompt__sub,
152
+ .sp-invite-prompt__body {
153
+ font-size: var(--fs-cell);
154
+ }
150
155
  </style>
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.111",
5
+ "version": "3.2.2-staging.113",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "publishConfig": {