@7365admin1/layer-common 3.2.2-staging.114 → 3.2.2-staging.118

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.
@@ -35,8 +35,7 @@
35
35
  />
36
36
  </span>
37
37
  </v-row>
38
- <v-card class="mt-2">
39
- <v-card-text>
38
+ <AppCard class="mt-2 pa-4">
40
39
  <template
41
40
  v-for="(slot, index) in overnightParkingSlotsArray"
42
41
  :key="slot.day"
@@ -44,9 +43,12 @@
44
43
  <v-row no-gutters class="mb-4">
45
44
  <v-col
46
45
  cols="12"
47
- class="text-capitalize mb-2 text-subtitle-1 d-flex align-center justify-space-between"
46
+ class="text-capitalize mb-2 d-flex align-center justify-space-between"
48
47
  >
49
- <span class="font-weight-black">{{ slot.day }}</span>
48
+ <span class="screen-card-title">{{ slot.day }}</span>
49
+ <!-- `black-lighten-1` is a literal black: on the dark theme
50
+ the off state was a black tick on a #1c1e24 card. Both
51
+ states take a token now. -->
50
52
  <v-icon
51
53
  :icon="
52
54
  slot?.isEnabled
@@ -54,10 +56,10 @@
54
56
  : 'mdi-check-circle-outline'
55
57
  "
56
58
  size="20"
57
- :class="{ 'cursor-pointer': !viewMode }"
58
- :color="
59
- slot.isEnabled ? 'green-darken-2' : 'black-lighten-1'
60
- "
59
+ :class="[
60
+ { 'cursor-pointer': !viewMode },
61
+ slot.isEnabled ? 'day-tick--on' : 'day-tick--off',
62
+ ]"
61
63
  @click="!viewMode && toggleEnabled(slot.day)"
62
64
  />
63
65
  </v-col>
@@ -91,7 +93,7 @@
91
93
 
92
94
  <v-col v-if="!viewMode" cols="12" class="mt-1">
93
95
  <div
94
- class="d-flex align-center ga-1 cursor-pointer text-caption text-medium-emphasis"
96
+ class="d-flex align-center ga-1 cursor-pointer screen-hint apply-link"
95
97
  @click="applyToOtherDays(slot.day)"
96
98
  >
97
99
  <v-icon icon="mdi-content-copy" size="14" />
@@ -107,10 +109,10 @@
107
109
  </template>
108
110
 
109
111
  <v-col cols="12" align="end">
112
+ <!-- Stays a `v-btn`: `:loading` is the only in-flight signal on
113
+ this form and AppButton has none. Tokenised instead. -->
110
114
  <v-btn
111
- color="primary"
112
- class="text-none mt-2"
113
- size="large"
115
+ class="screen-btn-primary mt-2"
114
116
  :loading="loading.updating"
115
117
  variant="flat"
116
118
  text="Save"
@@ -118,8 +120,7 @@
118
120
  @click="handleSave('save')"
119
121
  />
120
122
  </v-col>
121
- </v-card-text>
122
- </v-card>
123
+ </AppCard>
123
124
  </v-col>
124
125
  </v-row>
125
126
  </v-form>
@@ -132,12 +133,10 @@
132
133
  />
133
134
 
134
135
  <v-dialog v-model="applyDialog.open" max-width="360" persistent>
135
- <v-card>
136
- <v-card-title class="text-subtitle-1 font-weight-bold pt-4 px-4"
137
- >Apply to days</v-card-title
138
- >
139
- <v-card-text class="px-4 pb-2">
140
- <p class="text-caption text-medium-emphasis mb-3">
136
+ <v-card class="screen-modal">
137
+ <v-card-title class="pt-4 px-4">Apply to days</v-card-title>
138
+ <v-card-text class="screen-modal__body px-4 pb-2">
139
+ <p class="screen-hint apply-link mb-3">
141
140
  Select the days to apply
142
141
  <span class="font-weight-bold text-capitalize">{{
143
142
  applyDialog.sourceDay
@@ -154,21 +153,45 @@
154
153
  class="text-capitalize"
155
154
  />
156
155
  </v-card-text>
157
- <v-card-actions class="px-4 pb-4">
156
+ <!-- `ga-2`: v-card-actions only spaces `.v-btn` children, and these are
157
+ the design's own buttons - without it Cancel and Apply touch. -->
158
+ <v-card-actions class="px-4 pb-4 ga-2">
158
159
  <v-spacer />
159
- <v-btn variant="text" @click="applyDialog.open = false">Cancel</v-btn>
160
- <v-btn
161
- color="primary"
162
- variant="flat"
160
+ <AppButton variant="ghost" @click="applyDialog.open = false">
161
+ Cancel
162
+ </AppButton>
163
+ <AppButton
163
164
  :disabled="!applyDialog.targetDays.some((d) => d.selected)"
164
165
  @click="confirmApply"
165
- >Apply</v-btn
166
166
  >
167
+ Apply
168
+ </AppButton>
167
169
  </v-card-actions>
168
170
  </v-card>
169
171
  </v-dialog>
170
172
  </template>
171
173
 
174
+ <style scoped>
175
+ /* The prototype names no colour for a per-day enable tick, so it takes the
176
+ design's own success / muted semantics rather than two literal Vuetify
177
+ greys - the off state was `black-lighten-1`, which stayed black on the dark
178
+ theme's card. */
179
+ .day-tick--on {
180
+ /* `--ok`, not `--success`: the token is named for the design's tone, and an
181
+ undefined custom property makes the whole declaration invalid, so the tick
182
+ silently inherited `--text` instead. */
183
+ color: var(--ok);
184
+ }
185
+
186
+ .day-tick--off {
187
+ color: var(--muted);
188
+ }
189
+
190
+ .apply-link {
191
+ font-size: var(--fs-breadcrumb);
192
+ }
193
+ </style>
194
+
172
195
  <script setup lang="ts">
173
196
  const props = defineProps({
174
197
  viewMode: {
@@ -152,7 +152,10 @@
152
152
  Delivery Companies
153
153
  </v-expansion-panel-title>
154
154
  <v-expansion-panel-text class="">
155
- <DeliveryCompany :site="siteId" v-model:initial="deliveryCompanies" @refresh-site="refreshSiteData"
155
+ <!-- The panel above already names this section, and the component
156
+ prints its own name unless told not to - so without hide-title
157
+ the words "Delivery Companies" appear twice on the open panel. -->
158
+ <DeliveryCompany :site="siteId" hide-title v-model:initial="deliveryCompanies" @refresh-site="refreshSiteData"
156
159
  @update:companiesValue="handleUpdateCompanies" :read-only="!canManageSiteSettings" />
157
160
  </v-expansion-panel-text>
158
161
  </v-expansion-panel>
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.114",
5
+ "version": "3.2.2-staging.118",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "publishConfig": {