@zayne-labs/ui-react 0.1.5 → 0.2.1

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 (54) hide show
  1. package/dist/esm/chunk-CB2EZJYW.js +31 -0
  2. package/dist/esm/chunk-CB2EZJYW.js.map +1 -0
  3. package/dist/esm/chunk-E3UC4AGS.js +119 -0
  4. package/dist/esm/chunk-E3UC4AGS.js.map +1 -0
  5. package/dist/esm/chunk-HKPJTORQ.js +3 -0
  6. package/dist/esm/chunk-HKPJTORQ.js.map +1 -0
  7. package/dist/esm/chunk-JKLRBPJZ.js +40 -0
  8. package/dist/esm/chunk-JKLRBPJZ.js.map +1 -0
  9. package/dist/esm/chunk-NCS3WKFW.js +50 -0
  10. package/dist/esm/chunk-NCS3WKFW.js.map +1 -0
  11. package/dist/esm/chunk-PKN52DWQ.js +363 -0
  12. package/dist/esm/chunk-PKN52DWQ.js.map +1 -0
  13. package/dist/esm/chunk-PNYEIX7F.js +3 -0
  14. package/dist/esm/chunk-PNYEIX7F.js.map +1 -0
  15. package/dist/esm/chunk-PW4AIAWC.js +125 -0
  16. package/dist/esm/chunk-PW4AIAWC.js.map +1 -0
  17. package/dist/esm/chunk-PXYYL2LL.js +45 -0
  18. package/dist/esm/chunk-PXYYL2LL.js.map +1 -0
  19. package/dist/esm/{chunk-MPOYLILK.js → chunk-RJQIINNX.js} +11 -7
  20. package/dist/esm/chunk-RJQIINNX.js.map +1 -0
  21. package/dist/esm/chunk-VMJ2L3VC.js +274 -0
  22. package/dist/esm/chunk-VMJ2L3VC.js.map +1 -0
  23. package/dist/esm/common/for/index.d.ts +20 -5
  24. package/dist/esm/common/for/index.js +1 -1
  25. package/dist/esm/common/index.d.ts +8 -0
  26. package/dist/esm/common/index.js +9 -0
  27. package/dist/esm/common/index.js.map +1 -0
  28. package/dist/esm/common/show/index.d.ts +10 -6
  29. package/dist/esm/common/show/index.js +2 -41
  30. package/dist/esm/common/show/index.js.map +1 -1
  31. package/dist/esm/common/switch/index.d.ts +10 -6
  32. package/dist/esm/common/switch/index.js +2 -31
  33. package/dist/esm/common/switch/index.js.map +1 -1
  34. package/dist/esm/common/teleport/index.js +1 -28
  35. package/dist/esm/common/teleport/index.js.map +1 -1
  36. package/dist/esm/index.d.ts +16 -2
  37. package/dist/esm/index.js +14 -1
  38. package/dist/esm/ui/card/index.js +4 -43
  39. package/dist/esm/ui/card/index.js.map +1 -1
  40. package/dist/esm/ui/carousel/index.d.ts +5 -3
  41. package/dist/esm/ui/carousel/index.js +4 -272
  42. package/dist/esm/ui/carousel/index.js.map +1 -1
  43. package/dist/esm/ui/drag-scroll/index.js +2 -117
  44. package/dist/esm/ui/drag-scroll/index.js.map +1 -1
  45. package/dist/esm/ui/drop-zone/index.js +2 -123
  46. package/dist/esm/ui/drop-zone/index.js.map +1 -1
  47. package/dist/esm/ui/form/index.js +4 -361
  48. package/dist/esm/ui/form/index.js.map +1 -1
  49. package/dist/esm/ui/index.d.ts +11 -0
  50. package/dist/esm/ui/index.js +12 -0
  51. package/dist/esm/ui/index.js.map +1 -0
  52. package/package.json +6 -14
  53. package/dist/esm/chunk-MPOYLILK.js.map +0 -1
  54. package/dist/esm/for-C3T5FbXd.d.ts +0 -15
