@zayne-labs/ui-react 0.10.41 → 0.10.43
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/esm/client-gate-Cw8xLDk7.js +31 -0
- package/dist/esm/client-gate-Cw8xLDk7.js.map +1 -0
- package/dist/esm/{cn-Ba8kxuby.js → cn-CRgXviN7.js} +1 -1
- package/dist/esm/{cn-Ba8kxuby.js.map → cn-CRgXviN7.js.map} +1 -1
- package/dist/esm/common/await/index.d.ts +6 -6
- package/dist/esm/common/await/index.js +3 -3
- package/dist/esm/common/client-gate/index.d.ts +2 -2
- package/dist/esm/common/client-gate/index.js +2 -30
- package/dist/esm/common/error-boundary/index.d.ts +1 -1
- package/dist/esm/common/error-boundary/index.js +1 -1
- package/dist/esm/common/for/index.d.ts +4 -4
- package/dist/esm/common/presence/index.d.ts +2 -2
- package/dist/esm/common/presence/index.js +1 -1
- package/dist/esm/common/show/index.d.ts +4 -4
- package/dist/esm/common/show/index.js +1 -1
- package/dist/esm/common/slot/index.d.ts +4 -4
- package/dist/esm/common/slot/index.js +1 -1
- package/dist/esm/common/suspense-with-boundary/index.d.ts +2 -2
- package/dist/esm/common/suspense-with-boundary/index.js +1 -1
- package/dist/esm/common/switch/index.d.ts +4 -4
- package/dist/esm/common/teleport/index.d.ts +2 -2
- package/dist/esm/common/teleport/index.js +3 -1
- package/dist/esm/common/teleport/index.js.map +1 -1
- package/dist/esm/{error-boundary-TM4xzQfq.js → error-boundary-d5gAkevd.js} +2 -2
- package/dist/esm/{error-boundary-TM4xzQfq.js.map → error-boundary-d5gAkevd.js.map} +1 -1
- package/dist/esm/{index-ClrHf6FU.d.ts → index-B18eyjt6.d.ts} +6 -6
- package/dist/esm/{index-U3_Q7EUG.d.ts → index-TuD6cvBZ.d.ts} +4 -4
- package/dist/esm/{presence-5mRo32XH.js → presence-C2HmLiVc.js} +3 -3
- package/dist/esm/{presence-5mRo32XH.js.map → presence-C2HmLiVc.js.map} +1 -1
- package/dist/esm/{show-C99TZhow.js → show-Ch_s-Sr-.js} +1 -1
- package/dist/esm/{show-C99TZhow.js.map → show-Ch_s-Sr-.js.map} +1 -1
- package/dist/esm/{slot-CURylbjq.js → slot-DL8c8KCQ.js} +1 -1
- package/dist/esm/{slot-CURylbjq.js.map → slot-DL8c8KCQ.js.map} +1 -1
- package/dist/esm/ui/card/index.d.ts +8 -8
- package/dist/esm/ui/card/index.js +2 -2
- package/dist/esm/ui/carousel/index.d.ts +9 -9
- package/dist/esm/ui/carousel/index.js +3 -3
- package/dist/esm/ui/drag-scroll/index.js +2 -2
- package/dist/esm/ui/drop-zone/index.d.ts +17 -17
- package/dist/esm/ui/drop-zone/index.js +4 -4
- package/dist/esm/ui/form/index.d.ts +23 -25
- package/dist/esm/ui/form/index.js +3 -3
- package/dist/esm/ui/form/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/common/client-gate/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot-
|
|
1
|
+
{"version":3,"file":"slot-DL8c8KCQ.js","names":["ReactFragment"],"sources":["../../src/components/common/slot/slot.tsx","../../src/components/common/slot/slot-parts.ts"],"sourcesContent":["import { composeRefs, type InferProps, mergeProps } from \"@zayne-labs/toolkit-react/utils\";\nimport { isArray, type UnknownObject } from \"@zayne-labs/toolkit-type-helpers\";\n\nimport { Children, cloneElement, isValidElement, Fragment as ReactFragment } from \"react\";\n\ntype SlotProps = InferProps<HTMLElement> & { ref?: React.Ref<HTMLElement> };\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * ----------------------------------------------------------------------------------------------- */\n\nexport function SlotRoot(props: SlotProps) {\n\tconst { children, ...restOfSlotProps } = props;\n\n\tconst childrenArray = isArray<React.ReactNode>(children) ? children : [children];\n\n\tconst slottable = childrenArray.find((element) => isSlottable(element));\n\n\tif (!slottable) {\n\t\treturn <SlotClone {...restOfSlotProps}>{children}</SlotClone>;\n\t}\n\n\tif (!isValidElement<SlotProps>(slottable)) {\n\t\treturn null;\n\t}\n\n\t// == The new element to render is the one passed as a child of `Slot.Slottable`\n\tconst newElement = slottable.props.children;\n\n\tif (Children.count(newElement) > 1) {\n\t\treturn Children.only(null);\n\t}\n\n\tconst resolvedNewElement = isArray(newElement) ? newElement[0] : newElement;\n\n\tif (!isValidElement(resolvedNewElement)) {\n\t\treturn null;\n\t}\n\n\tconst newChildren = childrenArray.map((child) => {\n\t\tif (child === slottable) {\n\t\t\t// == Because the new element will be the one rendered, we are only interested in grabbing its children (`newElement.props.children`)\n\t\t\treturn (resolvedNewElement.props as SlotProps).children;\n\t\t}\n\n\t\treturn child;\n\t});\n\n\treturn (\n\t\t<SlotClone {...restOfSlotProps}>\n\t\t\t{cloneElement(resolvedNewElement, undefined, newChildren)}\n\t\t</SlotClone>\n\t);\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * ----------------------------------------------------------------------------------------------- */\n\nexport function SlotSlottable({ children }: Pick<SlotProps, \"children\">) {\n\treturn children;\n}\n\nconst isSlottable = (child: React.ReactNode): child is React.ReactElement => {\n\treturn isValidElement(child) && child.type === SlotSlottable;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * ----------------------------------------------------------------------------------------------- */\ntype SlotCloneProps = Pick<SlotProps, \"children\" | \"ref\">;\n\nfunction SlotClone(props: SlotCloneProps) {\n\tconst { children, ref: forwardedRef, ...restOfSlotProps } = props;\n\n\tif (Children.count(children) > 1) {\n\t\treturn Children.only(null);\n\t}\n\n\tconst resolvedChild = isArray(children) ? children[0] : children;\n\n\tif (!isValidElement<UnknownObject>(resolvedChild)) {\n\t\treturn null;\n\t}\n\n\tconst childRef = (resolvedChild.props.ref\n\t\t?? (resolvedChild as unknown as UnknownObject).ref) as React.Ref<HTMLElement>;\n\n\tconst ref = composeRefs(forwardedRef, childRef);\n\n\tconst clonedProps = {\n\t\t...mergeProps(restOfSlotProps, resolvedChild.props),\n\t\t...(resolvedChild.type !== ReactFragment && { ref }),\n\t};\n\n\treturn cloneElement(resolvedChild, clonedProps);\n}\n","export { SlotRoot as Root, SlotSlottable as Slottable } from \"./slot\";\n"],"mappings":";;;;;;;AAWA,SAAgB,SAAS,OAAkB;CAC1C,MAAM,EAAE,UAAU,GAAG,oBAAoB;CAEzC,MAAM,gBAAgB,QAAyB,SAAS,GAAG,WAAW,CAAC,SAAS;CAEhF,MAAM,YAAY,cAAc,MAAM,YAAY,YAAY,QAAQ,CAAC;AAEvE,KAAI,CAAC,UACJ,QAAO,oBAAC;EAAU,GAAI;EAAkB;GAAqB;AAG9D,KAAI,CAAC,eAA0B,UAAU,CACxC,QAAO;CAIR,MAAM,aAAa,UAAU,MAAM;AAEnC,KAAI,SAAS,MAAM,WAAW,GAAG,EAChC,QAAO,SAAS,KAAK,KAAK;CAG3B,MAAM,qBAAqB,QAAQ,WAAW,GAAG,WAAW,KAAK;AAEjE,KAAI,CAAC,eAAe,mBAAmB,CACtC,QAAO;CAGR,MAAM,cAAc,cAAc,KAAK,UAAU;AAChD,MAAI,UAAU,UAEb,QAAQ,mBAAmB,MAAoB;AAGhD,SAAO;GACN;AAEF,QACC,oBAAC;EAAU,GAAI;YACb,aAAa,oBAAoB,QAAW,YAAY;GAC9C;;AAQd,SAAgB,cAAc,EAAE,YAAyC;AACxE,QAAO;;AAGR,MAAM,eAAe,UAAwD;AAC5E,QAAO,eAAe,MAAM,IAAI,MAAM,SAAS;;AAQhD,SAAS,UAAU,OAAuB;CACzC,MAAM,EAAE,UAAU,KAAK,cAAc,GAAG,oBAAoB;AAE5D,KAAI,SAAS,MAAM,SAAS,GAAG,EAC9B,QAAO,SAAS,KAAK,KAAK;CAG3B,MAAM,gBAAgB,QAAQ,SAAS,GAAG,SAAS,KAAK;AAExD,KAAI,CAAC,eAA8B,cAAc,CAChD,QAAO;CAMR,MAAM,MAAM,YAAY,cAHN,cAAc,MAAM,OACjC,cAA2C,IAED;AAO/C,QAAO,aAAa,eALA;EACnB,GAAG,WAAW,iBAAiB,cAAc,MAAM;EACnD,GAAI,cAAc,SAASA,YAAiB,EAAE,KAAK;EACnD,CAE8C"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { PolymorphicProps } from "@zayne-labs/toolkit-react/utils";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ui/card/card.d.ts
|
|
5
|
-
declare function CardRoot<TElement extends React.ElementType = "article">(props: PolymorphicProps<TElement>):
|
|
6
|
-
declare function CardHeader<TElement extends React.ElementType = "header">(props: PolymorphicProps<TElement>):
|
|
7
|
-
declare function CardTitle<TElement extends React.ElementType = "h3">(props: PolymorphicProps<TElement>):
|
|
8
|
-
declare function CardDescription<TElement extends React.ElementType = "p">(props: PolymorphicProps<TElement>):
|
|
9
|
-
declare function CardContent<TElement extends React.ElementType = "div">(props: PolymorphicProps<TElement>):
|
|
10
|
-
declare function CardAction<TElement extends React.ElementType = "div">(props: PolymorphicProps<TElement>):
|
|
5
|
+
declare function CardRoot<TElement extends React.ElementType = "article">(props: PolymorphicProps<TElement>): react_jsx_runtime9.JSX.Element;
|
|
6
|
+
declare function CardHeader<TElement extends React.ElementType = "header">(props: PolymorphicProps<TElement>): react_jsx_runtime9.JSX.Element;
|
|
7
|
+
declare function CardTitle<TElement extends React.ElementType = "h3">(props: PolymorphicProps<TElement>): react_jsx_runtime9.JSX.Element;
|
|
8
|
+
declare function CardDescription<TElement extends React.ElementType = "p">(props: PolymorphicProps<TElement>): react_jsx_runtime9.JSX.Element;
|
|
9
|
+
declare function CardContent<TElement extends React.ElementType = "div">(props: PolymorphicProps<TElement>): react_jsx_runtime9.JSX.Element;
|
|
10
|
+
declare function CardAction<TElement extends React.ElementType = "div">(props: PolymorphicProps<TElement>): react_jsx_runtime9.JSX.Element;
|
|
11
11
|
declare function CardFooter<TElement extends React.ElementType = "footer">(props: PolymorphicProps<TElement, {
|
|
12
12
|
asChild?: boolean;
|
|
13
|
-
}>):
|
|
13
|
+
}>): react_jsx_runtime9.JSX.Element;
|
|
14
14
|
declare namespace card_parts_d_exports {
|
|
15
15
|
export { CardAction as Action, CardContent as Content, CardDescription as Description, CardFooter as Footer, CardHeader as Header, CardRoot as Root, CardTitle as Title };
|
|
16
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __export } from "../../chunk-BL-4obUL.js";
|
|
2
|
-
import { n as SlotRoot } from "../../slot-
|
|
3
|
-
import { t as cnMerge } from "../../cn-
|
|
2
|
+
import { n as SlotRoot } from "../../slot-DL8c8KCQ.js";
|
|
3
|
+
import { t as cnMerge } from "../../cn-CRgXviN7.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/ui/card/card.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
|
|
2
2
|
import { UnionDiscriminator } from "@zayne-labs/toolkit-type-helpers";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
import { StoreApi } from "@zayne-labs/toolkit-core";
|
|
5
5
|
|
|
6
6
|
//#region src/components/ui/carousel/types.d.ts
|
|
@@ -78,14 +78,14 @@ type OtherCarouselProps = {
|
|
|
78
78
|
};
|
|
79
79
|
//#endregion
|
|
80
80
|
//#region src/components/ui/carousel/carousel.d.ts
|
|
81
|
-
declare function CarouselRoot<TImages extends ImagesType, TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, CarouselRootProps<TImages>>):
|
|
82
|
-
declare function CarouselButton(props: CarouselButtonsProps):
|
|
83
|
-
declare function CarouselControls(props: CarouselControlProps):
|
|
84
|
-
declare function CarouselItemList<TArray extends unknown[]>(props: CarouselWrapperProps<TArray[number]>):
|
|
85
|
-
declare function CarouselItem(props: OtherCarouselProps):
|
|
86
|
-
declare function CarouselCaption<TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, OtherCarouselProps>):
|
|
87
|
-
declare function CarouselIndicatorList<TArray extends unknown[]>(props: CarouselWrapperProps<TArray[number]>):
|
|
88
|
-
declare function CarouselIndicator(props: CarouselIndicatorProps):
|
|
81
|
+
declare function CarouselRoot<TImages extends ImagesType, TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, CarouselRootProps<TImages>>): react_jsx_runtime0.JSX.Element;
|
|
82
|
+
declare function CarouselButton(props: CarouselButtonsProps): react_jsx_runtime0.JSX.Element;
|
|
83
|
+
declare function CarouselControls(props: CarouselControlProps): react_jsx_runtime0.JSX.Element;
|
|
84
|
+
declare function CarouselItemList<TArray extends unknown[]>(props: CarouselWrapperProps<TArray[number]>): react_jsx_runtime0.JSX.Element;
|
|
85
|
+
declare function CarouselItem(props: OtherCarouselProps): react_jsx_runtime0.JSX.Element;
|
|
86
|
+
declare function CarouselCaption<TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, OtherCarouselProps>): react_jsx_runtime0.JSX.Element;
|
|
87
|
+
declare function CarouselIndicatorList<TArray extends unknown[]>(props: CarouselWrapperProps<TArray[number]>): react_jsx_runtime0.JSX.Element;
|
|
88
|
+
declare function CarouselIndicator(props: CarouselIndicatorProps): react_jsx_runtime0.JSX.Element;
|
|
89
89
|
declare namespace carousel_parts_d_exports {
|
|
90
90
|
export { CarouselButton as Button, CarouselCaption as Caption, CarouselControls as Controls, CarouselIndicator as Indicator, CarouselIndicatorList as IndicatorList, CarouselItem as Item, CarouselItemList as ItemList, CarouselRoot as Root };
|
|
91
91
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { t as __export } from "../../chunk-BL-4obUL.js";
|
|
4
|
+
import { t as cnMerge } from "../../cn-CRgXviN7.js";
|
|
4
5
|
import { n as For } from "../../for-DsdwXl8s.js";
|
|
5
|
-
import { i as ShowRoot, n as ShowContent, r as ShowFallback } from "../../show-
|
|
6
|
-
import { t as cnMerge } from "../../cn-Ba8kxuby.js";
|
|
6
|
+
import { i as ShowRoot, n as ShowContent, r as ShowFallback } from "../../show-Ch_s-Sr-.js";
|
|
7
7
|
import { isFunction } from "@zayne-labs/toolkit-type-helpers";
|
|
8
8
|
import { useMemo, useState } from "react";
|
|
9
|
-
import { useAnimationInterval, useCallbackRef, useStore } from "@zayne-labs/toolkit-react";
|
|
10
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { createStore } from "@zayne-labs/toolkit-core";
|
|
11
|
+
import { useAnimationInterval, useCallbackRef, useStore } from "@zayne-labs/toolkit-react";
|
|
12
12
|
import { createReactStoreContext } from "@zayne-labs/toolkit-react/zustand";
|
|
13
13
|
|
|
14
14
|
//#region src/components/ui/carousel/carousel-store-context.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as cnMerge } from "../../cn-
|
|
1
|
+
import { t as cnMerge } from "../../cn-CRgXviN7.js";
|
|
2
2
|
import { composeRefs, mergeTwoProps } from "@zayne-labs/toolkit-react/utils";
|
|
3
3
|
import { useCallback, useMemo, useRef } from "react";
|
|
4
|
-
import { useCallbackRef, useLazyRef } from "@zayne-labs/toolkit-react";
|
|
5
4
|
import { checkIsDeviceMobile, on } from "@zayne-labs/toolkit-core";
|
|
5
|
+
import { useCallbackRef, useLazyRef } from "@zayne-labs/toolkit-react";
|
|
6
6
|
|
|
7
7
|
//#region src/components/ui/drag-scroll/utils.ts
|
|
8
8
|
const updateCursor = (element) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { InferProps, PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
|
|
2
2
|
import * as _zayne_labs_toolkit_type_helpers0 from "@zayne-labs/toolkit-type-helpers";
|
|
3
3
|
import { Awaitable, SelectorFn } from "@zayne-labs/toolkit-type-helpers";
|
|
4
|
-
import * as
|
|
5
|
-
import "
|
|
6
|
-
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
4
|
+
import * as react35 from "react";
|
|
5
|
+
import * as react_jsx_runtime38 from "react/jsx-runtime";
|
|
7
6
|
import * as _zayne_labs_toolkit_core1 from "@zayne-labs/toolkit-core";
|
|
8
7
|
import { FileMeta, FileOrFileMeta, FileValidationErrorContextEach, FileValidationHooksAsync, FileValidationSettingsAsync } from "@zayne-labs/toolkit-core";
|
|
8
|
+
import "@zayne-labs/toolkit-react";
|
|
9
9
|
|
|
10
10
|
//#region src/components/ui/drop-zone/drop-zone-store.d.ts
|
|
11
11
|
type RequiredUseDropZoneProps = { [Key in keyof Required<UseDropZoneProps>]: UseDropZoneProps[Key] | undefined };
|
|
@@ -223,7 +223,7 @@ interface UseDropZoneProps extends FileValidationSettingsAsync {
|
|
|
223
223
|
declare const DropZoneStoreContextProvider: (props: {
|
|
224
224
|
children: React.ReactNode;
|
|
225
225
|
store: _zayne_labs_toolkit_core1.StoreApi<DropZoneStore>;
|
|
226
|
-
}) =>
|
|
226
|
+
}) => react35.FunctionComponentElement<react35.ProviderProps<_zayne_labs_toolkit_core1.StoreApi<DropZoneStore>>>, useDropZoneStoreContext: <TResult = DropZoneStore>(selector?: _zayne_labs_toolkit_type_helpers0.SelectorFn<DropZoneStore, TResult> | undefined) => TResult;
|
|
227
227
|
type FileItemContextType = {
|
|
228
228
|
fileState: FileState;
|
|
229
229
|
};
|
|
@@ -232,29 +232,29 @@ type FileItemContextType = {
|
|
|
232
232
|
type DropZoneRootProps = UseDropZoneProps & {
|
|
233
233
|
children: React.ReactNode;
|
|
234
234
|
};
|
|
235
|
-
declare function DropZoneRoot(props: DropZoneRootProps):
|
|
235
|
+
declare function DropZoneRoot(props: DropZoneRootProps): react_jsx_runtime38.JSX.Element;
|
|
236
236
|
type DropZoneContextProps<TSlice> = {
|
|
237
237
|
children: React.ReactNode | ((context: TSlice) => React.ReactNode);
|
|
238
238
|
selector?: SelectorFn<DropZoneStore, TSlice>;
|
|
239
239
|
};
|
|
240
|
-
declare function DropZoneContext<TSlice = DropZoneStore>(props: DropZoneContextProps<TSlice>):
|
|
240
|
+
declare function DropZoneContext<TSlice = DropZoneStore>(props: DropZoneContextProps<TSlice>): react35.ReactNode;
|
|
241
241
|
type DropZoneContainerProps = PartInputProps["container"] & {
|
|
242
242
|
asChild?: boolean;
|
|
243
243
|
};
|
|
244
|
-
declare function DropZoneContainer<TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, DropZoneContainerProps>):
|
|
244
|
+
declare function DropZoneContainer<TElement extends React.ElementType = "div">(props: PolymorphicPropsStrict<TElement, DropZoneContainerProps>): react_jsx_runtime38.JSX.Element;
|
|
245
245
|
type DropZoneInputProps = PartInputProps["input"] & {
|
|
246
246
|
asChild?: boolean;
|
|
247
247
|
};
|
|
248
|
-
declare function DropZoneInput(props: DropZoneInputProps):
|
|
248
|
+
declare function DropZoneInput(props: DropZoneInputProps): react_jsx_runtime38.JSX.Element;
|
|
249
249
|
type DropZoneAreaProps<TSlice> = DropZoneContextProps<TSlice> & PartInputProps["container"] & {
|
|
250
250
|
classNames?: Partial<Record<Extract<keyof PartInputProps, "container" | "input">, string>>;
|
|
251
251
|
extraProps?: Partial<Pick<PartInputProps, "container" | "input">>;
|
|
252
252
|
};
|
|
253
|
-
declare function DropZoneArea<TSlice = DropZoneStore>(props: DropZoneAreaProps<TSlice>):
|
|
253
|
+
declare function DropZoneArea<TSlice = DropZoneStore>(props: DropZoneAreaProps<TSlice>): react_jsx_runtime38.JSX.Element;
|
|
254
254
|
type DropZoneTriggerProps = PartInputProps["trigger"] & {
|
|
255
255
|
asChild?: boolean;
|
|
256
256
|
};
|
|
257
|
-
declare function DropZoneTrigger(props: DropZoneTriggerProps):
|
|
257
|
+
declare function DropZoneTrigger(props: DropZoneTriggerProps): react_jsx_runtime38.JSX.Element;
|
|
258
258
|
type ListPerItemContext = Pick<DropZoneStore, "actions"> & {
|
|
259
259
|
array: DropZoneStore["fileStateArray"];
|
|
260
260
|
fileState: DropZoneStore["fileStateArray"][number];
|
|
@@ -273,21 +273,21 @@ type DropZoneFileListProps = Omit<PartInputProps["fileList"], "children"> & {
|
|
|
273
273
|
asChild?: boolean;
|
|
274
274
|
forceMount?: boolean;
|
|
275
275
|
} & (FileListManualListVariant | FileListPerItemVariant);
|
|
276
|
-
declare function DropZoneFileList<TElement extends React.ElementType = "ul">(props: PolymorphicPropsStrict<TElement, DropZoneFileListProps>):
|
|
276
|
+
declare function DropZoneFileList<TElement extends React.ElementType = "ul">(props: PolymorphicPropsStrict<TElement, DropZoneFileListProps>): react_jsx_runtime38.JSX.Element;
|
|
277
277
|
type DropZoneFileItemProps = FileItemContextType & PartInputProps["fileItem"] & {
|
|
278
278
|
asChild?: boolean;
|
|
279
279
|
};
|
|
280
|
-
declare function DropZoneFileItem<TElement extends React.ElementType = "li">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProps>):
|
|
280
|
+
declare function DropZoneFileItem<TElement extends React.ElementType = "li">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProps>): react_jsx_runtime38.JSX.Element;
|
|
281
281
|
type DropZoneFileItemDeleteProps = PartInputProps["fileItemDelete"] & {
|
|
282
282
|
asChild?: boolean;
|
|
283
283
|
};
|
|
284
|
-
declare function DropZoneFileItemDelete(props: DropZoneFileItemDeleteProps):
|
|
284
|
+
declare function DropZoneFileItemDelete(props: DropZoneFileItemDeleteProps): react_jsx_runtime38.JSX.Element;
|
|
285
285
|
type DropZoneFileItemProgressProps = PartInputProps["fileItemProgress"] & {
|
|
286
286
|
asChild?: boolean;
|
|
287
287
|
forceMount?: boolean;
|
|
288
288
|
size?: number;
|
|
289
289
|
};
|
|
290
|
-
declare function DropZoneFileItemProgress<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProgressProps>):
|
|
290
|
+
declare function DropZoneFileItemProgress<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, DropZoneFileItemProgressProps>): react_jsx_runtime38.JSX.Element | null;
|
|
291
291
|
type RenderPreviewDetails<TElement extends React.ElementType = "svg"> = {
|
|
292
292
|
node?: React.ReactNode;
|
|
293
293
|
} & {
|
|
@@ -316,7 +316,7 @@ type DropZoneFileItemPreviewProps = Omit<PartInputProps["fileItemPreview"], "chi
|
|
|
316
316
|
}) => React.ReactNode);
|
|
317
317
|
renderPreview?: boolean | RenderPreview;
|
|
318
318
|
};
|
|
319
|
-
declare function DropZoneFileItemPreview<TElement extends React.ElementType>(props: PolymorphicPropsStrict<TElement, DropZoneFileItemPreviewProps>):
|
|
319
|
+
declare function DropZoneFileItemPreview<TElement extends React.ElementType>(props: PolymorphicPropsStrict<TElement, DropZoneFileItemPreviewProps>): react_jsx_runtime38.JSX.Element | null;
|
|
320
320
|
type DropZoneFileItemMetadataProps = Omit<PartInputProps["fileItemMetadata"], "children"> & Partial<Pick<FileItemContextType, "fileState">> & {
|
|
321
321
|
asChild?: boolean;
|
|
322
322
|
children?: React.ReactNode | ((context: Pick<FileItemContextType, "fileState">) => React.ReactNode);
|
|
@@ -326,12 +326,12 @@ type DropZoneFileItemMetadataProps = Omit<PartInputProps["fileItemMetadata"], "c
|
|
|
326
326
|
};
|
|
327
327
|
size?: "default" | "sm";
|
|
328
328
|
};
|
|
329
|
-
declare function DropZoneFileItemMetadata(props: DropZoneFileItemMetadataProps):
|
|
329
|
+
declare function DropZoneFileItemMetadata(props: DropZoneFileItemMetadataProps): react_jsx_runtime38.JSX.Element | null;
|
|
330
330
|
type DropZoneFileClearProps = PartInputProps["fileItemClear"] & {
|
|
331
331
|
asChild?: boolean;
|
|
332
332
|
forceMount?: boolean;
|
|
333
333
|
};
|
|
334
|
-
declare function DropZoneFileClear(props: DropZoneFileClearProps):
|
|
334
|
+
declare function DropZoneFileClear(props: DropZoneFileClearProps): react_jsx_runtime38.JSX.Element | null;
|
|
335
335
|
declare namespace drop_zone_parts_d_exports {
|
|
336
336
|
export { DropZoneArea as Area, DropZoneContainer as Container, DropZoneContext as Context, DropZoneFileClear as FileClear, DropZoneFileItem as FileItem, DropZoneFileItemDelete as FileItemDelete, DropZoneFileItemMetadata as FileItemMetadata, DropZoneFileItemPreview as FileItemPreview, DropZoneFileItemProgress as FileItemProgress, DropZoneFileList as FileList, DropZoneInput as Input, DropZoneRoot as Root, DropZoneTrigger as Trigger };
|
|
337
337
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { t as __export } from "../../chunk-BL-4obUL.js";
|
|
4
|
-
import { n as SlotRoot } from "../../slot-
|
|
4
|
+
import { n as SlotRoot } from "../../slot-DL8c8KCQ.js";
|
|
5
|
+
import { t as cnMerge } from "../../cn-CRgXviN7.js";
|
|
5
6
|
import { n as For } from "../../for-DsdwXl8s.js";
|
|
6
|
-
import { t as Presence } from "../../presence-
|
|
7
|
-
import { t as cnMerge } from "../../cn-Ba8kxuby.js";
|
|
7
|
+
import { t as Presence } from "../../presence-C2HmLiVc.js";
|
|
8
8
|
import { composeRefs, composeTwoEventHandlers } from "@zayne-labs/toolkit-react/utils";
|
|
9
9
|
import { isBoolean, isFile, isFunction, isNumber, isObject, isString } from "@zayne-labs/toolkit-type-helpers";
|
|
10
10
|
import { useCallback, useMemo, useRef } from "react";
|
|
11
|
-
import { createCustomContext, useCallbackRef, useConstant, useShallowCompSelector, useShallowCompValue, useStore, useUnmountEffect } from "@zayne-labs/toolkit-react";
|
|
12
11
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
12
|
import { createFileURL, createStore, dataAttr, formatBytes, generateFileID, handleFileValidationAsync, toArray } from "@zayne-labs/toolkit-core";
|
|
13
|
+
import { createCustomContext, useCallbackRef, useConstant, useShallowCompSelector, useShallowCompValue, useStore, useUnmountEffect } from "@zayne-labs/toolkit-react";
|
|
14
14
|
import { createReactStoreContext } from "@zayne-labs/toolkit-react/zustand";
|
|
15
15
|
|
|
16
16
|
//#region src/components/ui/drop-zone/drop-zone-context.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DiscriminatedRenderItemProps, DiscriminatedRenderProps, InferProps, PolymorphicPropsStrict } from "@zayne-labs/toolkit-react/utils";
|
|
2
2
|
import { UnionDiscriminator } from "@zayne-labs/toolkit-type-helpers";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react6 from "react";
|
|
4
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
4
5
|
import "@zayne-labs/toolkit-react";
|
|
5
|
-
import * as react_jsx_runtime31 from "react/jsx-runtime";
|
|
6
6
|
import { Control, ControllerProps, FieldPath, FormStateSubscribeProps, RegisterOptions, UseFormReturn, UseFormStateReturn, WatchProps, useFormContext as useFormRootContext } from "react-hook-form";
|
|
7
7
|
|
|
8
8
|
//#region src/components/ui/form/form-context.d.ts
|
|
@@ -38,7 +38,7 @@ type FormRootProps<TFieldValues extends FieldValues, TTransformedValues> = Infer
|
|
|
38
38
|
children: React.ReactNode;
|
|
39
39
|
form: UseFormReturn<TFieldValues, unknown, TTransformedValues>;
|
|
40
40
|
};
|
|
41
|
-
declare function FormRoot<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormRootProps<TFieldValues, TTransformedValues>):
|
|
41
|
+
declare function FormRoot<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormRootProps<TFieldValues, TTransformedValues>): react_jsx_runtime16.JSX.Element;
|
|
42
42
|
type FormFieldProps<TControl, TFieldValues extends FieldValues, TTransformedValues> = (TControl extends (Control<infer TValues>) ? {
|
|
43
43
|
control?: never;
|
|
44
44
|
name: FieldPath<TValues>;
|
|
@@ -52,25 +52,23 @@ type FormFieldProps<TControl, TFieldValues extends FieldValues, TTransformedValu
|
|
|
52
52
|
className?: never;
|
|
53
53
|
withWrapper: false;
|
|
54
54
|
});
|
|
55
|
-
declare function FormField<TControl, TFieldValues extends FieldValues, TTransformedValues>(props: FormFieldProps<TControl, TFieldValues, TTransformedValues>):
|
|
56
|
-
type FormFieldControlledFieldProps<
|
|
57
|
-
|
|
58
|
-
} : ControllerProps<TFieldValues, TName, TTransformedValues>;
|
|
59
|
-
declare function FormFieldWithController<TControl, TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TTransformedValues = TFieldValues>(props: FormFieldControlledFieldProps<TControl, TFieldValues, TName, TTransformedValues>): react_jsx_runtime31.JSX.Element;
|
|
55
|
+
declare function FormField<TControl, TFieldValues extends FieldValues = FieldValues, TTransformedValues = TFieldValues>(props: FormFieldProps<TControl, TFieldValues, TTransformedValues>): react_jsx_runtime16.JSX.Element;
|
|
56
|
+
type FormFieldControlledFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TTransformedValues = TFieldValues> = ControllerProps<TFieldValues, TName, TTransformedValues>;
|
|
57
|
+
declare function FormFieldWithController<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TTransformedValues = TFieldValues>(props: FormFieldControlledFieldProps<TFieldValues, TName, TTransformedValues>): react_jsx_runtime16.JSX.Element;
|
|
60
58
|
type FormFieldBoundControllerProps<TFieldValues extends FieldValues, TTransformedValues> = Omit<ControllerProps<TFieldValues, never, TTransformedValues>, "control" | "name">;
|
|
61
|
-
declare function FormFieldBoundController<TFieldValues extends FieldValues = Record<string, never>, TTransformedValues = TFieldValues>(props: FormFieldBoundControllerProps<TFieldValues, TTransformedValues>):
|
|
62
|
-
declare function FormFieldContext(props: FormFieldContextProps):
|
|
63
|
-
declare function FormLabel(props: InferProps<"label">):
|
|
64
|
-
declare function FormInputGroup(props: InferProps<"div">):
|
|
59
|
+
declare function FormFieldBoundController<TFieldValues extends FieldValues = Record<string, never>, TTransformedValues = TFieldValues>(props: FormFieldBoundControllerProps<TFieldValues, TTransformedValues>): react_jsx_runtime16.JSX.Element;
|
|
60
|
+
declare function FormFieldContext(props: FormFieldContextProps): react6.ReactNode;
|
|
61
|
+
declare function FormLabel(props: InferProps<"label">): react_jsx_runtime16.JSX.Element;
|
|
62
|
+
declare function FormInputGroup(props: InferProps<"div">): react_jsx_runtime16.JSX.Element;
|
|
65
63
|
type FormSideItemProps = {
|
|
66
64
|
children?: React.ReactNode;
|
|
67
65
|
className?: string;
|
|
68
66
|
};
|
|
69
|
-
declare function FormInputLeftItem<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>):
|
|
67
|
+
declare function FormInputLeftItem<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>): react_jsx_runtime16.JSX.Element;
|
|
70
68
|
declare namespace FormInputLeftItem {
|
|
71
69
|
var slotSymbol: symbol;
|
|
72
70
|
}
|
|
73
|
-
declare function FormInputRightItem<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>):
|
|
71
|
+
declare function FormInputRightItem<TElement extends React.ElementType = "span">(props: PolymorphicPropsStrict<TElement, FormSideItemProps>): react_jsx_runtime16.JSX.Element;
|
|
74
72
|
declare namespace FormInputRightItem {
|
|
75
73
|
var slotSymbol: symbol;
|
|
76
74
|
}
|
|
@@ -106,13 +104,13 @@ type FormSelectPrimitiveProps<TFieldValues extends FieldValues> = React.Componen
|
|
|
106
104
|
};
|
|
107
105
|
declare function FormInputPrimitive<TFieldValues extends FieldValues>(props: FormInputPrimitiveProps<TFieldValues> & {
|
|
108
106
|
rules?: RegisterOptions;
|
|
109
|
-
}):
|
|
107
|
+
}): react_jsx_runtime16.JSX.Element;
|
|
110
108
|
declare function FormTextAreaPrimitive<TFieldValues extends FieldValues>(props: FormTextAreaPrimitiveProps<TFieldValues> & {
|
|
111
109
|
rules?: RegisterOptions;
|
|
112
|
-
}):
|
|
110
|
+
}): react_jsx_runtime16.JSX.Element;
|
|
113
111
|
declare function FormSelectPrimitive<TFieldValues extends FieldValues>(props: FormSelectPrimitiveProps<TFieldValues> & {
|
|
114
112
|
rules?: RegisterOptions;
|
|
115
|
-
}):
|
|
113
|
+
}): react_jsx_runtime16.JSX.Element;
|
|
116
114
|
type PrimitivePropsToOmit = "control" | "formState" | "name";
|
|
117
115
|
type FormInputProps = Omit<FormInputPrimitiveProps<FieldValues>, PrimitivePropsToOmit> & {
|
|
118
116
|
rules?: RegisterOptions;
|
|
@@ -130,10 +128,10 @@ type CombinedFormInputProps = (FormSelectProps & {
|
|
|
130
128
|
}) | FormInputProps;
|
|
131
129
|
declare function FormInput(props: CombinedFormInputProps & {
|
|
132
130
|
rules?: RegisterOptions;
|
|
133
|
-
}):
|
|
134
|
-
declare function FormTextArea(props: FormTextAreaProps):
|
|
135
|
-
declare function FormSelect(props: FormSelectProps):
|
|
136
|
-
declare function FormDescription(props: InferProps<"p">):
|
|
131
|
+
}): react_jsx_runtime16.JSX.Element;
|
|
132
|
+
declare function FormTextArea(props: FormTextAreaProps): react_jsx_runtime16.JSX.Element;
|
|
133
|
+
declare function FormSelect(props: FormSelectProps): react_jsx_runtime16.JSX.Element;
|
|
134
|
+
declare function FormDescription(props: InferProps<"p">): react_jsx_runtime16.JSX.Element;
|
|
137
135
|
type ErrorMessageRenderProps = {
|
|
138
136
|
className: string;
|
|
139
137
|
"data-index": number;
|
|
@@ -192,15 +190,15 @@ type FormErrorMessageProps<TControl, TFieldValues extends FieldValues, TTransfor
|
|
|
192
190
|
errorField: string;
|
|
193
191
|
type: "root";
|
|
194
192
|
};
|
|
195
|
-
declare function FormErrorMessage<TControl, TFieldValues extends FieldValues = FieldValues, TTransformedValues = TFieldValues>(props: FormErrorMessageProps<TControl, TFieldValues, TTransformedValues>):
|
|
193
|
+
declare function FormErrorMessage<TControl, TFieldValues extends FieldValues = FieldValues, TTransformedValues = TFieldValues>(props: FormErrorMessageProps<TControl, TFieldValues, TTransformedValues>): react_jsx_runtime16.JSX.Element;
|
|
196
194
|
type FormSubmitProps = InferProps<"button"> & {
|
|
197
195
|
asChild?: boolean;
|
|
198
196
|
};
|
|
199
|
-
declare function FormSubmit<TElement extends React.ElementType = "button">(props: PolymorphicPropsStrict<TElement, FormSubmitProps>):
|
|
197
|
+
declare function FormSubmit<TElement extends React.ElementType = "button">(props: PolymorphicPropsStrict<TElement, FormSubmitProps>): react_jsx_runtime16.JSX.Element;
|
|
200
198
|
type FormWatchProps<TFieldValues extends FieldValues, TFieldName extends Array<FieldPath<TFieldValues>> | FieldPath<TFieldValues> | ReadonlyArray<FieldPath<TFieldValues>> | undefined, TTransformedValues, TComputeValue, TComputedProps extends Omit<WatchProps<TFieldName, TFieldValues, unknown, TTransformedValues, TComputeValue>, "names"> = Omit<WatchProps<TFieldName, TFieldValues, unknown, TTransformedValues, TComputeValue>, "names">> = DiscriminatedRenderProps<TComputedProps["render"]> & Omit<TComputedProps, "render">;
|
|
201
|
-
declare function FormWatch<TFieldValues extends FieldValues = FieldValues, const TFieldName extends Array<FieldPath<TFieldValues>> | FieldPath<TFieldValues> | ReadonlyArray<FieldPath<TFieldValues>> | undefined = undefined, TTransformedValues = TFieldValues, TComputeValue = undefined>(props: FormWatchProps<TFieldValues, TFieldName, TTransformedValues, TComputeValue>):
|
|
199
|
+
declare function FormWatch<TFieldValues extends FieldValues = FieldValues, const TFieldName extends Array<FieldPath<TFieldValues>> | FieldPath<TFieldValues> | ReadonlyArray<FieldPath<TFieldValues>> | undefined = undefined, TTransformedValues = TFieldValues, TComputeValue = undefined>(props: FormWatchProps<TFieldValues, TFieldName, TTransformedValues, TComputeValue>): react6.ReactNode;
|
|
202
200
|
type FormStateSubscribeProps$1<TFieldValues extends FieldValues, TTransformedValues, TComputedProps extends FormStateSubscribeProps<TFieldValues, TTransformedValues> = FormStateSubscribeProps<TFieldValues, TTransformedValues>> = DiscriminatedRenderProps<TComputedProps["render"]> & Omit<TComputedProps, "render">;
|
|
203
|
-
declare function FormStateSubscribe<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormStateSubscribeProps$1<TFieldValues, TTransformedValues>):
|
|
201
|
+
declare function FormStateSubscribe<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormStateSubscribeProps$1<TFieldValues, TTransformedValues>): react6.ReactNode;
|
|
204
202
|
declare namespace form_parts_d_exports {
|
|
205
203
|
export { FormDescription as Description, FormErrorMessage as ErrorMessage, FormErrorMessagePrimitive as ErrorMessagePrimitive, FormField as Field, FormFieldBoundController as FieldBoundController, FormFieldContext as FieldContext, FormFieldWithController as FieldWithController, FormInput as Input, FormInputGroup as InputGroup, FormInputLeftItem as InputLeftItem, FormInputPrimitive as InputPrimitive, FormInputRightItem as InputRightItem, FormLabel as Label, FormRoot as Root, FormSelect as Select, FormStateSubscribe as StateSubscribe, FormSubmit as Submit, FormTextArea as TextArea, FormTextAreaPrimitive as TextAreaPrimitive, FormWatch as Watch };
|
|
206
204
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { t as __export } from "../../chunk-BL-4obUL.js";
|
|
4
|
-
import { n as SlotRoot } from "../../slot-
|
|
4
|
+
import { n as SlotRoot } from "../../slot-DL8c8KCQ.js";
|
|
5
|
+
import { t as cnMerge } from "../../cn-CRgXviN7.js";
|
|
5
6
|
import { r as ForWithWrapper } from "../../for-DsdwXl8s.js";
|
|
6
|
-
import { t as cnMerge } from "../../cn-Ba8kxuby.js";
|
|
7
7
|
import { composeRefs, composeTwoEventHandlers, getMultipleSlots } from "@zayne-labs/toolkit-react/utils";
|
|
8
8
|
import { defineEnum, isObject } from "@zayne-labs/toolkit-type-helpers";
|
|
9
9
|
import { Fragment, createElement, useEffect, useId, useMemo, useRef } from "react";
|
|
10
|
-
import { ContextError, createCustomContext, useCallbackRef, useToggle } from "@zayne-labs/toolkit-react";
|
|
11
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
11
|
import { dataAttr, on, toArray } from "@zayne-labs/toolkit-core";
|
|
12
|
+
import { ContextError, createCustomContext, useCallbackRef, useToggle } from "@zayne-labs/toolkit-react";
|
|
13
13
|
import { Controller, FormProvider, useFormContext, useFormContext as useFormRootContext, useFormState, useWatch } from "react-hook-form";
|
|
14
14
|
|
|
15
15
|
//#region src/components/ui/form/icons.tsx
|