@zayne-labs/ui-react 0.10.8 → 0.10.10

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.
Files changed (76) hide show
  1. package/dist/esm/{cn-s-D7vHW1.js → cn-DdD3uYxA.js} +1 -1
  2. package/dist/esm/{cn-s-D7vHW1.js.map → cn-DdD3uYxA.js.map} +1 -1
  3. package/dist/esm/common/await/index.d.ts +46 -4
  4. package/dist/esm/common/await/index.js +86 -4
  5. package/dist/esm/common/await/index.js.map +1 -0
  6. package/dist/esm/common/error-boundary/index.d.ts +1 -1
  7. package/dist/esm/common/for/index.d.ts +23 -2
  8. package/dist/esm/common/for/index.js +1 -1
  9. package/dist/esm/common/presence/index.js +1 -1
  10. package/dist/esm/common/show/index.d.ts +32 -2
  11. package/dist/esm/common/slot/index.d.ts +16 -2
  12. package/dist/esm/common/suspense-with-boundary/index.d.ts +2 -2
  13. package/dist/esm/common/suspense-with-boundary/index.js +20 -3
  14. package/dist/esm/common/suspense-with-boundary/index.js.map +1 -0
  15. package/dist/esm/common/switch/index.d.ts +28 -2
  16. package/dist/esm/common/switch/index.js +37 -2
  17. package/dist/esm/common/switch/index.js.map +1 -0
  18. package/dist/esm/common/teleport/index.d.ts +14 -2
  19. package/dist/esm/common/teleport/index.js +31 -2
  20. package/dist/esm/common/teleport/index.js.map +1 -0
  21. package/dist/esm/{for-DK5rEY_m.js → for-BYsFEk3R.js} +1 -1
  22. package/dist/esm/{for-DK5rEY_m.js.map → for-BYsFEk3R.js.map} +1 -1
  23. package/dist/esm/{index-C8_O0zCb.d.ts → index-BwhRxsrZ.d.ts} +3 -3
  24. package/dist/esm/{index-B4K9g2v-.d.ts → index-C_2Onnhl.d.ts} +4 -4
  25. package/dist/esm/{presence-CL5_GHQH.js → presence-CAQElNtY.js} +1 -1
  26. package/dist/esm/{presence-CL5_GHQH.js.map → presence-CAQElNtY.js.map} +1 -1
  27. package/dist/esm/ui/card/index.d.ts +20 -2
  28. package/dist/esm/ui/card/index.js +94 -4
  29. package/dist/esm/ui/card/index.js.map +1 -0
  30. package/dist/esm/ui/carousel/index.d.ts +95 -2
  31. package/dist/esm/ui/carousel/index.js +285 -13
  32. package/dist/esm/ui/carousel/index.js.map +1 -0
  33. package/dist/esm/ui/drag-scroll/index.d.ts +23 -2
  34. package/dist/esm/ui/drag-scroll/index.js +114 -3
  35. package/dist/esm/ui/drag-scroll/index.js.map +1 -0
  36. package/dist/esm/ui/drop-zone/index.d.ts +346 -2
  37. package/dist/esm/ui/drop-zone/index.js +1026 -14
  38. package/dist/esm/ui/drop-zone/index.js.map +1 -0
  39. package/dist/esm/ui/form/index.d.ts +227 -2
  40. package/dist/esm/ui/form/index.js +573 -5
  41. package/dist/esm/ui/form/index.js.map +1 -0
  42. package/package.json +6 -8
  43. package/dist/esm/await-DDgVzpvI.js +0 -87
  44. package/dist/esm/await-DDgVzpvI.js.map +0 -1
  45. package/dist/esm/card-DDLJVCwL.js +0 -95
  46. package/dist/esm/card-DDLJVCwL.js.map +0 -1
  47. package/dist/esm/carousel-B051PAAX.js +0 -285
  48. package/dist/esm/carousel-B051PAAX.js.map +0 -1
  49. package/dist/esm/common/index.d.ts +0 -9
  50. package/dist/esm/common/index.js +0 -11
  51. package/dist/esm/common-PS3X58Pj.js +0 -0
  52. package/dist/esm/drag-scroll-Bb1SG4On.js +0 -115
  53. package/dist/esm/drag-scroll-Bb1SG4On.js.map +0 -1
  54. package/dist/esm/drop-zone-C9VpKJAD.js +0 -1013
  55. package/dist/esm/drop-zone-C9VpKJAD.js.map +0 -1
  56. package/dist/esm/form-DyGy9LnA.js +0 -574
  57. package/dist/esm/form-DyGy9LnA.js.map +0 -1
  58. package/dist/esm/index-BoZe50e8.d.ts +0 -340
  59. package/dist/esm/index-BsGxDKlt.d.ts +0 -32
  60. package/dist/esm/index-Bx2BzRRJ.d.ts +0 -16
  61. package/dist/esm/index-C1GPFYKG.d.ts +0 -23
  62. package/dist/esm/index-CZjeBSoQ.d.ts +0 -14
  63. package/dist/esm/index-CffEFE66.d.ts +0 -28
  64. package/dist/esm/index-DWl-QZ3Q.d.ts +0 -46
  65. package/dist/esm/index-DZxgPnK1.d.ts +0 -95
  66. package/dist/esm/index-DbiE_few.d.ts +0 -227
  67. package/dist/esm/index-Df39YVRj.d.ts +0 -23
  68. package/dist/esm/index-SX3cnKP6.d.ts +0 -20
  69. package/dist/esm/suspense-with-boundary-D-1NYDV4.js +0 -21
  70. package/dist/esm/suspense-with-boundary-D-1NYDV4.js.map +0 -1
  71. package/dist/esm/switch-Ch22z21e.js +0 -38
  72. package/dist/esm/switch-Ch22z21e.js.map +0 -1
  73. package/dist/esm/teleport-C8TzRm4M.js +0 -32
  74. package/dist/esm/teleport-C8TzRm4M.js.map +0 -1
  75. package/dist/esm/ui/index.d.ts +0 -6
  76. package/dist/esm/ui/index.js +0 -18
