sprintify-ui 0.0.8 → 0.0.9
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/README.md +146 -41
- package/dist/sprintify-ui.es.js +260 -260
- package/dist/tailwindcss/index.js +46 -0
- package/package.json +3 -3
- package/src/components/BaseAutocomplete.stories.js +0 -1
- package/src/components/BaseAutocompleteFetch.stories.js +0 -1
- package/src/components/BaseBelongsTo.stories.js +0 -1
- package/src/components/BaseDatePicker.stories.js +0 -5
- package/src/components/BaseDateSelect.stories.js +41 -0
- package/src/components/BaseDateSelect.vue +1 -1
- package/src/components/BaseDescriptionList.stories.js +35 -0
- package/src/components/BaseDescriptionList.vue +3 -1
- package/src/components/BaseSkeleton.vue +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const plugin = require('tailwindcss/plugin');
|
|
2
|
+
|
|
3
|
+
module.exports = plugin(
|
|
4
|
+
function () {
|
|
5
|
+
//
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
theme: {
|
|
9
|
+
zIndex: {
|
|
10
|
+
status: '20',
|
|
11
|
+
menu: '30',
|
|
12
|
+
modal: '40',
|
|
13
|
+
notifications: '50',
|
|
14
|
+
loading: '100',
|
|
15
|
+
},
|
|
16
|
+
animation: {
|
|
17
|
+
shake: 'shake 0.8s cubic-bezier(0.455, 0.03, 0.515, 0.955) both',
|
|
18
|
+
shimmer: 'shimmer 2s infinite both',
|
|
19
|
+
},
|
|
20
|
+
keyframes: {
|
|
21
|
+
shimmer: {
|
|
22
|
+
'100%': {
|
|
23
|
+
transform: 'translateX(100%)',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
shake: {
|
|
27
|
+
'0%, 100%': {
|
|
28
|
+
transform: 'translateX(0)',
|
|
29
|
+
},
|
|
30
|
+
'10%, 30%, 50%, 70%': {
|
|
31
|
+
transform: 'translateX(-10px)',
|
|
32
|
+
},
|
|
33
|
+
'20%, 40%, 60%': {
|
|
34
|
+
transform: 'translateX(10px)',
|
|
35
|
+
},
|
|
36
|
+
'80%': {
|
|
37
|
+
transform: 'translateX(8px)',
|
|
38
|
+
},
|
|
39
|
+
'90%': {
|
|
40
|
+
transform: 'translateX(-8px)',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
}
|
|
46
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sprintify-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "rimraf dist && vue-tsc && vite build",
|
|
6
6
|
"docs:dev": "vitepress dev docs",
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
"@tailwindcss/line-clamp": "^0.4.2",
|
|
44
44
|
"@tailwindcss/typography": "^0.5.8",
|
|
45
45
|
"@types/luxon": "^3.1.0",
|
|
46
|
-
"@types/node": "^17.0.45",
|
|
47
46
|
"@types/object-hash": "^2.2.1",
|
|
48
47
|
"@types/pikaday": "^1.7.6",
|
|
49
48
|
"@types/qs": "^6.9.7",
|
|
@@ -95,6 +94,7 @@
|
|
|
95
94
|
".": {
|
|
96
95
|
"import": "./dist/sprintify-ui.es.js"
|
|
97
96
|
},
|
|
98
|
-
"./dist/style.css": "./dist/style.css"
|
|
97
|
+
"./dist/style.css": "./dist/style.css",
|
|
98
|
+
"./tailwindcss": "./dist/tailwindcss/index.js"
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -21,33 +21,28 @@ const Template = (args) => ({
|
|
|
21
21
|
export const Demo = Template.bind({});
|
|
22
22
|
Demo.args = {
|
|
23
23
|
modelValue: '2023-01-01',
|
|
24
|
-
inputClass: 'border-slate-300',
|
|
25
24
|
};
|
|
26
25
|
|
|
27
26
|
export const YearRange = Template.bind({});
|
|
28
27
|
YearRange.args = {
|
|
29
28
|
modelValue: '1980-11-16',
|
|
30
|
-
inputClass: 'border-slate-300',
|
|
31
29
|
yearRange: [1920, 2020],
|
|
32
30
|
};
|
|
33
31
|
|
|
34
32
|
export const MinDate = Template.bind({});
|
|
35
33
|
MinDate.args = {
|
|
36
34
|
modelValue: '2022-11-16',
|
|
37
|
-
inputClass: 'border-slate-300',
|
|
38
35
|
minDate: DateTime.fromISO('2022-11-10').toJSDate(),
|
|
39
36
|
};
|
|
40
37
|
|
|
41
38
|
export const MaxDate = Template.bind({});
|
|
42
39
|
MaxDate.args = {
|
|
43
40
|
modelValue: '2022-11-16',
|
|
44
|
-
inputClass: 'border-slate-300',
|
|
45
41
|
maxDate: DateTime.fromISO('2022-11-20').toJSDate(),
|
|
46
42
|
};
|
|
47
43
|
|
|
48
44
|
export const Disabled = Template.bind({});
|
|
49
45
|
Disabled.args = {
|
|
50
46
|
modelValue: '2022-11-16',
|
|
51
|
-
inputClass: 'border-slate-300',
|
|
52
47
|
disabled: true,
|
|
53
48
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import BaseDateSelect from './BaseDateSelect.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Form/BaseDateSelect',
|
|
5
|
+
component: BaseDateSelect,
|
|
6
|
+
argTypes: {},
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args) => ({
|
|
10
|
+
components: { BaseDateSelect },
|
|
11
|
+
setup() {
|
|
12
|
+
return { args };
|
|
13
|
+
},
|
|
14
|
+
template: `
|
|
15
|
+
<BaseDateSelect v-bind="args">
|
|
16
|
+
</BaseDateSelect>
|
|
17
|
+
`,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const Demo = Template.bind({});
|
|
21
|
+
Demo.args = {
|
|
22
|
+
modelValue: '2021-01-01',
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const MinYear = Template.bind({});
|
|
26
|
+
MinYear.args = {
|
|
27
|
+
modelValue: '2022-11-16',
|
|
28
|
+
minYear: 1980,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const MaxYear = Template.bind({});
|
|
32
|
+
MaxYear.args = {
|
|
33
|
+
modelValue: '2002-11-16',
|
|
34
|
+
maxYear: 2010,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const Disabled = Template.bind({});
|
|
38
|
+
Disabled.args = {
|
|
39
|
+
modelValue: '2022-11-16',
|
|
40
|
+
disabled: true,
|
|
41
|
+
};
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
<button
|
|
81
81
|
type="button"
|
|
82
82
|
:disabled="disabled"
|
|
83
|
-
class="mt-1 appearance-none border-transparent bg-transparent text-sm text-slate-700 underline outline-none"
|
|
83
|
+
class="mt-1 appearance-none border-transparent bg-transparent text-sm text-slate-700 underline outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
|
84
84
|
@click="clear()"
|
|
85
85
|
>
|
|
86
86
|
<span>{{ $t('sui.clear') }}</span>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import BaseBadge from './BaseBadge.vue';
|
|
2
|
+
import BaseDescriptionList from './BaseDescriptionList.vue';
|
|
3
|
+
import BaseDescriptionListItem from './BaseDescriptionListItem.vue';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/BaseDescriptionList',
|
|
7
|
+
component: BaseDescriptionList,
|
|
8
|
+
argTypes: {},
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const Template = (args) => ({
|
|
12
|
+
components: { BaseDescriptionList, BaseDescriptionListItem, BaseBadge },
|
|
13
|
+
setup() {
|
|
14
|
+
return { args };
|
|
15
|
+
},
|
|
16
|
+
template: `
|
|
17
|
+
<BaseDescriptionList v-bind="args">
|
|
18
|
+
<BaseDescriptionListItem>
|
|
19
|
+
<template #left>Full name</template>
|
|
20
|
+
<template #right>Full name</template>
|
|
21
|
+
</BaseDescriptionListItem>
|
|
22
|
+
<BaseDescriptionListItem>
|
|
23
|
+
<template #left>Age</template>
|
|
24
|
+
<template #right>66 years old</template>
|
|
25
|
+
</BaseDescriptionListItem>
|
|
26
|
+
<BaseDescriptionListItem>
|
|
27
|
+
<template #left>Role</template>
|
|
28
|
+
<template #right><BaseBadge color="indigo">admin</BaseBadge></template>
|
|
29
|
+
</BaseDescriptionListItem>
|
|
30
|
+
</BaseDescriptionList>
|
|
31
|
+
`,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export const Demo = Template.bind({});
|
|
35
|
+
Demo.args = {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="relative isolate overflow-hidden rounded" :class="[background]">
|
|
3
3
|
<div
|
|
4
|
-
class="absolute inset-0 -translate-x-full
|
|
4
|
+
class="animate-shimmer absolute inset-0 -translate-x-full border-t border-white/80 bg-gradient-to-r from-transparent via-white/80 to-transparent"
|
|
5
5
|
:style="{
|
|
6
6
|
animationDelay: delay,
|
|
7
7
|
}"
|