vue2-comp-lib 1.0.2 → 1.0.4

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.
@@ -1,107 +0,0 @@
1
- <!-- @format -->
2
- <template>
3
- <div class="loading-dots" :style="containerStyle">
4
- <div class="loading-wrapper">
5
- <div class="loading-container">
6
- <div class="dot dot-1" :style="dotStyle"></div>
7
- <div class="dot dot-2" :style="dotStyle"></div>
8
- </div>
9
- </div>
10
- </div>
11
- </template>
12
-
13
- <script setup lang="ts">
14
- import { computed } from 'vue';
15
-
16
- interface Props {
17
- fill?: string;
18
- size?: string;
19
- dotSize?: string;
20
- }
21
-
22
- const props = withDefaults(defineProps<Props>(), {
23
- fill: '#ffffff',
24
- size: '22px',
25
- dotSize: '12px',
26
- });
27
-
28
- const containerStyle = computed(
29
- () =>
30
- ({
31
- '--loading-dots-size': props.size,
32
- '--loading-dots-dot-size': props.dotSize,
33
- }) as Record<string, string>,
34
- );
35
-
36
- const dotStyle = computed(() => ({ background: props.fill }));
37
- </script>
38
-
39
- <style scoped>
40
- .loading-wrapper {
41
- -webkit-filter: url('#dots');
42
- filter: url('#dots');
43
- }
44
-
45
- .loading-wrapper .loading-container {
46
- position: relative;
47
- height: var(--loading-dots-size);
48
- width: var(--loading-dots-size);
49
- animation: rotating 0.5s linear infinite;
50
- }
51
-
52
- .loading-wrapper .loading-container .dot {
53
- position: absolute;
54
- left: 5px;
55
- top: 5px;
56
- border-radius: 50%;
57
- height: var(--loading-dots-dot-size);
58
- width: var(--loading-dots-dot-size);
59
- background-color: #ffffff;
60
- }
61
-
62
- .loading-wrapper .loading-container .dot.dot-1 {
63
- animation: dot-1 1.5s ease-in-out infinite;
64
- }
65
-
66
- .loading-wrapper .loading-container .dot.dot-2 {
67
- animation: dot-2 1.5s ease-in-out infinite;
68
- }
69
-
70
- .loading-dots-svg {
71
- display: none;
72
- }
73
-
74
- @keyframes rotating {
75
- 0% {
76
- -webkit-transform: rotate(0deg);
77
- transform: rotate(0deg);
78
- }
79
-
80
- 100% {
81
- -webkit-transform: rotate(360deg);
82
- transform: rotate(360deg);
83
- }
84
- }
85
-
86
- @keyframes dot-1 {
87
- 0%,
88
- 100% {
89
- transform: translateY(0) scale(1);
90
- }
91
-
92
- 50% {
93
- transform: translateY(8px) scale(0.6);
94
- }
95
- }
96
-
97
- @keyframes dot-2 {
98
- 0%,
99
- 100% {
100
- transform: translateY(0) scale(1);
101
- }
102
-
103
- 50% {
104
- transform: translateY(-8px) scale(0.6);
105
- }
106
- }
107
- </style>
@@ -1 +0,0 @@
1
- export { default as AppLoadingDots } from './app-loading-dots.vue';
@@ -1,2 +0,0 @@
1
- export * from './app-button-v2';
2
- export * from './app-loading-dots';
package/src/index.ts DELETED
@@ -1,5 +0,0 @@
1
- import './assets/styles/main.css';
2
-
3
- export * from './components';
4
-
5
- export const TEST = 'test';
@@ -1,61 +0,0 @@
1
- import type { Meta } from '@storybook/vue';
2
- import { createStory } from '@/utils/storybook/create-story';
3
- import AppButtonV2, {
4
- type AppButtonV2Color,
5
- type AppButtonV2Type,
6
- type AppButtonV2Variant,
7
- } from '@/components/app-button-v2/app-button-v2.vue';
8
-
9
- const typeOptions: AppButtonV2Type[] = ['button', 'submit', 'reset'];
10
-
11
- const variantOptions: AppButtonV2Variant[] = ['primary', 'secondary'];
12
-
13
- const colorOptions: AppButtonV2Color[] = [
14
- 'sky-blue',
15
- 'slate-purple',
16
- 'ghost',
17
- 'vivid-raspberry',
18
- 'neptune',
19
- 'supernova',
20
- 'sea-foam',
21
- 'white',
22
- 'show-more',
23
- 'phantom',
24
- ];
25
-
26
- export const Default = createStory<typeof AppButtonV2>({
27
- render: (_, { argTypes }) => ({
28
- props: Object.keys(argTypes),
29
- components: { AppButtonV2 },
30
- template: '<app-button-v2 v-bind="$props">Button</app-button-v2>',
31
- }),
32
- argTypes: {
33
- type: {
34
- control: 'select',
35
- options: typeOptions,
36
- },
37
- variant: {
38
- control: 'select',
39
- options: variantOptions,
40
- type: 'string',
41
- },
42
- color: {
43
- control: 'select',
44
- options: colorOptions,
45
- type: 'string',
46
- },
47
- disabled: {
48
- control: 'boolean',
49
- },
50
- },
51
- args: {
52
- type: 'button',
53
- variant: 'primary',
54
- color: 'sky-blue',
55
- },
56
- });
57
-
58
- const meta: Meta<typeof AppButtonV2> = {
59
- component: AppButtonV2,
60
- };
61
- export default meta;
@@ -1,9 +0,0 @@
1
- import type { StoryObj } from '@storybook/vue';
2
- import type { Component } from 'vue';
3
-
4
- export function createStory<
5
- TComponent extends Component,
6
- TStory extends StoryObj<TComponent> = StoryObj<TComponent>,
7
- >(story: TStory): TStory {
8
- return story;
9
- }