@@ -1,363 +1,6 @@
1
- import { getElementList } from '../../chunk-MPOYLILK.js';
2
- import { cnMerge } from '../../chunk-OHG7GB7O.js';
3
- import { __export } from '../../chunk-PZ5AY32C.js';
4
- import * as React2 from 'react';
5
- import { useId, useMemo, useRef, useEffect, Fragment } from 'react';
6
- import { toArray } from '@zayne-labs/toolkit-core';
7
- import { createCustomContext, useToggle, ContextError } from '@zayne-labs/toolkit-react';
8
- import { getSlotElement, getOtherChildren } from '@zayne-labs/toolkit-react/utils';
9
- import { Controller, FormProvider, useFormState, useFormContext } from 'react-hook-form';
10
-
11
- var EyeIconInvisible = (props) => /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React2.createElement(
12
- "path",
13
- {
14
- fill: "currentColor",
15
- d: "M15.175 8.325q.725.725 1.063 1.65t.237 1.9q0 .375-.275.638t-.65.262t-.638-.262t-.262-.638q.125-.65-.075-1.25T13.95 9.6t-1.025-.65t-1.275-.1q-.375 0-.638-.275t-.262-.65t.263-.637t.637-.263q.95-.1 1.875.238t1.65 1.062M12 6q-.475 0-.925.037t-.9.138q-.425.075-.763-.125t-.462-.6t.088-.775t.612-.45q.575-.125 1.163-.175T12 4q3.425 0 6.263 1.8t4.337 4.85q.1.2.15.413t.05.437t-.038.438t-.137.412q-.45 1-1.112 1.875t-1.463 1.6q-.3.275-.7.225t-.65-.4t-.212-.763t.337-.687q.6-.575 1.1-1.25t.875-1.45q-1.25-2.525-3.613-4.012T12 6m0 13q-3.35 0-6.125-1.812T1.5 12.425q-.125-.2-.187-.437T1.25 11.5t.05-.475t.175-.45q.5-1 1.163-1.912T4.15 7L2.075 4.9q-.275-.3-.262-.712T2.1 3.5t.7-.275t.7.275l17 17q.275.275.288.688t-.288.712q-.275.275-.7.275t-.7-.275l-3.5-3.45q-.875.275-1.775.413T12 19M5.55 8.4q-.725.65-1.325 1.425T3.2 11.5q1.25 2.525 3.613 4.013T12 17q.5 0 .975-.062t.975-.138l-.9-.95q-.275.075-.525.113T12 16q-1.875 0-3.188-1.312T7.5 11.5q0-.275.038-.525t.112-.525zm4.2 4.2"
16
- }
17
- ));
18
- var EyeIconVisible = (props) => /* @__PURE__ */ React2.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React2.createElement(
19
- "path",
20
- {
21
- fill: "currentColor",
22
- d: "M12 16q1.875 0 3.188-1.312T16.5 11.5t-1.312-3.187T12 7T8.813 8.313T7.5 11.5t1.313 3.188T12 16m0-1.8q-1.125 0-1.912-.788T9.3 11.5t.788-1.912T12 8.8t1.913.788t.787 1.912t-.787 1.913T12 14.2m0 4.8q-3.35 0-6.113-1.8t-4.362-4.75q-.125-.225-.187-.462t-.063-.488t.063-.488t.187-.462q1.6-2.95 4.363-4.75T12 4t6.113 1.8t4.362 4.75q.125.225.188.463t.062.487t-.062.488t-.188.462q-1.6 2.95-4.362 4.75T12 19m0-2q2.825 0 5.188-1.487T20.8 11.5q-1.25-2.525-3.613-4.012T12 6T6.813 7.488T3.2 11.5q1.25 2.525 3.613 4.013T12 17"
23
- }
24
- ));
25
- var useFormFieldContext = () => {
26
- const formContext = useFormContext();
27
- if (!formContext) {
28
- throw new ContextError(
29
- `useFormFieldContext returned "null". Did you forget to wrap the necessary components within FormRoot?`
30
- );
31
- }
32
- return formContext;
33
- };
34
- var [StrictFormItemProvider, useStrictFormItemContext] = createCustomContext({
35
- hookName: "useFormItemContext",
36
- providerName: "FormItem"
37
- });
38
- var [LaxFormItemProvider, useLaxFormItemContext] = createCustomContext({
39
- hookName: "useLaxFormItemContext",
40
- providerName: "FormItem",
41
- strict: false
42
- });
43
-
44
- // src/components/ui/form/form.tsx
45
- function FormRoot(props) {
46
- const { children, className, methods, ...restOfProps } = props;
47
- return /* @__PURE__ */ React2.createElement(FormProvider, { ...methods }, /* @__PURE__ */ React2.createElement(
48
- "form",
49
- {
50
- className: cnMerge("flex flex-col", className),
51
- ...restOfProps,
52
- "data-scope": "form",
53
- "data-part": "root"
54
- },
55
- children
56
- ));
57
- }
58
- function FormItem(props) {
59
- const { children, className, name, withWrapper = true } = props;
60
- const uniqueId = useId();
61
- const value = useMemo(
62
- () => ({ name: String(name), uniqueId: `${String(name)}-(${uniqueId})` }),
63
- [name, uniqueId]
64
- );
65
- const WrapperElement = withWrapper ? "div" : Fragment;
66
- const wrapperElementProps = withWrapper && {
67
- className: cnMerge("flex flex-col", className),
68
- "data-part": "item",
69
- "data-scope": "form"
70
- };
71
- return /* @__PURE__ */ React2.createElement(StrictFormItemProvider, { value }, /* @__PURE__ */ React2.createElement(LaxFormItemProvider, { value }, /* @__PURE__ */ React2.createElement(WrapperElement, { ...wrapperElementProps }, children)));
72
- }
73
- function FormItemContext(props) {
74
- const { children, render } = props;
75
- const contextValues = useStrictFormItemContext();
76
- if (typeof children === "function") {
77
- return children(contextValues);
78
- }
79
- return render(contextValues);
80
- }
81
- function FormLabel(props) {
82
- const { uniqueId } = useStrictFormItemContext();
83
- const { children, className, ...restOfProps } = props;
84
- return /* @__PURE__ */ React2.createElement("label", { "data-scope": "form", "data-part": "label", htmlFor: uniqueId, className, ...restOfProps }, children);
85
- }
86
- function FormInputGroup(props) {
87
- const { children, className, ...restOfProps } = props;
88
- const LeftItemSlot = getSlotElement(children, FormInputLeftItem);
89
- const RightItemSlot = getSlotElement(children, FormInputRightItem);
90
- const otherChildren = getOtherChildren(children, [FormInputLeftItem, FormInputRightItem]);
91
- return /* @__PURE__ */ React2.createElement(
92
- "div",
93
- {
94
- "data-scope": "form",
95
- "data-part": "input-group",
96
- className: cnMerge("flex items-center justify-between gap-2", className),
97
- ...restOfProps
98
- },
99
- LeftItemSlot,
100
- otherChildren,
101
- RightItemSlot
102
- );
103
- }
104
- function FormInputLeftItem(props) {
105
- const { as: Element = "span", children, className, ...restOfProps } = props;
106
- return /* @__PURE__ */ React2.createElement(
107
- Element,
108
- {
109
- "data-scope": "form",
110
- "data-part": "left-item",
111
- className: cnMerge("inline-flex items-center justify-center", className),
112
- ...restOfProps
113
- },
114
- children
115
- );
116
- }
117
- FormInputLeftItem.slot = Symbol.for("leftItem");
118
- function FormInputRightItem(props) {
119
- const { as: Element = "span", children, className, ...restOfProps } = props;
120
- return /* @__PURE__ */ React2.createElement(
121
- Element,
122
- {
123
- "data-scope": "form",
124
- "data-part": "right-item",
125
- className: cnMerge("inline-flex items-center justify-center", className),
126
- ...restOfProps
127
- },
128
- children
129
- );
130
- }
131
- FormInputRightItem.slot = Symbol.for("rightItem");
132
- var inputTypesWithoutFullWith = /* @__PURE__ */ new Set(["checkbox", "radio"]);
133
- function FormInputPrimitive(props) {
134
- const contextValues = useLaxFormItemContext();
135
- const {
136
- className,
137
- classNames,
138
- control,
139
- formState,
140
- id = contextValues?.uniqueId,
141
- name = contextValues?.name,
142
- type = "text",
143
- withEyeIcon = true,
144
- ...restOfProps
145
- } = props;
146
- const getFormState = control ? useFormState : () => formState;
147
- const { errors } = getFormState({ control }) ?? {};
148
- const [isPasswordVisible, toggleVisibility] = useToggle(false);
149
- const shouldHaveEyeIcon = withEyeIcon && type === "password";
150
- const WrapperElement = shouldHaveEyeIcon ? FormInputGroup : Fragment;
151
- const wrapperElementProps = shouldHaveEyeIcon && {
152
- className: cnMerge("w-full", classNames?.inputGroup, name && errors?.[name] && classNames?.error)
153
- };
154
- return /* @__PURE__ */ React2.createElement(WrapperElement, { ...wrapperElementProps }, /* @__PURE__ */ React2.createElement(
155
- "input",
156
- {
157
- "data-scope": "form",
158
- "data-part": "input",
159
- id,
160
- name,
161
- type: type === "password" && isPasswordVisible ? "text" : type,
162
- className: cnMerge(
163
- !inputTypesWithoutFullWith.has(type) && "flex w-full",
164
- `bg-transparent text-sm file:border-0 file:bg-transparent
165
- placeholder:text-shadcn-muted-foreground focus-visible:outline-none
166
- disabled:cursor-not-allowed disabled:opacity-50`,
167
- className,
168
- classNames?.input,
169
- type !== "password" && name && errors?.[name] && classNames?.error
170
- ),
171
- ...restOfProps
172
- }
173
- ), shouldHaveEyeIcon && /* @__PURE__ */ React2.createElement(
174
- FormInputRightItem,
175
- {
176
- as: "button",
177
- type: "button",
178
- onClick: toggleVisibility,
179
- className: "size-5 shrink-0 lg:size-6"
180
- },
181
- isPasswordVisible ? /* @__PURE__ */ React2.createElement(EyeIconInvisible, { className: cnMerge("size-full", classNames?.eyeIcon) }) : /* @__PURE__ */ React2.createElement(EyeIconVisible, { className: cnMerge("size-full", classNames?.eyeIcon) })
182
- ));
183
- }
184
- function FormInput(props) {
185
- const { rules, ...restOfProps } = props;
186
- const { name } = useStrictFormItemContext();
187
- const { formState, register } = useFormFieldContext();
188
- return /* @__PURE__ */ React2.createElement(
189
- FormInputPrimitive,
190
- {
191
- name,
192
- formState,
193
- ...Boolean(name) && register(name, rules),
194
- ...restOfProps
195
- }
196
- );
197
- }
198
- function FormTextAreaPrimitive(props) {
199
- const contextValues = useLaxFormItemContext();
200
- const {
201
- className,
202
- control,
203
- errorClassName,
204
- formState,
205
- id = contextValues?.uniqueId,
206
- name = contextValues?.name,
207
- ...restOfProps
208
- } = props;
209
- const getFormState = control ? useFormState : () => formState;
210
- const { errors } = getFormState({ control }) ?? {};
211
- return /* @__PURE__ */ React2.createElement(
212
- "textarea",
213
- {
214
- "data-scope": "form",
215
- "data-part": "textarea",
216
- id,
217
- name,
218
- className: cnMerge(
219
- `w-full bg-transparent text-sm placeholder:text-shadcn-muted-foreground
220
- focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50`,
221
- className,
222
- name && errors?.[name] && errorClassName
223
- ),
224
- ...restOfProps
225
- }
226
- );
227
- }
228
- function FormTextArea(props) {
229
- const { rules, ...restOfProps } = props;
230
- const { name } = useStrictFormItemContext();
231
- const { formState, register } = useFormFieldContext();
232
- return /* @__PURE__ */ React2.createElement(
233
- FormTextAreaPrimitive,
234
- {
235
- name,
236
- formState,
237
- ...Boolean(name) && register(name, rules),
238
- ...restOfProps
239
- }
240
- );
241
- }
242
- function FormController(props) {
243
- const { control } = useFormFieldContext();
244
- const { name } = useStrictFormItemContext();
245
- return /* @__PURE__ */ React2.createElement(Controller, { name, control, ...props });
246
- }
247
- function FormDescription(props) {
248
- const { className, ...restOfProps } = props;
249
- return /* @__PURE__ */ React2.createElement("p", { className: cnMerge("text-[12px]", className), ...restOfProps });
250
- }
251
- var FormErrorMessagePrimitive = (props) => {
252
- const {
253
- className,
254
- classNames,
255
- control,
256
- errorField,
257
- render,
258
- type = "regular",
259
- withAnimationOnInvalid = true
260
- } = props;
261
- const formState = useFormState({ control });
262
- const wrapperRef = useRef(null);
263
- const errorAnimationClass = classNames?.errorMessageAnimation ?? "animate-shake";
264
- useEffect(() => {
265
- if (!withAnimationOnInvalid) return;
266
- const errorMessageElements = wrapperRef.current?.children;
267
- if (!errorMessageElements) return;
268
- for (const element of errorMessageElements) {
269
- element.classList.add(errorAnimationClass);
270
- }
271
- }, [errorAnimationClass, withAnimationOnInvalid]);
272
- useEffect(() => {
273
- const errorMessageElements = wrapperRef.current?.children;
274
- if (!errorMessageElements) return;
275
- if (Object.keys(formState.errors).indexOf(errorField) === 0) {
276
- errorMessageElements[0]?.scrollIntoView({
277
- behavior: "smooth",
278
- block: "center"
279
- });
280
- window.scrollBy({ behavior: "smooth", top: -100 });
281
- }
282
- }, [errorField, formState.errors]);
283
- const message = type === "root" ? formState.errors.root?.[errorField]?.message : formState.errors[errorField]?.message;
284
- if (!message) {
285
- return null;
286
- }
287
- const errorMessageArray = toArray(message);
288
- const [ErrorMessageList] = getElementList();
289
- const onAnimationEnd = withAnimationOnInvalid ? (event) => event.currentTarget.classList.remove(errorAnimationClass) : undefined;
290
- const getRenderProps = ({ index }) => ({
291
- className: cnMerge(errorAnimationClass, className, classNames?.errorMessage),
292
- "data-index": index,
293
- "data-part": "error-message",
294
- "data-scope": "form",
295
- onAnimationEnd
296
- });
297
- const getRenderState = ({ errorMessage, index }) => ({
298
- errorMessage,
299
- errorMessageArray,
300
- index
301
- });
302
- return /* @__PURE__ */ React2.createElement(
303
- ErrorMessageList,
304
- {
305
- ref: wrapperRef,
306
- each: errorMessageArray,
307
- className: cnMerge("flex flex-col", classNames?.container),
308
- render: (errorMessage, index) => {
309
- return render({
310
- props: getRenderProps({ index }),
311
- state: getRenderState({ errorMessage, index })
312
- });
313
- }
314
- }
315
- );
316
- };
317
- function FormErrorMessage(props) {
318
- const contextValues = useLaxFormItemContext();
319
- const { className, errorField = contextValues?.name, type = "regular" } = props;
320
- const { control } = useFormFieldContext();
321
- return /* @__PURE__ */ React2.createElement(
322
- FormErrorMessagePrimitive,
323
- {
324
- control,
325
- errorField,
326
- type,
327
- render: ({ props: renderProps, state: { errorMessage } }) => /* @__PURE__ */ React2.createElement(
328
- "p",
329
- {
330
- ...renderProps,
331
- key: errorMessage,
332
- className: cnMerge("text-[13px]", "data-[index=0]:mt-1", renderProps.className, className)
333
- },
334
- errorMessage
335
- )
336
- }
337
- );
338
- }
339
-
340
- // src/components/ui/form/form-parts.ts
341
- var form_parts_exports = {};
342
- __export(form_parts_exports, {
343
- Controller: () => FormController,
344
- ControllerPrimitive: () => Controller,
345
- Description: () => FormDescription,
346
- ErrorMessage: () => FormErrorMessage,
347
- ErrorMessagePrimitive: () => FormErrorMessagePrimitive,
348
- Input: () => FormInput,
349
- InputGroup: () => FormInputGroup,
350
- InputLeftItem: () => FormInputLeftItem,
351
- InputPrimitive: () => FormInputPrimitive,
352
- InputRightItem: () => FormInputRightItem,
353
- Item: () => FormItem,
354
- ItemContext: () => FormItemContext,
355
- Label: () => FormLabel,
356
- Root: () => FormRoot,
357
- TextArea: () => FormTextArea,
358
- TextAreaPrimitive: () => FormTextAreaPrimitive
359
- });
360
-
361
- export { form_parts_exports as Form, FormController, FormDescription, FormErrorMessage, FormErrorMessagePrimitive, FormInput, FormInputGroup, FormInputLeftItem, FormInputPrimitive, FormInputRightItem, FormItem, FormItemContext, FormLabel, FormRoot, FormTextArea, FormTextAreaPrimitive, useStrictFormItemContext as useFormItemContext };
1
+ export { form_parts_exports as Form, FormController, FormDescription, FormErrorMessage, FormErrorMessagePrimitive, FormInput, FormInputGroup, FormInputLeftItem, FormInputPrimitive, FormInputRightItem, FormItem, FormItemContext, FormLabel, FormRoot, FormTextArea, FormTextAreaPrimitive, useStrictFormItemContext as useFormItemContext } from '../../chunk-PKN52DWQ.js';
2
+ import '../../chunk-OHG7GB7O.js';
3
+ import '../../chunk-RJQIINNX.js';
4
+ import '../../chunk-PZ5AY32C.js';
362
5
  //# sourceMappingURL=index.js.map
