@payfit/unity-components 2.1.4 → 2.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.
- package/dist/esm/components/avatar/Avatar.context.d.ts +2 -1
- package/dist/esm/components/avatar/Avatar.context.js +13 -11
- package/dist/esm/components/avatar/Avatar.d.ts +126 -0
- package/dist/esm/components/avatar/Avatar.js +34 -20
- package/dist/esm/components/avatar/Avatar.variants.d.ts +39 -0
- package/dist/esm/components/avatar/Avatar.variants.js +22 -4
- package/dist/esm/components/avatar/parts/AvatarFallback.d.ts +52 -0
- package/dist/esm/components/avatar/parts/AvatarIcon.d.ts +31 -0
- package/dist/esm/components/avatar/parts/AvatarIcon.js +40 -0
- package/dist/esm/components/button/Button.js +8 -7
- package/dist/esm/components/dialog/Dialog.js +32 -31
- package/dist/esm/components/dialog/test-utils.d.ts +7 -1
- package/dist/esm/components/dialog/test-utils.js +39 -28
- package/dist/esm/components/inline-field-group/InlineFieldGroup.context.d.ts +23 -0
- package/dist/esm/components/inline-field-group/InlineFieldGroup.context.js +6 -0
- package/dist/esm/components/inline-field-group/InlineFieldGroup.d.ts +119 -0
- package/dist/esm/components/inline-field-group/InlineFieldGroup.js +185 -0
- package/dist/esm/components/inline-field-group/hooks/useInlineFieldGroupMode.d.ts +46 -0
- package/dist/esm/components/inline-field-group/hooks/useInlineFieldGroupMode.js +27 -0
- package/dist/esm/components/inline-field-group/parts/InlineFieldGroupEditView.d.ts +64 -0
- package/dist/esm/components/inline-field-group/parts/InlineFieldGroupEditView.js +56 -0
- package/dist/esm/components/inline-field-group/parts/InlineFieldGroupHeader.d.ts +95 -0
- package/dist/esm/components/inline-field-group/parts/InlineFieldGroupHeader.js +106 -0
- package/dist/esm/components/inline-field-group/parts/InlineFieldGroupReadView.d.ts +56 -0
- package/dist/esm/components/inline-field-group/parts/InlineFieldGroupReadView.js +28 -0
- package/dist/esm/components/side-panel/parts/SidePanelFooter.js +19 -10
- package/dist/esm/hooks/tanstack-form-context.d.ts +1 -1
- package/dist/esm/hooks/use-tanstack-form.d.ts +32 -8
- package/dist/esm/hooks/use-tanstack-form.js +71 -48
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +445 -443
- package/i18n/en-GB.json +6 -0
- package/i18n/es-ES.json +6 -0
- package/i18n/fr-FR.json +6 -0
- package/package.json +21 -21
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
export interface InlineFieldGroupEditViewProps extends PropsWithChildren {
|
|
3
|
+
/**
|
|
4
|
+
* Optional className for custom styling
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Legend text for the fieldset. Should describe the group of fields.
|
|
9
|
+
* This is required for accessibility but will be visually hidden.
|
|
10
|
+
*/
|
|
11
|
+
legend?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* InlineFieldGroupEditView displays form fields only when the parent InlineFieldGroup is in edit mode.
|
|
15
|
+
* Wrap form field components in this component to show them when editing.
|
|
16
|
+
* The component uses a semantic `<fieldset>` with a visually hidden `<legend>` for accessibility.
|
|
17
|
+
* It automatically disables all fields during loading states and hides content in read mode.
|
|
18
|
+
* @example Basic usage with form fields
|
|
19
|
+
* ```tsx
|
|
20
|
+
* import { useTanstackUnityForm } from '@payfit/unity-components'
|
|
21
|
+
*
|
|
22
|
+
* function Example() {
|
|
23
|
+
* const form = useTanstackUnityForm({
|
|
24
|
+
* defaultValues: { email: 'john@example.com', phone: '+33123456789' }
|
|
25
|
+
* })
|
|
26
|
+
*
|
|
27
|
+
* return (
|
|
28
|
+
* <form.AppForm>
|
|
29
|
+
* <form.InlineFieldGroup>
|
|
30
|
+
* <form.InlineFieldGroupHeader title="Contact" />
|
|
31
|
+
* <form.InlineFieldGroupReadView>
|
|
32
|
+
* <DefinitionList>
|
|
33
|
+
* <DefinitionItem term="Email" description={form.state.values.email} />
|
|
34
|
+
* </DefinitionList>
|
|
35
|
+
* </form.InlineFieldGroupReadView>
|
|
36
|
+
* <form.InlineFieldGroupEditView legend="Edit contact information">
|
|
37
|
+
* <form.AppField name="email">
|
|
38
|
+
* {field => <field.TextField label="Email" isRequired />}
|
|
39
|
+
* </form.AppField>
|
|
40
|
+
* <form.AppField name="phone">
|
|
41
|
+
* {field => <field.PhoneNumberField label="Phone" />}
|
|
42
|
+
* </form.AppField>
|
|
43
|
+
* </form.InlineFieldGroupEditView>
|
|
44
|
+
* </form.InlineFieldGroup>
|
|
45
|
+
* </form.AppForm>
|
|
46
|
+
* )
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
* @remarks
|
|
50
|
+
* - Must be used as a child of InlineFieldGroup
|
|
51
|
+
* - Set the `legend` prop to describe the group of fields for screen readers
|
|
52
|
+
* - The fieldset is disabled automatically when the parent's `isLoading` prop is true
|
|
53
|
+
* - Uses `aria-busy` to indicate loading state to assistive technologies
|
|
54
|
+
* - Content remains in the DOM but is hidden with `hidden` and `inert` attributes in read mode
|
|
55
|
+
* @see {@link InlineFieldGroupEditViewProps} for all available props
|
|
56
|
+
* @see {@link InlineFieldGroup} for the parent container component
|
|
57
|
+
* @see {@link InlineFieldGroupReadView} for the corresponding read mode component
|
|
58
|
+
* @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/inline-field-group GitHub}
|
|
59
|
+
* @see Developer docs in {@link https://unity-components.payfit.io/?path=/docs/forms-reference-inlinefieldgroup--docs unity-components.payfit.io}
|
|
60
|
+
*/
|
|
61
|
+
export declare function InlineFieldGroupEditView({ children, className, legend, }: InlineFieldGroupEditViewProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
export declare namespace InlineFieldGroupEditView {
|
|
63
|
+
var displayName: string;
|
|
64
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as g } from "react";
|
|
3
|
+
import { uyTv as w } from "@payfit/unity-themes";
|
|
4
|
+
import { useIntl as x } from "react-intl";
|
|
5
|
+
import { Button as v } from "../../button/Button.js";
|
|
6
|
+
import { InlineFieldGroupContext as I } from "../InlineFieldGroup.context.js";
|
|
7
|
+
const N = w({
|
|
8
|
+
slots: {
|
|
9
|
+
fieldset: "uy:border-0 uy:p-0 uy:m-0",
|
|
10
|
+
legend: "uy:sr-only",
|
|
11
|
+
fieldsContainer: "uy:flex uy:flex-col uy:gap-250",
|
|
12
|
+
hiddenButtons: "uy:sr-only"
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
function b({
|
|
16
|
+
children: d,
|
|
17
|
+
className: s,
|
|
18
|
+
legend: o
|
|
19
|
+
}) {
|
|
20
|
+
const l = x(), t = g(I);
|
|
21
|
+
if (!t)
|
|
22
|
+
throw new Error(
|
|
23
|
+
"InlineFieldGroupEditView must be used within InlineFieldGroup"
|
|
24
|
+
);
|
|
25
|
+
const { mode: r, editViewId: a, isLoading: n, editViewRef: u } = t, i = r === "edit", {
|
|
26
|
+
fieldset: m,
|
|
27
|
+
legend: f,
|
|
28
|
+
fieldsContainer: c,
|
|
29
|
+
hiddenButtons: p
|
|
30
|
+
} = N(), y = l.formatMessage({
|
|
31
|
+
id: "unity:component:inline-field-group:save",
|
|
32
|
+
defaultMessage: "Save"
|
|
33
|
+
});
|
|
34
|
+
return /* @__PURE__ */ h(
|
|
35
|
+
"fieldset",
|
|
36
|
+
{
|
|
37
|
+
ref: u,
|
|
38
|
+
id: a,
|
|
39
|
+
className: m({ className: s }),
|
|
40
|
+
disabled: n,
|
|
41
|
+
hidden: !i,
|
|
42
|
+
"aria-hidden": !i,
|
|
43
|
+
"aria-busy": n,
|
|
44
|
+
...!i && { inert: "" },
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ e("legend", { className: f(), children: o }),
|
|
47
|
+
/* @__PURE__ */ e("div", { className: c(), children: d }),
|
|
48
|
+
/* @__PURE__ */ e("div", { className: p(), children: /* @__PURE__ */ e(v, { type: "submit", variant: "primary", children: y }) })
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
b.displayName = "InlineFieldGroupEditView";
|
|
54
|
+
export {
|
|
55
|
+
b as InlineFieldGroupEditView
|
|
56
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface InlineFieldGroupHeaderProps {
|
|
3
|
+
/**
|
|
4
|
+
* The title to display in the header.
|
|
5
|
+
* This will be used for aria-labelledby on the form element.
|
|
6
|
+
*/
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Custom label for the edit button.
|
|
10
|
+
* @default "Edit" (translated)
|
|
11
|
+
*/
|
|
12
|
+
editLabel?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Custom label for the save button.
|
|
15
|
+
* @default "Save" (translated)
|
|
16
|
+
*/
|
|
17
|
+
saveLabel?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Custom label for the cancel button.
|
|
20
|
+
* @default "Cancel" (translated)
|
|
21
|
+
*/
|
|
22
|
+
cancelLabel?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Additional custom actions to render alongside the default buttons.
|
|
25
|
+
* These will be displayed between the title and the edit/save/cancel buttons.
|
|
26
|
+
*/
|
|
27
|
+
customActions?: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Optional callback fired when the edit button is clicked.
|
|
30
|
+
* This is called before entering edit mode and is useful for analytics or side effects.
|
|
31
|
+
*/
|
|
32
|
+
onEditPress?: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Optional callback fired when the save button is clicked.
|
|
35
|
+
* This is called before form submission and is useful for analytics or side effects.
|
|
36
|
+
* Note: Form submission is handled via the form's onSubmit configuration.
|
|
37
|
+
*/
|
|
38
|
+
onSavePress?: () => void;
|
|
39
|
+
/**
|
|
40
|
+
* Optional callback fired when the cancel button is clicked.
|
|
41
|
+
* This is called before canceling and is useful for analytics or side effects.
|
|
42
|
+
* The form will be reset and edit mode exited automatically.
|
|
43
|
+
*/
|
|
44
|
+
onCancelPress?: () => void;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* InlineFieldGroupHeader renders the title and contextual action buttons for an InlineFieldGroup.
|
|
48
|
+
* It automatically switches between Edit button (read mode) and Save/Cancel buttons (edit mode)
|
|
49
|
+
* based on the parent InlineFieldGroup's current mode.
|
|
50
|
+
* The Save button integrates with TanStack Form and remains disabled until the form has changes.
|
|
51
|
+
* Cancel resets the form and returns to read mode.
|
|
52
|
+
* @example Basic usage
|
|
53
|
+
* ```tsx
|
|
54
|
+
* import { useTanstackUnityForm } from '@payfit/unity-components'
|
|
55
|
+
*
|
|
56
|
+
* function Example() {
|
|
57
|
+
* const form = useTanstackUnityForm({ defaultValues: { name: 'John' } })
|
|
58
|
+
*
|
|
59
|
+
* return (
|
|
60
|
+
* <form.AppForm>
|
|
61
|
+
* <form.InlineFieldGroup>
|
|
62
|
+
* <form.InlineFieldGroupHeader title="Contact Information" />
|
|
63
|
+
* <form.InlineFieldGroupReadView>...</form.InlineFieldGroupReadView>
|
|
64
|
+
* <form.InlineFieldGroupEditView legend="Edit">...</form.InlineFieldGroupEditView>
|
|
65
|
+
* </form.InlineFieldGroup>
|
|
66
|
+
* </form.AppForm>
|
|
67
|
+
* )
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
70
|
+
* @example Custom button labels and actions
|
|
71
|
+
* ```tsx
|
|
72
|
+
* <form.InlineFieldGroupHeader
|
|
73
|
+
* title="Contact Information"
|
|
74
|
+
* editLabel="Modify"
|
|
75
|
+
* saveLabel="Confirm"
|
|
76
|
+
* cancelLabel="Discard"
|
|
77
|
+
* customActions={<Button onPress={handleDelete}>Delete</Button>}
|
|
78
|
+
* onSavePress={() => trackAnalytics('save_clicked')}
|
|
79
|
+
* />
|
|
80
|
+
* ```
|
|
81
|
+
* @remarks
|
|
82
|
+
* - Must be used as a child of InlineFieldGroup
|
|
83
|
+
* - The title serves as the accessible label for the form via `aria-labelledby`
|
|
84
|
+
* - The Edit button uses `aria-expanded` and `aria-controls` for accessibility
|
|
85
|
+
* - Use `customActions` to add buttons that appear in both read and edit modes
|
|
86
|
+
* - Use `onEditPress`, `onSavePress`, `onCancelPress` for analytics or side effects
|
|
87
|
+
* @see {@link InlineFieldGroupHeaderProps} for all available props
|
|
88
|
+
* @see {@link InlineFieldGroup} for the parent container component
|
|
89
|
+
* @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/inline-field-group GitHub}
|
|
90
|
+
* @see Developer docs in {@link https://unity-components.payfit.io/?path=/docs/forms-reference-inlinefieldgroup--docs unity-components.payfit.io}
|
|
91
|
+
*/
|
|
92
|
+
export declare function InlineFieldGroupHeader({ title, editLabel, saveLabel, cancelLabel, customActions, onEditPress, onSavePress, onCancelPress, }: InlineFieldGroupHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
93
|
+
export declare namespace InlineFieldGroupHeader {
|
|
94
|
+
var displayName: string;
|
|
95
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as L } from "react";
|
|
3
|
+
import { uyTv as P } from "@payfit/unity-themes";
|
|
4
|
+
import { useStore as S } from "@tanstack/react-form";
|
|
5
|
+
import { useIntl as j } from "react-intl";
|
|
6
|
+
import { useFormContext as z } from "../../../hooks/tanstack-form-context.js";
|
|
7
|
+
import { Button as o } from "../../button/Button.js";
|
|
8
|
+
import { Text as H } from "../../text/Text.js";
|
|
9
|
+
import { InlineFieldGroupContext as B } from "../InlineFieldGroup.context.js";
|
|
10
|
+
const T = P({
|
|
11
|
+
slots: {
|
|
12
|
+
base: "uy:flex uy:items-center uy:justify-between uy:w-full",
|
|
13
|
+
titleContainer: "uy:flex uy:flex-col uy:gap-0 uy:flex-1",
|
|
14
|
+
actions: "uy:flex uy:gap-100 uy:items-center"
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
function A({
|
|
18
|
+
title: a,
|
|
19
|
+
editLabel: s,
|
|
20
|
+
saveLabel: l,
|
|
21
|
+
cancelLabel: d,
|
|
22
|
+
customActions: u,
|
|
23
|
+
onEditPress: c,
|
|
24
|
+
onSavePress: m,
|
|
25
|
+
onCancelPress: f
|
|
26
|
+
}) {
|
|
27
|
+
const i = j(), r = L(B);
|
|
28
|
+
if (!r)
|
|
29
|
+
throw new Error(
|
|
30
|
+
"InlineFieldGroupHeader must be used within InlineFieldGroup"
|
|
31
|
+
);
|
|
32
|
+
const {
|
|
33
|
+
mode: p,
|
|
34
|
+
enterEditMode: y,
|
|
35
|
+
exitEditMode: x,
|
|
36
|
+
headerId: g,
|
|
37
|
+
editViewId: h,
|
|
38
|
+
isLoading: t,
|
|
39
|
+
editButtonRef: b
|
|
40
|
+
} = r, v = z(), { isDirty: I } = S(v.store, (G) => ({
|
|
41
|
+
isDirty: G.isDirty
|
|
42
|
+
})), { base: C, titleContainer: M, actions: F } = T(), w = s || i.formatMessage({
|
|
43
|
+
id: "unity:component:inline-field-group:edit",
|
|
44
|
+
defaultMessage: "Edit"
|
|
45
|
+
}), D = l || i.formatMessage({
|
|
46
|
+
id: "unity:component:inline-field-group:save",
|
|
47
|
+
defaultMessage: "Save"
|
|
48
|
+
}), E = d || i.formatMessage({
|
|
49
|
+
id: "unity:component:inline-field-group:cancel",
|
|
50
|
+
defaultMessage: "Cancel"
|
|
51
|
+
});
|
|
52
|
+
return /* @__PURE__ */ n("header", { className: C(), children: [
|
|
53
|
+
/* @__PURE__ */ e("div", { className: M(), children: /* @__PURE__ */ e(H, { id: g, variant: "h3", color: "content.neutral", children: a }) }),
|
|
54
|
+
/* @__PURE__ */ n("div", { className: F(), role: "group", children: [
|
|
55
|
+
u,
|
|
56
|
+
p === "read" ? /* @__PURE__ */ e(
|
|
57
|
+
o,
|
|
58
|
+
{
|
|
59
|
+
ref: b,
|
|
60
|
+
variant: "secondary",
|
|
61
|
+
size: "default",
|
|
62
|
+
onPress: () => {
|
|
63
|
+
c?.(), y();
|
|
64
|
+
},
|
|
65
|
+
isDisabled: t,
|
|
66
|
+
prefixIcon: "PencilSimpleOutlined",
|
|
67
|
+
"aria-expanded": !1,
|
|
68
|
+
"aria-controls": h,
|
|
69
|
+
children: w
|
|
70
|
+
}
|
|
71
|
+
) : /* @__PURE__ */ n(N, { children: [
|
|
72
|
+
/* @__PURE__ */ e(
|
|
73
|
+
o,
|
|
74
|
+
{
|
|
75
|
+
variant: "secondary",
|
|
76
|
+
size: "default",
|
|
77
|
+
onPress: () => {
|
|
78
|
+
f?.(), x();
|
|
79
|
+
},
|
|
80
|
+
isDisabled: t,
|
|
81
|
+
type: "button",
|
|
82
|
+
children: E
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ e(
|
|
86
|
+
o,
|
|
87
|
+
{
|
|
88
|
+
variant: "primary",
|
|
89
|
+
size: "default",
|
|
90
|
+
isDisabled: !I || t,
|
|
91
|
+
isLoading: t,
|
|
92
|
+
type: "submit",
|
|
93
|
+
onPress: () => {
|
|
94
|
+
m?.();
|
|
95
|
+
},
|
|
96
|
+
children: D
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
] })
|
|
100
|
+
] })
|
|
101
|
+
] });
|
|
102
|
+
}
|
|
103
|
+
A.displayName = "InlineFieldGroupHeader";
|
|
104
|
+
export {
|
|
105
|
+
A as InlineFieldGroupHeader
|
|
106
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export interface InlineFieldGroupReadViewProps extends PropsWithChildren {
|
|
3
|
+
/**
|
|
4
|
+
* Optional className for custom styling
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* InlineFieldGroupReadView displays content only when the parent InlineFieldGroup is in read mode.
|
|
10
|
+
* Wrap read-only data displays (like DefinitionList) in this component to show them when not editing.
|
|
11
|
+
* The component automatically hides its content when entering edit mode using the `hidden` attribute
|
|
12
|
+
* and `inert` for proper accessibility, ensuring screen readers and keyboard navigation skip it.
|
|
13
|
+
* @example Basic usage with DefinitionList
|
|
14
|
+
* ```tsx
|
|
15
|
+
* import { useTanstackUnityForm, DefinitionList, DefinitionItem } from '@payfit/unity-components'
|
|
16
|
+
*
|
|
17
|
+
* function Example() {
|
|
18
|
+
* const form = useTanstackUnityForm({ defaultValues: { email: 'john@example.com' } })
|
|
19
|
+
*
|
|
20
|
+
* return (
|
|
21
|
+
* <form.AppForm>
|
|
22
|
+
* <form.InlineFieldGroup>
|
|
23
|
+
* <form.InlineFieldGroupHeader title="Contact" />
|
|
24
|
+
* <form.InlineFieldGroupReadView>
|
|
25
|
+
* <form.Subscribe selector={state => state.values}>
|
|
26
|
+
* {values => (
|
|
27
|
+
* <DefinitionList>
|
|
28
|
+
* <DefinitionItem term="Email" description={values.email} />
|
|
29
|
+
* </DefinitionList>
|
|
30
|
+
* )}
|
|
31
|
+
* </form.Subscribe>
|
|
32
|
+
* </form.InlineFieldGroupReadView>
|
|
33
|
+
* <form.InlineFieldGroupEditView legend="Edit contact">
|
|
34
|
+
* <form.AppField name="email">
|
|
35
|
+
* {field => <field.TextField label="Email" />}
|
|
36
|
+
* </form.AppField>
|
|
37
|
+
* </form.InlineFieldGroupEditView>
|
|
38
|
+
* </form.InlineFieldGroup>
|
|
39
|
+
* </form.AppForm>
|
|
40
|
+
* )
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
* @remarks
|
|
44
|
+
* - Must be used as a child of InlineFieldGroup
|
|
45
|
+
* - Use `form.Subscribe` to display current form values that update after saving
|
|
46
|
+
* - The content remains in the DOM but is hidden with `hidden` and `inert` attributes in edit mode
|
|
47
|
+
* @see {@link InlineFieldGroupReadViewProps} for all available props
|
|
48
|
+
* @see {@link InlineFieldGroup} for the parent container component
|
|
49
|
+
* @see {@link InlineFieldGroupEditView} for the corresponding edit mode component
|
|
50
|
+
* @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/inline-field-group GitHub}
|
|
51
|
+
* @see Developer docs in {@link https://unity-components.payfit.io/?path=/docs/forms-reference-inlinefieldgroup--docs unity-components.payfit.io}
|
|
52
|
+
*/
|
|
53
|
+
export declare function InlineFieldGroupReadView({ children, className, }: InlineFieldGroupReadViewProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export declare namespace InlineFieldGroupReadView {
|
|
55
|
+
var displayName: string;
|
|
56
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as d } from "react";
|
|
3
|
+
import { InlineFieldGroupContext as t } from "../InlineFieldGroup.context.js";
|
|
4
|
+
function l({
|
|
5
|
+
children: n,
|
|
6
|
+
className: o
|
|
7
|
+
}) {
|
|
8
|
+
const i = d(t);
|
|
9
|
+
if (!i)
|
|
10
|
+
throw new Error(
|
|
11
|
+
"InlineFieldGroupReadView must be used within InlineFieldGroup"
|
|
12
|
+
);
|
|
13
|
+
const e = i.mode === "read";
|
|
14
|
+
return /* @__PURE__ */ r(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
className: o,
|
|
18
|
+
hidden: !e,
|
|
19
|
+
"aria-hidden": !e,
|
|
20
|
+
...!e && { inert: "" },
|
|
21
|
+
children: n
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
l.displayName = "InlineFieldGroupReadView";
|
|
26
|
+
export {
|
|
27
|
+
l as InlineFieldGroupReadView
|
|
28
|
+
};
|
|
@@ -1,20 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { uyTv as
|
|
4
|
-
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i, Children as a, isValidElement as m, cloneElement as l } from "react";
|
|
3
|
+
import { uyTv as p } from "@payfit/unity-themes";
|
|
4
|
+
import { useBreakpointListener as f } from "../../../hooks/use-breakpoint-listener.js";
|
|
5
|
+
import { Button as d } from "../../button/Button.js";
|
|
6
|
+
import { DialogButton as b } from "../../dialog/parts/DialogActions/DialogButton.js";
|
|
7
|
+
const c = p({
|
|
5
8
|
base: [
|
|
6
9
|
"uy:py-200 uy:px-300 uy:w-full",
|
|
7
|
-
"uy:flex uy:items-center uy:justify-end uy:gap-100 uy:shrink-0",
|
|
10
|
+
"uy:flex uy:items-center uy:justify-end uy:gap-100 uy:shrink-0 uy:flex-col uy:md:flex-row",
|
|
8
11
|
"uy:bg-surface-neutral uy:rounded-bl-200 uy:rounded-br-200 uy:border-t uy:border-solid uy:border-t-solid uy:border-border-neutral",
|
|
9
12
|
"uy:sticky uy:bottom-0 uy:z-10",
|
|
10
13
|
"uy:mt-auto",
|
|
11
14
|
"uy:pb-[max(env(safe-area-inset-bottom),var(--uy-spacing-200))] uy:md:pb-200"
|
|
12
15
|
]
|
|
13
|
-
}),
|
|
14
|
-
({ children:
|
|
16
|
+
}), x = i(
|
|
17
|
+
({ children: r, ...t }, u) => {
|
|
18
|
+
const o = f(), n = o === "xs" || o === "sm", y = a.map(r, (e) => m(e) && (e.type === d || e.type === b) ? l(e, {
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
20
|
+
size: n ? "full" : e.props.size
|
|
21
|
+
}) : e);
|
|
22
|
+
return /* @__PURE__ */ s("footer", { ref: u, className: c(), ...t, children: y });
|
|
23
|
+
}
|
|
15
24
|
);
|
|
16
|
-
|
|
25
|
+
x.displayName = "SidePanelFooter";
|
|
17
26
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
27
|
+
x as SidePanelFooter,
|
|
28
|
+
c as sidePanelFooter
|
|
20
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const fieldContext: import('react').Context<import('@tanstack/
|
|
1
|
+
export declare const fieldContext: import('react').Context<import('@tanstack/form-core').AnyFieldApi>, formContext: import('react').Context<import('@tanstack/form-core').AnyFormApi>, useFieldContext: <TData>() => import('@tanstack/form-core').FieldApi<any, string, TData, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>, useFormContext: () => import('@tanstack/react-form').ReactFormExtendedApi<Record<string, never>, any, any, any, any, any, any, any, any, any, any, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MultiSelectComponent } from '../components/multi-select/MultiselectTypes.js';
|
|
2
|
-
export declare const useTanstackUnityForm: <TFormData, TOnMount extends import('@tanstack/
|
|
2
|
+
export declare const useTanstackUnityForm: <TFormData, TOnMount extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnChange extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta>(props: import('@tanstack/form-core').FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => import('@tanstack/react-form').AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
|
|
3
3
|
readonly FieldFeedbackText: import('react').ForwardRefExoticComponent<import('../components/form-field/parts/TanstackFormFeedbackText.js').TanstackFormFeedbackTextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
4
4
|
readonly FieldHelperText: import('react').ForwardRefExoticComponent<import('../components/form-field/parts/TanstackFormHelperText.js').TanstackFormHelperTextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
5
5
|
readonly FieldLabel: import('react').ForwardRefExoticComponent<import('../index.js').LabelProps & import('react').RefAttributes<HTMLLabelElement>>;
|
|
@@ -59,8 +59,12 @@ export declare const useTanstackUnityForm: <TFormData, TOnMount extends import('
|
|
|
59
59
|
readonly ToggleSwitchGroupField: import('react').ForwardRefExoticComponent<import('../components/toggle-switch-group-field/TanstackToggleSwitchGroupField.js').TanstackToggleSwitchGroupFieldProps & import('react').RefAttributes<HTMLFieldSetElement>>;
|
|
60
60
|
}, {
|
|
61
61
|
readonly Form: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & import('react').RefAttributes<HTMLFormElement>>;
|
|
62
|
+
readonly InlineFieldGroup: import('react').ForwardRefExoticComponent<import('../components/inline-field-group/InlineFieldGroup.js').InlineFieldGroupProps & import('react').RefAttributes<import('../components/inline-field-group/InlineFieldGroup.js').InlineFieldGroupHandle>>;
|
|
63
|
+
readonly InlineFieldGroupHeader: typeof import('../components/inline-field-group/parts/InlineFieldGroupHeader.js').InlineFieldGroupHeader;
|
|
64
|
+
readonly InlineFieldGroupReadView: typeof import('../components/inline-field-group/parts/InlineFieldGroupReadView.js').InlineFieldGroupReadView;
|
|
65
|
+
readonly InlineFieldGroupEditView: typeof import('../components/inline-field-group/parts/InlineFieldGroupEditView.js').InlineFieldGroupEditView;
|
|
62
66
|
}>;
|
|
63
|
-
export declare const withForm: <TFormData, TOnMount extends import('@tanstack/
|
|
67
|
+
export declare const withForm: <TFormData, TOnMount extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnChange extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: import('@tanstack/react-form').WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
|
|
64
68
|
readonly FieldFeedbackText: import('react').ForwardRefExoticComponent<import('../components/form-field/parts/TanstackFormFeedbackText.js').TanstackFormFeedbackTextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
65
69
|
readonly FieldHelperText: import('react').ForwardRefExoticComponent<import('../components/form-field/parts/TanstackFormHelperText.js').TanstackFormHelperTextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
66
70
|
readonly FieldLabel: import('react').ForwardRefExoticComponent<import('../index.js').LabelProps & import('react').RefAttributes<HTMLLabelElement>>;
|
|
@@ -120,8 +124,12 @@ export declare const withForm: <TFormData, TOnMount extends import('@tanstack/re
|
|
|
120
124
|
readonly ToggleSwitchGroupField: import('react').ForwardRefExoticComponent<import('../components/toggle-switch-group-field/TanstackToggleSwitchGroupField.js').TanstackToggleSwitchGroupFieldProps & import('react').RefAttributes<HTMLFieldSetElement>>;
|
|
121
125
|
}, {
|
|
122
126
|
readonly Form: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & import('react').RefAttributes<HTMLFormElement>>;
|
|
123
|
-
|
|
124
|
-
|
|
127
|
+
readonly InlineFieldGroup: import('react').ForwardRefExoticComponent<import('../components/inline-field-group/InlineFieldGroup.js').InlineFieldGroupProps & import('react').RefAttributes<import('../components/inline-field-group/InlineFieldGroup.js').InlineFieldGroupHandle>>;
|
|
128
|
+
readonly InlineFieldGroupHeader: typeof import('../components/inline-field-group/parts/InlineFieldGroupHeader.js').InlineFieldGroupHeader;
|
|
129
|
+
readonly InlineFieldGroupReadView: typeof import('../components/inline-field-group/parts/InlineFieldGroupReadView.js').InlineFieldGroupReadView;
|
|
130
|
+
readonly InlineFieldGroupEditView: typeof import('../components/inline-field-group/parts/InlineFieldGroupEditView.js').InlineFieldGroupEditView;
|
|
131
|
+
}, TRenderProps>) => import('react').FunctionComponent<import('react').PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
|
|
132
|
+
form: import('@tanstack/react-form').AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
|
|
125
133
|
readonly FieldFeedbackText: import('react').ForwardRefExoticComponent<import('../components/form-field/parts/TanstackFormFeedbackText.js').TanstackFormFeedbackTextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
126
134
|
readonly FieldHelperText: import('react').ForwardRefExoticComponent<import('../components/form-field/parts/TanstackFormHelperText.js').TanstackFormHelperTextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
127
135
|
readonly FieldLabel: import('react').ForwardRefExoticComponent<import('../index.js').LabelProps & import('react').RefAttributes<HTMLLabelElement>>;
|
|
@@ -181,8 +189,12 @@ export declare const withForm: <TFormData, TOnMount extends import('@tanstack/re
|
|
|
181
189
|
readonly ToggleSwitchGroupField: import('react').ForwardRefExoticComponent<import('../components/toggle-switch-group-field/TanstackToggleSwitchGroupField.js').TanstackToggleSwitchGroupFieldProps & import('react').RefAttributes<HTMLFieldSetElement>>;
|
|
182
190
|
}, {
|
|
183
191
|
readonly Form: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & import('react').RefAttributes<HTMLFormElement>>;
|
|
192
|
+
readonly InlineFieldGroup: import('react').ForwardRefExoticComponent<import('../components/inline-field-group/InlineFieldGroup.js').InlineFieldGroupProps & import('react').RefAttributes<import('../components/inline-field-group/InlineFieldGroup.js').InlineFieldGroupHandle>>;
|
|
193
|
+
readonly InlineFieldGroupHeader: typeof import('../components/inline-field-group/parts/InlineFieldGroupHeader.js').InlineFieldGroupHeader;
|
|
194
|
+
readonly InlineFieldGroupReadView: typeof import('../components/inline-field-group/parts/InlineFieldGroupReadView.js').InlineFieldGroupReadView;
|
|
195
|
+
readonly InlineFieldGroupEditView: typeof import('../components/inline-field-group/parts/InlineFieldGroupEditView.js').InlineFieldGroupEditView;
|
|
184
196
|
}>;
|
|
185
|
-
}
|
|
197
|
+
}>>;
|
|
186
198
|
export declare const withFieldGroup: <TFieldGroupData, TSubmitMeta, TRenderProps extends object = {}>({ render, props, defaultValues, }: import('@tanstack/react-form').WithFieldGroupProps<TFieldGroupData, {
|
|
187
199
|
readonly FieldFeedbackText: import('react').ForwardRefExoticComponent<import('../components/form-field/parts/TanstackFormFeedbackText.js').TanstackFormFeedbackTextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
188
200
|
readonly FieldHelperText: import('react').ForwardRefExoticComponent<import('../components/form-field/parts/TanstackFormHelperText.js').TanstackFormHelperTextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
@@ -243,7 +255,11 @@ export declare const withFieldGroup: <TFieldGroupData, TSubmitMeta, TRenderProps
|
|
|
243
255
|
readonly ToggleSwitchGroupField: import('react').ForwardRefExoticComponent<import('../components/toggle-switch-group-field/TanstackToggleSwitchGroupField.js').TanstackToggleSwitchGroupFieldProps & import('react').RefAttributes<HTMLFieldSetElement>>;
|
|
244
256
|
}, {
|
|
245
257
|
readonly Form: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & import('react').RefAttributes<HTMLFormElement>>;
|
|
246
|
-
|
|
258
|
+
readonly InlineFieldGroup: import('react').ForwardRefExoticComponent<import('../components/inline-field-group/InlineFieldGroup.js').InlineFieldGroupProps & import('react').RefAttributes<import('../components/inline-field-group/InlineFieldGroup.js').InlineFieldGroupHandle>>;
|
|
259
|
+
readonly InlineFieldGroupHeader: typeof import('../components/inline-field-group/parts/InlineFieldGroupHeader.js').InlineFieldGroupHeader;
|
|
260
|
+
readonly InlineFieldGroupReadView: typeof import('../components/inline-field-group/parts/InlineFieldGroupReadView.js').InlineFieldGroupReadView;
|
|
261
|
+
readonly InlineFieldGroupEditView: typeof import('../components/inline-field-group/parts/InlineFieldGroupEditView.js').InlineFieldGroupEditView;
|
|
262
|
+
}, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import('@tanstack/form-core').DeepKeysOfType<TFormData, TFieldGroupData | null | undefined> | import('@tanstack/form-core').FieldsMap<TFormData, TFieldGroupData>, TOnMount extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnChange extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends import('@tanstack/form-core').FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends import('@tanstack/form-core').FormAsyncValidateOrFn<TFormData> | undefined, TFormSubmitMeta>(params: import('react').PropsWithChildren<NoInfer<TRenderProps> & {
|
|
247
263
|
form: import('@tanstack/react-form').AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
|
|
248
264
|
readonly FieldFeedbackText: import('react').ForwardRefExoticComponent<import('../components/form-field/parts/TanstackFormFeedbackText.js').TanstackFormFeedbackTextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
249
265
|
readonly FieldHelperText: import('react').ForwardRefExoticComponent<import('../components/form-field/parts/TanstackFormHelperText.js').TanstackFormHelperTextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
@@ -304,7 +320,11 @@ export declare const withFieldGroup: <TFieldGroupData, TSubmitMeta, TRenderProps
|
|
|
304
320
|
readonly ToggleSwitchGroupField: import('react').ForwardRefExoticComponent<import('../components/toggle-switch-group-field/TanstackToggleSwitchGroupField.js').TanstackToggleSwitchGroupFieldProps & import('react').RefAttributes<HTMLFieldSetElement>>;
|
|
305
321
|
}, {
|
|
306
322
|
readonly Form: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & import('react').RefAttributes<HTMLFormElement>>;
|
|
307
|
-
|
|
323
|
+
readonly InlineFieldGroup: import('react').ForwardRefExoticComponent<import('../components/inline-field-group/InlineFieldGroup.js').InlineFieldGroupProps & import('react').RefAttributes<import('../components/inline-field-group/InlineFieldGroup.js').InlineFieldGroupHandle>>;
|
|
324
|
+
readonly InlineFieldGroupHeader: typeof import('../components/inline-field-group/parts/InlineFieldGroupHeader.js').InlineFieldGroupHeader;
|
|
325
|
+
readonly InlineFieldGroupReadView: typeof import('../components/inline-field-group/parts/InlineFieldGroupReadView.js').InlineFieldGroupReadView;
|
|
326
|
+
readonly InlineFieldGroupEditView: typeof import('../components/inline-field-group/parts/InlineFieldGroupEditView.js').InlineFieldGroupEditView;
|
|
327
|
+
}> | import('@tanstack/react-form').AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import('@tanstack/form-core').FieldsMap<unknown, TFormData>, any, any, any, any, any, any, any, any, any, any, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
|
|
308
328
|
readonly FieldFeedbackText: import('react').ForwardRefExoticComponent<import('../components/form-field/parts/TanstackFormFeedbackText.js').TanstackFormFeedbackTextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
309
329
|
readonly FieldHelperText: import('react').ForwardRefExoticComponent<import('../components/form-field/parts/TanstackFormHelperText.js').TanstackFormHelperTextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
310
330
|
readonly FieldLabel: import('react').ForwardRefExoticComponent<import('../index.js').LabelProps & import('react').RefAttributes<HTMLLabelElement>>;
|
|
@@ -364,6 +384,10 @@ export declare const withFieldGroup: <TFieldGroupData, TSubmitMeta, TRenderProps
|
|
|
364
384
|
readonly ToggleSwitchGroupField: import('react').ForwardRefExoticComponent<import('../components/toggle-switch-group-field/TanstackToggleSwitchGroupField.js').TanstackToggleSwitchGroupFieldProps & import('react').RefAttributes<HTMLFieldSetElement>>;
|
|
365
385
|
}, {
|
|
366
386
|
readonly Form: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & import('react').RefAttributes<HTMLFormElement>>;
|
|
387
|
+
readonly InlineFieldGroup: import('react').ForwardRefExoticComponent<import('../components/inline-field-group/InlineFieldGroup.js').InlineFieldGroupProps & import('react').RefAttributes<import('../components/inline-field-group/InlineFieldGroup.js').InlineFieldGroupHandle>>;
|
|
388
|
+
readonly InlineFieldGroupHeader: typeof import('../components/inline-field-group/parts/InlineFieldGroupHeader.js').InlineFieldGroupHeader;
|
|
389
|
+
readonly InlineFieldGroupReadView: typeof import('../components/inline-field-group/parts/InlineFieldGroupReadView.js').InlineFieldGroupReadView;
|
|
390
|
+
readonly InlineFieldGroupEditView: typeof import('../components/inline-field-group/parts/InlineFieldGroupEditView.js').InlineFieldGroupEditView;
|
|
367
391
|
}>;
|
|
368
392
|
fields: TFields;
|
|
369
|
-
}>) => import('react').
|
|
393
|
+
}>) => ReturnType<import('react').FunctionComponent>;
|