@sakura-ui/sakura-ui 0.1.16 → 0.1.19
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/package.json +16 -1
- package/packages/config/package.json +23 -27
- package/packages/config/src/index.ts +66 -1
- package/packages/config/tests/index.test.ts +1 -1
- package/packages/config/tsconfig.json +9 -17
- package/packages/config/tsconfig.node.json +6 -0
- package/packages/config/vite.config.ts +5 -3
- package/packages/core/package.json +27 -44
- package/packages/core/src/components/Button.tsx +23 -56
- package/packages/core/src/components/Card.tsx +30 -20
- package/packages/core/src/components/Code.tsx +1 -1
- package/packages/core/src/components/Faq.tsx +3 -5
- package/packages/core/src/components/Heading.tsx +1 -1
- package/packages/core/src/components/Icon.tsx +15 -10
- package/packages/core/src/components/IconButton.tsx +47 -76
- package/packages/core/src/components/InfoCard.tsx +1 -1
- package/packages/core/src/components/Link.tsx +44 -44
- 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 -3
- package/packages/core/src/components/buttonStyle.ts +84 -0
- package/packages/core/src/components/index.ts +24 -7
- package/packages/core/src/index.ts +26 -0
- package/packages/core/src/libs/forward-ref.ts +41 -0
- package/packages/core/src/types/component.ts +82 -0
- package/packages/core/tsconfig.json +2 -1
- package/packages/core/tsconfig.node.json +1 -4
- package/packages/core/vite.config.ts +6 -3
- package/packages/forms/dist/components/Checkbox.js +27 -24
- package/packages/forms/dist/components/Checkbox.js.map +1 -1
- package/packages/forms/dist/components/FileInput.js +55 -0
- package/packages/forms/dist/components/FileInput.js.map +1 -0
- package/packages/forms/dist/components/Input.js +15 -13
- package/packages/forms/dist/components/Input.js.map +1 -1
- package/packages/forms/dist/components/LabelControl.js +7 -1
- package/packages/forms/dist/components/LabelControl.js.map +1 -1
- package/packages/forms/dist/components/Radio.js +26 -24
- package/packages/forms/dist/components/Radio.js.map +1 -1
- package/packages/forms/dist/components/Select.js +27 -25
- package/packages/forms/dist/components/Select.js.map +1 -1
- package/packages/forms/dist/components/Textarea.js +15 -13
- package/packages/forms/dist/components/Textarea.js.map +1 -1
- package/packages/forms/dist/components/index.js +1 -0
- package/packages/forms/dist/components/index.js.map +1 -1
- package/packages/forms/dist/index.cjs.js +155 -101
- package/packages/forms/dist/index.es.js +490 -411
- package/packages/forms/dist/index.js +1 -1
- package/packages/forms/dist/index.js.map +1 -1
- package/packages/forms/dist/types/components/Checkbox.d.ts.map +1 -0
- package/packages/forms/dist/types/components/FieldsetControl.d.ts.map +1 -0
- package/packages/forms/dist/types/components/FileInput.d.ts +5 -0
- package/packages/forms/dist/types/components/FileInput.d.ts.map +1 -0
- package/packages/forms/dist/types/components/Input.d.ts.map +1 -0
- package/packages/forms/dist/types/components/LabelControl.d.ts.map +1 -0
- package/packages/forms/dist/types/components/Radio.d.ts.map +1 -0
- package/packages/forms/dist/types/components/Select.d.ts.map +1 -0
- package/packages/forms/dist/types/components/Textarea.d.ts.map +1 -0
- package/packages/forms/dist/types/components/context.d.ts.map +1 -0
- package/packages/forms/dist/types/components/controlled/CheckboxGroup.d.ts.map +1 -0
- package/packages/forms/dist/types/components/controlled/InputItem.d.ts.map +1 -0
- package/packages/forms/dist/types/components/controlled/RadioGroup.d.ts.map +1 -0
- package/packages/forms/dist/types/components/controlled/SelectControl.d.ts.map +1 -0
- package/packages/forms/dist/types/components/controlled/TextareaControl.d.ts.map +1 -0
- package/packages/forms/dist/types/components/controlled/index.d.ts.map +1 -0
- package/packages/forms/dist/types/components/index.d.ts +9 -0
- package/packages/forms/dist/types/components/index.d.ts.map +1 -0
- package/packages/forms/dist/types/index.d.ts +4 -0
- package/packages/forms/dist/types/index.d.ts.map +1 -0
- package/packages/forms/dist/types/utils/class.d.ts.map +1 -0
- package/packages/forms/node_modules/.bin/eslint +17 -0
- package/packages/forms/node_modules/.bin/tailwind +2 -2
- package/packages/forms/node_modules/.bin/tailwindcss +2 -2
- 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/vitest +17 -0
- package/packages/forms/node_modules/.vitest/results.json +1 -0
- package/packages/forms/package.json +23 -31
- package/packages/forms/src/components/Checkbox.tsx +27 -23
- package/packages/forms/src/components/FileInput.tsx +74 -0
- package/packages/forms/src/components/Input.tsx +16 -14
- package/packages/forms/src/components/LabelControl.tsx +13 -6
- package/packages/forms/src/components/Radio.tsx +28 -23
- package/packages/forms/src/components/Select.tsx +28 -26
- package/packages/forms/src/components/Textarea.tsx +16 -13
- package/packages/forms/src/components/index.ts +8 -7
- package/packages/forms/src/index.ts +12 -0
- package/packages/forms/tsconfig.json +4 -3
- package/packages/forms/tsconfig.node.json +1 -4
- package/packages/forms/vite.config.ts +6 -3
- package/packages/config/jest.config.ts +0 -10
- package/packages/core/coverage/clover.xml +0 -258
- package/packages/core/coverage/coverage-final.json +0 -2700
- package/packages/core/coverage/lcov-report/base.css +0 -362
- package/packages/core/coverage/lcov-report/block-navigation.js +0 -85
- package/packages/core/coverage/lcov-report/favicon.png +0 -0
- package/packages/core/coverage/lcov-report/index.html +0 -216
- package/packages/core/coverage/lcov-report/prettify.css +0 -101
- package/packages/core/coverage/lcov-report/prettify.js +0 -1004
- package/packages/core/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/packages/core/coverage/lcov-report/sorter.js +0 -191
- package/packages/core/coverage/lcov-report/src/components/Button.tsx.html +0 -303
- package/packages/core/coverage/lcov-report/src/components/Card.tsx.html +0 -399
- package/packages/core/coverage/lcov-report/src/components/Code.tsx.html +0 -144
- package/packages/core/coverage/lcov-report/src/components/Heading.tsx.html +0 -405
- package/packages/core/coverage/lcov-report/src/components/Icon.tsx.html +0 -183
- package/packages/core/coverage/lcov-report/src/components/IconButton.tsx.html +0 -378
- package/packages/core/coverage/lcov-report/src/components/InfoCard.tsx.html +0 -240
- package/packages/core/coverage/lcov-report/src/components/Link.tsx.html +0 -324
- package/packages/core/coverage/lcov-report/src/components/List.tsx.html +0 -204
- package/packages/core/coverage/lcov-report/src/components/Pre.tsx.html +0 -153
- package/packages/core/coverage/lcov-report/src/components/Table.tsx.html +0 -429
- package/packages/core/coverage/lcov-report/src/components/index.html +0 -396
- package/packages/core/coverage/lcov-report/src/components/index.ts.html +0 -126
- package/packages/core/coverage/lcov-report/src/index.html +0 -176
- package/packages/core/coverage/lcov-report/src/index.ts.html +0 -171
- package/packages/core/coverage/lcov-report/src/utils/class.ts.html +0 -90
- package/packages/core/coverage/lcov-report/src/utils/index.html +0 -176
- package/packages/core/coverage/lcov.info +0 -523
- package/packages/core/jest.config.ts +0 -11
- package/packages/forms/dist/components/Checkbox.d.ts.map +0 -1
- package/packages/forms/dist/components/FieldsetControl.d.ts.map +0 -1
- package/packages/forms/dist/components/Input.d.ts.map +0 -1
- package/packages/forms/dist/components/LabelControl.d.ts.map +0 -1
- package/packages/forms/dist/components/Radio.d.ts.map +0 -1
- package/packages/forms/dist/components/Select.d.ts.map +0 -1
- package/packages/forms/dist/components/Textarea.d.ts.map +0 -1
- package/packages/forms/dist/components/context.d.ts.map +0 -1
- package/packages/forms/dist/components/controlled/CheckboxGroup.d.ts.map +0 -1
- package/packages/forms/dist/components/controlled/InputItem.d.ts.map +0 -1
- package/packages/forms/dist/components/controlled/RadioGroup.d.ts.map +0 -1
- package/packages/forms/dist/components/controlled/SelectControl.d.ts.map +0 -1
- package/packages/forms/dist/components/controlled/TextareaControl.d.ts.map +0 -1
- package/packages/forms/dist/components/controlled/index.d.ts.map +0 -1
- package/packages/forms/dist/components/index.d.ts +0 -8
- package/packages/forms/dist/components/index.d.ts.map +0 -1
- package/packages/forms/dist/index.cjs.js.map +0 -1
- package/packages/forms/dist/index.d.ts +0 -3
- package/packages/forms/dist/index.d.ts.map +0 -1
- package/packages/forms/dist/index.es.js.map +0 -1
- package/packages/forms/dist/utils/class.d.ts.map +0 -1
- package/packages/forms/node_modules/.bin/jest +0 -17
- package/packages/forms/node_modules/.bin/npm-run-all +0 -17
- package/packages/forms/node_modules/.bin/run-p +0 -17
- package/packages/forms/node_modules/.bin/run-s +0 -17
- package/packages/forms/node_modules/.bin/ts-jest +0 -17
- package/packages/forms/node_modules/.bin/tsc +0 -17
- package/packages/forms/node_modules/.bin/tsc-alias +0 -17
- package/packages/forms/node_modules/.bin/tsserver +0 -17
- package/packages/forms/node_modules/.bin/vite +0 -17
- /package/packages/core/src/{utils/class.ts → libs/cx.ts} +0 -0
- /package/packages/forms/dist/{components → types/components}/Checkbox.d.ts +0 -0
- /package/packages/forms/dist/{components → types/components}/FieldsetControl.d.ts +0 -0
- /package/packages/forms/dist/{components → types/components}/Input.d.ts +0 -0
- /package/packages/forms/dist/{components → types/components}/LabelControl.d.ts +0 -0
- /package/packages/forms/dist/{components → types/components}/Radio.d.ts +0 -0
- /package/packages/forms/dist/{components → types/components}/Select.d.ts +0 -0
- /package/packages/forms/dist/{components → types/components}/Textarea.d.ts +0 -0
- /package/packages/forms/dist/{components → types/components}/context.d.ts +0 -0
- /package/packages/forms/dist/{components → types/components}/controlled/CheckboxGroup.d.ts +0 -0
- /package/packages/forms/dist/{components → types/components}/controlled/InputItem.d.ts +0 -0
- /package/packages/forms/dist/{components → types/components}/controlled/RadioGroup.d.ts +0 -0
- /package/packages/forms/dist/{components → types/components}/controlled/SelectControl.d.ts +0 -0
- /package/packages/forms/dist/{components → types/components}/controlled/TextareaControl.d.ts +0 -0
- /package/packages/forms/dist/{components → types/components}/controlled/index.d.ts +0 -0
- /package/packages/forms/dist/{utils → types/utils}/class.d.ts +0 -0
|
@@ -35,6 +35,14 @@ export const LabelControl = React.forwardRef<
|
|
|
35
35
|
isRequired: isRequired ?? false
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
const styleHelp = `
|
|
39
|
+
text-sup text-sumi-700
|
|
40
|
+
`
|
|
41
|
+
|
|
42
|
+
const styleError = `
|
|
43
|
+
text-sup text-sun-800
|
|
44
|
+
`
|
|
45
|
+
|
|
38
46
|
return (
|
|
39
47
|
<ControllerContext.Provider value={context}>
|
|
40
48
|
<div className={cx('mb-4', className)}>
|
|
@@ -45,10 +53,12 @@ export const LabelControl = React.forwardRef<
|
|
|
45
53
|
{...restProps}
|
|
46
54
|
>
|
|
47
55
|
{labelText}
|
|
48
|
-
{isRequired &&
|
|
56
|
+
{isRequired && (
|
|
57
|
+
<span className="text-label text-sun-800"> *</span>
|
|
58
|
+
)}
|
|
49
59
|
</label>
|
|
50
60
|
{helperText && (
|
|
51
|
-
<p id={context.helperTextId} className=
|
|
61
|
+
<p id={context.helperTextId} className={cx(styleHelp, 'mb-2')}>
|
|
52
62
|
{helperText}
|
|
53
63
|
</p>
|
|
54
64
|
)}
|
|
@@ -56,10 +66,7 @@ export const LabelControl = React.forwardRef<
|
|
|
56
66
|
{isInvalid && (
|
|
57
67
|
<p
|
|
58
68
|
id={context.errorMessageId}
|
|
59
|
-
className={cx(
|
|
60
|
-
'text-sup text-sun-800',
|
|
61
|
-
helperText ? 'mt-1' : 'mt-2'
|
|
62
|
-
)}
|
|
69
|
+
className={cx(styleError, helperText ? 'mt-1' : 'mt-2')}
|
|
63
70
|
>
|
|
64
71
|
{errorMessage}
|
|
65
72
|
</p>
|
|
@@ -16,32 +16,36 @@ export const Radio = React.forwardRef<HTMLInputElement, RadioProps>(
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const style = `
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
inline-block
|
|
20
|
+
text-base
|
|
21
|
+
cursor-pointer
|
|
22
|
+
py-2
|
|
23
|
+
mr-4
|
|
24
|
+
`
|
|
25
|
+
|
|
26
26
|
const styleInput = `
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
peer
|
|
28
|
+
sr-only
|
|
29
|
+
`
|
|
30
30
|
|
|
31
31
|
const styleRadio = `
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
bg-clip-content
|
|
33
|
+
w-6 h-6
|
|
34
|
+
ml-1
|
|
35
|
+
mr-2
|
|
36
|
+
p-1
|
|
37
|
+
rounded-full
|
|
38
|
+
border
|
|
39
|
+
border-solid
|
|
40
|
+
border-sumi-900
|
|
41
|
+
peer-checked:bg-sea-600
|
|
42
|
+
peer-checked:border-sea-600
|
|
43
|
+
peer-disabled:border-sumi-500
|
|
44
|
+
peer-focus-visible:ring-2
|
|
45
|
+
peer-focus-visible:ring-offset-2
|
|
46
|
+
peer-focus-visible:ring-wood-500
|
|
47
|
+
`
|
|
48
|
+
|
|
45
49
|
return (
|
|
46
50
|
<label htmlFor={newProps.id} className={cx(style, className)}>
|
|
47
51
|
<span className="flex items-center">
|
|
@@ -51,6 +55,7 @@ export const Radio = React.forwardRef<HTMLInputElement, RadioProps>(
|
|
|
51
55
|
aria-describedby={ctx.helperTextId}
|
|
52
56
|
aria-errormessage={ctx.errorMessageId}
|
|
53
57
|
aria-invalid={ctx.isInvalid ?? false}
|
|
58
|
+
aria-required={ctx.isRequired ?? false}
|
|
54
59
|
{...newProps}
|
|
55
60
|
ref={ref}
|
|
56
61
|
/>
|
|
@@ -12,43 +12,45 @@ export const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
|
|
|
12
12
|
restProps.required = true
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const invalidStyle = ctx.isInvalid ? 'border-sun-800' : 'border-sumi-900'
|
|
16
|
-
|
|
17
15
|
const style = `
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
16
|
+
peer
|
|
17
|
+
cursor-pointer
|
|
18
|
+
appearance-none
|
|
19
|
+
text-base
|
|
20
|
+
w-full
|
|
21
|
+
bg-white-100
|
|
22
|
+
border
|
|
23
|
+
border-solid
|
|
24
|
+
border-sumi-900
|
|
25
|
+
py-4 px-4 pr-8
|
|
26
|
+
rounded-[8px]
|
|
27
|
+
outline-offset-2
|
|
28
|
+
focus:outline
|
|
29
|
+
focus:outline-2
|
|
30
|
+
focus:outline-wood-500
|
|
31
|
+
disabled:bg-transparent
|
|
32
|
+
disabled:text-sumi-500
|
|
33
|
+
disabled:border-sumi-500
|
|
34
|
+
aria-invalid:border-sun-800
|
|
35
|
+
`
|
|
35
36
|
|
|
36
37
|
const styleArrow = `
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
flex items-center
|
|
39
|
+
absolute inset-y-0 right-0
|
|
40
|
+
px-2
|
|
41
|
+
pointer-events-none
|
|
42
|
+
peer-disabled:fill-sumi-500
|
|
43
|
+
`
|
|
43
44
|
|
|
44
45
|
return (
|
|
45
46
|
<label className="inline-block relative">
|
|
46
47
|
<select
|
|
47
48
|
id={restProps.id ?? ctx.id}
|
|
48
|
-
className={cx(style,
|
|
49
|
+
className={cx(style, props.className)}
|
|
49
50
|
aria-describedby={ctx.helperTextId}
|
|
50
51
|
aria-errormessage={ctx.errorMessageId}
|
|
51
52
|
aria-invalid={ctx.isInvalid ?? false}
|
|
53
|
+
aria-required={ctx.isRequired ?? false}
|
|
52
54
|
{...restProps}
|
|
53
55
|
ref={ref}
|
|
54
56
|
>
|
|
@@ -22,31 +22,34 @@ export const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
|
22
22
|
restProps.required = true
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const invalidStyle = ctx.isInvalid ? 'border-sun-800' : 'border-sumi-900'
|
|
26
25
|
const overtextStyle =
|
|
27
26
|
count > (maxLength || 0) ? 'text-sun-800' : 'text-sumi-700'
|
|
28
27
|
|
|
29
28
|
const style = `
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
p-4
|
|
30
|
+
rounded-lg
|
|
31
|
+
border
|
|
32
|
+
border-solid
|
|
33
|
+
border-sumi-900
|
|
34
|
+
outline-offset-2
|
|
35
|
+
focus:outline
|
|
36
|
+
focus:outline-2
|
|
37
|
+
focus:outline-wood-500
|
|
38
|
+
disabled:bg-transparent
|
|
39
|
+
disabled:text-sumi-500
|
|
40
|
+
disabled:border-sumi-500
|
|
41
|
+
aria-invalid:border-sun-800
|
|
42
|
+
`
|
|
41
43
|
|
|
42
44
|
return (
|
|
43
45
|
<>
|
|
44
46
|
<textarea
|
|
45
47
|
id={restProps.id ?? ctx.id}
|
|
46
|
-
className={cx(style,
|
|
48
|
+
className={cx(style, className)}
|
|
47
49
|
aria-describedby={ctx.helperTextId}
|
|
48
50
|
aria-errormessage={ctx.errorMessageId}
|
|
49
51
|
aria-invalid={ctx.isInvalid ?? false}
|
|
52
|
+
aria-required={ctx.isRequired ?? false}
|
|
50
53
|
onChange={onChangeHandler}
|
|
51
54
|
{...restProps}
|
|
52
55
|
ref={ref}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { Checkbox } from './Checkbox'
|
|
2
|
-
export { Radio } from './Radio'
|
|
3
|
-
export { Select } from './Select'
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
1
|
+
export { Checkbox, type CheckboxProps } from './Checkbox'
|
|
2
|
+
export { Radio, type RadioProps } from './Radio'
|
|
3
|
+
export { Select, type SelectProps } from './Select'
|
|
4
|
+
export { FileInput, type FileInputProps } from './FileInput'
|
|
5
|
+
export { Input, type InputProps } from './Input'
|
|
6
|
+
export { Textarea, type TextareaProps } from './Textarea'
|
|
7
|
+
export { LabelControl, type LabelControlProps } from './LabelControl'
|
|
8
|
+
export { FieldsetControl, type FieldsetControlProps } from './FieldsetControl'
|
|
@@ -2,12 +2,24 @@ export {
|
|
|
2
2
|
Checkbox,
|
|
3
3
|
Radio,
|
|
4
4
|
Select,
|
|
5
|
+
FileInput,
|
|
5
6
|
Input,
|
|
6
7
|
Textarea,
|
|
7
8
|
LabelControl,
|
|
8
9
|
FieldsetControl
|
|
9
10
|
} from './components'
|
|
10
11
|
|
|
12
|
+
export type {
|
|
13
|
+
CheckboxProps,
|
|
14
|
+
RadioProps,
|
|
15
|
+
SelectProps,
|
|
16
|
+
FileInputProps,
|
|
17
|
+
InputProps,
|
|
18
|
+
TextareaProps,
|
|
19
|
+
LabelControlProps,
|
|
20
|
+
FieldsetControlProps
|
|
21
|
+
} from './components'
|
|
22
|
+
|
|
11
23
|
export {
|
|
12
24
|
CheckboxGroup,
|
|
13
25
|
RadioGroup,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "../../tsconfig.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
4
|
+
"declarationDir": "./dist/types",
|
|
5
|
+
"outDir": "./dist",
|
|
6
|
+
"baseUrl": ".",
|
|
6
7
|
"paths": {
|
|
7
|
-
"@/*": ["
|
|
8
|
+
"@/*": ["src/*"]
|
|
8
9
|
}
|
|
9
10
|
},
|
|
10
11
|
"include": ["src"],
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="vitest" />
|
|
1
2
|
import { resolve } from 'path'
|
|
2
3
|
import { defineConfig } from 'vite'
|
|
3
4
|
import react from '@vitejs/plugin-react-swc'
|
|
@@ -19,8 +20,10 @@ export default defineConfig({
|
|
|
19
20
|
},
|
|
20
21
|
rollupOptions: {
|
|
21
22
|
external: [...Object.keys(peerDependencies)]
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
test: {
|
|
26
|
+
globals: true,
|
|
27
|
+
environment: 'jsdom'
|
|
25
28
|
}
|
|
26
29
|
})
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="1691656853152" clover="3.2.0">
|
|
3
|
-
<project timestamp="1691656853152" name="All files">
|
|
4
|
-
<metrics statements="201" coveredstatements="98" conditionals="36" coveredconditionals="0" methods="80" coveredmethods="7" elements="317" coveredelements="105" complexity="0" loc="201" ncloc="201" packages="3" files="14" classes="14"/>
|
|
5
|
-
<package name="src">
|
|
6
|
-
<metrics statements="27" coveredstatements="27" conditionals="0" coveredconditionals="0" methods="26" coveredmethods="2"/>
|
|
7
|
-
<file name="index.ts" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/index.ts">
|
|
8
|
-
<metrics statements="27" coveredstatements="27" conditionals="0" coveredconditionals="0" methods="26" coveredmethods="2"/>
|
|
9
|
-
<line num="1" count="1" type="stmt"/>
|
|
10
|
-
<line num="2" count="1" type="stmt"/>
|
|
11
|
-
<line num="3" count="2" type="stmt"/>
|
|
12
|
-
<line num="4" count="2" type="stmt"/>
|
|
13
|
-
<line num="5" count="1" type="stmt"/>
|
|
14
|
-
<line num="6" count="1" type="stmt"/>
|
|
15
|
-
<line num="7" count="1" type="stmt"/>
|
|
16
|
-
<line num="8" count="1" type="stmt"/>
|
|
17
|
-
<line num="9" count="1" type="stmt"/>
|
|
18
|
-
<line num="10" count="1" type="stmt"/>
|
|
19
|
-
<line num="11" count="1" type="stmt"/>
|
|
20
|
-
<line num="12" count="1" type="stmt"/>
|
|
21
|
-
<line num="13" count="1" type="stmt"/>
|
|
22
|
-
<line num="14" count="1" type="stmt"/>
|
|
23
|
-
<line num="15" count="1" type="stmt"/>
|
|
24
|
-
<line num="16" count="1" type="stmt"/>
|
|
25
|
-
<line num="17" count="1" type="stmt"/>
|
|
26
|
-
<line num="18" count="1" type="stmt"/>
|
|
27
|
-
<line num="19" count="1" type="stmt"/>
|
|
28
|
-
<line num="20" count="1" type="stmt"/>
|
|
29
|
-
<line num="21" count="1" type="stmt"/>
|
|
30
|
-
<line num="22" count="1" type="stmt"/>
|
|
31
|
-
<line num="23" count="1" type="stmt"/>
|
|
32
|
-
<line num="24" count="1" type="stmt"/>
|
|
33
|
-
<line num="25" count="1" type="stmt"/>
|
|
34
|
-
<line num="26" count="1" type="stmt"/>
|
|
35
|
-
<line num="27" count="1" type="stmt"/>
|
|
36
|
-
</file>
|
|
37
|
-
</package>
|
|
38
|
-
<package name="src.components">
|
|
39
|
-
<metrics statements="173" coveredstatements="70" conditionals="36" coveredconditionals="0" methods="53" coveredmethods="4"/>
|
|
40
|
-
<file name="Button.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/components/Button.tsx">
|
|
41
|
-
<metrics statements="11" coveredstatements="4" conditionals="4" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
42
|
-
<line num="1" count="1" type="stmt"/>
|
|
43
|
-
<line num="2" count="1" type="stmt"/>
|
|
44
|
-
<line num="9" count="1" type="stmt"/>
|
|
45
|
-
<line num="14" count="0" type="stmt"/>
|
|
46
|
-
<line num="16" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
47
|
-
<line num="18" count="0" type="stmt"/>
|
|
48
|
-
<line num="38" count="0" type="stmt"/>
|
|
49
|
-
<line num="46" count="0" type="stmt"/>
|
|
50
|
-
<line num="56" count="0" type="stmt"/>
|
|
51
|
-
<line num="61" count="0" type="stmt"/>
|
|
52
|
-
<line num="72" count="1" type="stmt"/>
|
|
53
|
-
</file>
|
|
54
|
-
<file name="Card.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/components/Card.tsx">
|
|
55
|
-
<metrics statements="22" coveredstatements="16" conditionals="0" coveredconditionals="0" methods="4" coveredmethods="2"/>
|
|
56
|
-
<line num="1" count="1" type="stmt"/>
|
|
57
|
-
<line num="2" count="1" type="stmt"/>
|
|
58
|
-
<line num="8" count="1" type="stmt"/>
|
|
59
|
-
<line num="12" count="1" type="stmt"/>
|
|
60
|
-
<line num="13" count="1" type="stmt"/>
|
|
61
|
-
<line num="15" count="1" type="stmt"/>
|
|
62
|
-
<line num="16" count="1" type="stmt"/>
|
|
63
|
-
<line num="18" count="1" type="stmt"/>
|
|
64
|
-
<line num="28" count="1" type="stmt"/>
|
|
65
|
-
<line num="43" count="1" type="stmt"/>
|
|
66
|
-
<line num="46" count="1" type="stmt"/>
|
|
67
|
-
<line num="48" count="1" type="stmt"/>
|
|
68
|
-
<line num="50" count="1" type="stmt"/>
|
|
69
|
-
<line num="57" count="1" type="stmt"/>
|
|
70
|
-
<line num="66" count="1" type="stmt"/>
|
|
71
|
-
<line num="69" count="0" type="stmt"/>
|
|
72
|
-
<line num="71" count="0" type="stmt"/>
|
|
73
|
-
<line num="78" count="0" type="stmt"/>
|
|
74
|
-
<line num="88" count="1" type="stmt"/>
|
|
75
|
-
<line num="91" count="0" type="stmt"/>
|
|
76
|
-
<line num="93" count="0" type="stmt"/>
|
|
77
|
-
<line num="99" count="0" type="stmt"/>
|
|
78
|
-
</file>
|
|
79
|
-
<file name="Code.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/components/Code.tsx">
|
|
80
|
-
<metrics statements="5" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
81
|
-
<line num="2" count="1" type="stmt"/>
|
|
82
|
-
<line num="6" count="1" type="stmt"/>
|
|
83
|
-
<line num="7" count="0" type="stmt"/>
|
|
84
|
-
<line num="9" count="0" type="stmt"/>
|
|
85
|
-
<line num="14" count="0" type="stmt"/>
|
|
86
|
-
</file>
|
|
87
|
-
<file name="Heading.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/components/Heading.tsx">
|
|
88
|
-
<metrics statements="25" coveredstatements="7" conditionals="0" coveredconditionals="0" methods="6" coveredmethods="0"/>
|
|
89
|
-
<line num="2" count="1" type="stmt"/>
|
|
90
|
-
<line num="6" count="1" type="stmt"/>
|
|
91
|
-
<line num="7" count="0" type="stmt"/>
|
|
92
|
-
<line num="9" count="0" type="stmt"/>
|
|
93
|
-
<line num="16" count="0" type="stmt"/>
|
|
94
|
-
<line num="23" count="1" type="stmt"/>
|
|
95
|
-
<line num="24" count="0" type="stmt"/>
|
|
96
|
-
<line num="26" count="0" type="stmt"/>
|
|
97
|
-
<line num="33" count="0" type="stmt"/>
|
|
98
|
-
<line num="40" count="1" type="stmt"/>
|
|
99
|
-
<line num="41" count="0" type="stmt"/>
|
|
100
|
-
<line num="43" count="0" type="stmt"/>
|
|
101
|
-
<line num="50" count="0" type="stmt"/>
|
|
102
|
-
<line num="57" count="1" type="stmt"/>
|
|
103
|
-
<line num="58" count="0" type="stmt"/>
|
|
104
|
-
<line num="60" count="0" type="stmt"/>
|
|
105
|
-
<line num="67" count="0" type="stmt"/>
|
|
106
|
-
<line num="74" count="1" type="stmt"/>
|
|
107
|
-
<line num="75" count="0" type="stmt"/>
|
|
108
|
-
<line num="77" count="0" type="stmt"/>
|
|
109
|
-
<line num="84" count="0" type="stmt"/>
|
|
110
|
-
<line num="91" count="1" type="stmt"/>
|
|
111
|
-
<line num="92" count="0" type="stmt"/>
|
|
112
|
-
<line num="94" count="0" type="stmt"/>
|
|
113
|
-
<line num="101" count="0" type="stmt"/>
|
|
114
|
-
</file>
|
|
115
|
-
<file name="Icon.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/components/Icon.tsx">
|
|
116
|
-
<metrics statements="7" coveredstatements="4" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
117
|
-
<line num="1" count="1" type="stmt"/>
|
|
118
|
-
<line num="2" count="1" type="stmt"/>
|
|
119
|
-
<line num="8" count="1" type="stmt"/>
|
|
120
|
-
<line num="12" count="0" type="stmt"/>
|
|
121
|
-
<line num="14" count="0" type="stmt"/>
|
|
122
|
-
<line num="25" count="0" type="stmt"/>
|
|
123
|
-
<line num="32" count="1" type="stmt"/>
|
|
124
|
-
</file>
|
|
125
|
-
<file name="IconButton.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/components/IconButton.tsx">
|
|
126
|
-
<metrics statements="13" coveredstatements="4" conditionals="14" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
127
|
-
<line num="1" count="1" type="stmt"/>
|
|
128
|
-
<line num="2" count="1" type="stmt"/>
|
|
129
|
-
<line num="11" count="1" type="stmt"/>
|
|
130
|
-
<line num="23" count="0" type="stmt"/>
|
|
131
|
-
<line num="25" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
132
|
-
<line num="27" count="0" type="stmt"/>
|
|
133
|
-
<line num="29" count="0" type="stmt"/>
|
|
134
|
-
<line num="50" count="0" type="stmt"/>
|
|
135
|
-
<line num="58" count="0" type="stmt"/>
|
|
136
|
-
<line num="68" count="0" type="stmt"/>
|
|
137
|
-
<line num="73" count="0" type="stmt"/>
|
|
138
|
-
<line num="84" count="0" type="stmt"/>
|
|
139
|
-
<line num="97" count="1" type="stmt"/>
|
|
140
|
-
</file>
|
|
141
|
-
<file name="InfoCard.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/components/InfoCard.tsx">
|
|
142
|
-
<metrics statements="9" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
143
|
-
<line num="1" count="1" type="stmt"/>
|
|
144
|
-
<line num="2" count="1" type="stmt"/>
|
|
145
|
-
<line num="9" count="1" type="stmt"/>
|
|
146
|
-
<line num="12" count="0" type="stmt"/>
|
|
147
|
-
<line num="14" count="0" type="stmt"/>
|
|
148
|
-
<line num="23" count="0" type="stmt"/>
|
|
149
|
-
<line num="31" count="0" type="stmt"/>
|
|
150
|
-
<line num="37" count="0" type="stmt"/>
|
|
151
|
-
<line num="39" count="0" type="stmt"/>
|
|
152
|
-
</file>
|
|
153
|
-
<file name="Link.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/components/Link.tsx">
|
|
154
|
-
<metrics statements="28" coveredstatements="5" conditionals="18" coveredconditionals="0" methods="2" coveredmethods="0"/>
|
|
155
|
-
<line num="1" count="1" type="stmt"/>
|
|
156
|
-
<line num="2" count="1" type="stmt"/>
|
|
157
|
-
<line num="4" count="1" type="stmt"/>
|
|
158
|
-
<line num="5" count="0" type="stmt"/>
|
|
159
|
-
<line num="7" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
160
|
-
<line num="8" count="0" type="stmt"/>
|
|
161
|
-
<line num="10" count="0" type="cond" truecount="0" falsecount="3"/>
|
|
162
|
-
<line num="11" count="0" type="stmt"/>
|
|
163
|
-
<line num="13" count="0" type="cond" truecount="0" falsecount="3"/>
|
|
164
|
-
<line num="14" count="0" type="stmt"/>
|
|
165
|
-
<line num="16" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
166
|
-
<line num="17" count="0" type="stmt"/>
|
|
167
|
-
<line num="19" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
168
|
-
<line num="20" count="0" type="stmt"/>
|
|
169
|
-
<line num="22" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
170
|
-
<line num="23" count="0" type="stmt"/>
|
|
171
|
-
<line num="25" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
172
|
-
<line num="26" count="0" type="stmt"/>
|
|
173
|
-
<line num="28" count="0" type="stmt"/>
|
|
174
|
-
<line num="33" count="1" type="stmt"/>
|
|
175
|
-
<line num="37" count="0" type="stmt"/>
|
|
176
|
-
<line num="38" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
177
|
-
<line num="39" count="0" type="stmt"/>
|
|
178
|
-
<line num="41" count="0" type="stmt"/>
|
|
179
|
-
<line num="56" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
180
|
-
<line num="57" count="0" type="stmt"/>
|
|
181
|
-
<line num="71" count="0" type="stmt"/>
|
|
182
|
-
<line num="79" count="1" type="stmt"/>
|
|
183
|
-
</file>
|
|
184
|
-
<file name="List.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/components/List.tsx">
|
|
185
|
-
<metrics statements="9" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="0"/>
|
|
186
|
-
<line num="2" count="1" type="stmt"/>
|
|
187
|
-
<line num="6" count="1" type="stmt"/>
|
|
188
|
-
<line num="7" count="0" type="stmt"/>
|
|
189
|
-
<line num="9" count="0" type="stmt"/>
|
|
190
|
-
<line num="16" count="0" type="stmt"/>
|
|
191
|
-
<line num="25" count="1" type="stmt"/>
|
|
192
|
-
<line num="26" count="0" type="stmt"/>
|
|
193
|
-
<line num="28" count="0" type="stmt"/>
|
|
194
|
-
<line num="34" count="0" type="stmt"/>
|
|
195
|
-
</file>
|
|
196
|
-
<file name="Pre.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/components/Pre.tsx">
|
|
197
|
-
<metrics statements="5" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
198
|
-
<line num="2" count="1" type="stmt"/>
|
|
199
|
-
<line num="6" count="1" type="stmt"/>
|
|
200
|
-
<line num="7" count="0" type="stmt"/>
|
|
201
|
-
<line num="9" count="0" type="stmt"/>
|
|
202
|
-
<line num="17" count="0" type="stmt"/>
|
|
203
|
-
</file>
|
|
204
|
-
<file name="Table.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/components/Table.tsx">
|
|
205
|
-
<metrics statements="28" coveredstatements="9" conditionals="0" coveredconditionals="0" methods="7" coveredmethods="0"/>
|
|
206
|
-
<line num="2" count="1" type="stmt"/>
|
|
207
|
-
<line num="6" count="1" type="stmt"/>
|
|
208
|
-
<line num="12" count="1" type="stmt"/>
|
|
209
|
-
<line num="13" count="0" type="stmt"/>
|
|
210
|
-
<line num="16" count="0" type="stmt"/>
|
|
211
|
-
<line num="22" count="0" type="stmt"/>
|
|
212
|
-
<line num="32" count="1" type="stmt"/>
|
|
213
|
-
<line num="35" count="0" type="stmt"/>
|
|
214
|
-
<line num="37" count="0" type="stmt"/>
|
|
215
|
-
<line num="38" count="0" type="stmt"/>
|
|
216
|
-
<line num="47" count="1" type="stmt"/>
|
|
217
|
-
<line num="48" count="0" type="stmt"/>
|
|
218
|
-
<line num="50" count="0" type="stmt"/>
|
|
219
|
-
<line num="59" count="1" type="stmt"/>
|
|
220
|
-
<line num="60" count="0" type="stmt"/>
|
|
221
|
-
<line num="62" count="0" type="stmt"/>
|
|
222
|
-
<line num="71" count="1" type="stmt"/>
|
|
223
|
-
<line num="72" count="0" type="stmt"/>
|
|
224
|
-
<line num="74" count="0" type="stmt"/>
|
|
225
|
-
<line num="79" count="0" type="stmt"/>
|
|
226
|
-
<line num="88" count="1" type="stmt"/>
|
|
227
|
-
<line num="89" count="0" type="stmt"/>
|
|
228
|
-
<line num="91" count="0" type="stmt"/>
|
|
229
|
-
<line num="93" count="0" type="stmt"/>
|
|
230
|
-
<line num="102" count="1" type="stmt"/>
|
|
231
|
-
<line num="103" count="0" type="stmt"/>
|
|
232
|
-
<line num="105" count="0" type="stmt"/>
|
|
233
|
-
<line num="109" count="0" type="stmt"/>
|
|
234
|
-
</file>
|
|
235
|
-
<file name="index.ts" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/components/index.ts">
|
|
236
|
-
<metrics statements="11" coveredstatements="11" conditionals="0" coveredconditionals="0" methods="26" coveredmethods="2"/>
|
|
237
|
-
<line num="1" count="1" type="stmt"/>
|
|
238
|
-
<line num="2" count="2" type="stmt"/>
|
|
239
|
-
<line num="3" count="1" type="stmt"/>
|
|
240
|
-
<line num="4" count="1" type="stmt"/>
|
|
241
|
-
<line num="5" count="1" type="stmt"/>
|
|
242
|
-
<line num="6" count="1" type="stmt"/>
|
|
243
|
-
<line num="7" count="1" type="stmt"/>
|
|
244
|
-
<line num="8" count="1" type="stmt"/>
|
|
245
|
-
<line num="9" count="1" type="stmt"/>
|
|
246
|
-
<line num="10" count="1" type="stmt"/>
|
|
247
|
-
<line num="13" count="1" type="stmt"/>
|
|
248
|
-
</file>
|
|
249
|
-
</package>
|
|
250
|
-
<package name="src.utils">
|
|
251
|
-
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
|
|
252
|
-
<file name="class.ts" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/core/src/utils/class.ts">
|
|
253
|
-
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
|
|
254
|
-
<line num="1" count="2" type="stmt"/>
|
|
255
|
-
</file>
|
|
256
|
-
</package>
|
|
257
|
-
</project>
|
|
258
|
-
</coverage>
|