ymy-components 0.0.16 → 0.0.18

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.
@@ -28,4 +28,9 @@ export type BannerButtonProps = {
28
28
  * - 'secondary' for the secondary styling.
29
29
  */
30
30
  buttonType?: 'primary' | 'secondary';
31
+ /**
32
+ * Optional click handler. If provided, this function will be executed
33
+ * when the button is clicked. If omitted, a default action may be used.
34
+ */
35
+ onClick?: () => void;
31
36
  };
package/dist/index.cjs.js CHANGED
@@ -130,18 +130,19 @@ See https://s-c.sh/2BAXzed for more info.`),window[nr]+=1);const Gu=Yu`
130
130
  @media (min-width: 640px) {
131
131
  margin-right: 0.25rem;
132
132
  }
133
- `;var ks={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},no=N.createContext&&N.createContext(ks),Ju=["attr","size","title"];function Zu(e,t){if(e==null)return{};var r=el(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function el(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function wr(){return wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wr.apply(this,arguments)}function io(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _r(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?io(Object(r),!0).forEach(function(n){tl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):io(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tl(e,t,r){return t=rl(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rl(e){var t=nl(e,"string");return typeof t=="symbol"?t:t+""}function nl(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ps(e){return e&&e.map((t,r)=>N.createElement(t.tag,_r({key:r},t.attr),Ps(t.child)))}function zr(e){return t=>N.createElement(il,wr({attr:_r({},e.attr)},t),Ps(e.child))}function il(e){var t=r=>{var{attr:n,size:i,title:o}=e,s=Zu(e,Ju),a=i||r.size||"1em",u;return r.className&&(u=r.className),e.className&&(u=(u?u+" ":"")+e.className),N.createElement("svg",wr({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,s,{className:u,style:_r(_r({color:e.color||r.color},r.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&N.createElement("title",null,o),e.children)};return no!==void 0?N.createElement(no.Consumer,null,r=>t(r)):t(ks)}function ol(e){return zr({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function sl(e){return zr({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"22",y1:"2",x2:"11",y2:"13"},child:[]},{tag:"polygon",attr:{points:"22 2 15 22 11 13 2 9 22 2"},child:[]}]})(e)}const al=({iconComponent:e,buttonText:t,buttonType:r="primary"})=>{let n;return e==="plus"?n=K.jsx(ol,{}):e==="send"&&(n=K.jsx(sl,{})),K.jsx(Ku,{children:K.jsxs(Qu,{className:r,children:[K.jsx(Xu,{children:n}),K.jsx(Zo,{textStyles:{minWidth:"3rem"},content:t,animate:!0})]})})},cl=gt(Jo.div)`
134
- width: 2.5rem; /* Equivalent to Tailwind's w-10 */
135
- height: 2.5rem; /* Equivalent to Tailwind's h-10 */
136
- border-radius: 50%; /* Tailwind's rounded-full */
137
- border: 1px solid white; /* Tailwind's border border-white */
133
+ `;var ks={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},no=N.createContext&&N.createContext(ks),Ju=["attr","size","title"];function Zu(e,t){if(e==null)return{};var r=el(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function el(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function wr(){return wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wr.apply(this,arguments)}function io(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _r(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?io(Object(r),!0).forEach(function(n){tl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):io(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tl(e,t,r){return t=rl(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rl(e){var t=nl(e,"string");return typeof t=="symbol"?t:t+""}function nl(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ps(e){return e&&e.map((t,r)=>N.createElement(t.tag,_r({key:r},t.attr),Ps(t.child)))}function zr(e){return t=>N.createElement(il,wr({attr:_r({},e.attr)},t),Ps(e.child))}function il(e){var t=r=>{var{attr:n,size:i,title:o}=e,s=Zu(e,Ju),a=i||r.size||"1em",u;return r.className&&(u=r.className),e.className&&(u=(u?u+" ":"")+e.className),N.createElement("svg",wr({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,s,{className:u,style:_r(_r({color:e.color||r.color},r.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&N.createElement("title",null,o),e.children)};return no!==void 0?N.createElement(no.Consumer,null,r=>t(r)):t(ks)}function ol(e){return zr({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function sl(e){return zr({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"22",y1:"2",x2:"11",y2:"13"},child:[]},{tag:"polygon",attr:{points:"22 2 15 22 11 13 2 9 22 2"},child:[]}]})(e)}const al=({iconComponent:e,buttonText:t,buttonType:r="primary",onClick:n})=>{let i;e==="plus"?i=K.jsx(ol,{}):e==="send"&&(i=K.jsx(sl,{}));const o=()=>{n&&n()};return K.jsx(Ku,{onClick:o,children:K.jsxs(Qu,{className:r,children:[K.jsx(Xu,{children:i}),K.jsx(Zo,{textStyles:{minWidth:"3rem"},content:t,animate:!0})]})})},cl=gt(Jo.div)`
134
+ width: 2.5rem;
135
+ height: 2.5rem;
136
+ border-radius: 50%;
137
+ border: 1px solid white;
138
138
  display: flex;
