@nexxtmove/ui 1.49.0 → 1.50.0
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/dist/index.js
CHANGED
|
@@ -402,7 +402,7 @@ var Dt = { funda: { render: Et } }, Q = /* @__PURE__ */ p({
|
|
|
402
402
|
}),
|
|
403
403
|
emits: ["update:modelValue"],
|
|
404
404
|
setup(e) {
|
|
405
|
-
let t = z(e, "modelValue"), n = i(() => !e.switchable || t.value), r = i(() => !n.value || void 0), l = _(At, null), u = i(() => l ? "pt-4" : "py-4"), f = i(() => l?.value.promoted ?? !1), p = i(() => f.value ? "small-semibold" : "small-normal"), m = i(() => f.value && l ? `h${l.value.headingLevel}` : "p");
|
|
405
|
+
let t = z(e, "modelValue"), n = i(() => !e.switchable || t.value), r = i(() => !n.value || void 0), l = _(At, null), u = i(() => l ? "pt-4" : "py-4"), f = i(() => l?.value.promoted ?? !1), p = i(() => f.value ? "small-semibold" : "small-normal"), m = i(() => f.value ? "text-cornflower-blue-700" : "text-gray-900"), h = i(() => f.value && l ? `h${l.value.headingLevel}` : "p");
|
|
406
406
|
return (i, l) => (D(), s("div", { class: x(u.value) }, [c("div", jt, [e.switchable ? (D(), a(kt, {
|
|
407
407
|
key: 0,
|
|
408
408
|
modelValue: t.value,
|
|
@@ -414,12 +414,12 @@ var Dt = { funda: { render: Et } }, Q = /* @__PURE__ */ p({
|
|
|
414
414
|
default: K(() => [c("span", { class: x([
|
|
415
415
|
"grow text-left",
|
|
416
416
|
p.value,
|
|
417
|
-
|
|
417
|
+
m.value
|
|
418
418
|
]) }, P(e.label), 3)]),
|
|
419
419
|
_: 1
|
|
420
|
-
}, 8, ["modelValue"])) : (D(), a(N(
|
|
420
|
+
}, 8, ["modelValue"])) : (D(), a(N(h.value), {
|
|
421
421
|
key: 1,
|
|
422
|
-
class: x([p.value,
|
|
422
|
+
class: x([p.value, m.value])
|
|
423
423
|
}, {
|
|
424
424
|
default: K(() => [d(P(e.label), 1)]),
|
|
425
425
|
_: 1
|
|
@@ -6246,7 +6246,7 @@ var Uo = /* @__PURE__ */ p({
|
|
|
6246
6246
|
}, [l.value ? (D(), a(N(r.value), {
|
|
6247
6247
|
key: 0,
|
|
6248
6248
|
id: I(n),
|
|
6249
|
-
class: "flex small-semibold text-
|
|
6249
|
+
class: "flex small-semibold text-cornflower-blue-700"
|
|
6250
6250
|
}, {
|
|
6251
6251
|
default: K(() => [c("button", {
|
|
6252
6252
|
ref: "toggle",
|
|
@@ -6266,7 +6266,7 @@ var Uo = /* @__PURE__ */ p({
|
|
|
6266
6266
|
}, 8, ["id"])) : e.label ? (D(), a(N(r.value), {
|
|
6267
6267
|
key: 1,
|
|
6268
6268
|
id: I(n),
|
|
6269
|
-
class: "small-semibold text-
|
|
6269
|
+
class: "small-semibold text-cornflower-blue-700"
|
|
6270
6270
|
}, {
|
|
6271
6271
|
default: K(() => [d(P(e.label), 1)]),
|
|
6272
6272
|
_: 1
|
package/package.json
CHANGED
|
@@ -57,6 +57,9 @@ const promoted = computed(() => group?.value.promoted ?? false)
|
|
|
57
57
|
|
|
58
58
|
const labelTypography = computed(() => (promoted.value ? 'small-semibold' : 'small-normal'))
|
|
59
59
|
|
|
60
|
+
/** A promoted label reads as the group's title, so it takes the group heading's colour too. */
|
|
61
|
+
const labelColor = computed(() => (promoted.value ? 'text-cornflower-blue-700' : 'text-gray-900'))
|
|
62
|
+
|
|
60
63
|
/**
|
|
61
64
|
* A promoted label is a heading, so heading navigation finds it next to the
|
|
62
65
|
* labelled groups. A switchable label stays the switch's <label>: a heading
|
|
@@ -78,9 +81,9 @@ const labelTag = computed(() => (promoted.value && group ? `h${group.value.headi
|
|
|
78
81
|
-->
|
|
79
82
|
<div class="flex items-center [&>label]:flex [&>label]:w-full [&>label]:gap-3">
|
|
80
83
|
<Switch v-if="switchable" v-model="model" size="sm" color="blue" label-position="before">
|
|
81
|
-
<span :class="['grow text-left', labelTypography,
|
|
84
|
+
<span :class="['grow text-left', labelTypography, labelColor]">{{ label }}</span>
|
|
82
85
|
</Switch>
|
|
83
|
-
<component :is="labelTag" v-else :class="[labelTypography,
|
|
86
|
+
<component :is="labelTag" v-else :class="[labelTypography, labelColor]">
|
|
84
87
|
{{ label }}
|
|
85
88
|
</component>
|
|
86
89
|
</div>
|
|
@@ -186,7 +186,7 @@ watch(open, (isOpen) => {
|
|
|
186
186
|
:is="heading"
|
|
187
187
|
v-if="active"
|
|
188
188
|
:id="headingId"
|
|
189
|
-
class="flex small-semibold text-
|
|
189
|
+
class="flex small-semibold text-cornflower-blue-700"
|
|
190
190
|
>
|
|
191
191
|
<button
|
|
192
192
|
ref="toggle"
|
|
@@ -205,7 +205,12 @@ watch(open, (isOpen) => {
|
|
|
205
205
|
</span>
|
|
206
206
|
</button>
|
|
207
207
|
</component>
|
|
208
|
-
<component
|
|
208
|
+
<component
|
|
209
|
+
:is="heading"
|
|
210
|
+
v-else-if="label"
|
|
211
|
+
:id="headingId"
|
|
212
|
+
class="small-semibold text-cornflower-blue-700"
|
|
213
|
+
>
|
|
209
214
|
{{ label }}
|
|
210
215
|
</component>
|
|
211
216
|
|