@pipe0/react 0.0.4 → 0.0.6
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/CHANGELOG.md +14 -0
- package/README.md +58 -2
- package/dist/components/compound/pipe-catalog/active-filters.d.mts +7 -10
- package/dist/components/compound/pipe-catalog/active-filters.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/active-filters.mjs +22 -18
- package/dist/components/compound/pipe-catalog/active-filters.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/card.d.mts +3 -12
- package/dist/components/compound/pipe-catalog/card.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/card.mjs +28 -25
- package/dist/components/compound/pipe-catalog/card.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/category-filter.d.mts +6 -13
- package/dist/components/compound/pipe-catalog/category-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/category-filter.mjs +12 -13
- package/dist/components/compound/pipe-catalog/category-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/column-filter.d.mts +6 -14
- package/dist/components/compound/pipe-catalog/column-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/column-filter.mjs +9 -9
- package/dist/components/compound/pipe-catalog/column-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/empty.d.mts +5 -10
- package/dist/components/compound/pipe-catalog/empty.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/empty.mjs +12 -14
- package/dist/components/compound/pipe-catalog/empty.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/index.d.mts +1 -1
- package/dist/components/compound/pipe-catalog/input-field-filter.d.mts +3 -3
- package/dist/components/compound/pipe-catalog/input-field-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/input-field-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/list.d.mts +8 -25
- package/dist/components/compound/pipe-catalog/list.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/list.mjs +14 -14
- package/dist/components/compound/pipe-catalog/list.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/output-field-filter.d.mts +3 -3
- package/dist/components/compound/pipe-catalog/output-field-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/output-field-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/provider-filter.d.mts +3 -3
- package/dist/components/compound/pipe-catalog/provider-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/provider-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/root.d.mts +6 -6
- package/dist/components/compound/pipe-catalog/root.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/root.mjs +2 -2
- package/dist/components/compound/pipe-catalog/root.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/search-filter.d.mts +5 -9
- package/dist/components/compound/pipe-catalog/search-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/search-filter.mjs +9 -10
- package/dist/components/compound/pipe-catalog/search-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/tag-filter.d.mts +3 -3
- package/dist/components/compound/pipe-catalog/tag-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/tag-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-form/content.d.mts +6 -3
- package/dist/components/compound/pipe-form/content.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/content.mjs +17 -25
- package/dist/components/compound/pipe-form/content.mjs.map +1 -1
- package/dist/components/compound/pipe-form/errors.d.mts +23 -0
- package/dist/components/compound/pipe-form/errors.d.mts.map +1 -0
- package/dist/components/compound/pipe-form/errors.mjs +40 -0
- package/dist/components/compound/pipe-form/errors.mjs.map +1 -0
- package/dist/components/compound/pipe-form/footer.d.mts +7 -7
- package/dist/components/compound/pipe-form/footer.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/footer.mjs +11 -6
- package/dist/components/compound/pipe-form/footer.mjs.map +1 -1
- package/dist/components/compound/pipe-form/header.d.mts +7 -7
- package/dist/components/compound/pipe-form/header.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/header.mjs +11 -6
- package/dist/components/compound/pipe-form/header.mjs.map +1 -1
- package/dist/components/compound/pipe-form/index.d.mts +2 -1
- package/dist/components/compound/pipe-form/root.d.mts +18 -11
- package/dist/components/compound/pipe-form/root.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/root.mjs +21 -27
- package/dist/components/compound/pipe-form/root.mjs.map +1 -1
- package/dist/components/compound/pipe-form/submit-button.d.mts +15 -4
- package/dist/components/compound/pipe-form/submit-button.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/submit-button.mjs +23 -8
- package/dist/components/compound/pipe-form/submit-button.mjs.map +1 -1
- package/dist/components/compound/pipe-form/title.d.mts +9 -8
- package/dist/components/compound/pipe-form/title.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/title.mjs +11 -6
- package/dist/components/compound/pipe-form/title.mjs.map +1 -1
- package/dist/components/compound/search-catalog/active-filters.d.mts +7 -10
- package/dist/components/compound/search-catalog/active-filters.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/active-filters.mjs +22 -18
- package/dist/components/compound/search-catalog/active-filters.mjs.map +1 -1
- package/dist/components/compound/search-catalog/card.d.mts +4 -13
- package/dist/components/compound/search-catalog/card.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/card.mjs +31 -28
- package/dist/components/compound/search-catalog/card.mjs.map +1 -1
- package/dist/components/compound/search-catalog/category-filter.d.mts +7 -13
- package/dist/components/compound/search-catalog/category-filter.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/category-filter.mjs +12 -13
- package/dist/components/compound/search-catalog/category-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/column-filter.d.mts +6 -10
- package/dist/components/compound/search-catalog/column-filter.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/column-filter.mjs +9 -9
- package/dist/components/compound/search-catalog/column-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/empty.d.mts +5 -10
- package/dist/components/compound/search-catalog/empty.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/empty.mjs +12 -14
- package/dist/components/compound/search-catalog/empty.mjs.map +1 -1
- package/dist/components/compound/search-catalog/index.d.mts +1 -1
- package/dist/components/compound/search-catalog/list.d.mts +8 -10
- package/dist/components/compound/search-catalog/list.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/list.mjs +14 -14
- package/dist/components/compound/search-catalog/list.mjs.map +1 -1
- package/dist/components/compound/search-catalog/output-field-filter.d.mts +3 -3
- package/dist/components/compound/search-catalog/output-field-filter.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/output-field-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/provider-filter.d.mts +3 -3
- package/dist/components/compound/search-catalog/provider-filter.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/provider-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/root.d.mts +6 -6
- package/dist/components/compound/search-catalog/root.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/root.mjs +2 -2
- package/dist/components/compound/search-catalog/root.mjs.map +1 -1
- package/dist/components/compound/search-catalog/search-filter.d.mts +5 -9
- package/dist/components/compound/search-catalog/search-filter.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/search-filter.mjs +9 -10
- package/dist/components/compound/search-catalog/search-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/tag-filter.d.mts +3 -3
- package/dist/components/compound/search-catalog/tag-filter.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/tag-filter.mjs.map +1 -1
- package/dist/components/compound/search-form/content.d.mts +6 -3
- package/dist/components/compound/search-form/content.d.mts.map +1 -1
- package/dist/components/compound/search-form/content.mjs +17 -25
- package/dist/components/compound/search-form/content.mjs.map +1 -1
- package/dist/components/compound/search-form/errors.d.mts +23 -0
- package/dist/components/compound/search-form/errors.d.mts.map +1 -0
- package/dist/components/compound/search-form/errors.mjs +40 -0
- package/dist/components/compound/search-form/errors.mjs.map +1 -0
- package/dist/components/compound/search-form/footer.d.mts +7 -7
- package/dist/components/compound/search-form/footer.d.mts.map +1 -1
- package/dist/components/compound/search-form/footer.mjs +11 -6
- package/dist/components/compound/search-form/footer.mjs.map +1 -1
- package/dist/components/compound/search-form/header.d.mts +7 -7
- package/dist/components/compound/search-form/header.d.mts.map +1 -1
- package/dist/components/compound/search-form/header.mjs +11 -6
- package/dist/components/compound/search-form/header.mjs.map +1 -1
- package/dist/components/compound/search-form/index.d.mts +2 -1
- package/dist/components/compound/search-form/root.d.mts +19 -12
- package/dist/components/compound/search-form/root.d.mts.map +1 -1
- package/dist/components/compound/search-form/root.mjs +21 -27
- package/dist/components/compound/search-form/root.mjs.map +1 -1
- package/dist/components/compound/search-form/submit-button.d.mts +15 -4
- package/dist/components/compound/search-form/submit-button.d.mts.map +1 -1
- package/dist/components/compound/search-form/submit-button.mjs +23 -8
- package/dist/components/compound/search-form/submit-button.mjs.map +1 -1
- package/dist/components/compound/search-form/title.d.mts +9 -8
- package/dist/components/compound/search-form/title.d.mts.map +1 -1
- package/dist/components/compound/search-form/title.mjs +11 -6
- package/dist/components/compound/search-form/title.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/active-filters.d.mts +7 -10
- package/dist/components/compound/searches-catalog/active-filters.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/active-filters.mjs +22 -18
- package/dist/components/compound/searches-catalog/active-filters.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/card.d.mts +5 -6
- package/dist/components/compound/searches-catalog/card.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/card.mjs +38 -28
- package/dist/components/compound/searches-catalog/card.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/category-filter.d.mts +7 -13
- package/dist/components/compound/searches-catalog/category-filter.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/category-filter.mjs +12 -13
- package/dist/components/compound/searches-catalog/category-filter.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/column-filter.d.mts +6 -10
- package/dist/components/compound/searches-catalog/column-filter.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/column-filter.mjs +9 -9
- package/dist/components/compound/searches-catalog/column-filter.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/empty.d.mts +5 -10
- package/dist/components/compound/searches-catalog/empty.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/empty.mjs +12 -14
- package/dist/components/compound/searches-catalog/empty.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/index.d.mts +1 -1
- package/dist/components/compound/searches-catalog/list.d.mts +8 -10
- package/dist/components/compound/searches-catalog/list.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/list.mjs +14 -14
- package/dist/components/compound/searches-catalog/list.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/output-field-filter.d.mts +3 -3
- package/dist/components/compound/searches-catalog/output-field-filter.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/output-field-filter.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/provider-filter.d.mts +3 -3
- package/dist/components/compound/searches-catalog/provider-filter.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/provider-filter.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/root.d.mts +6 -6
- package/dist/components/compound/searches-catalog/root.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/root.mjs +2 -2
- package/dist/components/compound/searches-catalog/root.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/search-filter.d.mts +5 -9
- package/dist/components/compound/searches-catalog/search-filter.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/search-filter.mjs +9 -10
- package/dist/components/compound/searches-catalog/search-filter.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/tag-filter.d.mts +3 -3
- package/dist/components/compound/searches-catalog/tag-filter.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/tag-filter.mjs.map +1 -1
- package/dist/components/defaults/adapters/index.mjs +2 -2
- package/dist/components/defaults/adapters/index.mjs.map +1 -1
- package/dist/components/defaults/adapters/json-extraction-input.mjs +291 -199
- package/dist/components/defaults/adapters/json-extraction-input.mjs.map +1 -1
- package/dist/components/defaults/adapters/{pipes-trigger-input.mjs → pipes-run-if-input.mjs} +32 -32
- package/dist/components/defaults/adapters/pipes-run-if-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/providers-input.mjs +221 -13
- package/dist/components/defaults/adapters/providers-input.mjs.map +1 -1
- package/dist/components/defaults/catalog/card-primitives.d.mts +14 -24
- package/dist/components/defaults/catalog/card-primitives.d.mts.map +1 -1
- package/dist/components/defaults/catalog/card-primitives.mjs +19 -19
- package/dist/components/defaults/catalog/card-primitives.mjs.map +1 -1
- package/dist/components/defaults/catalog/layout.mjs +7 -10
- package/dist/components/defaults/catalog/layout.mjs.map +1 -1
- package/dist/components/defaults/layout/field-wrapper.d.mts +2 -2
- package/dist/components/defaults/layout/field-wrapper.d.mts.map +1 -1
- package/dist/components/defaults/layout/field-wrapper.mjs +5 -2
- package/dist/components/defaults/layout/field-wrapper.mjs.map +1 -1
- package/dist/components/defaults/layout/group.d.mts +4 -4
- package/dist/components/defaults/layout/group.d.mts.map +1 -1
- package/dist/components/defaults/layout/group.mjs +69 -54
- package/dist/components/defaults/layout/group.mjs.map +1 -1
- package/dist/components/defaults/layout/section.d.mts +9 -4
- package/dist/components/defaults/layout/section.d.mts.map +1 -1
- package/dist/components/defaults/layout/section.mjs +11 -13
- package/dist/components/defaults/layout/section.mjs.map +1 -1
- package/dist/components/field-renderer.d.mts.map +1 -1
- package/dist/components/field-renderer.mjs +1 -1
- package/dist/components/field-renderer.mjs.map +1 -1
- package/dist/components/internal/LiquidEditor/ChipEditPopover.mjs +30 -15
- package/dist/components/internal/LiquidEditor/ChipEditPopover.mjs.map +1 -1
- package/dist/components/internal/icons.mjs +36 -1
- package/dist/components/internal/icons.mjs.map +1 -1
- package/dist/components/internal/multi-select-popover-trigger.mjs +0 -1
- package/dist/components/internal/multi-select-popover-trigger.mjs.map +1 -1
- package/dist/components/internal/tag-chip-decoration.mjs +15 -0
- package/dist/components/internal/tag-chip-decoration.mjs.map +1 -1
- package/dist/components/ui/badge.mjs +1 -1
- package/dist/components/ui/button.d.mts +2 -2
- package/dist/components/ui/combobox.mjs +0 -1
- package/dist/components/ui/combobox.mjs.map +1 -1
- package/dist/context/pipe-catalog-card-context.d.mts +7 -0
- package/dist/context/pipe-catalog-card-context.d.mts.map +1 -1
- package/dist/context/pipe-catalog-card-context.mjs.map +1 -1
- package/dist/context/pipe-form-context.d.mts +17 -3
- package/dist/context/pipe-form-context.d.mts.map +1 -1
- package/dist/context/pipe-form-context.mjs.map +1 -1
- package/dist/context/search-catalog-card-context.d.mts +8 -0
- package/dist/context/search-catalog-card-context.d.mts.map +1 -1
- package/dist/context/search-catalog-card-context.mjs.map +1 -1
- package/dist/context/search-form-context.d.mts +17 -3
- package/dist/context/search-form-context.d.mts.map +1 -1
- package/dist/context/search-form-context.mjs.map +1 -1
- package/dist/context/searches-catalog-card-context.d.mts +8 -0
- package/dist/context/searches-catalog-card-context.d.mts.map +1 -1
- package/dist/context/searches-catalog-card-context.mjs.map +1 -1
- package/dist/hooks/use-field-error.d.mts +2 -2
- package/dist/hooks/use-field-error.d.mts.map +1 -1
- package/dist/hooks/use-field-error.mjs +7 -3
- package/dist/hooks/use-field-error.mjs.map +1 -1
- package/dist/hooks/use-form-core.d.mts +0 -3
- package/dist/hooks/use-form-core.d.mts.map +1 -1
- package/dist/hooks/use-form-core.mjs +36 -2
- package/dist/hooks/use-form-core.mjs.map +1 -1
- package/dist/hooks/use-pipe-catalog-table.d.mts +8 -8
- package/dist/hooks/use-pipe-form.d.mts +11 -0
- package/dist/hooks/use-pipe-form.d.mts.map +1 -1
- package/dist/hooks/use-pipe-form.mjs +35 -6
- package/dist/hooks/use-pipe-form.mjs.map +1 -1
- package/dist/hooks/use-search-catalog-table.d.mts +6 -6
- package/dist/hooks/use-search-form.d.mts +11 -0
- package/dist/hooks/use-search-form.d.mts.map +1 -1
- package/dist/hooks/use-search-form.mjs +35 -6
- package/dist/hooks/use-search-form.mjs.map +1 -1
- package/dist/index.d.mts +9 -8
- package/dist/index.mjs +3 -9
- package/dist/styles/pipe0-form.css +418 -38
- package/dist/types/adapters.d.mts +6 -5
- package/dist/types/adapters.d.mts.map +1 -1
- package/dist/types/catalog-adapters.d.mts +2 -2
- package/dist/types/field-props.d.mts +4 -16
- package/dist/types/field-props.d.mts.map +1 -1
- package/dist/types/form-handle.d.mts +81 -1
- package/dist/types/form-handle.d.mts.map +1 -1
- package/dist/utils/build-section-handlers.mjs +6 -2
- package/dist/utils/build-section-handlers.mjs.map +1 -1
- package/dist/utils/internal-form.mjs +28 -0
- package/dist/utils/internal-form.mjs.map +1 -0
- package/dist/widgets/avatar-group.d.mts +4 -7
- package/dist/widgets/avatar-group.d.mts.map +1 -1
- package/dist/widgets/avatar-group.mjs +13 -12
- package/dist/widgets/avatar-group.mjs.map +1 -1
- package/package.json +70 -18
- package/dist/components/compound/pipe-catalog/index.mjs +0 -15
- package/dist/components/compound/pipe-form/index.mjs +0 -11
- package/dist/components/compound/search-catalog/index.mjs +0 -14
- package/dist/components/compound/search-form/index.mjs +0 -11
- package/dist/components/compound/searches-catalog/index.mjs +0 -14
- package/dist/components/defaults/adapters/pipes-trigger-input.mjs.map +0 -1
- package/dist/components/defaults/layout/submit-button.d.mts +0 -9
- package/dist/components/defaults/layout/submit-button.d.mts.map +0 -1
- package/dist/components/defaults/layout/submit-button.mjs +0 -23
- package/dist/components/defaults/layout/submit-button.mjs.map +0 -1
- package/dist/components/defaults/toggle-advanced-button.mjs +0 -29
- package/dist/components/defaults/toggle-advanced-button.mjs.map +0 -1
- package/dist/components/ui/input-group.mjs +0 -30
- package/dist/components/ui/input-group.mjs.map +0 -1
- package/dist/context/form-customization-context.d.mts +0 -71
- package/dist/context/form-customization-context.d.mts.map +0 -1
- package/dist/context/form-customization-context.mjs +0 -114
- package/dist/context/form-customization-context.mjs.map +0 -1
- package/dist/hooks/use-disclosure.mjs +0 -35
- package/dist/hooks/use-disclosure.mjs.map +0 -1
- package/dist/utils/render-slot.d.mts +0 -44
- package/dist/utils/render-slot.d.mts.map +0 -1
- package/dist/utils/render-slot.mjs +0 -30
- package/dist/utils/render-slot.mjs.map +0 -1
- package/dist/widgets/index.mjs +0 -11
|
@@ -1,40 +1,32 @@
|
|
|
1
|
-
import { useFormCustomization } from "../../../context/form-customization-context.mjs";
|
|
2
1
|
import { usePipeFormContext } from "../../../context/pipe-form-context.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { FormLevelErrors } from "../../internal/form-level-errors.mjs";
|
|
2
|
+
import { PipeFormErrors } from "./errors.mjs";
|
|
5
3
|
import { PipeFormSection } from "./section.mjs";
|
|
6
|
-
import { useMemo } from "react";
|
|
7
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
9
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
7
|
|
|
11
8
|
//#region src/components/compound/pipe-form/content.tsx
|
|
12
9
|
function PipeFormContent({ children, className, render, ...props }) {
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"data-p0": "store-error",
|
|
22
|
-
role: "alert",
|
|
23
|
-
className: "pz:flex pz:flex-col pz:gap-1 pz:rounded-md pz:border pz:border-destructive/50 pz:bg-destructive/5 pz:px-3 pz:py-2 pz:text-destructive pz:text-xs pz:font-medium",
|
|
24
|
-
children: /* @__PURE__ */ jsx("span", { children: "Failed to load options for one or more fields. Check that your connection is valid." })
|
|
25
|
-
}),
|
|
26
|
-
/* @__PURE__ */ jsx(FormLevelErrors, {
|
|
27
|
-
control: context.form.control,
|
|
28
|
-
fieldPaths
|
|
29
|
-
})
|
|
30
|
-
] });
|
|
10
|
+
const { sections, hasFieldLoaderError, isFieldLoaderLoading, form } = usePipeFormContext();
|
|
11
|
+
const defaultBody = /* @__PURE__ */ jsxs(Fragment, { children: [sections.map((section, idx) => {
|
|
12
|
+
const prev = idx > 0 ? sections[idx - 1] : null;
|
|
13
|
+
return /* @__PURE__ */ jsx(PipeFormSection, {
|
|
14
|
+
section,
|
|
15
|
+
hideLabel: !!(section.label && prev && prev.label === section.label)
|
|
16
|
+
}, section.key);
|
|
17
|
+
}), /* @__PURE__ */ jsx(PipeFormErrors, {})] });
|
|
31
18
|
return useRender({
|
|
32
19
|
defaultTagName: "div",
|
|
33
20
|
render,
|
|
34
|
-
state: {
|
|
21
|
+
state: {
|
|
22
|
+
hasFieldLoaderError,
|
|
23
|
+
isFieldLoaderLoading,
|
|
24
|
+
form
|
|
25
|
+
},
|
|
26
|
+
stateAttributesMapping: { form: () => null },
|
|
35
27
|
props: mergeProps({
|
|
36
28
|
className,
|
|
37
|
-
children: children ??
|
|
29
|
+
children: children ?? defaultBody,
|
|
38
30
|
"data-p0": "form-content"
|
|
39
31
|
}, props)
|
|
40
32
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/content.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport
|
|
1
|
+
{"version":3,"file":"content.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/content.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { PipePayload } from \"@pipe0/base\";\nimport { usePipeFormContext } from \"../../../context/pipe-form-context.js\";\nimport type { FormHandle } from \"../../../types/form-handle.js\";\nimport { PipeFormErrors } from \"./errors.js\";\nimport { PipeFormSection } from \"./section.js\";\n\nexport interface PipeFormContentState {\n hasFieldLoaderError: boolean;\n isFieldLoaderLoading: boolean;\n form: FormHandle<PipePayload>;\n}\n\nexport interface PipeFormContentProps\n extends useRender.ComponentProps<\"div\", PipeFormContentState> {}\n\nexport function PipeFormContent({ children, className, render, ...props }: PipeFormContentProps) {\n const { sections, hasFieldLoaderError, isFieldLoaderLoading, form } = usePipeFormContext();\n\n // Sections that share a label (e.g. several \"I/O & conditions\" sections)\n // render under one umbrella header. We hide the label on every section\n // except the first in each contiguous cluster.\n const defaultBody = (\n <>\n {sections.map((section, idx) => {\n const prev = idx > 0 ? sections[idx - 1] : null;\n const hideLabel = !!(section.label && prev && prev.label === section.label);\n return <PipeFormSection key={section.key} section={section} hideLabel={hideLabel} />;\n })}\n <PipeFormErrors />\n </>\n );\n\n return useRender({\n defaultTagName: \"div\",\n render,\n state: { hasFieldLoaderError, isFieldLoaderLoading, form },\n stateAttributesMapping: {\n form: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className,\n children: children ?? defaultBody,\n ...({ \"data-p0\": \"form-content\" } as Record<string, string>),\n },\n props,\n ),\n });\n}\n"],"mappings":";;;;;;;;AAiBA,SAAgB,gBAAgB,EAAE,UAAU,WAAW,QAAQ,GAAG,SAA+B;CAC/F,MAAM,EAAE,UAAU,qBAAqB,sBAAsB,SAAS,oBAAoB;CAK1F,MAAM,cACJ,4CACG,SAAS,KAAK,SAAS,QAAQ;EAC9B,MAAM,OAAO,MAAM,IAAI,SAAS,MAAM,KAAK;AAE3C,SAAO,oBAAC,iBAAD;GAA4C;GAAS,WAD1C,CAAC,EAAE,QAAQ,SAAS,QAAQ,KAAK,UAAU,QAAQ;GACe,EAAvD,QAAQ,IAA+C;GACpF,EACF,oBAAC,gBAAD,EAAkB,EACjB;AAGL,QAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO;GAAE;GAAqB;GAAsB;GAAM;EAC1D,wBAAwB,EACtB,YAAY,MACb;EACD,OAAO,WACL;GACE;GACA,UAAU,YAAY;GAChB,WAAW;GAClB,EACD,MACD;EACF,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import * as _$react from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/compound/pipe-form/errors.d.ts
|
|
5
|
+
interface PipeFormErrorsState {
|
|
6
|
+
hasFieldLoaderError: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface PipeFormErrorsProps extends useRender.ComponentProps<"div", PipeFormErrorsState> {}
|
|
9
|
+
/**
|
|
10
|
+
* Renders form-wide errors that don't belong to a specific visible field:
|
|
11
|
+
* the field-loader banner (when a resolver fails to load options for a
|
|
12
|
+
* field) and form-level validation errors (errors not attached to any
|
|
13
|
+
* rendered field).
|
|
14
|
+
*/
|
|
15
|
+
declare function PipeFormErrors({
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
render,
|
|
19
|
+
...props
|
|
20
|
+
}: PipeFormErrorsProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { PipeFormErrors };
|
|
23
|
+
//# sourceMappingURL=errors.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/errors.tsx"],"mappings":";;;;UAMiB,mBAAA;EACf,mBAAA;AAAA;AAAA,UAGe,mBAAA,SAA4B,SAAA,CAAU,cAAA,QAAsB,mBAAA;;;;AAA7E;;;iBAQgB,cAAA,CAAA;EAAiB,QAAA;EAAU,SAAA;EAAW,MAAA;EAAA,GAAW;AAAA,GAAS,mBAAA,GAAmB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { usePipeFormContext } from "../../../context/pipe-form-context.mjs";
|
|
2
|
+
import { asInternalForm } from "../../../utils/internal-form.mjs";
|
|
3
|
+
import { FormLevelErrors } from "../../internal/form-level-errors.mjs";
|
|
4
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/compound/pipe-form/errors.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Renders form-wide errors that don't belong to a specific visible field:
|
|
11
|
+
* the field-loader banner (when a resolver fails to load options for a
|
|
12
|
+
* field) and form-level validation errors (errors not attached to any
|
|
13
|
+
* rendered field).
|
|
14
|
+
*/
|
|
15
|
+
function PipeFormErrors({ children, className, render, ...props }) {
|
|
16
|
+
const { hasFieldLoaderError, fieldPaths, form } = usePipeFormContext();
|
|
17
|
+
const defaultBody = /* @__PURE__ */ jsxs(Fragment, { children: [hasFieldLoaderError && /* @__PURE__ */ jsx("div", {
|
|
18
|
+
"data-p0": "store-error",
|
|
19
|
+
role: "alert",
|
|
20
|
+
className: "pz:flex pz:flex-col pz:gap-1 pz:rounded-md pz:border pz:border-destructive/50 pz:bg-destructive/5 pz:px-3 pz:py-2 pz:text-destructive pz:text-xs pz:font-medium",
|
|
21
|
+
children: /* @__PURE__ */ jsx("span", { children: "Failed to load options for one or more fields. Check that your connection is valid." })
|
|
22
|
+
}), /* @__PURE__ */ jsx(FormLevelErrors, {
|
|
23
|
+
control: asInternalForm(form).control,
|
|
24
|
+
fieldPaths
|
|
25
|
+
})] });
|
|
26
|
+
return useRender({
|
|
27
|
+
defaultTagName: "div",
|
|
28
|
+
render,
|
|
29
|
+
state: { hasFieldLoaderError },
|
|
30
|
+
props: mergeProps({
|
|
31
|
+
className,
|
|
32
|
+
children: children ?? defaultBody,
|
|
33
|
+
"data-p0": "form-errors"
|
|
34
|
+
}, props)
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { PipeFormErrors };
|
|
40
|
+
//# sourceMappingURL=errors.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/errors.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { usePipeFormContext } from \"../../../context/pipe-form-context.js\";\nimport { asInternalForm } from \"../../../utils/internal-form.js\";\nimport { FormLevelErrors } from \"../../internal/form-level-errors.js\";\n\nexport interface PipeFormErrorsState {\n hasFieldLoaderError: boolean;\n}\n\nexport interface PipeFormErrorsProps extends useRender.ComponentProps<\"div\", PipeFormErrorsState> {}\n\n/**\n * Renders form-wide errors that don't belong to a specific visible field:\n * the field-loader banner (when a resolver fails to load options for a\n * field) and form-level validation errors (errors not attached to any\n * rendered field).\n */\nexport function PipeFormErrors({ children, className, render, ...props }: PipeFormErrorsProps) {\n const { hasFieldLoaderError, fieldPaths, form } = usePipeFormContext();\n\n const defaultBody = (\n <>\n {hasFieldLoaderError && (\n <div\n data-p0=\"store-error\"\n role=\"alert\"\n className=\"pz:flex pz:flex-col pz:gap-1 pz:rounded-md pz:border pz:border-destructive/50 pz:bg-destructive/5 pz:px-3 pz:py-2 pz:text-destructive pz:text-xs pz:font-medium\"\n >\n <span>\n Failed to load options for one or more fields. Check that your connection is valid.\n </span>\n </div>\n )}\n <FormLevelErrors control={asInternalForm(form).control} fieldPaths={fieldPaths} />\n </>\n );\n\n return useRender({\n defaultTagName: \"div\",\n render,\n state: { hasFieldLoaderError },\n props: mergeProps<\"div\">(\n {\n className,\n children: children ?? defaultBody,\n ...({ \"data-p0\": \"form-errors\" } as Record<string, string>),\n },\n props,\n ),\n });\n}\n"],"mappings":";;;;;;;;;;;;;;AAkBA,SAAgB,eAAe,EAAE,UAAU,WAAW,QAAQ,GAAG,SAA8B;CAC7F,MAAM,EAAE,qBAAqB,YAAY,SAAS,oBAAoB;CAEtE,MAAM,cACJ,4CACG,uBACC,oBAAC,OAAD;EACE,WAAQ;EACR,MAAK;EACL,WAAU;YAEV,oBAAC,QAAD,YAAM,uFAEC;EACH,GAER,oBAAC,iBAAD;EAAiB,SAAS,eAAe,KAAK,CAAC;EAAqB;EAAc,EACjF;AAGL,QAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,EAAE,qBAAqB;EAC9B,OAAO,WACL;GACE;GACA,UAAU,YAAY;GAChB,WAAW;GAClB,EACD,MACD;EACF,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as _$
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import * as _$react from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/compound/pipe-form/footer.d.ts
|
|
5
|
+
interface PipeFormFooterProps extends useRender.ComponentProps<"div"> {}
|
|
5
6
|
declare function PipeFormFooter({
|
|
6
7
|
children,
|
|
7
|
-
className
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}): _$react_jsx_runtime0.JSX.Element;
|
|
8
|
+
className,
|
|
9
|
+
render,
|
|
10
|
+
...props
|
|
11
|
+
}: PipeFormFooterProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { PipeFormFooter };
|
|
14
14
|
//# sourceMappingURL=footer.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/footer.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"footer.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/footer.tsx"],"mappings":";;;;UAGiB,mBAAA,SAA4B,SAAA,CAAU,cAAA;AAAA,iBAEvC,cAAA,CAAA;EAAiB,QAAA;EAAU,SAAA;EAAW,MAAA;EAAA,GAAW;AAAA,GAAS,mBAAA,GAAmB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
3
|
|
|
3
4
|
//#region src/components/compound/pipe-form/footer.tsx
|
|
4
|
-
function PipeFormFooter({ children, className }) {
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
function PipeFormFooter({ children, className, render, ...props }) {
|
|
6
|
+
return useRender({
|
|
7
|
+
defaultTagName: "div",
|
|
8
|
+
render,
|
|
9
|
+
props: mergeProps({
|
|
10
|
+
className,
|
|
11
|
+
children,
|
|
12
|
+
"data-p0": "form-footer"
|
|
13
|
+
}, props)
|
|
9
14
|
});
|
|
10
15
|
}
|
|
11
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/footer.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"footer.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/footer.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\n\nexport interface PipeFormFooterProps extends useRender.ComponentProps<\"div\"> {}\n\nexport function PipeFormFooter({ children, className, render, ...props }: PipeFormFooterProps) {\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(\n {\n className,\n children,\n ...({ \"data-p0\": \"form-footer\" } as Record<string, string>),\n },\n props,\n ),\n });\n}\n"],"mappings":";;;;AAKA,SAAgB,eAAe,EAAE,UAAU,WAAW,QAAQ,GAAG,SAA8B;AAC7F,QAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WACL;GACE;GACA;GACM,WAAW;GAClB,EACD,MACD;EACF,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as _$
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import * as _$react from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/compound/pipe-form/header.d.ts
|
|
5
|
+
interface PipeFormHeaderProps extends useRender.ComponentProps<"div"> {}
|
|
5
6
|
declare function PipeFormHeader({
|
|
6
7
|
children,
|
|
7
|
-
className
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}): _$react_jsx_runtime0.JSX.Element;
|
|
8
|
+
className,
|
|
9
|
+
render,
|
|
10
|
+
...props
|
|
11
|
+
}: PipeFormHeaderProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { PipeFormHeader };
|
|
14
14
|
//# sourceMappingURL=header.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/header.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"header.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/header.tsx"],"mappings":";;;;UAGiB,mBAAA,SAA4B,SAAA,CAAU,cAAA;AAAA,iBAEvC,cAAA,CAAA;EAAiB,QAAA;EAAU,SAAA;EAAW,MAAA;EAAA,GAAW;AAAA,GAAS,mBAAA,GAAmB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
3
|
|
|
3
4
|
//#region src/components/compound/pipe-form/header.tsx
|
|
4
|
-
function PipeFormHeader({ children, className }) {
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
function PipeFormHeader({ children, className, render, ...props }) {
|
|
6
|
+
return useRender({
|
|
7
|
+
defaultTagName: "div",
|
|
8
|
+
render,
|
|
9
|
+
props: mergeProps({
|
|
10
|
+
className,
|
|
11
|
+
children,
|
|
12
|
+
"data-p0": "form-header"
|
|
13
|
+
}, props)
|
|
9
14
|
});
|
|
10
15
|
}
|
|
11
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/header.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"header.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/header.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\n\nexport interface PipeFormHeaderProps extends useRender.ComponentProps<\"div\"> {}\n\nexport function PipeFormHeader({ children, className, render, ...props }: PipeFormHeaderProps) {\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(\n {\n className,\n children,\n ...({ \"data-p0\": \"form-header\" } as Record<string, string>),\n },\n props,\n ),\n });\n}\n"],"mappings":";;;;AAKA,SAAgB,eAAe,EAAE,UAAU,WAAW,QAAQ,GAAG,SAA8B;AAC7F,QAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WACL;GACE;GACA;GACM,WAAW;GAClB,EACD,MACD;EACF,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { PipeFormContent } from "./content.mjs";
|
|
2
|
+
import { PipeFormErrors } from "./errors.mjs";
|
|
2
3
|
import { PipeFormField } from "./field.mjs";
|
|
3
4
|
import { PipeFormFooter } from "./footer.mjs";
|
|
4
5
|
import { PipeFormGroup } from "./group.mjs";
|
|
5
6
|
import { PipeFormHeader } from "./header.mjs";
|
|
6
|
-
import { PipeForm, PipeFormInstanceProps,
|
|
7
|
+
import { PipeForm, PipeFormInstanceProps, PipeFormProps, PipeFormZeroConfigProps } from "./root.mjs";
|
|
7
8
|
import { PipeFormSection } from "./section.mjs";
|
|
8
9
|
import { PipeFormSubmitButton } from "./submit-button.mjs";
|
|
9
10
|
import { PipeFormTitle } from "./title.mjs";
|
|
@@ -1,35 +1,40 @@
|
|
|
1
|
+
import { FormHandle } from "../../../types/form-handle.mjs";
|
|
1
2
|
import { PipeFormContext } from "../../../context/pipe-form-context.mjs";
|
|
2
3
|
import { FieldAdapterMap, FormClassNames } from "../../../types/adapters.mjs";
|
|
3
4
|
import { GroupMap, PathMap, SectionMap } from "../../../types/form-customization.mjs";
|
|
4
5
|
import { ReactNode } from "react";
|
|
5
6
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
7
|
import { FormResolvers, PipeId, PipePayload, ValidationContext } from "@pipe0/base";
|
|
7
|
-
import { UseFormReturn } from "react-hook-form";
|
|
8
8
|
|
|
9
9
|
//#region src/components/compound/pipe-form/root.d.ts
|
|
10
10
|
type PipeFormSubmitHandler = (payload: PipePayload, ctx: {
|
|
11
|
-
form:
|
|
11
|
+
form: FormHandle<PipePayload>;
|
|
12
12
|
}) => void | Promise<void>;
|
|
13
|
-
interface
|
|
14
|
-
sectionMap?: SectionMap;
|
|
15
|
-
groupMap?: GroupMap;
|
|
16
|
-
pathMap?: PathMap;
|
|
13
|
+
interface RenderingProps {
|
|
17
14
|
classNames?: FormClassNames;
|
|
18
15
|
adapters?: FieldAdapterMap;
|
|
19
16
|
className?: string;
|
|
20
17
|
}
|
|
21
|
-
interface PipeFormInstanceProps extends
|
|
18
|
+
interface PipeFormInstanceProps extends RenderingProps {
|
|
22
19
|
context: PipeFormContext;
|
|
23
20
|
onSubmit: PipeFormSubmitHandler;
|
|
24
21
|
children?: ReactNode;
|
|
25
22
|
}
|
|
26
|
-
interface
|
|
23
|
+
interface PipeFormZeroConfigProps extends RenderingProps {
|
|
27
24
|
pipeId: PipeId;
|
|
28
25
|
publicKey: string;
|
|
29
26
|
onSubmit: PipeFormSubmitHandler;
|
|
30
27
|
defaultValues?: PipePayload;
|
|
31
28
|
validationContext?: ValidationContext;
|
|
32
29
|
resolvers?: FormResolvers;
|
|
30
|
+
/**
|
|
31
|
+
* Hide / relabel / reorder sections by section key. `null` hides a section.
|
|
32
|
+
* Forwarded to the internal `usePipeForm` call. For `<PipeForm context={...}>`,
|
|
33
|
+
* pass these to `usePipeForm` directly instead.
|
|
34
|
+
*/
|
|
35
|
+
sectionMap?: SectionMap;
|
|
36
|
+
groupMap?: GroupMap;
|
|
37
|
+
pathMap?: PathMap;
|
|
33
38
|
/**
|
|
34
39
|
* Form-level scope tags. Bundled into every `resolvers.getSecrets` call so
|
|
35
40
|
* the backend can return only the secrets allowed in the declared scopes.
|
|
@@ -42,15 +47,17 @@ interface PipeFormLegacyProps extends CustomizationProps {
|
|
|
42
47
|
teamId?: string;
|
|
43
48
|
children?: ReactNode;
|
|
44
49
|
}
|
|
45
|
-
type PipeFormProps = PipeFormInstanceProps |
|
|
50
|
+
type PipeFormProps = PipeFormInstanceProps | PipeFormZeroConfigProps;
|
|
46
51
|
/**
|
|
47
52
|
* Compound root for pipe forms.
|
|
48
53
|
*
|
|
49
54
|
* Two modes:
|
|
50
55
|
* - Compound: `<PipeForm context={ctx} onSubmit={...}>...</PipeForm>` — pass the context from `usePipeForm`.
|
|
51
|
-
*
|
|
56
|
+
* Visibility customization (`sectionMap`/`groupMap`/`pathMap`) lives on the hook in this mode.
|
|
57
|
+
* - Zero-config: `<PipeForm pipeId="..." publicKey="..." onSubmit={...} />` — fresh hook created
|
|
58
|
+
* internally; visibility maps may be passed as props and forward to that hook.
|
|
52
59
|
*/
|
|
53
60
|
declare function PipeForm(props: PipeFormProps): _$react_jsx_runtime0.JSX.Element;
|
|
54
61
|
//#endregion
|
|
55
|
-
export { PipeForm, PipeFormInstanceProps,
|
|
62
|
+
export { PipeForm, PipeFormInstanceProps, PipeFormProps, PipeFormZeroConfigProps };
|
|
56
63
|
//# sourceMappingURL=root.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/root.tsx"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"root.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/root.tsx"],"mappings":";;;;;;;;;KAoBY,qBAAA,IACV,OAAA,EAAS,WAAA,EACT,GAAA;EAAO,IAAA,EAAM,UAAA,CAAW,WAAA;AAAA,aACd,OAAA;AAAA,UAEF,cAAA;EACR,UAAA,GAAa,cAAA;EACb,QAAA,GAAW,eAAA;EACX,SAAA;AAAA;AAAA,UAGe,qBAAA,SAA8B,cAAA;EAC7C,OAAA,EAAS,eAAA;EACT,QAAA,EAAU,qBAAA;EACV,QAAA,GAAW,SAAA;AAAA;AAAA,UAGI,uBAAA,SAAgC,cAAA;EAC/C,MAAA,EAAQ,MAAA;EACR,SAAA;EACA,QAAA,EAAU,qBAAA;EACV,aAAA,GAAgB,WAAA;EAChB,iBAAA,GAAoB,iBAAA;EACpB,SAAA,GAAY,aAAA;EApBK;AAAO;;;;EA0BxB,UAAA,GAAa,UAAA;EACb,QAAA,GAAW,QAAA;EACX,OAAA,GAAU,OAAA;EAxBC;;;;EA6BX,MAAA;EAzBqC;;;;EA8BrC,MAAA;EACA,QAAA,GAAW,SAAA;AAAA;AAAA,KAGD,aAAA,GAAgB,qBAAA,GAAwB,uBAAA;;;;;;;;;;iBAWpC,QAAA,CAAS,KAAA,EAAO,aAAA,GAAa,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { PortalContainerContext } from "../../../context/portal-container-context.mjs";
|
|
2
|
-
import { FormCustomizationProvider, useFormCustomization } from "../../../context/form-customization-context.mjs";
|
|
3
2
|
import { PipeFormContext, usePipeFormContext } from "../../../context/pipe-form-context.mjs";
|
|
4
3
|
import { PipeFormContent } from "./content.mjs";
|
|
5
4
|
import { FormProvider, FormRoot } from "../../../context/form-provider.mjs";
|
|
6
5
|
import { usePipeForm } from "../../../hooks/use-pipe-form.mjs";
|
|
7
6
|
import { DefaultForm } from "../../defaults/layout/form.mjs";
|
|
8
7
|
import { PipeFormSubmitButton } from "./submit-button.mjs";
|
|
9
|
-
import { useCallback,
|
|
8
|
+
import { useCallback, useState } from "react";
|
|
10
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { validatePipesOrError } from "@pipe0/base";
|
|
12
11
|
|
|
@@ -16,17 +15,19 @@ import { validatePipesOrError } from "@pipe0/base";
|
|
|
16
15
|
*
|
|
17
16
|
* Two modes:
|
|
18
17
|
* - Compound: `<PipeForm context={ctx} onSubmit={...}>...</PipeForm>` — pass the context from `usePipeForm`.
|
|
19
|
-
*
|
|
18
|
+
* Visibility customization (`sectionMap`/`groupMap`/`pathMap`) lives on the hook in this mode.
|
|
19
|
+
* - Zero-config: `<PipeForm pipeId="..." publicKey="..." onSubmit={...} />` — fresh hook created
|
|
20
|
+
* internally; visibility maps may be passed as props and forward to that hook.
|
|
20
21
|
*/
|
|
21
22
|
function PipeForm(props) {
|
|
22
23
|
if ("context" in props) return /* @__PURE__ */ jsx(PipeFormWithContext, { ...props });
|
|
23
|
-
return /* @__PURE__ */ jsx(
|
|
24
|
+
return /* @__PURE__ */ jsx(PipeFormZeroConfig, { ...props });
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function PipeFormZeroConfig({ pipeId, publicKey, defaultValues, onSubmit, resolvers, scopes, teamId, sectionMap, groupMap, pathMap, validationContext = validatePipesOrError({
|
|
26
27
|
config: { environment: "production" },
|
|
27
28
|
pipes: [],
|
|
28
29
|
input: []
|
|
29
|
-
}), children,
|
|
30
|
+
}), children, classNames, adapters, className }) {
|
|
30
31
|
return /* @__PURE__ */ jsx(PipeFormWithContext, {
|
|
31
32
|
context: usePipeForm({
|
|
32
33
|
pipeId,
|
|
@@ -35,26 +36,26 @@ function PipeFormLegacy({ pipeId, publicKey, defaultValues, onSubmit, resolvers,
|
|
|
35
36
|
resolvers,
|
|
36
37
|
scopes,
|
|
37
38
|
teamId,
|
|
38
|
-
validationContext
|
|
39
|
+
validationContext,
|
|
40
|
+
sectionMap,
|
|
41
|
+
groupMap,
|
|
42
|
+
pathMap
|
|
39
43
|
}),
|
|
40
44
|
onSubmit,
|
|
41
|
-
|
|
45
|
+
className,
|
|
46
|
+
classNames,
|
|
47
|
+
adapters,
|
|
42
48
|
children
|
|
43
49
|
});
|
|
44
50
|
}
|
|
45
|
-
function PipeFormWithContext({ context, onSubmit, children, className,
|
|
51
|
+
function PipeFormWithContext({ context, onSubmit, children, className, classNames, adapters }) {
|
|
46
52
|
const hasLocalOverrides = classNames || adapters;
|
|
47
|
-
const inner = /* @__PURE__ */ jsx(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
children: /* @__PURE__ */ jsx(PipeFormShell, {
|
|
54
|
-
className,
|
|
55
|
-
onSubmit,
|
|
56
|
-
children
|
|
57
|
-
})
|
|
53
|
+
const inner = /* @__PURE__ */ jsx(PipeFormContext.Provider, {
|
|
54
|
+
value: context,
|
|
55
|
+
children: /* @__PURE__ */ jsx(PipeFormShell, {
|
|
56
|
+
className,
|
|
57
|
+
onSubmit,
|
|
58
|
+
children
|
|
58
59
|
})
|
|
59
60
|
});
|
|
60
61
|
if (hasLocalOverrides) return /* @__PURE__ */ jsx(FormRoot, { children: /* @__PURE__ */ jsx(FormProvider, {
|
|
@@ -65,14 +66,7 @@ function PipeFormWithContext({ context, onSubmit, children, className, sectionMa
|
|
|
65
66
|
return /* @__PURE__ */ jsx(FormRoot, { children: inner });
|
|
66
67
|
}
|
|
67
68
|
function PipeFormShell({ children, className, onSubmit }) {
|
|
68
|
-
const [, dispatch] = useFormCustomization();
|
|
69
69
|
const context = usePipeFormContext();
|
|
70
|
-
useEffect(() => {
|
|
71
|
-
if (!context.resolvers?.getConnections) dispatch({
|
|
72
|
-
type: "HIDE_SECTION",
|
|
73
|
-
payload: "connector"
|
|
74
|
-
});
|
|
75
|
-
}, [context.resolvers, dispatch]);
|
|
76
70
|
const [portalContainer, setPortalContainer] = useState(null);
|
|
77
71
|
const portalRef = useCallback((node) => {
|
|
78
72
|
setPortalContainer(node);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/root.tsx"],"sourcesContent":["import {\n type FormResolvers,\n type PipeId,\n type PipePayload,\n type ValidationContext,\n validatePipesOrError,\n} from \"@pipe0/base\";\nimport { type ReactNode, useCallback,
|
|
1
|
+
{"version":3,"file":"root.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/root.tsx"],"sourcesContent":["import {\n type FormResolvers,\n type PipeId,\n type PipePayload,\n type ValidationContext,\n validatePipesOrError,\n} from \"@pipe0/base\";\nimport { type ReactNode, useCallback, useState } from \"react\";\nimport { FormProvider, FormRoot } from \"../../../context/form-provider.js\";\nimport type { PipeFormContext as PipeFormContextValue } from \"../../../context/pipe-form-context.js\";\nimport { PipeFormContext, usePipeFormContext } from \"../../../context/pipe-form-context.js\";\nimport { PortalContainerContext } from \"../../../context/portal-container-context.js\";\nimport { usePipeForm } from \"../../../hooks/use-pipe-form.js\";\nimport type { FieldAdapterMap, FormClassNames } from \"../../../types/adapters.js\";\nimport type { GroupMap, PathMap, SectionMap } from \"../../../types/form-customization.js\";\nimport type { FormHandle } from \"../../../types/form-handle.js\";\nimport { DefaultForm } from \"../../defaults/layout/form.js\";\nimport { PipeFormContent } from \"./content.js\";\nimport { PipeFormSubmitButton } from \"./submit-button.js\";\n\nexport type PipeFormSubmitHandler = (\n payload: PipePayload,\n ctx: { form: FormHandle<PipePayload> },\n) => void | Promise<void>;\n\ninterface RenderingProps {\n classNames?: FormClassNames;\n adapters?: FieldAdapterMap;\n className?: string;\n}\n\nexport interface PipeFormInstanceProps extends RenderingProps {\n context: PipeFormContextValue;\n onSubmit: PipeFormSubmitHandler;\n children?: ReactNode;\n}\n\nexport interface PipeFormZeroConfigProps extends RenderingProps {\n pipeId: PipeId;\n publicKey: string;\n onSubmit: PipeFormSubmitHandler;\n defaultValues?: PipePayload;\n validationContext?: ValidationContext;\n resolvers?: FormResolvers;\n /**\n * Hide / relabel / reorder sections by section key. `null` hides a section.\n * Forwarded to the internal `usePipeForm` call. For `<PipeForm context={...}>`,\n * pass these to `usePipeForm` directly instead.\n */\n sectionMap?: SectionMap;\n groupMap?: GroupMap;\n pathMap?: PathMap;\n /**\n * Form-level scope tags. Bundled into every `resolvers.getSecrets` call so\n * the backend can return only the secrets allowed in the declared scopes.\n */\n scopes?: string[];\n /**\n * Current team context. Bundled into every `resolvers.getSecrets` call so\n * the backend can restrict team-level secrets to this team only.\n */\n teamId?: string;\n children?: ReactNode;\n}\n\nexport type PipeFormProps = PipeFormInstanceProps | PipeFormZeroConfigProps;\n\n/**\n * Compound root for pipe forms.\n *\n * Two modes:\n * - Compound: `<PipeForm context={ctx} onSubmit={...}>...</PipeForm>` — pass the context from `usePipeForm`.\n * Visibility customization (`sectionMap`/`groupMap`/`pathMap`) lives on the hook in this mode.\n * - Zero-config: `<PipeForm pipeId=\"...\" publicKey=\"...\" onSubmit={...} />` — fresh hook created\n * internally; visibility maps may be passed as props and forward to that hook.\n */\nexport function PipeForm(props: PipeFormProps) {\n if (\"context\" in props) {\n return <PipeFormWithContext {...props} />;\n }\n return <PipeFormZeroConfig {...props} />;\n}\n\nfunction PipeFormZeroConfig({\n pipeId,\n publicKey,\n defaultValues,\n onSubmit,\n resolvers,\n scopes,\n teamId,\n sectionMap,\n groupMap,\n pathMap,\n validationContext = validatePipesOrError({\n config: { environment: \"production\" },\n pipes: [],\n input: [],\n }),\n children,\n classNames,\n adapters,\n className,\n}: PipeFormZeroConfigProps) {\n const context = usePipeForm({\n pipeId,\n publicKey,\n defaultValues,\n resolvers,\n scopes,\n teamId,\n validationContext,\n sectionMap,\n groupMap,\n pathMap,\n });\n\n return (\n <PipeFormWithContext\n context={context}\n onSubmit={onSubmit}\n className={className}\n classNames={classNames}\n adapters={adapters}\n >\n {children}\n </PipeFormWithContext>\n );\n}\n\nfunction PipeFormWithContext({\n context,\n onSubmit,\n children,\n className,\n classNames,\n adapters,\n}: PipeFormInstanceProps) {\n const hasLocalOverrides = classNames || adapters;\n\n const inner = (\n <PipeFormContext.Provider value={context}>\n <PipeFormShell className={className} onSubmit={onSubmit}>\n {children}\n </PipeFormShell>\n </PipeFormContext.Provider>\n );\n\n if (hasLocalOverrides) {\n return (\n <FormRoot>\n <FormProvider classNames={classNames} adapters={adapters}>\n {inner}\n </FormProvider>\n </FormRoot>\n );\n }\n\n return <FormRoot>{inner}</FormRoot>;\n}\n\nfunction PipeFormShell({\n children,\n className,\n onSubmit,\n}: {\n children?: ReactNode;\n className?: string;\n onSubmit: PipeFormSubmitHandler;\n}) {\n const context = usePipeFormContext();\n\n const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(null);\n const portalRef = useCallback((node: HTMLElement | null) => {\n setPortalContainer(node);\n }, []);\n\n const body = children ?? (\n <>\n <PipeFormContent />\n <PipeFormSubmitButton />\n </>\n );\n\n const handleFormSubmit = context.form.handleSubmit(async (values) => {\n await onSubmit(values, { form: context.form });\n });\n\n return (\n <DefaultForm\n onSubmit={handleFormSubmit}\n ref={portalRef}\n data-p0=\"form\"\n data-p0-pipe={context.id}\n className={className}\n >\n <PortalContainerContext.Provider value={portalContainer}>\n {body}\n </PortalContainerContext.Provider>\n </DefaultForm>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4EA,SAAgB,SAAS,OAAsB;AAC7C,KAAI,aAAa,MACf,QAAO,oBAAC,qBAAD,EAAqB,GAAI,OAAS;AAE3C,QAAO,oBAAC,oBAAD,EAAoB,GAAI,OAAS;;AAG1C,SAAS,mBAAmB,EAC1B,QACA,WACA,eACA,UACA,WACA,QACA,QACA,YACA,UACA,SACA,oBAAoB,qBAAqB;CACvC,QAAQ,EAAE,aAAa,cAAc;CACrC,OAAO,EAAE;CACT,OAAO,EAAE;CACV,CAAC,EACF,UACA,YACA,UACA,aAC0B;AAc1B,QACE,oBAAC,qBAAD;EACE,SAfY,YAAY;GAC1B;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC;EAKY;EACC;EACC;EACF;EAET;EACmB;;AAI1B,SAAS,oBAAoB,EAC3B,SACA,UACA,UACA,WACA,YACA,YACwB;CACxB,MAAM,oBAAoB,cAAc;CAExC,MAAM,QACJ,oBAAC,gBAAgB,UAAjB;EAA0B,OAAO;YAC/B,oBAAC,eAAD;GAA0B;GAAqB;GAC5C;GACa;EACS;AAG7B,KAAI,kBACF,QACE,oBAAC,UAAD,YACE,oBAAC,cAAD;EAA0B;EAAsB;YAC7C;EACY,GACN;AAIf,QAAO,oBAAC,UAAD,YAAW,OAAiB;;AAGrC,SAAS,cAAc,EACrB,UACA,WACA,YAKC;CACD,MAAM,UAAU,oBAAoB;CAEpC,MAAM,CAAC,iBAAiB,sBAAsB,SAA6B,KAAK;CAChF,MAAM,YAAY,aAAa,SAA6B;AAC1D,qBAAmB,KAAK;IACvB,EAAE,CAAC;CAEN,MAAM,OAAO,YACX,8CACE,oBAAC,iBAAD,EAAmB,GACnB,oBAAC,sBAAD,EAAwB,EACvB;AAOL,QACE,oBAAC,aAAD;EACE,UANqB,QAAQ,KAAK,aAAa,OAAO,WAAW;AACnE,SAAM,SAAS,QAAQ,EAAE,MAAM,QAAQ,MAAM,CAAC;IAC9C;EAKE,KAAK;EACL,WAAQ;EACR,gBAAc,QAAQ;EACX;YAEX,oBAAC,uBAAuB,UAAxB;GAAiC,OAAO;aACrC;GAC+B;EACtB"}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as _$
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import * as _$react from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/compound/pipe-form/submit-button.d.ts
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
interface PipeFormSubmitButtonState {
|
|
6
|
+
isSubmitting: boolean;
|
|
7
|
+
isFieldLoaderLoading: boolean;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface PipeFormSubmitButtonProps extends useRender.ComponentProps<"button", PipeFormSubmitButtonState> {}
|
|
11
|
+
declare function PipeFormSubmitButton({
|
|
12
|
+
className,
|
|
13
|
+
children,
|
|
14
|
+
render,
|
|
15
|
+
disabled: disabledProp,
|
|
16
|
+
...props
|
|
17
|
+
}: PipeFormSubmitButtonProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
7
18
|
//#endregion
|
|
8
19
|
export { PipeFormSubmitButton };
|
|
9
20
|
//# sourceMappingURL=submit-button.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit-button.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/submit-button.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"submit-button.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-form/submit-button.tsx"],"mappings":";;;;UAMiB,yBAAA;EACf,YAAA;EACA,oBAAA;EACA,QAAA;AAAA;AAAA,UAGe,yBAAA,SACP,SAAA,CAAU,cAAA,WAAyB,yBAAA;AAAA,iBAE7B,oBAAA,CAAA;EACd,SAAA;EACA,QAAA;EACA,MAAA;EACA,QAAA,EAAU,YAAA;EAAA,GACP;AAAA,GACF,yBAAA,GAAyB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|
|
@@ -1,14 +1,29 @@
|
|
|
1
|
+
import { cn } from "../../../lib/utils.mjs";
|
|
2
|
+
import { buttonVariants } from "../../ui/button.mjs";
|
|
1
3
|
import { usePipeFormContext } from "../../../context/pipe-form-context.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
6
|
|
|
5
7
|
//#region src/components/compound/pipe-form/submit-button.tsx
|
|
6
|
-
function PipeFormSubmitButton(props) {
|
|
7
|
-
const { form,
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
function PipeFormSubmitButton({ className, children, render, disabled: disabledProp, ...props }) {
|
|
9
|
+
const { form, isFieldLoaderLoading } = usePipeFormContext();
|
|
10
|
+
const isSubmitting = form.formState.isSubmitting;
|
|
11
|
+
const disabled = disabledProp ?? (isSubmitting || isFieldLoaderLoading);
|
|
12
|
+
return useRender({
|
|
13
|
+
defaultTagName: "button",
|
|
14
|
+
render,
|
|
15
|
+
state: {
|
|
16
|
+
isSubmitting,
|
|
17
|
+
isFieldLoaderLoading,
|
|
18
|
+
disabled
|
|
19
|
+
},
|
|
20
|
+
props: mergeProps({
|
|
21
|
+
type: "submit",
|
|
22
|
+
disabled,
|
|
23
|
+
className: cn(buttonVariants({}), className),
|
|
24
|
+
children: children ?? (isSubmitting ? "Submitting..." : "Submit"),
|
|
25
|
+
"data-p0": "submit"
|
|
26
|
+
}, props)
|
|
12
27
|
});
|
|
13
28
|
}
|
|
14
29
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit-button.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/submit-button.tsx"],"sourcesContent":["import { usePipeFormContext } from \"../../../context/pipe-form-context.js\";\nimport {\
|
|
1
|
+
{"version":3,"file":"submit-button.mjs","names":[],"sources":["../../../../src/components/compound/pipe-form/submit-button.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { usePipeFormContext } from \"../../../context/pipe-form-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport { buttonVariants } from \"../../ui/button.js\";\n\nexport interface PipeFormSubmitButtonState {\n isSubmitting: boolean;\n isFieldLoaderLoading: boolean;\n disabled: boolean;\n}\n\nexport interface PipeFormSubmitButtonProps\n extends useRender.ComponentProps<\"button\", PipeFormSubmitButtonState> {}\n\nexport function PipeFormSubmitButton({\n className,\n children,\n render,\n disabled: disabledProp,\n ...props\n}: PipeFormSubmitButtonProps) {\n const { form, isFieldLoaderLoading } = usePipeFormContext();\n const isSubmitting = form.formState.isSubmitting;\n const disabled = disabledProp ?? (isSubmitting || isFieldLoaderLoading);\n\n return useRender({\n defaultTagName: \"button\",\n render,\n state: { isSubmitting, isFieldLoaderLoading, disabled },\n props: mergeProps<\"button\">(\n {\n type: \"submit\",\n disabled,\n className: cn(buttonVariants({}), className),\n children: children ?? (isSubmitting ? \"Submitting...\" : \"Submit\"),\n ...({ \"data-p0\": \"submit\" } as Record<string, string>),\n },\n props,\n ),\n });\n}\n"],"mappings":";;;;;;;AAeA,SAAgB,qBAAqB,EACnC,WACA,UACA,QACA,UAAU,cACV,GAAG,SACyB;CAC5B,MAAM,EAAE,MAAM,yBAAyB,oBAAoB;CAC3D,MAAM,eAAe,KAAK,UAAU;CACpC,MAAM,WAAW,iBAAiB,gBAAgB;AAElD,QAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO;GAAE;GAAc;GAAsB;GAAU;EACvD,OAAO,WACL;GACE,MAAM;GACN;GACA,WAAW,GAAG,eAAe,EAAE,CAAC,EAAE,UAAU;GAC5C,UAAU,aAAa,eAAe,kBAAkB;GAClD,WAAW;GAClB,EACD,MACD;EACF,CAAC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as _$
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import * as _$react from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/compound/pipe-form/title.d.ts
|
|
5
|
+
interface PipeFormTitleProps extends useRender.ComponentProps<"h2"> {
|
|
6
|
+
label?: string;
|
|
7
|
+
}
|
|
5
8
|
declare function PipeFormTitle({
|
|
6
9
|
children,
|
|
7
10
|
label,
|
|
8
|
-
className
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
className?: string;
|
|
13
|
-
}): _$react_jsx_runtime0.JSX.Element;
|
|
11
|
+
className,
|
|
12
|
+
render,
|
|
13
|
+
...props
|
|
14
|
+
}: PipeFormTitleProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
14
15
|
//#endregion
|
|
15
16
|
export { PipeFormTitle };
|
|
16
17
|
//# sourceMappingURL=title.d.mts.map
|