@7365admin1/layer-common 3.2.2-staging.139 → 3.2.2-staging.140
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.
- package/assets/css/primitives.css +26 -0
- package/assets/css/screens.css +35 -0
- package/components/InputLabel.vue +2 -2
- package/components/Snackbar.vue +36 -3
- package/package.json +1 -1
|
@@ -958,3 +958,29 @@ select.app-field__input {
|
|
|
958
958
|
min-width: 720px;
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
|
+
|
|
962
|
+
/* ------------------------------------------------------------------ */
|
|
963
|
+
/* Field label (`components/InputLabel.vue`, 125 caller files). */
|
|
964
|
+
/* */
|
|
965
|
+
/* Every form label in the product rendered Vuetify's `text-subtitle-2`:*/
|
|
966
|
+
/* 14px/500 at 0.0071em tracking, declaring `font-family: Roboto`. */
|
|
967
|
+
/* The handoff's own label - the Create Role modal - is 12.5px/700 with*/
|
|
968
|
+
/* a 6px gap under it and the asterisk on `--err`. */
|
|
969
|
+
/* */
|
|
970
|
+
/* `margin-bottom` is deliberately NOT `!important`, so the ~40 callers*/
|
|
971
|
+
/* that already pass a Vuetify spacing utility (`mb-1`, `mb-2`) keep */
|
|
972
|
+
/* winning - those classes carry `!important` - and only the labels */
|
|
973
|
+
/* that state no spacing take the design's 6px. */
|
|
974
|
+
/* ------------------------------------------------------------------ */
|
|
975
|
+
.app-input-label {
|
|
976
|
+
font-family: var(--font-sans);
|
|
977
|
+
font-size: 12.5px;
|
|
978
|
+
font-weight: 700;
|
|
979
|
+
letter-spacing: 0;
|
|
980
|
+
color: var(--text);
|
|
981
|
+
margin-bottom: 6px;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
.app-input-label__req {
|
|
985
|
+
color: var(--err);
|
|
986
|
+
}
|
package/assets/css/screens.css
CHANGED
|
@@ -739,3 +739,38 @@
|
|
|
739
739
|
height: 2px;
|
|
740
740
|
background: var(--accent);
|
|
741
741
|
}
|
|
742
|
+
|
|
743
|
+
/* ------------------------------------------------------------------ */
|
|
744
|
+
/* Toast (`components/Snackbar.vue`, 163 caller files). */
|
|
745
|
+
/* */
|
|
746
|
+
/* The handoff draws no toast at all - it is one of the gaps. So this */
|
|
747
|
+
/* is deliberately NOT an invented surface: it is the design's own */
|
|
748
|
+
/* button type scale, inner radius and menu shadow applied to */
|
|
749
|
+
/* Vuetify's snackbar. Vuetify's own default is a 4px radius, a */
|
|
750
|
+
/* Material elevation and Roboto at 14px, none of which are ours. */
|
|
751
|
+
/* */
|
|
752
|
+
/* The FILL is the `color` prop, defaulted in the component to */
|
|
753
|
+
/* `primary-button` - never `primary`, which is a foreground token. */
|
|
754
|
+
/* ------------------------------------------------------------------ */
|
|
755
|
+
.app-toast .v-snackbar__wrapper {
|
|
756
|
+
border-radius: var(--r-inner);
|
|
757
|
+
box-shadow: var(--shadow-menu);
|
|
758
|
+
font-family: var(--font-sans);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.app-toast .v-snackbar__content {
|
|
762
|
+
font-size: var(--fs-btn);
|
|
763
|
+
font-weight: 600;
|
|
764
|
+
letter-spacing: 0;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
/* Vuetify's text button is uppercase with wide tracking; the design has no
|
|
768
|
+
uppercase control anywhere. Named on `.v-btn` so it outweighs the default. */
|
|
769
|
+
.v-btn.app-toast__close {
|
|
770
|
+
border-radius: var(--r-inner-sm);
|
|
771
|
+
font-family: var(--font-sans);
|
|
772
|
+
font-size: var(--fs-btn);
|
|
773
|
+
font-weight: var(--fw-btn);
|
|
774
|
+
letter-spacing: 0;
|
|
775
|
+
text-transform: none;
|
|
776
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<span :class="`
|
|
3
|
-
{{ title }} <span v-if="props.required" class="
|
|
2
|
+
<span :class="`app-input-label ${props.class}`">
|
|
3
|
+
{{ title }} <span v-if="props.required" class="app-input-label__req">*</span>
|
|
4
4
|
</span>
|
|
5
5
|
</template>
|
|
6
6
|
|
package/components/Snackbar.vue
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-snackbar
|
|
2
|
+
<v-snackbar
|
|
3
|
+
v-model="snackbar"
|
|
4
|
+
class="app-toast"
|
|
5
|
+
:color="props.color || 'primary-button'"
|
|
6
|
+
:z-index="100000000"
|
|
7
|
+
>
|
|
3
8
|
{{ props.text }}
|
|
4
9
|
|
|
5
10
|
<template #actions>
|
|
6
|
-
<v-btn variant="text" @click="snackbar = false">
|
|
11
|
+
<v-btn class="app-toast__close" variant="text" @click="snackbar = false">
|
|
12
|
+
Close
|
|
13
|
+
</v-btn>
|
|
7
14
|
</template>
|
|
8
15
|
</v-snackbar>
|
|
9
16
|
</template>
|
|
@@ -15,9 +22,35 @@ const props = defineProps({
|
|
|
15
22
|
type: String,
|
|
16
23
|
default: "",
|
|
17
24
|
},
|
|
25
|
+
/**
|
|
26
|
+
* A Vuetify theme colour name. `success` / `warning` / `error` / `info` are
|
|
27
|
+
* mapped onto the design palette in `utils/theme.ts` and pass through here
|
|
28
|
+
* unchanged.
|
|
29
|
+
*
|
|
30
|
+
* An UNCOLOURED toast used to land on one of two wrong surfaces, and both are
|
|
31
|
+
* corrected by the `||` in the template rather than by 163 caller files:
|
|
32
|
+
*
|
|
33
|
+
* - the prop omitted or bound to `undefined` fell to the old default
|
|
34
|
+
* `"primary"`, and `theme.ts:228` maps Vuetify's `primary` to
|
|
35
|
+
* `--accent-text` - a FOREGROUND (the link ink), never a fill. Measured:
|
|
36
|
+
* `rgb(74,110,182)` light, `rgb(120,162,244)` dark - the dark one a pale
|
|
37
|
+
* link-blue slab that matches no other accent surface in the product.
|
|
38
|
+
* - `:color=""`, which is how most callers initialise their toast state
|
|
39
|
+
* (`reactive({ show: false, message: "", color: "" })`), is not falsy to
|
|
40
|
+
* Vue's default machinery, so it reached Vuetify as an empty colour and
|
|
41
|
+
* fell through to `.v-snackbar--variant-elevated`, i.e. `surface-variant`
|
|
42
|
+
* = the NAVIGATION RAIL colour with `--text2` ink.
|
|
43
|
+
*
|
|
44
|
+
* `primary-button` is the accent FILL, and its pair `on-primary-button`
|
|
45
|
+
* supplies the white label (4.57:1 in both themes). The same correction is
|
|
46
|
+
* already on `FileInput`, `FeedbackDetail` and `BuildingUnitFormEdit`.
|
|
47
|
+
*
|
|
48
|
+
* The handoff draws no toast at all, so "an uncoloured toast is the accent
|
|
49
|
+
* fill" is our reading of a gap in the design, not a value it states.
|
|
50
|
+
*/
|
|
18
51
|
color: {
|
|
19
52
|
type: String,
|
|
20
|
-
default: "
|
|
53
|
+
default: "",
|
|
21
54
|
},
|
|
22
55
|
});
|
|
23
56
|
</script>
|
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.
|
|
5
|
+
"version": "3.2.2-staging.140",
|
|
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.",
|