@uselets/ui 1.20.4 → 2.0.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 +309 -426
- package/dist/as-child-Dxg3Xo1G.d.ts +41 -0
- package/dist/cli/uselets.mjs +5 -4
- package/dist/cli/uselets.mjs.map +1 -1
- package/dist/components/accordion.d.ts +12 -8
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.d.ts +20 -15
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/anchor.d.ts +3 -5
- package/dist/components/anchor.js +1 -1
- package/dist/components/anchor.js.map +1 -1
- package/dist/components/area-chart.d.ts +54 -0
- package/dist/components/area-chart.js +1 -1
- package/dist/components/area-chart.js.map +1 -1
- package/dist/components/avatar.d.ts +12 -7
- package/dist/components/avatar.js +1 -1
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.d.ts +3 -5
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/bar-chart.d.ts +48 -0
- package/dist/components/bar-chart.js +1 -1
- package/dist/components/bar-chart.js.map +1 -1
- package/dist/components/bottom-nav.d.ts +7 -3
- package/dist/components/bottom-nav.js +1 -1
- package/dist/components/bottom-nav.js.map +1 -1
- package/dist/components/breadcrumb.d.ts +3 -4
- package/dist/components/breadcrumb.js +1 -1
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.d.ts +3 -4
- package/dist/components/button-group.js +1 -1
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button.d.ts +8 -4
- package/dist/components/button.js +1 -1
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.d.ts +4 -0
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.d.ts +4 -0
- package/dist/components/card.js.map +1 -1
- package/dist/components/carousel.d.ts +11 -3
- package/dist/components/carousel.js +1 -1
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/center.d.ts +1 -1
- package/dist/components/chart.js +4 -4
- package/dist/components/checkbox.d.ts +14 -4
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapsible.d.ts +8 -7
- package/dist/components/collapsible.js +1 -1
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.d.ts +48 -26
- package/dist/components/combobox.js +1 -1
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.d.ts +16 -2
- package/dist/components/command.js +1 -1
- package/dist/components/command.js.map +1 -1
- package/dist/components/container.d.ts +1 -1
- package/dist/components/data-table.d.ts +39 -0
- package/dist/components/data-table.js +1 -1
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-range-picker.d.ts +24 -2
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/dialog.d.ts +33 -15
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/direction.d.ts +7 -0
- package/dist/components/direction.js +1 -0
- package/dist/components/donut-chart.d.ts +12 -0
- package/dist/components/donut-chart.js +1 -1
- package/dist/components/donut-chart.js.map +1 -1
- package/dist/components/drawer.d.ts +33 -15
- package/dist/components/drawer.js +1 -1
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.d.ts +36 -26
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/dropzone.d.ts +19 -0
- package/dist/components/dropzone.js +1 -1
- package/dist/components/dropzone.js.map +1 -1
- package/dist/components/field.d.ts +16 -4
- package/dist/components/field.js +1 -1
- package/dist/components/field.js.map +1 -1
- package/dist/components/flex.d.ts +1 -1
- package/dist/components/grid.d.ts +13 -0
- package/dist/components/grid.js.map +1 -1
- package/dist/components/group.d.ts +1 -1
- package/dist/components/heading.d.ts +3 -5
- package/dist/components/heading.js +1 -1
- package/dist/components/heading.js.map +1 -1
- package/dist/components/hover-card.d.ts +7 -6
- package/dist/components/hover-card.js +1 -1
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input-group.d.ts +2 -2
- package/dist/components/input-group.js +1 -1
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input-otp.d.ts +4 -2
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/label.d.ts +3 -4
- package/dist/components/label.js +1 -1
- package/dist/components/label.js.map +1 -1
- package/dist/components/list.d.ts +8 -5
- package/dist/components/list.js +1 -1
- package/dist/components/list.js.map +1 -1
- package/dist/components/logo.d.ts +113 -0
- package/dist/components/marker.d.ts +4 -5
- package/dist/components/marker.js +1 -1
- package/dist/components/marker.js.map +1 -1
- package/dist/components/mask-input.d.ts +6 -0
- package/dist/components/mask-input.js.map +1 -1
- package/dist/components/native-select.d.ts +5 -1
- package/dist/components/native-select.js +1 -1
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/navigation-menu.d.ts +19 -20
- package/dist/components/navigation-menu.js +1 -1
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/number-field.d.ts +18 -13
- package/dist/components/number-field.js +1 -1
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/pagination.d.ts +9 -0
- package/dist/components/pagination.js +1 -1
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/phone-input.d.ts +3 -0
- package/dist/components/phone-input.js +1 -1
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/pie-chart.d.ts +53 -0
- package/dist/components/pie-chart.js +1 -1
- package/dist/components/pie-chart.js.map +1 -1
- package/dist/components/popover.d.ts +13 -12
- package/dist/components/popover.js +1 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress.d.ts +9 -3
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.d.ts +20 -6
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.d.ts +1 -0
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/ring-progress.d.ts +9 -1
- package/dist/components/ring-progress.js.map +1 -1
- package/dist/components/scroll-area.d.ts +3 -3
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.d.ts +25 -20
- package/dist/components/select.js +1 -1
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.d.ts +9 -4
- package/dist/components/separator.js +1 -1
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sidebar.d.ts +63 -18
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/simple-grid.d.ts +7 -0
- package/dist/components/simple-grid.js +1 -1
- package/dist/components/simple-grid.js.map +1 -1
- package/dist/components/skeleton.d.ts +4 -0
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.js.map +1 -1
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/stack.d.ts +1 -1
- package/dist/components/stepper.d.ts +46 -25
- package/dist/components/stepper.js +1 -1
- package/dist/components/stepper.js.map +1 -1
- package/dist/components/switch.d.ts +17 -3
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts +10 -1
- package/dist/components/table.js +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.d.ts +14 -10
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/text.d.ts +3 -5
- package/dist/components/text.js +1 -1
- package/dist/components/text.js.map +1 -1
- package/dist/components/textarea.d.ts +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/theme.d.ts +12 -0
- package/dist/components/theme.js +1 -1
- package/dist/components/theme.js.map +1 -1
- package/dist/components/timeline.d.ts +25 -1
- package/dist/components/timeline.js +1 -1
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/toggle-group.d.ts +16 -6
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.d.ts +4 -4
- package/dist/components/toggle.js +1 -1
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/tooltip.d.ts +15 -8
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unstyled-button.d.ts +3 -5
- package/dist/components/unstyled-button.js +1 -1
- package/dist/components/unstyled-button.js.map +1 -1
- package/dist/components/visibility.d.ts +2 -0
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.js.map +1 -1
- package/dist/hooks/use-breakpoint-value.d.ts +1 -0
- package/dist/hooks/use-breakpoint-value.js.map +1 -1
- package/dist/hooks/use-breakpoint.d.ts +1 -0
- package/dist/hooks/use-breakpoint.js.map +1 -1
- package/dist/hooks/use-disclosure.d.ts +3 -0
- package/dist/hooks/use-disclosure.js +1 -1
- package/dist/hooks/use-disclosure.js.map +1 -1
- package/dist/hooks/use-document-visibility.d.ts +1 -0
- package/dist/hooks/use-document-visibility.js.map +1 -1
- package/dist/hooks/use-hotkeys.d.ts +1 -1
- package/dist/hooks/use-idle.d.ts +9 -0
- package/dist/hooks/use-idle.js.map +1 -1
- package/dist/hooks/use-interval.d.ts +1 -0
- package/dist/hooks/use-interval.js.map +1 -1
- package/dist/hooks/use-local-storage.d.ts +6 -0
- package/dist/hooks/use-local-storage.js +1 -1
- package/dist/hooks/use-local-storage.js.map +1 -1
- package/dist/hooks/use-mask.d.ts +1 -0
- package/dist/hooks/use-mask.js.map +1 -1
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.js +1 -1
- package/dist/lib/as-child.d.ts +2 -0
- package/dist/lib/as-child.js +2 -0
- package/dist/lib/as-child.js.map +1 -0
- package/dist/lib/utils.d.ts +1 -1
- package/dist/logo--R3_XDgA.js.map +1 -1
- package/dist/resolve-class-name-BurP8ngI.js +2 -0
- package/dist/resolve-class-name-BurP8ngI.js.map +1 -0
- package/dist/skills/uselets-ui/SKILL.md +8 -3
- package/dist/skills/uselets-ui/references/component-catalog.md +31 -16
- package/dist/skills/uselets-ui/references/migration-v1-to-v2.md +599 -0
- package/dist/skills/uselets-ui/references/package-guide.md +7 -7
- package/dist/styles/base.css +21 -0
- package/dist/{use-hotkeys-DOjcX9Tt.d.ts → use-hotkeys-D1_TEIwN.d.ts} +2 -1
- package/dist/use-hotkeys-YDJmGWX6.js.map +1 -1
- package/package.json +16 -17
- package/skills/uselets-ui/SKILL.md +8 -3
- package/skills/uselets-ui/references/component-catalog.md +31 -16
- package/skills/uselets-ui/references/migration-v1-to-v2.md +599 -0
- package/skills/uselets-ui/references/package-guide.md +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
|
-
import { VariantProps } from "class-variance-authority";
|
|
4
3
|
import * as React from "react";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
//#region src/components/input-group.d.ts
|
|
6
6
|
export type InputGroupProps = React.ComponentProps<'div'>;
|
|
7
7
|
export type InputGroupAddonProps = React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>;
|
|
@@ -17,7 +17,7 @@ declare function InputGroupAddon({ className, align, ...props }: InputGroupAddon
|
|
|
17
17
|
declare const inputGroupButtonVariants: (props?: ({
|
|
18
18
|
size?: "icon-sm" | "icon-xs" | "sm" | "xs" | null | undefined;
|
|
19
19
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
20
|
-
declare function InputGroupButton({ className, type, variant, size,
|
|
20
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: InputGroupButtonProps): React.JSX.Element;
|
|
21
21
|
declare function InputGroupText({ className, ...props }: InputGroupTextProps): React.JSX.Element;
|
|
22
22
|
declare function InputGroupInput({ className, ...props }: InputGroupInputProps): React.JSX.Element;
|
|
23
23
|
declare function InputGroupTextarea({ className, ...props }: InputGroupTextareaProps): React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{Input as n}from"./input.js";import{Textarea as r}from"./textarea.js";import{jsx as i}from"react/jsx-runtime";import{cva as a}from"class-variance-authority";function InputGroup({className:t,...n}){return/* @__PURE__ */ i(`div`,{"data-slot":`input-group`,className:e(`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`,t),...n})}const o=a(`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`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function InputGroupAddon({className:t,align:n=`inline-start`,...r}){return/* @__PURE__ */ i(`div`,{"data-slot":`input-group-addon`,"data-align":n,className:e(o({align:n}),t),...r})}const s=a(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function InputGroupButton({className:n,type:r=`button`,variant:a=`ghost`,size:o=`xs
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{Input as n}from"./input.js";import{Textarea as r}from"./textarea.js";import{jsx as i}from"react/jsx-runtime";import{cva as a}from"class-variance-authority";function InputGroup({className:t,...n}){return/* @__PURE__ */ i(`div`,{"data-slot":`input-group`,className:e(`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`,t),...n})}const o=a(`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`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function InputGroupAddon({className:t,align:n=`inline-start`,...r}){return/* @__PURE__ */ i(`div`,{"data-slot":`input-group-addon`,"data-align":n,className:e(o({align:n}),t),...r})}const s=a(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function InputGroupButton({className:n,type:r=`button`,variant:a=`ghost`,size:o=`xs`,...c}){return/* @__PURE__ */ i(t,{type:r,"data-size":o,variant:a,className:e(s({size:o}),n),...c})}function InputGroupText({className:t,...n}){return/* @__PURE__ */ i(`span`,{className:e(`flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4`,t),...n})}function InputGroupInput({className:t,...r}){return/* @__PURE__ */ i(n,{"data-slot":`input-group-control`,className:e(`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`,t),...r})}function InputGroupTextarea({className:t,...n}){return/* @__PURE__ */ i(r,{"data-slot":`input-group-control`,className:e(`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`,t),...n})}export{InputGroup,InputGroupAddon,InputGroupButton,InputGroupInput,InputGroupText,InputGroupTextarea};
|
|
2
2
|
//# sourceMappingURL=input-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-group.js","names":["props","cn","className","inputGroupAddonVariants","cva","align","inputGroupButtonVariants","Button","size","Input","Textarea"],"sources":["../../src/components/input-group.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\nimport { Input } from './input'\nimport { Textarea } from './textarea'\n\nexport type InputGroupProps = React.ComponentProps<'div'>\n\nexport type InputGroupAddonProps = React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>\n\nexport type InputGroupButtonProps = Omit<React.ComponentProps<typeof Button>, 'size'> &\n VariantProps<typeof inputGroupButtonVariants>\n\nexport type InputGroupTextProps = React.ComponentProps<'span'>\n\nexport type InputGroupInputProps = React.ComponentProps<'input'>\n\nexport type InputGroupTextareaProps = React.ComponentProps<'textarea'>\n\nfunction InputGroup({ className, ...props }: InputGroupProps) {\n return (\n <div\n data-slot=\"input-group\"\n className={cn(\n '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',\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"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\",\n {\n variants: {\n align: {\n 'inline-start': 'order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]',\n 'inline-end': 'order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]',\n 'block-start':\n 'order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2',\n 'block-end': 'order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2'\n }\n },\n defaultVariants: {\n align: 'inline-start'\n }\n }\n)\n\nfunction InputGroupAddon({ className, align = 'inline-start', ...props }: InputGroupAddonProps) {\n return (\n <div\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva('flex items-center gap-2 text-sm shadow-none', {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n sm: '',\n 'icon-xs': 'size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0',\n 'icon-sm': 'size-8 p-0 has-[>svg]:p-0'\n }\n },\n defaultVariants: {\n size: 'xs'\n }\n})\n\nfunction InputGroupButton({\n className,\n type = 'button',\n variant = 'ghost',\n size = 'xs',\n
|
|
1
|
+
{"version":3,"file":"input-group.js","names":["props","cn","className","inputGroupAddonVariants","cva","align","inputGroupButtonVariants","Button","size","Input","Textarea"],"sources":["../../src/components/input-group.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\nimport { Input } from './input'\nimport { Textarea } from './textarea'\n\nexport type InputGroupProps = React.ComponentProps<'div'>\n\nexport type InputGroupAddonProps = React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>\n\nexport type InputGroupButtonProps = Omit<React.ComponentProps<typeof Button>, 'size'> &\n VariantProps<typeof inputGroupButtonVariants>\n\nexport type InputGroupTextProps = React.ComponentProps<'span'>\n\nexport type InputGroupInputProps = React.ComponentProps<'input'>\n\nexport type InputGroupTextareaProps = React.ComponentProps<'textarea'>\n\nfunction InputGroup({ className, ...props }: InputGroupProps) {\n return (\n <div\n data-slot=\"input-group\"\n className={cn(\n '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',\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"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\",\n {\n variants: {\n align: {\n 'inline-start': 'order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]',\n 'inline-end': 'order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]',\n 'block-start':\n 'order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2',\n 'block-end': 'order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2'\n }\n },\n defaultVariants: {\n align: 'inline-start'\n }\n }\n)\n\nfunction InputGroupAddon({ className, align = 'inline-start', ...props }: InputGroupAddonProps) {\n return (\n <div\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva('flex items-center gap-2 text-sm shadow-none', {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n sm: '',\n 'icon-xs': 'size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0',\n 'icon-sm': 'size-8 p-0 has-[>svg]:p-0'\n }\n },\n defaultVariants: {\n size: 'xs'\n }\n})\n\nfunction InputGroupButton({\n className,\n type = 'button',\n variant = 'ghost',\n size = 'xs',\n ...props\n}: InputGroupButtonProps) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: InputGroupTextProps) {\n return (\n <span\n className={cn(\n \"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupInput({ className, ...props }: InputGroupInputProps) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n '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',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputGroupTextarea({ className, ...props }: InputGroupTextareaProps) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n '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',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea }\n"],"mappings":"qRAsBA,SAAS,WAAW,CAAE,YAAW,GAAGA,GAA0B,CAC5D,MACE,kBAAC,MAAD,CACE,YAAU,cACV,UAAWC,EACT,wlCACAC,CACF,EACA,GAAIF,CACL,CAAA,CAEL,CAEA,MAAMG,EAA0BC,EAC9B,0PACA,CACE,SAAU,CACR,MAAO,CACL,eAAgB,uEAChB,aAAc,sEACd,cACE,oGACF,YAAa,kGACf,CACF,EACA,gBAAiB,CACf,MAAO,cACT,CACF,CACF,EAEA,SAAS,gBAAgB,CAAE,YAAW,QAAQ,eAAgB,GAAGJ,GAA+B,CAC9F,MACE,kBAAC,MAAD,CACE,YAAU,oBACV,aAAYK,EACZ,UAAWJ,EAAGE,EAAwB,CAAE,OAAM,CAAC,EAAGD,CAAS,EAC3D,GAAIF,CACL,CAAA,CAEL,CAEA,MAAMM,EAA2BF,EAAI,8CAA+C,CAClF,SAAU,CACR,KAAM,CACJ,GAAI,4FACJ,GAAI,GACJ,UAAW,8DACX,UAAW,2BACb,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EAED,SAAS,iBAAiB,CACxB,YACA,OAAO,SACP,UAAU,QACV,OAAO,KACP,GAAGJ,GACqB,CACxB,MACE,kBAACO,EAAD,CACQ,OACN,YAAWC,EACF,UACT,UAAWP,EAAGK,EAAyB,CAAE,MAAK,CAAC,EAAGJ,CAAS,EAC3D,GAAIF,CACL,CAAA,CAEL,CAEA,SAAS,eAAe,CAAE,YAAW,GAAGA,GAA8B,CACpE,MACE,kBAAC,OAAD,CACE,UAAWC,EACT,yHACAC,CACF,EACA,GAAIF,CACL,CAAA,CAEL,CAEA,SAAS,gBAAgB,CAAE,YAAW,GAAGA,GAA+B,CACtE,MACE,kBAACS,EAAD,CACE,YAAU,sBACV,UAAWR,EACT,mLACAC,CACF,EACA,GAAIF,CACL,CAAA,CAEL,CAEA,SAAS,mBAAmB,CAAE,YAAW,GAAGA,GAAkC,CAC5E,MACE,kBAACU,EAAD,CACE,YAAU,sBACV,UAAWT,EACT,oMACAC,CACF,EACA,GAAIF,CACL,CAAA,CAEL"}
|
|
@@ -3,16 +3,18 @@ import * as React from "react";
|
|
|
3
3
|
import { OTPInput, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";
|
|
4
4
|
//#region src/components/input-otp.d.ts
|
|
5
5
|
export type InputOTPProps = React.ComponentProps<typeof OTPInput> & {
|
|
6
|
+
/** Classes for the element that wraps the slots. */
|
|
6
7
|
containerClassName?: string;
|
|
7
8
|
};
|
|
8
9
|
export type InputOTPGroupProps = React.ComponentProps<'div'>;
|
|
9
10
|
export type InputOTPSlotProps = React.ComponentProps<'div'> & {
|
|
11
|
+
/** Position of the character this slot shows, starting at `0`. */
|
|
10
12
|
index: number;
|
|
11
13
|
};
|
|
12
14
|
export type InputOTPSeparatorProps = React.ComponentProps<'div'>;
|
|
13
|
-
declare function InputOTP({ className, containerClassName, id, ...props }: InputOTPProps): React.JSX.Element;
|
|
15
|
+
declare function InputOTP({ className, containerClassName, id, 'aria-invalid': ariaInvalid, ...props }: InputOTPProps): React.JSX.Element;
|
|
14
16
|
declare function InputOTPGroup({ className, ...props }: InputOTPGroupProps): React.JSX.Element;
|
|
15
|
-
declare function InputOTPSlot({ index, className, ...props }: InputOTPSlotProps): React.JSX.Element;
|
|
17
|
+
declare function InputOTPSlot({ index, className, 'aria-invalid': ariaInvalid, ...props }: InputOTPSlotProps): React.JSX.Element;
|
|
16
18
|
declare function InputOTPSeparator({ ...props }: InputOTPSeparatorProps): React.JSX.Element;
|
|
17
19
|
//#endregion
|
|
18
20
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{useFieldControlId as t}from"./field.js";import{IconMinus as
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{useFieldControlId as t,useFieldInvalid as n}from"./field.js";import{IconMinus as r}from"@tabler/icons-react";import*as i from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{OTPInput as s,OTPInputContext as c,REGEXP_ONLY_CHARS as l,REGEXP_ONLY_DIGITS as u,REGEXP_ONLY_DIGITS_AND_CHARS as d}from"input-otp";const f=i.createContext(void 0);function InputOTP({className:r,containerClassName:i,id:o,"aria-invalid":c,...l}){let u=t(o),d=n(c);return/* @__PURE__ */ a(f.Provider,{value:d,children:/* @__PURE__ */ a(s,{id:u,"aria-invalid":d,"data-slot":`input-otp`,containerClassName:e(`cn-input-otp flex items-center has-disabled:opacity-50`,i),spellCheck:!1,className:e(`disabled:cursor-not-allowed`,r),...l})})}function InputOTPGroup({className:t,...n}){return/* @__PURE__ */ a(`div`,{"data-slot":`input-otp-group`,className:e(`flex items-center rounded-lg`,`has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 has-aria-invalid:ring-3 dark:has-aria-invalid:ring-destructive/40`,t),...n})}function InputOTPSlot({index:t,className:n,"aria-invalid":r,...s}){let l=i.useContext(c),u=i.useContext(f),{char:d,hasFakeCaret:p,isActive:m}=l?.slots[t]??{};return/* @__PURE__ */ o(`div`,{"data-slot":`input-otp-slot`,"data-active":m,"aria-invalid":r??u,className:e(`dark:bg-input/30 border-input relative flex size-8 items-center justify-center border-y border-r text-sm transition-all outline-none`,`first:rounded-l-lg first:border-l last:rounded-r-lg`,`aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive`,`data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:ring-3 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40`,n),...s,children:[d,p&&/* @__PURE__ */ a(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:/* @__PURE__ */ a(`div`,{className:`animate-caret-blink bg-foreground h-4 w-px duration-1000`})})]})}function InputOTPSeparator({...e}){return/* @__PURE__ */ a(`div`,{"data-slot":`input-otp-separator`,className:`[&_svg:not([class*='size-'])]:size-4 flex items-center`,...e,children:/* @__PURE__ */ a(r,{})})}export{InputOTP,InputOTPGroup,InputOTPSeparator,InputOTPSlot,l as REGEXP_ONLY_CHARS,u as REGEXP_ONLY_DIGITS,d as REGEXP_ONLY_DIGITS_AND_CHARS};
|
|
2
2
|
//# sourceMappingURL=input-otp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.js","names":["React","props","fieldControlId","useFieldControlId","id","OTPInput","cn","containerClassName","className","OTPInputContext","index","isActive","char","hasFakeCaret","IconMinus","REGEXP_ONLY_CHARS","REGEXP_ONLY_DIGITS","REGEXP_ONLY_DIGITS_AND_CHARS"],"sources":["../../src/components/input-otp.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { IconMinus } from '@tabler/icons-react'\nimport {\n OTPInput,\n OTPInputContext,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS\n} from 'input-otp'\n\nimport { cn } from '../lib/utils'\nimport { useFieldControlId } from './field'\n\nexport type InputOTPProps = React.ComponentProps<typeof OTPInput> & {\n containerClassName?: string\n}\n\nexport type InputOTPGroupProps = React.ComponentProps<'div'>\n\nexport type InputOTPSlotProps = React.ComponentProps<'div'> & {\n index: number\n}\n\nexport type InputOTPSeparatorProps = React.ComponentProps<'div'>\n\nfunction InputOTP({ className, containerClassName, id, ...props }: InputOTPProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <OTPInput\n
|
|
1
|
+
{"version":3,"file":"input-otp.js","names":["React","InputOTPInvalidContext","ariaInvalid","props","fieldControlId","useFieldControlId","id","invalid","useFieldInvalid","OTPInput","cn","containerClassName","className","inputOTPContext","OTPInputContext","inputInvalid","index","isActive","char","hasFakeCaret","IconMinus","REGEXP_ONLY_CHARS","REGEXP_ONLY_DIGITS","REGEXP_ONLY_DIGITS_AND_CHARS"],"sources":["../../src/components/input-otp.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { IconMinus } from '@tabler/icons-react'\nimport {\n OTPInput,\n OTPInputContext,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS\n} from 'input-otp'\n\nimport { cn } from '../lib/utils'\nimport { useFieldControlId, useFieldInvalid } from './field'\n\nexport type InputOTPProps = React.ComponentProps<typeof OTPInput> & {\n /** Classes for the element that wraps the slots. */\n containerClassName?: string\n}\n\nexport type InputOTPGroupProps = React.ComponentProps<'div'>\n\nexport type InputOTPSlotProps = React.ComponentProps<'div'> & {\n /** Position of the character this slot shows, starting at `0`. */\n index: number\n}\n\nexport type InputOTPSeparatorProps = React.ComponentProps<'div'>\n\n// Lets the slots show the invalid state set on `InputOTP` (or inherited from an invalid `Field`).\nconst InputOTPInvalidContext = React.createContext<React.AriaAttributes['aria-invalid']>(undefined)\n\nfunction InputOTP({ className, containerClassName, id, 'aria-invalid': ariaInvalid, ...props }: InputOTPProps) {\n const fieldControlId = useFieldControlId(id)\n const invalid = useFieldInvalid(ariaInvalid)\n\n return (\n <InputOTPInvalidContext.Provider value={invalid}>\n <OTPInput\n id={fieldControlId}\n aria-invalid={invalid}\n data-slot=\"input-otp\"\n containerClassName={cn('cn-input-otp flex items-center has-disabled:opacity-50', containerClassName)}\n spellCheck={false}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n </InputOTPInvalidContext.Provider>\n )\n}\n\nfunction InputOTPGroup({ className, ...props }: InputOTPGroupProps) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\n 'flex items-center rounded-lg',\n 'has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 has-aria-invalid:ring-3 dark:has-aria-invalid:ring-destructive/40',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction InputOTPSlot({ index, className, 'aria-invalid': ariaInvalid, ...props }: InputOTPSlotProps) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const inputInvalid = React.useContext(InputOTPInvalidContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n aria-invalid={ariaInvalid ?? inputInvalid}\n className={cn(\n 'dark:bg-input/30 border-input relative flex size-8 items-center justify-center border-y border-r text-sm transition-all outline-none',\n 'first:rounded-l-lg first:border-l last:rounded-r-lg',\n 'aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive',\n 'data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:ring-3 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n )\n}\n\nfunction InputOTPSeparator({ ...props }: InputOTPSeparatorProps) {\n return (\n <div data-slot=\"input-otp-separator\" className=\"[&_svg:not([class*='size-'])]:size-4 flex items-center\" {...props}>\n <IconMinus />\n </div>\n )\n}\n\nexport {\n InputOTP,\n InputOTPGroup,\n InputOTPSeparator,\n InputOTPSlot,\n REGEXP_ONLY_CHARS,\n REGEXP_ONLY_DIGITS,\n REGEXP_ONLY_DIGITS_AND_CHARS\n}\n"],"mappings":"sZA6BA,MAAMC,EAAyBD,EAAM,cAAoD,IAAA,EAAS,EAElG,SAAS,SAAS,CAAE,YAAW,qBAAoB,KAAI,eAAgBE,EAAa,GAAGC,GAAwB,CAC7G,IAAMC,EAAiBC,EAAkBC,CAAE,EACrCC,EAAUC,EAAgBN,CAAW,EAE3C,MACE,kBAACD,EAAuB,SAAxB,CAAiC,MAAOM,EACtC,SAAA,kBAACE,EAAD,CACE,GAAIL,EACJ,eAAcG,EACd,YAAU,YACV,mBAAoBG,EAAG,yDAA0DC,CAAkB,EACnG,WAAY,GACZ,UAAWD,EAAG,8BAA+BE,CAAS,EACtD,GAAIT,CACL,CAAA,CAC8B,CAAA,CAErC,CAEA,SAAS,cAAc,CAAE,YAAW,GAAGA,GAA6B,CAClE,MACE,kBAAC,MAAD,CACE,YAAU,kBACV,UAAWO,EACT,+BACA,6IACAE,CACF,EACA,GAAIT,CACL,CAAA,CAEL,CAEA,SAAS,aAAa,CAAE,QAAO,YAAW,eAAgBD,EAAa,GAAGC,GAA4B,CACpG,IAAMU,EAAkBb,EAAM,WAAWc,CAAe,EAClDC,EAAef,EAAM,WAAWC,CAAsB,EACtD,CAAE,OAAM,eAAc,YAAaY,GAAiB,MAAMG,IAAU,CAAC,EAE3E,MACE,kBAAC,MAAD,CACE,YAAU,iBACV,cAAaC,EACb,eAAcf,GAAea,EAC7B,UAAWL,EACT,uIACA,sDACA,qFACA,gOACAE,CACF,EACA,GAAIT,EAXN,SAAA,CAaGe,EACAC,GACC,kBAAC,MAAD,CAAK,UAAU,wEACb,SAAA,kBAAC,MAAD,CAAK,UAAU,0DAA4D,CAAA,CACxE,CAAA,CAEJ,GAET,CAEA,SAAS,kBAAkB,CAAE,GAAGhB,GAAiC,CAC/D,MACE,kBAAC,MAAD,CAAK,YAAU,sBAAsB,UAAU,yDAAyD,GAAIA,EAC1G,SAAA,kBAACiB,EAAD,CAAY,CAAA,CACT,CAAA,CAET"}
|
|
@@ -2,7 +2,7 @@ import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
//#region src/components/input.d.ts
|
|
4
4
|
export type InputProps = React.ComponentProps<'input'>;
|
|
5
|
-
declare function Input({ className, id, type, ...props }: InputProps): React.JSX.Element;
|
|
5
|
+
declare function Input({ className, id, type, 'aria-invalid': ariaInvalid, ...props }: InputProps): React.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Input };
|
|
8
8
|
//# sourceMappingURL=input.d.ts.map
|
package/dist/components/input.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{useFieldControlId as t}from"./field.js";import{jsx as
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{useFieldControlId as t,useFieldInvalid as n}from"./field.js";import{jsx as r}from"react/jsx-runtime";function Input({className:i,id:a,type:o,"aria-invalid":s,...c}){let l=t(a),u=n(s);return/* @__PURE__ */ r(`input`,{id:l,"aria-invalid":u,type:o,"data-slot":`input`,className:e(`border-input dark:bg-input/30 h-8 w-full min-w-0 rounded-lg border bg-transparent px-2.5 py-1 text-base md:text-sm transition-colors`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`placeholder:text-placeholder`,`file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground`,`outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-input/50 dark:disabled:bg-input/80`,`[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none`,i),...c})}export{Input};
|
|
2
2
|
//# sourceMappingURL=input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","names":["props","fieldControlId","useFieldControlId","id","cn","className"],"sources":["../../src/components/input.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\nimport { useFieldControlId } from './field'\n\nexport type InputProps = React.ComponentProps<'input'>\n\nfunction Input({ className, id, type, ...props }: InputProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <input\n id={fieldControlId}\n type={type}\n data-slot=\"input\"\n className={cn(\n 'border-input dark:bg-input/30 h-8 w-full min-w-0 rounded-lg border bg-transparent px-2.5 py-1 text-base md:text-sm transition-colors',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'placeholder:text-placeholder',\n 'file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground',\n 'outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-input/50 dark:disabled:bg-input/80',\n '[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"input.js","names":["ariaInvalid","props","fieldControlId","useFieldControlId","id","invalid","useFieldInvalid","cn","className"],"sources":["../../src/components/input.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\nimport { useFieldControlId, useFieldInvalid } from './field'\n\nexport type InputProps = React.ComponentProps<'input'>\n\nfunction Input({ className, id, type, 'aria-invalid': ariaInvalid, ...props }: InputProps) {\n const fieldControlId = useFieldControlId(id)\n const invalid = useFieldInvalid(ariaInvalid)\n\n return (\n <input\n id={fieldControlId}\n aria-invalid={invalid}\n type={type}\n data-slot=\"input\"\n className={cn(\n 'border-input dark:bg-input/30 h-8 w-full min-w-0 rounded-lg border bg-transparent px-2.5 py-1 text-base md:text-sm transition-colors',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'placeholder:text-placeholder',\n 'file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground',\n 'outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-input/50 dark:disabled:bg-input/80',\n '[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"mappings":"yLAOA,SAAS,MAAM,CAAE,YAAW,KAAI,OAAM,eAAgBA,EAAa,GAAGC,GAAqB,CACzF,IAAMC,EAAiBC,EAAkBC,CAAE,EACrCC,EAAUC,EAAgBN,CAAW,EAE3C,MACE,kBAAC,QAAD,CACE,GAAIE,EACJ,eAAcG,EACR,OACN,YAAU,QACV,UAAWE,EACT,uIACA,4EACA,qKACA,+BACA,iHACA,2IACA,mGACAC,CACF,EACA,GAAIP,CACL,CAAA,CAEL"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
2
|
-
import {
|
|
3
|
-
import * as React from "react";
|
|
2
|
+
import { n as AsChildProps } from "../as-child-Dxg3Xo1G.js";
|
|
4
3
|
//#region src/components/label.d.ts
|
|
5
|
-
export type LabelProps =
|
|
6
|
-
declare function Label({ className, ...props }: LabelProps):
|
|
4
|
+
export type LabelProps = AsChildProps<'label'>;
|
|
5
|
+
declare function Label({ className, ...props }: LabelProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
7
6
|
//#endregion
|
|
8
7
|
export { Label };
|
|
9
8
|
//# sourceMappingURL=label.d.ts.map
|
package/dist/components/label.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{useAsChild as e}from"../lib/as-child.js";import{cn as t}from"../lib/utils.js";function Label({className:n,...r}){return e(`label`,{"data-slot":`label`,className:t(`flex items-center gap-2 select-none text-sm leading-none`,`group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,`peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-50`,n),...r})}export{Label};
|
|
2
2
|
//# sourceMappingURL=label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","names":["
|
|
1
|
+
{"version":3,"file":"label.js","names":["props","useAsChild","cn","className"],"sources":["../../src/components/label.tsx"],"sourcesContent":["import { type AsChildProps, useAsChild } from '../lib/as-child'\nimport { cn } from '../lib/utils'\n\nexport type LabelProps = AsChildProps<'label'>\n\nfunction Label({ className, ...props }: LabelProps) {\n return useAsChild('label', {\n 'data-slot': 'label',\n className: cn(\n 'flex items-center gap-2 select-none text-sm leading-none',\n 'group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50',\n 'peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n 'peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-50',\n className\n ),\n ...props\n })\n}\n\nexport { Label }\n"],"mappings":"6HAKA,SAAS,MAAM,CAAE,YAAW,GAAGA,GAAqB,CAClD,OAAOC,EAAW,QAAS,CACzB,YAAa,QACb,UAAWC,EACT,2DACA,uFACA,4DACA,sEACAC,CACF,EACA,GAAGH,CACL,CAAC,CACH"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n as AsChildProps } from "../as-child-Dxg3Xo1G.js";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
5
|
//#region src/components/list.d.ts
|
|
5
6
|
type ListType = 'unordered' | 'ordered';
|
|
6
7
|
type InternalListItemProps = {
|
|
@@ -11,15 +12,17 @@ declare const listVariants: (props?: ({
|
|
|
11
12
|
spacing?: "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
|
|
12
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
14
|
export type ListProps = Omit<React.ComponentProps<'ul'>, 'ref' | 'type'> & Omit<React.ComponentProps<'ol'>, 'ref' | 'type'> & VariantProps<typeof listVariants> & {
|
|
15
|
+
/**
|
|
16
|
+
* `ordered` renders an `<ol>`; `unordered` renders a `<ul>`.
|
|
17
|
+
* @default 'unordered'
|
|
18
|
+
*/
|
|
14
19
|
type?: ListType;
|
|
15
20
|
};
|
|
16
21
|
export type ListItemProps = React.ComponentProps<'li'>;
|
|
17
|
-
export type ListIconProps =
|
|
18
|
-
asChild?: boolean;
|
|
19
|
-
};
|
|
22
|
+
export type ListIconProps = AsChildProps<'span'>;
|
|
20
23
|
declare function List({ className, children, type, size, spacing, ...props }: ListProps): React.JSX.Element;
|
|
21
24
|
declare function ListItem({ className, children, __index, ...props }: ListItemProps & InternalListItemProps): React.JSX.Element;
|
|
22
|
-
declare function ListIcon({ className, asChild, ...props }: ListIconProps): React.
|
|
25
|
+
declare function ListIcon({ className, asChild, ...props }: ListIconProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
23
26
|
//#endregion
|
|
24
27
|
export { List, ListIcon, ListItem, listVariants };
|
|
25
28
|
//# sourceMappingURL=list.d.ts.map
|
package/dist/components/list.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{useAsChild as e}from"../lib/as-child.js";import{cn as t}from"../lib/utils.js";import*as n from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{cva as a}from"class-variance-authority";const o=n.createContext({type:`unordered`}),s=a(`m-0 flex list-none flex-col p-0 text-foreground`,{variants:{size:{xs:`text-xs`,sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-xl`},spacing:{xs:`gap-1`,sm:`gap-2`,md:`gap-3`,lg:`gap-4`,xl:`gap-6`}},defaultVariants:{size:`md`,spacing:`md`}});function List({className:e,children:n,type:i=`unordered`,size:a=`md`,spacing:c=`md`,...l}){let u=i===`ordered`?`ol`:`ul`;return/* @__PURE__ */ r(o.Provider,{value:{type:i},children:/* @__PURE__ */ r(u,{"data-slot":`list`,"data-type":i,"data-size":a,"data-spacing":c,className:t(s({size:a,spacing:c}),e),...l,children:injectListItemIndices(n)})})}function ListItem({className:e,children:a,__index:s,...c}){let{type:l}=n.useContext(o),u=n.Children.toArray(a),d=u.find(isListIconElement)??null,f=d?u.filter(e=>e!==d):u,p=l===`ordered`;return/* @__PURE__ */ i(`li`,{"data-slot":`list-item`,"data-type":l,"data-has-icon":d?`true`:`false`,className:t(`grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3`,e),...c,children:[/* @__PURE__ */ r(`span`,{"aria-hidden":`true`,className:t(`shrink-0`,d&&`flex min-h-5 min-w-4 items-center justify-center pt-0.5 text-primary [&_svg]:size-[1em]`,!d&&p&&`min-w-7 pt-0.5 text-right font-medium tabular-nums text-muted-foreground`,!d&&!p&&`flex min-h-5 min-w-4 items-start justify-center pt-[0.45em] text-muted-foreground`),children:d??(p?`${(s??0)+1}.`:/* @__PURE__ */ r(`span`,{className:`size-1.5 rounded-full bg-current`}))}),/* @__PURE__ */ r(`div`,{className:`min-w-0`,children:f})]})}function ListIcon({className:n,asChild:r=!1,...i}){return e(`span`,{asChild:r,"data-slot":`list-icon`,className:t(`inline-flex shrink-0 items-center justify-center text-primary [&>svg]:size-4`,r&&`size-4`,n),...i})}function injectListItemIndices(e,t={current:0}){return n.Children.map(e,e=>{if(!n.isValidElement(e))return e;if(e.type===n.Fragment){let i=e;return/* @__PURE__ */ r(n.Fragment,{children:injectListItemIndices(i.props.children,t)},e.key)}return e.type===ListItem?n.cloneElement(e,{__index:t.current++}):e})}function isListIconElement(e){return n.isValidElement(e)&&e.type===ListIcon}export{List,ListIcon,ListItem,s as listVariants};
|
|
2
2
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","names":["React","ListContext","listVariants","cva","props","Comp","type","size","spacing","cn","className","children","items","icon","content","item","isOrdered","__index","
|
|
1
|
+
{"version":3,"file":"list.js","names":["React","ListContext","listVariants","cva","props","Comp","type","size","spacing","cn","className","children","items","icon","content","item","isOrdered","__index","useAsChild","asChild","child","fragment","indexRef"],"sources":["../../src/components/list.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { type AsChildProps, useAsChild } from '../lib/as-child'\nimport { cn } from '../lib/utils'\n\ntype ListType = 'unordered' | 'ordered'\n\ntype ListContextValue = {\n type: ListType\n}\n\ntype InternalListItemProps = {\n __index?: number\n}\n\nconst ListContext = React.createContext<ListContextValue>({\n type: 'unordered'\n})\n\nconst listVariants = cva('m-0 flex list-none flex-col p-0 text-foreground', {\n variants: {\n size: {\n xs: 'text-xs',\n sm: 'text-sm',\n md: 'text-base',\n lg: 'text-lg',\n xl: 'text-xl'\n },\n spacing: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n xl: 'gap-6'\n }\n },\n defaultVariants: {\n size: 'md',\n spacing: 'md'\n }\n})\n\nexport type ListProps = Omit<React.ComponentProps<'ul'>, 'ref' | 'type'> &\n Omit<React.ComponentProps<'ol'>, 'ref' | 'type'> &\n VariantProps<typeof listVariants> & {\n /**\n * `ordered` renders an `<ol>`; `unordered` renders a `<ul>`.\n * @default 'unordered'\n */\n type?: ListType\n }\n\nexport type ListItemProps = React.ComponentProps<'li'>\n\nexport type ListIconProps = AsChildProps<'span'>\n\nfunction List({ className, children, type = 'unordered', size = 'md', spacing = 'md', ...props }: ListProps) {\n const Comp = type === 'ordered' ? 'ol' : 'ul'\n\n return (\n <ListContext.Provider value={{ type }}>\n <Comp\n data-slot=\"list\"\n data-type={type}\n data-size={size}\n data-spacing={spacing}\n className={cn(listVariants({ size, spacing }), className)}\n {...props}\n >\n {injectListItemIndices(children)}\n </Comp>\n </ListContext.Provider>\n )\n}\n\nfunction ListItem({ className, children, __index, ...props }: ListItemProps & InternalListItemProps) {\n const { type } = React.useContext(ListContext)\n const items = React.Children.toArray(children)\n const icon = items.find(isListIconElement) ?? null\n const content = icon ? items.filter((item) => item !== icon) : items\n const isOrdered = type === 'ordered'\n\n return (\n <li\n data-slot=\"list-item\"\n data-type={type}\n data-has-icon={icon ? 'true' : 'false'}\n className={cn('grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3', className)}\n {...props}\n >\n <span\n aria-hidden=\"true\"\n className={cn(\n 'shrink-0',\n icon && 'flex min-h-5 min-w-4 items-center justify-center pt-0.5 text-primary [&_svg]:size-[1em]',\n !icon && isOrdered && 'min-w-7 pt-0.5 text-right font-medium tabular-nums text-muted-foreground',\n !icon && !isOrdered && 'flex min-h-5 min-w-4 items-start justify-center pt-[0.45em] text-muted-foreground'\n )}\n >\n {icon ?? (isOrdered ? `${(__index ?? 0) + 1}.` : <span className=\"size-1.5 rounded-full bg-current\" />)}\n </span>\n <div className=\"min-w-0\">{content}</div>\n </li>\n )\n}\n\nfunction ListIcon({ className, asChild = false, ...props }: ListIconProps) {\n return useAsChild('span', {\n asChild,\n 'data-slot': 'list-icon',\n className: cn(\n 'inline-flex shrink-0 items-center justify-center text-primary [&>svg]:size-4',\n asChild && 'size-4',\n className\n ),\n ...props\n })\n}\n\nfunction injectListItemIndices(children: React.ReactNode, indexRef = { current: 0 }): React.ReactNode {\n return React.Children.map(children, (child) => {\n if (!React.isValidElement(child)) {\n return child\n }\n\n if (child.type === React.Fragment) {\n const fragment = child as React.ReactElement<{ children?: React.ReactNode }>\n\n return <React.Fragment key={child.key}>{injectListItemIndices(fragment.props.children, indexRef)}</React.Fragment>\n }\n\n if (child.type === ListItem) {\n return React.cloneElement(child as React.ReactElement<ListItemProps & InternalListItemProps>, {\n __index: indexRef.current++\n })\n }\n\n return child\n })\n}\n\nfunction isListIconElement(child: React.ReactNode): child is React.ReactElement<ListIconProps> {\n return React.isValidElement(child) && child.type === ListIcon\n}\n\nexport { List, ListIcon, ListItem, listVariants }\n"],"mappings":"sPAiBA,MAAMC,EAAcD,EAAM,cAAgC,CACxD,KAAM,WACR,CAAC,EAEKE,EAAeC,EAAI,kDAAmD,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,UACJ,GAAI,UACJ,GAAI,YACJ,GAAI,UACJ,GAAI,SACN,EACA,QAAS,CACP,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,OACN,CACF,EACA,gBAAiB,CACf,KAAM,KACN,QAAS,IACX,CACF,CAAC,EAgBD,SAAS,KAAK,CAAE,YAAW,WAAU,OAAO,YAAa,OAAO,KAAM,UAAU,KAAM,GAAGC,GAAoB,CAC3G,IAAMC,EAAOC,IAAS,UAAY,KAAO,KAEzC,MACE,kBAACL,EAAY,SAAb,CAAsB,MAAO,CAAE,MAAK,EAClC,SAAA,kBAACI,EAAD,CACE,YAAU,OACV,YAAWC,EACX,YAAWC,EACX,eAAcC,EACd,UAAWC,EAAGP,EAAa,CAAE,OAAM,SAAQ,CAAC,EAAGQ,CAAS,EACxD,GAAIN,EAEH,SAAA,sBAAsBO,CAAQ,CAC3B,CAAA,CACc,CAAA,CAE1B,CAEA,SAAS,SAAS,CAAE,YAAW,WAAU,UAAS,GAAGP,GAAgD,CACnG,GAAM,CAAE,QAASJ,EAAM,WAAWC,CAAW,EACvCW,EAAQZ,EAAM,SAAS,QAAQW,CAAQ,EACvCE,EAAOD,EAAM,KAAK,iBAAiB,GAAK,KACxCE,EAAUD,EAAOD,EAAM,OAAQ,GAASG,IAASF,CAAI,EAAID,EACzDI,EAAYV,IAAS,UAE3B,MACE,kBAAC,KAAD,CACE,YAAU,YACV,YAAWA,EACX,gBAAeO,EAAO,OAAS,QAC/B,UAAWJ,EAAG,0DAA2DC,CAAS,EAClF,GAAIN,EALN,SAAA,CAOE,kBAAC,OAAD,CACE,cAAY,OACZ,UAAWK,EACT,WACAI,GAAQ,0FACR,CAACA,GAAQG,GAAa,2EACtB,CAACH,GAAQ,CAACG,GAAa,mFACzB,EAEC,SAAAH,IAASG,EAAY,IAAIC,GAAW,GAAK,EAAE,GAAK,kBAAC,OAAD,CAAM,UAAU,kCAAoC,CAAA,EACjG,CAAA,EACN,kBAAC,MAAD,CAAK,UAAU,UAAW,SAAAH,CAAa,CAAA,CACrC,GAER,CAEA,SAAS,SAAS,CAAE,YAAW,UAAU,GAAO,GAAGV,GAAwB,CACzE,OAAOc,EAAW,OAAQ,CACxB,UACA,YAAa,YACb,UAAWT,EACT,+EACAU,GAAW,SACXT,CACF,EACA,GAAGN,CACL,CAAC,CACH,CAEA,SAAS,sBAAsB,EAA2B,EAAW,CAAE,QAAS,CAAE,EAAoB,CACpG,OAAOJ,EAAM,SAAS,IAAIW,EAAW,GAAU,CAC7C,GAAI,CAACX,EAAM,eAAeoB,CAAK,EAC7B,OAAOA,EAGT,GAAIA,EAAM,OAASpB,EAAM,SAAU,CACjC,IAAMqB,EAAWD,EAEjB,MAAO,kBAACpB,EAAM,SAAP,CAAA,SAAiC,sBAAsBqB,EAAS,MAAM,SAAUC,CAAQ,CAAkB,EAArFF,EAAM,GAA+E,CACnH,CAQA,OANIA,EAAM,OAAS,SACVpB,EAAM,aAAaoB,EAAoE,CAC5F,QAAS,EAAS,SACpB,CAAC,EAGIA,CACT,CAAC,CACH,CAEA,SAAS,kBAAkB,EAAoE,CAC7F,OAAOpB,EAAM,eAAeoB,CAAK,GAAKA,EAAM,OAAS,QACvD"}
|
|
@@ -3,64 +3,177 @@ import * as React from "react";
|
|
|
3
3
|
//#region src/components/logo.d.ts
|
|
4
4
|
type LogoSize = 'sm' | 'md' | 'lg' | number;
|
|
5
5
|
export type MaxLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
6
|
+
/**
|
|
7
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
8
|
+
* @default 'full'
|
|
9
|
+
*/
|
|
6
10
|
variant?: 'icon' | 'full';
|
|
11
|
+
/**
|
|
12
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
13
|
+
* @default 'color'
|
|
14
|
+
*/
|
|
7
15
|
tone?: 'color' | 'mono';
|
|
16
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
8
17
|
color?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
20
|
+
* @default 'md'
|
|
21
|
+
*/
|
|
9
22
|
size?: LogoSize;
|
|
10
23
|
};
|
|
11
24
|
declare function MaxLogo({ variant, tone, color, size, className, style, ...props }: MaxLogoProps): React.JSX.Element;
|
|
12
25
|
export type GomaxLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
26
|
+
/**
|
|
27
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
28
|
+
* @default 'full'
|
|
29
|
+
*/
|
|
13
30
|
variant?: 'icon' | 'full';
|
|
31
|
+
/**
|
|
32
|
+
* `color` uses the brand colors; `mono` a single color; `reversed` is a white lockup with an orange accent for dark backgrounds.
|
|
33
|
+
* @default 'color'
|
|
34
|
+
*/
|
|
14
35
|
tone?: 'color' | 'mono' | 'reversed';
|
|
36
|
+
/** Color of the `mono` and `reversed` tone. Defaults to white. */
|
|
15
37
|
color?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
40
|
+
* @default 'md'
|
|
41
|
+
*/
|
|
16
42
|
size?: LogoSize;
|
|
17
43
|
};
|
|
18
44
|
declare function GomaxLogo({ variant, tone, color, size, className, style, ...props }: GomaxLogoProps): React.JSX.Element;
|
|
19
45
|
export type BippiLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
46
|
+
/**
|
|
47
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
48
|
+
* @default 'full'
|
|
49
|
+
*/
|
|
20
50
|
variant?: 'icon' | 'full';
|
|
51
|
+
/**
|
|
52
|
+
* `color` uses the brand colors; `mono` a single color; `reversed` is a white lockup with an orange accent for dark backgrounds.
|
|
53
|
+
* @default 'color'
|
|
54
|
+
*/
|
|
21
55
|
tone?: 'color' | 'mono' | 'reversed';
|
|
56
|
+
/** Color of the `mono` and `reversed` tone. Defaults to white. */
|
|
22
57
|
color?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
60
|
+
* @default 'md'
|
|
61
|
+
*/
|
|
23
62
|
size?: LogoSize;
|
|
24
63
|
};
|
|
25
64
|
declare function BippiLogo({ variant, tone, color, size, className, style, ...props }: BippiLogoProps): React.JSX.Element;
|
|
26
65
|
export type IntelitrackLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
66
|
+
/**
|
|
67
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
68
|
+
* @default 'full'
|
|
69
|
+
*/
|
|
27
70
|
variant?: 'icon' | 'full';
|
|
71
|
+
/**
|
|
72
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
73
|
+
* @default 'color'
|
|
74
|
+
*/
|
|
28
75
|
tone?: 'color' | 'mono';
|
|
76
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
29
77
|
color?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
80
|
+
* @default 'md'
|
|
81
|
+
*/
|
|
30
82
|
size?: LogoSize;
|
|
31
83
|
};
|
|
32
84
|
declare function IntelitrackLogo({ variant, tone, color, size, className, style, ...props }: IntelitrackLogoProps): React.JSX.Element;
|
|
33
85
|
export type KovraLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
86
|
+
/**
|
|
87
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
88
|
+
* @default 'full'
|
|
89
|
+
*/
|
|
34
90
|
variant?: 'icon' | 'full';
|
|
91
|
+
/**
|
|
92
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
93
|
+
* @default 'color'
|
|
94
|
+
*/
|
|
35
95
|
tone?: 'color' | 'mono';
|
|
96
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
36
97
|
color?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
100
|
+
* @default 'md'
|
|
101
|
+
*/
|
|
37
102
|
size?: LogoSize;
|
|
38
103
|
};
|
|
39
104
|
declare function KovraLogo({ variant, tone, color, size, className, style, ...props }: KovraLogoProps): React.JSX.Element;
|
|
40
105
|
export type NeutraLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
106
|
+
/**
|
|
107
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
108
|
+
* @default 'full'
|
|
109
|
+
*/
|
|
41
110
|
variant?: 'icon' | 'full';
|
|
111
|
+
/**
|
|
112
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
113
|
+
* @default 'color'
|
|
114
|
+
*/
|
|
42
115
|
tone?: 'color' | 'mono';
|
|
116
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
43
117
|
color?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
120
|
+
* @default 'md'
|
|
121
|
+
*/
|
|
44
122
|
size?: LogoSize;
|
|
45
123
|
};
|
|
46
124
|
declare function NeutraLogo({ variant, tone, color, size, className, style, ...props }: NeutraLogoProps): React.JSX.Element;
|
|
47
125
|
export type RdLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
126
|
+
/**
|
|
127
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
128
|
+
* @default 'full'
|
|
129
|
+
*/
|
|
48
130
|
variant?: 'icon' | 'full';
|
|
131
|
+
/**
|
|
132
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
133
|
+
* @default 'color'
|
|
134
|
+
*/
|
|
49
135
|
tone?: 'color' | 'mono';
|
|
136
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
50
137
|
color?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
140
|
+
* @default 'md'
|
|
141
|
+
*/
|
|
51
142
|
size?: LogoSize;
|
|
52
143
|
};
|
|
53
144
|
declare function RdLogo({ variant, tone, color, size, className, style, ...props }: RdLogoProps): React.JSX.Element;
|
|
54
145
|
export type FibonashLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
146
|
+
/**
|
|
147
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
148
|
+
* @default 'full'
|
|
149
|
+
*/
|
|
55
150
|
variant?: 'icon' | 'full';
|
|
151
|
+
/**
|
|
152
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
153
|
+
* @default 'color'
|
|
154
|
+
*/
|
|
56
155
|
tone?: 'color' | 'mono';
|
|
156
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
57
157
|
color?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
160
|
+
* @default 'md'
|
|
161
|
+
*/
|
|
58
162
|
size?: LogoSize;
|
|
59
163
|
};
|
|
60
164
|
declare function FibonashLogo({ variant, tone, color, size, className, style, ...props }: FibonashLogoProps): React.JSX.Element;
|
|
61
165
|
export type LetsLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
166
|
+
/**
|
|
167
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
168
|
+
* @default 'color'
|
|
169
|
+
*/
|
|
62
170
|
tone?: 'color' | 'mono';
|
|
171
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
63
172
|
color?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
175
|
+
* @default 'md'
|
|
176
|
+
*/
|
|
64
177
|
size?: LogoSize;
|
|
65
178
|
};
|
|
66
179
|
declare function LetsLogo({ tone, color, size, className, style, ...props }: LetsLogoProps): React.JSX.Element;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n as AsChildProps } from "../as-child-Dxg3Xo1G.js";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
5
|
//#region src/components/marker.d.ts
|
|
5
6
|
declare const markerVariants: (props?: ({
|
|
6
7
|
variant?: "border" | "default" | "separator" | null | undefined;
|
|
7
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
-
export type MarkerProps =
|
|
9
|
-
asChild?: boolean;
|
|
10
|
-
};
|
|
9
|
+
export type MarkerProps = AsChildProps<'div'> & VariantProps<typeof markerVariants>;
|
|
11
10
|
export type MarkerIconProps = React.ComponentProps<'span'>;
|
|
12
11
|
export type MarkerContentProps = React.ComponentProps<'span'>;
|
|
13
|
-
declare function Marker({ className, variant,
|
|
12
|
+
declare function Marker({ className, variant, ...props }: MarkerProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
14
13
|
declare function MarkerIcon({ className, ...props }: MarkerIconProps): React.JSX.Element;
|
|
15
14
|
declare function MarkerContent({ className, ...props }: MarkerContentProps): React.JSX.Element;
|
|
16
15
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{useAsChild as e}from"../lib/as-child.js";import{cn as t}from"../lib/utils.js";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(`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`,{variants:{variant:{default:``,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`,border:`border-b border-border pb-2`}}});function Marker({className:n,variant:r=`default`,...a}){return e(`div`,{"data-slot":`marker`,"data-variant":r,className:t(i({variant:r,className:n})),...a})}function MarkerIcon({className:e,...r}){return/* @__PURE__ */ n(`span`,{"data-slot":`marker-icon`,"aria-hidden":`true`,className:t(`size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r})}function MarkerContent({className:e,...r}){return/* @__PURE__ */ n(`span`,{"data-slot":`marker-content`,className:t(`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`,e),...r})}export{Marker,MarkerContent,MarkerIcon,i as markerVariants};
|
|
2
2
|
//# sourceMappingURL=marker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marker.js","names":["markerVariants","cva","props","
|
|
1
|
+
{"version":3,"file":"marker.js","names":["markerVariants","cva","props","useAsChild","variant","cn","className"],"sources":["../../src/components/marker.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { type AsChildProps, useAsChild } from '../lib/as-child'\nimport { cn } from '../lib/utils'\n\nconst markerVariants = cva(\n \"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\",\n {\n variants: {\n variant: {\n default: '',\n separator:\n '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',\n border: 'border-b border-border pb-2'\n }\n }\n }\n)\n\nexport type MarkerProps = AsChildProps<'div'> & VariantProps<typeof markerVariants>\n\nexport type MarkerIconProps = React.ComponentProps<'span'>\n\nexport type MarkerContentProps = React.ComponentProps<'span'>\n\nfunction Marker({ className, variant = 'default', ...props }: MarkerProps) {\n return useAsChild('div', {\n 'data-slot': 'marker',\n 'data-variant': variant,\n className: cn(markerVariants({ variant, className })),\n ...props\n })\n}\n\nfunction MarkerIcon({ className, ...props }: MarkerIconProps) {\n return (\n <span\n data-slot=\"marker-icon\"\n aria-hidden=\"true\"\n className={cn(\"size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n />\n )\n}\n\nfunction MarkerContent({ className, ...props }: MarkerContentProps) {\n return (\n <span\n data-slot=\"marker-content\"\n className={cn(\n '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',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Marker, MarkerContent, MarkerIcon, markerVariants }\n"],"mappings":"oNAOA,MAAMA,EAAiBC,EACrB,2MACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,GACT,UACE,yIACF,OAAQ,6BACV,CACF,CACF,CACF,EAQA,SAAS,OAAO,CAAE,YAAW,UAAU,UAAW,GAAGC,GAAsB,CACzE,OAAOC,EAAW,MAAO,CACvB,YAAa,SACb,eAAgBC,EAChB,UAAWC,EAAGL,EAAe,CAAE,UAAS,WAAU,CAAC,CAAC,EACpD,GAAGE,CACL,CAAC,CACH,CAEA,SAAS,WAAW,CAAE,YAAW,GAAGA,GAA0B,CAC5D,MACE,kBAAC,OAAD,CACE,YAAU,cACV,cAAY,OACZ,UAAWG,EAAG,uDAAwDC,CAAS,EAC/E,GAAIJ,CACL,CAAA,CAEL,CAEA,SAAS,cAAc,CAAE,YAAW,GAAGA,GAA6B,CAClE,MACE,kBAAC,OAAD,CACE,YAAU,iBACV,UAAWG,EACT,iMACAC,CACF,EACA,GAAIJ,CACL,CAAA,CAEL"}
|
|
@@ -3,11 +3,17 @@ import { InputProps } from "./input.js";
|
|
|
3
3
|
import { Modify, Replacement, Track } from "../hooks/use-mask.js";
|
|
4
4
|
//#region src/components/mask-input.d.ts
|
|
5
5
|
export type MaskInputProps = InputProps & {
|
|
6
|
+
/** Mask pattern. `_` is a digit, `#` a letter, `*` any character; everything else is fixed. */
|
|
6
7
|
mask: string;
|
|
8
|
+
/** Custom tokens for `mask`, mapping each character to the pattern it accepts. */
|
|
7
9
|
replacement?: string | Replacement;
|
|
10
|
+
/** Shows the whole mask, with placeholders for the characters not typed yet. */
|
|
8
11
|
showMask?: boolean;
|
|
12
|
+
/** Keeps each character in its position when another one is deleted, instead of shifting the rest left. */
|
|
9
13
|
separate?: boolean;
|
|
14
|
+
/** Changes the typed or pasted text before it is masked. */
|
|
10
15
|
track?: Track;
|
|
16
|
+
/** Changes the mask options on each input, for masks that depend on the current value. */
|
|
11
17
|
modify?: Modify;
|
|
12
18
|
};
|
|
13
19
|
declare function MaskInput({ ref, mask, replacement, showMask, separate, track, modify, ...props }: MaskInputProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask-input.js","names":["props","maskRef","useMask","Input","composeRefs","ref"],"sources":["../../src/components/mask-input.tsx"],"sourcesContent":["import { type Modify, type Replacement, type Track, useMask } from '../hooks/use-mask'\nimport { composeRefs } from '../lib/compose-refs'\nimport { Input, type InputProps } from './input'\n\nexport type MaskInputProps = InputProps & {\n mask: string\n replacement?: string | Replacement\n showMask?: boolean\n separate?: boolean\n track?: Track\n modify?: Modify\n}\n\nfunction MaskInput({ ref, mask, replacement, showMask, separate, track, modify, ...props }: MaskInputProps) {\n const maskRef = useMask({ mask, replacement, showMask, separate, track, modify })\n\n return <Input data-slot=\"mask-input\" {...props} ref={composeRefs<HTMLInputElement>(ref, maskRef)} />\n}\n\nexport { MaskInput }\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"mask-input.js","names":["props","maskRef","useMask","Input","composeRefs","ref"],"sources":["../../src/components/mask-input.tsx"],"sourcesContent":["import { type Modify, type Replacement, type Track, useMask } from '../hooks/use-mask'\nimport { composeRefs } from '../lib/compose-refs'\nimport { Input, type InputProps } from './input'\n\nexport type MaskInputProps = InputProps & {\n /** Mask pattern. `_` is a digit, `#` a letter, `*` any character; everything else is fixed. */\n mask: string\n /** Custom tokens for `mask`, mapping each character to the pattern it accepts. */\n replacement?: string | Replacement\n /** Shows the whole mask, with placeholders for the characters not typed yet. */\n showMask?: boolean\n /** Keeps each character in its position when another one is deleted, instead of shifting the rest left. */\n separate?: boolean\n /** Changes the typed or pasted text before it is masked. */\n track?: Track\n /** Changes the mask options on each input, for masks that depend on the current value. */\n modify?: Modify\n}\n\nfunction MaskInput({ ref, mask, replacement, showMask, separate, track, modify, ...props }: MaskInputProps) {\n const maskRef = useMask({ mask, replacement, showMask, separate, track, modify })\n\n return <Input data-slot=\"mask-input\" {...props} ref={composeRefs<HTMLInputElement>(ref, maskRef)} />\n}\n\nexport { MaskInput }\n"],"mappings":"uNAmBA,SAAS,UAAU,CAAE,MAAK,OAAM,cAAa,WAAU,WAAU,QAAO,SAAQ,GAAGA,GAAyB,CAC1G,IAAMC,EAAUC,EAAQ,CAAE,OAAM,cAAa,WAAU,WAAU,QAAO,QAAO,CAAC,EAEhF,MAAO,kBAACC,EAAD,CAAO,YAAU,aAAa,GAAIH,EAAO,IAAKI,EAA8BC,EAAKJ,CAAO,CAAI,CAAA,CACrG"}
|
|
@@ -2,11 +2,15 @@ import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
//#region src/components/native-select.d.ts
|
|
4
4
|
export type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {
|
|
5
|
+
/**
|
|
6
|
+
* Height of the select.
|
|
7
|
+
* @default 'md'
|
|
8
|
+
*/
|
|
5
9
|
size?: 'sm' | 'md';
|
|
6
10
|
};
|
|
7
11
|
export type NativeSelectOptionProps = React.ComponentProps<'option'>;
|
|
8
12
|
export type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>;
|
|
9
|
-
declare function NativeSelect({ className, id, size, ...props }: NativeSelectProps): React.JSX.Element;
|
|
13
|
+
declare function NativeSelect({ className, id, size, 'aria-invalid': ariaInvalid, ...props }: NativeSelectProps): React.JSX.Element;
|
|
10
14
|
declare function NativeSelectOption({ ...props }: NativeSelectOptionProps): React.JSX.Element;
|
|
11
15
|
declare function NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps): React.JSX.Element;
|
|
12
16
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{useFieldControlId as t}from"./field.js";import{IconSelector as
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{useFieldControlId as t,useFieldInvalid as n}from"./field.js";import{IconSelector as r}from"@tabler/icons-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";function NativeSelect({className:o,id:s,size:c=`md`,"aria-invalid":l,...u}){let d=t(s),f=n(l);return/* @__PURE__ */ a(`div`,{className:e(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,o),"data-slot":`native-select-wrapper`,"data-size":c,children:[/* @__PURE__ */ i(`select`,{id:d,"aria-invalid":f,"data-slot":`native-select`,"data-size":c,className:e(`border-input dark:bg-input/30 dark:hover:bg-input/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none outline-none`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`placeholder:text-placeholder selection:bg-primary selection:text-primary-foreground`,`data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5`,`disabled:pointer-events-none disabled:cursor-not-allowed`),...u}),/* @__PURE__ */ i(r,{className:`text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function NativeSelectOption({...e}){return/* @__PURE__ */ i(`option`,{"data-slot":`native-select-option`,...e})}function NativeSelectOptGroup({className:t,...n}){return/* @__PURE__ */ i(`optgroup`,{"data-slot":`native-select-optgroup`,className:e(t),...n})}export{NativeSelect,NativeSelectOptGroup,NativeSelectOption};
|
|
2
2
|
//# sourceMappingURL=native-select.js.map
|