@nexxtmove/ui 1.3.4 → 1.4.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.
|
@@ -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
|
@@ -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
|
])]));
|
package/package.json
CHANGED
|
@@ -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')"
|