@sakura-ui/forms 0.3.0 → 0.4.0-beta.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/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react");var z={exports:{}},q={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react");var _={exports:{}},k={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.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 Re;function Ge(){if(Re)return q;Re=1;var s=Symbol.for("react.transitional.element"),d=Symbol.for("react.fragment");function f(b,i,o){var n=null;if(o!==void 0&&(n=""+o),i.key!==void 0&&(n=""+i.key),"key"in i){o={};for(var g in i)g!=="key"&&(o[g]=i[g])}else o=i;return i=o.ref,{$$typeof:s,type:b,key:n,ref:i!==void 0?i:null,props:o}}return q.Fragment=d,q.jsx=f,q.jsxs=f,q}var M={};/**
9
+ */var G;function ye(){if(G)return k;G=1;var r=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function c(n,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var u in o)u!=="key"&&(s[u]=o[u])}else s=o;return o=s.ref,{$$typeof:r,type:n,key:a,ref:o!==void 0?o:null,props:s}}return k.Fragment=i,k.jsx=c,k.jsxs=c,k}var w={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,71 +14,62 @@
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 Ne;function He(){return Ne||(Ne=1,process.env.NODE_ENV!=="production"&&function(){function s(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Be?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case U:return"Fragment";case ze:return"Portal";case le:return"Profiler";case oe:return"StrictMode";case H:return"Suspense";case J:return"SuspenseList"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case ie:return(e.displayName||"Context")+".Provider";case ae:return(e._context.displayName||"Context")+".Consumer";case G:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return r=e.displayName||null,r!==null?r:s(e.type)||"Memo";case L:r=e._payload,e=e._init;try{return s(e(r))}catch{}}return null}function d(e){return""+e}function f(e){try{d(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,u=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",u),d(e)}}function b(){}function i(){if(O===0){de=console.log,ue=console.info,fe=console.warn,be=console.error,ge=console.group,pe=console.groupCollapsed,xe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:b,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}O++}function o(){if(O--,O===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},e,{value:de}),info:_({},e,{value:ue}),warn:_({},e,{value:fe}),error:_({},e,{value:be}),group:_({},e,{value:ge}),groupCollapsed:_({},e,{value:pe}),groupEnd:_({},e,{value:xe})})}0>O&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function n(e){if(Z===void 0)try{throw Error()}catch(t){var r=t.stack.trim().match(/\n( *(at )?)/);Z=r&&r[1]||"",me=-1<t.stack.indexOf(`
18
- at`)?" (<anonymous>)":-1<t.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+Z+e+me}function g(e,r){if(!e||Q)return"";var t=K.get(e);if(t!==void 0)return t;Q=!0,t=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var u=null;u=S.H,S.H=null,i();try{var v={DetermineComponentFrameRoot:function(){try{if(r){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(C){var Y=C}Reflect.construct(e,[],T)}else{try{T.call()}catch(C){Y=C}e.call(T.prototype)}}else{try{throw Error()}catch(C){Y=C}(T=e())&&typeof T.catch=="function"&&T.catch(function(){})}}catch(C){if(C&&Y&&typeof C.stack=="string")return[C.stack,Y.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=v.DetermineComponentFrameRoot(),w=a[0],A=a[1];if(w&&A){var h=w.split(`
20
- `),P=A.split(`
21
- `);for(a=x=0;x<h.length&&!h[x].includes("DetermineComponentFrameRoot");)x++;for(;a<P.length&&!P[a].includes("DetermineComponentFrameRoot");)a++;if(x===h.length||a===P.length)for(x=h.length-1,a=P.length-1;1<=x&&0<=a&&h[x]!==P[a];)a--;for(;1<=x&&0<=a;x--,a--)if(h[x]!==P[a]){if(x!==1||a!==1)do if(x--,a--,0>a||h[x]!==P[a]){var $=`
22
- `+h[x].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),typeof e=="function"&&K.set(e,$),$}while(1<=x&&0<=a);break}}}finally{Q=!1,S.H=u,o(),Error.prepareStackTrace=t}return h=(h=e?e.displayName||e.name:"")?n(h):"",typeof e=="function"&&K.set(e,h),h}function c(e){if(e==null)return"";if(typeof e=="function"){var r=e.prototype;return g(e,!(!r||!r.isReactComponent))}if(typeof e=="string")return n(e);switch(e){case H:return n("Suspense");case J:return n("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case G:return e=g(e.render,!1),e;case V:return c(e.type);case L:r=e._payload,e=e._init;try{return c(e(r))}catch{}}return""}function m(){var e=S.A;return e===null?null:e.getOwner()}function p(e){if(ce.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function y(e,r){function t(){ve||(ve=!0,console.error("%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://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function E(){var e=s(this.type);return he[e]||(he[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function j(e,r,t,u,v,x){return t=x.ref,e={$$typeof:F,type:e,key:r,props:x,_owner:v},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:E}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function re(e,r,t,u,v,x){if(typeof e=="string"||typeof e=="function"||e===U||e===le||e===oe||e===H||e===J||e===We||typeof e=="object"&&e!==null&&(e.$$typeof===L||e.$$typeof===V||e.$$typeof===ie||e.$$typeof===ae||e.$$typeof===G||e.$$typeof===Fe||e.getModuleId!==void 0)){var a=r.children;if(a!==void 0)if(u)if(X(a)){for(u=0;u<a.length;u++)te(a[u],e);Object.freeze&&Object.freeze(a)}else console.error("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 te(a,e)}else a="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?u="null":X(e)?u="array":e!==void 0&&e.$$typeof===F?(u="<"+(s(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):u=typeof e,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",u,a);if(ce.call(r,"key")){a=s(e);var w=Object.keys(r).filter(function(h){return h!=="key"});u=0<w.length?"{key: someKey, "+w.join(": ..., ")+": ...}":"{key: someKey}",ye[a+u]||(w=0<w.length?"{"+w.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var J;function Re(){return J||(J=1,process.env.NODE_ENV!=="production"&&function(){function r(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case P:return"Fragment";case de:return"Profiler";case ne:return"StrictMode";case be:return"Suspense";case pe:return"SuspenseList";case me:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case ie:return"Portal";case ue:return(e.displayName||"Context")+".Provider";case ce:return(e._context.displayName||"Context")+".Consumer";case fe:var l=e.render;return e=e.displayName,e||(e=l.displayName||l.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xe:return l=e.displayName||null,l!==null?l:r(e.type)||"Memo";case Y:l=e._payload,e=e._init;try{return r(e(l))}catch{}}return null}function i(e){return""+e}function c(e){try{i(e);var l=!1}catch{l=!0}if(l){l=console;var b=l.error,m=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return b.call(l,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",m),i(e)}}function n(e){if(e===P)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===Y)return"<...>";try{var l=r(e);return l?"<"+l+">":"<...>"}catch{return"<...>"}}function o(){var e=S.A;return e===null?null:e.getOwner()}function s(){return Error("react-stack-top-frame")}function a(e){if(z.call(e,"key")){var l=Object.getOwnPropertyDescriptor(e,"key").get;if(l&&l.isReactWarning)return!1}return e.key!==void 0}function u(e,l){function b(){L||(L=!0,console.error("%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://react.dev/link/special-props)",l))}b.isReactWarning=!0,Object.defineProperty(e,"key",{get:b,configurable:!0})}function d(){var e=r(this.type);return D[e]||(D[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function p(e,l,b,m,T,N,A,$){return b=N.ref,e={$$typeof:R,type:e,key:l,props:N,_owner:T},(b!==void 0?b:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:d}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:A}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:$}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function f(e,l,b,m,T,N,A,$){var g=l.children;if(g!==void 0)if(m)if(he(g)){for(m=0;m<g.length;m++)h(g[m]);Object.freeze&&Object.freeze(g)}else console.error("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 h(g);if(z.call(l,"key")){g=r(e);var I=Object.keys(l).filter(function(ve){return ve!=="key"});m=0<I.length?"{key: someKey, "+I.join(": ..., ")+": ...}":"{key: someKey}",U[g+m]||(I=0<I.length?"{"+I.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
23
18
  let props = %s;
24
19
  <%s {...props} />
25
20
  React keys must be passed directly to JSX without using spread:
26
21
  let props = %s;
27
- <%s key={someKey} {...props} />`,u,a,w,a),ye[a+u]=!0)}if(a=null,t!==void 0&&(f(t),a=""+t),p(r)&&(f(r.key),a=""+r.key),"key"in r){t={};for(var A in r)A!=="key"&&(t[A]=r[A])}else t=r;return a&&y(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),j(e,a,x,v,m(),t)}function te(e,r){if(typeof e=="object"&&e&&e.$$typeof!==Ue){if(X(e))for(var t=0;t<e.length;t++){var u=e[t];B(u)&&se(u,r)}else if(B(e))e._store&&(e._store.validated=1);else if(e===null||typeof e!="object"?t=null:(t=ne&&e[ne]||e["@@iterator"],t=typeof t=="function"?t:null),typeof t=="function"&&t!==e.entries&&(t=t.call(e),t!==e))for(;!(e=t.next()).done;)B(e.value)&&se(e.value,r)}}function B(e){return typeof e=="object"&&e!==null&&e.$$typeof===F}function se(e,r){if(e._store&&!e._store.validated&&e.key==null&&(e._store.validated=1,r=Me(r),!Ee[r])){Ee[r]=!0;var t="";e&&e._owner!=null&&e._owner!==m()&&(t=null,typeof e._owner.tag=="number"?t=s(e._owner.type):typeof e._owner.name=="string"&&(t=e._owner.name),t=" It was passed a child from "+t+".");var u=S.getCurrentStack;S.getCurrentStack=function(){var v=c(e.type);return u&&(v+=u()||""),v},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',r,t),S.getCurrentStack=u}}function Me(e){var r="",t=m();return t&&(t=s(t.type))&&(r=`
28
-
29
- Check the render method of \``+t+"`."),r||(e=s(e))&&(r=`
30
-
31
- Check the top-level render call using <`+e+">."),r}var Ye=N,F=Symbol.for("react.transitional.element"),ze=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),le=Symbol.for("react.profiler"),ae=Symbol.for("react.consumer"),ie=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),We=Symbol.for("react.offscreen"),ne=Symbol.iterator,Be=Symbol.for("react.client.reference"),S=Ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=Object.prototype.hasOwnProperty,_=Object.assign,Fe=Symbol.for("react.client.reference"),X=Array.isArray,O=0,de,ue,fe,be,ge,pe,xe;b.__reactDisabledLog=!0;var Z,me,Q=!1,K=new(typeof WeakMap=="function"?WeakMap:Map),Ue=Symbol.for("react.client.reference"),ve,he={},ye={},Ee={};M.Fragment=U,M.jsx=function(e,r,t,u,v){return re(e,r,t,!1,u,v)},M.jsxs=function(e,r,t,u,v){return re(e,r,t,!0,u,v)}}()),M}var je;function Je(){return je||(je=1,process.env.NODE_ENV==="production"?z.exports=Ge():z.exports=He()),z.exports}var l=Je();const R=(...s)=>s.filter(Boolean).join(" ");var k;(s=>{s.clickable=`
22
+ <%s key={someKey} {...props} />`,m,g,I,g),U[g+m]=!0)}if(g=null,b!==void 0&&(c(b),g=""+b),a(l)&&(c(l.key),g=""+l.key),"key"in l){b={};for(var q in l)q!=="key"&&(b[q]=l[q])}else b=l;return g&&u(b,typeof e=="function"?e.displayName||e.name||"Unknown":e),p(e,g,N,T,o(),b,A,$)}function h(e){typeof e=="object"&&e!==null&&e.$$typeof===R&&e._store&&(e._store.validated=1)}var x=y,R=Symbol.for("react.transitional.element"),ie=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),ce=Symbol.for("react.consumer"),ue=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),be=Symbol.for("react.suspense"),pe=Symbol.for("react.suspense_list"),xe=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),me=Symbol.for("react.activity"),ge=Symbol.for("react.client.reference"),S=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,he=Array.isArray,O=console.createTask?console.createTask:function(){return null};x={react_stack_bottom_frame:function(e){return e()}};var L,D={},W=x.react_stack_bottom_frame.bind(x,s)(),B=O(n(s)),U={};w.Fragment=P,w.jsx=function(e,l,b,m,T){var N=1e4>S.recentlyCreatedOwnerStacks++;return f(e,l,b,!1,m,T,N?Error("react-stack-top-frame"):W,N?O(n(e)):B)},w.jsxs=function(e,l,b,m,T){var N=1e4>S.recentlyCreatedOwnerStacks++;return f(e,l,b,!0,m,T,N?Error("react-stack-top-frame"):W,N?O(n(e)):B)}}()),w}var V;function Ne(){return V||(V=1,process.env.NODE_ENV==="production"?_.exports=ye():_.exports=Re()),_.exports}var t=Ne();const v=(...r)=>r.filter(Boolean).join(" ");var j;(r=>{r.clickable=`
32
23
  px-2
33
24
  min-h-[calc(44/16*1rem)]
34
25
  border
35
26
  border-transparent
36
27
  rounded-lg
37
28
  hover:bg-solid-grey-50
38
- `,s.selected=`
29
+ `,r.selected=`
39
30
  rounded-full
40
31
  bg-yellow-50
41
- `;const d=`
32
+ `;const i=`
42
33
  focus-visible:outline
43
34
  focus-visible:outline-4
44
35
  focus-visible:outline-black
45
36
  focus-visible:ring-yellow-300
46
- `;s.focusRectCondensed=`
47
- ${d}
37
+ `;r.focusRectCondensed=`
38
+ ${i}
48
39
  focus-visible:-outline-offset-4
49
40
  focus-visible:ring-[calc(6/16*1rem)]
50
41
  focus-visible:ring-inset
51
- `,s.focusRectCondensedWithBg=`
52
- ${s.focusRectCondensed}
42
+ `,r.focusRectCondensedWithBg=`
43
+ ${r.focusRectCondensed}
53
44
  focus-visible:bg-yellow-300
54
- `,s.focusRect=`
55
- ${d}
45
+ `,r.focusRect=`
46
+ ${i}
56
47
  focus-visible:outline-offset-[calc(2/16*1rem)]
57
48
  focus-visible:ring-[calc(2/16*1rem)]
58
- `,s.focusRounded=`
59
- ${s.focusRect}
49
+ `,r.focusRounded=`
50
+ ${r.focusRect}
60
51
  focus-visible:rounded
61
- `,s.focusCard=`
62
- ${s.focusRect}
52
+ `,r.focusCard=`
53
+ ${r.focusRect}
63
54
  focus-visible:rounded-2xl
64
55
  sm:focus-visible:rounded-3xl
65
- `,s.focusRectWithBg=`
66
- ${s.focusRect}
56
+ `,r.focusRectWithBg=`
57
+ ${r.focusRect}
67
58
  focus-visible:bg-yellow-300
68
- `,s.focusRoundedWithBg=`
69
- ${s.focusRectWithBg}
59
+ `,r.focusRoundedWithBg=`
60
+ ${r.focusRectWithBg}
70
61
  focus-visible:rounded
71
- `,s.hoverUnderline=`
62
+ `,r.hoverUnderline=`
72
63
  hover:underline
73
64
  hover:underline-offset-[calc(3/16*1rem)]
74
- `,s.underline=`
65
+ `,r.underline=`
75
66
  underline
76
67
  underline-offset-[calc(3/16*1rem)]
77
68
  hover:decoration-[calc(3/16*1rem)]
78
- `,s.underlineNoDeco=`
69
+ `,r.underlineNoDeco=`
79
70
  underline
80
71
  underline-offset-[calc(3/16*1rem)]
81
- `,s.popover=`
72
+ `,r.popover=`
82
73
  min-w-fit
83
74
  w-auto
84
75
  py-2
@@ -88,24 +79,24 @@ Check the top-level render call using <`+e+">."),r}var Ye=N,F=Symbol.for("react.
88
79
  border
89
80
  border-solid-grey-420
90
81
  has-[>:nth-child(7)]:rounded-r-none
91
- `,s.popoverPositionBottomRight=`
82
+ `,r.popoverPositionBottomRight=`
92
83
  absolute
93
84
  top-11
94
85
  right-0
95
- `,s.popoverPositionBottomLeft=`
86
+ `,r.popoverPositionBottomLeft=`
96
87
  absolute
97
88
  top-11
98
89
  left-0
99
- `,(f=>{f.focus=`
90
+ `,(c=>{c.focus=`
100
91
  peer-focus-visible:outline
101
92
  peer-focus-visible:outline-4
102
93
  peer-focus-visible:outline-black
103
94
  peer-focus-visible:ring-yellow-300
104
- `,f.focusRect=`
105
- ${f.focus}
95
+ `,c.focusRect=`
96
+ ${c.focus}
106
97
  peer-focus-visible:outline-offset-[calc(2/16*1rem)]
107
98
  peer-focus-visible:ring-[calc(2/16*1rem)]
108
- `})(s.Peer||(s.Peer={}))})(k||(k={}));const I=N.createContext({helperTextId:"",errorMessageId:"",isInvalid:!1,isRequired:!1}),we=`
99
+ `})(r.Peer||(r.Peer={}))})(j||(j={}));const E=y.createContext({helperTextId:"",errorMessageId:"",isInvalid:!1,isRequired:!1}),H=`
109
100
  bg-white
110
101
  border
111
102
  border-solid
@@ -114,8 +105,8 @@ Check the top-level render call using <`+e+">."),r}var Ye=N,F=Symbol.for("react.
114
105
  disabled:text-solid-gray-500
115
106
  disabled:border-solid-gray-500
116
107
  aria-invalid:border-red-800
117
- ${k.focusRect}
118
- `,Ce={lg:`
108
+ ${j.focusRect}
109
+ `,X={lg:`
119
110
  p-4
120
111
  text-label
121
112
  rounded-lg
@@ -132,13 +123,13 @@ Check the top-level render call using <`+e+">."),r}var Ye=N,F=Symbol.for("react.
132
123
  text-label
133
124
  rounded-md
134
125
  leading-snug
135
- `},Te=`
126
+ `},Z=`
136
127
  inline-block
137
128
  cursor-pointer
138
129
  border
139
130
  border-solid
140
131
  border-transparent
141
- `,ke={lg:`
132
+ `,Q={lg:`
142
133
  pr-8
143
134
  py-4
144
135
  text-label
@@ -153,12 +144,12 @@ Check the top-level render call using <`+e+">."),r}var Ye=N,F=Symbol.for("react.
153
144
  py-2
154
145
  text-label
155
146
  leading-snug
156
- `},Ie={lg:"w-[22px] h-[22px] mr-2",md:"w-[18px] h-[18px] mr-1.5",sm:"w-[18px] h-[18px] mr-1"},D=s=>{const{id:d,className:f,size:b="lg",children:i,...o}=s,n=N.useId(),g=d||n,c=N.useContext(I);c.isRequired&&(o.required=!0),c.groupName&&(o.name=c.groupName);const m={lg:22/24,md:18/24,sm:18/24},p=`
147
+ `},K={lg:"w-[22px] h-[22px] mr-2",md:"w-[18px] h-[18px] mr-1.5",sm:"w-[18px] h-[18px] mr-1"},M=r=>{const{id:i,className:c,size:n="lg",children:o,...s}=r,a=y.useId(),u=i||a,d=y.useContext(E);d.isRequired&&(s.required=!0),d.groupName&&(s.name=d.groupName);const p={lg:22/24,md:18/24,sm:18/24},f=`
157
148
  peer
158
149
  sr-only
159
- `,y=`
150
+ `,h=`
160
151
  bg-clip-content
161
- rounded
152
+ rounded-sm
162
153
  border
163
154
  border-solid
164
155
  border-solid-gray-900
@@ -167,11 +158,11 @@ Check the top-level render call using <`+e+">."),r}var Ye=N,F=Symbol.for("react.
167
158
  peer-checked:bg-blue-600
168
159
  peer-checked:border-none
169
160
  peer-disabled:border-solid-gray-500
170
- ${k.Peer.focusRect}
171
- `;return l.jsx("label",{htmlFor:g,className:R(Te,ke[b],f),children:l.jsxs("span",{className:"flex items-center",children:[l.jsx("input",{id:g,className:p,type:"checkbox","aria-describedby":c.helperTextId,"aria-errormessage":c.errorMessageId,"aria-invalid":c.isInvalid??!1,"aria-required":c.isRequired??!1,...o}),l.jsx("span",{className:R(y,Ie[b]),children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,width:"24",height:"24",viewBox:"0 0 24 24",children:l.jsx("g",{transform:`scale(${m[b]} ${m[b]})`,children:l.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"})})})}),l.jsx("span",{className:"peer-disabled:text-solid-gray-500",children:i})]})})};D.displayName="Checkbox";const ee=s=>{const{id:d,className:f,size:b="lg",children:i,...o}=s,n=N.useId(),g=d||n,c=N.useContext(I);c.isRequired&&(o.required=!0),c.groupName&&(o.name=c.groupName);const m=`
161
+ ${j.Peer.focusRect}
162
+ `;return t.jsx("label",{htmlFor:u,className:v(Z,Q[n],c),children:t.jsxs("span",{className:"flex items-center",children:[t.jsx("input",{id:u,className:f,type:"checkbox","aria-describedby":d.helperTextId,"aria-errormessage":d.errorMessageId,"aria-invalid":d.isInvalid??!1,"aria-required":d.isRequired??!1,...s}),t.jsx("span",{className:v(h,K[n]),children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,width:"24",height:"24",viewBox:"0 0 24 24",children:t.jsx("g",{transform:`scale(${p[n]} ${p[n]})`,children:t.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"})})})}),t.jsx("span",{className:"peer-disabled:text-solid-gray-500",children:o})]})})};M.displayName="Checkbox";const F=r=>{const{id:i,className:c,size:n="lg",children:o,...s}=r,a=y.useId(),u=i||a,d=y.useContext(E);d.isRequired&&(s.required=!0),d.groupName&&(s.name=d.groupName);const p=`
172
163
  peer
173
164
  sr-only
174
- `,p=`
165
+ `,f=`
175
166
  bg-clip-content
176
167
  rounded-full
177
168
  border
@@ -180,13 +171,13 @@ Check the top-level render call using <`+e+">."),r}var Ye=N,F=Symbol.for("react.
180
171
  peer-checked:bg-blue-600
181
172
  peer-checked:border-blue-600
182
173
  peer-disabled:border-solid-gray-500
183
- ${k.Peer.focusRect}
184
- `,y={lg:"p-1",md:"p-[3px]",sm:"p-[3px]"};return l.jsx("label",{htmlFor:g,className:R(Te,ke[b],f),children:l.jsxs("span",{className:"flex items-center",children:[l.jsx("input",{id:g,className:m,type:"radio","aria-describedby":c.helperTextId,"aria-errormessage":c.errorMessageId,"aria-invalid":c.isInvalid??!1,"aria-required":c.isRequired??!1,...o}),l.jsx("span",{"aria-hidden":!0,className:R(p,y[b],Ie[b])}),l.jsx("span",{className:"peer-disabled:text-solid-gray-500",children:i})]})})};ee.displayName="Radio";const Se=s=>{const{id:d,className:f,size:b="lg",children:i,...o}=s,n=N.useContext(I);return n.isRequired&&(o.required=!0),l.jsxs("div",{className:"inline-block relative",children:[l.jsx("select",{id:d||n.id,className:R(`
174
+ ${j.Peer.focusRect}
175
+ `,h={lg:"p-1",md:"p-[3px]",sm:"p-[3px]"};return t.jsx("label",{htmlFor:u,className:v(Z,Q[n],c),children:t.jsxs("span",{className:"flex items-center",children:[t.jsx("input",{id:u,className:p,type:"radio","aria-describedby":d.helperTextId,"aria-errormessage":d.errorMessageId,"aria-invalid":d.isInvalid??!1,"aria-required":d.isRequired??!1,...s}),t.jsx("span",{"aria-hidden":!0,className:v(f,h[n],K[n])}),t.jsx("span",{className:"peer-disabled:text-solid-gray-500",children:o})]})})};F.displayName="Radio";const ee=r=>{const{id:i,className:c,size:n="lg",children:o,...s}=r,a=y.useContext(E);return a.isRequired&&(s.required=!0),t.jsxs("div",{className:"inline-block relative",children:[t.jsx("select",{id:i||a.id,className:v(`
185
176
  !pr-8
186
177
  peer
187
178
  cursor-pointer
188
179
  appearance-none
189
- `,we,Ce[b],f),"aria-describedby":n.helperTextId,"aria-errormessage":n.errorMessageId,"aria-invalid":n.isInvalid??!1,"aria-required":n.isRequired??!1,...o,children:i}),l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:`
180
+ `,H,X[n],c),"aria-describedby":a.helperTextId,"aria-errormessage":a.errorMessageId,"aria-invalid":a.isInvalid??!1,"aria-required":a.isRequired??!1,...s,children:o}),t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:`
190
181
  pointer-events-none
191
182
  absolute
192
183
  right-4
@@ -194,7 +185,7 @@ Check the top-level render call using <`+e+">."),r}var Ye=N,F=Symbol.for("react.
194
185
  -translate-y-1/2
195
186
  text-solid-gray-900
196
187
  peer-disabled:text-solid-gray-500
197
- `,fill:"none",width:"16",height:"16",viewBox:"0 0 16 16",children:[l.jsx("title",{children:"arrow down"}),l.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",fill:"currentColor"})]})]})};Se.displayName="Select";const _e=s=>{const{id:d,className:f,size:b="lg",...i}=s,o=N.useContext(I);o.isRequired&&(i.required=!0);const n=`
188
+ `,fill:"none",width:"16",height:"16",viewBox:"0 0 16 16",children:[t.jsx("title",{children:"arrow down"}),t.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",fill:"currentColor"})]})]})};ee.displayName="Select";const re=r=>{const{id:i,className:c,size:n="lg",...o}=r,s=y.useContext(E);s.isRequired&&(o.required=!0);const a=`
198
189
  file:mr-2
199
190
  file:inline-block
200
191
  file:text-button
@@ -210,7 +201,7 @@ Check the top-level render call using <`+e+">."),r}var Ye=N,F=Symbol.for("react.
210
201
  file:active:border-blue-1200
211
202
  file:disabled:border-solid-gray-500
212
203
  file:disabled:cursor-not-allowed
213
- `,g=`
204
+ `,u=`
214
205
  file:text-blue-900
215
206
  file:hover:text-blue-1000
216
207
  file:active:text-blue-1200
@@ -219,15 +210,15 @@ Check the top-level render call using <`+e+">."),r}var Ye=N,F=Symbol.for("react.
219
210
  file:active:bg-blue-300
220
211
  file:disabled:text-solid-gray-500
221
212
  file:disabled:bg-transparent
222
- `,c=`
213
+ `,d=`
223
214
  text-label
224
215
  text-solid-gray-900
225
216
  rounded-lg
226
217
  outline-offset-2
227
218
  aria-invalid:text-red-800
228
- ${k.hoverUnderline}
229
- ${k.focusRounded}
230
- `,m={lg:`
219
+ ${j.hoverUnderline}
220
+ ${j.focusRounded}
221
+ `,p={lg:`
231
222
  file:p-4
232
223
  file:text-button
233
224
  file:rounded-lg
@@ -244,7 +235,7 @@ Check the top-level render call using <`+e+">."),r}var Ye=N,F=Symbol.for("react.
244
235
  file:text-button
245
236
  file:rounded-md
246
237
  file:leading-snug
247
- `};return l.jsx("input",{type:"file",id:d||o.id,className:R(n,g,m[b],c,f),"aria-describedby":o.helperTextId,"aria-errormessage":o.errorMessageId,"aria-invalid":o.isInvalid??!1,"aria-required":o.isRequired??!1,role:"button","aria-label":"File Upload",...i})};_e.displayName="FileInput";const Pe=s=>{const{id:d,className:f,size:b="lg",...i}=s,o=N.useContext(I);return o.isRequired&&(i.required=!0),l.jsx("input",{type:"text",id:d||o.id,className:R(we,Ce[b],f),"aria-describedby":o.helperTextId,"aria-errormessage":o.errorMessageId,"aria-invalid":o.isInvalid??!1,"aria-required":o.isRequired??!1,...i})};Pe.displayName="Input";const Ae=s=>{const{id:d,className:f,children:b,onChange:i,maxLength:o,...n}=s,[g,c]=N.useState(0),m=j=>{i&&i(j),c(j.target.value.length)},p=N.useContext(I);p.isRequired&&(n.required=!0);const y=g>(o||0)?"text-red-800":"text-solid-gray-700",E=`
238
+ `};return t.jsx("input",{type:"file",id:i||s.id,className:v(a,u,p[n],d,c),"aria-describedby":s.helperTextId,"aria-errormessage":s.errorMessageId,"aria-invalid":s.isInvalid??!1,"aria-required":s.isRequired??!1,role:"button","aria-label":"File Upload",...o})};re.displayName="FileInput";const se=r=>{const{id:i,className:c,size:n="lg",...o}=r,s=y.useContext(E);return s.isRequired&&(o.required=!0),t.jsx("input",{type:"text",id:i||s.id,className:v(H,X[n],c),"aria-describedby":s.helperTextId,"aria-errormessage":s.errorMessageId,"aria-invalid":s.isInvalid??!1,"aria-required":s.isRequired??!1,...o})};se.displayName="Input";const te=r=>{const{id:i,className:c,children:n,onChange:o,maxLength:s,...a}=r,[u,d]=y.useState(0),p=R=>{o&&o(R),d(R.target.value.length)},f=y.useContext(E);f.isRequired&&(a.required=!0);const h=u>(s||0)?"text-red-800":"text-solid-gray-700",x=`
248
239
  p-4
249
240
  text-label
250
241
  rounded-lg
@@ -255,9 +246,9 @@ Check the top-level render call using <`+e+">."),r}var Ye=N,F=Symbol.for("react.
255
246
  disabled:text-solid-gray-500
256
247
  disabled:border-solid-gray-500
257
248
  aria-invalid:border-red-800
258
- ${k.focusRect}
259
- `;return l.jsxs(l.Fragment,{children:[l.jsx("textarea",{id:d||p.id,className:R(E,f),"aria-describedby":p.helperTextId,"aria-errormessage":p.errorMessageId,"aria-invalid":p.isInvalid??!1,"aria-required":p.isRequired??!1,onChange:m,...n,children:b}),o?l.jsxs("p",{className:"text-label text-solid-gray-700",children:[l.jsx("span",{className:y,children:g}),"/",l.jsx("span",{children:o})]}):""]})};Ae.displayName="Textarea";const Oe=s=>{const d=N.useId(),{labelText:f,className:b,helperText:i,errorMessage:o,isInvalid:n,isRequired:g,children:c,...m}=s,p={id:s.htmlFor??`input-${d}`,helperTextId:`helper-text-${d}`,errorMessageId:`error-message-${d}`,isInvalid:n??!1,isRequired:g??!1};return l.jsx(I.Provider,{value:p,children:l.jsxs("div",{className:R("flex flex-col items-start gap-2",b),children:[l.jsxs("label",{className:R("block text-label",n&&"text-red-800"),htmlFor:p.id,...m,children:[f,g&&l.jsx("span",{className:"text-label text-red-800",children:" *"})]}),i&&l.jsx("p",{id:p.helperTextId,className:`
249
+ ${j.focusRect}
250
+ `;return t.jsxs(t.Fragment,{children:[t.jsx("textarea",{id:i||f.id,className:v(x,c),"aria-describedby":f.helperTextId,"aria-errormessage":f.errorMessageId,"aria-invalid":f.isInvalid??!1,"aria-required":f.isRequired??!1,onChange:p,...a,children:n}),s?t.jsxs("p",{className:"text-label text-solid-gray-700",children:[t.jsx("span",{className:h,children:u}),"/",t.jsx("span",{children:s})]}):""]})};te.displayName="Textarea";const le=r=>{const i=y.useId(),{labelText:c,className:n,helperText:o,errorMessage:s,isInvalid:a,isRequired:u,children:d,...p}=r,f={id:r.htmlFor??`input-${i}`,helperTextId:`helper-text-${i}`,errorMessageId:`error-message-${i}`,isInvalid:a??!1,isRequired:u??!1};return t.jsx(E.Provider,{value:f,children:t.jsxs("div",{className:v("flex flex-col items-start gap-2",n),children:[t.jsxs("label",{className:v("block text-label",a&&"text-red-800"),htmlFor:f.id,...p,children:[c,u&&t.jsx("span",{className:"text-label text-red-800",children:" *"})]}),o&&t.jsx("p",{id:f.helperTextId,className:`
260
251
  text-label text-solid-gray-700
261
- `,children:i}),c,n&&l.jsx("p",{id:p.errorMessageId,className:`
252
+ `,children:o}),d,a&&t.jsx("p",{id:f.errorMessageId,className:`
262
253
  text-label text-red-800
263
- `,children:o})]})})};Oe.displayName="LabelControl";const W=s=>{const d=N.useId(),{labelText:f,className:b,helperText:i,errorMessage:o,isInvalid:n,isRequired:g,direction:c,children:m,...p}=s,E={groupName:p.name??`group-${d}`,helperTextId:`helper-text-${d}`,errorMessageId:`error-message-${d}`,isInvalid:n??!1,isRequired:g??!1},j=c??"flex-col";return l.jsx(I.Provider,{value:E,children:l.jsxs("fieldset",{className:R("flex flex-col items-start gap-2",b),...p,children:[l.jsx("legend",{children:l.jsxs("p",{className:R("block text-label",n&&"text-red-800"),children:[f,g&&l.jsx("span",{className:"text-red-800",children:" *"})]})}),l.jsx("div",{className:R("inline-flex",j),children:m}),i&&l.jsx("p",{id:E.helperTextId,className:"text-sup text-solid-gray-700",children:i}),n&&l.jsx("p",{id:E.errorMessageId,className:"text-label text-red-800",children:o})]})})};W.displayName="FieldsetControl";const $e=s=>{const{items:d,onChange:f,className:b,labelText:i,helperText:o,errorMessage:n,isInvalid:g,isRequired:c,size:m,...p}=s;return l.jsx(W,{className:b,labelText:i,helperText:o,errorMessage:n,isInvalid:g,isRequired:c,...p,children:d.map(({label:y,value:E})=>l.jsx(D,{size:m,value:E,onChange:f,children:y},`${y}-${E}`))})};$e.displayName="CheckboxGroup";const qe=s=>{const{items:d,onChange:f,className:b,labelText:i,helperText:o,errorMessage:n,isInvalid:g,isRequired:c,defaultValue:m,size:p,...y}=s;return l.jsx(W,{className:b,labelText:i,helperText:o,errorMessage:n,isInvalid:g,isRequired:c,...y,children:d.map(({label:E,value:j})=>l.jsx(ee,{size:p,value:j,onChange:f,defaultChecked:m===j,children:E},`${E}-${j}`))})};qe.displayName="RadioGroup";exports.Checkbox=D;exports.CheckboxGroup=$e;exports.FieldsetControl=W;exports.FileInput=_e;exports.Input=Pe;exports.LabelControl=Oe;exports.Radio=ee;exports.RadioGroup=qe;exports.Select=Se;exports.Textarea=Ae;
254
+ `,children:s})]})})};le.displayName="LabelControl";const C=r=>{const i=y.useId(),{labelText:c,className:n,helperText:o,errorMessage:s,isInvalid:a,isRequired:u,direction:d,children:p,...f}=r,x={groupName:f.name??`group-${i}`,helperTextId:`helper-text-${i}`,errorMessageId:`error-message-${i}`,isInvalid:a??!1,isRequired:u??!1},R=d??"flex-col";return t.jsx(E.Provider,{value:x,children:t.jsxs("fieldset",{className:v("flex flex-col items-start gap-2",n),...f,children:[t.jsx("legend",{children:t.jsxs("p",{className:v("block text-label",a&&"text-red-800"),children:[c,u&&t.jsx("span",{className:"text-red-800",children:" *"})]})}),t.jsx("div",{className:v("inline-flex",R),children:p}),o&&t.jsx("p",{id:x.helperTextId,className:"text-sup text-solid-gray-700",children:o}),a&&t.jsx("p",{id:x.errorMessageId,className:"text-label text-red-800",children:s})]})})};C.displayName="FieldsetControl";const oe=r=>{const{items:i,onChange:c,className:n,labelText:o,helperText:s,errorMessage:a,isInvalid:u,isRequired:d,size:p,...f}=r;return t.jsx(C,{className:n,labelText:o,helperText:s,errorMessage:a,isInvalid:u,isRequired:d,...f,children:i.map(({label:h,value:x})=>t.jsx(M,{size:p,value:x,onChange:c,children:h},`${h}-${x}`))})};oe.displayName="CheckboxGroup";const ae=r=>{const{items:i,onChange:c,className:n,labelText:o,helperText:s,errorMessage:a,isInvalid:u,isRequired:d,defaultValue:p,size:f,...h}=r;return t.jsx(C,{className:n,labelText:o,helperText:s,errorMessage:a,isInvalid:u,isRequired:d,...h,children:i.map(({label:x,value:R})=>t.jsx(F,{size:f,value:R,onChange:c,defaultChecked:p===R,children:x},`${x}-${R}`))})};ae.displayName="RadioGroup";exports.Checkbox=M;exports.CheckboxGroup=oe;exports.FieldsetControl=C;exports.FileInput=re;exports.Input=se;exports.LabelControl=le;exports.Radio=F;exports.RadioGroup=ae;exports.Select=ee;exports.Textarea=te;