@zukhruf/shadcn 0.0.0-stage → 0.3.21
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/LICENSE +48 -0
- package/README.md +166 -2
- package/dist/components/accordion.d.ts +7 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +18 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert-dialog.d.ts +19 -0
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +44 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.d.ts +11 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +29 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/aspect-ratio.d.ts +5 -0
- package/dist/components/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio.js +9 -0
- package/dist/components/aspect-ratio.js.map +1 -0
- package/dist/components/attachment.d.ts +24 -0
- package/dist/components/attachment.d.ts.map +1 -0
- package/dist/components/attachment.js +70 -0
- package/dist/components/attachment.js.map +1 -0
- package/dist/components/avatar.d.ts +12 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +25 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +8 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +34 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/breadcrumb.d.ts +11 -0
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +38 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/bubble.d.ts +17 -0
- package/dist/components/bubble.d.ts.map +1 -0
- package/dist/components/bubble.js +61 -0
- package/dist/components/bubble.js.map +1 -0
- package/dist/components/button-group.d.ts +11 -0
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button-group.js +37 -0
- package/dist/components/button-group.js.map +1 -0
- package/dist/components/button.d.ts +9 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +35 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.d.ts +11 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +77 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/card.d.ts +12 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +26 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/carousel.d.ts +29 -0
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +92 -0
- package/dist/components/carousel.js.map +1 -0
- package/dist/components/chart.d.ts +45 -0
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +133 -0
- package/dist/components/chart.js.map +1 -0
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +10 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/code-block.d.ts +27 -0
- package/dist/components/code-block.d.ts.map +1 -0
- package/dist/components/code-block.js +81 -0
- package/dist/components/code-block.js.map +1 -0
- package/dist/components/collapsible.d.ts +6 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +14 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/combobox.d.ts +25 -0
- package/dist/components/combobox.d.ts.map +1 -0
- package/dist/components/combobox.js +59 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/command.d.ts +20 -0
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +37 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/context-menu.d.ts +30 -0
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +53 -0
- package/dist/components/context-menu.js.map +1 -0
- package/dist/components/dialog.d.ts +18 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +39 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/direction.d.ts +2 -0
- package/dist/components/direction.d.ts.map +1 -0
- package/dist/components/direction.js +3 -0
- package/dist/components/direction.js.map +1 -0
- package/dist/components/drawer.d.ts +17 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +76 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +30 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +53 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/empty.d.ts +12 -0
- package/dist/components/empty.d.ts.map +1 -0
- package/dist/components/empty.js +34 -0
- package/dist/components/empty.js.map +1 -0
- package/dist/components/field.d.ts +25 -0
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +69 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/hover-card.d.ts +6 -0
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +15 -0
- package/dist/components/hover-card.js.map +1 -0
- package/dist/components/input-group.d.ts +19 -0
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +59 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input-otp.d.ts +12 -0
- package/dist/components/input-otp.d.ts.map +1 -0
- package/dist/components/input-otp.js +22 -0
- package/dist/components/input-otp.js.map +1 -0
- package/dist/components/input.d.ts +4 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +9 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/item.d.ts +23 -0
- package/dist/components/item.d.ts.map +1 -0
- package/dist/components/item.js +80 -0
- package/dist/components/item.js.map +1 -0
- package/dist/components/kbd.d.ts +4 -0
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +10 -0
- package/dist/components/kbd.js.map +1 -0
- package/dist/components/label.d.ts +4 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +9 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/marker.d.ts +11 -0
- package/dist/components/marker.d.ts.map +1 -0
- package/dist/components/marker.js +36 -0
- package/dist/components/marker.js.map +1 -0
- package/dist/components/menubar.d.ts +30 -0
- package/dist/components/menubar.d.ts.map +1 -0
- package/dist/components/menubar.js +58 -0
- package/dist/components/menubar.js.map +1 -0
- package/dist/components/message-scroller.d.ts +11 -0
- package/dist/components/message-scroller.d.ts.map +1 -0
- package/dist/components/message-scroller.js +27 -0
- package/dist/components/message-scroller.js.map +1 -0
- package/dist/components/message.d.ts +11 -0
- package/dist/components/message.d.ts.map +1 -0
- package/dist/components/message.js +23 -0
- package/dist/components/message.js.map +1 -0
- package/dist/components/native-select.d.ts +9 -0
- package/dist/components/native-select.d.ts.map +1 -0
- package/dist/components/native-select.js +15 -0
- package/dist/components/native-select.js.map +1 -0
- package/dist/components/navigation-menu.d.ts +12 -0
- package/dist/components/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu.js +32 -0
- package/dist/components/navigation-menu.js.map +1 -0
- package/dist/components/pagination.d.ts +18 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +28 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/popover.d.ts +10 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +25 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +8 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +21 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/questionnaire.d.ts +20 -0
- package/dist/components/questionnaire.d.ts.map +1 -0
- package/dist/components/questionnaire.js +54 -0
- package/dist/components/questionnaire.js.map +1 -0
- package/dist/components/radio-group.d.ts +6 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +13 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/resizable.d.ts +8 -0
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +15 -0
- package/dist/components/resizable.js.map +1 -0
- package/dist/components/scroll-area.d.ts +6 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +13 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +16 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +36 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +4 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +9 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sheet.d.ts +15 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +39 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/sidebar.d.ts +64 -0
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +257 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/skeleton.d.ts +3 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +7 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +4 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +13 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/spinner.d.ts +3 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +8 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/switch.d.ts +6 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +9 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +11 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +30 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +11 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +30 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +4 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +8 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/toast.d.ts +17 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +68 -0
- package/dist/components/toast.js.map +1 -0
- package/dist/components/toggle-group.d.ts +12 -0
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +26 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle.d.ts +9 -0
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +27 -0
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +18 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/trace.d.ts +19 -0
- package/dist/components/trace.d.ts.map +1 -0
- package/dist/components/trace.js +31 -0
- package/dist/components/trace.js.map +1 -0
- package/dist/hooks/use-highlighted-code.d.ts +3 -0
- package/dist/hooks/use-highlighted-code.d.ts.map +1 -0
- package/dist/hooks/use-highlighted-code.js +50 -0
- package/dist/hooks/use-highlighted-code.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +66 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/highlighter.d.ts +10 -0
- package/dist/lib/highlighter.d.ts.map +1 -0
- package/dist/lib/highlighter.js +92 -0
- package/dist/lib/highlighter.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +2 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +85 -4
- package/styles.css +18 -0
- package/theme.css +772 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Label } from '#components/label';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare function FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>): import("react").JSX.Element;
|
|
4
|
+
declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<'legend'> & {
|
|
5
|
+
variant?: 'legend' | 'label';
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
declare function FieldGroup({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
|
|
8
|
+
declare const fieldVariants: (props?: ({
|
|
9
|
+
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
declare function Field({ className, orientation, ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>): import("react").JSX.Element;
|
|
12
|
+
declare function FieldContent({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
|
|
13
|
+
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react").JSX.Element;
|
|
14
|
+
declare function FieldTitle({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
|
|
15
|
+
declare function FieldDescription({ className, ...props }: React.ComponentProps<'p'>): import("react").JSX.Element;
|
|
16
|
+
declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<'div'> & {
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<'div'> & {
|
|
20
|
+
errors?: Array<{
|
|
21
|
+
message?: string;
|
|
22
|
+
} | undefined>;
|
|
23
|
+
}): import("react").JSX.Element | null;
|
|
24
|
+
export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
|
|
25
|
+
//# sourceMappingURL=field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/components/field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,mBA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AC,GAAG;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,+BAsBA;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC;CAClD,sCA0CA;AAED,OAAO,EACL,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Label } from '#components/label';
|
|
4
|
+
import { Separator } from '#components/separator';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { cn } from 'cn';
|
|
7
|
+
import { useMemo } from 'react';
|
|
8
|
+
function FieldSet({ className, ...props }) {
|
|
9
|
+
return (_jsx("fieldset", { "data-slot": "field-set", className: cn('flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3', className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function FieldLegend({ className, variant = 'legend', ...props }) {
|
|
12
|
+
return (_jsx("legend", { "data-slot": "field-legend", "data-variant": variant, className: cn('mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base', className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
function FieldGroup({ className, ...props }) {
|
|
15
|
+
return (_jsx("div", { "data-slot": "field-group", className: cn('group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4', className), ...props }));
|
|
16
|
+
}
|
|
17
|
+
const fieldVariants = cva('group/field flex w-full gap-2 data-[invalid=true]:text-destructive', {
|
|
18
|
+
variants: {
|
|
19
|
+
orientation: {
|
|
20
|
+
vertical: 'flex-col *:w-full [&>.sr-only]:w-auto',
|
|
21
|
+
horizontal: 'flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',
|
|
22
|
+
responsive: 'flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
orientation: 'vertical',
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
function Field({ className, orientation = 'vertical', ...props }) {
|
|
30
|
+
return (_jsx("div", { role: "group", "data-slot": "field", "data-orientation": orientation, className: cn(fieldVariants({ orientation }), className), ...props }));
|
|
31
|
+
}
|
|
32
|
+
function FieldContent({ className, ...props }) {
|
|
33
|
+
return (_jsx("div", { "data-slot": "field-content", className: cn('group/field-content flex flex-1 flex-col gap-0.5 leading-snug', className), ...props }));
|
|
34
|
+
}
|
|
35
|
+
function FieldLabel({ className, ...props }) {
|
|
36
|
+
return (_jsx(Label, { "data-slot": "field-label", className: cn('group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10', 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col', className), ...props }));
|
|
37
|
+
}
|
|
38
|
+
function FieldTitle({ className, ...props }) {
|
|
39
|
+
return (_jsx("div", { "data-slot": "field-label", className: cn('flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50', className), ...props }));
|
|
40
|
+
}
|
|
41
|
+
function FieldDescription({ className, ...props }) {
|
|
42
|
+
return (_jsx("p", { "data-slot": "field-description", className: cn('text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5', 'last:mt-0 nth-last-2:-mt-1', '[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary', className), ...props }));
|
|
43
|
+
}
|
|
44
|
+
function FieldSeparator({ children, className, ...props }) {
|
|
45
|
+
return (_jsxs("div", { "data-slot": "field-separator", "data-content": !!children, className: cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className), ...props, children: [_jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && (_jsx("span", { className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground", "data-slot": "field-separator-content", children: children }))] }));
|
|
46
|
+
}
|
|
47
|
+
function FieldError({ className, children, errors, ...props }) {
|
|
48
|
+
const content = useMemo(() => {
|
|
49
|
+
if (children) {
|
|
50
|
+
return children;
|
|
51
|
+
}
|
|
52
|
+
if (!errors?.length) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
const uniqueErrors = [
|
|
56
|
+
...new Map(errors.map((error) => [error?.message, error])).values(),
|
|
57
|
+
];
|
|
58
|
+
if (uniqueErrors?.length == 1) {
|
|
59
|
+
return uniqueErrors[0]?.message;
|
|
60
|
+
}
|
|
61
|
+
return (_jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map((error, index) => error?.message && _jsx("li", { children: error.message }, index)) }));
|
|
62
|
+
}, [children, errors]);
|
|
63
|
+
if (!content) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return (_jsx("div", { role: "alert", "data-slot": "field-error", className: cn('text-sm font-normal text-destructive', className), ...props, children: content }));
|
|
67
|
+
}
|
|
68
|
+
export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
|
|
69
|
+
//# sourceMappingURL=field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.js","sourceRoot":"","sources":["../../src/components/field.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAqB,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoC;IACzE,OAAO,CACL,gCACY,WAAW,EACrB,SAAS,EAAE,EAAE,CACX,kGAAkG,EAClG,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAO,GAAG,QAAQ,EAClB,GAAG,KAAK,EAC0D;IAClE,OAAO,CACL,8BACY,cAAc,kBACV,OAAO,EACrB,SAAS,EAAE,EAAE,CACX,iFAAiF,EACjF,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACtE,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,sIAAsI,EACtI,SAAS,CACV,KACG,KAAK,GAC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ACN,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IAEvB,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,cACE,IAAI,EAAC,OAAO,eACF,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,sCAAsC,EAAE,SAAS,CAAC,KAC5D,KAAK,YAER,OAAO,GACJ,CACP,CAAC;AACJ,CAAC;AAED,OAAO,EACL,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PreviewCard as PreviewCardPrimitive } from '@base-ui/react/preview-card';
|
|
2
|
+
declare function HoverCard({ ...props }: PreviewCardPrimitive.Root.Props): import("react").JSX.Element;
|
|
3
|
+
declare function HoverCardTrigger({ ...props }: PreviewCardPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
4
|
+
declare function HoverCardContent({ className, side, sideOffset, align, alignOffset, ...props }: PreviewCardPrimitive.Popup.Props & Pick<PreviewCardPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>): import("react").JSX.Element;
|
|
5
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
6
|
+
//# sourceMappingURL=hover-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../src/components/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGlF,iBAAS,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,+BAE/D;AAED,iBAAS,gBAAgB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,+BAIzE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,IAAe,EACf,UAAc,EACd,KAAgB,EAChB,WAAe,EACf,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,GACjC,IAAI,CACF,oBAAoB,CAAC,UAAU,CAAC,KAAK,EACrC,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,CAChD,+BAqBF;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { PreviewCard as PreviewCardPrimitive } from '@base-ui/react/preview-card';
|
|
4
|
+
import { cn } from 'cn';
|
|
5
|
+
function HoverCard({ ...props }) {
|
|
6
|
+
return _jsx(PreviewCardPrimitive.Root, { "data-slot": "hover-card", ...props });
|
|
7
|
+
}
|
|
8
|
+
function HoverCardTrigger({ ...props }) {
|
|
9
|
+
return (_jsx(PreviewCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props }));
|
|
10
|
+
}
|
|
11
|
+
function HoverCardContent({ className, side = 'bottom', sideOffset = 4, align = 'center', alignOffset = 4, ...props }) {
|
|
12
|
+
return (_jsx(PreviewCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: _jsx(PreviewCardPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsx(PreviewCardPrimitive.Popup, { "data-slot": "hover-card-content", className: cn('z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden 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', className), ...props }) }) }));
|
|
13
|
+
}
|
|
14
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
15
|
+
//# sourceMappingURL=hover-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-card.js","sourceRoot":"","sources":["../../src/components/hover-card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,CAAC;AAExB,SAAS,SAAS,CAAC,EAAE,GAAG,KAAK,EAAmC;IAC9D,OAAO,KAAC,oBAAoB,CAAC,IAAI,iBAAW,YAAY,KAAK,KAAK,GAAI,CAAC;AACzE,CAAC;AAED,SAAS,gBAAgB,CAAC,EAAE,GAAG,KAAK,EAAsC;IACxE,OAAO,CACL,KAAC,oBAAoB,CAAC,OAAO,iBAAW,oBAAoB,KAAK,KAAK,GAAI,CAC3E,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,CAAC,EACd,KAAK,GAAG,QAAQ,EAChB,WAAW,GAAG,CAAC,EACf,GAAG,KAAK,EAKP;IACD,OAAO,CACL,KAAC,oBAAoB,CAAC,MAAM,iBAAW,mBAAmB,YACxD,KAAC,oBAAoB,CAAC,UAAU,IAC9B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,SAAS,EAAC,cAAc,YAExB,KAAC,oBAAoB,CAAC,KAAK,iBACf,oBAAoB,EAC9B,SAAS,EAAE,EAAE,CACX,+hBAA+hB,EAC/hB,SAAS,CACV,KACG,KAAK,GACT,GAC8B,GACN,CAC/B,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Button } from '#components/button';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare function InputGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
5
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
6
|
+
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
|
|
9
|
+
declare const inputGroupButtonVariants: (props?: ({
|
|
10
|
+
size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, 'size' | 'type'> & VariantProps<typeof inputGroupButtonVariants> & {
|
|
13
|
+
type?: 'button' | 'submit' | 'reset';
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
16
|
+
declare function InputGroupInput({ className, ...props }: React.ComponentProps<'input'>): React.JSX.Element;
|
|
17
|
+
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<'textarea'>): React.JSX.Element;
|
|
18
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, };
|
|
19
|
+
//# sourceMappingURL=input-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-group.d.ts","sourceRoot":"","sources":["../../src/components/input-group.tsx"],"names":[],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BAAkB,GACnB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Button } from '#components/button';
|
|
4
|
+
import { Input } from '#components/input';
|
|
5
|
+
import { Textarea } from '#components/textarea';
|
|
6
|
+
import { cva } from 'class-variance-authority';
|
|
7
|
+
import { cn } from 'cn';
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
function InputGroup({ className, ...props }) {
|
|
10
|
+
return (_jsx("div", { "data-slot": "input-group", role: "group", className: cn('group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5', className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
const inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
13
|
+
variants: {
|
|
14
|
+
align: {
|
|
15
|
+
'inline-start': 'order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]',
|
|
16
|
+
'inline-end': 'order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]',
|
|
17
|
+
'block-start': 'order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2',
|
|
18
|
+
'block-end': 'order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
align: 'inline-start',
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
function InputGroupAddon({ className, align = 'inline-start', ...props }) {
|
|
26
|
+
return (_jsx("div", { role: "group", "data-slot": "input-group-addon", "data-align": align, className: cn(inputGroupAddonVariants({ align }), className), onClick: (e) => {
|
|
27
|
+
if (e.target.closest('button')) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
e.currentTarget.parentElement?.querySelector('input')?.focus();
|
|
31
|
+
}, ...props }));
|
|
32
|
+
}
|
|
33
|
+
const inputGroupButtonVariants = cva('flex items-center gap-2 text-sm shadow-none', {
|
|
34
|
+
variants: {
|
|
35
|
+
size: {
|
|
36
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
37
|
+
sm: '',
|
|
38
|
+
'icon-xs': 'size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0',
|
|
39
|
+
'icon-sm': 'size-8 p-0 has-[>svg]:p-0',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
size: 'xs',
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
function InputGroupButton({ className, type = 'button', variant = 'ghost', size = 'xs', ...props }) {
|
|
47
|
+
return (_jsx(Button, { type: type, "data-size": size, variant: variant, className: cn(inputGroupButtonVariants({ size }), className), ...props }));
|
|
48
|
+
}
|
|
49
|
+
function InputGroupText({ className, ...props }) {
|
|
50
|
+
return (_jsx("span", { className: cn("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
51
|
+
}
|
|
52
|
+
function InputGroupInput({ className, ...props }) {
|
|
53
|
+
return (_jsx(Input, { "data-slot": "input-group-control", className: cn('flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent', className), ...props }));
|
|
54
|
+
}
|
|
55
|
+
function InputGroupTextarea({ className, ...props }) {
|
|
56
|
+
return (_jsx(Textarea, { "data-slot": "input-group-control", className: cn('flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent', className), ...props }));
|
|
57
|
+
}
|
|
58
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, };
|
|
59
|
+
//# sourceMappingURL=input-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-group.js","sourceRoot":"","sources":["../../src/components/input-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAqB,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GA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ACxB,SAAS,EACT,IAAI,GAAG,QAAQ,EACf,OAAO,GAAG,OAAO,EACjB,IAAI,GAAG,IAAI,EACX,GAAG,KAAK,EAIP;IACD,OAAO,CACL,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,eACC,IAAI,EACf,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,EAAE,CAAC,wBAAwB,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,KACxD,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAgC;IAC3E,OAAO,CACL,eACE,SAAS,EAAE,EAAE,CACX,wHAAwH,EACxH,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACsB;IAC9B,OAAO,CACL,KAAC,KAAK,iBACM,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CACX,kLAAkL,EAClL,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACyB;IACjC,OAAO,CACL,KAAC,QAAQ,iBACG,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CACX,mMAAmM,EACnM,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,GACnB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OTPInput } from 'input-otp';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
|
|
4
|
+
containerClassName?: string;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
7
|
+
declare function InputOTPSlot({ index, className, ...props }: React.ComponentProps<'div'> & {
|
|
8
|
+
index: number;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
declare function InputOTPSeparator({ ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
11
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
12
|
+
//# sourceMappingURL=input-otp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../src/components/input-otp.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAmB,MAAM,WAAW,CAAC;AAEtD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,kBAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,GAAG;IACzC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,qBAaA;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW1E;AAED,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf,qBAsBA;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWnE;AAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from 'cn';
|
|
4
|
+
import { OTPInput, OTPInputContext } from 'input-otp';
|
|
5
|
+
import { MinusIcon } from 'lucide-react';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
function InputOTP({ className, containerClassName, ...props }) {
|
|
8
|
+
return (_jsx(OTPInput, { "data-slot": "input-otp", containerClassName: cn('cn-input-otp flex items-center has-disabled:opacity-50', containerClassName), spellCheck: false, className: cn('disabled:cursor-not-allowed', className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
function InputOTPGroup({ className, ...props }) {
|
|
11
|
+
return (_jsx("div", { "data-slot": "input-otp-group", className: cn('flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40', className), ...props }));
|
|
12
|
+
}
|
|
13
|
+
function InputOTPSlot({ index, className, ...props }) {
|
|
14
|
+
const inputOTPContext = React.useContext(OTPInputContext);
|
|
15
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
16
|
+
return (_jsxs("div", { "data-slot": "input-otp-slot", "data-active": isActive, className: cn('relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40', className), ...props, children: [char, hasFakeCaret && (_jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) }))] }));
|
|
17
|
+
}
|
|
18
|
+
function InputOTPSeparator({ ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "input-otp-separator", className: "flex items-center [&_svg:not([class*='size-'])]:size-4", role: "separator", ...props, children: _jsx(MinusIcon, {}) }));
|
|
20
|
+
}
|
|
21
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
22
|
+
//# sourceMappingURL=input-otp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-otp.js","sourceRoot":"","sources":["../../src/components/input-otp.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,SAAS,QAAQ,CAAC,EAChB,SAAS,EACT,kBAAkB,EAClB,GAAG,KAAK,EAGT;IACC,OAAO,CACL,KAAC,QAAQ,iBACG,WAAW,EACrB,kBAAkB,EAAE,EAAE,CACpB,wDAAwD,EACxD,kBAAkB,CACnB,EACD,UAAU,EAAE,KAAK,EACjB,SAAS,EAAE,EAAE,CAAC,6BAA6B,EAAE,SAAS,CAAC,KACnD,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACzE,OAAO,CACL,2BACY,iBAAiB,EAC3B,SAAS,EAAE,EAAE,CACX,yKAAyK,EACzK,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,EACpB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EAGT;IACC,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAC1D,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAE7E,OAAO,CACL,4BACY,gBAAgB,iBACb,QAAQ,EACrB,SAAS,EAAE,EAAE,CACX,2eAA2e,EAC3e,SAAS,CACV,KACG,KAAK,aAER,IAAI,EACJ,YAAY,IAAI,CACf,cAAK,SAAS,EAAC,uEAAuE,YACpF,cAAK,SAAS,EAAC,0DAA0D,GAAG,GACxE,CACP,IACG,CACP,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAA+B;IAClE,OAAO,CACL,2BACY,qBAAqB,EAC/B,SAAS,EAAC,wDAAwD,EAClE,IAAI,EAAC,WAAW,KACZ,KAAK,YAET,KAAC,SAAS,KAAG,GACT,CACP,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAY1E;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Input as InputPrimitive } from '@base-ui/react/input';
|
|
3
|
+
import { cn } from 'cn';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
function Input({ className, type, ...props }) {
|
|
6
|
+
return (_jsx(InputPrimitive, { type: type, "data-slot": "input", className: cn('h-8 w-full min-w-0 rounded-lg border border-input bg-transparent 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-muted-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:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40', className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
export { Input };
|
|
9
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAiC;IACzE,OAAO,CACL,KAAC,cAAc,IACb,IAAI,EAAE,IAAI,eACA,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,6oBAA6oB,EAC7oB,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Separator } from '#components/separator';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
declare function ItemGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
6
|
+
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
|
|
7
|
+
declare const itemVariants: (props?: ({
|
|
8
|
+
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
9
|
+
size?: "default" | "xs" | "sm" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
declare function Item({ className, variant, size, render, ...props }: useRender.ComponentProps<'div'> & VariantProps<typeof itemVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
12
|
+
declare const itemMediaVariants: (props?: ({
|
|
13
|
+
variant?: "image" | "default" | "icon" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
|
|
16
|
+
declare function ItemContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
17
|
+
declare function ItemTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
18
|
+
declare function ItemDescription({ className, ...props }: React.ComponentProps<'p'>): React.JSX.Element;
|
|
19
|
+
declare function ItemActions({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
20
|
+
declare function ItemHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
21
|
+
declare function ItemFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
22
|
+
export { Item, ItemMedia, ItemContent, ItemActions, ItemGroup, ItemSeparator, ItemTitle, ItemDescription, ItemHeader, ItemFooter, };
|
|
23
|
+
//# sourceMappingURL=item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../src/components/item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYtE;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,E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AS,EACT,eAAe,EACf,UAAU,EACV,UAAU,GACX,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Separator } from '#components/separator';
|
|
3
|
+
import { mergeProps } from '@base-ui/react/merge-props';
|
|
4
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { cn } from 'cn';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
function ItemGroup({ className, ...props }) {
|
|
9
|
+
return (_jsx("div", { role: "list", "data-slot": "item-group", className: cn('group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2', className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function ItemSeparator({ className, ...props }) {
|
|
12
|
+
return (_jsx(Separator, { "data-slot": "item-separator", orientation: "horizontal", className: cn('my-2', className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
const itemVariants = cva('group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted', {
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
default: 'border-transparent',
|
|
18
|
+
outline: 'border-border',
|
|
19
|
+
muted: 'border-transparent bg-muted/50',
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
default: 'gap-2.5 px-3 py-2.5',
|
|
23
|
+
sm: 'gap-2.5 px-3 py-2.5',
|
|
24
|
+
xs: 'gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
variant: 'default',
|
|
29
|
+
size: 'default',
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
function Item({ className, variant = 'default', size = 'default', render, ...props }) {
|
|
33
|
+
return useRender({
|
|
34
|
+
defaultTagName: 'div',
|
|
35
|
+
props: mergeProps({
|
|
36
|
+
className: cn(itemVariants({ variant, size, className })),
|
|
37
|
+
}, props),
|
|
38
|
+
render,
|
|
39
|
+
state: {
|
|
40
|
+
slot: 'item',
|
|
41
|
+
variant,
|
|
42
|
+
size,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
const itemMediaVariants = cva('flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none', {
|
|
47
|
+
variants: {
|
|
48
|
+
variant: {
|
|
49
|
+
default: 'bg-transparent',
|
|
50
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
51
|
+
image: 'size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
variant: 'default',
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
function ItemMedia({ className, variant = 'default', ...props }) {
|
|
59
|
+
return (_jsx("div", { "data-slot": "item-media", "data-variant": variant, className: cn(itemMediaVariants({ variant, className })), ...props }));
|
|
60
|
+
}
|
|
61
|
+
function ItemContent({ className, ...props }) {
|
|
62
|
+
return (_jsx("div", { "data-slot": "item-content", className: cn('flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none', className), ...props }));
|
|
63
|
+
}
|
|
64
|
+
function ItemTitle({ className, ...props }) {
|
|
65
|
+
return (_jsx("div", { "data-slot": "item-title", className: cn('line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4', className), ...props }));
|
|
66
|
+
}
|
|
67
|
+
function ItemDescription({ className, ...props }) {
|
|
68
|
+
return (_jsx("p", { "data-slot": "item-description", className: cn('line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary', className), ...props }));
|
|
69
|
+
}
|
|
70
|
+
function ItemActions({ className, ...props }) {
|
|
71
|
+
return (_jsx("div", { "data-slot": "item-actions", className: cn('flex items-center gap-2', className), ...props }));
|
|
72
|
+
}
|
|
73
|
+
function ItemHeader({ className, ...props }) {
|
|
74
|
+
return (_jsx("div", { "data-slot": "item-header", className: cn('flex basis-full items-center justify-between gap-2', className), ...props }));
|
|
75
|
+
}
|
|
76
|
+
function ItemFooter({ className, ...props }) {
|
|
77
|
+
return (_jsx("div", { "data-slot": "item-footer", className: cn('flex basis-full items-center justify-between gap-2', className), ...props }));
|
|
78
|
+
}
|
|
79
|
+
export { Item, ItemMedia, ItemContent, ItemActions, ItemGroup, ItemSeparator, ItemTitle, ItemDescription, ItemHeader, ItemFooter, };
|
|
80
|
+
//# sourceMappingURL=item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.js","sourceRoot":"","sources":["../../src/components/item.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAqB,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACrE,OAAO,CACL,cACE,IAAI,EAAC,MAAM,eACD,YAAY,EACtB,SAAS,EAAE,EAAE,CACX,iGAAiG,EACjG,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,K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,EAAE,EAAE,CACX,oDAAoD,EACpD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EACL,IAAI,EACJ,SAAS,EACT,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,GACX,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare function Kbd({ className, ...props }: React.ComponentProps<'kbd'>): import("react").JSX.Element;
|
|
2
|
+
declare function KbdGroup({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
|
|
3
|
+
export { Kbd, KbdGroup };
|
|
4
|
+
//# sourceMappingURL=kbd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kbd.d.ts","sourceRoot":"","sources":["../../src/components/kbd.tsx"],"names":[],"mappings":"AAEA,iBAAS,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAWhE;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQrE;AAED,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from 'cn';
|
|
3
|
+
function Kbd({ className, ...props }) {
|
|
4
|
+
return (_jsx("kbd", { "data-slot": "kbd", className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
function KbdGroup({ className, ...props }) {
|
|
7
|
+
return (_jsx("kbd", { "data-slot": "kbd-group", className: cn('inline-flex items-center gap-1', className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
export { Kbd, KbdGroup };
|
|
10
|
+
//# sourceMappingURL=kbd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kbd.js","sourceRoot":"","sources":["../../src/components/kbd.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,CAAC;AAExB,SAAS,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IAC/D,OAAO,CACL,2BACY,KAAK,EACf,SAAS,EAAE,EAAE,CACX,uWAAuW,EACvW,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACpE,OAAO,CACL,2BACY,WAAW,EACrB,SAAS,EAAE,EAAE,CAAC,gCAAgC,EAAE,SAAS,CAAC,KACtD,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAWpE;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from 'cn';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
function Label({ className, ...props }) {
|
|
6
|
+
return (_jsx("label", { "data-slot": "label", className: cn('flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50', className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
export { Label };
|
|
9
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiC;IACnE,OAAO,CACL,6BACY,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,qNAAqN,EACrN,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const markerVariants: (props?: ({
|
|
5
|
+
variant?: "separator" | "default" | "border" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Marker({ className, variant, render, ...props }: useRender.ComponentProps<'div'> & VariantProps<typeof markerVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
8
|
+
declare function MarkerIcon({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
9
|
+
declare function MarkerContent({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
10
|
+
export { Marker, MarkerIcon, MarkerContent, markerVariants };
|
|
11
|
+
//# sourceMappingURL=marker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marker.d.ts","sourceRoot":"","sources":["../../src/components/marker.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,QAAA,MAAM,cAAc;;8EAYnB,CAAC;AAEF,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,0EAevE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAYxE;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW3E;AAED,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { mergeProps } from '@base-ui/react/merge-props';
|
|
3
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { cn } from 'cn';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
const markerVariants = cva("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground", {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: '',
|
|
11
|
+
separator: 'before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border',
|
|
12
|
+
border: 'border-b border-border pb-2',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
function Marker({ className, variant = 'default', render, ...props }) {
|
|
17
|
+
return useRender({
|
|
18
|
+
defaultTagName: 'div',
|
|
19
|
+
props: mergeProps({
|
|
20
|
+
className: cn(markerVariants({ variant, className })),
|
|
21
|
+
}, props),
|
|
22
|
+
render,
|
|
23
|
+
state: {
|
|
24
|
+
slot: 'marker',
|
|
25
|
+
variant,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function MarkerIcon({ className, ...props }) {
|
|
30
|
+
return (_jsx("span", { "data-slot": "marker-icon", "aria-hidden": "true", className: cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
31
|
+
}
|
|
32
|
+
function MarkerContent({ className, ...props }) {
|
|
33
|
+
return (_jsx("span", { "data-slot": "marker-content", className: cn('min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground', className), ...props }));
|
|
34
|
+
}
|
|
35
|
+
export { Marker, MarkerIcon, MarkerContent, markerVariants };
|
|
36
|
+
//# sourceMappingURL=marker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marker.js","sourceRoot":"","sources":["../../src/components/marker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAqB,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,cAAc,GAAG,GAAG,CACxB,0MAA0M,EAC1M;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,EAAE;YACX,SAAS,EACP,wIAAwI;YAC1I,MAAM,EAAE,6BAA6B;SACtC;KACF;CACF,CACF,CAAC;AAEF,SAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,MAAM,EACN,GAAG,KAAK,EAC8D;IACtE,OAAO,SAAS,CAAC;QACf,cAAc,EAAE,KAAK;QACrB,KAAK,EAAE,UAAU,CACf;YACE,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;SACtD,EACD,KAAK,CACN;QACD,MAAM;QACN,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,OAAO;SACR;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAgC;IACvE,OAAO,CACL,4BACY,aAAa,iBACX,MAAM,EAClB,SAAS,EAAE,EAAE,CACX,sDAAsD,EACtD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAgC;IAC1E,OAAO,CACL,4BACY,gBAAgB,EAC1B,SAAS,EAAE,EAAE,CACX,gMAAgM,EAChM,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from '#components/dropdown-menu';
|
|
2
|
+
import { Menu as MenuPrimitive } from '@base-ui/react/menu';
|
|
3
|
+
import { Menubar as MenubarPrimitive } from '@base-ui/react/menubar';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
declare function Menubar({ className, ...props }: MenubarPrimitive.Props): React.JSX.Element;
|
|
6
|
+
declare function MenubarMenu({ ...props }: React.ComponentProps<typeof DropdownMenu>): React.JSX.Element;
|
|
7
|
+
declare function MenubarGroup({ ...props }: React.ComponentProps<typeof DropdownMenuGroup>): React.JSX.Element;
|
|
8
|
+
declare function MenubarPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPortal>): React.JSX.Element;
|
|
9
|
+
declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof DropdownMenuTrigger>): React.JSX.Element;
|
|
10
|
+
declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuContent>): React.JSX.Element;
|
|
11
|
+
declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuItem>): React.JSX.Element;
|
|
12
|
+
declare function MenubarCheckboxItem({ className, children, checked, inset, ...props }: MenuPrimitive.CheckboxItem.Props & {
|
|
13
|
+
inset?: boolean;
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuRadioGroup>): React.JSX.Element;
|
|
16
|
+
declare function MenubarRadioItem({ className, children, inset, ...props }: MenuPrimitive.RadioItem.Props & {
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
}): React.JSX.Element;
|
|
19
|
+
declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuLabel> & {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
}): React.JSX.Element;
|
|
22
|
+
declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuSeparator>): React.JSX.Element;
|
|
23
|
+
declare function MenubarShortcut({ className, ...props }: React.ComponentProps<typeof DropdownMenuShortcut>): React.JSX.Element;
|
|
24
|
+
declare function MenubarSub({ ...props }: React.ComponentProps<typeof DropdownMenuSub>): React.JSX.Element;
|
|
25
|
+
declare function MenubarSubTrigger({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuSubTrigger> & {
|
|
26
|
+
inset?: boolean;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuSubContent>): React.JSX.Element;
|
|
29
|
+
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
|
|
30
|
+
//# sourceMappingURL=menubar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../src/components/menubar.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAGrE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,CAAC,KAAK,qBAW/D;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,qBAE3E;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,qBAEhD;AAED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