dgz-ui 1.1.5 → 1.1.7
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/README.md +0 -5
- package/dist/avatar-CuLQPgwj.cjs +17 -0
- package/dist/{avatar-Dv6tlASZ.js → avatar-KFHGowVn.js} +3 -2
- package/dist/dgz-ui.cjs3.js +1 -1
- package/dist/dgz-ui.cjs4.js +1 -1
- package/dist/dgz-ui.es3.js +4 -3
- package/dist/dgz-ui.es4.js +3 -2
- package/dist/types/components/ui/avatar/avatar.d.ts +1 -2
- package/dist/types/components/ui/avatar/avatar.d.ts.map +1 -1
- package/dist/types/components/ui/avatar/index.d.ts +1 -2
- package/dist/types/components/ui/avatar/index.d.ts.map +1 -1
- package/dist/types/components/ui/badge/badge.d.ts +2 -3
- package/dist/types/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/types/components/ui/badge/index.d.ts +1 -2
- package/dist/types/components/ui/badge/index.d.ts.map +1 -1
- package/dist/types/components/ui/button/button.d.ts +1 -2
- package/dist/types/components/ui/button/button.d.ts.map +1 -1
- package/dist/types/components/ui/button/index.d.ts +1 -2
- package/dist/types/components/ui/button/index.d.ts.map +1 -1
- package/package.json +10 -10
- package/dist/avatar-DwRXW9qb.cjs +0 -17
package/README.md
CHANGED
|
@@ -12,7 +12,6 @@ A modern, accessible, and customizable React component library built with TypeSc
|
|
|
12
12
|
- [Badge](#badge)
|
|
13
13
|
- [Avatar](#avatar)
|
|
14
14
|
- [Development](#️-development)
|
|
15
|
-
- [Documentation](#-documentation)
|
|
16
15
|
- [License](#-license)
|
|
17
16
|
|
|
18
17
|
## ⚡ Quick Start
|
|
@@ -242,10 +241,6 @@ npm run build
|
|
|
242
241
|
yarn build
|
|
243
242
|
```
|
|
244
243
|
|
|
245
|
-
## 📖 Documentation
|
|
246
|
-
|
|
247
|
-
For more detailed documentation and examples, visit our [Storybook](your-storybook-url) or check out the individual component files.
|
|
248
|
-
|
|
249
244
|
## 🤝 Acknowledgments
|
|
250
245
|
|
|
251
246
|
- [Shadcn/ui](https://ui.shadcn.com/) - For the excellent component patterns and design system
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";const m=require("./utils-DH1n-kUn.cjs"),A=require("react");require("react-dom");const U=require("./index-DjR9Xv7C.cjs");function K(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const v=K(A);function F(e,t=[]){let r=[];function a(n,f){const u=v.createContext(f),d=r.length;r=[...r,f];const S=i=>{var _;const{scope:l,children:s,...c}=i,p=((_=l==null?void 0:l[e])==null?void 0:_[d])||u,E=v.useMemo(()=>c,Object.values(c));return m.jsxRuntimeExports.jsx(p.Provider,{value:E,children:s})};S.displayName=n+"Provider";function x(i,l){var p;const s=((p=l==null?void 0:l[e])==null?void 0:p[d])||u,c=v.useContext(s);if(c)return c;if(f!==void 0)return f;throw new Error(`\`${i}\` must be used within \`${n}\``)}return[S,x]}const o=()=>{const n=r.map(f=>v.createContext(f));return function(u){const d=(u==null?void 0:u[e])||n;return v.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return o.scopeName=e,[a,W(o,...t)]}function W(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(n){const f=a.reduce((u,{useScope:d,scopeName:S})=>{const i=d(n)[`__scope${S}`];return{...u,...i}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:f}),[f])}};return r.scopeName=t.scopeName,r}function Y(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>{var a;return(a=t.current)==null?void 0:a.call(t,...r)},[])}var L=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},J=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],w=J.reduce((e,t)=>{const r=U.createSlot(`Primitive.${t}`),a=v.forwardRef((o,n)=>{const{asChild:f,...u}=o,d=f?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsxRuntimeExports.jsx(d,{...u,ref:n})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),g={exports:{}},h={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* use-sync-external-store-shim.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and 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 j;function Q(){if(j)return h;j=1;var e=A;function t(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var r=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,n=e.useLayoutEffect,f=e.useDebugValue;function u(i,l){var s=l(),c=a({inst:{value:s,getSnapshot:l}}),p=c[0].inst,E=c[1];return n(function(){p.value=s,p.getSnapshot=l,d(p)&&E({inst:p})},[i,s,l]),o(function(){return d(p)&&E({inst:p}),i(function(){d(p)&&E({inst:p})})},[i]),f(s),s}function d(i){var l=i.getSnapshot;i=i.value;try{var s=l();return!r(i,s)}catch{return!0}}function S(i,l){return l()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S:u;return h.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:x,h}var O={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* use-sync-external-store-shim.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var b;function X(){return b||(b=1,process.env.NODE_ENV!=="production"&&function(){function e(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}function t(s,c){x||o.startTransition===void 0||(x=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=c();if(!i){var E=c();n(p,E)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),i=!0)}E=f({inst:{value:p,getSnapshot:c}});var _=E[0].inst,y=E[1];return d(function(){_.value=p,_.getSnapshot=c,r(_)&&y({inst:_})},[s,p,c]),u(function(){return r(_)&&y({inst:_}),s(function(){r(_)&&y({inst:_})})},[s]),S(p),p}function r(s){var c=s.getSnapshot;s=s.value;try{var p=c();return!n(s,p)}catch{return!0}}function a(s,c){return c()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=A,n=typeof Object.is=="function"?Object.is:e,f=o.useState,u=o.useEffect,d=o.useLayoutEffect,S=o.useDebugValue,x=!1,i=!1,l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:t;O.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),O}var C;function Z(){return C||(C=1,process.env.NODE_ENV==="production"?g.exports=Q():g.exports=X()),g.exports}var ee=Z();function te(){return ee.useSyncExternalStore(re,()=>!0,()=>!1)}function re(){return()=>{}}var R="Avatar",[ne,se]=F(R),[ae,I]=ne(R),T=v.forwardRef((e,t)=>{const{__scopeAvatar:r,...a}=e,[o,n]=v.useState("idle");return m.jsxRuntimeExports.jsx(ae,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:n,children:m.jsxRuntimeExports.jsx(w.span,{...a,ref:t})})});T.displayName=R;var $="AvatarImage",D=v.forwardRef((e,t)=>{const{__scopeAvatar:r,src:a,onLoadingStatusChange:o=()=>{},...n}=e,f=I($,r),u=oe(a,n),d=Y(S=>{o(S),f.onImageLoadingStatusChange(S)});return L(()=>{u!=="idle"&&d(u)},[u,d]),u==="loaded"?m.jsxRuntimeExports.jsx(w.img,{...n,ref:t,src:a}):null});D.displayName=$;var M="AvatarFallback",P=v.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:a,...o}=e,n=I(M,r),[f,u]=v.useState(a===void 0);return v.useEffect(()=>{if(a!==void 0){const d=window.setTimeout(()=>u(!0),a);return()=>window.clearTimeout(d)}},[a]),f&&n.imageLoadingStatus!=="loaded"?m.jsxRuntimeExports.jsx(w.span,{...o,ref:t}):null});P.displayName=M;function N(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function oe(e,{referrerPolicy:t,crossOrigin:r}){const a=te(),o=v.useRef(null),n=a?(o.current||(o.current=new window.Image),o.current):null,[f,u]=v.useState(()=>N(n,e));return L(()=>{u(N(n,e))},[n,e]),L(()=>{const d=i=>()=>{u(i)};if(!n)return;const S=d("loaded"),x=d("error");return n.addEventListener("load",S),n.addEventListener("error",x),t&&(n.referrerPolicy=t),typeof r=="string"&&(n.crossOrigin=r),()=>{n.removeEventListener("load",S),n.removeEventListener("error",x)}},[n,r,t]),f}var V=T,k=D,q=P;const z=m.cva("relative flex shrink-0 overflow-hidden rounded-full",{variants:{size:{sm:"size-8",default:"size-10",md:"size-13",lg:"size-16",xl:"size-20"}},defaultVariants:{size:"default"}}),G=v.forwardRef(({className:e,size:t,...r},a)=>m.jsxRuntimeExports.jsx(V,{ref:a,className:m.cn(z({size:t}),e),...r}));G.displayName=V.displayName;const H=v.forwardRef(({className:e,...t},r)=>m.jsxRuntimeExports.jsx(k,{ref:r,className:m.cn("aspect-square size-full",e),...t}));H.displayName=k.displayName;const B=v.forwardRef(({className:e,...t},r)=>m.jsxRuntimeExports.jsx(q,{ref:r,className:m.cn("flex size-full items-center justify-center rounded-full bg-muted",e),...t}));B.displayName=q.displayName;exports.Avatar=G;exports.AvatarFallback=B;exports.AvatarImage=H;exports.avatarVariants=z;
|
package/dist/dgz-ui.cjs3.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./avatar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./avatar-CuLQPgwj.cjs");exports.Avatar=a.Avatar;exports.AvatarFallback=a.AvatarFallback;exports.AvatarImage=a.AvatarImage;exports.avatarVariants=a.avatarVariants;
|
package/dist/dgz-ui.cjs4.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./badge-DXZNHpwe.cjs"),a=require("./avatar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./badge-DXZNHpwe.cjs"),a=require("./avatar-CuLQPgwj.cjs"),r=require("./button-CpN_5c1A.cjs");exports.Badge=t.Badge;exports.badgeVariants=t.badgeVariants;exports.Avatar=a.Avatar;exports.AvatarFallback=a.AvatarFallback;exports.AvatarImage=a.AvatarImage;exports.avatarVariants=a.avatarVariants;exports.Button=r.Button;exports.buttonVariants=r.buttonVariants;
|
package/dist/dgz-ui.es3.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { A as t, b as
|
|
1
|
+
import { A as t, c as s, b as v, a as A } from "./avatar-KFHGowVn.js";
|
|
2
2
|
export {
|
|
3
3
|
t as Avatar,
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
s as AvatarFallback,
|
|
5
|
+
v as AvatarImage,
|
|
6
|
+
A as avatarVariants
|
|
6
7
|
};
|
package/dist/dgz-ui.es4.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { B as r, b as s } from "./badge-DlSdChLJ.js";
|
|
2
|
-
import { A as b,
|
|
2
|
+
import { A as b, c as e, b as n, a as m } from "./avatar-KFHGowVn.js";
|
|
3
3
|
import { B as A, b as B } from "./button-CfenIARW.js";
|
|
4
4
|
export {
|
|
5
5
|
b as Avatar,
|
|
6
6
|
e as AvatarFallback,
|
|
7
|
-
|
|
7
|
+
n as AvatarImage,
|
|
8
8
|
r as Badge,
|
|
9
9
|
A as Button,
|
|
10
|
+
m as avatarVariants,
|
|
10
11
|
s as badgeVariants,
|
|
11
12
|
B as buttonVariants
|
|
12
13
|
};
|
|
@@ -39,7 +39,7 @@ export interface AvatarProps extends React.ComponentPropsWithoutRef<typeof Avata
|
|
|
39
39
|
* @param className - Additional CSS classes to apply
|
|
40
40
|
* @param children - Child components (typically AvatarImage and AvatarFallback)
|
|
41
41
|
*/
|
|
42
|
-
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
42
|
+
export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
43
43
|
/**
|
|
44
44
|
* AvatarImage component - Displays the actual avatar image.
|
|
45
45
|
*
|
|
@@ -83,5 +83,4 @@ export declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPri
|
|
|
83
83
|
* @param children - Fallback content (text, icons, etc.)
|
|
84
84
|
*/
|
|
85
85
|
export declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
86
|
-
export default Avatar;
|
|
87
86
|
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE;;;GAGG;AACH,eAAO,MAAM,cAAc;;8EAqB1B,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,EACjE,YAAY,CAAC,OAAO,cAAc,CAAC;CAAG;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE;;;GAGG;AACH,eAAO,MAAM,cAAc;;8EAqB1B,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,EACjE,YAAY,CAAC,OAAO,cAAc,CAAC;CAAG;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,MAAM,qFASjB,CAAC;AAGH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,gKAStB,CAAC;AAGH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,cAAc,iKAYzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/avatar/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/avatar/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -38,9 +38,8 @@ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, Varian
|
|
|
38
38
|
* @param {React.HTMLAttributes<HTMLDivElement>} props - All other native div props.
|
|
39
39
|
* @returns {JSX.Element} Rendered badge component.
|
|
40
40
|
*/
|
|
41
|
-
declare function Badge({ className, variant, rounded, type, size, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
-
declare namespace Badge {
|
|
41
|
+
export declare function Badge({ className, variant, rounded, type, size, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare namespace Badge {
|
|
43
43
|
var displayName: string;
|
|
44
44
|
}
|
|
45
|
-
export default Badge;
|
|
46
45
|
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa;;;;;8EA4DzB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzC;;;;;;;;;;;;;;GAcG;AACH,
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa;;;;;8EA4DzB,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,OAAO,EACP,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,UAAU,2CAOZ;yBAde,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/badge/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/badge/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -38,6 +38,5 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
38
38
|
* <Button asChild><a href="/next-step">Continue</a></Button>
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
|
-
declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
42
|
-
export default Button;
|
|
41
|
+
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
43
42
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/button/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;;;8EA6B1B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/button/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;;;8EA6B1B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,MAAM,2GAWlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/button/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/button/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dgz-ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
"require": "./dist/dgz-ui.umd.js"
|
|
32
32
|
},
|
|
33
33
|
"./button": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
34
|
+
"types": "./dist/components/ui/button/index.d.ts",
|
|
35
|
+
"import": "./dist/components/ui/button/index.es.js",
|
|
36
|
+
"require": "./dist/components/ui/button/index.umd.js"
|
|
37
37
|
},
|
|
38
38
|
"./badge": {
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
39
|
+
"types": "./dist/components/ui/badge/index.d.ts",
|
|
40
|
+
"import": "./dist/components/ui/badge/index.es.js",
|
|
41
|
+
"require": "./dist/components/ui/badge/index.umd.js"
|
|
42
42
|
},
|
|
43
43
|
"./avatar": {
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
44
|
+
"types": "./dist/components/ui/avatar/index.d.ts",
|
|
45
|
+
"import": "./dist/components/ui/avatar/index.es.js",
|
|
46
|
+
"require": "./dist/components/ui/avatar/index.umd.js"
|
|
47
47
|
},
|
|
48
48
|
"./dist/dgz-ui.css": "./dist/dgz-ui.css"
|
|
49
49
|
},
|
package/dist/avatar-DwRXW9qb.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";const m=require("./utils-DH1n-kUn.cjs"),A=require("react");require("react-dom");const B=require("./index-DjR9Xv7C.cjs");function U(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const v=U(A);function K(e,t=[]){let r=[];function o(n,f){const u=v.createContext(f),d=r.length;r=[...r,f];const S=i=>{var _;const{scope:l,children:s,...c}=i,p=((_=l==null?void 0:l[e])==null?void 0:_[d])||u,E=v.useMemo(()=>c,Object.values(c));return m.jsxRuntimeExports.jsx(p.Provider,{value:E,children:s})};S.displayName=n+"Provider";function x(i,l){var p;const s=((p=l==null?void 0:l[e])==null?void 0:p[d])||u,c=v.useContext(s);if(c)return c;if(f!==void 0)return f;throw new Error(`\`${i}\` must be used within \`${n}\``)}return[S,x]}const a=()=>{const n=r.map(f=>v.createContext(f));return function(u){const d=(u==null?void 0:u[e])||n;return v.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[o,F(a,...t)]}function F(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(n){const f=o.reduce((u,{useScope:d,scopeName:S})=>{const i=d(n)[`__scope${S}`];return{...u,...i}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:f}),[f])}};return r.scopeName=t.scopeName,r}function W(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}var L=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},Y=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],w=Y.reduce((e,t)=>{const r=B.createSlot(`Primitive.${t}`),o=v.forwardRef((a,n)=>{const{asChild:f,...u}=a,d=f?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsxRuntimeExports.jsx(d,{...u,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),g={exports:{}},h={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* use-sync-external-store-shim.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and 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 j;function J(){if(j)return h;j=1;var e=A;function t(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var r=typeof Object.is=="function"?Object.is:t,o=e.useState,a=e.useEffect,n=e.useLayoutEffect,f=e.useDebugValue;function u(i,l){var s=l(),c=o({inst:{value:s,getSnapshot:l}}),p=c[0].inst,E=c[1];return n(function(){p.value=s,p.getSnapshot=l,d(p)&&E({inst:p})},[i,s,l]),a(function(){return d(p)&&E({inst:p}),i(function(){d(p)&&E({inst:p})})},[i]),f(s),s}function d(i){var l=i.getSnapshot;i=i.value;try{var s=l();return!r(i,s)}catch{return!0}}function S(i,l){return l()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S:u;return h.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:x,h}var O={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* use-sync-external-store-shim.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var b;function Q(){return b||(b=1,process.env.NODE_ENV!=="production"&&function(){function e(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}function t(s,c){x||a.startTransition===void 0||(x=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=c();if(!i){var E=c();n(p,E)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),i=!0)}E=f({inst:{value:p,getSnapshot:c}});var _=E[0].inst,y=E[1];return d(function(){_.value=p,_.getSnapshot=c,r(_)&&y({inst:_})},[s,p,c]),u(function(){return r(_)&&y({inst:_}),s(function(){r(_)&&y({inst:_})})},[s]),S(p),p}function r(s){var c=s.getSnapshot;s=s.value;try{var p=c();return!n(s,p)}catch{return!0}}function o(s,c){return c()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=A,n=typeof Object.is=="function"?Object.is:e,f=a.useState,u=a.useEffect,d=a.useLayoutEffect,S=a.useDebugValue,x=!1,i=!1,l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:t;O.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),O}var C;function X(){return C||(C=1,process.env.NODE_ENV==="production"?g.exports=J():g.exports=Q()),g.exports}var Z=X();function ee(){return Z.useSyncExternalStore(te,()=>!0,()=>!1)}function te(){return()=>{}}var R="Avatar",[re,se]=K(R),[ne,I]=re(R),T=v.forwardRef((e,t)=>{const{__scopeAvatar:r,...o}=e,[a,n]=v.useState("idle");return m.jsxRuntimeExports.jsx(ne,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:n,children:m.jsxRuntimeExports.jsx(w.span,{...o,ref:t})})});T.displayName=R;var $="AvatarImage",D=v.forwardRef((e,t)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:a=()=>{},...n}=e,f=I($,r),u=oe(o,n),d=W(S=>{a(S),f.onImageLoadingStatusChange(S)});return L(()=>{u!=="idle"&&d(u)},[u,d]),u==="loaded"?m.jsxRuntimeExports.jsx(w.img,{...n,ref:t,src:o}):null});D.displayName=$;var M="AvatarFallback",P=v.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:o,...a}=e,n=I(M,r),[f,u]=v.useState(o===void 0);return v.useEffect(()=>{if(o!==void 0){const d=window.setTimeout(()=>u(!0),o);return()=>window.clearTimeout(d)}},[o]),f&&n.imageLoadingStatus!=="loaded"?m.jsxRuntimeExports.jsx(w.span,{...a,ref:t}):null});P.displayName=M;function N(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function oe(e,{referrerPolicy:t,crossOrigin:r}){const o=ee(),a=v.useRef(null),n=o?(a.current||(a.current=new window.Image),a.current):null,[f,u]=v.useState(()=>N(n,e));return L(()=>{u(N(n,e))},[n,e]),L(()=>{const d=i=>()=>{u(i)};if(!n)return;const S=d("loaded"),x=d("error");return n.addEventListener("load",S),n.addEventListener("error",x),t&&(n.referrerPolicy=t),typeof r=="string"&&(n.crossOrigin=r),()=>{n.removeEventListener("load",S),n.removeEventListener("error",x)}},[n,r,t]),f}var V=T,k=D,q=P;const ae=m.cva("relative flex shrink-0 overflow-hidden rounded-full",{variants:{size:{sm:"size-8",default:"size-10",md:"size-13",lg:"size-16",xl:"size-20"}},defaultVariants:{size:"default"}}),z=v.forwardRef(({className:e,size:t,...r},o)=>m.jsxRuntimeExports.jsx(V,{ref:o,className:m.cn(ae({size:t}),e),...r}));z.displayName=V.displayName;const G=v.forwardRef(({className:e,...t},r)=>m.jsxRuntimeExports.jsx(k,{ref:r,className:m.cn("aspect-square size-full",e),...t}));G.displayName=k.displayName;const H=v.forwardRef(({className:e,...t},r)=>m.jsxRuntimeExports.jsx(q,{ref:r,className:m.cn("flex size-full items-center justify-center rounded-full bg-muted",e),...t}));H.displayName=q.displayName;exports.Avatar=z;exports.AvatarFallback=H;exports.AvatarImage=G;
|