363
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/icons/EyeIcon.tsx","../../../../src/components/ui/form/form-context.ts","../../../../src/components/ui/form/form.tsx","../../../../src/components/ui/form/form-parts.ts"],"names":["React","HookFormProvider","ReactFragment","ControllerPrimitive"],"mappings":";;;;;;;;;;AAEO,IAAM,gBAAmB,GAAA,CAAC,KAChC,qBAAAA,MAAA,CAAA,aAAA,CAAC,SAAI,KAAM,EAAA,4BAAA,EAA6B,KAAM,EAAA,KAAA,EAAM,MAAO,EAAA,KAAA,EAAM,OAAQ,EAAA,WAAA,EAAa,GAAG,KACxF,EAAA,kBAAAA,MAAA,CAAA,aAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACA,IAAK,EAAA,cAAA;AAAA,IACL,CAAE,EAAA;AAAA;AACH,CACD,CAAA;AAGM,IAAM,cAAiB,GAAA,CAAC,KAC9B,qBAAAA,MAAA,CAAA,aAAA,CAAC,SAAI,KAAM,EAAA,4BAAA,EAA6B,KAAM,EAAA,KAAA,EAAM,MAAO,EAAA,KAAA,EAAM,OAAQ,EAAA,WAAA,EAAa,GAAG,KACxF,EAAA,kBAAAA,MAAA,CAAA,aAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACA,IAAK,EAAA,cAAA;AAAA,IACL,CAAE,EAAA;AAAA;AACH,CACD,CAAA;ACdM,IAAM,sBAAsB,MAAM;AACxC,EAAA,MAAM,cAAc,cAAe,EAAA;AAEnC,EAAA,IAAI,CAAC,WAAa,EAAA;AACjB,IAAA,MAAM,IAAI,YAAA;AAAA,MACT,CAAA,qGAAA;AAAA,KACD;AAAA;AAGD,EAAO,OAAA,WAAA;AACR,CAAA;AAOO,IAAM,CAAC,sBAAA,EAAwB,wBAAwB,CAAA,GAAI,mBAAkC,CAAA;AAAA,EACnG,QAAU,EAAA,oBAAA;AAAA,EACV,YAAc,EAAA;AACf,CAAC;AAEM,IAAM,CAAC,mBAAA,EAAqB,qBAAqB,CAAA,GAAI,mBAAyC,CAAA;AAAA,EACpG,QAAU,EAAA,uBAAA;AAAA,EACV,YAAc,EAAA,UAAA;AAAA,EACd,M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KAAA,EAAA,MAAA,SAAA;AAAA,EAAA,UAAA,EAAA,MAAA,cAAA;AAAA,EAAA,aAAA,EAAA,MAAA,iBAAA;AAAA,EAAA,cAAA,EAAA,MAAA,kBAAA;AAAA,EAAA,cAAA,EAAA,MAAA,kBAAA;AAAA,EAAA,IAAA,EAAA,MAAA,QAAA;AAAA,EAAA,WAAA,EAAA,MAAA,eAAA;AAAA,EAAA,KAAA,EAAA,MAAA,SAAA;AAAA,EAAA,IAAA,EAAA,MAAA,QAAA;AAAA,EAAA,QAAA,EAAA,MAAA,YAAA;AAAA,EAAA,iBAAA,EAAA,MAAA;AAAA,CAAA,CAAA","file":"index.js","sourcesContent":["import * as React from \"react\";\n\nexport const EyeIconInvisible = (props: React.SVGProps<SVGSVGElement>) => (\n\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\" {...props}>\n\t\t<path\n\t\t\tfill=\"currentColor\"\n\t\t\td=\"M15.175 8.325q.725.725 1.063 1.65t.237 1.9q0 .375-.275.638t-.65.262t-.638-.262t-.262-.638q.125-.65-.075-1.25T13.95 9.6t-1.025-.65t-1.275-.1q-.375 0-.638-.275t-.262-.65t.263-.637t.637-.263q.95-.1 1.875.238t1.65 1.062M12 6q-.475 0-.925.037t-.9.138q-.425.075-.763-.125t-.462-.6t.088-.775t.612-.45q.575-.125 1.163-.175T12 4q3.425 0 6.263 1.8t4.337 4.85q.1.2.15.413t.05.437t-.038.438t-.137.412q-.45 1-1.112 1.875t-1.463 1.6q-.3.275-.7.225t-.65-.4t-.212-.763t.337-.687q.6-.575 1.1-1.25t.875-1.45q-1.25-2.525-3.613-4.012T12 6m0 13q-3.35 0-6.125-1.812T1.5 12.425q-.125-.2-.187-.437T1.25 11.5t.05-.475t.175-.45q.5-1 1.163-1.912T4.15 7L2.075 4.9q-.275-.3-.262-.712T2.1 3.5t.7-.275t.7.275l17 17q.275.275.288.688t-.288.712q-.275.275-.7.275t-.7-.275l-3.5-3.45q-.875.275-1.775.413T12 19M5.55 8.4q-.725.65-1.325 1.425T3.2 11.5q1.25 2.525 3.613 4.013T12 17q.5 0 .975-.062t.975-.138l-.9-.95q-.275.075-.525.113T12 16q-1.875 0-3.188-1.312T7.5 11.5q0-.275.038-.525t.112-.525zm4.2 4.2\"\n\t\t/>\n\t</svg>\n);\n\nexport const EyeIconVisible = (props: React.SVGProps<SVGSVGElement>) => (\n\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\" {...props}>\n\t\t<path\n\t\t\tfill=\"currentColor\"\n\t\t\td=\"M12 16q1.875 0 3.188-1.312T16.5 11.5t-1.312-3.187T12 7T8.813 8.313T7.5 11.5t1.313 3.188T12 16m0-1.8q-1.125 0-1.912-.788T9.3 11.5t.788-1.912T12 8.8t1.913.788t.787 1.912t-.787 1.913T12 14.2m0 4.8q-3.35 0-6.113-1.8t-4.362-4.75q-.125-.225-.187-.462t-.063-.488t.063-.488t.187-.462q1.6-2.95 4.363-4.75T12 4t6.113 1.8t4.362 4.75q.125.225.188.463t.062.487t-.062.488t-.188.462q-1.6 2.95-4.362 4.75T12 19m0-2q2.825 0 5.188-1.487T20.8 11.5q-1.25-2.525-3.613-4.012T12 6T6.813 7.488T3.2 11.5q1.25 2.525 3.613 4.013T12 17\"\n\t\t/>\n\t</svg>\n);\n","import { ContextError, createCustomContext } from \"@zayne-labs/toolkit-react\";\nimport { useFormContext } from \"react-hook-form\";\n\nexport const useFormFieldContext = () => {\n\tconst formContext = useFormContext() as ReturnType<typeof useFormContext> | null;\n\n\tif (!formContext) {\n\t\tthrow new ContextError(\n\t\t\t`useFormFieldContext returned \"null\". Did you forget to wrap the necessary components within FormRoot?`\n\t\t);\n\t}\n\n\treturn formContext;\n};\n\nexport type ContextValue = {\n\tname: string;\n\tuniqueId: string;\n};\n\nexport const [StrictFormItemProvider, useStrictFormItemContext] = createCustomContext<ContextValue>({\n\thookName: \"useFormItemContext\",\n\tproviderName: \"FormItem\",\n});\n\nexport const [LaxFormItemProvider, useLaxFormItemContext] = createCustomContext<ContextValue, false>({\n\thookName: \"useLaxFormItemContext\",\n\tproviderName: \"FormItem\",\n\tstrict: false,\n});\n","\"use client\";\n\nimport * as React from \"react\";\n\nimport { getElementList } from \"@/components/common/for\";\nimport { EyeIconInvisible, EyeIconVisible } from \"@/components/icons\";\nimport { cnMerge } from \"@/lib/utils/cn\";\nimport { toArray } from \"@zayne-labs/toolkit-core\";\nimport { useToggle } from \"@zayne-labs/toolkit-react\";\nimport {\n\ttype DiscriminatedRenderProps,\n\ttype InferProps,\n\ttype PolymorphicProps,\n\tgetOtherChildren,\n\tgetSlotElement,\n} from \"@zayne-labs/toolkit-react/utils\";\nimport { Fragment as ReactFragment, useEffect, useId, useMemo, useRef } from \"react\";\nimport {\n\ttype Control,\n\ttype ControllerFieldState,\n\tController as ControllerPrimitive,\n\ttype ControllerProps,\n\ttype ControllerRenderProps,\n\ttype FieldPath,\n\ttype FormState,\n\tFormProvider as HookFormProvider,\n\ttype RegisterOptions,\n\ttype UseFormReturn,\n\ttype UseFormStateReturn,\n\tuseFormState,\n} from \"react-hook-form\";\nimport {\n\ttype ContextValue,\n\tLaxFormItemProvider,\n\tStrictFormItemProvider,\n\tuseFormFieldContext,\n\tuseLaxFormItemContext,\n\tuseStrictFormItemContext,\n} from \"./form-context\";\n\ntype FieldValues = Record<string, unknown>;\n\ntype FormRootProps<TValues extends FieldValues> = React.ComponentPropsWithoutRef<\"form\"> & {\n\tchildren: React.ReactNode;\n\tmethods: UseFormReturn<TValues>;\n};\n\nexport function FormRoot<TValues extends FieldValues>(props: FormRootProps<TValues>) {\n\tconst { children, className, methods, ...restOfProps } = props;\n\n\treturn (\n\t\t<HookFormProvider {...methods}>\n\t\t\t<form\n\t\t\t\tclassName={cnMerge(\"flex flex-col\", className)}\n\t\t\t\t{...restOfProps}\n\t\t\t\tdata-scope=\"form\"\n\t\t\t\tdata-part=\"root\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</form>\n\t\t</HookFormProvider>\n\t);\n}\n\ntype FormItemProps<TControl, TFieldValues extends FieldValues> = (TControl extends Control<infer TValues>\n\t? {\n\t\t\tcontrol?: never;\n\t\t\tname: keyof TValues;\n\t\t}\n\t: {\n\t\t\tcontrol?: Control<TFieldValues>;\n\t\t\tname: keyof TFieldValues;\n\t\t}) & {\n\tchildren: React.ReactNode;\n\tclassName?: string;\n\twithWrapper?: boolean;\n};\n\nexport function FormItem<TControl, TFieldValues extends FieldValues = FieldValues>(\n\tprops: FormItemProps<TControl, TFieldValues>\n) {\n\tconst { children, className, name, withWrapper = true } = props;\n\n\tconst uniqueId = useId();\n\n\tconst value = useMemo(\n\t\t() => ({ name: String(name), uniqueId: `${String(name)}-(${uniqueId})` }),\n\t\t[name, uniqueId]\n\t);\n\n\tconst WrapperElement = withWrapper ? \"div\" : ReactFragment;\n\n\tconst wrapperElementProps = withWrapper && {\n\t\tclassName: cnMerge(\"flex flex-col\", className),\n\t\t\"data-part\": \"item\",\n\t\t\"data-scope\": \"form\",\n\t};\n\n\treturn (\n\t\t<StrictFormItemProvider value={value}>\n\t\t\t<LaxFormItemProvider value={value}>\n\t\t\t\t<WrapperElement {...wrapperElementProps}>{children}</WrapperElement>\n\t\t\t</LaxFormItemProvider>\n\t\t</StrictFormItemProvider>\n\t);\n}\n\ntype FormItemContextProps = DiscriminatedRenderProps<(contextValue: ContextValue) => React.ReactNode>;\n\nexport function FormItemContext(props: FormItemContextProps) {\n\tconst { children, render } = props;\n\tconst contextValues = useStrictFormItemContext();\n\n\tif (typeof children === \"function\") {\n\t\treturn children(contextValues);\n\t}\n\n\treturn render(contextValues);\n}\n\nexport function FormLabel(props: InferProps<\"label\">) {\n\tconst { uniqueId } = useStrictFormItemContext();\n\tconst { children, className, ...restOfProps } = props;\n\n\treturn (\n\t\t<label data-scope=\"form\" data-part=\"label\" htmlFor={uniqueId} className={className} {...restOfProps}>\n\t\t\t{children}\n\t\t</label>\n\t);\n}\n\nexport function FormInputGroup(props: React.ComponentPropsWithRef<\"div\">) {\n\tconst { children, className, ...restOfProps } = props;\n\tconst LeftItemSlot = getSlotElement(children, FormInputLeftItem);\n\tconst RightItemSlot = getSlotElement(children, FormInputRightItem);\n\n\tconst otherChildren = getOtherChildren(children, [FormInputLeftItem, FormInputRightItem]);\n\n\treturn (\n\t\t<div\n\t\t\tdata-scope=\"form\"\n\t\t\tdata-part=\"input-group\"\n\t\t\tclassName={cnMerge(\"flex items-center justify-between gap-2\", className)}\n\t\t\t{...restOfProps}\n\t\t>\n\t\t\t{LeftItemSlot}\n\t\t\t{otherChildren}\n\t\t\t{RightItemSlot}\n\t\t</div>\n\t);\n}\n\ntype FormSideItemProps = {\n\tchildren?: React.ReactNode;\n\tclassName?: string;\n};\n\nexport function FormInputLeftItem<TElement extends React.ElementType = \"span\">(\n\tprops: PolymorphicProps<TElement, FormSideItemProps>\n) {\n\tconst { as: Element = \"span\", children, className, ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"form\"\n\t\t\tdata-part=\"left-item\"\n\t\t\tclassName={cnMerge(\"inline-flex items-center justify-center\", className)}\n\t\t\t{...restOfProps}\n\t\t>\n\t\t\t{children}\n\t\t</Element>\n\t);\n}\nFormInputLeftItem.slot = Symbol.for(\"leftItem\");\n\nexport function FormInputRightItem<TElement extends React.ElementType = \"span\">(\n\tprops: PolymorphicProps<TElement, FormSideItemProps>\n) {\n\tconst { as: Element = \"span\", children, className, ...restOfProps } = props;\n\n\treturn (\n\t\t<Element\n\t\t\tdata-scope=\"form\"\n\t\t\tdata-part=\"right-item\"\n\t\t\tclassName={cnMerge(\"inline-flex items-center justify-center\", className)}\n\t\t\t{...restOfProps}\n\t\t>\n\t\t\t{children}\n\t\t</Element>\n\t);\n}\nFormInputRightItem.slot = Symbol.for(\"rightItem\");\n\ntype FormInputPrimitiveProps<TFieldValues extends FieldValues = FieldValues> = Omit<\n\tReact.ComponentPropsWithRef<\"input\">,\n\t\"children\"\n> & {\n\tclassNames?: { error?: string; eyeIcon?: string; input?: string; inputGroup?: string };\n\tname?: keyof TFieldValues;\n\twithEyeIcon?: boolean;\n} & (\n\t\t| { control: Control<TFieldValues>; formState?: never }\n\t\t| { control?: never; formState?: FormState<TFieldValues> }\n\t);\n\nconst inputTypesWithoutFullWith = new Set<React.HTMLInputTypeAttribute>([\"checkbox\", \"radio\"]);\n\nexport function FormInputPrimitive<TFieldValues extends FieldValues>(\n\tprops: FormInputPrimitiveProps<TFieldValues>\n) {\n\tconst contextValues = useLaxFormItemContext();\n\n\tconst {\n\t\tclassName,\n\t\tclassNames,\n\t\tcontrol,\n\t\tformState,\n\t\tid = contextValues?.uniqueId,\n\t\tname = contextValues?.name,\n\t\ttype = \"text\",\n\t\twithEyeIcon = true,\n\t\t...restOfProps\n\t} = props;\n\n\tconst getFormState = (control ? useFormState : () => formState) as typeof useFormState;\n\n\tconst { errors } = (getFormState({ control }) as UseFormStateReturn<TFieldValues> | undefined) ?? {};\n\n\tconst [isPasswordVisible, toggleVisibility] = useToggle(false);\n\n\tconst shouldHaveEyeIcon = withEyeIcon && type === \"password\";\n\n\tconst WrapperElement = shouldHaveEyeIcon ? FormInputGroup : ReactFragment;\n\n\tconst wrapperElementProps = shouldHaveEyeIcon && {\n\t\tclassName: cnMerge(\"w-full\", classNames?.inputGroup, name && errors?.[name] && classNames?.error),\n\t};\n\n\treturn (\n\t\t<WrapperElement {...wrapperElementProps}>\n\t\t\t<input\n\t\t\t\tdata-scope=\"form\"\n\t\t\t\tdata-part=\"input\"\n\t\t\t\tid={id}\n\t\t\t\tname={name}\n\t\t\t\ttype={type === \"password\" && isPasswordVisible ? \"text\" : type}\n\t\t\t\tclassName={cnMerge(\n\t\t\t\t\t!inputTypesWithoutFullWith.has(type) && \"flex w-full\",\n\t\t\t\t\t`bg-transparent text-sm file:border-0 file:bg-transparent\n\t\t\t\t\tplaceholder:text-shadcn-muted-foreground focus-visible:outline-none\n\t\t\t\t\tdisabled:cursor-not-allowed disabled:opacity-50`,\n\t\t\t\t\tclassName,\n\t\t\t\t\tclassNames?.input,\n\t\t\t\t\ttype !== \"password\" && name && errors?.[name] && classNames?.error\n\t\t\t\t)}\n\t\t\t\t{...restOfProps}\n\t\t\t/>\n\n\t\t\t{shouldHaveEyeIcon && (\n\t\t\t\t<FormInputRightItem\n\t\t\t\t\tas=\"button\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tonClick={toggleVisibility}\n\t\t\t\t\tclassName=\"size-5 shrink-0 lg:size-6\"\n\t\t\t\t>\n\t\t\t\t\t{isPasswordVisible ? (\n\t\t\t\t\t\t<EyeIconInvisible className={cnMerge(\"size-full\", classNames?.eyeIcon)} />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<EyeIconVisible className={cnMerge(\"size-full\", classNames?.eyeIcon)} />\n\t\t\t\t\t)}\n\t\t\t\t</FormInputRightItem>\n\t\t\t)}\n\t\t</WrapperElement>\n\t);\n}\n\nexport function FormInput(\n\tprops: Omit<FormInputPrimitiveProps, \"control\" | \"formState\" | \"name\" | \"ref\"> & {\n\t\trules?: RegisterOptions;\n\t}\n) {\n\tconst { rules, ...restOfProps } = props;\n\n\tconst { name } = useStrictFormItemContext();\n\tconst { formState, register } = useFormFieldContext();\n\n\treturn (\n\t\t<FormInputPrimitive\n\t\t\tname={name}\n\t\t\tformState={formState}\n\t\t\t{...(Boolean(name) && register(name, rules))}\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\ntype FormTextAreaPrimitiveProps<TFieldValues extends FieldValues = FieldValues> =\n\tReact.ComponentPropsWithRef<\"textarea\"> & {\n\t\terrorClassName?: string;\n\t\tname?: keyof TFieldValues;\n\t} & (\n\t\t\t| { control: Control<TFieldValues>; formState?: never }\n\t\t\t| { control?: never; formState?: FormState<TFieldValues> }\n\t\t);\n\nexport function FormTextAreaPrimitive<TFieldValues extends FieldValues>(\n\tprops: FormTextAreaPrimitiveProps<TFieldValues>\n) {\n\tconst contextValues = useLaxFormItemContext();\n\n\tconst {\n\t\tclassName,\n\t\tcontrol,\n\t\terrorClassName,\n\t\tformState,\n\t\tid = contextValues?.uniqueId,\n\t\tname = contextValues?.name,\n\t\t...restOfProps\n\t} = props;\n\n\tconst getFormState = (control ? useFormState : () => formState) as typeof useFormState;\n\n\tconst { errors } = (getFormState({ control }) as UseFormStateReturn<TFieldValues> | undefined) ?? {};\n\n\treturn (\n\t\t<textarea\n\t\t\tdata-scope=\"form\"\n\t\t\tdata-part=\"textarea\"\n\t\t\tid={id}\n\t\t\tname={name}\n\t\t\tclassName={cnMerge(\n\t\t\t\t`w-full bg-transparent text-sm placeholder:text-shadcn-muted-foreground\n\t\t\t\tfocus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50`,\n\t\t\t\tclassName,\n\t\t\t\tname && errors?.[name] && errorClassName\n\t\t\t)}\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\nexport function FormTextArea(\n\tprops: Omit<FormTextAreaPrimitiveProps, \"control\" | \"formState\" | \"id\" | \"name\" | \"ref\"> & {\n\t\trules?: RegisterOptions;\n\t}\n) {\n\tconst { rules, ...restOfProps } = props;\n\n\tconst { name } = useStrictFormItemContext();\n\tconst { formState, register } = useFormFieldContext();\n\n\treturn (\n\t\t<FormTextAreaPrimitive\n\t\t\tname={name}\n\t\t\tformState={formState}\n\t\t\t{...(Boolean(name) && register(name, rules))}\n\t\t\t{...restOfProps}\n\t\t/>\n\t);\n}\n\ntype FormControllerProps<TFieldValues> = Omit<\n\tControllerProps<FieldValues, FieldPath<FieldValues>>,\n\t\"control\" | \"name\" | \"render\"\n> & {\n\trender: (props: {\n\t\tfield: Omit<ControllerRenderProps, \"value\"> & { value: TFieldValues };\n\t\tfieldState: ControllerFieldState;\n\t\tformState: UseFormStateReturn<FieldValues>;\n\t}) => React.ReactElement;\n};\n\nexport function FormController<TFieldValues = never>(props: FormControllerProps<TFieldValues>) {\n\tconst { control } = useFormFieldContext();\n\tconst { name } = useStrictFormItemContext();\n\n\treturn <ControllerPrimitive name={name} control={control} {...props} />;\n}\n\nexport function FormDescription(props: InferProps<\"p\">) {\n\tconst { className, ...restOfProps } = props;\n\n\treturn <p className={cnMerge(\"text-[12px]\", className)} {...restOfProps} />;\n}\n\ntype ErrorMessageRenderProps = {\n\tclassName: string;\n\t\"data-index\": number;\n\t\"data-part\": string;\n\t\"data-scope\": string;\n\tonAnimationEnd?: React.ReactEventHandler<HTMLElement>;\n};\n\ntype ErrorMessageRenderState = { errorMessage: string; errorMessageArray: string[]; index: number };\n\ntype FormErrorMessagePrimitiveProps<TFieldValues extends FieldValues> = {\n\tclassName?: string;\n\tclassNames?: {\n\t\tcontainer?: string;\n\t\terrorMessage?: string;\n\t\terrorMessageAnimation?: string;\n\t};\n\tcontrol: Control<TFieldValues>; // == Here for type inference of errorField prop\n\trender: (context: {\n\t\tprops: ErrorMessageRenderProps;\n\t\tstate: ErrorMessageRenderState;\n\t}) => React.ReactNode;\n\twithAnimationOnInvalid?: boolean;\n} & (\n\t| {\n\t\t\terrorField: keyof TFieldValues;\n\t\t\ttype?: \"regular\";\n\t }\n\t| {\n\t\t\terrorField: string;\n\t\t\ttype: \"root\";\n\t }\n);\n\ntype FormErrorMessagePrimitiveType = {\n\t<TFieldValues extends FieldValues>(\n\t\tprops: Extract<FormErrorMessagePrimitiveProps<TFieldValues>, { type?: \"regular\" }>\n\t): React.ReactNode;\n\t<TFieldValues extends FieldValues>(\n\t\t// eslint-disable-next-line ts-eslint/unified-signatures -- Using overloads are better because it gives better error messages\n\t\tprops: Extract<FormErrorMessagePrimitiveProps<TFieldValues>, { type: \"root\" }>\n\t): React.ReactNode;\n};\n\nexport const FormErrorMessagePrimitive: FormErrorMessagePrimitiveType = <TFieldValues extends FieldValues>(\n\tprops: FormErrorMessagePrimitiveProps<TFieldValues>\n) => {\n\tconst {\n\t\tclassName,\n\t\tclassNames,\n\t\tcontrol,\n\t\terrorField,\n\t\trender,\n\t\ttype = \"regular\",\n\t\twithAnimationOnInvalid = true,\n\t} = props;\n\n\tconst formState = useFormState({ control });\n\n\tconst wrapperRef = useRef<HTMLUListElement>(null);\n\n\tconst errorAnimationClass = classNames?.errorMessageAnimation ?? \"animate-shake\";\n\n\tuseEffect(() => {\n\t\tif (!withAnimationOnInvalid) return;\n\n\t\tconst errorMessageElements = wrapperRef.current?.children;\n\n\t\tif (!errorMessageElements) return;\n\n\t\tfor (const element of errorMessageElements) {\n\t\t\telement.classList.add(errorAnimationClass);\n\t\t}\n\t}, [errorAnimationClass, withAnimationOnInvalid]);\n\n\tuseEffect(() => {\n\t\tconst errorMessageElements = wrapperRef.current?.children;\n\n\t\tif (!errorMessageElements) return;\n\n\t\t// == Scroll to first error message\n\t\tif (Object.keys(formState.errors).indexOf(errorField as string) === 0) {\n\t\t\terrorMessageElements[0]?.scrollIntoView({\n\t\t\t\tbehavior: \"smooth\",\n\t\t\t\tblock: \"center\",\n\t\t\t});\n\n\t\t\twindow.scrollBy({ behavior: \"smooth\", top: -100 });\n\t\t}\n\t}, [errorField, formState.errors]);\n\n\tconst message = (\n\t\ttype === \"root\"\n\t\t\t? formState.errors.root?.[errorField as string]?.message\n\t\t\t: formState.errors[errorField]?.message\n\t) as string | string[];\n\n\tif (!message) {\n\t\treturn null;\n\t}\n\n\tconst errorMessageArray = toArray(message);\n\n\tconst [ErrorMessageList] = getElementList();\n\n\tconst onAnimationEnd: React.AnimationEventHandler<HTMLElement> | undefined = withAnimationOnInvalid\n\t\t? (event) => event.currentTarget.classList.remove(errorAnimationClass)\n\t\t: undefined;\n\n\tconst getRenderProps = ({ index }: { index: number }) =>\n\t\t({\n\t\t\tclassName: cnMerge(errorAnimationClass, className, classNames?.errorMessage),\n\t\t\t\"data-index\": index,\n\t\t\t\"data-part\": \"error-message\",\n\t\t\t\"data-scope\": \"form\",\n\t\t\tonAnimationEnd,\n\t\t}) satisfies ErrorMessageRenderProps;\n\n\tconst getRenderState = ({ errorMessage, index }: { errorMessage: string; index: number }) =>\n\t\t({\n\t\t\terrorMessage,\n\t\t\terrorMessageArray,\n\t\t\tindex,\n\t\t}) satisfies ErrorMessageRenderState;\n\n\treturn (\n\t\t<ErrorMessageList\n\t\t\tref={wrapperRef}\n\t\t\teach={errorMessageArray}\n\t\t\tclassName={cnMerge(\"flex flex-col\", classNames?.container)}\n\t\t\trender={(errorMessage, index) => {\n\t\t\t\treturn render({\n\t\t\t\t\tprops: getRenderProps({ index }),\n\t\t\t\t\tstate: getRenderState({ errorMessage, index }),\n\t\t\t\t});\n\t\t\t}}\n\t\t/>\n\t);\n};\n\ntype FormErrorMessageProps<TControl, TFieldValues extends FieldValues> =\n\t| (TControl extends Control<infer TValues>\n\t\t\t? {\n\t\t\t\t\tclassName?: string;\n\t\t\t\t\tcontrol?: never;\n\t\t\t\t\terrorField?: keyof TValues;\n\t\t\t\t\ttype?: \"regular\";\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\tclassName?: string;\n\t\t\t\t\tcontrol?: Control<TFieldValues>; // == Here for type inference of errorField prop\n\t\t\t\t\terrorField?: keyof TFieldValues;\n\t\t\t\t\ttype?: \"regular\";\n\t\t\t\t})\n\t| {\n\t\t\tclassName?: string;\n\t\t\tcontrol?: never;\n\t\t\terrorField: string;\n\t\t\ttype: \"root\";\n\t };\n\nexport function FormErrorMessage<TControl, TFieldValues extends FieldValues = FieldValues>(\n\tprops: FormErrorMessageProps<TControl, TFieldValues>\n) {\n\tconst contextValues = useLaxFormItemContext();\n\n\tconst { className, errorField = contextValues?.name, type = \"regular\" } = props;\n\n\tconst { control } = useFormFieldContext();\n\n\treturn (\n\t\t<FormErrorMessagePrimitive\n\t\t\tcontrol={control}\n\t\t\terrorField={errorField as string}\n\t\t\ttype={type as \"root\"}\n\t\t\trender={({ props: renderProps, state: { errorMessage } }) => (\n\t\t\t\t<p\n\t\t\t\t\t{...renderProps}\n\t\t\t\t\tkey={errorMessage}\n\t\t\t\t\tclassName={cnMerge(\"text-[13px]\", \"data-[index=0]:mt-1\", renderProps.className, className)}\n\t\t\t\t>\n\t\t\t\t\t{errorMessage}\n\t\t\t\t</p>\n\t\t\t)}\n\t\t/>\n\t);\n}\n","export { Controller as ControllerPrimitive } from \"react-hook-form\";\nexport {\n\tFormController as Controller,\n\tFormDescription as Description,\n\tFormErrorMessage as ErrorMessage,\n\tFormErrorMessagePrimitive as ErrorMessagePrimitive,\n\tFormInput as Input,\n\tFormInputGroup as InputGroup,\n\tFormInputLeftItem as InputLeftItem,\n\tFormInputPrimitive as InputPrimitive,\n\tFormInputRightItem as InputRightItem,\n\tFormItem as Item,\n\tFormItemContext as ItemContext,\n\tFormLabel as Label,\n\tFormRoot as Root,\n\tFormTextArea as TextArea,\n\tFormTextAreaPrimitive as TextAreaPrimitive,\n} from \"./form\";\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,11 @@
1
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle } from './card/index.js';
2
+ export { Carousel, CarouselButton, CarouselButtonsProps, CarouselCaption, CarouselContent, CarouselContentProps, CarouselControlProps, CarouselControls, CarouselIndicator, CarouselIndicatorProps, CarouselIndicatorWrapper, CarouselItem, CarouselItemWrapper, CarouselProviderProps, CarouselStore, CarouselStoreApi, CarouselWrapperProps, ImagesType, OtherCarouselProps } from './carousel/index.js';
3
+ export { useDragScroll } from './drag-scroll/index.js';
4
+ export { DropZone, InputProps, RootProps, UseDropZoneProps, useDropZone } from './drop-zone/index.js';
5
+ export { Form, FormController, FormDescription, FormErrorMessage, FormErrorMessagePrimitive, FormInput, FormInputGroup, FormInputLeftItem, FormInputPrimitive, FormInputRightItem, FormItem, FormItemContext, FormLabel, FormRoot, FormTextArea, FormTextAreaPrimitive, useFormItemContext } from './form/index.js';
6
+ import 'react';
7
+ import '@zayne-labs/toolkit-react/utils';
8
+ import '@zayne-labs/toolkit-type-helpers';
9
+ import 'zustand';
10
+ import '@zayne-labs/toolkit-core';
11
+ import 'react-hook-form';
@@ -0,0 +1,12 @@
1
+ import '../chunk-PNYEIX7F.js';
2
+ export { card_parts_exports as Card, CardContent, CardDescription, CardFooter, CardHeader, CardRoot, CardTitle } from '../chunk-PXYYL2LL.js';
3
+ export { carousel_parts_exports as Carousel, CarouselButton, CarouselCaption, CarouselContent, CarouselControls, CarouselIndicator, CarouselIndicatorWrapper, CarouselItem, CarouselItemWrapper } from '../chunk-VMJ2L3VC.js';
4
+ export { useDragScroll } from '../chunk-E3UC4AGS.js';
5
+ export { DropZone, useDropZone } from '../chunk-PW4AIAWC.js';
6
+ export { form_parts_exports as Form, FormController, FormDescription, FormErrorMessage, FormErrorMessagePrimitive, FormInput, FormInputGroup, FormInputLeftItem, FormInputPrimitive, FormInputRightItem, FormItem, FormItemContext, FormLabel, FormRoot, FormTextArea, FormTextAreaPrimitive, useStrictFormItemContext as useFormItemContext } from '../chunk-PKN52DWQ.js';
7
+ import '../chunk-OHG7GB7O.js';
8
+ import '../chunk-RJQIINNX.js';
9
+ import '../chunk-ENDWJXPF.js';
10
+ import '../chunk-PZ5AY32C.js';
11
+ //# sourceMappingURL=index.js.map
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zayne-labs/ui-react",
3
3
  "type": "module",
