@machinerd/js-module 0.9.0 → 0.10.0
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 -6
- package/dist/{api-client-C0sbSOQf.mjs → api-client-B-kwZogn.mjs} +1 -1
- package/dist/hooks/common/index.cjs +1 -1
- package/dist/hooks/common/index.d.cts +6 -7
- package/dist/hooks/common/index.d.mts +6 -7
- package/dist/hooks/common/index.mjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/providers/api-client/index.cjs +1 -1
- package/dist/providers/api-client/index.d.cts +3 -3
- package/dist/providers/api-client/index.d.mts +3 -3
- package/dist/providers/api-client/index.mjs +1 -1
- package/dist/providers/noti-stack/index.d.cts +2 -2
- package/dist/{skeleton-Y22bmaaB.mjs → skeleton-azZrk5-3.mjs} +1 -1
- package/dist/styles/index.css +0 -251
- package/dist/ui/carousel/index.cjs +1 -1
- package/dist/ui/carousel/index.d.cts +9 -9
- package/dist/ui/carousel/index.d.mts +9 -9
- package/dist/ui/carousel/index.mjs +1 -1
- package/dist/ui/dialog/index.cjs +1 -1
- package/dist/ui/dialog/index.d.cts +2 -2
- package/dist/ui/dialog/index.d.mts +4 -4
- package/dist/ui/dialog/index.mjs +1 -1
- package/dist/ui/dnd/index.d.cts +2 -2
- package/dist/ui/image/index.cjs +1 -1
- package/dist/ui/image/index.d.cts +8 -8
- package/dist/ui/image/index.d.mts +8 -8
- package/dist/ui/image/index.mjs +1 -1
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.d.cts +55 -12
- package/dist/ui/index.d.mts +58 -15
- package/dist/ui/index.mjs +1 -1
- package/dist/ui/motion-dialog/index.cjs +1 -1
- package/dist/ui/motion-dialog/index.mjs +1 -1
- package/dist/ui/sheet/index.cjs +1 -1
- package/dist/ui/sheet/index.d.cts +2 -2
- package/dist/ui/sheet/index.d.mts +2 -2
- package/dist/ui/sheet/index.mjs +1 -1
- package/dist/ui/switch/index.cjs +1 -1
- package/dist/ui/switch/index.mjs +1 -1
- package/dist/ui/tooltip/index.cjs +1 -1
- package/dist/ui/tooltip/index.d.cts +2 -2
- package/dist/ui/tooltip/index.mjs +1 -1
- package/dist/{use-subset-image-o_gmC1HL.cjs → use-subset-image-CTy5mCLo.cjs} +1 -1
- package/dist/{use-subset-image-Df2fCrtH.mjs → use-subset-image-LQWsE5P4.mjs} +1 -1
- package/dist/util/common.mjs +1 -1
- package/dist/util/file.mjs +1 -1
- package/dist/util/format.cjs +1 -1
- package/dist/util/format.d.cts +1 -29
- package/dist/util/format.d.mts +1 -29
- package/dist/util/format.mjs +1 -1
- package/package.json +4 -42
- package/dist/button-CQZuaIU7.mjs +0 -1
- package/dist/button-ChX3XGbR.cjs +0 -1
- package/dist/button-DHvx-GAg.d.cts +0 -50
- package/dist/button-DRIyBtEB.d.mts +0 -50
- package/dist/editor/index.cjs +0 -1
- package/dist/editor/index.d.cts +0 -80
- package/dist/editor/index.d.mts +0 -80
- package/dist/editor/index.mjs +0 -1
- package/dist/format-1_RTNUQv.mjs +0 -1
- package/dist/format-DEuImTYJ.cjs +0 -1
- package/dist/styles/editor.css +0 -255
- package/dist/ui/dropdown/index.cjs +0 -1
- package/dist/ui/dropdown/index.d.cts +0 -72
- package/dist/ui/dropdown/index.d.mts +0 -72
- package/dist/ui/dropdown/index.mjs +0 -1
- package/dist/ui/preserve-focus-button/index.cjs +0 -1
- package/dist/ui/preserve-focus-button/index.d.cts +0 -12
- package/dist/ui/preserve-focus-button/index.d.mts +0 -12
- package/dist/ui/preserve-focus-button/index.mjs +0 -1
- package/dist/ui-Bs9PP9eC.cjs +0 -1
- package/dist/ui-D2DoC_0E.mjs +0 -1
- package/dist/use-drag-resize-BdeLdulk.mjs +0 -1
- package/dist/use-drag-resize-DEgcua2U.d.cts +0 -48
- package/dist/use-drag-resize-DRHPv5RK.d.mts +0 -48
- package/dist/use-drag-resize-DeDqPC4h.cjs +0 -1
- package/dist/util/editor.cjs +0 -1
- package/dist/util/editor.d.cts +0 -21
- package/dist/util/editor.d.mts +0 -21
- package/dist/util/editor.mjs +0 -1
- /package/dist/{api-client-C3o2pO0q.cjs → api-client-BH5tW3p8.cjs} +0 -0
- /package/dist/{common-B8HXyhZa.cjs → common-BQEGjmFn.cjs} +0 -0
- /package/dist/{common-ZUMpASnc.mjs → common-CCtD91nO.mjs} +0 -0
- /package/dist/{common-CWHkXe0F.mjs → common-L3y7_eAy.mjs} +0 -0
- /package/dist/{file-B-UJkabO.mjs → file-CjW1pMb_.mjs} +0 -0
- /package/dist/{index-B1YNV_Vm.d.cts → index-CFOJBfVt.d.mts} +0 -0
- /package/dist/{index-C8chDULk.d.mts → index-ChiDX5zW.d.cts} +0 -0
- /package/dist/{skeleton-B5ZccRFX.cjs → skeleton-BCdxpynL.cjs} +0 -0
- /package/dist/{src-CIMlbgv1.mjs → src-Ce2i3Lkj.mjs} +0 -0
- /package/dist/{use-dialog-stack-YiLs-sNf.cjs → use-dialog-stack-DmBRPhe2.cjs} +0 -0
- /package/dist/{use-dialog-stack-Crj8YWJl.mjs → use-dialog-stack-STwnhvBB.mjs} +0 -0
- /package/dist/{use-subset-image-Dygkyw-W.d.mts → use-subset-image-Ck1Gk5Qk.d.mts} +0 -0
- /package/dist/{use-subset-image-bDB5TSd4.d.cts → use-subset-image-oZAiC9VK.d.cts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../common-D4sUwkFd.cjs`);let n=require(`
|
|
1
|
+
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../common-D4sUwkFd.cjs`);let n=require(`clsx`);n=e.t(n);let r=require(`react`);r=e.t(r);let i=require(`react/jsx-runtime`),a=require(`embla-carousel-react`);a=e.t(a);const o=r.default.createContext(null);function s(){let e=r.default.useContext(o);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}function c({orientation:e=`horizontal`,options:n,setApi:s,plugins:c,className:l,children:u,...d}){let[f,p]=(0,a.default)({...n,axis:e===`horizontal`?`x`:`y`},c),[m,h]=(0,r.useState)(!1),[g,_]=(0,r.useState)(!1),[v,y]=(0,r.useState)(0),[b,x]=(0,r.useState)(0),S=(0,r.useCallback)(e=>{e&&(h(e.canScrollPrev()),_(e.canScrollNext()),x(e.selectedScrollSnap()))},[]),C=(0,r.useCallback)(()=>{p?.scrollPrev()},[p]),w=(0,r.useCallback)(()=>{p?.scrollNext()},[p]),T=(0,r.useCallback)(e=>{p?.scrollTo(e)},[p]),E=(0,r.useCallback)(()=>{y(p?.scrollSnapList().length||0)},[p]),D=(0,r.useCallback)(t=>{e===`horizontal`?t.key===`ArrowLeft`?(t.preventDefault(),C()):t.key===`ArrowRight`&&(t.preventDefault(),w()):t.key===`ArrowUp`?(t.preventDefault(),C()):t.key===`ArrowDown`&&(t.preventDefault(),w())},[C,w,e]);return(0,r.useEffect)(()=>{!p||!s||s(p)},[p,s]),(0,r.useEffect)(()=>{if(p)return S(p),E(),p.on(`reInit`,E),p.on(`reInit`,S),p.on(`select`,S),()=>{p?.off(`select`,S)}},[p,E,S]),(0,i.jsx)(o.Provider,{value:{carouselRef:f,api:p,options:n,orientation:e||(n?.axis===`y`?`vertical`:`horizontal`),scrollPrev:C,scrollNext:w,canScrollPrev:m,canScrollNext:g,scrollTo:T,dots:v,selectedScrollSnap:b},children:(0,i.jsx)(`div`,{"data-komc":!0,role:`region`,"aria-label":`carousel`,"aria-roledescription":`carousel`,tabIndex:0,onKeyDownCapture:D,className:t.n(`komc:relative`,l),...d,children:u})})}function l({children:e,className:n,...r}){let{carouselRef:a}=s();return(0,i.jsx)(`div`,{ref:a,"data-komc":!0,className:t.n(`komc:h-full komc:overflow-hidden`,n),...r,children:e})}function u({className:e,...n}){let{orientation:r}=s();return(0,i.jsx)(`div`,{"data-komc":!0,className:t.n(`komc:flex komc:h-full`,r===`horizontal`?`komc:-ml-4`:`komc:-mt-4 komc:flex-col`,e),...n})}function d({className:e,...n}){let{orientation:r}=s();return(0,i.jsx)(`div`,{"data-komc":!0,className:t.n(`komc:min-w-0 komc:shrink-0 komc:grow-0 komc:basis-full`,r===`horizontal`?`komc:pl-4`:`komc:pt-4`,e),...n})}function f({children:e,className:t,...r}){let{scrollPrev:a,canScrollPrev:o}=s();return(0,i.jsx)(`button`,{type:`button`,"data-komc":!0,disabled:!o,"aria-label":`previous slide`,className:(0,n.default)(`komc:w-full`,t),onClick:a,...r,children:e})}function p({children:e,className:t,...r}){let{scrollNext:a,canScrollNext:o}=s();return(0,i.jsx)(`button`,{type:`button`,"data-komc":!0,disabled:!o,"aria-label":`next slide`,className:(0,n.default)(`komc:w-full`,t),onClick:a,...r,children:e})}function m({children:e,...t}){let{dots:n,selectedScrollSnap:r,scrollTo:a}=s();return(0,i.jsx)(i.Fragment,{children:Array.from({length:n}).map((n,o)=>(0,i.jsx)(`button`,{type:`button`,"data-komc":!0,"data-selected":r===o,"aria-label":`go to slide ${o+1}`,onClick:()=>a(o),...t,children:e?.(o)},o))})}function h({index:e,children:t,...n}){let{selectedScrollSnap:r,scrollTo:a}=s();return(0,i.jsx)(`button`,{type:`button`,"data-komc":!0,"data-selected":r===e,"aria-label":`go to slide ${e+1}`,onClick:()=>a(e),...n,children:t})}exports.Carousel=c,exports.CarouselDot=h,exports.CarouselDots=m,exports.CarouselItem=d,exports.CarouselNext=p,exports.CarouselPrevious=f,exports.CarouselViewport=l,exports.CarouselWrapper=u,exports.useCarousel=s;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ComponentProps } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
3
3
|
import useEmblaCarousel, { UseEmblaCarouselType } from "embla-carousel-react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/carousel/carousel-context.d.ts
|
|
@@ -41,40 +41,40 @@ declare function Carousel({
|
|
|
41
41
|
className,
|
|
42
42
|
children,
|
|
43
43
|
...props
|
|
44
|
-
}: CarouselProps$1):
|
|
44
|
+
}: CarouselProps$1): react_jsx_runtime10.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region src/ui/carousel/carousel-viewport.d.ts
|
|
47
47
|
declare function CarouselViewport({
|
|
48
48
|
children,
|
|
49
49
|
className,
|
|
50
50
|
...props
|
|
51
|
-
}: React.ComponentProps<'div'>):
|
|
51
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime10.JSX.Element;
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region src/ui/carousel/carousel-wrapper.d.ts
|
|
54
54
|
declare function CarouselWrapper({
|
|
55
55
|
className,
|
|
56
56
|
...props
|
|
57
|
-
}: React.ComponentProps<'div'>):
|
|
57
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime10.JSX.Element;
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/ui/carousel/carousel-item.d.ts
|
|
60
60
|
declare function CarouselItem({
|
|
61
61
|
className,
|
|
62
62
|
...props
|
|
63
|
-
}: React.ComponentProps<'div'>):
|
|
63
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime10.JSX.Element;
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region src/ui/carousel/carousel-previous.d.ts
|
|
66
66
|
declare function CarouselPrevious({
|
|
67
67
|
children,
|
|
68
68
|
className,
|
|
69
69
|
...props
|
|
70
|
-
}: React.ComponentProps<'button'>):
|
|
70
|
+
}: React.ComponentProps<'button'>): react_jsx_runtime10.JSX.Element;
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region src/ui/carousel/carousel-next.d.ts
|
|
73
73
|
declare function CarouselNext({
|
|
74
74
|
children,
|
|
75
75
|
className,
|
|
76
76
|
...props
|
|
77
|
-
}: React.ComponentProps<'button'>):
|
|
77
|
+
}: React.ComponentProps<'button'>): react_jsx_runtime10.JSX.Element;
|
|
78
78
|
//#endregion
|
|
79
79
|
//#region src/ui/carousel/carousel-dots.d.ts
|
|
80
80
|
declare function CarouselDots$1({
|
|
@@ -82,7 +82,7 @@ declare function CarouselDots$1({
|
|
|
82
82
|
...props
|
|
83
83
|
}: Omit<React.ComponentProps<'button'>, 'children'> & {
|
|
84
84
|
children?: (index: number) => React.ReactNode;
|
|
85
|
-
}):
|
|
85
|
+
}): react_jsx_runtime10.JSX.Element;
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region src/ui/carousel/carousel-dot.d.ts
|
|
88
88
|
declare function CarouselDots({
|
|
@@ -91,6 +91,6 @@ declare function CarouselDots({
|
|
|
91
91
|
...props
|
|
92
92
|
}: React.ComponentProps<'button'> & {
|
|
93
93
|
index: number;
|
|
94
|
-
}):
|
|
94
|
+
}): react_jsx_runtime10.JSX.Element;
|
|
95
95
|
//#endregion
|
|
96
96
|
export { Carousel, type CarouselApi, type CarouselContextProps, CarouselDots as CarouselDot, CarouselDots$1 as CarouselDots, CarouselItem, CarouselNext, type CarouselOptions, type CarouselPlugin, CarouselPrevious, type CarouselProps, CarouselViewport, CarouselWrapper, useCarousel };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ComponentProps } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
3
3
|
import useEmblaCarousel, { UseEmblaCarouselType } from "embla-carousel-react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/carousel/carousel-context.d.ts
|
|
@@ -41,40 +41,40 @@ declare function Carousel({
|
|
|
41
41
|
className,
|
|
42
42
|
children,
|
|
43
43
|
...props
|
|
44
|
-
}: CarouselProps$1):
|
|
44
|
+
}: CarouselProps$1): react_jsx_runtime1.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region src/ui/carousel/carousel-viewport.d.ts
|
|
47
47
|
declare function CarouselViewport({
|
|
48
48
|
children,
|
|
49
49
|
className,
|
|
50
50
|
...props
|
|
51
|
-
}: React.ComponentProps<'div'>):
|
|
51
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime1.JSX.Element;
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region src/ui/carousel/carousel-wrapper.d.ts
|
|
54
54
|
declare function CarouselWrapper({
|
|
55
55
|
className,
|
|
56
56
|
...props
|
|
57
|
-
}: React.ComponentProps<'div'>):
|
|
57
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime1.JSX.Element;
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/ui/carousel/carousel-item.d.ts
|
|
60
60
|
declare function CarouselItem({
|
|
61
61
|
className,
|
|
62
62
|
...props
|
|
63
|
-
}: React.ComponentProps<'div'>):
|
|
63
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime1.JSX.Element;
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region src/ui/carousel/carousel-previous.d.ts
|
|
66
66
|
declare function CarouselPrevious({
|
|
67
67
|
children,
|
|
68
68
|
className,
|
|
69
69
|
...props
|
|
70
|
-
}: React.ComponentProps<'button'>):
|
|
70
|
+
}: React.ComponentProps<'button'>): react_jsx_runtime1.JSX.Element;
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region src/ui/carousel/carousel-next.d.ts
|
|
73
73
|
declare function CarouselNext({
|
|
74
74
|
children,
|
|
75
75
|
className,
|
|
76
76
|
...props
|
|
77
|
-
}: React.ComponentProps<'button'>):
|
|
77
|
+
}: React.ComponentProps<'button'>): react_jsx_runtime1.JSX.Element;
|
|
78
78
|
//#endregion
|
|
79
79
|
//#region src/ui/carousel/carousel-dots.d.ts
|
|
80
80
|
declare function CarouselDots$1({
|
|
@@ -82,7 +82,7 @@ declare function CarouselDots$1({
|
|
|
82
82
|
...props
|
|
83
83
|
}: Omit<React.ComponentProps<'button'>, 'children'> & {
|
|
84
84
|
children?: (index: number) => React.ReactNode;
|
|
85
|
-
}):
|
|
85
|
+
}): react_jsx_runtime1.JSX.Element;
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region src/ui/carousel/carousel-dot.d.ts
|
|
88
88
|
declare function CarouselDots({
|
|
@@ -91,6 +91,6 @@ declare function CarouselDots({
|
|
|
91
91
|
...props
|
|
92
92
|
}: React.ComponentProps<'button'> & {
|
|
93
93
|
index: number;
|
|
94
|
-
}):
|
|
94
|
+
}): react_jsx_runtime1.JSX.Element;
|
|
95
95
|
//#endregion
|
|
96
96
|
export { Carousel, type CarouselApi, type CarouselContextProps, CarouselDots as CarouselDot, CarouselDots$1 as CarouselDots, CarouselItem, CarouselNext, type CarouselOptions, type CarouselPlugin, CarouselPrevious, type CarouselProps, CarouselViewport, CarouselWrapper, useCarousel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{n as e}from"../../common-
|
|
1
|
+
"use client";import{n as e}from"../../common-CCtD91nO.mjs";import t from"clsx";import n,{useCallback as r,useEffect as i,useState as a}from"react";import{Fragment as o,jsx as s}from"react/jsx-runtime";import c from"embla-carousel-react";const l=n.createContext(null);function u(){let e=n.useContext(l);if(!e)throw Error(`useCarousel must be used within a <Carousel />`);return e}function d({orientation:t=`horizontal`,options:n,setApi:o,plugins:u,className:d,children:f,...p}){let[m,h]=c({...n,axis:t===`horizontal`?`x`:`y`},u),[g,_]=a(!1),[v,y]=a(!1),[b,x]=a(0),[S,C]=a(0),w=r(e=>{e&&(_(e.canScrollPrev()),y(e.canScrollNext()),C(e.selectedScrollSnap()))},[]),T=r(()=>{h?.scrollPrev()},[h]),E=r(()=>{h?.scrollNext()},[h]),D=r(e=>{h?.scrollTo(e)},[h]),O=r(()=>{x(h?.scrollSnapList().length||0)},[h]),k=r(e=>{t===`horizontal`?e.key===`ArrowLeft`?(e.preventDefault(),T()):e.key===`ArrowRight`&&(e.preventDefault(),E()):e.key===`ArrowUp`?(e.preventDefault(),T()):e.key===`ArrowDown`&&(e.preventDefault(),E())},[T,E,t]);return i(()=>{!h||!o||o(h)},[h,o]),i(()=>{if(h)return w(h),O(),h.on(`reInit`,O),h.on(`reInit`,w),h.on(`select`,w),()=>{h?.off(`select`,w)}},[h,O,w]),s(l.Provider,{value:{carouselRef:m,api:h,options:n,orientation:t||(n?.axis===`y`?`vertical`:`horizontal`),scrollPrev:T,scrollNext:E,canScrollPrev:g,canScrollNext:v,scrollTo:D,dots:b,selectedScrollSnap:S},children:s(`div`,{"data-komc":!0,role:`region`,"aria-label":`carousel`,"aria-roledescription":`carousel`,tabIndex:0,onKeyDownCapture:k,className:e(`komc:relative`,d),...p,children:f})})}function f({children:t,className:n,...r}){let{carouselRef:i}=u();return s(`div`,{ref:i,"data-komc":!0,className:e(`komc:h-full komc:overflow-hidden`,n),...r,children:t})}function p({className:t,...n}){let{orientation:r}=u();return s(`div`,{"data-komc":!0,className:e(`komc:flex komc:h-full`,r===`horizontal`?`komc:-ml-4`:`komc:-mt-4 komc:flex-col`,t),...n})}function m({className:t,...n}){let{orientation:r}=u();return s(`div`,{"data-komc":!0,className:e(`komc:min-w-0 komc:shrink-0 komc:grow-0 komc:basis-full`,r===`horizontal`?`komc:pl-4`:`komc:pt-4`,t),...n})}function h({children:e,className:n,...r}){let{scrollPrev:i,canScrollPrev:a}=u();return s(`button`,{type:`button`,"data-komc":!0,disabled:!a,"aria-label":`previous slide`,className:t(`komc:w-full`,n),onClick:i,...r,children:e})}function g({children:e,className:n,...r}){let{scrollNext:i,canScrollNext:a}=u();return s(`button`,{type:`button`,"data-komc":!0,disabled:!a,"aria-label":`next slide`,className:t(`komc:w-full`,n),onClick:i,...r,children:e})}function _({children:e,...t}){let{dots:n,selectedScrollSnap:r,scrollTo:i}=u();return s(o,{children:Array.from({length:n}).map((n,a)=>s(`button`,{type:`button`,"data-komc":!0,"data-selected":r===a,"aria-label":`go to slide ${a+1}`,onClick:()=>i(a),...t,children:e?.(a)},a))})}function v({index:e,children:t,...n}){let{selectedScrollSnap:r,scrollTo:i}=u();return s(`button`,{type:`button`,"data-komc":!0,"data-selected":r===e,"aria-label":`go to slide ${e+1}`,onClick:()=>i(e),...n,children:t})}export{d as Carousel,v as CarouselDot,_ as CarouselDots,m as CarouselItem,g as CarouselNext,h as CarouselPrevious,f as CarouselViewport,p as CarouselWrapper,u as useCarousel};
|
package/dist/ui/dialog/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-6KfzqI9Z.cjs`),require(`../../file-5mweNdAM.cjs`)
|
|
1
|
+
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-6KfzqI9Z.cjs`),require(`../../file-5mweNdAM.cjs`);const t=require(`../../common-BQEGjmFn.cjs`),n=require(`../../use-dialog-stack-DmBRPhe2.cjs`);require(`../../api-client-BH5tW3p8.cjs`),require(`../../use-subset-image-CTy5mCLo.cjs`);let r=require(`react`),i=require(`react/jsx-runtime`),a=require(`class-variance-authority`);const o=(0,a.cva)(`komc:relative komc:z-10 komc:flex komc:min-h-0 komc:flex-col komc:overflow-hidden komc:w-full komc:max-h-full komc:min-w-0 komc:transition-all komc:duration-300 komc:ease-in-out`,{variants:{padding:{sm:`komc:p-2`,md:`komc:p-4`,lg:`komc:p-6`,none:`komc:p-0`},maxWidth:{sm:`komc:max-w-sm`,md:`komc:max-w-md`,lg:`komc:max-w-lg`,xl:`komc:max-w-xl`,"2xl":`komc:max-w-2xl`,full:`komc:max-w-full`}},defaultVariants:{padding:`sm`,maxWidth:`md`}});function s({closeOnBackdropClick:e=!0,isOpen:a,zIndex:s=1e4,padding:c,maxWidth:l,className:u,onClose:d,children:f,...p}){let m=t.l(a,300),[h,g]=(0,r.useState)(!1);n.t(a,d),(0,r.useEffect)(()=>{if(a&&m){let e=setTimeout(()=>g(!0),10);return()=>clearTimeout(e)}else a||g(!1)},[a,m]);let _=(0,r.useCallback)(()=>{e&&d()},[e,d]);return m?(0,i.jsx)(`div`,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:min-h-0 komc:flex-col komc:overflow-hidden`,style:{zIndex:s},children:(0,i.jsxs)(`div`,{className:`komc:relative komc:flex komc:min-h-0 komc:flex-1 komc:w-full komc:items-center komc:justify-center`,children:[(0,i.jsx)(`button`,{type:`button`,"data-state":h?`open`:`closed`,className:`komc:fixed komc:inset-0 komc:z-0 komc:cursor-default komc:bg-black/50 komc:transition-opacity komc:duration-300 komc:ease-in-out komc:data-[state=closed]:opacity-0 komc:data-[state=open]:opacity-100`,onClick:_,"aria-label":`close dialog`}),(0,i.jsx)(`div`,{"data-state":h?`open`:`closed`,className:`${o({padding:c,maxWidth:l,className:u})} komc:data-[state=closed]:opacity-0 komc:data-[state=open]:opacity-100 komc:data-[state=closed]:scale-95 komc:data-[state=open]:scale-100`,role:`dialog`,"aria-modal":`true`,...p,children:f})]})}):null}exports.Dialog=s;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
2
3
|
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
3
4
|
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/ui/dialog/dialog.d.ts
|
|
7
7
|
declare const classes: (props?: ({
|
|
@@ -25,6 +25,6 @@ declare function Dialog({
|
|
|
25
25
|
onClose,
|
|
26
26
|
children,
|
|
27
27
|
...rest
|
|
28
|
-
}: DialogProps):
|
|
28
|
+
}: DialogProps): react_jsx_runtime3.JSX.Element | null;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Dialog, type DialogProps };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import * as
|
|
4
|
+
import * as class_variance_authority_types2 from "class-variance-authority/types";
|
|
5
5
|
|
|
6
6
|
//#region src/ui/dialog/dialog.d.ts
|
|
7
7
|
declare const classes: (props?: ({
|
|
8
8
|
padding?: "sm" | "md" | "lg" | "none" | null | undefined;
|
|
9
9
|
maxWidth?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | null | undefined;
|
|
10
|
-
} &
|
|
10
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
11
11
|
interface DialogProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
|
|
12
12
|
closeOnBackdropClick?: boolean;
|
|
13
13
|
isOpen: boolean;
|
|
@@ -25,6 +25,6 @@ declare function Dialog({
|
|
|
25
25
|
onClose,
|
|
26
26
|
children,
|
|
27
27
|
...rest
|
|
28
|
-
}: DialogProps):
|
|
28
|
+
}: DialogProps): react_jsx_runtime14.JSX.Element | null;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Dialog, type DialogProps };
|
package/dist/ui/dialog/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"../../src-
|
|
1
|
+
"use client";import"../../src-Ce2i3Lkj.mjs";import"../../file-CjW1pMb_.mjs";import{l as e}from"../../common-L3y7_eAy.mjs";import{t}from"../../use-dialog-stack-STwnhvBB.mjs";import"../../api-client-B-kwZogn.mjs";import"../../use-subset-image-LQWsE5P4.mjs";import{useCallback as n,useEffect as r,useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";const c=s(`komc:relative komc:z-10 komc:flex komc:min-h-0 komc:flex-col komc:overflow-hidden komc:w-full komc:max-h-full komc:min-w-0 komc:transition-all komc:duration-300 komc:ease-in-out`,{variants:{padding:{sm:`komc:p-2`,md:`komc:p-4`,lg:`komc:p-6`,none:`komc:p-0`},maxWidth:{sm:`komc:max-w-sm`,md:`komc:max-w-md`,lg:`komc:max-w-lg`,xl:`komc:max-w-xl`,"2xl":`komc:max-w-2xl`,full:`komc:max-w-full`}},defaultVariants:{padding:`sm`,maxWidth:`md`}});function l({closeOnBackdropClick:s=!0,isOpen:l,zIndex:u=1e4,padding:d,maxWidth:f,className:p,onClose:m,children:h,...g}){let _=e(l,300),[v,y]=i(!1);t(l,m),r(()=>{if(l&&_){let e=setTimeout(()=>y(!0),10);return()=>clearTimeout(e)}else l||y(!1)},[l,_]);let b=n(()=>{s&&m()},[s,m]);return _?a(`div`,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:min-h-0 komc:flex-col komc:overflow-hidden`,style:{zIndex:u},children:o(`div`,{className:`komc:relative komc:flex komc:min-h-0 komc:flex-1 komc:w-full komc:items-center komc:justify-center`,children:[a(`button`,{type:`button`,"data-state":v?`open`:`closed`,className:`komc:fixed komc:inset-0 komc:z-0 komc:cursor-default komc:bg-black/50 komc:transition-opacity komc:duration-300 komc:ease-in-out komc:data-[state=closed]:opacity-0 komc:data-[state=open]:opacity-100`,onClick:b,"aria-label":`close dialog`}),a(`div`,{"data-state":v?`open`:`closed`,className:`${c({padding:d,maxWidth:f,className:p})} komc:data-[state=closed]:opacity-0 komc:data-[state=open]:opacity-100 komc:data-[state=closed]:scale-95 komc:data-[state=open]:scale-100`,role:`dialog`,"aria-modal":`true`,...g,children:h})]})}):null}export{l as Dialog};
|
package/dist/ui/dnd/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
3
3
|
import { DraggableAttributes } from "@dnd-kit/core";
|
|
4
4
|
import { useSortable } from "@dnd-kit/sortable";
|
|
5
5
|
|
|
@@ -12,6 +12,6 @@ interface DndItemProps {
|
|
|
12
12
|
declare function DndItem({
|
|
13
13
|
id,
|
|
14
14
|
render
|
|
15
|
-
}: DndItemProps):
|
|
15
|
+
}: DndItemProps): react_jsx_runtime11.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { DndItem };
|
package/dist/ui/image/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-6KfzqI9Z.cjs`),require(`../../common-D4sUwkFd.cjs`),require(`../../file-5mweNdAM.cjs`);const t=require(`../../skeleton-
|
|
1
|
+
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-6KfzqI9Z.cjs`),require(`../../common-D4sUwkFd.cjs`),require(`../../file-5mweNdAM.cjs`);const t=require(`../../skeleton-BCdxpynL.cjs`);require(`../../api-client-BH5tW3p8.cjs`);const n=require(`../../use-subset-image-CTy5mCLo.cjs`);let r=require(`clsx`);r=e.t(r);let i=require(`react`),a=require(`react/jsx-runtime`),o=require(`class-variance-authority`);const s=(0,o.cva)(``,{variants:{fill:{true:`komc:w-full komc:h-full komc:absolute komc:inset-0`,false:``}},defaultVariants:{fill:!1}}),c=(0,i.forwardRef)(({...e},t)=>{let{ref:r,imageProps:i}=n.n({ref:t,...e});return(0,a.jsx)(`img`,{ref:r,...i})}),l=(0,i.forwardRef)(({skeleton:e=!0,layout:i=`stretch`,fallbackSrc:o,className:c,emptyNode:l,emptyNodeClassName:d,skeletonClassName:f,...p},m)=>{let{ref:h,isLoad:g,isError:_,imageProps:v}=n.n({ref:m,fallbackSrc:o,forceLoad:!e,...p}),y=!p.fill&&i===`intrinsic`?{width:`${p.width}px`,height:`${p.height}px`}:void 0,b=(0,r.default)(`komc:flex komc:justify-center komc:items-center komc:relative komc:min-h-0`,!p.fill&&i===`stretch`&&`komc:w-full komc:h-full`);return!o&&_&&l?p.fill?(0,a.jsx)(u,{className:d,children:l}):(0,a.jsx)(`div`,{"data-komc":!0,style:y,className:b,children:(0,a.jsx)(u,{className:d,children:l})}):p.fill?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`img`,{ref:h,...v,className:(0,r.default)(`komc:w-full komc:h-full komc:absolute komc:inset-0`,e&&!g?`komc:invisible`:`komc:visible`,c)}),(0,a.jsx)(`div`,{"data-komc":!0,className:(0,r.default)(`komc:w-full komc:h-full komc:absolute komc:inset-0`,e&&!g?`komc:block`:`komc:hidden`),children:(0,a.jsx)(t.t,{size:`full`,className:f})})]}):(0,a.jsxs)(`div`,{"data-komc":!0,style:y,className:b,children:[(0,a.jsx)(`img`,{ref:h,...v,className:(0,r.default)(s({fill:p.fill,className:c}),e&&!g?`komc:invisible`:`komc:visible`)}),(0,a.jsx)(`div`,{className:(0,r.default)(`komc:w-full komc:h-full komc:absolute komc:inset-0`,e&&!g?`komc:block`:`komc:hidden`),children:(0,a.jsx)(t.t,{size:`full`,className:f})})]})}),u=({children:e,className:t})=>(0,a.jsx)(`div`,{"data-komc":!0,role:`alert`,className:(0,r.default)(`komc:flex komc:justify-center komc:items-center komc:w-full komc:h-full komc:bg-gray-100 komc:absolute komc:inset-0 komc:p-1`,t),children:e});var d=l;exports.BaseImage=c,exports.EmptyNode=u,exports.Image=d;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as UseSubsetImageProps, t as BaseProps } from "../../use-subset-image-
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
1
|
+
import { i as UseSubsetImageProps, t as BaseProps } from "../../use-subset-image-oZAiC9VK.cjs";
|
|
2
|
+
import * as react3 from "react";
|
|
3
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/image/image.d.ts
|
|
6
6
|
interface ImageSubsetProps {
|
|
@@ -11,7 +11,7 @@ interface ImageSubsetProps {
|
|
|
11
11
|
skeletonClassName?: string;
|
|
12
12
|
}
|
|
13
13
|
type ImageProps = UseSubsetImageProps & ImageSubsetProps;
|
|
14
|
-
declare const BaseImage:
|
|
14
|
+
declare const BaseImage: react3.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
15
15
|
fill: true;
|
|
16
16
|
sizes: string;
|
|
17
17
|
width?: never;
|
|
@@ -21,8 +21,8 @@ declare const BaseImage: react1.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
|
21
21
|
sizes?: never;
|
|
22
22
|
width: number;
|
|
23
23
|
height: number;
|
|
24
|
-
}, "ref">) &
|
|
25
|
-
declare const Image:
|
|
24
|
+
}, "ref">) & react3.RefAttributes<HTMLImageElement>>;
|
|
25
|
+
declare const Image: react3.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
26
26
|
fill: true;
|
|
27
27
|
sizes: string;
|
|
28
28
|
width?: never;
|
|
@@ -32,7 +32,7 @@ declare const Image: react1.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
|
32
32
|
sizes?: never;
|
|
33
33
|
width: number;
|
|
34
34
|
height: number;
|
|
35
|
-
} & ImageSubsetProps, "ref">) &
|
|
35
|
+
} & ImageSubsetProps, "ref">) & react3.RefAttributes<HTMLImageElement>>;
|
|
36
36
|
interface EmptyNodeProps {
|
|
37
37
|
children: React.ReactNode;
|
|
38
38
|
className?: string;
|
|
@@ -40,6 +40,6 @@ interface EmptyNodeProps {
|
|
|
40
40
|
declare const EmptyNode: ({
|
|
41
41
|
children,
|
|
42
42
|
className
|
|
43
|
-
}: EmptyNodeProps) =>
|
|
43
|
+
}: EmptyNodeProps) => react_jsx_runtime1.JSX.Element;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { BaseImage, EmptyNode, type EmptyNodeProps, Image, type ImageProps, type ImageSubsetProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as UseSubsetImageProps, t as BaseProps } from "../../use-subset-image-
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
1
|
+
import { i as UseSubsetImageProps, t as BaseProps } from "../../use-subset-image-Ck1Gk5Qk.mjs";
|
|
2
|
+
import * as react5 from "react";
|
|
3
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/image/image.d.ts
|
|
6
6
|
interface ImageSubsetProps {
|
|
@@ -11,7 +11,7 @@ interface ImageSubsetProps {
|
|
|
11
11
|
skeletonClassName?: string;
|
|
12
12
|
}
|
|
13
13
|
type ImageProps = UseSubsetImageProps & ImageSubsetProps;
|
|
14
|
-
declare const BaseImage:
|
|
14
|
+
declare const BaseImage: react5.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
15
15
|
fill: true;
|
|
16
16
|
sizes: string;
|
|
17
17
|
width?: never;
|
|
@@ -21,8 +21,8 @@ declare const BaseImage: react1.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
|
21
21
|
sizes?: never;
|
|
22
22
|
width: number;
|
|
23
23
|
height: number;
|
|
24
|
-
}, "ref">) &
|
|
25
|
-
declare const Image:
|
|
24
|
+
}, "ref">) & react5.RefAttributes<HTMLImageElement>>;
|
|
25
|
+
declare const Image: react5.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
26
26
|
fill: true;
|
|
27
27
|
sizes: string;
|
|
28
28
|
width?: never;
|
|
@@ -32,7 +32,7 @@ declare const Image: react1.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
|
32
32
|
sizes?: never;
|
|
33
33
|
width: number;
|
|
34
34
|
height: number;
|
|
35
|
-
} & ImageSubsetProps, "ref">) &
|
|
35
|
+
} & ImageSubsetProps, "ref">) & react5.RefAttributes<HTMLImageElement>>;
|
|
36
36
|
interface EmptyNodeProps {
|
|
37
37
|
children: React.ReactNode;
|
|
38
38
|
className?: string;
|
|
@@ -40,6 +40,6 @@ interface EmptyNodeProps {
|
|
|
40
40
|
declare const EmptyNode: ({
|
|
41
41
|
children,
|
|
42
42
|
className
|
|
43
|
-
}: EmptyNodeProps) =>
|
|
43
|
+
}: EmptyNodeProps) => react_jsx_runtime9.JSX.Element;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { BaseImage, EmptyNode, type EmptyNodeProps, Image, type ImageProps, type ImageSubsetProps };
|
package/dist/ui/image/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"../../src-
|
|
1
|
+
"use client";import"../../src-Ce2i3Lkj.mjs";import"../../common-CCtD91nO.mjs";import"../../file-CjW1pMb_.mjs";import{t as e}from"../../skeleton-azZrk5-3.mjs";import"../../api-client-B-kwZogn.mjs";import{n as t}from"../../use-subset-image-LQWsE5P4.mjs";import n from"clsx";import{forwardRef as r}from"react";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";const c=s(``,{variants:{fill:{true:`komc:w-full komc:h-full komc:absolute komc:inset-0`,false:``}},defaultVariants:{fill:!1}}),l=r(({...e},n)=>{let{ref:r,imageProps:i}=t({ref:n,...e});return a(`img`,{ref:r,...i})}),u=r(({skeleton:r=!0,layout:s=`stretch`,fallbackSrc:l,className:u,emptyNode:f,emptyNodeClassName:p,skeletonClassName:m,...h},g)=>{let{ref:_,isLoad:v,isError:y,imageProps:b}=t({ref:g,fallbackSrc:l,forceLoad:!r,...h}),x=!h.fill&&s===`intrinsic`?{width:`${h.width}px`,height:`${h.height}px`}:void 0,S=n(`komc:flex komc:justify-center komc:items-center komc:relative komc:min-h-0`,!h.fill&&s===`stretch`&&`komc:w-full komc:h-full`);return!l&&y&&f?h.fill?a(d,{className:p,children:f}):a(`div`,{"data-komc":!0,style:x,className:S,children:a(d,{className:p,children:f})}):h.fill?o(i,{children:[a(`img`,{ref:_,...b,className:n(`komc:w-full komc:h-full komc:absolute komc:inset-0`,r&&!v?`komc:invisible`:`komc:visible`,u)}),a(`div`,{"data-komc":!0,className:n(`komc:w-full komc:h-full komc:absolute komc:inset-0`,r&&!v?`komc:block`:`komc:hidden`),children:a(e,{size:`full`,className:m})})]}):o(`div`,{"data-komc":!0,style:x,className:S,children:[a(`img`,{ref:_,...b,className:n(c({fill:h.fill,className:u}),r&&!v?`komc:invisible`:`komc:visible`)}),a(`div`,{className:n(`komc:w-full komc:h-full komc:absolute komc:inset-0`,r&&!v?`komc:block`:`komc:hidden`),children:a(e,{size:`full`,className:m})})]})}),d=({children:e,className:t})=>a(`div`,{"data-komc":!0,role:`alert`,className:n(`komc:flex komc:justify-center komc:items-center komc:w-full komc:h-full komc:bg-gray-100 komc:absolute komc:inset-0 komc:p-1`,t),children:e});var f=u;export{l as BaseImage,d as EmptyNode,f as Image};
|
package/dist/ui/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require(`../chunk-Bmb41Sf3.cjs`),t=require(`../common-D4sUwkFd.cjs`),n=require(`../skeleton-BCdxpynL.cjs`);let r=require(`clsx`);r=e.t(r);let i=require(`react`);i=e.t(i);let a=require(`react/jsx-runtime`),o=require(`class-variance-authority`),s=require(`@radix-ui/react-slot`);function c({className:e,items:t,render:n,...o}){return(0,a.jsx)(`nav`,{"data-komc":!0,"aria-label":`bottom app bar`,className:(0,r.default)(`komc:fixed komc:bottom-0 komc:left-0 komc:right-0`,`komc:border-t komc:border-neutral-200 komc:bg-white komc:z-10`,e),...o,children:(0,a.jsx)(`div`,{className:`komc:grid komc:min-h-15`,style:{gridTemplateColumns:`repeat(${t.length}, 1fr)`},children:t.map((e,t)=>(0,a.jsx)(i.default.Fragment,{children:n(e)},t))})})}const l=(0,o.cva)(t.n(`komc:flex komc:justify-center komc:items-center komc:gap-x-2 komc:w-full`,`komc:transition-colors komc:duration-200 komc:relative`,`komc:[&_svg]:transition-colors komc:[&_svg]:duration-200`,`komc:cursor-pointer komc:disabled:cursor-default`),{variants:{size:{xxs:`komc:h-7.5`,xs:`komc:h-8`,sm:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`,"4xl":`komc:h-15`},shadow:{none:``,sm:`komc:drop-shadow-sm`,md:`komc:drop-shadow-md`,lg:`komc:drop-shadow-lg`,xl:`komc:drop-shadow-xl`,"2xl":`komc:drop-shadow-2xl`,"3xl":`komc:drop-shadow-3xl`},outline:{line:`komc:border`,solid:`komc:border komc:border-transparent`,clear:`komc:border-none`},variant:{blue:``,duo:``,white:``,gray:``,neutral:``,night:``,black:``,sky:``,"sky-blue":``,indigo:``},px:{none:`komc:px-0`,xs:`komc:px-0.5`,sm:`komc:px-1`,md:`komc:px-1.5`,lg:`komc:px-2`,xl:`komc:px-3`,"2xl":`komc:px-4`,"3xl":`komc:px-5`,"4xl":`komc:px-6`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`,"3xl":`komc:rounded-3xl`,full:`komc:rounded-full`}},compoundVariants:[{outline:`line`,variant:`blue`,className:t.n(`komc:border-blue-500 komc:bg-white komc:text-blue-500`,`komc:hover:border-transparent komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:border-transparent komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`duo`,className:t.n(`komc:border-blue-500 komc:bg-white komc:text-brand-blck`,`komc:hover:border-transparent komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:border-transparent komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`white`,className:t.n(`komc:border-gray-600 komc:bg-white komc:text-brand-blck`,`komc:hover:bg-gray-200 komc:hover:text-brand-blck`,`komc:active:bg-gray-200 komc:active:text-brand-blck`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`gray`,className:t.n(`komc:border-white komc:bg-transparent komc:text-white`,`komc:hover:bg-[rgb(199,199,199)] komc:hover:text-white`,`komc:active:bg-[rgb(199,199,199)] komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`neutral`,className:t.n(`komc:border-gray-800 komc:bg-transparent komc:text-black`,`komc:hover:bg-gray-200 komc:hover:text-black`,`komc:active:bg-gray-200 komc:active:text-black`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`line`,variant:`sky`,className:t.n(`komc:border-sky-750 komc:bg-transparent komc:text-black`,`komc:hover:bg-sky-750 komc:hover:text-white`,`komc:active:bg-sky-750 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`line`,variant:`sky-blue`,className:t.n(`komc:border-sky-450 komc:bg-transparent komc:text-black`,`komc:hover:bg-sky-450 komc:hover:text-white`,`komc:active:bg-sky-450 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`solid`,variant:`white`,className:t.n(`komc:bg-white komc:text-brand-blck`,`komc:hover:bg-gray-200`,`komc:active:bg-gray-200`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`gray`,className:t.n(`komc:bg-gray-100 komc:text-blue-500`,`komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`blue`,className:t.n(`komc:bg-blue-500 komc:text-white`,`komc:hover:bg-night-700 komc:hover:text-white`,`komc:active:bg-night-700 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`night`,className:t.n(`komc:bg-night-700 komc:text-white`,`komc:hover:bg-night-800 komc:hover:text-white`,`komc:active:bg-night-800 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`black`,className:t.n(`komc:bg-[rgb(95,95,96)] komc:text-white`,`komc:hover:bg-[rgb(76,76,77)] komc:hover:text-white`,`komc:active:bg-[rgb(76,76,77)] komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`sky`,className:t.n(`komc:bg-sky-750 komc:text-white`,`komc:hover:bg-sky-950 komc:hover:text-white`,`komc:active:bg-sky-950 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`solid`,variant:`sky-blue`,className:t.n(`komc:bg-sky-450 komc:text-white`,`komc:hover:bg-sky-650 komc:hover:text-white`,`komc:active:bg-sky-650 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`solid`,variant:`indigo`,className:t.n(`komc:bg-indigo-600 komc:text-white`,`komc:hover:bg-indigo-700 komc:hover:text-white`,`komc:active:bg-indigo-700 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`clear`,variant:`sky`,className:t.n(`komc:bg-transparent komc:text-[#1890FF]`,`komc:hover:bg-transparent komc:hover:text-[#1890FF] komc:hover:underline`,`komc:active:bg-transparent komc:active:text-[#1890FF] komc:active:underline`,`komc:disabled:border-transparent komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`clear`,variant:`gray`,className:t.n(`komc:bg-transparent komc:text-gray-800`,`komc:hover:bg-transparent komc:hover:text-gray-800 komc:hover:underline`,`komc:active:bg-transparent komc:active:text-gray-800 komc:active:underline`,`komc:disabled:border-transparent komc:disabled:bg-transparent komc:disabled:text-gray-500`)}],defaultVariants:{size:`md`,shadow:`none`,outline:`line`,variant:`blue`,px:`2xl`,rounded:`sm`}}),u=(0,i.forwardRef)(({type:e=`button`,className:t,id:n,size:r,shadow:i,outline:o,variant:c,px:u,rounded:d,asChild:f,...p},m)=>(0,a.jsx)(f?s.Slot:`button`,{ref:m,...p,"data-komc":!0,type:e,id:n,className:l({size:r,shadow:i,outline:o,variant:c,px:u,rounded:d,className:t})}));var d=u;function f({condition:e,wrapper:t,children:n}){return e?t(n):n}function p({condition:e,trueWrapper:t,falseWrapper:n,children:r}){return e?t(r):n(r)}const m=(0,o.cva)(t.n(`komc:flex komc:items-center komc:w-full komc:px-2`,`komc:[&>input]:outline-none komc:[&>input]:w-full`,`komc:[&>input]:focus:ring-0 komc:[&>input]:focus:ring-offset-0`,`komc:[&>input]:h-full`),{variants:{size:{xs:`komc:h-7.5`,sm:`komc:h-8`,base:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`},gap:{none:`komc:gap-0`,xs:`komc:gap-1`,sm:`komc:gap-2`,md:`komc:gap-3`,lg:`komc:gap-4`,xl:`komc:gap-5`},outline:{line:`komc:border`,solid:`komc:border-transparent`,clear:`komc:border-none`,dashed:`komc:border-dashed`,dotted:`komc:border-dotted`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`}}}),h=(0,i.forwardRef)(({prefix:e=null,surffix:t=null,size:n=`lg`,gap:r=`xl`,outline:i=`line`,rounded:o=`lg`,className:s,...c},l)=>(0,a.jsxs)(`div`,{"data-komc":!0,className:m({size:n,gap:r,outline:i,rounded:o,className:s}),children:[e,(0,a.jsx)(`input`,{ref:l,type:`text`,...c}),t]}));var g=h;function _({children:e,className:t,...n}){return(0,a.jsx)(`span`,{...n,"data-komc":!0,"data-text":`${e}`,className:(0,r.default)(`komc:inline-flex komc:flex-col komc:justify-center komc:items-center`,`komc:after:content-[attr(data-text)] komc:after:font-bold`,`komc:after:h-0 komc:after:invisible komc:after:overflow-hidden`,`komc:after:select-none komc:after:pointer-events-none`,t),children:e})}exports.BottomAppBar=c,exports.Button=d,exports.ConditionalEitherWrapper=p,exports.ConditionalWrapper=f,exports.Input=g,exports.Skeleton=n.t,exports.StableText=_;
|
package/dist/ui/index.d.cts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import * as react13 from "react";
|
|
2
|
+
import React$1, { ComponentProps, HTMLAttributes } from "react";
|
|
3
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
4
4
|
import * as class_variance_authority_types2 from "class-variance-authority/types";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
6
|
-
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
7
6
|
|
|
8
7
|
//#region src/ui/bottom-app-bar/bottom-app-bar.d.ts
|
|
9
8
|
interface BottomAppBarProps<T> extends React$1.HTMLAttributes<HTMLElement> {
|
|
@@ -17,6 +16,50 @@ declare function BottomAppBar<T>({
|
|
|
17
16
|
...props
|
|
18
17
|
}: BottomAppBarProps<T>): React$1.ReactNode;
|
|
19
18
|
//#endregion
|
|
19
|
+
//#region src/ui/button/button.d.ts
|
|
20
|
+
declare const classes$2: (props?: ({
|
|
21
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xxs" | "xs" | "3xl" | "4xl" | null | undefined;
|
|
22
|
+
shadow?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | null | undefined;
|
|
23
|
+
outline?: "line" | "solid" | "clear" | null | undefined;
|
|
24
|
+
variant?: "blue" | "duo" | "white" | "gray" | "neutral" | "night" | "black" | "sky" | "sky-blue" | "indigo" | null | undefined;
|
|
25
|
+
px?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "xs" | "3xl" | "4xl" | null | undefined;
|
|
26
|
+
rounded?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "none" | "3xl" | null | undefined;
|
|
27
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
28
|
+
interface VariantMap {
|
|
29
|
+
line: 'blue' | 'duo' | 'white' | 'gray' | 'neutral' | 'sky' | 'sky-blue';
|
|
30
|
+
solid: 'white' | 'gray' | 'blue' | 'night' | 'black' | 'sky' | 'sky-blue' | 'indigo';
|
|
31
|
+
clear: 'sky' | 'gray';
|
|
32
|
+
}
|
|
33
|
+
type BaseProps = Omit<VariantProps<typeof classes$2>, 'outline' | 'variant'>;
|
|
34
|
+
type ButtonProps = ComponentProps<'button'> & BaseProps & ({
|
|
35
|
+
outline?: 'line';
|
|
36
|
+
variant?: VariantMap['line'];
|
|
37
|
+
} | {
|
|
38
|
+
outline: 'solid';
|
|
39
|
+
variant?: VariantMap['solid'];
|
|
40
|
+
} | {
|
|
41
|
+
outline: 'clear';
|
|
42
|
+
variant?: VariantMap['clear'];
|
|
43
|
+
}) & {
|
|
44
|
+
asChild?: boolean;
|
|
45
|
+
};
|
|
46
|
+
declare const Button: react13.ForwardRefExoticComponent<(Omit<react13.ClassAttributes<HTMLButtonElement> & react13.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
|
|
47
|
+
outline?: "line";
|
|
48
|
+
variant?: VariantMap["line"];
|
|
49
|
+
} & {
|
|
50
|
+
asChild?: boolean;
|
|
51
|
+
}, "ref"> | Omit<react13.ClassAttributes<HTMLButtonElement> & react13.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
|
|
52
|
+
outline: "solid";
|
|
53
|
+
variant?: VariantMap["solid"];
|
|
54
|
+
} & {
|
|
55
|
+
asChild?: boolean;
|
|
56
|
+
}, "ref"> | Omit<react13.ClassAttributes<HTMLButtonElement> & react13.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
|
|
57
|
+
outline: "clear";
|
|
58
|
+
variant?: VariantMap["clear"];
|
|
59
|
+
} & {
|
|
60
|
+
asChild?: boolean;
|
|
61
|
+
}, "ref">) & react13.RefAttributes<HTMLButtonElement>>;
|
|
62
|
+
//#endregion
|
|
20
63
|
//#region src/ui/conditional-wrapper/conditional-wrapper.d.ts
|
|
21
64
|
interface ConditionalWrapperProps {
|
|
22
65
|
condition: boolean;
|
|
@@ -27,7 +70,7 @@ declare function ConditionalWrapper({
|
|
|
27
70
|
condition,
|
|
28
71
|
wrapper,
|
|
29
72
|
children
|
|
30
|
-
}: ConditionalWrapperProps):
|
|
73
|
+
}: ConditionalWrapperProps): react13.ReactNode;
|
|
31
74
|
//#endregion
|
|
32
75
|
//#region src/ui/conditional-wrapper/conditional-either-wrapper.d.ts
|
|
33
76
|
interface ConditionalEitherWrapperProps {
|
|
@@ -41,14 +84,14 @@ declare function ConditionalEitherWrapper({
|
|
|
41
84
|
trueWrapper,
|
|
42
85
|
falseWrapper,
|
|
43
86
|
children
|
|
44
|
-
}: ConditionalEitherWrapperProps):
|
|
87
|
+
}: ConditionalEitherWrapperProps): react13.ReactNode;
|
|
45
88
|
//#endregion
|
|
46
89
|
//#region src/ui/input/input.d.ts
|
|
47
90
|
declare const classes$1: (props?: ({
|
|
48
91
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "base" | "xs" | "3xl" | null | undefined;
|
|
49
|
-
gap?: "sm" | "md" | "lg" | "
|
|
92
|
+
gap?: "sm" | "md" | "lg" | "xl" | "none" | "xs" | null | undefined;
|
|
50
93
|
outline?: "line" | "solid" | "clear" | "dashed" | "dotted" | null | undefined;
|
|
51
|
-
rounded?: "sm" | "md" | "lg" | "
|
|
94
|
+
rounded?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | null | undefined;
|
|
52
95
|
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
53
96
|
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'surffix' | 'size'>, VariantProps<typeof classes$1> {
|
|
54
97
|
size?: VariantProps<typeof classes$1>['size'];
|
|
@@ -58,12 +101,12 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, '
|
|
|
58
101
|
prefix?: React.ReactNode;
|
|
59
102
|
surffix?: React.ReactNode;
|
|
60
103
|
}
|
|
61
|
-
declare const Input:
|
|
104
|
+
declare const Input: react13.ForwardRefExoticComponent<InputProps & react13.RefAttributes<HTMLInputElement>>;
|
|
62
105
|
//#endregion
|
|
63
106
|
//#region src/ui/skeleton/skeleton.d.ts
|
|
64
107
|
declare const classes: (props?: ({
|
|
65
108
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "xs" | "3xl" | "square" | null | undefined;
|
|
66
|
-
rounded?: "sm" | "md" | "lg" | "
|
|
109
|
+
rounded?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "none" | "3xl" | null | undefined;
|
|
67
110
|
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
68
111
|
interface SkeletonProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
|
|
69
112
|
width?: string | number;
|
|
@@ -78,7 +121,7 @@ declare function Skeleton({
|
|
|
78
121
|
height,
|
|
79
122
|
className,
|
|
80
123
|
...props
|
|
81
|
-
}: SkeletonProps):
|
|
124
|
+
}: SkeletonProps): react_jsx_runtime13.JSX.Element;
|
|
82
125
|
//#endregion
|
|
83
126
|
//#region src/ui/stable-text/stable-text.d.ts
|
|
84
127
|
declare function StableText({
|
|
@@ -87,6 +130,6 @@ declare function StableText({
|
|
|
87
130
|
...props
|
|
88
131
|
}: Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {
|
|
89
132
|
children: string | number;
|
|
90
|
-
}):
|
|
133
|
+
}): react_jsx_runtime13.JSX.Element;
|
|
91
134
|
//#endregion
|
|
92
135
|
export { BottomAppBar, type BottomAppBarProps, Button, type ButtonProps, ConditionalEitherWrapper, type ConditionalEitherWrapperProps, ConditionalWrapper, type ConditionalWrapperProps, Input, type InputProps, Skeleton, type SkeletonProps, StableText };
|