@bergetai/ui 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/composer/Composer.cjs +1 -4
- package/dist/components/composer/Composer.cjs.map +1 -1
- package/dist/components/composer/Composer.d.cts.map +1 -1
- package/dist/components/composer/Composer.d.mts.map +1 -1
- package/dist/components/composer/Composer.mjs +1 -4
- package/dist/components/composer/Composer.mjs.map +1 -1
- package/dist/components/country-select/CountrySelect.cjs +3 -3
- package/dist/components/country-select/CountrySelect.cjs.map +1 -1
- package/dist/components/country-select/CountrySelect.mjs +3 -3
- package/dist/components/country-select/CountrySelect.mjs.map +1 -1
- package/dist/components/trace/index.cjs +46 -0
- package/dist/components/trace/index.cjs.map +1 -0
- package/dist/components/trace/index.d.cts +14 -0
- package/dist/components/trace/index.d.cts.map +1 -0
- package/dist/components/trace/index.d.mts +14 -0
- package/dist/components/trace/index.d.mts.map +1 -0
- package/dist/components/trace/index.mjs +37 -0
- package/dist/components/trace/index.mjs.map +1 -0
- package/dist/index.cjs +10 -0
- package/dist/index.d.cts +3 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.mjs +3 -1
- package/dist/primitives/collapsible.cjs +27 -0
- package/dist/primitives/collapsible.cjs.map +1 -0
- package/dist/primitives/collapsible.d.cts +8 -0
- package/dist/primitives/collapsible.d.cts.map +1 -0
- package/dist/primitives/collapsible.d.mts +8 -0
- package/dist/primitives/collapsible.d.mts.map +1 -0
- package/dist/primitives/collapsible.mjs +25 -0
- package/dist/primitives/collapsible.mjs.map +1 -0
- package/dist/primitives/combobox.cjs +1 -1
- package/dist/primitives/combobox.cjs.map +1 -1
- package/dist/primitives/combobox.mjs +1 -1
- package/dist/primitives/combobox.mjs.map +1 -1
- package/dist/primitives/input.cjs +1 -1
- package/dist/primitives/input.cjs.map +1 -1
- package/dist/primitives/input.mjs +1 -1
- package/dist/primitives/input.mjs.map +1 -1
- package/dist/primitives/select.cjs +1 -1
- package/dist/primitives/select.cjs.map +1 -1
- package/dist/primitives/select.mjs +1 -1
- package/dist/primitives/select.mjs.map +1 -1
- package/dist/primitives/textarea.cjs +1 -1
- package/dist/primitives/textarea.cjs.map +1 -1
- package/dist/primitives/textarea.mjs +1 -1
- package/dist/primitives/textarea.mjs.map +1 -1
- package/dist/primitives/trace.cjs +86 -0
- package/dist/primitives/trace.cjs.map +1 -0
- package/dist/primitives/trace.d.cts +21 -0
- package/dist/primitives/trace.d.cts.map +1 -0
- package/dist/primitives/trace.d.mts +21 -0
- package/dist/primitives/trace.d.mts.map +1 -0
- package/dist/primitives/trace.mjs +77 -0
- package/dist/primitives/trace.mjs.map +1 -0
- package/dist/styles/index.css +16 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible.mjs","names":["Collapsible","CollapsiblePrimitive"],"sources":["../../src/primitives/collapsible.tsx"],"sourcesContent":["import { Collapsible as CollapsiblePrimitive } from \"@base-ui/react/collapsible\"\n\nfunction Collapsible({ ...props }: CollapsiblePrimitive.Root.Props) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />\n}\n\nfunction CollapsibleTrigger({ ...props }: CollapsiblePrimitive.Trigger.Props) {\n return (\n <CollapsiblePrimitive.Trigger data-slot=\"collapsible-trigger\" {...props} />\n )\n}\n\nfunction CollapsibleContent({ ...props }: CollapsiblePrimitive.Panel.Props) {\n return (\n <CollapsiblePrimitive.Panel data-slot=\"collapsible-content\" {...props} />\n )\n}\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent }\n"],"mappings":";;;AAEA,SAASA,cAAY,EAAE,GAAG,SAA0C;CAClE,OAAO,oBAACC,YAAqB,MAAtB;EAA2B,aAAU;EAAc,GAAI;CAAQ,CAAA;AACxE;AAEA,SAAS,mBAAmB,EAAE,GAAG,SAA6C;CAC5E,OACE,oBAACA,YAAqB,SAAtB;EAA8B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAE9E;AAEA,SAAS,mBAAmB,EAAE,GAAG,SAA2C;CAC1E,OACE,oBAACA,YAAqB,OAAtB;EAA4B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAE5E"}
|
|
@@ -20,7 +20,7 @@ function ComboboxValue({ ...props }) {
|
|
|
20
20
|
function ComboboxInput({ className, showTrigger = false, ...props }) {
|
|
21
21
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Input, {
|
|
22
22
|
"data-slot": "combobox-input",
|
|
23
|
-
className: (0, cn.cn)("w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-sm placeholder:text-
|
|
23
|
+
className: (0, cn.cn)("w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-sm placeholder:text-berget-placeholder-foreground transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
24
24
|
...props
|
|
25
25
|
});
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.cjs","names":["ComboboxPrimitive","CheckIcon"],"sources":["../../src/primitives/combobox.tsx"],"sourcesContent":["\"use client\"\n\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react/combobox\"\nimport { cn } from \"cn\"\nimport { CheckIcon } from \"lucide-react\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxTrigger({ className, ...props }: ComboboxPrimitive.Trigger.Props) {\n return <ComboboxPrimitive.Trigger data-slot=\"combobox-trigger\" {...props} />\n}\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxInput({\n className,\n showTrigger = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n /** Render the input as an anchor trigger by composing a chevron via Input/Trigger. */\n showTrigger?: boolean\n}) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-input\"\n className={cn(\n \"w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-sm placeholder:text-
|
|
1
|
+
{"version":3,"file":"combobox.cjs","names":["ComboboxPrimitive","CheckIcon"],"sources":["../../src/primitives/combobox.tsx"],"sourcesContent":["\"use client\"\n\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react/combobox\"\nimport { cn } from \"cn\"\nimport { CheckIcon } from \"lucide-react\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxTrigger({ className, ...props }: ComboboxPrimitive.Trigger.Props) {\n return <ComboboxPrimitive.Trigger data-slot=\"combobox-trigger\" {...props} />\n}\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxInput({\n className,\n showTrigger = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n /** Render the input as an anchor trigger by composing a chevron via Input/Trigger. */\n showTrigger?: boolean\n}) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-input\"\n className={cn(\n \"w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-sm placeholder:text-berget-placeholder-foreground transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxContent({\n className,\n children,\n side = \"bottom\",\n sideOffset = 4,\n align = \"start\",\n alignOffset = 0,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n className={cn(\n \"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className,\n )}\n {...props}\n >\n {children}\n </ComboboxPrimitive.Popup>\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\"max-h-(--available-height) overflow-y-auto p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.Props) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={\n <span className=\"absolute right-1.5 flex items-center\">\n <CheckIcon className=\"pointer-events-none size-4\" />\n </span>\n }\n />\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n <ComboboxPrimitive.Group\n data-slot=\"combobox-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxGroupLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-group-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\n/** Rendered only when the item list is empty. Requires the `items` prop on\n * the root when using this default empty treatment. */\nfunction ComboboxEmpty({ className, children, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\"px-2 py-1.5 text-sm text-muted-foreground\", className)}\n {...props}\n >\n {children ?? \"No results found.\"}\n </ComboboxPrimitive.Empty>\n )\n}\n\n/** Polite live region for async loading state. Keep this part mounted —\n * conditionally render its children instead (per the upstream docs). */\nfunction ComboboxStatus({ className, ...props }: ComboboxPrimitive.Status.Props) {\n return (\n <ComboboxPrimitive.Status\n data-slot=\"combobox-status\"\n className={cn(\"sr-only\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxClear({ className, children, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n className={cn(\"cursor-pointer\", className)}\n {...props}\n >\n {children}\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Combobox,\n ComboboxTrigger,\n ComboboxValue,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxGroupLabel,\n ComboboxEmpty,\n ComboboxStatus,\n ComboboxClear,\n Combobo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ACL,CAAA;AAEL;AAEA,SAAS,cAAc,EAAE,WAAW,UAAU,GAAG,SAAwC;CACvF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,OAAnB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CAAG,kBAAkB,SAAS;EACzC,GAAI;EAEH;CACsB,CAAA;AAE7B;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAA4C;CACrF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,WAAnB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CAAG,6BAA6B,SAAS;EACpD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -20,7 +20,7 @@ function ComboboxValue({ ...props }) {
|
|
|
20
20
|
function ComboboxInput({ className, showTrigger = false, ...props }) {
|
|
21
21
|
return /* @__PURE__ */ jsx(Combobox.Input, {
|
|
22
22
|
"data-slot": "combobox-input",
|
|
23
|
-
className: cn("w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-sm placeholder:text-
|
|
23
|
+
className: cn("w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-sm placeholder:text-berget-placeholder-foreground transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
24
24
|
...props
|
|
25
25
|
});
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.mjs","names":["Combobox","ComboboxPrimitive"],"sources":["../../src/primitives/combobox.tsx"],"sourcesContent":["\"use client\"\n\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react/combobox\"\nimport { cn } from \"cn\"\nimport { CheckIcon } from \"lucide-react\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxTrigger({ className, ...props }: ComboboxPrimitive.Trigger.Props) {\n return <ComboboxPrimitive.Trigger data-slot=\"combobox-trigger\" {...props} />\n}\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxInput({\n className,\n showTrigger = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n /** Render the input as an anchor trigger by composing a chevron via Input/Trigger. */\n showTrigger?: boolean\n}) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-input\"\n className={cn(\n \"w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-sm placeholder:text-
|
|
1
|
+
{"version":3,"file":"combobox.mjs","names":["Combobox","ComboboxPrimitive"],"sources":["../../src/primitives/combobox.tsx"],"sourcesContent":["\"use client\"\n\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react/combobox\"\nimport { cn } from \"cn\"\nimport { CheckIcon } from \"lucide-react\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxTrigger({ className, ...props }: ComboboxPrimitive.Trigger.Props) {\n return <ComboboxPrimitive.Trigger data-slot=\"combobox-trigger\" {...props} />\n}\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxInput({\n className,\n showTrigger = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n /** Render the input as an anchor trigger by composing a chevron via Input/Trigger. */\n showTrigger?: boolean\n}) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-input\"\n className={cn(\n \"w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-sm placeholder:text-berget-placeholder-foreground transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxContent({\n className,\n children,\n side = \"bottom\",\n sideOffset = 4,\n align = \"start\",\n alignOffset = 0,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n className={cn(\n \"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className,\n )}\n {...props}\n >\n {children}\n </ComboboxPrimitive.Popup>\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\"max-h-(--available-height) overflow-y-auto p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.Props) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={\n <span className=\"absolute right-1.5 flex items-center\">\n <CheckIcon className=\"pointer-events-none size-4\" />\n </span>\n }\n />\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n <ComboboxPrimitive.Group\n data-slot=\"combobox-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxGroupLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-group-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\n/** Rendered only when the item list is empty. Requires the `items` prop on\n * the root when using this default empty treatment. */\nfunction ComboboxEmpty({ className, children, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\"px-2 py-1.5 text-sm text-muted-foreground\", className)}\n {...props}\n >\n {children ?? \"No results found.\"}\n </ComboboxPrimitive.Empty>\n )\n}\n\n/** Polite live region for async loading state. Keep this part mounted —\n * conditionally render its children instead (per the upstream docs). */\nfunction ComboboxStatus({ className, ...props }: ComboboxPrimitive.Status.Props) {\n return (\n <ComboboxPrimitive.Status\n data-slot=\"combobox-status\"\n className={cn(\"sr-only\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxClear({ className, children, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n className={cn(\"cursor-pointer\", className)}\n {...props}\n >\n {children}\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Combobox,\n ComboboxTrigger,\n ComboboxValue,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxGroupLabel,\n ComboboxEmpty,\n ComboboxStatus,\n ComboboxClear,\n ComboboxSeparator,\n}\n"],"mappings":";;;;;;AAMA,MAAMA,aAAWC,SAAkB;AAEnC,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAA0C;CACjF,OAAO,oBAACA,SAAkB,SAAnB;EAA2B,aAAU;EAAmB,GAAI;CAAQ,CAAA;AAC7E;AAEA,SAAS,cAAc,EAAE,GAAG,SAAwC;CAClE,OAAO,oBAACA,SAAkB,OAAnB;EAAyB,aAAU;EAAiB,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,cAAc,EACrB,WACA,cAAc,OACd,GAAG,SAIF;CACD,OACE,oBAACA,SAAkB,OAAnB;EACE,aAAU;EACV,WAAW,GACT,gcACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,gBAAgB,EACvB,WACA,UACA,OAAO,UACP,aAAa,GACb,QAAQ,SACR,cAAc,GACd,GAAG,SAKA;CACH,OACE,oBAACA,SAAkB,QAAnB,EAAA,UACE,oBAACA,SAAkB,YAAnB;EACQ;EACM;EACL;EACM;EACb,WAAU;EAEV,UAAA,oBAACA,SAAkB,OAAnB;GACE,aAAU;GACV,WAAW,GACT,ymBACA,SACF;GACA,GAAI;GAEH;EACsB,CAAA;CACG,CAAA,EACN,CAAA;AAE9B;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAuC;CAC3E,OACE,oBAACA,SAAkB,MAAnB;EACE,aAAU;EACV,WAAW,GAAG,kDAAkD,SAAS;EACzE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,aAAa,EAAE,WAAW,UAAU,GAAG,SAAuC;CACrF,OACE,qBAACA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__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_input.Input, {
|
|
11
11
|
type,
|
|
12
12
|
"data-slot": "input",
|
|
13
|
-
className: (0, cn.cn)("h-8 w-full min-w-0 rounded-lg border border-input bg-input/30 px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-
|
|
13
|
+
className: (0, cn.cn)("h-8 w-full min-w-0 rounded-lg border border-input bg-input/30 px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-berget-placeholder-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
14
14
|
...props
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.cjs","names":["InputPrimitive"],"sources":["../../src/primitives/input.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Input as InputPrimitive } from \"@base-ui/react/input\"\nimport { cn } from \"cn\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <InputPrimitive\n type={type}\n data-slot=\"input\"\n className={cn(\n \"h-8 w-full min-w-0 rounded-lg border border-input bg-input/30 px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-
|
|
1
|
+
{"version":3,"file":"input.cjs","names":["InputPrimitive"],"sources":["../../src/primitives/input.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Input as InputPrimitive } from \"@base-ui/react/input\"\nimport { cn } from \"cn\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <InputPrimitive\n type={type}\n data-slot=\"input\"\n className={cn(\n \"h-8 w-full min-w-0 rounded-lg border border-input bg-input/30 px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-berget-placeholder-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"mappings":";;;;;;;;AAMA,SAAS,MAAM,EAAE,WAAW,MAAM,GAAG,SAAwC;CAC3E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,qBAAAA,OAAD;EACQ;EACN,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CACT,woBACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -8,7 +8,7 @@ function Input$1({ className, type, ...props }) {
|
|
|
8
8
|
return /* @__PURE__ */ jsx(Input, {
|
|
9
9
|
type,
|
|
10
10
|
"data-slot": "input",
|
|
11
|
-
className: cn("h-8 w-full min-w-0 rounded-lg border border-input bg-input/30 px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-
|
|
11
|
+
className: cn("h-8 w-full min-w-0 rounded-lg border border-input bg-input/30 px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-berget-placeholder-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
12
12
|
...props
|
|
13
13
|
});
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.mjs","names":["Input","InputPrimitive"],"sources":["../../src/primitives/input.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Input as InputPrimitive } from \"@base-ui/react/input\"\nimport { cn } from \"cn\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <InputPrimitive\n type={type}\n data-slot=\"input\"\n className={cn(\n \"h-8 w-full min-w-0 rounded-lg border border-input bg-input/30 px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-
|
|
1
|
+
{"version":3,"file":"input.mjs","names":["Input","InputPrimitive"],"sources":["../../src/primitives/input.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Input as InputPrimitive } from \"@base-ui/react/input\"\nimport { cn } from \"cn\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <InputPrimitive\n type={type}\n data-slot=\"input\"\n className={cn(\n \"h-8 w-full min-w-0 rounded-lg border border-input bg-input/30 px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-berget-placeholder-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"mappings":";;;;;;AAMA,SAASA,QAAM,EAAE,WAAW,MAAM,GAAG,SAAwC;CAC3E,OACE,oBAACC,OAAD;EACQ;EACN,aAAU;EACV,WAAW,GACT,woBACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -26,7 +26,7 @@ function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
|
26
26
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_select.Select.Trigger, {
|
|
27
27
|
"data-slot": "select-trigger",
|
|
28
28
|
"data-size": size,
|
|
29
|
-
className: (0, cn.cn)("flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-input/30 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-
|
|
29
|
+
className: (0, cn.cn)("flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-input/30 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-berget-placeholder-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
30
30
|
...props,
|
|
31
31
|
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_select.Select.Icon, { render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })]
|
|
32
32
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.cjs","names":["SelectPrimitive","ChevronDownIcon","CheckIcon","ChevronUpIcon"],"sources":["../../src/primitives/select.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\"\nimport { cn } from \"cn\"\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\n\nconst Select = SelectPrimitive.Root\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {\n return (\n <SelectPrimitive.Value\n data-slot=\"select-value\"\n className={cn(\"flex flex-1 text-left\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: SelectPrimitive.Trigger.Props & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-input/30 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-
|
|
1
|
+
{"version":3,"file":"select.cjs","names":["SelectPrimitive","ChevronDownIcon","CheckIcon","ChevronUpIcon"],"sources":["../../src/primitives/select.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\"\nimport { cn } from \"cn\"\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\n\nconst Select = SelectPrimitive.Root\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {\n return (\n <SelectPrimitive.Value\n data-slot=\"select-value\"\n className={cn(\"flex flex-1 text-left\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: SelectPrimitive.Trigger.Props & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-input/30 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-berget-placeholder-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon\n render={\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n }\n />\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n side = \"bottom\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n alignItemWithTrigger = true,\n ...props\n}: SelectPrimitive.Popup.Props &\n Pick<\n SelectPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"alignItemWithTrigger\"\n >) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n alignItemWithTrigger={alignItemWithTrigger}\n className=\"isolate z-50\"\n >\n <SelectPrimitive.Popup\n data-slot=\"select-content\"\n data-align-trigger={alignItemWithTrigger}\n className={cn(\"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", className )}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List>{children}</SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: SelectPrimitive.GroupLabel.Props) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot=\"select-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: SelectPrimitive.Item.Props) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <SelectPrimitive.ItemText className=\"flex flex-1 shrink-0 gap-2 whitespace-nowrap\">\n {children}\n </SelectPrimitive.ItemText>\n <SelectPrimitive.ItemIndicator\n render={\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />\n }\n >\n <CheckIcon className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: SelectPrimitive.Separator.Props) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {\n return (\n <SelectPrimitive.ScrollUpArrow\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon\n />\n </SelectPrimitive.ScrollUpArrow>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {\n return (\n <SelectPrimitive.ScrollDownArrow\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon\n />\n </SelectPrimitive.ScrollDownArrow>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectT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AAEA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC0D;CAC7D,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,sBAAAA,OAAgB,eAAjB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CACT,0HACA,SACF;EACA,GAAI;EAEJ,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACG,aAAAA,eAAD,CACC,CAAA;CAC4B,CAAA;AAEnC;AAEA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC4D;CAC/D,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACH,sBAAAA,OAAgB,iBAAjB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CACT,6HACA,SACF;EACA,GAAI;EAEJ,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,iBAAD,CACC,CAAA;CAC8B,CAAA;AAErC"}
|
|
@@ -24,7 +24,7 @@ function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
|
24
24
|
return /* @__PURE__ */ jsxs(Select.Trigger, {
|
|
25
25
|
"data-slot": "select-trigger",
|
|
26
26
|
"data-size": size,
|
|
27
|
-
className: cn("flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-input/30 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-
|
|
27
|
+
className: cn("flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-input/30 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-berget-placeholder-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
28
28
|
...props,
|
|
29
29
|
children: [children, /* @__PURE__ */ jsx(Select.Icon, { render: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })]
|
|
30
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.mjs","names":["Select","SelectPrimitive"],"sources":["../../src/primitives/select.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\"\nimport { cn } from \"cn\"\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\n\nconst Select = SelectPrimitive.Root\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {\n return (\n <SelectPrimitive.Value\n data-slot=\"select-value\"\n className={cn(\"flex flex-1 text-left\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: SelectPrimitive.Trigger.Props & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-input/30 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-
|
|
1
|
+
{"version":3,"file":"select.mjs","names":["Select","SelectPrimitive"],"sources":["../../src/primitives/select.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\"\nimport { cn } from \"cn\"\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\n\nconst Select = SelectPrimitive.Root\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {\n return (\n <SelectPrimitive.Value\n data-slot=\"select-value\"\n className={cn(\"flex flex-1 text-left\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: SelectPrimitive.Trigger.Props & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-input/30 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-berget-placeholder-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon\n render={\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n }\n />\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n side = \"bottom\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 0,\n alignItemWithTrigger = true,\n ...props\n}: SelectPrimitive.Popup.Props &\n Pick<\n SelectPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"alignItemWithTrigger\"\n >) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n alignItemWithTrigger={alignItemWithTrigger}\n className=\"isolate z-50\"\n >\n <SelectPrimitive.Popup\n data-slot=\"select-content\"\n data-align-trigger={alignItemWithTrigger}\n className={cn(\"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", className )}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List>{children}</SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: SelectPrimitive.GroupLabel.Props) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot=\"select-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: SelectPrimitive.Item.Props) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <SelectPrimitive.ItemText className=\"flex flex-1 shrink-0 gap-2 whitespace-nowrap\">\n {children}\n </SelectPrimitive.ItemText>\n <SelectPrimitive.ItemIndicator\n render={\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />\n }\n >\n <CheckIcon className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: SelectPrimitive.Separator.Props) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {\n return (\n <SelectPrimitive.ScrollUpArrow\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon\n />\n </SelectPrimitive.ScrollUpArrow>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {\n return (\n <SelectPrimitive.ScrollDownArrow\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon\n />\n </SelectPrimitive.ScrollDownArrow>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n"],"mappings":";;;;;;;AAOA,MAAMA,WAASC,OAAgB;AAE/B,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAACA,OAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GAAG,mBAAmB,SAAS;EAC1C,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAACA,OAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GAAG,yBAAyB,SAAS;EAChD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cAAc,EACrB,WACA,OAAO,WACP,UACA,GAAG,SAGF;CACD,OACE,qBAACA,OAAgB,SAAjB;EACE,aAAU;EACV,aAAW;EACX,WAAW,GACT,w1BACA,SACF;EACA,GAAI;EAPN,UAAA,CASG,UACD,oBAACA,OAAgB,MAAjB,EACE,QACE,oBAAC,iBAAD,EAAiB,WAAU,mDAAoD,CAAA,EAElF,CAAA,CACsB;;AAE7B;AAEA,SAAS,cAAc,EACrB,WACA,UACA,OAAO,UACP,aAAa,GACb,QAAQ,UACR,cAAc,GACd,uBAAuB,MACvB,GAAG,SAKA;CACH,OACE,oBAACA,OAAgB,QAAjB,EAAA,UACE,oBAACA,OAAgB,YAAjB;EACQ;EACM;EACL;EACM;EACS;EACtB,WAAU;EAEV,UAAA,qBAACA,OAAgB,OAAjB;GACE,aAAU;GACV,sBAAoB;GACpB,WAAW,GAAG,gpBAAgpB,SAAU;GACxqB,GAAI;GAJN,UAAA;IAME,oBAAC,sBAAD,CAAuB,CAAA;IACvB,oBAACA,OAAgB,MAAjB,EAAuB,SAA+B,CAAA;IACtD,oBAAC,wBAAD,CAAyB,CAAA;GACJ;;CACG,CAAA,EACN,CAAA;AAE5B;AAEA,SAAS,YAAY,EACnB,WACA,GAAG,SACgC;CACnC,OACE,oBAACA,OAAgB,YAAjB;EACE,aAAU;EACV,WAAW,GAAG,6CAA6C,SAAS;EACpE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SAC0B;CAC7B,OACE,qBAACA,OAAgB,MAAjB;EACE,aAAU;EACV,WAAW,GACT,sbACA,SACF;EACA,GAAI;EANN,UAAA,CAQE,oBAACA,OAAgB,UAAjB;GAA0B,WAAU;GACjC;EACuB,CAAA,GAC1B,oBAACA,OAAgB,eAAjB;GACE,QACE,oBAAC,QAAD,EAAM,WAAU,+EAAgF,CAAA;GAGlG,UAAA,oBAAC,WAAD,EAAW,WAAU,sBAAuB,CAAA;EACf,CAAA,CACX;;AAE1B;AAEA,SAAS,gBAAgB,EACvB,WACA,GAAG,SAC+B;CAClC,OACE,oBAACA,OAAgB,WAAjB;EACE,aAAU;EACV,WAAW,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC0D;CAC7D,OACE,oBAACA,OAAgB,eAAjB;EACE,aAAU;EACV,WAAW,GACT,0HACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,eAAD,CACC,CAAA;CAC4B,CAAA;AAEnC;AAEA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC4D;CAC/D,OACE,oBAACA,OAAgB,iBAAjB;EACE,aAAU;EACV,WAAW,GACT,6HACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,iBAAD,CACC,CAAA;CAC8B,CAAA;AAErC"}
|
|
@@ -8,7 +8,7 @@ let cn = require("cn");
|
|
|
8
8
|
function Textarea({ className, ...props }) {
|
|
9
9
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
10
10
|
"data-slot": "textarea",
|
|
11
|
-
className: (0, cn.cn)("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-base transition-colors outline-none placeholder:text-
|
|
11
|
+
className: (0, cn.cn)("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-base transition-colors outline-none placeholder:text-berget-placeholder-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
12
12
|
...props
|
|
13
13
|
});
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.cjs","names":[],"sources":["../../src/primitives/textarea.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-base transition-colors outline-none placeholder:text-
|
|
1
|
+
{"version":3,"file":"textarea.cjs","names":[],"sources":["../../src/primitives/textarea.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-base transition-colors outline-none placeholder:text-berget-placeholder-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Textarea }\n"],"mappings":";;;;;;;AAKA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA2C;CAC3E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAD;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CACT,mhBACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -6,7 +6,7 @@ import { cn } from "cn";
|
|
|
6
6
|
function Textarea({ className, ...props }) {
|
|
7
7
|
return /* @__PURE__ */ jsx("textarea", {
|
|
8
8
|
"data-slot": "textarea",
|
|
9
|
-
className: cn("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-base transition-colors outline-none placeholder:text-
|
|
9
|
+
className: cn("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-base transition-colors outline-none placeholder:text-berget-placeholder-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.mjs","names":[],"sources":["../../src/primitives/textarea.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-base transition-colors outline-none placeholder:text-
|
|
1
|
+
{"version":3,"file":"textarea.mjs","names":[],"sources":["../../src/primitives/textarea.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-base transition-colors outline-none placeholder:text-berget-placeholder-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Textarea }\n"],"mappings":";;;;;AAKA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA2C;CAC3E,OACE,oBAAC,YAAD;EACE,aAAU;EACV,WAAW,GACT,mhBACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_collapsible = require("./collapsible.cjs");
|
|
3
|
+
let react = require("react");
|
|
4
|
+
react = require_runtime.__toESM(react, 1);
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let cn = require("cn");
|
|
7
|
+
let lucide_react = require("lucide-react");
|
|
8
|
+
//#region src/primitives/trace.tsx
|
|
9
|
+
function Trace({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11
|
+
"data-slot": "trace",
|
|
12
|
+
className: (0, cn.cn)("flex w-full min-w-0 flex-col gap-2 *:has-[>[data-slot=trace-line]]:flex *:has-[>[data-slot=trace-line]]:w-fit *:has-[>[data-slot=trace-line]]:max-w-full *:has-[>[data-slot=trace-line]]:min-w-0 *:has-[>[data-slot=trace-line]]:rounded-md *:has-[>[data-slot=trace-line]]:text-left *:has-[>[data-slot=trace-line]]:outline-none *:has-[>[data-slot=trace-line]]:focus-visible:ring-3 *:has-[>[data-slot=trace-line]]:focus-visible:ring-ring/50", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function TraceLine({ className, status, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
18
|
+
"data-slot": "trace-line",
|
|
19
|
+
"data-status": status,
|
|
20
|
+
className: (0, cn.cn)("flex w-fit max-w-full min-w-0 items-center gap-2 text-sm text-muted-foreground transition-colors in-[a,button]:cursor-pointer in-[a:hover,button:hover]:text-foreground data-[status=error]:text-destructive data-[status=error]:in-[a:hover,button:hover]:text-destructive data-[status=pending]:opacity-60 data-[status=running]:*:data-[slot=trace-title]:shimmer", className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function TraceIcon({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
26
|
+
"data-slot": "trace-icon",
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
className: (0, cn.cn)("flex size-4 shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [[data-slot=trace-title]~&]:-ml-1", className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function TraceTitle({ className, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
34
|
+
"data-slot": "trace-title",
|
|
35
|
+
className: (0, cn.cn)("min-w-0 truncate motion-reduce:shimmer-none", className),
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function TraceDescription({ className, ...props }) {
|
|
40
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
41
|
+
"data-slot": "trace-description",
|
|
42
|
+
className: (0, cn.cn)("shrink-0 text-muted-foreground/70 tabular-nums", className),
|
|
43
|
+
...props
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function TraceCollapsible({ className, ...props }) {
|
|
47
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_collapsible.Collapsible, {
|
|
48
|
+
"data-slot": "trace-collapsible",
|
|
49
|
+
className: (0, cn.cn)("flex w-full min-w-0 flex-col", className),
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function TraceCollapsibleTrigger({ className, children, ...props }) {
|
|
54
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_collapsible.CollapsibleTrigger, {
|
|
55
|
+
"data-slot": "trace-collapsible-trigger",
|
|
56
|
+
className: (0, cn.cn)("group/trace-collapsible-trigger flex w-fit max-w-full min-w-0 cursor-pointer items-center gap-1 rounded-md text-left text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 has-[[data-status=error]]:text-destructive", className),
|
|
57
|
+
...props,
|
|
58
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TraceIcon, {
|
|
59
|
+
className: "transition-transform group-aria-expanded/trace-collapsible-trigger:rotate-90",
|
|
60
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRightIcon, {})
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function TraceCollapsibleContent({ className, children, ...props }) {
|
|
65
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_collapsible.CollapsibleContent, {
|
|
66
|
+
"data-slot": "trace-collapsible-content",
|
|
67
|
+
className: "h-(--collapsible-panel-height) min-w-0 overflow-hidden transition-[height] duration-200 data-ending-style:h-0 data-starting-style:h-0",
|
|
68
|
+
...props,
|
|
69
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
70
|
+
"data-slot": "trace-collapsible-content-inner",
|
|
71
|
+
className: (0, cn.cn)("mt-2 mb-1 ml-[calc(--spacing(2)-1px)] min-w-0 border-l pr-1 pl-4 leading-relaxed wrap-break-word text-muted-foreground", className),
|
|
72
|
+
children
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
exports.Trace = Trace;
|
|
78
|
+
exports.TraceCollapsible = TraceCollapsible;
|
|
79
|
+
exports.TraceCollapsibleContent = TraceCollapsibleContent;
|
|
80
|
+
exports.TraceCollapsibleTrigger = TraceCollapsibleTrigger;
|
|
81
|
+
exports.TraceDescription = TraceDescription;
|
|
82
|
+
exports.TraceIcon = TraceIcon;
|
|
83
|
+
exports.TraceLine = TraceLine;
|
|
84
|
+
exports.TraceTitle = TraceTitle;
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=trace.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace.cjs","names":["Collapsible","CollapsibleTrigger","ChevronRightIcon","CollapsibleContent"],"sources":["../../src/primitives/trace.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { cn } from \"cn\"\n\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/primitives/collapsible\"\nimport { ChevronRightIcon } from \"lucide-react\"\n\nfunction Trace({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"trace\"\n className={cn(\n \"flex w-full min-w-0 flex-col gap-2 *:has-[>[data-slot=trace-line]]:flex *:has-[>[data-slot=trace-line]]:w-fit *:has-[>[data-slot=trace-line]]:max-w-full *:has-[>[data-slot=trace-line]]:min-w-0 *:has-[>[data-slot=trace-line]]:rounded-md *:has-[>[data-slot=trace-line]]:text-left *:has-[>[data-slot=trace-line]]:outline-none *:has-[>[data-slot=trace-line]]:focus-visible:ring-3 *:has-[>[data-slot=trace-line]]:focus-visible:ring-ring/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TraceLine({\n className,\n status,\n ...props\n}: React.ComponentProps<\"span\"> & {\n status?: \"running\" | \"error\" | \"pending\"\n}) {\n return (\n <span\n data-slot=\"trace-line\"\n data-status={status}\n className={cn(\n \"flex w-fit max-w-full min-w-0 items-center gap-2 text-sm text-muted-foreground transition-colors in-[a,button]:cursor-pointer in-[a:hover,button:hover]:text-foreground data-[status=error]:text-destructive data-[status=error]:in-[a:hover,button:hover]:text-destructive data-[status=pending]:opacity-60 data-[status=running]:*:data-[slot=trace-title]:shimmer\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TraceIcon({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"trace-icon\"\n aria-hidden=\"true\"\n className={cn(\n \"flex size-4 shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [[data-slot=trace-title]~&]:-ml-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TraceTitle({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"trace-title\"\n className={cn(\"min-w-0 truncate motion-reduce:shimmer-none\", className)}\n {...props}\n />\n )\n}\n\nfunction TraceDescription({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"trace-description\"\n className={cn(\n \"shrink-0 text-muted-foreground/70 tabular-nums\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TraceCollapsible({\n className,\n ...props\n}: Omit<React.ComponentProps<typeof Collapsible>, \"open\"> &\n (\n | { open?: undefined }\n | {\n open: boolean\n onOpenChange: NonNullable<\n React.ComponentProps<typeof Collapsible>[\"onOpenChange\"]\n >\n }\n )) {\n return (\n <Collapsible\n data-slot=\"trace-collapsible\"\n className={cn(\"flex w-full min-w-0 flex-col\", className)}\n {...props}\n />\n )\n}\n\nfunction TraceCollapsibleTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof CollapsibleTrigger>) {\n return (\n <CollapsibleTrigger\n data-slot=\"trace-collapsible-trigger\"\n className={cn(\n \"group/trace-collapsible-trigger flex w-fit max-w-full min-w-0 cursor-pointer items-center gap-1 rounded-md text-left text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 has-[[data-status=error]]:text-destructive\",\n className\n )}\n {...props}\n >\n {children}\n <TraceIcon className=\"transition-transform group-aria-expanded/trace-collapsible-trigger:rotate-90\">\n <ChevronRightIcon\n />\n </TraceIcon>\n </CollapsibleTrigger>\n )\n}\n\nfunction TraceCollapsibleContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof CollapsibleContent>) {\n return (\n <CollapsibleContent\n data-slot=\"trace-collapsible-content\"\n className=\"h-(--collapsible-panel-height) min-w-0 overflow-hidden transition-[height] duration-200 data-ending-style:h-0 data-starting-style:h-0\"\n {...props}\n >\n <div\n data-slot=\"trace-collapsible-content-inner\"\n className={cn(\n \"mt-2 mb-1 ml-[calc(--spacing(2)-1px)] min-w-0 border-l pr-1 pl-4 leading-relaxed wrap-break-word text-muted-foreground\",\n className\n )}\n >\n {children}\n </div>\n </CollapsibleContent>\n )\n}\n\nexport {\n Trace,\n TraceLine,\n TraceIcon,\n TraceTitle,\n TraceDescription,\n TraceCollapsible,\n TraceCollapsibleTrigger,\n TraceCollapsibleContent,\n}\n"],"mappings":";;;;;;;;AAUA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAsC;CACnE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CACT,sbACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,UAAU,EACjB,WACA,QACA,GAAG,SAGF;CACD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,aAAU;EACV,eAAa;EACb,YAAA,GAAW,GAAA,GAAA,CACT,wWACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,U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,kBAAA,IAAA,CAAC,OAAD;GACE,aAAU;GACV,YAAA,GAAW,GAAA,GAAA,CACT,0HACA,SACF;GAEC;EACE,CAAA;CACa,CAAA;AAExB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./collapsible.cjs";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/primitives/trace.d.ts
|
|
4
|
+
declare function Trace({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TraceLine({ className, status, ...props }: React.ComponentProps<"span"> & {
|
|
6
|
+
status?: "running" | "error" | "pending";
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function TraceIcon({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function TraceTitle({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function TraceDescription({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function TraceCollapsible({ className, ...props }: Omit<React.ComponentProps<typeof Collapsible>, "open"> & ({
|
|
12
|
+
open?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
open: boolean;
|
|
15
|
+
onOpenChange: NonNullable<React.ComponentProps<typeof Collapsible>["onOpenChange"]>;
|
|
16
|
+
})): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function TraceCollapsibleTrigger({ className, children, ...props }: React.ComponentProps<typeof CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function TraceCollapsibleContent({ className, children, ...props }: React.ComponentProps<typeof CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle };
|
|
21
|
+
//# sourceMappingURL=trace.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace.d.cts","names":[],"sources":["../../src/primitives/trace.tsx"],"mappings":";;;iBAUS,QAAQ,cAAc,SAAS,MAAM,oDAAqB,IAAA;iBAa1D,YACP,WACA,WACG,SACF,MAAM;EACP;gCACD,IAAA;iBAcQ,YAAY,cAAc,SAAS,MAAM,qDAAsB,IAAA;iBAc/D,aAAa,cAAc,SAAS,MAAM,qDAAsB,IAAA;iBAUhE,mBACP,cACG,SACF,MAAM,qDAAsB,IAAA;iBAatB,mBACP,cACG,SACF,KAAK,MAAM,sBAAsB;EAE5B;;EAEA;EACA,cAAc,YACZ,MAAM,sBAAsB;iCAGnC,IAAA;iBAUM,0BACP,WACA,aACG,SACF,MAAM,sBAAsB,kDAAmB,IAAA;iBAmBzC,0BACP,WACA,aACG,SACF,MAAM,sBAAsB,kDAAmB,IAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./collapsible.mjs";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/primitives/trace.d.ts
|
|
4
|
+
declare function Trace({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TraceLine({ className, status, ...props }: React.ComponentProps<"span"> & {
|
|
6
|
+
status?: "running" | "error" | "pending";
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function TraceIcon({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function TraceTitle({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function TraceDescription({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function TraceCollapsible({ className, ...props }: Omit<React.ComponentProps<typeof Collapsible>, "open"> & ({
|
|
12
|
+
open?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
open: boolean;
|
|
15
|
+
onOpenChange: NonNullable<React.ComponentProps<typeof Collapsible>["onOpenChange"]>;
|
|
16
|
+
})): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function TraceCollapsibleTrigger({ className, children, ...props }: React.ComponentProps<typeof CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function TraceCollapsibleContent({ className, children, ...props }: React.ComponentProps<typeof CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle };
|
|
21
|
+
//# sourceMappingURL=trace.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace.d.mts","names":[],"sources":["../../src/primitives/trace.tsx"],"mappings":";;;iBAUS,QAAQ,cAAc,SAAS,MAAM,oDAAqB,IAAA;iBAa1D,YACP,WACA,WACG,SACF,MAAM;EACP;gCACD,IAAA;iBAcQ,YAAY,cAAc,SAAS,MAAM,qDAAsB,IAAA;iBAc/D,aAAa,cAAc,SAAS,MAAM,qDAAsB,IAAA;iBAUhE,mBACP,cACG,SACF,MAAM,qDAAsB,IAAA;iBAatB,mBACP,cACG,SACF,KAAK,MAAM,sBAAsB;EAE5B;;EAEA;EACA,cAAc,YACZ,MAAM,sBAAsB;iCAGnC,IAAA;iBAUM,0BACP,WACA,aACG,SACF,MAAM,sBAAsB,kDAAmB,IAAA;iBAmBzC,0BACP,WACA,aACG,SACF,MAAM,sBAAsB,kDAAmB,IAAA"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./collapsible.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
import { ChevronRightIcon } from "lucide-react";
|
|
6
|
+
//#region src/primitives/trace.tsx
|
|
7
|
+
function Trace({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx("div", {
|
|
9
|
+
"data-slot": "trace",
|
|
10
|
+
className: cn("flex w-full min-w-0 flex-col gap-2 *:has-[>[data-slot=trace-line]]:flex *:has-[>[data-slot=trace-line]]:w-fit *:has-[>[data-slot=trace-line]]:max-w-full *:has-[>[data-slot=trace-line]]:min-w-0 *:has-[>[data-slot=trace-line]]:rounded-md *:has-[>[data-slot=trace-line]]:text-left *:has-[>[data-slot=trace-line]]:outline-none *:has-[>[data-slot=trace-line]]:focus-visible:ring-3 *:has-[>[data-slot=trace-line]]:focus-visible:ring-ring/50", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function TraceLine({ className, status, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx("span", {
|
|
16
|
+
"data-slot": "trace-line",
|
|
17
|
+
"data-status": status,
|
|
18
|
+
className: cn("flex w-fit max-w-full min-w-0 items-center gap-2 text-sm text-muted-foreground transition-colors in-[a,button]:cursor-pointer in-[a:hover,button:hover]:text-foreground data-[status=error]:text-destructive data-[status=error]:in-[a:hover,button:hover]:text-destructive data-[status=pending]:opacity-60 data-[status=running]:*:data-[slot=trace-title]:shimmer", className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function TraceIcon({ className, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx("span", {
|
|
24
|
+
"data-slot": "trace-icon",
|
|
25
|
+
"aria-hidden": "true",
|
|
26
|
+
className: cn("flex size-4 shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [[data-slot=trace-title]~&]:-ml-1", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function TraceTitle({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx("span", {
|
|
32
|
+
"data-slot": "trace-title",
|
|
33
|
+
className: cn("min-w-0 truncate motion-reduce:shimmer-none", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function TraceDescription({ className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("span", {
|
|
39
|
+
"data-slot": "trace-description",
|
|
40
|
+
className: cn("shrink-0 text-muted-foreground/70 tabular-nums", className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function TraceCollapsible({ className, ...props }) {
|
|
45
|
+
return /* @__PURE__ */ jsx(Collapsible, {
|
|
46
|
+
"data-slot": "trace-collapsible",
|
|
47
|
+
className: cn("flex w-full min-w-0 flex-col", className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function TraceCollapsibleTrigger({ className, children, ...props }) {
|
|
52
|
+
return /* @__PURE__ */ jsxs(CollapsibleTrigger, {
|
|
53
|
+
"data-slot": "trace-collapsible-trigger",
|
|
54
|
+
className: cn("group/trace-collapsible-trigger flex w-fit max-w-full min-w-0 cursor-pointer items-center gap-1 rounded-md text-left text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 has-[[data-status=error]]:text-destructive", className),
|
|
55
|
+
...props,
|
|
56
|
+
children: [children, /* @__PURE__ */ jsx(TraceIcon, {
|
|
57
|
+
className: "transition-transform group-aria-expanded/trace-collapsible-trigger:rotate-90",
|
|
58
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function TraceCollapsibleContent({ className, children, ...props }) {
|
|
63
|
+
return /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
64
|
+
"data-slot": "trace-collapsible-content",
|
|
65
|
+
className: "h-(--collapsible-panel-height) min-w-0 overflow-hidden transition-[height] duration-200 data-ending-style:h-0 data-starting-style:h-0",
|
|
66
|
+
...props,
|
|
67
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
68
|
+
"data-slot": "trace-collapsible-content-inner",
|
|
69
|
+
className: cn("mt-2 mb-1 ml-[calc(--spacing(2)-1px)] min-w-0 border-l pr-1 pl-4 leading-relaxed wrap-break-word text-muted-foreground", className),
|
|
70
|
+
children
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle };
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=trace.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace.mjs","names":[],"sources":["../../src/primitives/trace.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { cn } from \"cn\"\n\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/primitives/collapsible\"\nimport { ChevronRightIcon } from \"lucide-react\"\n\nfunction Trace({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"trace\"\n className={cn(\n \"flex w-full min-w-0 flex-col gap-2 *:has-[>[data-slot=trace-line]]:flex *:has-[>[data-slot=trace-line]]:w-fit *:has-[>[data-slot=trace-line]]:max-w-full *:has-[>[data-slot=trace-line]]:min-w-0 *:has-[>[data-slot=trace-line]]:rounded-md *:has-[>[data-slot=trace-line]]:text-left *:has-[>[data-slot=trace-line]]:outline-none *:has-[>[data-slot=trace-line]]:focus-visible:ring-3 *:has-[>[data-slot=trace-line]]:focus-visible:ring-ring/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TraceLine({\n className,\n status,\n ...props\n}: React.ComponentProps<\"span\"> & {\n status?: \"running\" | \"error\" | \"pending\"\n}) {\n return (\n <span\n data-slot=\"trace-line\"\n data-status={status}\n className={cn(\n \"flex w-fit max-w-full min-w-0 items-center gap-2 text-sm text-muted-foreground transition-colors in-[a,button]:cursor-pointer in-[a:hover,button:hover]:text-foreground data-[status=error]:text-destructive data-[status=error]:in-[a:hover,button:hover]:text-destructive data-[status=pending]:opacity-60 data-[status=running]:*:data-[slot=trace-title]:shimmer\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TraceIcon({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"trace-icon\"\n aria-hidden=\"true\"\n className={cn(\n \"flex size-4 shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [[data-slot=trace-title]~&]:-ml-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TraceTitle({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"trace-title\"\n className={cn(\"min-w-0 truncate motion-reduce:shimmer-none\", className)}\n {...props}\n />\n )\n}\n\nfunction TraceDescription({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"trace-description\"\n className={cn(\n \"shrink-0 text-muted-foreground/70 tabular-nums\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TraceCollapsible({\n className,\n ...props\n}: Omit<React.ComponentProps<typeof Collapsible>, \"open\"> &\n (\n | { open?: undefined }\n | {\n open: boolean\n onOpenChange: NonNullable<\n React.ComponentProps<typeof Collapsible>[\"onOpenChange\"]\n >\n }\n )) {\n return (\n <Collapsible\n data-slot=\"trace-collapsible\"\n className={cn(\"flex w-full min-w-0 flex-col\", className)}\n {...props}\n />\n )\n}\n\nfunction TraceCollapsibleTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof CollapsibleTrigger>) {\n return (\n <CollapsibleTrigger\n data-slot=\"trace-collapsible-trigger\"\n className={cn(\n \"group/trace-collapsible-trigger flex w-fit max-w-full min-w-0 cursor-pointer items-center gap-1 rounded-md text-left text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 has-[[data-status=error]]:text-destructive\",\n className\n )}\n {...props}\n >\n {children}\n <TraceIcon className=\"transition-transform group-aria-expanded/trace-collapsible-trigger:rotate-90\">\n <ChevronRightIcon\n />\n </TraceIcon>\n </CollapsibleTrigger>\n )\n}\n\nfunction TraceCollapsibleContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof CollapsibleContent>) {\n return (\n <CollapsibleContent\n data-slot=\"trace-collapsible-content\"\n className=\"h-(--collapsible-panel-height) min-w-0 overflow-hidden transition-[height] duration-200 data-ending-style:h-0 data-starting-style:h-0\"\n {...props}\n >\n <div\n data-slot=\"trace-collapsible-content-inner\"\n className={cn(\n \"mt-2 mb-1 ml-[calc(--spacing(2)-1px)] min-w-0 border-l pr-1 pl-4 leading-relaxed wrap-break-word text-muted-foreground\",\n className\n )}\n >\n {children}\n </div>\n </CollapsibleContent>\n )\n}\n\nexport {\n Trace,\n TraceLine,\n TraceIcon,\n TraceTitle,\n TraceDescription,\n TraceCollapsible,\n TraceCollapsibleTrigger,\n TraceCollapsibleContent,\n}\n"],"mappings":";;;;;;AAUA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAsC;CACnE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,sbACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,UAAU,EACjB,WACA,QACA,GAAG,SAGF;CACD,OACE,oBAAC,QAAD;EACE,aAAU;EACV,eAAa;EACb,WAAW,GACT,wWACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAuC;CACxE,OACE,oBAAC,QAAD;EACE,aAAU;EACV,eAAY;EACZ,WAAW,GACT,uJACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAuC;CACzE,OACE,oBAAC,QAAD;EACE,aAAU;EACV,WAAW,GAAG,+CAA+C,SAAS;EACtE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,iBAAiB,EACxB,WACA,GAAG,SAC4B;CAC/B,O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