4
- "version": "0.1.5",
4
+ "version": "0.2.1",
5
5
  "description": "A composable UI/UI-utilities components library. ",
6
6
  "author": "Ryan Zayne",
7
7
  "license": "MIT",
@@ -17,16 +17,8 @@
17
17
  "sideEffects": false,
18
18
  "exports": {
19
19
  ".": null,
20
- "./form": "./dist/esm/ui/form/index.js",
21
- "./card": "./dist/esm/ui/card/index.js",
22
- "./carousel": "./dist/esm/ui/carousel/index.js",
23
- "./drop-zone": "./dist/esm/ui/drop-zone/index.js",
24
- "./drag-scroll": "./dist/esm/ui/drag-scroll/index.js",
25
- "./for": "./dist/esm/common/for/index.js",
26
- "./show": "./dist/esm/common/show/index.js",
27
- "./slot": "./dist/esm/common/slot/index.js",
28
- "./switch": "./dist/esm/common/switch/index.js",
29
- "./teleport": "./dist/esm/common/teleport/index.js"
20
+ "./*": "./dist/esm/ui/*/index.js",
21
+ "./common/*": "./dist/esm/common/*/index.js"
30
22
  },
31
23
  "main": "./dist/esm/index.js",
32
24
  "module": "./dist/esm/index.js",
