@7365admin1/layer-common 3.2.2-staging.150 → 3.2.2-staging.152

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.
@@ -1,23 +1,19 @@
1
1
  <template>
2
2
  <v-dialog v-model="showDialog" max-width="450" persistent>
3
- <v-card>
4
- <v-toolbar>
5
- <v-row no-gutters class="fill-height px-6" align="center">
6
- <span class="font-weight-bold text-h6">{{
7
- action === "checkIn" ? "Check In" : "Check Out"
8
- }}</span>
9
- </v-row>
10
- </v-toolbar>
11
-
12
- <v-card-text class="pa-4">
3
+ <v-card class="screen-modal">
4
+ <!-- Was a bare `v-toolbar` at each end of the card, which Vuetify paints
5
+ from its own `surface` - two grey slabs visibly lighter than the card
6
+ on the dark theme - carrying a `text-h6` (20px/500) heading. The
7
+ design's modal heading is the card's own `v-card-title` row. -->
8
+ <v-card-title>
9
+ {{ action === "checkIn" ? "Check In" : "Check Out" }}
10
+ </v-card-title>
11
+
12
+ <v-card-text class="screen-modal__body">
13
13
  <v-form ref="formRef" v-model="valid">
14
14
  <v-row no-gutters class="pa-0">
15
15
  <v-col cols="12" class="pa-0">
16
- <v-card
17
- variant="outlined"
18
- class="mb-2"
19
- style="height: 400px; position: relative; overflow: hidden"
20
- >
16
+ <v-card variant="outlined" class="mb-2 attendance-capture__stage">
21
17
  <div
22
18
  v-if="loadingCamera"
23
19
  class="d-flex align-center justify-center"
@@ -56,17 +52,15 @@
56
52
  "
57
53
  />
58
54
 
55
+ <!-- `background: #f5f5f5` was a literal light grey, so on the
56
+ dark theme this placeholder was a white slab inside a dark
57
+ card. It follows the theme now. -->
59
58
  <div
60
59
  v-else-if="!loadingCamera"
61
- class="d-flex align-center justify-center flex-column"
62
- style="height: 100%; background: #f5f5f5"
60
+ class="d-flex align-center justify-center flex-column attendance-capture__placeholder"
63
61
  >
64
- <v-icon size="64" color="grey" class="mb-2"
65
- >mdi-camera-off</v-icon
66
- >
67
- <span class="text-caption text-grey"
68
- >Initializing camera...</span
69
- >
62
+ <v-icon size="64" class="mb-2">mdi-camera-off</v-icon>
63
+ <span>Initializing camera...</span>
70
64
  </div>
71
65
  </v-card>
72
66
  </v-col>
@@ -86,71 +80,47 @@
86
80
  </v-form>
87
81
  </v-card-text>
88
82
 
