@sakura-ui/sakura-ui 0.0.8 → 0.0.10

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 (63) hide show
  1. package/README.md +49 -2
  2. package/examples/README.md +14 -0
  3. package/examples/index.html +4 -3
  4. package/examples/package.json +25 -0
  5. package/examples/postcss.config.js +6 -0
  6. package/examples/public/vite.svg +1 -0
  7. package/examples/src/App.tsx +56 -0
  8. package/examples/src/main.css +3 -0
  9. package/examples/src/{index.tsx → main.tsx} +2 -3
  10. package/examples/src/vite-env.d.ts +1 -0
  11. package/examples/tailwind.config.js +9 -0
  12. package/examples/tsconfig.json +21 -0
  13. package/examples/tsconfig.node.json +9 -0
  14. package/examples/vite.config.ts +7 -0
  15. package/package.json +3 -3
  16. package/packages/react/src/components/Button.tsx +6 -3
  17. package/packages/react/src/components/Card.tsx +2 -2
  18. package/packages/react/src/components/Checkbox.tsx +56 -0
  19. package/packages/react/src/components/Code.tsx +1 -1
  20. package/packages/react/src/components/Heading.tsx +1 -1
  21. package/packages/react/src/components/IconButton.tsx +5 -54
  22. package/packages/react/src/components/InfoCard.tsx +2 -2
  23. package/packages/react/src/components/Link.tsx +1 -1
  24. package/packages/react/src/components/List.tsx +2 -2
  25. package/packages/react/src/components/Pre.tsx +1 -1
  26. package/packages/react/src/components/Radio.tsx +4 -1
  27. package/packages/react/src/components/Select.tsx +2 -2
  28. package/packages/react/src/components/Table.tsx +7 -7
  29. package/packages/react/src/components/Text.tsx +2 -2
  30. package/packages/react/src/components/Textarea.tsx +3 -2
  31. package/packages/react/src/components/index.ts +1 -0
  32. package/packages/react/src/index.ts +1 -0
  33. package/packages/config/coverage/clover.xml +0 -12
  34. package/packages/config/coverage/coverage-final.json +0 -2
  35. package/packages/config/coverage/lcov-report/base.css +0 -224
  36. package/packages/config/coverage/lcov-report/block-navigation.js +0 -87
  37. package/packages/config/coverage/lcov-report/favicon.png +0 -0
  38. package/packages/config/coverage/lcov-report/index.html +0 -116
  39. package/packages/config/coverage/lcov-report/index.ts.html +0 -385
  40. package/packages/config/coverage/lcov-report/prettify.css +0 -1
  41. package/packages/config/coverage/lcov-report/prettify.js +0 -2
  42. package/packages/config/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  43. package/packages/config/coverage/lcov-report/sorter.js +0 -196
  44. package/packages/config/coverage/lcov.info +0 -14
  45. package/src/components/Button.tsx +0 -72
  46. package/src/components/Card.tsx +0 -22
  47. package/src/components/Code.tsx +0 -19
  48. package/src/components/Heading.tsx +0 -109
  49. package/src/components/IconButton.tsx +0 -71
  50. package/src/components/InfoCard.tsx +0 -36
  51. package/src/components/Link.tsx +0 -73
  52. package/src/components/List.tsx +0 -38
  53. package/src/components/Pre.tsx +0 -22
  54. package/src/components/Radio.tsx +0 -39
  55. package/src/components/RadioGroup.tsx +0 -38
  56. package/src/components/Select.tsx +0 -41
  57. package/src/components/Table.tsx +0 -111
  58. package/src/components/Text.tsx +0 -35
  59. package/src/components/Textarea.tsx +0 -32
  60. package/src/components/index.ts +0 -15
  61. package/src/configs/index.ts +0 -92
  62. package/src/index.ts +0 -59
  63. package/src/utils/index.ts +0 -1
@@ -1,35 +0,0 @@
1
- import React from 'react'
2
- import { cx } from '../utils'
3
-
4
- export type TextProps = React.ComponentPropsWithoutRef<'input'>
5
-
6
- export const Text = React.forwardRef<HTMLInputElement, TextProps>(
7
- ({ ...props }, ref) => {
8
- const { className, ...newProps } = props
9
-
10
- const style = `
11
- p-4
12
- rounded-[4px]
13
- border
14
- border-solid
15
- border-sumi-900
16
- focus:outline
17
- focus:outline-2
18
- focus:outline-wood-500
19
- disabled:bg-sumi-500
20
- disabled:text-white-1000
21
- disabled:border
22
- disabled:border-solid
23
- disabled:border-sumi-500
24
- `
25
-
26
- return (
27
- <input
28
- type="text"
29
- className={cx(style, className)}
30
- {...newProps}
31
- ref={ref}
32
- />
33
- )
34
- }
35
- )
@@ -1,32 +0,0 @@
1
- import React from 'react'
2
- import { cx } from '../utils'
3
-
4
- export type TextareaProps = React.ComponentPropsWithoutRef<'textarea'>
5
-
6
- export const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
7
- ({ ...props }, ref) => {
8
- const { className, children, ...newProps } = props
9
-
10
- const style = `
11
- p-4
12
- rounded-[12px]
13
- border
14
- border-solid
15
- border-sumi-900
16
- focus:outline
17
- focus:outline-2
18
- focus:outline-wood-500
19
- disabled:bg-sumi-500
20
- disabled:text-white-1000
21
- disabled:border
22
- disabled:border-solid
23
- disabled:border-sumi-500
24
- `
25
-
26
- return (
27
- <textarea className={cx(style, className)} {...newProps} ref={ref}>
28
- {children}
29
- </textarea>
30
- )
31
- }
32
- )
@@ -1,15 +0,0 @@
1
- export { Button } from './Button'
2
- export { Card } from './Card'
3
- export { Code } from './Code'
4
- export { H1, H2, H3, H4, H5, H6 } from './Heading'
5
- export { IconButton } from './IconButton'
6
- export { InfoCard } from './InfoCard'
7
- export { Link } from './Link'
8
- export { Ol, Ul } from './List'
9
- export { Pre } from './Pre'
10
- export { Radio } from './Radio'
11
- export { RadioGroup } from './RadioGroup'
12
- export { Select } from './Select'
13
- export { Table, Caption, Thead, Tbody, Th, Tr, Td } from './Table'
14
- export { Text } from './Text'
15
- export { Textarea } from './Textarea'
@@ -1,92 +0,0 @@
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 DELETED
@@ -1,59 +0,0 @@
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'
@@ -1 +0,0 @@
1
- export const cx = (...classNames: any[]) => classNames.filter(Boolean).join(' ')