@storepass/components 0.4.0 → 0.6.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/CHANGELOG.md +43 -0
- package/README.md +104 -68
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts +9 -9
- package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/AlertDialog/index.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +3 -3
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +7 -7
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/index.js +1 -1
- package/dist/components/Button/Button.d.ts +5 -3
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Card/Card.d.ts +8 -8
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/index.js +1 -1
- package/dist/components/Carousel/Carousel.d.ts +6 -6
- package/dist/components/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/Carousel/index.js +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/Collapsible/Collapsible.d.ts +5 -4
- package/dist/components/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/components/Collapsible/index.js +1 -1
- package/dist/components/Combobox/Combobox.d.ts +22 -20
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox/index.js +1 -1
- package/dist/components/Command/Command.d.ts +39 -2
- package/dist/components/Command/Command.d.ts.map +1 -1
- package/dist/components/Command/index.d.ts +1 -1
- package/dist/components/Command/index.d.ts.map +1 -1
- package/dist/components/Command/index.js +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +6 -2
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +9 -9
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/Drawer/Drawer.d.ts +65 -0
- package/dist/components/Drawer/Drawer.d.ts.map +1 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Drawer/index.d.ts.map +1 -0
- package/dist/components/Drawer/index.js +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +12 -12
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/index.js +1 -1
- package/dist/components/FeaturedIcon/FeaturedIcon.d.ts +3 -3
- package/dist/components/FeaturedIcon/FeaturedIcon.d.ts.map +1 -1
- package/dist/components/FeaturedIcon/index.js +1 -1
- package/dist/components/Field/Field.d.ts +11 -11
- package/dist/components/Field/Field.d.ts.map +1 -1
- package/dist/components/Field/index.js +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/FileUpload/index.js +1 -1
- package/dist/components/Footer/Footer.d.ts +5 -5
- package/dist/components/Footer/Footer.d.ts.map +1 -1
- package/dist/components/Footer/index.js +1 -1
- package/dist/components/Form/Form.d.ts +1 -1
- package/dist/components/Form/Form.d.ts.map +1 -1
- package/dist/components/Form/FormField.d.ts +1 -1
- package/dist/components/Form/FormField.d.ts.map +1 -1
- package/dist/components/Form/FormLayout.d.ts +3 -3
- package/dist/components/Form/FormLayout.d.ts.map +1 -1
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/ImperativeDialog/ImperativeDialog.d.ts +1 -1
- package/dist/components/ImperativeDialog/ImperativeDialog.d.ts.map +1 -1
- package/dist/components/ImperativeDialog/index.js +1 -1
- package/dist/components/InlineAlert/InlineAlert.d.ts +1 -1
- package/dist/components/InlineAlert/InlineAlert.d.ts.map +1 -1
- package/dist/components/InlineAlert/index.js +1 -1
- package/dist/components/Input/Input.d.ts +5 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputGroup/InputGroup.d.ts +10 -5
- package/dist/components/InputGroup/InputGroup.d.ts.map +1 -1
- package/dist/components/InputGroup/index.js +1 -1
- package/dist/components/Item/Item.d.ts +9 -9
- package/dist/components/Item/Item.d.ts.map +1 -1
- package/dist/components/Item/index.js +1 -1
- package/dist/components/Kbd/Kbd.d.ts +2 -2
- package/dist/components/Kbd/Kbd.d.ts.map +1 -1
- package/dist/components/Kbd/index.js +1 -1
- package/dist/components/Label/Label.d.ts +1 -1
- package/dist/components/Label/Label.d.ts.map +1 -1
- package/dist/components/Label/index.js +1 -1
- package/dist/components/LoadingIndicator/LoadingIndicator.d.ts +1 -1
- package/dist/components/LoadingIndicator/LoadingIndicator.d.ts.map +1 -1
- package/dist/components/LoadingIndicator/index.js +1 -1
- package/dist/components/MoneyAmount/MoneyAmount.d.ts +34 -0
- package/dist/components/MoneyAmount/MoneyAmount.d.ts.map +1 -0
- package/dist/components/MoneyAmount/formatMoney.d.ts +43 -0
- package/dist/components/MoneyAmount/formatMoney.d.ts.map +1 -0
- package/dist/components/MoneyAmount/index.d.ts +5 -0
- package/dist/components/MoneyAmount/index.d.ts.map +1 -0
- package/dist/components/MoneyAmount/index.js +1 -0
- package/dist/components/Navbar/Navbar.d.ts +10 -10
- package/dist/components/Navbar/Navbar.d.ts.map +1 -1
- package/dist/components/Navbar/index.js +1 -1
- package/dist/components/NumberField/NumberField.d.ts +7 -4
- package/dist/components/NumberField/NumberField.d.ts.map +1 -1
- package/dist/components/NumberField/index.js +1 -1
- package/dist/components/PageHeading/PageHeading.d.ts +83 -0
- package/dist/components/PageHeading/PageHeading.d.ts.map +1 -0
- package/dist/components/PageHeading/index.d.ts +3 -0
- package/dist/components/PageHeading/index.d.ts.map +1 -0
- package/dist/components/PageHeading/index.js +1 -0
- package/dist/components/PageLayout/PageLayout.d.ts +29 -0
- package/dist/components/PageLayout/PageLayout.d.ts.map +1 -0
- package/dist/components/PageLayout/index.d.ts +2 -0
- package/dist/components/PageLayout/index.d.ts.map +1 -0
- package/dist/components/PageLayout/index.js +1 -0
- package/dist/components/Pagination/Pagination.d.ts +7 -7
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/index.js +1 -1
- package/dist/components/Panel/Panel.d.ts +5 -5
- package/dist/components/Panel/Panel.d.ts.map +1 -1
- package/dist/components/Panel/index.js +1 -1
- package/dist/components/PinInput/PinInput.d.ts +3 -3
- package/dist/components/PinInput/PinInput.d.ts.map +1 -1
- package/dist/components/PinInput/index.js +1 -1
- package/dist/components/Progress/Progress.d.ts +1 -1
- package/dist/components/Progress/Progress.d.ts.map +1 -1
- package/dist/components/Progress/index.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.js +1 -1
- package/dist/components/Rating/Rating.d.ts +1 -1
- package/dist/components/Rating/Rating.d.ts.map +1 -1
- package/dist/components/Rating/index.js +1 -1
- package/dist/components/Select/Select.d.ts +5 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Settings/Settings.d.ts +26 -36
- package/dist/components/Settings/Settings.d.ts.map +1 -1
- package/dist/components/Settings/index.d.ts +1 -1
- package/dist/components/Settings/index.d.ts.map +1 -1
- package/dist/components/Settings/index.js +1 -1
- package/dist/components/Sidebar/Sidebar.d.ts +46 -15
- package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar/index.d.ts +2 -2
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/index.js +1 -1
- package/dist/components/Slider/Slider.d.ts +1 -1
- package/dist/components/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/Table/Table.d.ts +8 -8
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tabs/Tabs.d.ts +11 -9
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Tags/Tags.d.ts +1 -1
- package/dist/components/Tags/Tags.d.ts.map +1 -1
- package/dist/components/Tags/index.js +1 -1
- package/dist/components/Text/Text.d.ts +4 -4
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/index.js +1 -1
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +1 -1
- package/dist/components/Toast/Toast.d.ts +2 -2
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Toggle/Toggle.d.ts +1 -1
- package/dist/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/index.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +5 -5
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/components/VideoDialog/VideoDialog.d.ts +9 -9
- package/dist/components/VideoDialog/VideoDialog.d.ts.map +1 -1
- package/dist/components/VideoDialog/index.js +1 -1
- package/dist/components/index.d.ts +6 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index-2nc1awt9.js +2 -0
- package/dist/index-9scn04dv.js +2 -0
- package/dist/{index-rypjyrpn.js → index-aq782dhn.js} +1 -1
- package/dist/index-dsdw1626.js +2 -0
- package/dist/index-env8xaka.js +2 -0
- package/dist/index-mmas6ncx.js +2 -0
- package/dist/{index-btjxn90p.js → index-mq6f0tgx.js} +2 -2
- package/dist/{index-8mzg78nw.js → index-nr793zrn.js} +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/controlSize.d.ts +59 -0
- package/dist/lib/controlSize.d.ts.map +1 -0
- package/dist/lib/utils.js +1 -1
- package/dist/theme.css +211 -147
- package/package.json +25 -22
- package/dist/index-1cb5sns5.js +0 -2
|
@@ -21,24 +21,24 @@ export interface CarouselProps extends React.ComponentProps<"div"> {
|
|
|
21
21
|
* is controlled by the item basis class (e.g. basis-1/2, md:basis-1/3 on CarouselItem), which
|
|
22
22
|
* defaults to basis-full for one item per view.
|
|
23
23
|
*/
|
|
24
|
-
export declare function Carousel({ orientation, className, children, onKeyDown, ...props }: CarouselProps):
|
|
24
|
+
export declare function Carousel({ orientation, className, children, onKeyDown, ...props }: CarouselProps): React.JSX.Element;
|
|
25
25
|
export interface CarouselContentProps extends React.ComponentProps<"div"> {
|
|
26
26
|
}
|
|
27
|
-
export declare function CarouselContent({ className, ...props }: CarouselContentProps):
|
|
27
|
+
export declare function CarouselContent({ className, ...props }: CarouselContentProps): React.JSX.Element;
|
|
28
28
|
export interface CarouselItemProps extends React.ComponentProps<"div"> {
|
|
29
29
|
}
|
|
30
|
-
export declare function CarouselItem({ className, ...props }: CarouselItemProps):
|
|
30
|
+
export declare function CarouselItem({ className, ...props }: CarouselItemProps): React.JSX.Element;
|
|
31
31
|
export interface CarouselPreviousProps extends Omit<ButtonProps, "children"> {
|
|
32
32
|
children?: React.ReactNode;
|
|
33
33
|
}
|
|
34
|
-
export declare function CarouselPrevious({ className, variant, size, children, ...props }: CarouselPreviousProps):
|
|
34
|
+
export declare function CarouselPrevious({ className, variant, size, children, ...props }: CarouselPreviousProps): React.JSX.Element;
|
|
35
35
|
export interface CarouselNextProps extends Omit<ButtonProps, "children"> {
|
|
36
36
|
children?: React.ReactNode;
|
|
37
37
|
}
|
|
38
|
-
export declare function CarouselNext({ className, variant, size, children, ...props }: CarouselNextProps):
|
|
38
|
+
export declare function CarouselNext({ className, variant, size, children, ...props }: CarouselNextProps): React.JSX.Element;
|
|
39
39
|
export interface CarouselDotsProps extends React.ComponentProps<"div"> {
|
|
40
40
|
count: number;
|
|
41
41
|
}
|
|
42
|
-
export declare function CarouselDots({ count, className, ...props }: CarouselDotsProps):
|
|
42
|
+
export declare function CarouselDots({ count, className, ...props }: CarouselDotsProps): React.JSX.Element;
|
|
43
43
|
export {};
|
|
44
44
|
//# sourceMappingURL=Carousel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG5D,KAAK,mBAAmB,GAAG,YAAY,GAAG,UAAU,CAAC;AAErD,UAAU,oBAAoB;IAC7B,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACpD,WAAW,EAAE,mBAAmB,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,wBAAgB,WAAW,yBAM1B;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACjE,WAAW,CAAC,EAAE,mBAAmB,CAAC;CAClC;AAED;;;;;;;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M,WAAW,qBAAsB,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC;IAC3E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,gBAAgB,CAAC,EAChC,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,qBAAqB,qBAsBvB;AAED,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC;IACvE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,YAAY,CAAC,EAC5B,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,iBAAiB,qBAsBnB;AAED,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACrE,KAAK,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,YAAY,CAAC,EAC5B,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACR,EAAE,iBAAiB,qBAyDnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{fd as L}from"../../index-9scn04dv.js";import"../../index-2nc1awt9.js";import{xe as D}from"../../index-aq782dhn.js";import{ye as H}from"../../lib/utils.js";import{faChevronLeft as K,faChevronRight as B}from"@fortawesome/pro-solid-svg-icons";import*as k from"react";import{jsx as X}from"react/jsx-runtime";var T=k.createContext(null);function P(){let C=k.useContext(T);if(!C)throw Error("useCarousel must be used within a <Carousel>");return C}function R({orientation:C="horizontal",className:O,children:Q,onKeyDown:M,...Y}){let V=k.useRef(null),[Z,_]=k.useState(!1),[G,q]=k.useState(!1),U=k.useCallback(()=>{let E=V.current;if(!E)return;if(C==="horizontal"){let{scrollLeft:F,scrollWidth:$,clientWidth:A}=E;_(F>1),q(F<$-A-1)}else{let{scrollTop:F,scrollHeight:$,clientHeight:A}=E;_(F>1),q(F<$-A-1)}},[C]),J=k.useCallback((E)=>{let F=V.current;if(!F)return;let $=F.firstElementChild;if(C==="horizontal"){let A=$?.offsetWidth??F.clientWidth;F.scrollBy({left:A*E,behavior:"smooth"})}else{let A=$?.offsetHeight??F.clientHeight;F.scrollBy({top:A*E,behavior:"smooth"})}},[C]),W=k.useCallback(()=>J(-1),[J]),b=k.useCallback(()=>J(1),[J]);k.useEffect(()=>{let E=V.current;if(!E)return;U(),E.addEventListener("scroll",U,{passive:!0});let F=new ResizeObserver(U);return F.observe(E),()=>{E.removeEventListener("scroll",U),F.disconnect()}},[U]);let g=k.useCallback((E)=>{if(M?.(E),E.defaultPrevented)return;let F=C==="horizontal"?"ArrowLeft":"ArrowUp",$=C==="horizontal"?"ArrowRight":"ArrowDown";if(E.key===F)E.preventDefault(),W();else if(E.key===$)E.preventDefault(),b()},[M,C,W,b]),I=k.useMemo(()=>({viewportRef:V,orientation:C,canScrollPrev:Z,canScrollNext:G,scrollPrev:W,scrollNext:b}),[C,Z,G,W,b]);return X(T.Provider,{value:I,children:X("div",{"data-slot":"carousel",role:"region","aria-roledescription":"carousel",className:H("relative",O),onKeyDown:g,...Y,children:Q})})}function y({className:C,...O}){let{viewportRef:Q,orientation:M}=P();return X("div",{ref:Q,"data-slot":"carousel-content",className:H("flex scroll-smooth [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",M==="horizontal"?"-ml-4 snap-x snap-mandatory overflow-x-auto":"-mt-4 flex-col snap-y snap-mandatory overflow-y-auto",C),...O})}function z({className:C,...O}){let{orientation:Q}=P();return X("div",{"data-slot":"carousel-item",role:"group","aria-roledescription":"slide",className:H("min-w-0 shrink-0 grow-0 basis-full snap-start",Q==="horizontal"?"pl-4":"pt-4",C),...O})}function j({className:C,variant:O="outline",size:Q="icon-sm",children:M,...Y}){let{orientation:V,canScrollPrev:Z,scrollPrev:_}=P();return X(L,{"data-slot":"carousel-previous",variant:O,size:Q,"aria-label":"Previous slide",disabled:!Z,onClick:_,className:H("absolute z-10 rounded-full",V==="horizontal"?"-left-4 top-1/2 -translate-y-1/2":"-top-4 left-1/2 -translate-x-1/2 rotate-90",C),...Y,children:M??X(D,{icon:K})})}function f({className:C,variant:O="outline",size:Q="icon-sm",children:M,...Y}){let{orientation:V,canScrollNext:Z,scrollNext:_}=P();return X(L,{"data-slot":"carousel-next",variant:O,size:Q,"aria-label":"Next slide",disabled:!Z,onClick:_,className:H("absolute z-10 rounded-full",V==="horizontal"?"-right-4 top-1/2 -translate-y-1/2":"-bottom-4 left-1/2 -translate-x-1/2 rotate-90",C),...Y,children:M??X(D,{icon:B})})}function u({count:C,className:O,...Q}){let{viewportRef:M,orientation:Y}=P(),[V,Z]=k.useState(0);k.useEffect(()=>{let G=M.current;if(!G)return;let q=()=>{let U=G.firstElementChild;if(Y==="horizontal"){let J=U?.offsetWidth??G.clientWidth;Z(J>0?Math.round(G.scrollLeft/J):0)}else{let J=U?.offsetHeight??G.clientHeight;Z(J>0?Math.round(G.scrollTop/J):0)}};return q(),G.addEventListener("scroll",q,{passive:!0}),()=>G.removeEventListener("scroll",q)},[M,Y]);let _=(G)=>{let q=M.current;if(!q)return;let U=q.firstElementChild;if(Y==="horizontal"){let J=U?.offsetWidth??q.clientWidth;q.scrollTo({left:J*G,behavior:"smooth"})}else{let J=U?.offsetHeight??q.clientHeight;q.scrollTo({top:J*G,behavior:"smooth"})}};return X("div",{"data-slot":"carousel-dots",className:H("flex items-center justify-center gap-2",O),...Q,children:Array.from({length:C},(G,q)=>X("button",{type:"button","aria-label":`Go to slide ${q+1}`,"data-active":q===V?"":void 0,onClick:()=>_(q),className:"size-2 rounded-full bg-muted transition-colors data-[active]:bg-primary"},q))})}export{P as useCarousel,j as CarouselPrevious,f as CarouselNext,z as CarouselItem,u as CarouselDots,y as CarouselContent,R as Carousel};export{P as Zc,R as _c,y as $c,z as ad,j as bd,f as cd,u as dd};
|
|
@@ -13,5 +13,5 @@ export interface CheckboxProps extends Omit<React.ComponentPropsWithoutRef<typeo
|
|
|
13
13
|
/**
|
|
14
14
|
* A square checkbox built on Base UI with brand checked state, indeterminate support, and two sizes.
|
|
15
15
|
*/
|
|
16
|
-
export declare function Checkbox({ size, className, ...props }: CheckboxProps):
|
|
16
|
+
export declare function Checkbox({ size, className, ...props }: CheckboxProps): React.JSX.Element;
|
|
17
17
|
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,eAAO,MAAM,gBAAgB;;8EAoB5B,CAAC;AAEF,eAAO,MAAM,yBAAyB;;8EAuBrC,CAAC;AAEF,MAAM,WAAW,aAChB,SAAQ,IAAI,CACV,KAAK,CAAC,wBAAwB,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC,EACxD,WAAW,CACX,EACD,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,eAAO,MAAM,gBAAgB;;8EAoB5B,CAAC;AAEF,eAAO,MAAM,yBAAyB;;8EAuBrC,CAAC;AAEF,MAAM,WAAW,aAChB,SAAQ,IAAI,CACV,KAAK,CAAC,wBAAwB,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC,EACxD,WAAW,CACX,EACD,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,qBA6BpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{xe as k}from"../../index-aq782dhn.js";import{ye as b}from"../../lib/utils.js";import{Checkbox as y}from"@base-ui/react/checkbox";import{faCheck as G,faMinus as H}from"@fortawesome/pro-solid-svg-icons";import{cva as A}from"class-variance-authority";import{jsx as P,jsxs as K}from"react/jsx-runtime";var C=A(["inline-flex items-center justify-center shrink-0 rounded-md border border-input bg-background shadow-xs outline-none transition-shadow","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","data-[checked]:bg-primary data-[checked]:border-primary data-[checked]:text-primary-foreground","data-[indeterminate]:bg-primary data-[indeterminate]:border-primary data-[indeterminate]:text-primary-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","data-[invalid]:border-destructive data-[invalid]:ring-[3px] data-[invalid]:ring-destructive/20"],{variants:{size:{sm:"size-4",md:"size-5"}},defaultVariants:{size:"md"}}),D=A(["flex items-center justify-center text-current data-[unchecked]:invisible","[&>[data-slot=checkbox-minus-icon]]:hidden","data-[indeterminate]:[&>[data-slot=checkbox-check-icon]]:hidden","data-[indeterminate]:[&>[data-slot=checkbox-minus-icon]]:flex"],{variants:{size:{sm:"[&_[data-slot=icon]]:text-[0.625rem]",md:"[&_[data-slot=icon]]:text-xs"}},defaultVariants:{size:"md"}});function J({size:q,className:E,...F}){return P(y.Root,{"data-slot":"checkbox",className:b(C({size:q}),E),...F,children:K(y.Indicator,{"data-slot":"checkbox-indicator",keepMounted:!0,className:b(D({size:q})),children:[P("span",{"data-slot":"checkbox-check-icon",className:"flex items-center justify-center",children:P(k,{icon:G,className:"-translate-y-[0.03125em]"})}),P("span",{"data-slot":"checkbox-minus-icon",className:"flex items-center justify-center",children:P(k,{icon:H})})]})})}export{C as checkboxVariants,D as checkboxIndicatorVariants,J as Checkbox};export{C as gd,D as hd,J as id};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Collapsible as BaseCollapsible } from "@base-ui/react/collapsible";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
import { type ComponentPropsWithoutRef } from "react";
|
|
4
|
+
import { type IconProps } from "../Icon";
|
|
4
5
|
declare const collapsibleTriggerVariants: (props?: ({
|
|
5
6
|
variant?: "default" | "subtle" | null | undefined;
|
|
6
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -11,7 +12,7 @@ export type CollapsibleRootProps = ComponentPropsWithoutRef<typeof BaseCollapsib
|
|
|
11
12
|
/**
|
|
12
13
|
* A disclosure component that can be expanded or collapsed to show/hide content. Useful for sidebar categories and sections.
|
|
13
14
|
*/
|
|
14
|
-
export declare function CollapsibleRoot({ className, ...props }: CollapsibleRootProps): import("react
|
|
15
|
+
export declare function CollapsibleRoot({ className, ...props }: CollapsibleRootProps): import("react").JSX.Element;
|
|
15
16
|
export interface CollapsibleTriggerProps extends Omit<ComponentPropsWithoutRef<typeof BaseCollapsible.Trigger>, "className">, VariantProps<typeof collapsibleTriggerVariants> {
|
|
16
17
|
className?: string;
|
|
17
18
|
}
|
|
@@ -22,10 +23,10 @@ export interface CollapsiblePanelProps extends Omit<ComponentPropsWithoutRef<typ
|
|
|
22
23
|
export declare const CollapsiblePanel: import("react").ForwardRefExoticComponent<CollapsiblePanelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
24
|
export interface CollapsibleContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
24
25
|
}
|
|
25
|
-
export declare function CollapsibleContent({ className, ...props }: CollapsibleContentProps): import("react
|
|
26
|
-
export interface CollapsibleChevronProps extends
|
|
26
|
+
export declare function CollapsibleContent({ className, ...props }: CollapsibleContentProps): import("react").JSX.Element;
|
|
27
|
+
export interface CollapsibleChevronProps extends Omit<IconProps, "icon"> {
|
|
27
28
|
}
|
|
28
|
-
export declare function CollapsibleChevron({ className, ...props }: CollapsibleChevronProps): import("react
|
|
29
|
+
export declare function CollapsibleChevron({ className, ...props }: CollapsibleChevronProps): import("react").JSX.Element;
|
|
29
30
|
export declare const Collapsible: {
|
|
30
31
|
Root: typeof CollapsibleRoot;
|
|
31
32
|
Trigger: import("react").ForwardRefExoticComponent<CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/Collapsible/Collapsible.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/Collapsible/Collapsible.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE5E,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,KAAK,wBAAwB,EAAc,MAAM,OAAO,CAAC;AAElE,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,QAAA,MAAM,0BAA0B;;8EA0B/B,CAAC;AAEF,QAAA,MAAM,wBAAwB;;8EAoB7B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,CAC1D,OAAO,eAAe,CAAC,IAAI,CAC3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,+BAO5E;AAED,MAAM,WAAW,uBAChB,SAAQ,IAAI,CACV,wBAAwB,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,EACxD,WAAW,CACX,EACD,YAAY,CAAC,OAAO,0BAA0B,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,uHAW7B,CAAC;AAEH,MAAM,WAAW,qBAChB,SAAQ,IAAI,CACV,wBAAwB,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,EACtD,WAAW,CACX,EACD,YAAY,CAAC,OAAO,wBAAwB,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,gBAAgB,kHAW3B,CAAC;AAEH,MAAM,WAAW,uBAChB,SAAQ,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAE3C,wBAAgB,kBAAkB,CAAC,EAClC,SAAS,EACT,GAAG,KAAK,EACR,EAAE,uBAAuB,+BAQzB;AAED,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;CAAG;AAE3E,wBAAgB,kBAAkB,CAAC,EAClC,SAAS,EACT,GAAG,KAAK,EACR,EAAE,uBAAuB,+BAWzB;AAED,eAAO,MAAM,WAAW;;;;;;CAMvB,CAAC;AAEF,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import"../Icon/index.js";import{xe as D}from"../../index-aq782dhn.js";import{ye as b}from"../../lib/utils.js";import{Collapsible as A}from"@base-ui/react/collapsible";import{faChevronRight as Q}from"@fortawesome/pro-solid-svg-icons";import{cva as E}from"class-variance-authority";import{forwardRef as F}from"react";import{jsx as k}from"react/jsx-runtime";var G=E(["flex w-full items-center gap-2.5 rounded-lg px-2 py-2.5 text-left text-base/6 font-medium text-foreground transition-colors sm:py-2 sm:text-sm/5","[&_[data-slot=icon]]:shrink-0 [&_[data-slot=icon]]:text-muted-foreground","[&_[data-slot=icon]]:size-5 sm:[&_[data-slot=icon]]:size-[18px]","[&_[data-slot=icon]:last-child]:ml-auto [&_[data-slot=icon]:last-child]:h-[1em] [&_[data-slot=icon]:last-child]:w-auto [&_[data-slot=icon]:last-child]:text-[0.875em]","hover:[&_[data-slot=icon]]:text-foreground","hover:bg-accent active:bg-ink-pressed","focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"],{variants:{variant:{default:"",subtle:"text-muted-foreground hover:text-foreground"}},defaultVariants:{variant:"default"}}),H=E(["flex flex-col","h-[var(--collapsible-panel-height)]","transition-[height] duration-200 ease-out","data-[starting-style]:h-0","data-[ending-style]:h-0","[clip-path:inset(-4px_-10px_-4px_-10px)]"],{variants:{indent:{true:"pl-4",false:""}},defaultVariants:{indent:!0}});function J({className:P,...C}){return k(A.Root,{className:b("flex flex-col",P),...C})}var K=F(function({className:C,variant:q,...y},z){return k(A.Trigger,{ref:z,className:b(G({variant:q}),C),...y})}),L=F(function({className:C,indent:q,...y},z){return k(A.Panel,{ref:z,className:b(H({indent:q}),C),...y})});function M({className:P,...C}){return k("div",{"data-slot":"collapsible-content",className:b("flex flex-col gap-[3px] pt-[3px]",P),...C})}function O({className:P,...C}){return k(D,{icon:Q,className:b("ml-auto transition-transform duration-200 [[data-panel-open]_&]:rotate-90",P),...C})}var S={Root:J,Trigger:K,Panel:L,Content:M,Chevron:O};export{G as collapsibleTriggerVariants,H as collapsiblePanelVariants,K as CollapsibleTrigger,J as CollapsibleRoot,L as CollapsiblePanel,M as CollapsibleContent,O as CollapsibleChevron,S as Collapsible};export{G as jd,H as kd,J as ld,K as md,L as nd,M as od,O as pd,S as qd};
|
|
@@ -93,27 +93,29 @@ export interface ComboboxChipRemoveProps extends Omit<BaseCombobox.ChipRemove.Pr
|
|
|
93
93
|
* An input that filters a list of options as you type, built on the Base UI Combobox primitive.
|
|
94
94
|
* Supports single and multiple selection, grouped options, and chips. Items shaped { label, value }
|
|
95
95
|
* display their label automatically. Pair `multiple` with `Combobox.Chips` for tag-style display.
|
|
96
|
-
* Input/InputGroup `size`
|
|
96
|
+
* Input/InputGroup `size` follows the shared control-size contract
|
|
97
|
+
* (h-8 / h-9 / h-10, text-sm/font-medium) so comboboxes align with Button and
|
|
98
|
+
* Input. Trailing icon buttons nest on a 2px concentric inset.
|
|
97
99
|
*/
|
|
98
|
-
declare function ComboboxRoot<Value, Multiple extends boolean | undefined = false>(props: ComboboxRootProps<Value, Multiple>): import("react
|
|
99
|
-
declare function ComboboxLabel({ className, children, ...props }: ComboboxLabelProps): import("react
|
|
100
|
-
declare function ComboboxInput({ className, size, ...props }: ComboboxInputProps): import("react
|
|
101
|
-
declare function ComboboxInputGroup({ className, children, size, ...props }: ComboboxInputGroupProps): import("react
|
|
102
|
-
declare function ComboboxTrigger({ className, children, ...props }: ComboboxTriggerProps): import("react
|
|
103
|
-
declare function ComboboxClear({ className, children, ...props }: ComboboxClearProps): import("react
|
|
104
|
-
declare function ComboboxValue(props: ComboboxValueProps): import("react
|
|
105
|
-
declare function ComboboxIcon({ className, children, ...props }: ComboboxIconProps): import("react
|
|
106
|
-
declare function ComboboxContent({ className, children, side, align, sideOffset, alignOffset, anchor, ...props }: ComboboxContentProps): import("react
|
|
107
|
-
declare function ComboboxList({ className, ...props }: ComboboxListProps): import("react
|
|
108
|
-
declare function ComboboxItem({ className, children, ...props }: ComboboxItemProps): import("react
|
|
109
|
-
declare function ComboboxEmpty({ className, children, ...props }: ComboboxEmptyProps): import("react
|
|
110
|
-
declare function ComboboxStatus({ className, children, ...props }: ComboboxStatusProps): import("react
|
|
111
|
-
declare function ComboboxGroup({ className, children, ...props }: ComboboxGroupProps): import("react
|
|
112
|
-
declare function ComboboxGroupLabel({ className, children, ...props }: ComboboxGroupLabelProps): import("react
|
|
113
|
-
declare function ComboboxCollection(props: ComboboxCollectionProps): import("react
|
|
114
|
-
declare function ComboboxChips({ className, children, ...props }: ComboboxChipsProps): import("react
|
|
115
|
-
declare function ComboboxChip({ className, children, ...props }: ComboboxChipProps): import("react
|
|
116
|
-
declare function ComboboxChipRemove({ className, children, ...props }: ComboboxChipRemoveProps): import("react
|
|
100
|
+
declare function ComboboxRoot<Value, Multiple extends boolean | undefined = false>(props: ComboboxRootProps<Value, Multiple>): import("react").JSX.Element;
|
|
101
|
+
declare function ComboboxLabel({ className, children, ...props }: ComboboxLabelProps): import("react").JSX.Element;
|
|
102
|
+
declare function ComboboxInput({ className, size, ...props }: ComboboxInputProps): import("react").JSX.Element;
|
|
103
|
+
declare function ComboboxInputGroup({ className, children, size, ...props }: ComboboxInputGroupProps): import("react").JSX.Element;
|
|
104
|
+
declare function ComboboxTrigger({ className, children, ...props }: ComboboxTriggerProps): import("react").JSX.Element;
|
|
105
|
+
declare function ComboboxClear({ className, children, ...props }: ComboboxClearProps): import("react").JSX.Element;
|
|
106
|
+
declare function ComboboxValue(props: ComboboxValueProps): import("react").JSX.Element;
|
|
107
|
+
declare function ComboboxIcon({ className, children, ...props }: ComboboxIconProps): import("react").JSX.Element;
|
|
108
|
+
declare function ComboboxContent({ className, children, side, align, sideOffset, alignOffset, anchor, ...props }: ComboboxContentProps): import("react").JSX.Element;
|
|
109
|
+
declare function ComboboxList({ className, ...props }: ComboboxListProps): import("react").JSX.Element;
|
|
110
|
+
declare function ComboboxItem({ className, children, ...props }: ComboboxItemProps): import("react").JSX.Element;
|
|
111
|
+
declare function ComboboxEmpty({ className, children, ...props }: ComboboxEmptyProps): import("react").JSX.Element;
|
|
112
|
+
declare function ComboboxStatus({ className, children, ...props }: ComboboxStatusProps): import("react").JSX.Element;
|
|
113
|
+
declare function ComboboxGroup({ className, children, ...props }: ComboboxGroupProps): import("react").JSX.Element;
|
|
114
|
+
declare function ComboboxGroupLabel({ className, children, ...props }: ComboboxGroupLabelProps): import("react").JSX.Element;
|
|
115
|
+
declare function ComboboxCollection(props: ComboboxCollectionProps): import("react").JSX.Element;
|
|
116
|
+
declare function ComboboxChips({ className, children, ...props }: ComboboxChipsProps): import("react").JSX.Element;
|
|
117
|
+
declare function ComboboxChip({ className, children, ...props }: ComboboxChipProps): import("react").JSX.Element;
|
|
118
|
+
declare function ComboboxChipRemove({ className, children, ...props }: ComboboxChipRemoveProps): import("react").JSX.Element;
|
|
117
119
|
export declare const Combobox: {
|
|
118
120
|
Root: typeof ComboboxRoot;
|
|
119
121
|
Label: typeof ComboboxLabel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAMnE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEN,KAAK,SAAS,EAId,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAMnE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEN,KAAK,SAAS,EAId,MAAM,OAAO,CAAC;AA6Bf,QAAA,MAAM,qBAAqB;;8EAgB1B,CAAC;AAKF,QAAA,MAAM,0BAA0B;;8EAe/B,CAAC;AAYF,QAAA,MAAM,sBAAsB,oFAM1B,CAAC;AAIH,QAAA,MAAM,uBAAuB,oFAS3B,CAAC;AAEH,QAAA,MAAM,oBAAoB,oFAMxB,CAAC;AAIH,QAAA,MAAM,qBAAqB,oFAEzB,CAAC;AAEH,QAAA,MAAM,sBAAsB,oFAE1B,CAAC;AAEH,QAAA,MAAM,0BAA0B,oFAE9B,CAAC;AAEH,QAAA,MAAM,qBAAqB,oFAKzB,CAAC;AAEH,Q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,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,uBAAuB,+BAUzB;AAED,iBAAS,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,+BAEzD;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,+BAc3E;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,+BAUzE;AAED,iBAAS,kBAAkB,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,uBAAuB,+BAWzB;AAED,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;CAoBpB,CAAC;AAEF,OAAO,EACN,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,GACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../Icon/index.js";import{
|
|
1
|
+
import{Hd as y,Id as k,Kd as w}from"../../index-2nc1awt9.js";import"../Icon/index.js";import{xe as $}from"../../index-aq782dhn.js";import{ye as Q}from"../../lib/utils.js";import{Combobox as K}from"@base-ui/react/combobox";import{faCheck as B,faChevronDown as S,faXmark as U}from"@fortawesome/pro-solid-svg-icons";import{cva as W}from"class-variance-authority";import{createContext as z,useContext as M,useMemo as j,useState as d}from"react";import{jsx as J,jsxs as QP}from"react/jsx-runtime";var Z=z(null),D=z(null),A=W(["w-full min-w-0 rounded-lg border border-input bg-background text-foreground shadow-xs","placeholder:text-muted-foreground","transition-[color,box-shadow] outline-none","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50"],{variants:{size:w},defaultVariants:{size:"md"}}),G=W(["relative flex w-full items-center gap-0.5 rounded-lg border border-input bg-background py-0.5 pr-0.5 pl-1.5 shadow-xs","transition-[color,box-shadow]","has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-ring/50 has-[input:focus-visible]:ring-[3px]","data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50"],{variants:{size:k},defaultVariants:{size:"md"}}),N=W([`h-full w-full min-w-0 flex-1 bg-transparent pl-1.5 ${y} text-foreground outline-none`,"placeholder:text-muted-foreground"]),h=W([`h-6 min-w-16 flex-1 bg-transparent px-1.5 ${y} text-foreground outline-none`,"placeholder:text-muted-foreground"]),H=W(["flex aspect-square h-full shrink-0 cursor-default items-center justify-center rounded-md bg-transparent text-muted-foreground/60","outline-none transition-colors","hover:bg-muted hover:text-muted-foreground","focus-visible:ring-2 focus-visible:ring-ring/50","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"]),g=W(["bg-background text-foreground","z-50 w-[var(--anchor-width)] max-w-[var(--available-width)] max-h-[min(var(--available-height),23rem)]","overflow-y-auto overscroll-contain scroll-py-1.5","rounded-xl border border-border p-1.5 shadow-lg","origin-[var(--transform-origin)] outline-none","transition-[transform,scale,opacity]","data-[starting-style]:opacity-0 data-[starting-style]:scale-95","data-[ending-style]:opacity-0 data-[ending-style]:scale-95"]),L=W(["relative flex w-full cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-sm outline-hidden select-none","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","[&_svg:not([class*='text-'])]:text-muted-foreground"]),R=W(["px-2 py-4 text-center text-sm text-muted-foreground empty:p-0"]),X=W(["px-2 py-1.5 text-xs text-muted-foreground empty:p-0"]),E=W(["px-2 py-1.5 text-xs font-medium text-muted-foreground"]),_=W(["flex min-h-9 w-full flex-wrap items-center gap-1 rounded-lg border border-input bg-background px-1.5 py-1 shadow-xs","transition-[color,box-shadow]","focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]","data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50"]),f=W(["flex h-6 cursor-default items-center gap-0.5 rounded-md bg-muted pr-0.5 pl-2 text-xs font-medium text-foreground outline-none","focus-within:bg-primary focus-within:text-primary-foreground"]),O=W(["flex size-5 shrink-0 cursor-default items-center justify-center rounded-sm text-inherit opacity-60","outline-none transition-opacity hover:opacity-100"]);function C(P){let[q,F]=d(null),Y=j(()=>({anchor:q,setAnchor:F}),[q]);return J(D.Provider,{value:Y,children:J(K.Root,{...P})})}function i({className:P,children:q,...F}){return J(K.Label,{"data-slot":"combobox-label",className:Q("text-sm font-medium text-foreground",P),...F,children:q})}function p({className:P,size:q,...F}){let Y=M(Z);if(Y==="group")return J(K.Input,{"data-slot":"combobox-input",className:Q(N(),P),...F});if(Y==="chips")return J(K.Input,{"data-slot":"combobox-input",className:Q(h(),P),...F});return J(K.Input,{"data-slot":"combobox-input",className:Q(A({size:q}),P),...F})}function t({className:P,children:q,size:F,...Y}){return J(Z.Provider,{value:"group",children:J(K.InputGroup,{"data-slot":"combobox-input-group",className:Q(G({size:F}),P),...Y,children:q})})}function l({className:P,children:q,...F}){return J(K.Trigger,{"data-slot":"combobox-trigger","aria-label":q?void 0:"Open popup",className:Q(q?void 0:H(),P),...F,children:q??J($,{icon:S,className:"size-3.5"})})}function m({className:P,children:q,...F}){return J(K.Clear,{"data-slot":"combobox-clear","aria-label":"Clear selection",className:Q(H(),P),...F,children:q??J($,{icon:U,className:"size-3.5"})})}function b(P){return J(K.Value,{"data-slot":"combobox-value",...P})}function x({className:P,children:q,...F}){return J(K.Icon,{"data-slot":"combobox-icon",className:Q("flex shrink-0 text-muted-foreground/60",P),...F,children:q??J($,{icon:S,className:"size-3.5"})})}function r({className:P,children:q,side:F="bottom",align:Y="start",sideOffset:T=4,alignOffset:V,anchor:v,...I}){let u=M(D);return J(K.Portal,{children:J(K.Positioner,{className:"z-50 outline-none",side:F,align:Y,sideOffset:T,alignOffset:V,anchor:v??u?.anchor??void 0,children:J(K.Popup,{"data-slot":"combobox-content",className:Q(g(),P),...I,children:q})})})}function n({className:P,...q}){return J(K.List,{"data-slot":"combobox-list",className:Q("outline-none",P),...q})}function c({className:P,children:q,...F}){return QP(K.Item,{"data-slot":"combobox-item",className:Q(L(),P),...F,children:[J("span",{"data-slot":"combobox-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:J(K.ItemIndicator,{children:J($,{icon:B,className:"size-4 text-primary"})})}),q]})}function e({className:P,children:q,...F}){return J(K.Empty,{"data-slot":"combobox-empty",className:Q(R(),P),...F,children:q})}function a({className:P,children:q,...F}){return J(K.Status,{"data-slot":"combobox-status",className:Q(X(),P),...F,children:q})}function s({className:P,children:q,...F}){return J(K.Group,{"data-slot":"combobox-group",className:Q(P),...F,children:q})}function o({className:P,children:q,...F}){return J(K.GroupLabel,{"data-slot":"combobox-group-label",className:Q(E(),P),...F,children:q})}function PP(P){return J(K.Collection,{...P})}function qP({className:P,children:q,...F}){let Y=M(D);return J(Z.Provider,{value:"chips",children:J(K.Chips,{ref:Y?.setAnchor,"data-slot":"combobox-chips",className:Q(_(),P),...F,children:q})})}function FP({className:P,children:q,...F}){return J(K.Chip,{"data-slot":"combobox-chip",className:Q(f(),P),...F,children:q})}function JP({className:P,children:q,...F}){return J(K.ChipRemove,{"data-slot":"combobox-chip-remove","aria-label":"Remove",className:Q(O(),P),...F,children:q??J($,{icon:U,className:"size-3"})})}var KP={Root:C,Label:i,Input:p,InputGroup:t,Trigger:l,Clear:m,Value:b,Icon:x,Content:r,List:n,Item:c,Empty:e,Status:a,Group:s,GroupLabel:o,Collection:PP,Chips:qP,Chip:FP,ChipRemove:JP};export{X as comboboxStatusVariants,L as comboboxItemVariants,A as comboboxInputVariants,G as comboboxInputGroupVariants,E as comboboxGroupLabelVariants,R as comboboxEmptyVariants,g as comboboxContentVariants,_ as comboboxChipsVariants,f as comboboxChipVariants,O as comboboxChipRemoveVariants,H as comboboxButtonVariants,KP as Combobox};export{A as rd,G as sd,H as td,g as ud,L as vd,R as wd,X as xd,E as yd,_ as zd,f as Ad,O as Bd,KP as Cd};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import { Command as CommandPrimitive } from "cmdk";
|
|
3
|
-
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
3
|
+
import { type ComponentPropsWithoutRef, type HTMLAttributes, type ReactNode } from "react";
|
|
4
4
|
declare const commandVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
5
5
|
declare const commandInputVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
6
6
|
declare const commandListVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -44,13 +44,50 @@ export interface CommandShortcutProps extends React.HTMLAttributes<HTMLSpanEleme
|
|
|
44
44
|
children: ReactNode;
|
|
45
45
|
}
|
|
46
46
|
export interface CommandDialogProps {
|
|
47
|
+
/** Accessible dialog title; visually hidden. */
|
|
48
|
+
title?: string;
|
|
49
|
+
/** Width is independent of result density. */
|
|
50
|
+
size?: "sm" | "md" | "lg";
|
|
51
|
+
className?: string;
|
|
52
|
+
/** Pass filtering, selection, and keyboard options to the command root. */
|
|
53
|
+
commandProps?: Omit<CommandRootProps, "children">;
|
|
47
54
|
open?: boolean;
|
|
48
55
|
onOpenChange?: (open: boolean) => void;
|
|
49
56
|
children: ReactNode;
|
|
50
57
|
}
|
|
51
|
-
|
|
58
|
+
/** Search header that groups the input and optional scope controls. */
|
|
59
|
+
declare function CommandHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
60
|
+
export interface CommandScopesProps extends ComponentPropsWithoutRef<"fieldset"> {
|
|
61
|
+
}
|
|
62
|
+
/** A labeled group of scope filters; use Tab to reach each scope. */
|
|
63
|
+
declare function CommandScopes({ className, ...props }: CommandScopesProps): import("react").JSX.Element;
|
|
64
|
+
export interface CommandScopeProps extends ComponentPropsWithoutRef<"button"> {
|
|
65
|
+
active?: boolean;
|
|
66
|
+
}
|
|
67
|
+
/** A scope filter styled like a soft tab, with native button semantics. */
|
|
68
|
+
declare function CommandScope({ active, className, onKeyDown, ...props }: CommandScopeProps): import("react").JSX.Element;
|
|
69
|
+
/** Secondary information beside a result's primary label. */
|
|
70
|
+
declare function CommandDescription({ className, ...props }: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
71
|
+
/** Trailing metadata, kept separate from the searchable result name. */
|
|
72
|
+
declare function CommandMeta({ className, ...props }: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
73
|
+
/** Persistent action hints below the independently scrolling results. */
|
|
74
|
+
declare function CommandFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
75
|
+
export interface CommandHintProps extends HTMLAttributes<HTMLSpanElement> {
|
|
76
|
+
keys: string[];
|
|
77
|
+
}
|
|
78
|
+
/** A keyboard shortcut and its contextual action label. Does not register a shortcut. */
|
|
79
|
+
declare function CommandHint({ keys, children, className, ...props }: CommandHintProps): import("react").JSX.Element;
|
|
80
|
+
/** A responsive command dialog with a stable search and footer position. */
|
|
81
|
+
declare function CommandDialog({ open, onOpenChange, children, title, size, className, commandProps, }: CommandDialogProps): import("react").JSX.Element;
|
|
52
82
|
export declare const Command: {
|
|
53
83
|
Root: import("react").ForwardRefExoticComponent<CommandRootProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
84
|
+
Header: typeof CommandHeader;
|
|
85
|
+
Scopes: typeof CommandScopes;
|
|
86
|
+
Scope: typeof CommandScope;
|
|
87
|
+
Description: typeof CommandDescription;
|
|
88
|
+
Meta: typeof CommandMeta;
|
|
89
|
+
Footer: typeof CommandFooter;
|
|
90
|
+
Hint: typeof CommandHint;
|
|
54
91
|
Input: import("react").ForwardRefExoticComponent<CommandInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
55
92
|
List: import("react").ForwardRefExoticComponent<CommandListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
56
93
|
Empty: import("react").ForwardRefExoticComponent<CommandEmptyProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Command.d.ts","sourceRoot":"","sources":["../../../src/components/Command/Command.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,EACN,KAAK,wBAAwB,EAG7B,KAAK,SAAS,EACd,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Command.d.ts","sourceRoot":"","sources":["../../../src/components/Command/Command.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,EACN,KAAK,wBAAwB,EAG7B,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,MAAM,OAAO,CAAC;AAKf,QAAA,MAAM,eAAe,oFAEnB,CAAC;AAEH,QAAA,MAAM,oBAAoB,oFAIxB,CAAC;AAEH,QAAA,MAAM,mBAAmB,oFAEvB,CAAC;AAEH,QAAA,MAAM,oBAAoB,oFAAoC,CAAC;AAE/D,QAAA,MAAM,oBAAoB,oFAKxB,CAAC;AAEH,QAAA,MAAM,wBAAwB,oFAAsC,CAAC;AAErE,QAAA,MAAM,mBAAmB,oFAKvB,CAAC;AAEH,QAAA,MAAM,uBAAuB,oFAAkD,CAAC;AAEhF,QAAA,MAAM,2BAA2B,oFAG/B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;AAEnE,MAAM,WAA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AG,KAAK,EAAE,EAAE,cAAc,CAAC,eAAe,CAAC,+BAW5E;AAED,yEAAyE;AACzE,iBAAS,aAAa,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EACR,EAAE,cAAc,CAAC,cAAc,CAAC,+BAWhC;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,eAAe,CAAC;IACxE,IAAI,EAAE,MAAM,EAAE,CAAC;CACf;AAED,yFAAyF;AACzF,iBAAS,WAAW,CAAC,EACpB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACR,EAAE,gBAAgB,+BAmBlB;AAED,4EAA4E;AAC5E,iBAAS,aAAa,CAAC,EACtB,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,KAAyB,EACzB,IAAW,EACX,SAAS,EACT,YAAY,GACZ,EAAE,kBAAkB,+BA2BpB;AAED,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;CAiBnB,CAAC;AAEF,OAAO,EACN,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,GACf,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { CommandDialogProps, CommandEmptyProps, CommandGroupProps, CommandInputProps, CommandItemProps, CommandListProps, CommandRootProps, CommandSeparatorProps, CommandShortcutProps, CommandVariants, } from "./Command";
|
|
1
|
+
export type { CommandDialogProps, CommandEmptyProps, CommandGroupProps, CommandHintProps, CommandInputProps, CommandItemProps, CommandListProps, CommandRootProps, CommandScopeProps, CommandScopesProps, CommandSeparatorProps, CommandShortcutProps, CommandVariants, } from "./Command";
|
|
2
2
|
export { Command, commandEmptyVariants, commandGroupVariants, commandInputVariants, commandInputWrapperVariants, commandItemVariants, commandListVariants, commandSeparatorVariants, commandShortcutVariants, commandVariants, } from "./Command";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Command/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,GACf,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,GACf,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Command/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,GACf,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,GACf,MAAM,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ae as H}from"../Kbd/index.js";import{ce as _}from"../Dialog/index.js";import{ye as T}from"../../lib/utils.js";import{cva as X}from"class-variance-authority";import{Command as Z}from"cmdk";import{forwardRef as Y}from"react";import{jsx as Q,jsxs as $}from"react/jsx-runtime";var M=X(["flex min-h-0 w-full flex-col overflow-hidden rounded-xl bg-background text-foreground"]),W=X(["flex h-12 min-w-0 w-full bg-transparent text-base outline-none","placeholder:text-tertiary","disabled:cursor-not-allowed disabled:opacity-50"]),z=X(["min-h-0 max-h-[400px] flex-1 overflow-y-auto overflow-x-hidden overscroll-contain scroll-py-2 p-2"]),E=X(["py-6 text-center text-sm"]),G=X(["overflow-hidden text-foreground","[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-2","[&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium","[&_[cmdk-group-heading]]:text-tertiary"]),L=X(["mx-2 my-2 h-px bg-ink-well"]),O=X(["relative flex min-h-10 cursor-default gap-3 select-none items-center rounded-lg px-2 py-2 text-sm font-medium outline-none","hover:bg-ink-hover data-[selected=true]:bg-ink-pressed data-[selected=true]:text-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","[&_[data-slot=icon]]:pointer-events-none [&_[data-slot=icon]]:size-4 [&_[data-slot=icon]]:shrink-0 [&_[data-slot=icon]]:text-tertiary"]),b=X(["ml-auto shrink-0 text-xs text-tertiary"]),K=X(["flex shrink-0 items-center gap-3 mx-2 my-1 rounded-lg px-2","[&_[data-slot=icon]]:size-5 [&_[data-slot=icon]]:shrink-0 [&_[data-slot=icon]]:text-tertiary"]),A=Y(({className:P,children:q,...B},J)=>Q(Z,{ref:J,"data-slot":"command",className:T(M(),P),...B,children:q})),S=Y(({className:P,wrapperClassName:q,leading:B,...J},U)=>$("div",{"data-slot":"command-input-wrapper",className:T(K(),q),children:[B,Q(Z.Input,{ref:U,"data-slot":"command-input",className:T(W(),P),...J})]})),I=Y(({className:P,children:q,...B},J)=>Q(Z.List,{ref:J,"data-slot":"command-list",className:T(z(),P),...B,children:q})),k=Y(({className:P,children:q,...B},J)=>Q(Z.Empty,{ref:J,"data-slot":"command-empty",className:T(E(),P),...B,children:q})),V=Y(({className:P,children:q,...B},J)=>Q(Z.Group,{ref:J,"data-slot":"command-group",className:T(G(),P),...B,children:q})),D=Y(({className:P,...q},B)=>Q(Z.Separator,{ref:B,"data-slot":"command-separator",className:T(L(),P),...q})),u=Y(({className:P,children:q,...B},J)=>Q(Z.Item,{ref:J,"data-slot":"command-item",className:T(O(),P),...B,children:q})),y=Y(({className:P,children:q,...B},J)=>Q("span",{ref:J,"data-slot":"command-shortcut",className:T(b(),P),...B,children:q}));A.displayName="CommandRoot";S.displayName="CommandInput";I.displayName="CommandList";k.displayName="CommandEmpty";V.displayName="CommandGroup";D.displayName="CommandSeparator";u.displayName="CommandItem";y.displayName="CommandShortcut";function g({className:P,...q}){return Q("div",{"data-slot":"command-header",className:T("shrink-0 border-b border-hairline",P),...q})}function w({className:P,...q}){return Q("fieldset",{"data-slot":"command-scopes","aria-label":"Search scope",className:T("flex min-w-0 gap-1 overflow-x-auto px-4 pb-2",P),...q})}function C({active:P=!1,className:q,onKeyDown:B,...J}){return Q("button",{type:"button","data-slot":"command-scope","aria-pressed":P,className:T("inline-flex h-7 shrink-0 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-tertiary hover:bg-ink-hover hover:text-foreground aria-pressed:bg-ink-pressed aria-pressed:text-foreground outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-3.5",q),onKeyDown:(U)=>{B?.(U),U.stopPropagation()},...J})}function h({className:P,...q}){return Q("span",{"data-slot":"command-description",className:T("min-w-0 truncate text-xs font-normal text-tertiary",P),...q})}function x({className:P,...q}){return Q("span",{"data-slot":"command-meta",className:T("ml-auto shrink-0 text-xs font-normal text-tertiary",P),...q})}function v({className:P,...q}){return Q("div",{"data-slot":"command-footer",className:T("flex min-h-11 shrink-0 flex-wrap items-center gap-x-5 gap-y-2 border-t border-hairline bg-ink-hover px-4 py-2",P),...q})}function j({keys:P,children:q,className:B,...J}){return $("span",{className:T("inline-flex items-center gap-2 whitespace-nowrap text-xs text-tertiary",B),...J,children:[Q("span",{className:"inline-flex gap-1",children:P.map((U)=>Q(H,{className:"bg-background shadow-xs",children:U},U))}),q]})}function f({open:P,onOpenChange:q,children:B,title:J="Search commands",size:U="lg",className:R,commandProps:F}){return Q(_.Root,{open:P,onOpenChange:q,children:$(_.Portal,{children:[Q(_.Backdrop,{}),$(_.Popup,{className:T("w-[calc(100vw-2rem)] overflow-hidden rounded-2xl border-hairline p-0",{sm:"max-w-md",md:"max-w-xl",lg:"max-w-3xl"}[U],R),children:[Q(_.Title,{className:"sr-only",children:J}),Q(A,{label:J,...F,className:T("max-h-[min(640px,calc(100dvh-4rem))] rounded-none",F?.className),children:B})]})]})})}var N={Root:A,Header:g,Scopes:w,Scope:C,Description:h,Meta:x,Footer:v,Hint:j,Input:S,List:I,Empty:k,Group:V,Separator:D,Item:u,Shortcut:y,Dialog:f};export{M as commandVariants,b as commandShortcutVariants,L as commandSeparatorVariants,z as commandListVariants,O as commandItemVariants,K as commandInputWrapperVariants,W as commandInputVariants,G as commandGroupVariants,E as commandEmptyVariants,N as Command};export{M as Sd,W as Td,z as Ud,E as Vd,G as Wd,L as Xd,O as Yd,b as Zd,K as _d,N as $d};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
declare const datePickerTriggerVariants: (props?: ({
|
|
3
|
-
size?: "sm" | "md" | null | undefined;
|
|
3
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
4
4
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
5
|
declare const datePickerPopupVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
6
6
|
declare const datePickerDayVariants: (props?: ({
|
|
@@ -23,7 +23,11 @@ export interface DatePickerProps {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* A single-date picker built from a native-Date calendar grid inside a popover.
|
|
26
|
+
*
|
|
27
|
+
* Size follows the shared control-size contract (h-8 / h-9 / h-10,
|
|
28
|
+
* text-sm/font-medium) so the trigger aligns with Button, Input, and Select
|
|
29
|
+
* in a row. The calendar uses the leading-icon edge inset.
|
|
26
30
|
*/
|
|
27
|
-
export declare function DatePicker({ value, defaultValue, onValueChange, placeholder, disabled, format, min, max, size, className, }: DatePickerProps): import("react
|
|
31
|
+
export declare function DatePicker({ value, defaultValue, onValueChange, placeholder, disabled, format, min, max, size, className, }: DatePickerProps): import("react").JSX.Element;
|
|
28
32
|
export { datePickerDayVariants, datePickerPopupVariants, datePickerTriggerVariants, };
|
|
29
33
|
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAMlE,QAAA,MAAM,yBAAyB;;8EAmB9B,CAAC;AAEF,QAAA,MAAM,uBAAuB,oFAU3B,CAAC;AAEH,QAAA,MAAM,qBAAqB;;;;8EA8B1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,YAAY,CACxC,OAAO,yBAAyB,CAChC,CAAC,MAAM,CAAC,CAAC;AAEV,MAAM,WAAW,eAAe;IAC/B,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAC3B,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IAChC,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAoBD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EAC1B,KAAK,EACL,YAAY,EACZ,aAAa,EACb,WAA2B,EAC3B,QAAQ,EACR,MAAsB,EACtB,GAAG,EACH,GAAG,EACH,IAAI,EACJ,SAAS,GACT,EAAE,eAAe,+BAkKjB;AAED,OAAO,EACN,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,GACzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../Icon/index.js";import{
|
|
1
|
+
import{Pd as N}from"../../index-2nc1awt9.js";import"../Icon/index.js";import{xe as Z}from"../../index-aq782dhn.js";import{ye as G}from"../../lib/utils.js";import{Popover as $}from"@base-ui/react/popover";import{faCalendar as i,faChevronLeft as r,faChevronRight as o}from"@fortawesome/pro-solid-svg-icons";import{cva as F}from"class-variance-authority";import{useMemo as P,useState as A}from"react";import{jsx as B,jsxs as Y}from"react/jsx-runtime";var g=F(["flex w-full items-center justify-between gap-2 rounded-lg border border-input bg-background whitespace-nowrap shadow-xs","text-foreground","transition-[color,box-shadow] outline-none select-none cursor-default","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","data-[popup-open]:border-ring data-[popup-open]:ring-ring/50 data-[popup-open]:ring-[3px]","data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50","[&_svg:not([class*='text-'])]:text-muted-foreground","[&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{size:N},defaultVariants:{size:"md"}}),D=F(["bg-background text-foreground","relative z-50 rounded-xl border border-input p-3 shadow-lg","origin-[var(--transform-origin)]","outline-none","transition-[transform,scale,opacity]","data-[starting-style]:opacity-0","data-[ending-style]:opacity-0","data-[side=bottom]:data-[starting-style]:scale-95 data-[side=top]:data-[starting-style]:scale-95","data-[side=bottom]:data-[ending-style]:scale-95 data-[side=top]:data-[ending-style]:scale-95"]),p=F(["flex size-9 items-center justify-center rounded-md text-sm","transition-colors outline-none cursor-default","hover:bg-accent hover:text-accent-foreground","focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-30"],{variants:{selected:{true:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",false:""},today:{true:"font-semibold ring-1 ring-ring",false:""},outside:{true:"text-muted-foreground/50",false:""}},compoundVariants:[{selected:!0,today:!0,className:"ring-0"}],defaultVariants:{selected:!1,today:!1,outside:!1}}),l=["Su","Mo","Tu","We","Th","Fr","Sa"];function W(H){return new Date(H.getFullYear(),H.getMonth(),H.getDate())}function T(H,U){return H.getFullYear()===U.getFullYear()&&H.getMonth()===U.getMonth()&&H.getDate()===U.getDate()}function n(H){return H.toLocaleDateString()}function d({value:H,defaultValue:U,onValueChange:C,placeholder:I="Pick a date",disabled:O,format:S=n,min:R,max:k,size:V,className:M}){let _=H!==void 0,[f,j]=A(U??null),Q=_?H:f,[m,w]=A(!1),[X,E]=A(()=>{let q=Q??new Date;return new Date(q.getFullYear(),q.getMonth(),1)}),h=P(()=>W(new Date),[]),b=P(()=>{let q=new Date(X.getFullYear(),X.getMonth(),1),J=new Date(q);return J.setDate(J.getDate()-J.getDay()),Array.from({length:42},(K,z)=>{let L=new Date(J);return L.setDate(J.getDate()+z),L})},[X]),v=X.toLocaleDateString(void 0,{month:"long",year:"numeric"}),x=()=>{E((q)=>new Date(q.getFullYear(),q.getMonth()-1,1))},u=()=>{E((q)=>new Date(q.getFullYear(),q.getMonth()+1,1))},y=(q)=>{if(R&&q<W(R))return!0;if(k&&q>W(k))return!0;return!1},c=(q)=>{let J=W(q);if(!_)j(J);C?.(J),w(!1)};return Y($.Root,{open:m,onOpenChange:w,children:[B($.Trigger,{"data-slot":"date-picker-trigger",disabled:O,className:G(g({size:V}),M),children:Y("span",{"data-slot":"date-picker-value",className:G("flex items-center gap-2",!Q&&"text-muted-foreground"),children:[B(Z,{icon:i}),Q?S(Q):I]})}),B($.Portal,{children:B($.Positioner,{"data-slot":"date-picker-positioner",className:"z-50 outline-none",sideOffset:6,children:Y($.Popup,{"data-slot":"date-picker-content",className:G(D()),children:[Y("div",{"data-slot":"date-picker-header",className:"flex items-center justify-between px-1 pb-2",children:[B("button",{type:"button","data-slot":"date-picker-prev",onClick:x,className:"inline-flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors outline-none cursor-default hover:bg-accent hover:text-accent-foreground focus-visible:ring-ring/50 focus-visible:ring-[3px] [&_svg]:size-4",children:B(Z,{icon:r})}),B("span",{"data-slot":"date-picker-label",className:"text-sm font-semibold text-foreground",children:v}),B("button",{type:"button","data-slot":"date-picker-next",onClick:u,className:"inline-flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors outline-none cursor-default hover:bg-accent hover:text-accent-foreground focus-visible:ring-ring/50 focus-visible:ring-[3px] [&_svg]:size-4",children:B(Z,{icon:o})})]}),B("div",{"data-slot":"date-picker-weekdays",className:"grid grid-cols-7",children:l.map((q)=>B("span",{"data-slot":"date-picker-weekday",className:"flex size-9 items-center justify-center text-xs text-muted-foreground",children:q},q))}),B("div",{"data-slot":"date-picker-grid",className:"grid grid-cols-7",children:b.map((q)=>{let J=q.getMonth()!==X.getMonth(),K=Q?T(q,Q):!1,z=T(q,h);return B("button",{type:"button","data-slot":"date-picker-day",disabled:y(q),onClick:()=>c(q),className:G(p({selected:K,today:z&&!K,outside:J&&!K})),children:q.getDate()},q.toISOString())})})]})})})]})}export{g as datePickerTriggerVariants,D as datePickerPopupVariants,p as datePickerDayVariants,d as DatePicker};export{g as _b,D as $b,p as ac,d as bc};
|
|
@@ -47,15 +47,15 @@ export interface DialogActionsProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
47
47
|
/**
|
|
48
48
|
* A general-purpose modal dialog for displaying content, forms, or interactive elements.
|
|
49
49
|
*/
|
|
50
|
-
declare function DialogRoot({ children, ...props }: DialogRootProps): import("react
|
|
51
|
-
declare function DialogTrigger({ className, children, asChild, ...props }: DialogTriggerProps): import("react
|
|
52
|
-
declare function DialogPortal({ children, ...props }: DialogPortalProps): import("react
|
|
53
|
-
declare function DialogBackdrop({ className, ...props }: DialogBackdropProps): import("react
|
|
54
|
-
declare function DialogPopup({ size, className, children, ...props }: DialogPopupProps): import("react
|
|
55
|
-
declare function DialogTitle({ className, children, ...props }: DialogTitleProps): import("react
|
|
56
|
-
declare function DialogDescription({ className, children, ...props }: DialogDescriptionProps): import("react
|
|
57
|
-
declare function DialogClose({ className, children, asChild, ...props }: DialogCloseProps): import("react
|
|
58
|
-
declare function DialogActions({ className, children, ...props }: DialogActionsProps): import("react
|
|
50
|
+
declare function DialogRoot({ children, ...props }: DialogRootProps): import("react").JSX.Element;
|
|
51
|
+
declare function DialogTrigger({ className, children, asChild, ...props }: DialogTriggerProps): import("react").JSX.Element;
|
|
52
|
+
declare function DialogPortal({ children, ...props }: DialogPortalProps): import("react").JSX.Element;
|
|
53
|
+
declare function DialogBackdrop({ className, ...props }: DialogBackdropProps): import("react").JSX.Element;
|
|
54
|
+
declare function DialogPopup({ size, className, children, ...props }: DialogPopupProps): import("react").JSX.Element;
|
|
55
|
+
declare function DialogTitle({ className, children, ...props }: DialogTitleProps): import("react").JSX.Element;
|
|
56
|
+
declare function DialogDescription({ className, children, ...props }: DialogDescriptionProps): import("react").JSX.Element;
|
|
57
|
+
declare function DialogClose({ className, children, asChild, ...props }: DialogCloseProps): import("react").JSX.Element;
|
|
58
|
+
declare function DialogActions({ className, children, ...props }: DialogActionsProps): import("react").JSX.Element;
|
|
59
59
|
export declare const Dialog: {
|
|
60
60
|
Root: typeof DialogRoot;
|
|
61
61
|
Trigger: typeof DialogTrigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAO,KAAK,YAAY,EAAE,M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AAEF,OAAO,EACN,eAAe,IAAI,qBAAqB,EACxC,mBAAmB,IAAI,yBAAyB,EAChD,eAAe,IAAI,qBAAqB,EACxC,aAAa,IAAI,mBAAmB,EACpC,aAAa,IAAI,mBAAmB,GACpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ye as k}from"../../lib/utils.js";import{Dialog as q}from"@base-ui/react/dialog";import{cva as A}from"class-variance-authority";import{jsx as f}from"react/jsx-runtime";var E=A(["fixed inset-0 z-50 bg-black/50 backdrop-blur-sm","data-[starting-style]:opacity-0 data-[ending-style]:opacity-0","transition-opacity duration-150"]),F=A(["fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-full rounded-xl border border-border bg-background p-6 shadow-xl","data-[starting-style]:scale-95 data-[starting-style]:opacity-0","data-[ending-style]:scale-95 data-[ending-style]:opacity-0","transition-all duration-150","focus:outline-none"],{variants:{size:{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg rounded-2xl",xl:"max-w-xl rounded-2xl",full:"max-w-[calc(100vw-3rem)] rounded-2xl"}},defaultVariants:{size:"md"}}),G=A("text-lg font-semibold text-foreground"),H=A("mt-2 text-sm text-muted-foreground"),I=A("mt-6 flex justify-end gap-3");function J({children:O,...P}){return f(q.Root,{...P,children:O})}function K({className:O,children:P,asChild:T,...w}){return f(q.Trigger,{className:k(O),render:T?P:void 0,...w,children:T?void 0:P})}function L({children:O,...P}){return f(q.Portal,{...P,children:O})}function M({className:O,...P}){return f(q.Backdrop,{className:k(E(),O),...P})}function Q({size:O,className:P,children:T,...w}){return f(q.Popup,{"data-slot":"dialog-popup",className:k(F({size:O}),P),...w,children:T})}function R({className:O,children:P,...T}){return f(q.Title,{"data-slot":"dialog-title",className:k(G(),O),...T,children:P})}function S({className:O,children:P,...T}){return f(q.Description,{"data-slot":"dialog-description",className:k(H(),O),...T,children:P})}function U({className:O,children:P,asChild:T,...w}){return f(q.Close,{className:k(O),render:T?P:void 0,...w,children:T?void 0:P})}function W({className:O,children:P,...T}){return f("div",{"data-slot":"dialog-actions",className:k(I(),O),...T,children:P})}var X={Root:J,Trigger:K,Portal:L,Backdrop:M,Popup:Q,Title:R,Description:S,Close:U,Actions:W};export{G as dialogTitleVariants,F as dialogPopupVariants,E as dialogOverlayVariants,H as dialogDescriptionVariants,I as dialogActionsVariants,X as Dialog};export{X as ce};
|