@machinerd/js-module 0.7.0 → 0.8.1
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/common-Bn0Ko6B7.cjs +1 -0
- package/dist/common-Df03Ovdm.mjs +1 -0
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.cts +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks-CUj2xuzU.cjs +1 -0
- package/dist/hooks-gbU5dqVF.mjs +1 -0
- package/dist/{index-4pIelCz_.d.cts → index-DiRj3rRA.d.cts} +3 -3
- package/dist/providers/index.d.cts +2 -2
- package/dist/{skeleton-6QtpIO7l.mjs → skeleton-B6_oBhkl.mjs} +1 -1
- package/dist/{skeleton-DBha34Cx.cjs → skeleton-DtV9S1QK.cjs} +1 -1
- package/dist/styles/index.css +175 -347
- 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 +3 -3
- package/dist/ui/dialog/index.d.mts +1 -1
- package/dist/ui/dialog/index.mjs +1 -1
- package/dist/ui/image/index.cjs +1 -1
- package/dist/ui/image/index.d.cts +8 -8
- package/dist/ui/image/index.d.mts +2 -2
- package/dist/ui/image/index.mjs +1 -1
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.d.cts +12 -12
- package/dist/ui/index.d.mts +20 -20
- package/dist/ui/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.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-DvV5Mlkc.mjs → use-subset-image-D8ssrZhj.mjs} +1 -1
- package/dist/{use-subset-image-DhX5WmYG.cjs → use-subset-image-DC86cg6O.cjs} +1 -1
- package/dist/util/common.cjs +1 -1
- package/dist/util/common.mjs +1 -1
- package/package.json +50 -6
- package/dist/common-CQWUs1nE.cjs +0 -1
- package/dist/common-DbEp6YNc.mjs +0 -1
- package/dist/hooks--O5RcEJq.cjs +0 -1
- package/dist/hooks-C9rXWkfW.mjs +0 -1
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import React, { ComponentProps } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 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_runtime2.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_runtime2.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_runtime2.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_runtime2.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_runtime2.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_runtime2.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_runtime2.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_runtime2.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-Df03Ovdm.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`,{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-CjpmdVyv.cjs`),require(`../../file-5mweNdAM.cjs`);const t=require(`../../hooks
|
|
1
|
+
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-CjpmdVyv.cjs`),require(`../../file-5mweNdAM.cjs`);const t=require(`../../hooks-CUj2xuzU.cjs`);require(`../../providers-CkXkdYcB.cjs`),require(`../../use-subset-image-DC86cg6O.cjs`);let n=require(`react`),r=require(`react/jsx-runtime`),i=require(`class-variance-authority`);const a=(0,i.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 o({closeOnBackdropClick:e=!0,isOpen:i,zIndex:o=1e4,padding:s,maxWidth:c,className:l,onClose:u,children:d,...f}){let p=t.o(i,300),[m,h]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(i&&p){let e=setTimeout(()=>h(!0),10);return()=>clearTimeout(e)}else i||h(!1)},[i,p]);let g=(0,n.useCallback)(e=>{e.key===`Escape`&&u()},[u]),_=(0,n.useCallback)(()=>{e&&u()},[e,u]);return(0,n.useEffect)(()=>(i?(document.addEventListener(`keydown`,g),document.body.style.overflow=`hidden`):document.body.style.overflow=`unset`,()=>{document.removeEventListener(`keydown`,g),document.body.style.overflow=`unset`}),[i,g]),p?(0,r.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:o},children:(0,r.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,r.jsx)(`button`,{type:`button`,"data-state":m?`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,r.jsx)(`div`,{"data-state":m?`open`:`closed`,className:`${a({padding:s,maxWidth:c,className:l})} 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`,...f,children:d})]})}):null}exports.Dialog=o;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
3
3
|
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
|
|
6
6
|
//#region src/ui/dialog/dialog.d.ts
|
|
7
7
|
declare const classes: (props?: ({
|
|
8
|
-
padding?: "
|
|
8
|
+
padding?: "sm" | "md" | "lg" | "none" | null | undefined;
|
|
9
9
|
maxWidth?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
11
11
|
interface DialogProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
|
|
@@ -25,6 +25,6 @@ declare function Dialog({
|
|
|
25
25
|
onClose,
|
|
26
26
|
children,
|
|
27
27
|
...rest
|
|
28
|
-
}: DialogProps):
|
|
28
|
+
}: DialogProps): react_jsx_runtime9.JSX.Element | null;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Dialog, type DialogProps };
|
|
@@ -5,7 +5,7 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
|
|
|
5
5
|
|
|
6
6
|
//#region src/ui/dialog/dialog.d.ts
|
|
7
7
|
declare const classes: (props?: ({
|
|
8
|
-
padding?: "
|
|
8
|
+
padding?: "sm" | "md" | "lg" | "none" | null | undefined;
|
|
9
9
|
maxWidth?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
11
11
|
interface DialogProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
|
package/dist/ui/dialog/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"../../src-CukOR3K2.mjs";import"../../file-DShNxIW4.mjs";import{o as e}from"../../hooks-
|
|
1
|
+
"use client";import"../../src-CukOR3K2.mjs";import"../../file-DShNxIW4.mjs";import{o as e}from"../../hooks-gbU5dqVF.mjs";import"../../providers-zftmvT1z.mjs";import"../../use-subset-image-D8ssrZhj.mjs";import{useCallback as t,useEffect as n,useState as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{cva as o}from"class-variance-authority";const s=o(`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 c({closeOnBackdropClick:o=!0,isOpen:c,zIndex:l=1e4,padding:u,maxWidth:d,className:f,onClose:p,children:m,...h}){let g=e(c,300),[_,v]=r(!1);n(()=>{if(c&&g){let e=setTimeout(()=>v(!0),10);return()=>clearTimeout(e)}else c||v(!1)},[c,g]);let y=t(e=>{e.key===`Escape`&&p()},[p]),b=t(()=>{o&&p()},[o,p]);return n(()=>(c?(document.addEventListener(`keydown`,y),document.body.style.overflow=`hidden`):document.body.style.overflow=`unset`,()=>{document.removeEventListener(`keydown`,y),document.body.style.overflow=`unset`}),[c,y]),g?i(`div`,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:min-h-0 komc:flex-col komc:overflow-hidden`,style:{zIndex:l},children:a(`div`,{className:`komc:relative komc:flex komc:min-h-0 komc:flex-1 komc:w-full komc:items-center komc:justify-center`,children:[i(`button`,{type:`button`,"data-state":_?`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`}),i(`div`,{"data-state":_?`open`:`closed`,className:`${s({padding:u,maxWidth:d,className:f})} 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`,...h,children:m})]})}):null}export{c as Dialog};
|
package/dist/ui/image/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-CjpmdVyv.cjs`),require(`../../common-
|
|
1
|
+
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-CjpmdVyv.cjs`),require(`../../common-Bn0Ko6B7.cjs`),require(`../../file-5mweNdAM.cjs`);const t=require(`../../skeleton-DtV9S1QK.cjs`);require(`../../providers-CkXkdYcB.cjs`);const n=require(`../../use-subset-image-DC86cg6O.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,17 +1,17 @@
|
|
|
1
|
-
import { a as UseSubsetImageProps, n as BaseProps } from "../../index-
|
|
2
|
-
import * as
|
|
1
|
+
import { a as UseSubsetImageProps, n as BaseProps } from "../../index-DiRj3rRA.cjs";
|
|
2
|
+
import * as react1 from "react";
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/image/image.d.ts
|
|
6
|
-
|
|
6
|
+
interface ImageSubsetProps {
|
|
7
7
|
layout?: 'intrinsic' | 'stretch';
|
|
8
8
|
skeleton?: boolean;
|
|
9
9
|
emptyNode?: React.ReactNode;
|
|
10
10
|
emptyNodeClassName?: string;
|
|
11
11
|
skeletonClassName?: string;
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
type ImageProps = UseSubsetImageProps & ImageSubsetProps;
|
|
14
|
-
declare const BaseImage:
|
|
14
|
+
declare const BaseImage: react1.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
15
15
|
fill: true;
|
|
16
16
|
sizes: string;
|
|
17
17
|
width?: never;
|
|
@@ -21,8 +21,8 @@ declare const BaseImage: react0.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
|
21
21
|
sizes?: never;
|
|
22
22
|
width: number;
|
|
23
23
|
height: number;
|
|
24
|
-
}, "ref">) &
|
|
25
|
-
declare const Image:
|
|
24
|
+
}, "ref">) & react1.RefAttributes<HTMLImageElement>>;
|
|
25
|
+
declare const Image: react1.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
26
26
|
fill: true;
|
|
27
27
|
sizes: string;
|
|
28
28
|
width?: never;
|
|
@@ -32,7 +32,7 @@ declare const Image: react0.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
|
32
32
|
sizes?: never;
|
|
33
33
|
width: number;
|
|
34
34
|
height: number;
|
|
35
|
-
} & ImageSubsetProps, "ref">) &
|
|
35
|
+
} & ImageSubsetProps, "ref">) & react1.RefAttributes<HTMLImageElement>>;
|
|
36
36
|
interface EmptyNodeProps {
|
|
37
37
|
children: React.ReactNode;
|
|
38
38
|
className?: string;
|
|
@@ -3,13 +3,13 @@ import * as react3 from "react";
|
|
|
3
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 {
|
|
7
7
|
layout?: 'intrinsic' | 'stretch';
|
|
8
8
|
skeleton?: boolean;
|
|
9
9
|
emptyNode?: React.ReactNode;
|
|
10
10
|
emptyNodeClassName?: string;
|
|
11
11
|
skeletonClassName?: string;
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
type ImageProps = UseSubsetImageProps & ImageSubsetProps;
|
|
14
14
|
declare const BaseImage: react3.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
15
15
|
fill: true;
|
package/dist/ui/image/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"../../src-CukOR3K2.mjs";import"../../common-
|
|
1
|
+
"use client";import"../../src-CukOR3K2.mjs";import"../../common-Df03Ovdm.mjs";import"../../file-DShNxIW4.mjs";import{t as e}from"../../skeleton-B6_oBhkl.mjs";import"../../providers-zftmvT1z.mjs";import{n as t}from"../../use-subset-image-D8ssrZhj.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
|
-
const e=require(`../chunk-Bmb41Sf3.cjs`),t=require(`../common-
|
|
1
|
+
const e=require(`../chunk-Bmb41Sf3.cjs`),t=require(`../common-Bn0Ko6B7.cjs`),n=require(`../skeleton-DtV9S1QK.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,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,7 +1,7 @@
|
|
|
1
1
|
import * as react11 from "react";
|
|
2
2
|
import React$1, { ComponentProps, HTMLAttributes } from "react";
|
|
3
3
|
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
4
|
-
import * as
|
|
4
|
+
import * as class_variance_authority_types2 from "class-variance-authority/types";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/bottom-app-bar/bottom-app-bar.d.ts
|
|
@@ -18,13 +18,13 @@ declare function BottomAppBar<T>({
|
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/ui/button/button.d.ts
|
|
20
20
|
declare const classes$2: (props?: ({
|
|
21
|
-
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "
|
|
22
|
-
shadow?: "
|
|
21
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xs" | "3xl" | "xxs" | "4xl" | null | undefined;
|
|
22
|
+
shadow?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "3xl" | null | undefined;
|
|
23
23
|
outline?: "line" | "solid" | "clear" | null | undefined;
|
|
24
24
|
variant?: "blue" | "duo" | "white" | "gray" | "neutral" | "night" | "black" | "sky" | "sky-blue" | "indigo" | null | undefined;
|
|
25
|
-
px?: "
|
|
26
|
-
rounded?: "
|
|
27
|
-
} &
|
|
25
|
+
px?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "xs" | "3xl" | "4xl" | null | undefined;
|
|
26
|
+
rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
|
|
27
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
28
28
|
interface VariantMap {
|
|
29
29
|
line: 'blue' | 'duo' | 'white' | 'gray' | 'neutral' | 'sky' | 'sky-blue';
|
|
30
30
|
solid: 'white' | 'gray' | 'blue' | 'night' | 'black' | 'sky' | 'sky-blue' | 'indigo';
|
|
@@ -88,11 +88,11 @@ declare function ConditionalEitherWrapper({
|
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/ui/input/input.d.ts
|
|
90
90
|
declare const classes$1: (props?: ({
|
|
91
|
-
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "
|
|
92
|
-
gap?: "
|
|
91
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xs" | "base" | "3xl" | null | undefined;
|
|
92
|
+
gap?: "sm" | "md" | "lg" | "none" | "xl" | "xs" | null | undefined;
|
|
93
93
|
outline?: "line" | "solid" | "clear" | "dashed" | "dotted" | null | undefined;
|
|
94
|
-
rounded?: "
|
|
95
|
-
} &
|
|
94
|
+
rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | null | undefined;
|
|
95
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
96
96
|
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'surffix' | 'size'>, VariantProps<typeof classes$1> {
|
|
97
97
|
size?: VariantProps<typeof classes$1>['size'];
|
|
98
98
|
gap?: VariantProps<typeof classes$1>['gap'];
|
|
@@ -106,8 +106,8 @@ declare const Input: react11.ForwardRefExoticComponent<InputProps & react11.RefA
|
|
|
106
106
|
//#region src/ui/skeleton/skeleton.d.ts
|
|
107
107
|
declare const classes: (props?: ({
|
|
108
108
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "xs" | "3xl" | "square" | null | undefined;
|
|
109
|
-
rounded?: "
|
|
110
|
-
} &
|
|
109
|
+
rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
|
|
110
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
111
111
|
interface SkeletonProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
|
|
112
112
|
width?: string | number;
|
|
113
113
|
height?: string | number;
|
package/dist/ui/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react11 from "react";
|
|
2
2
|
import React$1, { ComponentProps, HTMLAttributes } from "react";
|
|
3
3
|
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
|
-
import * as
|
|
5
|
+
import * as class_variance_authority_types2 from "class-variance-authority/types";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/bottom-app-bar/bottom-app-bar.d.ts
|
|
8
8
|
interface BottomAppBarProps<T> extends React$1.HTMLAttributes<HTMLElement> {
|
|
@@ -18,13 +18,13 @@ declare function BottomAppBar<T>({
|
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/ui/button/button.d.ts
|
|
20
20
|
declare const classes$2: (props?: ({
|
|
21
|
-
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "
|
|
22
|
-
shadow?: "
|
|
21
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xs" | "3xl" | "xxs" | "4xl" | null | undefined;
|
|
22
|
+
shadow?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "3xl" | null | undefined;
|
|
23
23
|
outline?: "line" | "solid" | "clear" | null | undefined;
|
|
24
24
|
variant?: "blue" | "duo" | "white" | "gray" | "neutral" | "night" | "black" | "sky" | "sky-blue" | "indigo" | null | undefined;
|
|
25
|
-
px?: "
|
|
26
|
-
rounded?: "
|
|
27
|
-
} &
|
|
25
|
+
px?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "xs" | "3xl" | "4xl" | null | undefined;
|
|
26
|
+
rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
|
|
27
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
28
28
|
interface VariantMap {
|
|
29
29
|
line: 'blue' | 'duo' | 'white' | 'gray' | 'neutral' | 'sky' | 'sky-blue';
|
|
30
30
|
solid: 'white' | 'gray' | 'blue' | 'night' | 'black' | 'sky' | 'sky-blue' | 'indigo';
|
|
@@ -43,22 +43,22 @@ type ButtonProps = ComponentProps<'button'> & BaseProps & ({
|
|
|
43
43
|
}) & {
|
|
44
44
|
asChild?: boolean;
|
|
45
45
|
};
|
|
46
|
-
declare const Button:
|
|
46
|
+
declare const Button: react11.ForwardRefExoticComponent<(Omit<react11.ClassAttributes<HTMLButtonElement> & react11.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
|
|
47
47
|
outline?: "line";
|
|
48
48
|
variant?: VariantMap["line"];
|
|
49
49
|
} & {
|
|
50
50
|
asChild?: boolean;
|
|
51
|
-
}, "ref"> | Omit<
|
|
51
|
+
}, "ref"> | Omit<react11.ClassAttributes<HTMLButtonElement> & react11.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
|
|
52
52
|
outline: "solid";
|
|
53
53
|
variant?: VariantMap["solid"];
|
|
54
54
|
} & {
|
|
55
55
|
asChild?: boolean;
|
|
56
|
-
}, "ref"> | Omit<
|
|
56
|
+
}, "ref"> | Omit<react11.ClassAttributes<HTMLButtonElement> & react11.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
|
|
57
57
|
outline: "clear";
|
|
58
58
|
variant?: VariantMap["clear"];
|
|
59
59
|
} & {
|
|
60
60
|
asChild?: boolean;
|
|
61
|
-
}, "ref">) &
|
|
61
|
+
}, "ref">) & react11.RefAttributes<HTMLButtonElement>>;
|
|
62
62
|
//#endregion
|
|
63
63
|
//#region src/ui/conditional-wrapper/conditional-wrapper.d.ts
|
|
64
64
|
interface ConditionalWrapperProps {
|
|
@@ -70,7 +70,7 @@ declare function ConditionalWrapper({
|
|
|
70
70
|
condition,
|
|
71
71
|
wrapper,
|
|
72
72
|
children
|
|
73
|
-
}: ConditionalWrapperProps):
|
|
73
|
+
}: ConditionalWrapperProps): react11.ReactNode;
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region src/ui/conditional-wrapper/conditional-either-wrapper.d.ts
|
|
76
76
|
interface ConditionalEitherWrapperProps {
|
|
@@ -84,15 +84,15 @@ declare function ConditionalEitherWrapper({
|
|
|
84
84
|
trueWrapper,
|
|
85
85
|
falseWrapper,
|
|
86
86
|
children
|
|
87
|
-
}: ConditionalEitherWrapperProps):
|
|
87
|
+
}: ConditionalEitherWrapperProps): react11.ReactNode;
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/ui/input/input.d.ts
|
|
90
90
|
declare const classes$1: (props?: ({
|
|
91
|
-
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "
|
|
92
|
-
gap?: "
|
|
91
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xs" | "base" | "3xl" | null | undefined;
|
|
92
|
+
gap?: "sm" | "md" | "lg" | "none" | "xl" | "xs" | null | undefined;
|
|
93
93
|
outline?: "line" | "solid" | "clear" | "dashed" | "dotted" | null | undefined;
|
|
94
|
-
rounded?: "
|
|
95
|
-
} &
|
|
94
|
+
rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | null | undefined;
|
|
95
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
96
96
|
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'surffix' | 'size'>, VariantProps<typeof classes$1> {
|
|
97
97
|
size?: VariantProps<typeof classes$1>['size'];
|
|
98
98
|
gap?: VariantProps<typeof classes$1>['gap'];
|
|
@@ -101,13 +101,13 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, '
|
|
|
101
101
|
prefix?: React.ReactNode;
|
|
102
102
|
surffix?: React.ReactNode;
|
|
103
103
|
}
|
|
104
|
-
declare const Input:
|
|
104
|
+
declare const Input: react11.ForwardRefExoticComponent<InputProps & react11.RefAttributes<HTMLInputElement>>;
|
|
105
105
|
//#endregion
|
|
106
106
|
//#region src/ui/skeleton/skeleton.d.ts
|
|
107
107
|
declare const classes: (props?: ({
|
|
108
108
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "xs" | "3xl" | "square" | null | undefined;
|
|
109
|
-
rounded?: "
|
|
110
|
-
} &
|
|
109
|
+
rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
|
|
110
|
+
} & class_variance_authority_types2.ClassProp) | undefined) => string;
|
|
111
111
|
interface SkeletonProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
|
|
112
112
|
width?: string | number;
|
|
113
113
|
height?: string | number;
|
package/dist/ui/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../common-
|
|
1
|
+
import{n as e}from"../common-Df03Ovdm.mjs";import{t}from"../skeleton-B6_oBhkl.mjs";import n from"clsx";import r,{forwardRef as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";import{Slot as c}from"@radix-ui/react-slot";function l({className:e,items:t,render:i,...o}){return a(`nav`,{"data-komc":!0,"aria-label":`bottom app bar`,className:n(`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:a(`div`,{className:`komc:grid komc:min-h-15`,style:{gridTemplateColumns:`repeat(${t.length}, 1fr)`},children:t.map((e,t)=>a(r.Fragment,{children:i(e)},t))})})}const u=s(e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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`}});var d=i(({type:e=`button`,className:t,id:n,size:r,shadow:i,outline:o,variant:s,px:l,rounded:d,asChild:f,...p},m)=>a(f?c:`button`,{ref:m,...p,type:e,id:n,className:u({size:r,shadow:i,outline:o,variant:s,px:l,rounded:d,className:t})}));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=s(e(`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`}}});var h=i(({prefix:e=null,surffix:t=null,size:n=`lg`,gap:r=`xl`,outline:i=`line`,rounded:s=`lg`,className:c,...l},u)=>o(`div`,{"data-komc":!0,className:m({size:n,gap:r,outline:i,rounded:s,className:c}),children:[e,a(`input`,{ref:u,type:`text`,...l}),t]}));function g({children:e,className:t,...r}){return a(`span`,{...r,"data-komc":!0,"data-text":`${e}`,className:n(`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})}export{l as BottomAppBar,d as Button,p as ConditionalEitherWrapper,f as ConditionalWrapper,h as Input,t as Skeleton,g as StableText};
|
package/dist/ui/sheet/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-CjpmdVyv.cjs`),require(`../../file-5mweNdAM.cjs`);const t=require(`../../hooks
|
|
1
|
+
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-CjpmdVyv.cjs`),require(`../../file-5mweNdAM.cjs`);const t=require(`../../hooks-CUj2xuzU.cjs`);require(`../../providers-CkXkdYcB.cjs`),require(`../../use-subset-image-DC86cg6O.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(`class-variance-authority`);const o=(0,a.cva)((0,n.default)(`komc:absolute komc:bg-white komc:flex komc:flex-col komc:shadow-2xl`,`komc:transition-transform komc:duration-300 komc:ease-in-out`),{variants:{direction:{top:`komc:top-0 komc:left-0 komc:right-0 komc:-translate-y-full komc:data-[state=open]:translate-y-0`,bottom:`komc:bottom-0 komc:left-0 komc:right-0 komc:translate-y-full komc:data-[state=open]:translate-y-0`,left:`komc:top-0 komc:bottom-0 komc:left-0 komc:-translate-x-full komc:data-[state=open]:translate-x-0`,right:`komc:top-0 komc:bottom-0 komc:right-0 komc:translate-x-full komc:data-[state=open]:translate-x-0`}}}),s=(0,a.cva)(``,{variants:{size:{full:``,half:``,auto:``},direction:{top:``,bottom:``,left:``,right:``}},compoundVariants:[{size:`full`,direction:`top`,className:`komc:h-full`},{size:`full`,direction:`bottom`,className:`komc:h-full`},{size:`full`,direction:`left`,className:`komc:w-full`},{size:`full`,direction:`right`,className:`komc:w-full`},{size:`half`,direction:`top`,className:`komc:h-[50dvh]`},{size:`half`,direction:`bottom`,className:`komc:h-[50dvh]`},{size:`half`,direction:`left`,className:`komc:w-[50dvw]`},{size:`half`,direction:`right`,className:`komc:w-[50dvw]`},{size:`auto`,direction:`top`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`bottom`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`left`,className:`komc:w-auto komc:max-w-[90dvw]`},{size:`auto`,direction:`right`,className:`komc:w-auto komc:max-w-[90dvw]`}]});function c({isOpen:e,onClose:a,direction:c=`bottom`,size:l=`full`,children:u,className:d,closeOnBackdropClick:f=!0,zIndex:p=1001}){let m=t.o(e,300),[h,g]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(e&&m){let e=setTimeout(()=>g(!0),10);return()=>clearTimeout(e)}else e||g(!1)},[e,m]);let _=(0,r.useCallback)(e=>{e.key===`Escape`&&a()},[a]),v=(0,r.useCallback)(()=>{f&&a()},[f,a]);return(0,r.useEffect)(()=>(e?(document.addEventListener(`keydown`,_),document.body.style.overflow=`hidden`):document.body.style.overflow=`unset`,()=>{document.removeEventListener(`keydown`,_),document.body.style.overflow=`unset`}),[e,_]),m?(0,i.jsxs)(`div`,{className:`komc:fixed komc:inset-0 komc:flex komc:justify-center komc:items-center`,style:{zIndex:p},children:[(0,i.jsx)(`button`,{type:`button`,"data-state":h?`open`:`closed`,className:(0,n.default)(`komc:absolute komc:inset-0 komc:w-full komc:h-full komc:bg-black/40 komc:cursor-default`,`komc:transition-opacity komc:duration-300 komc:ease-in-out`,`komc:opacity-0 komc:data-[state=open]:opacity-100`),onClick:v,"aria-label":`close sheet`}),(0,i.jsx)(`div`,{"data-state":h?`open`:`closed`,className:(0,n.default)(o({direction:c,className:d}),s({direction:c,size:l})),role:`dialog`,"aria-modal":`true`,children:u})]}):null}exports.Sheet=c;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/ui/sheet/sheet.d.ts
|
|
5
5
|
type Direction = 'top' | 'bottom' | 'left' | 'right';
|
|
@@ -23,6 +23,6 @@ declare function Sheet({
|
|
|
23
23
|
className,
|
|
24
24
|
closeOnBackdropClick,
|
|
25
25
|
zIndex
|
|
26
|
-
}: SheetProps):
|
|
26
|
+
}: SheetProps): react_jsx_runtime8.JSX.Element | null;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { Sheet, type SheetProps };
|