Add Slots for lucide-vue & lucide-vue-next (#505)

* Add testing library

* Add slot for lucide-vue

* update lockfile

* update lockfile

* Add Test workflows for packages changes

* Add slots to vue 3
This commit is contained in:
Eric Fennis
2022-02-18 14:53:55 +01:00
committed by GitHub
parent a8d007a56e
commit 83c1aba563
14 changed files with 679 additions and 594 deletions
@@ -0,0 +1,36 @@
name: Test Lucide Vue Next
on:
pull_request:
paths:
- packages/lucide-vue-next/**
push:
paths:
- packages/lucide-vue-next/**
workflow_dispatch:
inputs:
version:
description: Version
required: true
jobs:
lucide-vue-next:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: "14"
cache: yarn
- name: Install dependencies
run: yarn --prefer-offline
- name: Build
run: yarn workspace lucide-vue-next build
- name: Test
run: yarn workspace lucide-vue-next test
+36
View File
@@ -0,0 +1,36 @@
name: Test Lucide Vue
on:
pull_request:
paths:
- packages/lucide-vue/**
push:
paths:
- packages/lucide-vue/**
workflow_dispatch:
inputs:
version:
description: Version
required: true
jobs:
lucide-vue:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.4.0
with:
node-version: "14"
cache: yarn
- name: Install dependencies
run: yarn --prefer-offline
- name: Build
run: yarn workspace lucide-vue build
- name: Test
run: yarn workspace lucide-vue test
+1 -1
View File
@@ -11,5 +11,5 @@
>
<path d="M4 19l8-8" />
<path d="M12 19l-8-8" />
<path d="M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29-.313-.362-.747-.603-1.226-.683s-.972.007-1.391.247c-.42.239-.738.614-.899 1.06" />
<path d="M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 00-2.617-.436c-.42.239-.738.614-.899 1.06" />
</svg>

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 404 B

+1
View File
@@ -11,4 +11,5 @@ module.exports = {
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'],
};
+4 -3
View File
@@ -30,13 +30,14 @@
"test:watch": "jest --watchAll"
},
"devDependencies": {
"@vue/compiler-sfc": "^3.0.0",
"@vue/test-utils": "^2.0.0-rc.14",
"@vue/compiler-sfc": "3.0.1",
"@vue/test-utils": "2.0.0-rc.18",
"jest-serializer-vue": "^2.0.2",
"@testing-library/vue": "^6.4.2",
"vue": "3.0.6",
"vue-jest": "^5.0.0-alpha.10"
},
"peerDependencies": {
"vue": "^3.0.0"
"vue": "3.0.1"
}
}
@@ -11,18 +11,26 @@ import defaultAttributes from './defaultAttributes';
*/
export const toKebabCase = string => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
const createVueComponent = (iconName, iconNode) => (props, context) =>
h(
const createVueComponent = (iconName, iconNode) => (
{ size, color, ...props }, // props
{ attrs, emit, slots } // context
) => {
return h(
'svg',
{
...defaultAttributes,
width: props.size || defaultAttributes.width,
height: props.size || defaultAttributes.height,
class: ['lucide', `lucide-${toKebabCase(iconName)}`],
...context.attrs,
width: size || defaultAttributes.width,
height: size || defaultAttributes.height,
stroke: color || defaultAttributes.stroke,
...attrs,
class: ['lucide', `lucide-${toKebabCase(iconName)}`, attrs?.class || ''],
...props,
},
iconNode.map(child => h(...child)),
[
...iconNode.map(child => h(...child)),
...(slots.default ? [slots.default()] : [])
],
);
};
export default createVueComponent;
@@ -1,112 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Using lucide icon components should add a class to the element 1`] = `
VueWrapper {
"__app": Object {
"_component": Object {
"__emits": Object {},
"__props": Array [
Object {},
Array [],
],
"name": "VTU_ROOT",
"render": [Function],
},
"_container": <div
data-v-app=""
>
<svg
class="lucide-icon my-icon"
fill="none"
height="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
cx="12"
cy="12"
r="10"
/>
<path
d="M8 14s1.5 2 4 2 4-2 4-2"
/>
<line
x1="9"
x2="9.01"
y1="9"
y2="9"
/>
<line
x1="15"
x2="15.01"
y1="9"
y2="9"
/>
</svg>
</div>,
"_context": Object {
"app": [Circular],
"components": Object {
"transition": Object {
"name": "transition",
},
"transition-group": Object {
"name": "transition-group",
},
},
"config": Object {
"errorHandler": undefined,
"globalProperties": Object {},
"isCustomElement": [Function],
"isNativeTag": [Function],
"optionMergeStrategies": Object {},
"performance": false,
"warnHandler": undefined,
},
"directives": Object {},
"mixins": Array [
Object {
"__emits": null,
"__props": Array [],
"beforeCreate": [Function],
},
],
"provides": Object {},
"reload": [Function],
},
"_props": null,
"_uid": 2,
"component": [Function],
"config": Object {
"errorHandler": undefined,
"globalProperties": Object {},
"isCustomElement": [Function],
"isNativeTag": [Function],
"optionMergeStrategies": Object {},
"performance": false,
"warnHandler": undefined,
},
"directive": [Function],
"mixin": [Function],
"mount": [Function],
"provide": [Function],
"unmount": [Function],
"use": [Function],
"version": "3.0.6",
},
"__setProps": [Function],
"componentVM": Object {
"hasOwnProperty": [Function],
},
"isDisabled": [Function],
"rootVM": Object {},
"wrapperElement": <svg
class="lucide-icon my-icon"
<div>
<svg
class="my-icon"
fill="none"
height="24"
stroke="currentColor"
@@ -137,117 +34,13 @@ VueWrapper {
y1="9"
y2="9"
/>
</svg>,
}
</svg>
</div>
`;
exports[`Using lucide icon components should add a style attribute to the element 1`] = `
VueWrapper {
"__app": Object {
"_component": Object {
"__emits": Object {},
"__props": Array [
Object {},
Array [],
],
"name": "VTU_ROOT",
"render": [Function],
},
"_container": <div
data-v-app=""
>
<svg
class="lucide lucide-smile-icon"
fill="none"
height="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
style="position: absolute;"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
cx="12"
cy="12"
r="10"
/>
<path
d="M8 14s1.5 2 4 2 4-2 4-2"
/>
<line
x1="9"
x2="9.01"
y1="9"
y2="9"
/>
<line
x1="15"
x2="15.01"
y1="9"
y2="9"
/>
</svg>
</div>,
"_context": Object {
"app": [Circular],
"components": Object {
"transition": Object {
"name": "transition",
},
"transition-group": Object {
"name": "transition-group",
},
},
"config": Object {
"errorHandler": undefined,
"globalProperties": Object {},
"isCustomElement": [Function],
"isNativeTag": [Function],
"optionMergeStrategies": Object {},
"performance": false,
"warnHandler": undefined,
},
"directives": Object {},
"mixins": Array [
Object {
"__emits": null,
"__props": Array [],
"beforeCreate": [Function],
},
],
"provides": Object {},
"reload": [Function],
},
"_props": null,
"_uid": 3,
"component": [Function],
"config": Object {
"errorHandler": undefined,
"globalProperties": Object {},
"isCustomElement": [Function],
"isNativeTag": [Function],
"optionMergeStrategies": Object {},
"performance": false,
"warnHandler": undefined,
},
"directive": [Function],
"mixin": [Function],
"mount": [Function],
"provide": [Function],
"unmount": [Function],
"use": [Function],
"version": "3.0.6",
},
"__setProps": [Function],
"componentVM": Object {
"hasOwnProperty": [Function],
},
"isDisabled": [Function],
"rootVM": Object {},
"wrapperElement": <svg
<div>
<svg
class="lucide lucide-smile-icon"
fill="none"
height="24"
@@ -280,127 +73,22 @@ VueWrapper {
y1="9"
y2="9"
/>
</svg>,
}
</svg>
</div>
`;
exports[`Using lucide icon components should adjust the size, stroke color and stroke width 1`] = `
VueWrapper {
"__app": Object {
"_component": Object {
"__emits": Object {},
"__props": Array [
Object {},
Array [],
],
"name": "VTU_ROOT",
"render": [Function],
},
"_container": <div
data-v-app=""
>
<svg
class="lucide lucide-smile-icon"
fill="none"
height="48"
size="48"
stroke="red"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
strokeWidth="4"
viewBox="0 0 24 24"
width="48"
xmlns="http://www.w3.org/2000/svg"
>
<circle
cx="12"
cy="12"
r="10"
/>
<path
d="M8 14s1.5 2 4 2 4-2 4-2"
/>
<line
x1="9"
x2="9.01"
y1="9"
y2="9"
/>
<line
x1="15"
x2="15.01"
y1="9"
y2="9"
/>
</svg>
</div>,
"_context": Object {
"app": [Circular],
"components": Object {
"transition": Object {
"name": "transition",
},
"transition-group": Object {
"name": "transition-group",
},
},
"config": Object {
"errorHandler": undefined,
"globalProperties": Object {},
"isCustomElement": [Function],
"isNativeTag": [Function],
"optionMergeStrategies": Object {},
"performance": false,
"warnHandler": undefined,
},
"directives": Object {},
"mixins": Array [
Object {
"__emits": null,
"__props": Array [],
"beforeCreate": [Function],
},
],
"provides": Object {},
"reload": [Function],
},
"_props": null,
"_uid": 1,
"component": [Function],
"config": Object {
"errorHandler": undefined,
"globalProperties": Object {},
"isCustomElement": [Function],
"isNativeTag": [Function],
"optionMergeStrategies": Object {},
"performance": false,
"warnHandler": undefined,
},
"directive": [Function],
"mixin": [Function],
"mount": [Function],
"provide": [Function],
"unmount": [Function],
"use": [Function],
"version": "3.0.6",
},
"__setProps": [Function],
"componentVM": Object {
"hasOwnProperty": [Function],
},
"isDisabled": [Function],
"rootVM": Object {},
"wrapperElement": <svg
<div>
<svg
class="lucide lucide-smile-icon"
color="red"
fill="none"
height="48"
size="48"
stroke="red"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
strokeWidth="4"
stroke-width="4"
viewBox="0 0 24 24"
width="48"
xmlns="http://www.w3.org/2000/svg"
@@ -425,116 +113,13 @@ VueWrapper {
y1="9"
y2="9"
/>
</svg>,
}
</svg>
</div>
`;
exports[`Using lucide icon components should render an component 1`] = `
VueWrapper {
"__app": Object {
"_component": Object {
"__emits": Object {},
"__props": Array [
Object {},
Array [],
],
"name": "VTU_ROOT",
"render": [Function],
},
"_container": <div
data-v-app=""
>
<svg
class="lucide lucide-smile-icon"
fill="none"
height="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
cx="12"
cy="12"
r="10"
/>
<path
d="M8 14s1.5 2 4 2 4-2 4-2"
/>
<line
x1="9"
x2="9.01"
y1="9"
y2="9"
/>
<line
x1="15"
x2="15.01"
y1="9"
y2="9"
/>
</svg>
</div>,
"_context": Object {
"app": [Circular],
"components": Object {
"transition": Object {
"name": "transition",
},
"transition-group": Object {
"name": "transition-group",
},
},
"config": Object {
"errorHandler": undefined,
"globalProperties": Object {},
"isCustomElement": [Function],
"isNativeTag": [Function],
"optionMergeStrategies": Object {},
"performance": false,
"warnHandler": undefined,
},
"directives": Object {},
"mixins": Array [
Object {
"__emits": null,
"__props": Array [],
"beforeCreate": [Function],
},
],
"provides": Object {},
"reload": [Function],
},
"_props": null,
"_uid": 0,
"component": [Function],
"config": Object {
"errorHandler": undefined,
"globalProperties": Object {},
"isCustomElement": [Function],
"isNativeTag": [Function],
"optionMergeStrategies": Object {},
"performance": false,
"warnHandler": undefined,
},
"directive": [Function],
"mixin": [Function],
"mount": [Function],
"provide": [Function],
"unmount": [Function],
"use": [Function],
"version": "3.0.6",
},
"__setProps": [Function],
"componentVM": Object {
"hasOwnProperty": [Function],
},
"isDisabled": [Function],
"rootVM": Object {},
"wrapperElement": <svg
exports[`Using lucide icon components should pass children to the icon slot 1`] = `
<div>
<svg
class="lucide lucide-smile-icon"
fill="none"
height="24"
@@ -566,6 +151,49 @@ VueWrapper {
y1="9"
y2="9"
/>
</svg>,
}
<text>
Hello World
</text>
</svg>
</div>
`;
exports[`Using lucide icon components should render an component 1`] = `
<div>
<svg
class="lucide lucide-smile-icon"
fill="none"
height="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
cx="12"
cy="12"
r="10"
/>
<path
d="M8 14s1.5 2 4 2 4-2 4-2"
/>
<line
x1="9"
x2="9.01"
y1="9"
y2="9"
/>
<line
x1="15"
x2="15.01"
y1="9"
y2="9"
/>
</svg>
</div>
`;
@@ -1,44 +1,91 @@
import { mount } from '@vue/test-utils'
import {render, fireEvent} from '@testing-library/vue'
import { Smile } from '../src/icons'
describe('Using lucide icon components', () => {
it('should render an component', () => {
const wrapper = mount(Smile)
expect(wrapper).toMatchSnapshot();
const { container } = render(Smile)
expect(container).toMatchSnapshot();
});
it('should adjust the size, stroke color and stroke width', () => {
const wrapper = mount(Smile, {
propsData: {
const {container} = render(Smile, {
props: {
size: 48,
stroke: 'red',
strokeWidth: 4
color: 'red',
'stroke-width': 4
}
})
expect(wrapper).toMatchSnapshot();
const [icon] = document.getElementsByClassName('lucide');
expect(icon.getAttribute('width')).toBe('48')
expect(icon.getAttribute('stroke')).toBe('red')
expect(icon.getAttribute('stroke-width')).toBe('4')
expect(container).toMatchSnapshot();
});
it('should add a class to the element', () => {
const wrapper = mount(Smile, {
const {container} = render(Smile, {
attrs: {
class: "lucide-icon my-icon"
class: "my-icon"
}
})
expect(wrapper).toMatchSnapshot();
expect(String(wrapper.classes())).toBe(String(['lucide-icon', 'my-icon']))
expect(container).toMatchSnapshot();
const [icon] = document.getElementsByClassName('my-icon');
console.log(icon);
expect(icon).toHaveClass('my-icon')
});
it('should add a style attribute to the element', () => {
const wrapper = mount(Smile, {
const {container} = render(Smile, {
attrs: {
style: 'position: absolute',
}
})
expect(wrapper).toMatchSnapshot();
expect(wrapper.attributes('style')).toContain('position: absolute')
expect(container).toMatchSnapshot();
const [icon] = document.getElementsByClassName('lucide');
expect(icon).toHaveStyle({ position: 'absolute' })
});
it('should call the onClick event', async () => {
const onClick = jest.fn()
render(Smile, {
attrs: {
onClick,
}
})
const [icon] = document.getElementsByClassName('lucide');
await fireEvent.click(icon)
expect(onClick).toHaveBeenCalled()
});
it('should pass children to the icon slot', () => {
const testText = 'Hello World'
const template = {
name: 'Stub',
template: `<text>${testText}</text>`
}
const { getByText, container } = render(Smile, {
slots: {
default: template
}
})
const textElement = getByText(testText)
expect(textElement).toBeInTheDocument()
expect(container).toMatchSnapshot();
});
});
+1
View File
@@ -11,4 +11,5 @@ module.exports = {
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'],
};
+3 -1
View File
@@ -32,7 +32,9 @@
"jest-serializer-vue": "^2.0.2",
"vue": "^2.6.12",
"vue-jest": "^3.0.7",
"vue-template-compiler": "^2.6.12"
"vue-template-compiler": "^2.6.12",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/vue": "^5.8.2"
},
"peerDependencies": {
"vue": "^2.6.12"
@@ -36,6 +36,7 @@ export default (iconName, iconNode) => ({
{
props: { color, size, strokeWidth, defaultClass },
data,
children = [],
},
) {
return createElement(
@@ -54,7 +55,10 @@ export default (iconName, iconNode) => ({
},
on: data?.on || {}
},
iconNode.map(([tag, attrs]) => createElement(tag, { attrs })),
[
...iconNode.map(([tag, attrs]) => createElement(tag, { attrs })),
...children
],
);
},
});
@@ -1,37 +1,195 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Using lucide icon components should add a class to the element 1`] = `
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-smile my-icon">
<circle cx="12" cy="12" r="10"></circle>
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
<line x1="9" y1="9" x2="9.01" y2="9"></line>
<line x1="15" y1="9" x2="15.01" y2="9"></line>
</svg>
<div>
<svg
class="lucide-icon lucide lucide-smile my-icon"
fill="none"
height="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
cx="12"
cy="12"
r="10"
/>
<path
d="M8 14s1.5 2 4 2 4-2 4-2"
/>
<line
x1="9"
x2="9.01"
y1="9"
y2="9"
/>
<line
x1="15"
x2="15.01"
y1="9"
y2="9"
/>
</svg>
</div>
`;
exports[`Using lucide icon components should add a style attribute to the element 1`] = `
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="position: absolute" class="lucide-icon lucide lucide-smile">
<circle cx="12" cy="12" r="10"></circle>
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
<line x1="9" y1="9" x2="9.01" y2="9"></line>
<line x1="15" y1="9" x2="15.01" y2="9"></line>
</svg>
<div>
<svg
class="lucide-icon lucide lucide-smile"
fill="none"
height="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
style="position: absolute"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
cx="12"
cy="12"
r="10"
/>
<path
d="M8 14s1.5 2 4 2 4-2 4-2"
/>
<line
x1="9"
x2="9.01"
y1="9"
y2="9"
/>
<line
x1="15"
x2="15.01"
y1="9"
y2="9"
/>
</svg>
</div>
`;
exports[`Using lucide icon components should adjust the size, stroke color and stroke width 1`] = `
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="red" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-smile">
<circle cx="12" cy="12" r="10"></circle>
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
<line x1="9" y1="9" x2="9.01" y2="9"></line>
<line x1="15" y1="9" x2="15.01" y2="9"></line>
</svg>
<div>
<svg
class="lucide-icon lucide lucide-smile"
fill="none"
height="48"
stroke="red"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="4"
viewBox="0 0 24 24"
width="48"
xmlns="http://www.w3.org/2000/svg"
>
<circle
cx="12"
cy="12"
r="10"
/>
<path
d="M8 14s1.5 2 4 2 4-2 4-2"
/>
<line
x1="9"
x2="9.01"
y1="9"
y2="9"
/>
<line
x1="15"
x2="15.01"
y1="9"
y2="9"
/>
</svg>
</div>
`;
exports[`Using lucide icon components should pass children to the icon slot 1`] = `
<div>
<svg
class="lucide-icon lucide lucide-smile"
fill="none"
height="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
cx="12"
cy="12"
r="10"
/>
<path
d="M8 14s1.5 2 4 2 4-2 4-2"
/>
<line
x1="9"
x2="9.01"
y1="9"
y2="9"
/>
<line
x1="15"
x2="15.01"
y1="9"
y2="9"
/>
<text>
Hello World
</text>
</svg>
</div>
`;
exports[`Using lucide icon components should render an component 1`] = `
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-icon lucide lucide-smile">
<circle cx="12" cy="12" r="10"></circle>
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
<line x1="9" y1="9" x2="9.01" y2="9"></line>
<line x1="15" y1="9" x2="15.01" y2="9"></line>
</svg>
<div>
<svg
class="lucide-icon lucide lucide-smile"
fill="none"
height="24"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
cx="12"
cy="12"
r="10"
/>
<path
d="M8 14s1.5 2 4 2 4-2 4-2"
/>
<line
x1="9"
x2="9.01"
y1="9"
y2="9"
/>
<line
x1="15"
x2="15.01"
y1="9"
y2="9"
/>
</svg>
</div>
`;
+46 -15
View File
@@ -1,56 +1,87 @@
import { mount } from '@vue/test-utils'
import {render, fireEvent} from '@testing-library/vue'
import { Smile } from '../src/icons'
describe('Using lucide icon components', () => {
it('should render an component', () => {
const wrapper = mount(Smile)
expect(wrapper).toMatchSnapshot();
const {container} = render(Smile)
expect(container).toMatchSnapshot();
});
it('should adjust the size, stroke color and stroke width', () => {
const wrapper = mount(Smile, {
propsData: {
const {container} = render(Smile, {
props: {
size: 48,
stroke: 'red',
color: 'red',
strokeWidth: 4
}
})
expect(wrapper).toMatchSnapshot();
const [icon] = document.getElementsByClassName('lucide');
expect(icon.getAttribute('width')).toBe('48')
expect(icon.getAttribute('stroke')).toBe('red')
expect(icon.getAttribute('stroke-width')).toBe('4')
expect(container).toMatchSnapshot();
});
it('should add a class to the element', () => {
const wrapper = mount(Smile, {
const {container} = render(Smile, {
attrs: {
class: "my-icon"
}
})
expect(wrapper).toMatchSnapshot();
expect(String(wrapper.classes())).toBe(String(['lucide-icon','lucide','lucide-smile', 'my-icon']))
expect(container).toMatchSnapshot();
const [icon] = document.getElementsByClassName('lucide');
expect(icon).toHaveClass('my-icon')
});
it('should add a style attribute to the element', () => {
const wrapper = mount(Smile, {
const {container} = render(Smile, {
attrs: {
style: 'position: absolute',
}
})
expect(wrapper).toMatchSnapshot();
expect(wrapper.attributes('style')).toContain('position: absolute')
expect(container).toMatchSnapshot();
const [icon] = document.getElementsByClassName('lucide');
expect(icon).toHaveStyle({ position: 'absolute' })
});
it('should call the onClick event', () => {
it('should call the onClick event', async () => {
const onClick = jest.fn()
const wrapper = mount(Smile, {
render(Smile, {
listeners: {
click: onClick
}
})
wrapper.trigger('click')
const [icon] = document.getElementsByClassName('lucide');
await fireEvent.click(icon)
expect(onClick).toHaveBeenCalled()
});
it('should pass children to the icon slot', () => {
const testText = 'Hello World'
const template = `<text>${testText}</text>`
const { getByText, container } = render(Smile, {
slots: {
default: { template }
}
})
const textElement = getByText(testText)
expect(textElement).toBeInTheDocument()
expect(container).toMatchSnapshot();
});
});
+224 -92
View File
@@ -765,7 +765,7 @@
regenerator-runtime "^0.13.4"
v8flags "^3.1.1"
"@babel/parser@^7.1.0", "@babel/parser@^7.12.0", "@babel/parser@^7.12.3", "@babel/parser@^7.15.0", "@babel/parser@^7.15.4", "@babel/parser@^7.15.8":
"@babel/parser@^7.1.0", "@babel/parser@^7.12.0", "@babel/parser@^7.12.3", "@babel/parser@^7.15.4", "@babel/parser@^7.15.8":
version "7.15.8"
resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.15.8.tgz"
integrity sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA==
@@ -1825,6 +1825,13 @@
dependencies:
regenerator-runtime "^0.13.4"
"@babel/runtime@^7.14.0":
version "7.17.2"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.2.tgz#66f68591605e59da47523c631416b18508779941"
integrity sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==
dependencies:
regenerator-runtime "^0.13.4"
"@babel/runtime@^7.9.2":
version "7.17.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.0.tgz#b8d142fc0f7664fb3d9b5833fd40dcbab89276c0"
@@ -2723,7 +2730,7 @@
resolved "https://registry.yarnpkg.com/@socket.io/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz#568d9beae00b0d835f4f8c53fd55714986492e61"
integrity sha512-dOlCBKnDw4iShaIsH/bxujKTM18+2TOAsYz+KSc11Am38H4q5Xw8Bbz97ZYdrVNM+um3p7w86Bvvmcn9q+5+eQ==
"@testing-library/dom@^7.0.3", "@testing-library/dom@^7.16.2", "@testing-library/dom@^7.28.1":
"@testing-library/dom@^7.0.3", "@testing-library/dom@^7.16.2", "@testing-library/dom@^7.26.6", "@testing-library/dom@^7.28.1", "@testing-library/dom@^7.30.4":
version "7.31.2"
resolved "https://registry.npmjs.org/@testing-library/dom/-/dom-7.31.2.tgz"
integrity sha512-3UqjCpey6HiTZT92vODYLPxTBWlM8ZOOjr3LX5F37/VRipW2M1kX6I/Cm4VXzteZqfGfagg8yXywpcOgQBlNsQ==
@@ -2774,6 +2781,24 @@
dependencies:
"@testing-library/dom" "^7.0.3"
"@testing-library/vue@^5.8.2":
version "5.8.2"
resolved "https://registry.yarnpkg.com/@testing-library/vue/-/vue-5.8.2.tgz#976b2179dc28ceba8dd63b5437edc2749f860252"
integrity sha512-evsQjLw3T/c92ZsXflZMzSN72P06VlgUZMIcrRKn5n9ZX7QgQyebB3DgdmPACf6JgNfP8Y3Lm2212FmeMnWlZw==
dependencies:
"@babel/runtime" "^7.12.5"
"@testing-library/dom" "^7.26.6"
"@vue/test-utils" "^1.1.0"
"@testing-library/vue@^6.4.2":
version "6.4.2"
resolved "https://registry.yarnpkg.com/@testing-library/vue/-/vue-6.4.2.tgz#4286d9b6495fc8869b9e8e1937687c0755412aab"
integrity sha512-L+yFRVu+zc/kwYWRaEF3gkEwUcoxhKNz74aya1NmAni2xrJORMqpY7URKxjfiJb4YchLgA47qEZ3irE11/x/+A==
dependencies:
"@babel/runtime" "^7.14.0"
"@testing-library/dom" "^7.30.4"
"@vue/test-utils" "^2.0.0-rc.0"
"@tootallnate/once@1":
version "1.1.2"
resolved "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz"
@@ -3083,9 +3108,20 @@
react-refresh "^0.10.0"
resolve "^1.20.0"
"@vue/compiler-core@3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.1.tgz#3ce57531078c6220be7ea458e41e4bab3522015b"
integrity sha512-BbQQj9YVNaNWEPnP4PiFKgW8QSGB3dcPSKCtekx1586m4VA1z8hHNLQnzeygtV8BM4oU6yriiWmOIYghbJHwFw==
dependencies:
"@babel/parser" "^7.12.0"
"@babel/types" "^7.12.0"
"@vue/shared" "3.0.1"
estree-walker "^2.0.1"
source-map "^0.6.1"
"@vue/compiler-core@3.0.6":
version "3.0.6"
resolved "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.6.tgz"
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.6.tgz#265bbe0711a81ab4c1344f8294e22e2d08ca167d"
integrity sha512-O7QzQ39DskOoPpEDWRvKwDX7Py9UNT7SvLHvBdIfckGA3OsAEBdiAtuYQNcVmUDeBajm+08v5wyvHWBbWgkilQ==
dependencies:
"@babel/parser" "^7.12.0"
@@ -3094,77 +3130,62 @@
estree-walker "^2.0.1"
source-map "^0.6.1"
"@vue/compiler-core@3.2.20":
version "3.2.20"
resolved "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.20.tgz"
integrity sha512-vcEXlKXoPwBXFP5aUTHN9GTZaDfwCofa9Yu9bbW2C5O/QSa9Esdt7OG4+0RRd3EHEMxUvEdj4RZrd/KpQeiJbA==
"@vue/compiler-dom@3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.1.tgz#00b12f2e4aa55e624e2a5257e4bed93cf7555f0b"
integrity sha512-8cjgswVU2YmV35H9ARZmSlDr1P9VZxUihRwefkrk6Vrsb7kui5C3d/WQ2/su34FSDpyMU1aacUOiL2CV/vdX6w==
dependencies:
"@babel/parser" "^7.15.0"
"@vue/shared" "3.2.20"
estree-walker "^2.0.2"
source-map "^0.6.1"
"@vue/compiler-core" "3.0.1"
"@vue/shared" "3.0.1"
"@vue/compiler-dom@3.0.6":
version "3.0.6"
resolved "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.6.tgz"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.6.tgz#f94c3959320a1252915bd02b943f96a7ee3fc951"
integrity sha512-q1wfHzYwvDRAhBlx+Qa+n3Bu5nHr1qL/j0UbpNlbQDwIlt9zpvmXUrUCL+i55Bh5lLKvSe+mNo0qlwNEApm+jA==
dependencies:
"@vue/compiler-core" "3.0.6"
"@vue/shared" "3.0.6"
"@vue/compiler-dom@3.2.20":
version "3.2.20"
resolved "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.20.tgz"
integrity sha512-QnI77ec/JtV7R0YBbcVayYTDCRcI9OCbxiUQK6izVyqQO0658n0zQuoNwe+bYgtqnvGAIqTR3FShTd5y4oOjdg==
"@vue/compiler-sfc@3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.1.tgz#f340f8f75b5c1c4509e0f3a12c79d1544899b663"
integrity sha512-VO5gJ7SyHw0hf1rkKXRlxjXI9+Q4ngcuUWYnyjOSDch7Wtt2IdOEiC82KFWIkfWMpHqA5HPzL2nDmys3y9d19w==
dependencies:
"@vue/compiler-core" "3.2.20"
"@vue/shared" "3.2.20"
"@vue/compiler-sfc@^3.0.0":
version "3.2.20"
resolved "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.20.tgz"
integrity sha512-03aZo+6tQKiFLfunHKSPZvdK4Jsn/ftRCyaro8AQIWkuxJbvSosbKK6HTTn+D2c3nPScG155akJoxKENw7rftQ==
dependencies:
"@babel/parser" "^7.15.0"
"@vue/compiler-core" "3.2.20"
"@vue/compiler-dom" "3.2.20"
"@vue/compiler-ssr" "3.2.20"
"@vue/ref-transform" "3.2.20"
"@vue/shared" "3.2.20"
estree-walker "^2.0.2"
"@babel/parser" "^7.12.0"
"@babel/types" "^7.12.0"
"@vue/compiler-core" "3.0.1"
"@vue/compiler-dom" "3.0.1"
"@vue/compiler-ssr" "3.0.1"
"@vue/shared" "3.0.1"
consolidate "^0.16.0"
estree-walker "^2.0.1"
hash-sum "^2.0.0"
lru-cache "^5.1.1"
magic-string "^0.25.7"
postcss "^8.1.10"
merge-source-map "^1.1.0"
postcss "^7.0.32"
postcss-modules "^3.2.2"
postcss-selector-parser "^6.0.4"
source-map "^0.6.1"
"@vue/compiler-ssr@3.2.20":
version "3.2.20"
resolved "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.20.tgz"
integrity sha512-rzzVVYivm+EjbfiGQvNeyiYZWzr6Hkej97RZLZvcumacQlnKv9176Xo9rRyeWwFbBlxmtNdrVMslRXtipMXk2w==
"@vue/compiler-ssr@3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.1.tgz#0455b011d72d4ed02faa93610f14981c3d44a079"
integrity sha512-U0Vb7BOniw9rY0/YvXNw5EuIuO0dCoZd3XhnDjAKL9A5pSBxTlx6fPJeQ53gV0XH40M5z8q4yXukFqSVTXC6hQ==
dependencies:
"@vue/compiler-dom" "3.2.20"
"@vue/shared" "3.2.20"
"@vue/compiler-dom" "3.0.1"
"@vue/shared" "3.0.1"
"@vue/reactivity@3.0.6":
version "3.0.6"
resolved "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.6.tgz"
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.6.tgz#7b16f3d5d04cc55028085fff0bb8475cc0e32991"
integrity sha512-hX8PnZayNMoljWSYrZW0OclQnRaMoHxvi5eeFVFPDr7+tzBeiftmmozKttxxCLoDxBWX1B4gNc237DIcYU63Lw==
dependencies:
"@vue/shared" "3.0.6"
"@vue/ref-transform@3.2.20":
version "3.2.20"
resolved "https://registry.npmjs.org/@vue/ref-transform/-/ref-transform-3.2.20.tgz"
integrity sha512-Y42d3PGlYZ1lXcF3dbd3+qU/C/a3wYEZ949fyOI5ptzkjDWlkfU6vn74fmOjsLjEcjs10BXK2qO99FqQIK2r1Q==
dependencies:
"@babel/parser" "^7.15.0"
"@vue/compiler-core" "3.2.20"
"@vue/shared" "3.2.20"
estree-walker "^2.0.2"
magic-string "^0.25.7"
"@vue/runtime-core@3.0.6":
version "3.0.6"
resolved "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.6.tgz"
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.6.tgz#d16779b5664593f1d25be677fb1b1968024aa532"
integrity sha512-x6N38P0DeMyrHiAxCE/rACHTyydOzlg8IyUIPkSJ4rrSkuJnAtFKQicK6fm8NuD21dwdPr8KcZ4Cn4xaqL1JJg==
dependencies:
"@vue/reactivity" "3.0.6"
@@ -3172,22 +3193,36 @@
"@vue/runtime-dom@3.0.6":
version "3.0.6"
resolved "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.6.tgz"
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.6.tgz#e7d6c61913d871f1f020a9a81b558c8fcbeba8c6"
integrity sha512-Y6y4Tak9//VXB2mp2NVQxbwC4a5xsnJpotpo8yBAB3qB3L4v4HQLpqxSkwThRwI6Y6Z7dydX/sgfraqLBE8BWg==
dependencies:
"@vue/runtime-core" "3.0.6"
"@vue/shared" "3.0.6"
csstype "^2.6.8"
"@vue/shared@3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.1.tgz#48196c056726aa7466d0182698524c84f203006b"
integrity sha512-/X6AUbTFCyD2BcJnBoacUct8qcv1A5uk1+N+3tbzDVuhGPRmoYrTSnNUuF53C/GIsTkChrEiXaJh2kyo/0tRvw==
"@vue/shared@3.0.6":
version "3.0.6"
resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.0.6.tgz"
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.6.tgz#d65576430fc4ad383dc7c829118798e5169178d4"
integrity sha512-c37C60HpelUZIx+SNZVEINSxkFzQYhIXFg5AynnIA4QDBmY4iSPoACfGSwSUTCTKImukPeCgY2oqRJVP3R1Mnw==
"@vue/shared@3.2.20":
version "3.2.20"
resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.2.20.tgz"
integrity sha512-FbpX+hD5BvXCQerEYO7jtAGHlhAkhTQ4KIV73kmLWNlawWhTiVuQxizgVb0BOkX5oG9cIRZ42EG++d/k/Efp0w==
"@vue/test-utils@2.0.0-rc.18":
version "2.0.0-rc.18"
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-2.0.0-rc.18.tgz#ff22b252424fe72e5462cbb3a8e7405cef11ffb6"
integrity sha512-aifolXjVdsogjaLmDoZ0FU8vN+R67aWmg9OuVeED4w5Ij5GFQLrlhM19uhWe/r5xXUL4fXMk3pX5wW6FJP1NcQ==
"@vue/test-utils@^1.1.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.3.0.tgz#d563decdcd9c68a7bca151d4179a2bfd6d5c3e15"
integrity sha512-Xk2Xiyj2k5dFb8eYUKkcN9PzqZSppTlx7LaQWBbdA8tqh3jHr/KHX2/YLhNFc/xwDrgeLybqd+4ZCPJSGPIqeA==
dependencies:
dom-event-types "^1.0.0"
lodash "^4.17.15"
pretty "^2.0.0"
"@vue/test-utils@^1.1.2":
version "1.2.2"
@@ -3198,10 +3233,10 @@
lodash "^4.17.15"
pretty "^2.0.0"
"@vue/test-utils@^2.0.0-rc.14":
version "2.0.0-rc.16"
resolved "https://registry.npmjs.org/@vue/test-utils/-/test-utils-2.0.0-rc.16.tgz"
integrity sha512-TubikDVkI2LuRKRPSLv3lYpbpvvucT2DIcGqfBVpvYs4W19u0EBTJEdmfwmSuLY7H1TyAr9Stur3PI1sWWvTGQ==
"@vue/test-utils@^2.0.0-rc.0":
version "2.0.0-rc.17"
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-2.0.0-rc.17.tgz#e6dcf5b5bd3ae23595bdb154b9b578ebcdffd698"
integrity sha512-7LHZKsFRV/HqDoMVY+cJamFzgHgsrmQFalROHC5FMWrzPzd+utG5e11krj1tVsnxYufGA2ABShX4nlcHXED+zQ==
"@webassemblyjs/ast@1.9.0":
version "1.9.0"
@@ -4206,7 +4241,7 @@ blocking-proxy@^1.0.0:
dependencies:
minimist "^1.2.0"
bluebird@^3.5.5:
bluebird@^3.5.5, bluebird@^3.7.2:
version "3.7.2"
resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz"
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
@@ -5146,6 +5181,13 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0:
resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz"
integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
consolidate@^0.16.0:
version "0.16.0"
resolved "https://registry.yarnpkg.com/consolidate/-/consolidate-0.16.0.tgz#a11864768930f2f19431660a65906668f5fbdc16"
integrity sha512-Nhl1wzCslqXYTJVDyJCu3ODohy9OfBMB5uD2BiBTzd7w+QY0lBzafkR8y8755yMYHAaMD4NuzbAw03/xzfw+eQ==
dependencies:
bluebird "^3.7.2"
constants-browserify@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz"
@@ -5992,10 +6034,10 @@ diff-sequences@^26.6.2:
resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz"
integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==
diff-sequences@^27.4.0:
version "27.4.0"
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.4.0.tgz#d783920ad8d06ec718a060d00196dfef25b132a5"
integrity sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww==
diff-sequences@^27.5.0:
version "27.5.0"
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.0.tgz#a8ac0cb742b17d6f30a6c43e233893a2402c0729"
integrity sha512-ZsOBWnhXiH+Zn0DcBNX/tiQsqrREHs/6oQsEVy2VJJjrTblykPima11pyHMSA/7PGmD+fwclTnKVKL/qtNREDQ==
diff@^4.0.1:
version "4.0.2"
@@ -6709,7 +6751,7 @@ estree-walker@^1.0.1:
resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz"
integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==
estree-walker@^2.0.1, estree-walker@^2.0.2:
estree-walker@^2.0.1:
version "2.0.2"
resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz"
integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==
@@ -7342,6 +7384,13 @@ gauge@~2.7.3:
strip-ansi "^3.0.1"
wide-align "^1.1.0"
generic-names@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-2.0.1.tgz#f8a378ead2ccaa7a34f0317b05554832ae41b872"
integrity sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ==
dependencies:
loader-utils "^1.1.0"
gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2:
version "1.0.0-beta.2"
resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz"
@@ -7688,6 +7737,11 @@ hash-base@^3.0.0:
readable-stream "^3.6.0"
safe-buffer "^5.2.0"
hash-sum@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-2.0.0.tgz#81d01bb5de8ea4a214ad5d6ead1b523460b0b45a"
integrity sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==
hash.js@^1.0.0, hash.js@^1.0.3:
version "1.1.7"
resolved "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz"
@@ -7914,6 +7968,18 @@ iconv-lite@^0.6.2:
dependencies:
safer-buffer ">= 2.1.2 < 3.0.0"
icss-replace-symbols@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded"
integrity sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=
icss-utils@^4.0.0, icss-utils@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467"
integrity sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA==
dependencies:
postcss "^7.0.14"
icss-utils@^5.0.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae"
@@ -8734,14 +8800,14 @@ jest-diff@^26.6.2:
pretty-format "^26.6.2"
jest-diff@^27.0.0:
version "27.4.6"
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.4.6.tgz#93815774d2012a2cbb6cf23f84d48c7a2618f98d"
integrity sha512-zjaB0sh0Lb13VyPsd92V7HkqF6yKRH9vm33rwBt7rPYrpQvS1nCvlIy2pICbKta+ZjWngYLNn4cCK4nyZkjS/w==
version "27.5.0"
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.0.tgz#34dc608a3b9159df178dd480b6d835b5e6b92082"
integrity sha512-zztvHDCq/QcAVv+o6rts0reupSOxyrX+KLQEOMWCW2trZgcBFgp/oTK7hJCGpXvEIqKrQzyQlaPKn9W04+IMQg==
dependencies:
chalk "^4.0.0"
diff-sequences "^27.4.0"
jest-get-type "^27.4.0"
pretty-format "^27.4.6"
diff-sequences "^27.5.0"
jest-get-type "^27.5.0"
pretty-format "^27.5.0"
jest-docblock@^21.0.0:
version "21.2.0"
@@ -8796,10 +8862,10 @@ jest-get-type@^26.3.0:
resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz"
integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==
jest-get-type@^27.4.0:
version "27.4.0"
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.4.0.tgz#7503d2663fffa431638337b3998d39c5e928e9b5"
integrity sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ==
jest-get-type@^27.5.0:
version "27.5.0"
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.0.tgz#861c24aa1b176be83c902292cb9618d580cac8a7"
integrity sha512-Vp6O8a52M/dahXRG/E0EJuWQROps2mDQ0sJYPgO8HskhdLwj9ajgngy2OAqZgV6e/RcU67WUHq6TgfvJb8flbA==
jest-haste-map@^26.6.2:
version "26.6.2"
@@ -9589,6 +9655,11 @@ locate-path@^6.0.0:
dependencies:
p-locate "^5.0.0"
lodash.camelcase@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY=
lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz"
@@ -11430,11 +11501,28 @@ postcss-minify-selectors@^5.1.0:
alphanum-sort "^1.0.2"
postcss-selector-parser "^6.0.5"
postcss-modules-extract-imports@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e"
integrity sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==
dependencies:
postcss "^7.0.5"
postcss-modules-extract-imports@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d"
integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==
postcss-modules-local-by-default@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz#bb14e0cc78279d504dbdcbfd7e0ca28993ffbbb0"
integrity sha512-e3xDq+LotiGesympRlKNgaJ0PCzoUIdpH0dj47iWAui/kyTgh3CiAr1qP54uodmJhl6p9rN6BoNcdEDVJx9RDw==
dependencies:
icss-utils "^4.1.1"
postcss "^7.0.32"
postcss-selector-parser "^6.0.2"
postcss-value-parser "^4.1.0"
postcss-modules-local-by-default@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c"
@@ -11444,6 +11532,14 @@ postcss-modules-local-by-default@^4.0.0:
postcss-selector-parser "^6.0.2"
postcss-value-parser "^4.1.0"
postcss-modules-scope@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee"
integrity sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ==
dependencies:
postcss "^7.0.6"
postcss-selector-parser "^6.0.0"
postcss-modules-scope@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz#9ef3151456d3bbfa120ca44898dfca6f2fa01f06"
@@ -11451,6 +11547,14 @@ postcss-modules-scope@^3.0.0:
dependencies:
postcss-selector-parser "^6.0.4"
postcss-modules-values@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz#5b5000d6ebae29b4255301b4a3a54574423e7f10"
integrity sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg==
dependencies:
icss-utils "^4.0.0"
postcss "^7.0.6"
postcss-modules-values@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c"
@@ -11458,6 +11562,21 @@ postcss-modules-values@^4.0.0:
dependencies:
icss-utils "^5.0.0"
postcss-modules@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/postcss-modules/-/postcss-modules-3.2.2.tgz#ee390de0f9f18e761e1778dfb9be26685c02c51f"
integrity sha512-JQ8IAqHELxC0N6tyCg2UF40pACY5oiL6UpiqqcIFRWqgDYO8B0jnxzoQ0EOpPrWXvcpu6BSbQU/3vSiq7w8Nhw==
dependencies:
generic-names "^2.0.1"
icss-replace-symbols "^1.1.0"
lodash.camelcase "^4.3.0"
postcss "^7.0.32"
postcss-modules-extract-imports "^2.0.0"
postcss-modules-local-by-default "^3.0.2"
postcss-modules-scope "^2.2.0"
postcss-modules-values "^3.0.0"
string-hash "^1.1.1"
postcss-normalize-charset@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4"
@@ -11667,6 +11786,14 @@ postcss-selector-parser@^3.0.0:
indexes-of "^1.0.1"
uniq "^1.0.1"
postcss-selector-parser@^6.0.0:
version "6.0.9"
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz#ee71c3b9ff63d9cd130838876c13a2ec1a992b2f"
integrity sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ==
dependencies:
cssesc "^3.0.0"
util-deprecate "^1.0.2"
postcss-selector-parser@^6.0.2:
version "6.0.6"
resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz"
@@ -11751,7 +11878,7 @@ postcss@8.2.15:
nanoid "^3.1.23"
source-map "^0.6.1"
postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.27, postcss@^7.0.35:
postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.27, postcss@^7.0.32, postcss@^7.0.35, postcss@^7.0.5, postcss@^7.0.6:
version "7.0.39"
resolved "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz"
integrity sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==
@@ -11759,15 +11886,6 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.27, postcss@^7.0.35:
picocolors "^0.2.1"
source-map "^0.6.1"
postcss@^8.1.10, postcss@^8.3.8:
version "8.3.9"
resolved "https://registry.npmjs.org/postcss/-/postcss-8.3.9.tgz"
integrity sha512-f/ZFyAKh9Dnqytx5X62jgjhhzttjZS7hMsohcI7HEI5tjELX/HxCy3EFhsRxyzGvrzFF+82XPvCS8T9TFleVJw==
dependencies:
nanoid "^3.1.28"
picocolors "^0.2.1"
source-map-js "^0.6.2"
postcss@^8.1.4, postcss@^8.2.4, postcss@^8.3.7:
version "8.4.5"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.5.tgz#bae665764dfd4c6fcc24dc0fdf7e7aa00cc77f95"
@@ -11777,6 +11895,15 @@ postcss@^8.1.4, postcss@^8.2.4, postcss@^8.3.7:
picocolors "^1.0.0"
source-map-js "^1.0.1"
postcss@^8.3.8:
version "8.3.9"
resolved "https://registry.npmjs.org/postcss/-/postcss-8.3.9.tgz"
integrity sha512-f/ZFyAKh9Dnqytx5X62jgjhhzttjZS7hMsohcI7HEI5tjELX/HxCy3EFhsRxyzGvrzFF+82XPvCS8T9TFleVJw==
dependencies:
nanoid "^3.1.28"
picocolors "^0.2.1"
source-map-js "^0.6.2"
potrace@2.1.8:
version "2.1.8"
resolved "https://registry.npmjs.org/potrace/-/potrace-2.1.8.tgz"
@@ -11838,10 +11965,10 @@ pretty-format@^26.6.2:
ansi-styles "^4.0.0"
react-is "^17.0.1"
pretty-format@^27.0.0, pretty-format@^27.4.6:
version "27.4.6"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.4.6.tgz#1b784d2f53c68db31797b2348fa39b49e31846b7"
integrity sha512-NblstegA1y/RJW2VyML+3LlpFjzx62cUrtBIKIWDXEDkjNeleA7Od7nrzcs/VLQvAeV4CgSYhrN39DRN88Qi/g==
pretty-format@^27.0.0, pretty-format@^27.5.0:
version "27.5.0"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.0.tgz#71e1af7a4b587d259fa4668dcd3e94af077767cb"
integrity sha512-xEi6BRPZ+J1AIS4BAtFC/+rh5jXlXObGZjx5+OSpM95vR/PGla78bFVHMy5GdZjP9wk3AHAMHROXq/r69zXltw==
dependencies:
ansi-regex "^5.0.1"
ansi-styles "^5.0.0"
@@ -13602,6 +13729,11 @@ string-argv@0.3.1:
resolved "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz"
integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==
string-hash@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b"
integrity sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=
string-length@^4.0.1:
version "4.0.2"
resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz"
@@ -14756,7 +14888,7 @@ vue-template-es2015-compiler@^1.6.0:
vue@3.0.6:
version "3.0.6"
resolved "https://registry.npmjs.org/vue/-/vue-3.0.6.tgz"
resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.6.tgz#2c16ed4bb66f16d6c6f6eaa3b7d5835a76598049"
integrity sha512-fgjbe/+f1EsqG7ZbaFSnxdzQXF2DKoFCdJlPxZZJy9XMtyXS6SY8pGzLi8WYb4zmsPLHvTZz4bHW30kFDk7vfA==
dependencies:
"@vue/compiler-dom" "3.0.6"