@matbea-ui/matbea-ui 0.1.9 → 0.2.0-dev.145135

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.
Files changed (158) hide show
  1. package/dist/matbea-ui.cjs.js +2954 -1
  2. package/dist/matbea-ui.cjs.js.map +1 -0
  3. package/dist/matbea-ui.es.js +2755 -59
  4. package/dist/matbea-ui.es.js.map +1 -0
  5. package/dist/types/index.d.ts +702 -0
  6. package/package.json +28 -12
  7. package/dist/fonts/ProximaNova-Bold.woff2 +0 -0
  8. package/dist/fonts/ProximaNova-RegularIt.woff2 +0 -0
  9. package/dist/fonts/ProximaNova-Semibold.woff2 +0 -0
  10. package/dist/matbea-ui.cjs10.js +0 -1
  11. package/dist/matbea-ui.cjs11.js +0 -1
  12. package/dist/matbea-ui.cjs12.js +0 -1
  13. package/dist/matbea-ui.cjs13.js +0 -1
  14. package/dist/matbea-ui.cjs14.js +0 -1
  15. package/dist/matbea-ui.cjs15.js +0 -1
  16. package/dist/matbea-ui.cjs16.js +0 -1
  17. package/dist/matbea-ui.cjs17.js +0 -1
  18. package/dist/matbea-ui.cjs18.js +0 -1
  19. package/dist/matbea-ui.cjs19.js +0 -1
  20. package/dist/matbea-ui.cjs2.js +0 -1
  21. package/dist/matbea-ui.cjs20.js +0 -1
  22. package/dist/matbea-ui.cjs21.js +0 -1
  23. package/dist/matbea-ui.cjs22.js +0 -1
  24. package/dist/matbea-ui.cjs23.js +0 -1
  25. package/dist/matbea-ui.cjs24.js +0 -1
  26. package/dist/matbea-ui.cjs25.js +0 -1
  27. package/dist/matbea-ui.cjs26.js +0 -1
  28. package/dist/matbea-ui.cjs27.js +0 -1
  29. package/dist/matbea-ui.cjs28.js +0 -1
  30. package/dist/matbea-ui.cjs29.js +0 -1
  31. package/dist/matbea-ui.cjs3.js +0 -1
  32. package/dist/matbea-ui.cjs30.js +0 -1
  33. package/dist/matbea-ui.cjs31.js +0 -1
  34. package/dist/matbea-ui.cjs32.js +0 -63
  35. package/dist/matbea-ui.cjs33.js +0 -34
  36. package/dist/matbea-ui.cjs34.js +0 -44
  37. package/dist/matbea-ui.cjs35.js +0 -1
  38. package/dist/matbea-ui.cjs36.js +0 -11
  39. package/dist/matbea-ui.cjs37.js +0 -71
  40. package/dist/matbea-ui.cjs38.js +0 -14
  41. package/dist/matbea-ui.cjs39.js +0 -11
  42. package/dist/matbea-ui.cjs4.js +0 -1
  43. package/dist/matbea-ui.cjs40.js +0 -1
  44. package/dist/matbea-ui.cjs41.js +0 -1
  45. package/dist/matbea-ui.cjs42.js +0 -37
  46. package/dist/matbea-ui.cjs43.js +0 -62
  47. package/dist/matbea-ui.cjs44.js +0 -102
  48. package/dist/matbea-ui.cjs45.js +0 -103
  49. package/dist/matbea-ui.cjs46.js +0 -7
  50. package/dist/matbea-ui.cjs47.js +0 -1
  51. package/dist/matbea-ui.cjs48.js +0 -1
  52. package/dist/matbea-ui.cjs49.js +0 -55
  53. package/dist/matbea-ui.cjs5.js +0 -1
  54. package/dist/matbea-ui.cjs50.js +0 -23
  55. package/dist/matbea-ui.cjs51.js +0 -38
  56. package/dist/matbea-ui.cjs52.js +0 -51
  57. package/dist/matbea-ui.cjs53.js +0 -1
  58. package/dist/matbea-ui.cjs54.js +0 -1
  59. package/dist/matbea-ui.cjs55.js +0 -27
  60. package/dist/matbea-ui.cjs56.js +0 -48
  61. package/dist/matbea-ui.cjs57.js +0 -1
  62. package/dist/matbea-ui.cjs58.js +0 -1
  63. package/dist/matbea-ui.cjs59.js +0 -1
  64. package/dist/matbea-ui.cjs6.js +0 -1
  65. package/dist/matbea-ui.cjs60.js +0 -34
  66. package/dist/matbea-ui.cjs61.js +0 -11
  67. package/dist/matbea-ui.cjs62.js +0 -24
  68. package/dist/matbea-ui.cjs63.js +0 -27
  69. package/dist/matbea-ui.cjs64.js +0 -29
  70. package/dist/matbea-ui.cjs65.js +0 -1
  71. package/dist/matbea-ui.cjs66.js +0 -20
  72. package/dist/matbea-ui.cjs67.js +0 -1
  73. package/dist/matbea-ui.cjs68.js +0 -1
  74. package/dist/matbea-ui.cjs69.js +0 -1
  75. package/dist/matbea-ui.cjs7.js +0 -1
  76. package/dist/matbea-ui.cjs70.js +0 -6
  77. package/dist/matbea-ui.cjs71.js +0 -6
  78. package/dist/matbea-ui.cjs72.js +0 -1
  79. package/dist/matbea-ui.cjs73.js +0 -1
  80. package/dist/matbea-ui.cjs74.js +0 -1
  81. package/dist/matbea-ui.cjs75.js +0 -1
  82. package/dist/matbea-ui.cjs8.js +0 -1
  83. package/dist/matbea-ui.cjs9.js +0 -1
  84. package/dist/matbea-ui.es10.js +0 -10
  85. package/dist/matbea-ui.es11.js +0 -47
  86. package/dist/matbea-ui.es12.js +0 -178
  87. package/dist/matbea-ui.es13.js +0 -188
  88. package/dist/matbea-ui.es14.js +0 -12
  89. package/dist/matbea-ui.es15.js +0 -31
  90. package/dist/matbea-ui.es16.js +0 -25
  91. package/dist/matbea-ui.es17.js +0 -40
  92. package/dist/matbea-ui.es18.js +0 -43
  93. package/dist/matbea-ui.es19.js +0 -59
  94. package/dist/matbea-ui.es2.js +0 -38
  95. package/dist/matbea-ui.es20.js +0 -25
  96. package/dist/matbea-ui.es21.js +0 -13
  97. package/dist/matbea-ui.es22.js +0 -33
  98. package/dist/matbea-ui.es23.js +0 -16
  99. package/dist/matbea-ui.es24.js +0 -25
  100. package/dist/matbea-ui.es25.js +0 -36
  101. package/dist/matbea-ui.es26.js +0 -29
  102. package/dist/matbea-ui.es27.js +0 -30
  103. package/dist/matbea-ui.es28.js +0 -20
  104. package/dist/matbea-ui.es29.js +0 -13
  105. package/dist/matbea-ui.es3.js +0 -24
  106. package/dist/matbea-ui.es30.js +0 -41
  107. package/dist/matbea-ui.es31.js +0 -5
  108. package/dist/matbea-ui.es32.js +0 -163
  109. package/dist/matbea-ui.es33.js +0 -40
  110. package/dist/matbea-ui.es34.js +0 -330
  111. package/dist/matbea-ui.es35.js +0 -15
  112. package/dist/matbea-ui.es36.js +0 -26
  113. package/dist/matbea-ui.es37.js +0 -85
  114. package/dist/matbea-ui.es38.js +0 -18
  115. package/dist/matbea-ui.es39.js +0 -18
  116. package/dist/matbea-ui.es4.js +0 -31
  117. package/dist/matbea-ui.es40.js +0 -24
  118. package/dist/matbea-ui.es41.js +0 -10
  119. package/dist/matbea-ui.es42.js +0 -42
  120. package/dist/matbea-ui.es43.js +0 -70
  121. package/dist/matbea-ui.es44.js +0 -119
  122. package/dist/matbea-ui.es45.js +0 -131
  123. package/dist/matbea-ui.es46.js +0 -13
  124. package/dist/matbea-ui.es47.js +0 -25
  125. package/dist/matbea-ui.es48.js +0 -34
  126. package/dist/matbea-ui.es49.js +0 -64
  127. package/dist/matbea-ui.es5.js +0 -19
  128. package/dist/matbea-ui.es50.js +0 -39
  129. package/dist/matbea-ui.es51.js +0 -44
  130. package/dist/matbea-ui.es52.js +0 -58
  131. package/dist/matbea-ui.es53.js +0 -17
  132. package/dist/matbea-ui.es54.js +0 -26
  133. package/dist/matbea-ui.es55.js +0 -58
  134. package/dist/matbea-ui.es56.js +0 -62
  135. package/dist/matbea-ui.es57.js +0 -12
  136. package/dist/matbea-ui.es58.js +0 -12
  137. package/dist/matbea-ui.es59.js +0 -15
  138. package/dist/matbea-ui.es6.js +0 -62
  139. package/dist/matbea-ui.es60.js +0 -74
  140. package/dist/matbea-ui.es61.js +0 -17
  141. package/dist/matbea-ui.es62.js +0 -55
  142. package/dist/matbea-ui.es63.js +0 -57
  143. package/dist/matbea-ui.es64.js +0 -59
  144. package/dist/matbea-ui.es65.js +0 -21
  145. package/dist/matbea-ui.es66.js +0 -34
  146. package/dist/matbea-ui.es67.js +0 -10
  147. package/dist/matbea-ui.es68.js +0 -4
  148. package/dist/matbea-ui.es69.js +0 -26
  149. package/dist/matbea-ui.es7.js +0 -5
  150. package/dist/matbea-ui.es70.js +0 -236
  151. package/dist/matbea-ui.es71.js +0 -10
  152. package/dist/matbea-ui.es72.js +0 -9
  153. package/dist/matbea-ui.es73.js +0 -12
  154. package/dist/matbea-ui.es74.js +0 -4
  155. package/dist/matbea-ui.es75.js +0 -4
  156. package/dist/matbea-ui.es8.js +0 -6
  157. package/dist/matbea-ui.es9.js +0 -27
  158. package/dist/vite.svg +0 -1
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./matbea-ui.cjs68.js"),t=require("./matbea-ui.cjs69.js"),u=require("./matbea-ui.cjs70.js");var r;function o(){return r||(r=1,process.env.NODE_ENV==="production"?e.__module.exports=t.__require():e.__module.exports=u.__require()),e.__module.exports}exports.__require=o;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./matbea-ui.cjs74.js");var _;function x(){if(_)return e.__exports;_=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(l,r,t){var o=null;if(t!==void 0&&(o=""+t),r.key!==void 0&&(o=""+r.key),"key"in r){t={};for(var u in r)u!=="key"&&(t[u]=r[u])}else t=r;return r=t.ref,{$$typeof:n,type:l,key:o,ref:r!==void 0?r:null,props:t}}return e.__exports.Fragment=i,e.__exports.jsx=s,e.__exports.jsxs=s,e.__exports}exports.__require=x;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./matbea-ui.cjs38.js"),t=e.ContainerStyled;exports.Container=t;
@@ -1,6 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./matbea-ui.cjs75.js"),J=require("react");var j;function B(){return j||(j=1,process.env.NODE_ENV!=="production"&&(function(){function l(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===G?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case f:return"Fragment";case F:return"Profiler";case D:return"StrictMode";case U:return"Suspense";case q:return"SuspenseList";case V: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 $:return"Portal";case L:return e.displayName||"Context";case W:return(e._context.displayName||"Context")+".Consumer";case M:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z:return r=e.displayName||null,r!==null?r:l(e.type)||"Memo";case _:r=e._payload,e=e._init;try{return l(e(r))}catch{}}return null}function p(e){return""+e}function R(e){try{p(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,a=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.",a),p(e)}}function i(e){if(e===f)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===_)return"<...>";try{var r=l(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function N(){var e=m.A;return e===null?null:e.getOwner()}function T(){return Error("react-stack-top-frame")}function x(e){if(y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function C(e,r){function t(){S||(S=!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 Y(){var e=l(this.type);return A[e]||(A[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 I(e,r,t,a,u,b){var n=t.ref;return e={$$typeof:k,type:e,key:r,props:t,_owner:a},(n!==void 0?n:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:Y}):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:u}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:b}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function v(e,r,t,a,u,b){var n=r.children;if(n!==void 0)if(a)if(X(n)){for(a=0;a<n.length;a++)O(n[a]);Object.freeze&&Object.freeze(n)}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 O(n);if(y.call(r,"key")){n=l(e);var o=Object.keys(r).filter(function(K){return K!=="key"});a=0<o.length?"{key: someKey, "+o.join(": ..., ")+": ...}":"{key: someKey}",h[n+a]||(o=0<o.length?"{"+o.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
- let props = %s;
3
- <%s {...props} />
4
- React keys must be passed directly to JSX without using spread:
5
- let props = %s;
6
- <%s key={someKey} {...props} />`,a,n,o,n),h[n+a]=!0)}if(n=null,t!==void 0&&(R(t),n=""+t),x(r)&&(R(r.key),n=""+r.key),"key"in r){t={};for(var E in r)E!=="key"&&(t[E]=r[E])}else t=r;return n&&C(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),I(e,n,t,N(),u,b)}function O(e){g(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===_&&(e._payload.status==="fulfilled"?g(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function g(e){return typeof e=="object"&&e!==null&&e.$$typeof===k}var c=J,k=Symbol.for("react.transitional.element"),$=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),W=Symbol.for("react.consumer"),L=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),G=Symbol.for("react.client.reference"),m=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,y=Object.prototype.hasOwnProperty,X=Array.isArray,d=console.createTask?console.createTask:function(){return null};c={react_stack_bottom_frame:function(e){return e()}};var S,A={},w=c.react_stack_bottom_frame.bind(c,T)(),P=d(i(T)),h={};s.__exports.Fragment=f,s.__exports.jsx=function(e,r,t){var a=1e4>m.recentlyCreatedOwnerStacks++;return v(e,r,t,!1,a?Error("react-stack-top-frame"):w,a?d(i(e)):P)},s.__exports.jsxs=function(e,r,t){var a=1e4>m.recentlyCreatedOwnerStacks++;return v(e,r,t,!0,a?Error("react-stack-top-frame"):w,a?d(i(e)):P)}})()),s.__exports}exports.__require=B;
@@ -1,6 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("styled-components"),e=t.styled.button`
2
- border: none;
3
- background: none;
4
- cursor: pointer;
5
- padding: 0;
6
- `;exports.CopyButtonStyled=e;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./matbea-ui.cjs31.js"),s=require("./matbea-ui.cjs53.js"),r=t=>e.jsxRuntimeExports.jsxs(s.Icon,{...t,children:[e.jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"#5E6F8D","stroke-width":"2"}),e.jsxRuntimeExports.jsx("path",{d:"M7 12L10.3333 15L17 9",stroke:"#5E6F8D","stroke-width":"2"})]});exports.CheckIcon=r;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./matbea-ui.cjs31.js"),o=require("./matbea-ui.cjs53.js"),t=C=>e.jsxRuntimeExports.jsx(o.Icon,{...C,viewBox:"0 0 18 18",children:e.jsxRuntimeExports.jsx("path",{d:"M10.4999 16.5H2.9999C2.59796 16.514 2.20826 16.3604 1.92387 16.076C1.63948 15.7916 1.48593 15.4019 1.4999 15V7.50001C1.48593 7.09807 1.63948 6.70837 1.92387 6.42399C2.20826 6.1396 2.59796 5.98605 2.9999 6.00002H5.9999V3.00002C5.98593 2.59807 6.13948 2.20837 6.42387 1.92399C6.70826 1.6396 7.09796 1.48605 7.49991 1.50002H14.9999C15.4018 1.48605 15.7915 1.6396 16.0759 1.92399C16.3603 2.20837 16.5139 2.59807 16.4999 3.00002V10.5C16.5136 10.9019 16.36 11.2915 16.0757 11.5758C15.7914 11.8601 15.4018 12.0137 14.9999 12H11.9999V15C12.0136 15.4019 11.86 15.7915 11.5757 16.0758C11.2914 16.3601 10.9018 16.5137 10.4999 16.5ZM2.9999 7.50001V15H10.4999V12H7.49991C7.09802 12.0137 6.70845 11.8601 6.42411 11.5758C6.13977 11.2915 5.98616 10.9019 5.9999 10.5V7.50001H2.9999ZM7.49991 3.00002V10.5H14.9999V3.00002H7.49991Z",fill:"#5E6F8D"})});exports.CopyIcon=t;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./matbea-ui.cjs31.js"),r=require("./matbea-ui.cjs39.js"),n=({count:e=0})=>t.jsxRuntimeExports.jsx(r.CounterStyled,{variant:"body-s-semibold",children:e});exports.Counter=n;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./matbea-ui.cjs31.js"),i=require("react"),l=require("./matbea-ui.cjs40.js"),x=require("./matbea-ui.cjs41.js"),m=require("./matbea-ui.cjs2.js"),j=({open:r,onToggle:s})=>{const[u,c]=i.useState(!1),e=r!==void 0,t=e?r:u,a=i.useCallback(()=>{const o=!t;e||c(o),s?.(o)},[e,t,s]);return n.jsxRuntimeExports.jsx(m.Button,{iconPosition:"only",variant:"tertiary",icon:t?n.jsxRuntimeExports.jsx(l.CloseIcon,{}):n.jsxRuntimeExports.jsx(x.HamburgerIcon,{}),size:"small",onClick:a})};exports.HamburgerButton=j;
@@ -1,10 +0,0 @@
1
- import { j as o } from "./matbea-ui.es31.js";
2
- import { LoaderDots as s, LoaderDot as r } from "./matbea-ui.es42.js";
3
- const e = () => /* @__PURE__ */ o.jsxs(s, { children: [
4
- /* @__PURE__ */ o.jsx(r, {}),
5
- /* @__PURE__ */ o.jsx(r, {}),
6
- /* @__PURE__ */ o.jsx(r, {})
7
- ] });
8
- export {
9
- e as Loader
10
- };
@@ -1,47 +0,0 @@
1
- import { j as t } from "./matbea-ui.es31.js";
2
- import { useId as k, useState as p, useCallback as j } from "react";
3
- import { RadioLabel as C, HiddenInput as g, VisualRadio as I, LabelText as R } from "./matbea-ui.es43.js";
4
- const y = ({
5
- checked: o,
6
- defaultChecked: d = !1,
7
- disabled: e = !1,
8
- name: h,
9
- value: u,
10
- label: r,
11
- onChange: s,
12
- className: l
13
- }) => {
14
- const c = k(), [m, x] = p(d), n = o !== void 0, i = n ? o : m, f = j(
15
- (a) => {
16
- e || (n || x(a.target.checked), s?.(a.target.checked));
17
- },
18
- [e, n, s]
19
- );
20
- return /* @__PURE__ */ t.jsxs(
21
- C,
22
- {
23
- className: l,
24
- htmlFor: c,
25
- disabled: e,
26
- children: [
27
- /* @__PURE__ */ t.jsx(
28
- g,
29
- {
30
- id: c,
31
- type: "radio",
32
- checked: i,
33
- onChange: f,
34
- disabled: e,
35
- name: h,
36
- value: u
37
- }
38
- ),
39
- /* @__PURE__ */ t.jsx(I, { $checked: i, $disabled: e }),
40
- r && /* @__PURE__ */ t.jsx(R, { variant: "button", children: r })
41
- ]
42
- }
43
- );
44
- };
45
- export {
46
- y as RadioButton
47
- };
@@ -1,178 +0,0 @@
1
- import { j as t } from "./matbea-ui.es31.js";
2
- import { forwardRef as J, useRef as L, useState as u, useMemo as Q, useCallback as h, useLayoutEffect as X, useEffect as Y } from "react";
3
- import { Wrapper as Z, Label as ee, FieldContainer as ne, LeadingIcon as te, Value as re, HiddenInput as oe, ErrorText as se, List as le, Option as ae, OptionIcon as ce } from "./matbea-ui.es44.js";
4
- import { Typography as ie } from "./matbea-ui.es4.js";
5
- const de = 8, ue = J(
6
- ({
7
- options: o,
8
- value: F,
9
- defaultValue: C,
10
- placeholder: M = "Text",
11
- label: O,
12
- error: p,
13
- disabled: s = !1,
14
- icon: R,
15
- name: T,
16
- onChange: $,
17
- onFocus: S,
18
- onBlur: B,
19
- className: V
20
- }, A) => {
21
- const w = L(null), v = L(null), x = L(null), [r, b] = u(!1), [H, g] = u(!1), [P, z] = u(C ?? ""), [f, a] = u(null), [m, K] = u({
22
- top: 0,
23
- left: 0,
24
- width: 0
25
- }), c = F ?? P, y = Q(
26
- () => o.find((e) => e.value === c),
27
- [o, c]
28
- ), E = !!p, N = !y, W = y?.label ?? M, D = h(() => {
29
- if (!v.current) return;
30
- const e = v.current.getBoundingClientRect();
31
- K({
32
- top: e.bottom + de,
33
- left: e.left,
34
- width: e.width
35
- });
36
- }, []);
37
- X(() => {
38
- if (!r) return;
39
- D();
40
- const e = () => D();
41
- return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
42
- window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
43
- };
44
- }, [r, D]);
45
- const i = h(() => {
46
- b(!1), a(null);
47
- }, []), d = h(() => {
48
- s || (b(!0), a((e) => {
49
- if (e !== null) return e;
50
- const n = o.findIndex(
51
- (l) => l.value === c
52
- );
53
- return n >= 0 ? n : 0;
54
- }));
55
- }, [s, o, c]), U = h(() => {
56
- r ? i() : d();
57
- }, [r, i, d]), k = (e) => {
58
- s || (z(e.value), $?.(e.value), i());
59
- }, _ = (e) => {
60
- if (!s)
61
- switch (e.key) {
62
- case "ArrowDown":
63
- e.preventDefault(), d(), a(
64
- (n) => n === null ? 0 : Math.min(n + 1, o.length - 1)
65
- );
66
- break;
67
- case "ArrowUp":
68
- e.preventDefault(), d(), a(
69
- (n) => n === null ? o.length - 1 : Math.max(n - 1, 0)
70
- );
71
- break;
72
- case "Enter":
73
- case " ":
74
- e.preventDefault(), r ? f !== null && o[f] && k(o[f]) : d();
75
- break;
76
- case "Escape":
77
- case "Tab":
78
- i();
79
- break;
80
- }
81
- };
82
- Y(() => {
83
- if (!r) return;
84
- const e = (n) => {
85
- const l = n.target, j = w.current && w.current.contains(l), I = x.current && x.current.contains(l);
86
- !j && !I && i();
87
- };
88
- return document.addEventListener("mousedown", e), () => {
89
- document.removeEventListener("mousedown", e);
90
- };
91
- }, [r, i]);
92
- const q = (e) => {
93
- g(!0), S?.(e);
94
- }, G = (e) => {
95
- g(!1), B?.(e);
96
- };
97
- return /* @__PURE__ */ t.jsxs(
98
- Z,
99
- {
100
- className: V,
101
- ref: w,
102
- onKeyDown: _,
103
- onFocus: q,
104
- onBlur: G,
105
- children: [
106
- O && /* @__PURE__ */ t.jsx(ee, { children: O }),
107
- /* @__PURE__ */ t.jsxs(
108
- ne,
109
- {
110
- ref: v,
111
- role: "button",
112
- tabIndex: s ? -1 : 0,
113
- "aria-haspopup": "listbox",
114
- "aria-expanded": r,
115
- "aria-invalid": E,
116
- "aria-disabled": s,
117
- $hasError: E,
118
- $disabled: s,
119
- "data-state": E ? "error" : r || H ? "active" : void 0,
120
- onClick: U,
121
- children: [
122
- R && /* @__PURE__ */ t.jsx(te, { children: R }),
123
- /* @__PURE__ */ t.jsx(re, { $placeholder: N, children: W }),
124
- /* @__PURE__ */ t.jsx(
125
- oe,
126
- {
127
- ref: A,
128
- readOnly: !0,
129
- name: T,
130
- value: c,
131
- tabIndex: -1,
132
- "aria-hidden": !0
133
- }
134
- )
135
- ]
136
- }
137
- ),
138
- p && /* @__PURE__ */ t.jsx(se, { children: p }),
139
- r && /* @__PURE__ */ t.jsx(
140
- le,
141
- {
142
- ref: x,
143
- role: "listbox",
144
- $top: m.top,
145
- $left: m.left,
146
- $width: m.width,
147
- children: o.map((e, n) => {
148
- const l = e.value === c, j = n === f;
149
- return /* @__PURE__ */ t.jsxs(
150
- ae,
151
- {
152
- role: "option",
153
- "aria-selected": l,
154
- "data-active": l || void 0,
155
- "data-hovered": j || void 0,
156
- onMouseEnter: () => a(n),
157
- onMouseLeave: () => a(null),
158
- onMouseDown: (I) => I.preventDefault(),
159
- onClick: () => k(e),
160
- children: [
161
- e.icon && /* @__PURE__ */ t.jsx(ce, { children: e.icon }),
162
- /* @__PURE__ */ t.jsx(ie, { variant: "form-input", children: e.label })
163
- ]
164
- },
165
- e.value
166
- );
167
- })
168
- }
169
- )
170
- ]
171
- }
172
- );
173
- }
174
- );
175
- ue.displayName = "SelectField";
176
- export {
177
- ue as SelectField
178
- };
@@ -1,188 +0,0 @@
1
- import { j as T } from "./matbea-ui.es31.js";
2
- import { useState as q, useRef as d, useId as pt, useMemo as wt, useCallback as I, useLayoutEffect as bt, useEffect as K } from "react";
3
- import { TooltipWrapper as gt, TooltipTrigger as vt, TooltipBubble as Tt, TooltipContentText as Et, TooltipArrow as Lt } from "./matbea-ui.es45.js";
4
- const o = 8, l = 12, V = 12, xt = {
5
- top: ["top", "bottom", "right", "left"],
6
- bottom: ["bottom", "top", "right", "left"],
7
- left: ["left", "right", "top", "bottom"],
8
- right: ["right", "left", "top", "bottom"]
9
- }, M = (p, A, a) => Math.min(Math.max(p, A), a), kt = ({
10
- content: p,
11
- children: A,
12
- position: a = "top",
13
- open: Y,
14
- defaultOpen: Z = !1,
15
- onOpenChange: B,
16
- showDelay: X = 150,
17
- hideDelay: _ = 150,
18
- interactive: j = !1,
19
- disabled: c = !1,
20
- hideOnClick: J = !1,
21
- maxWidth: E
22
- }) => {
23
- const [Q, tt] = q(Z), P = typeof Y == "boolean", i = P ? !!Y : Q, H = d(null), L = d(null), w = d(null), x = d(null), R = d(null), u = d(null), N = pt(), S = wt(
24
- () => ({
25
- top: -9999,
26
- left: -9999,
27
- arrowX: 0,
28
- arrowY: 0,
29
- placement: a
30
- }),
31
- [a]
32
- ), [f, W] = q(S), y = () => {
33
- x.current && (clearTimeout(x.current), x.current = null), R.current && (clearTimeout(R.current), R.current = null);
34
- }, s = I(
35
- (e) => {
36
- P || tt(e), e || W(S), B?.(e);
37
- },
38
- [S, P, B]
39
- ), D = I(() => {
40
- c || (y(), x.current = setTimeout(() => s(!0), X));
41
- }, [c, s, X]), $ = I(() => {
42
- c || (y(), R.current = setTimeout(() => s(!1), _));
43
- }, [c, s, _]), et = () => {
44
- c || D();
45
- }, nt = () => {
46
- c || $();
47
- }, rt = () => {
48
- c || D();
49
- }, ot = () => {
50
- c || $();
51
- }, ct = () => {
52
- J && s(!1);
53
- }, it = () => {
54
- j && y();
55
- }, st = () => {
56
- j && $();
57
- }, G = I(() => {
58
- if (typeof window > "u" || !L.current || !w.current)
59
- return;
60
- const e = L.current.getBoundingClientRect(), t = w.current.getBoundingClientRect(), r = window.innerWidth, h = window.innerHeight, m = e.left + e.width / 2, z = e.top + e.height / 2, lt = (n) => {
61
- switch (n) {
62
- case "top":
63
- return e.top >= t.height + l + o;
64
- case "bottom":
65
- return h - e.bottom >= t.height + l + o;
66
- case "left":
67
- return e.left >= t.width + l + o;
68
- case "right":
69
- return r - e.right >= t.width + l + o;
70
- default:
71
- return !0;
72
- }
73
- }, b = xt[a].find((n) => lt(n)) ?? a;
74
- let g = 0, v = 0;
75
- switch (b) {
76
- case "top":
77
- g = e.top - t.height - l, v = m - t.width / 2;
78
- break;
79
- case "bottom":
80
- g = e.bottom + l, v = m - t.width / 2;
81
- break;
82
- case "left":
83
- g = z - t.height / 2, v = e.left - t.width - l;
84
- break;
85
- case "right":
86
- default:
87
- g = z - t.height / 2, v = e.right + l;
88
- break;
89
- }
90
- const at = Math.max(r - o * 2, 0), ut = Math.max(h - o * 2, 0), ft = o, ht = r - t.width - o, mt = o, dt = h - t.height - o, C = t.width >= at ? o : M(v, ft, ht), F = t.height >= ut ? o : M(g, mt, dt);
91
- let O = 0, k = 0;
92
- if (b === "top" || b === "bottom") {
93
- const n = Math.max(t.width / 2 - V, 0);
94
- O = M(
95
- m - (C + t.width / 2),
96
- -n,
97
- n
98
- ), k = 0;
99
- } else {
100
- const n = Math.max(t.height / 2 - V, 0);
101
- k = M(
102
- z - (F + t.height / 2),
103
- -n,
104
- n
105
- ), O = 0;
106
- }
107
- W((n) => n.top === F && n.left === C && n.arrowX === O && n.arrowY === k && n.placement === b ? n : {
108
- top: F,
109
- left: C,
110
- arrowX: O,
111
- arrowY: k,
112
- placement: b
113
- });
114
- }, [a]);
115
- bt(() => {
116
- if (!i)
117
- return;
118
- const e = w.current, t = L.current;
119
- if (!e || !t) return;
120
- const r = () => {
121
- u.current !== null && cancelAnimationFrame(u.current), u.current = window.requestAnimationFrame(() => {
122
- u.current = null, G();
123
- });
124
- };
125
- r();
126
- const m = typeof window < "u" && "ResizeObserver" in window ? new ResizeObserver(r) : null;
127
- return m?.observe(e), m?.observe(t), window.addEventListener("resize", r), window.addEventListener("scroll", r, !0), () => {
128
- window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0), m?.disconnect(), u.current !== null && (cancelAnimationFrame(u.current), u.current = null);
129
- };
130
- }, [i, G]), K(() => y, []), K(() => {
131
- if (!i) return;
132
- const e = (r) => {
133
- r.key === "Escape" && s(!1);
134
- }, t = (r) => {
135
- const h = r.target;
136
- H.current?.contains(h) || w.current?.contains(h) || s(!1);
137
- };
138
- return document.addEventListener("keydown", e), document.addEventListener("pointerdown", t), () => {
139
- document.removeEventListener("keydown", e), document.removeEventListener("pointerdown", t);
140
- };
141
- }, [i, s]);
142
- const U = {
143
- top: f.top,
144
- left: f.left,
145
- "--tooltip-arrow-x": `${f.arrowX}px`,
146
- "--tooltip-arrow-y": `${f.arrowY}px`
147
- };
148
- return E !== void 0 && (U.maxWidth = typeof E == "number" ? `${E}px` : E), /* @__PURE__ */ T.jsxs(gt, { ref: H, "data-disabled": c, children: [
149
- /* @__PURE__ */ T.jsx(
150
- vt,
151
- {
152
- ref: L,
153
- tabIndex: c ? -1 : 0,
154
- "aria-describedby": i ? N : void 0,
155
- onMouseEnter: et,
156
- onMouseLeave: nt,
157
- onFocus: rt,
158
- onBlur: ot,
159
- onClick: ct,
160
- "data-open": i,
161
- children: A
162
- }
163
- ),
164
- /* @__PURE__ */ T.jsxs(
165
- Tt,
166
- {
167
- ref: w,
168
- id: N,
169
- role: "tooltip",
170
- "aria-hidden": !i,
171
- $visible: i,
172
- $interactive: j,
173
- $placement: f.placement,
174
- style: U,
175
- "data-placement": f.placement,
176
- onMouseEnter: it,
177
- onMouseLeave: st,
178
- children: [
179
- ["string", "number"].includes(typeof p) ? /* @__PURE__ */ T.jsx(Et, { variant: "body-m", children: p }) : p,
180
- /* @__PURE__ */ T.jsx(Lt, { $placement: f.placement })
181
- ]
182
- }
183
- )
184
- ] });
185
- };
186
- export {
187
- kt as Tooltip
188
- };
@@ -1,12 +0,0 @@
1
- import { j as o } from "./matbea-ui.es31.js";
2
- import { maskEmail as t } from "./matbea-ui.es28.js";
3
- import { UserAccountStyled as m, UserAccountText as s } from "./matbea-ui.es46.js";
4
- import "react";
5
- import { UserIcon as e } from "./matbea-ui.es47.js";
6
- const a = ({ email: r }) => /* @__PURE__ */ o.jsxs(m, { children: [
7
- /* @__PURE__ */ o.jsx(e, {}),
8
- /* @__PURE__ */ o.jsx(s, { variant: "body-m-semibold", children: t(r) })
9
- ] });
10
- export {
11
- a as UserAccount
12
- };
@@ -1,31 +0,0 @@
1
- import { j as t } from "./matbea-ui.es31.js";
2
- import { useCallback as a } from "react";
3
- import { Tab as c } from "./matbea-ui.es48.js";
4
- import { TabRow as p } from "./matbea-ui.es49.js";
5
- const j = ({
6
- size: e = "m",
7
- activeId: i,
8
- items: m,
9
- onChange: r,
10
- className: s
11
- }) => {
12
- const l = a(
13
- (o) => {
14
- r(o);
15
- },
16
- [r]
17
- );
18
- return /* @__PURE__ */ t.jsx(p, { role: "tablist", className: s, children: m.map((o) => /* @__PURE__ */ t.jsx(
19
- c,
20
- {
21
- ...o,
22
- size: e,
23
- active: o.id === i,
24
- onSelect: l
25
- },
26
- o.id
27
- )) });
28
- };
29
- export {
30
- j as TabList
31
- };
@@ -1,25 +0,0 @@
1
- import { j as i } from "./matbea-ui.es31.js";
2
- import { TableStyled as t, TableHead as h, TableRow as r, TableHeader as s, TableBody as x, TableCell as j } from "./matbea-ui.es50.js";
3
- const p = ({ columns: a, data: l }) => /* @__PURE__ */ i.jsxs(t, { children: [
4
- /* @__PURE__ */ i.jsx(h, { children: /* @__PURE__ */ i.jsx(r, { children: a.map((e) => /* @__PURE__ */ i.jsx(
5
- s,
6
- {
7
- width: e.width,
8
- align: e.align || "left",
9
- children: e.name
10
- },
11
- e.id
12
- )) }) }),
13
- /* @__PURE__ */ i.jsx(x, { children: l.map((e) => /* @__PURE__ */ i.jsx(r, { children: a.map((d) => /* @__PURE__ */ i.jsx(
14
- j,
15
- {
16
- width: d.width,
17
- align: d.align || "left",
18
- children: d.render ? d.render(e) : e[d.id]
19
- },
20
- d.id
21
- )) }, e.id)) })
22
- ] });
23
- export {
24
- p as Table
25
- };
@@ -1,40 +0,0 @@
1
- import { j as c } from "./matbea-ui.es31.js";
2
- import { useId as p, useState as j, useCallback as a } from "react";
3
- import { SwitcherRoot as w, Track as I, Thumb as y } from "./matbea-ui.es51.js";
4
- const g = ({
5
- checked: s,
6
- defaultChecked: l = !1,
7
- disabled: e = !1,
8
- onChange: i,
9
- id: u,
10
- className: f
11
- }) => {
12
- const h = p(), m = u ?? h, r = s !== void 0, [x, d] = j(l), o = r ? s : x, n = a(() => {
13
- if (e) return;
14
- const t = !o;
15
- r || d(t), i?.(t);
16
- }, [o, r, e, i]), k = a(
17
- (t) => {
18
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), n());
19
- },
20
- [n]
21
- );
22
- return /* @__PURE__ */ c.jsx(w, { className: f, children: /* @__PURE__ */ c.jsx(
23
- I,
24
- {
25
- id: m,
26
- role: "switch",
27
- "aria-checked": o,
28
- "aria-disabled": e,
29
- tabIndex: e ? -1 : 0,
30
- onClick: n,
31
- onKeyDown: k,
32
- disabled: e,
33
- $checked: o,
34
- children: /* @__PURE__ */ c.jsx(y, { $checked: o, $disabled: e })
35
- }
36
- ) });
37
- };
38
- export {
39
- g as Switcher
40
- };
@@ -1,43 +0,0 @@
1
- import { j as t } from "./matbea-ui.es31.js";
2
- import { useId as L, useState as m, useCallback as p } from "react";
3
- import { Label as C, HiddenInput as j, Box as u, CheckIcon as I } from "./matbea-ui.es52.js";
4
- const b = ({
5
- checked: n,
6
- defaultChecked: i = !1,
7
- disabled: e = !1,
8
- name: d,
9
- value: x,
10
- onChange: r,
11
- className: f
12
- }) => {
13
- const s = L(), c = n !== void 0, [l, a] = m(i), o = c ? n : l, k = p(
14
- (h) => {
15
- e || (c || a(h.target.checked), r?.(h.target.checked));
16
- },
17
- [e, c, r]
18
- );
19
- return /* @__PURE__ */ t.jsxs(C, { htmlFor: s, disabled: e, className: f, children: [
20
- /* @__PURE__ */ t.jsx(
21
- j,
22
- {
23
- id: s,
24
- type: "checkbox",
25
- checked: o,
26
- disabled: e,
27
- onChange: k,
28
- name: d,
29
- value: x
30
- }
31
- ),
32
- /* @__PURE__ */ t.jsx(u, { $checked: o, $disabled: e, children: o && /* @__PURE__ */ t.jsx(I, { viewBox: "0 0 15 11", children: /* @__PURE__ */ t.jsx(
33
- "path",
34
- {
35
- d: "M5.00034 11L0 6.18738L1.42838 4.81262L5.00185 8.24806L5.00034 8.24951L13.5716 0L15 1.37476L6.42872 9.62524L5.00135 10.999L5.00034 11Z",
36
- fill: "#fff"
37
- }
38
- ) }) })
39
- ] });
40
- };
41
- export {
42
- b as Checkbox
43
- };