@@ -55,9 +47,9 @@
55
47
  }
56
48
  },
57
49
  "dependencies": {
58
- "@zayne-labs/toolkit-core": "^0.8.26",
59
- "@zayne-labs/toolkit-react": "^0.8.26",
60
- "@zayne-labs/toolkit-type-helpers": "^0.8.26",
50
+ "@zayne-labs/toolkit-core": "^0.8.32",
51
+ "@zayne-labs/toolkit-react": "^0.8.32",
52
+ "@zayne-labs/toolkit-type-helpers": "^0.8.32",
61
53
  "zustand": "^5.0.2"
62
54
  },
63
55
  "devDependencies": {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/common/for/for.tsx","../../src/components/common/for/getElementList.ts"],"names":[],"mappings":";;;;AAkBO,SAAS,QAAoB,KAA6B,EAAA;AAChE,EAAA,MAAM,EAAE,QAAA,EAAU,IAAM,EAAA,MAAA,EAAW,GAAA,KAAA;AAEnC,EAAI,IAAA,CAAC,OAAQ,CAAA,IAAI,CAAG,EAAA;AACnB,IAAO,OAAA,IAAA;AAAA;AAGR,EAAA,MAAM,cAAiB,GAAA,IAAA,CAAK,GAAI,CAAA,CAAA,GAAI,MAAiD,KAAA;AACpF,IAAI,IAAA,OAAO,aAAa,UAAY,EAAA;AACnC,MAAO,OAAA,QAAA,CAAS,GAAG,MAAM,CAAA;AAAA;AAG1B,IAAO,OAAA,MAAA,CAAO,GAAG,MAAM,CAAA;AAAA,GACvB,CAAA;AAED,EAAO,OAAA,cAAA;AACR;AAEO,SAAS,QACf,KACC,EAAA;AACD,EAAM,MAAA,EAAE,EAAI,EAAA,aAAA,GAAgB,IAAM,EAAA,QAAA,EAAU,SAAW,EAAA,IAAA,EAAM,GAAK,EAAA,MAAA,EAAQ,GAAG,eAAA,EAAoB,GAAA,KAAA;AAEjG,EAAA,uBACE,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,EAAc,GAAU,EAAA,SAAA,EAAuB,GAAG,eAClD,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,OAAS,EAAA,EAAA,GAAI,EAAE,QAAA,EAAU,IAAM,EAAA,MAAA,IAAmC,CACpE,CAAA;AAEF;;;ACxCM,IAAA,cAAA,GAAiB,CACtB,OACoC,KAAA;AACpC,EAAA,QAAQ,OAAS;AAAA,IAChB,KAAK,MAAQ,EAAA;AACZ,MAAA,OAAO,CAAC,OAAO,CAAA;AAAA;AAChB,IACA,KAAK,aAAe,EAAA;AACnB,MAAA,OAAO,CAAC,OAAO,CAAA;AAAA;AAChB,IACA,SAAS;AACR,MAAA,OAAO,CAAC,OAAO,CAAA;AAAA;AAChB;AAEF","file":"chunk-MPOYLILK.js","sourcesContent":["import * as React from \"react\";\n\nimport type { DiscriminatedRenderProps, PolymorphicProps } from \"@zayne-labs/toolkit-react/utils\";\nimport { isArray } from \"@zayne-labs/toolkit-type-helpers\";\n\n// prettier-ignore\ntype RenderPropFn<TArrayItem> = (\n\titem: TArrayItem,\n\tindex: number,\n\tarray: TArrayItem[]\n) => React.ReactNode;\n\nexport type EachProp<TArrayItem> = { each: TArrayItem[] };\n\nexport type ForRenderProps<TArrayItem> = DiscriminatedRenderProps<RenderPropFn<TArrayItem>>;\n\ntype ForProps<TArrayItem> = EachProp<TArrayItem> & ForRenderProps<TArrayItem>;\n\nexport function ForBase<TArrayItem>(props: ForProps<TArrayItem>) {\n\tconst { children, each, render } = props;\n\n\tif (!isArray(each)) {\n\t\treturn each;\n\t}\n\n\tconst JSXElementList = each.map((...params: Parameters<RenderPropFn<TArrayItem>>) => {\n\t\tif (typeof children === \"function\") {\n\t\t\treturn children(...params);\n\t\t}\n\n\t\treturn render(...params);\n\t});\n\n\treturn JSXElementList;\n}\n\nexport function ForList<TArrayItem, TElement extends React.ElementType = \"ul\">(\n\tprops: PolymorphicProps<TElement, ForProps<TArrayItem> & { className?: string }>\n) {\n\tconst { as: ListContainer = \"ul\", children, className, each, ref, render, ...restOfListProps } = props;\n\n\treturn (\n\t\t<ListContainer ref={ref} className={className} {...restOfListProps}>\n\t\t\t<ForBase {...({ children, each, render } as ForProps<TArrayItem>)} />\n\t\t</ListContainer>\n\t);\n}\n","import { ForBase, ForList } from \"./for\";\n\ntype GetElementListResult<TVariant extends \"base\" | \"withWrapper\"> = TVariant extends \"base\"\n\t? [typeof ForBase]\n\t: [typeof ForList];\n\nconst getElementList = <TVariant extends \"base\" | \"withWrapper\" = \"withWrapper\">(\n\tvariant?: TVariant\n): GetElementListResult<TVariant> => {\n\tswitch (variant) {\n\t\tcase \"base\": {\n\t\t\treturn [ForBase] as never;\n\t\t}\n\t\tcase \"withWrapper\": {\n\t\t\treturn [ForList] as never;\n\t\t}\n\t\tdefault: {\n\t\t\treturn [ForList] as never;\n\t\t}\n\t}\n};\n\nexport { getElementList };\n"]}
@@ -1,15 +0,0 @@
1
- import * as react from 'react';
2
- import { DiscriminatedRenderProps, PolymorphicProps } from '@zayne-labs/toolkit-react/utils';
3
-
4
- type RenderPropFn<TArrayItem> = (item: TArrayItem, index: number, array: TArrayItem[]) => react.ReactNode;
5
- type EachProp<TArrayItem> = {
6
- each: TArrayItem[];
7
- };
8
- type ForRenderProps<TArrayItem> = DiscriminatedRenderProps<RenderPropFn<TArrayItem>>;
9
- type ForProps<TArrayItem> = EachProp<TArrayItem> & ForRenderProps<TArrayItem>;
10
- declare function ForBase<TArrayItem>(props: ForProps<TArrayItem>): react.ReactNode[];
11
- declare function ForList<TArrayItem, TElement extends react.ElementType = "ul">(props: PolymorphicProps<TElement, ForProps<TArrayItem> & {
12
- className?: string;
13
- }>): react.JSX.Element;
14
-
15
- export { type EachProp as E, ForBase as F, ForList as a, type ForRenderProps as b };