diff --git a/src/assets/svg/icon-right-arrow.svg b/src/assets/svg/icon-right-arrow.svg
new file mode 100644
index 0000000..4d78b73
--- /dev/null
+++ b/src/assets/svg/icon-right-arrow.svg
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/src/assets/svg/rightArrow.svg b/src/assets/svg/rightArrow.svg
deleted file mode 100644
index 40c36d7..0000000
--- a/src/assets/svg/rightArrow.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
\ No newline at end of file
diff --git a/src/assets/svg/slashes.svg b/src/assets/svg/slashes.svg
new file mode 100644
index 0000000..8505ca2
--- /dev/null
+++ b/src/assets/svg/slashes.svg
@@ -0,0 +1,9 @@
+
diff --git a/src/components/Button/AnimatedArrow.vue b/src/components/AnimatedArrow/AnimatedArrow.vue
similarity index 99%
rename from src/components/Button/AnimatedArrow.vue
rename to src/components/AnimatedArrow/AnimatedArrow.vue
index 583c208..cabcd5f 100644
--- a/src/components/Button/AnimatedArrow.vue
+++ b/src/components/AnimatedArrow/AnimatedArrow.vue
@@ -7,7 +7,6 @@
+
diff --git a/src/components/Card/WCard.spec.ts b/src/components/Card/WCard.spec.ts
new file mode 100644
index 0000000..82865ca
--- /dev/null
+++ b/src/components/Card/WCard.spec.ts
@@ -0,0 +1,54 @@
+import { describe, it, expect } from 'vitest'
+
+import { mount } from '@vue/test-utils'
+import WCard from './WCard.vue'
+import { CardType } from './WCard'
+import AnimatedArrow from '../AnimatedArrow/AnimatedArrow.vue'
+
+describe('WCard', () => {
+ it('base', () => {
+ const wrapper = mount(WCard, {
+ props: {
+ type: CardType.Base
+ },
+ slots: {
+ default: 'Button'
+ }
+ })
+ expect(wrapper.element).toMatchSnapshot()
+ })
+
+ it('icon', () => {
+ const wrapper = mount(WCard, {
+ props: {
+ type: CardType.Icon,
+ title: 'Lorem ipsum',
+ description:
+ 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',
+ url: '#url',
+ urlLabel: 'Link to'
+ },
+ slots: {
+ icon: 'WIcon'
+ }
+ })
+
+ expect(wrapper.element).toMatchSnapshot()
+ })
+
+ it('link', () => {
+ const wrapper = mount(WCard, {
+ props: {
+ type: CardType.Link,
+ title: 'Lorem ipsum'
+ },
+ slots: {
+ description:
+ '
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
'
+ }
+ })
+
+ const found = wrapper.findComponent(AnimatedArrow)
+ expect(found.exists()).toBe(true)
+ })
+})
diff --git a/src/components/Card/WCard.stories.ts b/src/components/Card/WCard.stories.ts
new file mode 100644
index 0000000..9272b46
--- /dev/null
+++ b/src/components/Card/WCard.stories.ts
@@ -0,0 +1,79 @@
+import type { Meta, StoryObj } from '@storybook/vue3'
+import WCard from './WCard.vue'
+import { CardType } from './WCard'
+
+const meta: any = {
+ title: 'Example/WCard',
+ component: WCard,
+ tags: ['autodocs'],
+ argTypes: {
+ type: { control: 'select', options: ['base', 'icon', 'link'] }
+ },
+ args: {
+ type: CardType.Base
+ }
+} satisfies Meta
+
+export default meta
+type Story = StoryObj
+
+export const Base: Story = {
+ render: (args: any) => ({
+ components: { WCard },
+ setup() {
+ return { args }
+ },
+ template: `Lorem ipsum
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.`
+ }),
+ args: {
+ type: 'base'
+ }
+}
+
+export const Icon: Story = {
+ parameters: {
+ backgrounds: { default: 'grey' }
+ },
+ render: (args: any) => ({
+ components: { WCard },
+ setup() {
+ return { args }
+ },
+ template: ``
+ }),
+ args: {
+ type: 'icon',
+ title: 'Lorem ipsum',
+ description:
+ 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',
+ url: '#url',
+ urlLabel: 'Link to'
+ }
+}
+
+export const Link: Story = {
+ render: (args: any) => ({
+ components: { WCard },
+ setup() {
+ return { args }
+ },
+ template: `Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.`
+ }),
+ args: {
+ type: 'link',
+ title: 'Lorem ipsum'
+ }
+}
diff --git a/src/components/Card/WCard.ts b/src/components/Card/WCard.ts
new file mode 100644
index 0000000..ac29952
--- /dev/null
+++ b/src/components/Card/WCard.ts
@@ -0,0 +1,7 @@
+export enum CardType {
+ Base = 'base',
+ Icon = 'icon',
+ Link = 'link'
+}
+
+export const cardTypes = Object.values(CardType)
diff --git a/src/components/Card/WCard.vue b/src/components/Card/WCard.vue
new file mode 100644
index 0000000..047ba2c
--- /dev/null
+++ b/src/components/Card/WCard.vue
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Card/__snapshots__/WCard.spec.ts.snap b/src/components/Card/__snapshots__/WCard.spec.ts.snap
new file mode 100644
index 0000000..2f9c773
--- /dev/null
+++ b/src/components/Card/__snapshots__/WCard.spec.ts.snap
@@ -0,0 +1,136 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`WCard > base 1`] = `
+
+`;
+
+exports[`WCard > icon 1`] = `
+
+
+
+
+
+
+
+
+ WIcon
+
+
+
+
+
+ Lorem ipsum
+
+
+
+
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
+
+
+
+
+
+
+
+
+`;
diff --git a/src/components/IconRounded/WIconRounded.stories.ts b/src/components/IconRounded/WIconRounded.stories.ts
index 11fe8bf..f9809a5 100644
--- a/src/components/IconRounded/WIconRounded.stories.ts
+++ b/src/components/IconRounded/WIconRounded.stories.ts
@@ -36,6 +36,7 @@ export const Default: Story = {
}
}),
args: {
- size: 70
+ size: 70,
+ disableHoverEffect: false
}
}
diff --git a/src/components/IconRounded/WIconRounded.vue b/src/components/IconRounded/WIconRounded.vue
index 75d58fd..a5cf7db 100644
--- a/src/components/IconRounded/WIconRounded.vue
+++ b/src/components/IconRounded/WIconRounded.vue
@@ -1,6 +1,7 @@
@@ -13,6 +14,10 @@ const props = defineProps({
type: Number,
required: false,
default: 70
+ },
+ disableHoverEffect: {
+ type: Boolean,
+ default: false
}
})
@@ -31,4 +36,7 @@ const containerSize = computed(() => `${props.size}px`)
.icon-container {
@apply min-h-[v-bind(containerSize)] min-w-[v-bind(containerSize)];
}
+.hover-effect {
+ @apply hover:bg-wit-blue-300;
+}
diff --git a/src/components/IconRounded/__snapshots__/WIconRounded.spec.ts.snap b/src/components/IconRounded/__snapshots__/WIconRounded.spec.ts.snap
index 811a4fc..94a732e 100644
--- a/src/components/IconRounded/__snapshots__/WIconRounded.spec.ts.snap
+++ b/src/components/IconRounded/__snapshots__/WIconRounded.spec.ts.snap
@@ -2,7 +2,7 @@
exports[`WIconRounded > renders properly 1`] = `
diff --git a/src/components/IconText/__snapshots__/WIconText.spec.ts.snap b/src/components/IconText/__snapshots__/WIconText.spec.ts.snap
index 3e05f39..79af5c0 100644
--- a/src/components/IconText/__snapshots__/WIconText.spec.ts.snap
+++ b/src/components/IconText/__snapshots__/WIconText.spec.ts.snap
@@ -40,7 +40,7 @@ exports[`WIconText > renders properly ROUNDED RIGHT 1`] = `
target="_blank"
>
diff --git a/src/components/Input/WInput.spec.ts b/src/components/Input/WInput.spec.ts
new file mode 100644
index 0000000..da9ef41
--- /dev/null
+++ b/src/components/Input/WInput.spec.ts
@@ -0,0 +1,31 @@
+import { describe, it, expect } from 'vitest'
+
+import { mount } from '@vue/test-utils'
+import WInput from './WInput.vue'
+import { InputType } from './WInput'
+
+describe('WInput', () => {
+ it('base', () => {
+ const wrapper = mount(WInput, {
+ props: {
+ type: InputType.Base,
+ contentType: 'string',
+ placeholder: 'Amount'
+ }
+ })
+
+ expect(wrapper.element).toMatchSnapshot()
+ })
+
+ it('action', () => {
+ const wrapper = mount(WInput, {
+ props: {
+ type: InputType.Action,
+ contentType: 'email',
+ placeholder: 'email@mail.com'
+ }
+ })
+
+ expect(wrapper.element).toMatchSnapshot()
+ })
+})
diff --git a/src/components/Input/WInput.stories.ts b/src/components/Input/WInput.stories.ts
new file mode 100644
index 0000000..f627e0c
--- /dev/null
+++ b/src/components/Input/WInput.stories.ts
@@ -0,0 +1,48 @@
+import type { Meta, StoryObj } from '@storybook/vue3'
+import WInput from './WInput.vue'
+import { InputType, inputTypes } from './WInput'
+
+const meta: any = {
+ title: 'Example/WInput',
+ component: WInput,
+ tags: ['autodocs'],
+ argTypes: {
+ type: { control: 'select', options: inputTypes }
+ },
+ args: {}
+} satisfies Meta
+
+export default meta
+type Story = StoryObj
+
+export const Base: Story = {
+ render: (args: any) => ({
+ components: { WInput },
+ setup() {
+ return { args }
+ },
+ template: `WInput`
+ }),
+ args: {
+ type: InputType.Base,
+ contentType: 'string'
+ }
+}
+
+export const Action: Story = {
+ parameters: {
+ backgrounds: { default: 'grey' }
+ },
+ render: (args: any) => ({
+ components: { WInput },
+ setup() {
+ return { args }
+ },
+ template: `WInput`
+ }),
+ args: {
+ type: InputType.Action,
+ placeholder: 'email@mail.com',
+ contentType: 'email'
+ }
+}
diff --git a/src/components/Input/WInput.ts b/src/components/Input/WInput.ts
new file mode 100644
index 0000000..7321461
--- /dev/null
+++ b/src/components/Input/WInput.ts
@@ -0,0 +1,6 @@
+export enum InputType {
+ Base = 'base',
+ Action = 'action'
+}
+
+export const inputTypes = Object.values(InputType)
diff --git a/src/components/Input/WInput.vue b/src/components/Input/WInput.vue
new file mode 100644
index 0000000..d37aa4a
--- /dev/null
+++ b/src/components/Input/WInput.vue
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
diff --git a/src/components/Input/__snapshots__/WInput.spec.ts.snap b/src/components/Input/__snapshots__/WInput.spec.ts.snap
new file mode 100644
index 0000000..a2340c2
--- /dev/null
+++ b/src/components/Input/__snapshots__/WInput.spec.ts.snap
@@ -0,0 +1,34 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`WInput > action 1`] = `
+
+
+
+
+`;
+
+exports[`WInput > base 1`] = `
+
+
+
+
+`;
diff --git a/src/components/icon/WIcon.vue b/src/components/icon/WIcon.vue
index c720495..4d676b2 100644
--- a/src/components/icon/WIcon.vue
+++ b/src/components/icon/WIcon.vue
@@ -25,7 +25,7 @@ import WindowsIcon from '@/assets/svg/windows.svg?component'
import DiscordIcon from '@/assets/svg/discord.svg?component'
import GateIcon from '@/assets/svg/gate.svg?component'
import GithubIcon from '@/assets/svg/github.svg?component'
-import RightArrowIcon from '@/assets/svg/rightArrow.svg?component'
+import RightArrowIcon from '@/assets/svg/icon-right-arrow.svg?component'
import TelegramIcon from '@/assets/svg/telegram.svg?component'
import XIcon from '@/assets/svg/x.svg?component'
diff --git a/src/components/pagination/WPagination.stories.ts b/src/components/pagination/WPagination.stories.ts
index fa56525..c59e6dc 100644
--- a/src/components/pagination/WPagination.stories.ts
+++ b/src/components/pagination/WPagination.stories.ts
@@ -23,6 +23,6 @@ export const Default: Story = {
args: {
total: 100,
pageSize: 5,
- page: 1,
+ page: 1
}
}
diff --git a/src/index.ts b/src/index.ts
index 1142a92..9fbe31c 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -3,6 +3,7 @@ import './assets/main.css'
import WButton from './components/Button/WButton.vue'
export { buttonTypes } from './components/Button/WButton'
+import WCard from './components/Card/WCard.vue'
import WEmptyState from './components/EmptyState/WEmptyState.vue'
import WFooter from './components/Footer/WFooter.vue'
@@ -15,6 +16,7 @@ import WIconRounded from './components/IconRounded/WIconRounded.vue'
import WIconText from './components/IconText/WIconText.vue'
export { iconTextPositions } from './components/IconText/WIconText'
+import WInput from './components/Input/WInput.vue'
import WLink from './components/Link/WLink.vue'
import WLoadingPlaceholder from './components/LoadingPlaceholder/WLoadingPlaceholder.vue'
@@ -32,11 +34,13 @@ export { SOCIAL_URLS } from './components/SocialsBar/WSocialsBar'
export {
WButton,
+ WCard,
WEmptyState,
WFooter,
WIcon,
- WIconRounded,
WIconText,
+ WIconRounded,
+ WInput,
WLink,
WLoadingPlaceholder,
WNavbar,
@@ -45,13 +49,14 @@ export {
WSocialsBar,
WSpinner
}
-
export type WButton = typeof WButton
+export type WCard = typeof WCard
export type WEmptyState = typeof WEmptyState
export type WFooter = typeof WFooter
export type WIcon = typeof WIcon
export type WIconRounded = typeof WIconRounded
export type WIconText = typeof WIconText
+export type WInput = typeof WInput
export type WLink = typeof WLink
export type WLoadingPlaceholder = typeof WLoadingPlaceholder
export type WNavbar = typeof WNavbar
@@ -65,11 +70,13 @@ import type { App } from 'vue'
const WComponents = {
install(app: App) {
app.component('WButton', WButton)
+ app.component('WCard', WCard)
app.component('WEmptyState', WEmptyState)
app.component('WFooter', WFooter)
app.component('WIcon', WIcon)
app.component('WIconRounded', WIconRounded)
app.component('WIconText', WIconText)
+ app.component('WInput', WInput)
app.component('WLink', WLink)
app.component('WLoadingPlaceholder', WLoadingPlaceholder)
app.component('WNavbar', WNavbar)