@uselets/ui 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -1
- package/dist/chart-DHS2QeM8.d.ts +80 -0
- package/dist/cli/uselets.mjs.map +1 -1
- package/dist/components/accordion.d.ts +4 -5
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.d.ts +12 -13
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.d.ts +5 -7
- package/dist/components/alert.js.map +1 -1
- package/dist/components/anchor.d.ts +3 -5
- package/dist/components/anchor.js.map +1 -1
- package/dist/components/area-chart.d.ts +58 -0
- package/dist/components/area-chart.js +2 -0
- package/dist/components/area-chart.js.map +1 -0
- package/dist/components/avatar.d.ts +6 -7
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.d.ts +7 -5
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/bar-chart.d.ts +54 -0
- package/dist/components/bar-chart.js +2 -0
- package/dist/components/bar-chart.js.map +1 -0
- package/dist/components/breadcrumb.d.ts +7 -8
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.d.ts +5 -7
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button.d.ts +4 -6
- package/dist/components/button.js +1 -1
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.d.ts +2 -3
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.d.ts +7 -8
- package/dist/components/card.js.map +1 -1
- package/dist/components/carousel.d.ts +6 -7
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/carousel.spec.js +1 -1
- package/dist/components/carousel.spec.js.map +1 -1
- package/dist/components/center.d.ts +4 -6
- package/dist/components/center.js.map +1 -1
- package/dist/components/chart.d.ts +2 -263
- package/dist/components/chart.js +1 -1
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox.d.ts +2 -4
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/code.d.ts +1 -2
- package/dist/components/code.js.map +1 -1
- package/dist/components/collapsible.d.ts +3 -4
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.d.ts +15 -16
- package/dist/components/combobox.js +1 -1
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.d.ts +9 -10
- package/dist/components/command.js.map +1 -1
- package/dist/components/container.d.ts +2 -4
- package/dist/components/container.js.map +1 -1
- package/dist/components/data-table.d.ts +164 -0
- package/dist/components/data-table.js +2 -0
- package/dist/components/data-table.js.map +1 -0
- package/dist/components/date-range-picker.d.ts +11 -12
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/dialog.d.ts +11 -13
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/donut-chart.d.ts +22 -0
- package/dist/components/donut-chart.js +2 -0
- package/dist/components/donut-chart.js.map +1 -0
- package/dist/components/drawer.d.ts +12 -14
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.d.ts +15 -16
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/dropzone.d.ts +1 -2
- package/dist/components/dropzone.js.map +1 -1
- package/dist/components/empty.d.ts +8 -10
- package/dist/components/empty.js.map +1 -1
- package/dist/components/field.d.ts +12 -14
- package/dist/components/field.js.map +1 -1
- package/dist/components/field.spec.js +1 -1
- package/dist/components/field.spec.js.map +1 -1
- package/dist/components/flex.d.ts +3 -5
- package/dist/components/flex.js.map +1 -1
- package/dist/components/grid.d.ts +2 -3
- package/dist/components/grid.js.map +1 -1
- package/dist/components/group.d.ts +7 -5
- package/dist/components/group.js +1 -1
- package/dist/components/group.js.map +1 -1
- package/dist/components/heading.d.ts +3 -5
- package/dist/components/heading.js.map +1 -1
- package/dist/components/hover-card.d.ts +3 -4
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input-group.d.ts +9 -11
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input-otp.d.ts +4 -5
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.d.ts +1 -2
- package/dist/components/input.js.map +1 -1
- package/dist/components/kbd.d.ts +2 -3
- package/dist/components/kbd.js.map +1 -1
- package/dist/components/label.d.ts +1 -2
- package/dist/components/label.js.map +1 -1
- package/dist/components/list.d.ts +6 -8
- package/dist/components/list.js.map +1 -1
- package/dist/components/mask-input.d.ts +25 -0
- package/dist/components/mask-input.js +2 -0
- package/dist/components/mask-input.js.map +1 -0
- package/dist/components/native-select.d.ts +3 -4
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/navigation-menu.d.ts +9 -11
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/pagination.d.ts +7 -8
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/pie-chart.d.ts +58 -0
- package/dist/components/pie-chart.js +2 -0
- package/dist/components/pie-chart.js.map +1 -0
- package/dist/components/popover.d.ts +7 -8
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress.d.ts +1 -2
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.d.ts +3 -5
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.d.ts +3 -4
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/scroll-area.d.ts +2 -3
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.d.ts +10 -11
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.d.ts +1 -2
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sidebar.d.ts +25 -27
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/simple-grid.d.ts +1 -2
- package/dist/components/simple-grid.js.map +1 -1
- package/dist/components/skeleton.d.ts +1 -2
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/skeleton.spec.js +1 -1
- package/dist/components/skeleton.spec.js.map +1 -1
- package/dist/components/slider.d.ts +1 -2
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sonner.d.ts +1 -2
- package/dist/components/sonner.js.map +1 -1
- package/dist/components/spinner.d.ts +2 -4
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/stack.d.ts +7 -5
- package/dist/components/stack.js +1 -1
- package/dist/components/stack.js.map +1 -1
- package/dist/components/switch.d.ts +1 -2
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts +29 -11
- package/dist/components/table.js +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.d.ts +5 -7
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/text.d.ts +3 -5
- package/dist/components/text.js.map +1 -1
- package/dist/components/textarea.d.ts +1 -2
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/theme.d.ts +2 -3
- package/dist/components/theme.js.map +1 -1
- package/dist/components/timeline.d.ts +6 -7
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/toggle-group.d.ts +2 -3
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.d.ts +2 -4
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/tooltip.d.ts +5 -6
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unstyled-button.d.ts +1 -2
- package/dist/components/unstyled-button.js.map +1 -1
- package/dist/components/visibility.d.ts +2 -3
- package/dist/components/visibility.js.map +1 -1
- package/dist/{dist-QvsLCO1I.js → dist-C35vdEt2.js} +45 -25
- package/dist/dist-C35vdEt2.js.map +1 -0
- package/dist/hooks/use-breakpoint-value.js.map +1 -1
- package/dist/hooks/use-breakpoint-value.spec.js +1 -1
- package/dist/hooks/use-breakpoint-value.spec.js.map +1 -1
- package/dist/hooks/use-breakpoint.js.map +1 -1
- package/dist/hooks/use-breakpoint.spec.js +1 -1
- package/dist/hooks/use-breakpoint.spec.js.map +1 -1
- package/dist/hooks/use-disclosure.js.map +1 -1
- package/dist/hooks/use-disclosure.spec.js +1 -1
- package/dist/hooks/use-disclosure.spec.js.map +1 -1
- package/dist/hooks/use-document-visibility.js.map +1 -1
- package/dist/hooks/use-document-visibility.spec.js +1 -1
- package/dist/hooks/use-document-visibility.spec.js.map +1 -1
- package/dist/hooks/use-idle.js.map +1 -1
- package/dist/hooks/use-idle.spec.js +1 -1
- package/dist/hooks/use-idle.spec.js.map +1 -1
- package/dist/hooks/use-interval.js.map +1 -1
- package/dist/hooks/use-interval.spec.js +1 -1
- package/dist/hooks/use-interval.spec.js.map +1 -1
- package/dist/hooks/use-local-storage.js.map +1 -1
- package/dist/hooks/use-local-storage.spec.js +1 -1
- package/dist/hooks/use-local-storage.spec.js.map +1 -1
- package/dist/hooks/use-mask.d.ts +9 -0
- package/dist/hooks/use-mask.js +2 -0
- package/dist/hooks/use-mask.js.map +1 -0
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/hooks/use-mobile.spec.js +1 -1
- package/dist/hooks/use-mobile.spec.js.map +1 -1
- package/dist/index.d.ts +11 -3
- package/dist/index.js +1 -1
- package/dist/lib/badge.d.ts +20 -0
- package/dist/lib/badge.js +2 -0
- package/dist/lib/badge.js.map +1 -0
- package/dist/lib/button.js.map +1 -1
- package/dist/lib/color.js.map +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/magic-string.es-C-uSEkg2.js.map +1 -1
- package/dist/postcss.config.js.map +1 -1
- package/dist/{react.esm-D_dNEsWM.js → react.esm-BagSCtI3.js} +11 -2
- package/dist/{react.esm-D_dNEsWM.js.map → react.esm-BagSCtI3.js.map} +1 -1
- package/dist/skills/uselets-ui/SKILL.md +1 -0
- package/dist/skills/uselets-ui/references/component-catalog.md +32 -4
- package/dist/skills/uselets-ui/references/package-guide.md +136 -1
- package/dist/styles/theme.css +4 -0
- package/package.json +15 -13
- package/skills/uselets-ui/SKILL.md +1 -0
- package/skills/uselets-ui/references/component-catalog.md +32 -4
- package/skills/uselets-ui/references/package-guide.md +136 -1
- package/dist/dist-QvsLCO1I.js.map +0 -1
|
@@ -2,17 +2,15 @@ import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
|
2
2
|
import { UIColor } from "../lib/color.js";
|
|
3
3
|
import { LabelProps } from "./label.js";
|
|
4
4
|
import { Checkbox as Checkbox$1 } from "radix-ui";
|
|
5
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
5
|
import { VariantProps } from "class-variance-authority";
|
|
7
6
|
import * as React from "react";
|
|
8
7
|
import { ReactNode } from "react";
|
|
9
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
10
8
|
|
|
11
9
|
//#region src/components/checkbox.d.ts
|
|
12
10
|
declare const checkboxVariants: (props?: ({
|
|
13
11
|
color?: "primary" | "brand" | "gray" | "zinc" | "red" | "yellow" | "blue" | "indigo" | "pink" | "green" | null | undefined;
|
|
14
12
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
15
|
-
} &
|
|
13
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
14
|
type CheckboxProps = React.ComponentProps<typeof Checkbox$1.Root> & VariantProps<typeof checkboxVariants> & {
|
|
17
15
|
color?: UIColor;
|
|
18
16
|
label?: ReactNode;
|
|
@@ -26,7 +24,7 @@ declare function Checkbox({
|
|
|
26
24
|
labelProps,
|
|
27
25
|
size,
|
|
28
26
|
...props
|
|
29
|
-
}: CheckboxProps):
|
|
27
|
+
}: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
30
28
|
//#endregion
|
|
31
29
|
export { Checkbox, CheckboxProps };
|
|
32
30
|
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{selectionControlColorVariants as t}from"../lib/color.js";import{Label as n}from"./label.js";import{useFieldControlId as r}from"./field.js";import{IconCheck as i}from"@tabler/icons-react";import{Checkbox as
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{selectionControlColorVariants as t}from"../lib/color.js";import{Label as n}from"./label.js";import{useFieldControlId as r}from"./field.js";import{IconCheck as i,IconMinus as a}from"@tabler/icons-react";import{Checkbox as o}from"radix-ui";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{cva as l}from"class-variance-authority";import{useId as u}from"react";const d=l(`border-input dark:bg-input/30 data-checked:bg-(--selection-control) data-checked:text-(--selection-control-foreground) data-checked:border-(--selection-control) aria-invalid:aria-checked:border-(--selection-control) aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex items-center justify-center border transition-colors group-has-disabled/field:opacity-50 focus-visible:ring-3 aria-invalid:ring-3 peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50`,{variants:{color:t,size:{sm:`size-3.5 rounded-[3px] [&_[data-slot=checkbox-indicator]>svg]:size-3`,md:`size-4 rounded-[4px] [&_[data-slot=checkbox-indicator]>svg]:size-3.5`,lg:`size-5 rounded-[5px] [&_[data-slot=checkbox-indicator]>svg]:size-4`}},defaultVariants:{color:`primary`,size:`md`}}),f=l(``,{variants:{size:{sm:`text-xs`,md:`text-sm`,lg:`text-xl`}},defaultVariants:{size:`md`}});function Checkbox({className:t,color:l=`primary`,id:p,label:m,labelProps:h,size:g=`md`,..._}){let v=u(),y=r(p),b=m!==void 0,x=y??(b?v:void 0),{className:S,...C}=h??{},w=s(o.Root,{"data-slot":`checkbox`,"data-color":l,"data-size":g,id:x,className:e(d({color:l,size:g}),t),..._,children:c(o.Indicator,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:[s(i,{className:`block in-data-[state=indeterminate]:hidden`}),s(a,{className:`hidden in-data-[state=indeterminate]:block`})]})});return b?c(`div`,{"data-slot":`checkbox-field`,className:`flex items-center gap-2`,children:[w,s(n,{...C,htmlFor:x,className:e(f({size:g}),S),children:m})]}):w}export{Checkbox};
|
|
2
2
|
//# sourceMappingURL=checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","names":["CheckboxPrimitive","Label"],"sources":["../../src/components/checkbox.tsx"],"sourcesContent":["import type * as React from 'react'\nimport { type ReactNode, useId } from 'react'\n\nimport { IconCheck } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui'\n\nimport type { UIColor } from '../lib/color'\nimport { selectionControlColorVariants } from '../lib/color'\nimport { cn } from '../lib/utils'\nimport { useFieldControlId } from './field'\nimport { Label, type LabelProps } from './label'\n\nconst checkboxVariants = cva(\n 'border-input dark:bg-input/30 data-checked:bg-(--selection-control) data-checked:text-(--selection-control-foreground) data-checked:border-(--selection-control) aria-invalid:aria-checked:border-(--selection-control) aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex items-center justify-center border transition-colors group-has-disabled/field:opacity-50 focus-visible:ring-3 aria-invalid:ring-3 peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n color: selectionControlColorVariants,\n size: {\n sm: 'size-3.5 rounded-[3px] [&_[data-slot=checkbox-indicator]>svg]:size-3',\n md: 'size-4 rounded-[4px] [&_[data-slot=checkbox-indicator]>svg]:size-3.5',\n lg: 'size-5 rounded-[5px] [&_[data-slot=checkbox-indicator]>svg]:size-4'\n }\n },\n defaultVariants: {\n color: 'primary',\n size: 'md'\n }\n }\n)\n\nconst checkboxLabelVariants = cva('', {\n variants: {\n size: {\n sm: 'text-xs',\n md: 'text-sm',\n lg: 'text-xl'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nexport type CheckboxProps = React.ComponentProps<typeof CheckboxPrimitive.Root> &\n VariantProps<typeof checkboxVariants> & {\n color?: UIColor\n label?: ReactNode\n labelProps?: Omit<LabelProps, 'children' | 'htmlFor'>\n }\n\nfunction Checkbox({ className, color = 'primary', id, label, labelProps, size = 'md', ...props }: CheckboxProps) {\n const generatedId = useId()\n const fieldControlId = useFieldControlId(id)\n const hasLabel = label !== undefined\n const resolvedId = fieldControlId ?? (hasLabel ? generatedId : undefined)\n const { className: labelClassName, ...labelRootProps } = labelProps ?? {}\n\n const checkbox = (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n data-color={color}\n data-size={size}\n id={resolvedId}\n className={cn(checkboxVariants({ color, size }), className)}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none\"\n >\n <IconCheck />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n\n if (!hasLabel) {\n return checkbox\n }\n\n return (\n <div data-slot=\"checkbox-field\" className=\"flex items-center gap-2\">\n {checkbox}\n <Label {...labelRootProps} htmlFor={resolvedId} className={cn(checkboxLabelVariants({ size }), labelClassName)}>\n {label}\n </Label>\n </div>\n )\n}\n\nexport { Checkbox }\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkbox.js","names":["CheckboxPrimitive","Label"],"sources":["../../src/components/checkbox.tsx"],"sourcesContent":["import type * as React from 'react'\nimport { type ReactNode, useId } from 'react'\n\nimport { IconCheck, IconMinus } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui'\n\nimport type { UIColor } from '../lib/color'\nimport { selectionControlColorVariants } from '../lib/color'\nimport { cn } from '../lib/utils'\nimport { useFieldControlId } from './field'\nimport { Label, type LabelProps } from './label'\n\nconst checkboxVariants = cva(\n 'border-input dark:bg-input/30 data-checked:bg-(--selection-control) data-checked:text-(--selection-control-foreground) data-checked:border-(--selection-control) aria-invalid:aria-checked:border-(--selection-control) aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex items-center justify-center border transition-colors group-has-disabled/field:opacity-50 focus-visible:ring-3 aria-invalid:ring-3 peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n color: selectionControlColorVariants,\n size: {\n sm: 'size-3.5 rounded-[3px] [&_[data-slot=checkbox-indicator]>svg]:size-3',\n md: 'size-4 rounded-[4px] [&_[data-slot=checkbox-indicator]>svg]:size-3.5',\n lg: 'size-5 rounded-[5px] [&_[data-slot=checkbox-indicator]>svg]:size-4'\n }\n },\n defaultVariants: {\n color: 'primary',\n size: 'md'\n }\n }\n)\n\nconst checkboxLabelVariants = cva('', {\n variants: {\n size: {\n sm: 'text-xs',\n md: 'text-sm',\n lg: 'text-xl'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nexport type CheckboxProps = React.ComponentProps<typeof CheckboxPrimitive.Root> &\n VariantProps<typeof checkboxVariants> & {\n color?: UIColor\n label?: ReactNode\n labelProps?: Omit<LabelProps, 'children' | 'htmlFor'>\n }\n\nfunction Checkbox({ className, color = 'primary', id, label, labelProps, size = 'md', ...props }: CheckboxProps) {\n const generatedId = useId()\n const fieldControlId = useFieldControlId(id)\n const hasLabel = label !== undefined\n const resolvedId = fieldControlId ?? (hasLabel ? generatedId : undefined)\n const { className: labelClassName, ...labelRootProps } = labelProps ?? {}\n\n const checkbox = (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n data-color={color}\n data-size={size}\n id={resolvedId}\n className={cn(checkboxVariants({ color, size }), className)}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none\"\n >\n <IconCheck className=\"block in-data-[state=indeterminate]:hidden\" />\n <IconMinus className=\"hidden in-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n\n if (!hasLabel) {\n return checkbox\n }\n\n return (\n <div data-slot=\"checkbox-field\" className=\"flex items-center gap-2\">\n {checkbox}\n <Label {...labelRootProps} htmlFor={resolvedId} className={cn(checkboxLabelVariants({ size }), labelClassName)}>\n {label}\n </Label>\n </div>\n )\n}\n\nexport { Checkbox }\n"],"mappings":"sbAaA,MAAM,EAAmB,EACvB,0qBACA,CACE,SAAU,CACR,MAAO,EACP,KAAM,CACJ,GAAI,uEACJ,GAAI,uEACJ,GAAI,oEACN,CACF,EACA,gBAAiB,CACf,MAAO,UACP,KAAM,IACR,CACF,CACF,EAEM,EAAwB,EAAI,GAAI,CACpC,SAAU,CACR,KAAM,CACJ,GAAI,UACJ,GAAI,UACJ,GAAI,SACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EASD,SAAS,SAAS,CAAE,YAAW,QAAQ,UAAW,KAAI,QAAO,aAAY,OAAO,KAAM,GAAG,GAAwB,CAC/G,IAAM,EAAc,EAAM,EACpB,EAAiB,EAAkB,CAAE,EACrC,EAAW,IAAU,IAAA,GACrB,EAAa,IAAmB,EAAW,EAAc,IAAA,IACzD,CAAE,UAAW,EAAgB,GAAG,GAAmB,GAAc,CAAC,EAElE,EACJ,EAACA,EAAkB,KAAnB,CACE,YAAU,WACV,aAAY,EACZ,YAAW,EACX,GAAI,EACJ,UAAW,EAAG,EAAiB,CAAE,QAAO,MAAK,CAAC,EAAG,CAAS,EAC1D,GAAI,WAEJ,EAACA,EAAkB,UAAnB,CACE,YAAU,qBACV,UAAU,kEAFZ,CAIE,EAAC,EAAD,CAAW,UAAU,4CAA8C,CAAA,EACnE,EAAC,EAAD,CAAW,UAAU,4CAA8C,CAAA,CACxC,GACP,CAAA,EAO1B,OAJK,EAKH,EAAC,MAAD,CAAK,YAAU,iBAAiB,UAAU,mCAA1C,CACG,EACD,EAACC,EAAD,CAAO,GAAI,EAAgB,QAAS,EAAY,UAAW,EAAG,EAAsB,CAAE,MAAK,CAAC,EAAG,CAAc,WAC1G,CACI,CAAA,CACJ,IATE,CAWX"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
|
|
5
4
|
//#region src/components/code.d.ts
|
|
@@ -7,7 +6,7 @@ type CodeProps = React.ComponentProps<'code'>;
|
|
|
7
6
|
declare function Code({
|
|
8
7
|
className,
|
|
9
8
|
...props
|
|
10
|
-
}: CodeProps):
|
|
9
|
+
}: CodeProps): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
//#endregion
|
|
12
11
|
export { Code, CodeProps };
|
|
13
12
|
//# sourceMappingURL=code.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.js","names":[],"sources":["../../src/components/code.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\nexport type CodeProps = React.ComponentProps<'code'>\n\nfunction Code({ className, ...props }: CodeProps) {\n return (\n <code\n data-slot=\"code\"\n className={cn(\n 'bg-muted text-foreground inline-flex w-fit items-center rounded-md px-1.5 py-0.5 font-mono text-[0.875em] font-medium',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Code }\n"],"mappings":"0GAMA,SAAS,KAAK,CAAE,YAAW,GAAG,GAAoB,CAChD,OACE,EAAC,OAAD,CACE,YAAU,OACV,UAAW,EACT,wHACA,
|
|
1
|
+
{"version":3,"file":"code.js","names":[],"sources":["../../src/components/code.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\nexport type CodeProps = React.ComponentProps<'code'>\n\nfunction Code({ className, ...props }: CodeProps) {\n return (\n <code\n data-slot=\"code\"\n className={cn(\n 'bg-muted text-foreground inline-flex w-fit items-center rounded-md px-1.5 py-0.5 font-mono text-[0.875em] font-medium',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Code }\n"],"mappings":"0GAMA,SAAS,KAAK,CAAE,YAAW,GAAG,GAAoB,CAChD,OACE,EAAC,OAAD,CACE,YAAU,OACV,UAAW,EACT,wHACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
2
|
import { Collapsible as Collapsible$1 } from "radix-ui";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
3
|
|
|
5
4
|
//#region src/components/collapsible.d.ts
|
|
6
5
|
type CollapsibleProps = React.ComponentProps<typeof Collapsible$1.Root>;
|
|
@@ -8,13 +7,13 @@ type CollapsibleTriggerProps = React.ComponentProps<typeof Collapsible$1.Collaps
|
|
|
8
7
|
type CollapsibleContentProps = React.ComponentProps<typeof Collapsible$1.CollapsibleContent>;
|
|
9
8
|
declare function Collapsible({
|
|
10
9
|
...props
|
|
11
|
-
}: CollapsibleProps):
|
|
10
|
+
}: CollapsibleProps): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
declare function CollapsibleTrigger({
|
|
13
12
|
...props
|
|
14
|
-
}: CollapsibleTriggerProps):
|
|
13
|
+
}: CollapsibleTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
declare function CollapsibleContent({
|
|
16
15
|
...props
|
|
17
|
-
}: CollapsibleContentProps):
|
|
16
|
+
}: CollapsibleContentProps): import("react/jsx-runtime").JSX.Element;
|
|
18
17
|
//#endregion
|
|
19
18
|
export { Collapsible, CollapsibleContent, CollapsibleContentProps, CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerProps };
|
|
20
19
|
//# sourceMappingURL=collapsible.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.js","names":["CollapsiblePrimitive"],"sources":["../../src/components/collapsible.tsx"],"sourcesContent":["import { Collapsible as CollapsiblePrimitive } from 'radix-ui'\n\nexport type CollapsibleProps = React.ComponentProps<typeof CollapsiblePrimitive.Root>\n\nexport type CollapsibleTriggerProps = React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>\n\nexport type CollapsibleContentProps = React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>\n\nfunction Collapsible({ ...props }: CollapsibleProps) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />\n}\n\nfunction CollapsibleTrigger({ ...props }: CollapsibleTriggerProps) {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />\n}\n\nfunction CollapsibleContent({ ...props }: CollapsibleContentProps) {\n return <CollapsiblePrimitive.CollapsibleContent data-slot=\"collapsible-content\" {...props} />\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger }\n"],"mappings":"4GAQA,SAAS,YAAY,CAAE,GAAG,GAA2B,CACnD,OAAO,EAACA,EAAqB,KAAtB,CAA2B,YAAU,cAAc,GAAI,
|
|
1
|
+
{"version":3,"file":"collapsible.js","names":["CollapsiblePrimitive"],"sources":["../../src/components/collapsible.tsx"],"sourcesContent":["import { Collapsible as CollapsiblePrimitive } from 'radix-ui'\n\nexport type CollapsibleProps = React.ComponentProps<typeof CollapsiblePrimitive.Root>\n\nexport type CollapsibleTriggerProps = React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>\n\nexport type CollapsibleContentProps = React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>\n\nfunction Collapsible({ ...props }: CollapsibleProps) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />\n}\n\nfunction CollapsibleTrigger({ ...props }: CollapsibleTriggerProps) {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />\n}\n\nfunction CollapsibleContent({ ...props }: CollapsibleContentProps) {\n return <CollapsiblePrimitive.CollapsibleContent data-slot=\"collapsible-content\" {...props} />\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger }\n"],"mappings":"4GAQA,SAAS,YAAY,CAAE,GAAG,GAA2B,CACnD,OAAO,EAACA,EAAqB,KAAtB,CAA2B,YAAU,cAAc,GAAI,CAAQ,CAAA,CACxE,CAEA,SAAS,mBAAmB,CAAE,GAAG,GAAkC,CACjE,OAAO,EAACA,EAAqB,mBAAtB,CAAyC,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAC9F,CAEA,SAAS,mBAAmB,CAAE,GAAG,GAAkC,CACjE,OAAO,EAACA,EAAqB,mBAAtB,CAAyC,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAC9F"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
import { Combobox as Combobox$1 } from "@base-ui/react";
|
|
5
4
|
|
|
@@ -32,17 +31,17 @@ type ComboboxChipsInputProps = Combobox$1.Input.Props;
|
|
|
32
31
|
declare const Combobox: typeof Combobox$1.Root;
|
|
33
32
|
declare function ComboboxValue({
|
|
34
33
|
...props
|
|
35
|
-
}: ComboboxValueProps):
|
|
34
|
+
}: ComboboxValueProps): import("react/jsx-runtime").JSX.Element;
|
|
36
35
|
declare function ComboboxTrigger({
|
|
37
36
|
className,
|
|
38
37
|
children,
|
|
39
38
|
icon,
|
|
40
39
|
...props
|
|
41
|
-
}: ComboboxTriggerProps):
|
|
40
|
+
}: ComboboxTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
42
41
|
declare function ComboboxClear({
|
|
43
42
|
className,
|
|
44
43
|
...props
|
|
45
|
-
}: ComboboxClearProps):
|
|
44
|
+
}: ComboboxClearProps): import("react/jsx-runtime").JSX.Element;
|
|
46
45
|
declare function ComboboxInput({
|
|
47
46
|
className,
|
|
48
47
|
children,
|
|
@@ -53,7 +52,7 @@ declare function ComboboxInput({
|
|
|
53
52
|
showClear,
|
|
54
53
|
triggerIcon,
|
|
55
54
|
...props
|
|
56
|
-
}: ComboboxInputProps):
|
|
55
|
+
}: ComboboxInputProps): import("react/jsx-runtime").JSX.Element;
|
|
57
56
|
declare function ComboboxContent({
|
|
58
57
|
className,
|
|
59
58
|
side,
|
|
@@ -63,50 +62,50 @@ declare function ComboboxContent({
|
|
|
63
62
|
anchor,
|
|
64
63
|
container,
|
|
65
64
|
...props
|
|
66
|
-
}: ComboboxContentProps):
|
|
65
|
+
}: ComboboxContentProps): import("react/jsx-runtime").JSX.Element;
|
|
67
66
|
declare function ComboboxList({
|
|
68
67
|
className,
|
|
69
68
|
...props
|
|
70
|
-
}: ComboboxListProps):
|
|
69
|
+
}: ComboboxListProps): import("react/jsx-runtime").JSX.Element;
|
|
71
70
|
declare function ComboboxItem({
|
|
72
71
|
className,
|
|
73
72
|
children,
|
|
74
73
|
...props
|
|
75
|
-
}: ComboboxItemProps):
|
|
74
|
+
}: ComboboxItemProps): import("react/jsx-runtime").JSX.Element;
|
|
76
75
|
declare function ComboboxGroup({
|
|
77
76
|
className,
|
|
78
77
|
...props
|
|
79
|
-
}: ComboboxGroupProps):
|
|
78
|
+
}: ComboboxGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
80
79
|
declare function ComboboxLabel({
|
|
81
80
|
className,
|
|
82
81
|
...props
|
|
83
|
-
}: ComboboxLabelProps):
|
|
82
|
+
}: ComboboxLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
84
83
|
declare function ComboboxCollection({
|
|
85
84
|
...props
|
|
86
|
-
}: ComboboxCollectionProps):
|
|
85
|
+
}: ComboboxCollectionProps): import("react/jsx-runtime").JSX.Element;
|
|
87
86
|
declare function ComboboxEmpty({
|
|
88
87
|
className,
|
|
89
88
|
...props
|
|
90
|
-
}: ComboboxEmptyProps):
|
|
89
|
+
}: ComboboxEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
91
90
|
declare function ComboboxSeparator({
|
|
92
91
|
className,
|
|
93
92
|
...props
|
|
94
|
-
}: ComboboxSeparatorProps):
|
|
93
|
+
}: ComboboxSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
95
94
|
declare function ComboboxChips({
|
|
96
95
|
className,
|
|
97
96
|
...props
|
|
98
|
-
}: ComboboxChipsProps):
|
|
97
|
+
}: ComboboxChipsProps): import("react/jsx-runtime").JSX.Element;
|
|
99
98
|
declare function ComboboxChip({
|
|
100
99
|
className,
|
|
101
100
|
children,
|
|
102
101
|
showRemove,
|
|
103
102
|
...props
|
|
104
|
-
}: ComboboxChipProps):
|
|
103
|
+
}: ComboboxChipProps): import("react/jsx-runtime").JSX.Element;
|
|
105
104
|
declare function ComboboxChipsInput({
|
|
106
105
|
className,
|
|
107
106
|
id,
|
|
108
107
|
...props
|
|
109
|
-
}: ComboboxChipsInputProps):
|
|
108
|
+
}: ComboboxChipsInputProps): import("react/jsx-runtime").JSX.Element;
|
|
110
109
|
declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
|
|
111
110
|
//#endregion
|
|
112
111
|
export { Combobox, ComboboxChip, ComboboxChipProps, ComboboxChips, ComboboxChipsInput, ComboboxChipsInputProps, ComboboxChipsProps, ComboboxClear, ComboboxClearProps, ComboboxCollection, ComboboxCollectionProps, ComboboxContent, ComboboxContentProps, ComboboxEmpty, ComboboxEmptyProps, ComboboxGroup, ComboboxGroupProps, ComboboxInput, ComboboxInputProps, ComboboxItem, ComboboxItemProps, ComboboxLabel, ComboboxLabelProps, ComboboxList, ComboboxListProps, ComboboxProps, ComboboxSeparator, ComboboxSeparatorProps, ComboboxTrigger, ComboboxTriggerProps, ComboboxValue, ComboboxValueProps, useComboboxAnchor };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{useFieldControlId as n}from"./field.js";import{InputGroup as r,InputGroupAddon as i,InputGroupButton as a,InputGroupInput as o}from"./input-group.js";import{IconCheck as s,IconSelector as c,IconX as l}from"@tabler/icons-react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import*as f from"react";import{Combobox as p}from"@base-ui/react";const m=p.Root;function ComboboxValue({...e}){return u(p.Value,{"data-slot":`combobox-value`,...e})}function ComboboxTrigger({className:t,children:n,icon:r=u(c,{className:`pointer-events-none size-4 text-muted-foreground`}),...i}){return d(p.Trigger,{"data-slot":`combobox-trigger`,className:e(`[&_svg:not([class*='size-'])]:size-4`,t),...i,children:[n,r]})}function ComboboxClear({className:t,...n}){return u(p.Clear,{"data-slot":`combobox-clear`,render:u(a,{variant:`ghost`,size:`icon-xs`}),className:e(t),...n,children:u(l,{className:`pointer-events-none`})})}function ComboboxInput({className:t,children:s,disabled:c=!1,icon:l,id:f,showTrigger:m=!0,showClear:h=!1,triggerIcon:g,..._}){let v=n(f);return d(r,{className:e(`w-auto`,t),children:[l&&u(i,{align:`inline-start`,children:l}),u(p.Input,{id:v,render:u(o,{disabled:c}),..._}),d(i,{align:`inline-end`,children:[m&&u(a,{size:`icon-xs`,variant:`ghost`,asChild:!0,"data-slot":`input-group-button`,className:`group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent`,disabled:c,children:u(ComboboxTrigger,{icon:g})}),h&&u(ComboboxClear,{disabled:c})]}),s]})}function ComboboxContent({className:t,side:n=`bottom`,sideOffset:r=6,align:i=`start`,alignOffset:a=0,anchor:o,container:s,...c}){return u(p.Portal,{container:s,className:`absolute`,children:u(p.Positioner,{side:n,sideOffset:r,align:i,alignOffset:a,anchor:o,className:`isolate z-50`,children:u(p.Popup,{"data-slot":`combobox-content`,"data-chips":!!o,className:e(`group/combobox-content max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)
|
|
1
|
+
import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{useFieldControlId as n}from"./field.js";import{InputGroup as r,InputGroupAddon as i,InputGroupButton as a,InputGroupInput as o}from"./input-group.js";import{IconCheck as s,IconSelector as c,IconX as l}from"@tabler/icons-react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import*as f from"react";import{Combobox as p}from"@base-ui/react";const m=p.Root;function ComboboxValue({...e}){return u(p.Value,{"data-slot":`combobox-value`,...e})}function ComboboxTrigger({className:t,children:n,icon:r=u(c,{className:`pointer-events-none size-4 text-muted-foreground`}),...i}){return d(p.Trigger,{"data-slot":`combobox-trigger`,className:e(`[&_svg:not([class*='size-'])]:size-4`,t),...i,children:[n,r]})}function ComboboxClear({className:t,...n}){return u(p.Clear,{"data-slot":`combobox-clear`,render:u(a,{variant:`ghost`,size:`icon-xs`}),className:e(t),...n,children:u(l,{className:`pointer-events-none`})})}function ComboboxInput({className:t,children:s,disabled:c=!1,icon:l,id:f,showTrigger:m=!0,showClear:h=!1,triggerIcon:g,..._}){let v=n(f);return d(r,{className:e(`w-auto`,t),children:[l&&u(i,{align:`inline-start`,children:l}),u(p.Input,{id:v,render:u(o,{disabled:c}),..._}),d(i,{align:`inline-end`,children:[m&&u(a,{size:`icon-xs`,variant:`ghost`,asChild:!0,"data-slot":`input-group-button`,className:`group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent`,disabled:c,children:u(ComboboxTrigger,{icon:g})}),h&&u(ComboboxClear,{disabled:c})]}),s]})}function ComboboxContent({className:t,side:n=`bottom`,sideOffset:r=6,align:i=`start`,alignOffset:a=0,anchor:o,container:s,...c}){return u(p.Portal,{container:s,className:`absolute`,children:u(p.Positioner,{side:n,sideOffset:r,align:i,alignOffset:a,anchor:o,className:`isolate z-50`,children:u(p.Popup,{"data-slot":`combobox-content`,"data-chips":!!o,className:e(`group/combobox-content max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+(--spacing(7)))] origin-(--transform-origin) overflow-hidden rounded-lg text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) 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-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none 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 animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!`,t),...c})})})}function ComboboxList({className:t,...n}){return u(p.List,{"data-slot":`combobox-list`,className:e(`no-scrollbar max-h-[min(calc(--spacing(72)-(--spacing(9))),calc(var(--available-height)-(--spacing(9))))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0`,t),...n})}function ComboboxItem({className:t,children:n,...r}){return d(p.Item,{"data-slot":`combobox-item`,className:e(`relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,t),...r,children:[n,u(p.ItemIndicator,{render:u(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:u(s,{className:`pointer-events-none`})})]})}function ComboboxGroup({className:t,...n}){return u(p.Group,{"data-slot":`combobox-group`,className:e(t),...n})}function ComboboxLabel({className:t,...n}){return u(p.GroupLabel,{"data-slot":`combobox-label`,className:e(`px-2 py-1.5 text-xs text-muted-foreground`,t),...n})}function ComboboxCollection({...e}){return u(p.Collection,{"data-slot":`combobox-collection`,...e})}function ComboboxEmpty({className:t,...n}){return u(p.Empty,{"data-slot":`combobox-empty`,className:e(`hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex`,t),...n})}function ComboboxSeparator({className:t,...n}){return u(p.Separator,{"data-slot":`combobox-separator`,className:e(`-mx-1 my-1 h-px bg-border`,t),...n})}function ComboboxChips({className:t,...n}){return u(p.Chips,{"data-slot":`combobox-chips`,className:e(`flex min-h-8 overflow-hidden flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40`,t),...n})}function ComboboxChip({className:n,children:r,showRemove:i=!0,...a}){return d(p.Chip,{"data-slot":`combobox-chip`,className:e(`flex h-[calc(--spacing(5.25))] w-fit text-left max-w-full items-center justify-start gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0`,n),...a,children:[u(`span`,{className:`flex-1 truncate`,children:r}),i&&u(p.ChipRemove,{render:u(t,{variant:`ghost`,color:`zinc`,size:`icon-xs`}),className:`-ml-1 opacity-50 shrink-0 hover:opacity-100`,"data-slot":`combobox-chip-remove`,children:u(l,{className:`pointer-events-none`})})]})}function ComboboxChipsInput({className:t,id:r,...i}){let a=n(r);return u(p.Input,{id:a,"data-slot":`combobox-chip-input`,className:e(`min-w-16 flex-1 outline-none`,t),...i})}function useComboboxAnchor(){return f.useRef(null)}export{m as Combobox,ComboboxChip,ComboboxChips,ComboboxChipsInput,ComboboxClear,ComboboxCollection,ComboboxContent,ComboboxEmpty,ComboboxGroup,ComboboxInput,ComboboxItem,ComboboxLabel,ComboboxList,ComboboxSeparator,ComboboxTrigger,ComboboxValue,useComboboxAnchor};
|
|
2
2
|
//# sourceMappingURL=combobox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.js","names":["ComboboxPrimitive"],"sources":["../../src/components/combobox.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Combobox as ComboboxPrimitive } from '@base-ui/react'\nimport { IconCheck, IconSelector, IconX } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\nimport { useFieldControlId } from './field'\nimport { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from './input-group'\n\nexport type ComboboxProps = React.ComponentProps<typeof ComboboxPrimitive.Root>\n\nexport type ComboboxValueProps = ComboboxPrimitive.Value.Props\n\nexport type ComboboxTriggerProps = ComboboxPrimitive.Trigger.Props & {\n icon?: React.ReactNode\n}\n\nexport type ComboboxClearProps = ComboboxPrimitive.Clear.Props\n\nexport type ComboboxInputProps = ComboboxPrimitive.Input.Props & {\n icon?: React.ReactNode\n triggerIcon?: React.ReactNode\n showTrigger?: boolean\n showClear?: boolean\n}\n\nexport type ComboboxContentProps = ComboboxPrimitive.Popup.Props &\n Pick<ComboboxPrimitive.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'> &\n Pick<ComboboxPrimitive.Portal.Props, 'container'>\n\nexport type ComboboxListProps = ComboboxPrimitive.List.Props\n\nexport type ComboboxItemProps = ComboboxPrimitive.Item.Props\n\nexport type ComboboxGroupProps = ComboboxPrimitive.Group.Props\n\nexport type ComboboxLabelProps = ComboboxPrimitive.GroupLabel.Props\n\nexport type ComboboxCollectionProps = ComboboxPrimitive.Collection.Props\n\nexport type ComboboxEmptyProps = ComboboxPrimitive.Empty.Props\n\nexport type ComboboxSeparatorProps = ComboboxPrimitive.Separator.Props\n\nexport type ComboboxChipsProps = React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props\n\nexport type ComboboxChipProps = ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}\n\nexport type ComboboxChipsInputProps = ComboboxPrimitive.Input.Props\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxValueProps) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n icon = <IconSelector className=\"pointer-events-none size-4 text-muted-foreground\" />,\n ...props\n}: ComboboxTriggerProps) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n {icon}\n </ComboboxPrimitive.Trigger>\n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxClearProps) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <IconX className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n icon,\n id,\n showTrigger = true,\n showClear = false,\n triggerIcon,\n ...props\n}: ComboboxInputProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <InputGroup className={cn('w-auto', className)}>\n {icon && <InputGroupAddon align=\"inline-start\">{icon}</InputGroupAddon>}\n <ComboboxPrimitive.Input id={fieldControlId} render={<InputGroupInput disabled={disabled} />} {...props} />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n asChild\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n >\n <ComboboxTrigger icon={triggerIcon} />\n </InputGroupButton>\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n )\n}\n\nfunction ComboboxContent({\n className,\n side = 'bottom',\n sideOffset = 6,\n align = 'start',\n alignOffset = 0,\n anchor,\n container,\n ...props\n}: ComboboxContentProps) {\n return (\n <ComboboxPrimitive.Portal container={container} className=\"absolute\">\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n 'group/combobox-content max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) 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-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none 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 animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!',\n className\n )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxListProps) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n 'no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({ className, children, ...props }: ComboboxItemProps) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={<span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />}\n >\n <IconCheck className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxGroupProps) {\n return <ComboboxPrimitive.Group data-slot=\"combobox-group\" className={cn(className)} {...props} />\n}\n\nfunction ComboboxLabel({ className, ...props }: ComboboxLabelProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn('px-2 py-1.5 text-xs text-muted-foreground', className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxCollectionProps) {\n return <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxEmptyProps) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n 'hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxSeparatorProps) {\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\nfunction ComboboxChips({ className, ...props }: ComboboxChipsProps) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n 'flex min-h-8 overflow-hidden flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxChip({ className, children, showRemove = true, ...props }: ComboboxChipProps) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n 'flex h-[calc(--spacing(5.25))] w-fit text-left max-w-full items-center justify-start gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0',\n className\n )}\n {...props}\n >\n <span className=\"flex-1 truncate\">{children}</span>\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" color=\"zinc\" size=\"icon-xs\" />}\n className=\"-ml-1 opacity-50 shrink-0 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <IconX className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n )\n}\n\nfunction ComboboxChipsInput({ className, id, ...props }: ComboboxChipsInputProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <ComboboxPrimitive.Input\n id={fieldControlId}\n data-slot=\"combobox-chip-input\"\n className={cn('min-w-16 flex-1 outline-none', className)}\n {...props}\n />\n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null)\n}\n\nexport {\n Combobox,\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxClear,\n ComboboxCollection,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxInput,\n ComboboxItem,\n ComboboxLabel,\n ComboboxList,\n ComboboxSeparator,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor\n}\n"],"mappings":"qcAsDA,MAAM,EAAWA,EAAkB,KAEnC,SAAS,cAAc,CAAE,GAAG,GAA6B,CACvD,OAAO,EAACA,EAAkB,MAAnB,CAAyB,YAAU,iBAAiB,GAAI,EAAS,CAAA,CAG1E,SAAS,gBAAgB,CACvB,YACA,WACA,OAAO,EAAC,EAAD,CAAc,UAAU,mDAAqD,CAAA,CACpF,GAAG,GACoB,CACvB,OACE,EAACA,EAAkB,QAAnB,CACE,YAAU,mBACV,UAAW,EAAG,uCAAwC,EAAU,CAChE,GAAI,WAHN,CAKG,EACA,EACyB,GAIhC,SAAS,cAAc,CAAE,YAAW,GAAG,GAA6B,CAClE,OACE,EAACA,EAAkB,MAAnB,CACE,YAAU,iBACV,OAAQ,EAAC,EAAD,CAAkB,QAAQ,QAAQ,KAAK,UAAY,CAAA,CAC3D,UAAW,EAAG,EAAU,CACxB,GAAI,WAEJ,EAAC,EAAD,CAAO,UAAU,sBAAwB,CAAA,CACjB,CAAA,CAI9B,SAAS,cAAc,CACrB,YACA,WACA,WAAW,GACX,OACA,KACA,cAAc,GACd,YAAY,GACZ,cACA,GAAG,GACkB,CACrB,IAAM,EAAiB,EAAkB,EAAG,CAE5C,OACE,EAAC,EAAD,CAAY,UAAW,EAA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AChF,IAAM,EAAiB,EAAkB,EAAG,CAE5C,OACE,EAACA,EAAkB,MAAnB,CACE,GAAI,EACJ,YAAU,sBACV,UAAW,EAAG,+BAAgC,EAAU,CACxD,GAAI,EACJ,CAAA,CAIN,SAAS,mBAAoB,CAC3B,OAAO,EAAM,OAA8B,KAAK"}
|
|
1
|
+
{"version":3,"file":"combobox.js","names":["ComboboxPrimitive"],"sources":["../../src/components/combobox.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Combobox as ComboboxPrimitive } from '@base-ui/react'\nimport { IconCheck, IconSelector, IconX } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\nimport { useFieldControlId } from './field'\nimport { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from './input-group'\n\nexport type ComboboxProps = React.ComponentProps<typeof ComboboxPrimitive.Root>\n\nexport type ComboboxValueProps = ComboboxPrimitive.Value.Props\n\nexport type ComboboxTriggerProps = ComboboxPrimitive.Trigger.Props & {\n icon?: React.ReactNode\n}\n\nexport type ComboboxClearProps = ComboboxPrimitive.Clear.Props\n\nexport type ComboboxInputProps = ComboboxPrimitive.Input.Props & {\n icon?: React.ReactNode\n triggerIcon?: React.ReactNode\n showTrigger?: boolean\n showClear?: boolean\n}\n\nexport type ComboboxContentProps = ComboboxPrimitive.Popup.Props &\n Pick<ComboboxPrimitive.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'> &\n Pick<ComboboxPrimitive.Portal.Props, 'container'>\n\nexport type ComboboxListProps = ComboboxPrimitive.List.Props\n\nexport type ComboboxItemProps = ComboboxPrimitive.Item.Props\n\nexport type ComboboxGroupProps = ComboboxPrimitive.Group.Props\n\nexport type ComboboxLabelProps = ComboboxPrimitive.GroupLabel.Props\n\nexport type ComboboxCollectionProps = ComboboxPrimitive.Collection.Props\n\nexport type ComboboxEmptyProps = ComboboxPrimitive.Empty.Props\n\nexport type ComboboxSeparatorProps = ComboboxPrimitive.Separator.Props\n\nexport type ComboboxChipsProps = React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props\n\nexport type ComboboxChipProps = ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}\n\nexport type ComboboxChipsInputProps = ComboboxPrimitive.Input.Props\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxValueProps) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n icon = <IconSelector className=\"pointer-events-none size-4 text-muted-foreground\" />,\n ...props\n}: ComboboxTriggerProps) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n {icon}\n </ComboboxPrimitive.Trigger>\n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxClearProps) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <IconX className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n icon,\n id,\n showTrigger = true,\n showClear = false,\n triggerIcon,\n ...props\n}: ComboboxInputProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <InputGroup className={cn('w-auto', className)}>\n {icon && <InputGroupAddon align=\"inline-start\">{icon}</InputGroupAddon>}\n <ComboboxPrimitive.Input id={fieldControlId} render={<InputGroupInput disabled={disabled} />} {...props} />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n asChild\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n >\n <ComboboxTrigger icon={triggerIcon} />\n </InputGroupButton>\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n )\n}\n\nfunction ComboboxContent({\n className,\n side = 'bottom',\n sideOffset = 6,\n align = 'start',\n alignOffset = 0,\n anchor,\n container,\n ...props\n}: ComboboxContentProps) {\n return (\n <ComboboxPrimitive.Portal container={container} className=\"absolute\">\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n 'group/combobox-content max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+(--spacing(7)))] origin-(--transform-origin) overflow-hidden rounded-lg text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) 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-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none 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 animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!',\n className\n )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxListProps) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n 'no-scrollbar max-h-[min(calc(--spacing(72)-(--spacing(9))),calc(var(--available-height)-(--spacing(9))))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({ className, children, ...props }: ComboboxItemProps) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={<span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />}\n >\n <IconCheck className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxGroupProps) {\n return <ComboboxPrimitive.Group data-slot=\"combobox-group\" className={cn(className)} {...props} />\n}\n\nfunction ComboboxLabel({ className, ...props }: ComboboxLabelProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn('px-2 py-1.5 text-xs text-muted-foreground', className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxCollectionProps) {\n return <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxEmptyProps) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n 'hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxSeparatorProps) {\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\nfunction ComboboxChips({ className, ...props }: ComboboxChipsProps) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n 'flex min-h-8 overflow-hidden flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxChip({ className, children, showRemove = true, ...props }: ComboboxChipProps) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n 'flex h-[calc(--spacing(5.25))] w-fit text-left max-w-full items-center justify-start gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0',\n className\n )}\n {...props}\n >\n <span className=\"flex-1 truncate\">{children}</span>\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" color=\"zinc\" size=\"icon-xs\" />}\n className=\"-ml-1 opacity-50 shrink-0 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <IconX className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n )\n}\n\nfunction ComboboxChipsInput({ className, id, ...props }: ComboboxChipsInputProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <ComboboxPrimitive.Input\n id={fieldControlId}\n data-slot=\"combobox-chip-input\"\n className={cn('min-w-16 flex-1 outline-none', className)}\n {...props}\n />\n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null)\n}\n\nexport {\n Combobox,\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxClear,\n ComboboxCollection,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxInput,\n ComboboxItem,\n ComboboxLabel,\n ComboboxList,\n ComboboxSeparator,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor\n}\n"],"mappings":"qcAsDA,MAAM,EAAWA,EAAkB,KAEnC,SAAS,cAAc,CAAE,GAAG,GAA6B,CACvD,OAAO,EAACA,EAAkB,MAAnB,CAAyB,YAAU,iBAAiB,GAAI,CAAQ,CAAA,CACzE,CAEA,SAAS,gBAAgB,CACvB,YACA,WACA,OAAO,EAAC,EAAD,CAAc,UAAU,kDAAoD,CAAA,EACnF,GAAG,GACoB,CACvB,OACE,EAACA,EAAkB,QAAnB,CACE,YAAU,mBACV,UAAW,EAAG,uCAAwC,CAAS,EAC/D,GAAI,WAHN,CAKG,EACA,CACwB,GAE/B,CAEA,SAAS,cAAc,CAAE,YAAW,GAAG,GAA6B,CAClE,OACE,EAACA,EAAkB,MAAnB,CACE,YAAU,iBACV,OAAQ,EAAC,EAAD,CAAkB,QAAQ,QAAQ,KAAK,SAAW,CAAA,EAC1D,UAAW,EAAG,CAAS,EACvB,GAAI,WAEJ,EAAC,EAAD,CAAO,UAAU,qBAAuB,CAAA,CACjB,CAAA,CAE7B,CAEA,SAAS,cAAc,CACrB,YACA,WACA,WAAW,GACX,OACA,KACA,cAAc,GACd,YAAY,GACZ,cACA,GAAG,GACkB,CACrB,IAAM,EAAiB,EAAkB,CAA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O,UAAU,qBAAuB,CAAA,CACZ,CAAA,CAEV,GAE5B,CAEA,SAAS,mBAAmB,CAAE,YAAW,KAAI,GAAG,GAAkC,CAChF,IAAM,EAAiB,EAAkB,CAAE,EAE3C,OACE,EAACA,EAAkB,MAAnB,CACE,GAAI,EACJ,YAAU,sBACV,UAAW,EAAG,+BAAgC,CAAS,EACvD,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,mBAAoB,CAC3B,OAAO,EAAM,OAA8B,IAAI,CACjD"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
2
|
import { Dialog } from "./dialog.js";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
3
|
import * as React from "react";
|
|
5
4
|
import { Command as Command$1 } from "cmdk";
|
|
6
5
|
|
|
@@ -22,7 +21,7 @@ type CommandShortcutProps = React.ComponentProps<'span'>;
|
|
|
22
21
|
declare function Command({
|
|
23
22
|
className,
|
|
24
23
|
...props
|
|
25
|
-
}: CommandProps):
|
|
24
|
+
}: CommandProps): import("react/jsx-runtime").JSX.Element;
|
|
26
25
|
declare function CommandDialog({
|
|
27
26
|
title,
|
|
28
27
|
description,
|
|
@@ -30,37 +29,37 @@ declare function CommandDialog({
|
|
|
30
29
|
className,
|
|
31
30
|
showCloseButton,
|
|
32
31
|
...props
|
|
33
|
-
}: CommandDialogProps):
|
|
32
|
+
}: CommandDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
34
33
|
declare function CommandInput({
|
|
35
34
|
className,
|
|
36
35
|
id,
|
|
37
36
|
...props
|
|
38
|
-
}: CommandInputProps):
|
|
37
|
+
}: CommandInputProps): import("react/jsx-runtime").JSX.Element;
|
|
39
38
|
declare function CommandList({
|
|
40
39
|
className,
|
|
41
40
|
...props
|
|
42
|
-
}: CommandListProps):
|
|
41
|
+
}: CommandListProps): import("react/jsx-runtime").JSX.Element;
|
|
43
42
|
declare function CommandEmpty({
|
|
44
43
|
className,
|
|
45
44
|
...props
|
|
46
|
-
}: CommandEmptyProps):
|
|
45
|
+
}: CommandEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
47
46
|
declare function CommandGroup({
|
|
48
47
|
className,
|
|
49
48
|
...props
|
|
50
|
-
}: CommandGroupProps):
|
|
49
|
+
}: CommandGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
51
50
|
declare function CommandSeparator({
|
|
52
51
|
className,
|
|
53
52
|
...props
|
|
54
|
-
}: CommandSeparatorProps):
|
|
53
|
+
}: CommandSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
55
54
|
declare function CommandItem({
|
|
56
55
|
className,
|
|
57
56
|
children,
|
|
58
57
|
...props
|
|
59
|
-
}: CommandItemProps):
|
|
58
|
+
}: CommandItemProps): import("react/jsx-runtime").JSX.Element;
|
|
60
59
|
declare function CommandShortcut({
|
|
61
60
|
className,
|
|
62
61
|
...props
|
|
63
|
-
}: CommandShortcutProps):
|
|
62
|
+
}: CommandShortcutProps): import("react/jsx-runtime").JSX.Element;
|
|
64
63
|
//#endregion
|
|
65
64
|
export { Command, CommandDialog, CommandDialogProps, CommandEmpty, CommandEmptyProps, CommandGroup, CommandGroupProps, CommandInput, CommandInputProps, CommandItem, CommandItemProps, CommandList, CommandListProps, CommandProps, CommandSeparator, CommandSeparatorProps, CommandShortcut, CommandShortcutProps };
|
|
66
65
|
//# sourceMappingURL=command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","names":["CommandPrimitive"],"sources":["../../src/components/command.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconCheck, IconSearch } from '@tabler/icons-react'\nimport { Command as CommandPrimitive } from 'cmdk'\n\nimport { cn } from '../lib/utils'\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog'\nimport { useFieldControlId } from './field'\nimport { InputGroup, InputGroupAddon } from './input-group'\n\nexport type CommandProps = React.ComponentProps<typeof CommandPrimitive>\n\nexport type CommandDialogProps = React.ComponentProps<typeof Dialog> & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n}\n\nexport type CommandInputProps = React.ComponentProps<typeof CommandPrimitive.Input>\n\nexport type CommandListProps = React.ComponentProps<typeof CommandPrimitive.List>\n\nexport type CommandEmptyProps = React.ComponentProps<typeof CommandPrimitive.Empty>\n\nexport type CommandGroupProps = React.ComponentProps<typeof CommandPrimitive.Group>\n\nexport type CommandSeparatorProps = React.ComponentProps<typeof CommandPrimitive.Separator>\n\nexport type CommandItemProps = React.ComponentProps<typeof CommandPrimitive.Item>\n\nexport type CommandShortcutProps = React.ComponentProps<'span'>\n\nfunction Command({ className, ...props }: CommandProps) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = false,\n ...props\n}: CommandDialogProps) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0', className)}\n showCloseButton={showCloseButton}\n >\n {children}\n </DialogContent>\n </Dialog>\n )\n}\n\nfunction CommandInput({ className, id, ...props }: CommandInputProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup\n className={cn(\n 'h-8! rounded-lg! border-input/30 bg-input/30 shadow-none!',\n '*:data-[slot=input-group-addon]:pl-2!'\n )}\n >\n <CommandPrimitive.Input\n id={fieldControlId}\n data-slot=\"command-input\"\n className={cn('w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className)}\n {...props}\n />\n <InputGroupAddon>\n <IconSearch className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n )\n}\n\nfunction CommandList({ className, ...props }: CommandListProps) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none', className)}\n {...props}\n />\n )\n}\n\nfunction CommandEmpty({ className, ...props }: CommandEmptyProps) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn('py-6 text-center text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction CommandGroup({ className, ...props }: CommandGroupProps) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'overflow-hidden p-1 text-foreground',\n '**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5',\n '**:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium',\n '**:[[cmdk-group-heading]]:text-muted-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandSeparator({ className, ...props }: CommandSeparatorProps) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('-mx-1 h-px bg-border', className)}\n {...props}\n />\n )\n}\n\nfunction CommandItem({ className, children, ...props }: CommandItemProps) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n 'group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none',\n 'in-data-[slot=dialog-content]:rounded-lg!',\n 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n 'data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <IconCheck\n className={cn(\n 'ml-auto opacity-0',\n 'group-has-data-[slot=command-shortcut]/command-item:hidden',\n 'group-data-[checked=true]/command-item:opacity-100'\n )}\n />\n </CommandPrimitive.Item>\n )\n}\n\nfunction CommandShortcut({ className, ...props }: CommandShortcutProps) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut\n}\n"],"mappings":"ubAiCA,SAAS,QAAQ,CAAE,YAAW,GAAG,GAAuB,CACtD,OACE,EAACA,EAAD,CACE,YAAU,UACV,UAAW,EACT,6FACA,
|
|
1
|
+
{"version":3,"file":"command.js","names":["CommandPrimitive"],"sources":["../../src/components/command.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconCheck, IconSearch } from '@tabler/icons-react'\nimport { Command as CommandPrimitive } from 'cmdk'\n\nimport { cn } from '../lib/utils'\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog'\nimport { useFieldControlId } from './field'\nimport { InputGroup, InputGroupAddon } from './input-group'\n\nexport type CommandProps = React.ComponentProps<typeof CommandPrimitive>\n\nexport type CommandDialogProps = React.ComponentProps<typeof Dialog> & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n}\n\nexport type CommandInputProps = React.ComponentProps<typeof CommandPrimitive.Input>\n\nexport type CommandListProps = React.ComponentProps<typeof CommandPrimitive.List>\n\nexport type CommandEmptyProps = React.ComponentProps<typeof CommandPrimitive.Empty>\n\nexport type CommandGroupProps = React.ComponentProps<typeof CommandPrimitive.Group>\n\nexport type CommandSeparatorProps = React.ComponentProps<typeof CommandPrimitive.Separator>\n\nexport type CommandItemProps = React.ComponentProps<typeof CommandPrimitive.Item>\n\nexport type CommandShortcutProps = React.ComponentProps<'span'>\n\nfunction Command({ className, ...props }: CommandProps) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = false,\n ...props\n}: CommandDialogProps) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0', className)}\n showCloseButton={showCloseButton}\n >\n {children}\n </DialogContent>\n </Dialog>\n )\n}\n\nfunction CommandInput({ className, id, ...props }: CommandInputProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup\n className={cn(\n 'h-8! rounded-lg! border-input/30 bg-input/30 shadow-none!',\n '*:data-[slot=input-group-addon]:pl-2!'\n )}\n >\n <CommandPrimitive.Input\n id={fieldControlId}\n data-slot=\"command-input\"\n className={cn('w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className)}\n {...props}\n />\n <InputGroupAddon>\n <IconSearch className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n )\n}\n\nfunction CommandList({ className, ...props }: CommandListProps) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none', className)}\n {...props}\n />\n )\n}\n\nfunction CommandEmpty({ className, ...props }: CommandEmptyProps) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn('py-6 text-center text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction CommandGroup({ className, ...props }: CommandGroupProps) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'overflow-hidden p-1 text-foreground',\n '**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5',\n '**:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium',\n '**:[[cmdk-group-heading]]:text-muted-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandSeparator({ className, ...props }: CommandSeparatorProps) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('-mx-1 h-px bg-border', className)}\n {...props}\n />\n )\n}\n\nfunction CommandItem({ className, children, ...props }: CommandItemProps) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n 'group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none',\n 'in-data-[slot=dialog-content]:rounded-lg!',\n 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n 'data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <IconCheck\n className={cn(\n 'ml-auto opacity-0',\n 'group-has-data-[slot=command-shortcut]/command-item:hidden',\n 'group-data-[checked=true]/command-item:opacity-100'\n )}\n />\n </CommandPrimitive.Item>\n )\n}\n\nfunction CommandShortcut({ className, ...props }: CommandShortcutProps) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut\n}\n"],"mappings":"ubAiCA,SAAS,QAAQ,CAAE,YAAW,GAAG,GAAuB,CACtD,OACE,EAACA,EAAD,CACE,YAAU,UACV,UAAW,EACT,6FACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,cAAc,CACrB,QAAQ,kBACR,cAAc,iCACd,WACA,YACA,kBAAkB,GAClB,GAAG,GACkB,CAC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,CACL,CAAA,CAEL,CAEA,SAAS,YAAY,CAAE,YAAW,WAAU,GAAG,GAA2B,CACxE,OACE,EAACA,EAAiB,KAAlB,CACE,YAAU,eACV,UAAW,EACT,+HACA,4CACA,2EACA,6FACA,oFACA,CACF,EACA,GAAI,WAVN,CAYG,EACD,EAAC,EAAD,CACE,UAAW,EACT,oBACA,6DACA,oDACF,CACD,CAAA,CACoB,GAE3B,CAEA,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OACE,EAAC,OAAD,CACE,YAAU,mBACV,UAAW,EACT,yGACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { n as __name } from "../chunk-CHh1Zzun.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
4
3
|
import * as React from "react";
|
|
5
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
4
|
|
|
7
5
|
//#region src/components/container.d.ts
|
|
8
6
|
declare const containerVariants: (props?: ({
|
|
9
7
|
size?: "sm" | "md" | "lg" | "full" | null | undefined;
|
|
10
|
-
} &
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
9
|
type ContainerProps = React.ComponentProps<'div'> & VariantProps<typeof containerVariants>;
|
|
12
10
|
declare function Container({
|
|
13
11
|
className,
|
|
14
12
|
size,
|
|
15
13
|
...props
|
|
16
|
-
}: ContainerProps):
|
|
14
|
+
}: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
17
15
|
//#endregion
|
|
18
16
|
export { Container, ContainerProps, containerVariants };
|
|
19
17
|
//# sourceMappingURL=container.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","names":[],"sources":["../../src/components/container.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst containerVariants = cva('mx-auto w-full', {\n variants: {\n size: {\n sm: 'max-w-3xl px-4 sm:px-6',\n md: 'max-w-5xl px-4 sm:px-6 lg:px-8',\n lg: 'max-w-7xl px-4 sm:px-6 lg:px-8',\n full: 'max-w-none px-4 sm:px-6 lg:px-8'\n }\n },\n defaultVariants: {\n size: 'lg'\n }\n})\n\nexport type ContainerProps = React.ComponentProps<'div'> & VariantProps<typeof containerVariants>\n\nfunction Container({ className, size = 'lg', ...props }: ContainerProps) {\n return (\n <div data-slot=\"container\" data-size={size} className={cn(containerVariants({ size }), className)} {...props} />\n )\n}\n\nexport { Container, containerVariants }\n"],"mappings":"yJAMA,MAAM,EAAoB,EAAI,iBAAkB,CAC9C,SAAU,CACR,KAAM,CACJ,GAAI,yBACJ,GAAI,iCACJ,GAAI,iCACJ,KAAM,
|
|
1
|
+
{"version":3,"file":"container.js","names":[],"sources":["../../src/components/container.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst containerVariants = cva('mx-auto w-full', {\n variants: {\n size: {\n sm: 'max-w-3xl px-4 sm:px-6',\n md: 'max-w-5xl px-4 sm:px-6 lg:px-8',\n lg: 'max-w-7xl px-4 sm:px-6 lg:px-8',\n full: 'max-w-none px-4 sm:px-6 lg:px-8'\n }\n },\n defaultVariants: {\n size: 'lg'\n }\n})\n\nexport type ContainerProps = React.ComponentProps<'div'> & VariantProps<typeof containerVariants>\n\nfunction Container({ className, size = 'lg', ...props }: ContainerProps) {\n return (\n <div data-slot=\"container\" data-size={size} className={cn(containerVariants({ size }), className)} {...props} />\n )\n}\n\nexport { Container, containerVariants }\n"],"mappings":"yJAMA,MAAM,EAAoB,EAAI,iBAAkB,CAC9C,SAAU,CACR,KAAM,CACJ,GAAI,yBACJ,GAAI,iCACJ,GAAI,iCACJ,KAAM,iCACR,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EAID,SAAS,UAAU,CAAE,YAAW,OAAO,KAAM,GAAG,GAAyB,CACvE,OACE,EAAC,MAAD,CAAK,YAAU,YAAY,YAAW,EAAM,UAAW,EAAG,EAAkB,CAAE,MAAK,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CAEnH"}
|