@sprawlify/react 0.0.5 → 0.0.7
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/{collapsible-C5ZpjCRe.mjs → collapsible-B06GGGE7.mjs} +7 -4
- package/dist/{collapsible-D_cXuaRy.cjs → collapsible-D5kle6Bc.cjs} +12 -9
- package/dist/collection-BKabYqpE.cjs +229 -0
- package/dist/collection-DEsp9z6X.mjs +187 -0
- package/dist/components/accordion/index.cjs +19 -24
- package/dist/components/accordion/index.d.cts +11 -9
- package/dist/components/accordion/index.d.mts +11 -9
- package/dist/components/accordion/index.mjs +9 -14
- package/dist/components/angle-slider/index.cjs +12 -9
- package/dist/components/angle-slider/index.d.cts +13 -11
- package/dist/components/angle-slider/index.d.mts +13 -11
- package/dist/components/angle-slider/index.mjs +7 -4
- package/dist/components/avatar/index.cjs +128 -0
- package/dist/components/avatar/index.d.cts +49 -0
- package/dist/components/avatar/index.d.mts +49 -0
- package/dist/components/avatar/index.mjs +110 -0
- package/dist/components/bottom-sheet/index.cjs +213 -0
- package/dist/components/bottom-sheet/index.d.cts +80 -0
- package/dist/components/bottom-sheet/index.d.mts +81 -0
- package/dist/components/bottom-sheet/index.mjs +190 -0
- package/dist/components/carousel/index.cjs +263 -0
- package/dist/components/carousel/index.d.cts +95 -0
- package/dist/components/carousel/index.d.mts +95 -0
- package/dist/components/carousel/index.mjs +242 -0
- package/dist/components/checkbox/index.cjs +308 -0
- package/dist/components/checkbox/index.d.cts +115 -0
- package/dist/components/checkbox/index.d.mts +115 -0
- package/dist/components/checkbox/index.mjs +289 -0
- package/dist/components/client-only/index.cjs +14 -0
- package/dist/components/client-only/index.d.cts +8 -0
- package/dist/components/client-only/index.d.mts +8 -0
- package/dist/components/client-only/index.mjs +13 -0
- package/dist/components/clipboard/index.cjs +185 -0
- package/dist/components/clipboard/index.d.cts +71 -0
- package/dist/components/clipboard/index.d.mts +71 -0
- package/dist/components/clipboard/index.mjs +163 -0
- package/dist/components/collapsible/index.cjs +6 -3
- package/dist/components/collapsible/index.d.cts +10 -8
- package/dist/components/collapsible/index.d.mts +10 -8
- package/dist/components/collapsible/index.mjs +6 -3
- package/dist/components/collection/index.cjs +11 -0
- package/dist/components/collection/index.d.cts +2 -0
- package/dist/components/collection/index.d.mts +2 -0
- package/dist/components/collection/index.mjs +5 -0
- package/dist/components/color-picker/index.cjs +613 -0
- package/dist/components/color-picker/index.d.cts +181 -0
- package/dist/components/color-picker/index.d.mts +182 -0
- package/dist/components/color-picker/index.mjs +570 -0
- package/dist/components/combobox/index.cjs +416 -0
- package/dist/components/combobox/index.d.cts +132 -0
- package/dist/components/combobox/index.d.mts +133 -0
- package/dist/components/combobox/index.mjs +387 -0
- package/dist/components/field/index.cjs +27 -0
- package/dist/components/field/index.d.cts +116 -0
- package/dist/components/field/index.d.mts +116 -0
- package/dist/components/field/index.mjs +9 -0
- package/dist/components/fieldset/index.cjs +23 -0
- package/dist/components/fieldset/index.d.cts +73 -0
- package/dist/components/fieldset/index.d.mts +73 -0
- package/dist/components/fieldset/index.mjs +9 -0
- package/dist/components/highlight/index.cjs +32 -0
- package/dist/components/highlight/index.d.cts +14 -0
- package/dist/components/highlight/index.d.mts +14 -0
- package/dist/components/highlight/index.mjs +30 -0
- package/dist/components/portal/index.cjs +32 -0
- package/dist/components/portal/index.d.cts +11 -0
- package/dist/components/portal/index.d.mts +11 -0
- package/dist/components/portal/index.mjs +31 -0
- package/dist/components/presence/index.cjs +11 -0
- package/dist/components/presence/index.d.cts +2 -0
- package/dist/components/presence/index.d.mts +4 -0
- package/dist/components/presence/index.mjs +7 -0
- package/dist/components/select/index.cjs +419 -0
- package/dist/components/select/index.d.cts +132 -0
- package/dist/components/select/index.d.mts +133 -0
- package/dist/components/select/index.mjs +384 -0
- package/dist/{factory-DbgGeb_e.mjs → core-C0F-4KYH.mjs} +4 -154
- package/dist/{factory-CfqPG186.cjs → core-CPLjF6nm.cjs} +0 -198
- package/dist/{create-context-DCEySQ7J.cjs → create-context-D6DyFRSf.cjs} +1 -1
- package/dist/environment-BXkWNF2O.mjs +46 -0
- package/dist/environment-DLPiALpf.cjs +58 -0
- package/dist/factory-BbbIuDqa.d.mts +15 -0
- package/dist/factory-CDX-oCN5.cjs +81 -0
- package/dist/factory-DQlmCPH2.mjs +63 -0
- package/dist/factory-DaNWFLLN.d.cts +15 -0
- package/dist/field-CGCTFCx2.mjs +322 -0
- package/dist/field-CXhpW6zO.cjs +404 -0
- package/dist/fieldset-CuSSYZxV.cjs +237 -0
- package/dist/fieldset-poJ8RDvB.mjs +184 -0
- package/dist/index-BUN9wyVM.d.mts +34 -0
- package/dist/index-Dhthtdz_.d.mts +74 -0
- package/dist/index-DqRXPiW_.d.cts +34 -0
- package/dist/index-DsZldSch.d.cts +74 -0
- package/dist/index-DtdZfcpz.d.mts +25 -0
- package/dist/index.cjs +14 -11
- package/dist/index.d.cts +7 -5
- package/dist/index.d.mts +7 -5
- package/dist/index.mjs +6 -3
- package/dist/normalize-props-sqcs77GC.d.cts +13 -0
- package/dist/presence-2A4loEJY.mjs +71 -0
- package/dist/presence-BX1tNsGA.cjs +101 -0
- package/dist/providers-Bk3ALTxZ.cjs +78 -0
- package/dist/providers-CyTYcOU1.mjs +54 -0
- package/dist/render-strategy-D3w8btTD.mjs +13 -0
- package/dist/render-strategy-k1JmEGnq.cjs +30 -0
- package/dist/types-DYWV3uAj.d.cts +5 -0
- package/dist/types-FLvjyw__.d.mts +5 -0
- package/dist/use-event-BcyNH29h.mjs +19 -0
- package/dist/use-event-CGMgV6xB.cjs +25 -0
- package/dist/use-safe-layout-effect-BlOhFUAp.mjs +17 -0
- package/dist/use-safe-layout-effect-vuYaDIpT.cjs +35 -0
- package/dist/utils/index.cjs +2 -2
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +152 -2
- package/dist/factory-CNfD9NVO.d.mts +0 -41
- package/dist/factory-D5qarvEF.d.cts +0 -29
- /package/dist/{chunk-DJTHdtxa.mjs → chunk-DLP0tNsH.mjs} +0 -0
- /package/dist/{create-context-DLMHiig4.mjs → create-context-CdjrBhu7.mjs} +0 -0
- /package/dist/{create-split-props-DvwGh64U.mjs → create-split-props-BJQdOyld.mjs} +0 -0
- /package/dist/{create-split-props-CSaOnJRj.cjs → create-split-props-CSkzaUOy.cjs} +0 -0
- /package/dist/{index--Dciu8yd.d.mts → index-BwTxN5vG.d.mts} +0 -0
- /package/dist/{index-wpUGMM30.d.cts → index-zOmANnUL.d.cts} +0 -0
- /package/dist/{render-strategy-G1aEn-1X.d.cts → render-strategy-CdpAg9jb.d.cts} +0 -0
- /package/dist/{render-strategy-D37ixdTi.d.mts → render-strategy-GetMScNK.d.mts} +0 -0
- /package/dist/{utils-BQjTDAMH.mjs → utils-DflO0-3U.mjs} +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { r as PropTypes } from "../../index-DtdZfcpz.mjs";
|
|
2
|
+
import { n as Optional, t as Assign } from "../../types-FLvjyw__.mjs";
|
|
3
|
+
import { r as PolymorphicProps, t as HTMLProps } from "../../factory-BbbIuDqa.mjs";
|
|
4
|
+
import "../../render-strategy-GetMScNK.mjs";
|
|
5
|
+
import { c as UsePresenceProps } from "../../index-BUN9wyVM.mjs";
|
|
6
|
+
import { _ as CollectionItem, b as createListCollection, i as UseListCollectionProps, o as useListCollection, y as ListCollection } from "../../index-Dhthtdz_.mjs";
|
|
7
|
+
import * as react131 from "react";
|
|
8
|
+
import { JSX, ReactNode, RefAttributes } from "react";
|
|
9
|
+
import * as _sprawlify_primitives_anatomy0 from "@sprawlify/primitives/anatomy";
|
|
10
|
+
import * as combobox from "@sprawlify/primitives/machines/combobox";
|
|
11
|
+
import { FocusOutsideEvent, FocusOutsideEvent as ComboboxFocusOutsideEvent, HighlightChangeDetails, HighlightChangeDetails as ComboboxHighlightChangeDetails, InputValueChangeDetails, InputValueChangeDetails as ComboboxInputValueChangeDetails, InteractOutsideEvent, InteractOutsideEvent as ComboboxInteractOutsideEvent, ItemProps, ItemState, OpenChangeDetails, OpenChangeDetails as ComboboxOpenChangeDetails, PointerDownOutsideEvent, PointerDownOutsideEvent as ComboboxPointerDownOutsideEvent, SelectionDetails, SelectionDetails as ComboboxSelectionDetails, TriggerProps, ValueChangeDetails, ValueChangeDetails as ComboboxValueChangeDetails } from "@sprawlify/primitives/machines/combobox";
|
|
12
|
+
|
|
13
|
+
//#region src/components/combobox/combobox-clear-trigger.d.ts
|
|
14
|
+
interface ComboboxClearTriggerBaseProps extends PolymorphicProps {}
|
|
15
|
+
interface ComboboxClearTriggerProps extends HTMLProps<"button">, ComboboxClearTriggerBaseProps {}
|
|
16
|
+
declare const ComboboxClearTrigger: react131.ForwardRefExoticComponent<ComboboxClearTriggerProps & react131.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/components/combobox/combobox-content.d.ts
|
|
19
|
+
interface ComboboxContentBaseProps extends PolymorphicProps {}
|
|
20
|
+
interface ComboboxContentProps extends HTMLProps<"div">, ComboboxContentBaseProps {}
|
|
21
|
+
declare const ComboboxContent: react131.ForwardRefExoticComponent<ComboboxContentProps & react131.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/components/combobox/combobox-empty.d.ts
|
|
24
|
+
interface ComboboxEmptyBaseProps extends PolymorphicProps {}
|
|
25
|
+
interface ComboboxEmptyProps extends HTMLProps<"div">, ComboboxEmptyBaseProps {}
|
|
26
|
+
declare const ComboboxEmpty: react131.ForwardRefExoticComponent<ComboboxEmptyProps & react131.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/components/combobox/use-combobox.d.ts
|
|
29
|
+
interface UseComboboxProps<T extends CollectionItem> extends Optional<Omit<combobox.Props<T>, "dir" | "getRootNode" | "collection">, "id"> {
|
|
30
|
+
/**
|
|
31
|
+
* The collection of items
|
|
32
|
+
*/
|
|
33
|
+
collection: ListCollection<T>;
|
|
34
|
+
}
|
|
35
|
+
interface UseComboboxReturn<T extends CollectionItem> extends combobox.Api<PropTypes, T> {}
|
|
36
|
+
declare const useCombobox: <T extends CollectionItem>(props: UseComboboxProps<T>) => UseComboboxReturn<T>;
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/components/combobox/use-combobox-context.d.ts
|
|
39
|
+
interface UseComboboxContext<T extends CollectionItem> extends UseComboboxReturn<T> {}
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/components/combobox/combobox-context.d.ts
|
|
42
|
+
interface ComboboxContextProps<T extends CollectionItem> {
|
|
43
|
+
children: (context: UseComboboxContext<T>) => ReactNode;
|
|
44
|
+
}
|
|
45
|
+
declare const ComboboxContext: <T extends CollectionItem>(props: ComboboxContextProps<T>) => ReactNode;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/components/combobox/combobox-control.d.ts
|
|
48
|
+
interface ComboboxControlBaseProps extends PolymorphicProps {}
|
|
49
|
+
interface ComboboxControlProps extends HTMLProps<"div">, ComboboxControlBaseProps {}
|
|
50
|
+
declare const ComboboxControl: react131.ForwardRefExoticComponent<ComboboxControlProps & react131.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/components/combobox/combobox-input.d.ts
|
|
53
|
+
interface ComboboxInputBaseProps extends PolymorphicProps {}
|
|
54
|
+
interface ComboboxInputProps extends HTMLProps<"input">, ComboboxInputBaseProps {}
|
|
55
|
+
declare const ComboboxInput: react131.ForwardRefExoticComponent<ComboboxInputProps & react131.RefAttributes<HTMLInputElement>>;
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/components/combobox/combobox-item.d.ts
|
|
58
|
+
interface ComboboxItemBaseProps extends ItemProps, PolymorphicProps {}
|
|
59
|
+
interface ComboboxItemProps extends HTMLProps<"div">, ComboboxItemBaseProps {}
|
|
60
|
+
declare const ComboboxItem: react131.ForwardRefExoticComponent<ComboboxItemProps & react131.RefAttributes<HTMLDivElement>>;
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/components/combobox/use-combobox-item-context.d.ts
|
|
63
|
+
interface UseComboboxItemContext extends ItemState {}
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/components/combobox/combobox-item-context.d.ts
|
|
66
|
+
interface ComboboxItemContextProps {
|
|
67
|
+
children: (context: UseComboboxItemContext) => ReactNode;
|
|
68
|
+
}
|
|
69
|
+
declare const ComboboxItemContext: (props: ComboboxItemContextProps) => ReactNode;
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/components/combobox/combobox-item-group.d.ts
|
|
72
|
+
interface ComboboxItemGroupBaseProps extends PolymorphicProps {}
|
|
73
|
+
interface ComboboxItemGroupProps extends HTMLProps<"div">, ComboboxItemGroupBaseProps {}
|
|
74
|
+
declare const ComboboxItemGroup: react131.ForwardRefExoticComponent<ComboboxItemGroupProps & react131.RefAttributes<HTMLDivElement>>;
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/components/combobox/combobox-item-group-label.d.ts
|
|
77
|
+
interface ComboboxItemGroupLabelBaseProps extends PolymorphicProps {}
|
|
78
|
+
interface ComboboxItemGroupLabelProps extends HTMLProps<"div">, ComboboxItemGroupLabelBaseProps {}
|
|
79
|
+
declare const ComboboxItemGroupLabel: react131.ForwardRefExoticComponent<ComboboxItemGroupLabelProps & react131.RefAttributes<HTMLDivElement>>;
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/components/combobox/combobox-item-indicator.d.ts
|
|
82
|
+
interface ComboboxItemIndicatorBaseProps extends PolymorphicProps {}
|
|
83
|
+
interface ComboboxItemIndicatorProps extends HTMLProps<"div">, ComboboxItemIndicatorBaseProps {}
|
|
84
|
+
declare const ComboboxItemIndicator: react131.ForwardRefExoticComponent<ComboboxItemIndicatorProps & react131.RefAttributes<HTMLDivElement>>;
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/components/combobox/combobox-item-text.d.ts
|
|
87
|
+
interface ComboboxItemTextBaseProps extends PolymorphicProps {}
|
|
88
|
+
interface ComboboxItemTextProps extends HTMLProps<"span">, ComboboxItemTextBaseProps {}
|
|
89
|
+
declare const ComboboxItemText: react131.ForwardRefExoticComponent<ComboboxItemTextProps & react131.RefAttributes<HTMLDivElement>>;
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/components/combobox/combobox-label.d.ts
|
|
92
|
+
interface ComboboxLabelBaseProps extends PolymorphicProps {}
|
|
93
|
+
interface ComboboxLabelProps extends HTMLProps<"label">, ComboboxLabelBaseProps {}
|
|
94
|
+
declare const ComboboxLabel: react131.ForwardRefExoticComponent<ComboboxLabelProps & react131.RefAttributes<HTMLLabelElement>>;
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/components/combobox/combobox-list.d.ts
|
|
97
|
+
interface ComboboxListBaseProps extends PolymorphicProps {}
|
|
98
|
+
interface ComboboxListProps extends HTMLProps<"div">, ComboboxListBaseProps {}
|
|
99
|
+
declare const ComboboxList: react131.ForwardRefExoticComponent<ComboboxListProps & react131.RefAttributes<HTMLDivElement>>;
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/components/combobox/combobox-positioner.d.ts
|
|
102
|
+
interface ComboboxPositionerBaseProps extends PolymorphicProps {}
|
|
103
|
+
interface ComboboxPositionerProps extends HTMLProps<"div">, ComboboxPositionerBaseProps {}
|
|
104
|
+
declare const ComboboxPositioner: react131.ForwardRefExoticComponent<ComboboxPositionerProps & react131.RefAttributes<HTMLDivElement>>;
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/components/combobox/combobox-root.d.ts
|
|
107
|
+
interface ComboboxRootBaseProps<T extends CollectionItem> extends UseComboboxProps<T>, UsePresenceProps, PolymorphicProps {}
|
|
108
|
+
interface ComboboxRootProps<T extends CollectionItem> extends Assign<HTMLProps<"div">, ComboboxRootBaseProps<T>> {}
|
|
109
|
+
type ComboboxRootComponentProps<T extends CollectionItem = CollectionItem, P = {}> = Assign<ComboboxRootProps<T>, P> & RefAttributes<HTMLDivElement>;
|
|
110
|
+
type ComboboxRootComponent<P = {}> = <T extends CollectionItem>(props: ComboboxRootComponentProps<T, P>) => JSX.Element;
|
|
111
|
+
declare const ComboboxRoot: ComboboxRootComponent;
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/components/combobox/combobox-root-provider.d.ts
|
|
114
|
+
interface RootProviderProps<T extends CollectionItem> {
|
|
115
|
+
value: UseComboboxReturn<T>;
|
|
116
|
+
}
|
|
117
|
+
interface ComboboxRootProviderBaseProps<T extends CollectionItem> extends RootProviderProps<T>, UsePresenceProps, PolymorphicProps {}
|
|
118
|
+
interface ComboboxRootProviderProps<T extends CollectionItem> extends HTMLProps<"div">, ComboboxRootProviderBaseProps<T> {}
|
|
119
|
+
type ComboboxRootProviderComponent<P = {}> = <T extends CollectionItem>(props: Assign<ComboboxRootProviderProps<T>, P> & RefAttributes<HTMLDivElement>) => JSX.Element;
|
|
120
|
+
declare const ComboboxRootProvider: ComboboxRootProviderComponent;
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/components/combobox/combobox-trigger.d.ts
|
|
123
|
+
interface ComboboxTriggerBaseProps extends TriggerProps, PolymorphicProps {}
|
|
124
|
+
interface ComboboxTriggerProps extends HTMLProps<"button">, ComboboxTriggerBaseProps {}
|
|
125
|
+
declare const ComboboxTrigger: react131.ForwardRefExoticComponent<ComboboxTriggerProps & react131.RefAttributes<HTMLButtonElement>>;
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/components/combobox/combobox-anatomy.d.ts
|
|
128
|
+
declare const comboboxAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"input" | "label" | "content" | "list" | "item" | "root" | "trigger" | "control" | "positioner" | "itemIndicator" | "itemText" | "clearTrigger" | "itemGroup" | "itemGroupLabel" | "empty">;
|
|
129
|
+
declare namespace combobox_d_exports {
|
|
130
|
+
export { ComboboxClearTrigger as ClearTrigger, ComboboxClearTriggerBaseProps as ClearTriggerBaseProps, ComboboxClearTriggerProps as ClearTriggerProps, CollectionItem, ComboboxContent as Content, ComboboxContentBaseProps as ContentBaseProps, ComboboxContentProps as ContentProps, ComboboxContext as Context, ComboboxContextProps as ContextProps, ComboboxControl as Control, ComboboxControlBaseProps as ControlBaseProps, ComboboxControlProps as ControlProps, ComboboxEmpty as Empty, ComboboxEmptyBaseProps as EmptyBaseProps, ComboboxEmptyProps as EmptyProps, FocusOutsideEvent, HighlightChangeDetails, ComboboxInput as Input, ComboboxInputBaseProps as InputBaseProps, ComboboxInputProps as InputProps, InputValueChangeDetails, InteractOutsideEvent, ComboboxItem as Item, ComboboxItemBaseProps as ItemBaseProps, ComboboxItemContext as ItemContext, ComboboxItemContextProps as ItemContextProps, ComboboxItemGroup as ItemGroup, ComboboxItemGroupBaseProps as ItemGroupBaseProps, ComboboxItemGroupLabel as ItemGroupLabel, ComboboxItemGroupLabelBaseProps as ItemGroupLabelBaseProps, ComboboxItemGroupLabelProps as ItemGroupLabelProps, ComboboxItemGroupProps as ItemGroupProps, ComboboxItemIndicator as ItemIndicator, ComboboxItemIndicatorBaseProps as ItemIndicatorBaseProps, ComboboxItemIndicatorProps as ItemIndicatorProps, ComboboxItemProps as ItemProps, ComboboxItemText as ItemText, ComboboxItemTextBaseProps as ItemTextBaseProps, ComboboxItemTextProps as ItemTextProps, ComboboxLabel as Label, ComboboxLabelBaseProps as LabelBaseProps, ComboboxLabelProps as LabelProps, ComboboxList as List, ComboboxListBaseProps as ListBaseProps, ComboboxListProps as ListProps, OpenChangeDetails, PointerDownOutsideEvent, ComboboxPositioner as Positioner, ComboboxPositionerBaseProps as PositionerBaseProps, ComboboxPositionerProps as PositionerProps, ComboboxRoot as Root, ComboboxRootBaseProps as RootBaseProps, ComboboxRootComponent as RootComponent, ComboboxRootComponentProps as RootComponentProps, ComboboxRootProps as RootProps, ComboboxRootProvider as RootProvider, ComboboxRootProviderBaseProps as RootProviderBaseProps, ComboboxRootProviderComponent as RootProviderComponent, ComboboxRootProviderProps as RootProviderProps, SelectionDetails, ComboboxTrigger as Trigger, ComboboxTriggerBaseProps as TriggerBaseProps, ComboboxTriggerProps as TriggerProps, ValueChangeDetails };
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
export { type CollectionItem, combobox_d_exports as Combobox, ComboboxClearTrigger, type ComboboxClearTriggerBaseProps, type ComboboxClearTriggerProps, ComboboxContent, type ComboboxContentBaseProps, type ComboboxContentProps, ComboboxContext, type ComboboxContextProps, ComboboxControl, type ComboboxControlBaseProps, type ComboboxControlProps, ComboboxEmpty, type ComboboxEmptyBaseProps, type ComboboxEmptyProps, type ComboboxFocusOutsideEvent, type ComboboxHighlightChangeDetails, ComboboxInput, type ComboboxInputBaseProps, type ComboboxInputProps, type ComboboxInputValueChangeDetails, type ComboboxInteractOutsideEvent, ComboboxItem, type ComboboxItemBaseProps, ComboboxItemContext, type ComboboxItemContextProps, ComboboxItemGroup, type ComboboxItemGroupBaseProps, ComboboxItemGroupLabel, type ComboboxItemGroupLabelBaseProps, type ComboboxItemGroupLabelProps, type ComboboxItemGroupProps, ComboboxItemIndicator, type ComboboxItemIndicatorBaseProps, type ComboboxItemIndicatorProps, type ComboboxItemProps, ComboboxItemText, type ComboboxItemTextBaseProps, type ComboboxItemTextProps, ComboboxLabel, type ComboboxLabelBaseProps, type ComboboxLabelProps, ComboboxList, type ComboboxListBaseProps, type ComboboxListProps, type ComboboxOpenChangeDetails, type ComboboxPointerDownOutsideEvent, ComboboxPositioner, type ComboboxPositionerBaseProps, type ComboboxPositionerProps, ComboboxRoot, type ComboboxRootBaseProps, type ComboboxRootComponent, type ComboboxRootComponentProps, type ComboboxRootProps, ComboboxRootProvider, type ComboboxRootProviderBaseProps, type ComboboxRootProviderComponent, type ComboboxRootProviderProps, type ComboboxSelectionDetails, ComboboxTrigger, type ComboboxTriggerBaseProps, type ComboboxTriggerProps, type ComboboxValueChangeDetails, type ListCollection, type UseComboboxContext, type UseComboboxItemContext, type UseComboboxProps, type UseComboboxReturn, type UseListCollectionProps, comboboxAnatomy, createListCollection, useCombobox, useComboboxContext, useComboboxItemContext, useListCollection };
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import { t as __export } from "../../chunk-DLP0tNsH.mjs";
|
|
2
|
+
import { i as useMachine, r as normalizeProps, t as mergeProps } from "../../core-C0F-4KYH.mjs";
|
|
3
|
+
import { t as createContext$1 } from "../../create-context-CdjrBhu7.mjs";
|
|
4
|
+
import { n as useEnvironmentContext } from "../../environment-BXkWNF2O.mjs";
|
|
5
|
+
import { i as useLocaleContext } from "../../providers-CyTYcOU1.mjs";
|
|
6
|
+
import { n as sprawlify, r as composeRefs } from "../../factory-DQlmCPH2.mjs";
|
|
7
|
+
import { t as createSplitProps } from "../../create-split-props-BJQdOyld.mjs";
|
|
8
|
+
import { a as splitPresenceProps, i as usePresence, n as usePresenceContext, t as PresenceProvider } from "../../presence-2A4loEJY.mjs";
|
|
9
|
+
import "../../use-event-BcyNH29h.mjs";
|
|
10
|
+
import "../../use-safe-layout-effect-BlOhFUAp.mjs";
|
|
11
|
+
import { m as useFieldContext } from "../../field-CGCTFCx2.mjs";
|
|
12
|
+
import { n as useListCollection, o as createListCollection } from "../../collection-DEsp9z6X.mjs";
|
|
13
|
+
import { forwardRef, useId } from "react";
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
import * as combobox from "@sprawlify/primitives/machines/combobox";
|
|
16
|
+
import { anatomy } from "@sprawlify/primitives/machines/combobox";
|
|
17
|
+
|
|
18
|
+
//#region src/components/combobox/use-combobox-context.ts
|
|
19
|
+
const [ComboboxProvider, useComboboxContext] = createContext$1({
|
|
20
|
+
name: "ComboboxContext",
|
|
21
|
+
hookName: "useComboboxContext",
|
|
22
|
+
providerName: "<ComboboxProvider />"
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/combobox/combobox-clear-trigger.tsx
|
|
27
|
+
const ComboboxClearTrigger = forwardRef((props, ref) => {
|
|
28
|
+
const mergedProps = mergeProps(useComboboxContext().getClearTriggerProps(), props);
|
|
29
|
+
return /* @__PURE__ */ jsx(sprawlify.button, {
|
|
30
|
+
...mergedProps,
|
|
31
|
+
ref
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
ComboboxClearTrigger.displayName = "ComboboxClearTrigger";
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/components/combobox/combobox-content.tsx
|
|
38
|
+
const ComboboxContent = forwardRef((props, ref) => {
|
|
39
|
+
const combobox$1 = useComboboxContext();
|
|
40
|
+
const presence = usePresenceContext();
|
|
41
|
+
const mergedProps = mergeProps(combobox$1.getContentProps(), presence.getPresenceProps(), props);
|
|
42
|
+
if (presence.unmounted) return null;
|
|
43
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
44
|
+
...mergedProps,
|
|
45
|
+
ref: composeRefs(presence.ref, ref)
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
ComboboxContent.displayName = "ComboboxContent";
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/components/combobox/combobox-anatomy.ts
|
|
52
|
+
const comboboxAnatomy = anatomy.extendWith("empty");
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/combobox/combobox-empty.tsx
|
|
56
|
+
const parts = comboboxAnatomy.build();
|
|
57
|
+
const ComboboxEmpty = forwardRef((props, ref) => {
|
|
58
|
+
if (useComboboxContext().collection.size !== 0) return null;
|
|
59
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
60
|
+
...parts.empty.attrs,
|
|
61
|
+
...props,
|
|
62
|
+
role: "presentation",
|
|
63
|
+
ref
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
ComboboxEmpty.displayName = "ComboboxEmpty";
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/components/combobox/combobox-context.tsx
|
|
70
|
+
const ComboboxContext = (props) => props.children(useComboboxContext());
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/components/combobox/combobox-control.tsx
|
|
74
|
+
const ComboboxControl = forwardRef((props, ref) => {
|
|
75
|
+
const mergedProps = mergeProps(useComboboxContext().getControlProps(), props);
|
|
76
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
77
|
+
...mergedProps,
|
|
78
|
+
ref
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
ComboboxControl.displayName = "ComboboxControl";
|
|
82
|
+
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region src/components/combobox/combobox-input.tsx
|
|
85
|
+
const ComboboxInput = forwardRef((props, ref) => {
|
|
86
|
+
const mergedProps = mergeProps(useComboboxContext().getInputProps(), props);
|
|
87
|
+
const field = useFieldContext();
|
|
88
|
+
return /* @__PURE__ */ jsx(sprawlify.input, {
|
|
89
|
+
"aria-describedby": field?.ariaDescribedby,
|
|
90
|
+
...mergedProps,
|
|
91
|
+
ref
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
ComboboxInput.displayName = "ComboboxInput";
|
|
95
|
+
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/components/combobox/use-combobox-item-context.ts
|
|
98
|
+
const [ComboboxItemProvider, useComboboxItemContext] = createContext$1({
|
|
99
|
+
name: "ComboboxItemContext",
|
|
100
|
+
hookName: "useComboboxItemContext",
|
|
101
|
+
providerName: "<ComboboxItemProvider />"
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/components/combobox/use-combobox-item-props-context.ts
|
|
106
|
+
const [ComboboxItemPropsProvider, useComboboxItemPropsContext] = createContext$1({
|
|
107
|
+
name: "ComboboxItemPropsContext",
|
|
108
|
+
hookName: "useComboboxItemPropsContext",
|
|
109
|
+
providerName: "<ComboboxItemPropsProvider />"
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/components/combobox/combobox-item.tsx
|
|
114
|
+
const splitItemProps = createSplitProps();
|
|
115
|
+
const ComboboxItem = forwardRef((props, ref) => {
|
|
116
|
+
const [itemProps, localProps] = splitItemProps(props, ["item", "persistFocus"]);
|
|
117
|
+
const combobox$1 = useComboboxContext();
|
|
118
|
+
const mergedProps = mergeProps(combobox$1.getItemProps(itemProps), localProps);
|
|
119
|
+
return /* @__PURE__ */ jsx(ComboboxItemPropsProvider, {
|
|
120
|
+
value: itemProps,
|
|
121
|
+
children: /* @__PURE__ */ jsx(ComboboxItemProvider, {
|
|
122
|
+
value: combobox$1.getItemState(itemProps),
|
|
123
|
+
children: /* @__PURE__ */ jsx(sprawlify.div, {
|
|
124
|
+
...mergedProps,
|
|
125
|
+
ref
|
|
126
|
+
})
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
ComboboxItem.displayName = "ComboboxItem";
|
|
131
|
+
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/components/combobox/combobox-item-context.tsx
|
|
134
|
+
const ComboboxItemContext = (props) => props.children(useComboboxItemContext());
|
|
135
|
+
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region src/components/combobox/use-combobox-item-group-props-context.ts
|
|
138
|
+
const [ComboboxItemGroupPropsProvider, useComboboxItemGroupPropsContext] = createContext$1({
|
|
139
|
+
name: "ComboboxItemGroupPropsContext",
|
|
140
|
+
hookName: "useComboboxItemGroupPropsContext",
|
|
141
|
+
providerName: "<ComboboxItemGroupPropsProvider />"
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/components/combobox/combobox-item-group.tsx
|
|
146
|
+
const splitItemGroupProps = createSplitProps();
|
|
147
|
+
const ComboboxItemGroup = forwardRef((props, ref) => {
|
|
148
|
+
const id = useId();
|
|
149
|
+
const [_itemGroupProps, localProps] = splitItemGroupProps(props, ["id"]);
|
|
150
|
+
const itemGroupProps = {
|
|
151
|
+
id,
|
|
152
|
+
..._itemGroupProps
|
|
153
|
+
};
|
|
154
|
+
const mergedProps = mergeProps(useComboboxContext().getItemGroupProps(itemGroupProps), localProps);
|
|
155
|
+
return /* @__PURE__ */ jsx(ComboboxItemGroupPropsProvider, {
|
|
156
|
+
value: itemGroupProps,
|
|
157
|
+
children: /* @__PURE__ */ jsx(sprawlify.div, {
|
|
158
|
+
...mergedProps,
|
|
159
|
+
ref
|
|
160
|
+
})
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
ComboboxItemGroup.displayName = "ComboboxItemGroup";
|
|
164
|
+
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/components/combobox/combobox-item-group-label.tsx
|
|
167
|
+
const ComboboxItemGroupLabel = forwardRef((props, ref) => {
|
|
168
|
+
const combobox$1 = useComboboxContext();
|
|
169
|
+
const itemGroupProps = useComboboxItemGroupPropsContext();
|
|
170
|
+
const mergedProps = mergeProps(combobox$1.getItemGroupLabelProps({ htmlFor: itemGroupProps.id }), props);
|
|
171
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
172
|
+
...mergedProps,
|
|
173
|
+
ref
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
ComboboxItemGroupLabel.displayName = "ComboboxItemGroupLabel";
|
|
177
|
+
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region src/components/combobox/combobox-item-indicator.tsx
|
|
180
|
+
const ComboboxItemIndicator = forwardRef((props, ref) => {
|
|
181
|
+
const combobox$1 = useComboboxContext();
|
|
182
|
+
const itemProps = useComboboxItemPropsContext();
|
|
183
|
+
const mergedProps = mergeProps(combobox$1.getItemIndicatorProps(itemProps), props);
|
|
184
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
185
|
+
...mergedProps,
|
|
186
|
+
ref
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
ComboboxItemIndicator.displayName = "ComboboxItemIndicator";
|
|
190
|
+
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/components/combobox/combobox-item-text.tsx
|
|
193
|
+
const ComboboxItemText = forwardRef((props, ref) => {
|
|
194
|
+
const combobox$1 = useComboboxContext();
|
|
195
|
+
const itemProps = useComboboxItemPropsContext();
|
|
196
|
+
const mergedProps = mergeProps(combobox$1.getItemTextProps(itemProps), props);
|
|
197
|
+
return /* @__PURE__ */ jsx(sprawlify.span, {
|
|
198
|
+
...mergedProps,
|
|
199
|
+
ref
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
ComboboxItemText.displayName = "ComboboxItemText";
|
|
203
|
+
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region src/components/combobox/combobox-label.tsx
|
|
206
|
+
const ComboboxLabel = forwardRef((props, ref) => {
|
|
207
|
+
const mergedProps = mergeProps(useComboboxContext().getLabelProps(), props);
|
|
208
|
+
return /* @__PURE__ */ jsx(sprawlify.label, {
|
|
209
|
+
...mergedProps,
|
|
210
|
+
ref
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
ComboboxLabel.displayName = "ComboboxLabel";
|
|
214
|
+
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region src/components/combobox/combobox-list.tsx
|
|
217
|
+
const ComboboxList = forwardRef((props, ref) => {
|
|
218
|
+
const mergedProps = mergeProps(useComboboxContext().getListProps(), props);
|
|
219
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
220
|
+
...mergedProps,
|
|
221
|
+
ref
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
ComboboxList.displayName = "ComboboxList";
|
|
225
|
+
|
|
226
|
+
//#endregion
|
|
227
|
+
//#region src/components/combobox/combobox-positioner.tsx
|
|
228
|
+
const ComboboxPositioner = forwardRef((props, ref) => {
|
|
229
|
+
const combobox$1 = useComboboxContext();
|
|
230
|
+
const presence = usePresenceContext();
|
|
231
|
+
const mergedProps = mergeProps(combobox$1.getPositionerProps(), props);
|
|
232
|
+
if (presence.unmounted) return null;
|
|
233
|
+
return /* @__PURE__ */ jsx(sprawlify.div, {
|
|
234
|
+
...mergedProps,
|
|
235
|
+
ref
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
ComboboxPositioner.displayName = "ComboboxPositioner";
|
|
239
|
+
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region src/components/combobox/use-combobox.ts
|
|
242
|
+
const useCombobox = (props) => {
|
|
243
|
+
const id = useId();
|
|
244
|
+
const { dir } = useLocaleContext();
|
|
245
|
+
const { getRootNode } = useEnvironmentContext();
|
|
246
|
+
const field = useFieldContext();
|
|
247
|
+
const machineProps = {
|
|
248
|
+
id,
|
|
249
|
+
ids: {
|
|
250
|
+
label: field?.ids.label,
|
|
251
|
+
input: field?.ids.control
|
|
252
|
+
},
|
|
253
|
+
disabled: field?.disabled,
|
|
254
|
+
readOnly: field?.readOnly,
|
|
255
|
+
required: field?.required,
|
|
256
|
+
invalid: field?.invalid,
|
|
257
|
+
dir,
|
|
258
|
+
getRootNode,
|
|
259
|
+
...props
|
|
260
|
+
};
|
|
261
|
+
const service = useMachine(combobox.machine, machineProps);
|
|
262
|
+
return combobox.connect(service, normalizeProps);
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
//#endregion
|
|
266
|
+
//#region src/components/combobox/combobox-root.tsx
|
|
267
|
+
const ComboboxImpl$1 = (props, ref) => {
|
|
268
|
+
const [presenceProps, comboboxProps] = splitPresenceProps(props);
|
|
269
|
+
const [useComboboxProps, localProps] = createSplitProps()(comboboxProps, [
|
|
270
|
+
"allowCustomValue",
|
|
271
|
+
"alwaysSubmitOnEnter",
|
|
272
|
+
"autoFocus",
|
|
273
|
+
"closeOnSelect",
|
|
274
|
+
"collection",
|
|
275
|
+
"composite",
|
|
276
|
+
"defaultHighlightedValue",
|
|
277
|
+
"defaultInputValue",
|
|
278
|
+
"defaultOpen",
|
|
279
|
+
"defaultValue",
|
|
280
|
+
"disabled",
|
|
281
|
+
"disableLayer",
|
|
282
|
+
"form",
|
|
283
|
+
"highlightedValue",
|
|
284
|
+
"id",
|
|
285
|
+
"ids",
|
|
286
|
+
"inputBehavior",
|
|
287
|
+
"inputValue",
|
|
288
|
+
"invalid",
|
|
289
|
+
"loopFocus",
|
|
290
|
+
"multiple",
|
|
291
|
+
"name",
|
|
292
|
+
"navigate",
|
|
293
|
+
"onFocusOutside",
|
|
294
|
+
"onHighlightChange",
|
|
295
|
+
"onInputValueChange",
|
|
296
|
+
"onInteractOutside",
|
|
297
|
+
"onOpenChange",
|
|
298
|
+
"onPointerDownOutside",
|
|
299
|
+
"onSelect",
|
|
300
|
+
"onValueChange",
|
|
301
|
+
"open",
|
|
302
|
+
"openOnChange",
|
|
303
|
+
"openOnClick",
|
|
304
|
+
"openOnKeyPress",
|
|
305
|
+
"placeholder",
|
|
306
|
+
"positioning",
|
|
307
|
+
"readOnly",
|
|
308
|
+
"required",
|
|
309
|
+
"scrollToIndexFn",
|
|
310
|
+
"selectionBehavior",
|
|
311
|
+
"translations",
|
|
312
|
+
"value"
|
|
313
|
+
]);
|
|
314
|
+
const combobox$1 = useCombobox(useComboboxProps);
|
|
315
|
+
const presence = usePresence(mergeProps({ present: combobox$1.open }, presenceProps));
|
|
316
|
+
const mergedProps = mergeProps(combobox$1.getRootProps(), localProps);
|
|
317
|
+
return /* @__PURE__ */ jsx(ComboboxProvider, {
|
|
318
|
+
value: combobox$1,
|
|
319
|
+
children: /* @__PURE__ */ jsx(PresenceProvider, {
|
|
320
|
+
value: presence,
|
|
321
|
+
children: /* @__PURE__ */ jsx(sprawlify.div, {
|
|
322
|
+
...mergedProps,
|
|
323
|
+
ref
|
|
324
|
+
})
|
|
325
|
+
})
|
|
326
|
+
});
|
|
327
|
+
};
|
|
328
|
+
const ComboboxRoot = forwardRef(ComboboxImpl$1);
|
|
329
|
+
|
|
330
|
+
//#endregion
|
|
331
|
+
//#region src/components/combobox/combobox-root-provider.tsx
|
|
332
|
+
const ComboboxImpl = (props, ref) => {
|
|
333
|
+
const [presenceProps, comboboxProps] = splitPresenceProps(props);
|
|
334
|
+
const [{ value: combobox$1 }, localProps] = createSplitProps()(comboboxProps, ["value"]);
|
|
335
|
+
const presence = usePresence(mergeProps({ present: combobox$1.open }, presenceProps));
|
|
336
|
+
const mergedProps = mergeProps(combobox$1.getRootProps(), localProps);
|
|
337
|
+
return /* @__PURE__ */ jsx(ComboboxProvider, {
|
|
338
|
+
value: combobox$1,
|
|
339
|
+
children: /* @__PURE__ */ jsx(PresenceProvider, {
|
|
340
|
+
value: presence,
|
|
341
|
+
children: /* @__PURE__ */ jsx(sprawlify.div, {
|
|
342
|
+
...mergedProps,
|
|
343
|
+
ref
|
|
344
|
+
})
|
|
345
|
+
})
|
|
346
|
+
});
|
|
347
|
+
};
|
|
348
|
+
const ComboboxRootProvider = forwardRef(ComboboxImpl);
|
|
349
|
+
|
|
350
|
+
//#endregion
|
|
351
|
+
//#region src/components/combobox/combobox-trigger.tsx
|
|
352
|
+
const splitTriggerProps = createSplitProps();
|
|
353
|
+
const ComboboxTrigger = forwardRef((props, ref) => {
|
|
354
|
+
const [triggerProps, localProps] = splitTriggerProps(props, ["focusable"]);
|
|
355
|
+
const mergedProps = mergeProps(useComboboxContext().getTriggerProps(triggerProps), localProps);
|
|
356
|
+
return /* @__PURE__ */ jsx(sprawlify.button, {
|
|
357
|
+
...mergedProps,
|
|
358
|
+
ref
|
|
359
|
+
});
|
|
360
|
+
});
|
|
361
|
+
ComboboxTrigger.displayName = "ComboboxTrigger";
|
|
362
|
+
|
|
363
|
+
//#endregion
|
|
364
|
+
//#region src/components/combobox/combobox.ts
|
|
365
|
+
var combobox_exports = /* @__PURE__ */ __export({
|
|
366
|
+
ClearTrigger: () => ComboboxClearTrigger,
|
|
367
|
+
Content: () => ComboboxContent,
|
|
368
|
+
Context: () => ComboboxContext,
|
|
369
|
+
Control: () => ComboboxControl,
|
|
370
|
+
Empty: () => ComboboxEmpty,
|
|
371
|
+
Input: () => ComboboxInput,
|
|
372
|
+
Item: () => ComboboxItem,
|
|
373
|
+
ItemContext: () => ComboboxItemContext,
|
|
374
|
+
ItemGroup: () => ComboboxItemGroup,
|
|
375
|
+
ItemGroupLabel: () => ComboboxItemGroupLabel,
|
|
376
|
+
ItemIndicator: () => ComboboxItemIndicator,
|
|
377
|
+
ItemText: () => ComboboxItemText,
|
|
378
|
+
Label: () => ComboboxLabel,
|
|
379
|
+
List: () => ComboboxList,
|
|
380
|
+
Positioner: () => ComboboxPositioner,
|
|
381
|
+
Root: () => ComboboxRoot,
|
|
382
|
+
RootProvider: () => ComboboxRootProvider,
|
|
383
|
+
Trigger: () => ComboboxTrigger
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
//#endregion
|
|
387
|
+
export { combobox_exports as Combobox, ComboboxClearTrigger, ComboboxContent, ComboboxContext, ComboboxControl, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxItemContext, ComboboxItemGroup, ComboboxItemGroupLabel, ComboboxItemIndicator, ComboboxItemText, ComboboxLabel, ComboboxList, ComboboxPositioner, ComboboxRoot, ComboboxRootProvider, ComboboxTrigger, comboboxAnatomy, createListCollection, useCombobox, useComboboxContext, useComboboxItemContext, useListCollection };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
require('../../core-CPLjF6nm.cjs');
|
|
2
|
+
require('../../create-context-D6DyFRSf.cjs');
|
|
3
|
+
require('../../environment-DLPiALpf.cjs');
|
|
4
|
+
require('../../providers-Bk3ALTxZ.cjs');
|
|
5
|
+
require('../../factory-CDX-oCN5.cjs');
|
|
6
|
+
require('../../use-safe-layout-effect-vuYaDIpT.cjs');
|
|
7
|
+
const require_field = require('../../field-CXhpW6zO.cjs');
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, 'Field', {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return require_field.field_exports;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
exports.FieldContext = require_field.FieldContext;
|
|
16
|
+
exports.FieldErrorText = require_field.FieldErrorText;
|
|
17
|
+
exports.FieldHelperText = require_field.FieldHelperText;
|
|
18
|
+
exports.FieldInput = require_field.FieldInput;
|
|
19
|
+
exports.FieldLabel = require_field.FieldLabel;
|
|
20
|
+
exports.FieldRequiredIndicator = require_field.FieldRequiredIndicator;
|
|
21
|
+
exports.FieldRoot = require_field.FieldRoot;
|
|
22
|
+
exports.FieldRootProvider = require_field.FieldRootProvider;
|
|
23
|
+
exports.FieldSelect = require_field.FieldSelect;
|
|
24
|
+
exports.FieldTextarea = require_field.FieldTextarea;
|
|
25
|
+
exports.fieldAnatomy = require_field.fieldAnatomy;
|
|
26
|
+
exports.useField = require_field.useField;
|
|
27
|
+
exports.useFieldContext = require_field.useFieldContext;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { r as PolymorphicProps, t as HTMLProps } from "../../factory-DaNWFLLN.cjs";
|
|
2
|
+
import * as react77 from "react";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import * as _sprawlify_primitives_anatomy0 from "@sprawlify/primitives/anatomy";
|
|
5
|
+
|
|
6
|
+
//#region src/components/field/use-field.d.ts
|
|
7
|
+
interface ElementIds {
|
|
8
|
+
root?: string | undefined;
|
|
9
|
+
control?: string | undefined;
|
|
10
|
+
label?: string | undefined;
|
|
11
|
+
errorText?: string | undefined;
|
|
12
|
+
helperText?: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
interface UseFieldProps {
|
|
15
|
+
id?: string | undefined;
|
|
16
|
+
ids?: ElementIds | undefined;
|
|
17
|
+
required?: boolean | undefined;
|
|
18
|
+
disabled?: boolean | undefined;
|
|
19
|
+
invalid?: boolean | undefined;
|
|
20
|
+
readOnly?: boolean | undefined;
|
|
21
|
+
}
|
|
22
|
+
type UseFieldReturn = ReturnType<typeof useField>;
|
|
23
|
+
declare const useField: (props?: UseFieldProps) => {
|
|
24
|
+
ariaDescribedby: string | undefined;
|
|
25
|
+
ids: {
|
|
26
|
+
root: string;
|
|
27
|
+
control: string;
|
|
28
|
+
label: string;
|
|
29
|
+
errorText: string;
|
|
30
|
+
helperText: string;
|
|
31
|
+
};
|
|
32
|
+
refs: {
|
|
33
|
+
rootRef: react77.RefObject<HTMLDivElement | null>;
|
|
34
|
+
};
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
invalid: boolean;
|
|
37
|
+
readOnly: boolean;
|
|
38
|
+
required: boolean;
|
|
39
|
+
getLabelProps: () => HTMLProps<"label">;
|
|
40
|
+
getRootProps: () => HTMLProps<"div">;
|
|
41
|
+
getInputProps: () => HTMLProps<"input">;
|
|
42
|
+
getTextareaProps: () => HTMLProps<"textarea">;
|
|
43
|
+
getSelectProps: () => HTMLProps<"select">;
|
|
44
|
+
getHelperTextProps: () => HTMLProps<"span">;
|
|
45
|
+
getErrorTextProps: () => HTMLProps<"span">;
|
|
46
|
+
getRequiredIndicatorProps: () => HTMLProps<"span">;
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/components/field/use-field-context.d.ts
|
|
50
|
+
interface UseFieldContext extends UseFieldReturn {}
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/components/field/field-context.d.ts
|
|
53
|
+
interface FieldContextProps {
|
|
54
|
+
children: (context: UseFieldContext) => ReactNode;
|
|
55
|
+
}
|
|
56
|
+
declare const FieldContext: (props: FieldContextProps) => ReactNode;
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/components/field/field-error-text.d.ts
|
|
59
|
+
interface FieldErrorTextBaseProps extends PolymorphicProps {}
|
|
60
|
+
interface FieldErrorTextProps extends HTMLProps<"span">, FieldErrorTextBaseProps {}
|
|
61
|
+
declare const FieldErrorText: react77.ForwardRefExoticComponent<FieldErrorTextProps & react77.RefAttributes<HTMLSpanElement>>;
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/components/field/field-helper-text.d.ts
|
|
64
|
+
interface FieldHelperTextBaseProps extends PolymorphicProps {}
|
|
65
|
+
interface FieldHelperTextProps extends HTMLProps<"span">, FieldHelperTextBaseProps {}
|
|
66
|
+
declare const FieldHelperText: react77.ForwardRefExoticComponent<FieldHelperTextProps & react77.RefAttributes<HTMLSpanElement>>;
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/components/field/field-input.d.ts
|
|
69
|
+
interface FieldInputBaseProps extends PolymorphicProps {}
|
|
70
|
+
interface FieldInputProps extends HTMLProps<"input">, FieldInputBaseProps {}
|
|
71
|
+
declare const FieldInput: react77.ForwardRefExoticComponent<FieldInputProps & react77.RefAttributes<HTMLInputElement>>;
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/components/field/field-label.d.ts
|
|
74
|
+
interface FieldLabelBaseProps extends PolymorphicProps {}
|
|
75
|
+
interface FieldLabelProps extends HTMLProps<"label">, FieldLabelBaseProps {}
|
|
76
|
+
declare const FieldLabel: react77.ForwardRefExoticComponent<FieldLabelProps & react77.RefAttributes<HTMLLabelElement>>;
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/components/field/field-required-indicator.d.ts
|
|
79
|
+
interface FieldRequiredIndicatorBaseProps extends PolymorphicProps {
|
|
80
|
+
fallback?: React.ReactNode | undefined;
|
|
81
|
+
}
|
|
82
|
+
interface FieldRequiredIndicatorProps extends HTMLProps<"span">, FieldRequiredIndicatorBaseProps {}
|
|
83
|
+
declare const FieldRequiredIndicator: react77.ForwardRefExoticComponent<FieldRequiredIndicatorProps & react77.RefAttributes<HTMLSpanElement>>;
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/components/field/field-root.d.ts
|
|
86
|
+
interface FieldRootBaseProps extends UseFieldProps, PolymorphicProps {}
|
|
87
|
+
interface FieldRootProps extends HTMLProps<"div">, FieldRootBaseProps {}
|
|
88
|
+
declare const FieldRoot: react77.ForwardRefExoticComponent<FieldRootProps & react77.RefAttributes<HTMLDivElement>>;
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/components/field/field-root-provider.d.ts
|
|
91
|
+
interface RootProviderProps {
|
|
92
|
+
value: UseFieldReturn;
|
|
93
|
+
}
|
|
94
|
+
interface FieldRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
|
|
95
|
+
interface FieldRootProviderProps extends HTMLProps<"div">, FieldRootProviderBaseProps {}
|
|
96
|
+
declare const FieldRootProvider: react77.ForwardRefExoticComponent<FieldRootProviderProps & react77.RefAttributes<HTMLDivElement>>;
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/components/field/field-select.d.ts
|
|
99
|
+
interface FieldSelectBaseProps extends PolymorphicProps {}
|
|
100
|
+
interface FieldSelectProps extends HTMLProps<"select">, FieldSelectBaseProps {}
|
|
101
|
+
declare const FieldSelect: react77.ForwardRefExoticComponent<FieldSelectProps & react77.RefAttributes<HTMLSelectElement>>;
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/components/field/field-textarea.d.ts
|
|
104
|
+
interface FieldTextareaBaseProps extends PolymorphicProps {
|
|
105
|
+
autoresize?: boolean | undefined;
|
|
106
|
+
}
|
|
107
|
+
interface FieldTextareaProps extends HTMLProps<"textarea">, FieldTextareaBaseProps {}
|
|
108
|
+
declare const FieldTextarea: react77.ForwardRefExoticComponent<FieldTextareaProps & react77.RefAttributes<HTMLTextAreaElement>>;
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/components/field/field-anatomy.d.ts
|
|
111
|
+
declare const fieldAnatomy: _sprawlify_primitives_anatomy0.AnatomyInstance<"input" | "label" | "select" | "textarea" | "root" | "errorText" | "helperText" | "requiredIndicator">;
|
|
112
|
+
declare namespace field_d_exports {
|
|
113
|
+
export { FieldContext as Context, FieldContextProps as ContextProps, FieldErrorText as ErrorText, FieldErrorTextBaseProps as ErrorTextBaseProps, FieldErrorTextProps as ErrorTextProps, FieldHelperText as HelperText, FieldHelperTextBaseProps as HelperTextBaseProps, FieldHelperTextProps as HelperTextProps, FieldInput as Input, FieldInputBaseProps as InputBaseProps, FieldInputProps as InputProps, FieldLabel as Label, FieldLabelBaseProps as LabelBaseProps, FieldLabelProps as LabelProps, FieldRequiredIndicator as RequiredIndicator, FieldRequiredIndicatorBaseProps as RequiredIndicatorBaseProps, FieldRequiredIndicatorProps as RequiredIndicatorProps, FieldRoot as Root, FieldRootBaseProps as RootBaseProps, FieldRootProps as RootProps, FieldRootProvider as RootProvider, FieldRootProviderBaseProps as RootProviderBaseProps, FieldRootProviderProps as RootProviderProps, FieldSelect as Select, FieldSelectBaseProps as SelectBaseProps, FieldSelectProps as SelectProps, FieldTextarea as Textarea, FieldTextareaBaseProps as TextareaBaseProps, FieldTextareaProps as TextareaProps };
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
export { field_d_exports as Field, FieldContext, type FieldContextProps, FieldErrorText, type FieldErrorTextBaseProps, type FieldErrorTextProps, FieldHelperText, type FieldHelperTextBaseProps, type FieldHelperTextProps, FieldInput, type FieldInputBaseProps, type FieldInputProps, FieldLabel, type FieldLabelBaseProps, type FieldLabelProps, FieldRequiredIndicator, type FieldRequiredIndicatorBaseProps, type FieldRequiredIndicatorProps, FieldRoot, type FieldRootBaseProps, type FieldRootProps, FieldRootProvider, type FieldRootProviderBaseProps, type FieldRootProviderProps, FieldSelect, type FieldSelectBaseProps, type FieldSelectProps, FieldTextarea, type FieldTextareaBaseProps, type FieldTextareaProps, type UseFieldContext, type UseFieldProps, type UseFieldReturn, fieldAnatomy, useField, useFieldContext };
|