@timeax/form-palette 0.0.14 → 0.0.16
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/index.d.mts +43 -7
- package/dist/index.d.ts +43 -7
- package/dist/index.js +870 -805
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +870 -805
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3252,20 +3252,56 @@ interface CoreRootProps extends React.FormHTMLAttributes<HTMLFormElement> {
|
|
|
3252
3252
|
declare function CoreRoot(props: CoreRootProps): react_jsx_runtime.JSX.Element;
|
|
3253
3253
|
|
|
3254
3254
|
/**
|
|
3255
|
-
*
|
|
3256
|
-
*
|
|
3257
|
-
* Usage:
|
|
3258
|
-
* <CoreShell adapter="local" schema={schema} formProps={{ className: "space-y-4" }}>
|
|
3259
|
-
* {...fields + buttons...}
|
|
3260
|
-
* </CoreShell>
|
|
3255
|
+
* Shared base props for CoreShell, independent of wrapping behaviour.
|
|
3261
3256
|
*/
|
|
3262
|
-
type
|
|
3257
|
+
type CoreShellBaseProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreProps<V, S, K> & {
|
|
3263
3258
|
/**
|
|
3264
3259
|
* Props passed directly to the underlying <form> element via CoreRoot.
|
|
3265
3260
|
*/
|
|
3266
3261
|
formProps?: CoreRootProps;
|
|
3267
3262
|
children?: React.ReactNode;
|
|
3268
3263
|
};
|
|
3264
|
+
/**
|
|
3265
|
+
* When `wrapped` is true, you can provide gap/contentClassName.
|
|
3266
|
+
*/
|
|
3267
|
+
type CoreShellWrappedProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreShellBaseProps<V, S, K> & {
|
|
3268
|
+
wrapped: true;
|
|
3269
|
+
/**
|
|
3270
|
+
* Gap for the inner wrapper. You can still control layout
|
|
3271
|
+
* (flex/grid/etc.) via `contentClassName`.
|
|
3272
|
+
*/
|
|
3273
|
+
gap?: React.CSSProperties["gap"];
|
|
3274
|
+
/**
|
|
3275
|
+
* Class applied to the wrapper around children.
|
|
3276
|
+
*/
|
|
3277
|
+
contentClassName?: string;
|
|
3278
|
+
};
|
|
3279
|
+
/**
|
|
3280
|
+
* When `wrapped` is not true (false/undefined), gap/contentClassName
|
|
3281
|
+
* are not allowed.
|
|
3282
|
+
*/
|
|
3283
|
+
type CoreShellUnwrappedProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreShellBaseProps<V, S, K> & {
|
|
3284
|
+
wrapped?: false | undefined;
|
|
3285
|
+
};
|
|
3286
|
+
type CoreShellProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreShellWrappedProps<V, S, K> | CoreShellUnwrappedProps<V, S, K>;
|
|
3287
|
+
/**
|
|
3288
|
+
* Combined provider + form-root wrapper.
|
|
3289
|
+
*
|
|
3290
|
+
* Usage:
|
|
3291
|
+
* <CoreShell adapter="local" schema={schema} formProps={{ className: "space-y-4" }}>
|
|
3292
|
+
* {...fields + buttons...}
|
|
3293
|
+
* </CoreShell>
|
|
3294
|
+
*
|
|
3295
|
+
* <CoreShell
|
|
3296
|
+
* adapter="local"
|
|
3297
|
+
* schema={schema}
|
|
3298
|
+
* wrapped
|
|
3299
|
+
* gap="1rem"
|
|
3300
|
+
* contentClassName="flex flex-col"
|
|
3301
|
+
* >
|
|
3302
|
+
* {...fields + buttons...}
|
|
3303
|
+
* </CoreShell>
|
|
3304
|
+
*/
|
|
3269
3305
|
declare function CoreShell<V extends Dict, S extends z.ZodType | undefined, K extends AdapterKey = "local">(props: CoreShellProps<V, S, K>): react_jsx_runtime.JSX.Element;
|
|
3270
3306
|
|
|
3271
3307
|
interface UseButtonOptions {
|
package/dist/index.d.ts
CHANGED
|
@@ -3252,20 +3252,56 @@ interface CoreRootProps extends React.FormHTMLAttributes<HTMLFormElement> {
|
|
|
3252
3252
|
declare function CoreRoot(props: CoreRootProps): react_jsx_runtime.JSX.Element;
|
|
3253
3253
|
|
|
3254
3254
|
/**
|
|
3255
|
-
*
|
|
3256
|
-
*
|
|
3257
|
-
* Usage:
|
|
3258
|
-
* <CoreShell adapter="local" schema={schema} formProps={{ className: "space-y-4" }}>
|
|
3259
|
-
* {...fields + buttons...}
|
|
3260
|
-
* </CoreShell>
|
|
3255
|
+
* Shared base props for CoreShell, independent of wrapping behaviour.
|
|
3261
3256
|
*/
|
|
3262
|
-
type
|
|
3257
|
+
type CoreShellBaseProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreProps<V, S, K> & {
|
|
3263
3258
|
/**
|
|
3264
3259
|
* Props passed directly to the underlying <form> element via CoreRoot.
|
|
3265
3260
|
*/
|
|
3266
3261
|
formProps?: CoreRootProps;
|
|
3267
3262
|
children?: React.ReactNode;
|
|
3268
3263
|
};
|
|
3264
|
+
/**
|
|
3265
|
+
* When `wrapped` is true, you can provide gap/contentClassName.
|
|
3266
|
+
*/
|
|
3267
|
+
type CoreShellWrappedProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreShellBaseProps<V, S, K> & {
|
|
3268
|
+
wrapped: true;
|
|
3269
|
+
/**
|
|
3270
|
+
* Gap for the inner wrapper. You can still control layout
|
|
3271
|
+
* (flex/grid/etc.) via `contentClassName`.
|
|
3272
|
+
*/
|
|
3273
|
+
gap?: React.CSSProperties["gap"];
|
|
3274
|
+
/**
|
|
3275
|
+
* Class applied to the wrapper around children.
|
|
3276
|
+
*/
|
|
3277
|
+
contentClassName?: string;
|
|
3278
|
+
};
|
|
3279
|
+
/**
|
|
3280
|
+
* When `wrapped` is not true (false/undefined), gap/contentClassName
|
|
3281
|
+
* are not allowed.
|
|
3282
|
+
*/
|
|
3283
|
+
type CoreShellUnwrappedProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreShellBaseProps<V, S, K> & {
|
|
3284
|
+
wrapped?: false | undefined;
|
|
3285
|
+
};
|
|
3286
|
+
type CoreShellProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreShellWrappedProps<V, S, K> | CoreShellUnwrappedProps<V, S, K>;
|
|
3287
|
+
/**
|
|
3288
|
+
* Combined provider + form-root wrapper.
|
|
3289
|
+
*
|
|
3290
|
+
* Usage:
|
|
3291
|
+
* <CoreShell adapter="local" schema={schema} formProps={{ className: "space-y-4" }}>
|
|
3292
|
+
* {...fields + buttons...}
|
|
3293
|
+
* </CoreShell>
|
|
3294
|
+
*
|
|
3295
|
+
* <CoreShell
|
|
3296
|
+
* adapter="local"
|
|
3297
|
+
* schema={schema}
|
|
3298
|
+
* wrapped
|
|
3299
|
+
* gap="1rem"
|
|
3300
|
+
* contentClassName="flex flex-col"
|
|
3301
|
+
* >
|
|
3302
|
+
* {...fields + buttons...}
|
|
3303
|
+
* </CoreShell>
|
|
3304
|
+
*/
|
|
3269
3305
|
declare function CoreShell<V extends Dict, S extends z.ZodType | undefined, K extends AdapterKey = "local">(props: CoreShellProps<V, S, K>): react_jsx_runtime.JSX.Element;
|
|
3270
3306
|
|
|
3271
3307
|
interface UseButtonOptions {
|