bevi-icon 1.0.2 → 1.0.3

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/package.json CHANGED
@@ -1,21 +1,26 @@
1
1
  {
2
2
  "name": "bevi-icon",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Biblioteca de ícones da Bevi",
5
+ "type": "module",
5
6
  "main": "dist/main.js",
6
7
  "types": "dist/main.d.ts",
7
- "type": "module",
8
+ "files": [
9
+ "dist"
10
+ ],
8
11
  "scripts": {
9
12
  "dev": "vite",
10
13
  "build": "tsc --p ./tsconfig-build.json && vite build",
11
14
  "preview": "vite preview",
12
15
  "prepublishOnly": "npm run build"
13
16
  },
14
- "dependencies": {
17
+ "peerDependencies": {
15
18
  "react": "^18.2.0",
16
19
  "react-dom": "^18.2.0"
17
20
  },
18
21
  "devDependencies": {
22
+ "react": "^18.2.0",
23
+ "react-dom": "^18.2.0",
19
24
  "@types/node": "^20.7.1",
20
25
  "@types/react": "^18.0.27",
21
26
  "@types/react-dom": "^18.0.10",
package/index.html DELETED
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>Vite + React + TS</title>
8
- </head>
9
- <body>
10
- <div id="root"></div>
11
- <script type="module" src="/src/main.tsx"></script>
12
- </body>
13
- </html>
@@ -1,29 +0,0 @@
1
- import {FC} from 'react'
2
- import solid from './variant/solid'
3
- import duo from './variant/duo'
4
- import dark from './variant/dark'
5
- import light from './variant/light'
6
-
7
- interface VariationIconProps {
8
- variant: string
9
- name: string
10
- }
11
-
12
- const Icon: FC<VariationIconProps> = ({
13
- variant,
14
- name,
15
- }) => {
16
- if (variant === 'solid') {
17
- return <>{solid[name]}</>
18
- } else if (variant === 'duo') {
19
- return <>{duo[name]}</>
20
- } else if (variant === 'dark') {
21
- return <>{dark[name]}</>
22
- } else if (variant === 'light') {
23
- return <>{light[name]}</>
24
- } else {
25
- return <span>Variante não encontrada</span>
26
- }
27
- }
28
-
29
- export default Icon
@@ -1,45 +0,0 @@
1
- import { FC } from 'react'
2
- import Icon from './Icon'
3
-
4
- const variantTheme = {
5
- solid: "222343",
6
- dark: "222343",
7
- light: "25CBDB",
8
- duo: "inherit"
9
- };
10
-
11
- interface BvIconProps {
12
- variant?: string | 'solid' | 'duo' | 'dark' | 'light'
13
- name: string
14
- title?: string
15
- size?: number
16
- className?: string
17
- }
18
-
19
- const BvIcon: FC<BvIconProps> = ({
20
- variant = "solid",
21
- name,
22
- title,
23
- size,
24
- }, props) => {
25
-
26
- return (
27
- <svg
28
- width={size ? size * 16 : 32}
29
- height={size ? size * 16 : 32}
30
- viewBox={`0 0 32 32`}
31
- aria-hidden='true'
32
- data-icon={`bv-${name}`}
33
- color={`#${variantTheme[variant as keyof typeof variantTheme]}`}
34
- fill='none'
35
- xmlns='http://www.w3.org/2000/svg' {...props}>
36
- {title ? <title>{title}</title> : ''}
37
- <Icon
38
- variant={variant}
39
- name={name}
40
- />
41
- </svg>
42
- )
43
- }
44
-
45
- export default BvIcon