@sakura-ui/sakura-ui 0.1.17 → 0.1.20
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 -28
- package/packages/config/src/index.ts +58 -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 -45
- package/packages/core/src/components/Card.tsx +27 -12
- package/packages/core/src/components/Icon.tsx +13 -4
- package/packages/core/src/components/Link.tsx +4 -13
- package/packages/core/src/components/Table.tsx +3 -2
- package/packages/core/src/components/buttonStyle.ts +2 -1
- package/packages/core/src/components/index.ts +2 -1
- package/packages/core/src/index.ts +2 -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 +1 -1
- package/packages/forms/dist/components/Checkbox.js.map +1 -1
- package/packages/forms/dist/components/FileInput.js +6 -2
- package/packages/forms/dist/components/FileInput.js.map +1 -1
- package/packages/forms/dist/components/Input.js +15 -14
- package/packages/forms/dist/components/Input.js.map +1 -1
- package/packages/forms/dist/components/Radio.js +1 -1
- package/packages/forms/dist/components/Radio.js.map +1 -1
- package/packages/forms/dist/components/Select.js +27 -26
- package/packages/forms/dist/components/Select.js.map +1 -1
- package/packages/forms/dist/components/Textarea.js +15 -14
- package/packages/forms/dist/components/Textarea.js.map +1 -1
- package/packages/forms/dist/index.cjs.js +73 -63
- package/packages/forms/dist/index.es.js +270 -261
- 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.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.map +1 -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 -32
- package/packages/forms/src/components/Checkbox.tsx +1 -0
- package/packages/forms/src/components/FileInput.tsx +7 -10
- package/packages/forms/src/components/Input.tsx +16 -15
- package/packages/forms/src/components/Radio.tsx +1 -0
- package/packages/forms/src/components/Select.tsx +28 -27
- package/packages/forms/src/components/Textarea.tsx +16 -14
- 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/FileInput.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.map +0 -1
- package/packages/forms/dist/index.cjs.js.map +0 -1
- 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/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}/FileInput.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/{components → types/components}/index.d.ts +0 -0
- /package/packages/forms/dist/{index.d.ts → types/index.d.ts} +0 -0
- /package/packages/forms/dist/{utils → types/utils}/class.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../src/components/FileInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAI7C,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CACvC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;IACzC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC/C,IAAI,GAAG,CAAC,UAAU,EAAE;QAClB,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAA;KAC1B;IAED,MAAM,
|
|
1
|
+
{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../src/components/FileInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAI7C,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CACvC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;IACzC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC/C,IAAI,GAAG,CAAC,UAAU,EAAE;QAClB,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAA;KAC1B;IAED,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;KAgBZ,CAAA;IAED,MAAM,SAAS,GAAG;;;;;;;;;KASjB,CAAA;IACD,MAAM,OAAO,GAAG;;;;KAIf,CAAA;IACD,MAAM,UAAU,GAAG;;;;;;;;KAQlB,CAAA;IAED,OAAO,CACL,gBACE,IAAI,EAAC,MAAM,EACX,EAAE,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,EAC1B,SAAS,EAAE,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,sBAC5C,GAAG,CAAC,YAAY,uBACf,GAAG,CAAC,cAAc,kBACvB,GAAG,CAAC,SAAS,IAAI,KAAK,mBACrB,GAAG,CAAC,UAAU,IAAI,KAAK,EACtC,GAAG,EAAE,GAAG,KACJ,SAAS,GACb,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA"}
|
|
@@ -8,21 +8,22 @@ export const Input = React.forwardRef((props, ref) => {
|
|
|
8
8
|
if (ctx.isRequired) {
|
|
9
9
|
restProps.required = true;
|
|
10
10
|
}
|
|
11
|
-
const invalidStyle = ctx.isInvalid ? 'border-sun-800' : 'border-sumi-900';
|
|
12
11
|
const style = `
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
p-4
|
|
13
|
+
rounded-lg
|
|
14
|
+
border
|
|
15
|
+
border-solid
|
|
16
|
+
border-sumi-900
|
|
17
|
+
outline-offset-2
|
|
18
|
+
focus:outline
|
|
19
|
+
focus:outline-2
|
|
20
|
+
focus:outline-wood-500
|
|
21
|
+
disabled:bg-transparent
|
|
22
|
+
disabled:text-sumi-500
|
|
23
|
+
disabled:border-sumi-500
|
|
24
|
+
aria-invalid:border-sun-800
|
|
25
|
+
`;
|
|
26
|
+
return (_jsx("input", { type: "text", id: restProps.id ?? ctx.id, className: cx(style, className), "aria-describedby": ctx.helperTextId, "aria-errormessage": ctx.errorMessageId, "aria-invalid": ctx.isInvalid ?? false, "aria-required": ctx.isRequired ?? false, ref: ref, ...restProps }));
|
|
26
27
|
});
|
|
27
28
|
Input.displayName = 'Input';
|
|
28
29
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAI7C,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CACnC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;IACzC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC/C,IAAI,GAAG,CAAC,UAAU,EAAE;QAClB,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAA;KAC1B;IAED,MAAM,
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAI7C,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CACnC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;IACzC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC/C,IAAI,GAAG,CAAC,UAAU,EAAE;QAClB,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAA;KAC1B;IAED,MAAM,KAAK,GAAG;;;;;;;;;;;;;;KAcb,CAAA;IAED,OAAO,CACL,gBACE,IAAI,EAAC,MAAM,EACX,EAAE,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,EAC1B,SAAS,EAAE,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,sBACb,GAAG,CAAC,YAAY,uBACf,GAAG,CAAC,cAAc,kBACvB,GAAG,CAAC,SAAS,IAAI,KAAK,mBACrB,GAAG,CAAC,UAAU,IAAI,KAAK,EACtC,GAAG,EAAE,GAAG,KACJ,SAAS,GACb,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA"}
|
|
@@ -39,7 +39,7 @@ export const Radio = React.forwardRef((props, ref) => {
|
|
|
39
39
|
peer-focus-visible:ring-offset-2
|
|
40
40
|
peer-focus-visible:ring-wood-500
|
|
41
41
|
`;
|
|
42
|
-
return (_jsx("label", { htmlFor: newProps.id, className: cx(style, className), children: _jsxs("span", { className: "flex items-center", children: [_jsx("input", { className: styleInput, type: "radio", "aria-describedby": ctx.helperTextId, "aria-errormessage": ctx.errorMessageId, "aria-invalid": ctx.isInvalid ?? false, ...newProps, ref: ref }), _jsx("span", { className: styleRadio }), _jsx("span", { className: "peer-disabled:text-sumi-500", children: children })] }) }));
|
|
42
|
+
return (_jsx("label", { htmlFor: newProps.id, className: cx(style, className), children: _jsxs("span", { className: "flex items-center", children: [_jsx("input", { className: styleInput, type: "radio", "aria-describedby": ctx.helperTextId, "aria-errormessage": ctx.errorMessageId, "aria-invalid": ctx.isInvalid ?? false, "aria-required": ctx.isRequired ?? false, ...newProps, ref: ref }), _jsx("span", { className: styleRadio }), _jsx("span", { className: "peer-disabled:text-sumi-500", children: children })] }) }));
|
|
43
43
|
});
|
|
44
44
|
Radio.displayName = 'Radio';
|
|
45
45
|
//# sourceMappingURL=Radio.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../src/components/Radio.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAI7C,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CACnC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAA;IAClD,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC/C,IAAI,GAAG,CAAC,UAAU,EAAE;QAClB,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAA;KACzB;IACD,IAAI,GAAG,CAAC,SAAS,EAAE;QACjB,QAAQ,CAAC,IAAI,GAAG,GAAG,CAAC,SAAS,CAAA;KAC9B;IAED,MAAM,KAAK,GAAG;;;;;;KAMb,CAAA;IAED,MAAM,UAAU,GAAG;;;KAGlB,CA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YAC1D,gBAAM,SAAS,EAAC,mBAAmB,aACjC,gBACE,SAAS,EAAE,UAAU,EACrB,IAAI,EAAC,OAAO,sBACM,GAAG,CAAC,YAAY,uBACf,GAAG,CAAC,cAAc,kBACvB,GAAG,CAAC,SAAS,IAAI,KAAK,mBACrB,GAAG,CAAC,UAAU,IAAI,KAAK,KAClC,QAAQ,EACZ,GAAG,EAAE,GAAG,GACR,EACF,eAAM,SAAS,EAAE,UAAU,GAAS,EACpC,eAAM,SAAS,EAAC,6BAA6B,YAAE,QAAQ,GAAQ,IAC1D,GACD,CACT,CAAA;AACH,CAAC,CACF,CAAA;AAED,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA"}
|
|
@@ -8,33 +8,34 @@ export const Select = React.forwardRef((props, ref) => {
|
|
|
8
8
|
if (ctx.isRequired) {
|
|
9
9
|
restProps.required = true;
|
|
10
10
|
}
|
|
11
|
-
const invalidStyle = ctx.isInvalid ? 'border-sun-800' : 'border-sumi-900';
|
|
12
11
|
const style = `
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
12
|
+
peer
|
|
13
|
+
cursor-pointer
|
|
14
|
+
appearance-none
|
|
15
|
+
text-base
|
|
16
|
+
w-full
|
|
17
|
+
bg-white-100
|
|
18
|
+
border
|
|
19
|
+
border-solid
|
|
20
|
+
border-sumi-900
|
|
21
|
+
py-4 px-4 pr-8
|
|
22
|
+
rounded-[8px]
|
|
23
|
+
outline-offset-2
|
|
24
|
+
focus:outline
|
|
25
|
+
focus:outline-2
|
|
26
|
+
focus:outline-wood-500
|
|
27
|
+
disabled:bg-transparent
|
|
28
|
+
disabled:text-sumi-500
|
|
29
|
+
disabled:border-sumi-500
|
|
30
|
+
aria-invalid:border-sun-800
|
|
31
|
+
`;
|
|
31
32
|
const styleArrow = `
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return (_jsxs("label", { className: "inline-block relative", children: [_jsx("select", { id: restProps.id ?? ctx.id, className: cx(style,
|
|
33
|
+
flex items-center
|
|
34
|
+
absolute inset-y-0 right-0
|
|
35
|
+
px-2
|
|
36
|
+
pointer-events-none
|
|
37
|
+
peer-disabled:fill-sumi-500
|
|
38
|
+
`;
|
|
39
|
+
return (_jsxs("label", { className: "inline-block relative", children: [_jsx("select", { id: restProps.id ?? ctx.id, className: cx(style, props.className), "aria-describedby": ctx.helperTextId, "aria-errormessage": ctx.errorMessageId, "aria-invalid": ctx.isInvalid ?? false, "aria-required": ctx.isRequired ?? false, ...restProps, ref: ref, children: children }), _jsx("span", { className: styleArrow, children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", width: "24", children: _jsx("path", { d: "M12 15.05 6.35 9.4 7.4 8.35l4.6 4.6 4.6-4.6 1.05 1.05Z" }) }) })] }));
|
|
39
40
|
});
|
|
40
41
|
//# sourceMappingURL=Select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../src/components/Select.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAI7C,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CACpC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;IACnD,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC/C,I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D,GAAG,GAC/D,GACD,IACD,CACT,CAAA;AACH,CAAC,CACF,CAAA"}
|
|
@@ -14,22 +14,23 @@ export const Textarea = React.forwardRef((props, ref) => {
|
|
|
14
14
|
if (ctx.isRequired) {
|
|
15
15
|
restProps.required = true;
|
|
16
16
|
}
|
|
17
|
-
const invalidStyle = ctx.isInvalid ? 'border-sun-800' : 'border-sumi-900';
|
|
18
17
|
const overtextStyle = count > (maxLength || 0) ? 'text-sun-800' : 'text-sumi-700';
|
|
19
18
|
const style = `
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
p-4
|
|
20
|
+
rounded-lg
|
|
21
|
+
border
|
|
22
|
+
border-solid
|
|
23
|
+
border-sumi-900
|
|
24
|
+
outline-offset-2
|
|
25
|
+
focus:outline
|
|
26
|
+
focus:outline-2
|
|
27
|
+
focus:outline-wood-500
|
|
28
|
+
disabled:bg-transparent
|
|
29
|
+
disabled:text-sumi-500
|
|
30
|
+
disabled:border-sumi-500
|
|
31
|
+
aria-invalid:border-sun-800
|
|
32
|
+
`;
|
|
33
|
+
return (_jsxs(_Fragment, { children: [_jsx("textarea", { id: restProps.id ?? ctx.id, className: cx(style, className), "aria-describedby": ctx.helperTextId, "aria-errormessage": ctx.errorMessageId, "aria-invalid": ctx.isInvalid ?? false, "aria-required": ctx.isRequired ?? false, onChange: onChangeHandler, ...restProps, ref: ref, children: children }), maxLength ? (_jsxs("p", { className: "text-sup text-sumi-700", children: [_jsx("span", { className: overtextStyle, children: count }), "/", _jsx("span", { children: maxLength })] })) : ('')] }));
|
|
33
34
|
});
|
|
34
35
|
Textarea.displayName = 'Textarea';
|
|
35
36
|
//# sourceMappingURL=Textarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../src/components/Textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAK7C,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACtC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;IAExE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;IAE3C,MAAM,eAAe,GAAG,CAAC,CAAyC,EAAE,EAAE;QACpE,IAAI,QAAQ;YAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;QAEzB,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACjC,CAAC,CAAA;IAED,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC/C,IAAI,GAAG,CAAC,UAAU,EAAE;QAClB,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAA;KAC1B;IAED,MAAM,
|
|
1
|
+
{"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../src/components/Textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAK7C,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACtC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,SAA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G,UAAU,CAAA"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Se;function Rr(){if(Se)return W;Se=1;var f=g,m=Symbol.for("react.element"),
|
|
9
|
+
*/var Se;function Rr(){if(Se)return W;Se=1;var f=g,m=Symbol.for("react.element"),v=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function b(c,o,T){var h,y={},j=null,_=null;T!==void 0&&(j=""+T),o.key!==void 0&&(j=""+o.key),o.ref!==void 0&&(_=o.ref);for(h in o)u.call(o,h)&&!a.hasOwnProperty(h)&&(y[h]=o[h]);if(c&&c.defaultProps)for(h in o=c.defaultProps,o)y[h]===void 0&&(y[h]=o[h]);return{$$typeof:m,type:c,key:j,ref:_,props:y,_owner:n.current}}return W.Fragment=v,W.jsx=b,W.jsxs=b,W}var L={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Oe;function Er(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&function(){var f=g,m=Symbol.for("react.element"),
|
|
18
|
-
`+K+e}}var X=!1,V;{var Ze=typeof WeakMap=="function"?WeakMap:Map;V=new Ze}function he(e,r){if(!e||X)return"";{var t=V.get(e);if(t!==void 0)return t}var i;X=!0;var
|
|
17
|
+
*/var Oe;function Er(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&function(){var f=g,m=Symbol.for("react.element"),v=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),c=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),F=Symbol.iterator,We="@@iterator";function Le(e){if(e===null||typeof e!="object")return null;var r=F&&e[F]||e[We];return typeof r=="function"?r:null}var q=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),i=1;i<r;i++)t[i-1]=arguments[i];Ye("error",e,t)}}function Ye(e,r,t){{var i=q.ReactDebugCurrentFrame,p=i.getStackAddendum();p!==""&&(r+="%s",t=t.concat([p]));var x=t.map(function(d){return String(d)});x.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,x)}}var Ve=!1,Ue=!1,Ge=!1,Be=!1,Je=!1,oe;oe=Symbol.for("react.module.reference");function ze(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===a||Je||e===n||e===T||e===h||Be||e===_||Ve||Ue||Ge||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===y||e.$$typeof===b||e.$$typeof===c||e.$$typeof===o||e.$$typeof===oe||e.getModuleId!==void 0))}function He(e,r,t){var i=e.displayName;if(i)return i;var p=r.displayName||r.name||"";return p!==""?t+"("+p+")":t}function le(e){return e.displayName||"Context"}function I(e){if(e==null)return null;if(typeof e.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case u:return"Fragment";case v:return"Portal";case a:return"Profiler";case n:return"StrictMode";case T:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c:var r=e;return le(r)+".Consumer";case b:var t=e;return le(t._context)+".Provider";case o:return He(e,e.render,"ForwardRef");case y:var i=e.displayName||null;return i!==null?i:I(e.type)||"Memo";case j:{var p=e,x=p._payload,d=p._init;try{return I(d(x))}catch{return null}}}return null}var k=Object.assign,A=0,ue,ce,de,fe,pe,ve,me;function be(){}be.__reactDisabledLog=!0;function Ke(){{if(A===0){ue=console.log,ce=console.info,de=console.warn,fe=console.error,pe=console.group,ve=console.groupCollapsed,me=console.groupEnd;var e={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}A++}}function Xe(){{if(A--,A===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},e,{value:ue}),info:k({},e,{value:ce}),warn:k({},e,{value:de}),error:k({},e,{value:fe}),group:k({},e,{value:pe}),groupCollapsed:k({},e,{value:ve}),groupEnd:k({},e,{value:me})})}A<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var H=q.ReactCurrentDispatcher,K;function Y(e,r,t){{if(K===void 0)try{throw Error()}catch(p){var i=p.stack.trim().match(/\n( *(at )?)/);K=i&&i[1]||""}return`
|
|
18
|
+
`+K+e}}var X=!1,V;{var Ze=typeof WeakMap=="function"?WeakMap:Map;V=new Ze}function he(e,r){if(!e||X)return"";{var t=V.get(e);if(t!==void 0)return t}var i;X=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x;x=H.current,H.current=null,Ke();try{if(r){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(S){i=S}Reflect.construct(e,[],d)}else{try{d.call()}catch(S){i=S}e.call(d.prototype)}}else{try{throw Error()}catch(S){i=S}e()}}catch(S){if(S&&i&&typeof S.stack=="string"){for(var l=S.stack.split(`
|
|
19
19
|
`),C=i.stack.split(`
|
|
20
|
-
`),R=l.length-1,E=C.length-1;R>=1&&E>=0&&l[R]!==C[E];)E--;for(;R>=1&&E>=0;R--,E--)if(l[R]!==C[E]){if(R!==1||E!==1)do if(R--,E--,E<0||l[R]!==C[E]){var
|
|
21
|
-
`+l[R].replace(" at new "," at ");return e.displayName&&
|
|
20
|
+
`),R=l.length-1,E=C.length-1;R>=1&&E>=0&&l[R]!==C[E];)E--;for(;R>=1&&E>=0;R--,E--)if(l[R]!==C[E]){if(R!==1||E!==1)do if(R--,E--,E<0||l[R]!==C[E]){var P=`
|
|
21
|
+
`+l[R].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,P),P}while(R>=1&&E>=0);break}}}finally{X=!1,H.current=x,Xe(),Error.prepareStackTrace=p}var M=e?e.displayName||e.name:"",Ie=M?Y(M):"";return typeof e=="function"&&V.set(e,Ie),Ie}function Qe(e,r,t){return he(e,!1)}function er(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return he(e,er(e));if(typeof e=="string")return Y(e);switch(e){case T:return Y("Suspense");case h:return Y("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case o:return Qe(e.render);case y:return U(e.type,r,t);case j:{var i=e,p=i._payload,x=i._init;try{return U(x(p),r,t)}catch{}}}return""}var G=Object.prototype.hasOwnProperty,xe={},ge=q.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);ge.setExtraStackFrame(t)}else ge.setExtraStackFrame(null)}function rr(e,r,t,i,p){{var x=Function.call.bind(G);for(var d in e)if(x(e,d)){var l=void 0;try{if(typeof e[d]!="function"){var C=Error((i||"React class")+": "+t+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}l=e[d](r,d,i,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){l=R}l&&!(l instanceof Error)&&(B(p),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",i||"React class",t,d,typeof l),B(null)),l instanceof Error&&!(l.message in xe)&&(xe[l.message]=!0,B(p),w("Failed %s type: %s",t,l.message),B(null))}}}var tr=Array.isArray;function Z(e){return tr(e)}function ar(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function nr(e){try{return ye(e),!1}catch{return!0}}function ye(e){return""+e}function Re(e){if(nr(e))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ar(e)),ye(e)}var $=q.ReactCurrentOwner,sr={key:!0,ref:!0,__self:!0,__source:!0},Ee,_e,Q;Q={};function ir(e){if(G.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function or(e){if(G.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function lr(e,r){if(typeof e.ref=="string"&&$.current&&r&&$.current.stateNode!==r){var t=I($.current.type);Q[t]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I($.current.type),e.ref),Q[t]=!0)}}function ur(e,r){{var t=function(){Ee||(Ee=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function cr(e,r){{var t=function(){_e||(_e=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var dr=function(e,r,t,i,p,x,d){var l={$$typeof:m,type:e,key:r,ref:t,props:d,_owner:x};return l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function fr(e,r,t,i,p){{var x,d={},l=null,C=null;t!==void 0&&(Re(t),l=""+t),or(r)&&(Re(r.key),l=""+r.key),ir(r)&&(C=r.ref,lr(r,p));for(x in r)G.call(r,x)&&!sr.hasOwnProperty(x)&&(d[x]=r[x]);if(e&&e.defaultProps){var R=e.defaultProps;for(x in R)d[x]===void 0&&(d[x]=R[x])}if(l||C){var E=typeof e=="function"?e.displayName||e.name||"Unknown":e;l&&ur(d,E),C&&cr(d,E)}return dr(e,l,C,p,i,$.current,d)}}var ee=q.ReactCurrentOwner,Te=q.ReactDebugCurrentFrame;function D(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(t)}else Te.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===m}function je(){{if(ee.current){var e=I(ee.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function pr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+r+":"+t+"."}return""}}var we={};function vr(e){{var r=je();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=vr(r);if(we[t])return;we[t]=!0;var i="";e&&e._owner&&e._owner!==ee.current&&(i=" It was passed a child from "+
|
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=vr(r);if(we[t])return;we[t]=!0;var i="";e&&e._owner&&e._owner!==ee.current&&(i=" It was passed a child from "+I(e._owner.type)+"."),D(e),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,i),D(null)}}function Ne(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t<e.length;t++){var i=e[t];te(i)&&Ce(i,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var p=Le(e);if(typeof p=="function"&&p!==e.entries)for(var x=p.call(e),d;!(d=x.next()).done;)te(d.value)&&Ce(d.value,r)}}}function mr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===o||r.$$typeof===y))t=r.propTypes;else return;if(t){var i=I(r);rr(t,e.props,"prop",i,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var p=I(r);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function br(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var i=r[t];if(i!=="children"&&i!=="key"){D(e),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",i),D(null);break}}e.ref!==null&&(D(e),w("Invalid attribute `ref` supplied to `React.Fragment`."),D(null))}}function Pe(e,r,t,i,p,x){{var d=ze(e);if(!d){var l="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var C=pr(p);C?l+=C:l+=je();var R;e===null?R="null":Z(e)?R="array":e!==void 0&&e.$$typeof===m?(R="<"+(I(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,l)}var E=fr(e,r,t,p,x);if(E==null)return E;if(d){var P=r.children;if(P!==void 0)if(i)if(Z(P)){for(var M=0;M<P.length;M++)Ne(P[M],e);Object.freeze&&Object.freeze(P)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ne(P,e)}return e===u?br(E):mr(E),E}}function hr(e,r,t){return Pe(e,r,t,!0)}function xr(e,r,t){return Pe(e,r,t,!1)}var gr=xr,yr=hr;L.Fragment=u,L.jsx=gr,L.jsxs=yr}()),L}process.env.NODE_ENV==="production"?ae.exports=Rr():ae.exports=Er();var s=ae.exports;const N=(...f)=>f.filter(Boolean).join(" "),O=g.createContext({helperTextId:"",errorMessageId:"",isInvalid:!1,isRequired:!1}),ne=g.forwardRef((f,m)=>{const{className:v,children:u,...n}=f,a=g.useContext(O);a.isRequired&&(n.required=!0),a.groupName&&(n.name=a.groupName);const b=`
|
|
28
28
|
inline-block
|
|
29
29
|
text-base
|
|
30
30
|
cursor-pointer
|
|
@@ -50,7 +50,7 @@ Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(
|
|
|
50
50
|
peer-focus-visible:ring-2
|
|
51
51
|
peer-focus-visible:ring-offset-2
|
|
52
52
|
peer-focus-visible:ring-wood-500
|
|
53
|
-
`;return s.jsx("label",{htmlFor:n.id,className:
|
|
53
|
+
`;return s.jsx("label",{htmlFor:n.id,className:N(b,v),children:s.jsxs("span",{className:"flex items-center",children:[s.jsx("input",{className:c,type:"checkbox","aria-describedby":a.helperTextId,"aria-errormessage":a.errorMessageId,"aria-invalid":a.isInvalid??!1,"aria-required":a.isRequired??!1,...n,ref:m}),s.jsx("span",{className:o,children:s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",children:s.jsx("path",{d:"m9.55 17.65-5.325-5.325 1.05-1.075 4.275 4.275 9.175-9.175 1.05 1.075Z"})})}),s.jsx("span",{className:"peer-disabled:text-sumi-500",children:u})]})})});ne.displayName="Checkbox";const se=g.forwardRef((f,m)=>{const{className:v,children:u,...n}=f,a=g.useContext(O);a.isRequired&&(n.required=!0),a.groupName&&(n.name=a.groupName);const b=`
|
|
54
54
|
inline-block
|
|
55
55
|
text-base
|
|
56
56
|
cursor-pointer
|
|
@@ -75,35 +75,40 @@ Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(
|
|
|
75
75
|
peer-focus-visible:ring-2
|
|
76
76
|
peer-focus-visible:ring-offset-2
|
|
77
77
|
peer-focus-visible:ring-wood-500
|
|
78
|
-
`;return s.jsx("label",{htmlFor:n.id,className:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
78
|
+
`;return s.jsx("label",{htmlFor:n.id,className:N(b,v),children:s.jsxs("span",{className:"flex items-center",children:[s.jsx("input",{className:c,type:"radio","aria-describedby":a.helperTextId,"aria-errormessage":a.errorMessageId,"aria-invalid":a.isInvalid??!1,"aria-required":a.isRequired??!1,...n,ref:m}),s.jsx("span",{className:o}),s.jsx("span",{className:"peer-disabled:text-sumi-500",children:u})]})})});se.displayName="Radio";const ke=g.forwardRef((f,m)=>{const{className:v,children:u,...n}=f,a=g.useContext(O);a.isRequired&&(n.required=!0);const b=`
|
|
79
|
+
peer
|
|
80
|
+
cursor-pointer
|
|
81
|
+
appearance-none
|
|
82
|
+
text-base
|
|
83
|
+
w-full
|
|
84
|
+
bg-white-100
|
|
85
|
+
border
|
|
86
|
+
border-solid
|
|
87
|
+
border-sumi-900
|
|
88
|
+
py-4 px-4 pr-8
|
|
89
|
+
rounded-[8px]
|
|
90
|
+
outline-offset-2
|
|
91
|
+
focus:outline
|
|
92
|
+
focus:outline-2
|
|
93
|
+
focus:outline-wood-500
|
|
94
|
+
disabled:bg-transparent
|
|
95
|
+
disabled:text-sumi-500
|
|
96
|
+
disabled:border-sumi-500
|
|
97
|
+
aria-invalid:border-sun-800
|
|
98
|
+
`,c=`
|
|
99
|
+
flex items-center
|
|
100
|
+
absolute inset-y-0 right-0
|
|
101
|
+
px-2
|
|
102
|
+
pointer-events-none
|
|
103
|
+
peer-disabled:fill-sumi-500
|
|
104
|
+
`;return s.jsxs("label",{className:"inline-block relative",children:[s.jsx("select",{id:n.id??a.id,className:N(b,f.className),"aria-describedby":a.helperTextId,"aria-errormessage":a.errorMessageId,"aria-invalid":a.isInvalid??!1,"aria-required":a.isRequired??!1,...n,ref:m,children:u}),s.jsx("span",{className:c,children:s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",children:s.jsx("path",{d:"M12 15.05 6.35 9.4 7.4 8.35l4.6 4.6 4.6-4.6 1.05 1.05Z"})})})]})}),Fe=g.forwardRef((f,m)=>{const{className:v,...u}=f,n=g.useContext(O);n.isRequired&&(u.required=!0);const a=`
|
|
105
|
+
file:mr-2
|
|
103
106
|
file:inline-block
|
|
104
107
|
file:text-button
|
|
105
108
|
file:text-center
|
|
106
109
|
file:cursor-pointer
|
|
110
|
+
file:select-none
|
|
111
|
+
file:touch-manipulation
|
|
107
112
|
file:whitespace-nowrap
|
|
108
113
|
file:border
|
|
109
114
|
file:border-solid
|
|
@@ -112,7 +117,7 @@ Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(
|
|
|
112
117
|
file:hover:border-sea-900
|
|
113
118
|
file:disabled:border-sumi-500
|
|
114
119
|
file:disabled:cursor-not-allowed
|
|
115
|
-
`,
|
|
120
|
+
`,b=`
|
|
116
121
|
file:text-sea-800
|
|
117
122
|
file:bg-transparent
|
|
118
123
|
file:active:bg-sea-200
|
|
@@ -121,43 +126,48 @@ Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(
|
|
|
121
126
|
file:hover:text-sea-900
|
|
122
127
|
file:disabled:text-sumi-500
|
|
123
128
|
file:disabled:bg-transparent
|
|
124
|
-
`,
|
|
129
|
+
`,c=`
|
|
125
130
|
file:p-4
|
|
126
131
|
file:text-button
|
|
127
132
|
file:rounded-lg
|
|
128
|
-
`,
|
|
133
|
+
`,o=`
|
|
129
134
|
rounded-lg
|
|
130
135
|
outline-offset-2
|
|
136
|
+
text-sumi-900
|
|
131
137
|
focus:outline
|
|
132
138
|
focus:outline-2
|
|
133
139
|
focus:outline-wood-600
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
140
|
+
aria-invalid:text-sun-800
|
|
141
|
+
`;return s.jsx("input",{type:"file",id:u.id??n.id,className:N(a,b,c,o,v),"aria-describedby":n.helperTextId,"aria-errormessage":n.errorMessageId,"aria-invalid":n.isInvalid??!1,"aria-required":n.isRequired??!1,ref:m,...u})});Fe.displayName="FileInput";const qe=g.forwardRef((f,m)=>{const{className:v,...u}=f,n=g.useContext(O);n.isRequired&&(u.required=!0);const a=`
|
|
142
|
+
p-4
|
|
143
|
+
rounded-lg
|
|
144
|
+
border
|
|
145
|
+
border-solid
|
|
146
|
+
border-sumi-900
|
|
147
|
+
outline-offset-2
|
|
148
|
+
focus:outline
|
|
149
|
+
focus:outline-2
|
|
150
|
+
focus:outline-wood-500
|
|
151
|
+
disabled:bg-transparent
|
|
152
|
+
disabled:text-sumi-500
|
|
153
|
+
disabled:border-sumi-500
|
|
154
|
+
aria-invalid:border-sun-800
|
|
155
|
+
`;return s.jsx("input",{type:"text",id:u.id??n.id,className:N(a,v),"aria-describedby":n.helperTextId,"aria-errormessage":n.errorMessageId,"aria-invalid":n.isInvalid??!1,"aria-required":n.isRequired??!1,ref:m,...u})});qe.displayName="Input";const ie=g.forwardRef((f,m)=>{const{className:v,children:u,onChange:n,maxLength:a,...b}=f,[c,o]=g.useState(0),T=_=>{n&&n(_),o(_.target.value.length)},h=g.useContext(O);h.isRequired&&(b.required=!0);const y=c>(a||0)?"text-sun-800":"text-sumi-700",j=`
|
|
156
|
+
p-4
|
|
157
|
+
rounded-lg
|
|
158
|
+
border
|
|
159
|
+
border-solid
|
|
160
|
+
border-sumi-900
|
|
161
|
+
outline-offset-2
|
|
162
|
+
focus:outline
|
|
163
|
+
focus:outline-2
|
|
164
|
+
focus:outline-wood-500
|
|
165
|
+
disabled:bg-transparent
|
|
166
|
+
disabled:text-sumi-500
|
|
167
|
+
disabled:border-sumi-500
|
|
168
|
+
aria-invalid:border-sun-800
|
|
169
|
+
`;return s.jsxs(s.Fragment,{children:[s.jsx("textarea",{id:b.id??h.id,className:N(j,v),"aria-describedby":h.helperTextId,"aria-errormessage":h.errorMessageId,"aria-invalid":h.isInvalid??!1,"aria-required":h.isRequired??!1,onChange:T,...b,ref:m,children:u}),a?s.jsxs("p",{className:"text-sup text-sumi-700",children:[s.jsx("span",{className:y,children:c}),"/",s.jsx("span",{children:a})]}):""]})});ie.displayName="Textarea";const J=g.forwardRef((f,m)=>{const v=g.useId(),{labelText:u,className:n,helperText:a,errorMessage:b,isInvalid:c,isRequired:o,children:T,...h}=f,y={id:f.htmlFor??`input-${v}`,helperTextId:`helper-text-${v}`,errorMessageId:`error-message-${v}`,isInvalid:c??!1,isRequired:o??!1},j=`
|
|
159
170
|
text-sup text-sumi-700
|
|
160
|
-
`,
|
|
171
|
+
`,_=`
|
|
161
172
|
text-sup text-sun-800
|
|
162
|
-
`;return s.jsx(
|
|
163
|
-
//# sourceMappingURL=index.cjs.js.map
|
|
173
|
+
`;return s.jsx(O.Provider,{value:y,children:s.jsxs("div",{className:N("mb-4",n),children:[s.jsxs("label",{className:N("block mb-2 text-label",c&&"text-sun-800"),htmlFor:y.id,ref:m,...h,children:[u,o&&s.jsx("span",{className:"text-label text-sun-800",children:" *"})]}),a&&s.jsx("p",{id:y.helperTextId,className:N(j,"mb-2"),children:a}),T,c&&s.jsx("p",{id:y.errorMessageId,className:N(_,a?"mt-1":"mt-2"),children:b})]})})});J.displayName="LabelControl";const z=g.forwardRef((f,m)=>{const v=g.useId(),{labelText:u,className:n,helperText:a,errorMessage:b,isInvalid:c,isRequired:o,direction:T,children:h,...y}=f,_={groupName:y.name??`group-${v}`,helperTextId:`helper-text-${v}`,errorMessageId:`error-message-${v}`,isInvalid:c??!1,isRequired:o??!1},F=T??"flex-col";return s.jsx(O.Provider,{value:_,children:s.jsxs("fieldset",{className:N("mb-4",n),ref:m,...y,children:[s.jsx("legend",{children:s.jsxs("p",{className:N("block mb-2 text-label",c&&"text-sun-800"),children:[u,o&&s.jsx("span",{className:"text-sun-800",children:" *"})]})}),s.jsx("div",{className:N("inline-flex",F),children:h}),a&&s.jsx("p",{id:_.helperTextId,className:"text-sup text-sumi-700 mt-2",children:a}),c&&s.jsx("p",{id:_.errorMessageId,className:N("text-sup text-sun-800",a?"mt-1":"mt-2"),children:b})]})})});z.displayName="FieldsetControl";const De=g.forwardRef((f,m)=>{const{items:v,onChange:u,className:n,labelText:a,helperText:b,errorMessage:c,isInvalid:o,isRequired:T,...h}=f;return s.jsx(z,{className:n,labelText:a,helperText:b,errorMessage:c,isInvalid:o,isRequired:T,ref:m,...h,children:v.map(({label:y,value:j},_)=>s.jsx(ne,{value:j,onChange:u,children:y},_))})});De.displayName="CheckboxGroup";const Me=g.forwardRef((f,m)=>{const{items:v,onChange:u,className:n,labelText:a,helperText:b,errorMessage:c,isInvalid:o,isRequired:T,defaultValue:h,...y}=f;return s.jsx(z,{className:n,labelText:a,helperText:b,errorMessage:c,isInvalid:o,isRequired:T,ref:m,...y,children:v.map(({label:j,value:_},F)=>s.jsx(se,{value:_,onChange:u,defaultChecked:h===_,children:j},F))})});Me.displayName="RadioGroup";const Ae=g.forwardRef((f,m)=>{const{className:v,labelText:u,helperText:n,errorMessage:a,isInvalid:b,isRequired:c,...o}=f;return s.jsx(J,{className:v,labelText:u,helperText:n,errorMessage:a,isInvalid:b,isRequired:c,children:s.jsx(ke,{ref:m,...o})})});Ae.displayName="SelectControl";const $e=g.forwardRef((f,m)=>{const{className:v,labelText:u,helperText:n,errorMessage:a,isInvalid:b,isRequired:c,...o}=f;return s.jsx(J,{className:v,labelText:u,helperText:n,errorMessage:a,isInvalid:b,isRequired:c,children:s.jsx(ie,{ref:m,...o})})});$e.displayName="TextareaControl";exports.Checkbox=ne;exports.CheckboxGroup=De;exports.FieldsetControl=z;exports.FileInput=Fe;exports.Input=qe;exports.LabelControl=J;exports.Radio=se;exports.RadioGroup=Me;exports.Select=ke;exports.SelectControl=Ae;exports.Textarea=ie;exports.TextareaControl=$e;
|