@sakura-ui/sakura-ui 0.0.1
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/.prettierrc +21 -0
- package/LICENSE +21 -0
- package/README.md +37 -0
- package/examples/index.html +13 -0
- package/examples/src/index.tsx +10 -0
- package/package.json +20 -0
- package/packages/config/coverage/clover.xml +12 -0
- package/packages/config/coverage/coverage-final.json +2 -0
- package/packages/config/coverage/lcov-report/base.css +224 -0
- package/packages/config/coverage/lcov-report/block-navigation.js +87 -0
- package/packages/config/coverage/lcov-report/favicon.png +0 -0
- package/packages/config/coverage/lcov-report/index.html +116 -0
- package/packages/config/coverage/lcov-report/index.ts.html +385 -0
- package/packages/config/coverage/lcov-report/prettify.css +1 -0
- package/packages/config/coverage/lcov-report/prettify.js +2 -0
- package/packages/config/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/packages/config/coverage/lcov-report/sorter.js +196 -0
- package/packages/config/coverage/lcov.info +14 -0
- package/packages/config/jest.config.ts +10 -0
- package/packages/config/package.json +50 -0
- package/packages/config/src/index.ts +100 -0
- package/packages/config/tests/index.test.ts +13 -0
- package/packages/config/tsconfig.json +21 -0
- package/packages/config/vite.config.ts +24 -0
- package/packages/react/package.json +59 -0
- package/packages/react/src/components/Button.tsx +72 -0
- package/packages/react/src/components/Card.tsx +22 -0
- package/packages/react/src/components/Code.tsx +19 -0
- package/packages/react/src/components/Heading.tsx +109 -0
- package/packages/react/src/components/IconButton.tsx +71 -0
- package/packages/react/src/components/InfoCard.tsx +36 -0
- package/packages/react/src/components/Link.tsx +73 -0
- package/packages/react/src/components/List.tsx +38 -0
- package/packages/react/src/components/Pre.tsx +22 -0
- package/packages/react/src/components/Radio.tsx +39 -0
- package/packages/react/src/components/RadioGroup.tsx +38 -0
- package/packages/react/src/components/Select.tsx +41 -0
- package/packages/react/src/components/Table.tsx +111 -0
- package/packages/react/src/components/Text.tsx +35 -0
- package/packages/react/src/components/Textarea.tsx +32 -0
- package/packages/react/src/components/index.ts +15 -0
- package/packages/react/src/index.ts +29 -0
- package/packages/react/src/utils/index.ts +1 -0
- package/packages/react/tsconfig.json +27 -0
- package/packages/react/tsconfig.node.json +9 -0
- package/packages/react/vite.config.ts +26 -0
- package/pnpm-workspace.yaml +3 -0
- package/src/components/Button.tsx +72 -0
- package/src/components/Card.tsx +22 -0
- package/src/components/Code.tsx +19 -0
- package/src/components/Heading.tsx +109 -0
- package/src/components/IconButton.tsx +71 -0
- package/src/components/InfoCard.tsx +36 -0
- package/src/components/Link.tsx +73 -0
- package/src/components/List.tsx +38 -0
- package/src/components/Pre.tsx +22 -0
- package/src/components/Radio.tsx +39 -0
- package/src/components/RadioGroup.tsx +38 -0
- package/src/components/Select.tsx +41 -0
- package/src/components/Table.tsx +111 -0
- package/src/components/Text.tsx +35 -0
- package/src/components/Textarea.tsx +32 -0
- package/src/components/index.ts +15 -0
- package/src/configs/index.ts +92 -0
- package/src/index.ts +59 -0
- package/src/utils/index.ts +1 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export const extend = {
|
|
2
|
+
fontSize: {
|
|
3
|
+
h1: ['42px', '42px'],
|
|
4
|
+
h2: ['32px', '32px'],
|
|
5
|
+
h3: ['26px', '26px'],
|
|
6
|
+
h4: ['22px', '22px'],
|
|
7
|
+
h5: ['20px', '20px'],
|
|
8
|
+
h6: ['18px', '18px'],
|
|
9
|
+
base: ['16px', '28px'],
|
|
10
|
+
code: ['16px', '24px'],
|
|
11
|
+
sm: ['14px', '24px'],
|
|
12
|
+
xs: ['12px', '20px']
|
|
13
|
+
},
|
|
14
|
+
colors: {
|
|
15
|
+
white: {
|
|
16
|
+
1000: '#FFFFFF'
|
|
17
|
+
},
|
|
18
|
+
sea: {
|
|
19
|
+
900: '#0017B6',
|
|
20
|
+
800: '#0024CE',
|
|
21
|
+
700: '#0031D8',
|
|
22
|
+
600: '#003EE5',
|
|
23
|
+
500: '#0946F1',
|
|
24
|
+
400: '#4979F5',
|
|
25
|
+
300: '#7096F8',
|
|
26
|
+
200: '#9DB7F9',
|
|
27
|
+
100: '#C5D7FB',
|
|
28
|
+
50: '#E8F1FE'
|
|
29
|
+
},
|
|
30
|
+
sumi: {
|
|
31
|
+
900: '#1A1A1C',
|
|
32
|
+
800: '#414143',
|
|
33
|
+
700: '#626264',
|
|
34
|
+
600: '#757578',
|
|
35
|
+
500: '#949497',
|
|
36
|
+
400: '#B4B4B7',
|
|
37
|
+
300: '#D8D8DB',
|
|
38
|
+
200: '#E8E8EB',
|
|
39
|
+
100: '#F1F1F4',
|
|
40
|
+
50: '#F8F8FB'
|
|
41
|
+
},
|
|
42
|
+
forest: {
|
|
43
|
+
900: '#115A36',
|
|
44
|
+
800: '#197A4B',
|
|
45
|
+
700: '#1D8B56',
|
|
46
|
+
600: '#259D63',
|
|
47
|
+
500: '#2CAC6E',
|
|
48
|
+
400: '#51B883',
|
|
49
|
+
300: '#71C598',
|
|
50
|
+
200: '#9BD4B5',
|
|
51
|
+
100: '#C2E5D1',
|
|
52
|
+
50: '#E6F5Ec'
|
|
53
|
+
},
|
|
54
|
+
wood: {
|
|
55
|
+
900: '#B65200',
|
|
56
|
+
800: '#C16800',
|
|
57
|
+
700: '#C87504',
|
|
58
|
+
600: '#CD820A',
|
|
59
|
+
500: '#D18D0F',
|
|
60
|
+
400: '#D69C2B',
|
|
61
|
+
300: '#DCAC4D',
|
|
62
|
+
200: '#E5C47f',
|
|
63
|
+
100: '#EFDBB1',
|
|
64
|
+
50: '#F8F1E0'
|
|
65
|
+
},
|
|
66
|
+
sun: {
|
|
67
|
+
900: '#D50000',
|
|
68
|
+
800: '#EC0000',
|
|
69
|
+
700: '#FA1606',
|
|
70
|
+
600: '#FF220D',
|
|
71
|
+
500: '#FF4B36',
|
|
72
|
+
400: '#FF5838',
|
|
73
|
+
300: '#FF7B5C',
|
|
74
|
+
200: '#FFA28B',
|
|
75
|
+
100: '#FFC8B8',
|
|
76
|
+
50: '#FFE7E6'
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
fontFamily: {
|
|
80
|
+
sans: [
|
|
81
|
+
'Noto Sans JP',
|
|
82
|
+
'-apple-system',
|
|
83
|
+
'blinkmacsystemfont',
|
|
84
|
+
'Segoe UI',
|
|
85
|
+
'Hiragino Kaku Gothic ProN',
|
|
86
|
+
'BIZ UDPGothic',
|
|
87
|
+
'meiryo',
|
|
88
|
+
'sans-serif'
|
|
89
|
+
],
|
|
90
|
+
code: ['Monaco', 'Menlo', 'Consolas', 'Courier New', 'monospace']
|
|
91
|
+
}
|
|
92
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { extend } from './configs'
|
|
2
|
+
|
|
3
|
+
interface Config {
|
|
4
|
+
[prop: string]: any
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
//const content = ``
|
|
8
|
+
|
|
9
|
+
export const sakuraConfig = (userConfig = {}) => {
|
|
10
|
+
const newConfig: Config = {
|
|
11
|
+
...userConfig,
|
|
12
|
+
theme: {
|
|
13
|
+
extend: extend
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/*
|
|
17
|
+
if (!newConfig.content) {
|
|
18
|
+
newConfig.content = [content]
|
|
19
|
+
} else if (Array.isArray(newConfig.content)) {
|
|
20
|
+
newConfig.content = [...newConfig.content, content]
|
|
21
|
+
} else if (newConfig.content.files) {
|
|
22
|
+
newConfig.content.files = [...newConfig.content.files, content]
|
|
23
|
+
} else if (!newConfig.content.files) {
|
|
24
|
+
newConfig.content.files = [content]
|
|
25
|
+
}
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
return newConfig
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
Button,
|
|
33
|
+
Card,
|
|
34
|
+
Code,
|
|
35
|
+
H1,
|
|
36
|
+
H2,
|
|
37
|
+
H3,
|
|
38
|
+
H4,
|
|
39
|
+
H5,
|
|
40
|
+
H6,
|
|
41
|
+
IconButton,
|
|
42
|
+
InfoCard,
|
|
43
|
+
Link,
|
|
44
|
+
Ol,
|
|
45
|
+
Ul,
|
|
46
|
+
Pre,
|
|
47
|
+
Radio,
|
|
48
|
+
RadioGroup,
|
|
49
|
+
Select,
|
|
50
|
+
Table,
|
|
51
|
+
Caption,
|
|
52
|
+
Thead,
|
|
53
|
+
Tbody,
|
|
54
|
+
Th,
|
|
55
|
+
Tr,
|
|
56
|
+
Td,
|
|
57
|
+
Text,
|
|
58
|
+
Textarea
|
|
59
|
+
} from './components'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const cx = (...classNames: any[]) => classNames.filter(Boolean).join(' ')
|