@sakura-ui/forms 0.1.6 → 0.1.7
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/dist/components/FileInput.d.ts +5 -0
- package/dist/components/FileInput.d.ts.map +1 -0
- package/dist/components/FileInput.js +51 -0
- package/dist/components/FileInput.js.map +1 -0
- package/dist/components/LabelControl.d.ts.map +1 -1
- package/dist/components/LabelControl.js +7 -1
- package/dist/components/LabelControl.js.map +1 -1
- package/dist/components/index.d.ts +8 -7
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/index.cjs.js +51 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +348 -286
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FileInputProps extends React.ComponentPropsWithRef<'input'> {
|
|
3
|
+
}
|
|
4
|
+
export declare const FileInput: React.ForwardRefExoticComponent<Omit<FileInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
+
//# sourceMappingURL=FileInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../src/components/FileInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC;CAAG;AAE/E,eAAO,MAAM,SAAS,sGAoErB,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { cx } from '../utils/class';
|
|
4
|
+
import { ControllerContext } from './context';
|
|
5
|
+
export const FileInput = React.forwardRef((props, ref) => {
|
|
6
|
+
const { className, ...restProps } = props;
|
|
7
|
+
const ctx = React.useContext(ControllerContext);
|
|
8
|
+
if (ctx.isRequired) {
|
|
9
|
+
restProps.required = true;
|
|
10
|
+
}
|
|
11
|
+
const invalidStyle = ctx.isInvalid ? 'text-sun-800' : 'text-sumi-900';
|
|
12
|
+
const base = `
|
|
13
|
+
file:inline-block
|
|
14
|
+
file:text-button
|
|
15
|
+
file:text-center
|
|
16
|
+
file:cursor-pointer
|
|
17
|
+
file:whitespace-nowrap
|
|
18
|
+
file:border
|
|
19
|
+
file:border-solid
|
|
20
|
+
file:border-sea-800
|
|
21
|
+
file:active:border-sea-1200
|
|
22
|
+
file:hover:border-sea-900
|
|
23
|
+
file:disabled:border-sumi-500
|
|
24
|
+
file:disabled:cursor-not-allowed
|
|
25
|
+
`;
|
|
26
|
+
const secondary = `
|
|
27
|
+
file:text-sea-800
|
|
28
|
+
file:bg-transparent
|
|
29
|
+
file:active:bg-sea-200
|
|
30
|
+
file:hover:bg-sea-100
|
|
31
|
+
file:active:text-sea-1200
|
|
32
|
+
file:hover:text-sea-900
|
|
33
|
+
file:disabled:text-sumi-500
|
|
34
|
+
file:disabled:bg-transparent
|
|
35
|
+
`;
|
|
36
|
+
const styleLg = `
|
|
37
|
+
file:p-4
|
|
38
|
+
file:text-button
|
|
39
|
+
file:rounded-lg
|
|
40
|
+
`;
|
|
41
|
+
const styleInput = `
|
|
42
|
+
rounded-lg
|
|
43
|
+
outline-offset-2
|
|
44
|
+
focus:outline
|
|
45
|
+
focus:outline-2
|
|
46
|
+
focus:outline-wood-600
|
|
47
|
+
`;
|
|
48
|
+
return (_jsx("input", { type: "file", id: restProps.id ?? ctx.id, className: cx(base, secondary, styleLg, styleInput, invalidStyle, className), "aria-describedby": ctx.helperTextId, "aria-errormessage": ctx.errorMessageId, "aria-invalid": ctx.isInvalid ?? false, ref: ref, ...restProps }));
|
|
49
|
+
});
|
|
50
|
+
FileInput.displayName = 'FileInput';
|
|
51
|
+
//# sourceMappingURL=FileInput.js.map
|
|
@@ -0,0 +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,YAAY,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,CAAA;IAErE,MAAM,IAAI,GAAG;;;;;;;;;;;;;KAaZ,CAAA;IAED,MAAM,SAAS,GAAG;;;;;;;;;KASjB,CAAA;IACD,MAAM,OAAO,GAAG;;;;KAIf,CAAA;IACD,MAAM,UAAU,GAAG;;;;;;KAMlB,CAAA;IAED,OAAO,CACL,gBACE,IAAI,EAAC,MAAM,EACX,EAAE,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,EAC1B,SAAS,EAAE,EAAE,CACX,IAAI,EACJ,SAAS,EACT,OAAO,EACP,UAAU,EACV,YAAY,EACZ,SAAS,CACV,sBACiB,GAAG,CAAC,YAAY,uBACf,GAAG,CAAC,cAAc,kBACvB,GAAG,CAAC,SAAS,IAAI,KAAK,EACpC,GAAG,EAAE,GAAG,KACJ,SAAS,GACb,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelControl.d.ts","sourceRoot":"","sources":["../../src/components/LabelControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC;IAC5C,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"LabelControl.d.ts","sourceRoot":"","sources":["../../src/components/LabelControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC;IAC5C,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,eAAO,MAAM,YAAY,yGA+DvB,CAAA"}
|
|
@@ -12,7 +12,13 @@ export const LabelControl = React.forwardRef((props, ref) => {
|
|
|
12
12
|
isInvalid: isInvalid ?? false,
|
|
13
13
|
isRequired: isRequired ?? false
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
const styleHelp = `
|
|
16
|
+
text-sup text-sumi-700
|
|
17
|
+
`;
|
|
18
|
+
const styleError = `
|
|
19
|
+
text-sup text-sun-800
|
|
20
|
+
`;
|
|
21
|
+
return (_jsx(ControllerContext.Provider, { value: context, children: _jsxs("div", { className: cx('mb-4', className), children: [_jsxs("label", { className: cx('block mb-2 text-label', isInvalid && 'text-sun-800'), htmlFor: context.id, ref: ref, ...restProps, children: [labelText, isRequired && (_jsx("span", { className: "text-label text-sun-800", children: "\u00A0*" }))] }), helperText && (_jsx("p", { id: context.helperTextId, className: cx(styleHelp, 'mb-2'), children: helperText })), children, isInvalid && (_jsx("p", { id: context.errorMessageId, className: cx(styleError, helperText ? 'mt-1' : 'mt-2'), children: errorMessage }))] }) }));
|
|
16
22
|
});
|
|
17
23
|
LabelControl.displayName = 'LabelControl';
|
|
18
24
|
//# sourceMappingURL=LabelControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelControl.js","sourceRoot":"","sources":["../../src/components/LabelControl.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;AAW7C,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAG1C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,EAAE,CAAA;IACxB,MAAM,EACJ,SAAS,EACT,SAAS,EACT,UAAU,EACV,YAAY,EACZ,SAAS,EACT,UAAU,EACV,QAAQ,EACR,GAAG,SAAS,EACb,GAAG,KAAK,CAAA;IAET,MAAM,OAAO,GAAG;QACd,EAAE,EAAE,KAAK,CAAC,OAAO,IAAI,SAAS,EAAE,EAAE;QAClC,YAAY,EAAE,eAAe,EAAE,EAAE;QACjC,cAAc,EAAE,iBAAiB,EAAE,EAAE;QACrC,SAAS,EAAE,SAAS,IAAI,KAAK;QAC7B,UAAU,EAAE,UAAU,IAAI,KAAK;KAChC,CAAA;IAED,OAAO,CACL,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,YACxC,eAAK,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,aACnC,iBACE,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,IAAI,cAAc,CAAC,EACnE,OAAO,EAAE,OAAO,CAAC,EAAE,EACnB,GAAG,EAAE,GAAG,KACJ,SAAS,aAEZ,SAAS,EACT,UAAU,IAAI,eAAM,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"LabelControl.js","sourceRoot":"","sources":["../../src/components/LabelControl.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;AAW7C,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAG1C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,EAAE,CAAA;IACxB,MAAM,EACJ,SAAS,EACT,SAAS,EACT,UAAU,EACV,YAAY,EACZ,SAAS,EACT,UAAU,EACV,QAAQ,EACR,GAAG,SAAS,EACb,GAAG,KAAK,CAAA;IAET,MAAM,OAAO,GAAG;QACd,EAAE,EAAE,KAAK,CAAC,OAAO,IAAI,SAAS,EAAE,EAAE;QAClC,YAAY,EAAE,eAAe,EAAE,EAAE;QACjC,cAAc,EAAE,iBAAiB,EAAE,EAAE;QACrC,SAAS,EAAE,SAAS,IAAI,KAAK;QAC7B,UAAU,EAAE,UAAU,IAAI,KAAK;KAChC,CAAA;IAED,MAAM,SAAS,GAAG;;GAEjB,CAAA;IAED,MAAM,UAAU,GAAG;;GAElB,CAAA;IAED,OAAO,CACL,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,YACxC,eAAK,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,aACnC,iBACE,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,IAAI,cAAc,CAAC,EACnE,OAAO,EAAE,OAAO,CAAC,EAAE,EACnB,GAAG,EAAE,GAAG,KACJ,SAAS,aAEZ,SAAS,EACT,UAAU,IAAI,CACb,eAAM,SAAS,EAAC,yBAAyB,wBAAe,CACzD,IACK,EACP,UAAU,IAAI,CACb,YAAG,EAAE,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,YAC1D,UAAU,GACT,CACL,EACA,QAAQ,EACR,SAAS,IAAI,CACZ,YACE,EAAE,EAAE,OAAO,CAAC,cAAc,EAC1B,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,YAEtD,YAAY,GACX,CACL,IACG,GACqB,CAC9B,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
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';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { Checkbox } from './Checkbox';
|
|
2
2
|
export { Radio } from './Radio';
|
|
3
3
|
export { Select } from './Select';
|
|
4
|
+
export { FileInput } from './FileInput';
|
|
4
5
|
export { Input } from './Input';
|
|
5
6
|
export { Textarea } from './Textarea';
|
|
6
7
|
export { LabelControl } from './LabelControl';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAsB,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,KAAK,EAAmB,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,MAAM,EAAoB,MAAM,UAAU,CAAA;AACnD,OAAO,EAAE,SAAS,EAAuB,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAE,KAAK,EAAmB,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAsB,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,YAAY,EAA0B,MAAM,gBAAgB,CAAA;AACrE,OAAO,EAAE,eAAe,EAA6B,MAAM,mBAAmB,CAAA"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react");var ae={exports:{}},W={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -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
|
|
9
|
+
*/var Se;function Rr(){if(Se)return W;Se=1;var f=g,m=Symbol.for("react.element"),b=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 p(c,o,_){var h,y={},j=null,T=null;_!==void 0&&(j=""+_),o.key!==void 0&&(j=""+o.key),o.ref!==void 0&&(T=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:T,props:y,_owner:n.current}}return W.Fragment=b,W.jsx=p,W.jsxs=p,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
|
|
18
|
-
`+K+e}}var X=!1,V;{var
|
|
19
|
-
`),C=
|
|
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&&
|
|
17
|
+
*/var Oe;function Er(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&function(){var f=g,m=Symbol.for("react.element"),b=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),c=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),P=Symbol.iterator,We="@@iterator";function Le(e){if(e===null||typeof e!="object")return null;var r=P&&e[P]||e[We];return typeof r=="function"?r:null}var D=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=D.ReactDebugCurrentFrame,v=i.getStackAddendum();v!==""&&(r+="%s",t=t.concat([v]));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===_||e===h||Be||e===T||Ve||Ue||Ge||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===y||e.$$typeof===p||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 v=r.displayName||r.name||"";return v!==""?t+"("+v+")":t}function le(e){return e.displayName||"Context"}function S(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 b:return"Portal";case a:return"Profiler";case n:return"StrictMode";case _:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c:var r=e;return le(r)+".Consumer";case p: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:S(e.type)||"Memo";case j:{var v=e,x=v._payload,d=v._init;try{return S(d(x))}catch{return null}}}return null}var F=Object.assign,$=0,ue,ce,de,fe,pe,ve,be;function me(){}me.__reactDisabledLog=!0;function Ke(){{if($===0){ue=console.log,ce=console.info,de=console.warn,fe=console.error,pe=console.group,ve=console.groupCollapsed,be=console.groupEnd;var e={configurable:!0,enumerable:!0,value:me,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function Xe(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:ue}),info:F({},e,{value:ce}),warn:F({},e,{value:de}),error:F({},e,{value:fe}),group:F({},e,{value:pe}),groupCollapsed:F({},e,{value:ve}),groupEnd:F({},e,{value:be})})}$<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var H=D.ReactCurrentDispatcher,K;function Y(e,r,t){{if(K===void 0)try{throw Error()}catch(v){var i=v.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 v=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(O){i=O}Reflect.construct(e,[],d)}else{try{d.call()}catch(O){i=O}e.call(d.prototype)}}else{try{throw Error()}catch(O){i=O}e()}}catch(O){if(O&&i&&typeof O.stack=="string"){for(var l=O.stack.split(`
|
|
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 N=`
|
|
21
|
+
`+l[R].replace(" at new "," at ");return e.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,N),N}while(R>=1&&E>=0);break}}}finally{X=!1,H.current=x,Xe(),Error.prepareStackTrace=v}var A=e?e.displayName||e.name:"",Pe=A?Y(A):"";return typeof e=="function"&&V.set(e,Pe),Pe}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 _: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,v=i._payload,x=i._init;try{return U(x(v),r,t)}catch{}}}return""}var G=Object.prototype.hasOwnProperty,xe={},ge=D.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,v){{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(v),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(v),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=D.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"&&q.current&&r&&q.current.stateNode!==r){var t=S(q.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',S(q.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,v,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:v}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function fr(e,r,t,i,v){{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,v));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,v,i,q.current,d)}}var ee=D.ReactCurrentOwner,Te=D.ReactDebugCurrentFrame;function M(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=S(ee.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
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
|
-
Check your code at `+r+":"+t+"."}return""}}var
|
|
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
|
|
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 "+S(e._owner.type)+"."),M(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),M(null)}}function Ie(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 v=Le(e);if(typeof v=="function"&&v!==e.entries)for(var x=v.call(e),d;!(d=x.next()).done;)te(d.value)&&Ce(d.value,r)}}}function br(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=S(r);rr(t,e.props,"prop",i,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var v=S(r);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",v||"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 mr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var i=r[t];if(i!=="children"&&i!=="key"){M(e),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",i),M(null);break}}e.ref!==null&&(M(e),w("Invalid attribute `ref` supplied to `React.Fragment`."),M(null))}}function Ne(e,r,t,i,v,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(v);C?l+=C:l+=je();var R;e===null?R="null":Z(e)?R="array":e!==void 0&&e.$$typeof===m?(R="<"+(S(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,v,x);if(E==null)return E;if(d){var N=r.children;if(N!==void 0)if(i)if(Z(N)){for(var A=0;A<N.length;A++)Ie(N[A],e);Object.freeze&&Object.freeze(N)}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 Ie(N,e)}return e===u?mr(E):br(E),E}}function hr(e,r,t){return Ne(e,r,t,!0)}function xr(e,r,t){return Ne(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 I=(...f)=>f.filter(Boolean).join(" "),k=g.createContext({helperTextId:"",errorMessageId:"",isInvalid:!1,isRequired:!1}),ne=g.forwardRef((f,m)=>{const{className:b,children:u,...n}=f,a=g.useContext(k);a.isRequired&&(n.required=!0),a.groupName&&(n.name=a.groupName);const p=`
|
|
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 we(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:
|
|
53
|
+
`;return s.jsx("label",{htmlFor:n.id,className:I(p,b),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,...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:b,children:u,...n}=f,a=g.useContext(k);a.isRequired&&(n.required=!0),a.groupName&&(n.name=a.groupName);const p=`
|
|
54
54
|
inline-block
|
|
55
55
|
text-base
|
|
56
56
|
cursor-pointer
|
|
@@ -75,7 +75,7 @@ Check the top-level render call using <`+t+">.")}return r}}function we(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:
|
|
78
|
+
`;return s.jsx("label",{htmlFor:n.id,className:I(p,b),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,...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:b,children:u,...n}=f,a=g.useContext(k);a.isRequired&&(n.required=!0);const p=a.isInvalid?"border-sun-800":"border-sumi-900",c=`
|
|
79
79
|
peer
|
|
80
80
|
cursor-pointer
|
|
81
81
|
appearance-none
|
|
@@ -99,7 +99,39 @@ Check the top-level render call using <`+t+">.")}return r}}function we(e,r){{if(
|
|
|
99
99
|
px-2
|
|
100
100
|
pointer-events-none
|
|
101
101
|
peer-disabled:fill-sumi-500
|
|
102
|
-
`;return s.jsxs("label",{className:"inline-block relative",children:[s.jsx("select",{id:
|
|
102
|
+
`;return s.jsxs("label",{className:"inline-block relative",children:[s.jsx("select",{id:n.id??a.id,className:I(c,p,f.className),"aria-describedby":a.helperTextId,"aria-errormessage":a.errorMessageId,"aria-invalid":a.isInvalid??!1,...n,ref:m,children:u}),s.jsx("span",{className:o,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:b,...u}=f,n=g.useContext(k);n.isRequired&&(u.required=!0);const a=n.isInvalid?"text-sun-800":"text-sumi-900",p=`
|
|
103
|
+
file:inline-block
|
|
104
|
+
file:text-button
|
|
105
|
+
file:text-center
|
|
106
|
+
file:cursor-pointer
|
|
107
|
+
file:whitespace-nowrap
|
|
108
|
+
file:border
|
|
109
|
+
file:border-solid
|
|
110
|
+
file:border-sea-800
|
|
111
|
+
file:active:border-sea-1200
|
|
112
|
+
file:hover:border-sea-900
|
|
113
|
+
file:disabled:border-sumi-500
|
|
114
|
+
file:disabled:cursor-not-allowed
|
|
115
|
+
`,c=`
|
|
116
|
+
file:text-sea-800
|
|
117
|
+
file:bg-transparent
|
|
118
|
+
file:active:bg-sea-200
|
|
119
|
+
file:hover:bg-sea-100
|
|
120
|
+
file:active:text-sea-1200
|
|
121
|
+
file:hover:text-sea-900
|
|
122
|
+
file:disabled:text-sumi-500
|
|
123
|
+
file:disabled:bg-transparent
|
|
124
|
+
`,o=`
|
|
125
|
+
file:p-4
|
|
126
|
+
file:text-button
|
|
127
|
+
file:rounded-lg
|
|
128
|
+
`,_=`
|
|
129
|
+
rounded-lg
|
|
130
|
+
outline-offset-2
|
|
131
|
+
focus:outline
|
|
132
|
+
focus:outline-2
|
|
133
|
+
focus:outline-wood-600
|
|
134
|
+
`;return s.jsx("input",{type:"file",id:u.id??n.id,className:I(p,c,o,_,a,b),"aria-describedby":n.helperTextId,"aria-errormessage":n.errorMessageId,"aria-invalid":n.isInvalid??!1,ref:m,...u})});Fe.displayName="FileInput";const De=g.forwardRef((f,m)=>{const{className:b,...u}=f,n=g.useContext(k);n.isRequired&&(u.required=!0);const a=n.isInvalid?"border-sun-800":"border-sumi-900",p=`
|
|
103
135
|
p-4
|
|
104
136
|
rounded-lg
|
|
105
137
|
border
|
|
@@ -111,7 +143,7 @@ Check the top-level render call using <`+t+">.")}return r}}function we(e,r){{if(
|
|
|
111
143
|
disabled:bg-transparent
|
|
112
144
|
disabled:text-sumi-500
|
|
113
145
|
disabled:border-sumi-500
|
|
114
|
-
`;return s.jsx("input",{type:"text",id:
|
|
146
|
+
`;return s.jsx("input",{type:"text",id:u.id??n.id,className:I(p,a,b),"aria-describedby":n.helperTextId,"aria-errormessage":n.errorMessageId,"aria-invalid":n.isInvalid??!1,ref:m,...u})});De.displayName="Input";const ie=g.forwardRef((f,m)=>{const{className:b,children:u,onChange:n,maxLength:a,...p}=f,[c,o]=g.useState(0),_=P=>{n&&n(P),o(P.target.value.length)},h=g.useContext(k);h.isRequired&&(p.required=!0);const y=h.isInvalid?"border-sun-800":"border-sumi-900",j=c>(a||0)?"text-sun-800":"text-sumi-700",T=`
|
|
115
147
|
p-4
|
|
116
148
|
rounded-lg
|
|
117
149
|
border
|
|
@@ -123,5 +155,9 @@ Check the top-level render call using <`+t+">.")}return r}}function we(e,r){{if(
|
|
|
123
155
|
disabled:bg-transparent
|
|
124
156
|
disabled:text-sumi-500
|
|
125
157
|
disabled:border-sumi-500
|
|
126
|
-
`;return s.jsxs(s.Fragment,{children:[s.jsx("textarea",{id:
|
|
158
|
+
`;return s.jsxs(s.Fragment,{children:[s.jsx("textarea",{id:p.id??h.id,className:I(T,y,b),"aria-describedby":h.helperTextId,"aria-errormessage":h.errorMessageId,"aria-invalid":h.isInvalid??!1,onChange:_,...p,ref:m,children:u}),a?s.jsxs("p",{className:"text-sup text-sumi-700",children:[s.jsx("span",{className:j,children:c}),"/",s.jsx("span",{children:a})]}):""]})});ie.displayName="Textarea";const J=g.forwardRef((f,m)=>{const b=g.useId(),{labelText:u,className:n,helperText:a,errorMessage:p,isInvalid:c,isRequired:o,children:_,...h}=f,y={id:f.htmlFor??`input-${b}`,helperTextId:`helper-text-${b}`,errorMessageId:`error-message-${b}`,isInvalid:c??!1,isRequired:o??!1},j=`
|
|
159
|
+
text-sup text-sumi-700
|
|
160
|
+
`,T=`
|
|
161
|
+
text-sup text-sun-800
|
|
162
|
+
`;return s.jsx(k.Provider,{value:y,children:s.jsxs("div",{className:I("mb-4",n),children:[s.jsxs("label",{className:I("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:I(j,"mb-2"),children:a}),_,c&&s.jsx("p",{id:y.errorMessageId,className:I(T,a?"mt-1":"mt-2"),children:p})]})})});J.displayName="LabelControl";const z=g.forwardRef((f,m)=>{const b=g.useId(),{labelText:u,className:n,helperText:a,errorMessage:p,isInvalid:c,isRequired:o,direction:_,children:h,...y}=f,T={groupName:y.name??`group-${b}`,helperTextId:`helper-text-${b}`,errorMessageId:`error-message-${b}`,isInvalid:c??!1,isRequired:o??!1},P=_??"flex-col";return s.jsx(k.Provider,{value:T,children:s.jsxs("fieldset",{className:I("mb-4",n),ref:m,...y,children:[s.jsx("legend",{children:s.jsxs("p",{className:I("block mb-2 text-label",c&&"text-sun-800"),children:[u,o&&s.jsx("span",{className:"text-sun-800",children:" *"})]})}),s.jsx("div",{className:I("inline-flex",P),children:h}),a&&s.jsx("p",{id:T.helperTextId,className:"text-sup text-sumi-700 mt-2",children:a}),c&&s.jsx("p",{id:T.errorMessageId,className:I("text-sup text-sun-800",a?"mt-1":"mt-2"),children:p})]})})});z.displayName="FieldsetControl";const Me=g.forwardRef((f,m)=>{const{items:b,onChange:u,className:n,labelText:a,helperText:p,errorMessage:c,isInvalid:o,isRequired:_,...h}=f;return s.jsx(z,{className:n,labelText:a,helperText:p,errorMessage:c,isInvalid:o,isRequired:_,ref:m,...h,children:b.map(({label:y,value:j},T)=>s.jsx(ne,{value:j,onChange:u,children:y},T))})});Me.displayName="CheckboxGroup";const Ae=g.forwardRef((f,m)=>{const{items:b,onChange:u,className:n,labelText:a,helperText:p,errorMessage:c,isInvalid:o,isRequired:_,defaultValue:h,...y}=f;return s.jsx(z,{className:n,labelText:a,helperText:p,errorMessage:c,isInvalid:o,isRequired:_,ref:m,...y,children:b.map(({label:j,value:T},P)=>s.jsx(se,{value:T,onChange:u,defaultChecked:h===T,children:j},P))})});Ae.displayName="RadioGroup";const $e=g.forwardRef((f,m)=>{const{className:b,labelText:u,helperText:n,errorMessage:a,isInvalid:p,isRequired:c,...o}=f;return s.jsx(J,{className:b,labelText:u,helperText:n,errorMessage:a,isInvalid:p,isRequired:c,children:s.jsx(ke,{ref:m,...o})})});$e.displayName="SelectControl";const qe=g.forwardRef((f,m)=>{const{className:b,labelText:u,helperText:n,errorMessage:a,isInvalid:p,isRequired:c,...o}=f;return s.jsx(J,{className:b,labelText:u,helperText:n,errorMessage:a,isInvalid:p,isRequired:c,children:s.jsx(ie,{ref:m,...o})})});qe.displayName="TextareaControl";exports.Checkbox=ne;exports.CheckboxGroup=Me;exports.FieldsetControl=z;exports.FileInput=Fe;exports.Input=De;exports.LabelControl=J;exports.Radio=se;exports.RadioGroup=Ae;exports.Select=ke;exports.SelectControl=$e;exports.Textarea=ie;exports.TextareaControl=qe;
|
|
127
163
|
//# sourceMappingURL=index.cjs.js.map
|