89
- <v-toolbar class="pa-0" density="compact">
90
- <v-row no-gutters>
91
- <v-col v-if="!capturedImage" cols="6" class="pa-0">
92
- <v-btn
93
- block
94
- variant="text"
95
- class="text-none"
96
- size="large"
97
- @click="close"
98
- height="56"
99
- >
100
- Cancel
101
- </v-btn>
102
- </v-col>
103
-
104
- <v-col v-if="!capturedImage" cols="6" class="pa-0">
105
- <v-btn
106
- block
107
- variant="flat"
108
- color="black"
109
- class="text-none font-weight-bold rounded-0"
110
- height="56"
111
- size="large"
112
- @click="capturePhoto"
113
- :disabled="!showCamera"
114
- >
115
- <v-icon class="mr-2">mdi-camera</v-icon>
116
- Capture Photo
117
- </v-btn>
118
- </v-col>
119
-
120
- <template v-else>
121
- <v-col cols="6" class="pa-0">
122
- <v-btn
123
- block
124
- variant="text"
125
- class="text-none"
126
- size="large"
127
- @click="retakePhoto"
128
- height="56"
129
- :disabled="submitting"
130
- >
131
- <v-icon class="mr-2">mdi-camera-retake</v-icon>
132
- Retake
133
- </v-btn>
134
- </v-col>
135
-
136
- <v-col cols="6" class="pa-0">
137
- <v-btn
138
- block
139
- variant="flat"
140
- color="black"
141
- class="text-none font-weight-bold rounded-0"
142
- height="56"
143
- size="large"
144
- :loading="submitting"
145
- @click="submit"
146
- >
147
- <v-icon class="mr-2">mdi-check</v-icon>
148
- Submit
149
- </v-btn>
150
- </v-col>
151
- </template>
152
- </v-row>
153
- </v-toolbar>
83
+ <!-- `color="black"` was a literal, not a token: a pure-black 56px slab
84
+ with `rounded-0`, on both themes. `.screen-btn-primary` is the fill
85
+ the design draws, and the footer gives the pair the design's 40px
86
+ height and 10px radius. -->
87
+ <div class="screen-modal__footer">
88
+ <template v-if="!capturedImage">
89
+ <v-btn class="text-none screen-btn-ghost" variant="flat" @click="close">
90
+ Cancel
91
+ </v-btn>
92
+ <v-btn
93
+ class="text-none screen-btn-primary"
94
+ variant="flat"
95
+ prepend-icon="mdi-camera"
96
+ :disabled="!showCamera"
97
+ @click="capturePhoto"
98
+ >
99
+ Capture Photo
100
+ </v-btn>
101
+ </template>
102
+
103
+ <template v-else>
104
+ <v-btn
105
+ class="text-none screen-btn-ghost"
106
+ variant="flat"
107
+ prepend-icon="mdi-camera-retake"
108
+ :disabled="submitting"
109
+ @click="retakePhoto"
110
+ >
111
+ Retake
112
+ </v-btn>
113
+ <v-btn
114
+ class="text-none screen-btn-primary"
115
+ variant="flat"
116
+ prepend-icon="mdi-check"
117
+ :loading="submitting"
118
+ @click="submit"
119
+ >
120
+ Submit
121
+ </v-btn>
122
+ </template>
123
+ </div>
154
124
  </v-card>
155
125
  </v-dialog>
156
126
  </template>
@@ -418,3 +388,30 @@ watch(showDialog, async (newVal) => {
418
388
  }
419
389
  });
420
390
  </script>