139
139
  align-items: center;
140
140
  justify-content: center;
141
- cursor: pointer; /* Optional: for pointer cursor on hover */
141
+ cursor: pointer;
142
142
  `,ul=gt.span`
143
- color: black; /* Tailwind's text-black */
144
- font-size: 1.125rem; /* Tailwind's text-lg */
143
+ display: flex;
144
+ color: black;
145
+ font-size: 1.125rem;
145
146
  `;function ll(e){return zr({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"},child:[]}]})(e)}function fl(e){return zr({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 .5A.5.5 0 0 1 .5 0h3a.5.5 0 0 1 0 1H1v2.5a.5.5 0 0 1-1 0zm12 0a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0V1h-2.5a.5.5 0 0 1-.5-.5M.5 12a.5.5 0 0 1 .5.5V15h2.5a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 .5-.5m15 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1 0-1H15v-2.5a.5.5 0 0 1 .5-.5M4 4h1v1H4z"},child:[]},{tag:"path",attr:{d:"M7 2H2v5h5zM3 3h3v3H3zm2 8H4v1h1z"},child:[]},{tag:"path",attr:{d:"M7 9H2v5h5zm-4 1h3v3H3zm8-6h1v1h-1z"},child:[]},{tag:"path",attr:{d:"M9 2h5v5H9zm1 1v3h3V3zM8 8v2h1v1H8v1h2v-2h1v2h1v-1h2v-1h-3V8zm2 2H9V9h1zm4 2h-1v1h-2v1h3zm-4 2v-1H8v1z"},child:[]},{tag:"path",attr:{d:"M12 9h2V8h-2z"},child:[]}]})(e)}const dl=({iconComponent:e,onClick:t})=>{const r=Qo({from:{opacity:0,transform:"scale(0.5)"},to:{opacity:1,transform:"scale(1)"}}),n=()=>{t&&t()};let i;return e==="person"?i=K.jsx(ll,{}):e==="qr"&&(i=K.jsx(fl,{})),K.jsx(cl,{style:r,onClick:n,children:K.jsx(ul,{children:i})})};function G(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var hl=typeof Symbol=="function"&&Symbol.observable||"@@observable",oo=hl,an=()=>Math.random().toString(36).substring(7).split("").join("."),pl={INIT:`@@redux/INIT${an()}`,REPLACE:`@@redux/REPLACE${an()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${an()}`},We=pl;function Gt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ml(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(vl(e))return"date";if(gl(e))return"error";const r=yl(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function yl(e){return typeof e.constructor=="function"?e.constructor.name:null}function gl(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function vl(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function De(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=ml(e)),t}function Ns(e,t,r){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?G(2):`Expected the root reducer to be a function. Instead, received: '${De(e)}'`);if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?G(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?G(1):`Expected the enhancer to be a function. Instead, received: '${De(r)}'`);return r(Ns)(e,t)}let n=e,i=t,o=new Map,s=o,a=0,u=!1;function l(){s===o&&(s=new Map,o.forEach((w,v)=>{s.set(v,w)}))}function f(){if(u)throw new Error(process.env.NODE_ENV==="production"?G(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function d(w){if(typeof w!="function")throw new Error(process.env.NODE_ENV==="production"?G(4):`Expected the listener to be a function. Instead, received: '${De(w)}'`);if(u)throw new Error(process.env.NODE_ENV==="production"?G(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let v=!0;l();const b=a++;return s.set(b,w),function(){if(v){if(u)throw new Error(process.env.NODE_ENV==="production"?G(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");v=!1,l(),s.delete(b),o=null}}}function h(w){if(!Gt(w))throw new Error(process.env.NODE_ENV==="production"?G(7):`Actions must be plain objects. Instead, the actual type was: '${De(w)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof w.type>"u")throw new Error(process.env.NODE_ENV==="production"?G(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof w.type!="string")throw new Error(process.env.NODE_ENV==="production"?G(17):`Action "type" property must be a string. Instead, the actual type was: '${De(w.type)}'. Value was: '${w.type}' (stringified)`);if(u)throw new Error(process.env.NODE_ENV==="production"?G(9):"Reducers may not dispatch actions.");try{u=!0,i=n(i,w)}finally{u=!1}return(o=s).forEach(b=>{b()}),w}function p(w){if(typeof w!="function")throw new Error(process.env.NODE_ENV==="production"?G(10):`Expected the nextReducer to be a function. Instead, received: '${De(w)}`);n=w,h({type:We.REPLACE})}function y(){const w=d;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(process.env.NODE_ENV==="production"?G(11):`Expected the observer to be an object. Instead, received: '${De(v)}'`);function b(){const S=v;S.next&&S.next(f())}return b(),{unsubscribe:w(b)}},[oo](){return this}}}return h({type:We.INIT}),{dispatch:h,subscribe:d,getState:f,replaceReducer:p,[oo]:y}}function so(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function bl(e,t,r,n){const i=Object.keys(t),o=r&&r.type===We.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Gt(e))return`The ${o} has unexpected type of "${De(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const s=Object.keys(e).filter(a=>!t.hasOwnProperty(a)&&!n[a]);if(s.forEach(a=>{n[a]=!0}),!(r&&r.type===We.REPLACE)&&s.length>0)return`Unexpected ${s.length>1?"keys":"key"} "${s.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function wl(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:We.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?G(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:We.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?G(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${We.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function Rs(e){const t=Object.keys(e),r={};for(let s=0;s<t.length;s++){const a=t[s];process.env.NODE_ENV!=="production"&&typeof e[a]>"u"&&so(`No reducer provided for key "${a}"`),typeof e[a]=="function"&&(r[a]=e[a])}const n=Object.keys(r);let i;process.env.NODE_ENV!=="production"&&(i={});let o;try{wl(r)}catch(s){o=s}return function(a={},u){if(o)throw o;if(process.env.NODE_ENV!=="production"){const d=bl(a,r,u,i);d&&so(d)}let l=!1;const f={};for(let d=0;d<n.length;d++){const h=n[d],p=r[h],y=a[h],E=p(y,u);if(typeof E>"u"){const w=u&&u.type;throw new Error(process.env.NODE_ENV==="production"?G(14):`When called with an action of type ${w?`"${String(w)}"`:"(unknown type)"}, the slice reducer for key "${h}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}f[h]=E,l=l||E!==y}return l=l||n.length!==Object.keys(a).length,l?f:a}}function Er(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function _l(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error(process.env.NODE_ENV==="production"?G(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const s={getState:i.getState,dispatch:(u,...l)=>o(u,...l)},a=e.map(u=>u(s));return o=Er(...a)(i.dispatch),{...i,dispatch:o}}}function Cs(e){return Gt(e)&&"type"in e&&typeof e.type=="string"}var As=Symbol.for("immer-nothing"),ao=Symbol.for("immer-draftable"),ne=Symbol.for("immer-state"),El=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function ee(e,...t){if(process.env.NODE_ENV!=="production"){const r=El[e],n=typeof r=="function"?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ht=Object.getPrototypeOf;function Ke(e){return!!e&&!!e[ne]}function ke(e){var t;return e?Ts(e)||Array.isArray(e)||!!e[ao]||!!((t=e.constructor)!=null&&t[ao])||Br(e)||Lr(e):!1}var Sl=Object.prototype.constructor.toString();function Ts(e){if(!e||typeof e!="object")return!1;const t=ht(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===Sl}function Sr(e,t){Ur(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Ur(e){const t=e[ne];return t?t.type_:Array.isArray(e)?1:Br(e)?2:Lr(e)?3:0}function Nn(e,t){return Ur(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ds(e,t,r){const n=Ur(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Ol(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Br(e){return e instanceof Map}function Lr(e){return e instanceof Set}function Fe(e){return e.copy_||e.base_}function Rn(e,t){if(Br(e))return new Map(e);if(Lr(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=Ts(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[ne];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const s=i[o],a=n[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(ht(e),n)}else{const n=ht(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function ti(e,t=!1){return qr(e)||Ke(e)||!ke(e)||(Ur(e)>1&&(e.set=e.add=e.clear=e.delete=xl),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>ti(n,!0))),e}function xl(){ee(2)}function qr(e){return Object.isFrozen(e)}var kl={};function Qe(e){const t=kl[e];return t||ee(0,e),t}var Lt;function Is(){return Lt}function Pl(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function co(e,t){t&&(Qe("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Cn(e){An(e),e.drafts_.forEach(Nl),e.drafts_=null}function An(e){e===Lt&&(Lt=e.parent_)}function uo(e){return Lt=Pl(Lt,e)}function Nl(e){const t=e[ne];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lo(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[ne].modified_&&(Cn(t),ee(4)),ke(e)&&(e=Or(t,e),t.parent_||xr(t,e)),t.patches_&&Qe("Patches").generateReplacementPatches_(r[ne].base_,e,t.patches_,t.inversePatches_)):e=Or(t,r,[]),Cn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==As?e:void 0}function Or(e,t,r){if(qr(t))return t;const n=t[ne];if(!n)return Sr(t,(i,o)=>fo(e,n,t,i,o,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return xr(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let o=i,s=!1;n.type_===3&&(o=new Set(i),i.clear(),s=!0),Sr(o,(a,u)=>fo(e,n,i,a,u,r,s)),xr(e,i,!1),r&&e.patches_&&Qe("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function fo(e,t,r,n,i,o,s){if(process.env.NODE_ENV!=="production"&&i===r&&ee(5),Ke(i)){const a=o&&t&&t.type_!==3&&!Nn(t.assigned_,n)?o.concat(n):void 0,u=Or(e,i,a);if(Ds(r,n,u),Ke(u))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(ke(i)&&!qr(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Or(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&xr(e,i)}}function xr(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ti(t,r)}function Rl(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Is(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=ri;r&&(i=[n],o=qt);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return n.draft_=a,n.revoke_=s,a}var ri={get(e,t){if(t===ne)return e;const r=Fe(e);if(!Nn(r,t))return Cl(e,r,t);const n=r[t];return e.finalized_||!ke(n)?n:n===cn(e.base_,t)?(un(e),e.copy_[t]=Dn(n,e)):n},has(e,t){return t in Fe(e)},ownKeys(e){return Reflect.ownKeys(Fe(e))},set(e,t,r){const n=js(Fe(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=cn(Fe(e),t),o=i==null?void 0:i[ne];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Ol(r,i)&&(r!==void 0||Nn(e.base_,t)))return!0;un(e),Tn(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return cn(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,un(e),Tn(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Fe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){ee(11)},getPrototypeOf(e){return ht(e.base_)},setPrototypeOf(){ee(12)}},qt={};Sr(ri,(e,t)=>{qt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qt.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&ee(13),qt.set.call(this,e,t,void 0)};qt.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&ee(14),ri.set.call(this,e[0],t,r,e[0])};function cn(e,t){const r=e[ne];return(r?Fe(r):e)[t]}function Cl(e,t,r){var i;const n=js(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function js(e,t){if(!(t in e))return;let r=ht(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ht(r)}}function Tn(e){e.modified_||(e.modified_=!0,e.parent_&&Tn(e.parent_))}function un(e){e.copy_||(e.copy_=Rn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Al=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const s=this;return function(u=o,...l){return s.produce(u,f=>r.call(this,f,...l))}}typeof r!="function"&&ee(6),n!==void 0&&typeof n!="function"&&ee(7);let i;if(ke(t)){const o=uo(this),s=Dn(t,void 0);let a=!0;try{i=r(s),a=!1}finally{a?Cn(o):An(o)}return co(o,n),lo(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===As&&(i=void 0),this.autoFreeze_&&ti(i,!0),n){const o=[],s=[];Qe("Patches").generateReplacementPatches_(t,i,o,s),n(o,s)}return i}else ee(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,u=>t(u,...a));let n,i;return[this.produce(t,r,(s,a)=>{n=s,i=a}),n,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ke(e)||ee(8),Ke(e)&&(e=Tl(e));const t=uo(this),r=Dn(e,void 0);return r[ne].isManual_=!0,An(t),r}finishDraft(e,t){const r=e&&e[ne];(!r||!r.isManual_)&&ee(9);const{scope_:n}=r;return co(n,t),lo(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=Qe("Patches").applyPatches_;return Ke(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Dn(e,t){const r=Br(e)?Qe("MapSet").proxyMap_(e,t):Lr(e)?Qe("MapSet").proxySet_(e,t):Rl(e,t);return(t?t.scope_:Is()).drafts_.push(r),r}function Tl(e){return Ke(e)||ee(10,e),Vs(e)}function Vs(e){if(!ke(e)||qr(e))return e;const t=e[ne];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Rn(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Rn(e,!0);return Sr(r,(n,i)=>{Ds(r,n,Vs(i))}),t&&(t.finalized_=!1),r}var ie=new Al,$s=ie.produce;ie.produceWithPatches.bind(ie);ie.setAutoFreeze.bind(ie);ie.setUseStrictShallowCopy.bind(ie);ie.applyPatches.bind(ie);ie.createDraft.bind(ie);ie.finishDraft.bind(ie);function Ms(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var Dl=Ms(),Il=Ms,jl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Er:Er.apply(null,arguments)},Vl=e=>e&&typeof e.match=="function";function ho(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(process.env.NODE_ENV==="production"?U(0):"prepareAction did not return an object");return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Cs(n)&&n.type===e,r}function $l(e){return typeof e=="function"&&"type"in e&&Vl(e)}function Ml(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
146
147
  Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${r}())\` instead of \`dispatch(${r})\`. This is necessary even if the action has no payload.`}function Fl(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=$l}=e;return()=>r=>n=>(t(n)&&console.warn(Ml(n.type)),r(n))}function Fs(e,t){let r=0;return{measureTime(n){const i=Date.now();try{return n()}finally{const o=Date.now();r+=o-i}},warnIfExceeded(){r>e&&console.warn(`${t} took ${r}ms, which is more than the warning threshold of ${e}ms.
147
148
  If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
package/dist/index.es.js CHANGED
@@ -4199,25 +4199,31 @@ function ml(e) {
4199
4199
  const bf = ({
4200
4200
  iconComponent: e,
4201
4201
  buttonText: t,
4202
- buttonType: r = "primary"
4202
+ buttonType: r = "primary",
4203
+ onClick: n
4203
4204
  }) => {
4204
- let n;
4205
- return e === "plus" ? n = /* @__PURE__ */ G.jsx(pl, {}) : e === "send" && (n = /* @__PURE__ */ G.jsx(ml, {})), /* @__PURE__ */ G.jsx(il, { children: /* @__PURE__ */ G.jsxs(ol, { className: r, children: [
4206
- /* @__PURE__ */ G.jsx(sl, { children: n }),
4205
+ let i;
4206
+ e === "plus" ? i = /* @__PURE__ */ G.jsx(pl, {}) : e === "send" && (i = /* @__PURE__ */ G.jsx(ml, {}));
4207
+ const o = () => {
4208
+ n && n();
4209
+ };
4210
+ return /* @__PURE__ */ G.jsx(il, { onClick: o, children: /* @__PURE__ */ G.jsxs(ol, { className: r, children: [
4211
+ /* @__PURE__ */ G.jsx(sl, { children: i }),
4207
4212
  /* @__PURE__ */ G.jsx(Qc, { textStyles: { minWidth: "3rem" }, content: t, animate: !0 })
4208
4213
  ] }) });
4209
4214
  }, yl = bt(is.div)`
4210
- width: 2.5rem; /* Equivalent to Tailwind's w-10 */
4211
- height: 2.5rem; /* Equivalent to Tailwind's h-10 */
4212
- border-radius: 50%; /* Tailwind's rounded-full */
4213
- border: 1px solid white; /* Tailwind's border border-white */
4215
+ width: 2.5rem;
4216
+ height: 2.5rem;
4217
+ border-radius: 50%;
4218
+ border: 1px solid white;
4214
4219
  display: flex;
4215
4220
  align-items: center;
4216
4221
  justify-content: center;
4217
- cursor: pointer; /* Optional: for pointer cursor on hover */
4222
+ cursor: pointer;
4218
4223
  `, gl = bt.span`
4219
- color: black; /* Tailwind's text-black */
4220
- font-size: 1.125rem; /* Tailwind's text-lg */
4224
+ display: flex;
4225
+ color: black;
4226
+ font-size: 1.125rem;
4221
4227
  `;
4222
4228
  function vl(e) {
4223
4229
  return qr({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z" }, child: [] }] })(e);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ymy-components",
3
3
  "private": false,
4
- "version": "0.0.16",
4
+ "version": "0.0.18",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.es.js",