sprintify-ui 0.0.13 → 0.0.14
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 +1159 -1133
- package/dist/tailwindcss/index.js +12 -2
- package/dist/types/src/components/BaseAutocomplete.vue.d.ts +8 -5
- package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +8 -5
- package/dist/types/src/components/BaseBelongsTo.vue.d.ts +8 -5
- package/dist/types/src/components/BaseDatePicker.vue.d.ts +8 -5
- package/dist/types/src/components/BaseInput.vue.d.ts +39 -1
- package/dist/types/src/components/BaseSelect.vue.d.ts +7 -7
- package/dist/types/src/components/BaseTextarea.vue.d.ts +8 -5
- package/package.json +1 -1
- package/src/components/BaseAutocomplete.vue +2 -2
- package/src/components/BaseAutocompleteFetch.vue +2 -2
- package/src/components/BaseBelongsTo.vue +2 -2
- package/src/components/BaseDatePicker.vue +2 -2
- package/src/components/BaseInput.stories.js +20 -1
- package/src/components/BaseInput.vue +42 -14
- package/src/components/BaseSelect.vue +1 -1
- package/src/components/BaseSystemAlert.vue +1 -1
- package/src/components/BaseTextarea.vue +2 -2
|
@@ -1,23 +1,43 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
<div class="inline-flex rounded border border-slate-300">
|
|
3
|
+
<div
|
|
4
|
+
v-if="icon && iconPosition == 'left'"
|
|
5
|
+
class="flex shrink-0 items-center justify-center rounded-l border-r border-slate-300 bg-slate-100 px-3 text-slate-600"
|
|
6
|
+
>
|
|
7
|
+
<BaseIcon icon="heroicons:phone-20-solid" />
|
|
8
|
+
</div>
|
|
9
|
+
<input
|
|
10
|
+
ref="input"
|
|
11
|
+
:value="modelValue"
|
|
12
|
+
:type="type"
|
|
13
|
+
:name="name"
|
|
14
|
+
:step="step"
|
|
15
|
+
:disabled="disabled"
|
|
16
|
+
:placeholder="placeholder"
|
|
17
|
+
:required="required"
|
|
18
|
+
class="border-none bg-transparent outline-none focus:z-[1] focus:ring-2 focus:ring-primary-600 focus:ring-offset-1 disabled:cursor-not-allowed disabled:text-slate-300"
|
|
19
|
+
:class="{
|
|
20
|
+
'rounded-r': icon && iconPosition == 'left',
|
|
21
|
+
'rounded-l': icon && iconPosition == 'right',
|
|
22
|
+
rounded: !icon,
|
|
23
|
+
}"
|
|
24
|
+
:autocomplete="autocomplete ? 'on' : 'off'"
|
|
25
|
+
@keydown.enter="onEnter"
|
|
26
|
+
@input="$emit('update:modelValue', transformInputValue($event))"
|
|
27
|
+
/>
|
|
28
|
+
<div
|
|
29
|
+
v-if="icon && iconPosition == 'right'"
|
|
30
|
+
class="flex shrink-0 items-center justify-center rounded-r border-l border-slate-300 bg-slate-100 px-3 text-slate-600"
|
|
31
|
+
>
|
|
32
|
+
<BaseIcon icon="heroicons:phone-20-solid" />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
16
35
|
</template>
|
|
17
36
|
|
|
18
37
|
<script lang="ts" setup>
|
|
19
38
|
import { get, isNumber, isString, trim } from 'lodash';
|
|
20
39
|
import { PropType } from 'vue';
|
|
40
|
+
import { BaseIcon } from './index';
|
|
21
41
|
|
|
22
42
|
const props = defineProps({
|
|
23
43
|
modelValue: {
|
|
@@ -59,6 +79,14 @@ const props = defineProps({
|
|
|
59
79
|
default: false,
|
|
60
80
|
type: Boolean,
|
|
61
81
|
},
|
|
82
|
+
icon: {
|
|
83
|
+
default: null,
|
|
84
|
+
type: String,
|
|
85
|
+
},
|
|
86
|
+
iconPosition: {
|
|
87
|
+
default: 'left',
|
|
88
|
+
type: String as PropType<'left' | 'right'>,
|
|
89
|
+
},
|
|
62
90
|
});
|
|
63
91
|
|
|
64
92
|
defineEmits(['update:modelValue']);
|
|
@@ -36,7 +36,7 @@ const EMPTY_VALUE_EXTERNAL = null;
|
|
|
36
36
|
const props = defineProps({
|
|
37
37
|
modelValue: {
|
|
38
38
|
default: undefined,
|
|
39
|
-
type: [String, Number, null
|
|
39
|
+
type: [String, Number, null] as PropType<Option | undefined>,
|
|
40
40
|
},
|
|
41
41
|
name: {
|
|
42
42
|
default: undefined,
|
|
@@ -36,7 +36,7 @@ import { RouteLocationRaw } from 'vue-router';
|
|
|
36
36
|
const props = defineProps({
|
|
37
37
|
to: {
|
|
38
38
|
default: undefined,
|
|
39
|
-
type: [Object, String
|
|
39
|
+
type: [Object, String] as PropType<RouteLocationRaw | undefined>,
|
|
40
40
|
},
|
|
41
41
|
action: {
|
|
42
42
|
default: undefined,
|