391
+
392
+ <style scoped>
393
+ /* The camera stage. `height: 400px` and the rest were inline styles; the box is
394
+ the design's inner radius on the card's own border. */
395
+ .attendance-capture__stage {
396
+ position: relative;
397
+ height: 400px;
398
+ overflow: hidden;
399
+ border-radius: var(--r-inner);
400
+ border-color: var(--border);
401
+ }
402
+
403
+ /* Was `background: #f5f5f5` with `text-grey` / `text-caption` on it - a literal
404
+ light slab that stayed light on the dark theme. Both ends follow the theme. */
405
+ .attendance-capture__placeholder {
406
+ height: 100%;
407
+ background: var(--thead);
408
+ font-family: var(--font-sans);
409
+ font-size: var(--fs-cell);
410
+ font-weight: 500;
411
+ color: var(--muted);
412
+ }
413
+
414
+ .attendance-capture__placeholder .v-icon {
415
+ color: var(--muted);
416
+ }
417
+ </style>
@@ -58,12 +58,19 @@ const chatSkeletons = ref([
58
58
  overflow-y: auto;
59
59
  }
60
60
 
61
+ /*
62
+ * `background-color: white` used to sit here and never applied: the footer
63
+ * carries `color="background"`, and Vuetify's `.bg-background` sets the
64
+ * background with `!important`. It is deleted rather than out-specified - the
65
+ * theme colour is the one that should win, and a literal white would have been
66
+ * wrong in the dark theme anyway. The border was a literal `#ddd` for the same
67
+ * reason and is now the shared rule colour.
68
+ */
61
69
  .chat-footer {
62
70
  position: sticky;
63
71
  bottom: 0;
64
72
  width: 100%;
65
- background-color: white;
66
- border-top: 1px solid #ddd;
73
+ border-top: 1px solid var(--border);
67
74
  display: flex;
68
75
  justify-content: center;
69
76
  align-items: center;
@@ -855,20 +855,18 @@ onUnmounted(() => {
855
855
  /* ===== TABLE ===== */
856
856
  .table-scroll { overflow-x: auto; }
857
857
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
858
+ /* `.table-card thead th` / `tbody td` in screens.css state the design's table
859
+ header and cell with `!important`; the padding, font, colour and background
860
+ this block used to set never applied. Only what still applies is kept. */
858
861
  thead th {
859
- padding: 10px 16px;
860
862
  text-align: left;
861
- font-weight: 600;
862
- font-size: 13px;
863
- color: var(--text2);
864
863
  border-bottom: 1px solid var(--border);
865
864
  white-space: nowrap;
866
- background: var(--card);
867
865
  }
868
866
  tbody tr { border-bottom: 1px solid var(--hover); transition: background 0.1s; }
869
867
  tbody tr:last-child { border-bottom: none; }
870
868
  tbody tr:hover { background: var(--thead); }
871
- tbody td { padding: 14px 16px; vertical-align: middle; }
869
+ tbody td { vertical-align: middle; }
872
870
 
873
871
  .empty { text-align: center; color: var(--muted); padding: 48px 0 !important; }
874
872
  .td-name { font-weight: 500; color: var(--text); }
@@ -106,6 +106,5 @@ defineExpose({
106
106
  .hidden-input {
107
107
  opacity: 0;
108
108
  height: 0;
109
- width: 1px;
110
109
  }
111
110
  </style>
@@ -197,6 +197,5 @@ defineExpose({
197
197
  .hidden-input {
198
198
  opacity: 0;
199
199
  height: 0;
200
- width: 1px;
201
200
  }
202
201
  </style>
@@ -1,12 +1,11 @@
1
1
  <template>
2
- <v-chip
3
- :color="isActive ? 'success' : 'grey'"
4
- size="small"
5
- variant="tonal"
6
- class="font-weight-medium"
7
- >
8
- {{ isActive ? 'Active' : 'Deactive' }}
9
- </v-chip>
2
+ <!--
3
+ The design's status pill, not Vuetify's tonal chip. The word is passed
4
+ through so `utils/status.ts` picks the tone: "Active" -> ok, and "Deactive"
5
+ is not a word the map names, so it comes out neutral - the same two colours
6
+ the old `success` / `grey` chip drew, now from the shared tokens.
7
+ -->
8
+ <StatusChip :status="isActive ? 'Active' : 'Deactive'" />
10
9
  </template>
11
10
 
12
11
  <script setup lang="ts">
@@ -4,13 +4,16 @@
4
4
  {{ formatted }}
5
5
  </span>
6
6
 
7
- <v-chip
7
+ <!--
8
+ The overflow count is a tag, not a status, so it takes the design's
9
+ dotless neutral chip rather than Vuetify's default grey one.
10
+ -->
11
+ <StatusChip
8
12
  v-if="extraCount > 0 && !showAll"
9
- density="comfortable"
10
- size="small"
11
- >
12
- + {{ extraCount }}
13
- </v-chip>
13
+ tone="neutral"
14
+ :dot="false"
15
+ :label="`+ ${extraCount}`"
16
+ />
14
17
  </div>
15
18
  </template>
16
19
 
@@ -162,10 +162,6 @@ watch(
162
162
  * same tokenised header, cell and hover treatment as every other table in the
163
163
  * product, which measures 4.77:1 light / 4.71:1 dark.
164
164
  */
165
- .table-v3 :deep(tbody td) {
166
- height: 54px;
167
- }
168
-
169
165
  .table-v3__footer {
170
166
  border-top: 1px solid var(--border);
171
167
  border-bottom: 0;
@@ -1,8 +1,10 @@
1
1
  <template>
2
2
  <div>
3
- <VCard class="">
3
+ <!-- AppCard, not VCard: the design's 14px radius and 1px rule, without
4
+ Vuetify's own elevation and 4px corner fighting the class for it. -->
5
+ <AppCard>
4
6
  <VuetifyTiptap v-model="content" />
5
- </VCard>
7
+ </AppCard>
6
8
  </div>
7
9
  </template>
8
10
 
@@ -39,35 +41,37 @@ const updateContent = () => {
39
41
  </script>
40
42
 
41
43
  <style scoped>
42
- /deep/ .vuetify-pro-tiptap-editor__content {
44
+ /*
45
+ * The rich-text tables. Every colour here used to be a literal - #333 borders,
46
+ * #fff and #f8f8f8 cells, #f0f0f0 headers, #000 header text, #e6f3ff hover -
47
+ * so an editor opened in the dark theme drew a white table with black text on
48
+ * a dark page. They are the same tokens every other table in the product uses,
49
+ * so the editor content now follows the theme it is opened in.
50
+ *
51
+ * The selectors were also written twice, once with :deep() and again with the
52
+ * deprecated /deep/, matching the same two roots. One copy is enough.
53
+ */
54
+ :deep(.vuetify-pro-tiptap-editor__content) {
43
55
  padding: 15px;
44
56
  }
45
57
 
46
- /* Table styles with strong visible borders */
47
58
  :deep(.vuetify-pro-tiptap-editor__content table),
48
- :deep(.ProseMirror table),
49
- /deep/ .vuetify-pro-tiptap-editor__content table,
50
- /deep/ .ProseMirror table {
59
+ :deep(.ProseMirror table) {
51
60
  border-collapse: collapse;
52
61
  border-spacing: 0;
53
- border: 2px solid #333333 !important;
62
+ border: 2px solid var(--border) !important;
54
63
  width: 100%;
55
64
  margin: 16px 0;
56
- background-color: #ffffff;
65
+ background-color: var(--card);
57
66
  display: table !important;
58
- font-size: 14px;
67
+ font-size: var(--fs-cell);
59
68
  }
60
69
 
61
- /* Cell borders - very visible */
62
70
  :deep(.vuetify-pro-tiptap-editor__content table th),
63
71
  :deep(.vuetify-pro-tiptap-editor__content table td),
64
72
  :deep(.ProseMirror table th),
65
- :deep(.ProseMirror table td),
66
- /deep/ .vuetify-pro-tiptap-editor__content table th,
67
- /deep/ .vuetify-pro-tiptap-editor__content table td,
68
- /deep/ .ProseMirror table th,
69
- /deep/ .ProseMirror table td {
70
- border: 1px solid #333333 !important;
73
+ :deep(.ProseMirror table td) {
74
+ border: 1px solid var(--border) !important;
71
75
  padding: 8px 12px;
72
76
  text-align: left;
73
77
  vertical-align: top;
@@ -75,38 +79,27 @@ const updateContent = () => {
75
79
  box-sizing: border-box;
76
80
  }
77
81
 
78
- /* Header styling */
79
82
  :deep(.vuetify-pro-tiptap-editor__content table th),
80
- :deep(.ProseMirror table th),
81
- /deep/ .vuetify-pro-tiptap-editor__content table th,
82
- /deep/ .ProseMirror table th {
83
- font-weight: 600;
84
- background-color: #f0f0f0;
85
- color: #000000;
86
- border-bottom: 2px solid #333333 !important;
83
+ :deep(.ProseMirror table th) {
84
+ font-weight: var(--fw-table-head);
85
+ background-color: var(--thead);
86
+ color: var(--text);
87
+ border-bottom: 2px solid var(--border) !important;
87
88
  }
88
89
 
89
- /* Regular cells */
90
90
  :deep(.vuetify-pro-tiptap-editor__content table td),
91
- :deep(.ProseMirror table td),
92
- /deep/ .vuetify-pro-tiptap-editor__content table td,
93
- /deep/ .ProseMirror table td {
94
- background-color: #ffffff;
91
+ :deep(.ProseMirror table td) {
92
+ background-color: var(--card);
93
+ color: var(--text);
95
94
  }
96
95
 
97
- /* Alternating row colors */
98
96
  :deep(.vuetify-pro-tiptap-editor__content table tr:nth-child(2n) td),
99
- :deep(.ProseMirror table tr:nth-child(2n) td),
100
- /deep/ .vuetify-pro-tiptap-editor__content table tr:nth-child(2n) td,
101
- /deep/ .ProseMirror table tr:nth-child(2n) td {
102
- background-color: #f8f8f8;
97
+ :deep(.ProseMirror table tr:nth-child(2n) td) {
98
+ background-color: var(--thead);
103
99
  }
104
100
 
105
- /* Hover effects */
106
101
  :deep(.vuetify-pro-tiptap-editor__content table tr:hover td),
107
- :deep(.ProseMirror table tr:hover td),
108
- /deep/ .vuetify-pro-tiptap-editor__content table tr:hover td,
109
- /deep/ .ProseMirror table tr:hover td {
110
- background-color: #e6f3ff !important;
102
+ :deep(.ProseMirror table tr:hover td) {
103
+ background-color: var(--hover) !important;
111
104
  }
112
105
  </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.150",
5
+ "version": "3.2.2-staging.152",
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.",