@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.
- package/.storybook/main.ts +12 -0
- package/.storybook/preview.ts +16 -0
- package/.storybook/vitest.setup.ts +7 -0
- package/LICENSE +21 -0
- package/package.json +52 -0
- package/postcss.config.js +5 -0
- package/src/Button/GhostButton/GhostButton.stories.tsx +20 -0
- package/src/Button/GhostButton/GhostButton.tsx +26 -0
- package/src/Button/PrimaryButton/PrimaryButton.stories.tsx +21 -0
- package/src/Button/PrimaryButton/PrimaryButton.tsx +35 -0
- package/src/Button/SecondaryButton/SecondaryButton.stories.tsx +16 -0
- package/src/Button/SecondaryButton/SecondaryButton.tsx +26 -0
- package/src/Checkbox/Checkbox/Checkbox.stories.tsx +17 -0
- package/src/Checkbox/Checkbox/Checkbox.tsx +27 -0
- package/src/Checkbox/CheckboxGroup/CheckboxGroup.stories.tsx +35 -0
- package/src/Checkbox/CheckboxGroup/CheckboxGroup.tsx +23 -0
- package/src/Loader/Loader/Loader.stories.tsx +16 -0
- package/src/Loader/Loader/Loader.tsx +12 -0
- package/src/NavBar/MenuNavBar/MenuNavBar.stories.tsx +85 -0
- package/src/NavBar/MenuNavBar/MenuNavBar.tsx +43 -0
- package/src/NavBar/TopNavBar/TopNavBar.stories.tsx +16 -0
- package/src/NavBar/TopNavBar/TopNavBar.tsx +24 -0
- package/src/Radio/Radio/Radio.stories.tsx +17 -0
- package/src/Radio/Radio/Radio.tsx +15 -0
- package/src/Radio/RadioGroup/RadioGroup.stories.tsx +23 -0
- package/src/Radio/RadioGroup/RadioGroup.tsx +27 -0
- package/src/Switch/Switch/Switch.stories.tsx +18 -0
- package/src/Switch/Switch/Switch.tsx +25 -0
- package/src/assets/STO-logo.svg +92 -0
- package/src/index.css +260 -0
- package/src/index.ts +24 -0
- package/stories/Button.stories.ts +49 -0
- package/stories/Button.tsx +33 -0
- package/stories/Configure.mdx +364 -0
- package/stories/Header.stories.ts +29 -0
- package/stories/Header.tsx +47 -0
- package/stories/Page.stories.ts +28 -0
- package/stories/Page.tsx +69 -0
- package/stories/assets/accessibility.png +0 -0
- package/stories/assets/accessibility.svg +1 -0
- package/stories/assets/addon-library.png +0 -0
- package/stories/assets/assets.png +0 -0
- package/stories/assets/avif-test-image.avif +0 -0
- package/stories/assets/context.png +0 -0
- package/stories/assets/discord.svg +1 -0
- package/stories/assets/docs.png +0 -0
- package/stories/assets/figma-plugin.png +0 -0
- package/stories/assets/github.svg +1 -0
- package/stories/assets/share.png +0 -0
- package/stories/assets/styling.png +0 -0
- package/stories/assets/testing.png +0 -0
- package/stories/assets/theming.png +0 -0
- package/stories/assets/tutorials.svg +1 -0
- package/stories/assets/youtube.svg +1 -0
- package/stories/button.css +30 -0
- package/stories/header.css +32 -0
- package/stories/page.css +68 -0
- package/tsconfig.json +16 -0
- package/vitest.config.js +35 -0
package/stories/page.css
ADDED
|
@@ -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
|
+
}
|
package/vitest.config.js
ADDED
|
@@ -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
|
+
});
|