sprintify-ui 0.8.22 → 0.8.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.8.22",
3
+ "version": "0.8.23",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -1,6 +1,7 @@
1
1
  <template>
2
- <div
2
+ <form
3
3
  class="relative transform overflow-hidden rounded-lg bg-white ring-1 ring-black ring-opacity-10 p-4 text-left shadow-xl transition-all || sm:my-8 sm:w-full sm:max-w-lg"
4
+ @submit.prevent="confirm"
4
5
  >
5
6
  <div class="sm:flex sm:items-start || sm:gap-4">
6
7
  <div
@@ -33,7 +34,9 @@
33
34
  icon="heroicons:information-circle-20-solid"
34
35
  />
35
36
  </div>
36
- <div class="mt-3 text-center || sm:mt-0 sm:text-left">
37
+ <div
38
+ class="mt-3 text-center grow || sm:mt-0 sm:text-left"
39
+ >
37
40
  <slot>
38
41
  <h3
39
42
  id="modal-title"
@@ -69,7 +72,6 @@
69
72
  name="input"
70
73
  :placeholder="inputConfig.placeholder"
71
74
  class="w-full"
72
- tw-input="w-full"
73
75
  />
74
76
  <BaseInput
75
77
  v-else
@@ -88,11 +90,9 @@
88
90
  <div class="mt-5 || sm:mt-4 sm:flex sm:flex-row-reverse">
89
91
  <BaseButton
90
92
  ref="confirm"
91
- type="button"
92
93
  size="sm"
93
94
  class="mb-2 w-full sm:mb-0 sm:w-auto"
94
95
  :color="color"
95
- @click="confirm"
96
96
  >
97
97
  {{ confirmText ?? t('sui.confirm') }}
98
98
  </BaseButton>
@@ -105,7 +105,7 @@
105
105
  {{ cancelText ?? t('sui.cancel') }}
106
106
  </BaseButton>
107
107
  </div>
108
- </div>
108
+ </form>
109
109
  </template>
110
110
 
111
111
  <script lang="ts" setup>
@@ -199,6 +199,9 @@ function confirm() {
199
199
  }
200
200
 
201
201
  emit('confirm', input.value);
202
+
203
+ input.value = '';
204
+
202
205
  }
203
206
 
204
207
  </script>
@@ -251,7 +251,7 @@ function successHandler(response: AxiosResponse<any, any>) {
251
251
  if (props.successHandler) {
252
252
  props.successHandler(response);
253
253
  } else {
254
- const message = response.data.message ?? ('' as string);
254
+ const message = get(response, 'response.data.message', null);
255
255
 
256
256
  if (!message) {
257
257
  return;