@1d1s/design-system 1.2.7 → 1.2.8
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.es.js +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import{jsx as e,Fragment as t,jsxs as n}from"react/jsx-runtime";import{Bell as r,BookOpen as o,CalendarDays as a,Dumbbell as i,Flag as l,Flame as s,Code2 as c,Laptop as d,LogIn as u,Palette as p,Users as f,PencilLine as m,UserRound as h,Plane as g,Salad as b,Settings as v,Target as y,Trophy as w}from"lucide-react";import*as x from"react";import C,{useRef as k,useState as N,useEffect as A,createContext as M,useContext as S,useLayoutEffect as R,forwardRef as E}from"react";import*as _ from"react-dom";import P,{createPortal as D}from"react-dom";import L from"next/image";function O(t,n=[]){let r=[];const o=()=>{const e=r.map(e=>x.createContext(e));return n=>{const r=n?.[t]||e;return x.useMemo(()=>({[`__scope${t}`]:{...n,[t]:r}}),[n,r])}};return o.scopeName=t,[(n,o)=>{const a=x.createContext(o),i=r.length;r=[...r,o];const l=n=>{const{scope:r,children:o,...l}=n,s=r?.[t]?.[i]||a,c=x.useMemo(()=>l,Object.values(l));/* @__PURE__ */
|
|
2
3
|
return e(s.Provider,{value:c,children:o})};return l.displayName=n+"Provider",[l,(e,r)=>{const l=x.useContext(r?.[t]?.[i]||a);if(l)return l;if(void 0!==o)return o;throw new Error(`\`${e}\` must be used within \`${n}\``)}]},z(o,...n)]}function z(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return e=>{const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function T(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function I(...e){return t=>{let n=!1;const r=e.map(e=>{const r=T(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():T(e[t],null)}}}}function W(...e){return x.useCallback(I(...e),e)}function F(t){const n=/* @__PURE__ */B(t),r=x.forwardRef((t,r)=>{const{children:o,...a}=t,i=x.Children.toArray(o),l=i.find(Y);if(l){const t=l.props.children,o=i.map(e=>e===l?x.Children.count(t)>1?x.Children.only(null):x.isValidElement(t)?t.props.children:null:e);/* @__PURE__ */
|
|
3
4
|
return e(n,{...a,ref:r,children:x.isValidElement(t)?x.cloneElement(t,void 0,o):null})}/* @__PURE__ */
|