@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.
Files changed (66) hide show
  1. package/.prettierrc +21 -0
  2. package/LICENSE +21 -0
  3. package/README.md +37 -0
  4. package/examples/index.html +13 -0
  5. package/examples/src/index.tsx +10 -0
  6. package/package.json +20 -0
  7. package/packages/config/coverage/clover.xml +12 -0
  8. package/packages/config/coverage/coverage-final.json +2 -0
  9. package/packages/config/coverage/lcov-report/base.css +224 -0
  10. package/packages/config/coverage/lcov-report/block-navigation.js +87 -0
  11. package/packages/config/coverage/lcov-report/favicon.png +0 -0
  12. package/packages/config/coverage/lcov-report/index.html +116 -0
  13. package/packages/config/coverage/lcov-report/index.ts.html +385 -0
  14. package/packages/config/coverage/lcov-report/prettify.css +1 -0
  15. package/packages/config/coverage/lcov-report/prettify.js +2 -0
  16. package/packages/config/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  17. package/packages/config/coverage/lcov-report/sorter.js +196 -0
  18. package/packages/config/coverage/lcov.info +14 -0
  19. package/packages/config/jest.config.ts +10 -0
  20. package/packages/config/package.json +50 -0
  21. package/packages/config/src/index.ts +100 -0
  22. package/packages/config/tests/index.test.ts +13 -0
  23. package/packages/config/tsconfig.json +21 -0
  24. package/packages/config/vite.config.ts +24 -0
  25. package/packages/react/package.json +59 -0
  26. package/packages/react/src/components/Button.tsx +72 -0
  27. package/packages/react/src/components/Card.tsx +22 -0
  28. package/packages/react/src/components/Code.tsx +19 -0
  29. package/packages/react/src/components/Heading.tsx +109 -0
  30. package/packages/react/src/components/IconButton.tsx +71 -0
  31. package/packages/react/src/components/InfoCard.tsx +36 -0
  32. package/packages/react/src/components/Link.tsx +73 -0
  33. package/packages/react/src/components/List.tsx +38 -0
  34. package/packages/react/src/components/Pre.tsx +22 -0
  35. package/packages/react/src/components/Radio.tsx +39 -0
  36. package/packages/react/src/components/RadioGroup.tsx +38 -0
  37. package/packages/react/src/components/Select.tsx +41 -0
  38. package/packages/react/src/components/Table.tsx +111 -0
  39. package/packages/react/src/components/Text.tsx +35 -0
  40. package/packages/react/src/components/Textarea.tsx +32 -0
  41. package/packages/react/src/components/index.ts +15 -0
  42. package/packages/react/src/index.ts +29 -0
  43. package/packages/react/src/utils/index.ts +1 -0
  44. package/packages/react/tsconfig.json +27 -0
  45. package/packages/react/tsconfig.node.json +9 -0
  46. package/packages/react/vite.config.ts +26 -0
  47. package/pnpm-workspace.yaml +3 -0
  48. package/src/components/Button.tsx +72 -0
  49. package/src/components/Card.tsx +22 -0
  50. package/src/components/Code.tsx +19 -0
  51. package/src/components/Heading.tsx +109 -0
  52. package/src/components/IconButton.tsx +71 -0
  53. package/src/components/InfoCard.tsx +36 -0
  54. package/src/components/Link.tsx +73 -0
  55. package/src/components/List.tsx +38 -0
  56. package/src/components/Pre.tsx +22 -0
  57. package/src/components/Radio.tsx +39 -0
  58. package/src/components/RadioGroup.tsx +38 -0
  59. package/src/components/Select.tsx +41 -0
  60. package/src/components/Table.tsx +111 -0
  61. package/src/components/Text.tsx +35 -0
  62. package/src/components/Textarea.tsx +32 -0
  63. package/src/components/index.ts +15 -0
  64. package/src/configs/index.ts +92 -0
  65. package/src/index.ts +59 -0
  66. 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(' ')