w-design-system 0.0.18 → 0.0.19

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.
Files changed (85) hide show
  1. package/.babelrc +8 -0
  2. package/.storybook/main.ts +19 -0
  3. package/.storybook/preview.ts +14 -0
  4. package/dist/components/index.d.ts +0 -1
  5. package/dist/components/index.d.ts.map +1 -1
  6. package/dist/components/index.js +0 -1
  7. package/dist/components/index.js.map +1 -1
  8. package/package.json +2 -6
  9. package/public/favicon.ico +0 -0
  10. package/public/index.html +43 -0
  11. package/public/logo192.png +0 -0
  12. package/public/logo512.png +0 -0
  13. package/public/manifest.json +25 -0
  14. package/public/robots.txt +3 -0
  15. package/src/assets/icon/index.ts +6 -0
  16. package/src/components/Banner/index.tsx +47 -0
  17. package/src/components/Banner/stories.tsx +31 -0
  18. package/src/components/Banner/styles.ts +59 -0
  19. package/src/components/Button/index.tsx +31 -0
  20. package/src/components/Button/stories.tsx +98 -0
  21. package/src/components/Button/styles.ts +198 -0
  22. package/src/components/Button/test.tsx +44 -0
  23. package/src/components/ButtonRadiusIcon/index.tsx +22 -0
  24. package/src/components/ButtonRadiusIcon/stories.tsx +47 -0
  25. package/src/components/ButtonRadiusIcon/styles.ts +139 -0
  26. package/src/components/ButtonRound/index.tsx +25 -0
  27. package/src/components/ButtonRound/stories.tsx +50 -0
  28. package/src/components/ButtonRound/styles.ts +136 -0
  29. package/src/components/IconWrapper/index.tsx +43 -0
  30. package/src/components/Modal/index.tsx +30 -0
  31. package/src/components/Modal/stories.tsx +53 -0
  32. package/src/components/Modal/styles.ts +51 -0
  33. package/src/components/Paragraph/index.tsx +42 -0
  34. package/src/components/Paragraph/stories.tsx +107 -0
  35. package/src/components/Tabs/index.tsx +24 -0
  36. package/src/components/Tabs/stories.tsx +74 -0
  37. package/src/components/Tabs/styles.ts +23 -0
  38. package/src/components/Themes/index.ts +99 -0
  39. package/src/components/Title/index.tsx +33 -0
  40. package/src/components/Title/stories.tsx +68 -0
  41. package/src/components/Types/index.ts +45 -0
  42. package/src/components/index.tsx +10 -0
  43. package/src/index.tsx +11 -0
  44. package/src/prettier.config.js +11 -0
  45. package/src/react-app-env.d.ts +1 -0
  46. package/src/reportWebVitals.ts +16 -0
  47. package/src/setupTests.ts +5 -0
  48. package/src/src/globalStyles.ts +11 -0
  49. package/src/stories/Button.stories.ts +52 -0
  50. package/src/stories/Button.tsx +42 -0
  51. package/src/stories/Configure.mdx +364 -0
  52. package/src/stories/Header.stories.ts +33 -0
  53. package/src/stories/Header.tsx +56 -0
  54. package/src/stories/Page.stories.ts +32 -0
  55. package/src/stories/Page.tsx +73 -0
  56. package/src/stories/assets/accessibility.png +0 -0
  57. package/src/stories/assets/accessibility.svg +1 -0
  58. package/src/stories/assets/addon-library.png +0 -0
  59. package/src/stories/assets/assets.png +0 -0
  60. package/src/stories/assets/avif-test-image.avif +0 -0
  61. package/src/stories/assets/context.png +0 -0
  62. package/src/stories/assets/discord.svg +1 -0
  63. package/src/stories/assets/docs.png +0 -0
  64. package/src/stories/assets/figma-plugin.png +0 -0
  65. package/src/stories/assets/github.svg +1 -0
  66. package/src/stories/assets/share.png +0 -0
  67. package/src/stories/assets/styling.png +0 -0
  68. package/src/stories/assets/testing.png +0 -0
  69. package/src/stories/assets/theming.png +0 -0
  70. package/src/stories/assets/tutorials.svg +1 -0
  71. package/src/stories/assets/youtube.svg +1 -0
  72. package/src/stories/button.css +30 -0
  73. package/src/stories/header.css +32 -0
  74. package/src/stories/page.css +69 -0
  75. package/src/utils/constanst.ts +2 -0
  76. package/tsconfig.json +38 -0
  77. package/webpack.config.js +56 -0
  78. package/dist/assets/icon/svg.d.ts +0 -7
  79. package/dist/bundle.js +0 -549
  80. package/dist/bundle.js.LICENSE.txt +0 -35
  81. /package/{dist/assets/icons → src/assets/icon}/alert.svg +0 -0
  82. /package/{dist/assets/icons → src/assets/icon}/close.svg +0 -0
  83. /package/{dist/assets/icons → src/assets/icon}/comment.svg +0 -0
  84. /package/{dist/assets/icons → src/assets/icon}/doc-check.svg +0 -0
  85. /package/{dist/assets/icons → src/assets/icon}/image.svg +0 -0
