@px-ui/core 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as __reExport, t as __export } from "./chunk-CYeTv9WL.js";
2
2
  import * as React$2 from "react";
3
- import React$1 from "react";
3
+ import React$1, { ChangeEvent, DragEvent, InputHTMLAttributes } from "react";
4
4
  import { Dialog } from "@base-ui-components/react";
5
5
  import { ArgumentArray } from "classnames";
6
6
  import { VariantProps } from "class-variance-authority";
@@ -22,20 +22,20 @@ import { useRender } from "@base-ui-components/react/use-render";
22
22
  import { DayPickerProps } from "react-day-picker";
23
23
  import { Avatar as Avatar$1 } from "@base-ui-components/react/avatar";
24
24
  import { Switch as Switch$1 } from "@base-ui-components/react/switch";
25
- import * as class_variance_authority_types10 from "class-variance-authority/types";
25
+ import * as class_variance_authority_types11 from "class-variance-authority/types";
26
26
  export * from "class-variance-authority";
27
27
 
28
28
  //#region src/components/dialog.d.ts
29
29
  declare namespace dialog_d_exports {
30
- export { Close$1 as Close, Content$6 as Content, Description$3 as Description, Footer$1 as Footer, Header$3 as Header, HeaderContent, HeaderIcon, Overlay, Portal, Root$9 as Root, Title$3 as Title, Trigger$6 as Trigger };
30
+ export { Close$1 as Close, Content$6 as Content, Description$3 as Description, Footer$1 as Footer, Header$3 as Header, HeaderContent, HeaderIcon, Overlay, Portal, Root$10 as Root, Title$3 as Title, Trigger$7 as Trigger };
31
31
  }
