@uselets/ui 1.12.0 → 1.14.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 +6 -2
- package/dist/{chart-lqgodZYQ.d.ts → chart-CVe5-EWS.d.ts} +9 -39
- package/dist/components/accordion.d.ts +4 -19
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.d.ts +12 -53
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.d.ts +4 -18
- package/dist/components/anchor.d.ts +2 -9
- package/dist/components/area-chart.d.ts +2 -26
- package/dist/components/area-chart.js.map +1 -1
- package/dist/components/avatar.d.ts +6 -26
- package/dist/components/badge.d.ts +4 -12
- package/dist/components/bar-chart.d.ts +2 -24
- package/dist/components/bar-chart.js.map +1 -1
- package/dist/components/breadcrumb.d.ts +7 -31
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.d.ts +3 -16
- package/dist/components/button.d.ts +4 -15
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.d.ts +2 -19
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.d.ts +7 -30
- package/dist/components/carousel.d.ts +6 -37
- package/dist/components/carousel.js +1 -1
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/carousel.spec.d.ts +1 -1
- package/dist/components/carousel.spec.js +93 -1
- package/dist/components/carousel.spec.js.map +1 -1
- package/dist/components/center.d.ts +2 -8
- package/dist/components/chart.d.ts +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox.d.ts +3 -12
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/code.d.ts +1 -5
- package/dist/components/collapsible.d.ts +3 -10
- package/dist/components/combobox.d.ts +15 -80
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.d.ts +9 -43
- package/dist/components/command.js.map +1 -1
- package/dist/components/container.d.ts +2 -7
- package/dist/components/data-table.d.ts +8 -61
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-range-picker.d.ts +11 -75
- 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 +12 -49
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/donut-chart.d.ts +1 -10
- package/dist/components/donut-chart.js.map +1 -1
- package/dist/components/drawer.d.ts +13 -49
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.d.ts +15 -66
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/dropzone.d.ts +1 -5
- package/dist/components/dropzone.js.map +1 -1
- package/dist/components/empty.d.ts +6 -26
- package/dist/components/field.d.ts +11 -48
- package/dist/components/field.js.map +1 -1
- package/dist/components/field.spec.d.ts +1 -1
- package/dist/components/field.spec.js +1 -1
- package/dist/components/field.spec.js.map +1 -1
- package/dist/components/flex.d.ts +5 -14
- package/dist/components/grid.d.ts +2 -18
- package/dist/components/group.d.ts +4 -12
- package/dist/components/heading.d.ts +2 -8
- package/dist/components/hover-card.d.ts +3 -13
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input-group.d.ts +8 -32
- package/dist/components/input-otp.d.ts +4 -19
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.d.ts +1 -7
- package/dist/components/kbd.d.ts +2 -9
- package/dist/components/label.d.ts +1 -5
- package/dist/components/list.d.ts +5 -22
- package/dist/components/list.js.map +1 -1
- package/dist/components/marker.d.ts +18 -0
- package/dist/components/marker.js +2 -0
- package/dist/components/marker.js.map +1 -0
- package/dist/components/mask-input.d.ts +1 -11
- package/dist/components/native-select.d.ts +3 -14
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/navigation-menu.d.ts +8 -36
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/number-field.d.ts +35 -0
- package/dist/components/number-field.js +2 -0
- package/dist/components/number-field.js.map +1 -0
- package/dist/components/pagination.d.ts +7 -33
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/phone-input.d.ts +13 -0
- package/dist/components/phone-input.js +2 -0
- package/dist/components/phone-input.js.map +1 -0
- package/dist/components/pie-chart.d.ts +2 -24
- package/dist/components/pie-chart.js.map +1 -1
- package/dist/components/popover.d.ts +7 -28
- package/dist/components/progress.d.ts +3 -10
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.d.ts +4 -17
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.d.ts +3 -13
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/ring-progress.d.ts +3 -11
- package/dist/components/ring-progress.js.map +1 -1
- package/dist/components/scroll-area.d.ts +2 -11
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.d.ts +10 -46
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.d.ts +1 -7
- package/dist/components/sidebar.d.ts +24 -118
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/simple-grid.d.ts +1 -10
- package/dist/components/skeleton.d.ts +1 -7
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/skeleton.spec.d.ts +1 -1
- package/dist/components/skeleton.spec.js +1 -1
- package/dist/components/skeleton.spec.js.map +1 -1
- package/dist/components/slider.d.ts +1 -10
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sonner.d.ts +0 -1
- package/dist/components/spinner.d.ts +2 -7
- package/dist/components/stack.d.ts +4 -11
- package/dist/components/stepper.d.ts +71 -0
- package/dist/components/stepper.js +2 -0
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/switch.d.ts +1 -10
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts +10 -43
- package/dist/components/tabs.d.ts +5 -21
- package/dist/components/text.d.ts +2 -8
- package/dist/components/textarea.d.ts +1 -6
- package/dist/components/theme.d.ts +1 -7
- package/dist/components/theme.js.map +1 -1
- package/dist/components/timeline.d.ts +5 -6
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/toggle-group.d.ts +2 -19
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.d.ts +4 -11
- package/dist/components/tooltip.d.ts +5 -28
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unstyled-button.d.ts +1 -7
- package/dist/components/visibility.d.ts +2 -9
- package/dist/hooks/use-breakpoint-value.d.ts +0 -1
- package/dist/hooks/use-breakpoint-value.spec.d.ts +1 -1
- package/dist/hooks/use-breakpoint-value.spec.js +1 -1
- package/dist/hooks/use-breakpoint-value.spec.js.map +1 -1
- package/dist/hooks/use-breakpoint.d.ts +0 -1
- package/dist/hooks/use-breakpoint.spec.d.ts +1 -1
- package/dist/hooks/use-breakpoint.spec.js +1 -1
- package/dist/hooks/use-disclosure.d.ts +0 -1
- package/dist/hooks/use-disclosure.spec.d.ts +1 -1
- package/dist/hooks/use-disclosure.spec.js +1 -1
- package/dist/hooks/use-document-visibility.d.ts +0 -1
- package/dist/hooks/use-document-visibility.spec.d.ts +1 -1
- package/dist/hooks/use-document-visibility.spec.js +1 -1
- package/dist/hooks/use-hotkeys.d.ts +1 -1
- package/dist/hooks/use-hotkeys.js +1 -1
- package/dist/hooks/use-hotkeys.spec.d.ts +1 -1
- package/dist/hooks/use-hotkeys.spec.js +1 -1
- package/dist/hooks/use-idle.d.ts +0 -1
- package/dist/hooks/use-idle.spec.d.ts +1 -1
- package/dist/hooks/use-idle.spec.js +1 -1
- package/dist/hooks/use-interval.d.ts +10 -8
- package/dist/hooks/use-interval.spec.d.ts +1 -1
- package/dist/hooks/use-interval.spec.js +1 -1
- package/dist/hooks/use-local-storage.d.ts +0 -1
- package/dist/hooks/use-local-storage.spec.d.ts +1 -1
- package/dist/hooks/use-local-storage.spec.js +1 -1
- package/dist/hooks/use-mask.d.ts +0 -1
- package/dist/hooks/use-mask.js +1 -1
- package/dist/hooks/use-mask.js.map +1 -1
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-mobile.spec.d.ts +1 -1
- package/dist/hooks/use-mobile.spec.js +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.js +1 -1
- package/dist/lib/badge.d.ts +0 -1
- package/dist/lib/button.d.ts +0 -1
- package/dist/lib/color.d.ts +1 -2
- package/dist/lib/compose-refs.d.ts +0 -1
- package/dist/lib/progress.d.ts +0 -1
- package/dist/lib/utils.d.ts +0 -1
- package/dist/{magic-string.es-DbBO8R0S.js → magic-string.es-oADFB1hu.js} +2 -2
- package/dist/{magic-string.es-DbBO8R0S.js.map → magic-string.es-oADFB1hu.js.map} +1 -1
- package/dist/{react.esm-D88qr0ij.js → react.esm-D5AipFQb.js} +5 -5
- package/dist/{react.esm-D88qr0ij.js.map → react.esm-D5AipFQb.js.map} +1 -1
- package/dist/skills/uselets-ui/references/component-catalog.md +14 -2
- package/dist/{use-hotkeys-BOfOFxb5.js → use-hotkeys-C0d5t4yo.js} +2 -2
- package/dist/{use-hotkeys-BOfOFxb5.js.map → use-hotkeys-C0d5t4yo.js.map} +1 -1
- package/dist/{use-hotkeys-Cl1cV6e8.d.ts → use-hotkeys-DloZH-B4.d.ts} +1 -2
- package/dist/utils-Cj3IZeiu.js +37 -0
- package/dist/utils-Cj3IZeiu.js.map +1 -0
- package/package.json +17 -16
- package/skills/uselets-ui/references/component-catalog.md +14 -2
- package/dist/dist-B-hwiqYg.js +0 -129
- package/dist/dist-B-hwiqYg.js.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { OTPInput, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";
|
|
4
|
-
|
|
5
4
|
//#region src/components/input-otp.d.ts
|
|
6
5
|
type InputOTPProps = React.ComponentProps<typeof OTPInput> & {
|
|
7
6
|
containerClassName?: string;
|
|
@@ -11,24 +10,10 @@ type InputOTPSlotProps = React.ComponentProps<'div'> & {
|
|
|
11
10
|
index: number;
|
|
12
11
|
};
|
|
13
12
|
type InputOTPSeparatorProps = React.ComponentProps<'div'>;
|
|
14
|
-
declare function InputOTP({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
...props
|
|
19
|
-
}: InputOTPProps): React.JSX.Element;
|
|
20
|
-
declare function InputOTPGroup({
|
|
21
|
-
className,
|
|
22
|
-
...props
|
|
23
|
-
}: InputOTPGroupProps): React.JSX.Element;
|
|
24
|
-
declare function InputOTPSlot({
|
|
25
|
-
index,
|
|
26
|
-
className,
|
|
27
|
-
...props
|
|
28
|
-
}: InputOTPSlotProps): React.JSX.Element;
|
|
29
|
-
declare function InputOTPSeparator({
|
|
30
|
-
...props
|
|
31
|
-
}: InputOTPSeparatorProps): React.JSX.Element;
|
|
13
|
+
declare function InputOTP({ className, containerClassName, id, ...props }: InputOTPProps): React.JSX.Element;
|
|
14
|
+
declare function InputOTPGroup({ className, ...props }: InputOTPGroupProps): React.JSX.Element;
|
|
15
|
+
declare function InputOTPSlot({ index, className, ...props }: InputOTPSlotProps): React.JSX.Element;
|
|
16
|
+
declare function InputOTPSeparator({ ...props }: InputOTPSeparatorProps): React.JSX.Element;
|
|
32
17
|
//#endregion
|
|
33
18
|
export { InputOTP, InputOTPGroup, InputOTPGroupProps, InputOTPProps, InputOTPSeparator, InputOTPSeparatorProps, InputOTPSlot, InputOTPSlotProps, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS };
|
|
34
19
|
//# sourceMappingURL=input-otp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.js","names":[],"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 id={fieldControlId}\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 )\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, ...props }: InputOTPSlotProps) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\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":"iYA0BA,SAAS,SAAS,CAAE,YAAW,qBAAoB,KAAI,GAAG,GAAwB,CAGhF,OACE,EAAC,EAAD,CACE,GAJmB,EAAkB,CAIpB,EACjB,YAAU,YACV,mBAAoB,EAAG,yDAA0D,CAAkB,EACnG,WAAY,GACZ,UAAW,EAAG,8BAA+B,CAAS,EACtD,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,cAAc,CAAE,YAAW,GAAG,GAA6B,CAClE,OACE,EAAC,MAAD,CACE,YAAU,kBACV,UAAW,EACT,+BACA,6IACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,aAAa,CAAE,QAAO,YAAW,GAAG,GAA4B,CAEvE,GAAM,CAAE,OAAM,eAAc,YADJ,EAAM,WAAW,CACc,CAAC,EAAE,MAAM,IAAU,CAAC,EAE3E,OACE,EAAC,MAAD,CACE,YAAU,iBACV,cAAa,EACb,UAAW,EACT,uIACA,sDACA,qFACA,gOACA,CACF,EACA,GAAI,
|
|
1
|
+
{"version":3,"file":"input-otp.js","names":[],"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 id={fieldControlId}\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 )\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, ...props }: InputOTPSlotProps) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\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":"iYA0BA,SAAS,SAAS,CAAE,YAAW,qBAAoB,KAAI,GAAG,GAAwB,CAGhF,OACE,EAAC,EAAD,CACE,GAJmB,EAAkB,CAIpB,EACjB,YAAU,YACV,mBAAoB,EAAG,yDAA0D,CAAkB,EACnG,WAAY,GACZ,UAAW,EAAG,8BAA+B,CAAS,EACtD,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,cAAc,CAAE,YAAW,GAAG,GAA6B,CAClE,OACE,EAAC,MAAD,CACE,YAAU,kBACV,UAAW,EACT,+BACA,6IACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,aAAa,CAAE,QAAO,YAAW,GAAG,GAA4B,CAEvE,GAAM,CAAE,OAAM,eAAc,YADJ,EAAM,WAAW,CACc,CAAC,EAAE,MAAM,IAAU,CAAC,EAE3E,OACE,EAAC,MAAD,CACE,YAAU,iBACV,cAAa,EACb,UAAW,EACT,uIACA,sDACA,qFACA,gOACA,CACF,EACA,GAAI,EAVN,SAAA,CAYG,EACA,GACC,EAAC,MAAD,CAAK,UAAU,wEACb,SAAA,EAAC,MAAD,CAAK,UAAU,0DAA4D,CAAA,CACxE,CAAA,CAEJ,GAET,CAEA,SAAS,kBAAkB,CAAE,GAAG,GAAiC,CAC/D,OACE,EAAC,MAAD,CAAK,YAAU,sBAAsB,UAAU,yDAAyD,GAAI,EAC1G,SAAA,EAAC,EAAD,CAAY,CAAA,CACT,CAAA,CAET"}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
4
3
|
//#region src/components/input.d.ts
|
|
5
4
|
type InputProps = React.ComponentProps<'input'>;
|
|
6
|
-
declare function Input({
|
|
7
|
-
className,
|
|
8
|
-
id,
|
|
9
|
-
type,
|
|
10
|
-
...props
|
|
11
|
-
}: InputProps): React.JSX.Element;
|
|
5
|
+
declare function Input({ className, id, type, ...props }: InputProps): React.JSX.Element;
|
|
12
6
|
//#endregion
|
|
13
7
|
export { Input, InputProps };
|
|
14
8
|
//# sourceMappingURL=input.d.ts.map
|
package/dist/components/kbd.d.ts
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
4
3
|
//#region src/components/kbd.d.ts
|
|
5
4
|
type KbdProps = React.ComponentProps<'kbd'>;
|
|
6
5
|
type KbdGroupProps = React.ComponentProps<'div'>;
|
|
7
|
-
declare function Kbd({
|
|
8
|
-
|
|
9
|
-
...props
|
|
10
|
-
}: KbdProps): React.JSX.Element;
|
|
11
|
-
declare function KbdGroup({
|
|
12
|
-
className,
|
|
13
|
-
...props
|
|
14
|
-
}: KbdGroupProps): React.JSX.Element;
|
|
6
|
+
declare function Kbd({ className, ...props }: KbdProps): React.JSX.Element;
|
|
7
|
+
declare function KbdGroup({ className, ...props }: KbdGroupProps): React.JSX.Element;
|
|
15
8
|
//#endregion
|
|
16
9
|
export { Kbd, KbdGroup, KbdGroupProps, KbdProps };
|
|
17
10
|
//# sourceMappingURL=kbd.d.ts.map
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { Label as Label$1 } from "radix-ui";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/label.d.ts
|
|
6
5
|
type LabelProps = React.ComponentProps<typeof Label$1.Root>;
|
|
7
|
-
declare function Label({
|
|
8
|
-
className,
|
|
9
|
-
...props
|
|
10
|
-
}: LabelProps): React.JSX.Element;
|
|
6
|
+
declare function Label({ className, ...props }: LabelProps): React.JSX.Element;
|
|
11
7
|
//#endregion
|
|
12
8
|
export { Label, LabelProps };
|
|
13
9
|
//# sourceMappingURL=label.d.ts.map
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/list.d.ts
|
|
6
5
|
type ListType = 'unordered' | 'ordered';
|
|
7
6
|
type InternalListItemProps = {
|
|
8
7
|
__index?: number;
|
|
9
8
|
};
|
|
10
9
|
declare const listVariants: (props?: ({
|
|
11
|
-
size?: "
|
|
12
|
-
spacing?: "
|
|
10
|
+
size?: "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
|
|
11
|
+
spacing?: "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
|
|
13
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
13
|
type ListProps = Omit<React.ComponentProps<'ul'>, 'ref' | 'type'> & Omit<React.ComponentProps<'ol'>, 'ref' | 'type'> & VariantProps<typeof listVariants> & {
|
|
15
14
|
type?: ListType;
|
|
@@ -18,25 +17,9 @@ type ListItemProps = React.ComponentProps<'li'>;
|
|
|
18
17
|
type ListIconProps = React.ComponentProps<'span'> & {
|
|
19
18
|
asChild?: boolean;
|
|
20
19
|
};
|
|
21
|
-
declare function List({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
type,
|
|
25
|
-
size,
|
|
26
|
-
spacing,
|
|
27
|
-
...props
|
|
28
|
-
}: ListProps): React.JSX.Element;
|
|
29
|
-
declare function ListItem({
|
|
30
|
-
className,
|
|
31
|
-
children,
|
|
32
|
-
__index,
|
|
33
|
-
...props
|
|
34
|
-
}: ListItemProps & InternalListItemProps): React.JSX.Element;
|
|
35
|
-
declare function ListIcon({
|
|
36
|
-
className,
|
|
37
|
-
asChild,
|
|
38
|
-
...props
|
|
39
|
-
}: ListIconProps): React.JSX.Element;
|
|
20
|
+
declare function List({ className, children, type, size, spacing, ...props }: ListProps): React.JSX.Element;
|
|
21
|
+
declare function ListItem({ className, children, __index, ...props }: ListItemProps & InternalListItemProps): React.JSX.Element;
|
|
22
|
+
declare function ListIcon({ className, asChild, ...props }: ListIconProps): React.JSX.Element;
|
|
40
23
|
//#endregion
|
|
41
24
|
export { List, ListIcon, ListIconProps, ListItem, ListItemProps, ListProps, listVariants };
|
|
42
25
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","names":[],"sources":["../../src/components/list.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\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 type?: ListType\n }\n\nexport type ListItemProps = React.ComponentProps<'li'>\n\nexport type ListIconProps = React.ComponentProps<'span'> & {\n asChild?: boolean\n}\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 const Comp = asChild ? Slot.Root : 'span'\n\n return (\n <Comp\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}\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":"sOAiBA,MAAM,EAAc,EAAM,cAAgC,CACxD,KAAM,WACR,CAAC,EAEK,EAAe,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,EAcD,SAAS,KAAK,CAAE,YAAW,WAAU,OAAO,YAAa,OAAO,KAAM,UAAU,KAAM,GAAG,GAAoB,CAC3G,IAAM,EAAO,IAAS,UAAY,KAAO,KAEzC,OACE,EAAC,EAAY,SAAb,CAAsB,MAAO,CAAE,MAAK,
|
|
1
|
+
{"version":3,"file":"list.js","names":[],"sources":["../../src/components/list.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\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 type?: ListType\n }\n\nexport type ListItemProps = React.ComponentProps<'li'>\n\nexport type ListIconProps = React.ComponentProps<'span'> & {\n asChild?: boolean\n}\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 const Comp = asChild ? Slot.Root : 'span'\n\n return (\n <Comp\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}\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":"sOAiBA,MAAM,EAAc,EAAM,cAAgC,CACxD,KAAM,WACR,CAAC,EAEK,EAAe,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,EAcD,SAAS,KAAK,CAAE,YAAW,WAAU,OAAO,YAAa,OAAO,KAAM,UAAU,KAAM,GAAG,GAAoB,CAC3G,IAAM,EAAO,IAAS,UAAY,KAAO,KAEzC,OACE,EAAC,EAAY,SAAb,CAAsB,MAAO,CAAE,MAAK,EAClC,SAAA,EAAC,EAAD,CACE,YAAU,OACV,YAAW,EACX,YAAW,EACX,eAAc,EACd,UAAW,EAAG,EAAa,CAAE,OAAM,SAAQ,CAAC,EAAG,CAAS,EACxD,GAAI,EAEH,SAAA,sBAAsB,CAAQ,CAC3B,CAAA,CACc,CAAA,CAE1B,CAEA,SAAS,SAAS,CAAE,YAAW,WAAU,UAAS,GAAG,GAAgD,CACnG,GAAM,CAAE,QAAS,EAAM,WAAW,CAAW,EACvC,EAAQ,EAAM,SAAS,QAAQ,CAAQ,EACvC,EAAO,EAAM,KAAK,iBAAiB,GAAK,KACxC,EAAU,EAAO,EAAM,OAAQ,GAAS,IAAS,CAAI,EAAI,EACzD,EAAY,IAAS,UAE3B,OACE,EAAC,KAAD,CACE,YAAU,YACV,YAAW,EACX,gBAAe,EAAO,OAAS,QAC/B,UAAW,EAAG,0DAA2D,CAAS,EAClF,GAAI,EALN,SAAA,CAOE,EAAC,OAAD,CACE,cAAY,OACZ,UAAW,EACT,WACA,GAAQ,0FACR,CAAC,GAAQ,GAAa,2EACtB,CAAC,GAAQ,CAAC,GAAa,mFACzB,EAEC,SAAA,IAAS,EAAY,IAAI,GAAW,GAAK,EAAE,GAAK,EAAC,OAAD,CAAM,UAAU,kCAAoC,CAAA,EACjG,CAAA,EACN,EAAC,MAAD,CAAK,UAAU,UAAW,SAAA,CAAa,CAAA,CACrC,GAER,CAEA,SAAS,SAAS,CAAE,YAAW,UAAU,GAAO,GAAG,GAAwB,CAGzE,OACE,EAHW,EAAU,EAAK,KAAO,OAGjC,CACE,YAAU,YACV,UAAW,EACT,+EACA,GAAW,SACX,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,sBAAsB,EAA2B,EAAW,CAAE,QAAS,CAAE,EAAoB,CACpG,OAAO,EAAM,SAAS,IAAI,EAAW,GAAU,CAC7C,GAAI,CAAC,EAAM,eAAe,CAAK,EAC7B,OAAO,EAGT,GAAI,EAAM,OAAS,EAAM,SAAU,CACjC,IAAM,EAAW,EAEjB,OAAO,EAAC,EAAM,SAAP,CAAA,SAAiC,sBAAsB,EAAS,MAAM,SAAU,CAAQ,CAAkB,EAArF,EAAM,GAA+E,CACnH,CAQA,OANI,EAAM,OAAS,SACV,EAAM,aAAa,EAAoE,CAC5F,QAAS,EAAS,SACpB,CAAC,EAGI,CACT,CAAC,CACH,CAEA,SAAS,kBAAkB,EAAoE,CAC7F,OAAO,EAAM,eAAe,CAAK,GAAK,EAAM,OAAS,QACvD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
//#region src/components/marker.d.ts
|
|
5
|
+
declare const markerVariants: (props?: ({
|
|
6
|
+
variant?: "border" | "default" | "separator" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
type MarkerProps = React.ComponentProps<'div'> & VariantProps<typeof markerVariants> & {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type MarkerIconProps = React.ComponentProps<'span'>;
|
|
12
|
+
type MarkerContentProps = React.ComponentProps<'span'>;
|
|
13
|
+
declare function Marker({ className, variant, asChild, ...props }: MarkerProps): React.JSX.Element;
|
|
14
|
+
declare function MarkerIcon({ className, ...props }: MarkerIconProps): React.JSX.Element;
|
|
15
|
+
declare function MarkerContent({ className, ...props }: MarkerContentProps): React.JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Marker, MarkerContent, MarkerContentProps, MarkerIcon, MarkerIconProps, MarkerProps, markerVariants };
|
|
18
|
+
//# sourceMappingURL=marker.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../rolldown-runtime-Bdj-bS2b.js";import{cn as e}from"../lib/utils.js";import{Slot as t}from"radix-ui";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:r,variant:a=`default`,asChild:o=!1,...s}){return n(o?t.Root:`div`,{"data-slot":`marker`,"data-variant":a,className:e(i({variant:a,className:r})),...s})}function MarkerIcon({className:t,...r}){return n(`span`,{"data-slot":`marker-icon`,"aria-hidden":`true`,className:e(`size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4`,t),...r})}function MarkerContent({className:t,...r}){return n(`span`,{"data-slot":`marker-content`,className:e(`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`,t),...r})}export{Marker,MarkerContent,MarkerIcon,i as markerVariants};
|
|
2
|
+
//# sourceMappingURL=marker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marker.js","names":[],"sources":["../../src/components/marker.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\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 = React.ComponentProps<'div'> &\n VariantProps<typeof markerVariants> & {\n asChild?: boolean\n }\n\nexport type MarkerIconProps = React.ComponentProps<'span'>\n\nexport type MarkerContentProps = React.ComponentProps<'span'>\n\nfunction Marker({ className, variant = 'default', asChild = false, ...props }: MarkerProps) {\n const Comp = asChild ? Slot.Root : 'div'\n\n return (\n <Comp data-slot=\"marker\" data-variant={variant} className={cn(markerVariants({ variant, className }))} {...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":"oMAOA,MAAM,EAAiB,EACrB,2MACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,GACT,UACE,yIACF,OAAQ,6BACV,CACF,CACF,CACF,EAWA,SAAS,OAAO,CAAE,YAAW,UAAU,UAAW,UAAU,GAAO,GAAG,GAAsB,CAG1F,OACE,EAHW,EAAU,EAAK,KAAO,MAGjC,CAAM,YAAU,SAAS,eAAc,EAAS,UAAW,EAAG,EAAe,CAAE,UAAS,WAAU,CAAC,CAAC,EAAG,GAAI,CAAQ,CAAA,CAEvH,CAEA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,OAAD,CACE,YAAU,cACV,cAAY,OACZ,UAAW,EAAG,uDAAwD,CAAS,EAC/E,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,cAAc,CAAE,YAAW,GAAG,GAA6B,CAClE,OACE,EAAC,OAAD,CACE,YAAU,iBACV,UAAW,EACT,iMACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { InputProps } from "./input.js";
|
|
3
3
|
import { Modify, Replacement, Track } from "../hooks/use-mask.js";
|
|
4
|
-
|
|
5
4
|
//#region src/components/mask-input.d.ts
|
|
6
5
|
type MaskInputProps = InputProps & {
|
|
7
6
|
mask: string;
|
|
@@ -11,16 +10,7 @@ type MaskInputProps = InputProps & {
|
|
|
11
10
|
track?: Track;
|
|
12
11
|
modify?: Modify;
|
|
13
12
|
};
|
|
14
|
-
declare function MaskInput({
|
|
15
|
-
ref,
|
|
16
|
-
mask,
|
|
17
|
-
replacement,
|
|
18
|
-
showMask,
|
|
19
|
-
separate,
|
|
20
|
-
track,
|
|
21
|
-
modify,
|
|
22
|
-
...props
|
|
23
|
-
}: MaskInputProps): import("react").JSX.Element;
|
|
13
|
+
declare function MaskInput({ ref, mask, replacement, showMask, separate, track, modify, ...props }: MaskInputProps): import("react").JSX.Element;
|
|
24
14
|
//#endregion
|
|
25
15
|
export { MaskInput, MaskInputProps };
|
|
26
16
|
//# sourceMappingURL=mask-input.d.ts.map
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
4
3
|
//#region src/components/native-select.d.ts
|
|
5
4
|
type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {
|
|
6
5
|
size?: 'sm' | 'md';
|
|
7
6
|
};
|
|
8
7
|
type NativeSelectOptionProps = React.ComponentProps<'option'>;
|
|
9
8
|
type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>;
|
|
10
|
-
declare function NativeSelect({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
size,
|
|
14
|
-
...props
|
|
15
|
-
}: NativeSelectProps): React.JSX.Element;
|
|
16
|
-
declare function NativeSelectOption({
|
|
17
|
-
...props
|
|
18
|
-
}: NativeSelectOptionProps): React.JSX.Element;
|
|
19
|
-
declare function NativeSelectOptGroup({
|
|
20
|
-
className,
|
|
21
|
-
...props
|
|
22
|
-
}: NativeSelectOptGroupProps): React.JSX.Element;
|
|
9
|
+
declare function NativeSelect({ className, id, size, ...props }: NativeSelectProps): React.JSX.Element;
|
|
10
|
+
declare function NativeSelectOption({ ...props }: NativeSelectOptionProps): React.JSX.Element;
|
|
11
|
+
declare function NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps): React.JSX.Element;
|
|
23
12
|
//#endregion
|
|
24
13
|
export { NativeSelect, NativeSelectOptGroup, NativeSelectOptGroupProps, NativeSelectOption, NativeSelectOptionProps, NativeSelectProps };
|
|
25
14
|
//# sourceMappingURL=native-select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-select.js","names":[],"sources":["../../src/components/native-select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconSelector } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { useFieldControlId } from './field'\n\nexport type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {\n size?: 'sm' | 'md'\n}\n\nexport type NativeSelectOptionProps = React.ComponentProps<'option'>\n\nexport type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>\n\nfunction NativeSelect({ className, id, size = 'md', ...props }: NativeSelectProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <div\n className={cn('group/native-select relative w-fit has-[select:disabled]:opacity-50', className)}\n data-slot=\"native-select-wrapper\"\n data-size={size}\n >\n <select\n id={fieldControlId}\n data-slot=\"native-select\"\n data-size={size}\n className={cn(\n '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',\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-muted-foreground selection:bg-primary selection:text-primary-foreground',\n 'data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5',\n 'disabled:pointer-events-none disabled:cursor-not-allowed'\n )}\n {...props}\n />\n <IconSelector\n className=\"text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none\"\n aria-hidden=\"true\"\n data-slot=\"native-select-icon\"\n />\n </div>\n )\n}\n\nfunction NativeSelectOption({ ...props }: NativeSelectOptionProps) {\n return <option data-slot=\"native-select-option\" {...props} />\n}\n\nfunction NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps) {\n return <optgroup data-slot=\"native-select-optgroup\" className={cn(className)} {...props} />\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption }\n"],"mappings":"iOAeA,SAAS,aAAa,CAAE,YAAW,KAAI,OAAO,KAAM,GAAG,GAA4B,CACjF,IAAM,EAAiB,EAAkB,CAAE,EAE3C,OACE,EAAC,MAAD,CACE,UAAW,EAAG,sEAAuE,CAAS,EAC9F,YAAU,wBACV,YAAW,
|
|
1
|
+
{"version":3,"file":"native-select.js","names":[],"sources":["../../src/components/native-select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconSelector } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { useFieldControlId } from './field'\n\nexport type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {\n size?: 'sm' | 'md'\n}\n\nexport type NativeSelectOptionProps = React.ComponentProps<'option'>\n\nexport type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>\n\nfunction NativeSelect({ className, id, size = 'md', ...props }: NativeSelectProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <div\n className={cn('group/native-select relative w-fit has-[select:disabled]:opacity-50', className)}\n data-slot=\"native-select-wrapper\"\n data-size={size}\n >\n <select\n id={fieldControlId}\n data-slot=\"native-select\"\n data-size={size}\n className={cn(\n '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',\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-muted-foreground selection:bg-primary selection:text-primary-foreground',\n 'data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5',\n 'disabled:pointer-events-none disabled:cursor-not-allowed'\n )}\n {...props}\n />\n <IconSelector\n className=\"text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none\"\n aria-hidden=\"true\"\n data-slot=\"native-select-icon\"\n />\n </div>\n )\n}\n\nfunction NativeSelectOption({ ...props }: NativeSelectOptionProps) {\n return <option data-slot=\"native-select-option\" {...props} />\n}\n\nfunction NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps) {\n return <optgroup data-slot=\"native-select-optgroup\" className={cn(className)} {...props} />\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption }\n"],"mappings":"iOAeA,SAAS,aAAa,CAAE,YAAW,KAAI,OAAO,KAAM,GAAG,GAA4B,CACjF,IAAM,EAAiB,EAAkB,CAAE,EAE3C,OACE,EAAC,MAAD,CACE,UAAW,EAAG,sEAAuE,CAAS,EAC9F,YAAU,wBACV,YAAW,EAHb,SAAA,CAKE,EAAC,SAAD,CACE,GAAI,EACJ,YAAU,gBACV,YAAW,EACX,UAAW,EACT,+LACA,4EACA,qKACA,2FACA,+FACA,0DACF,EACA,GAAI,CACL,CAAA,EACD,EAAC,EAAD,CACE,UAAU,2GACV,cAAY,OACZ,YAAU,oBACX,CAAA,CACE,GAET,CAEA,SAAS,mBAAmB,CAAE,GAAG,GAAkC,CACjE,OAAO,EAAC,SAAD,CAAQ,YAAU,uBAAuB,GAAI,CAAQ,CAAA,CAC9D,CAEA,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OAAO,EAAC,WAAD,CAAU,YAAU,yBAAyB,UAAW,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC5F"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { NavigationMenu as NavigationMenu$1 } from "radix-ui";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/navigation-menu.d.ts
|
|
6
5
|
type NavigationMenuProps = React.ComponentProps<typeof NavigationMenu$1.Root> & {
|
|
7
6
|
viewport?: boolean;
|
|
@@ -13,42 +12,15 @@ type NavigationMenuContentProps = React.ComponentProps<typeof NavigationMenu$1.C
|
|
|
13
12
|
type NavigationMenuViewportProps = React.ComponentProps<typeof NavigationMenu$1.Viewport>;
|
|
14
13
|
type NavigationMenuLinkProps = React.ComponentProps<typeof NavigationMenu$1.Link>;
|
|
15
14
|
type NavigationMenuIndicatorProps = React.ComponentProps<typeof NavigationMenu$1.Indicator>;
|
|
16
|
-
declare function NavigationMenu({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
viewport,
|
|
20
|
-
...props
|
|
21
|
-
}: NavigationMenuProps): React.JSX.Element;
|
|
22
|
-
declare function NavigationMenuList({
|
|
23
|
-
className,
|
|
24
|
-
...props
|
|
25
|
-
}: NavigationMenuListProps): React.JSX.Element;
|
|
26
|
-
declare function NavigationMenuItem({
|
|
27
|
-
className,
|
|
28
|
-
...props
|
|
29
|
-
}: NavigationMenuItemProps): React.JSX.Element;
|
|
15
|
+
declare function NavigationMenu({ className, children, viewport, ...props }: NavigationMenuProps): React.JSX.Element;
|
|
16
|
+
declare function NavigationMenuList({ className, ...props }: NavigationMenuListProps): React.JSX.Element;
|
|
17
|
+
declare function NavigationMenuItem({ className, ...props }: NavigationMenuItemProps): React.JSX.Element;
|
|
30
18
|
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
31
|
-
declare function NavigationMenuTrigger({
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}:
|
|
36
|
-
declare function NavigationMenuContent({
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}: NavigationMenuContentProps): React.JSX.Element;
|
|
40
|
-
declare function NavigationMenuViewport({
|
|
41
|
-
className,
|
|
42
|
-
...props
|
|
43
|
-
}: NavigationMenuViewportProps): React.JSX.Element;
|
|
44
|
-
declare function NavigationMenuLink({
|
|
45
|
-
className,
|
|
46
|
-
...props
|
|
47
|
-
}: NavigationMenuLinkProps): React.JSX.Element;
|
|
48
|
-
declare function NavigationMenuIndicator({
|
|
49
|
-
className,
|
|
50
|
-
...props
|
|
51
|
-
}: NavigationMenuIndicatorProps): React.JSX.Element;
|
|
19
|
+
declare function NavigationMenuTrigger({ className, children, ...props }: NavigationMenuTriggerProps): React.JSX.Element;
|
|
20
|
+
declare function NavigationMenuContent({ className, ...props }: NavigationMenuContentProps): React.JSX.Element;
|
|
21
|
+
declare function NavigationMenuViewport({ className, ...props }: NavigationMenuViewportProps): React.JSX.Element;
|
|
22
|
+
declare function NavigationMenuLink({ className, ...props }: NavigationMenuLinkProps): React.JSX.Element;
|
|
23
|
+
declare function NavigationMenuIndicator({ className, ...props }: NavigationMenuIndicatorProps): React.JSX.Element;
|
|
52
24
|
//#endregion
|
|
53
25
|
export { NavigationMenu, NavigationMenuContent, NavigationMenuContentProps, NavigationMenuIndicator, NavigationMenuIndicatorProps, NavigationMenuItem, NavigationMenuItemProps, NavigationMenuLink, NavigationMenuLinkProps, NavigationMenuList, NavigationMenuListProps, NavigationMenuProps, NavigationMenuTrigger, NavigationMenuTriggerProps, NavigationMenuViewport, NavigationMenuViewportProps, navigationMenuTriggerStyle };
|
|
54
26
|
//# sourceMappingURL=navigation-menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-menu.js","names":["NavigationMenuPrimitive"],"sources":["../../src/components/navigation-menu.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconChevronDown } from '@tabler/icons-react'\nimport { cva } from 'class-variance-authority'\nimport { NavigationMenu as NavigationMenuPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type NavigationMenuProps = React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {\n viewport?: boolean\n}\n\nexport type NavigationMenuListProps = React.ComponentProps<typeof NavigationMenuPrimitive.List>\n\nexport type NavigationMenuItemProps = React.ComponentProps<typeof NavigationMenuPrimitive.Item>\n\nexport type NavigationMenuTriggerProps = React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>\n\nexport type NavigationMenuContentProps = React.ComponentProps<typeof NavigationMenuPrimitive.Content>\n\nexport type NavigationMenuViewportProps = React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>\n\nexport type NavigationMenuLinkProps = React.ComponentProps<typeof NavigationMenuPrimitive.Link>\n\nexport type NavigationMenuIndicatorProps = React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>\n\nfunction NavigationMenu({ className, children, viewport = true, ...props }: NavigationMenuProps) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n data-viewport={viewport}\n className={cn('group/navigation-menu relative flex max-w-max flex-1 items-center justify-center', className)}\n {...props}\n >\n {children}\n {viewport && <NavigationMenuViewport />}\n </NavigationMenuPrimitive.Root>\n )\n}\n\nfunction NavigationMenuList({ className, ...props }: NavigationMenuListProps) {\n return (\n <NavigationMenuPrimitive.List\n data-slot=\"navigation-menu-list\"\n className={cn('group flex flex-1 list-none items-center justify-center gap-0', className)}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuItem({ className, ...props }: NavigationMenuItemProps) {\n return (\n <NavigationMenuPrimitive.Item data-slot=\"navigation-menu-item\" className={cn('relative', className)} {...props} />\n )\n}\n\nconst navigationMenuTriggerStyle = cva(\n 'group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg bg-background px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted'\n)\n\nfunction NavigationMenuTrigger({ className, children, ...props }: NavigationMenuTriggerProps) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot=\"navigation-menu-trigger\"\n className={cn(navigationMenuTriggerStyle(), 'group', className)}\n {...props}\n >\n {children}{' '}\n <IconChevronDown\n className={cn(\n 'relative top-px ml-1 size-3 transition duration-300',\n 'group-data-popup-open/navigation-menu-trigger:rotate-180',\n 'group-data-open/navigation-menu-trigger:rotate-180'\n )}\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n )\n}\n\nfunction NavigationMenuContent({ className, ...props }: NavigationMenuContentProps) {\n return (\n <NavigationMenuPrimitive.Content\n data-slot=\"navigation-menu-content\"\n className={cn(\n 'top-0 left-0 w-full p-1 ease-[cubic-bezier(0.22,1,0.36,1)] md:absolute md:w-auto',\n 'group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5',\n 'group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg',\n 'group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground',\n 'group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1',\n 'group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300',\n 'group-data-[viewport=false]/navigation-menu:data-open:animate-in',\n 'group-data-[viewport=false]/navigation-menu:data-open:fade-in-0',\n 'group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95',\n 'group-data-[viewport=false]/navigation-menu:data-closed:animate-out',\n 'group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0',\n 'group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95',\n 'data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52',\n 'data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52',\n 'data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in',\n 'data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out',\n '**:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuViewport({ className, ...props }: NavigationMenuViewportProps) {\n return (\n <div className={cn('absolute top-full left-0 isolate z-50 flex justify-center')}>\n <NavigationMenuPrimitive.Viewport\n data-slot=\"navigation-menu-viewport\"\n className={cn(\n 'origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg',\n 'bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 duration-100',\n 'md:w-(--radix-navigation-menu-viewport-width)',\n 'data-open:animate-in data-open:zoom-in-90',\n 'data-closed:animate-out data-closed:zoom-out-90',\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction NavigationMenuLink({ className, ...props }: NavigationMenuLinkProps) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n \"flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuIndicator({ className, ...props }: NavigationMenuIndicatorProps) {\n return (\n <NavigationMenuPrimitive.Indicator\n data-slot=\"navigation-menu-indicator\"\n className={cn(\n 'top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in',\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n )\n}\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n NavigationMenuViewport,\n navigationMenuTriggerStyle\n}\n"],"mappings":"8QA0BA,SAAS,eAAe,CAAE,YAAW,WAAU,WAAW,GAAM,GAAG,GAA8B,CAC/F,OACE,EAACA,EAAwB,KAAzB,CACE,YAAU,kBACV,gBAAe,EACf,UAAW,EAAG,mFAAoF,CAAS,EAC3G,GAAI,
|
|
1
|
+
{"version":3,"file":"navigation-menu.js","names":["NavigationMenuPrimitive"],"sources":["../../src/components/navigation-menu.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconChevronDown } from '@tabler/icons-react'\nimport { cva } from 'class-variance-authority'\nimport { NavigationMenu as NavigationMenuPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type NavigationMenuProps = React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {\n viewport?: boolean\n}\n\nexport type NavigationMenuListProps = React.ComponentProps<typeof NavigationMenuPrimitive.List>\n\nexport type NavigationMenuItemProps = React.ComponentProps<typeof NavigationMenuPrimitive.Item>\n\nexport type NavigationMenuTriggerProps = React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>\n\nexport type NavigationMenuContentProps = React.ComponentProps<typeof NavigationMenuPrimitive.Content>\n\nexport type NavigationMenuViewportProps = React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>\n\nexport type NavigationMenuLinkProps = React.ComponentProps<typeof NavigationMenuPrimitive.Link>\n\nexport type NavigationMenuIndicatorProps = React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>\n\nfunction NavigationMenu({ className, children, viewport = true, ...props }: NavigationMenuProps) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n data-viewport={viewport}\n className={cn('group/navigation-menu relative flex max-w-max flex-1 items-center justify-center', className)}\n {...props}\n >\n {children}\n {viewport && <NavigationMenuViewport />}\n </NavigationMenuPrimitive.Root>\n )\n}\n\nfunction NavigationMenuList({ className, ...props }: NavigationMenuListProps) {\n return (\n <NavigationMenuPrimitive.List\n data-slot=\"navigation-menu-list\"\n className={cn('group flex flex-1 list-none items-center justify-center gap-0', className)}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuItem({ className, ...props }: NavigationMenuItemProps) {\n return (\n <NavigationMenuPrimitive.Item data-slot=\"navigation-menu-item\" className={cn('relative', className)} {...props} />\n )\n}\n\nconst navigationMenuTriggerStyle = cva(\n 'group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg bg-background px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted'\n)\n\nfunction NavigationMenuTrigger({ className, children, ...props }: NavigationMenuTriggerProps) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot=\"navigation-menu-trigger\"\n className={cn(navigationMenuTriggerStyle(), 'group', className)}\n {...props}\n >\n {children}{' '}\n <IconChevronDown\n className={cn(\n 'relative top-px ml-1 size-3 transition duration-300',\n 'group-data-popup-open/navigation-menu-trigger:rotate-180',\n 'group-data-open/navigation-menu-trigger:rotate-180'\n )}\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n )\n}\n\nfunction NavigationMenuContent({ className, ...props }: NavigationMenuContentProps) {\n return (\n <NavigationMenuPrimitive.Content\n data-slot=\"navigation-menu-content\"\n className={cn(\n 'top-0 left-0 w-full p-1 ease-[cubic-bezier(0.22,1,0.36,1)] md:absolute md:w-auto',\n 'group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5',\n 'group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg',\n 'group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground',\n 'group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1',\n 'group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300',\n 'group-data-[viewport=false]/navigation-menu:data-open:animate-in',\n 'group-data-[viewport=false]/navigation-menu:data-open:fade-in-0',\n 'group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95',\n 'group-data-[viewport=false]/navigation-menu:data-closed:animate-out',\n 'group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0',\n 'group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95',\n 'data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52',\n 'data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52',\n 'data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in',\n 'data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out',\n '**:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuViewport({ className, ...props }: NavigationMenuViewportProps) {\n return (\n <div className={cn('absolute top-full left-0 isolate z-50 flex justify-center')}>\n <NavigationMenuPrimitive.Viewport\n data-slot=\"navigation-menu-viewport\"\n className={cn(\n 'origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg',\n 'bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 duration-100',\n 'md:w-(--radix-navigation-menu-viewport-width)',\n 'data-open:animate-in data-open:zoom-in-90',\n 'data-closed:animate-out data-closed:zoom-out-90',\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction NavigationMenuLink({ className, ...props }: NavigationMenuLinkProps) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n \"flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuIndicator({ className, ...props }: NavigationMenuIndicatorProps) {\n return (\n <NavigationMenuPrimitive.Indicator\n data-slot=\"navigation-menu-indicator\"\n className={cn(\n 'top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in',\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n )\n}\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n NavigationMenuViewport,\n navigationMenuTriggerStyle\n}\n"],"mappings":"8QA0BA,SAAS,eAAe,CAAE,YAAW,WAAU,WAAW,GAAM,GAAG,GAA8B,CAC/F,OACE,EAACA,EAAwB,KAAzB,CACE,YAAU,kBACV,gBAAe,EACf,UAAW,EAAG,mFAAoF,CAAS,EAC3G,GAAI,EAJN,SAAA,CAMG,EACA,GAAY,EAAC,uBAAD,CAAyB,CAAA,CACV,GAElC,CAEA,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OACE,EAACA,EAAwB,KAAzB,CACE,YAAU,uBACV,UAAW,EAAG,gEAAiE,CAAS,EACxF,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OACE,EAACA,EAAwB,KAAzB,CAA8B,YAAU,uBAAuB,UAAW,EAAG,WAAY,CAAS,EAAG,GAAI,CAAQ,CAAA,CAErH,CAEA,MAAM,EAA6B,EACjC,kcACF,EAEA,SAAS,sBAAsB,CAAE,YAAW,WAAU,GAAG,GAAqC,CAC5F,OACE,EAACA,EAAwB,QAAzB,CACE,YAAU,0BACV,UAAW,EAAG,EAA2B,EAAG,QAAS,CAAS,EAC9D,GAAI,EAHN,SAAA,CAKG,EAAU,IACX,EAAC,EAAD,CACE,UAAW,EACT,sDACA,2DACA,oDACF,EACA,cAAY,MACb,CAAA,CAC8B,GAErC,CAEA,SAAS,sBAAsB,CAAE,YAAW,GAAG,GAAqC,CAClF,OACE,EAACA,EAAwB,QAAzB,CACE,YAAU,0BACV,UAAW,EACT,mFACA,0GACA,qHACA,6HACA,wGACA,0HACA,mEACA,kEACA,mEACA,sEACA,qEACA,sEACA,+FACA,yFACA,+DACA,6DACA,0GACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,uBAAuB,CAAE,YAAW,GAAG,GAAsC,CACpF,OACE,EAAC,MAAD,CAAK,UAAW,EAAG,2DAA2D,EAC5E,SAAA,EAACA,EAAwB,SAAzB,CACE,YAAU,2BACV,UAAW,EACT,kHACA,mFACA,gDACA,4CACA,kDACA,CACF,EACA,GAAI,CACL,CAAA,CACE,CAAA,CAET,CAEA,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OACE,EAACA,EAAwB,KAAzB,CACE,YAAU,uBACV,UAAW,EACT,wVACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,wBAAwB,CAAE,YAAW,GAAG,GAAuC,CACtF,OACE,EAACA,EAAwB,UAAzB,CACE,YAAU,4BACV,UAAW,EACT,6LACA,CACF,EACA,GAAI,EAEJ,SAAA,EAAC,MAAD,CAAK,UAAU,wEAA0E,CAAA,CACxD,CAAA,CAEvC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import { NumberField as NumberField$1 } from "@base-ui/react/number-field";
|
|
5
|
+
//#region src/components/number-field.d.ts
|
|
6
|
+
declare const numberFieldGroupVariants: (props?: ({
|
|
7
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
declare const numberFieldButtonVariants: (props?: ({
|
|
10
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
declare const numberFieldInputVariants: (props?: ({
|
|
13
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
type NumberFieldProps = NumberField$1.Root.Props & VariantProps<typeof numberFieldGroupVariants>;
|
|
16
|
+
declare function NumberField({ id, className, size, ...props }: NumberFieldProps): import("react").JSX.Element;
|
|
17
|
+
type NumberFieldGroupProps = NumberField$1.Group.Props & Partial<VariantProps<typeof numberFieldGroupVariants>>;
|
|
18
|
+
declare function NumberFieldGroup({ className, size: sizeProp, ...props }: NumberFieldGroupProps): import("react").JSX.Element;
|
|
19
|
+
type NumberFieldDecrementProps = NumberField$1.Decrement.Props & Partial<VariantProps<typeof numberFieldButtonVariants>> & {
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
};
|
|
22
|
+
declare function NumberFieldDecrement({ className, size: sizeProp, children, ...props }: NumberFieldDecrementProps): import("react").JSX.Element;
|
|
23
|
+
type NumberFieldIncrementProps = NumberField$1.Increment.Props & Partial<VariantProps<typeof numberFieldButtonVariants>> & {
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
};
|
|
26
|
+
declare function NumberFieldIncrement({ className, size: sizeProp, children, ...props }: NumberFieldIncrementProps): import("react").JSX.Element;
|
|
27
|
+
type NumberFieldInputProps = NumberField$1.Input.Props & Partial<VariantProps<typeof numberFieldInputVariants>>;
|
|
28
|
+
declare function NumberFieldInput({ id, className, size: sizeProp, ...props }: NumberFieldInputProps): import("react").JSX.Element;
|
|
29
|
+
type NumberFieldScrubAreaProps = NumberField$1.ScrubArea.Props & {
|
|
30
|
+
label: string;
|
|
31
|
+
};
|
|
32
|
+
declare function NumberFieldScrubArea({ className, label, ...props }: NumberFieldScrubAreaProps): import("react").JSX.Element;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { NumberField, NumberFieldDecrement, NumberFieldDecrementProps, NumberFieldGroup, NumberFieldGroupProps, NumberFieldIncrement, NumberFieldIncrementProps, NumberFieldInput, NumberFieldInputProps, NumberFieldProps, NumberFieldScrubArea, NumberFieldScrubAreaProps };
|
|
35
|
+
//# sourceMappingURL=number-field.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../rolldown-runtime-Bdj-bS2b.js";import{cn as e}from"../lib/utils.js";import{Label as t}from"./label.js";import{useFieldControlId as n}from"./field.js";import{IconMinus as r,IconPlus as i}from"@tabler/icons-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";import{createContext as c,useContext as l,useId as u}from"react";import{NumberField as d}from"@base-ui/react/number-field";const f=c(null),p=s(`relative flex w-full justify-between border border-input data-disabled:pointer-events-none data-disabled:opacity-50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive focus-within:has-aria-invalid:border-destructive focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 rounded-lg bg-transparent dark:bg-input/30 transition-colors focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3`,{variants:{size:{sm:`h-7 text-sm`,md:`h-8 text-sm`,lg:`h-9 text-sm`}},defaultVariants:{size:`md`}}),m=s(`relative flex shrink-0 cursor-pointer items-center justify-center transition-colors pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent`,{variants:{size:{sm:`px-1.5 [&_svg:not([class*='size-'])]:size-3.5`,md:`px-2 [&_svg:not([class*='size-'])]:size-4`,lg:`px-2.5 [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{size:`md`}}),h=s(`w-full min-w-0 flex-1 bg-transparent text-center tabular-nums outline-none`,{variants:{size:{sm:`px-2 py-0.5`,md:`px-2.5 py-1`,lg:`px-2.5 py-1.5`}},defaultVariants:{size:`md`}});function NumberField({id:t,className:r,size:i=`md`,...o}){let s=u(),c=n(t)??s,l=i??`md`;return a(f.Provider,{value:{fieldId:c,size:l},children:a(d.Root,{className:e(`flex w-full flex-col items-start gap-2`,r),"data-size":l,"data-slot":`number-field`,...o})})}function NumberFieldGroup({className:t,size:n,...r}){let i=l(f);if(!i)throw Error(`NumberFieldGroup must be used within a NumberField component.`);let o=n??i.size;return a(d.Group,{className:e(p({size:o}),t),"data-slot":`number-field-group`,...r})}function NumberFieldDecrement({className:t,size:n,children:i,...o}){let s=l(f);if(!s)throw Error(`NumberFieldDecrement must be used within a NumberField component.`);let c=n??s.size;return a(d.Decrement,{className:e(m({size:c}),`rounded-s-lg border-e-0`,t),"data-slot":`number-field-decrement`,...o,children:i??a(r,{})})}function NumberFieldIncrement({className:t,size:n,children:r,...o}){let s=l(f);if(!s)throw Error(`NumberFieldIncrement must be used within a NumberField component.`);let c=n??s.size;return a(d.Increment,{className:e(m({size:c}),`rounded-e-lg border-s-0`,t),"data-slot":`number-field-increment`,...o,children:r??a(i,{})})}function NumberFieldInput({id:t,className:n,size:r,...i}){let o=l(f);if(!o)throw Error(`NumberFieldInput must be used within a NumberField component.`);let s=r??o.size;return a(d.Input,{id:t??o.fieldId,className:e(h({size:s}),n),"data-slot":`number-field-input`,...i})}function NumberFieldScrubArea({className:n,label:r,...i}){let s=l(f);if(!s)throw Error(`NumberFieldScrubArea must be used within a NumberField component for accessibility.`);return o(d.ScrubArea,{className:e(`flex cursor-ew-resize`,n),"data-slot":`number-field-scrub-area`,...i,children:[a(t,{className:`cursor-ew-resize`,htmlFor:s.fieldId,children:r}),a(d.ScrubAreaCursor,{className:`drop-shadow-[0_1px_1px_#0008] filter`,children:a(CursorGrowIcon,{})})]})}function CursorGrowIcon(e){return a(`svg`,{"aria-hidden":`true`,fill:`black`,height:`14`,stroke:`white`,viewBox:`0 0 24 14`,width:`26`,xmlns:`http://www.w3.org/2000/svg`,...e,children:a(`path`,{d:`M19.5 5.5L6.49737 5.51844V2L1 6.9999L6.5 12L6.49737 8.5L19.5 8.5V12L25 6.9999L19.5 2V5.5Z`})})}export{NumberField,NumberFieldDecrement,NumberFieldGroup,NumberFieldIncrement,NumberFieldInput,NumberFieldScrubArea};
|
|
2
|
+
//# sourceMappingURL=number-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-field.js","names":["NumberFieldPrimitive"],"sources":["../../src/components/number-field.tsx"],"sourcesContent":["import { createContext, type ReactNode, useContext, useId } from 'react'\n\nimport { NumberField as NumberFieldPrimitive } from '@base-ui/react/number-field'\nimport { IconMinus, IconPlus } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\nimport { useFieldControlId } from './field'\nimport { Label } from './label'\n\nconst NumberFieldContext = createContext<{\n fieldId: string\n size: 'sm' | 'md' | 'lg'\n} | null>(null)\n\nconst numberFieldGroupVariants = cva(\n 'relative flex w-full justify-between border border-input data-disabled:pointer-events-none data-disabled:opacity-50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive focus-within:has-aria-invalid:border-destructive focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 rounded-lg bg-transparent dark:bg-input/30 transition-colors focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3',\n {\n variants: {\n size: {\n sm: 'h-7 text-sm',\n md: 'h-8 text-sm',\n lg: 'h-9 text-sm'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n }\n)\n\nconst numberFieldButtonVariants = cva(\n 'relative flex shrink-0 cursor-pointer items-center justify-center transition-colors pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent',\n {\n variants: {\n size: {\n sm: \"px-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n md: \"px-2 [&_svg:not([class*='size-'])]:size-4\",\n lg: \"px-2.5 [&_svg:not([class*='size-'])]:size-4\"\n }\n },\n defaultVariants: {\n size: 'md'\n }\n }\n)\n\nconst numberFieldInputVariants = cva('w-full min-w-0 flex-1 bg-transparent text-center tabular-nums outline-none', {\n variants: {\n size: {\n sm: 'px-2 py-0.5',\n md: 'px-2.5 py-1',\n lg: 'px-2.5 py-1.5'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nexport type NumberFieldProps = NumberFieldPrimitive.Root.Props & VariantProps<typeof numberFieldGroupVariants>\n\nfunction NumberField({ id, className, size = 'md', ...props }: NumberFieldProps) {\n const generatedId = useId()\n const fieldControlId = useFieldControlId(id)\n const fieldId = fieldControlId ?? generatedId\n const sizeValue = size ?? 'md'\n\n return (\n <NumberFieldContext.Provider value={{ fieldId, size: sizeValue }}>\n <NumberFieldPrimitive.Root\n className={cn('flex w-full flex-col items-start gap-2', className)}\n data-size={sizeValue}\n data-slot=\"number-field\"\n {...props}\n />\n </NumberFieldContext.Provider>\n )\n}\n\nexport type NumberFieldGroupProps = NumberFieldPrimitive.Group.Props &\n Partial<VariantProps<typeof numberFieldGroupVariants>>\n\nfunction NumberFieldGroup({ className, size: sizeProp, ...props }: NumberFieldGroupProps) {\n const context = useContext(NumberFieldContext)\n if (!context) {\n throw new Error('NumberFieldGroup must be used within a NumberField component.')\n }\n const size = sizeProp ?? context.size\n\n return (\n <NumberFieldPrimitive.Group\n className={cn(numberFieldGroupVariants({ size }), className)}\n data-slot=\"number-field-group\"\n {...props}\n />\n )\n}\n\nexport type NumberFieldDecrementProps = NumberFieldPrimitive.Decrement.Props &\n Partial<VariantProps<typeof numberFieldButtonVariants>> & {\n children?: React.ReactNode\n }\n\nfunction NumberFieldDecrement({ className, size: sizeProp, children, ...props }: NumberFieldDecrementProps) {\n const context = useContext(NumberFieldContext)\n if (!context) {\n throw new Error('NumberFieldDecrement must be used within a NumberField component.')\n }\n const size = sizeProp ?? context.size\n\n return (\n <NumberFieldPrimitive.Decrement\n className={cn(numberFieldButtonVariants({ size }), 'rounded-s-lg border-e-0', className)}\n data-slot=\"number-field-decrement\"\n {...props}\n >\n {children ?? <IconMinus />}\n </NumberFieldPrimitive.Decrement>\n )\n}\n\nexport type NumberFieldIncrementProps = NumberFieldPrimitive.Increment.Props &\n Partial<VariantProps<typeof numberFieldButtonVariants>> & {\n children?: ReactNode\n }\n\nfunction NumberFieldIncrement({ className, size: sizeProp, children, ...props }: NumberFieldIncrementProps) {\n const context = useContext(NumberFieldContext)\n if (!context) {\n throw new Error('NumberFieldIncrement must be used within a NumberField component.')\n }\n const size = sizeProp ?? context.size\n\n return (\n <NumberFieldPrimitive.Increment\n className={cn(numberFieldButtonVariants({ size }), 'rounded-e-lg border-s-0', className)}\n data-slot=\"number-field-increment\"\n {...props}\n >\n {children ?? <IconPlus />}\n </NumberFieldPrimitive.Increment>\n )\n}\n\nexport type NumberFieldInputProps = NumberFieldPrimitive.Input.Props &\n Partial<VariantProps<typeof numberFieldInputVariants>>\n\nfunction NumberFieldInput({ id, className, size: sizeProp, ...props }: NumberFieldInputProps) {\n const context = useContext(NumberFieldContext)\n if (!context) {\n throw new Error('NumberFieldInput must be used within a NumberField component.')\n }\n const size = sizeProp ?? context.size\n\n return (\n <NumberFieldPrimitive.Input\n id={id ?? context.fieldId}\n className={cn(numberFieldInputVariants({ size }), className)}\n data-slot=\"number-field-input\"\n {...props}\n />\n )\n}\n\nexport type NumberFieldScrubAreaProps = NumberFieldPrimitive.ScrubArea.Props & {\n label: string\n}\n\nfunction NumberFieldScrubArea({ className, label, ...props }: NumberFieldScrubAreaProps) {\n const context = useContext(NumberFieldContext)\n if (!context) {\n throw new Error('NumberFieldScrubArea must be used within a NumberField component for accessibility.')\n }\n\n return (\n <NumberFieldPrimitive.ScrubArea\n className={cn('flex cursor-ew-resize', className)}\n data-slot=\"number-field-scrub-area\"\n {...props}\n >\n <Label className=\"cursor-ew-resize\" htmlFor={context.fieldId}>\n {label}\n </Label>\n <NumberFieldPrimitive.ScrubAreaCursor className=\"drop-shadow-[0_1px_1px_#0008] filter\">\n <CursorGrowIcon />\n </NumberFieldPrimitive.ScrubAreaCursor>\n </NumberFieldPrimitive.ScrubArea>\n )\n}\n\nfunction CursorGrowIcon(props: React.ComponentProps<'svg'>) {\n return (\n <svg\n aria-hidden=\"true\"\n fill=\"black\"\n height=\"14\"\n stroke=\"white\"\n viewBox=\"0 0 24 14\"\n width=\"26\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path d=\"M19.5 5.5L6.49737 5.51844V2L1 6.9999L6.5 12L6.49737 8.5L19.5 8.5V12L25 6.9999L19.5 2V5.5Z\" />\n </svg>\n )\n}\n\nexport {\n NumberField,\n NumberFieldDecrement,\n NumberFieldGroup,\n NumberFieldIncrement,\n NumberFieldInput,\n NumberFieldScrubArea\n}\n"],"mappings":"ybAUA,MAAM,EAAqB,EAGjB,IAAI,EAER,EAA2B,EAC/B,2fACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,cACJ,GAAI,cACJ,GAAI,aACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CACF,EAEM,EAA4B,EAChC,+NACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,gDACJ,GAAI,4CACJ,GAAI,6CACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CACF,EAEM,EAA2B,EAAI,6EAA8E,CACjH,SAAU,CACR,KAAM,CACJ,GAAI,cACJ,GAAI,cACJ,GAAI,eACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EAID,SAAS,YAAY,CAAE,KAAI,YAAW,OAAO,KAAM,GAAG,GAA2B,CAC/E,IAAM,EAAc,EAAM,EAEpB,EADiB,EAAkB,CACZ,GAAK,EAC5B,EAAY,GAAQ,KAE1B,OACE,EAAC,EAAmB,SAApB,CAA6B,MAAO,CAAE,UAAS,KAAM,CAAU,EAC7D,SAAA,EAACA,EAAqB,KAAtB,CACE,UAAW,EAAG,yCAA0C,CAAS,EACjE,YAAW,EACX,YAAU,eACV,GAAI,CACL,CAAA,CAC0B,CAAA,CAEjC,CAKA,SAAS,iBAAiB,CAAE,YAAW,KAAM,EAAU,GAAG,GAAgC,CACxF,IAAM,EAAU,EAAW,CAAkB,EAC7C,GAAI,CAAC,EACH,MAAU,MAAM,+DAA+D,EAEjF,IAAM,EAAO,GAAY,EAAQ,KAEjC,OACE,EAACA,EAAqB,MAAtB,CACE,UAAW,EAAG,EAAyB,CAAE,MAAK,CAAC,EAAG,CAAS,EAC3D,YAAU,qBACV,GAAI,CACL,CAAA,CAEL,CAOA,SAAS,qBAAqB,CAAE,YAAW,KAAM,EAAU,WAAU,GAAG,GAAoC,CAC1G,IAAM,EAAU,EAAW,CAAkB,EAC7C,GAAI,CAAC,EACH,MAAU,MAAM,mEAAmE,EAErF,IAAM,EAAO,GAAY,EAAQ,KAEjC,OACE,EAACA,EAAqB,UAAtB,CACE,UAAW,EAAG,EAA0B,CAAE,MAAK,CAAC,EAAG,0BAA2B,CAAS,EACvF,YAAU,yBACV,GAAI,EAEH,SAAA,GAAY,EAAC,EAAD,CAAY,CAAA,CACK,CAAA,CAEpC,CAOA,SAAS,qBAAqB,CAAE,YAAW,KAAM,EAAU,WAAU,GAAG,GAAoC,CAC1G,IAAM,EAAU,EAAW,CAAkB,EAC7C,GAAI,CAAC,EACH,MAAU,MAAM,mEAAmE,EAErF,IAAM,EAAO,GAAY,EAAQ,KAEjC,OACE,EAACA,EAAqB,UAAtB,CACE,UAAW,EAAG,EAA0B,CAAE,MAAK,CAAC,EAAG,0BAA2B,CAAS,EACvF,YAAU,yBACV,GAAI,EAEH,SAAA,GAAY,EAAC,EAAD,CAAW,CAAA,CACM,CAAA,CAEpC,CAKA,SAAS,iBAAiB,CAAE,KAAI,YAAW,KAAM,EAAU,GAAG,GAAgC,CAC5F,IAAM,EAAU,EAAW,CAAkB,EAC7C,GAAI,CAAC,EACH,MAAU,MAAM,+DAA+D,EAEjF,IAAM,EAAO,GAAY,EAAQ,KAEjC,OACE,EAACA,EAAqB,MAAtB,CACE,GAAI,GAAM,EAAQ,QAClB,UAAW,EAAG,EAAyB,CAAE,MAAK,CAAC,EAAG,CAAS,EAC3D,YAAU,qBACV,GAAI,CACL,CAAA,CAEL,CAMA,SAAS,qBAAqB,CAAE,YAAW,QAAO,GAAG,GAAoC,CACvF,IAAM,EAAU,EAAW,CAAkB,EAC7C,GAAI,CAAC,EACH,MAAU,MAAM,qFAAqF,EAGvG,OACE,EAACA,EAAqB,UAAtB,CACE,UAAW,EAAG,wBAAyB,CAAS,EAChD,YAAU,0BACV,GAAI,EAHN,SAAA,CAKE,EAAC,EAAD,CAAO,UAAU,mBAAmB,QAAS,EAAQ,QAClD,SAAA,CACI,CAAA,EACP,EAACA,EAAqB,gBAAtB,CAAsC,UAAU,uCAC9C,SAAA,EAAC,eAAD,CAAiB,CAAA,CACmB,CAAA,CACR,GAEpC,CAEA,SAAS,eAAe,EAAoC,CAC1D,OACE,EAAC,MAAD,CACE,cAAY,OACZ,KAAK,QACL,OAAO,KACP,OAAO,QACP,QAAQ,YACR,MAAM,KACN,MAAM,6BACN,GAAI,EAEJ,SAAA,EAAC,OAAD,CAAM,EAAE,2FAA6F,CAAA,CAClG,CAAA,CAET"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/pagination.d.ts
|
|
6
5
|
type PaginationProps = React.ComponentProps<'nav'>;
|
|
7
6
|
type PaginationContentProps = React.ComponentProps<'ul'>;
|
|
@@ -16,38 +15,13 @@ type PaginationNextProps = React.ComponentProps<typeof PaginationLink> & {
|
|
|
16
15
|
text?: string;
|
|
17
16
|
};
|
|
18
17
|
type PaginationEllipsisProps = React.ComponentProps<'span'>;
|
|
19
|
-
declare function Pagination({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}:
|
|
23
|
-
declare function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}: PaginationContentProps): React.JSX.Element;
|
|
27
|
-
declare function PaginationItem({
|
|
28
|
-
...props
|
|
29
|
-
}: PaginationItemProps): React.JSX.Element;
|
|
30
|
-
declare function PaginationLink({
|
|
31
|
-
className,
|
|
32
|
-
isActive,
|
|
33
|
-
size,
|
|
34
|
-
color,
|
|
35
|
-
...props
|
|
36
|
-
}: PaginationLinkProps): React.JSX.Element;
|
|
37
|
-
declare function PaginationPrevious({
|
|
38
|
-
className,
|
|
39
|
-
text,
|
|
40
|
-
...props
|
|
41
|
-
}: PaginationPreviousProps): React.JSX.Element;
|
|
42
|
-
declare function PaginationNext({
|
|
43
|
-
className,
|
|
44
|
-
text,
|
|
45
|
-
...props
|
|
46
|
-
}: PaginationNextProps): React.JSX.Element;
|
|
47
|
-
declare function PaginationEllipsis({
|
|
48
|
-
className,
|
|
49
|
-
...props
|
|
50
|
-
}: PaginationEllipsisProps): React.JSX.Element;
|
|
18
|
+
declare function Pagination({ className, ...props }: PaginationProps): React.JSX.Element;
|
|
19
|
+
declare function PaginationContent({ className, ...props }: PaginationContentProps): React.JSX.Element;
|
|
20
|
+
declare function PaginationItem({ ...props }: PaginationItemProps): React.JSX.Element;
|
|
21
|
+
declare function PaginationLink({ className, isActive, size, color, ...props }: PaginationLinkProps): React.JSX.Element;
|
|
22
|
+
declare function PaginationPrevious({ className, text, ...props }: PaginationPreviousProps): React.JSX.Element;
|
|
23
|
+
declare function PaginationNext({ className, text, ...props }: PaginationNextProps): React.JSX.Element;
|
|
24
|
+
declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): React.JSX.Element;
|
|
51
25
|
//#endregion
|
|
52
26
|
export { Pagination, PaginationContent, PaginationContentProps, PaginationEllipsis, PaginationEllipsisProps, PaginationItem, PaginationItemProps, PaginationLink, PaginationLinkProps, PaginationNext, PaginationNextProps, PaginationPrevious, PaginationPreviousProps, PaginationProps };
|
|
53
27
|
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","names":[],"sources":["../../src/components/pagination.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconChevronLeft, IconChevronRight, IconDots } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\nexport type PaginationProps = React.ComponentProps<'nav'>\n\nexport type PaginationContentProps = React.ComponentProps<'ul'>\n\nexport type PaginationItemProps = React.ComponentProps<'li'>\n\nexport type PaginationLinkProps = {\n isActive?: boolean\n} & Pick<React.ComponentProps<typeof Button>, 'size' | 'color'> &\n React.ComponentProps<'a'>\n\nexport type PaginationPreviousProps = React.ComponentProps<typeof PaginationLink> & {\n text?: string\n}\n\nexport type PaginationNextProps = React.ComponentProps<typeof PaginationLink> & {\n text?: string\n}\n\nexport type PaginationEllipsisProps = React.ComponentProps<'span'>\n\nfunction Pagination({ className, ...props }: PaginationProps) {\n return (\n <nav\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n )\n}\n\nfunction PaginationContent({ className, ...props }: PaginationContentProps) {\n return <ul data-slot=\"pagination-content\" className={cn('flex items-center gap-0.5', className)} {...props} />\n}\n\nfunction PaginationItem({ ...props }: PaginationItemProps) {\n return <li data-slot=\"pagination-item\" {...props} />\n}\n\nfunction PaginationLink({ className, isActive, size = 'icon', color = 'zinc', ...props }: PaginationLinkProps) {\n return (\n <Button asChild variant={isActive ? 'outline' : 'ghost'} color={color} size={size} className={cn(className)}>\n <a aria-current={isActive ? 'page' : undefined} data-slot=\"pagination-link\" data-active={isActive} {...props} />\n </Button>\n )\n}\n\nfunction PaginationPrevious({ className, text = 'Previous', ...props }: PaginationPreviousProps) {\n return (\n <PaginationLink aria-label=\"Go to previous page\" size=\"md\" className={cn('pl-1.5!', className)} {...props}>\n <IconChevronLeft data-icon=\"inline-start\" />\n <span className=\"hidden sm:block\">{text}</span>\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({ className, text = 'Next', ...props }: PaginationNextProps) {\n return (\n <PaginationLink aria-label=\"Go to next page\" size=\"md\" className={cn('pr-1.5!', className)} {...props}>\n <span className=\"hidden sm:block\">{text}</span>\n <IconChevronRight data-icon=\"inline-end\" />\n </PaginationLink>\n )\n}\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\"flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n <IconDots />\n <span className=\"sr-only\">More pages</span>\n </span>\n )\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious\n}\n"],"mappings":"8PA4BA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAD,CACE,aAAW,aACX,YAAU,aACV,UAAW,EAAG,qCAAsC,CAAS,EAC7D,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,kBAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,OAAO,EAAC,KAAD,CAAI,YAAU,qBAAqB,UAAW,EAAG,4BAA6B,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC/G,CAEA,SAAS,eAAe,CAAE,GAAG,GAA8B,CACzD,OAAO,EAAC,KAAD,CAAI,YAAU,kBAAkB,GAAI,CAAQ,CAAA,CACrD,CAEA,SAAS,eAAe,CAAE,YAAW,WAAU,OAAO,OAAQ,QAAQ,OAAQ,GAAG,GAA8B,CAC7G,OACE,EAAC,EAAD,CAAQ,QAAA,GAAQ,QAAS,EAAW,UAAY,QAAgB,QAAa,OAAM,UAAW,EAAG,CAAS,
|
|
1
|
+
{"version":3,"file":"pagination.js","names":[],"sources":["../../src/components/pagination.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconChevronLeft, IconChevronRight, IconDots } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\nexport type PaginationProps = React.ComponentProps<'nav'>\n\nexport type PaginationContentProps = React.ComponentProps<'ul'>\n\nexport type PaginationItemProps = React.ComponentProps<'li'>\n\nexport type PaginationLinkProps = {\n isActive?: boolean\n} & Pick<React.ComponentProps<typeof Button>, 'size' | 'color'> &\n React.ComponentProps<'a'>\n\nexport type PaginationPreviousProps = React.ComponentProps<typeof PaginationLink> & {\n text?: string\n}\n\nexport type PaginationNextProps = React.ComponentProps<typeof PaginationLink> & {\n text?: string\n}\n\nexport type PaginationEllipsisProps = React.ComponentProps<'span'>\n\nfunction Pagination({ className, ...props }: PaginationProps) {\n return (\n <nav\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n )\n}\n\nfunction PaginationContent({ className, ...props }: PaginationContentProps) {\n return <ul data-slot=\"pagination-content\" className={cn('flex items-center gap-0.5', className)} {...props} />\n}\n\nfunction PaginationItem({ ...props }: PaginationItemProps) {\n return <li data-slot=\"pagination-item\" {...props} />\n}\n\nfunction PaginationLink({ className, isActive, size = 'icon', color = 'zinc', ...props }: PaginationLinkProps) {\n return (\n <Button asChild variant={isActive ? 'outline' : 'ghost'} color={color} size={size} className={cn(className)}>\n <a aria-current={isActive ? 'page' : undefined} data-slot=\"pagination-link\" data-active={isActive} {...props} />\n </Button>\n )\n}\n\nfunction PaginationPrevious({ className, text = 'Previous', ...props }: PaginationPreviousProps) {\n return (\n <PaginationLink aria-label=\"Go to previous page\" size=\"md\" className={cn('pl-1.5!', className)} {...props}>\n <IconChevronLeft data-icon=\"inline-start\" />\n <span className=\"hidden sm:block\">{text}</span>\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({ className, text = 'Next', ...props }: PaginationNextProps) {\n return (\n <PaginationLink aria-label=\"Go to next page\" size=\"md\" className={cn('pr-1.5!', className)} {...props}>\n <span className=\"hidden sm:block\">{text}</span>\n <IconChevronRight data-icon=\"inline-end\" />\n </PaginationLink>\n )\n}\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\"flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n <IconDots />\n <span className=\"sr-only\">More pages</span>\n </span>\n )\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious\n}\n"],"mappings":"8PA4BA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAD,CACE,aAAW,aACX,YAAU,aACV,UAAW,EAAG,qCAAsC,CAAS,EAC7D,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,kBAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,OAAO,EAAC,KAAD,CAAI,YAAU,qBAAqB,UAAW,EAAG,4BAA6B,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC/G,CAEA,SAAS,eAAe,CAAE,GAAG,GAA8B,CACzD,OAAO,EAAC,KAAD,CAAI,YAAU,kBAAkB,GAAI,CAAQ,CAAA,CACrD,CAEA,SAAS,eAAe,CAAE,YAAW,WAAU,OAAO,OAAQ,QAAQ,OAAQ,GAAG,GAA8B,CAC7G,OACE,EAAC,EAAD,CAAQ,QAAA,GAAQ,QAAS,EAAW,UAAY,QAAgB,QAAa,OAAM,UAAW,EAAG,CAAS,EACxG,SAAA,EAAC,IAAD,CAAG,eAAc,EAAW,OAAS,IAAA,GAAW,YAAU,kBAAkB,cAAa,EAAU,GAAI,CAAQ,CAAA,CACzG,CAAA,CAEZ,CAEA,SAAS,mBAAmB,CAAE,YAAW,OAAO,WAAY,GAAG,GAAkC,CAC/F,OACE,EAAC,eAAD,CAAgB,aAAW,sBAAsB,KAAK,KAAK,UAAW,EAAG,UAAW,CAAS,EAAG,GAAI,EAApG,SAAA,CACE,EAAC,EAAD,CAAiB,YAAU,cAAgB,CAAA,EAC3C,EAAC,OAAD,CAAM,UAAU,kBAAmB,SAAA,CAAW,CAAA,CAChC,GAEpB,CAEA,SAAS,eAAe,CAAE,YAAW,OAAO,OAAQ,GAAG,GAA8B,CACnF,OACE,EAAC,eAAD,CAAgB,aAAW,kBAAkB,KAAK,KAAK,UAAW,EAAG,UAAW,CAAS,EAAG,GAAI,EAAhG,SAAA,CACE,EAAC,OAAD,CAAM,UAAU,kBAAmB,SAAA,CAAW,CAAA,EAC9C,EAAC,EAAD,CAAkB,YAAU,YAAc,CAAA,CAC5B,GAEpB,CAEA,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OACE,EAAC,OAAD,CACE,cAAA,GACA,YAAU,sBACV,UAAW,EAAG,+EAAgF,CAAS,EACvG,GAAI,EAJN,SAAA,CAME,EAAC,EAAD,CAAW,CAAA,EACX,EAAC,OAAD,CAAM,UAAU,UAAU,SAAA,YAAgB,CAAA,CACtC,GAEV"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import * as BasePhoneInput from "react-phone-number-input";
|
|
4
|
+
//#region src/components/phone-input.d.ts
|
|
5
|
+
type PhoneInputProps = Omit<ComponentProps<'input'>, 'onChange' | 'value' | 'ref'> & Omit<BasePhoneInput.Props<typeof BasePhoneInput.default>, 'onChange' | 'popupClassName' | 'scrollAreaClassName'> & {
|
|
6
|
+
onChange?: (value: BasePhoneInput.Value) => void;
|
|
7
|
+
popupClassName?: string;
|
|
8
|
+
scrollAreaClassName?: string;
|
|
9
|
+
};
|
|
10
|
+
declare function PhoneInput({ className, popupClassName, scrollAreaClassName, onChange, value, ...props }: PhoneInputProps): import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { PhoneInput, PhoneInputProps };
|
|
13
|
+
//# sourceMappingURL=phone-input.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../rolldown-runtime-Bdj-bS2b.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{Input as n}from"./input.js";import{Combobox as r,ComboboxContent as i,ComboboxEmpty as a,ComboboxInput as o,ComboboxItem as s,ComboboxList as c,ComboboxSeparator as l,ComboboxTrigger as u,ComboboxValue as d}from"./combobox.js";import{ScrollArea as f}from"./scroll-area.js";import{IconWorld as p}from"@tabler/icons-react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{createContext as g,useContext as _,useMemo as v,useState as y}from"react";import*as b from"react-phone-number-input";import x from"react-phone-number-input/flags";const S=g({popupClassName:void 0,scrollAreaClassName:void 0});function PhoneInput({className:t,popupClassName:n,scrollAreaClassName:r,onChange:i,value:a,...o}){return m(S.Provider,{value:{popupClassName:n,scrollAreaClassName:r},children:m(b.default,{className:e(`flex`,o[`aria-invalid`]&&`[&_*[data-slot=combobox-trigger]]:border-destructive [&_*[data-slot=combobox-trigger]]:ring-destructive/50`,t),flagComponent:FlagComponent,countrySelectComponent:CountrySelect,inputComponent:InputComponent,smartCaret:!1,defaultCountry:`BR`,value:a||void 0,onChange:e=>i?.(e||``),...o})})}function InputComponent({className:t,...r}){return m(n,{className:e(`rounded-s-none focus:z-1`,t),...r})}function CountrySelect({disabled:n,value:p,options:g,onChange:x}){let{popupClassName:C}=_(S),[w,T]=y(``),E=v(()=>w?g.filter(({label:e})=>e.toLowerCase().includes(w.toLowerCase())):g,[g,w]);return h(r,{items:E,value:p||``,onValueChange:e=>{e&&x(e)},children:[m(u,{render:h(t,{variant:`outline`,color:`zinc`,className:e(`flex h-8 items-center gap-1 rounded-s-lg rounded-e-none border-e-0 border-input px-2.5 py-0 leading-none dark:bg-input/30`,`hover:bg-transparent focus:z-10 data-pressed:bg-transparent`,n&&`opacity-50`),disabled:n,children:[m(`span`,{className:`sr-only`,children:m(d,{})}),m(FlagComponent,{country:p,countryName:p})]})}),h(i,{className:e(`w-xs *:data-[slot=input-group]:bg-transparent`,C),children:[m(o,{placeholder:`e.g. United States`,value:w,onChange:e=>T(e.target.value),showTrigger:!1,className:`border-input focus-visible:border-border rounded-none border-0 px-0 py-2.5 shadow-none ring-0! outline-none! focus-visible:ring-0 focus-visible:ring-offset-0`}),m(l,{}),m(a,{className:`px-4 py-2.5 text-sm`,children:`Nenhum país encontrado.`}),m(c,{children:m(`div`,{className:`relative flex max-h-full`,children:m(`div`,{className:`flex max-h-[min(var(--available-height),24rem)] w-full scroll-pt-2 scroll-pb-2 flex-col overscroll-contain`,children:m(f,{className:`size-full min-h-0 **:data-[slot=scroll-area-scrollbar]:m-0 **:data-[slot=scroll-area-viewport]:h-full **:data-[slot=scroll-area-viewport]:overscroll-contain`,children:E.map(e=>e.value?h(s,{value:e.value,className:`flex items-center gap-2`,children:[m(FlagComponent,{country:e.value,countryName:e.label}),m(`span`,{className:`flex-1 text-sm`,children:e.label}),m(`span`,{className:`text-foreground/50 text-sm`,children:`+${b.getCountryCallingCode(e.value)}`})]},e.value):null)})})})})]})]})}function FlagComponent({country:e,countryName:t}){let n=x[e];return m(`span`,{className:`flex h-4 w-4 items-center justify-center [&_svg:not([class*='size-'])]:size-full! [&_svg:not([class*='size-'])]:rounded-[5px]`,children:n?m(n,{title:t}):m(p,{className:`size-4 opacity-60`})})}export{PhoneInput};
|
|
2
|
+
//# sourceMappingURL=phone-input.js.map
|