@nexxtmove/ui 1.3.4 → 1.5.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/components/ModalFooter/ModalFooter.vue.d.ts +3 -0
- package/dist/index.js +9 -6
- package/package.json +1 -1
- package/src/components/ColorPicker/ColorPicker.vue +1 -5
- package/src/components/CountrySelect/CountrySelect.vue +1 -5
- package/src/components/InputField/InputField.vue +1 -5
- package/src/components/InputSelect/InputSelect.vue +1 -5
- package/src/components/ModalFooter/ModalFooter.vue +7 -0
- package/src/components/Select/Select.vue +1 -5
- package/src/components/ToggleGroup/ToggleGroup.vue +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as NexxtButton } from '../Button/Button.vue';
|
|
2
2
|
type ButtonVariant = InstanceType<typeof NexxtButton>['$props']['variant'];
|
|
3
|
+
type ButtonIcon = InstanceType<typeof NexxtButton>['$props']['icon'];
|
|
3
4
|
interface NexxtModalFooterProps {
|
|
4
5
|
/**
|
|
5
6
|
* Label of the cancel button. Required: this library has no i18n layer, so
|
|
@@ -18,6 +19,8 @@ interface NexxtModalFooterProps {
|
|
|
18
19
|
* NexxtButton's own default, so it renders like a plain `<NexxtButton>`.
|
|
19
20
|
*/
|
|
20
21
|
confirmVariant?: ButtonVariant | (string & {});
|
|
22
|
+
/** Icon rendered on the action button, before its label. */
|
|
23
|
+
confirmIcon?: ButtonIcon;
|
|
21
24
|
/** Put the action button in its loading state. */
|
|
22
25
|
confirmLoading?: boolean;
|
|
23
26
|
/** Disable the action button. */
|
package/dist/index.js
CHANGED
|
@@ -1419,7 +1419,7 @@ var dt = { funda: { render: ut } }, Z = /* @__PURE__ */ p({
|
|
|
1419
1419
|
e.label ? (w(), s("label", {
|
|
1420
1420
|
key: 0,
|
|
1421
1421
|
for: t,
|
|
1422
|
-
class: "text-color-gray-700 justify-start
|
|
1422
|
+
class: "text-color-gray-700 justify-start small-normal"
|
|
1423
1423
|
}, [d(k(e.label) + " ", 1), e.required ? (w(), s("span", sn, "*")) : o("", !0)])) : o("", !0),
|
|
1424
1424
|
f($, {
|
|
1425
1425
|
placement: "bottom-start",
|
|
@@ -1670,7 +1670,7 @@ var dt = { funda: { render: ut } }, Z = /* @__PURE__ */ p({
|
|
|
1670
1670
|
return (t, i) => (w(), s("div", bn, [
|
|
1671
1671
|
e.label ? (w(), s("label", {
|
|
1672
1672
|
key: 0,
|
|
1673
|
-
class: "text-color-gray-700 justify-start
|
|
1673
|
+
class: "text-color-gray-700 justify-start small-normal",
|
|
1674
1674
|
for: r
|
|
1675
1675
|
}, [d(k(e.label) + " ", 1), e.required ? (w(), s("span", xn, "*")) : o("", !0)])) : o("", !0),
|
|
1676
1676
|
c("div", { class: y(["group flex items-center gap-2 overflow-hidden rounded-lg ring transition-colors ease-out focus-within:ring-cornflower-blue-500", [e.error ? "ring-brick-400" : "ring-gray-200", {
|
|
@@ -2885,7 +2885,7 @@ var sr = /* @__PURE__ */ p({
|
|
|
2885
2885
|
return (i, l) => (w(), s("div", Zn, [
|
|
2886
2886
|
t.label ? (w(), s("label", {
|
|
2887
2887
|
key: 0,
|
|
2888
|
-
class: "text-color-gray-700 justify-start
|
|
2888
|
+
class: "text-color-gray-700 justify-start small-normal",
|
|
2889
2889
|
for: A(r)
|
|
2890
2890
|
}, [d(k(t.label) + " ", 1), t.required ? (w(), s("span", $n, "*")) : o("", !0)], 8, Qn)) : o("", !0),
|
|
2891
2891
|
f($, {
|
|
@@ -3437,7 +3437,7 @@ var sr = /* @__PURE__ */ p({
|
|
|
3437
3437
|
return (r, i) => (w(), s("div", Fr, [
|
|
3438
3438
|
t.label ? (w(), s("label", {
|
|
3439
3439
|
key: 0,
|
|
3440
|
-
class: "text-color-gray-700 justify-start
|
|
3440
|
+
class: "text-color-gray-700 justify-start small-normal",
|
|
3441
3441
|
for: A(l)
|
|
3442
3442
|
}, [d(k(t.label) + " ", 1), t.required ? (w(), s("span", Lr, "*")) : o("", !0)], 8, Ir)) : o("", !0),
|
|
3443
3443
|
c("div", { class: y(["group flex items-center overflow-hidden rounded-lg ring transition-colors ease-out focus-within:ring-cornflower-blue-500", [t.error ? "ring-brick-400" : "ring-gray-200", t.selectPosition === "after" ? "flex-row-reverse" : "flex-row"]]) }, [f($, { placement: t.selectPosition === "after" ? "bottom-end" : "bottom-start" }, {
|
|
@@ -3626,6 +3626,7 @@ var sr = /* @__PURE__ */ p({
|
|
|
3626
3626
|
},
|
|
3627
3627
|
confirmLabel: {},
|
|
3628
3628
|
confirmVariant: {},
|
|
3629
|
+
confirmIcon: {},
|
|
3629
3630
|
confirmLoading: {
|
|
3630
3631
|
type: Boolean,
|
|
3631
3632
|
default: !1
|
|
@@ -3647,6 +3648,7 @@ var sr = /* @__PURE__ */ p({
|
|
|
3647
3648
|
_: 1
|
|
3648
3649
|
}, 8, ["disabled"]), f(Q, {
|
|
3649
3650
|
variant: e.confirmVariant,
|
|
3651
|
+
icon: e.confirmIcon,
|
|
3650
3652
|
loading: e.confirmLoading,
|
|
3651
3653
|
disabled: e.confirmDisabled,
|
|
3652
3654
|
onClick: r[1] ||= (e) => n("confirm")
|
|
@@ -3655,6 +3657,7 @@ var sr = /* @__PURE__ */ p({
|
|
|
3655
3657
|
_: 1
|
|
3656
3658
|
}, 8, [
|
|
3657
3659
|
"variant",
|
|
3660
|
+
"icon",
|
|
3658
3661
|
"loading",
|
|
3659
3662
|
"disabled"
|
|
3660
3663
|
])]));
|
|
@@ -4139,7 +4142,7 @@ var sr = /* @__PURE__ */ p({
|
|
|
4139
4142
|
}), (i, h) => (w(), s("div", Bi, [
|
|
4140
4143
|
t.label ? (w(), s("label", {
|
|
4141
4144
|
key: 0,
|
|
4142
|
-
class: "text-color-gray-700 justify-start
|
|
4145
|
+
class: "text-color-gray-700 justify-start small-normal",
|
|
4143
4146
|
for: A(u)
|
|
4144
4147
|
}, [d(k(t.label) + " ", 1), t.required ? (w(), s("span", Hi, "*")) : o("", !0)], 8, Vi)) : o("", !0),
|
|
4145
4148
|
f($, {
|
|
@@ -5590,7 +5593,7 @@ var Pa = { render: Na }, Fa = { class: "flex items-center justify-end self-stret
|
|
|
5590
5593
|
}
|
|
5591
5594
|
}), ls = { class: "flex flex-col gap-1" }, us = {
|
|
5592
5595
|
key: 0,
|
|
5593
|
-
class: "text-color-gray-700 justify-start
|
|
5596
|
+
class: "text-color-gray-700 justify-start small-normal"
|
|
5594
5597
|
}, ds = ["onClick"], fs = {
|
|
5595
5598
|
key: 1,
|
|
5596
5599
|
class: "extra-small-semibold"
|
package/package.json
CHANGED
|
@@ -113,11 +113,7 @@ watch(
|
|
|
113
113
|
|
|
114
114
|
<template>
|
|
115
115
|
<div class="inline-flex flex-col gap-1" :class="{ 'w-full': fullWidth }">
|
|
116
|
-
<label
|
|
117
|
-
v-if="label"
|
|
118
|
-
:for="PICKER_ID"
|
|
119
|
-
class="text-color-gray-700 justify-start body-normal text-sm"
|
|
120
|
-
>
|
|
116
|
+
<label v-if="label" :for="PICKER_ID" class="text-color-gray-700 justify-start small-normal">
|
|
121
117
|
{{ label }}
|
|
122
118
|
<span v-if="required" class="text-brick-500">*</span>
|
|
123
119
|
</label>
|
|
@@ -72,11 +72,7 @@ const onOpen = async () => {
|
|
|
72
72
|
|
|
73
73
|
<template>
|
|
74
74
|
<div class="inline-flex flex-col gap-1">
|
|
75
|
-
<label
|
|
76
|
-
v-if="label"
|
|
77
|
-
class="text-color-gray-700 justify-start body-normal text-sm"
|
|
78
|
-
:for="selectId"
|
|
79
|
-
>
|
|
75
|
+
<label v-if="label" class="text-color-gray-700 justify-start small-normal" :for="selectId">
|
|
80
76
|
{{ label }}
|
|
81
77
|
<span v-if="required" class="text-brick-500">*</span>
|
|
82
78
|
</label>
|
|
@@ -51,11 +51,7 @@ const decrement = () => {
|
|
|
51
51
|
|
|
52
52
|
<template>
|
|
53
53
|
<div class="inline-flex flex-col gap-1">
|
|
54
|
-
<label
|
|
55
|
-
v-if="label"
|
|
56
|
-
class="text-color-gray-700 justify-start body-normal text-sm"
|
|
57
|
-
:for="INPUT_ID"
|
|
58
|
-
>
|
|
54
|
+
<label v-if="label" class="text-color-gray-700 justify-start small-normal" :for="INPUT_ID">
|
|
59
55
|
{{ label }}
|
|
60
56
|
<span v-if="required" class="text-brick-500">*</span>
|
|
61
57
|
</label>
|
|
@@ -50,11 +50,7 @@ const select = (opt: SelectOption, close: () => void) => {
|
|
|
50
50
|
|
|
51
51
|
<template>
|
|
52
52
|
<div class="inline-flex flex-col gap-1">
|
|
53
|
-
<label
|
|
54
|
-
v-if="label"
|
|
55
|
-
class="text-color-gray-700 justify-start body-normal text-sm"
|
|
56
|
-
:for="fieldId"
|
|
57
|
-
>
|
|
53
|
+
<label v-if="label" class="text-color-gray-700 justify-start small-normal" :for="fieldId">
|
|
58
54
|
{{ label }}
|
|
59
55
|
<span v-if="required" class="text-brick-500">*</span>
|
|
60
56
|
</label>
|
|
@@ -6,6 +6,10 @@ import NexxtButton from '../Button/Button.vue'
|
|
|
6
6
|
// literal union rejecting it. The known values still autocomplete.
|
|
7
7
|
type ButtonVariant = InstanceType<typeof NexxtButton>['$props']['variant']
|
|
8
8
|
|
|
9
|
+
// Derived from NexxtButton rather than restated, so the two cannot drift when
|
|
10
|
+
// the icon set changes.
|
|
11
|
+
type ButtonIcon = InstanceType<typeof NexxtButton>['$props']['icon']
|
|
12
|
+
|
|
9
13
|
interface NexxtModalFooterProps {
|
|
10
14
|
/**
|
|
11
15
|
* Label of the cancel button. Required: this library has no i18n layer, so
|
|
@@ -24,6 +28,8 @@ interface NexxtModalFooterProps {
|
|
|
24
28
|
* NexxtButton's own default, so it renders like a plain `<NexxtButton>`.
|
|
25
29
|
*/
|
|
26
30
|
confirmVariant?: ButtonVariant | (string & {})
|
|
31
|
+
/** Icon rendered on the action button, before its label. */
|
|
32
|
+
confirmIcon?: ButtonIcon
|
|
27
33
|
/** Put the action button in its loading state. */
|
|
28
34
|
confirmLoading?: boolean
|
|
29
35
|
/** Disable the action button. */
|
|
@@ -60,6 +66,7 @@ const emit = defineEmits<{ cancel: []; confirm: [] }>()
|
|
|
60
66
|
</NexxtButton>
|
|
61
67
|
<NexxtButton
|
|
62
68
|
:variant="confirmVariant as ButtonVariant"
|
|
69
|
+
:icon="confirmIcon"
|
|
63
70
|
:loading="confirmLoading"
|
|
64
71
|
:disabled="confirmDisabled"
|
|
65
72
|
@click="emit('confirm')"
|
|
@@ -123,11 +123,7 @@ watch(model, () => {
|
|
|
123
123
|
|
|
124
124
|
<template>
|
|
125
125
|
<div class="inline-flex flex-col gap-1">
|
|
126
|
-
<label
|
|
127
|
-
v-if="label"
|
|
128
|
-
class="text-color-gray-700 justify-start body-normal text-sm"
|
|
129
|
-
:for="selectId"
|
|
130
|
-
>
|
|
126
|
+
<label v-if="label" class="text-color-gray-700 justify-start small-normal" :for="selectId">
|
|
131
127
|
{{ label }}
|
|
132
128
|
<span v-if="required" class="text-brick-500">*</span>
|
|
133
129
|
</label>
|
|
@@ -70,7 +70,7 @@ onMounted(async () => {
|
|
|
70
70
|
|
|
71
71
|
<template>
|
|
72
72
|
<div class="flex flex-col gap-1">
|
|
73
|
-
<label v-if="label" class="text-color-gray-700 justify-start
|
|
73
|
+
<label v-if="label" class="text-color-gray-700 justify-start small-normal">
|
|
74
74
|
{{ label }}
|
|
75
75
|
</label>
|
|
76
76
|
<div
|