@esic-lab/data-core-ui 0.0.2

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 (59) hide show
  1. package/.storybook/main.ts +12 -0
  2. package/.storybook/preview.ts +16 -0
  3. package/.storybook/vitest.setup.ts +7 -0
  4. package/LICENSE +21 -0
  5. package/package.json +52 -0
  6. package/postcss.config.js +5 -0
  7. package/src/Button/GhostButton/GhostButton.stories.tsx +20 -0
  8. package/src/Button/GhostButton/GhostButton.tsx +26 -0
  9. package/src/Button/PrimaryButton/PrimaryButton.stories.tsx +21 -0
  10. package/src/Button/PrimaryButton/PrimaryButton.tsx +35 -0
  11. package/src/Button/SecondaryButton/SecondaryButton.stories.tsx +16 -0
  12. package/src/Button/SecondaryButton/SecondaryButton.tsx +26 -0
  13. package/src/Checkbox/Checkbox/Checkbox.stories.tsx +17 -0
  14. package/src/Checkbox/Checkbox/Checkbox.tsx +27 -0
  15. package/src/Checkbox/CheckboxGroup/CheckboxGroup.stories.tsx +35 -0
  16. package/src/Checkbox/CheckboxGroup/CheckboxGroup.tsx +23 -0
  17. package/src/Loader/Loader/Loader.stories.tsx +16 -0
  18. package/src/Loader/Loader/Loader.tsx +12 -0
  19. package/src/NavBar/MenuNavBar/MenuNavBar.stories.tsx +85 -0
  20. package/src/NavBar/MenuNavBar/MenuNavBar.tsx +43 -0
  21. package/src/NavBar/TopNavBar/TopNavBar.stories.tsx +16 -0
  22. package/src/NavBar/TopNavBar/TopNavBar.tsx +24 -0
  23. package/src/Radio/Radio/Radio.stories.tsx +17 -0
  24. package/src/Radio/Radio/Radio.tsx +15 -0
  25. package/src/Radio/RadioGroup/RadioGroup.stories.tsx +23 -0
  26. package/src/Radio/RadioGroup/RadioGroup.tsx +27 -0
  27. package/src/Switch/Switch/Switch.stories.tsx +18 -0
  28. package/src/Switch/Switch/Switch.tsx +25 -0
  29. package/src/assets/STO-logo.svg +92 -0
  30. package/src/index.css +260 -0
  31. package/src/index.ts +24 -0
  32. package/stories/Button.stories.ts +49 -0
  33. package/stories/Button.tsx +33 -0
  34. package/stories/Configure.mdx +364 -0
  35. package/stories/Header.stories.ts +29 -0
  36. package/stories/Header.tsx +47 -0
  37. package/stories/Page.stories.ts +28 -0
  38. package/stories/Page.tsx +69 -0
  39. package/stories/assets/accessibility.png +0 -0
  40. package/stories/assets/accessibility.svg +1 -0
  41. package/stories/assets/addon-library.png +0 -0
  42. package/stories/assets/assets.png +0 -0
  43. package/stories/assets/avif-test-image.avif +0 -0
  44. package/stories/assets/context.png +0 -0
  45. package/stories/assets/discord.svg +1 -0
  46. package/stories/assets/docs.png +0 -0
  47. package/stories/assets/figma-plugin.png +0 -0
  48. package/stories/assets/github.svg +1 -0
  49. package/stories/assets/share.png +0 -0
  50. package/stories/assets/styling.png +0 -0
  51. package/stories/assets/testing.png +0 -0
  52. package/stories/assets/theming.png +0 -0
  53. package/stories/assets/tutorials.svg +1 -0
  54. package/stories/assets/youtube.svg +1 -0
  55. package/stories/button.css +30 -0
  56. package/stories/header.css +32 -0
  57. package/stories/page.css +68 -0
  58. package/tsconfig.json +16 -0
  59. package/vitest.config.js +35 -0
@@ -0,0 +1,68 @@
1
+ .storybook-page {
2
+ margin: 0 auto;
3
+ padding: 48px 20px;
4
+ max-width: 600px;
5
+ color: #333;
6
+ font-size: 14px;
7
+ line-height: 24px;
8
+ font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
9
+ }
10
+
11
+ .storybook-page h2 {
12
+ display: inline-block;
13
+ vertical-align: top;
14
+ margin: 0 0 4px;
15
+ font-weight: 700;
16
+ font-size: 32px;
17
+ line-height: 1;
18
+ }
19
+
20
+ .storybook-page p {
21
+ margin: 1em 0;
22
+ }
23
+
24
+ .storybook-page a {
25
+ color: inherit;
26
+ }
27
+
28
+ .storybook-page ul {
29
+ margin: 1em 0;
30
+ padding-left: 30px;
31
+ }
32
+
33
+ .storybook-page li {
34
+ margin-bottom: 8px;
35
+ }
36
+
37
+ .storybook-page .tip {
38
+ display: inline-block;
39
+ vertical-align: top;
40
+ margin-right: 10px;
41
+ border-radius: 1em;
42
+ background: #e7fdd8;
43
+ padding: 4px 12px;
44
+ color: #357a14;
45
+ font-weight: 700;
46
+ font-size: 11px;
47
+ line-height: 12px;
48
+ }
49
+
50
+ .storybook-page .tip-wrapper {
51
+ margin-top: 40px;
52
+ margin-bottom: 40px;
53
+ font-size: 13px;
54
+ line-height: 20px;
55
+ }
56
+
57
+ .storybook-page .tip-wrapper svg {
58
+ display: inline-block;
59
+ vertical-align: top;
60
+ margin-top: 3px;
61
+ margin-right: 4px;
62
+ width: 12px;
63
+ height: 12px;
64
+ }
65
+
66
+ .storybook-page .tip-wrapper svg path {
67
+ fill: #1ea7fd;
68
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "jsx": "react-jsx",
6
+ "strict": true,
7
+ "moduleResolution": "node",
8
+ "esModuleInterop": true,
9
+ "skipLibCheck": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "resolveJsonModule": true,
12
+ "isolatedModules": true,
13
+ "types": ["node", "react", "react-dom"]
14
+ },
15
+ "include": ["src", ".storybook"]
16
+ }
@@ -0,0 +1,35 @@
1
+ import path from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
+
4
+ import { defineConfig } from 'vitest/config';
5
+
6
+ import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
7
+
8
+ const dirname =
9
+ typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
10
+
11
+ // More info at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon
12
+ export default defineConfig({
13
+ test: {
14
+ projects: [
15
+ {
16
+ extends: true,
17
+ plugins: [
18
+ // The plugin will run tests for the stories defined in your Storybook config
19
+ // See options at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon#storybooktest
20
+ storybookTest({ configDir: path.join(dirname, '.storybook') }),
21
+ ],
22
+ test: {
23
+ name: 'storybook',
24
+ browser: {
25
+ enabled: true,
26
+ headless: true,
27
+ provider: 'playwright',
28
+ instances: [{ browser: 'chromium' }]
29
+ },
30
+ setupFiles: ['.storybook/vitest.setup.js'],
31
+ },
32
+ },
33
+ ],
34
+ },
35
+ });