sprintify-ui 0.8.29 → 0.8.31
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/sprintify-ui.es.js +579 -561
- package/dist/types/components/BaseAppDialogs.vue.d.ts +1 -0
- package/dist/types/components/BaseDialog.vue.d.ts +9 -0
- package/dist/types/types/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/BaseAppDialogs.vue +1 -0
- package/src/components/BaseDataTable.vue +1 -1
- package/src/components/BaseDialog.stories.js +14 -0
- package/src/components/BaseDialog.vue +15 -1
- package/src/stores/dialogs.ts +1 -0
- package/src/types/index.ts +2 -0
|
@@ -13,6 +13,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
13
13
|
default: string;
|
|
14
14
|
type: StringConstructor;
|
|
15
15
|
};
|
|
16
|
+
errorMessage: {
|
|
17
|
+
default: string;
|
|
18
|
+
type: PropType<string | null | undefined>;
|
|
19
|
+
};
|
|
16
20
|
html: {
|
|
17
21
|
default: boolean;
|
|
18
22
|
type: BooleanConstructor;
|
|
@@ -45,6 +49,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
45
49
|
default: string;
|
|
46
50
|
type: StringConstructor;
|
|
47
51
|
};
|
|
52
|
+
errorMessage: {
|
|
53
|
+
default: string;
|
|
54
|
+
type: PropType<string | null | undefined>;
|
|
55
|
+
};
|
|
48
56
|
html: {
|
|
49
57
|
default: boolean;
|
|
50
58
|
type: BooleanConstructor;
|
|
@@ -67,6 +75,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
67
75
|
}, {
|
|
68
76
|
title: string;
|
|
69
77
|
message: string;
|
|
78
|
+
errorMessage: string | null | undefined;
|
|
70
79
|
html: boolean;
|
|
71
80
|
input: boolean | InputConfigProps;
|
|
72
81
|
confirmText: string;
|
|
@@ -120,6 +120,7 @@ export interface DialogOptions {
|
|
|
120
120
|
color?: 'info' | 'success' | 'danger' | 'warning';
|
|
121
121
|
title: string;
|
|
122
122
|
message: string;
|
|
123
|
+
errorMessage?: string | null | undefined;
|
|
123
124
|
html?: boolean;
|
|
124
125
|
input?: InputConfigProps | false;
|
|
125
126
|
confirmText?: string;
|
|
@@ -133,6 +134,7 @@ export interface Dialog {
|
|
|
133
134
|
color: 'info' | 'success' | 'danger' | 'warning';
|
|
134
135
|
title: string;
|
|
135
136
|
message: string;
|
|
137
|
+
errorMessage: string | null | undefined;
|
|
136
138
|
html: boolean;
|
|
137
139
|
input: InputConfigProps | false;
|
|
138
140
|
confirmText: string;
|
package/package.json
CHANGED
|
@@ -79,3 +79,17 @@ WithInput.args = {
|
|
|
79
79
|
placeholder: 'Password',
|
|
80
80
|
},
|
|
81
81
|
};
|
|
82
|
+
|
|
83
|
+
export const ErrorMessage = Template.bind({});
|
|
84
|
+
ErrorMessage.args = {
|
|
85
|
+
color: 'danger',
|
|
86
|
+
title: 'Please confirm your password',
|
|
87
|
+
errorMessage: 'Invalid password',
|
|
88
|
+
input: {
|
|
89
|
+
label: 'Enter your password',
|
|
90
|
+
type: 'password',
|
|
91
|
+
size: 'sm',
|
|
92
|
+
required: true,
|
|
93
|
+
placeholder: 'Password',
|
|
94
|
+
},
|
|
95
|
+
};
|
|
@@ -83,13 +83,22 @@
|
|
|
83
83
|
class="w-full"
|
|
84
84
|
/>
|
|
85
85
|
</BaseField>
|
|
86
|
+
|
|
87
|
+
<BaseAlert
|
|
88
|
+
v-if="errorMessage"
|
|
89
|
+
class="mt-4"
|
|
90
|
+
color="danger"
|
|
91
|
+
bordered
|
|
92
|
+
>
|
|
93
|
+
{{ errorMessage }}
|
|
94
|
+
</BaseAlert>
|
|
86
95
|
</slot>
|
|
87
96
|
</div>
|
|
88
97
|
</div>
|
|
89
98
|
|
|
90
99
|
<div class="mt-5 || sm:mt-4 sm:flex sm:flex-row-reverse">
|
|
91
100
|
<BaseButton
|
|
92
|
-
ref="
|
|
101
|
+
ref="confirmRef"
|
|
93
102
|
size="sm"
|
|
94
103
|
class="mb-2 w-full sm:mb-0 sm:w-auto"
|
|
95
104
|
:color="color"
|
|
@@ -116,6 +125,7 @@ import BaseButton from './BaseButton.vue';
|
|
|
116
125
|
import BaseInput from './BaseInput.vue';
|
|
117
126
|
import BaseField from './BaseField.vue';
|
|
118
127
|
import BasePassword from './BasePassword.vue';
|
|
128
|
+
import BaseAlert from './BaseAlert.vue';
|
|
119
129
|
import { InputConfigProps } from '@/types';
|
|
120
130
|
|
|
121
131
|
const props = defineProps({
|
|
@@ -131,6 +141,10 @@ const props = defineProps({
|
|
|
131
141
|
default: '',
|
|
132
142
|
type: String,
|
|
133
143
|
},
|
|
144
|
+
errorMessage: {
|
|
145
|
+
default: '',
|
|
146
|
+
type: [String, null, undefined] as PropType<string | null | undefined>,
|
|
147
|
+
},
|
|
134
148
|
html: {
|
|
135
149
|
default: false,
|
|
136
150
|
type: Boolean,
|
package/src/stores/dialogs.ts
CHANGED
|
@@ -17,6 +17,7 @@ export const useDialogsStore = defineStore('dialogs', {
|
|
|
17
17
|
color: options.color ?? 'info',
|
|
18
18
|
title: options.title,
|
|
19
19
|
message: options.message,
|
|
20
|
+
errorMessage: options.errorMessage,
|
|
20
21
|
html: options.html ?? false,
|
|
21
22
|
confirmText: options.confirmText ?? t('sui.confirm'),
|
|
22
23
|
cancelText: options.cancelText ?? t('sui.cancel'),
|
package/src/types/index.ts
CHANGED
|
@@ -152,6 +152,7 @@ export interface DialogOptions {
|
|
|
152
152
|
color?: 'info' | 'success' | 'danger' | 'warning';
|
|
153
153
|
title: string;
|
|
154
154
|
message: string;
|
|
155
|
+
errorMessage?: string | null | undefined;
|
|
155
156
|
html?: boolean;
|
|
156
157
|
input?: InputConfigProps | false;
|
|
157
158
|
confirmText?: string;
|
|
@@ -166,6 +167,7 @@ export interface Dialog {
|
|
|
166
167
|
color: 'info' | 'success' | 'danger' | 'warning';
|
|
167
168
|
title: string;
|
|
168
169
|
message: string;
|
|
170
|
+
errorMessage: string | null | undefined;
|
|
169
171
|
html: boolean;
|
|
170
172
|
input: InputConfigProps | false;
|
|
171
173
|
confirmText: string;
|