react-luna-form 0.0.33 → 0.0.34

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 (74) hide show
  1. package/dist/client/cjs/index.js +1 -1
  2. package/dist/client/esm/index.js +1 -1
  3. package/dist/config/cjs/index.js +1 -1
  4. package/dist/config/esm/index.js +1 -1
  5. package/dist/server/cjs/index.js +1 -1
  6. package/dist/server/esm/index.js +1 -1
  7. package/dist/types/luna-core/src/helper/input.d.ts +6 -0
  8. package/dist/types/luna-core/src/type.d.ts +4 -0
  9. package/dist/types/luna-core/src/util/constant.d.ts +2 -0
  10. package/dist/types/luna-core/src/util/date.d.ts +11 -0
  11. package/dist/types/luna-core/src/util/is-input.d.ts +1 -0
  12. package/package.json +2 -2
  13. package/dist/types/client/component/field/field-list.d.ts +0 -2
  14. package/dist/types/client/component/field/field-with-state.d.ts +0 -13
  15. package/dist/types/client/component/field/field.d.ts +0 -7
  16. package/dist/types/client/component/form-content.d.ts +0 -20
  17. package/dist/types/client/component/form.d.ts +0 -20
  18. package/dist/types/client/component/guard/list-guard.d.ts +0 -2
  19. package/dist/types/client/component/guard/visibility-guard.d.ts +0 -6
  20. package/dist/types/client/component/input.d.ts +0 -16
  21. package/dist/types/client/component/slot/slot.d.ts +0 -7
  22. package/dist/types/client/hook/use-data-source.d.ts +0 -3
  23. package/dist/types/client/hook/use-fetch.d.ts +0 -3
  24. package/dist/types/client/hook/use-field-list.d.ts +0 -2
  25. package/dist/types/client/hook/use-form-action.d.ts +0 -13
  26. package/dist/types/client/hook/use-input.d.ts +0 -2
  27. package/dist/types/client/hook/use-schema.d.ts +0 -2
  28. package/dist/types/client/hook/use-store.d.ts +0 -1
  29. package/dist/types/client/hook/use-timeout.d.ts +0 -1
  30. package/dist/types/client/hook/use-value.d.ts +0 -6
  31. package/dist/types/client/index.d.ts +0 -3
  32. package/dist/types/client/lib/error-store.d.ts +0 -7
  33. package/dist/types/client/lib/source-store.d.ts +0 -5
  34. package/dist/types/client/lib/state-store.d.ts +0 -5
  35. package/dist/types/client/lib/store-helper.d.ts +0 -26
  36. package/dist/types/client/lib/value-store.d.ts +0 -10
  37. package/dist/types/component/chevron-icon.d.ts +0 -3
  38. package/dist/types/component/column.d.ts +0 -5
  39. package/dist/types/component/control.d.ts +0 -5
  40. package/dist/types/component/description.d.ts +0 -3
  41. package/dist/types/component/field/field-base.d.ts +0 -12
  42. package/dist/types/component/field/field-error.d.ts +0 -5
  43. package/dist/types/component/field/field-group.d.ts +0 -8
  44. package/dist/types/component/field/field-horizontal.d.ts +0 -2
  45. package/dist/types/component/field/field-list-item.d.ts +0 -8
  46. package/dist/types/component/field/field-list.d.ts +0 -7
  47. package/dist/types/component/field/field-set-advanced.d.ts +0 -5
  48. package/dist/types/component/field/field-set-base.d.ts +0 -7
  49. package/dist/types/component/field/field-set.d.ts +0 -6
  50. package/dist/types/component/field/field-vertical.d.ts +0 -2
  51. package/dist/types/component/field/field.d.ts +0 -10
  52. package/dist/types/component/form.d.ts +0 -13
  53. package/dist/types/component/formatted-description.d.ts +0 -7
  54. package/dist/types/component/group.d.ts +0 -4
  55. package/dist/types/component/input/input-base.d.ts +0 -9
  56. package/dist/types/component/input-group.d.ts +0 -10
  57. package/dist/types/component/input-label.d.ts +0 -9
  58. package/dist/types/component/label.d.ts +0 -7
  59. package/dist/types/component/legend.d.ts +0 -4
  60. package/dist/types/component/list.d.ts +0 -5
  61. package/dist/types/component/separator.d.ts +0 -1
  62. package/dist/types/component/slot/list-slot.d.ts +0 -2
  63. package/dist/types/component/slot/slot-base.d.ts +0 -16
  64. package/dist/types/component/slot/slot-create.d.ts +0 -10
  65. package/dist/types/component/slot/slot-list.d.ts +0 -12
  66. package/dist/types/component/slot/slot.d.ts +0 -7
  67. package/dist/types/config/index.d.ts +0 -31
  68. package/dist/types/lib/render-If-exists.d.ts +0 -1
  69. package/dist/types/lib/string.d.ts +0 -1
  70. package/dist/types/server/component/fallback.d.ts +0 -7
  71. package/dist/types/server/component/form.d.ts +0 -13
  72. package/dist/types/server/component/input.d.ts +0 -13
  73. package/dist/types/server/index.d.ts +0 -4
  74. package/dist/types/type.d.ts +0 -29