@@ -0,0 +1,32 @@
1
+ .storybook-header {
2
+ font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
4
+ padding: 15px 20px;
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: space-between;
8
+ }
9
+
10
+ .storybook-header svg {
11
+ display: inline-block;
12
+ vertical-align: top;
13
+ }
14
+
15
+ .storybook-header h1 {
16
+ font-weight: 700;
17
+ font-size: 20px;
18
+ line-height: 1;
19
+ margin: 6px 0 6px 10px;
20
+ display: inline-block;
21
+ vertical-align: top;
22
+ }
23
+
24
+ .storybook-header button + button {
25
+ margin-left: 10px;
26
+ }
27
+
28
+ .storybook-header .welcome {
29
+ color: #333;
30
+ font-size: 14px;
31
+ margin-right: 10px;
32
+ }
@@ -0,0 +1,69 @@
1
+ .storybook-page {
2
+ font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3
+ font-size: 14px;
4
+ line-height: 24px;
5
+ padding: 48px 20px;
6
+ margin: 0 auto;
7
+ max-width: 600px;
8
+ color: #333;
9
+ }
10
+
11
+ .storybook-page h2 {
12
+ font-weight: 700;
13
+ font-size: 32px;
14
+ line-height: 1;
15
+ margin: 0 0 4px;
16
+ display: inline-block;
17
+ vertical-align: top;
18
+ }
19
+
20
+ .storybook-page p {
21
+ margin: 1em 0;
22
+ }
23
+
24
+ .storybook-page a {
25
+ text-decoration: none;
26
+ color: #1ea7fd;
27
+ }
28
+
29
+ .storybook-page ul {
30
+ padding-left: 30px;
31
+ margin: 1em 0;
32
+ }
33
+
34
+ .storybook-page li {
35
+ margin-bottom: 8px;
36
+ }
37
+
38
+ .storybook-page .tip {
39
+ display: inline-block;
40
+ border-radius: 1em;
41
+ font-size: 11px;
42
+ line-height: 12px;
43
+ font-weight: 700;
44
+ background: #e7fdd8;
45
+ color: #66bf3c;
46
+ padding: 4px 12px;
47
+ margin-right: 10px;
48
+ vertical-align: top;
49
+ }
50
+
51
+ .storybook-page .tip-wrapper {
52
+ font-size: 13px;
53
+ line-height: 20px;
54
+ margin-top: 40px;
55
+ margin-bottom: 40px;
56
+ }
57
+
58
+ .storybook-page .tip-wrapper svg {
59
+ display: inline-block;
60
+ height: 12px;
61
+ width: 12px;
62
+ margin-right: 4px;
63
+ vertical-align: top;
64
+ margin-top: 3px;
65
+ }
66
+
67
+ .storybook-page .tip-wrapper svg path {
68
+ fill: #1ea7fd;
69
+ }
@@ -0,0 +1,2 @@
1
+ export const VARIANTS_TYPES = ['primary', 'secondary', 'success', 'danger', 'gray', 'warning', 'yellow']
2
+ export const VARIANTS_TYPES_BANNER = ['notice', 'success', 'danger', 'warning']
package/tsconfig.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "exclude": [
3
+ "node_modules",
4
+ "dist",
5
+ "./stories"
6
+ ],
7
+ "compilerOptions": {
8
+ "skipLibCheck": true,
9
+ "target": "es6",
10
+ "module": "esnext",
11
+ "lib": [
12
+ "es6",
13
+ "dom"
14
+ ],
15
+ "jsx": "react",
16
+ "declaration": true,
17
+ "declarationMap": true,
18
+ "sourceMap": true,
19
+ "outDir": "./dist",
20
+ "rootDirs": [
21
+ "./src",
22
+ "./stories"
23
+ ],
24
+ "moduleResolution": "node",
25
+ "allowSyntheticDefaultImports": true,
26
+ "esModuleInterop": true,
27
+ "forceConsistentCasingInFileNames": true,
28
+ "allowJs": true,
29
+ "strict": true,
30
+ "noFallthroughCasesInSwitch": true,
31
+ "resolveJsonModule": true,
32
+ "isolatedModules": true,
33
+
34
+ },
35
+ "include": [
36
+ "src"
37
+ ]
38
+ }
@@ -0,0 +1,56 @@
1
+ const path = require("path");
2
+ const CopyWebpackPlugin = require("copy-webpack-plugin");
3
+
4
+ module.exports = {
5
+ mode: "production", // Ou 'development'
6
+ entry: "./src/index.tsx",
7
+ devtool: false, // Desative os mapas de origem se não precisar deles
8
+ output: {
9
+ path: path.resolve(__dirname, "dist"),
10
+ filename: "bundle.js",
11
+ library: "MyLibrary",
12
+ libraryTarget: "umd",
13
+ globalObject: "this",
14
+ },
15
+ module: {
16
+ rules: [
17
+ {
18
+ test: /\.tsx?$/,
19
+ use: "ts-loader",
20
+ exclude: /node_modules/,
21
+ },
22
+ {
23
+ test: /\.js$/,
24
+ use: "source-map-loader",
25
+ enforce: "pre",
26
+ exclude: /node_modules/, // Ignora source maps de node_modules
27
+ },
28
+ {
29
+ test: /\.svg$/,
30
+ use: [
31
+ {
32
+ loader: "file-loader",
33
+ options: {
34
+ name: "[name].[ext]",
35
+ outputPath: "assets/icons/", // Altere o caminho conforme necessário
36
+ },
37
+ },
38
+ ],
39
+ },
40
+ ],
41
+ },
42
+ plugins: [
43
+ new CopyWebpackPlugin({
44
+ patterns: [{ from: "src/assets/icon", to: "assets/icon" }],
45
+ }),
46
+ ],
47
+ resolve: {
48
+ extensions: [".ts", ".tsx", ".js"],
49
+ },
50
+ ignoreWarnings: [
51
+ {
52
+ module: /node_modules\/w-design-system\/dist\/.*\.js$/,
53
+ message: /Failed to parse source map/,
54
+ },
55
+ ],
56
+ };
@@ -1,7 +0,0 @@
1
- declare module '*.svg' {
2
- import * as React from 'react'
3
-
4
- const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement> & { title?: string }>
5
-
6
- export default ReactComponent
7
- }