@sakura-ui/sakura-ui 0.1.3 → 0.1.5
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/README.md +4 -0
- package/package.json +5 -5
- package/packages/config/package.json +10 -11
- package/packages/config/tsconfig.json +2 -2
- package/packages/core/package.json +14 -15
- package/packages/core/src/components/Button.tsx +31 -43
- package/packages/core/src/components/Card.tsx +4 -4
- package/packages/core/src/components/Code.tsx +1 -1
- package/packages/core/src/components/Heading.tsx +1 -1
- package/packages/core/src/components/Icon.tsx +9 -9
- package/packages/core/src/components/IconButton.tsx +38 -51
- package/packages/core/src/components/InfoCard.tsx +13 -5
- package/packages/core/src/components/Link.tsx +39 -36
- package/packages/core/src/components/List.tsx +1 -1
- package/packages/core/src/components/Pre.tsx +1 -1
- package/packages/core/src/components/Table.tsx +4 -4
- package/packages/core/tsconfig.node.json +1 -1
- package/packages/forms/dist/index.cjs.js.map +1 -1
- package/packages/forms/dist/index.es.js.map +1 -1
- package/packages/forms/node_modules/.bin/autoprefixer +4 -4
- package/packages/forms/node_modules/.bin/jest +4 -4
- package/packages/forms/node_modules/.bin/tailwind +4 -4
- package/packages/forms/node_modules/.bin/tailwindcss +4 -4
- package/packages/forms/node_modules/.bin/ts-jest +4 -4
- package/packages/forms/node_modules/.bin/ts-node +4 -4
- package/packages/forms/node_modules/.bin/ts-node-cwd +4 -4
- package/packages/forms/node_modules/.bin/ts-node-esm +4 -4
- package/packages/forms/node_modules/.bin/ts-node-script +4 -4
- package/packages/forms/node_modules/.bin/ts-node-transpile-only +4 -4
- package/packages/forms/node_modules/.bin/ts-script +4 -4
- package/packages/forms/node_modules/.bin/tsc +4 -4
- package/packages/forms/node_modules/.bin/tsc-alias +4 -4
- package/packages/forms/node_modules/.bin/tsserver +4 -4
- package/packages/forms/node_modules/.bin/vite +4 -4
- package/packages/forms/package.json +15 -16
- package/packages/forms/src/components/Checkbox.tsx +7 -8
- package/packages/forms/src/components/FieldsetControl.tsx +1 -1
- package/packages/forms/src/components/LabelControl.tsx +1 -1
- package/packages/forms/src/components/Radio.tsx +5 -3
- package/packages/forms/src/components/Select.tsx +17 -10
- package/packages/forms/src/components/Text.tsx +3 -5
- package/packages/forms/src/components/Textarea.tsx +3 -5
- package/packages/forms/tsconfig.node.json +1 -1
- /package/packages/core/src/utils/{index.ts → class.ts} +0 -0
- /package/packages/forms/src/utils/{index.ts → class.ts} +0 -0
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sakura-ui/sakura-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": "glassonion1",
|
|
6
6
|
"homepage": "https://github.com/glassonion1/sakura-ui",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"packages"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@sakura-ui/
|
|
17
|
-
"@sakura-ui/
|
|
18
|
-
"@sakura-ui/
|
|
16
|
+
"@sakura-ui/config": "0.0.11",
|
|
17
|
+
"@sakura-ui/core": "0.0.4",
|
|
18
|
+
"@sakura-ui/forms": "0.0.6"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": "^18.2.0",
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
"tailwindcss": "^3.2.7"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
|
-
"build": "pnpm
|
|
26
|
+
"build": "pnpm --parallel --filter \"./**\" build"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sakura-ui/config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
|
-
"module": "dist/index.es.js",
|
|
6
5
|
"types": "dist/index.d.ts",
|
|
7
6
|
"exports": {
|
|
8
7
|
".": {
|
|
@@ -36,16 +35,16 @@
|
|
|
36
35
|
"tailwindcss": "^3.2.7"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
|
-
"@types/jest": "^29.
|
|
40
|
-
"@types/node": "^18.
|
|
41
|
-
"autoprefixer": "^10.4.
|
|
42
|
-
"jest": "^29.
|
|
38
|
+
"@types/jest": "^29.5.1",
|
|
39
|
+
"@types/node": "^18.16.15",
|
|
40
|
+
"autoprefixer": "^10.4.14",
|
|
41
|
+
"jest": "^29.5.0",
|
|
43
42
|
"npm-run-all": "^4.1.5",
|
|
44
|
-
"postcss": "^8.4.
|
|
45
|
-
"tailwindcss": "^3.2
|
|
46
|
-
"ts-jest": "^29.0
|
|
43
|
+
"postcss": "^8.4.23",
|
|
44
|
+
"tailwindcss": "^3.3.2",
|
|
45
|
+
"ts-jest": "^29.1.0",
|
|
47
46
|
"ts-node": "^10.9.1",
|
|
48
|
-
"typescript": "^
|
|
49
|
-
"vite": "^4.
|
|
47
|
+
"typescript": "^5.0.4",
|
|
48
|
+
"vite": "^4.3.9"
|
|
50
49
|
}
|
|
51
50
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"target": "ESNext",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
4
|
"module": "ESNext",
|
|
6
5
|
"lib": ["ESNext", "DOM"],
|
|
7
|
-
"moduleResolution": "
|
|
6
|
+
"moduleResolution": "Bundler",
|
|
7
|
+
"useDefineForClassFields": true,
|
|
8
8
|
"strict": true,
|
|
9
9
|
"resolveJsonModule": true,
|
|
10
10
|
"isolatedModules": true,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sakura-ui/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
|
-
"module": "dist/index.es.js",
|
|
7
6
|
"types": "dist/index.d.ts",
|
|
8
7
|
"exports": {
|
|
9
8
|
".": {
|
|
@@ -40,22 +39,22 @@
|
|
|
40
39
|
"tailwindcss": "^3.2.7"
|
|
41
40
|
},
|
|
42
41
|
"devDependencies": {
|
|
43
|
-
"@types/jest": "^29.
|
|
44
|
-
"@types/node": "^18.
|
|
45
|
-
"@types/react": "^18.
|
|
46
|
-
"@types/react-dom": "^18.
|
|
47
|
-
"@vitejs/plugin-react-swc": "^3.
|
|
48
|
-
"autoprefixer": "^10.4.
|
|
49
|
-
"jest": "^29.
|
|
42
|
+
"@types/jest": "^29.5.1",
|
|
43
|
+
"@types/node": "^18.16.15",
|
|
44
|
+
"@types/react": "^18.2.7",
|
|
45
|
+
"@types/react-dom": "^18.2.4",
|
|
46
|
+
"@vitejs/plugin-react-swc": "^3.3.1",
|
|
47
|
+
"autoprefixer": "^10.4.14",
|
|
48
|
+
"jest": "^29.5.0",
|
|
50
49
|
"npm-run-all": "^4.1.5",
|
|
51
|
-
"postcss": "^8.4.
|
|
50
|
+
"postcss": "^8.4.23",
|
|
52
51
|
"react": "^18.2.0",
|
|
53
52
|
"react-dom": "^18.2.0",
|
|
54
|
-
"tailwindcss": "^3.2
|
|
55
|
-
"ts-jest": "^29.0
|
|
53
|
+
"tailwindcss": "^3.3.2",
|
|
54
|
+
"ts-jest": "^29.1.0",
|
|
56
55
|
"ts-node": "^10.9.1",
|
|
57
|
-
"tsc-alias": "^1.8.
|
|
58
|
-
"typescript": "^
|
|
59
|
-
"vite": "^4.
|
|
56
|
+
"tsc-alias": "^1.8.6",
|
|
57
|
+
"typescript": "^5.0.4",
|
|
58
|
+
"vite": "^4.3.9"
|
|
60
59
|
}
|
|
61
60
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { cx } from '../utils'
|
|
2
|
+
import { cx } from '../utils/class'
|
|
3
3
|
|
|
4
4
|
export interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {
|
|
5
5
|
variant?: 'primary' | 'secondary'
|
|
@@ -14,51 +14,39 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
14
14
|
const align = textAlign ?? 'center'
|
|
15
15
|
|
|
16
16
|
const style = `
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
inline-block
|
|
18
|
+
p-4
|
|
19
|
+
text-base
|
|
20
|
+
font-bold
|
|
21
|
+
rounded-lg
|
|
22
|
+
text-${align}
|
|
23
|
+
cursor-pointer
|
|
24
|
+
whitespace-nowrap
|
|
25
|
+
border
|
|
26
|
+
border-solid
|
|
27
|
+
border-sea-600
|
|
28
|
+
focus:outline
|
|
29
|
+
focus:outline-2
|
|
30
|
+
focus:outline-wood-500
|
|
31
|
+
disabled:border-sumi-500
|
|
32
|
+
disabled:cursor-not-allowed
|
|
33
|
+
`
|
|
26
34
|
|
|
27
35
|
const primary = `
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
focus:outline
|
|
36
|
-
focus:outline-2
|
|
37
|
-
focus:outline-wood-500
|
|
38
|
-
disabled:bg-sumi-500
|
|
39
|
-
disabled:text-white-1000
|
|
40
|
-
disabled:border
|
|
41
|
-
disabled:border-solid
|
|
42
|
-
disabled:border-sumi-500
|
|
43
|
-
disabled:cursor-not-allowed
|
|
44
|
-
`
|
|
36
|
+
text-white-1000
|
|
37
|
+
bg-sea-600
|
|
38
|
+
hover:enabled:bg-sea-700
|
|
39
|
+
active:enabled:bg-sea-800
|
|
40
|
+
disabled:bg-sumi-500
|
|
41
|
+
disabled:text-white-1000
|
|
42
|
+
`
|
|
45
43
|
const secondary = `
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
focus:outline
|
|
53
|
-
focus:outline-2
|
|
54
|
-
focus:outline-wood-500
|
|
55
|
-
disabled:hover:bg-white-1000
|
|
56
|
-
disabled:text-sumi-500
|
|
57
|
-
disabled:border
|
|
58
|
-
disabled:border-solid
|
|
59
|
-
disabled:border-sumi-500
|
|
60
|
-
disabled:cursor-not-allowed
|
|
61
|
-
`
|
|
44
|
+
text-sea-600
|
|
45
|
+
bg-transparent
|
|
46
|
+
hover:enabled:bg-sea-100
|
|
47
|
+
active:enabled:bg-sea-200
|
|
48
|
+
disabled:text-sumi-500
|
|
49
|
+
`
|
|
62
50
|
|
|
63
51
|
const styles = {
|
|
64
52
|
primary: primary,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { cx } from '../utils'
|
|
2
|
+
import { cx } from '../utils/class'
|
|
3
3
|
|
|
4
|
-
export interface CardProps extends React.ComponentProps<'
|
|
4
|
+
export interface CardProps extends React.ComponentProps<'section'> {}
|
|
5
5
|
|
|
6
6
|
export const Card = (props: CardProps) => {
|
|
7
7
|
const { className, children, ...restProps } = props
|
|
@@ -15,8 +15,8 @@ export const Card = (props: CardProps) => {
|
|
|
15
15
|
p-4
|
|
16
16
|
`
|
|
17
17
|
return (
|
|
18
|
-
<
|
|
18
|
+
<section className={cx(style, props.className)} {...restProps}>
|
|
19
19
|
{props.children}
|
|
20
|
-
</
|
|
20
|
+
</section>
|
|
21
21
|
)
|
|
22
22
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { cx } from '../utils'
|
|
2
|
+
import { cx } from '../utils/class'
|
|
3
3
|
|
|
4
4
|
export interface IconProps extends React.ComponentProps<'span'> {
|
|
5
5
|
icon: string
|
|
@@ -9,14 +9,14 @@ export const Icon = React.forwardRef<HTMLElement, IconProps>((props, ref) => {
|
|
|
9
9
|
const { className, icon, ...restProps } = props
|
|
10
10
|
|
|
11
11
|
const style = `
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
inline-block
|
|
13
|
+
align-middle
|
|
14
|
+
font-icon
|
|
15
|
+
text-2xl
|
|
16
|
+
font-light
|
|
17
|
+
leading-none
|
|
18
|
+
antialiased
|
|
19
|
+
mb-1
|
|
20
20
|
`
|
|
21
21
|
|
|
22
22
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { cx } from '../utils'
|
|
2
|
+
import { cx } from '../utils/class'
|
|
3
3
|
|
|
4
4
|
export interface IconButtonProps extends React.ComponentProps<'button'> {
|
|
5
5
|
variant?: 'primary' | 'secondary'
|
|
@@ -17,51 +17,38 @@ export const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
|
17
17
|
const align = 'center'
|
|
18
18
|
|
|
19
19
|
const style = `
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
inline-block
|
|
21
|
+
p-4
|
|
22
|
+
text-base
|
|
23
|
+
font-bold
|
|
24
|
+
rounded-lg
|
|
25
|
+
text-${align}
|
|
26
|
+
cursor-pointer
|
|
27
|
+
whitespace-nowrap
|
|
28
|
+
border
|
|
29
|
+
border-solid
|
|
30
|
+
border-sea-600
|
|
31
|
+
focus:outline
|
|
32
|
+
focus:outline-2
|
|
33
|
+
focus:outline-wood-500
|
|
34
|
+
disabled:border-sumi-500
|
|
35
|
+
disabled:cursor-not-allowed
|
|
36
|
+
`
|
|
29
37
|
|
|
30
38
|
const primary = `
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
focus:outline
|
|
39
|
-
focus:outline-2
|
|
40
|
-
focus:outline-wood-500
|
|
41
|
-
disabled:bg-sumi-500
|
|
42
|
-
disabled:text-white-1000
|
|
43
|
-
disabled:border
|
|
44
|
-
disabled:border-solid
|
|
45
|
-
disabled:border-sumi-500
|
|
46
|
-
disabled:cursor-not-allowed
|
|
47
|
-
`
|
|
39
|
+
text-white-1000
|
|
40
|
+
bg-sea-600
|
|
41
|
+
hover:enabled:bg-sea-700
|
|
42
|
+
active:enabled:bg-sea-800
|
|
43
|
+
disabled:bg-sumi-500
|
|
44
|
+
disabled:text-white-1000
|
|
45
|
+
`
|
|
48
46
|
const secondary = `
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
active:bg-sea-100
|
|
55
|
-
focus:outline
|
|
56
|
-
focus:outline-2
|
|
57
|
-
focus:outline-wood-500
|
|
58
|
-
disabled:hover:bg-white-1000
|
|
59
|
-
disabled:text-sumi-500
|
|
60
|
-
disabled:border
|
|
61
|
-
disabled:border-solid
|
|
62
|
-
disabled:border-sumi-500
|
|
63
|
-
disabled:cursor-not-allowed
|
|
64
|
-
`
|
|
47
|
+
text-sea-600
|
|
48
|
+
hover:enabled:bg-sea-100
|
|
49
|
+
active:enabled:bg-sea-200
|
|
50
|
+
disabled:text-sumi-500
|
|
51
|
+
`
|
|
65
52
|
|
|
66
53
|
const styles = {
|
|
67
54
|
primary: primary,
|
|
@@ -69,14 +56,14 @@ export const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
|
69
56
|
}
|
|
70
57
|
|
|
71
58
|
const iconStyle = `
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
59
|
+
inline-block
|
|
60
|
+
align-middle
|
|
61
|
+
font-icon
|
|
62
|
+
text-2xl
|
|
63
|
+
font-light
|
|
64
|
+
leading-4
|
|
65
|
+
antialiased
|
|
66
|
+
mb-1
|
|
80
67
|
`
|
|
81
68
|
|
|
82
69
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { cx } from '../utils'
|
|
2
|
+
import { cx } from '../utils/class'
|
|
3
3
|
|
|
4
|
-
export interface InfoCardProps extends React.ComponentProps<'
|
|
4
|
+
export interface InfoCardProps extends React.ComponentProps<'section'> {
|
|
5
5
|
title?: string
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -27,10 +27,18 @@ export const InfoCard = (props: InfoCardProps) => {
|
|
|
27
27
|
pb-4
|
|
28
28
|
`
|
|
29
29
|
|
|
30
|
+
const headingId = React.useId()
|
|
31
|
+
|
|
30
32
|
return (
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
+
<section
|
|
34
|
+
aria-labelledby={headingId}
|
|
35
|
+
className={cx(style, className)}
|
|
36
|
+
{...restProps}
|
|
37
|
+
>
|
|
38
|
+
<h2 id={headingId} className={topStyle}>
|
|
39
|
+
{title}
|
|
40
|
+
</h2>
|
|
33
41
|
<p className={bottmStyle}>{children}</p>
|
|
34
|
-
</
|
|
42
|
+
</section>
|
|
35
43
|
)
|
|
36
44
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { cx } from '../utils'
|
|
3
|
-
|
|
4
|
-
export interface LinkProps extends React.ComponentProps<'a'> {}
|
|
2
|
+
import { cx } from '../utils/class'
|
|
5
3
|
|
|
6
4
|
const getFileType = (url: string) => {
|
|
7
5
|
const converted = url.toLowerCase()
|
|
@@ -30,44 +28,49 @@ const getFileType = (url: string) => {
|
|
|
30
28
|
return null
|
|
31
29
|
}
|
|
32
30
|
|
|
33
|
-
export
|
|
34
|
-
const { className, children, ...restProps } = props
|
|
35
|
-
const href = props.href ?? ''
|
|
36
|
-
const fileType = getFileType(href)
|
|
31
|
+
export interface LinkProps extends React.ComponentProps<'a'> {}
|
|
37
32
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
underline-offset-[0.1em]
|
|
44
|
-
hover:text-sea-800
|
|
45
|
-
active:text-sea-800
|
|
46
|
-
visited:text-sea-900
|
|
47
|
-
focus:outline
|
|
48
|
-
focus:outline-2
|
|
49
|
-
focus:outline-wood-500
|
|
50
|
-
disabled:border-sumi-500
|
|
51
|
-
`
|
|
33
|
+
export const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(
|
|
34
|
+
(props, ref) => {
|
|
35
|
+
const { className, children, ...restProps } = props
|
|
36
|
+
const href = props.href ?? ''
|
|
37
|
+
const fileType = getFileType(href)
|
|
52
38
|
|
|
53
|
-
|
|
39
|
+
const style = `
|
|
40
|
+
rounded-sm
|
|
41
|
+
cursor-pointer
|
|
42
|
+
text-sea-600
|
|
43
|
+
underline
|
|
44
|
+
underline-offset-[0.1em]
|
|
45
|
+
hover:text-sea-800
|
|
46
|
+
active:text-sea-800
|
|
47
|
+
visited:text-sea-900
|
|
48
|
+
focus:outline
|
|
49
|
+
focus:outline-2
|
|
50
|
+
focus:outline-wood-500
|
|
51
|
+
disabled:border-sumi-500
|
|
52
|
+
`
|
|
53
|
+
|
|
54
|
+
if (href.startsWith('http')) {
|
|
55
|
+
return (
|
|
56
|
+
<a
|
|
57
|
+
className={cx(style, className)}
|
|
58
|
+
href={href}
|
|
59
|
+
target="_blank"
|
|
60
|
+
rel="noopener noreferrer"
|
|
61
|
+
{...restProps}
|
|
62
|
+
ref={ref}
|
|
63
|
+
>
|
|
64
|
+
{children}
|
|
65
|
+
{fileType ? `(${fileType})` : null}
|
|
66
|
+
</a>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
54
69
|
return (
|
|
55
|
-
<a
|
|
56
|
-
className={cx(style, className)}
|
|
57
|
-
href={href}
|
|
58
|
-
target="_blank"
|
|
59
|
-
rel="noopener noreferrer"
|
|
60
|
-
{...restProps}
|
|
61
|
-
>
|
|
70
|
+
<a className={cx(style, className)} href={href} {...restProps} ref={ref}>
|
|
62
71
|
{children}
|
|
63
72
|
{fileType ? `(${fileType})` : null}
|
|
64
73
|
</a>
|
|
65
74
|
)
|
|
66
75
|
}
|
|
67
|
-
|
|
68
|
-
<a className={cx(style, className)} href={href} {...restProps}>
|
|
69
|
-
{children}
|
|
70
|
-
{fileType ? `(${fileType})` : null}
|
|
71
|
-
</a>
|
|
72
|
-
)
|
|
73
|
-
}
|
|
76
|
+
)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { cx } from '../utils'
|
|
2
|
+
import { cx } from '../utils/class'
|
|
3
3
|
|
|
4
4
|
export interface TableProps extends React.ComponentProps<'table'> {}
|
|
5
5
|
|
|
6
6
|
const styleBorder = `
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
border
|
|
8
|
+
border-collapse
|
|
9
|
+
border-sumi-900
|
|
10
10
|
`
|
|
11
11
|
|
|
12
12
|
export const Table = (props: TableProps) => {
|