@customafk/lunas-ui 0.0.0-q → 0.0.0-r

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.
@@ -6,7 +6,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
7
7
  import * as LabelPrimitive from '@radix-ui/react-label';
8
8
  import * as _radix_ui_react_slot from '@radix-ui/react-slot';
9
- import * as RHF from 'react-hook-form';
9
+ import * as react_hook_form from 'react-hook-form';
10
+ import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
10
11
 
11
12
  declare const buttonVariants: (props?: ({
12
13
  variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | "destructive-outline" | "destructive-ghost" | "accept" | "accept-outline" | "normal" | null | undefined;
@@ -70,14 +71,14 @@ declare const Toaster: () => react_jsx_runtime.JSX.Element;
70
71
 
71
72
  declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_dist_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
72
73
 
73
- declare const Form: <TFieldValues extends RHF.FieldValues, TContext = any, TTransformedValues extends RHF.FieldValues | undefined = undefined>(props: RHF.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
74
- declare const FormField: <TFieldValues extends RHF.FieldValues = RHF.FieldValues, TName extends RHF.FieldPath<TFieldValues> = RHF.FieldPath<TFieldValues>>({ ...props }: RHF.ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
74
+ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
75
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
75
76
  declare const useFormField: () => {
76
77
  invalid: boolean;
77
78
  isDirty: boolean;
78
79
  isTouched: boolean;
79
80
  isValidating: boolean;
80
- error?: RHF.FieldError;
81
+ error?: react_hook_form.FieldError;
81
82
  id: string;
82
83
  name: string;
83
84
  formItemId: string;
@@ -2274,19 +2274,23 @@ Label2.displayName = LabelPrimitive.Root.displayName;
2274
2274
  // packages/Atoms/Form/index.tsx
2275
2275
  import * as React14 from "react";
2276
2276
  import { Slot as Slot2 } from "@radix-ui/react-slot";
2277
- import * as RHF from "react-hook-form";
2277
+ import {
2278
+ Controller as ControllerBase,
2279
+ FormProvider as FormProviderBase,
2280
+ useFormContext as useFormContextBase
2281
+ } from "react-hook-form";
2278
2282
  import { jsx as jsx41 } from "react/jsx-runtime";
2279
- var Form = RHF.FormProvider;
2283
+ var Form = FormProviderBase;
2280
2284
  var FormFieldContext = React14.createContext({});
2281
2285
  var FormField = ({
2282
2286
  ...props
2283
2287
  }) => {
2284
- return /* @__PURE__ */ jsx41(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx41(RHF.Controller, { ...props }) });
2288
+ return /* @__PURE__ */ jsx41(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx41(ControllerBase, { ...props }) });
2285
2289
  };
2286
2290
  var useFormField = () => {
2287
2291
  const fieldContext = React14.useContext(FormFieldContext);
2288
2292
  const itemContext = React14.useContext(FormItemContext);
2289
- const { getFieldState, formState } = RHF.useFormContext();
2293
+ const { getFieldState, formState } = useFormContextBase();
2290
2294
  const fieldState = getFieldState(fieldContext.name, formState);
2291
2295
  if (!fieldContext) {
2292
2296
  throw new Error("useFormField should be used within <FormField>");
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { I as IIconProps } from '../types-DdUenP1k.js';
2
+ import { I as IIconProps } from '../types-BUTht_HJ.js';
3
3
  import 'react';
4
4
 
5
5
  declare const AvatarIcon: {
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { HTMLAttributes } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { a as TUserSettingSelect } from '../types-DdUenP1k.js';
4
+ import { T as TUserSettingSelect } from '../types-BUTht_HJ.js';
5
5
  import { z } from 'zod';
6
6
 
7
7
  interface IProps {
@@ -2161,19 +2161,23 @@ Label2.displayName = LabelPrimitive.Root.displayName;
2161
2161
  // packages/Atoms/Form/index.tsx
2162
2162
  import * as React14 from "react";
2163
2163
  import { Slot as Slot2 } from "@radix-ui/react-slot";
2164
- import * as RHF from "react-hook-form";
2164
+ import {
2165
+ Controller as ControllerBase,
2166
+ FormProvider as FormProviderBase,
2167
+ useFormContext as useFormContextBase
2168
+ } from "react-hook-form";
2165
2169
  import { jsx as jsx41 } from "react/jsx-runtime";
2166
- var Form = RHF.FormProvider;
2170
+ var Form = FormProviderBase;
2167
2171
  var FormFieldContext = React14.createContext({});
2168
2172
  var FormField = ({
2169
2173
  ...props
2170
2174
  }) => {
2171
- return /* @__PURE__ */ jsx41(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx41(RHF.Controller, { ...props }) });
2175
+ return /* @__PURE__ */ jsx41(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx41(ControllerBase, { ...props }) });
2172
2176
  };
2173
2177
  var useFormField = () => {
2174
2178
  const fieldContext = React14.useContext(FormFieldContext);
2175
2179
  const itemContext = React14.useContext(FormItemContext);
2176
- const { getFieldState, formState } = RHF.useFormContext();
2180
+ const { getFieldState, formState } = useFormContextBase();
2177
2181
  const fieldState = getFieldState(fieldContext.name, formState);
2178
2182
  if (!fieldContext) {
2179
2183
  throw new Error("useFormField should be used within <FormField>");
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import { HTMLAttributes } from 'react';
4
- import { T as TUser, a as TUserSettingSelect } from '../types-DdUenP1k.js';
4
+ import { a as TUser, T as TUserSettingSelect } from '../types-BUTht_HJ.js';
5
5
 
6
6
  type THeaderNav = 'CATEGORY' | 'SERIES' | 'GUIDE' | 'NEWS' | null;
7
7
  interface IHeaderProps extends HTMLAttributes<HTMLHeadElement> {
@@ -2229,19 +2229,23 @@ Label2.displayName = LabelPrimitive.Root.displayName;
2229
2229
  // packages/Atoms/Form/index.tsx
2230
2230
  import * as React14 from "react";
2231
2231
  import { Slot as Slot2 } from "@radix-ui/react-slot";
2232
- import * as RHF from "react-hook-form";
2232
+ import {
2233
+ Controller as ControllerBase,
2234
+ FormProvider as FormProviderBase,
2235
+ useFormContext as useFormContextBase
2236
+ } from "react-hook-form";
2233
2237
  import { jsx as jsx42 } from "react/jsx-runtime";
2234
- var Form = RHF.FormProvider;
2238
+ var Form = FormProviderBase;
2235
2239
  var FormFieldContext = React14.createContext({});
2236
2240
  var FormField = ({
2237
2241
  ...props
2238
2242
  }) => {
2239
- return /* @__PURE__ */ jsx42(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx42(RHF.Controller, { ...props }) });
2243
+ return /* @__PURE__ */ jsx42(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx42(ControllerBase, { ...props }) });
2240
2244
  };
2241
2245
  var useFormField = () => {
2242
2246
  const fieldContext = React14.useContext(FormFieldContext);
2243
2247
  const itemContext = React14.useContext(FormItemContext);
2244
- const { getFieldState, formState } = RHF.useFormContext();
2248
+ const { getFieldState, formState } = useFormContextBase();
2245
2249
  const fieldState = getFieldState(fieldContext.name, formState);
2246
2250
  if (!fieldContext) {
2247
2251
  throw new Error("useFormField should be used within <FormField>");
@@ -15,4 +15,4 @@ type TUser = {
15
15
  };
16
16
  type TUserSettingSelect = 'FAVORITE' | 'PROFILE' | 'ADDRESS' | 'LOGOUT';
17
17
 
18
- export type { IIconProps as I, TUser as T, TUserSettingSelect as a };
18
+ export type { IIconProps as I, TUserSettingSelect as T, TUser as a };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@customafk/lunas-ui",
3
3
  "private": false,
4
- "version": "0.0.0-q",
4
+ "version": "0.0.0-r",
5
5
  "type": "module",
6
6
  "homepage": "https://docs.customafk.com",
7
7
  "repository": {