32
- declare function Root$9({
32
+ declare function Root$10({
33
33
  ...props
34
34
  }: React$2.ComponentProps<typeof Dialog.Root>): react_jsx_runtime0.JSX.Element;
35
35
  declare function Portal({
36
36
  ...props
37
37
  }: React$2.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime0.JSX.Element;
38
- declare function Trigger$6({
38
+ declare function Trigger$7({
39
39
  ...props
40
40
  }: React$2.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime0.JSX.Element;
41
41
  declare function Close$1({
@@ -77,10 +77,10 @@ declare function Description$3({
77
77
  ...props
78
78
  }: React$2.ComponentProps<typeof Dialog.Description>): react_jsx_runtime0.JSX.Element;
79
79
  declare namespace popover_d_exports {
80
- export { Close, CloseIconButton, Content$5 as Content, Description$2 as Description, Footer, Header$2 as Header, Root$8 as Root, Title$2 as Title, Trigger$5 as Trigger };
80
+ export { Close, CloseIconButton, Content$5 as Content, Description$2 as Description, Footer, Header$2 as Header, Root$9 as Root, Title$2 as Title, Trigger$6 as Trigger };
81
81
  }
82
- declare function Root$8(props: React.ComponentProps<typeof Popover.Root>): react_jsx_runtime0.JSX.Element;
83
- declare function Trigger$5(props: React.ComponentProps<typeof Popover.Trigger>): react_jsx_runtime0.JSX.Element;
82
+ declare function Root$9(props: React.ComponentProps<typeof Popover.Root>): react_jsx_runtime0.JSX.Element;
83
+ declare function Trigger$6(props: React.ComponentProps<typeof Popover.Trigger>): react_jsx_runtime0.JSX.Element;
84
84
  declare function Close(props: React.ComponentProps<typeof Popover.Close>): react_jsx_runtime0.JSX.Element;
85
85
  declare function Positioner(props: React.ComponentProps<typeof Popover.Positioner>): react_jsx_runtime0.JSX.Element;
86
86
  declare function Header$2({
@@ -123,13 +123,13 @@ declare function Footer({
123
123
  declare const triggerVariants: (props?: ({
124
124
  size?: "default" | "sm" | null | undefined;
125
125
  widthVariant?: "enforced" | "full" | "fit" | null | undefined;
126
- } & class_variance_authority_types10.ClassProp) | undefined) => string;
126
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
127
127
  //#endregion
128
128
  //#region src/components/button.d.ts
129
129
  declare const buttonVariants: (props?: ({
130
130
  variant?: "link" | "default" | "primary" | "destructive" | "outline" | "primary-outline" | "ghost" | null | undefined;
131
131
  size?: "default" | "sm" | "lg" | "icon-sm" | "icon" | null | undefined;
132
- } & class_variance_authority_types10.ClassProp) | undefined) => string;
132
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
133
133
  interface ButtonProps extends React$2.ComponentProps<"button">, VariantProps<typeof buttonVariants> {}
134
134
  declare function Button({
135
135
  className,
@@ -138,13 +138,13 @@ declare function Button({
138
138
  ...props
139
139
  }: ButtonProps): react_jsx_runtime0.JSX.Element;
140
140
  declare namespace input_group_d_exports {
141
- export { Addon, Button$1 as Button, Input$1 as Input, Root$7 as Root, Text };
141
+ export { Addon, Button$1 as Button, Input$1 as Input, Root$8 as Root, Text };
142
142
  }
143
143
  declare const inputGroupVariants: (props?: ({
144
144
  size?: "default" | "sm" | null | undefined;
145
145
  widthVariant?: "enforced" | "full" | "fit" | null | undefined;
146
- } & class_variance_authority_types10.ClassProp) | undefined) => string;
147
- declare function Root$7({
146
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
147
+ declare function Root$8({
148
148
  className,
149
149
  size,
150
150
  disabled,
@@ -155,7 +155,7 @@ declare function Root$7({
155
155
  }): react_jsx_runtime0.JSX.Element;
156
156
  declare const inputGroupAddonVariants: (props?: ({
157
157
  align?: "inline-start" | "inline-end" | null | undefined;
158
- } & class_variance_authority_types10.ClassProp) | undefined) => string;
158
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
159
159
  interface AddonProps extends React$2.ComponentProps<"div">, VariantProps<typeof inputGroupAddonVariants> {}
160
160
  declare function Addon({
161
161
  className,
@@ -164,7 +164,7 @@ declare function Addon({
164
164
  }: AddonProps): react_jsx_runtime0.JSX.Element;
165
165
  declare const inputGroupButtonVariants: (props?: ({
166
166
  size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
167
- } & class_variance_authority_types10.ClassProp) | undefined) => string;
167
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
168
168
  declare function Button$1({
169
169
  className,
170
170
  type,
@@ -244,7 +244,7 @@ declare function defineLoadOptions<TData$1 = any>(loadOptions: LoadOptionsConfig
244
244
  type InferOption<T> = T extends LoadOptionsConfig<infer TData> ? TData : never;
245
245
  type InferOptions<T> = T extends LoadOptionsConfig<infer TData> ? TData[] : never;
246
246
  declare namespace combobox_d_exports {
247
- export { BaseCombobox, Chip, ChipsTrigger, Content$4 as Content, Item$6 as Item, List$2 as List, LoadingIndicator, MultiItem$1 as MultiItem, Root$6 as Root, Search, SearchableTrigger, SearchableTriggerDropdownAddon, Trigger$4 as Trigger, Value$2 as Value, useComboboxContext };
247
+ export { BaseCombobox, Chip, ChipsTrigger, Content$4 as Content, Item$7 as Item, List$2 as List, LoadingIndicator, MultiItem$1 as MultiItem, Root$7 as Root, Search, SearchableTrigger, SearchableTriggerDropdownAddon, Trigger$5 as Trigger, Value$2 as Value, useComboboxContext };
248
248
  }
249
249
  declare const List$2: React$2.ForwardRefExoticComponent<Combobox.List.Props & React$2.RefAttributes<HTMLDivElement>>;
250
250
  type ComboboxContextValues = React$2.ComponentProps<typeof Combobox.Root<any, any, any>> & {
@@ -257,7 +257,7 @@ type ComboboxContextValues = React$2.ComponentProps<typeof Combobox.Root<any, an
257
257
  hasMore?: boolean;
258
258
  onLoadMore?: () => void;
259
259
  };
260
- declare function Root$6<ItemValue, SelectedValue$1 = ItemValue, Multiple extends boolean | undefined = false>({
260
+ declare function Root$7<ItemValue, SelectedValue$1 = ItemValue, Multiple extends boolean | undefined = false>({
261
261
  children,
262
262
  ...props
263
263
  }: React$2.ComponentProps<typeof Combobox.Root<ItemValue, SelectedValue$1, Multiple>> & Pick<ComboboxContextValues, "isLoading" | "isLoadingMore" | "isError" | "onLoadMore" | "hasMore" | "invalid"> & {
@@ -277,7 +277,7 @@ declare function Content$4({
277
277
  popupProps?: React$2.ComponentProps<typeof Combobox.Popup>;
278
278
  widthVariant?: "trigger" | "fit" | "enforced";
279
279
  }>): react_jsx_runtime0.JSX.Element;
280
- declare function Item$6({
280
+ declare function Item$7({
281
281
  className,
282
282
  ...props
283
283
  }: React$2.ComponentProps<typeof Combobox.Item>): react_jsx_runtime0.JSX.Element;
@@ -290,20 +290,20 @@ declare function LoadingIndicator(props: {
290
290
  }): react_jsx_runtime0.JSX.Element;
291
291
  declare function SearchableTrigger(props: {
292
292
  placeholder?: string;
293
- size?: React$2.ComponentProps<typeof Root$7>["size"];
294
- widthVariant?: React$2.ComponentProps<typeof Root$7>["widthVariant"];
293
+ size?: React$2.ComponentProps<typeof Root$8>["size"];
294
+ widthVariant?: React$2.ComponentProps<typeof Root$8>["widthVariant"];
295
295
  className?: string;
296
296
  addons?: React$2.ReactNode;
297
297
  }): react_jsx_runtime0.JSX.Element;
298
298
  declare function SearchableTriggerDropdownAddon(): react_jsx_runtime0.JSX.Element;
299
- interface TriggerProps$1 extends Combobox.Trigger.Props, VariantProps<typeof triggerVariants> {}
300
- declare function Trigger$4({
299
+ interface TriggerProps$2 extends Combobox.Trigger.Props, VariantProps<typeof triggerVariants> {}
300
+ declare function Trigger$5({
301
301
  size,
302
302
  widthVariant,
303
303
  children,
304
304
  className,
305
305
  ...props
306
- }: TriggerProps$1): react_jsx_runtime0.JSX.Element;
306
+ }: TriggerProps$2): react_jsx_runtime0.JSX.Element;
307
307
  /**
308
308
  * Renders the value, if `value` is a string or an object with `label` property in it,
309
309
  * then renders that value else you should provide a render function to render your custom value
@@ -321,7 +321,7 @@ declare function Value$2({
321
321
  declare const chipsTriggerVariants: (props?: ({
322
322
  size?: "default" | "sm" | null | undefined;
323
323
  widthVariant?: "enforced" | "full" | null | undefined;
324
- } & class_variance_authority_types10.ClassProp) | undefined) => string;
324
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
325
325
  declare function ChipsTrigger({
326
326
  size,
327
327
  widthVariant,
@@ -341,9 +341,9 @@ declare function Search({
341
341
  declare function useComboboxContext(): ComboboxContextValues;
342
342
  declare const BaseCombobox: typeof Combobox;
343
343
  declare namespace select_d_exports {
344
- export { BaseSelect, Content$3 as Content, Item$5 as Item, List$1 as List, MultiItem, MultiSelectedValue, Root$5 as Root, SelectedValue, Trigger$3 as Trigger, TriggerProps, Value$1 as Value };
344
+ export { BaseSelect, Content$3 as Content, Item$6 as Item, List$1 as List, MultiItem, MultiSelectedValue, Root$6 as Root, SelectedValue, Trigger$4 as Trigger, TriggerProps$1 as TriggerProps, Value$1 as Value };
345
345
  }
346
- declare function Root$5<Value$3 = any, Multiple extends boolean | undefined = false>({
346
+ declare function Root$6<Value$3 = any, Multiple extends boolean | undefined = false>({
347
347
  children,
348
348
  invalid,
349
349
  ...props
@@ -363,7 +363,7 @@ declare function Content$3({
363
363
  widthVariant?: "trigger" | "fit" | "enforced";
364
364
  }>): react_jsx_runtime0.JSX.Element;
365
365
  declare const List$1: React$2.ForwardRefExoticComponent<Select.List.Props & React$2.RefAttributes<HTMLDivElement>>;
366
- declare function Item$5({
366
+ declare function Item$6({
367
367
  className,
368
368
  ...props
369
369
  }: React$2.ComponentProps<typeof Select.Item>): react_jsx_runtime0.JSX.Element;
@@ -371,12 +371,12 @@ declare function MultiItem({
371
371
  className,
372
372
  ...props
373
373
  }: React$2.ComponentProps<typeof Select.Item>): react_jsx_runtime0.JSX.Element;
374
- interface TriggerProps extends Select.Trigger.Props, VariantProps<typeof triggerVariants> {}
375
- declare function Trigger$3({
374
+ interface TriggerProps$1 extends Select.Trigger.Props, VariantProps<typeof triggerVariants> {}
375
+ declare function Trigger$4({
376
376
  size,
377
377
  widthVariant,
378
378
  ...props
379
- }: TriggerProps): react_jsx_runtime0.JSX.Element;
379
+ }: TriggerProps$1): react_jsx_runtime0.JSX.Element;
380
380
  declare function MultiSelectedValue({
381
381
  selectedValue,
382
382
  maxItems
@@ -399,10 +399,10 @@ declare function Value$1({
399
399
  type SelectedValue<TValue> = TValue | null | undefined;
400
400
  declare const BaseSelect: typeof Select;
401
401
  declare namespace menu_d_exports {
402
- export { BaseMenu, BaseTrigger, Content$2 as Content, DropdownIndicator, Group$3 as Group, GroupLabel, Item$4 as Item, RadioGroup$1 as RadioGroup, RadioItem, Root$4 as Root, Separator$1 as Separator, Trigger$2 as Trigger };
402
+ export { BaseMenu, BaseTrigger, Content$2 as Content, DropdownIndicator, Group$3 as Group, GroupLabel, Item$5 as Item, RadioGroup$1 as RadioGroup, RadioItem, Root$5 as Root, Separator$1 as Separator, Trigger$3 as Trigger };
403
403
  }
404
- declare const Root$4: React$2.FC<Menu.Root.Props>;
405
- declare function Trigger$2({
404
+ declare const Root$5: React$2.FC<Menu.Root.Props>;
405
+ declare function Trigger$3({
406
406
  className,
407
407
  children,
408
408
  size,
@@ -422,7 +422,7 @@ declare function Content$2({
422
422
  widthVariant?: "trigger" | "fit" | "enforced";
423
423
  }>): react_jsx_runtime0.JSX.Element;
424
424
  declare function DropdownIndicator(): react_jsx_runtime0.JSX.Element;
425
- declare function Item$4({
425
+ declare function Item$5({
426
426
  className,
427
427
  children,
428
428
  ...props
@@ -444,12 +444,12 @@ declare function RadioItem({
444
444
  declare const BaseTrigger: React$2.ForwardRefExoticComponent<Menu.Trigger.Props & React$2.RefAttributes<HTMLElement>>;
445
445
  declare const BaseMenu: typeof Menu;
446
446
  declare namespace progress_d_exports {
447
- export { BaseProgress, Indicator, Label$1 as Label, Root$3 as Root, Track, Value };
447
+ export { BaseProgress, Indicator, Label$1 as Label, Root$4 as Root, Track, Value };
448
448
  }
449
449
  declare const progressTrackVariants: (props?: ({
450
450
  size?: "default" | "sm" | "lg" | null | undefined;
451
- } & class_variance_authority_types10.ClassProp) | undefined) => string;
452
- declare const Root$3: React$2.ForwardRefExoticComponent<Progress.Root.Props & React$2.RefAttributes<HTMLDivElement>>;
451
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
452
+ declare const Root$4: React$2.ForwardRefExoticComponent<Progress.Root.Props & React$2.RefAttributes<HTMLDivElement>>;
453
453
  declare function Track({
454
454
  className,
455
455
  size,
@@ -470,17 +470,17 @@ declare function Value({
470
470
  }: React$2.ComponentProps<typeof Progress.Value>): react_jsx_runtime0.JSX.Element;
471
471
  declare const BaseProgress: typeof Progress;
472
472
  declare namespace segmented_control_d_exports {
473
- export { Item$3 as Item, Root$2 as Root };
473
+ export { Item$4 as Item, Root$3 as Root };
474
474
  }
475
475
  declare const segmentedControlItemVariants: (props?: ({
476
476
  variant?: "default" | null | undefined;
477
477
  size?: "default" | "sm" | "lg" | null | undefined;
478
- } & class_variance_authority_types10.ClassProp) | undefined) => string;
479
- declare function Root$2({
478
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
479
+ declare function Root$3({
480
480
  className,
481
481
  ...props
482
482
  }: React$2.ComponentProps<typeof RadioGroup>): react_jsx_runtime0.JSX.Element;
483
- declare function Item$3({
483
+ declare function Item$4({
484
484
  children,
485
485
  className,
486
486
  variant,
@@ -490,10 +490,10 @@ declare function Item$3({
490
490
  children: React$2.ReactNode;
491
491
  }): react_jsx_runtime0.JSX.Element;
492
492
  declare namespace tabs_d_exports {
493
- export { Content$1 as Content, List, Root$1 as Root, Trigger$1 as Trigger };
493
+ export { Content$1 as Content, List, Root$2 as Root, Trigger$2 as Trigger };
494
494
  }
495
495
  type TabsVariant = "underline";
496
- declare function Root$1({
496
+ declare function Root$2({
497
497
  variant,
498
498
  className,
499
499
  ...props
@@ -505,7 +505,7 @@ declare function List({
505
505
  children,
506
506
  ...props
507
507
  }: React$2.ComponentProps<typeof Tabs.List>): react_jsx_runtime0.JSX.Element;
508
- declare function Trigger$1({
508
+ declare function Trigger$2({
509
509
  className,
510
510
  ...props
511
511
  }: React$2.ComponentProps<typeof Tabs.Tab>): react_jsx_runtime0.JSX.Element;
@@ -514,14 +514,14 @@ declare function Content$1({
514
514
  ...props
515
515
  }: React$2.ComponentProps<typeof Tabs.Panel>): react_jsx_runtime0.JSX.Element;
516
516
  declare namespace tooltip_d_exports {
517
- export { BaseProvider, BaseRoot, Content, Root, Trigger };
517
+ export { BaseProvider, BaseRoot, Content, Root$1 as Root, Trigger$1 as Trigger };
518
518
  }
519
- declare function Root({
519
+ declare function Root$1({
520
520
  ...props
521
521
  }: React$2.ComponentProps<typeof Tooltip.Root>): react_jsx_runtime0.JSX.Element;
522
522
  declare const BaseRoot: typeof Tooltip.Root;
523
523
  declare const BaseProvider: React$2.FC<Tooltip.Provider.Props>;
524
- declare function Trigger({
524
+ declare function Trigger$1({
525
525
  ...props
526
526
  }: React$2.ComponentProps<typeof Tooltip.Trigger>): react_jsx_runtime0.JSX.Element;
527
527
  declare function Content({
@@ -541,20 +541,20 @@ declare function Content({
541
541
  declare const checkboxVariants: (props?: ({
542
542
  variant?: "default" | null | undefined;
543
543
  size?: "default" | "sm" | "lg" | null | undefined;
544
- } & class_variance_authority_types10.ClassProp) | undefined) => string;
544
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
545
545
  interface CheckboxProps extends React.ComponentProps<typeof Checkbox$1.Root>, VariantProps<typeof checkboxVariants> {}
546
546
  declare function Checkbox({
547
547
  className,
548
548
  ...props
549
549
  }: CheckboxProps): react_jsx_runtime0.JSX.Element;
550
550
  declare namespace block_checkbox_group_d_exports {
551
- export { Description$1 as Description, Group$2 as Group, Header$1 as Header, Item$2 as Item, Title$1 as Title };
551
+ export { Description$1 as Description, Group$2 as Group, Header$1 as Header, Item$3 as Item, Title$1 as Title };
552
552
  }
553
553
  declare function Group$2({
554
554
  className,
555
555
  ...props
556
556
  }: React.ComponentProps<typeof CheckboxGroup>): react_jsx_runtime0.JSX.Element;
557
- declare function Item$2({
557
+ declare function Item$3({
558
558
  className,
559
559
  invalid,
560
560
  children,
@@ -573,7 +573,7 @@ declare function Description$1(props: React.PropsWithChildren<{
573
573
  className?: string;
574
574
  }>): react_jsx_runtime0.JSX.Element;
575
575
  declare namespace radio_group_d_exports {
576
- export { Group$1 as Group, Item };
576
+ export { Group$1 as Group, Item$1 as Item };
577
577
  }
578
578
  declare function Group$1({
579
579
  className,
@@ -582,27 +582,27 @@ declare function Group$1({
582
582
  declare const radioVariants: (props?: ({
583
583
  variant?: "default" | null | undefined;
584
584
  size?: "default" | "sm" | "lg" | null | undefined;
585
- } & class_variance_authority_types10.ClassProp) | undefined) => string;
585
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
586
586
  interface RadioGroupItemProps extends React$2.ComponentProps<typeof Radio.Root>, VariantProps<typeof radioVariants> {}
587
- declare function Item({
587
+ declare function Item$1({
588
588
  className,
589
589
  variant,
590
590
  size,
591
591
  ...props
592
592
  }: RadioGroupItemProps): react_jsx_runtime0.JSX.Element;
593
593
  declare namespace block_radio_group_d_exports {
594
- export { Description, Group, Header, Item$1 as Item, Title };
594
+ export { Description, Group, Header, Item$2 as Item, Title };
595
595
  }
596
596
  declare function Group({
597
597
  className,
598
598
  ...props
599
599
  }: React.ComponentProps<typeof RadioGroup>): react_jsx_runtime0.JSX.Element;
600
- declare function Item$1({
600
+ declare function Item$2({
601
601
  className,
602
602
  invalid,
603
603
  children,
604
604
  ...rest
605
- }: React.PropsWithChildren<React.ComponentProps<typeof Item>> & {
605
+ }: React.PropsWithChildren<React.ComponentProps<typeof Item$1>> & {
606
606
  className?: string;
607
607
  invalid?: boolean;
608
608
  }): react_jsx_runtime0.JSX.Element;
@@ -665,7 +665,7 @@ declare function Label({
665
665
  declare const inputVariants: (props?: ({
666
666
  size?: "default" | "sm" | null | undefined;
667
667
  widthVariant?: "enforced" | "full" | null | undefined;
668
- } & class_variance_authority_types10.ClassProp) | undefined) => string;
668
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
669
669
  interface InputProps extends Omit<React$2.ComponentProps<"input">, "size">, VariantProps<typeof inputVariants> {
670
670
  invalid?: boolean;
671
671
  }
@@ -681,7 +681,7 @@ declare function Input({
681
681
  declare const textareaVariants: (props?: ({
682
682
  size?: "default" | "sm" | null | undefined;
683
683
  widthVariant?: "enforced" | "full" | null | undefined;
684
- } & class_variance_authority_types10.ClassProp) | undefined) => string;
684
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
685
685
  interface TextareaProps extends React$2.ComponentProps<"textarea">, VariantProps<typeof textareaVariants> {
686
686
  invalid?: boolean;
687
687
  }
@@ -767,7 +767,7 @@ type DatePickerProps = {
767
767
  disabled?: boolean;
768
768
  };
769
769
  renderTriggerContent?: React$2.ReactNode;
770
- popoverRootProps?: Omit<React$2.ComponentProps<typeof Root$8>, "children">;
770
+ popoverRootProps?: Omit<React$2.ComponentProps<typeof Root$9>, "children">;
771
771
  popoverContentProps?: React$2.ComponentProps<typeof Content$5>;
772
772
  } & CalendarProps;
773
773
  declare function DatePicker({
@@ -782,6 +782,356 @@ declare function DatePicker({
782
782
  ...calendarProps
783
783
  }: DatePickerProps): react_jsx_runtime0.JSX.Element;
784
784
  //#endregion
785
+ //#region src/hooks/use-file-upload.d.ts
786
+ type FileMetadata = {
787
+ name: string;
788
+ size: number;
789
+ type: string;
790
+ url: string;
791
+ id: string;
792
+ };
793
+ type FileWithPreview = {
794
+ file: File | FileMetadata;
795
+ id: string;
796
+ preview?: string;
797
+ };
798
+ type FileUploadOptions = {
799
+ maxFiles?: number;
800
+ maxSize?: number;
801
+ accept?: string;
802
+ multiple?: boolean;
803
+ initialFiles?: FileMetadata[];
804
+ onFilesChange?: (files: FileWithPreview[]) => void;
805
+ onFilesAdded?: (addedFiles: FileWithPreview[]) => void;
806
+ };
807
+ type FileUploadState = {
808
+ files: FileWithPreview[];
809
+ isDragging: boolean;
810
+ errors: string[];
811
+ };
812
+ type FileUploadActions = {
813
+ addFiles: (files: FileList | File[]) => void;
814
+ removeFile: (id: string) => void;
815
+ clearFiles: () => void;
816
+ clearErrors: () => void;
817
+ handleDragEnter: (e: DragEvent<HTMLElement>) => void;
818
+ handleDragLeave: (e: DragEvent<HTMLElement>) => void;
819
+ handleDragOver: (e: DragEvent<HTMLElement>) => void;
820
+ handleDrop: (e: DragEvent<HTMLElement>) => void;
821
+ handleFileChange: (e: ChangeEvent<HTMLInputElement>) => void;
822
+ openFileDialog: () => void;
823
+ getInputProps: (props?: InputHTMLAttributes<HTMLInputElement>) => InputHTMLAttributes<HTMLInputElement> & {
824
+ ref: any;
825
+ };
826
+ };
827
+ declare const formatBytes: (bytes: number, decimals?: number) => string;
828
+ type UploadStatus = "idle" | "uploading" | "success" | "error";
829
+ type FileWithUploadStatus = FileWithPreview & {
830
+ progress: number;
831
+ status: UploadStatus;
832
+ error?: string;
833
+ uploadedUrl?: string;
834
+ };
835
+ type PresignedUrlResponse = {
836
+ url: string;
837
+ fullPath: string;
838
+ [key: string]: unknown;
839
+ };
840
+ type UploadConfig = {
841
+ /**
842
+ * Function to get a presigned URL for uploading
843
+ * Called before uploading each file
844
+ * @param params - Parameters including filename, contentType, size, and optional AbortSignal
845
+ * @param params.signal - Optional AbortSignal to cancel the request
846
+ */
847
+ getPresignedUrl: (params: {
848
+ filename: string;
849
+ contentType: string;
850
+ size: number;
851
+ signal?: AbortSignal;
852
+ }) => Promise<{
853
+ result?: PresignedUrlResponse | null;
854
+ error?: unknown;
855
+ }>;
856
+ /**
857
+ * Function to upload the file to the storage
858
+ * Receives the presigned URL and the file
859
+ * @param url - The presigned URL to upload to
860
+ * @param file - The file to upload
861
+ * @param presignedData - The full presigned URL response data
862
+ * @param onProgress - Optional callback for upload progress
863
+ * @param signal - Optional AbortSignal to cancel the upload
864
+ */
865
+ uploadFile: (url: string, file: File, presignedData: PresignedUrlResponse, onProgress?: (progress: number) => void, signal?: AbortSignal) => Promise<{
866
+ result?: {
867
+ url: string;
868
+ [key: string]: unknown;
869
+ };
870
+ error?: unknown;
871
+ }>;
872
+ /**
873
+ * Whether to auto-upload files when they are added
874
+ * @default true
875
+ */
876
+ autoUpload?: boolean;
877
+ /**
878
+ * Called when a single file upload completes
879
+ */
880
+ onUploadComplete?: (file: FileWithUploadStatus) => void;
881
+ /**
882
+ * Called when a single file upload fails
883
+ */
884
+ onUploadError?: (file: FileWithUploadStatus, error: unknown) => void;
885
+ /**
886
+ * Called when all files finish uploading
887
+ */
888
+ onAllUploadsComplete?: (files: FileWithUploadStatus[]) => void;
889
+ };
890
+ type FileUploadWithUploaderOptions = FileUploadOptions & {
891
+ upload?: UploadConfig;
892
+ };
893
+ type FileUploadWithUploaderState = Omit<FileUploadState, "files"> & {
894
+ files: FileWithUploadStatus[];
895
+ isUploading: boolean;
896
+ };
897
+ type FileUploadWithUploaderActions = Omit<FileUploadActions, "addFiles"> & {
898
+ addFiles: (files: FileList | File[]) => void;
899
+ uploadFiles: (files?: FileWithUploadStatus[]) => Promise<FileWithUploadStatus[]>;
900
+ retryUpload: (id: string) => Promise<void>;
901
+ cancelUpload: (id: string) => void;
902
+ };
903
+ declare const useFileUpload: (options?: FileUploadWithUploaderOptions) => [FileUploadWithUploaderState, FileUploadWithUploaderActions];
904
+ //#endregion
905
+ //#region src/components/file-upload.d.ts
906
+ interface FileUploadFile {
907
+ id: string;
908
+ file: File | {
909
+ name: string;
910
+ size: number;
911
+ type: string;
912
+ url?: string;
913
+ };
914
+ progress?: number;
915
+ status?: "idle" | "uploading" | "success" | "error";
916
+ preview?: string;
917
+ error?: string;
918
+ uploadedUrl?: string;
919
+ }
920
+ interface RootProps {
921
+ children: React$2.ReactNode;
922
+ /** Files from the useFileUpload hook */
923
+ files: FileUploadFile[] | FileWithUploadStatus[];
924
+ /** Add files action from the hook */
925
+ addFiles: (files: FileList | File[]) => void;
926
+ /** Remove file action from the hook */
927
+ removeFile: (id: string) => void;
928
+ /** Clear files action from the hook */
929
+ clearFiles: () => void;
930
+ /** Retry upload action from the hook */
931
+ retryUpload?: (id: string) => Promise<void>;
932
+ /** Open file dialog action from the hook */
933
+ openFileDialog: () => void;
934
+ /** Get input props from the hook */
935
+ getInputProps: FileUploadWithUploaderActions["getInputProps"];
936
+ /** Handle drag enter from the hook */
937
+ handleDragEnter: FileUploadWithUploaderActions["handleDragEnter"];
938
+ /** Handle drag leave from the hook */
939
+ handleDragLeave: FileUploadWithUploaderActions["handleDragLeave"];
940
+ /** Handle drag over from the hook */
941
+ handleDragOver: FileUploadWithUploaderActions["handleDragOver"];
942
+ /** Handle drop from the hook */
943
+ handleDrop: FileUploadWithUploaderActions["handleDrop"];
944
+ /** Whether dragging is active (from hook state) */
945
+ isDragActive?: boolean;
946
+ /** Whether upload is in progress (from hook state) */
947
+ isUploading?: boolean;
948
+ /** Accepted file types (e.g., "image/*,.pdf") */
949
+ accept?: string;
950
+ /** Allow multiple file selection */
951
+ multiple?: boolean;
952
+ /** Whether the upload is disabled */
953
+ disabled?: boolean;
954
+ className?: string;
955
+ }
956
+ declare function Root({
957
+ children,
958
+ files,
959
+ addFiles,
960
+ removeFile,
961
+ clearFiles,
962
+ retryUpload,
963
+ openFileDialog,
964
+ getInputProps,
965
+ handleDragEnter,
966
+ handleDragLeave,
967
+ handleDragOver,
968
+ handleDrop,
969
+ isDragActive,
970
+ isUploading,
971
+ accept,
972
+ multiple,
973
+ disabled,
974
+ className
975
+ }: RootProps): react_jsx_runtime0.JSX.Element;
976
+ declare const dropzoneVariants: (props?: ({
977
+ size?: "default" | "sm" | "lg" | null | undefined;
978
+ isDragActive?: boolean | null | undefined;
979
+ } & class_variance_authority_types11.ClassProp) | undefined) => string;
980
+ interface DropzoneProps extends Omit<React$2.ComponentProps<"div">, "children">, Omit<VariantProps<typeof dropzoneVariants>, "isDragActive"> {
981
+ children?: React$2.ReactNode;
982
+ /** Custom text for the dropzone */
983
+ dropzoneText?: string;
984
+ /** Custom text for the browse button */
985
+ browseText?: string;
986
+ /** Hide the default content */
987
+ hideDefaultContent?: boolean;
988
+ }
989
+ declare function Dropzone({
990
+ className,
991
+ size,
992
+ children,
993
+ dropzoneText,
994
+ browseText,
995
+ hideDefaultContent,
996
+ ...props
997
+ }: DropzoneProps): react_jsx_runtime0.JSX.Element;
998
+ interface TriggerProps extends React$2.ComponentProps<typeof Button> {
999
+ /** Text to show while uploading */
1000
+ uploadingText?: string;
1001
+ /** Show uploading state */
1002
+ showUploadingState?: boolean;
1003
+ }
1004
+ declare function Trigger({
1005
+ children,
1006
+ uploadingText,
1007
+ showUploadingState,
1008
+ ...props
1009
+ }: TriggerProps): react_jsx_runtime0.JSX.Element;
1010
+ interface ItemListProps extends Omit<React$2.ComponentProps<"div">, "children"> {
1011
+ children?: React$2.ReactNode | ((files: FileUploadFile[]) => React$2.ReactNode);
1012
+ }
1013
+ declare function ItemList({
1014
+ className,
1015
+ children,
1016
+ ...props
1017
+ }: ItemListProps): react_jsx_runtime0.JSX.Element | null;
1018
+ interface ItemProps extends React$2.ComponentProps<"div"> {
1019
+ file: FileUploadFile;
1020
+ /** Apply error styling based on file status */
1021
+ statusStyles?: boolean;
1022
+ }
1023
+ declare function Item({
1024
+ file,
1025
+ className,
1026
+ children,
1027
+ statusStyles,
1028
+ ...props
1029
+ }: ItemProps): react_jsx_runtime0.JSX.Element;
1030
+ interface ItemPreviewProps extends React$2.ComponentProps<"div"> {
1031
+ /** Fallback icon when no preview is available */
1032
+ fallback?: React$2.ReactNode;
1033
+ }
1034
+ declare function ItemPreview({
1035
+ className,
1036
+ fallback,
1037
+ ...props
1038
+ }: ItemPreviewProps): react_jsx_runtime0.JSX.Element;
1039
+ interface ItemNameProps extends React$2.ComponentProps<"span"> {}
1040
+ declare function ItemName({
1041
+ className,
1042
+ ...props
1043
+ }: ItemNameProps): react_jsx_runtime0.JSX.Element;
1044
+ interface ItemSizeProps extends React$2.ComponentProps<"span"> {}
1045
+ declare function ItemSize({
1046
+ className,
1047
+ ...props
1048
+ }: ItemSizeProps): react_jsx_runtime0.JSX.Element;
1049
+ interface ItemRemoveProps extends React$2.ComponentProps<typeof Button> {}
1050
+ declare function ItemRemove({
1051
+ className,
1052
+ children,
1053
+ ...props
1054
+ }: ItemRemoveProps): react_jsx_runtime0.JSX.Element;
1055
+ interface ItemProgressProps extends React$2.ComponentProps<"div"> {}
1056
+ declare function ItemProgress({
1057
+ className,
1058
+ ...props
1059
+ }: ItemProgressProps): react_jsx_runtime0.JSX.Element | null;
1060
+ interface ItemStatusProps extends React$2.ComponentProps<"div"> {
1061
+ /** Custom success icon */
1062
+ successIcon?: React$2.ReactNode;
1063
+ /** Custom uploading text/element */
1064
+ uploadingContent?: React$2.ReactNode;
1065
+ /** Custom error text/element */
1066
+ errorContent?: React$2.ReactNode;
1067
+ }
1068
+ declare function ItemStatus({
1069
+ className,
1070
+ successIcon,
1071
+ uploadingContent,
1072
+ errorContent,
1073
+ ...props
1074
+ }: ItemStatusProps): react_jsx_runtime0.JSX.Element | null;
1075
+ interface ItemErrorProps extends React$2.ComponentProps<"span"> {}
1076
+ declare function ItemError({
1077
+ className,
1078
+ ...props
1079
+ }: ItemErrorProps): react_jsx_runtime0.JSX.Element | null;
1080
+ interface ItemRetryProps extends React$2.ComponentProps<typeof Button> {}
1081
+ declare function ItemRetry({
1082
+ className,
1083
+ children,
1084
+ ...props
1085
+ }: ItemRetryProps): react_jsx_runtime0.JSX.Element | null;
1086
+ interface ClearButtonProps extends React$2.ComponentProps<typeof Button> {}
1087
+ declare function ClearButton({
1088
+ children,
1089
+ ...props
1090
+ }: ClearButtonProps): react_jsx_runtime0.JSX.Element | null;
1091
+ interface ImageGridProps extends Omit<React$2.ComponentProps<"div">, "children"> {
1092
+ children?: React$2.ReactNode | ((files: FileUploadFile[]) => React$2.ReactNode);
1093
+ }
1094
+ declare function ImageGrid({
1095
+ className,
1096
+ children,
1097
+ ...props
1098
+ }: ImageGridProps): react_jsx_runtime0.JSX.Element | null;
1099
+ interface ImageGridItemProps extends React$2.ComponentProps<"div"> {
1100
+ file: FileUploadFile;
1101
+ /** Show status overlays (uploading/error) */
1102
+ showStatusOverlay?: boolean;
1103
+ }
1104
+ declare function ImageGridItem({
1105
+ file,
1106
+ className,
1107
+ showStatusOverlay,
1108
+ ...props
1109
+ }: ImageGridItemProps): react_jsx_runtime0.JSX.Element;
1110
+ declare const FileUpload: {
1111
+ Root: typeof Root;
1112
+ Dropzone: typeof Dropzone;
1113
+ Trigger: typeof Trigger;
1114
+ ItemList: typeof ItemList;
1115
+ Item: typeof Item;
1116
+ ItemPreview: typeof ItemPreview;
1117
+ ItemName: typeof ItemName;
1118
+ ItemSize: typeof ItemSize;
1119
+ ItemRemove: typeof ItemRemove;
1120
+ ItemProgress: typeof ItemProgress;
1121
+ ItemStatus: typeof ItemStatus;
1122
+ ItemError: typeof ItemError;
1123
+ ItemRetry: typeof ItemRetry;
1124
+ ClearButton: typeof ClearButton;
1125
+ ImageGrid: typeof ImageGrid;
1126
+ ImageGridItem: typeof ImageGridItem;
1127
+ };
1128
+ //#endregion
1129
+ //#region src/icons/file-icon.d.ts
1130
+ declare function FileIcon(props: React.ComponentProps<"svg">): react_jsx_runtime0.JSX.Element;
1131
+ //#endregion
1132
+ //#region src/icons/upload-icon.d.ts
1133
+ declare function UploadIcon(props: React.ComponentProps<"svg">): react_jsx_runtime0.JSX.Element;
1134
+ //#endregion
785
1135
  //#region src/hooks/use-intersection-observer.d.ts
786
1136
  interface UseIntersectionObserverOptions {
787
1137
  threshold?: number | number[];
@@ -802,8 +1152,8 @@ type UseInfiniteScrollHookArgs = Pick<UseIntersectionObserverOptions, "rootMargi
802
1152
  //#region src/utils/classnames.d.ts
803
1153
  declare function cn(...inputs: ArgumentArray): string;
804
1154
  declare namespace index_d_exports {
805
- export { Avatar, AvatarGroup, AvatarImpl, block_checkbox_group_d_exports as BlockCheckboxGroup, block_radio_group_d_exports as BlockRadioGroup, breadcrumbs_d_exports as Breadcrumbs, Button, Calendar, Checkbox, combobox_d_exports as Combobox, DatePicker, dialog_d_exports as Dialog, InferOption, InferOptions, Input, input_group_d_exports as InputGroup, Label, LoadOptionsConfig, menu_d_exports as Menu, popover_d_exports as Popover, progress_d_exports as Progress, radio_group_d_exports as RadioGroup, segmented_control_d_exports as SegmentedControl, select_d_exports as Select, Separator, Spinner, Switch, tabs_d_exports as Tabs, Textarea, TextareaProps, tooltip_d_exports as Tooltip, UseInfiniteScrollHookArgs, UseIntersectionObserverOptions, UseIntersectionObserverReturn, buttonVariants, cn, defineLoadOptions, useAsyncOptions, useIntersectionObserver };
1155
+ export { Avatar, AvatarGroup, AvatarImpl, block_checkbox_group_d_exports as BlockCheckboxGroup, block_radio_group_d_exports as BlockRadioGroup, breadcrumbs_d_exports as Breadcrumbs, Button, Calendar, Checkbox, ClearButtonProps, combobox_d_exports as Combobox, DatePicker, dialog_d_exports as Dialog, DropzoneProps, FileIcon, FileMetadata, FileUpload, FileUploadActions, FileUploadFile, FileUploadOptions, FileUploadState, FileUploadWithUploaderActions, FileUploadWithUploaderOptions, FileUploadWithUploaderState, FileWithPreview, FileWithUploadStatus, ImageGridItemProps, ImageGridProps, InferOption, InferOptions, Input, input_group_d_exports as InputGroup, ItemErrorProps, ItemListProps, ItemNameProps, ItemPreviewProps, ItemProgressProps, ItemProps, ItemRemoveProps, ItemRetryProps, ItemSizeProps, ItemStatusProps, Label, LoadOptionsConfig, menu_d_exports as Menu, popover_d_exports as Popover, PresignedUrlResponse, progress_d_exports as Progress, radio_group_d_exports as RadioGroup, RootProps, segmented_control_d_exports as SegmentedControl, select_d_exports as Select, Separator, Spinner, Switch, tabs_d_exports as Tabs, Textarea, TextareaProps, tooltip_d_exports as Tooltip, TriggerProps, UploadConfig, UploadIcon, UploadStatus, UseInfiniteScrollHookArgs, UseIntersectionObserverOptions, UseIntersectionObserverReturn, buttonVariants, cn, defineLoadOptions, formatBytes, useAsyncOptions, useFileUpload, useIntersectionObserver };
806
1156
  }
807
1157
  //#endregion
808
- export { Avatar, AvatarGroup, AvatarImpl, block_checkbox_group_d_exports as BlockCheckboxGroup, block_radio_group_d_exports as BlockRadioGroup, breadcrumbs_d_exports as Breadcrumbs, Button, Calendar, Checkbox, combobox_d_exports as Combobox, DatePicker, dialog_d_exports as Dialog, InferOption, InferOptions, Input, input_group_d_exports as InputGroup, Label, LoadOptionsConfig, menu_d_exports as Menu, popover_d_exports as Popover, progress_d_exports as Progress, radio_group_d_exports as RadioGroup, segmented_control_d_exports as SegmentedControl, select_d_exports as Select, Separator, Spinner, Switch, tabs_d_exports as Tabs, Textarea, TextareaProps, tooltip_d_exports as Tooltip, UseInfiniteScrollHookArgs, UseIntersectionObserverOptions, UseIntersectionObserverReturn, buttonVariants, cn, defineLoadOptions, useAsyncOptions, useIntersectionObserver };
1158
+ export { Avatar, AvatarGroup, AvatarImpl, block_checkbox_group_d_exports as BlockCheckboxGroup, block_radio_group_d_exports as BlockRadioGroup, breadcrumbs_d_exports as Breadcrumbs, Button, Calendar, Checkbox, ClearButtonProps, combobox_d_exports as Combobox, DatePicker, dialog_d_exports as Dialog, DropzoneProps, FileIcon, FileMetadata, FileUpload, FileUploadActions, FileUploadFile, FileUploadOptions, FileUploadState, FileUploadWithUploaderActions, FileUploadWithUploaderOptions, FileUploadWithUploaderState, FileWithPreview, FileWithUploadStatus, ImageGridItemProps, ImageGridProps, InferOption, InferOptions, Input, input_group_d_exports as InputGroup, ItemErrorProps, ItemListProps, ItemNameProps, ItemPreviewProps, ItemProgressProps, ItemProps, ItemRemoveProps, ItemRetryProps, ItemSizeProps, ItemStatusProps, Label, LoadOptionsConfig, menu_d_exports as Menu, popover_d_exports as Popover, PresignedUrlResponse, progress_d_exports as Progress, radio_group_d_exports as RadioGroup, RootProps, segmented_control_d_exports as SegmentedControl, select_d_exports as Select, Separator, Spinner, Switch, tabs_d_exports as Tabs, Textarea, TextareaProps, tooltip_d_exports as Tooltip, TriggerProps, UploadConfig, UploadIcon, UploadStatus, UseInfiniteScrollHookArgs, UseIntersectionObserverOptions, UseIntersectionObserverReturn, buttonVariants, cn, defineLoadOptions, formatBytes, useAsyncOptions, useFileUpload, useIntersectionObserver };
809
1159
  //# sourceMappingURL=index.d.ts.map