@sakura-ui/sakura-ui 0.1.20 → 0.2.0
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 -16
- package/packages/core/package.json +15 -14
- package/packages/core/src/components/Button.tsx +10 -4
- package/packages/core/src/components/Card.tsx +11 -8
- package/packages/core/src/components/IconButton.tsx +6 -6
- package/packages/core/src/components/Link.tsx +2 -1
- package/packages/core/src/components/Table.tsx +4 -3
- package/packages/core/src/components/buttonStyle.ts +34 -14
- package/packages/core/src/components/index.ts +0 -3
- package/packages/core/src/index.ts +0 -1
- package/packages/core/src/libs/cx.ts +1 -0
- package/packages/core/src/libs/forward-ref.ts +7 -4
- package/packages/core/src/types/component.ts +7 -6
- package/packages/core/tests/Button.test.tsx +30 -0
- package/packages/core/tests/Card.test.tsx +30 -7
- package/packages/core/tests/vitest.setup.ts +1 -0
- package/packages/core/vite.config.ts +3 -2
- package/packages/forms/dist/index.cjs.js +92 -81
- package/packages/forms/dist/index.es.js +697 -627
- package/packages/forms/dist/types/components/Checkbox.d.ts +3 -1
- package/packages/forms/dist/types/components/Checkbox.d.ts.map +1 -1
- package/packages/forms/dist/types/components/FileInput.d.ts.map +1 -1
- package/packages/forms/dist/types/components/Input.d.ts +3 -1
- package/packages/forms/dist/types/components/Input.d.ts.map +1 -1
- package/packages/forms/dist/types/components/Radio.d.ts +3 -1
- package/packages/forms/dist/types/components/Radio.d.ts.map +1 -1
- package/packages/forms/dist/types/components/Select.d.ts +3 -1
- package/packages/forms/dist/types/components/Select.d.ts.map +1 -1
- package/packages/forms/dist/types/components/Textarea.d.ts.map +1 -1
- package/packages/forms/dist/types/components/controlled/CheckboxGroup.d.ts +3 -1
- package/packages/forms/dist/types/components/controlled/CheckboxGroup.d.ts.map +1 -1
- package/packages/forms/dist/types/components/controlled/RadioGroup.d.ts +3 -1
- package/packages/forms/dist/types/components/controlled/RadioGroup.d.ts.map +1 -1
- package/packages/forms/dist/types/components/controlled/index.d.ts +0 -2
- package/packages/forms/dist/types/components/controlled/index.d.ts.map +1 -1
- package/packages/forms/dist/types/components/inputStyle.d.ts +13 -0
- package/packages/forms/dist/types/components/inputStyle.d.ts.map +1 -0
- package/packages/forms/dist/types/index.d.ts +1 -1
- package/packages/forms/dist/types/index.d.ts.map +1 -1
- package/packages/forms/dist/types/utils/class.d.ts.map +1 -1
- package/packages/forms/node_modules/.bin/acorn +17 -0
- package/packages/forms/node_modules/.bin/autoprefixer +2 -2
- package/packages/forms/node_modules/.bin/browserslist +4 -4
- package/packages/forms/node_modules/.bin/eslint +4 -4
- 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 +4 -4
- package/packages/forms/package.json +15 -14
- package/packages/forms/src/components/Checkbox.tsx +39 -17
- package/packages/forms/src/components/FieldsetControl.tsx +1 -1
- package/packages/forms/src/components/FileInput.tsx +5 -3
- package/packages/forms/src/components/Input.tsx +16 -20
- package/packages/forms/src/components/LabelControl.tsx +2 -2
- package/packages/forms/src/components/Radio.tsx +34 -19
- package/packages/forms/src/components/Select.tsx +41 -31
- package/packages/forms/src/components/Textarea.tsx +4 -3
- package/packages/forms/src/components/controlled/CheckboxGroup.tsx +11 -3
- package/packages/forms/src/components/controlled/RadioGroup.tsx +7 -3
- package/packages/forms/src/components/controlled/index.ts +0 -2
- package/packages/forms/src/components/inputStyle.ts +83 -0
- package/packages/forms/src/index.ts +1 -6
- package/packages/forms/src/utils/class.ts +1 -0
- package/packages/forms/tests/FieldsetControl.test.tsx +2 -2
- package/packages/forms/tests/Input.test.tsx +2 -2
- package/packages/forms/tests/LabelControl.test.tsx +2 -2
- package/packages/forms/tests/Radio.test.tsx +2 -2
- package/packages/forms/tests/vitest.setup.ts +1 -0
- package/packages/forms/vite.config.ts +3 -2
- package/packages/tailwind-theme-plugin/dist/index.cjs.js +1 -0
- package/packages/tailwind-theme-plugin/dist/index.es.js +6476 -0
- package/packages/tailwind-theme-plugin/dist/types/index.d.ts +6 -0
- package/packages/tailwind-theme-plugin/dist/types/index.d.ts.map +1 -0
- package/packages/tailwind-theme-plugin/node_modules/.bin/autoprefixer +17 -0
- package/packages/tailwind-theme-plugin/node_modules/.bin/browserslist +17 -0
- package/packages/tailwind-theme-plugin/node_modules/.bin/tailwind +17 -0
- package/packages/tailwind-theme-plugin/node_modules/.bin/tailwindcss +17 -0
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node +17 -0
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-cwd +17 -0
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-esm +17 -0
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-script +17 -0
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-transpile-only +17 -0
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-script +17 -0
- package/packages/{config → tailwind-theme-plugin}/package.json +10 -6
- package/packages/tailwind-theme-plugin/src/index.ts +519 -0
- package/packages/{config → tailwind-theme-plugin}/vite.config.ts +1 -1
- package/packages/config/src/index.ts +0 -347
- package/packages/core/.eslintrc.json +0 -25
- package/packages/core/src/components/InfoCard.tsx +0 -50
- package/packages/forms/coverage/clover.xml +0 -209
- package/packages/forms/coverage/coverage-final.json +0 -18
- package/packages/forms/coverage/lcov-report/base.css +0 -224
- package/packages/forms/coverage/lcov-report/block-navigation.js +0 -87
- package/packages/forms/coverage/lcov-report/favicon.png +0 -0
- package/packages/forms/coverage/lcov-report/index.html +0 -161
- package/packages/forms/coverage/lcov-report/prettify.css +0 -1
- package/packages/forms/coverage/lcov-report/prettify.js +0 -2
- package/packages/forms/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/packages/forms/coverage/lcov-report/sorter.js +0 -196
- package/packages/forms/coverage/lcov-report/src/components/Checkbox.tsx.html +0 -295
- package/packages/forms/coverage/lcov-report/src/components/FieldsetControl.tsx.html +0 -295
- package/packages/forms/coverage/lcov-report/src/components/LabelControl.tsx.html +0 -289
- package/packages/forms/coverage/lcov-report/src/components/Radio.tsx.html +0 -262
- package/packages/forms/coverage/lcov-report/src/components/Select.tsx.html +0 -259
- package/packages/forms/coverage/lcov-report/src/components/Text.tsx.html +0 -220
- package/packages/forms/coverage/lcov-report/src/components/Textarea.tsx.html +0 -229
- package/packages/forms/coverage/lcov-report/src/components/context.ts.html +0 -136
- package/packages/forms/coverage/lcov-report/src/components/controlled/CheckboxGroup.tsx.html +0 -244
- package/packages/forms/coverage/lcov-report/src/components/controlled/RadioGroup.tsx.html +0 -265
- package/packages/forms/coverage/lcov-report/src/components/controlled/SelectControl.tsx.html +0 -205
- package/packages/forms/coverage/lcov-report/src/components/controlled/TextControl.tsx.html +0 -202
- package/packages/forms/coverage/lcov-report/src/components/controlled/TextareaControl.tsx.html +0 -205
- package/packages/forms/coverage/lcov-report/src/components/controlled/index.html +0 -191
- package/packages/forms/coverage/lcov-report/src/components/controlled/index.ts.html +0 -100
- package/packages/forms/coverage/lcov-report/src/components/index.html +0 -236
- package/packages/forms/coverage/lcov-report/src/components/index.ts.html +0 -106
- package/packages/forms/coverage/lcov-report/src/index.html +0 -116
- package/packages/forms/coverage/lcov-report/src/index.ts.html +0 -136
- package/packages/forms/coverage/lcov-report/src/utils/index.html +0 -116
- package/packages/forms/coverage/lcov-report/src/utils/index.ts.html +0 -88
- package/packages/forms/coverage/lcov.info +0 -434
- package/packages/forms/dist/components/Checkbox.js +0 -46
- package/packages/forms/dist/components/Checkbox.js.map +0 -1
- package/packages/forms/dist/components/FieldsetControl.js +0 -20
- package/packages/forms/dist/components/FieldsetControl.js.map +0 -1
- package/packages/forms/dist/components/FileInput.js +0 -55
- package/packages/forms/dist/components/FileInput.js.map +0 -1
- package/packages/forms/dist/components/Input.js +0 -29
- package/packages/forms/dist/components/Input.js.map +0 -1
- package/packages/forms/dist/components/LabelControl.js +0 -24
- package/packages/forms/dist/components/LabelControl.js.map +0 -1
- package/packages/forms/dist/components/Radio.js +0 -45
- package/packages/forms/dist/components/Radio.js.map +0 -1
- package/packages/forms/dist/components/Select.js +0 -41
- package/packages/forms/dist/components/Select.js.map +0 -1
- package/packages/forms/dist/components/Textarea.js +0 -36
- package/packages/forms/dist/components/Textarea.js.map +0 -1
- package/packages/forms/dist/components/context.js +0 -8
- package/packages/forms/dist/components/context.js.map +0 -1
- package/packages/forms/dist/components/controlled/CheckboxGroup.js +0 -12
- package/packages/forms/dist/components/controlled/CheckboxGroup.js.map +0 -1
- package/packages/forms/dist/components/controlled/InputItem.js +0 -2
- package/packages/forms/dist/components/controlled/InputItem.js.map +0 -1
- package/packages/forms/dist/components/controlled/RadioGroup.js +0 -12
- package/packages/forms/dist/components/controlled/RadioGroup.js.map +0 -1
- package/packages/forms/dist/components/controlled/SelectControl.js +0 -10
- package/packages/forms/dist/components/controlled/SelectControl.js.map +0 -1
- package/packages/forms/dist/components/controlled/TextareaControl.js +0 -10
- package/packages/forms/dist/components/controlled/TextareaControl.js.map +0 -1
- package/packages/forms/dist/components/controlled/index.js +0 -5
- package/packages/forms/dist/components/controlled/index.js.map +0 -1
- package/packages/forms/dist/components/index.js +0 -9
- package/packages/forms/dist/components/index.js.map +0 -1
- package/packages/forms/dist/index.js +0 -3
- package/packages/forms/dist/index.js.map +0 -1
- package/packages/forms/dist/types/components/controlled/SelectControl.d.ts +0 -10
- package/packages/forms/dist/types/components/controlled/SelectControl.d.ts.map +0 -1
- package/packages/forms/dist/types/components/controlled/TextareaControl.d.ts +0 -10
- package/packages/forms/dist/types/components/controlled/TextareaControl.d.ts.map +0 -1
- package/packages/forms/dist/utils/class.js +0 -2
- package/packages/forms/dist/utils/class.js.map +0 -1
- package/packages/forms/jest.config.ts +0 -11
- package/packages/forms/node_modules/.vitest/results.json +0 -1
- package/packages/forms/src/components/controlled/SelectControl.tsx +0 -42
- package/packages/forms/src/components/controlled/TextareaControl.tsx +0 -42
- /package/packages/{config → tailwind-theme-plugin}/tests/index.test.ts +0 -0
- /package/packages/{config → tailwind-theme-plugin}/tsconfig.json +0 -0
- /package/packages/{config → tailwind-theme-plugin}/tsconfig.node.json +0 -0
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
import plugin from 'tailwindcss/plugin'
|
|
2
|
-
|
|
3
|
-
const booleans = [
|
|
4
|
-
'atomic',
|
|
5
|
-
'busy',
|
|
6
|
-
'checked',
|
|
7
|
-
'current',
|
|
8
|
-
'disabled',
|
|
9
|
-
'expanded',
|
|
10
|
-
'grabbed',
|
|
11
|
-
'haspopup',
|
|
12
|
-
'hidden',
|
|
13
|
-
'invalid',
|
|
14
|
-
'live',
|
|
15
|
-
'modal',
|
|
16
|
-
'multiline',
|
|
17
|
-
'multiselectable',
|
|
18
|
-
'pressed',
|
|
19
|
-
'readonly',
|
|
20
|
-
'required',
|
|
21
|
-
'selected'
|
|
22
|
-
]
|
|
23
|
-
|
|
24
|
-
const enumerables = {
|
|
25
|
-
autocomplete: ['both', 'inline', 'list', 'none'],
|
|
26
|
-
current: ['date', 'location', 'page', 'step', 'time'],
|
|
27
|
-
dropeffect: ['copy', 'execute', 'link', 'move', 'none', 'popup'],
|
|
28
|
-
haspopup: ['dialog', 'grid', 'listbox', 'menu', 'tree'],
|
|
29
|
-
orientation: ['horizontal', 'undefined', 'vertial'],
|
|
30
|
-
relevant: ['additions', 'all', 'removals', 'text'],
|
|
31
|
-
sort: ['ascending', 'descending', 'none', 'other']
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const sakuraPlugin = plugin(
|
|
35
|
-
({ addBase, addVariant }) => {
|
|
36
|
-
addBase({
|
|
37
|
-
'@font-face': {
|
|
38
|
-
fontFamily: 'Material Symbols Outlined',
|
|
39
|
-
fontWeight: '300',
|
|
40
|
-
fontStyle: 'normal'
|
|
41
|
-
}
|
|
42
|
-
})
|
|
43
|
-
const addAriaVariant = (name: string, value: string) => {
|
|
44
|
-
addVariant(name, `[${name}="${value}"]&`)
|
|
45
|
-
addVariant(`peer-${name}`, `:merge(.peer)[${name}="${value}"] ~ &`)
|
|
46
|
-
addVariant(`group-${name}`, `:merge(.group)[${name}="${value}"] &`)
|
|
47
|
-
}
|
|
48
|
-
const addAriaEnumVariant = (name: string, value: string) => {
|
|
49
|
-
addVariant(`${name}-${value}`, `[${name}="${value}"]&`)
|
|
50
|
-
addVariant(
|
|
51
|
-
`peer-${name}-${value}`,
|
|
52
|
-
`:merge(.peer)[${name}="${value}"] ~ &`
|
|
53
|
-
)
|
|
54
|
-
addVariant(
|
|
55
|
-
`group-${name}-${value}`,
|
|
56
|
-
`:merge(.group)[${name}="${value}"] &`
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
for (const attribute of booleans) {
|
|
61
|
-
addAriaVariant(`aria-${attribute}`, 'true')
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
for (const [attribute, values] of Object.entries(enumerables)) {
|
|
65
|
-
for (const value of values) {
|
|
66
|
-
addAriaEnumVariant(`aria-${attribute}`, value)
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
theme: {
|
|
72
|
-
extend: {
|
|
73
|
-
fontSize: {
|
|
74
|
-
'h-xxl': [
|
|
75
|
-
'57px',
|
|
76
|
-
{
|
|
77
|
-
lineHeight: '1.4',
|
|
78
|
-
letterSpacing: '0.04em',
|
|
79
|
-
fontWeight: '700'
|
|
80
|
-
}
|
|
81
|
-
],
|
|
82
|
-
'h-xl': [
|
|
83
|
-
'45px',
|
|
84
|
-
{
|
|
85
|
-
lineHeight: '1.4',
|
|
86
|
-
letterSpacing: '0.04em',
|
|
87
|
-
fontWeight: '700'
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
// h1
|
|
91
|
-
'h-lg': [
|
|
92
|
-
'36px',
|
|
93
|
-
{
|
|
94
|
-
lineHeight: '1.4',
|
|
95
|
-
letterSpacing: '0.04em',
|
|
96
|
-
fontWeight: '700'
|
|
97
|
-
}
|
|
98
|
-
],
|
|
99
|
-
'h-lg-m': [
|
|
100
|
-
'32px',
|
|
101
|
-
{
|
|
102
|
-
lineHeight: '1.5',
|
|
103
|
-
letterSpacing: '0.04em',
|
|
104
|
-
fontWeight: '700'
|
|
105
|
-
}
|
|
106
|
-
],
|
|
107
|
-
// h2
|
|
108
|
-
'h-med': [
|
|
109
|
-
'32px',
|
|
110
|
-
{
|
|
111
|
-
lineHeight: '1.5',
|
|
112
|
-
letterSpacing: '0.04em',
|
|
113
|
-
fontWeight: '700'
|
|
114
|
-
}
|
|
115
|
-
],
|
|
116
|
-
'h-med-m': [
|
|
117
|
-
'28px',
|
|
118
|
-
{
|
|
119
|
-
lineHeight: '1.5',
|
|
120
|
-
letterSpacing: '0.04em',
|
|
121
|
-
fontWeight: '700'
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
// h3
|
|
125
|
-
'h-sm': [
|
|
126
|
-
'28px',
|
|
127
|
-
{
|
|
128
|
-
lineHeight: '1.5',
|
|
129
|
-
letterSpacing: '0.04em',
|
|
130
|
-
fontWeight: '700'
|
|
131
|
-
}
|
|
132
|
-
],
|
|
133
|
-
'h-sm-m': [
|
|
134
|
-
'24px',
|
|
135
|
-
{
|
|
136
|
-
lineHeight: '1.5',
|
|
137
|
-
letterSpacing: '0.04em',
|
|
138
|
-
fontWeight: '700'
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
// h4
|
|
142
|
-
'h-xs': [
|
|
143
|
-
'24px',
|
|
144
|
-
{
|
|
145
|
-
lineHeight: '1.5',
|
|
146
|
-
letterSpacing: '0.04em',
|
|
147
|
-
fontWeight: '700'
|
|
148
|
-
}
|
|
149
|
-
],
|
|
150
|
-
'h-xs-m': [
|
|
151
|
-
'20px',
|
|
152
|
-
{
|
|
153
|
-
lineHeight: '1.5',
|
|
154
|
-
letterSpacing: '0.04em',
|
|
155
|
-
fontWeight: '700'
|
|
156
|
-
}
|
|
157
|
-
],
|
|
158
|
-
// h5 h6
|
|
159
|
-
'h-xxs': [
|
|
160
|
-
'20px',
|
|
161
|
-
{
|
|
162
|
-
lineHeight: '1.5',
|
|
163
|
-
letterSpacing: '0.04em',
|
|
164
|
-
fontWeight: '700'
|
|
165
|
-
}
|
|
166
|
-
],
|
|
167
|
-
'h-xxs-m': [
|
|
168
|
-
'16px',
|
|
169
|
-
{
|
|
170
|
-
lineHeight: '1.5',
|
|
171
|
-
letterSpacing: '0.04em',
|
|
172
|
-
fontWeight: '700'
|
|
173
|
-
}
|
|
174
|
-
],
|
|
175
|
-
base: [
|
|
176
|
-
'16px',
|
|
177
|
-
{
|
|
178
|
-
lineHeight: '1.7',
|
|
179
|
-
letterSpacing: '0.04em',
|
|
180
|
-
fontWeight: '400'
|
|
181
|
-
}
|
|
182
|
-
],
|
|
183
|
-
'base-sm': [
|
|
184
|
-
'14px',
|
|
185
|
-
{
|
|
186
|
-
lineHeight: '1.7',
|
|
187
|
-
letterSpacing: '0.04em',
|
|
188
|
-
fontWeight: '400'
|
|
189
|
-
}
|
|
190
|
-
],
|
|
191
|
-
sup: [
|
|
192
|
-
'12px',
|
|
193
|
-
{
|
|
194
|
-
lineHeight: '1.7',
|
|
195
|
-
letterSpacing: '0.02em',
|
|
196
|
-
fontWeight: '400'
|
|
197
|
-
}
|
|
198
|
-
],
|
|
199
|
-
'sup-sm': [
|
|
200
|
-
'10px',
|
|
201
|
-
{
|
|
202
|
-
lineHeight: '1.7',
|
|
203
|
-
letterSpacing: '0.02em',
|
|
204
|
-
fontWeight: '400'
|
|
205
|
-
}
|
|
206
|
-
],
|
|
207
|
-
button: [
|
|
208
|
-
'16px',
|
|
209
|
-
{
|
|
210
|
-
lineHeight: '1.5',
|
|
211
|
-
letterSpacing: '0.04em',
|
|
212
|
-
fontWeight: '700'
|
|
213
|
-
}
|
|
214
|
-
],
|
|
215
|
-
'button-sm': [
|
|
216
|
-
'14px',
|
|
217
|
-
{
|
|
218
|
-
lineHeight: '14px',
|
|
219
|
-
letterSpacing: '0.04em',
|
|
220
|
-
fontWeight: '700'
|
|
221
|
-
}
|
|
222
|
-
],
|
|
223
|
-
label: [
|
|
224
|
-
'14px',
|
|
225
|
-
{
|
|
226
|
-
lineHeight: '1.5',
|
|
227
|
-
letterSpacing: '0.04em',
|
|
228
|
-
fontWeight: '500'
|
|
229
|
-
}
|
|
230
|
-
],
|
|
231
|
-
'label-sm': [
|
|
232
|
-
'12px',
|
|
233
|
-
{
|
|
234
|
-
lineHeight: '1.5',
|
|
235
|
-
letterSpacing: '0.04em',
|
|
236
|
-
fontWeight: '500'
|
|
237
|
-
}
|
|
238
|
-
],
|
|
239
|
-
code: [
|
|
240
|
-
'16px',
|
|
241
|
-
{
|
|
242
|
-
lineHeight: '1.7',
|
|
243
|
-
letterSpacing: '0.04em',
|
|
244
|
-
fontWeight: '400'
|
|
245
|
-
}
|
|
246
|
-
]
|
|
247
|
-
},
|
|
248
|
-
colors: {
|
|
249
|
-
white: {
|
|
250
|
-
1000: '#FFFFFF'
|
|
251
|
-
},
|
|
252
|
-
sea: {
|
|
253
|
-
1200: '#00004F',
|
|
254
|
-
1100: '#000060',
|
|
255
|
-
1000: '#000071',
|
|
256
|
-
900: '#000082',
|
|
257
|
-
800: '#0017C1',
|
|
258
|
-
700: '#0031D8',
|
|
259
|
-
600: '#1A3EE8',
|
|
260
|
-
500: '#264AF4',
|
|
261
|
-
400: '#4979F5',
|
|
262
|
-
300: '#7096F8',
|
|
263
|
-
200: '#9DB7F9',
|
|
264
|
-
100: '#C5D7FB',
|
|
265
|
-
50: '#E8F1FE'
|
|
266
|
-
},
|
|
267
|
-
sumi: {
|
|
268
|
-
1200: '#000000',
|
|
269
|
-
1100: '#080808',
|
|
270
|
-
1000: '#111111',
|
|
271
|
-
900: '#1A1A1C',
|
|
272
|
-
800: '#414143',
|
|
273
|
-
700: '#626264',
|
|
274
|
-
600: '#757578',
|
|
275
|
-
500: '#949497',
|
|
276
|
-
400: '#B4B4B7',
|
|
277
|
-
300: '#D8D8DB',
|
|
278
|
-
200: '#E8E8EB',
|
|
279
|
-
100: '#F1F1F4',
|
|
280
|
-
50: '#F8F8FB'
|
|
281
|
-
},
|
|
282
|
-
forest: {
|
|
283
|
-
1200: '#032213',
|
|
284
|
-
1100: '#08351F',
|
|
285
|
-
1000: '#0C472A',
|
|
286
|
-
900: '#115A36',
|
|
287
|
-
800: '#197A4B',
|
|
288
|
-
700: '#1D8B56',
|
|
289
|
-
600: '#259D63',
|
|
290
|
-
500: '#2CAC6E',
|
|
291
|
-
400: '#51B883',
|
|
292
|
-
300: '#71C598',
|
|
293
|
-
200: '#9BD4B5',
|
|
294
|
-
100: '#C2E5D1',
|
|
295
|
-
50: '#E6F5EC'
|
|
296
|
-
},
|
|
297
|
-
wood: {
|
|
298
|
-
1200: '#662E00',
|
|
299
|
-
1100: '#833B00',
|
|
300
|
-
1000: '#9C4600',
|
|
301
|
-
900: '#B65200',
|
|
302
|
-
800: '#C16800',
|
|
303
|
-
700: '#C87504',
|
|
304
|
-
600: '#CD820A',
|
|
305
|
-
500: '#D18D0F',
|
|
306
|
-
400: '#D69C2B',
|
|
307
|
-
300: '#DCAC4D',
|
|
308
|
-
200: '#E1C383',
|
|
309
|
-
100: '#E7D8B9',
|
|
310
|
-
50: '#F3EEE5'
|
|
311
|
-
},
|
|
312
|
-
sun: {
|
|
313
|
-
1200: '#640101',
|
|
314
|
-
1100: '#890101',
|
|
315
|
-
1000: '#AF0000',
|
|
316
|
-
900: '#D50000',
|
|
317
|
-
800: '#EC0000',
|
|
318
|
-
700: '#FA1606',
|
|
319
|
-
600: '#FF220D',
|
|
320
|
-
500: '#FF4B36',
|
|
321
|
-
400: '#FF5838',
|
|
322
|
-
300: '#FF7B5C',
|
|
323
|
-
200: '#FFA28B',
|
|
324
|
-
100: '#FFC8B8',
|
|
325
|
-
50: '#FFE7E6'
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
|
-
fontFamily: {
|
|
329
|
-
sans: [
|
|
330
|
-
'Noto Sans JP',
|
|
331
|
-
'-apple-system',
|
|
332
|
-
'blinkmacsystemfont',
|
|
333
|
-
'Segoe UI',
|
|
334
|
-
'Hiragino Kaku Gothic ProN',
|
|
335
|
-
'BIZ UDPGothic',
|
|
336
|
-
'meiryo',
|
|
337
|
-
'sans-serif'
|
|
338
|
-
],
|
|
339
|
-
code: ['Monaco', 'Menlo', 'Consolas', 'Courier New', 'monospace'],
|
|
340
|
-
icon: ['Material Symbols Outlined']
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
)
|
|
346
|
-
|
|
347
|
-
export default sakuraPlugin
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": true,
|
|
4
|
-
"es2021": true
|
|
5
|
-
},
|
|
6
|
-
"extends": [
|
|
7
|
-
"eslint:recommended",
|
|
8
|
-
"plugin:@typescript-eslint/recommended",
|
|
9
|
-
"plugin:react/recommended",
|
|
10
|
-
"plugin:jsx-a11y/recommended",
|
|
11
|
-
"prettier"
|
|
12
|
-
],
|
|
13
|
-
"parser": "@typescript-eslint/parser",
|
|
14
|
-
"parserOptions": {
|
|
15
|
-
"ecmaVersion": "latest",
|
|
16
|
-
"sourceType": "module"
|
|
17
|
-
},
|
|
18
|
-
"plugins": ["@typescript-eslint", "react", "jsx-a11y"],
|
|
19
|
-
"rules": {},
|
|
20
|
-
"settings": {
|
|
21
|
-
"react": {
|
|
22
|
-
"version": "detect"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { cx } from '../libs/cx'
|
|
3
|
-
|
|
4
|
-
export interface InfoCardProps
|
|
5
|
-
extends React.ComponentPropsWithoutRef<'section'> {
|
|
6
|
-
title?: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const InfoCard = (props: InfoCardProps) => {
|
|
10
|
-
const { className, children, title, ...restProps } = props
|
|
11
|
-
|
|
12
|
-
const style = `
|
|
13
|
-
border
|
|
14
|
-
border-solid
|
|
15
|
-
border-sumi-300
|
|
16
|
-
rounded-2xl
|
|
17
|
-
sm:rounded-3xl
|
|
18
|
-
text-sumi-900
|
|
19
|
-
`
|
|
20
|
-
|
|
21
|
-
const topStyle = `
|
|
22
|
-
pt-6
|
|
23
|
-
px-6
|
|
24
|
-
text-h-xxs-m
|
|
25
|
-
sm:text-h-xxs
|
|
26
|
-
leading-none
|
|
27
|
-
mb-2
|
|
28
|
-
`
|
|
29
|
-
|
|
30
|
-
const bottmStyle = `
|
|
31
|
-
pb-6
|
|
32
|
-
px-6
|
|
33
|
-
text-base
|
|
34
|
-
`
|
|
35
|
-
|
|
36
|
-
const headingId = React.useId()
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<section
|
|
40
|
-
aria-labelledby={headingId}
|
|
41
|
-
className={cx(style, className)}
|
|
42
|
-
{...restProps}
|
|
43
|
-
>
|
|
44
|
-
<h2 id={headingId} className={topStyle}>
|
|
45
|
-
{title}
|
|
46
|
-
</h2>
|
|
47
|
-
<p className={bottmStyle}>{children}</p>
|
|
48
|
-
</section>
|
|
49
|
-
)
|
|
50
|
-
}
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="1680182257879" clover="3.2.0">
|
|
3
|
-
<project timestamp="1680182257879" name="All files">
|
|
4
|
-
<metrics statements="140" coveredstatements="116" conditionals="63" coveredconditionals="51" methods="39" coveredmethods="19" elements="242" coveredelements="186" complexity="0" loc="140" ncloc="140" packages="4" files="17" classes="17"/>
|
|
5
|
-
<package name="src">
|
|
6
|
-
<metrics statements="14" coveredstatements="14" conditionals="0" coveredconditionals="0" methods="12" coveredmethods="6"/>
|
|
7
|
-
<file name="index.ts" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/index.ts">
|
|
8
|
-
<metrics statements="14" coveredstatements="14" conditionals="0" coveredconditionals="0" methods="12" coveredmethods="6"/>
|
|
9
|
-
<line num="1" count="4" type="stmt"/>
|
|
10
|
-
<line num="2" count="4" type="stmt"/>
|
|
11
|
-
<line num="3" count="10" type="stmt"/>
|
|
12
|
-
<line num="4" count="6" type="stmt"/>
|
|
13
|
-
<line num="5" count="12" type="stmt"/>
|
|
14
|
-
<line num="6" count="6" type="stmt"/>
|
|
15
|
-
<line num="7" count="21" type="stmt"/>
|
|
16
|
-
<line num="8" count="15" type="stmt"/>
|
|
17
|
-
<line num="11" count="4" type="stmt"/>
|
|
18
|
-
<line num="12" count="4" type="stmt"/>
|
|
19
|
-
<line num="13" count="4" type="stmt"/>
|
|
20
|
-
<line num="14" count="4" type="stmt"/>
|
|
21
|
-
<line num="15" count="4" type="stmt"/>
|
|
22
|
-
<line num="16" count="4" type="stmt"/>
|
|
23
|
-
</file>
|
|
24
|
-
</package>
|
|
25
|
-
<package name="src.components">
|
|
26
|
-
<metrics statements="88" coveredstatements="76" conditionals="63" coveredconditionals="51" methods="14" coveredmethods="12"/>
|
|
27
|
-
<file name="Checkbox.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/Checkbox.tsx">
|
|
28
|
-
<metrics statements="14" coveredstatements="4" conditionals="4" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
29
|
-
<line num="1" count="4" type="stmt"/>
|
|
30
|
-
<line num="2" count="4" type="stmt"/>
|
|
31
|
-
<line num="3" count="4" type="stmt"/>
|
|
32
|
-
<line num="7" count="4" type="stmt"/>
|
|
33
|
-
<line num="9" count="0" type="stmt"/>
|
|
34
|
-
<line num="10" count="0" type="stmt"/>
|
|
35
|
-
<line num="11" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
36
|
-
<line num="12" count="0" type="stmt"/>
|
|
37
|
-
<line num="14" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
38
|
-
<line num="15" count="0" type="stmt"/>
|
|
39
|
-
<line num="18" count="0" type="stmt"/>
|
|
40
|
-
<line num="26" count="0" type="stmt"/>
|
|
41
|
-
<line num="31" count="0" type="stmt"/>
|
|
42
|
-
<line num="45" count="0" type="stmt"/>
|
|
43
|
-
</file>
|
|
44
|
-
<file name="FieldsetControl.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/FieldsetControl.tsx">
|
|
45
|
-
<metrics statements="10" coveredstatements="10" conditionals="18" coveredconditionals="18" methods="1" coveredmethods="1"/>
|
|
46
|
-
<line num="1" count="4" type="stmt"/>
|
|
47
|
-
<line num="2" count="4" type="stmt"/>
|
|
48
|
-
<line num="3" count="4" type="stmt"/>
|
|
49
|
-
<line num="15" count="4" type="stmt"/>
|
|
50
|
-
<line num="19" count="11" type="stmt"/>
|
|
51
|
-
<line num="30" count="11" type="stmt"/>
|
|
52
|
-
<line num="32" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
53
|
-
<line num="34" count="11" type="stmt"/>
|
|
54
|
-
<line num="42" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
55
|
-
<line num="44" count="11" type="stmt"/>
|
|
56
|
-
</file>
|
|
57
|
-
<file name="LabelControl.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/LabelControl.tsx">
|
|
58
|
-
<metrics statements="8" coveredstatements="8" conditionals="16" coveredconditionals="16" methods="1" coveredmethods="1"/>
|
|
59
|
-
<line num="1" count="4" type="stmt"/>
|
|
60
|
-
<line num="2" count="4" type="stmt"/>
|
|
61
|
-
<line num="3" count="4" type="stmt"/>
|
|
62
|
-
<line num="14" count="4" type="stmt"/>
|
|
63
|
-
<line num="18" count="17" type="stmt"/>
|
|
64
|
-
<line num="28" count="17" type="stmt"/>
|
|
65
|
-
<line num="30" count="17" type="stmt"/>
|
|
66
|
-
<line num="38" count="17" type="stmt"/>
|
|
67
|
-
</file>
|
|
68
|
-
<file name="Radio.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/Radio.tsx">
|
|
69
|
-
<metrics statements="14" coveredstatements="14" conditionals="4" coveredconditionals="3" methods="1" coveredmethods="1"/>
|
|
70
|
-
<line num="1" count="4" type="stmt"/>
|
|
71
|
-
<line num="2" count="4" type="stmt"/>
|
|
72
|
-
<line num="3" count="4" type="stmt"/>
|
|
73
|
-
<line num="7" count="4" type="stmt"/>
|
|
74
|
-
<line num="8" count="6" type="stmt"/>
|
|
75
|
-
<line num="9" count="6" type="stmt"/>
|
|
76
|
-
<line num="10" count="6" type="cond" truecount="1" falsecount="0"/>
|
|
77
|
-
<line num="11" count="2" type="stmt"/>
|
|
78
|
-
<line num="13" count="6" type="cond" truecount="1" falsecount="0"/>
|
|
79
|
-
<line num="14" count="6" type="stmt"/>
|
|
80
|
-
<line num="17" count="6" type="stmt"/>
|
|
81
|
-
<line num="24" count="6" type="stmt"/>
|
|
82
|
-
<line num="29" count="6" type="stmt"/>
|
|
83
|
-
<line num="42" count="6" type="stmt"/>
|
|
84
|
-
</file>
|
|
85
|
-
<file name="Select.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/Select.tsx">
|
|
86
|
-
<metrics statements="11" coveredstatements="10" conditionals="7" coveredconditionals="4" methods="1" coveredmethods="1"/>
|
|
87
|
-
<line num="1" count="4" type="stmt"/>
|
|
88
|
-
<line num="2" count="4" type="stmt"/>
|
|
89
|
-
<line num="3" count="4" type="stmt"/>
|
|
90
|
-
<line num="7" count="4" type="stmt"/>
|
|
91
|
-
<line num="9" count="2" type="stmt"/>
|
|
92
|
-
<line num="10" count="2" type="stmt"/>
|
|
93
|
-
<line num="11" count="2" type="cond" truecount="0" falsecount="1"/>
|
|
94
|
-
<line num="12" count="0" type="stmt"/>
|
|
95
|
-
<line num="15" count="2" type="cond" truecount="1" falsecount="1"/>
|
|
96
|
-
<line num="17" count="2" type="stmt"/>
|
|
97
|
-
<line num="32" count="2" type="stmt"/>
|
|
98
|
-
</file>
|
|
99
|
-
<file name="Text.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/Text.tsx">
|
|
100
|
-
<metrics statements="11" coveredstatements="11" conditionals="7" coveredconditionals="6" methods="1" coveredmethods="1"/>
|
|
101
|
-
<line num="1" count="4" type="stmt"/>
|
|
102
|
-
<line num="2" count="4" type="stmt"/>
|
|
103
|
-
<line num="3" count="4" type="stmt"/>
|
|
104
|
-
<line num="7" count="4" type="stmt"/>
|
|
105
|
-
<line num="9" count="8" type="stmt"/>
|
|
106
|
-
<line num="10" count="8" type="stmt"/>
|
|
107
|
-
<line num="11" count="8" type="cond" truecount="1" falsecount="0"/>
|
|
108
|
-
<line num="12" count="2" type="stmt"/>
|
|
109
|
-
<line num="15" count="8" type="cond" truecount="2" falsecount="0"/>
|
|
110
|
-
<line num="17" count="8" type="stmt"/>
|
|
111
|
-
<line num="32" count="8" type="stmt"/>
|
|
112
|
-
</file>
|
|
113
|
-
<file name="Textarea.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/Textarea.tsx">
|
|
114
|
-
<metrics statements="11" coveredstatements="10" conditionals="7" coveredconditionals="4" methods="1" coveredmethods="1"/>
|
|
115
|
-
<line num="1" count="4" type="stmt"/>
|
|
116
|
-
<line num="2" count="4" type="stmt"/>
|
|
117
|
-
<line num="3" count="4" type="stmt"/>
|
|
118
|
-
<line num="8" count="4" type="stmt"/>
|
|
119
|
-
<line num="10" count="2" type="stmt"/>
|
|
120
|
-
<line num="12" count="2" type="stmt"/>
|
|
121
|
-
<line num="13" count="2" type="cond" truecount="0" falsecount="1"/>
|
|
122
|
-
<line num="14" count="0" type="stmt"/>
|
|
123
|
-
<line num="17" count="2" type="cond" truecount="1" falsecount="1"/>
|
|
124
|
-
<line num="19" count="2" type="stmt"/>
|
|
125
|
-
<line num="34" count="2" type="stmt"/>
|
|
126
|
-
</file>
|
|
127
|
-
<file name="context.ts" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/context.ts">
|
|
128
|
-
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
129
|
-
<line num="1" count="4" type="stmt"/>
|
|
130
|
-
<line num="12" count="4" type="stmt"/>
|
|
131
|
-
</file>
|
|
132
|
-
<file name="index.ts" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/index.ts">
|
|
133
|
-
<metrics statements="7" coveredstatements="7" conditionals="0" coveredconditionals="0" methods="7" coveredmethods="6"/>
|
|
134
|
-
<line num="1" count="4" type="stmt"/>
|
|
135
|
-
<line num="2" count="10" type="stmt"/>
|
|
136
|
-
<line num="3" count="6" type="stmt"/>
|
|
137
|
-
<line num="4" count="12" type="stmt"/>
|
|
138
|
-
<line num="5" count="6" type="stmt"/>
|
|
139
|
-
<line num="6" count="21" type="stmt"/>
|
|
140
|
-
<line num="7" count="15" type="stmt"/>
|
|
141
|
-
</file>
|
|
142
|
-
</package>
|
|
143
|
-
<package name="src.components.controlled">
|
|
144
|
-
<metrics statements="37" coveredstatements="25" conditionals="0" coveredconditionals="0" methods="12" coveredmethods="0"/>
|
|
145
|
-
<file name="CheckboxGroup.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/controlled/CheckboxGroup.tsx">
|
|
146
|
-
<metrics statements="7" coveredstatements="4" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="0"/>
|
|
147
|
-
<line num="1" count="4" type="stmt"/>
|
|
148
|
-
<line num="2" count="4" type="stmt"/>
|
|
149
|
-
<line num="3" count="4" type="stmt"/>
|
|
150
|
-
<line num="17" count="4" type="stmt"/>
|
|
151
|
-
<line num="31" count="0" type="stmt"/>
|
|
152
|
-
<line num="33" count="0" type="stmt"/>
|
|
153
|
-
<line num="45" count="0" type="stmt"/>
|
|
154
|
-
</file>
|
|
155
|
-
<file name="RadioGroup.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/controlled/RadioGroup.tsx">
|
|
156
|
-
<metrics statements="7" coveredstatements="4" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="0"/>
|
|
157
|
-
<line num="1" count="4" type="stmt"/>
|
|
158
|
-
<line num="2" count="4" type="stmt"/>
|
|
159
|
-
<line num="3" count="4" type="stmt"/>
|
|
160
|
-
<line num="18" count="4" type="stmt"/>
|
|
161
|
-
<line num="33" count="0" type="stmt"/>
|
|
162
|
-
<line num="35" count="0" type="stmt"/>
|
|
163
|
-
<line num="47" count="0" type="stmt"/>
|
|
164
|
-
</file>
|
|
165
|
-
<file name="SelectControl.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/controlled/SelectControl.tsx">
|
|
166
|
-
<metrics statements="6" coveredstatements="4" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
167
|
-
<line num="1" count="4" type="stmt"/>
|
|
168
|
-
<line num="2" count="4" type="stmt"/>
|
|
169
|
-
<line num="3" count="4" type="stmt"/>
|
|
170
|
-
<line num="14" count="4" type="stmt"/>
|
|
171
|
-
<line num="26" count="0" type="stmt"/>
|
|
172
|
-
<line num="28" count="0" type="stmt"/>
|
|
173
|
-
</file>
|
|
174
|
-
<file name="TextControl.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/controlled/TextControl.tsx">
|
|
175
|
-
<metrics statements="6" coveredstatements="4" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
176
|
-
<line num="1" count="4" type="stmt"/>
|
|
177
|
-
<line num="2" count="4" type="stmt"/>
|
|
178
|
-
<line num="3" count="4" type="stmt"/>
|
|
179
|
-
<line num="14" count="4" type="stmt"/>
|
|
180
|
-
<line num="24" count="0" type="stmt"/>
|
|
181
|
-
<line num="26" count="0" type="stmt"/>
|
|
182
|
-
</file>
|
|
183
|
-
<file name="TextareaControl.tsx" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/controlled/TextareaControl.tsx">
|
|
184
|
-
<metrics statements="6" coveredstatements="4" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
185
|
-
<line num="1" count="4" type="stmt"/>
|
|
186
|
-
<line num="2" count="4" type="stmt"/>
|
|
187
|
-
<line num="3" count="4" type="stmt"/>
|
|
188
|
-
<line num="14" count="4" type="stmt"/>
|
|
189
|
-
<line num="26" count="0" type="stmt"/>
|
|
190
|
-
<line num="28" count="0" type="stmt"/>
|
|
191
|
-
</file>
|
|
192
|
-
<file name="index.ts" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/components/controlled/index.ts">
|
|
193
|
-
<metrics statements="5" coveredstatements="5" conditionals="0" coveredconditionals="0" methods="5" coveredmethods="0"/>
|
|
194
|
-
<line num="1" count="4" type="stmt"/>
|
|
195
|
-
<line num="2" count="4" type="stmt"/>
|
|
196
|
-
<line num="3" count="4" type="stmt"/>
|
|
197
|
-
<line num="4" count="4" type="stmt"/>
|
|
198
|
-
<line num="5" count="4" type="stmt"/>
|
|
199
|
-
</file>
|
|
200
|
-
</package>
|
|
201
|
-
<package name="src.utils">
|
|
202
|
-
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
|
|
203
|
-
<file name="index.ts" path="/Users/t.fujita/Documents/Repos/sakura-ui/packages/forms/src/utils/index.ts">
|
|
204
|
-
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
|
|
205
|
-
<line num="1" count="89" type="stmt"/>
|
|
206
|
-
</file>
|
|
207
|
-
</package>
|
|
208
|
-
</project>
|
|
209
|
-
</coverage>
|