@lawnguru/ui 0.0.0-stage → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -2
- package/dist/chunk-2FVVWPIW.js +2 -0
- package/dist/chunk-2FVVWPIW.js.map +7 -0
- package/dist/chunk-2R5NZUY2.js +2 -0
- package/dist/chunk-2R5NZUY2.js.map +7 -0
- package/dist/chunk-322C3AJR.js +2 -0
- package/dist/chunk-322C3AJR.js.map +7 -0
- package/dist/chunk-46MFR2CI.js +2 -0
- package/dist/chunk-46MFR2CI.js.map +7 -0
- package/dist/chunk-4HREOJXZ.js +2 -0
- package/dist/chunk-4HREOJXZ.js.map +7 -0
- package/dist/chunk-5AXWISGI.js +2 -0
- package/dist/chunk-5AXWISGI.js.map +7 -0
- package/dist/chunk-62LTWWXS.js +2 -0
- package/dist/chunk-62LTWWXS.js.map +7 -0
- package/dist/chunk-63IVPQSD.js +2 -0
- package/dist/chunk-63IVPQSD.js.map +7 -0
- package/dist/chunk-6MI7ACXZ.js +2 -0
- package/dist/chunk-6MI7ACXZ.js.map +7 -0
- package/dist/chunk-7EVFMYIH.js +2 -0
- package/dist/chunk-7EVFMYIH.js.map +7 -0
- package/dist/chunk-7H74R7P4.js +2 -0
- package/dist/chunk-7H74R7P4.js.map +7 -0
- package/dist/chunk-7TYPESVD.js +2 -0
- package/dist/chunk-7TYPESVD.js.map +7 -0
- package/dist/chunk-A4EVMSOO.js +2 -0
- package/dist/chunk-A4EVMSOO.js.map +7 -0
- package/dist/chunk-BF3VTYEM.js +2 -0
- package/dist/chunk-BF3VTYEM.js.map +7 -0
- package/dist/chunk-BJWILCTE.js +2 -0
- package/dist/chunk-BJWILCTE.js.map +7 -0
- package/dist/chunk-BY3UM6EV.js +2 -0
- package/dist/chunk-BY3UM6EV.js.map +7 -0
- package/dist/chunk-CALZEY6V.js +2 -0
- package/dist/chunk-CALZEY6V.js.map +7 -0
- package/dist/chunk-CF236UZ4.js +2 -0
- package/dist/chunk-CF236UZ4.js.map +7 -0
- package/dist/chunk-DBMJIVTY.js +2 -0
- package/dist/chunk-DBMJIVTY.js.map +7 -0
- package/dist/chunk-DCPZZOJQ.js +2 -0
- package/dist/chunk-DCPZZOJQ.js.map +7 -0
- package/dist/chunk-FKH5WAC7.js +2 -0
- package/dist/chunk-FKH5WAC7.js.map +7 -0
- package/dist/chunk-FUXRPZVU.js +2 -0
- package/dist/chunk-FUXRPZVU.js.map +7 -0
- package/dist/chunk-GATZOHQ6.js +1 -0
- package/dist/chunk-GATZOHQ6.js.map +7 -0
- package/dist/chunk-GTEOHHVD.js +2 -0
- package/dist/chunk-GTEOHHVD.js.map +7 -0
- package/dist/chunk-IM2PR6JL.js +2 -0
- package/dist/chunk-IM2PR6JL.js.map +7 -0
- package/dist/chunk-INK2D47B.js +2 -0
- package/dist/chunk-INK2D47B.js.map +7 -0
- package/dist/chunk-JVQR7SBQ.js +2 -0
- package/dist/chunk-JVQR7SBQ.js.map +7 -0
- package/dist/chunk-KCQQSXMU.js +2 -0
- package/dist/chunk-KCQQSXMU.js.map +7 -0
- package/dist/chunk-KGEITSDG.js +2 -0
- package/dist/chunk-KGEITSDG.js.map +7 -0
- package/dist/chunk-KR5A3H22.js +2 -0
- package/dist/chunk-KR5A3H22.js.map +7 -0
- package/dist/chunk-L4EACCHY.js +2 -0
- package/dist/chunk-L4EACCHY.js.map +7 -0
- package/dist/chunk-LUG5DIYB.js +2 -0
- package/dist/chunk-LUG5DIYB.js.map +7 -0
- package/dist/chunk-M3WRRDK4.js +2 -0
- package/dist/chunk-M3WRRDK4.js.map +7 -0
- package/dist/chunk-NMUGPQJR.js +2 -0
- package/dist/chunk-NMUGPQJR.js.map +7 -0
- package/dist/chunk-P2J4T7VX.js +2 -0
- package/dist/chunk-P2J4T7VX.js.map +7 -0
- package/dist/chunk-PQXLSFXS.js +2 -0
- package/dist/chunk-PQXLSFXS.js.map +7 -0
- package/dist/chunk-PRAYE34P.js +2 -0
- package/dist/chunk-PRAYE34P.js.map +7 -0
- package/dist/chunk-PYVYS6W4.js +2 -0
- package/dist/chunk-PYVYS6W4.js.map +7 -0
- package/dist/chunk-Q3PG3WWG.js +2 -0
- package/dist/chunk-Q3PG3WWG.js.map +7 -0
- package/dist/chunk-RHVVPPZE.js +2 -0
- package/dist/chunk-RHVVPPZE.js.map +7 -0
- package/dist/chunk-RRDBPO2I.js +2 -0
- package/dist/chunk-RRDBPO2I.js.map +7 -0
- package/dist/chunk-S2I5LIDP.js +2 -0
- package/dist/chunk-S2I5LIDP.js.map +7 -0
- package/dist/chunk-SJZ34LYG.js +2 -0
- package/dist/chunk-SJZ34LYG.js.map +7 -0
- package/dist/chunk-T73JL4BL.js +2 -0
- package/dist/chunk-T73JL4BL.js.map +7 -0
- package/dist/chunk-UUB5URTQ.js +2 -0
- package/dist/chunk-UUB5URTQ.js.map +7 -0
- package/dist/chunk-VIGX5NKJ.js +2 -0
- package/dist/chunk-VIGX5NKJ.js.map +7 -0
- package/dist/chunk-WHECA25N.js +2 -0
- package/dist/chunk-WHECA25N.js.map +7 -0
- package/dist/chunk-WIFBPNRH.js +2 -0
- package/dist/chunk-WIFBPNRH.js.map +7 -0
- package/dist/chunk-ZJVH3SNI.js +2 -0
- package/dist/chunk-ZJVH3SNI.js.map +7 -0
- package/dist/components/alert/index.js +2 -0
- package/dist/components/alert/index.js.map +7 -0
- package/dist/components/avatar/index.js +2 -0
- package/dist/components/avatar/index.js.map +7 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/badge/index.js.map +7 -0
- package/dist/components/button/index.js +2 -0
- package/dist/components/button/index.js.map +7 -0
- package/dist/components/calendar/index.js +2 -0
- package/dist/components/calendar/index.js.map +7 -0
- package/dist/components/card/index.js +2 -0
- package/dist/components/card/index.js.map +7 -0
- package/dist/components/carousel/index.js +2 -0
- package/dist/components/carousel/index.js.map +7 -0
- package/dist/components/checkbox/index.js +2 -0
- package/dist/components/checkbox/index.js.map +7 -0
- package/dist/components/collapsible/index.js +2 -0
- package/dist/components/collapsible/index.js.map +7 -0
- package/dist/components/combobox/index.js +2 -0
- package/dist/components/combobox/index.js.map +7 -0
- package/dist/components/command/index.js +2 -0
- package/dist/components/command/index.js.map +7 -0
- package/dist/components/confirm/index.js +2 -0
- package/dist/components/confirm/index.js.map +7 -0
- package/dist/components/dialog/index.js +2 -0
- package/dist/components/dialog/index.js.map +7 -0
- package/dist/components/dialog-responsive/index.js +2 -0
- package/dist/components/dialog-responsive/index.js.map +7 -0
- package/dist/components/drawer/index.js +2 -0
- package/dist/components/drawer/index.js.map +7 -0
- package/dist/components/dropdown-menu/index.js +2 -0
- package/dist/components/dropdown-menu/index.js.map +7 -0
- package/dist/components/dropdown-menu-responsive/index.js +2 -0
- package/dist/components/dropdown-menu-responsive/index.js.map +7 -0
- package/dist/components/empty/index.js +2 -0
- package/dist/components/empty/index.js.map +7 -0
- package/dist/components/form/index.js +2 -0
- package/dist/components/form/index.js.map +7 -0
- package/dist/components/input/index.js +2 -0
- package/dist/components/input/index.js.map +7 -0
- package/dist/components/input-group/index.js +2 -0
- package/dist/components/input-group/index.js.map +7 -0
- package/dist/components/input-otp/index.js +2 -0
- package/dist/components/input-otp/index.js.map +7 -0
- package/dist/components/input-password/index.js +2 -0
- package/dist/components/input-password/index.js.map +7 -0
- package/dist/components/item/index.js +2 -0
- package/dist/components/item/index.js.map +7 -0
- package/dist/components/label/index.js +2 -0
- package/dist/components/label/index.js.map +7 -0
- package/dist/components/loading-page/index.js +2 -0
- package/dist/components/loading-page/index.js.map +7 -0
- package/dist/components/photo-lightbox/index.js +2 -0
- package/dist/components/photo-lightbox/index.js.map +7 -0
- package/dist/components/photo-upload/index.js +2 -0
- package/dist/components/photo-upload/index.js.map +7 -0
- package/dist/components/popover/index.js +2 -0
- package/dist/components/popover/index.js.map +7 -0
- package/dist/components/progress/index.js +2 -0
- package/dist/components/progress/index.js.map +7 -0
- package/dist/components/questionnaire/index.js +2 -0
- package/dist/components/questionnaire/index.js.map +7 -0
- package/dist/components/radio-group/index.js +2 -0
- package/dist/components/radio-group/index.js.map +7 -0
- package/dist/components/rating/index.js +2 -0
- package/dist/components/rating/index.js.map +7 -0
- package/dist/components/resizable/index.js +2 -0
- package/dist/components/resizable/index.js.map +7 -0
- package/dist/components/scroll-area/index.js +2 -0
- package/dist/components/scroll-area/index.js.map +7 -0
- package/dist/components/select/index.js +2 -0
- package/dist/components/select/index.js.map +7 -0
- package/dist/components/separator/index.js +2 -0
- package/dist/components/separator/index.js.map +7 -0
- package/dist/components/sheet/index.js +2 -0
- package/dist/components/sheet/index.js.map +7 -0
- package/dist/components/slider/index.js +2 -0
- package/dist/components/slider/index.js.map +7 -0
- package/dist/components/spinner/index.js +2 -0
- package/dist/components/spinner/index.js.map +7 -0
- package/dist/components/table/index.js +2 -0
- package/dist/components/table/index.js.map +7 -0
- package/dist/components/tabs/index.js +2 -0
- package/dist/components/tabs/index.js.map +7 -0
- package/dist/components/text-area/index.js +2 -0
- package/dist/components/text-area/index.js.map +7 -0
- package/dist/components/toggle/index.js +2 -0
- package/dist/components/toggle/index.js.map +7 -0
- package/dist/components/toggle-group/index.js +2 -0
- package/dist/components/toggle-group/index.js.map +7 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +7 -0
- package/dist/hooks/use-is-touch-device.js +2 -0
- package/dist/hooks/use-is-touch-device.js.map +7 -0
- package/dist/index.d.ts +716 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +7 -0
- package/dist/lib/utils.js +2 -0
- package/dist/lib/utils.js.map +7 -0
- package/dist/output.css +4882 -0
- package/dist/tailwind.preset.d.ts +341 -0
- package/dist/tailwind.preset.js +2 -0
- package/dist/tailwind.preset.js.map +7 -0
- package/dist/variables.css +93 -0
- package/package.json +131 -4
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/collapsible/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Collapsible as CollapsiblePrimitive } from \"radix-ui\";\n\nconst Collapsible = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,eAAeA,MAA4B,WAEpD,IAAMC,EAAcD,EAAqB,KAEnCE,EAAqBF,EAAqB,mBAE1CG,EAAqBH,EAAqB",
|
|
6
|
+
"names": ["CollapsiblePrimitive", "Collapsible", "CollapsibleTrigger", "CollapsibleContent"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as N,c as h,d as y,e as w,f as P,h as p}from"./chunk-JVQR7SBQ.js";import{a as R,b as k,d as S}from"./chunk-BY3UM6EV.js";import{b as C}from"./chunk-BF3VTYEM.js";import{a as s}from"./chunk-WIFBPNRH.js";import*as a from"react";import{CheckIcon as H,ChevronsUpDownIcon as J}from"lucide-react";import{jsx as o,jsxs as t}from"react/jsx-runtime";function Y({items:u,placeholder:I="Select item...",emptyMessage:_="No item found.",searchable:B=!1,searchPlaceholder:E="Search...",value:v,onValueChange:r,onInputChange:n,className:G,popoverClassName:L,trigger:T,onAddOption:l,addNewOption:f}){var g;let[x,m]=a.useState(!1),[j,D]=a.useState(""),[F,b]=a.useState(""),i=v!==void 0,c=i?v:j,M=a.useCallback(e=>{i?r==null||r(e):D(e)},[i,r]),U=a.useCallback(e=>{b(e),n==null||n(e)},[n]),q=a.useCallback(()=>{l&&(l(""),b(""),m(!1))},[l]),z=!!(l&&f);return t(R,{open:x,onOpenChange:m,children:[o(k,{asChild:!0,children:T||t(C,{variant:"outline",role:"combobox","aria-expanded":x,className:s("w-[300px] justify-between",G),children:[c?(g=u.find(e=>e.value===c))==null?void 0:g.label:I,o(J,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),o(S,{className:s("w-[300px] p-0",L),children:t(N,{children:[B?o(h,{placeholder:E,onValueChange:U,value:F}):o("button",{autoFocus:!0,"aria-hidden":"true",className:"sr-only"}),t(y,{children:[o(w,{children:_}),t(P,{children:[u.map(e=>{let d=c===e.value;return t(p,{value:e.value,onSelect:A=>{M(d?"":A),m(!1)},className:s("group flex items-center gap-3 p-3",{"[&_*]:!text-primary":d}),children:[o(H,{className:s("mt-0.5 h-4 w-4 shrink-0",d?"opacity-100":"opacity-0")}),t("div",{className:s("flex min-w-0 flex-1 flex-col gap-2"),children:[o("div",{className:"text-sm leading-none",children:e.label}),o("div",{className:"text-sm leading-none text-muted-foreground",children:e.description})]})]},e.value)}),z&&t(p,{value:"__add_new_option",onSelect:()=>{q()},className:"flex items-center gap-3 p-3 text-primary",children:[o("div",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border border-current text-xs font-bold",children:"+"}),o("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:o("div",{className:"text-sm font-medium leading-none",children:f})})]})]})]})]})})]})}export{Y as a};
|
|
2
|
+
//# sourceMappingURL=chunk-Q3PG3WWG.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/combobox/index.tsx"],
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport * as React from \"react\";\nimport { CheckIcon, ChevronsUpDownIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/button\";\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"@/components/command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/popover\";\n\ntype ComboboxItem = {\n value: string;\n label: string;\n description: string;\n};\n\nexport type { ComboboxItem };\n\nexport type ComboboxProps = {\n items: ComboboxItem[];\n placeholder?: string;\n emptyMessage?: string;\n searchable?: boolean;\n searchPlaceholder?: string;\n value?: string;\n onValueChange?: (value: string) => void;\n onInputChange?: (value: string) => void;\n className?: string;\n popoverClassName?: string;\n trigger?: React.ReactNode;\n onAddOption?: (value: string) => void;\n addNewOption?: string;\n};\n\nexport function Combobox({\n items,\n placeholder = \"Select item...\",\n emptyMessage = \"No item found.\",\n searchable = false,\n searchPlaceholder = \"Search...\",\n value: controlledValue,\n onValueChange,\n onInputChange,\n className,\n popoverClassName,\n trigger,\n onAddOption,\n addNewOption,\n}: ComboboxProps) {\n const [open, setOpen] = React.useState(false);\n const [internalValue, setInternalValue] = React.useState(\"\");\n const [searchValue, setSearchValue] = React.useState(\"\");\n\n const isControlled = controlledValue !== undefined;\n const value = isControlled ? controlledValue : internalValue;\n\n const handleValueChange = React.useCallback(\n (newValue: string) => {\n if (isControlled) {\n onValueChange?.(newValue);\n } else {\n setInternalValue(newValue);\n }\n },\n [isControlled, onValueChange],\n );\n\n const handleSearchChange = React.useCallback(\n (newSearchValue: string) => {\n setSearchValue(newSearchValue);\n onInputChange?.(newSearchValue);\n },\n [onInputChange],\n );\n\n const handleAddNew = React.useCallback(() => {\n if (onAddOption) {\n onAddOption(\"\");\n setSearchValue(\"\");\n setOpen(false);\n }\n }, [onAddOption]);\n\n const showAddNew = Boolean(onAddOption && !!addNewOption);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n {trigger || (\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n className={cn(\"w-[300px] justify-between\", className)}\n >\n {value\n ? items.find((item) => item.value === value)?.label\n : placeholder}\n <ChevronsUpDownIcon className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n )}\n </PopoverTrigger>\n <PopoverContent className={cn(\"w-[300px] p-0\", popoverClassName)}>\n <Command>\n {searchable ? (\n <CommandInput\n placeholder={searchPlaceholder}\n onValueChange={handleSearchChange}\n value={searchValue}\n />\n ) : (\n <button autoFocus aria-hidden=\"true\" className=\"sr-only\" />\n )}\n <CommandList>\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n <CommandGroup>\n {items.map((item) => {\n const selected = value === item.value;\n\n return (\n <CommandItem\n key={item.value}\n value={item.value}\n onSelect={(currentValue) => {\n handleValueChange(selected ? \"\" : currentValue);\n setOpen(false);\n }}\n className={cn(\"group flex items-center gap-3 p-3\", {\n \"[&_*]:!text-primary\": selected,\n })}\n >\n <CheckIcon\n className={cn(\n \"mt-0.5 h-4 w-4 shrink-0\",\n selected ? \"opacity-100\" : \"opacity-0\",\n )}\n />\n <div className={cn(\"flex min-w-0 flex-1 flex-col gap-2\")}>\n <div className=\"text-sm leading-none\">{item.label}</div>\n <div className=\"text-sm leading-none text-muted-foreground\">\n {item.description}\n </div>\n </div>\n </CommandItem>\n );\n })}\n {showAddNew && (\n <CommandItem\n value={`__add_new_option`}\n onSelect={() => {\n // Prevent default value change behavior\n handleAddNew();\n }}\n className=\"flex items-center gap-3 p-3 text-primary\"\n >\n <div className=\"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border border-current text-xs font-bold\">\n +\n </div>\n <div className=\"flex min-w-0 flex-1 flex-col gap-2\">\n <div className=\"text-sm font-medium leading-none\">\n {addNewOption}\n </div>\n </div>\n </CommandItem>\n )}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n}\n"],
|
|
5
|
+
"mappings": "iNAEA,UAAYA,MAAW,QACvB,OAAS,aAAAC,EAAW,sBAAAC,MAA0B,eA6FpC,OASE,OAAAC,EATF,QAAAC,MAAA,oBAvDH,SAASC,EAAS,CACvB,MAAAC,EACA,YAAAC,EAAc,iBACd,aAAAC,EAAe,iBACf,WAAAC,EAAa,GACb,kBAAAC,EAAoB,YACpB,MAAOC,EACP,cAAAC,EACA,cAAAC,EACA,UAAAC,EACA,iBAAAC,EACA,QAAAC,EACA,YAAAC,EACA,aAAAC,CACF,EAAkB,CAvDlB,IAAAC,EAwDE,GAAM,CAACC,EAAMC,CAAO,EAAU,WAAS,EAAK,EACtC,CAACC,EAAeC,C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AWnB,IAAUW,EAAK,MAEhC,OACElC,EAAC2C,EAAA,CAEC,MAAOT,EAAK,MACZ,SAAWU,GAAiB,CAC1BpB,EAAkBkB,EAAW,GAAKE,CAAY,EAC9C3B,EAAQ,EAAK,CACf,EACA,UAAWgB,EAAG,oCAAqC,CACjD,sBAAuBS,CACzB,CAAC,EAED,UAAA3C,EAAC8C,EAAA,CACC,UAAWZ,EACT,0BACAS,EAAW,cAAgB,WAC7B,EACF,EACA1C,EAAC,OAAI,UAAWiC,EAAG,oCAAoC,EACrD,UAAAlC,EAAC,OAAI,UAAU,uBAAwB,SAAAmC,EAAK,MAAM,EAClDnC,EAAC,OAAI,UAAU,6CACZ,SAAAmC,EAAK,YACR,GACF,IArBKA,EAAK,KAsBZ,CAEJ,CAAC,EACAL,GACC7B,EAAC2C,EAAA,CACC,MAAO,mBACP,SAAU,IAAM,CAEdf,EAAa,CACf,EACA,UAAU,2CAEV,UAAA7B,EAAC,OAAI,UAAU,2GAA2G,aAE1H,EACAA,EAAC,OAAI,UAAU,qCACb,SAAAA,EAAC,OAAI,UAAU,mCACZ,SAAAe,EACH,EACF,GACF,GAEJ,GACF,GACF,EACF,GACF,CAEJ",
|
|
6
|
+
"names": ["React", "CheckIcon", "ChevronsUpDownIcon", "jsx", "jsxs", "Combobox", "items", "placeholder", "emptyMessage", "searchable", "searchPlaceholder", "controlledValue", "onValueChange", "onInputChange", "className", "popoverClassName", "trigger", "onAddOption", "addNewOption", "_a", "open", "setOpen", "internalValue", "setInternalValue", "searchValue", "setSearchValue", "isControlled", "value", "handleValueChange", "newValue", "handleSearchChange", "newSearchValue", "handleAddNew", "showAddNew", "Popover", "PopoverTrigger", "Button", "cn", "item", "ChevronsUpDownIcon", "PopoverContent", "Command", "CommandInput", "CommandList", "CommandEmpty", "CommandGroup", "selected", "CommandItem", "currentValue", "CheckIcon"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as b}from"./chunk-WIFBPNRH.js";import*as i from"react";import{jsx as c,jsxs as G}from"react/jsx-runtime";var $=({fillRatio:t,size:d,gradientId:m,onPositionHover:f,onClick:l,disabled:n,animated:o})=>{let v=r=>{let h=r.currentTarget.getBoundingClientRect();return Math.max(0,Math.min(1,(r.clientX-h.left)/h.width))},M=r=>{n||!f||f(v(r))},V=r=>{n||!l||l(v(r))},p=t>0&&t<1;return G("svg",{width:d,height:d,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:b("shrink-0",o&&"transition-transform duration-200",!n&&o&&"hover:scale-110",!n&&"cursor-pointer",n&&"cursor-default"),onMouseMove:M,onClick:V,children:[p&&c("defs",{children:G("linearGradient",{id:m,children:[c("stop",{offset:`${t*100}%`,stopColor:"hsl(var(--rating-filled, 48 100% 50%))"}),c("stop",{offset:`${t*100}%`,stopColor:"hsl(var(--rating-empty, 0 0% 95%))"})]})}),c("path",{d:"M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z",fill:p?`url(#${m})`:t>=1?"hsl(var(--rating-filled, 48 100% 50%))":"hsl(var(--rating-empty, 0 0% 95%))",className:b(o&&"transition-all duration-200",!n&&o&&t>0&&"drop-shadow-sm")})]})},x=i.forwardRef(({value:t,defaultValue:d=0,max:m=5,size:f=24,onChange:l,increment:n=.5,disabled:o=!1,readOnly:v=!1,className:M},V)=>{let p=i.useId(),[r,h]=i.useState(d),[L,R]=i.useState(null),w=t!==void 0,S=w?t:r,E=L!==null?L:S,a=!o&&!v,y=(s,e)=>{let u=s+e,P=+(Math.ceil(+(u/n).toFixed(10))*n).toFixed(10);return Math.min(P,s+1)},k=(s,e)=>{if(!a)return;let u=y(s,e);w||h(u),l==null||l(u)},C=(s,e)=>{a&&R(y(s,e))},N=()=>{a&&R(null)};return c("div",{ref:V,className:b("inline-flex items-center gap-0.5",o&&"opacity-50",M),role:"radiogroup","aria-label":"Rating","aria-valuenow":S,"aria-valuemin":0,"aria-valuemax":m,onMouseLeave:a?N:void 0,children:Array.from({length:m},(s,e)=>{let u=Math.max(0,Math.min(1,E-e));return c($,{fillRatio:u,size:f,gradientId:`${p}-star-${e}`,onPositionHover:a?g=>C(e,g):void 0,onClick:a?g=>k(e,g):void 0,disabled:!a,animated:a},e)})})});x.displayName="Rating";export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RHVVPPZE.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/rating/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport type RatingProps = {\n /** Current rating value (controlled mode) */\n value?: number;\n /** Default rating value for uncontrolled mode */\n defaultValue?: number;\n /** Maximum number of stars */\n max?: number;\n /** Size of the stars in pixels */\n size?: number;\n /** Callback when rating changes */\n onChange?: (value: number) => void;\n /** Selection increment (e.g. 0.5 for half-star, 0.25 for quarter-star, 1 for whole stars only) */\n increment?: number;\n /** Disable interaction (preview mode) */\n disabled?: boolean;\n /** Read-only mode (like disabled but without opacity change) */\n readOnly?: boolean;\n /** Additional class name */\n className?: string;\n};\n\nconst Star = ({\n fillRatio,\n size,\n gradientId,\n onPositionHover,\n onClick,\n disabled,\n animated,\n}: {\n /** Star fill fraction: 0 = empty, 1 = full, 0.5 = half, etc. */\n fillRatio: number;\n size: number;\n gradientId: string;\n onPositionHover?: (fraction: number) => void;\n onClick?: (fraction: number) => void;\n disabled: boolean;\n animated: boolean;\n}) => {\n const getFraction = (e: React.MouseEvent<SVGSVGElement>) => {\n const rect = e.currentTarget.getBoundingClientRect();\n return Math.max(0, Math.min(1, (e.clientX - rect.left) / rect.width));\n };\n\n const handleMouseMove = (e: React.MouseEvent<SVGSVGElement>) => {\n if (disabled || !onPositionHover) return;\n onPositionHover(getFraction(e));\n };\n\n const handleClick = (e: React.MouseEvent<SVGSVGElement>) => {\n if (disabled || !onClick) return;\n onClick(getFraction(e));\n };\n\n const isPartial = fillRatio > 0 && fillRatio < 1;\n\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={cn(\n \"shrink-0\",\n animated && \"transition-transform duration-200\",\n !disabled && animated && \"hover:scale-110\",\n !disabled && \"cursor-pointer\",\n disabled && \"cursor-default\",\n )}\n onMouseMove={handleMouseMove}\n onClick={handleClick}\n >\n {isPartial && (\n <defs>\n <linearGradient id={gradientId}>\n <stop\n offset={`${fillRatio * 100}%`}\n stopColor=\"hsl(var(--rating-filled, 48 100% 50%))\"\n />\n <stop\n offset={`${fillRatio * 100}%`}\n stopColor=\"hsl(var(--rating-empty, 0 0% 95%))\"\n />\n </linearGradient>\n </defs>\n )}\n <path\n d=\"M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z\"\n fill={\n isPartial\n ? `url(#${gradientId})`\n : fillRatio >= 1\n ? \"hsl(var(--rating-filled, 48 100% 50%))\"\n : \"hsl(var(--rating-empty, 0 0% 95%))\"\n }\n className={cn(\n animated && \"transition-all duration-200\",\n !disabled && animated && fillRatio > 0 && \"drop-shadow-sm\",\n )}\n />\n </svg>\n );\n};\n\nconst Rating = React.forwardRef<HTMLDivElement, RatingProps>(\n (\n {\n value: controlledValue,\n defaultValue = 0,\n max = 5,\n size = 24,\n onChange,\n increment = 0.5,\n disabled = false,\n readOnly = false,\n className,\n },\n ref,\n ) => {\n const uid = React.useId();\n const [internalValue, setInternalValue] = React.useState(defaultValue);\n const [hoverValue, setHoverValue] = React.useState<number | null>(null);\n\n const isControlled = controlledValue !== undefined;\n const actualValue = isControlled ? controlledValue : internalValue;\n // Always render the raw value as-is; snapping only applies when the user picks a value\n const displayValue = hoverValue !== null ? hoverValue : actualValue;\n\n const isInteractive = !disabled && !readOnly;\n\n /** Converts a cursor position within a star (fraction 0-1) to a value snapped to the nearest increment. */\n const getSnappedValue = (starIndex: number, fraction: number) => {\n const raw = starIndex + fraction;\n const steps = Math.ceil(+(raw / increment).toFixed(10));\n const snapped = +(steps * increment).toFixed(10);\n return Math.min(snapped, starIndex + 1);\n };\n\n const handleStarClick = (index: number, fraction: number) => {\n if (!isInteractive) return;\n const newValue = getSnappedValue(index, fraction);\n if (!isControlled) setInternalValue(newValue);\n onChange?.(newValue);\n };\n\n const handlePositionHover = (index: number, fraction: number) => {\n if (!isInteractive) return;\n setHoverValue(getSnappedValue(index, fraction));\n };\n\n const handleMouseLeave = () => {\n if (!isInteractive) return;\n setHoverValue(null);\n };\n\n return (\n <div\n ref={ref}\n className={cn(\n \"inline-flex items-center gap-0.5\",\n disabled && \"opacity-50\",\n className,\n )}\n role=\"radiogroup\"\n aria-label=\"Rating\"\n aria-valuenow={actualValue}\n aria-valuemin={0}\n aria-valuemax={max}\n onMouseLeave={isInteractive ? handleMouseLeave : undefined}\n >\n {Array.from({ length: max }, (_, index) => {\n // Fill fraction for this star, clamped between 0 and 1\n const fillRatio = Math.max(0, Math.min(1, displayValue - index));\n\n return (\n <Star\n key={index}\n fillRatio={fillRatio}\n size={size}\n gradientId={`${uid}-star-${index}`}\n onPositionHover={\n isInteractive\n ? (fraction) => handlePositionHover(index, fraction)\n : undefined\n }\n onClick={\n isInteractive\n ? (fraction) => handleStarClick(index, fraction)\n : undefined\n }\n disabled={!isInteractive}\n animated={isInteractive}\n />\n );\n })}\n </div>\n );\n },\n);\n\nRating.displayName = \"Rating\";\n\nexport { Rating };\n"],
|
|
5
|
+
"mappings": "wCAAA,UAAYA,MAAW,QA8Eb,OACE,OAAAC,EADF,QAAAC,MAAA,oBAtDV,IAAMC,EAAO,CAAC,CACZ,UAAAC,EACA,KAAAC,EACA,WAAAC,EACA,gBAAAC,EACA,QAAAC,EACA,SAAAC,EACA,SAAAC,CACF,IASM,CACJ,IAAMC,EAAeC,GAAuC,CAC1D,IAAMC,EAAOD,EAAE,cAA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": ["React", "jsx", "jsxs", "Star", "fillRatio", "size", "gradientId", "onPositionHover", "onClick", "disabled", "animated", "getFraction", "e", "rect", "handleMouseMove", "handleClick", "isPartial", "cn", "Rating", "controlledValue", "defaultValue", "max", "onChange", "increment", "readOnly", "className", "ref", "uid", "internalValue", "setInternalValue", "hoverValue", "setHoverValue", "isControlled", "actualValue", "displayValue", "isInteractive", "getSnappedValue", "starIndex", "fraction", "raw", "snapped", "handleStarClick", "index", "newValue", "handlePositionHover", "handleMouseLeave", "_"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-WIFBPNRH.js";import{a as t,c as e}from"./chunk-WHECA25N.js";import*as i from"react";import{Separator as p}from"radix-ui";import{jsx as c}from"react/jsx-runtime";var s=i.forwardRef((n,l)=>{var r=n,{className:m,orientation:o="horizontal",decorative:f=!0}=r,R=e(r,["className","orientation","decorative"]);return c(p.Root,t({ref:l,decorative:f,orientation:o,className:a("shrink-0 bg-border",o==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",m)},R))});s.displayName=p.Root.displayName;export{s as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RRDBPO2I.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/separator/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from \"react\";\nimport { Separator as SeparatorPrimitive } from \"radix-ui\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(\n (\n { className, orientation = \"horizontal\", decorative = true, ...props },\n ref,\n ) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className,\n )}\n {...props}\n />\n ),\n);\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n"],
|
|
5
|
+
"mappings": "kFAAA,UAAYA,MAAW,QACvB,OAAS,aAAaC,MAA0B,WAY5C,cAAAC,MAAA,oBARJ,IAAMC,EAAkB,aAItB,CACEC,EACAC,IACA,CAFA,IAAAC,EAAAF,EAAE,WAAAG,EAAW,YAAAC,EAAc,aAAc,WAAAC,EAAa,EAV1D,EAUIH,EAA+DI,EAAAC,EAA/DL,EAA+D,CAA7D,YAAW,cAA4B,eAGzC,OAAAJ,EAACU,EAAmB,KAAnBC,EAAA,CACC,IAAKR,EACL,WAAYI,EACZ,YAAaD,EACb,UAAWM,EACT,qBACAN,IAAgB,aAAe,iBAAmB,iBAClDD,CACF,GACIG,EACN,EAEJ,EACAP,EAAU,YAAcS,EAAmB,KAAK",
|
|
6
|
+
"names": ["React", "SeparatorPrimitive", "jsx", "Separator", "_a", "ref", "_b", "className", "orientation", "decorative", "props", "__objRest", "SeparatorPrimitive", "__spreadValues", "cn"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b}from"./chunk-BF3VTYEM.js";import{a as f}from"./chunk-WIFBPNRH.js";import{a as u,b as v,c as C}from"./chunk-WHECA25N.js";import*as t from"react";import g from"embla-carousel-react";import{ChevronLeft as V,ChevronRight as D}from"lucide-react";import{cva as T}from"class-variance-authority";import{jsx as i,jsxs as E}from"react/jsx-runtime";var h=t.createContext(null);function y(){let r=t.useContext(h);if(!r)throw new Error("useCarousel must be used within a <Carousel />");return r}function L(P){var p=P,{orientation:r="horizontal",opts:a,setApi:s,plugins:l,className:n,children:m}=p,c=C(p,["orientation","opts","setApi","plugins","className","children"]);let[d,e]=g(v(u({},a),{axis:r==="horizontal"?"x":"y"}),l),N=t.useCallback(o=>e?(e.on("reInit",o),e.on("select",o),()=>{e.off("reInit",o),e.off("select",o)}):()=>{},[e]),k=t.useSyncExternalStore(N,()=>{var o;return(o=e==null?void 0:e.canScrollPrev())!=null?o:!1},()=>!1),w=t.useSyncExternalStore(N,()=>{var o;return(o=e==null?void 0:e.canScrollNext())!=null?o:!1},()=>!1),x=t.useCallback(()=>{e==null||e.scrollPrev()},[e]),R=t.useCallback(()=>{e==null||e.scrollNext()},[e]),S=t.useCallback(o=>{o.key==="ArrowLeft"?(o.preventDefault(),x()):o.key==="ArrowRight"&&(o.preventDefault(),R())},[x,R]);return t.useEffect(()=>{!e||!s||s(e)},[e,s]),i(h.Provider,{value:{carouselRef:d,api:e,opts:a,orientation:r||((a==null?void 0:a.axis)==="y"?"vertical":"horizontal"),scrollPrev:x,scrollNext:R,canScrollPrev:k,canScrollNext:w},children:i("div",v(u({onKeyDownCapture:S,className:f("relative",n),role:"region","aria-roledescription":"carousel","data-slot":"carousel"},c),{children:m}))})}function O(s){var l=s,{className:r}=l,a=C(l,["className"]);let{carouselRef:n,orientation:m}=y();return i("div",{ref:n,className:"overflow-hidden","data-slot":"carousel-content",children:i("div",u({className:f("flex",m==="horizontal"?"-ml-4":"-mt-4 flex-col",r)},a))})}function H(s){var l=s,{className:r}=l,a=C(l,["className"]);let{orientation:n}=y();return i("div",u({role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:f("min-w-0 shrink-0 grow-0 basis-full",n==="horizontal"?"pl-4":"pt-4",r)},a))}var z=T("size-9 rounded-full",{variants:{placement:{inset:"absolute",inline:"relative"},orientation:{horizontal:"",vertical:""},side:{prev:"",next:""}},compoundVariants:[{placement:"inset",orientation:"horizontal",side:"prev",class:"-left-12 top-1/2 -translate-y-1/2"},{placement:"inset",orientation:"horizontal",side:"next",class:"-right-12 top-1/2 -translate-y-1/2"},{placement:"inset",orientation:"vertical",side:"prev",class:"-top-12 left-1/2 -translate-x-1/2 rotate-90"},{placement:"inset",orientation:"vertical",side:"next",class:"-bottom-12 left-1/2 -translate-x-1/2 rotate-90"}],defaultVariants:{placement:"inset",orientation:"horizontal",side:"prev"}});function M(m){var c=m,{className:r,variant:a="outline",size:s="icon",placement:l="inset"}=c,n=C(c,["className","variant","size","placement"]);let{orientation:P,scrollPrev:p,canScrollPrev:d}=y();return E(b,v(u({"data-slot":"carousel-previous",variant:a,size:s,className:f(z({placement:l,orientation:P,side:"prev"}),r),disabled:!d,onClick:p},n),{children:[i(V,{}),i("span",{className:"sr-only",children:"Previous slide"})]}))}function q(m){var c=m,{className:r,variant:a="outline",size:s="icon",placement:l="inset"}=c,n=C(c,["className","variant","size","placement"]);let{orientation:P,scrollNext:p,canScrollNext:d}=y();return E(b,v(u({"data-slot":"carousel-next",variant:a,size:s,className:f(z({placement:l,orientation:P,side:"next"}),r),disabled:!d,onClick:p},n),{children:[i(D,{}),i("span",{className:"sr-only",children:"Next slide"})]}))}export{L as a,O as b,H as c,z as d,M as e,q as f};
|
|
2
|
+
//# sourceMappingURL=chunk-S2I5LIDP.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/carousel/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from \"react\";\nimport useEmblaCarousel, {\n type UseEmblaCarouselType,\n} from \"embla-carousel-react\";\nimport { ChevronLeft, ChevronRight } from \"lucide-react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/button\";\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: \"horizontal\" | \"vertical\";\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error(\"useCarousel must be used within a <Carousel />\");\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = \"horizontal\",\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n },\n plugins,\n );\n /**\n * Deviates from upstream shadcn, which mirrors Embla's scroll state into `useState` from an\n * effect \u2014 `react-hooks/set-state-in-effect` rejects that, and the initial read has to happen\n * synchronously or both arrows render disabled until the first `select`. Embla already is an\n * external store: `on`/`off` is the subscription and `canScroll*()` is the snapshot.\n */\n const subscribe = React.useCallback(\n (onStoreChange: () => void) => {\n if (!api) return () => undefined;\n api.on(\"reInit\", onStoreChange);\n api.on(\"select\", onStoreChange);\n\n return () => {\n api.off(\"reInit\", onStoreChange);\n api.off(\"select\", onStoreChange);\n };\n },\n [api],\n );\n\n const canScrollPrev = React.useSyncExternalStore(\n subscribe,\n () => api?.canScrollPrev() ?? false,\n () => false,\n );\n\n const canScrollNext = React.useSyncExternalStore(\n subscribe,\n () => api?.canScrollNext() ?? false,\n () => false,\n );\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === \"ArrowRight\") {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) return;\n setApi(api);\n }, [api, setApi]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api,\n opts,\n orientation:\n orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n onKeyDownCapture={handleKeyDown}\n className={cn(\"relative\", className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<\"div\">) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div\n ref={carouselRef}\n className=\"overflow-hidden\"\n data-slot=\"carousel-content\"\n >\n <div\n className={cn(\n \"flex\",\n orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n className,\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const { orientation } = useCarousel();\n\n return (\n <div\n role=\"group\"\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn(\n \"min-w-0 shrink-0 grow-0 basis-full\",\n orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * LawnGuru addition to the upstream shadcn component \u2014 re-pulling `shadcn add carousel` will\n * drop it. `inset` is the upstream behaviour: the control floats outside the track's edge, which\n * only works when the carousel owns the surrounding space. `inline` takes the control out of\n * absolute positioning so it can be placed in a section header, toolbar, or any custom slot.\n */\nconst carouselControlVariants = cva(\"size-9 rounded-full\", {\n variants: {\n placement: {\n inset: \"absolute\",\n inline: \"relative\",\n },\n orientation: {\n horizontal: \"\",\n vertical: \"\",\n },\n side: {\n prev: \"\",\n next: \"\",\n },\n },\n compoundVariants: [\n {\n placement: \"inset\",\n orientation: \"horizontal\",\n side: \"prev\",\n class: \"-left-12 top-1/2 -translate-y-1/2\",\n },\n {\n placement: \"inset\",\n orientation: \"horizontal\",\n side: \"next\",\n class: \"-right-12 top-1/2 -translate-y-1/2\",\n },\n {\n placement: \"inset\",\n orientation: \"vertical\",\n side: \"prev\",\n class: \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n },\n {\n placement: \"inset\",\n orientation: \"vertical\",\n side: \"next\",\n class: \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n },\n ],\n defaultVariants: {\n placement: \"inset\",\n orientation: \"horizontal\",\n side: \"prev\",\n },\n});\n\ntype CarouselControlProps = React.ComponentProps<typeof Button> &\n Pick<VariantProps<typeof carouselControlVariants>, \"placement\">;\n\nfunction CarouselPrevious({\n className,\n variant = \"outline\",\n size = \"icon\",\n placement = \"inset\",\n ...props\n}: CarouselControlProps) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n carouselControlVariants({ placement, orientation, side: \"prev\" }),\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ChevronLeft />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = \"outline\",\n size = \"icon\",\n placement = \"inset\",\n ...props\n}: CarouselControlProps) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n carouselControlVariants({ placement, orientation, side: \"next\" }),\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ChevronRight />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n carouselControlVariants,\n};\n"],
|
|
5
|
+
"mappings": "iIAAA,UAAYA,MAAW,QACvB,OAAOC,MAEA,uBACP,OAAS,eAAAC,EAAa,gBAAAC,MAAoB,eAC1C,OAAS,OAAAC,MAA8B,2BA8HjC,cAAAC,EAwHF,QAAAC,MAxHE,oBApGN,IAAMC,EAAwB,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C,YAAU,gBACV,QAASe,EACT,KAAMC,EACN,UAAWP,EACTG,EAAwB,CAAE,UAAAK,EAAW,YAAA7B,EAAa,KAAM,MAAO,CAAC,EAChEI,CACF,EACA,SAAU,CAACY,EACX,QAASE,GACLZ,GAVL,CAYC,UAAAd,EAACyC,EAAA,EAAa,EACdzC,EAAC,QAAK,UAAU,UAAU,sBAAU,IACtC,CAEJ",
|
|
6
|
+
"names": ["React", "useEmblaCarousel", "ChevronLeft", "ChevronRight", "cva", "jsx", "jsxs", "CarouselContext", "useCarousel", "context", "Carousel", "_a", "_b", "orientation", "opts", "setApi", "plugins", "className", "children", "props", "__objRest", "carouselRef", "api", "useEmblaCarousel", "__spreadProps", "__spreadValues", "subscribe", "onStoreChange", "canScrollPrev", "canScrollNext", "scrollPrev", "scrollNext", "handleKeyDown", "event", "cn", "CarouselContent", "CarouselItem", "carouselControlVariants", "cva", "CarouselPrevious", "variant", "size", "placement", "Button", "ChevronLeft", "CarouselNext", "ChevronRight"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as d}from"./chunk-WIFBPNRH.js";import{a as n,b as p,c as l}from"./chunk-WHECA25N.js";import*as m from"react";import{Dialog as e}from"radix-ui";import{cva as y}from"class-variance-authority";import{X as R}from"lucide-react";import{jsx as r,jsxs as c}from"react/jsx-runtime";var E=e.Root,H=e.Trigger,O=e.Close,u=e.Portal,h=m.forwardRef((o,i)=>{var s=o,{className:t}=s,a=l(s,["className"]);return r(e.Overlay,p(n({className:d("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t)},a),{ref:i}))});h.displayName=e.Overlay.displayName;var S=y("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),v=m.forwardRef((N,s)=>{var f=N,{side:t="right",className:a,children:i}=f,o=l(f,["side","className","children"]);return c(u,{children:[r(h,{}),c(e.Content,p(n({ref:s,className:d(S({side:t}),a)},o),{children:[c(e.Close,{className:"absolute left-6 top-7 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[r(R,{className:"h-4 w-4"}),r("span",{className:"sr-only",children:"Close"})]}),i]}))]})});v.displayName=e.Content.displayName;var g=i=>{var o=i,{className:t}=o,a=l(o,["className"]);return r("div",n({className:d("flex flex-col space-y-2 text-center sm:text-left",t)},a))};g.displayName="SheetHeader";var P=i=>{var o=i,{className:t}=o,a=l(o,["className"]);return r("div",n({className:d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t)},a))};P.displayName="SheetFooter";var b=m.forwardRef((o,i)=>{var s=o,{className:t}=s,a=l(s,["className"]);return r(e.Title,n({ref:i,className:d("text-center text-lg font-semibold text-foreground",t)},a))});b.displayName=e.Title.displayName;var x=m.forwardRef((o,i)=>{var s=o,{className:t}=s,a=l(s,["className"]);return r(e.Description,n({ref:i,className:d("text-sm text-muted-foreground",t)},a))});x.displayName=e.Description.displayName;export{E as a,H as b,O as c,u as d,h as e,v as f,g,P as h,b as i,x as j};
|
|
2
|
+
//# sourceMappingURL=chunk-SJZ34LYG.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/sheet/index.tsx"],
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport * as React from \"react\";\nimport { Dialog as SheetPrimitive } from \"radix-ui\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Sheet = SheetPrimitive.Root;\n\nconst SheetTrigger = SheetPrimitive.Trigger;\n\nconst SheetClose = SheetPrimitive.Close;\n\nconst SheetPortal = SheetPrimitive.Portal;\n\nconst SheetOverlay = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n ref={ref}\n />\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n },\n);\n\ntype SheetContentProps = {} & React.ComponentPropsWithoutRef<\n typeof SheetPrimitive.Content\n> &\n VariantProps<typeof sheetVariants>;\n\nconst SheetContent = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n ref={ref}\n className={cn(sheetVariants({ side }), className)}\n {...props}\n >\n <SheetPrimitive.Close className=\"absolute left-6 top-7 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n {children}\n </SheetPrimitive.Content>\n </SheetPortal>\n));\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\nconst SheetHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nSheetHeader.displayName = \"SheetHeader\";\n\nconst SheetFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nSheetFooter.displayName = \"SheetFooter\";\n\nconst SheetTitle = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title\n ref={ref}\n className={cn(\n \"text-center text-lg font-semibold text-foreground\",\n className,\n )}\n {...props}\n />\n));\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\nconst SheetDescription = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay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,UAAU,UAAU,iBAAK,GACjC,EACCqB,IACH,GACF,EACD,EACDF,EAAa,YAAchB,EAAe,QAAQ,YAElD,IAAMoB,EAAef,GAGoB,CAHpB,IAAAE,EAAAF,EACnB,WAAAG,CA9EF,EA6EqBD,EAEhBE,EAAAC,EAFgBH,EAEhB,CADH,cAGA,OAAAV,EAAC,MAAAe,EAAA,CACC,UAAWC,EACT,mDACAL,CACF,GACIC,EACN,GAEFW,EAAY,YAAc,cAE1B,IAAMC,EAAehB,GAGoB,CAHpB,IAAAE,EAAAF,EACnB,WAAAG,CA5FF,EA2FqBD,EAEhBE,EAAAC,EAFgBH,EAEhB,CADH,cAGA,OAAAV,EAAC,MAAAe,EAAA,CACC,UAAWC,EACT,gEACAL,CACF,GACIC,EACN,GAEFY,EAAY,YAAc,cAE1B,IAAMC,EAAmB,aAGvB,CAACjB,EAAyBC,IAAK,CAA9B,IAAAC,EAAAF,EAAE,WAAAG,CA5GL,EA4GGD,EAAgBE,EAAAC,EAAhBH,EAAgB,CAAd,cACH,OAAAV,EAACG,EAAe,MAAfY,EAAA,CACC,IAAKN,EACL,UAAWO,EACT,oDACAL,CACF,GACIC,EACN,EACD,EACDa,EAAW,YAActB,EAAe,MAAM,YAE9C,IAAMuB,EAAyB,aAG7B,CAAClB,EAAyBC,IAAK,CAA9B,IAAAC,EAAAF,EAAE,WAAAG,CA3HL,EA2HGD,EAAgBE,EAAAC,EAAhBH,EAAgB,CAAd,cACH,OAAAV,EAACG,EAAe,YAAfY,EAAA,CACC,IAAKN,EACL,UAAWO,EAAG,gCAAiCL,CAAS,GACpDC,EACN,EACD,EACDc,EAAiB,YAAcvB,EAAe,YAAY",
|
|
6
|
+
"names": ["React", "SheetPrimitive", "cva", "X", "jsx", "jsxs", "Sheet", "SheetPrimitive", "SheetTrigger", "SheetClose", "SheetPortal", "SheetOverlay", "_a", "ref", "_b", "className", "props", "__objRest", "__spreadProps", "__spreadValues", "cn", "sheetVariants", "cva", "SheetContent", "side", "children", "X", "SheetHeader", "SheetFooter", "SheetTitle", "SheetDescription"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as d}from"./chunk-WIFBPNRH.js";import{a as b,b as h,c as s}from"./chunk-WHECA25N.js";import*as g from"react";import{Slider as t}from"radix-ui";import{cva as y}from"class-variance-authority";import{jsx as r,jsxs as I}from"react/jsx-runtime";var C=y("absolute select-none data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full",{variants:{variant:{default:"bg-primary","primary-dark":"bg-primary-dark"}},defaultVariants:{variant:"default"}}),E=y("border",{variants:{variant:{default:"border-ring ring-ring/50","primary-dark":"border-primary-dark ring-primary-dark/50"}},defaultVariants:{variant:"default"}});function D(O){var p=O,{className:w,defaultValue:i,value:n,min:c=0,max:u=100,hideEdgeThumbs:V=!1,readOnly:k=!1,variant:m,showValues:R=!1,formatValue:f}=p,P=s(p,["className","defaultValue","value","min","max","hideEdgeThumbs","readOnly","variant","showValues","formatValue"]);let S=Array.isArray(i)?i:[c,u],[T,A]=g.useState(S),e=Array.isArray(n)?n:T,v=P,{onValueChange:o}=v,N=s(v,["onValueChange"]),z=l=>{A(l),o==null||o(l)};return I(t.Root,h(b({"data-slot":"slider",defaultValue:i,value:n,min:c,max:u,className:d("relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[disabled]:opacity-50",w,k&&"pointer-events-none"),onValueChange:z},N),{children:[r(t.Track,{"data-slot":"slider-track",className:"relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1 data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1",children:r(t.Range,{"data-slot":"slider-range",className:C({variant:m})})}),Array.from({length:e.length},(l,a)=>{let x=a===0||a===e.length-1;return r(t.Thumb,{"data-slot":"slider-thumb",className:d("hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 relative block size-3 shrink-0 select-none rounded-full bg-white transition-[color,box-shadow] after:absolute after:-inset-2 disabled:pointer-events-none disabled:opacity-50",E({variant:m}),V&&x&&"pointer-events-none opacity-0"),children:R&&r("span",{className:"pointer-events-none absolute -top-6 left-1/2 -translate-x-1/2 whitespace-nowrap text-xs",children:f?f(e[a]):e[a]})},a)})]}))}export{D as a};
|
|
2
|
+
//# sourceMappingURL=chunk-T73JL4BL.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/slider/index.tsx"],
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport * as React from \"react\";\nimport { Slider as SliderPrimitive } from \"radix-ui\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst sliderRangeVariants = cva(\n \"absolute select-none data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full\",\n {\n variants: {\n variant: {\n default: \"bg-primary\",\n \"primary-dark\": \"bg-primary-dark\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nconst sliderThumbVariants = cva(\"border\", {\n variants: {\n variant: {\n default: \"border-ring ring-ring/50\",\n \"primary-dark\": \"border-primary-dark ring-primary-dark/50\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n hideEdgeThumbs = false,\n readOnly = false,\n variant,\n showValues = false,\n formatValue,\n ...props\n}: React.ComponentProps<typeof SliderPrimitive.Root> &\n VariantProps<typeof sliderRangeVariants> & {\n readOnly?: boolean;\n hideEdgeThumbs?: boolean;\n showValues?: boolean;\n formatValue?: (value: number) => string;\n }) {\n const initialValues = Array.isArray(defaultValue) ? defaultValue : [min, max];\n\n const [internalValues, setInternalValues] =\n React.useState<number[]>(initialValues);\n\n const displayValues = Array.isArray(value) ? value : internalValues;\n\n const { onValueChange, ...rest } = props;\n\n const handleValueChange = (vals: number[]) => {\n setInternalValues(vals);\n onValueChange?.(vals);\n };\n\n return (\n <SliderPrimitive.Root\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n \"relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col data-[disabled]:opacity-50\",\n className,\n readOnly && \"pointer-events-none\",\n )}\n onValueChange={handleValueChange}\n {...rest}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className=\"relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1 data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1\"\n >\n <SliderPrimitive.Range\n data-slot=\"slider-range\"\n className={sliderRangeVariants({ variant })}\n />\n </SliderPrimitive.Track>\n {Array.from({ length: displayValues.length }, (_, index) => {\n const isEdge = index === 0 || index === displayValues.length - 1;\n return (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={index}\n className={cn(\n \"hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 relative block size-3 shrink-0 select-none rounded-full bg-white transition-[color,box-shadow] after:absolute after:-inset-2 disabled:pointer-events-none disabled:opacity-50\",\n sliderThumbVariants({ variant }),\n hideEdgeThumbs && isEdge && \"pointer-events-none opacity-0\",\n )}\n >\n {showValues && (\n <span className=\"pointer-events-none absolute -top-6 left-1/2 -translate-x-1/2 whitespace-nowrap text-xs\">\n {formatValue\n ? formatValue(displayValues[index])\n : displayValues[index]}\n </span>\n )}\n </SliderPrimitive.Thumb>\n );\n })}\n </SliderPrimitive.Root>\n );\n}\n\nexport { Slider };\n"],
|
|
5
|
+
"mappings": "8FAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,WAC1C,OAAS,OAAAC,MAA8B,2BAiEnC,OAkBI,OAAAC,EAlBJ,QAAAC,MAAA,oBA7DJ,IAAMC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AK,CAAE,OAAQQ,EAAc,MAAO,EAAG,CAACS,EAAGC,IAAU,CAC1D,IAAMC,EAASD,IAAU,GAAKA,IAAUV,EAAc,OAAS,EAC/D,OACEvB,EAAC4B,EAAgB,MAAhB,CACC,YAAU,eAEV,UAAWG,EACT,6PACA3B,EAAoB,CAAE,QAAAW,CAAQ,CAAC,EAC/BF,GAAkBqB,GAAU,+BAC9B,EAEC,SAAAlB,GACChB,EAAC,QAAK,UAAU,0FACb,SAAAiB,EACGA,EAAYM,EAAcU,CAAK,CAAC,EAChCV,EAAcU,CAAK,EACzB,GAZGA,CAcP,CAEJ,CAAC,IACH,CAEJ",
|
|
6
|
+
"names": ["React", "SliderPrimitive", "cva", "jsx", "jsxs", "sliderRangeVariants", "cva", "sliderThumbVariants", "Slider", "_a", "_b", "className", "defaultValue", "value", "min", "max", "hideEdgeThumbs", "readOnly", "variant", "showValues", "formatValue", "props", "__objRest", "initialValues", "internalValues", "setInternalValues", "displayValues", "onValueChange", "rest", "handleValueChange", "vals", "SliderPrimitive", "__spreadProps", "__spreadValues", "cn", "_", "index", "isEdge"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as d}from"./chunk-WIFBPNRH.js";import{a as p,b as n,c as l}from"./chunk-WHECA25N.js";import*as a from"react";import{RadioGroup as s}from"radix-ui";import{DotIcon as b}from"lucide-react";import{jsx as o,jsxs as f}from"react/jsx-runtime";var G=a.forwardRef((m,e)=>{var t=m,{className:i}=t,r=l(t,["className"]);return o(s.Root,n(p({className:d("flex flex-col divide-y *:py-3 first:*:pt-0 last:*:pb-0 [&_label]:text-lg [&_label]:md:text-base",i)},r),{ref:e}))});G.displayName=s.Root.displayName;var u=a.forwardRef((m,e)=>{var t=m,{className:i}=t,r=l(t,["className"]);return o(s.Item,n(p({ref:e,className:d("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:border-muted disabled:text-muted data-[state='checked']:bg-primary",i)},r),{children:o(s.Indicator,{className:"flex items-center justify-center",children:o(b,{className:"h-3.5 w-3.5 scale-150 text-background"})})}))});u.displayName=s.Item.displayName;var x=a.forwardRef((v,y)=>{var R=v,{className:i,label:r,description:e,disabled:m}=R,t=l(R,["className","label","description","disabled"]);let c=a.useId();return f("div",{className:d("flex space-x-2",{"items-center":!e,"first:*:translate-y-1":!!e},i),children:[o(u,p({ref:y,id:t.id||c,disabled:m},t)),f("div",{className:"grid gap-1.5 leading-none",children:[o("label",{htmlFor:t.id||c,className:d("text-sm leading-none",{"font-medium":!!e,"cursor-not-allowed opacity-70":!!m}),children:r}),e&&o("p",{className:"text-xs text-muted-foreground",children:e})]})]})});x.displayName="RadioGroupOption";export{G as a,u as b,x as c};
|
|
2
|
+
//# sourceMappingURL=chunk-UUB5URTQ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/radio-group/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from \"react\";\nimport { RadioGroup as RadioGroupPrimitive } from \"radix-ui\";\nimport { cn } from \"@/lib/utils\";\nimport { DotIcon } from \"lucide-react\";\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn(\n \"flex flex-col divide-y *:py-3 first:*:pt-0 last:*:pb-0 [&_label]:text-lg [&_label]:md:text-base\",\n className,\n )}\n {...props}\n ref={ref}\n />\n );\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:border-muted disabled:text-muted data-[state='checked']:bg-primary\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <DotIcon className=\"h-3.5 w-3.5 scale-150 text-background\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport type RadioGroupOptionProps = {\n label: string;\n description?: string;\n} & React.ComponentPropsWithoutRef<typeof RadioGroupItem>;\n\nconst RadioGroupOption = React.forwardRef<\n React.ElementRef<typeof RadioGroupItem>,\n RadioGroupOptionProps\n>(({ className, label, description, disabled, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <div\n className={cn(\n \"flex space-x-2\",\n {\n \"items-center\": !description,\n \"first:*:translate-y-1\": !!description,\n },\n className,\n )}\n >\n <RadioGroupItem\n ref={ref}\n id={props.id || id}\n disabled={disabled}\n {...props}\n />\n <div className=\"grid gap-1.5 leading-none\">\n <label\n htmlFor={props.id || id}\n className={cn(\"text-sm leading-none\", {\n \"font-medium\": !!description,\n \"cursor-not-allowed opacity-70\": !!disabled,\n })}\n >\n {label}\n </label>\n {description && (\n <p className=\"text-xs text-muted-foreground\">{description}</p>\n )}\n </div>\n </div>\n );\n});\nRadioGroupOption.displayName = \"RadioGroupOption\";\n\nexport { RadioGroup, RadioGroupOption, RadioGroupItem };\n"],
|
|
5
|
+
"mappings": "8FAAA,UAAYA,MAAW,QACvB,OAAS,cAAcC,MAA2B,WAElD,OAAS,WAAAC,MAAe,eAOpB,cAAAC,EA6DE,QAAAC,MA7DF,oBALJ,IAAMC,EAAmB,aAGvB,CAACC,EAAyBC,IAAQ,CAAjC,IAAAC,EAAAF,EAAE,WAAAG,CARL,EAQGD,EAAgBE,EAAAC,EAAhBH,EAAgB,CAAd,c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
|
|
6
|
+
"names": ["React", "RadioGroupPrimitive", "DotIcon", "jsx", "jsxs", "RadioGroup", "_a", "ref", "_b", "className", "props", "__objRest", "RadioGroupPrimitive", "__spreadProps", "__spreadValues", "cn", "RadioGroupItem", "DotIcon", "RadioGroupOption", "label", "description", "disabled", "id"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as m}from"./chunk-WIFBPNRH.js";import{a as s,b as u,c as p}from"./chunk-WHECA25N.js";import*as c from"react";import{DropdownMenu as e}from"radix-ui";import{Check as w,ChevronRight as R,Circle as b}from"lucide-react";import{jsx as r,jsxs as f}from"react/jsx-runtime";var k=e.Root,T=e.Trigger,E=e.Group,z=e.Portal,W=e.Sub,L=e.RadioGroup,g=c.forwardRef((d,i)=>{var l=d,{className:t,inset:o,children:n}=l,a=p(l,["className","inset","children"]);return f(e.SubTrigger,u(s({ref:i,className:m("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",o&&"pl-8",t)},a),{children:[n,r(R,{className:"ml-auto"})]}))});g.displayName=e.SubTrigger.displayName;var y=c.forwardRef((a,n)=>{var i=a,{className:t}=i,o=p(i,["className"]);return r(e.SubContent,s({ref:n,className:m("z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t)},o))});y.displayName=e.SubContent.displayName;var v=c.forwardRef((i,a)=>{var d=i,{className:t,sideOffset:o=4}=d,n=p(d,["className","sideOffset"]);return r(e.Portal,{children:r(e.Content,s({ref:a,sideOffset:o,className:m("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","origin-[--radix-dropdown-menu-content-transform-origin] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t)},n))})});v.displayName=e.Content.displayName;var M=c.forwardRef((i,a)=>{var d=i,{className:t,inset:o}=d,n=p(d,["className","inset"]);return r(e.Item,s({ref:a,className:m("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",o&&"pl-8",t)},n))});M.displayName=e.Item.displayName;var D=c.forwardRef((d,i)=>{var l=d,{className:t,children:o,checked:n}=l,a=p(l,["className","children","checked"]);return f(e.CheckboxItem,u(s({ref:i,className:m("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n},a),{children:[r("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r(e.ItemIndicator,{children:r(w,{className:"h-4 w-4"})})}),o]}))});D.displayName=e.CheckboxItem.displayName;var h=c.forwardRef((i,a)=>{var d=i,{className:t,children:o}=d,n=p(d,["className","children"]);return f(e.RadioItem,u(s({ref:a,className:m("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t)},n),{children:[r("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r(e.ItemIndicator,{children:r(b,{className:"h-2 w-2 fill-current"})})}),o]}))});h.displayName=e.RadioItem.displayName;var P=c.forwardRef((i,a)=>{var d=i,{className:t,inset:o}=d,n=p(d,["className","inset"]);return r(e.Label,s({ref:a,className:m("px-2 py-1.5 text-sm font-semibold",o&&"pl-8",t)},n))});P.displayName=e.Label.displayName;var x=c.forwardRef((a,n)=>{var i=a,{className:t}=i,o=p(i,["className"]);return r(e.Separator,s({ref:n,className:m("-mx-1 my-1 h-px bg-muted",t)},o))});x.displayName=e.Separator.displayName;var N=n=>{var a=n,{className:t}=a,o=p(a,["className"]);return r("span",s({className:m("ml-auto text-xs tracking-widest opacity-60",t)},o))};N.displayName="DropdownMenuShortcut";export{k as a,T as b,E as c,z as d,W as e,L as f,g,y as h,v as i,M as j,D as k,h as l,P as m,x as n,N as o};
|
|
2
|
+
//# sourceMappingURL=chunk-VIGX5NKJ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/dropdown-menu/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from \"react\";\nimport { DropdownMenu as DropdownMenuPrimitive } from \"radix-ui\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md\",\n \"origin-[--radix-dropdown-menu-content-transform-origin] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n );\n};\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"],
|
|
5
|
+
"mappings": "8FAAA,UAAYA,MAAW,QACvB,OAAS,gBAAgBC,MAA6B,WACtD,OAAS,SAAAC,EAAO,gBAAAC,EAAc,UAAAC,MAAc,eAsB1C,OAUE,OAAAC,EAVF,QAAAC,MAAA,oBAlBF,IAAMC,EAAeC,EAAsB,KAErCC,EAAsBD,EAAsB,QAE5CE,EAAoBF,EAAsB,MAE1CG,EAAqBH,EAAsB,OAE3CI,EAAkBJ,EAAsB,IAExCK,EAAyBL,EAAsB,WAE/CM,EAA+B,aAKnC,CAACC,EAA0CC,IAAK,CAA/C,IAAAC,EAAAF,EAAE,WAAAG,EAAW,MAAAC,EAAO,SAAAC,CAvBvB,EAuBGH,EAAiCI,EAAAC,EAAjCL,EAAiC,CAA/B,YAAW,QAAO,aACrB,OAAAX,EAACE,EAAsB,WAAtBe,EAAAC,EAAA,CACC,IAAKR,EACL,UAAWS,EACT,yMACAN,GAAS,OACTD,CACF,GACIG,GAPL,CASE,UAAAD,EACDf,EAACqB,EAAA,CAAa,UAAU,UAAU,IACpC,EACD,EACDZ,EAAuB,YACrBN,EAAsB,WAAW,YAEnC,IAAMmB,EAA+B,aAGnC,CAACZ,EAAyBC,IAAK,CAA9B,IAAAC,E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,CADH,cAGA,OACEZ,EAAC,OAAAmB,EAAA,CACC,UAAWC,EAAG,6CAA8CP,CAAS,GACjEG,EACN,CAEJ,EACAiB,EAAqB,YAAc",
|
|
6
|
+
"names": ["React", "DropdownMenuPrimitive", "Check", "ChevronRight", "Circle", "jsx", "jsxs", "DropdownMenu", "DropdownMenuPrimitive", "DropdownMenuTrigger", "DropdownMenuGroup", "DropdownMenuPortal", "DropdownMenuSub", "DropdownMenuRadioGroup", "DropdownMenuSubTrigger", "_a", "ref", "_b", "className", "inset", "children", "props", "__objRest", "__spreadProps", "__spreadValues", "cn", "ChevronRight", "DropdownMenuSubContent", "DropdownMenuContent", "sideOffset", "DropdownMenuItem", "DropdownMenuCheckboxItem", "checked", "Check", "DropdownMenuRadioItem", "Circle", "DropdownMenuLabel", "DropdownMenuSeparator", "DropdownMenuShortcut"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var m=Object.create;var g=Object.defineProperty,n=Object.defineProperties,o=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyDescriptors,q=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,r=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var k=a=>{throw TypeError(a)};var i=(a,b,c)=>b in a?g(a,b,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[b]=c,t=(a,b)=>{for(var c in b||(b={}))h.call(b,c)&&i(a,c,b[c]);if(f)for(var c of f(b))j.call(b,c)&&i(a,c,b[c]);return a},u=(a,b)=>n(a,p(b));var v=(a,b)=>{var c={};for(var d in a)h.call(a,d)&&b.indexOf(d)<0&&(c[d]=a[d]);if(a!=null&&f)for(var d of f(a))b.indexOf(d)<0&&j.call(a,d)&&(c[d]=a[d]);return c};var w=(a,b)=>()=>{try{return b||a((b={exports:{}}).exports,b),b.exports}catch(c){throw b=0,c}};var s=(a,b,c,d)=>{if(b&&typeof b=="object"||typeof b=="function")for(let e of q(b))!h.call(a,e)&&e!==c&&g(a,e,{get:()=>b[e],enumerable:!(d=o(b,e))||d.enumerable});return a};var x=(a,b,c)=>(c=a!=null?m(r(a)):{},s(b||!a||!a.__esModule?g(c,"default",{value:a,enumerable:!0}):c,a));var l=(a,b,c)=>b.has(a)||k("Cannot "+c);var y=(a,b,c)=>(l(a,b,"read from private field"),c?c.call(a):b.get(a)),z=(a,b,c)=>b.has(a)?k("Cannot add the same private member more than once"):b instanceof WeakSet?b.add(a):b.set(a,c),A=(a,b,c,d)=>(l(a,b,"write to private field"),d?d.call(a,c):b.set(a,c),c);export{t as a,u as b,v as c,w as d,x as e,y as f,z as g,A as h};
|
|
2
|
+
//# sourceMappingURL=chunk-WHECA25N.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/lib/utils.tsx"],
|
|
4
|
+
"sourcesContent": ["import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,QAAAA,MAA6B,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B",
|
|
6
|
+
"names": ["clsx", "twMerge", "cn", "inputs"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as w}from"./chunk-63IVPQSD.js";import{a as N,b as Q}from"./chunk-BF3VTYEM.js";import{a as u}from"./chunk-WIFBPNRH.js";import{a,b as f,c as r}from"./chunk-WHECA25N.js";import*as x from"react";import{Questionnaire as c}from"@shadcn/react/questionnaire";import{CheckIcon as S,PencilIcon as z}from"lucide-react";import{jsx as i,jsxs as p}from"react/jsx-runtime";var v="[&[hidden]]:hidden";function T(n){var e=n,{className:t}=e,o=r(e,["className"]);return i(c.Root,a({"data-slot":"questionnaire",className:u("flex w-full min-w-0 flex-col gap-4",t)},o))}function D(n){var e=n,{className:t}=e,o=r(e,["className"]);return i("div",a({"data-slot":"questionnaire-card",className:u("flex w-full flex-col gap-5 rounded-xl border bg-background px-6 pb-6 pt-5",t)},o))}function V(n){var e=n,{className:t}=e,o=r(e,["className"]);return i("h2",a({"data-slot":"questionnaire-header",className:u("text-2xl font-bold leading-8 tracking-[-0.01em] text-foreground",t)},o))}function $(n){var e=n,{className:t}=e,o=r(e,["className"]);return i(c.Progress,a({"data-slot":"questionnaire-progress",className:u("min-h-4 w-fit text-xs font-medium tabular-nums text-foreground/[0.74]",t)},o))}function A(n){var e=n,{className:t}=e,o=r(e,["className"]);return i(c.Item,a({"data-slot":"questionnaire-item",className:u("flex min-w-0 flex-col gap-4 border-0 p-0 outline-none",v,t)},o))}function H(n){var e=n,{className:t}=e,o=r(e,["className"]);return i(c.Title,a({"data-slot":"questionnaire-title",className:u("text-pretty p-0 text-base font-medium leading-[22px] text-foreground [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4",t)},o))}function F(n){var e=n,{className:t}=e,o=r(e,["className"]);return i(c.Description,a({"data-slot":"questionnaire-description",className:u("text-pretty text-sm tracking-[0.005em] text-muted-foreground",t)},o))}function M(n){var e=n,{className:t}=e,o=r(e,["className"]);return i(c.Choices,a({"data-slot":"questionnaire-choices",className:u("group/questionnaire-choices grid min-w-0 gap-2",t)},o))}function _(s){var l=s,{children:t,className:o,badge:n}=l,e=r(l,["children","className","badge"]);return p(c.Choice,f(a({"data-slot":"questionnaire-choice",className:u("group/questionnaire-choice relative flex cursor-pointer select-none items-start gap-2.5 rounded-md border border-input bg-background px-[13px] py-[11px] text-start text-sm outline-none transition-colors hover:bg-muted/50","has-[>input:focus-visible]:ring-2 has-[>input:focus-visible]:ring-ring/50","data-[checked]:border-surface-color-brand data-[checked]:bg-surface-color-brand-bland","data-[invalid]:border-destructive","data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",o)},e),{children:[i(c.ChoiceInput,{"data-slot":"questionnaire-choice-input",className:"absolute inset-0 z-10 size-full cursor-pointer opacity-0"}),p("span",{"aria-hidden":"true","data-slot":"questionnaire-choice-indicator",className:"pointer-events-none relative mt-[3px] flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input bg-background group-data-[type=radio]/questionnaire-choice:rounded-full group-data-[checked]/questionnaire-choice:border-surface-color-brand group-data-[checked]/questionnaire-choice:bg-surface-color-brand group-data-[checked]/questionnaire-choice:text-inverted-primary",children:[i("span",{"data-slot":"questionnaire-choice-indicator-dot",className:"hidden size-1.5 rounded-full bg-inverted-primary group-data-[checked]/questionnaire-choice:block group-data-[type=checkbox]/questionnaire-choice:hidden"}),i(S,{"data-slot":"questionnaire-choice-indicator-check",className:"hidden size-3 stroke-[3] group-data-[checked]/questionnaire-choice:block group-data-[type=radio]/questionnaire-choice:hidden"})]}),i(c.ChoiceLabel,{"data-slot":"questionnaire-choice-label",className:"flex min-w-0 flex-1 flex-col gap-0.5 leading-[1.375] text-foreground",children:t}),n&&i("span",{"data-slot":"questionnaire-choice-badge",className:"pointer-events-none flex shrink-0 self-center",children:n})]}))}function G(n){var e=n,{className:t}=e,o=r(e,["className"]);return i("span",a({"data-slot":"questionnaire-choice-description",className:u("text-muted-foreground",t)},o))}function J(s){var l=s,{className:t,label:o,image:n}=l,e=r(l,["className","label","image"]);return p(c.Choice,f(a({"data-slot":"questionnaire-choice-tile",className:u("group/questionnaire-choice relative flex cursor-pointer select-none flex-col gap-1.5 rounded-md border border-input bg-background px-1.5 pb-2 pt-1.5 outline-none transition-colors hover:bg-muted/50","has-[>input:focus-visible]:ring-2 has-[>input:focus-visible]:ring-ring/50","data-[checked]:border-2 data-[checked]:border-surface-color-brand data-[checked]:bg-surface-color-brand-bland data-[checked]:px-[5px] data-[checked]:pb-[7px] data-[checked]:pt-[5px]","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t)},e),{children:[i(c.ChoiceInput,{"data-slot":"questionnaire-choice-input",className:"absolute inset-0 z-10 size-full cursor-pointer opacity-0"}),i("img",{src:n,alt:"",className:"pointer-events-none h-[52px] w-full rounded-[6px] object-cover"}),i(c.ChoiceLabel,{"data-slot":"questionnaire-choice-label",className:"text-[11px] text-foreground/[0.74] group-data-[checked]/questionnaire-choice:font-semibold group-data-[checked]/questionnaire-choice:text-content-brand",children:o})]}))}function K(n){var e=n,{className:t}=e,o=r(e,["className"]);let s=x.useRef(null),[l,d]=x.useState(!1);return x.useEffect(()=>{var h;let m=(h=s.current)==null?void 0:h.previousElementSibling;if(!m)return;let y=()=>d(m.hasAttribute("data-checked"));y();let R=new MutationObserver(y);return R.observe(m,{attributeFilter:["data-checked"]}),()=>R.disconnect()},[]),i("fieldset",a({ref:s,"data-slot":"questionnaire-choice-details",disabled:!l,className:u("m-0 hidden min-w-0 border-0 p-0 [[data-checked]+&]:block",t)},o))}function U(n){var e=n,{className:t}=e,o=r(e,["className"]);return i(c.Input,a({"data-slot":"questionnaire-input",className:u("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base outline-none transition-[color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid=true]:border-destructive md:text-sm",t)},o))}function W(n){var e=n,{value:t}=e,o=r(e,["value"]);return i(c.Input,a({"data-slot":"questionnaire-value",hidden:!0,readOnly:!0,tabIndex:-1,"aria-hidden":!0,value:t!=null?t:""},o))}function X(n){var e=n,{className:t}=e,o=r(e,["className"]);return i(c.Error,a({"data-slot":"questionnaire-error",className:u("text-sm text-destructive",v,t)},o))}function Y(n){var e=n,{className:t}=e,o=r(e,["className"]);return i("div",a({"data-slot":"questionnaire-actions",className:u("grid min-h-8 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2",t)},o))}var C="h-8 rounded-md px-2.5 text-sm";function Z(l){var d=l,{children:t,className:o,size:n,variant:e="outline"}=d,s=r(d,["children","className","size","variant"]);return i(c.Previous,f(a({"data-slot":"questionnaire-previous",className:u(N({size:n,variant:e}),C,"col-start-1 row-start-1 justify-self-start",v,o)},s),{children:t!=null?t:"Previous"}))}function ee(l){var d=l,{children:t,className:o,size:n,variant:e="outline"}=d,s=r(d,["children","className","size","variant"]);return i(c.Skip,f(a({"data-slot":"questionnaire-skip",className:u(N({size:n,variant:e}),C,"col-start-2 row-start-1 justify-self-end",v,o)},s),{children:t!=null?t:"Skip"}))}function te(l){var d=l,{children:t,className:o,size:n,variant:e="default"}=d,s=r(d,["children","className","size","variant"]);return i(c.Next,f(a({"data-slot":"questionnaire-next",className:u(N({size:n,variant:e}),C,"col-start-3 row-start-1 justify-self-end",v,o)},s),{children:t!=null?t:"Next"}))}function oe(l){var d=l,{children:t,className:o,size:n,variant:e="default"}=d,s=r(d,["children","className","size","variant"]);return i(c.Submit,f(a({"data-slot":"questionnaire-submit",className:u(N({size:n,variant:e}),C,"col-start-3 row-start-1 justify-self-end",v,o)},s),{children:t!=null?t:"Submit"}))}function ie(d){var m=d,{className:t,title:o,summary:n,onEdit:e,editLabel:s="Edit"}=m,l=r(m,["className","title","summary","onEdit","editLabel"]);return p("div",f(a({"data-slot":"questionnaire-completed-step",className:u("flex w-full items-start gap-3 rounded-xl border bg-background px-5 py-4",t)},l),{children:[i("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-full bg-foreground/80 text-background",children:i(S,{className:"size-3.5 stroke-[3]","aria-hidden":"true"})}),p("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[i("p",{className:"text-sm font-medium text-foreground",children:o}),n&&i("p",{className:"text-[13px] leading-[19px] text-muted-foreground",children:n})]}),e&&p(Q,{type:"button",variant:"ghost",size:"sm",onClick:e,className:"text-[13px] font-semibold text-foreground/[0.74]",children:[i(z,{}),s]})]}))}function B(e){var s=e,{className:t,children:o}=s,n=r(s,["className","children"]);return p(Q,f(a({type:"button",variant:"outline",size:"sm",className:u("h-8 shrink-0 gap-1.5 rounded-md border-foreground/15 px-3 text-[13px] font-semibold tracking-[0.005em]",t)},n),{children:[i(z,{}),o!=null?o:"Edit"]}))}function ne(d){var m=d,{className:t,title:o="Review your request",description:n="Check your details before sending your request to local pros.",action:e,children:s}=m,l=r(m,["className","title","description","action","children"]);return p("div",f(a({"data-slot":"questionnaire-review",className:u("flex w-full flex-col gap-5 rounded-xl border border-foreground/15 bg-background px-6 pb-6 pt-5",t)},l),{children:[p("div",{className:"flex flex-col gap-1",children:[i("h2",{className:"text-base font-medium text-foreground",children:o}),n&&i("p",{className:"text-sm text-muted-foreground",children:n})]}),i("div",{className:"flex flex-col divide-y divide-foreground/10 rounded-lg border border-foreground/15 bg-muted p-4 *:py-3.5 first:*:pt-0 last:*:pb-0",children:s}),e]}))}function ae(R){var h=R,{className:t,heading:o,title:n,items:e=[],photos:s=[],visiblePhotos:l=2,onEdit:d,showPhotosLabel:m=b=>`Show all photos (${b})`}=h,y=r(h,["className","heading","title","items","photos","visiblePhotos","onEdit","showPhotosLabel"]);let[b,k]=x.useState(null);return p("section",f(a({"data-slot":"questionnaire-review-section",className:u("flex flex-col gap-3.5",t)},y),{children:[s.length>0&&p("div",{className:"flex flex-col items-start gap-2.5",children:[i("div",{className:"flex gap-2",children:s.slice(0,l).map((g,P)=>{var q;return i("button",{type:"button",onClick:()=>k(P),"aria-label":`Open photo ${P+1}`,className:"h-[84px] w-[120px] overflow-hidden rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:i("img",{src:g.src,alt:(q=g.alt)!=null?q:"",className:"size-full object-cover"})},`${g.src}-${P}`)})}),i(Q,{type:"button",variant:"outline",size:"sm",onClick:()=>k(0),className:"h-7 rounded-sm border-foreground/15 px-2.5 text-xs font-semibold tracking-[0.01em]",children:m(s.length)}),i(w,{photos:s,open:b!==null,onOpenChange:g=>!g&&k(null),initialIndex:b!=null?b:0},b!=null?b:"closed")]}),o&&i("h3",{className:"text-base font-medium leading-[22px] text-foreground",children:o}),p("div",{className:"flex items-start gap-1",children:[p("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[n&&i("p",{className:"text-sm font-medium text-foreground",children:n}),e.length>0&&i("ul",{className:"flex flex-col gap-1 text-[13px] leading-[19px] text-muted-foreground",children:e.map((g,P)=>p("li",{children:["\u2022 ",g]},P))})]}),d&&i(B,{onClick:d})]})]}))}export{T as a,D as b,V as c,$ as d,A as e,H as f,F as g,M as h,_ as i,G as j,J as k,K as l,U as m,W as n,X as o,Y as p,Z as q,ee as r,te as s,oe as t,ie as u,B as v,ne as w,ae as x};
|
|
2
|
+
//# sourceMappingURL=chunk-ZJVH3SNI.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/questionnaire/index.tsx"],
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport * as React from \"react\";\nimport { Questionnaire as QuestionnairePrimitive } from \"@shadcn/react/questionnaire\";\nimport { CheckIcon, PencilIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button, buttonVariants, type ButtonProps } from \"@/components/button\";\nimport {\n PhotoLightbox,\n type PhotoLightboxPhoto,\n} from \"@/components/photo-lightbox\";\n\ntype NavigationButtonProps = Pick<ButtonProps, \"size\" | \"variant\">;\n\n// The primitive toggles visibility with the `hidden` attribute, which Tailwind 3 display utilities would override.\nconst respectHidden = \"[&[hidden]]:hidden\";\n\nfunction Questionnaire({\n className,\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Root>) {\n return (\n <QuestionnairePrimitive.Root\n data-slot=\"questionnaire\"\n className={cn(\"flex w-full min-w-0 flex-col gap-4\", className)}\n {...props}\n />\n );\n}\n\nfunction QuestionnaireCard({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"questionnaire-card\"\n className={cn(\n \"flex w-full flex-col gap-5 rounded-xl border bg-background px-6 pb-6 pt-5\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction QuestionnaireHeader({\n className,\n ...props\n}: React.ComponentProps<\"h2\">) {\n return (\n <h2\n data-slot=\"questionnaire-header\"\n className={cn(\n \"text-2xl font-bold leading-8 tracking-[-0.01em] text-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction QuestionnaireProgress({\n className,\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Progress>) {\n return (\n <QuestionnairePrimitive.Progress\n data-slot=\"questionnaire-progress\"\n className={cn(\n \"min-h-4 w-fit text-xs font-medium tabular-nums text-foreground/[0.74]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction QuestionnaireItem({\n className,\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Item>) {\n return (\n <QuestionnairePrimitive.Item\n data-slot=\"questionnaire-item\"\n className={cn(\n \"flex min-w-0 flex-col gap-4 border-0 p-0 outline-none\",\n respectHidden,\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction QuestionnaireTitle({\n className,\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Title>) {\n return (\n <QuestionnairePrimitive.Title\n data-slot=\"questionnaire-title\"\n className={cn(\n \"text-pretty p-0 text-base font-medium leading-[22px] text-foreground [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction QuestionnaireDescription({\n className,\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Description>) {\n return (\n <QuestionnairePrimitive.Description\n data-slot=\"questionnaire-description\"\n className={cn(\n \"text-pretty text-sm tracking-[0.005em] text-muted-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction QuestionnaireChoices({\n className,\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Choices>) {\n return (\n <QuestionnairePrimitive.Choices\n data-slot=\"questionnaire-choices\"\n className={cn(\n \"group/questionnaire-choices grid min-w-0 gap-2\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport type QuestionnaireChoiceProps = React.ComponentProps<\n typeof QuestionnairePrimitive.Choice\n> & {\n /** Content pinned to the right edge, such as a \"Recommended\" badge */\n badge?: React.ReactNode;\n};\n\nfunction QuestionnaireChoice({\n children,\n className,\n badge,\n ...props\n}: QuestionnaireChoiceProps) {\n return (\n <QuestionnairePrimitive.Choice\n data-slot=\"questionnaire-choice\"\n className={cn(\n \"group/questionnaire-choice relative flex cursor-pointer select-none items-start gap-2.5 rounded-md border border-input bg-background px-[13px] py-[11px] text-start text-sm outline-none transition-colors hover:bg-muted/50\",\n \"has-[>input:focus-visible]:ring-2 has-[>input:focus-visible]:ring-ring/50\",\n \"data-[checked]:border-surface-color-brand data-[checked]:bg-surface-color-brand-bland\",\n \"data-[invalid]:border-destructive\",\n \"data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <QuestionnairePrimitive.ChoiceInput\n data-slot=\"questionnaire-choice-input\"\n className=\"absolute inset-0 z-10 size-full cursor-pointer opacity-0\"\n />\n <span\n aria-hidden=\"true\"\n data-slot=\"questionnaire-choice-indicator\"\n className=\"pointer-events-none relative mt-[3px] flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input bg-background group-data-[type=radio]/questionnaire-choice:rounded-full group-data-[checked]/questionnaire-choice:border-surface-color-brand group-data-[checked]/questionnaire-choice:bg-surface-color-brand group-data-[checked]/questionnaire-choice:text-inverted-primary\"\n >\n <span\n data-slot=\"questionnaire-choice-indicator-dot\"\n className=\"hidden size-1.5 rounded-full bg-inverted-primary group-data-[checked]/questionnaire-choice:block group-data-[type=checkbox]/questionnaire-choice:hidden\"\n />\n <CheckIcon\n data-slot=\"questionnaire-choice-indicator-check\"\n className=\"hidden size-3 stroke-[3] group-data-[checked]/questionnaire-choice:block group-data-[type=radio]/questionnaire-choice:hidden\"\n />\n </span>\n <QuestionnairePrimitive.ChoiceLabel\n data-slot=\"questionnaire-choice-label\"\n className=\"flex min-w-0 flex-1 flex-col gap-0.5 leading-[1.375] text-foreground\"\n >\n {children}\n </QuestionnairePrimitive.ChoiceLabel>\n {badge && (\n <span\n data-slot=\"questionnaire-choice-badge\"\n className=\"pointer-events-none flex shrink-0 self-center\"\n >\n {badge}\n </span>\n )}\n </QuestionnairePrimitive.Choice>\n );\n}\n\nfunction QuestionnaireChoiceDescription({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"questionnaire-choice-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nexport type QuestionnaireChoiceTileProps = Omit<\n React.ComponentProps<typeof QuestionnairePrimitive.Choice>,\n \"children\"\n> & {\n label: string;\n image: string;\n};\n\n/**\n * Image swatch choice, laid out in a grid via `QuestionnaireChoices className=\"grid-cols-2\"`.\n * @param props.label - text under the image\n * @param props.image - image URL\n */\nfunction QuestionnaireChoiceTile({\n className,\n label,\n image,\n ...props\n}: QuestionnaireChoiceTileProps) {\n return (\n <QuestionnairePrimitive.Choice\n data-slot=\"questionnaire-choice-tile\"\n className={cn(\n \"group/questionnaire-choice relative flex cursor-pointer select-none flex-col gap-1.5 rounded-md border border-input bg-background px-1.5 pb-2 pt-1.5 outline-none transition-colors hover:bg-muted/50\",\n \"has-[>input:focus-visible]:ring-2 has-[>input:focus-visible]:ring-ring/50\",\n \"data-[checked]:border-2 data-[checked]:border-surface-color-brand data-[checked]:bg-surface-color-brand-bland data-[checked]:px-[5px] data-[checked]:pb-[7px] data-[checked]:pt-[5px]\",\n \"data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <QuestionnairePrimitive.ChoiceInput\n data-slot=\"questionnaire-choice-input\"\n className=\"absolute inset-0 z-10 size-full cursor-pointer opacity-0\"\n />\n <img\n src={image}\n alt=\"\"\n className=\"pointer-events-none h-[52px] w-full rounded-[6px] object-cover\"\n />\n <QuestionnairePrimitive.ChoiceLabel\n data-slot=\"questionnaire-choice-label\"\n className=\"text-[11px] text-foreground/[0.74] group-data-[checked]/questionnaire-choice:font-semibold group-data-[checked]/questionnaire-choice:text-content-brand\"\n >\n {label}\n </QuestionnairePrimitive.ChoiceLabel>\n </QuestionnairePrimitive.Choice>\n );\n}\n\n/** Content revealed, and submitted, only while the choice rendered right before it is checked. */\nfunction QuestionnaireChoiceDetails({\n className,\n ...props\n}: React.ComponentProps<\"fieldset\">) {\n const ref = React.useRef<HTMLFieldSetElement>(null);\n const [active, setActive] = React.useState(false);\n\n React.useEffect(() => {\n const choice = ref.current?.previousElementSibling;\n if (!choice) return;\n const sync = () => setActive(choice.hasAttribute(\"data-checked\"));\n sync();\n const observer = new MutationObserver(sync);\n observer.observe(choice, { attributeFilter: [\"data-checked\"] });\n return () => observer.disconnect();\n }, []);\n\n return (\n <fieldset\n ref={ref}\n data-slot=\"questionnaire-choice-details\"\n disabled={!active}\n className={cn(\n \"m-0 hidden min-w-0 border-0 p-0 [[data-checked]+&]:block\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction QuestionnaireInput({\n className,\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Input>) {\n return (\n <QuestionnairePrimitive.Input\n data-slot=\"questionnaire-input\"\n className={cn(\n \"h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base outline-none transition-[color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid=true]:border-destructive md:text-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport type QuestionnaireValueProps = Omit<\n React.ComponentProps<typeof QuestionnairePrimitive.Input>,\n \"value\" | \"defaultValue\" | \"type\"\n> & {\n value: string | number | undefined;\n};\n\n/**\n * Hidden answer for an item driven by a custom control (e.g. PhotoUpload), so Next treats it as answered.\n * @param props.value - the answer; empty means unanswered\n */\nfunction QuestionnaireValue({ value, ...props }: QuestionnaireValueProps) {\n return (\n <QuestionnairePrimitive.Input\n data-slot=\"questionnaire-value\"\n hidden\n readOnly\n tabIndex={-1}\n aria-hidden\n value={value ?? \"\"}\n {...props}\n />\n );\n}\n\nfunction QuestionnaireError({\n className,\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Error>) {\n return (\n <QuestionnairePrimitive.Error\n data-slot=\"questionnaire-error\"\n className={cn(\"text-sm text-destructive\", respectHidden, className)}\n {...props}\n />\n );\n}\n\nfunction QuestionnaireActions({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"questionnaire-actions\"\n className={cn(\n \"grid min-h-8 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2\",\n className,\n )}\n {...props}\n />\n );\n}\n\nconst navigationButtonClassName = \"h-8 rounded-md px-2.5 text-sm\";\n\nfunction QuestionnairePrevious({\n children,\n className,\n size,\n variant = \"outline\",\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Previous> &\n NavigationButtonProps) {\n return (\n <QuestionnairePrimitive.Previous\n data-slot=\"questionnaire-previous\"\n className={cn(\n buttonVariants({ size, variant }),\n navigationButtonClassName,\n \"col-start-1 row-start-1 justify-self-start\",\n respectHidden,\n className,\n )}\n {...props}\n >\n {children ?? \"Previous\"}\n </QuestionnairePrimitive.Previous>\n );\n}\n\nfunction QuestionnaireSkip({\n children,\n className,\n size,\n variant = \"outline\",\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Skip> &\n NavigationButtonProps) {\n return (\n <QuestionnairePrimitive.Skip\n data-slot=\"questionnaire-skip\"\n className={cn(\n buttonVariants({ size, variant }),\n navigationButtonClassName,\n \"col-start-2 row-start-1 justify-self-end\",\n respectHidden,\n className,\n )}\n {...props}\n >\n {children ?? \"Skip\"}\n </QuestionnairePrimitive.Skip>\n );\n}\n\nfunction QuestionnaireNext({\n children,\n className,\n size,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Next> &\n NavigationButtonProps) {\n return (\n <QuestionnairePrimitive.Next\n data-slot=\"questionnaire-next\"\n className={cn(\n buttonVariants({ size, variant }),\n navigationButtonClassName,\n \"col-start-3 row-start-1 justify-self-end\",\n respectHidden,\n className,\n )}\n {...props}\n >\n {children ?? \"Next\"}\n </QuestionnairePrimitive.Next>\n );\n}\n\nfunction QuestionnaireSubmit({\n children,\n className,\n size,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof QuestionnairePrimitive.Submit> &\n NavigationButtonProps) {\n return (\n <QuestionnairePrimitive.Submit\n data-slot=\"questionnaire-submit\"\n className={cn(\n buttonVariants({ size, variant }),\n navigationButtonClassName,\n \"col-start-3 row-start-1 justify-self-end\",\n respectHidden,\n className,\n )}\n {...props}\n >\n {children ?? \"Submit\"}\n </QuestionnairePrimitive.Submit>\n );\n}\n\nexport type QuestionnaireCompletedStepProps = Omit<\n React.ComponentProps<\"div\">,\n \"title\"\n> & {\n title: React.ReactNode;\n summary?: React.ReactNode;\n onEdit?: () => void;\n editLabel?: string;\n};\n\n/**\n * Collapsed summary of a finished service, shown above the active questionnaire.\n * @param props.title - service name\n * @param props.summary - one-line recap of the answers\n * @param props.onEdit - renders an Edit button when provided\n */\nfunction QuestionnaireCompletedStep({\n className,\n title,\n summary,\n onEdit,\n editLabel = \"Edit\",\n ...props\n}: QuestionnaireCompletedStepProps) {\n return (\n <div\n data-slot=\"questionnaire-completed-step\"\n className={cn(\n \"flex w-full items-start gap-3 rounded-xl border bg-background px-5 py-4\",\n className,\n )}\n {...props}\n >\n <span className=\"flex size-6 shrink-0 items-center justify-center rounded-full bg-foreground/80 text-background\">\n <CheckIcon className=\"size-3.5 stroke-[3]\" aria-hidden=\"true\" />\n </span>\n <div className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <p className=\"text-sm font-medium text-foreground\">{title}</p>\n {summary && (\n <p className=\"text-[13px] leading-[19px] text-muted-foreground\">\n {summary}\n </p>\n )}\n </div>\n {onEdit && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={onEdit}\n className=\"text-[13px] font-semibold text-foreground/[0.74]\"\n >\n <PencilIcon />\n {editLabel}\n </Button>\n )}\n </div>\n );\n}\n\nfunction QuestionnaireEditButton({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof Button>) {\n return (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className={cn(\n \"h-8 shrink-0 gap-1.5 rounded-md border-foreground/15 px-3 text-[13px] font-semibold tracking-[0.005em]\",\n className,\n )}\n {...props}\n >\n <PencilIcon />\n {children ?? \"Edit\"}\n </Button>\n );\n}\n\nexport type QuestionnaireReviewProps = Omit<\n React.ComponentProps<\"div\">,\n \"title\"\n> & {\n title?: React.ReactNode;\n description?: React.ReactNode;\n /** Rendered below the summary panel, typically the submit button */\n action?: React.ReactNode;\n};\n\n/**\n * Summary card listing every answered service before the request is sent.\n * @param props.action - footer content, usually the full-width submit button\n */\nfunction QuestionnaireReview({\n className,\n title = \"Review your request\",\n description = \"Check your details before sending your request to local pros.\",\n action,\n children,\n ...props\n}: QuestionnaireReviewProps) {\n return (\n <div\n data-slot=\"questionnaire-review\"\n className={cn(\n \"flex w-full flex-col gap-5 rounded-xl border border-foreground/15 bg-background px-6 pb-6 pt-5\",\n className,\n )}\n {...props}\n >\n <div className=\"flex flex-col gap-1\">\n <h2 className=\"text-base font-medium text-foreground\">{title}</h2>\n {description && (\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n )}\n </div>\n <div className=\"flex flex-col divide-y divide-foreground/10 rounded-lg border border-foreground/15 bg-muted p-4 *:py-3.5 first:*:pt-0 last:*:pb-0\">\n {children}\n </div>\n {action}\n </div>\n );\n}\n\nexport type QuestionnaireReviewSectionProps = Omit<\n React.ComponentProps<\"section\">,\n \"title\"\n> & {\n heading?: React.ReactNode;\n title?: React.ReactNode;\n items?: React.ReactNode[];\n photos?: PhotoLightboxPhoto[];\n /** Number of photo thumbnails shown before \"Show all photos\" */\n visiblePhotos?: number;\n onEdit?: () => void;\n showPhotosLabel?: (count: number) => string;\n};\n\n/**\n * One service (or the additional details) inside `QuestionnaireReview`.\n * @param props.heading - larger label above the section, e.g. \"Additional details\"\n * @param props.title - service name\n * @param props.items - answers, rendered as bullets\n * @param props.photos - thumbnails, browsable in a lightbox\n * @param props.onEdit - renders an Edit button when provided\n */\nfunction QuestionnaireReviewSection({\n className,\n heading,\n title,\n items = [],\n photos = [],\n visiblePhotos = 2,\n onEdit,\n showPhotosLabel = (count) => `Show all photos (${count})`,\n ...props\n}: QuestionnaireReviewSectionProps) {\n const [lightboxIndex, setLightboxIndex] = React.useState<number | null>(null);\n\n return (\n <section\n data-slot=\"questionnaire-review-section\"\n className={cn(\"flex flex-col gap-3.5\", className)}\n {...props}\n >\n {photos.length > 0 && (\n <div className=\"flex flex-col items-start gap-2.5\">\n <div className=\"flex gap-2\">\n {photos.slice(0, visiblePhotos).map((photo, index) => (\n <button\n key={`${photo.src}-${index}`}\n type=\"button\"\n onClick={() => setLightboxIndex(index)}\n aria-label={`Open photo ${index + 1}`}\n className=\"h-[84px] w-[120px] overflow-hidden rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-ring/50\"\n >\n <img\n src={photo.src}\n alt={photo.alt ?? \"\"}\n className=\"size-full object-cover\"\n />\n </button>\n ))}\n </div>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => setLightboxIndex(0)}\n className=\"h-7 rounded-sm border-foreground/15 px-2.5 text-xs font-semibold tracking-[0.01em]\"\n >\n {showPhotosLabel(photos.length)}\n </Button>\n <PhotoLightbox\n key={lightboxIndex ?? \"closed\"}\n photos={photos}\n open={lightboxIndex !== null}\n onOpenChange={(open) => !open && setLightboxIndex(null)}\n initialIndex={lightboxIndex ?? 0}\n />\n </div>\n )}\n {heading && (\n <h3 className=\"text-base font-medium leading-[22px] text-foreground\">\n {heading}\n </h3>\n )}\n <div className=\"flex items-start gap-1\">\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n {title && (\n <p className=\"text-sm font-medium text-foreground\">{title}</p>\n )}\n {items.length > 0 && (\n <ul className=\"flex flex-col gap-1 text-[13px] leading-[19px] text-muted-foreground\">\n {items.map((item, index) => (\n <li key={index}>\u2022 {item}</li>\n ))}\n </ul>\n )}\n </div>\n {onEdit && <QuestionnaireEditButton onClick={onEdit} />}\n </div>\n </section>\n );\n}\n\nexport {\n Questionnaire,\n QuestionnaireActions,\n QuestionnaireCard,\n QuestionnaireChoice,\n QuestionnaireChoiceDescription,\n QuestionnaireChoiceDetails,\n QuestionnaireChoiceTile,\n QuestionnaireChoices,\n QuestionnaireCompletedStep,\n QuestionnaireDescription,\n QuestionnaireEditButton,\n QuestionnaireError,\n QuestionnaireHeader,\n QuestionnaireInput,\n QuestionnaireItem,\n QuestionnaireNext,\n QuestionnairePrevious,\n QuestionnaireProgress,\n QuestionnaireReview,\n QuestionnaireReviewSection,\n QuestionnaireSkip,\n QuestionnaireSubmit,\n QuestionnaireTitle,\n QuestionnaireValue,\n};\n"],
|
|
5
|
+
"mappings": "gLAEA,UAAYA,MAAW,QACvB,OAAS,iBAAiBC,MAA8B,8BACxD,OAAS,aAAAC,EAAW,cAAAC,MAAkB,eAmBlC,cAAAC,EAuJE,QAAAC,MAvJF,oBAPJ,IAAMC,EAAgB,qBAEtB,SAASC,EAAcC,EAGsC,CAHtC,IAAAC,EAAAD,EACrB,WAAAE,CAnBF,EAkBuBD,EAElBE,EAAAC,EAFkBH,EAElB,CADH,cAGA,OACEL,EAACS,EAAuB,KAAvBC,EAAA,CACC,YAAU,gBACV,UAAWC,EAAG,qCAAsCL,CAAS,GACzDC,EACN,CAEJ,CAEA,SAASK,EAAkBR,EAGK,CAHL,IAAAC,EAAAD,EACzB,WAAAE,CAhCF,EA+B2BD,EAEtBE,EAAAC,EAFsBH,EAEtB,CADH,cAGA,OACEL,EAAC,MAAAU,EAAA,CACC,YAAU,qBACV,UAAWC,EACT,4EACAL,CACF,GACIC,EACN,CAEJ,CAEA,SAASM,EAAoBT,EAGE,CAHF,IAAAC,EA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,sCAAuC,SAAAiD,EAAM,EAE3DY,EAAM,OAAS,GACd7D,EAAC,MAAG,UAAU,uEACX,SAAA6D,EAAM,IAAI,CAACW,EAAMH,IAChBpE,EAAC,MAAe,oBAAGuE,IAAVH,CAAe,CACzB,EACH,GAEJ,EACClB,GAAUnD,EAACuD,EAAA,CAAwB,QAASJ,EAAQ,GACvD,IACF,CAEJ",
|
|
6
|
+
"names": ["React", "QuestionnairePrimitive", "CheckIcon", "PencilIcon", "jsx", "jsxs", "respectHidden", "Questionnaire", "_a", "_b", "className", "props", "__objRest", "QuestionnairePrimitive", "__spreadValues", "cn", "QuestionnaireCard", "QuestionnaireHeader", "QuestionnaireProgress", "QuestionnaireItem", "QuestionnaireTitle", "QuestionnaireDescription", "QuestionnaireChoices", "QuestionnaireChoice", "children", "badge", "__spreadProps", "CheckIcon", "QuestionnaireChoiceDescription", "QuestionnaireChoiceTile", "label", "image", "QuestionnaireChoiceDetails", "ref", "active", "setActive", "choice", "sync", "observer", "QuestionnaireInput", "QuestionnaireValue", "value", "QuestionnaireError", "QuestionnaireActions", "navigationButtonClassName", "QuestionnairePrevious", "size", "variant", "buttonVariants", "QuestionnaireSkip", "QuestionnaireNext", "QuestionnaireSubmit", "QuestionnaireCompletedStep", "title", "summary", "onEdit", "editLabel", "Button", "PencilIcon", "QuestionnaireEditButton", "QuestionnaireReview", "description", "action", "QuestionnaireReviewSection", "heading", "items", "photos", "visiblePhotos", "showPhotosLabel", "count", "lightboxIndex", "setLightboxIndex", "photo", "index", "PhotoLightbox", "open", "item"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b,c,d,e,f}from"../../chunk-S2I5LIDP.js";import"../../chunk-BF3VTYEM.js";import"../../chunk-WIFBPNRH.js";import"../../chunk-WHECA25N.js";export{a as Carousel,b as CarouselContent,c as CarouselItem,f as CarouselNext,e as CarouselPrevious,d as carouselControlVariants};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{a}from"../../chunk-Q3PG3WWG.js";import"../../chunk-JVQR7SBQ.js";import"../../chunk-2R5NZUY2.js";import"../../chunk-BY3UM6EV.js";import"../../chunk-BF3VTYEM.js";import"../../chunk-WIFBPNRH.js";import"../../chunk-WHECA25N.js";export{a as Combobox};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|