@btst/stack 2.5.6 → 2.6.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/README.md +23 -0
- package/dist/client/components/index.d.cts +9 -9
- package/dist/client/components/index.d.mts +9 -9
- package/dist/client/components/index.d.ts +9 -9
- package/dist/components/auto-form/index.cjs +8 -0
- package/dist/components/auto-form/index.d.cts +26 -0
- package/dist/components/auto-form/index.d.mts +26 -0
- package/dist/components/auto-form/index.d.ts +26 -0
- package/dist/components/auto-form/index.mjs +1 -0
- package/dist/components/empty/index.cjs +12 -0
- package/dist/components/empty/index.d.cts +15 -0
- package/dist/components/empty/index.d.mts +15 -0
- package/dist/components/empty/index.d.ts +15 -0
- package/dist/components/empty/index.mjs +1 -0
- package/dist/components/form-builder/index.cjs +16 -0
- package/dist/components/form-builder/index.d.cts +385 -0
- package/dist/components/form-builder/index.d.mts +385 -0
- package/dist/components/form-builder/index.d.ts +385 -0
- package/dist/components/form-builder/index.mjs +4 -0
- package/dist/components/markdown/index.cjs +9 -0
- package/dist/components/markdown/index.d.cts +30 -0
- package/dist/components/markdown/index.d.mts +30 -0
- package/dist/components/markdown/index.d.ts +30 -0
- package/dist/components/markdown/index.mjs +2 -0
- package/dist/components/markdown/style.css +394 -0
- package/dist/components/minimal-tiptap/style.css +548 -0
- package/dist/components/multi-select/index.cjs +7 -0
- package/dist/components/multi-select/index.d.cts +78 -0
- package/dist/components/multi-select/index.d.mts +78 -0
- package/dist/components/multi-select/index.d.ts +78 -0
- package/dist/components/multi-select/index.mjs +1 -0
- package/dist/components/search-select/index.cjs +7 -0
- package/dist/components/search-select/index.d.cts +15 -0
- package/dist/components/search-select/index.d.mts +15 -0
- package/dist/components/search-select/index.d.ts +15 -0
- package/dist/components/search-select/index.mjs +1 -0
- package/dist/components/stepped-auto-form/index.cjs +7 -0
- package/dist/components/stepped-auto-form/index.d.cts +37 -0
- package/dist/components/stepped-auto-form/index.d.mts +37 -0
- package/dist/components/stepped-auto-form/index.d.ts +37 -0
- package/dist/components/stepped-auto-form/index.mjs +1 -0
- package/dist/components/ui-builder/style.css +552 -0
- package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.cjs +1 -1
- package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +1 -1
- package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs +2 -2
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +3 -3
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +1 -1
- package/dist/packages/stack/src/plugins/ai-chat/client/components/shared/default-error.cjs +1 -1
- package/dist/packages/stack/src/plugins/ai-chat/client/components/shared/default-error.mjs +1 -1
- package/dist/packages/stack/src/plugins/ai-chat/client/plugin.cjs +44 -35
- package/dist/packages/stack/src/plugins/ai-chat/client/plugin.mjs +44 -35
- package/dist/packages/stack/src/plugins/blog/client/components/forms/markdown-editor-with-overrides.cjs +23 -0
- package/dist/packages/stack/src/plugins/blog/client/components/forms/markdown-editor-with-overrides.mjs +21 -0
- package/dist/packages/stack/src/plugins/blog/client/components/forms/markdown-editor.cjs +11 -12
- package/dist/packages/stack/src/plugins/blog/client/components/forms/markdown-editor.mjs +11 -12
- package/dist/packages/stack/src/plugins/blog/client/components/forms/post-forms.cjs +2 -2
- package/dist/packages/stack/src/plugins/blog/client/components/forms/post-forms.mjs +2 -2
- package/dist/packages/stack/src/plugins/blog/client/components/shared/default-error.cjs +1 -1
- package/dist/packages/stack/src/plugins/blog/client/components/shared/default-error.mjs +1 -1
- package/dist/packages/stack/src/plugins/blog/client/components/shared/search-input.cjs +0 -3
- package/dist/packages/stack/src/plugins/blog/client/components/shared/search-input.mjs +1 -1
- package/dist/packages/stack/src/plugins/blog/client/components/shared/search-modal.cjs +0 -3
- package/dist/packages/stack/src/plugins/blog/client/components/shared/search-modal.mjs +1 -1
- package/dist/packages/stack/src/plugins/blog/client/hooks/use-debounce.cjs +22 -0
- package/dist/packages/stack/src/plugins/blog/client/hooks/use-debounce.mjs +23 -2
- package/dist/packages/stack/src/plugins/blog/client/plugin.cjs +12 -6
- package/dist/packages/stack/src/plugins/blog/client/plugin.mjs +12 -6
- package/dist/packages/stack/src/plugins/cms/client/components/shared/default-error.cjs +1 -1
- package/dist/packages/stack/src/plugins/cms/client/components/shared/default-error.mjs +1 -1
- package/dist/packages/stack/src/plugins/cms/client/plugin.cjs +38 -26
- package/dist/packages/stack/src/plugins/cms/client/plugin.mjs +38 -26
- package/dist/packages/stack/src/plugins/form-builder/client/components/shared/default-error.cjs +1 -1
- package/dist/packages/stack/src/plugins/form-builder/client/components/shared/default-error.mjs +1 -1
- package/dist/packages/stack/src/plugins/form-builder/client/plugin.cjs +32 -20
- package/dist/packages/stack/src/plugins/form-builder/client/plugin.mjs +32 -20
- package/dist/packages/stack/src/plugins/kanban/client/components/shared/default-error.cjs +1 -1
- package/dist/packages/stack/src/plugins/kanban/client/components/shared/default-error.mjs +1 -1
- package/dist/packages/stack/src/plugins/kanban/client/plugin.cjs +6 -3
- package/dist/packages/stack/src/plugins/kanban/client/plugin.mjs +6 -3
- package/dist/packages/stack/src/plugins/ui-builder/client/components/page-renderer.cjs +1 -1
- package/dist/packages/stack/src/plugins/ui-builder/client/components/page-renderer.mjs +1 -1
- package/dist/packages/stack/src/plugins/ui-builder/client/components/shared/default-error.cjs +1 -1
- package/dist/packages/stack/src/plugins/ui-builder/client/components/shared/default-error.mjs +1 -1
- package/dist/packages/stack/src/plugins/ui-builder/client/plugin.cjs +24 -15
- package/dist/packages/stack/src/plugins/ui-builder/client/plugin.mjs +24 -15
- package/dist/packages/ui/src/components/auto-form/index.cjs +12 -2
- package/dist/packages/ui/src/components/auto-form/index.mjs +9 -2
- package/dist/packages/ui/src/components/auto-form/stepped-auto-form.cjs +2 -2
- package/dist/packages/ui/src/components/empty.cjs +28 -0
- package/dist/packages/ui/src/components/empty.mjs +27 -1
- package/dist/packages/ui/src/components/form-builder/components/index.mjs +2 -2
- package/dist/packages/ui/src/components/form-builder/edit-field-dialog.cjs +1 -1
- package/dist/packages/ui/src/components/form-builder/index.mjs +2 -2
- package/dist/packages/ui/src/components/form.mjs +1 -1
- package/dist/packages/ui/src/components/kanban.mjs +1 -1
- package/dist/packages/ui/src/components/multi-select.mjs +2 -2
- package/dist/packages/ui/src/components/search-select.cjs +13 -3
- package/dist/packages/ui/src/components/search-select.mjs +14 -4
- package/dist/packages/ui/src/components/ui-builder/internal/config-panel.cjs +1 -1
- package/dist/packages/ui/src/components/ui-builder/internal/props-panel.cjs +1 -1
- package/dist/plugins/ai-chat/client/index.d.cts +17 -4
- package/dist/plugins/ai-chat/client/index.d.mts +17 -4
- package/dist/plugins/ai-chat/client/index.d.ts +17 -4
- package/dist/plugins/blog/api/index.d.cts +2 -2
- package/dist/plugins/blog/api/index.d.mts +2 -2
- package/dist/plugins/blog/api/index.d.ts +2 -2
- package/dist/plugins/blog/client/hooks/index.cjs +3 -0
- package/dist/plugins/blog/client/hooks/index.d.cts +7 -226
- package/dist/plugins/blog/client/hooks/index.d.mts +7 -226
- package/dist/plugins/blog/client/hooks/index.d.ts +7 -226
- package/dist/plugins/blog/client/hooks/index.mjs +1 -0
- package/dist/plugins/blog/client/index.d.cts +46 -22
- package/dist/plugins/blog/client/index.d.mts +46 -22
- package/dist/plugins/blog/client/index.d.ts +46 -22
- package/dist/plugins/blog/query-keys.d.cts +2 -2
- package/dist/plugins/blog/query-keys.d.mts +2 -2
- package/dist/plugins/blog/query-keys.d.ts +2 -2
- package/dist/plugins/cms/client/index.d.cts +36 -15
- package/dist/plugins/cms/client/index.d.mts +36 -15
- package/dist/plugins/cms/client/index.d.ts +36 -15
- package/dist/plugins/form-builder/client/components/index.d.cts +2 -2
- package/dist/plugins/form-builder/client/components/index.d.mts +2 -2
- package/dist/plugins/form-builder/client/components/index.d.ts +2 -2
- package/dist/plugins/form-builder/client/index.d.cts +33 -15
- package/dist/plugins/form-builder/client/index.d.mts +33 -15
- package/dist/plugins/form-builder/client/index.d.ts +33 -15
- package/dist/plugins/kanban/api/index.d.cts +1 -1
- package/dist/plugins/kanban/api/index.d.mts +1 -1
- package/dist/plugins/kanban/api/index.d.ts +1 -1
- package/dist/plugins/kanban/client/components/index.d.cts +5 -5
- package/dist/plugins/kanban/client/components/index.d.mts +5 -5
- package/dist/plugins/kanban/client/components/index.d.ts +5 -5
- package/dist/plugins/kanban/client/index.d.cts +25 -10
- package/dist/plugins/kanban/client/index.d.mts +25 -10
- package/dist/plugins/kanban/client/index.d.ts +25 -10
- package/dist/plugins/kanban/query-keys.d.cts +1 -1
- package/dist/plugins/kanban/query-keys.d.mts +1 -1
- package/dist/plugins/kanban/query-keys.d.ts +1 -1
- package/dist/plugins/route-docs/client/index.d.cts +4 -4
- package/dist/plugins/route-docs/client/index.d.mts +4 -4
- package/dist/plugins/route-docs/client/index.d.ts +4 -4
- package/dist/plugins/ui-builder/client/components/index.d.cts +3 -3
- package/dist/plugins/ui-builder/client/components/index.d.mts +3 -3
- package/dist/plugins/ui-builder/client/components/index.d.ts +3 -3
- package/dist/plugins/ui-builder/client/hooks/index.d.cts +3 -3
- package/dist/plugins/ui-builder/client/hooks/index.d.mts +3 -3
- package/dist/plugins/ui-builder/client/hooks/index.d.ts +3 -3
- package/dist/plugins/ui-builder/client/index.d.cts +32 -18
- package/dist/plugins/ui-builder/client/index.d.mts +32 -18
- package/dist/plugins/ui-builder/client/index.d.ts +32 -18
- package/dist/plugins/ui-builder/index.d.cts +3 -3
- package/dist/plugins/ui-builder/index.d.mts +3 -3
- package/dist/plugins/ui-builder/index.d.ts +3 -3
- package/dist/shared/{stack.B2DwzF3r.d.ts → stack.ASwEoINr.d.ts} +1 -1
- package/dist/shared/{stack.C5ZSOJGJ.d.cts → stack.B1srlBud.d.mts} +1 -1
- package/dist/shared/stack.B8vT-Yt4.d.mts +228 -0
- package/dist/shared/stack.BAT540yW.d.ts +228 -0
- package/dist/shared/{stack.D0QupDcQ.d.ts → stack.BK9Z2dcL.d.ts} +1 -1
- package/dist/shared/stack.BwA7trxA.d.cts +228 -0
- package/dist/shared/{stack.Cl7ok_cY.d.cts → stack.CFECM0ew.d.cts} +1 -1
- package/dist/shared/stack.CZMWR72v.d.cts +10 -0
- package/dist/shared/stack.CZMWR72v.d.mts +10 -0
- package/dist/shared/stack.CZMWR72v.d.ts +10 -0
- package/dist/shared/{stack.VMmQdbsJ.d.mts → stack.DVtk5CNw.d.mts} +1 -1
- package/dist/shared/{stack.B8_74ror.d.ts → stack.DXnclTG7.d.ts} +4 -4
- package/dist/shared/{stack.C21-LFX8.d.cts → stack.DaZM10cp.d.cts} +4 -4
- package/dist/shared/{stack.Dq4qVr1F.d.mts → stack.DmpPDPxA.d.cts} +1 -1
- package/dist/shared/{stack.CL4mKxe7.d.mts → stack.cfCkioTe.d.mts} +4 -4
- package/dist/shared/stack.fdi94T4S.d.cts +291 -0
- package/dist/shared/stack.fdi94T4S.d.mts +291 -0
- package/dist/shared/stack.fdi94T4S.d.ts +291 -0
- package/package.json +115 -4
- package/src/__tests__/page-component-overrides.test.tsx +147 -0
- package/src/components/auto-form/index.ts +12 -0
- package/src/components/empty/index.ts +8 -0
- package/src/components/form-builder/index.ts +23 -0
- package/src/components/kanban/index.ts +9 -0
- package/src/components/markdown/index.ts +5 -0
- package/src/components/markdown/style.css +3 -0
- package/src/components/minimal-tiptap/index.ts +5 -0
- package/src/components/minimal-tiptap/style.css +1 -0
- package/src/components/multi-select/index.ts +5 -0
- package/src/components/search-select/index.ts +1 -0
- package/src/components/stepped-auto-form/index.ts +5 -0
- package/src/components/ui-builder/index.ts +50 -0
- package/src/components/ui-builder/style.css +5 -0
- package/src/plugins/ai-chat/client/components/shared/default-error.tsx +1 -1
- package/src/plugins/ai-chat/client/plugin.tsx +60 -32
- package/src/plugins/blog/client/components/forms/markdown-editor-with-overrides.tsx +29 -0
- package/src/plugins/blog/client/components/forms/markdown-editor.tsx +24 -21
- package/src/plugins/blog/client/components/forms/post-forms.tsx +2 -2
- package/src/plugins/blog/client/components/shared/default-error.tsx +2 -1
- package/src/plugins/blog/client/components/shared/posts-list.tsx +1 -1
- package/src/plugins/blog/client/components/shared/search-input.tsx +0 -2
- package/src/plugins/blog/client/components/shared/search-modal.tsx +0 -2
- package/src/plugins/blog/client/hooks/index.tsx +1 -0
- package/src/plugins/blog/client/plugin.tsx +41 -6
- package/src/plugins/cms/client/components/shared/default-error.tsx +3 -2
- package/src/plugins/cms/client/plugin.tsx +65 -32
- package/src/plugins/form-builder/client/components/shared/default-error.tsx +3 -2
- package/src/plugins/form-builder/client/plugin.tsx +56 -23
- package/src/plugins/kanban/client/components/shared/default-error.tsx +3 -2
- package/src/plugins/kanban/client/plugin.tsx +23 -3
- package/src/plugins/ui-builder/client/components/page-renderer.tsx +5 -3
- package/src/plugins/ui-builder/client/components/shared/default-error.tsx +3 -2
- package/src/plugins/ui-builder/client/plugin.tsx +41 -15
- package/dist/shared/stack.8nldKomx.d.cts +0 -114
- package/dist/shared/stack.8nldKomx.d.mts +0 -114
- package/dist/shared/stack.8nldKomx.d.ts +0 -114
- package/dist/shared/{stack.CxNeGV2z.d.mts → stack.B8D4r97Z.d.mts} +6 -6
- package/dist/shared/{stack.BWp0hcm9.d.cts → stack.BQmuNl5p.d.cts} +3 -3
- package/dist/shared/{stack.BWp0hcm9.d.mts → stack.BQmuNl5p.d.mts} +3 -3
- package/dist/shared/{stack.BWp0hcm9.d.ts → stack.BQmuNl5p.d.ts} +3 -3
- package/dist/shared/{stack.BFcg0tDz.d.ts → stack.DgKOwl20.d.ts} +6 -6
- package/dist/shared/{stack.DSxTDZBQ.d.cts → stack.uWSqCWAb.d.cts} +6 -6
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Command as Command$1 } from 'cmdk';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
|
|
7
|
+
interface Option {
|
|
8
|
+
value: string;
|
|
9
|
+
label: string;
|
|
10
|
+
disable?: boolean;
|
|
11
|
+
/** fixed option that can't be removed. */
|
|
12
|
+
fixed?: boolean;
|
|
13
|
+
/** Group the options by providing key. */
|
|
14
|
+
[key: string]: string | boolean | undefined;
|
|
15
|
+
}
|
|
16
|
+
interface MultipleSelectorProps {
|
|
17
|
+
value?: Option[];
|
|
18
|
+
defaultOptions?: Option[];
|
|
19
|
+
/** manually controlled options */
|
|
20
|
+
options?: Option[];
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
/** Loading component. */
|
|
23
|
+
loadingIndicator?: React.ReactNode;
|
|
24
|
+
/** Empty component. */
|
|
25
|
+
emptyIndicator?: React.ReactNode;
|
|
26
|
+
/** Debounce time for async search. Only work with `onSearch`. */
|
|
27
|
+
delay?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Only work with `onSearch` prop. Trigger search when `onFocus`.
|
|
30
|
+
* For example, when user click on the input, it will trigger the search to get initial options.
|
|
31
|
+
**/
|
|
32
|
+
triggerSearchOnFocus?: boolean;
|
|
33
|
+
/** async search */
|
|
34
|
+
onSearch?: (value: string) => Promise<Option[]>;
|
|
35
|
+
/**
|
|
36
|
+
* sync search. This search will not showing loadingIndicator.
|
|
37
|
+
* The rest props are the same as async search.
|
|
38
|
+
* i.e.: creatable, groupBy, delay.
|
|
39
|
+
**/
|
|
40
|
+
onSearchSync?: (value: string) => Option[];
|
|
41
|
+
onChange?: (options: Option[]) => void;
|
|
42
|
+
/** Limit the maximum number of selected options. */
|
|
43
|
+
maxSelected?: number;
|
|
44
|
+
/** When the number of selected options exceeds the limit, the onMaxSelected will be called. */
|
|
45
|
+
onMaxSelected?: (maxLimit: number) => void;
|
|
46
|
+
/** Hide the placeholder when there are options selected. */
|
|
47
|
+
hidePlaceholderWhenSelected?: boolean;
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
/** Group the options base on provided key. */
|
|
50
|
+
groupBy?: string;
|
|
51
|
+
className?: string;
|
|
52
|
+
badgeClassName?: string;
|
|
53
|
+
/**
|
|
54
|
+
* First item selected is a default behavior by cmdk. That is why the default is true.
|
|
55
|
+
* This is a workaround solution by add a dummy item.
|
|
56
|
+
*
|
|
57
|
+
* @reference: https://github.com/pacocoursey/cmdk/issues/171
|
|
58
|
+
*/
|
|
59
|
+
selectFirstItem?: boolean;
|
|
60
|
+
/** Allow user to create option when there is no option matched. */
|
|
61
|
+
creatable?: boolean;
|
|
62
|
+
/** Props of `Command` */
|
|
63
|
+
commandProps?: React.ComponentPropsWithoutRef<typeof Command>;
|
|
64
|
+
/** Props of `CommandInput` */
|
|
65
|
+
inputProps?: Omit<React.ComponentPropsWithoutRef<typeof Command$1.Input>, "value" | "placeholder" | "disabled">;
|
|
66
|
+
/** hide the clear all button. */
|
|
67
|
+
hideClearAllButton?: boolean;
|
|
68
|
+
}
|
|
69
|
+
interface MultipleSelectorRef {
|
|
70
|
+
selectedValue: Option[];
|
|
71
|
+
input: HTMLInputElement;
|
|
72
|
+
focus: () => void;
|
|
73
|
+
reset: () => void;
|
|
74
|
+
}
|
|
75
|
+
declare const MultipleSelector: React.ForwardRefExoticComponent<MultipleSelectorProps & React.RefAttributes<MultipleSelectorRef>>;
|
|
76
|
+
|
|
77
|
+
export { MultipleSelector };
|
|
78
|
+
export type { MultipleSelectorRef, Option };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as MultipleSelector } from '../../packages/ui/src/components/multi-select.mjs';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface Option {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
declare function SearchSelect({ options, value, onChange, placeholder, emptyMessage, }: {
|
|
8
|
+
options: Option[];
|
|
9
|
+
value: string;
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
emptyMessage?: string;
|
|
13
|
+
}): react_jsx_runtime.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { SearchSelect };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface Option {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
declare function SearchSelect({ options, value, onChange, placeholder, emptyMessage, }: {
|
|
8
|
+
options: Option[];
|
|
9
|
+
value: string;
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
emptyMessage?: string;
|
|
13
|
+
}): react_jsx_runtime.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { SearchSelect };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface Option {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
declare function SearchSelect({ options, value, onChange, placeholder, emptyMessage, }: {
|
|
8
|
+
options: Option[];
|
|
9
|
+
value: string;
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
emptyMessage?: string;
|
|
13
|
+
}): react_jsx_runtime.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { SearchSelect };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SearchSelect } from '../../packages/ui/src/components/search-select.mjs';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
5
|
+
import { a as FieldConfig } from '../../shared/stack.fdi94T4S.cjs';
|
|
6
|
+
import { Z as ZodObjectOrWrapped } from '../../shared/stack.CZMWR72v.cjs';
|
|
7
|
+
|
|
8
|
+
interface StepperComponentProps {
|
|
9
|
+
steps: Array<{
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}>;
|
|
13
|
+
currentStepIndex: number;
|
|
14
|
+
currentStepId: string;
|
|
15
|
+
onStepClick?: (stepId: string) => void;
|
|
16
|
+
isFirst: boolean;
|
|
17
|
+
isLast: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface SteppedAutoFormProps<SchemaType extends ZodObjectOrWrapped> {
|
|
20
|
+
formSchema: SchemaType;
|
|
21
|
+
values?: Partial<z.infer<SchemaType>>;
|
|
22
|
+
onValuesChange?: (values: Partial<z.infer<SchemaType>>, form?: UseFormReturn<z.infer<SchemaType>>) => void;
|
|
23
|
+
onSubmit?: (values: z.infer<SchemaType>) => void;
|
|
24
|
+
fieldConfig?: FieldConfig<z.infer<SchemaType>>;
|
|
25
|
+
children?: React__default.ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
nextButtonText?: string;
|
|
28
|
+
backButtonText?: string;
|
|
29
|
+
submitButtonText?: string;
|
|
30
|
+
StepperComponent?: React__default.ComponentType<StepperComponentProps>;
|
|
31
|
+
/** Whether the form is currently submitting. Disables submit/next buttons to prevent duplicate submissions. */
|
|
32
|
+
isSubmitting?: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare function SteppedAutoForm<SchemaType extends ZodObjectOrWrapped>({ formSchema, values: initialValues, onValuesChange, onSubmit, fieldConfig, children, className, nextButtonText, backButtonText, submitButtonText, StepperComponent, isSubmitting, }: SteppedAutoFormProps<SchemaType>): react_jsx_runtime.JSX.Element | null;
|
|
35
|
+
|
|
36
|
+
export { SteppedAutoForm };
|
|
37
|
+
export type { SteppedAutoFormProps, StepperComponentProps };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
5
|
+
import { a as FieldConfig } from '../../shared/stack.fdi94T4S.mjs';
|
|
6
|
+
import { Z as ZodObjectOrWrapped } from '../../shared/stack.CZMWR72v.mjs';
|
|
7
|
+
|
|
8
|
+
interface StepperComponentProps {
|
|
9
|
+
steps: Array<{
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}>;
|
|
13
|
+
currentStepIndex: number;
|
|
14
|
+
currentStepId: string;
|
|
15
|
+
onStepClick?: (stepId: string) => void;
|
|
16
|
+
isFirst: boolean;
|
|
17
|
+
isLast: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface SteppedAutoFormProps<SchemaType extends ZodObjectOrWrapped> {
|
|
20
|
+
formSchema: SchemaType;
|
|
21
|
+
values?: Partial<z.infer<SchemaType>>;
|
|
22
|
+
onValuesChange?: (values: Partial<z.infer<SchemaType>>, form?: UseFormReturn<z.infer<SchemaType>>) => void;
|
|
23
|
+
onSubmit?: (values: z.infer<SchemaType>) => void;
|
|
24
|
+
fieldConfig?: FieldConfig<z.infer<SchemaType>>;
|
|
25
|
+
children?: React__default.ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
nextButtonText?: string;
|
|
28
|
+
backButtonText?: string;
|
|
29
|
+
submitButtonText?: string;
|
|
30
|
+
StepperComponent?: React__default.ComponentType<StepperComponentProps>;
|
|
31
|
+
/** Whether the form is currently submitting. Disables submit/next buttons to prevent duplicate submissions. */
|
|
32
|
+
isSubmitting?: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare function SteppedAutoForm<SchemaType extends ZodObjectOrWrapped>({ formSchema, values: initialValues, onValuesChange, onSubmit, fieldConfig, children, className, nextButtonText, backButtonText, submitButtonText, StepperComponent, isSubmitting, }: SteppedAutoFormProps<SchemaType>): react_jsx_runtime.JSX.Element | null;
|
|
35
|
+
|
|
36
|
+
export { SteppedAutoForm };
|
|
37
|
+
export type { SteppedAutoFormProps, StepperComponentProps };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
5
|
+
import { a as FieldConfig } from '../../shared/stack.fdi94T4S.js';
|
|
6
|
+
import { Z as ZodObjectOrWrapped } from '../../shared/stack.CZMWR72v.js';
|
|
7
|
+
|
|
8
|
+
interface StepperComponentProps {
|
|
9
|
+
steps: Array<{
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}>;
|
|
13
|
+
currentStepIndex: number;
|
|
14
|
+
currentStepId: string;
|
|
15
|
+
onStepClick?: (stepId: string) => void;
|
|
16
|
+
isFirst: boolean;
|
|
17
|
+
isLast: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface SteppedAutoFormProps<SchemaType extends ZodObjectOrWrapped> {
|
|
20
|
+
formSchema: SchemaType;
|
|
21
|
+
values?: Partial<z.infer<SchemaType>>;
|
|
22
|
+
onValuesChange?: (values: Partial<z.infer<SchemaType>>, form?: UseFormReturn<z.infer<SchemaType>>) => void;
|
|
23
|
+
onSubmit?: (values: z.infer<SchemaType>) => void;
|
|
24
|
+
fieldConfig?: FieldConfig<z.infer<SchemaType>>;
|
|
25
|
+
children?: React__default.ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
nextButtonText?: string;
|
|
28
|
+
backButtonText?: string;
|
|
29
|
+
submitButtonText?: string;
|
|
30
|
+
StepperComponent?: React__default.ComponentType<StepperComponentProps>;
|
|
31
|
+
/** Whether the form is currently submitting. Disables submit/next buttons to prevent duplicate submissions. */
|
|
32
|
+
isSubmitting?: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare function SteppedAutoForm<SchemaType extends ZodObjectOrWrapped>({ formSchema, values: initialValues, onValuesChange, onSubmit, fieldConfig, children, className, nextButtonText, backButtonText, submitButtonText, StepperComponent, isSubmitting, }: SteppedAutoFormProps<SchemaType>): react_jsx_runtime.JSX.Element | null;
|
|
35
|
+
|
|
36
|
+
export { SteppedAutoForm };
|
|
37
|
+
export type { SteppedAutoFormProps, StepperComponentProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SteppedAutoForm } from '../../packages/ui/src/components/auto-form/stepped-auto-form.mjs';
|