@webstudio-is/react-sdk 0.60.0 → 0.62.0
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/lib/app/custom-components/__generated__/form.props.js +412 -0
- package/lib/app/custom-components/__generated__/image.props.js +442 -0
- package/lib/app/custom-components/__generated__/link-block.props.js +432 -0
- package/lib/app/custom-components/__generated__/link.props.js +432 -0
- package/lib/app/custom-components/__generated__/rich-text-link.props.js +432 -0
- package/lib/app/custom-components/form.js +54 -0
- package/lib/app/custom-components/form.ws.js +81 -0
- package/lib/app/custom-components/index.js +10 -4
- package/lib/cjs/app/custom-components/__generated__/form.props.js +432 -0
- package/lib/cjs/app/custom-components/__generated__/image.props.js +462 -0
- package/lib/cjs/app/custom-components/__generated__/link-block.props.js +452 -0
- package/lib/cjs/app/custom-components/__generated__/link.props.js +452 -0
- package/lib/cjs/app/custom-components/__generated__/rich-text-link.props.js +452 -0
- package/lib/cjs/app/custom-components/form.js +70 -0
- package/lib/cjs/app/custom-components/form.ws.js +101 -0
- package/lib/cjs/app/custom-components/index.js +12 -6
- package/lib/cjs/components/__generated__/checkbox-field.props.js +419 -0
- package/lib/cjs/components/__generated__/checkbox.props.js +459 -0
- package/lib/cjs/components/__generated__/error-message.props.js +418 -0
- package/lib/cjs/components/__generated__/input.props.js +8 -3
- package/lib/cjs/components/__generated__/label.props.js +420 -0
- package/lib/cjs/components/__generated__/radio-button-field.props.js +419 -0
- package/lib/cjs/components/__generated__/radio-button.props.js +459 -0
- package/lib/cjs/components/__generated__/success-message.props.js +418 -0
- package/lib/cjs/components/__generated__/textarea.props.js +432 -0
- package/lib/cjs/components/blockquote.ws.js +36 -48
- package/lib/cjs/components/body.ws.js +20 -17
- package/lib/cjs/components/button.ws.js +8 -3
- package/lib/cjs/components/checkbox-field.js +29 -0
- package/lib/cjs/components/checkbox-field.ws.js +53 -0
- package/lib/cjs/components/checkbox.js +29 -0
- package/lib/cjs/components/checkbox.ws.js +55 -0
- package/lib/cjs/components/code.ws.js +20 -28
- package/lib/cjs/components/component-meta.js +3 -1
- package/lib/cjs/components/components-utils.js +9 -1
- package/lib/cjs/components/components.js +17 -1
- package/lib/cjs/components/error-message.js +29 -0
- package/lib/cjs/components/error-message.ws.js +40 -0
- package/lib/cjs/components/form.js +1 -1
- package/lib/cjs/components/form.ws.js +35 -9
- package/lib/cjs/components/heading.ws.js +1 -1
- package/lib/cjs/components/image.ws.js +8 -9
- package/lib/cjs/components/index.js +43 -2
- package/lib/cjs/components/input.ws.js +15 -3
- package/lib/cjs/components/italic.ws.js +5 -5
- package/lib/cjs/components/label.js +29 -0
- package/lib/cjs/components/label.ws.js +54 -0
- package/lib/cjs/components/link-block.ws.js +6 -6
- package/lib/cjs/components/link.ws.js +9 -10
- package/lib/cjs/components/list-item.ws.js +2 -1
- package/lib/cjs/components/list.ws.js +22 -22
- package/lib/cjs/components/paragraph.ws.js +1 -1
- package/lib/cjs/components/radio-button-field.js +29 -0
- package/lib/cjs/components/radio-button-field.ws.js +53 -0
- package/lib/cjs/components/radio-button.js +29 -0
- package/lib/cjs/components/radio-button.ws.js +55 -0
- package/lib/cjs/components/separator.ws.js +20 -20
- package/lib/cjs/components/success-message.js +29 -0
- package/lib/cjs/components/success-message.ws.js +40 -0
- package/lib/cjs/components/text-block.ws.js +6 -7
- package/lib/cjs/components/textarea.js +29 -0
- package/lib/cjs/components/textarea.ws.js +56 -0
- package/lib/cjs/css/css.js +6 -9
- package/lib/cjs/css/normalize.js +168 -185
- package/lib/cjs/css/presets.js +14 -34
- package/lib/cjs/css/style-rules.js +17 -0
- package/lib/cjs/embed-template.js +160 -0
- package/lib/cjs/index.js +1 -0
- package/lib/components/__generated__/checkbox-field.props.js +399 -0
- package/lib/components/__generated__/checkbox.props.js +439 -0
- package/lib/components/__generated__/error-message.props.js +398 -0
- package/lib/components/__generated__/input.props.js +8 -3
- package/lib/components/__generated__/label.props.js +400 -0
- package/lib/components/__generated__/radio-button-field.props.js +399 -0
- package/lib/components/__generated__/radio-button.props.js +439 -0
- package/lib/components/__generated__/success-message.props.js +398 -0
- package/lib/components/__generated__/textarea.props.js +412 -0
- package/lib/components/blockquote.ws.js +36 -48
- package/lib/components/body.ws.js +20 -17
- package/lib/components/button.ws.js +8 -3
- package/lib/components/checkbox-field.js +9 -0
- package/lib/components/checkbox-field.ws.js +33 -0
- package/lib/components/checkbox.js +9 -0
- package/lib/components/checkbox.ws.js +35 -0
- package/lib/components/code.ws.js +20 -28
- package/lib/components/component-meta.js +3 -1
- package/lib/components/components-utils.js +9 -1
- package/lib/components/components.js +17 -1
- package/lib/components/error-message.js +9 -0
- package/lib/components/error-message.ws.js +20 -0
- package/lib/components/form.js +1 -1
- package/lib/components/form.ws.js +35 -9
- package/lib/components/heading.ws.js +1 -1
- package/lib/components/image.ws.js +8 -9
- package/lib/components/index.js +43 -2
- package/lib/components/input.ws.js +15 -3
- package/lib/components/italic.ws.js +5 -5
- package/lib/components/label.js +9 -0
- package/lib/components/label.ws.js +34 -0
- package/lib/components/link-block.ws.js +7 -7
- package/lib/components/link.ws.js +9 -10
- package/lib/components/list-item.ws.js +2 -1
- package/lib/components/list.ws.js +22 -22
- package/lib/components/paragraph.ws.js +1 -1
- package/lib/components/radio-button-field.js +9 -0
- package/lib/components/radio-button-field.ws.js +33 -0
- package/lib/components/radio-button.js +9 -0
- package/lib/components/radio-button.ws.js +35 -0
- package/lib/components/separator.ws.js +20 -20
- package/lib/components/success-message.js +9 -0
- package/lib/components/success-message.ws.js +20 -0
- package/lib/components/text-block.ws.js +6 -7
- package/lib/components/textarea.js +9 -0
- package/lib/components/textarea.ws.js +36 -0
- package/lib/css/css.js +8 -11
- package/lib/css/normalize.js +168 -185
- package/lib/css/presets.js +14 -34
- package/lib/css/style-rules.js +17 -0
- package/lib/embed-template.js +140 -0
- package/lib/index.js +1 -0
- package/lib/types/app/custom-components/__generated__/form.props.d.ts +2 -0
- package/lib/types/app/custom-components/__generated__/image.props.d.ts +2 -0
- package/lib/types/app/custom-components/__generated__/link-block.props.d.ts +2 -0
- package/lib/types/app/custom-components/__generated__/link.props.d.ts +2 -0
- package/lib/types/app/custom-components/__generated__/rich-text-link.props.d.ts +2 -0
- package/lib/types/app/custom-components/form.d.ts +5 -0
- package/lib/types/app/custom-components/form.ws.d.ts +3 -0
- package/lib/types/app/custom-components/index.d.ts +6 -1
- package/lib/types/components/__generated__/checkbox-field.props.d.ts +2 -0
- package/lib/types/components/__generated__/checkbox.props.d.ts +2 -0
- package/lib/types/components/__generated__/error-message.props.d.ts +2 -0
- package/lib/types/components/__generated__/label.props.d.ts +2 -0
- package/lib/types/components/__generated__/radio-button-field.props.d.ts +2 -0
- package/lib/types/components/__generated__/radio-button.props.d.ts +2 -0
- package/lib/types/components/__generated__/success-message.props.d.ts +2 -0
- package/lib/types/components/__generated__/textarea.props.d.ts +2 -0
- package/lib/types/components/box.stories.d.ts +2 -2
- package/lib/types/components/checkbox-field.d.ts +3 -0
- package/lib/types/components/checkbox-field.ws.d.ts +3 -0
- package/lib/types/components/checkbox.d.ts +3 -0
- package/lib/types/components/checkbox.ws.d.ts +3 -0
- package/lib/types/components/component-meta.d.ts +23 -5
- package/lib/types/components/components-utils.d.ts +5 -20
- package/lib/types/components/components.d.ts +8 -0
- package/lib/types/components/error-message.d.ts +3 -0
- package/lib/types/components/error-message.ws.d.ts +3 -0
- package/lib/types/components/index.d.ts +1 -0
- package/lib/types/components/input.d.ts +3 -1
- package/lib/types/components/input.stories.d.ts +6 -2
- package/lib/types/components/label.d.ts +3 -0
- package/lib/types/components/label.ws.d.ts +3 -0
- package/lib/types/components/radio-button-field.d.ts +3 -0
- package/lib/types/components/radio-button-field.ws.d.ts +3 -0
- package/lib/types/components/radio-button.d.ts +3 -0
- package/lib/types/components/radio-button.ws.d.ts +3 -0
- package/lib/types/components/success-message.d.ts +3 -0
- package/lib/types/components/success-message.ws.d.ts +3 -0
- package/lib/types/components/textarea.d.ts +3 -0
- package/lib/types/components/textarea.ws.d.ts +3 -0
- package/lib/types/css/normalize.d.ts +8977 -2286
- package/lib/types/css/presets.d.ts +2 -38
- package/lib/types/css/style-rules.d.ts +11 -9
- package/lib/types/embed-template.d.ts +1725 -0
- package/lib/types/embed-template.test.d.ts +1 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +15 -14
- package/src/app/custom-components/__generated__/form.props.ts +457 -0
- package/src/app/custom-components/__generated__/image.props.ts +487 -0
- package/src/app/custom-components/__generated__/link-block.props.ts +477 -0
- package/src/app/custom-components/__generated__/link.props.ts +477 -0
- package/src/app/custom-components/__generated__/rich-text-link.props.ts +477 -0
- package/src/app/custom-components/form.tsx +94 -0
- package/src/app/custom-components/form.ws.tsx +86 -0
- package/src/app/custom-components/index.ts +9 -4
- package/src/components/__generated__/checkbox-field.props.ts +444 -0
- package/src/components/__generated__/checkbox.props.ts +484 -0
- package/src/components/__generated__/error-message.props.ts +443 -0
- package/src/components/__generated__/input.props.ts +8 -3
- package/src/components/__generated__/label.props.ts +445 -0
- package/src/components/__generated__/radio-button-field.props.ts +444 -0
- package/src/components/__generated__/radio-button.props.ts +484 -0
- package/src/components/__generated__/success-message.props.ts +443 -0
- package/src/components/__generated__/textarea.props.ts +457 -0
- package/src/components/blockquote.ws.tsx +42 -52
- package/src/components/body.ws.tsx +26 -23
- package/src/components/bold.ws.tsx +6 -3
- package/src/components/box.ws.ts +6 -3
- package/src/components/button.ws.tsx +13 -5
- package/src/components/checkbox-field.tsx +10 -0
- package/src/components/checkbox-field.ws.tsx +38 -0
- package/src/components/checkbox.tsx +13 -0
- package/src/components/checkbox.ws.tsx +40 -0
- package/src/components/code.ws.tsx +26 -32
- package/src/components/component-meta.ts +6 -3
- package/src/components/components-utils.ts +16 -10
- package/src/components/components.ts +8 -0
- package/src/components/error-message.tsx +10 -0
- package/src/components/error-message.ws.tsx +24 -0
- package/src/components/form.tsx +5 -1
- package/src/components/form.ws.tsx +39 -10
- package/src/components/heading.ws.tsx +7 -4
- package/src/components/image.ws.tsx +14 -12
- package/src/components/index.ts +47 -0
- package/src/components/input.tsx +3 -1
- package/src/components/input.ws.tsx +19 -4
- package/src/components/italic.ws.tsx +11 -8
- package/src/components/label.tsx +10 -0
- package/src/components/label.ws.tsx +39 -0
- package/src/components/link-block.ws.tsx +13 -10
- package/src/components/link.ws.tsx +15 -13
- package/src/components/list-item.ws.tsx +8 -4
- package/src/components/list.ws.tsx +28 -25
- package/src/components/paragraph.ws.tsx +7 -4
- package/src/components/radio-button-field.tsx +10 -0
- package/src/components/radio-button-field.ws.tsx +38 -0
- package/src/components/radio-button.tsx +13 -0
- package/src/components/radio-button.ws.tsx +40 -0
- package/src/components/separator.ws.tsx +26 -25
- package/src/components/span.ws.tsx +6 -3
- package/src/components/subscript.ws.tsx +6 -3
- package/src/components/success-message.tsx +10 -0
- package/src/components/success-message.ws.tsx +24 -0
- package/src/components/superscript.ws.tsx +6 -3
- package/src/components/text-block.ws.tsx +12 -11
- package/src/components/textarea.tsx +13 -0
- package/src/components/textarea.ws.tsx +41 -0
- package/src/css/css.ts +8 -11
- package/src/css/normalize.ts +166 -188
- package/src/css/presets.ts +15 -37
- package/src/css/style-rules.ts +24 -0
- package/src/embed-template.test.ts +210 -0
- package/src/embed-template.ts +187 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "form";
|
|
3
|
+
export declare const Form: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLFormElement> & import("react").FormHTMLAttributes<HTMLFormElement> & {
|
|
4
|
+
initialState?: "error" | "initial" | "success" | undefined;
|
|
5
|
+
}, "ref"> & import("react").RefAttributes<HTMLFormElement>>;
|
|
@@ -21,6 +21,11 @@ export declare const customComponents: {
|
|
|
21
21
|
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
22
22
|
prefetch?: "none" | "intent" | "render" | undefined;
|
|
23
23
|
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
24
|
+
Form: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLFormElement> & import("react").FormHTMLAttributes<HTMLFormElement> & {
|
|
25
|
+
initialState?: "error" | "initial" | "success" | undefined;
|
|
26
|
+
}, "ref"> & import("react").RefAttributes<HTMLFormElement>>;
|
|
24
27
|
};
|
|
25
28
|
export declare const customComponentPropsMetas: Record<string, WsComponentPropsMeta>;
|
|
26
|
-
export declare const customComponentMetas: {
|
|
29
|
+
export declare const customComponentMetas: {
|
|
30
|
+
Form: import("../../components/component-meta").WsComponentMeta;
|
|
31
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
3
|
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
4
|
-
tag?: "
|
|
4
|
+
tag?: "address" | "article" | "aside" | "div" | "figure" | "footer" | "header" | "main" | "nav" | "section" | undefined;
|
|
5
5
|
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
6
6
|
export default _default;
|
|
7
7
|
export declare const Box: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
8
|
-
tag?: "
|
|
8
|
+
tag?: "address" | "article" | "aside" | "div" | "figure" | "footer" | "header" | "main" | "nav" | "section" | undefined;
|
|
9
9
|
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "label";
|
|
3
|
+
export declare const CheckboxField: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "htmlFor">, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "input";
|
|
3
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type">, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { FunctionComponent } from "react";
|
|
3
3
|
import type { IconProps } from "@webstudio-is/icons";
|
|
4
|
-
import type { Style } from "@webstudio-is/css-data";
|
|
5
4
|
import type { htmlTags as HtmlTags } from "html-tags";
|
|
6
|
-
|
|
5
|
+
import { EmbedTemplateStyleDecl } from "../embed-template";
|
|
6
|
+
export type PresetStyle<Tag extends HtmlTags = HtmlTags> = Partial<Record<Tag, EmbedTemplateStyleDecl[]>>;
|
|
7
7
|
declare const WsComponentPropsMeta: z.ZodObject<{
|
|
8
8
|
props: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
9
9
|
control: z.ZodLiteral<"number">;
|
|
@@ -595,6 +595,7 @@ export type ComponentState = z.infer<typeof ComponentState>;
|
|
|
595
595
|
declare const WsComponentMeta: z.ZodObject<{
|
|
596
596
|
category: z.ZodOptional<z.ZodEnum<["general", "typography", "media", "forms"]>>;
|
|
597
597
|
type: z.ZodEnum<["container", "control", "embed", "rich-text", "rich-text-child"]>;
|
|
598
|
+
acceptedParents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
598
599
|
label: z.ZodString;
|
|
599
600
|
Icon: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>;
|
|
600
601
|
presetStyle: z.ZodOptional<z.ZodAny>;
|
|
@@ -608,10 +609,23 @@ declare const WsComponentMeta: z.ZodObject<{
|
|
|
608
609
|
label: string;
|
|
609
610
|
selector: string;
|
|
610
611
|
}>, "many">>;
|
|
611
|
-
children: z.ZodOptional<z.ZodArray<z.
|
|
612
|
+
children: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodUnion<[z.ZodType<import("../embed-template").EmbedTemplateInstance, z.ZodTypeDef, import("../embed-template").EmbedTemplateInstance>, z.ZodObject<{
|
|
613
|
+
type: z.ZodLiteral<"text">;
|
|
614
|
+
value: z.ZodString;
|
|
615
|
+
}, "strip", z.ZodTypeAny, {
|
|
616
|
+
type: "text";
|
|
617
|
+
value: string;
|
|
618
|
+
}, {
|
|
619
|
+
type: "text";
|
|
620
|
+
value: string;
|
|
621
|
+
}>]>, "many">>>;
|
|
612
622
|
}, "strip", z.ZodTypeAny, {
|
|
613
|
-
children?:
|
|
623
|
+
children?: ({
|
|
624
|
+
type: "text";
|
|
625
|
+
value: string;
|
|
626
|
+
} | import("../embed-template").EmbedTemplateInstance)[] | undefined;
|
|
614
627
|
category?: "media" | "general" | "typography" | "forms" | undefined;
|
|
628
|
+
acceptedParents?: string[] | undefined;
|
|
615
629
|
presetStyle?: any;
|
|
616
630
|
states?: {
|
|
617
631
|
label: string;
|
|
@@ -621,8 +635,12 @@ declare const WsComponentMeta: z.ZodObject<{
|
|
|
621
635
|
label: string;
|
|
622
636
|
Icon: (...args: unknown[]) => unknown;
|
|
623
637
|
}, {
|
|
624
|
-
children?:
|
|
638
|
+
children?: ({
|
|
639
|
+
type: "text";
|
|
640
|
+
value: string;
|
|
641
|
+
} | import("../embed-template").EmbedTemplateInstance)[] | undefined;
|
|
625
642
|
category?: "media" | "general" | "typography" | "forms" | undefined;
|
|
643
|
+
acceptedParents?: string[] | undefined;
|
|
626
644
|
presetStyle?: any;
|
|
627
645
|
states?: {
|
|
628
646
|
label: string;
|
|
@@ -1,34 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import type { forwardRef } from "react";
|
|
2
2
|
import * as components from "./components";
|
|
3
3
|
export type ComponentName = keyof typeof components;
|
|
4
4
|
export declare const getComponentNames: () => ComponentName[];
|
|
5
|
+
type AnyComponent = ReturnType<typeof forwardRef<any, any>>;
|
|
5
6
|
/**
|
|
6
7
|
* Now used only in builder app
|
|
7
8
|
* @todo Consider using the same approach in the builder app as in the published apps . A dynamic import is needed
|
|
8
9
|
*/
|
|
9
|
-
export declare const getComponent: (name: string) => undefined |
|
|
10
|
+
export declare const getComponent: (name: string) => undefined | AnyComponent;
|
|
10
11
|
/**
|
|
11
12
|
* The application imports only the components it uses, then pass them to createGetComponent i.e.
|
|
12
13
|
* getComponent = createGetComponent({ Box, BlaBla })
|
|
13
14
|
* <RootInstance data={data} getComponent={getComponent} />
|
|
14
15
|
* see example /packages/sdk-size-test/app/routes/$.tsx
|
|
15
16
|
**/
|
|
16
|
-
export declare const createGetComponent: (comps: Partial<typeof components>) => (name: string) =>
|
|
17
|
-
children?: import("react").ReactNode;
|
|
18
|
-
} & import("react").RefAttributes<HTMLDivElement>> | import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>, "ref"> & import("react").RefAttributes<HTMLBodyElement>> | import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
19
|
-
tag?: "div" | "address" | "article" | "aside" | "figure" | "footer" | "header" | "main" | "nav" | "section" | undefined;
|
|
20
|
-
}, "ref"> & import("react").RefAttributes<HTMLDivElement>> | import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> | import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLHeadingElement> & import("react").HTMLAttributes<HTMLHeadingElement> & {
|
|
21
|
-
tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
|
|
22
|
-
}, "ref"> & import("react").RefAttributes<HTMLHeadingElement>> | import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "href" | "target"> & {
|
|
23
|
-
href?: string | undefined;
|
|
24
|
-
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
25
|
-
prefetch?: "none" | "intent" | "render" | undefined;
|
|
26
|
-
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>> | import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>> | import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
27
|
-
innerText?: string | undefined;
|
|
28
|
-
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>> | import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>> | import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & import("react").RefAttributes<HTMLFormElement>> | import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>> | import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, "ref"> & import("react").RefAttributes<HTMLQuoteElement>> | import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLUListElement> & import("react").HTMLAttributes<HTMLUListElement> & import("react").ClassAttributes<HTMLOListElement> & import("react").OlHTMLAttributes<HTMLOListElement> & {
|
|
29
|
-
ordered?: boolean | undefined;
|
|
30
|
-
}, "ref"> & import("react").RefAttributes<HTMLUListElement>> | import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>> | import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & import("react").RefAttributes<HTMLHRElement>> | import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "inline"> & {
|
|
31
|
-
inline?: boolean | undefined;
|
|
32
|
-
meta?: string | undefined;
|
|
33
|
-
}, "ref"> & import("react").RefAttributes<HTMLElement>> | undefined;
|
|
17
|
+
export declare const createGetComponent: (comps: Partial<typeof components>) => (name: string) => undefined | AnyComponent;
|
|
34
18
|
export type GetComponent = typeof getComponent;
|
|
19
|
+
export {};
|
|
@@ -29,3 +29,11 @@ export { List } from "./list";
|
|
|
29
29
|
export { ListItem } from "./list-item";
|
|
30
30
|
export { Separator } from "./separator";
|
|
31
31
|
export { Code } from "./code";
|
|
32
|
+
export { Label } from "./label";
|
|
33
|
+
export { SuccessMessage } from "./success-message";
|
|
34
|
+
export { ErrorMessage } from "./error-message";
|
|
35
|
+
export { Textarea } from "./textarea";
|
|
36
|
+
export { RadioButtonField } from "./radio-button-field";
|
|
37
|
+
export { RadioButton } from "./radio-button";
|
|
38
|
+
export { CheckboxField } from "./checkbox-field";
|
|
39
|
+
export { Checkbox } from "./checkbox";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "div";
|
|
3
|
+
export declare const ErrorMessage: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -14,4 +14,5 @@ export declare let registeredComponents: RegisteredComponents | undefined;
|
|
|
14
14
|
* break otherwise, see getComponent etc. So its overwriteComponent now
|
|
15
15
|
**/
|
|
16
16
|
export declare const registerComponents: (components: RegisteredComponents) => void;
|
|
17
|
+
export declare const canAcceptComponent: (parentComponent: string, childComponent: string) => boolean;
|
|
17
18
|
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const defaultTag = "input";
|
|
3
|
-
export declare const Input: import("react").ForwardRefExoticComponent<Omit<import("react").
|
|
3
|
+
export declare const Input: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
+
type?: "number" | "text" | "email" | "url" | "tel" | "password" | undefined;
|
|
5
|
+
}, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
-
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
+
type?: "number" | "text" | "email" | "url" | "tel" | "password" | undefined;
|
|
5
|
+
}, "ref"> & import("react").RefAttributes<HTMLInputElement>>>;
|
|
4
6
|
export default _default;
|
|
5
|
-
export declare const Input: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").
|
|
7
|
+
export declare const Input: ComponentStory<import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & {
|
|
8
|
+
type?: "number" | "text" | "email" | "url" | "tel" | "password" | undefined;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLInputElement>>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "label";
|
|
3
|
+
export declare const Label: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "label";
|
|
3
|
+
export declare const RadioButtonField: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "htmlFor">, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "input";
|
|
3
|
+
export declare const RadioButton: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type">, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "div";
|
|
3
|
+
export declare const SuccessMessage: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultTag = "textarea";
|
|
3
|
+
export declare const Textarea: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|