kwant-ui 3.16.4-alpha.0 → 3.16.4
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/components/AvatarGroup/AvatarGroup.types.d.ts +19 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.styled.d.ts.map +1 -0
- package/dist/components/Button/helper.d.ts.map +1 -0
- package/dist/components/Button/types.d.ts.map +1 -0
- package/dist/components/HoverCalender/HoverCalender.d.ts +3 -0
- package/dist/components/HoverCalender/HoverCalenderStyled.d.ts +1 -0
- package/dist/components/HoverCalender/types.d.ts +10 -0
- package/dist/components/MultiSelect/onOutsideClick.d.ts +3 -0
- package/dist/components/Slider/Slider.d.ts.map +1 -0
- package/dist/components/Slider/Slider.styled.d.ts.map +1 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Slider/types.d.ts.map +1 -0
- package/dist/components/StepperDrawer/StepperDrawer.d.ts +3 -0
- package/dist/components/StepperDrawer/StepperDrawer.types.d.ts +8 -0
- package/dist/components/StepperDrawer/StepperDrawer.utils.d.ts +1 -0
- package/dist/components/StepperDrawer/StepperDrawerStyled.d.ts +5 -0
- package/dist/components/StepperDrawer/index.d.ts +2 -0
- package/dist/components/Text/TextStyled.d.ts.map +1 -0
- package/dist/components/Text/index.d.ts.map +1 -0
- package/dist/components/Text/types.d.ts.map +1 -0
- package/dist/components/Text/typography.d.ts.map +1 -0
- package/dist/components/Text/utils.d.ts.map +1 -0
- package/dist/components/stepper/index.d.ts.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +2 -2
- package/dist/index.js +5 -5
- package/dist/kwant-ui.es.js +4345 -0
- package/dist/kwant-ui.umd.js +507 -0
- package/dist/package.json +1 -1
- package/dist/public/assets/images/approve.svg +21 -0
- package/dist/public/assets/images/complete.svg +20 -0
- package/dist/public/assets/images/reject.svg +27 -0
- package/dist/public/assets/sprite.svg +9502 -0
- package/dist/stories/Drawer/StepperDrawerStory.d.ts +2 -0
- package/dist/stories/HoverCalender/HoverCalenderContainer.d.ts +2 -0
- package/dist/stories/HoverCalender/HoverCalenderContainer.stories.d.ts +64 -0
- package/dist/stories/HoverCalender/HoverCalenderContainerStyled.d.ts +1 -0
- package/dist/stories/StepperDrawer.stories.d.ts +72 -0
- package/dist/themes/colors.d.ts.map +1 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/types.d.ts.map +1 -0
- package/dist/types.d.ts +572 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AvatarDeclarations } from '../Avatar/Avatar.types';
|
|
2
|
+
export declare namespace AvatarGroupDelcarations {
|
|
3
|
+
interface Props {
|
|
4
|
+
borderWidth?: number;
|
|
5
|
+
borderColor?: string;
|
|
6
|
+
boxShadow?: string;
|
|
7
|
+
avatars?: AvatarDeclarations.Props[];
|
|
8
|
+
size?: AvatarDeclarations.Size;
|
|
9
|
+
}
|
|
10
|
+
interface StyledAvatarContainer {
|
|
11
|
+
height: string;
|
|
12
|
+
}
|
|
13
|
+
interface StyledAvatarItem {
|
|
14
|
+
borderWidth?: string;
|
|
15
|
+
borderColor?: string;
|
|
16
|
+
boxShadow?: string;
|
|
17
|
+
index?: number;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,MAAM,UAAW,gBAAgB,KAAK,4CAiC3C,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.styled.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.styled.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAI1C,QAAA,MAAM,aAAa,+FAmClB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA2F1C,QAAA,MAAM,kBAAkB,UAAW,gBAAgB,kBAAkB,uEA+DpE,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,yBAAiB,eAAe,CAAC;IAC/B,MAAM,MAAM,KAAK,GAAG;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,UAAU,CAAC;QACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;QAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,QAAQ,CAAC,EAAE,cAAc,CAAC;QAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,OAAO,CAAC,EAAE,aAAa,CAAC;QACxB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IAEF,MAAM,MAAM,OAAO;QACjB,OAAO,YAAY;QACnB,MAAM,WAAW;QACjB,KAAK,UAAU;QACf,MAAM,WAAW;KAClB;IACD,KAAK,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC1D,KAAK,aAAa,GAAG,MAAM,OAAO,OAAO,CAAC;IAE1C,MAAM,MAAM,aAAa,GAAG;QAC1B,UAAU,EAAE,UAAU,CAAC;QACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,aAAa,CAAC;KACxB,CAAC;IAEF,MAAM,MAAM,UAAU;QACpB,OAAO,IAAA;QACP,SAAS,IAAA;QACT,KAAK,IAAA;QACL,OAAO,IAAA;QACP,OAAO,IAAA;QACP,QAAQ,IAAA;KACT;IAED,MAAM,MAAM,YAAY,GAAG;QACzB,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IAEF,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,UAAU,CAAC;IAEjD,MAAM,MAAM,kBAAkB,GAAG;QAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,KAAK,EAAE,KAAK,CAAC;QACb,UAAU,EAAE,UAAU,CAAC;QACvB,OAAO,EAAE,aAAa,CAAC;KACxB,CAAC;;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const HoverCalenderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,QAAA,MAAM,MAAM,UAAW,WAAW,4CA4FjC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Slider.styled.d.ts","sourceRoot":"","sources":["../../../../src/components/Slider/Slider.styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,UAAU,oEAGtB,CAAC;AAEF,eAAO,MAAM,SAAS,oEAerB,CAAC;AAEF,eAAO,MAAM,eAAe,8FAc3B,CAAC;AAQF,eAAO,MAAM,UAAU,kGAwBtB,CAAC;AACF,eAAO,MAAM,WAAW,oEAEvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Slider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Slider/types.ts"],"names":[],"mappings":"AAAA,yBAAiB,eAAe,CAAC;IAC/B,KAAY,YAAY,GAAG;QACzB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IAEF,KAAY,gBAAgB,GAAG;QAC7B,aAAa,EAAE,MAAM,CAAC;QACtB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,mBAAmB,EAAE,MAAM,CAAC;KAC7B,CAAC;CACH"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DrawerDeclarations } from '../Drawer/Drawer.types';
|
|
3
|
+
export declare namespace StepperDrawerDeclarations {
|
|
4
|
+
interface Props extends DrawerDeclarations.Props {
|
|
5
|
+
drawerSidebar?: React.ReactNode;
|
|
6
|
+
sidebarBorder?: boolean;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatGridTemplate: (str: string) => string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DrawerDeclarations } from '../Drawer/Drawer.types';
|
|
2
|
+
export declare const StepperDrawerContentRoot: import("styled-components").StyledComponent<"div", any, DrawerDeclarations.DrawerContentStyled, never>;
|
|
3
|
+
export declare const StepperDrawerSidebar: import("styled-components").StyledComponent<"aside", any, {
|
|
4
|
+
sidebarBorder?: boolean;
|
|
5
|
+
}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextStyled.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/TextStyled.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGxC,QAAA,MAAM,SAAS,2JAKd,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,QAAA,MAAM,IAAI,UAAW,cAAc,KAAK,4CAWvC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/types.ts"],"names":[],"mappings":"AAAA,yBAAiB,aAAa,CAAC;IAC7B,KAAY,KAAK,GAAG,cAAc,GAAG;QACnC,OAAO,CAAC,EAAE,CACR,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,oBAAoB,EAAE,UAAU,CAAC,KACtD,IAAI,CAAC;QACV,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QAC3B,IAAI,CAAC,EAAE,IAAI,CAAC;KACb,CAAC;IAEF,KAAY,QAAQ,GAChB,UAAU,GACV,WAAW,GACX,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,GACN,OAAO,CAAC;IAEZ,KAAY,IAAI,GAAG,OAAO,GAAG,SAAS,CAAC;IAEvC,KAAY,cAAc,GAAG;QAC3B,QAAQ,CAAC,EAAE,QAAQ,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,IAAI,CAAC;KACb,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/typography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,KAAK,UAAU,GAAG;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,QAAA,MAAM,UAAU,EAAE,UAwDjB,CAAC;AAEF,6CAA6C;AAC7C,QAAA,MAAM,gBAAgB,UAAW,cAAc,cAAc,KAAG,MAK/D,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,QAAA,MAAM,WAAW,UACR,KAAK,SACL,cAAc,IAAI,UACjB,MAAM,KACb,MAKF,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/stepper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,KAAK,OAAO,GAAG;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AACF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,EAAE,CAAC;CAC1B,CAAC;AAEF,iBAAS,OAAO,CAAC,EACf,OAAO,EACP,UAAU,EACV,YAAY,EACZ,SAAS,EACT,SAAS,EACT,aAAa,EACd,EAAE,YAAY,2CA6Dd;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
package/dist/index.es.js
CHANGED
|
@@ -1055,7 +1055,7 @@ import{jsx as e,jsxs as t}from"react/jsx-runtime";import c,{css as r,createGloba
|
|
|
1055
1055
|
display: grid;
|
|
1056
1056
|
place-items: center;
|
|
1057
1057
|
cursor: pointer;
|
|
1058
|
-
`,gt=c=>{const{width:r="fit-content",minHeight:n="48px",message:a,type:s="info",showActionBtn:l,actionBtnLabel:i,showCloseBtn:o,onActionBtnClick:h,onClose:v}=c,p=(e=>st[e])(s);return t(it,{type:s,width:r,minHeight:n,children:[e(ot,{children:p}),t(ht,{children:[a," "]}),e(vt,{role:"button",children:l&&e(ne,{label:i,variant:"outline",secondary:!0,onClick:h})}),o&&e(pt,{onClick:v,children:lt})]})},mt=({message:t,type:c,id:r,config:n})=>{const{removeToast:a}=m(Je);return e(tt,{children:e(gt,{minHeight:"60px",width:"100%",type:c,message:t,actionBtnLabel:n?.actionBtnLabel,showActionBtn:n?.showActionBtn,showCloseBtn:!0,onActionBtnClick:n?.onActionBtnClick,onClose:(e=>()=>a(e))(r)})})},ut=({children:c,position:r,timeout:n,offsetX:a,offsetY:s})=>{const[l,i]=v([]),[o,h]=v({position:r,timeout:n,offsetX:a,offsetY:s}),g=p([]),m=e=>{const t=g.current.find((t=>t.id===e));t&&(clearTimeout(t?.timeout),g.current=g.current.filter((t=>t.id!==e)))},u=(e,t)=>{i((c=>{const r=c.findIndex((t=>t.id===e)),n=[...c];return n[r]=t,n}))},d=e=>{const t=l.filter((t=>t.id!==e));i(t),m(e)},_=()=>{l.length>=5&&(()=>{const[e,...t]=l;i(t),m(g.current[0].id)})()},w=e=>{let t=setTimeout((()=>{i((t=>t.filter((t=>t.id!==e.id)))),m(e.id)}),e.config?.timeout??o.timeout??5e3);g.current.push({id:e.id,timeout:t})},f=e=>"promise"===e?(t,c)=>{_();const r={message:c.pendingMessage,id:Ce(),type:e};return i((e=>[...e,r])),t.then((e=>{c.successMessage?u(r.id,{...r,message:c.successMessage,type:"success",config:{timeout:3e3}}):d(r.id),c.onSuccess?.(e)})).catch((e=>{c.errorMessage?u(r.id,{...r,message:c.errorMessage,type:"error",config:{timeout:3e3}}):d(r.id),c.onError?.(e)})).finally((()=>{w(r),c.onFinally?.()})),r.id}:(t,c)=>{_();const r={message:t,id:Ce(),type:e,config:c};return i((e=>[...e,r])),w(r),r.id},Z={success:f("success"),error:f("error"),warning:f("warning"),info:f("info"),promise:f("promise")};return t(Je.Provider,{value:{toast:Z,removeToast:d,setConfig:h},children:[l.length>0&&b(e(et,{position:o.position??"top-center",offsetX:o.offsetX??50,offsetY:o.offsetY??50,onClick:e=>e.stopPropagation(),children:l.map((t=>e(mt,{...t},t.id)))}),document.getElementById("toasts")),c]})},dt=e=>{const{toast:t,setConfig:c,removeToast:r}=m(Je);return i((()=>{e&&c(e)}),[e]),{...t,removeToast:r}},_t=(e,t)=>{const{ignore:c,event:r="click"}=t||{},n=s.useRef();return s.useEffect((()=>{const t=t=>{if(c&&c.length)for(let e=0;e<c.length;e++)if(t.target.closest(c[e]))return;n.current&&!n.current.contains(t.target)&&e()};return document.addEventListener(r,t),()=>{document.removeEventListener(r,t)}}),[n]),n};function wt(e,t=400){const[c,r]=v(e);return i((()=>{const c=setTimeout((()=>r(e)),t);return()=>clearTimeout(c)}),[e,t]),c}const ft=e=>{const[t,c]=v(e);return i((()=>{c(!!e)}),[e]),{isActive:t,toggle:()=>{c(!t)},close:()=>{c(!1)},open:()=>{c(!0)},set:e=>{c(e)}}},bt=c.div`
|
|
1058
|
+
`,gt=c=>{const{width:r="fit-content",minHeight:n="48px",message:a,type:s="info",showActionBtn:l,actionBtnLabel:i,showCloseBtn:o,onActionBtnClick:h,onClose:v}=c,p=(e=>st[e])(s);return t(it,{type:s,width:r,minHeight:n,onMouseDown:e=>e.stopPropagation(),children:[e(ot,{children:p}),t(ht,{children:[a," "]}),e(vt,{role:"button",children:l&&e(ne,{label:i,variant:"outline",secondary:!0,onClick:h})}),o&&e(pt,{onClick:v,children:lt})]})},mt=({message:t,type:c,id:r,config:n})=>{const{removeToast:a}=m(Je);return e(tt,{children:e(gt,{minHeight:"60px",width:"100%",type:c,message:t,actionBtnLabel:n?.actionBtnLabel,showActionBtn:n?.showActionBtn,showCloseBtn:!0,onActionBtnClick:n?.onActionBtnClick,onClose:(e=>()=>a(e))(r)})})},ut=({children:c,position:r,timeout:n,offsetX:a,offsetY:s})=>{const[l,i]=v([]),[o,h]=v({position:r,timeout:n,offsetX:a,offsetY:s}),g=p([]),m=e=>{const t=g.current.find((t=>t.id===e));t&&(clearTimeout(t?.timeout),g.current=g.current.filter((t=>t.id!==e)))},u=(e,t)=>{i((c=>{const r=c.findIndex((t=>t.id===e)),n=[...c];return n[r]=t,n}))},d=e=>{const t=l.filter((t=>t.id!==e));i(t),m(e)},_=()=>{l.length>=5&&(()=>{const[e,...t]=l;i(t),m(g.current[0].id)})()},w=e=>{let t=setTimeout((()=>{i((t=>t.filter((t=>t.id!==e.id)))),m(e.id)}),e.config?.timeout??o.timeout??5e3);g.current.push({id:e.id,timeout:t})},f=e=>"promise"===e?(t,c)=>{_();const r={message:c.pendingMessage,id:Ce(),type:e};return i((e=>[...e,r])),t.then((e=>{c.successMessage?u(r.id,{...r,message:c.successMessage,type:"success",config:{timeout:3e3}}):d(r.id),c.onSuccess?.(e)})).catch((e=>{c.errorMessage?u(r.id,{...r,message:c.errorMessage,type:"error",config:{timeout:3e3}}):d(r.id),c.onError?.(e)})).finally((()=>{w(r),c.onFinally?.()})),r.id}:(t,c)=>{_();const r={message:t,id:Ce(),type:e,config:c};return i((e=>[...e,r])),w(r),r.id},Z={success:f("success"),error:f("error"),warning:f("warning"),info:f("info"),promise:f("promise")};return t(Je.Provider,{value:{toast:Z,removeToast:d,setConfig:h},children:[l.length>0&&b(e(et,{position:o.position??"top-center",offsetX:o.offsetX??50,offsetY:o.offsetY??50,onClick:e=>e.stopPropagation(),children:l.map((t=>e(mt,{...t},t.id)))}),document.getElementById("toasts")),c]})},dt=e=>{const{toast:t,setConfig:c,removeToast:r}=m(Je);return i((()=>{e&&c(e)}),[e]),{...t,removeToast:r}},_t=(e,t)=>{const{ignore:c,event:r="click"}=t||{},n=s.useRef();return s.useEffect((()=>{const t=t=>{if(c&&c.length)for(let e=0;e<c.length;e++)if(t.target.closest(c[e]))return;n.current&&!n.current.contains(t.target)&&e()};return document.addEventListener(r,t),()=>{document.removeEventListener(r,t)}}),[n]),n};function wt(e,t=400){const[c,r]=v(e);return i((()=>{const c=setTimeout((()=>r(e)),t);return()=>clearTimeout(c)}),[e,t]),c}const ft=e=>{const[t,c]=v(e);return i((()=>{c(!!e)}),[e]),{isActive:t,toggle:()=>{c(!t)},close:()=>{c(!1)},open:()=>{c(!0)},set:e=>{c(e)}}},bt=c.div`
|
|
1059
1059
|
display: flex;
|
|
1060
1060
|
flex-direction: column;
|
|
1061
1061
|
|
|
@@ -1857,7 +1857,7 @@ import{jsx as e,jsxs as t}from"react/jsx-runtime";import c,{css as r,createGloba
|
|
|
1857
1857
|
display: flex;
|
|
1858
1858
|
align-items: center;
|
|
1859
1859
|
justify-content: center;
|
|
1860
|
-
`,Mc="480px",Ec="right",Oc=.5,Pc=e(
|
|
1860
|
+
`,Mc="480px",Ec="right",Oc=.5,Pc=e(dc,{}),yc=c=>{const{children:r,onClose:n,open:a,width:s=Mc,position:l=Ec,loading:i,overlayOpacity:o=Oc,customLoader:h=Pc,portal:v}=c,p=_t(n,{ignore:[".sd",".rmdp-day"],event:"mousedown"}),g=v?b:e=>e;return a?g(e(bc,{children:t(Zc,{ref:p,width:s,position:l,children:[i&&e(xc,{absolutePositioned:!0,bgOpacity:o,children:h}),r]})}),document.body):null},Vc=e=>`"${e}"`,jc=c.section`
|
|
1861
1861
|
height: 100vh;
|
|
1862
1862
|
display: grid;
|
|
1863
1863
|
grid-template-rows: auto 1fr auto;
|