@@ -1,7 +0,0 @@
1
- import { type Field, type Style } from '@luna-form/core';
2
- export declare function Label(props: Readonly<{
3
- children?: React.ReactNode;
4
- field: Field;
5
- style?: Style;
6
- translations?: Record<string, string>;
7
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- export declare function Legend(props: Readonly<{
2
- title?: string;
3
- description?: string;
4
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import type { List } from '@luna-form/core';
2
- export declare function List(props: Readonly<{
3
- children: React.ReactNode;
4
- field: List;
5
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function Separator(): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { ListProps } from '../field/field-list';
2
- export declare function ListSlot({ children, field, value }: ListProps): import("react/jsx-runtime").JSX.Element;
@@ -1,16 +0,0 @@
1
- import { type Fields, type Nullable, type Style } from '@luna-form/core';
2
- import type { Children } from '../../type';
3
- import type { FieldProps } from '../field/field';
4
- import type { ListProps } from '../field/field-list';
5
- export type SlotComponents = {
6
- field: React.ComponentType<FieldProps>;
7
- list: React.ComponentType<ListProps>;
8
- };
9
- export declare function SlotBase(props: Readonly<{
10
- children: Children;
11
- components: SlotComponents;
12
- disabled?: boolean;
13
- fields?: Fields;
14
- style?: Style;
15
- value?: Nullable<Record<string, unknown>>;
16
- }>): import("react/jsx-runtime").JSX.Element[];
@@ -1,10 +0,0 @@
1
- import type { Children } from '../../type';
2
- import type { Fields, Nullable, Style } from '@luna-form/core';
3
- import type { SlotComponents } from './slot-base';
4
- export declare function createSlot(components: SlotComponents): (props: Readonly<{
5
- children: Children;
6
- disabled?: boolean;
7
- fields?: Fields;
8
- style?: Style;
9
- value?: Nullable<Record<string, unknown>>;
10
- }>) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { type List, type Nullable, type Style } from '@luna-form/core';
2
- import { type SlotComponents } from './slot-base';
3
- import type { Children } from '../../type';
4
- export declare function SlotList(props: Readonly<{
5
- children: Children;
6
- components: SlotComponents;
7
- disabled?: boolean;
8
- field: List;
9
- index: number;
10
- style?: Style;
11
- value?: Nullable<Record<string, unknown>>;
12
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- export declare const Slot: (props: Readonly<{
2
- children: import("../../type").Children;
3
- disabled?: boolean;
4
- fields?: import("@luna-form/core").Fields;
5
- style?: import("@luna-form/core").Style;
6
- value?: import("@luna-form/core").Nullable<Record<string, unknown>>;
7
- }>) => import("react/jsx-runtime").JSX.Element;
@@ -1,31 +0,0 @@
1
- import { type Environment, type Protocol } from '@luna-form/core';
2
- import type { AlertProps, Config, InputConfig } from '../type';
3
- export declare function defineConfig<T extends React.ElementType>(options: Readonly<{
4
- alert?: React.ComponentType<AlertProps>;
5
- env?: Environment;
6
- fetcher?: {
7
- remotePatterns?: Array<{
8
- hostname?: string;
9
- port?: number;
10
- protocol?: Protocol;
11
- }>;
12
- };
13
- inputs: Array<InputConfig<T>>;
14
- style?: {
15
- compact?: boolean;
16
- horizontal?: boolean;
17
- showOptionalLabel?: boolean;
18
- };
19
- validation?: {
20
- blur?: boolean;
21
- change?: boolean;
22
- showError?: boolean;
23
- submit?: boolean;
24
- };
25
- }>): Config;
26
- export declare const defineCheckbox: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
27
- export declare const defineInput: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
28
- export declare const defineRadio: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
29
- export declare const defineSelect: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
30
- export declare const defineTextArea: (input: any) => InputConfig<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>;
31
- export declare function defineCustomInput<T extends React.ElementType>(types: string | string[], input: React.ComponentProps<T>): InputConfig<T>;
@@ -1 +0,0 @@
1
- export declare function renderIfExists<T>(value: T | undefined | null, render: (value: T) => React.ReactNode): React.ReactNode;
@@ -1 +0,0 @@
1
- export declare function formatMarkdown(text?: string): React.ReactNode;
@@ -1,7 +0,0 @@
1
- import type { Config } from '../../type';
2
- import type { Sections } from '@luna-form/core';
3
- export declare function Fallback(props: Readonly<{
4
- children: React.ReactNode;
5
- config: Config;
6
- sections: Sections;
7
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- import type { Config } from '../../type';
2
- import type { Definition, Sections } from '@luna-form/core';
3
- export declare function Form(props: Readonly<{
4
- children?: React.ReactNode;
5
- config: Config;
6
- context?: Record<string, unknown>;
7
- definition?: Definition;
8
- lang?: string;
9
- readOnly?: boolean;
10
- sections: Sections;
11
- translations?: Record<string, Record<string, string>>;
12
- value?: Record<string, unknown>;
13
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- import { type AriaAttributes, type CommonProps, type DataAttributes, type Field } from '@luna-form/core';
2
- import type { Config } from '../../type';
3
- export declare function Input(props: Readonly<{
4
- ariaAttributes?: AriaAttributes;
5
- commonProps: CommonProps;
6
- config: Config;
7
- context?: Record<string, unknown>;
8
- dataAttributes?: DataAttributes;
9
- field: Field;
10
- horizontal?: boolean;
11
- translations?: Record<string, string>;
12
- value?: Record<string, unknown>;
13
- }>): import("react").ReactNode;
@@ -1,4 +0,0 @@
1
- import { Form } from './component/form';
2
- import { Fallback } from './component/fallback';
3
- export { Form, Fallback };
4
- export type { Sections, Source } from '@luna-form/core';
@@ -1,29 +0,0 @@
1
- import type { AriaAttributes, BaseConfig, CommonProps, DataAttributes, Field, Fields, FormStateError } from '@luna-form/core';
2
- export type Slot = (props: {
3
- disabled?: boolean;
4
- fields?: Fields;
5
- }) => React.ReactNode;
6
- export type Control = ((props: {
7
- isPending?: boolean;
8
- }) => React.ReactNode) | React.ReactNode;
9
- export type Children = (props: {
10
- ariaAttributes?: AriaAttributes;
11
- commonProps: CommonProps;
12
- dataAttributes?: DataAttributes;
13
- field: Field;
14
- horizontal?: boolean;
15
- }) => React.ReactNode;
16
- export type InputConfig<T extends React.ElementType> = {
17
- types: string | string[];
18
- input: React.ComponentProps<T>;
19
- };
20
- export type AlertProps = Readonly<FormStateError>;
21
- export type Config = BaseConfig<React.ComponentProps<React.ElementType>> & {
22
- alert?: React.ComponentType<AlertProps>;
23
- };
24
- export type InputChange = {
25
- data?: DataAttributes;
26
- name: string;
27
- type: string;
28
- value: unknown;
29
- };