@@ -1,95 +0,0 @@
1
- import { PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
2
- import { UnionDiscriminator } from "@zayne-labs/toolkit-type-helpers";
3
- import * as React$1 from "react";
4
- import * as react_jsx_runtime26 from "react/jsx-runtime";
5
- import { StoreApi } from "@zayne-labs/toolkit-core";
6
-
7
- //#region src/components/ui/carousel/types.d.ts
8
- type ImagesType = Array<Record<string, string>> | string[];
9
- type CarouselStore<TImages extends ImagesType = any> = {
10
- actions: {
11
- goToNextSlide: () => void;
12
- goToPreviousSlide: () => void;
13
- goToSlide: (newValue: number) => void;
14
- };
15
- currentSlide: number;
16
- images: TImages;
17
- maxSlide: number;
18
- };
19
- type CarouselStoreApi<TImages extends ImagesType = ImagesType> = StoreApi<CarouselStore<TImages>>;
20
- type CarouselRootProps<TImages extends ImagesType = ImagesType> = {
21
- autoSlideInterval?: number;
22
- children: React.ReactNode;
23
- classNames?: {
24
- base?: string;
25
- scrollContainer?: string;
26
- };
27
- hasAutoSlide?: boolean;
28
- images: CarouselStore<TImages>["images"];
29
- onSlideBtnClick?: () => void;
30
- shouldPauseOnHover?: boolean;
31
- };
32
- type CarouselButtonsProps = {
33
- classNames?: {
34
- base?: string;
35
- defaultIcon?: string;
36
- iconContainer?: string;
37
- };
38
- icon?: React.ReactElement;
39
- variant: "next" | "prev";
40
- };
41
- type CarouselControlProps = {
42
- classNames?: {
43
- base?: string;
44
- defaultIcon?: string;
45
- iconContainer?: string;
46
- };
47
- icon?: UnionDiscriminator<[{
48
- icon?: React.ReactElement;
49
- iconType: "nextIcon" | "prevIcon";
50
- }, {
51
- next?: React.ReactElement;
52
- prev?: React.ReactElement;
53
- }]>;
54
- };
55
- type CarouselIndicatorProps = {
56
- classNames?: {
57
- base?: string;
58
- button?: string;
59
- isActive?: string;
60
- };
61
- currentIndex: number;
62
- };
63
- type RenderPropFn<TArrayItem> = (context: {
64
- array: NoInfer<TArrayItem[]>;
65
- image: NoInfer<TArrayItem>;
66
- index: number;
67
- }) => React.ReactNode;
68
- type BaseWrapperProps<TArrayItem> = {
69
- children: React.ReactNode | RenderPropFn<TArrayItem>;
70
- each?: TArrayItem[];
71
- };
72
- type CarouselWrapperProps<TArrayItem> = BaseWrapperProps<TArrayItem> & {
73
- className?: string;
74
- };
75
- type OtherCarouselProps = {
76
- children?: React.ReactNode;
77
- className?: string;
78
- style?: React.CSSProperties;
79
- };
80
- //#endregion
81
- //#region src/components/ui/carousel/carousel.d.ts
82
- declare function CarouselRoot<TImages extends ImagesType, TElement extends React$1.ElementType = "div">(props: PolymorphicPropsStrict<TElement, CarouselRootProps<TImages>>): react_jsx_runtime26.JSX.Element;
83
- declare function CarouselButton(props: CarouselButtonsProps): react_jsx_runtime26.JSX.Element;
84
- declare function CarouselControls(props: CarouselControlProps): react_jsx_runtime26.JSX.Element;
85
- declare function CarouselItemList<TArrayItem>(props: CarouselWrapperProps<TArrayItem>): react_jsx_runtime26.JSX.Element;
86
- declare function CarouselItem(props: OtherCarouselProps): react_jsx_runtime26.JSX.Element;
87
- declare function CarouselCaption<TElement extends React$1.ElementType = "div">(props: PolymorphicPropsStrict<TElement, OtherCarouselProps>): react_jsx_runtime26.JSX.Element;
88
- declare function CarouselIndicatorList<TArrayItem>(props: CarouselWrapperProps<TArrayItem>): react_jsx_runtime26.JSX.Element;
89
- declare function CarouselIndicator(props: CarouselIndicatorProps): react_jsx_runtime26.JSX.Element;
90
- declare namespace carousel_parts_d_exports {
91
- export { CarouselButton as Button, CarouselCaption as Caption, CarouselControls as Controls, CarouselIndicator as Indicator, CarouselIndicatorList as IndicatorGroup, CarouselItem as Item, CarouselItemList as ItemGroup, CarouselRoot as Root };
92
- }
93
- //#endregion
94
- export { CarouselButton, CarouselButtonsProps, CarouselCaption, CarouselControlProps, CarouselControls, CarouselIndicator, CarouselIndicatorList, CarouselIndicatorProps, CarouselItem, CarouselItemList, CarouselRoot, CarouselRootProps, CarouselStore, CarouselStoreApi, CarouselWrapperProps, ImagesType, OtherCarouselProps, carousel_parts_d_exports };
95
- //# sourceMappingURL=index-DZxgPnK1.d.ts.map
@@ -1,227 +0,0 @@
1
- import { DiscriminatedRenderItemProps, DiscriminatedRenderProps, InferProps, PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
2
- import { UnionDiscriminator } from "@zayne-labs/toolkit-type-helpers";
3
- import * as React$1 from "react";
4
- import "@zayne-labs/toolkit-react";
5
- import * as react_jsx_runtime9 from "react/jsx-runtime";
6
- import { Control, ControllerFieldState, ControllerProps, ControllerRenderProps, FieldPath, FieldPathValue, FieldPathValues, RegisterOptions, UseFormReturn, UseFormStateReturn, useFormContext as useFormRootContext } from "react-hook-form";
7
-
8
- //#region src/components/ui/form/form-context.d.ts
9
-
10
- type RenderIconProps = {
11
- isPasswordVisible: boolean;
12
- };
13
- type EyeIconObject = UnionDiscriminator<[{
14
- closed: React.ReactNode;
15
- open: React.ReactNode;
16
- }, {
17
- renderIcon: (props: RenderIconProps) => React.ReactNode;
18
- }]>;
19
- type FormRootContext = {
20
- withEyeIcon: boolean | EyeIconObject | undefined;
21
- };
22
- type FieldContextValue = {
23
- formDescriptionId: `${string}-(${string})-form-item-description`;
24
- formItemId: `${string}-(${string})-form-item`;
25
- formMessageId: `${string}-(${string})-form-item-message`;
26
- name: string;
27
- };
28
- type FormFieldContextProps = DiscriminatedRenderProps<(contextValue: FieldContextValue) => React.ReactNode>;
29
- type FieldState = {
30
- errors?: UseFormStateReturn<FieldValues>["errors"];
31
- isDisabled?: boolean;
32
- isInvalid?: boolean;
33
- };
34
- //#endregion
35
- //#region src/components/ui/form/form.d.ts
36
- type FieldValues = Record<string, any>;
37
- type FormRootProps<TFieldValues extends FieldValues> = InferProps<"form"> & Partial<FormRootContext> & {
38
- children: React$1.ReactNode;
39
- methods: UseFormReturn<TFieldValues>;
40
- };
41
- declare function FormRoot<TValues extends FieldValues>(props: FormRootProps<TValues>): react_jsx_runtime9.JSX.Element;
42
- type FormFieldProps<TControl, TFieldValues extends FieldValues> = (TControl extends (Control<infer TValues>) ? {
43
- control?: never;
44
- name: FieldPath<TValues>;
45
- } : {
46
- control?: Control<TFieldValues>;
47
- name: FieldPath<TFieldValues>;
48
- }) & ((InferProps<"div"> & {
49
- withWrapper?: true;
50
- }) | {
51
- children: React$1.ReactNode;
52
- className?: never;
53
- withWrapper: false;
54
- });
55
- declare function FormField<TControl, TFieldValues extends FieldValues = FieldValues>(props: FormFieldProps<TControl, TFieldValues>): react_jsx_runtime9.JSX.Element;
56
- type FormFieldControllerRenderFn = (props: {
57
- field: Omit<ControllerRenderProps, "value"> & {
58
- value: never;
59
- };
60
- fieldState: ControllerFieldState;
61
- formState: UseFormStateReturn<never>;
62
- }) => React$1.ReactElement;
63
- type FormFieldControllerProps = Omit<ControllerProps<FieldValues, FieldPath<FieldValues>>, "control" | "name" | "render"> & {
64
- render: FormFieldControllerRenderFn;
65
- };
66
- declare function FormFieldController(props: FormFieldControllerProps): react_jsx_runtime9.JSX.Element;
67
- declare function FormFieldControlledField<TFieldValues extends FieldValues>(props: ControllerProps<TFieldValues>): react_jsx_runtime9.JSX.Element;
68
- declare function FormFieldContext(props: FormFieldContextProps): React$1.ReactNode;
69
- declare function FormLabel(props: InferProps<"label">): react_jsx_runtime9.JSX.Element;
70
- declare function FormInputGroup(props: InferProps<"div">): react_jsx_runtime9.JSX.Element;
71
- type FormSideItemProps = {
72
- children?: React$1.ReactNode;
73
- className?: string;
74
- };
75
- declare function FormInputLeftItem<TElement extends React$1.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>): react_jsx_runtime9.JSX.Element;
76
- declare namespace FormInputLeftItem {
77
- var slotSymbol: symbol;
78
- }
79
- declare function FormInputRightItem<TElement extends React$1.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>): react_jsx_runtime9.JSX.Element;
80
- declare namespace FormInputRightItem {
81
- var slotSymbol: symbol;
82
- }
83
- type FormInputPrimitiveProps<TFieldValues extends FieldValues = FieldValues> = Omit<React$1.ComponentPropsWithRef<"input">, "children"> & {
84
- classNames?: {
85
- error?: string;
86
- eyeIcon?: string;
87
- input?: string;
88
- inputGroup?: string;
89
- };
90
- control?: Control<TFieldValues>;
91
- fieldState?: FieldState;
92
- name?: FieldPath<TFieldValues>;
93
- withEyeIcon?: FormRootContext["withEyeIcon"];
94
- };
95
- type FormTextAreaPrimitiveProps<TFieldValues extends FieldValues = FieldValues> = React$1.ComponentPropsWithRef<"textarea"> & {
96
- classNames?: {
97
- base?: string;
98
- error?: string;
99
- };
100
- control?: Control<TFieldValues>;
101
- fieldState?: FieldState;
102
- name?: FieldPath<TFieldValues>;
103
- };
104
- type FormSelectPrimitiveProps<TFieldValues extends FieldValues = FieldValues> = React$1.ComponentPropsWithRef<"select"> & {
105
- classNames?: {
106
- base?: string;
107
- error?: string;
108
- };
109
- control?: Control<TFieldValues>;
110
- fieldState?: FieldState;
111
- name?: FieldPath<TFieldValues>;
112
- };
113
- declare function FormInputPrimitive<TFieldValues extends FieldValues>(props: FormInputPrimitiveProps<TFieldValues> & {
114
- rules?: RegisterOptions;
115
- }): react_jsx_runtime9.JSX.Element;
116
- declare function FormTextAreaPrimitive<TFieldValues extends FieldValues>(props: FormTextAreaPrimitiveProps<TFieldValues> & {
117
- rules?: RegisterOptions;
118
- }): react_jsx_runtime9.JSX.Element;
119
- declare function FormSelectPrimitive<TFieldValues extends FieldValues>(props: FormSelectPrimitiveProps<TFieldValues> & {
120
- rules?: RegisterOptions;
121
- }): react_jsx_runtime9.JSX.Element;
122
- type PrimitivePropsToOmit = "control" | "formState" | "name";
123
- type FormInputProps = Omit<FormInputPrimitiveProps, PrimitivePropsToOmit> & {
124
- rules?: RegisterOptions;
125
- };
126
- type FormTextAreaProps = Omit<FormTextAreaPrimitiveProps, PrimitivePropsToOmit> & {
127
- rules?: RegisterOptions;
128
- };
129
- type FormSelectProps = Omit<FormSelectPrimitiveProps, PrimitivePropsToOmit> & {
130
- rules?: RegisterOptions;
131
- };
132
- type CombinedFormInputProps = (FormSelectProps & {
133
- type: "select";
134
- }) | (FormTextAreaProps & {
135
- type: "textarea";
136
- }) | FormInputProps;
137
- declare function FormInput(props: CombinedFormInputProps & {
138
- rules?: RegisterOptions;
139
- }): react_jsx_runtime9.JSX.Element;
140
- declare function FormTextArea(props: FormTextAreaProps): react_jsx_runtime9.JSX.Element;
141
- declare function FormSelect(props: FormSelectProps): react_jsx_runtime9.JSX.Element;
142
- declare function FormDescription(props: InferProps<"p">): react_jsx_runtime9.JSX.Element;
143
- type ErrorMessageRenderProps = {
144
- className: string;
145
- "data-index": number;
146
- "data-part": "error-message";
147
- "data-scope": "form";
148
- "data-slot": "form-error-message";
149
- id: string | undefined;
150
- };
151
- type ErrorMessageRenderState = {
152
- errorMessage: string;
153
- errorMessageArray: string[];
154
- index: number;
155
- };
156
- type ErrorMessageRenderFn = (context: {
157
- props: ErrorMessageRenderProps;
158
- state: ErrorMessageRenderState;
159
- }) => React$1.ReactNode;
160
- type FormErrorMessagePrimitiveProps<TFieldValues extends FieldValues> = DiscriminatedRenderItemProps<ErrorMessageRenderFn> & {
161
- className?: string;
162
- classNames?: {
163
- container?: string;
164
- errorMessage?: string;
165
- errorMessageAnimation?: string;
166
- };
167
- control?: Control<TFieldValues>;
168
- disableErrorAnimation?: boolean;
169
- disableScrollToErrorField?: boolean;
170
- } & ({
171
- fieldName: FieldPath<TFieldValues>;
172
- type?: "regular";
173
- } | {
174
- fieldName: string;
175
- type: "root";
176
- });
177
- type FormErrorMessagePrimitiveType = {
178
- <TFieldValues extends FieldValues>(props: Extract<FormErrorMessagePrimitiveProps<TFieldValues>, {
179
- type?: "regular";
180
- }>): React$1.ReactNode;
181
- <TFieldValues extends FieldValues>(props: Extract<FormErrorMessagePrimitiveProps<TFieldValues>, {
182
- type: "root";
183
- }>): React$1.ReactNode;
184
- };
185
- declare const FormErrorMessagePrimitive: FormErrorMessagePrimitiveType;
186
- type FormErrorMessageProps<TControl, TFieldValues extends FieldValues> = (TControl extends Control<infer TValues> ? {
187
- className?: string;
188
- control?: never;
189
- errorField?: FieldPath<TValues>;
190
- type?: "regular";
191
- } : {
192
- className?: string;
193
- control?: Control<TFieldValues>;
194
- errorField?: FieldPath<TFieldValues>;
195
- type?: "regular";
196
- }) | {
197
- className?: string;
198
- control?: never;
199
- errorField: string;
200
- type: "root";
201
- };
202
- declare function FormErrorMessage<TControl, TFieldValues extends FieldValues = FieldValues>(props: FormErrorMessageProps<TControl, TFieldValues>): react_jsx_runtime9.JSX.Element;
203
- type FormSubmitProps = InferProps<"button"> & {
204
- asChild?: boolean;
205
- };
206
- declare function FormSubmit<TElement extends React$1.ElementType = "button">(props: PolymorphicPropsStrict<TElement, FormSubmitProps>): react_jsx_runtime9.JSX.Element;
207
- type GetFieldValue<TFieldPathOrPaths, TFieldValues extends FieldValues> = TFieldPathOrPaths extends Array<FieldPath<TFieldValues>> ? FieldPathValues<TFieldValues, TFieldPathOrPaths> : TFieldPathOrPaths extends FieldPath<TFieldValues> ? FieldPathValue<TFieldValues, TFieldPathOrPaths> : unknown;
208
- type FormSubscribeToFieldValueRenderFn<TFieldValues extends FieldValues, TFieldPathOrPaths> = (props: {
209
- value: GetFieldValue<TFieldPathOrPaths, TFieldValues>;
210
- }) => React$1.ReactNode;
211
- type FormSubscribeToFieldValueProps<TFieldValues extends FieldValues, TFieldPathOrPaths> = DiscriminatedRenderProps<FormSubscribeToFieldValueRenderFn<TFieldValues, TFieldPathOrPaths>> & {
212
- control: Control<TFieldValues>;
213
- name?: TFieldPathOrPaths;
214
- };
215
- declare function FormSubscribeToFieldValue<TFieldValues extends FieldValues, const TFieldPathOrPaths extends Array<FieldPath<TFieldValues>> | FieldPath<TFieldValues>>(props: FormSubscribeToFieldValueProps<TFieldValues, TFieldPathOrPaths>): React$1.ReactNode;
216
- type FormSubscribeToFormStateRenderFn<TFieldValues extends FieldValues> = (props: UseFormStateReturn<TFieldValues>) => React$1.ReactNode;
217
- type FormSubscribeToFormStateProps<TFieldValues extends FieldValues> = DiscriminatedRenderProps<FormSubscribeToFormStateRenderFn<TFieldValues>> & {
218
- control?: Control<TFieldValues>;
219
- name?: Array<FieldPath<TFieldValues>> | FieldPath<TFieldValues>;
220
- };
221
- declare function FormSubscribeToFormState<TFieldValues extends FieldValues = FieldValues>(props: FormSubscribeToFormStateProps<TFieldValues>): React$1.ReactNode;
222
- declare namespace form_parts_d_exports {
223
- export { FormFieldControlledField as ControlledField, FormDescription as Description, FormErrorMessage as ErrorMessage, FormErrorMessagePrimitive as ErrorMessagePrimitive, FormField as Field, FormFieldContext as FieldContext, FormFieldController as FieldController, FormInput as Input, FormInputGroup as InputGroup, FormInputLeftItem as InputLeftItem, FormInputPrimitive as InputPrimitive, FormInputRightItem as InputRightItem, FormLabel as Label, FormRoot as Root, FormSelect as Select, FormSubmit as Submit, FormSubscribeToFieldValue as SubscribeToFieldValue, FormSubscribeToFormState as SubscribeToFormState, FormTextArea as TextArea, FormTextAreaPrimitive as TextAreaPrimitive };
224
- }
225
- //#endregion
226
- export { FieldValues, FormDescription, FormErrorMessage, FormErrorMessagePrimitive, FormErrorMessagePrimitiveProps, FormField, FormFieldContext, FormFieldControlledField, FormFieldController, FormInput, FormInputGroup, FormInputLeftItem, FormInputPrimitive, FormInputProps, FormInputRightItem, FormLabel, FormRoot, FormSelect, FormSelectPrimitive, FormSelectProps, FormSubmit, FormSubscribeToFieldValue, FormSubscribeToFormState, FormTextArea, FormTextAreaPrimitive, FormTextAreaProps, form_parts_d_exports, useFormRootContext, useStrictFormFieldContext };
227
- //# sourceMappingURL=index-DbiE_few.d.ts.map
@@ -1,23 +0,0 @@
1
- import { DiscriminatedRenderItemProps, PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
2
- import { Prettify } from "@zayne-labs/toolkit-type-helpers";
3
- import * as React from "react";
4
- import * as react_jsx_runtime34 from "react/jsx-runtime";
5
-
6
- //#region src/components/common/for/for.d.ts
7
- type ArrayOrNumber = number | readonly unknown[];
8
- type GetArrayItemType<TArray extends ArrayOrNumber> = TArray extends readonly unknown[] ? TArray[number] : TArray extends number ? number : unknown;
9
- type RenderPropFn<TArray extends ArrayOrNumber> = (item: GetArrayItemType<TArray>, index: number, array: Array<GetArrayItemType<TArray>>) => React.ReactNode;
10
- type ForRenderProps<TArray extends ArrayOrNumber> = DiscriminatedRenderItemProps<RenderPropFn<TArray>>;
11
- type ForProps<TArray extends ArrayOrNumber> = Prettify<{
12
- each: TArray;
13
- fallback?: React.ReactNode;
14
- } & ForRenderProps<TArray>>;
15
- declare function For<const TArray extends ArrayOrNumber>(props: ForProps<TArray>): string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
16
- declare function ForWithWrapper<const TArray extends ArrayOrNumber, TElement extends React.ElementType = "ul">(props: PolymorphicPropsStrict<TElement, ForProps<TArray>>): react_jsx_runtime34.JSX.Element;
17
- //#endregion
18
- //#region src/components/common/for/getElementList.d.ts
19
- type GetElementListResult<TVariant extends "base" | "withWrapper"> = TVariant extends "base" ? [typeof For] : [typeof ForWithWrapper];
20
- declare const getElementList: <TVariant extends "base" | "withWrapper" = "withWrapper">(variant?: TVariant) => GetElementListResult<TVariant>;
21
- //#endregion
22
- export { For, ForRenderProps, ForWithWrapper, getElementList };
23
- //# sourceMappingURL=index-Df39YVRj.d.ts.map
@@ -1,20 +0,0 @@
1
- import { PolymorphicProps } from "@zayne-labs/toolkit-react/utils";
2
- import * as React from "react";
3
- import * as react_jsx_runtime2 from "react/jsx-runtime";
4
-
5
- //#region src/components/ui/card/card.d.ts
6
- declare function CardRoot<TElement extends React.ElementType = "article">(props: PolymorphicProps<TElement>): react_jsx_runtime2.JSX.Element;
7
- declare function CardHeader<TElement extends React.ElementType = "header">(props: PolymorphicProps<TElement>): react_jsx_runtime2.JSX.Element;
8
- declare function CardTitle<TElement extends React.ElementType = "h3">(props: PolymorphicProps<TElement>): react_jsx_runtime2.JSX.Element;
9
- declare function CardDescription<TElement extends React.ElementType = "p">(props: PolymorphicProps<TElement>): react_jsx_runtime2.JSX.Element;
10
- declare function CardContent<TElement extends React.ElementType = "div">(props: PolymorphicProps<TElement>): react_jsx_runtime2.JSX.Element;
11
- declare function CardAction<TElement extends React.ElementType = "div">(props: PolymorphicProps<TElement>): react_jsx_runtime2.JSX.Element;
12
- declare function CardFooter<TElement extends React.ElementType = "footer">(props: PolymorphicProps<TElement, {
13
- asChild?: boolean;
14
- }>): react_jsx_runtime2.JSX.Element;
15
- declare namespace card_parts_d_exports {
16
- export { CardAction as Action, CardContent as Content, CardDescription as Description, CardFooter as Footer, CardHeader as Header, CardRoot as Root, CardTitle as Title };
17
- }
18
- //#endregion
19
- export { CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle, card_parts_d_exports };
20
- //# sourceMappingURL=index-SX3cnKP6.d.ts.map
@@ -1,21 +0,0 @@
1
- import { ErrorBoundary } from "./error-boundary-y9Samt_s.js";
2
- import { Suspense } from "react";
3
- import { jsx } from "react/jsx-runtime";
4
-
5
- //#region src/components/common/suspense-with-boundary/suspense-with-boundary.tsx
6
- function SuspenseWithBoundary(props) {
7
- const { children, errorFallback, fallback } = props;
8
- const errorBoundaryProps = Boolean(errorFallback) && { fallback: errorFallback };
9
- const suspenseProps = Boolean(fallback) && { fallback };
10
- return /* @__PURE__ */ jsx(ErrorBoundary, {
11
- ...errorBoundaryProps,
12
- children: /* @__PURE__ */ jsx(Suspense, {
13
- ...suspenseProps,
14
- children
15
- })
16
- });
17
- }
18
-
19
- //#endregion
20
- export { SuspenseWithBoundary };
21
- //# sourceMappingURL=suspense-with-boundary-D-1NYDV4.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"suspense-with-boundary-D-1NYDV4.js","names":[],"sources":["../../src/components/common/suspense-with-boundary/suspense-with-boundary.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Suspense } from \"react\";\nimport { ErrorBoundary, type ErrorBoundaryProps } from \"../error-boundary\";\n\nexport type SuspenseWithBoundaryProps = {\n\tchildren: React.ReactNode;\n\terrorFallback?: ErrorBoundaryProps[\"fallback\"];\n\tfallback?: React.ReactNode;\n};\n\nexport function SuspenseWithBoundary(props: SuspenseWithBoundaryProps) {\n\tconst { children, errorFallback, fallback } = props;\n\n\tconst errorBoundaryProps = Boolean(errorFallback) && { fallback: errorFallback };\n\tconst suspenseProps = Boolean(fallback) && { fallback };\n\n\treturn (\n\t\t<ErrorBoundary {...errorBoundaryProps}>\n\t\t\t<Suspense {...suspenseProps}>{children}</Suspense>\n\t\t</ErrorBoundary>\n\t);\n}\n"],"mappings":";;;;;AAUA,SAAgB,qBAAqB,OAAkC;CACtE,MAAM,EAAE,UAAU,eAAe,aAAa;CAE9C,MAAM,qBAAqB,QAAQ,cAAc,IAAI,EAAE,UAAU,eAAe;CAChF,MAAM,gBAAgB,QAAQ,SAAS,IAAI,EAAE,UAAU;AAEvD,QACC,oBAAC;EAAc,GAAI;YAClB,oBAAC;GAAS,GAAI;GAAgB;IAAoB;GACnC"}
@@ -1,38 +0,0 @@
1
- import { __export } from "./chunk-CTAAG5j7.js";
2
- import { getRegularChildren, getSingleSlot } from "@zayne-labs/toolkit-react/utils";
3
- import { isFunction } from "@zayne-labs/toolkit-type-helpers";
4
- import "react";
5
-
6
- //#region src/components/common/switch/switch.tsx
7
- const defaultValueSymbol = Symbol("default-value");
8
- function SwitchRoot(props) {
9
- const { children, value = defaultValueSymbol } = props;
10
- const defaultCase = getSingleSlot(children, SwitchDefault, {
11
- errorMessage: "Only one <Switch.Default> component is allowed",
12
- throwOnMultipleSlotMatch: true
13
- });
14
- return getRegularChildren(children, SwitchDefault).find((child) => {
15
- if (value === defaultValueSymbol) return Boolean(child.props.when);
16
- return child.props.when === value;
17
- }) ?? defaultCase;
18
- }
19
- function SwitchMatch(props) {
20
- const { children, when } = props;
21
- return isFunction(children) ? children(when) : children;
22
- }
23
- function SwitchDefault({ children }) {
24
- return children;
25
- }
26
- SwitchDefault.slotSymbol = Symbol("switch-default");
27
-
28
- //#endregion
29
- //#region src/components/common/switch/switch-parts.ts
30
- var switch_parts_exports = __export({
31
- Default: () => SwitchDefault,
32
- Match: () => SwitchMatch,
33
- Root: () => SwitchRoot
34
- });
35
-
36
- //#endregion
37
- export { SwitchDefault, SwitchMatch, SwitchRoot, switch_parts_exports };
38
- //# sourceMappingURL=switch-Ch22z21e.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"switch-Ch22z21e.js","names":[],"sources":["../../src/components/common/switch/switch.tsx","../../src/components/common/switch/switch-parts.ts"],"sourcesContent":["\"use client\";\n\nimport { getRegularChildren, getSingleSlot } from \"@zayne-labs/toolkit-react/utils\";\nimport { isFunction } from \"@zayne-labs/toolkit-type-helpers\";\nimport * as React from \"react\";\n\ntype ValidSwitchComponentType = React.ReactElement<SwitchMatchProps<unknown>>;\n\ntype SwitchProps = {\n\tchildren: ValidSwitchComponentType | ValidSwitchComponentType[];\n\tvalue?: unknown;\n};\n\nconst defaultValueSymbol = Symbol(\"default-value\");\n\nexport function SwitchRoot(props: SwitchProps) {\n\tconst { children, value = defaultValueSymbol } = props;\n\n\tconst defaultCase = getSingleSlot(children, SwitchDefault, {\n\t\terrorMessage: \"Only one <Switch.Default> component is allowed\",\n\t\tthrowOnMultipleSlotMatch: true,\n\t});\n\n\tconst childrenCasesArray = getRegularChildren(children, SwitchDefault) as ValidSwitchComponentType[];\n\n\tconst matchedCase = childrenCasesArray.find((child) => {\n\t\t// == If value is defaultValueSymbol, match the cases in order like switch(true)\n\t\tif (value === defaultValueSymbol) {\n\t\t\treturn Boolean(child.props.when);\n\t\t}\n\n\t\t// == Otherwise, match the cases like switch(value)\n\t\treturn child.props.when === value;\n\t});\n\n\treturn matchedCase ?? defaultCase;\n}\n\ntype SwitchMatchProps<TWhen> = {\n\tchildren: React.ReactNode | ((value: TWhen) => React.ReactNode);\n\twhen: false | TWhen | null | undefined;\n};\n\nexport function SwitchMatch<TWhen>(props: SwitchMatchProps<TWhen>) {\n\tconst { children, when } = props;\n\n\tconst resolvedChildren = isFunction(children) ? children(when as TWhen) : children;\n\n\treturn resolvedChildren;\n}\n\nexport function SwitchDefault({ children }: { children: React.ReactNode }) {\n\treturn children;\n}\nSwitchDefault.slotSymbol = Symbol(\"switch-default\");\n","export { SwitchDefault as Default, SwitchMatch as Match, SwitchRoot as Root } from \"./switch\";\n"],"mappings":";;;;;;AAaA,MAAM,qBAAqB,OAAO,gBAAgB;AAElD,SAAgB,WAAW,OAAoB;CAC9C,MAAM,EAAE,UAAU,QAAQ,uBAAuB;CAEjD,MAAM,cAAc,cAAc,UAAU,eAAe;EAC1D,cAAc;EACd,0BAA0B;EAC1B,CAAC;AAcF,QAZ2B,mBAAmB,UAAU,cAAc,CAE/B,MAAM,UAAU;AAEtD,MAAI,UAAU,mBACb,QAAO,QAAQ,MAAM,MAAM,KAAK;AAIjC,SAAO,MAAM,MAAM,SAAS;GAC3B,IAEoB;;AAQvB,SAAgB,YAAmB,OAAgC;CAClE,MAAM,EAAE,UAAU,SAAS;AAI3B,QAFyB,WAAW,SAAS,GAAG,SAAS,KAAc,GAAG;;AAK3E,SAAgB,cAAc,EAAE,YAA2C;AAC1E,QAAO;;AAER,cAAc,aAAa,OAAO,iBAAiB"}
@@ -1,32 +0,0 @@
1
- import { isString } from "@zayne-labs/toolkit-type-helpers";
2
- import { useEffect, useState } from "react";
3
- import { createPortal } from "react-dom";
4
-
5
- //#region src/components/common/teleport/teleport.tsx
6
- function Teleport(props) {
7
- const { children, insertPosition, to } = props;
8
- const [portalContainer, setPortalContainer] = useState(null);
9
- useEffect(() => {
10
- if (!to) return;
11
- if (insertPosition) return;
12
- const destination = isString(to) ? document.querySelector(to) : to;
13
- destination && setPortalContainer(destination);
14
- }, [to, insertPosition]);
15
- useEffect(() => {
16
- if (!to) return;
17
- if (!insertPosition) return;
18
- const destination = isString(to) ? document.querySelector(to) : to;
19
- const tempWrapper = document.createElement("div");
20
- tempWrapper.style.display = "contents";
21
- destination?.insertAdjacentElement(insertPosition, tempWrapper);
22
- setPortalContainer(tempWrapper);
23
- return () => {
24
- tempWrapper.remove();
25
- };
26
- }, [to, insertPosition]);
27
- return portalContainer && createPortal(children, portalContainer);
28
- }
29
-
30
- //#endregion
31
- export { Teleport };
32
- //# sourceMappingURL=teleport-C8TzRm4M.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"teleport-C8TzRm4M.js","names":[],"sources":["../../src/components/common/teleport/teleport.tsx"],"sourcesContent":["\"use client\";\n\nimport { type AnyString, isString } from \"@zayne-labs/toolkit-type-helpers\";\nimport * as React from \"react\";\nimport { useEffect, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\n\ntype ValidHtmlTags = keyof HTMLElementTagNameMap;\n\ntype PortalProps = {\n\tchildren: React.ReactNode;\n\tinsertPosition?: InsertPosition;\n\tto: AnyString | HTMLElement | ValidHtmlTags | null;\n};\n\nfunction Teleport(props: PortalProps) {\n\tconst { children, insertPosition, to } = props;\n\n\tconst [portalContainer, setPortalContainer] = useState<HTMLElement | null>(null);\n\n\t/* eslint-disable react-hooks-extra/no-direct-set-state-in-use-effect -- Allow */\n\n\tuseEffect(() => {\n\t\tif (!to) return;\n\n\t\tif (insertPosition) return;\n\n\t\tconst destination = isString(to) ? document.querySelector<HTMLElement>(to) : to;\n\n\t\tdestination && setPortalContainer(destination);\n\t}, [to, insertPosition]);\n\n\tuseEffect(() => {\n\t\tif (!to) return;\n\n\t\tif (!insertPosition) return;\n\n\t\tconst destination = isString(to) ? document.querySelector<HTMLElement>(to) : to;\n\n\t\tconst tempWrapper = document.createElement(\"div\");\n\t\ttempWrapper.style.display = \"contents\";\n\n\t\tdestination?.insertAdjacentElement(insertPosition, tempWrapper);\n\n\t\tsetPortalContainer(tempWrapper);\n\n\t\treturn () => {\n\t\t\ttempWrapper.remove();\n\t\t};\n\t}, [to, insertPosition]);\n\n\t/* eslint-enable react-hooks-extra/no-direct-set-state-in-use-effect -- Allow */\n\n\treturn portalContainer && createPortal(children, portalContainer);\n}\n\nexport { Teleport };\n"],"mappings":";;;;;AAeA,SAAS,SAAS,OAAoB;CACrC,MAAM,EAAE,UAAU,gBAAgB,OAAO;CAEzC,MAAM,CAAC,iBAAiB,sBAAsB,SAA6B,KAAK;AAIhF,iBAAgB;AACf,MAAI,CAAC,GAAI;AAET,MAAI,eAAgB;EAEpB,MAAM,cAAc,SAAS,GAAG,GAAG,SAAS,cAA2B,GAAG,GAAG;AAE7E,iBAAe,mBAAmB,YAAY;IAC5C,CAAC,IAAI,eAAe,CAAC;AAExB,iBAAgB;AACf,MAAI,CAAC,GAAI;AAET,MAAI,CAAC,eAAgB;EAErB,MAAM,cAAc,SAAS,GAAG,GAAG,SAAS,cAA2B,GAAG,GAAG;EAE7E,MAAM,cAAc,SAAS,cAAc,MAAM;AACjD,cAAY,MAAM,UAAU;AAE5B,eAAa,sBAAsB,gBAAgB,YAAY;AAE/D,qBAAmB,YAAY;AAE/B,eAAa;AACZ,eAAY,QAAQ;;IAEnB,CAAC,IAAI,eAAe,CAAC;AAIxB,QAAO,mBAAmB,aAAa,UAAU,gBAAgB"}
@@ -1,6 +0,0 @@
1
- import { card_parts_d_exports } from "../index-SX3cnKP6.js";
2
- import { carousel_parts_d_exports } from "../index-DZxgPnK1.js";
3
- import { useDragScroll } from "../index-C1GPFYKG.js";
4
- import { drop_zone_parts_d_exports, useDropZone } from "../index-BoZe50e8.js";
5
- import { form_parts_d_exports } from "../index-DbiE_few.js";
6
- export { card_parts_d_exports as Card, carousel_parts_d_exports as Carousel, drop_zone_parts_d_exports as DropZone, form_parts_d_exports as Form, useDragScroll, useDropZone };
@@ -1,18 +0,0 @@
1
- import "../error-boundary-y9Samt_s.js";
2
- import "../slot-WVWfOlr3.js";
3
- import "../await-DDgVzpvI.js";
4
- import "../for-DK5rEY_m.js";
5
- import "../show-N1ZXBhoA.js";
6
- import "../suspense-with-boundary-D-1NYDV4.js";
7
- import "../switch-Ch22z21e.js";
8
- import "../teleport-C8TzRm4M.js";
9
- import "../common-PS3X58Pj.js";
10
- import "../cn-s-D7vHW1.js";
11
- import { card_parts_exports } from "../card-DDLJVCwL.js";
12
- import { carousel_parts_exports } from "../carousel-B051PAAX.js";
13
- import { useDragScroll } from "../drag-scroll-Bb1SG4On.js";
14
- import "../presence-CL5_GHQH.js";
15
- import { drop_zone_parts_exports, useDropZone } from "../drop-zone-C9VpKJAD.js";
16
- import { form_parts_exports } from "../form-DyGy9LnA.js";
17
-
18
- export { card_parts_exports as Card, carousel_parts_exports as Carousel, drop_zone_parts_exports as DropZone, form_parts_exports as Form, useDragScroll, useDropZone };