@rinzai/zen 0.0.9 → 0.0.11
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/badge/index.d.ts +19 -0
- package/dist/badge/index.d.ts.map +1 -0
- package/dist/badge/index.stories.d.ts +4 -0
- package/dist/badge/index.stories.d.ts.map +1 -0
- package/dist/button/index.d.ts +5 -6
- package/dist/button/index.d.ts.map +1 -1
- package/dist/button/{Button.stories.d.ts → index.stories.d.ts} +1 -1
- package/dist/button/index.stories.d.ts.map +1 -0
- package/dist/collapse/index.d.ts +16 -0
- package/dist/collapse/index.d.ts.map +1 -0
- package/dist/collapse/index.stories.d.ts +4 -0
- package/dist/collapse/index.stories.d.ts.map +1 -0
- package/dist/component/index.d.ts +6 -9
- package/dist/component/index.d.ts.map +1 -1
- package/dist/component/index.stories.d.ts +25 -0
- package/dist/component/index.stories.d.ts.map +1 -0
- package/dist/container/index.d.ts +3 -2
- package/dist/container/index.d.ts.map +1 -1
- package/dist/{component/Component.stories.d.ts → container/index.stories.d.ts} +3 -3
- package/dist/container/index.stories.d.ts.map +1 -0
- package/dist/dropdown/index.d.ts +20 -0
- package/dist/dropdown/index.d.ts.map +1 -0
- package/dist/dropdown/index.stories.d.ts +7 -0
- package/dist/dropdown/index.stories.d.ts.map +1 -0
- package/dist/icons/chevron-down.d.ts +3 -0
- package/dist/icons/chevron-down.d.ts.map +1 -0
- package/dist/icons/chevron-up.d.ts +3 -0
- package/dist/icons/chevron-up.d.ts.map +1 -0
- package/dist/icons/icon.types.d.ts +4 -0
- package/dist/icons/icon.types.d.ts.map +1 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/search.d.ts +3 -0
- package/dist/icons/search.d.ts.map +1 -0
- package/dist/icons/x-mark.d.ts +3 -0
- package/dist/icons/x-mark.d.ts.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/input/index.d.ts +5 -0
- package/dist/input/index.d.ts.map +1 -0
- package/dist/input/index.stories.d.ts +4 -0
- package/dist/input/index.stories.d.ts.map +1 -0
- package/dist/popover/index.d.ts +20 -0
- package/dist/popover/index.d.ts.map +1 -0
- package/dist/toggle/index.d.ts +2 -2
- package/dist/toggle/index.d.ts.map +1 -1
- package/dist/toggle/{Toggle.Stories.d.ts → index.stories.d.ts} +1 -1
- package/dist/toggle/index.stories.d.ts.map +1 -0
- package/dist/utils/cva.d.ts +2 -2
- package/dist/utils/cva.d.ts.map +1 -1
- package/dist/utils/cx.d.ts.map +1 -1
- package/dist/zen.js +3696 -0
- package/package.json +80 -84
- package/dist/button/Button.stories.d.ts.map +0 -1
- package/dist/component/Component.stories.d.ts.map +0 -1
- package/dist/container/Container.stories.d.ts +0 -21
- package/dist/container/Container.stories.d.ts.map +0 -1
- package/dist/style.css +0 -1
- package/dist/toggle/Toggle.Stories.d.ts.map +0 -1
- package/dist/zen.es.js +0 -743
- package/dist/zen.umd.js +0 -27
package/dist/zen.umd.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
(function(R,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],w):(R=typeof globalThis<"u"?globalThis:R||self,w(R.Zen={},R.React))})(this,function(R,w){"use strict";var G={exports:{}},Y={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.development.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ne;function Ae(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&function(){var f=w,l=Symbol.for("react.element"),a=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),C=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),F=Symbol.iterator,We="@@iterator";function Ye(e){if(e===null||typeof e!="object")return null;var r=F&&e[F]||e[We];return typeof r=="function"?r:null}var N=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Ve("error",e,t)}}function Ve(e,r,t){{var n=N.ReactDebugCurrentFrame,u=n.getStackAddendum();u!==""&&(r+="%s",t=t.concat([u]));var s=t.map(function(o){return String(o)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var $e=!1,Le=!1,Me=!1,Ue=!1,Be=!1,se;se=Symbol.for("react.module.reference");function ze(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===b||Be||e===y||e===p||e===v||Ue||e===A||$e||Le||Me||typeof e=="object"&&e!==null&&(e.$$typeof===x||e.$$typeof===h||e.$$typeof===P||e.$$typeof===C||e.$$typeof===g||e.$$typeof===se||e.getModuleId!==void 0))}function Je(e,r,t){var n=e.displayName;if(n)return n;var u=r.displayName||r.name||"";return u!==""?t+"("+u+")":t}function le(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case a:return"Portal";case b:return"Profiler";case y:return"StrictMode";case p:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case C:var r=e;return le(r)+".Consumer";case P:var t=e;return le(t._context)+".Provider";case g:return Je(e,e.render,"ForwardRef");case h:var n=e.displayName||null;return n!==null?n:O(e.type)||"Memo";case x:{var u=e,s=u._payload,o=u._init;try{return O(o(s))}catch{return null}}}return null}var D=Object.assign,L=0,fe,ce,de,ve,me,ye,be;function ge(){}ge.__reactDisabledLog=!0;function qe(){{if(L===0){fe=console.log,ce=console.info,de=console.warn,ve=console.error,me=console.group,ye=console.groupCollapsed,be=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ge,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}L++}}function Ge(){{if(L--,L===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:fe}),info:D({},e,{value:ce}),warn:D({},e,{value:de}),error:D({},e,{value:ve}),group:D({},e,{value:me}),groupCollapsed:D({},e,{value:ye}),groupEnd:D({},e,{value:be})})}L<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=N.ReactCurrentDispatcher,H;function U(e,r,t){{if(H===void 0)try{throw Error()}catch(u){var n=u.stack.trim().match(/\n( *(at )?)/);H=n&&n[1]||""}return`
|
|
10
|
-
`+H+e}}var X=!1,B;{var Ke=typeof WeakMap=="function"?WeakMap:Map;B=new Ke}function pe(e,r){if(!e||X)return"";{var t=B.get(e);if(t!==void 0)return t}var n;X=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=K.current,K.current=null,qe();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(j){n=j}Reflect.construct(e,[],o)}else{try{o.call()}catch(j){n=j}e.call(o.prototype)}}else{try{throw Error()}catch(j){n=j}e()}}catch(j){if(j&&n&&typeof j.stack=="string"){for(var i=j.stack.split(`
|
|
11
|
-
`),_=n.stack.split(`
|
|
12
|
-
`),d=i.length-1,m=_.length-1;d>=1&&m>=0&&i[d]!==_[m];)m--;for(;d>=1&&m>=0;d--,m--)if(i[d]!==_[m]){if(d!==1||m!==1)do if(d--,m--,m<0||i[d]!==_[m]){var T=`
|
|
13
|
-
`+i[d].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&B.set(e,T),T}while(d>=1&&m>=0);break}}}finally{X=!1,K.current=s,Ge(),Error.prepareStackTrace=u}var W=e?e.displayName||e.name:"",ke=W?U(W):"";return typeof e=="function"&&B.set(e,ke),ke}function He(e,r,t){return pe(e,!1)}function Xe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function z(e,r,t){if(e==null)return"";if(typeof e=="function")return pe(e,Xe(e));if(typeof e=="string")return U(e);switch(e){case p:return U("Suspense");case v:return U("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case g:return He(e.render);case h:return z(e.type,r,t);case x:{var n=e,u=n._payload,s=n._init;try{return z(s(u),r,t)}catch{}}}return""}var J=Object.prototype.hasOwnProperty,he={},Ee=N.ReactDebugCurrentFrame;function q(e){if(e){var r=e._owner,t=z(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}function Ze(e,r,t,n,u){{var s=Function.call.bind(J);for(var o in e)if(s(e,o)){var i=void 0;try{if(typeof e[o]!="function"){var _=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}i=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){i=d}i&&!(i instanceof Error)&&(q(u),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof i),q(null)),i instanceof Error&&!(i.message in he)&&(he[i.message]=!0,q(u),E("Failed %s type: %s",t,i.message),q(null))}}}var Qe=Array.isArray;function Z(e){return Qe(e)}function er(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function rr(e){try{return _e(e),!1}catch{return!0}}function _e(e){return""+e}function Re(e){if(rr(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",er(e)),_e(e)}var M=N.ReactCurrentOwner,tr={key:!0,ref:!0,__self:!0,__source:!0},Te,xe,Q;Q={};function nr(e){if(J.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ar(e){if(J.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ir(e,r){if(typeof e.ref=="string"&&M.current&&r&&M.current.stateNode!==r){var t=O(M.current.type);Q[t]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',O(M.current.type),e.ref),Q[t]=!0)}}function or(e,r){{var t=function(){Te||(Te=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ur(e,r){{var t=function(){xe||(xe=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var sr=function(e,r,t,n,u,s,o){var i={$$typeof:l,type:e,key:r,ref:t,props:o,_owner:s};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function lr(e,r,t,n,u){{var s,o={},i=null,_=null;t!==void 0&&(Re(t),i=""+t),ar(r)&&(Re(r.key),i=""+r.key),nr(r)&&(_=r.ref,ir(r,u));for(s in r)J.call(r,s)&&!tr.hasOwnProperty(s)&&(o[s]=r[s]);if(e&&e.defaultProps){var d=e.defaultProps;for(s in d)o[s]===void 0&&(o[s]=d[s])}if(i||_){var m=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&or(o,m),_&&ur(o,m)}return sr(e,i,_,u,n,M.current,o)}}var ee=N.ReactCurrentOwner,Ce=N.ReactDebugCurrentFrame;function I(e){if(e){var r=e._owner,t=z(e.type,e._source,r?r.type:null);Ce.setExtraStackFrame(t)}else Ce.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function Oe(){{if(ee.current){var e=O(ee.current.type);if(e)return`
|
|
14
|
-
|
|
15
|
-
Check the render method of \``+e+"`."}return""}}function fr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
16
|
-
|
|
17
|
-
Check your code at `+r+":"+t+"."}return""}}var je={};function cr(e){{var r=Oe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
18
|
-
|
|
19
|
-
Check the top-level render call using <`+t+">.")}return r}}function Se(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=cr(r);if(je[t])return;je[t]=!0;var n="";e&&e._owner&&e._owner!==ee.current&&(n=" It was passed a child from "+O(e._owner.type)+"."),I(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),I(null)}}function Pe(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t<e.length;t++){var n=e[t];te(n)&&Se(n,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var u=Ye(e);if(typeof u=="function"&&u!==e.entries)for(var s=u.call(e),o;!(o=s.next()).done;)te(o.value)&&Se(o.value,r)}}}function dr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===g||r.$$typeof===h))t=r.propTypes;else return;if(t){var n=O(r);Ze(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var u=O(r);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){I(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),I(null);break}}e.ref!==null&&(I(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}}function we(e,r,t,n,u,s){{var o=ze(e);if(!o){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var _=fr(u);_?i+=_:i+=Oe();var d;e===null?d="null":Z(e)?d="array":e!==void 0&&e.$$typeof===l?(d="<"+(O(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):d=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d,i)}var m=lr(e,r,t,u,s);if(m==null)return m;if(o){var T=r.children;if(T!==void 0)if(n)if(Z(T)){for(var W=0;W<T.length;W++)Pe(T[W],e);Object.freeze&&Object.freeze(T)}else E("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 Pe(T,e)}return e===c?vr(m):dr(m),m}}function mr(e,r,t){return we(e,r,t,!0)}function yr(e,r,t){return we(e,r,t,!1)}var br=yr,gr=mr;Y.Fragment=c,Y.jsx=br,Y.jsxs=gr}()),Y}var V={};/**
|
|
20
|
-
* @license React
|
|
21
|
-
* react-jsx-runtime.production.min.js
|
|
22
|
-
*
|
|
23
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
24
|
-
*
|
|
25
|
-
* This source code is licensed under the MIT license found in the
|
|
26
|
-
* LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/var ae;function De(){if(ae)return V;ae=1;var f=w,l=Symbol.for("react.element"),a=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,y=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,b={key:!0,ref:!0,__self:!0,__source:!0};function P(C,g,p){var v,h={},x=null,A=null;p!==void 0&&(x=""+p),g.key!==void 0&&(x=""+g.key),g.ref!==void 0&&(A=g.ref);for(v in g)c.call(g,v)&&!b.hasOwnProperty(v)&&(h[v]=g[v]);if(C&&C.defaultProps)for(v in g=C.defaultProps,g)h[v]===void 0&&(h[v]=g[v]);return{$$typeof:l,type:C,key:x,ref:A,props:h,_owner:y.current}}return V.Fragment=a,V.jsx=P,V.jsxs=P,V}process.env.NODE_ENV==="production"?G.exports=De():G.exports=Ae();var S=G.exports;const $=w.forwardRef(({tag:f,children:l,visible:a=!0,...c},y)=>{const b=f||"div";return a?S.jsx(b,{ref:y,...c,children:l}):S.jsx(S.Fragment,{})}),k=(...f)=>f.reduce((l,a)=>a==null||a===!1?l:typeof a=="string"||typeof a=="number"?l+" "+a:Array.isArray(a)?l+" "+k(...a):typeof a=="object"?l+" "+Object.entries(a).reduce((c,[y,b])=>b==null||b===!1?c:typeof b=="string"||typeof b=="number"?c+" "+y+"-"+b:typeof b=="boolean"&&b?c+" "+y:c,""):l,""),ie=f=>typeof f=="boolean"?`${f}`:f===0?"0":f,oe=(f,l)=>a=>{var g;if((l==null?void 0:l.variants)==null)return k(f,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:c,defaultVariants:y}=l,b=Object.keys(c).map(p=>{const v=a==null?void 0:a[p],h=y==null?void 0:y[p];if(v===null)return null;const x=ie(v)||ie(h);return c[p][x]}),P=a&&Object.entries(a).reduce((p,[v,h])=>(h===void 0||(p[v]=h),p),{}),C=(g=l==null?void 0:l.compoundVariants)==null?void 0:g.reduce((p,{class:v,className:h,...x})=>Object.entries(x).every(([A,F])=>Array.isArray(F)?F.includes({...y,...P}[A]):{...y,...P}[A]===F)?[...p,v,h]:p,[]);return k(f,b,C,a==null?void 0:a.class,a==null?void 0:a.className)},Fe=f=>{let{children:l,className:a,variant:c="primary",size:y="medium",rounded:b="md"}=f;return S.jsx($,{tag:"button",className:Ne({variant:c,size:y,rounded:b,className:a}),children:l})},Ne=oe("zen__button inline-flex items-center justify-center transition font-semibold",{variants:{variant:{primary:"bg-primary hover:bg-primary/90 text-primary-foreground",secondary:"bg-secondary hover:bg-secondary/90 text-secondary-foreground",muted:"bg-muted hover:bg-muted/90 text-muted-foreground",destructive:"bg-destructive hover:bg-destructive/90 text-destructive-foreground",link:"bg-transparent hover:underline text-primary-foreground"},size:{small:"text-sm px-2 py-1",medium:"text-md px-3 py-2",large:"text-lg px-4 py-3"},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}},defaultVariants:{variant:"primary",size:"medium",rounded:"md"}}),ue=f=>S.jsx($,{tag:"div",...f});function Ie(f){const{className:l,checked:a,onChange:c,...y}=f;return S.jsxs($,{tag:"div",className:k("rounded-full","w-10 h-5","bg-secondary border border-muted","flex items-center",l),onClick:()=>{c(!a)},children:[S.jsx($,{tag:"input",type:"checkbox",className:k("hidden"),checked:a,onChange:()=>{},...y}),S.jsx(ue,{className:k("rounded-full w-4 h-4 bg-primary transition",a?"translate-x-5":"translate-x-1")})]})}R.Button=Fe,R.Component=$,R.Container=ue,R.Toggle=Ie,R.cva=oe,R.cx=k,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|