sprintify-ui 0.6.46 → 0.6.48
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 +1091 -1083
- package/dist/types/src/components/BaseAutocompleteDrawer.vue.d.ts +1 -1
- package/dist/types/src/components/BaseButton.vue.d.ts +9 -9
- package/dist/types/src/components/BaseDisplayRelativeTime.vue.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/BaseAlert.vue +1 -1
- package/src/components/BaseCounter.stories.js +1 -1
- package/src/components/BaseCounter.vue +3 -2
- package/src/components/BaseDialog.stories.js +19 -16
- package/src/components/BaseDialog.vue +14 -16
|
@@ -70,9 +70,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
70
70
|
}, {
|
|
71
71
|
size: "xs" | "sm" | "md";
|
|
72
72
|
options: NormalizedOption[];
|
|
73
|
+
loading: boolean;
|
|
73
74
|
selected: NormalizedOption | NormalizedOption[] | null | undefined;
|
|
74
75
|
keywords: string;
|
|
75
|
-
loading: boolean;
|
|
76
76
|
loadingBottom: boolean;
|
|
77
77
|
twDrawer: string;
|
|
78
78
|
}, {}>, {
|
|
@@ -29,14 +29,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
29
29
|
type: import("vue").PropType<boolean>;
|
|
30
30
|
default: boolean;
|
|
31
31
|
};
|
|
32
|
-
loading: {
|
|
33
|
-
type: import("vue").PropType<boolean>;
|
|
34
|
-
default: boolean;
|
|
35
|
-
};
|
|
36
32
|
as: {
|
|
37
33
|
type: import("vue").PropType<string>;
|
|
38
34
|
default: string;
|
|
39
35
|
};
|
|
36
|
+
loading: {
|
|
37
|
+
type: import("vue").PropType<boolean>;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
40
|
iconPosition: {
|
|
41
41
|
type: import("vue").PropType<"start" | "end">;
|
|
42
42
|
default: string;
|
|
@@ -72,14 +72,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
72
72
|
type: import("vue").PropType<boolean>;
|
|
73
73
|
default: boolean;
|
|
74
74
|
};
|
|
75
|
-
loading: {
|
|
76
|
-
type: import("vue").PropType<boolean>;
|
|
77
|
-
default: boolean;
|
|
78
|
-
};
|
|
79
75
|
as: {
|
|
80
76
|
type: import("vue").PropType<string>;
|
|
81
77
|
default: string;
|
|
82
78
|
};
|
|
79
|
+
loading: {
|
|
80
|
+
type: import("vue").PropType<boolean>;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
83
|
iconPosition: {
|
|
84
84
|
type: import("vue").PropType<"start" | "end">;
|
|
85
85
|
default: string;
|
|
@@ -94,8 +94,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
94
94
|
icon: string;
|
|
95
95
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
96
96
|
disabled: boolean;
|
|
97
|
-
loading: boolean;
|
|
98
97
|
as: string;
|
|
98
|
+
loading: boolean;
|
|
99
99
|
iconPosition: "start" | "end";
|
|
100
100
|
}, {}>, {
|
|
101
101
|
default?(_: {}): any;
|
package/package.json
CHANGED
|
@@ -34,12 +34,13 @@ const props = defineProps({
|
|
|
34
34
|
const countLabel = computed((): string => {
|
|
35
35
|
const realMaxDigit = Math.max(1, props.maxDigit);
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
// Should work with 0.01
|
|
38
|
+
const countString = Math.round(props.count) + '';
|
|
38
39
|
const numberOfDigit = countString.length;
|
|
39
40
|
if (numberOfDigit > realMaxDigit) {
|
|
40
41
|
return padStart('+', realMaxDigit + 1, '9');
|
|
41
42
|
}
|
|
42
|
-
return
|
|
43
|
+
return props.count + '';
|
|
43
44
|
});
|
|
44
45
|
|
|
45
46
|
const sizeClass = computed((): string => {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import BaseDialog from './BaseDialog.vue';
|
|
2
2
|
|
|
3
|
+
const colors = ['info', 'success', 'warning', 'danger'];
|
|
4
|
+
|
|
3
5
|
export default {
|
|
4
6
|
title: 'Components/BaseDialog',
|
|
5
7
|
component: BaseDialog,
|
|
@@ -10,6 +12,7 @@ export default {
|
|
|
10
12
|
},
|
|
11
13
|
},
|
|
12
14
|
args: {
|
|
15
|
+
color: 'info',
|
|
13
16
|
message:
|
|
14
17
|
'Nisi Lorem sunt amet aliqua dolor ullamco deserunt enim irure non ad. Excepteur culpa consectetur dolore culpa sunt aliquip proident quis.',
|
|
15
18
|
},
|
|
@@ -29,23 +32,23 @@ const Template = (args) => ({
|
|
|
29
32
|
export const Demo = Template.bind({});
|
|
30
33
|
Demo.args = {
|
|
31
34
|
title: 'Be careful',
|
|
32
|
-
color: 'warning',
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export const Success = Template.bind({});
|
|
36
|
-
Success.args = {
|
|
37
|
-
title: 'Success',
|
|
38
|
-
color: 'success',
|
|
39
35
|
};
|
|
40
36
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
37
|
+
const ColorsTemplate = (args) => ({
|
|
38
|
+
components: { BaseDialog },
|
|
39
|
+
setup() {
|
|
40
|
+
return { args, colors };
|
|
41
|
+
},
|
|
42
|
+
template: `
|
|
43
|
+
<div v-for="color in colors" :key="color" class="mb-1">
|
|
44
|
+
<p class="text-xs text-slate-600 leading-tight">{{ color }}</p>
|
|
45
|
+
<BaseDialog v-bind="args" :color="color">
|
|
46
|
+
</BaseDialog>
|
|
47
|
+
</div>
|
|
48
|
+
`,
|
|
49
|
+
});
|
|
46
50
|
|
|
47
|
-
export const
|
|
48
|
-
|
|
49
|
-
title: '
|
|
50
|
-
color: 'info',
|
|
51
|
+
export const Colors = ColorsTemplate.bind({});
|
|
52
|
+
Colors.args = {
|
|
53
|
+
title: 'Be careful',
|
|
51
54
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
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"
|
|
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
4
|
>
|
|
5
|
-
<div class="sm:flex sm:items-start">
|
|
5
|
+
<div class="sm:flex sm:items-start || sm:gap-4">
|
|
6
6
|
<div
|
|
7
7
|
class="mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full sm:mx-0 sm:h-10 sm:w-10"
|
|
8
8
|
:class="{
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
icon="heroicons:information-circle-20-solid"
|
|
34
34
|
/>
|
|
35
35
|
</div>
|
|
36
|
-
<div class="mt-3 text-center sm:mt-0 sm:
|
|
36
|
+
<div class="mt-3 text-center || sm:mt-0 sm:text-left">
|
|
37
37
|
<slot>
|
|
38
38
|
<h3
|
|
39
39
|
id="modal-title"
|
|
@@ -49,28 +49,25 @@
|
|
|
49
49
|
</slot>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
52
|
-
<div class="mt-5 sm:mt-4 sm:flex sm:flex-row-reverse">
|
|
53
|
-
<
|
|
52
|
+
<div class="mt-5 || sm:mt-4 sm:flex sm:flex-row-reverse">
|
|
53
|
+
<BaseButton
|
|
54
54
|
ref="confirm"
|
|
55
55
|
type="button"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
'btn-danger': color == 'danger',
|
|
60
|
-
'btn-warning': color == 'warning',
|
|
61
|
-
'btn-success': color == 'success',
|
|
62
|
-
}"
|
|
56
|
+
size="sm"
|
|
57
|
+
class="mb-2 w-full sm:mb-0 sm:w-auto"
|
|
58
|
+
:color="color"
|
|
63
59
|
@click="$emit('confirm')"
|
|
64
60
|
>
|
|
65
61
|
{{ confirmText ?? t('sui.confirm') }}
|
|
66
|
-
</
|
|
67
|
-
<
|
|
62
|
+
</BaseButton>
|
|
63
|
+
<BaseButton
|
|
68
64
|
type="button"
|
|
69
|
-
|
|
65
|
+
size="sm"
|
|
66
|
+
class="w-full sm:mr-2 sm:w-auto"
|
|
70
67
|
@click="$emit('cancel')"
|
|
71
68
|
>
|
|
72
69
|
{{ cancelText ?? t('sui.cancel') }}
|
|
73
|
-
</
|
|
70
|
+
</BaseButton>
|
|
74
71
|
</div>
|
|
75
72
|
</div>
|
|
76
73
|
</template>
|
|
@@ -79,6 +76,7 @@
|
|
|
79
76
|
import { PropType } from 'vue';
|
|
80
77
|
import { Icon as BaseIcon } from '@iconify/vue';
|
|
81
78
|
import { t } from '@/i18n';
|
|
79
|
+
import BaseButton from './BaseButton.vue';
|
|
82
80
|
|
|
83
81
|
defineProps({
|
|
84
82
|
color: {
|