@webstudio-is/react-sdk 0.69.0 → 0.71.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/cjs/index.js +4 -2
- package/lib/index.js +11 -4
- package/lib/types/index.d.ts +3 -4
- package/package.json +12 -27
- package/src/index.ts +7 -3
- package/lib/cjs/components/__generated__/blockquote.props.js +0 -419
- package/lib/cjs/components/__generated__/body.props.js +0 -418
- package/lib/cjs/components/__generated__/bold.props.js +0 -418
- package/lib/cjs/components/__generated__/box.props.js +0 -436
- package/lib/cjs/components/__generated__/button.props.js +0 -440
- package/lib/cjs/components/__generated__/checkbox-field.props.js +0 -419
- package/lib/cjs/components/__generated__/checkbox.props.js +0 -459
- package/lib/cjs/components/__generated__/code-text.props.js +0 -425
- package/lib/cjs/components/__generated__/error-message.props.js +0 -418
- package/lib/cjs/components/__generated__/form.props.js +0 -426
- package/lib/cjs/components/__generated__/fragment.props.js +0 -24
- package/lib/cjs/components/__generated__/heading.props.js +0 -425
- package/lib/cjs/components/__generated__/html-embed.props.js +0 -31
- package/lib/cjs/components/__generated__/image.props.js +0 -462
- package/lib/cjs/components/__generated__/input.props.js +0 -465
- package/lib/cjs/components/__generated__/italic.props.js +0 -418
- package/lib/cjs/components/__generated__/label.props.js +0 -420
- package/lib/cjs/components/__generated__/link-block.props.js +0 -452
- package/lib/cjs/components/__generated__/link.props.js +0 -452
- package/lib/cjs/components/__generated__/list-item.props.js +0 -419
- package/lib/cjs/components/__generated__/list.props.js +0 -432
- package/lib/cjs/components/__generated__/paragraph.props.js +0 -418
- package/lib/cjs/components/__generated__/radio-button-field.props.js +0 -419
- package/lib/cjs/components/__generated__/radio-button.props.js +0 -459
- package/lib/cjs/components/__generated__/rich-text-link.props.js +0 -452
- package/lib/cjs/components/__generated__/separator.props.js +0 -418
- package/lib/cjs/components/__generated__/slot.props.js +0 -24
- package/lib/cjs/components/__generated__/span.props.js +0 -418
- package/lib/cjs/components/__generated__/subscript.props.js +0 -418
- package/lib/cjs/components/__generated__/success-message.props.js +0 -418
- package/lib/cjs/components/__generated__/superscript.props.js +0 -418
- package/lib/cjs/components/__generated__/text-block.props.js +0 -425
- package/lib/cjs/components/__generated__/textarea.props.js +0 -432
- package/lib/cjs/components/blockquote.js +0 -32
- package/lib/cjs/components/blockquote.ws.js +0 -94
- package/lib/cjs/components/body.js +0 -29
- package/lib/cjs/components/body.ws.js +0 -65
- package/lib/cjs/components/bold.js +0 -29
- package/lib/cjs/components/bold.ws.js +0 -41
- package/lib/cjs/components/box.js +0 -31
- package/lib/cjs/components/box.ws.js +0 -53
- package/lib/cjs/components/button.js +0 -36
- package/lib/cjs/components/button.ws.js +0 -49
- package/lib/cjs/components/checkbox-field.js +0 -29
- package/lib/cjs/components/checkbox-field.ws.js +0 -62
- package/lib/cjs/components/checkbox.js +0 -29
- package/lib/cjs/components/checkbox.ws.js +0 -58
- package/lib/cjs/components/code-text.js +0 -39
- package/lib/cjs/components/code-text.ws.js +0 -74
- package/lib/cjs/components/components.js +0 -88
- package/lib/cjs/components/error-message.js +0 -29
- package/lib/cjs/components/error-message.ws.js +0 -40
- package/lib/cjs/components/form.js +0 -29
- package/lib/cjs/components/form.ws.js +0 -82
- package/lib/cjs/components/fragment.js +0 -29
- package/lib/cjs/components/fragment.ws.js +0 -33
- package/lib/cjs/components/heading.js +0 -31
- package/lib/cjs/components/heading.ws.js +0 -56
- package/lib/cjs/components/html-embed.js +0 -80
- package/lib/cjs/components/html-embed.ws.js +0 -45
- package/lib/cjs/components/image.js +0 -77
- package/lib/cjs/components/image.ws.js +0 -66
- package/lib/cjs/components/index.js +0 -160
- package/lib/cjs/components/input.js +0 -29
- package/lib/cjs/components/input.ws.js +0 -55
- package/lib/cjs/components/italic.js +0 -29
- package/lib/cjs/components/italic.ws.js +0 -47
- package/lib/cjs/components/label.js +0 -29
- package/lib/cjs/components/label.ws.js +0 -63
- package/lib/cjs/components/link-block.js +0 -30
- package/lib/cjs/components/link-block.ws.js +0 -53
- package/lib/cjs/components/link.js +0 -49
- package/lib/cjs/components/link.ws.js +0 -79
- package/lib/cjs/components/list-item.js +0 -32
- package/lib/cjs/components/list-item.ws.js +0 -51
- package/lib/cjs/components/list.js +0 -31
- package/lib/cjs/components/list.ws.js +0 -73
- package/lib/cjs/components/paragraph.js +0 -29
- package/lib/cjs/components/paragraph.ws.js +0 -50
- package/lib/cjs/components/radio-button-field.js +0 -29
- package/lib/cjs/components/radio-button-field.ws.js +0 -62
- package/lib/cjs/components/radio-button.js +0 -29
- package/lib/cjs/components/radio-button.ws.js +0 -58
- package/lib/cjs/components/rich-text-link.js +0 -28
- package/lib/cjs/components/rich-text-link.ws.js +0 -39
- package/lib/cjs/components/separator.js +0 -32
- package/lib/cjs/components/separator.ws.js +0 -70
- package/lib/cjs/components/slot.js +0 -36
- package/lib/cjs/components/slot.ws.js +0 -36
- package/lib/cjs/components/span.js +0 -29
- package/lib/cjs/components/span.ws.js +0 -41
- package/lib/cjs/components/subscript.js +0 -29
- package/lib/cjs/components/subscript.ws.js +0 -41
- package/lib/cjs/components/success-message.js +0 -29
- package/lib/cjs/components/success-message.ws.js +0 -40
- package/lib/cjs/components/superscript.js +0 -29
- package/lib/cjs/components/superscript.ws.js +0 -41
- package/lib/cjs/components/text-block.js +0 -32
- package/lib/cjs/components/text-block.ws.js +0 -57
- package/lib/cjs/components/textarea.js +0 -29
- package/lib/cjs/components/textarea.ws.js +0 -59
- package/lib/components/__generated__/blockquote.props.js +0 -399
- package/lib/components/__generated__/body.props.js +0 -398
- package/lib/components/__generated__/bold.props.js +0 -398
- package/lib/components/__generated__/box.props.js +0 -416
- package/lib/components/__generated__/button.props.js +0 -420
- package/lib/components/__generated__/checkbox-field.props.js +0 -399
- package/lib/components/__generated__/checkbox.props.js +0 -439
- package/lib/components/__generated__/code-text.props.js +0 -405
- package/lib/components/__generated__/error-message.props.js +0 -398
- package/lib/components/__generated__/form.props.js +0 -406
- package/lib/components/__generated__/fragment.props.js +0 -4
- package/lib/components/__generated__/heading.props.js +0 -405
- package/lib/components/__generated__/html-embed.props.js +0 -11
- package/lib/components/__generated__/image.props.js +0 -442
- package/lib/components/__generated__/input.props.js +0 -445
- package/lib/components/__generated__/italic.props.js +0 -398
- package/lib/components/__generated__/label.props.js +0 -400
- package/lib/components/__generated__/link-block.props.js +0 -432
- package/lib/components/__generated__/link.props.js +0 -432
- package/lib/components/__generated__/list-item.props.js +0 -399
- package/lib/components/__generated__/list.props.js +0 -412
- package/lib/components/__generated__/paragraph.props.js +0 -398
- package/lib/components/__generated__/radio-button-field.props.js +0 -399
- package/lib/components/__generated__/radio-button.props.js +0 -439
- package/lib/components/__generated__/rich-text-link.props.js +0 -432
- package/lib/components/__generated__/separator.props.js +0 -398
- package/lib/components/__generated__/slot.props.js +0 -4
- package/lib/components/__generated__/span.props.js +0 -398
- package/lib/components/__generated__/subscript.props.js +0 -398
- package/lib/components/__generated__/success-message.props.js +0 -398
- package/lib/components/__generated__/superscript.props.js +0 -398
- package/lib/components/__generated__/text-block.props.js +0 -405
- package/lib/components/__generated__/textarea.props.js +0 -412
- package/lib/components/blockquote.js +0 -15
- package/lib/components/blockquote.ws.js +0 -76
- package/lib/components/body.js +0 -9
- package/lib/components/body.ws.js +0 -47
- package/lib/components/bold.js +0 -9
- package/lib/components/bold.ws.js +0 -23
- package/lib/components/box.js +0 -14
- package/lib/components/box.ws.js +0 -46
- package/lib/components/button.js +0 -16
- package/lib/components/button.ws.js +0 -31
- package/lib/components/checkbox-field.js +0 -9
- package/lib/components/checkbox-field.ws.js +0 -44
- package/lib/components/checkbox.js +0 -9
- package/lib/components/checkbox.ws.js +0 -40
- package/lib/components/code-text.js +0 -22
- package/lib/components/code-text.ws.js +0 -56
- package/lib/components/components.js +0 -68
- package/lib/components/error-message.js +0 -9
- package/lib/components/error-message.ws.js +0 -20
- package/lib/components/form.js +0 -9
- package/lib/components/form.ws.js +0 -64
- package/lib/components/fragment.js +0 -9
- package/lib/components/fragment.ws.js +0 -13
- package/lib/components/heading.js +0 -14
- package/lib/components/heading.ws.js +0 -38
- package/lib/components/html-embed.js +0 -65
- package/lib/components/html-embed.ws.js +0 -25
- package/lib/components/image.js +0 -63
- package/lib/components/image.ws.js +0 -48
- package/lib/components/index.js +0 -140
- package/lib/components/input.js +0 -9
- package/lib/components/input.ws.js +0 -37
- package/lib/components/italic.js +0 -9
- package/lib/components/italic.ws.js +0 -29
- package/lib/components/label.js +0 -9
- package/lib/components/label.ws.js +0 -45
- package/lib/components/link-block.js +0 -10
- package/lib/components/link-block.ws.js +0 -33
- package/lib/components/link.js +0 -29
- package/lib/components/link.ws.js +0 -61
- package/lib/components/list-item.js +0 -15
- package/lib/components/list-item.ws.js +0 -33
- package/lib/components/list.js +0 -14
- package/lib/components/list.ws.js +0 -55
- package/lib/components/paragraph.js +0 -9
- package/lib/components/paragraph.ws.js +0 -32
- package/lib/components/radio-button-field.js +0 -9
- package/lib/components/radio-button-field.ws.js +0 -44
- package/lib/components/radio-button.js +0 -9
- package/lib/components/radio-button.ws.js +0 -40
- package/lib/components/rich-text-link.js +0 -8
- package/lib/components/rich-text-link.ws.js +0 -19
- package/lib/components/separator.js +0 -15
- package/lib/components/separator.ws.js +0 -52
- package/lib/components/slot.js +0 -16
- package/lib/components/slot.ws.js +0 -16
- package/lib/components/span.js +0 -9
- package/lib/components/span.ws.js +0 -23
- package/lib/components/subscript.js +0 -9
- package/lib/components/subscript.ws.js +0 -23
- package/lib/components/success-message.js +0 -9
- package/lib/components/success-message.ws.js +0 -20
- package/lib/components/superscript.js +0 -9
- package/lib/components/superscript.ws.js +0 -23
- package/lib/components/text-block.js +0 -15
- package/lib/components/text-block.ws.js +0 -39
- package/lib/components/textarea.js +0 -9
- package/lib/components/textarea.ws.js +0 -41
- package/lib/types/components/__generated__/blockquote.props.d.ts +0 -2
- package/lib/types/components/__generated__/body.props.d.ts +0 -2
- package/lib/types/components/__generated__/bold.props.d.ts +0 -2
- package/lib/types/components/__generated__/box.props.d.ts +0 -2
- package/lib/types/components/__generated__/button.props.d.ts +0 -2
- package/lib/types/components/__generated__/checkbox-field.props.d.ts +0 -2
- package/lib/types/components/__generated__/checkbox.props.d.ts +0 -2
- package/lib/types/components/__generated__/code-text.props.d.ts +0 -2
- package/lib/types/components/__generated__/error-message.props.d.ts +0 -2
- package/lib/types/components/__generated__/form.props.d.ts +0 -2
- package/lib/types/components/__generated__/fragment.props.d.ts +0 -2
- package/lib/types/components/__generated__/heading.props.d.ts +0 -2
- package/lib/types/components/__generated__/html-embed.props.d.ts +0 -2
- package/lib/types/components/__generated__/image.props.d.ts +0 -2
- package/lib/types/components/__generated__/input.props.d.ts +0 -2
- package/lib/types/components/__generated__/italic.props.d.ts +0 -2
- package/lib/types/components/__generated__/label.props.d.ts +0 -2
- package/lib/types/components/__generated__/link-block.props.d.ts +0 -2
- package/lib/types/components/__generated__/link.props.d.ts +0 -2
- package/lib/types/components/__generated__/list-item.props.d.ts +0 -2
- package/lib/types/components/__generated__/list.props.d.ts +0 -2
- package/lib/types/components/__generated__/paragraph.props.d.ts +0 -2
- package/lib/types/components/__generated__/radio-button-field.props.d.ts +0 -2
- package/lib/types/components/__generated__/radio-button.props.d.ts +0 -2
- package/lib/types/components/__generated__/rich-text-link.props.d.ts +0 -2
- package/lib/types/components/__generated__/separator.props.d.ts +0 -2
- package/lib/types/components/__generated__/slot.props.d.ts +0 -2
- package/lib/types/components/__generated__/span.props.d.ts +0 -2
- package/lib/types/components/__generated__/subscript.props.d.ts +0 -2
- package/lib/types/components/__generated__/success-message.props.d.ts +0 -2
- package/lib/types/components/__generated__/superscript.props.d.ts +0 -2
- package/lib/types/components/__generated__/text-block.props.d.ts +0 -2
- package/lib/types/components/__generated__/textarea.props.d.ts +0 -2
- package/lib/types/components/blockquote.d.ts +0 -3
- package/lib/types/components/blockquote.stories.d.ts +0 -5
- package/lib/types/components/blockquote.ws.d.ts +0 -3
- package/lib/types/components/body.d.ts +0 -3
- package/lib/types/components/body.stories.d.ts +0 -6
- package/lib/types/components/body.ws.d.ts +0 -3
- package/lib/types/components/bold.d.ts +0 -3
- package/lib/types/components/bold.stories.d.ts +0 -5
- package/lib/types/components/bold.ws.d.ts +0 -3
- package/lib/types/components/box.d.ts +0 -7
- package/lib/types/components/box.stories.d.ts +0 -9
- package/lib/types/components/box.ws.d.ts +0 -3
- package/lib/types/components/button.d.ts +0 -7
- package/lib/types/components/button.stories.d.ts +0 -9
- package/lib/types/components/button.ws.d.ts +0 -3
- package/lib/types/components/checkbox-field.d.ts +0 -3
- package/lib/types/components/checkbox-field.ws.d.ts +0 -3
- package/lib/types/components/checkbox.d.ts +0 -3
- package/lib/types/components/checkbox.ws.d.ts +0 -3
- package/lib/types/components/code-text.d.ts +0 -9
- package/lib/types/components/code-text.stories.d.ts +0 -11
- package/lib/types/components/code-text.ws.d.ts +0 -3
- package/lib/types/components/components.d.ts +0 -40
- package/lib/types/components/error-message.d.ts +0 -3
- package/lib/types/components/error-message.ws.d.ts +0 -3
- package/lib/types/components/form.d.ts +0 -3
- package/lib/types/components/form.stories.d.ts +0 -5
- package/lib/types/components/form.ws.d.ts +0 -3
- package/lib/types/components/fragment.d.ts +0 -6
- package/lib/types/components/fragment.ws.d.ts +0 -3
- package/lib/types/components/heading.d.ts +0 -7
- package/lib/types/components/heading.stories.d.ts +0 -9
- package/lib/types/components/heading.ws.d.ts +0 -3
- package/lib/types/components/html-embed.d.ts +0 -7
- package/lib/types/components/html-embed.stories.d.ts +0 -11
- package/lib/types/components/html-embed.ws.d.ts +0 -3
- package/lib/types/components/image.d.ts +0 -7
- package/lib/types/components/image.stories.d.ts +0 -13
- package/lib/types/components/image.ws.d.ts +0 -3
- package/lib/types/components/index.d.ts +0 -3
- package/lib/types/components/input.d.ts +0 -5
- package/lib/types/components/input.stories.d.ts +0 -9
- package/lib/types/components/input.ws.d.ts +0 -3
- package/lib/types/components/italic.d.ts +0 -3
- package/lib/types/components/italic.stories.d.ts +0 -5
- package/lib/types/components/italic.ws.d.ts +0 -3
- package/lib/types/components/label.d.ts +0 -3
- package/lib/types/components/label.ws.d.ts +0 -3
- package/lib/types/components/link-block.d.ts +0 -3
- package/lib/types/components/link-block.stories.d.ts +0 -13
- package/lib/types/components/link-block.ws.d.ts +0 -3
- package/lib/types/components/link.d.ts +0 -9
- package/lib/types/components/link.stories.d.ts +0 -13
- package/lib/types/components/link.ws.d.ts +0 -3
- package/lib/types/components/list-item.d.ts +0 -3
- package/lib/types/components/list-item.stories.d.ts +0 -5
- package/lib/types/components/list-item.ws.d.ts +0 -3
- package/lib/types/components/list.d.ts +0 -9
- package/lib/types/components/list.stories.d.ts +0 -9
- package/lib/types/components/list.ws.d.ts +0 -3
- package/lib/types/components/paragraph.d.ts +0 -3
- package/lib/types/components/paragraph.stories.d.ts +0 -5
- package/lib/types/components/paragraph.ws.d.ts +0 -3
- package/lib/types/components/radio-button-field.d.ts +0 -3
- package/lib/types/components/radio-button-field.ws.d.ts +0 -3
- package/lib/types/components/radio-button.d.ts +0 -3
- package/lib/types/components/radio-button.ws.d.ts +0 -3
- package/lib/types/components/rich-text-link.d.ts +0 -2
- package/lib/types/components/rich-text-link.stories.d.ts +0 -13
- package/lib/types/components/rich-text-link.ws.d.ts +0 -3
- package/lib/types/components/separator.d.ts +0 -3
- package/lib/types/components/separator.stories.d.ts +0 -5
- package/lib/types/components/separator.ws.d.ts +0 -3
- package/lib/types/components/slot.d.ts +0 -6
- package/lib/types/components/slot.stories.d.ts +0 -9
- package/lib/types/components/slot.ws.d.ts +0 -3
- package/lib/types/components/span.d.ts +0 -3
- package/lib/types/components/span.stories.d.ts +0 -5
- package/lib/types/components/span.ws.d.ts +0 -3
- package/lib/types/components/subscript.d.ts +0 -3
- package/lib/types/components/subscript.stories.d.ts +0 -5
- package/lib/types/components/subscript.ws.d.ts +0 -3
- package/lib/types/components/success-message.d.ts +0 -3
- package/lib/types/components/success-message.ws.d.ts +0 -3
- package/lib/types/components/superscript.d.ts +0 -3
- package/lib/types/components/superscript.stories.d.ts +0 -5
- package/lib/types/components/superscript.ws.d.ts +0 -3
- package/lib/types/components/text-block.d.ts +0 -7
- package/lib/types/components/text-block.stories.d.ts +0 -9
- package/lib/types/components/text-block.ws.d.ts +0 -3
- package/lib/types/components/textarea.d.ts +0 -3
- package/lib/types/components/textarea.ws.d.ts +0 -3
- package/src/components/__generated__/blockquote.props.ts +0 -444
- package/src/components/__generated__/body.props.ts +0 -443
- package/src/components/__generated__/bold.props.ts +0 -443
- package/src/components/__generated__/box.props.ts +0 -461
- package/src/components/__generated__/button.props.ts +0 -465
- package/src/components/__generated__/checkbox-field.props.ts +0 -444
- package/src/components/__generated__/checkbox.props.ts +0 -484
- package/src/components/__generated__/code-text.props.ts +0 -450
- package/src/components/__generated__/error-message.props.ts +0 -443
- package/src/components/__generated__/form.props.ts +0 -451
- package/src/components/__generated__/fragment.props.ts +0 -3
- package/src/components/__generated__/heading.props.ts +0 -450
- package/src/components/__generated__/html-embed.props.ts +0 -10
- package/src/components/__generated__/image.props.ts +0 -487
- package/src/components/__generated__/input.props.ts +0 -490
- package/src/components/__generated__/italic.props.ts +0 -443
- package/src/components/__generated__/label.props.ts +0 -445
- package/src/components/__generated__/link-block.props.ts +0 -477
- package/src/components/__generated__/link.props.ts +0 -477
- package/src/components/__generated__/list-item.props.ts +0 -444
- package/src/components/__generated__/list.props.ts +0 -457
- package/src/components/__generated__/paragraph.props.ts +0 -443
- package/src/components/__generated__/radio-button-field.props.ts +0 -444
- package/src/components/__generated__/radio-button.props.ts +0 -484
- package/src/components/__generated__/rich-text-link.props.ts +0 -477
- package/src/components/__generated__/separator.props.ts +0 -443
- package/src/components/__generated__/slot.props.ts +0 -3
- package/src/components/__generated__/span.props.ts +0 -443
- package/src/components/__generated__/subscript.props.ts +0 -443
- package/src/components/__generated__/success-message.props.ts +0 -443
- package/src/components/__generated__/superscript.props.ts +0 -443
- package/src/components/__generated__/text-block.props.ts +0 -450
- package/src/components/__generated__/textarea.props.ts +0 -457
- package/src/components/blockquote.stories.tsx +0 -16
- package/src/components/blockquote.tsx +0 -18
- package/src/components/blockquote.ws.tsx +0 -81
- package/src/components/body.stories.tsx +0 -11
- package/src/components/body.tsx +0 -10
- package/src/components/body.ws.tsx +0 -51
- package/src/components/bold.stories.tsx +0 -16
- package/src/components/bold.tsx +0 -10
- package/src/components/bold.ws.tsx +0 -26
- package/src/components/box.stories.tsx +0 -17
- package/src/components/box.tsx +0 -31
- package/src/components/box.ws.ts +0 -52
- package/src/components/button.stories.tsx +0 -13
- package/src/components/button.tsx +0 -23
- package/src/components/button.ws.tsx +0 -34
- package/src/components/checkbox-field.tsx +0 -10
- package/src/components/checkbox-field.ws.tsx +0 -47
- package/src/components/checkbox.tsx +0 -13
- package/src/components/checkbox.ws.tsx +0 -43
- package/src/components/code-text.stories.tsx +0 -16
- package/src/components/code-text.tsx +0 -31
- package/src/components/code-text.ws.tsx +0 -58
- package/src/components/components.ts +0 -40
- package/src/components/error-message.tsx +0 -10
- package/src/components/error-message.ws.tsx +0 -24
- package/src/components/form.stories.tsx +0 -14
- package/src/components/form.tsx +0 -14
- package/src/components/form.ws.tsx +0 -67
- package/src/components/fragment.tsx +0 -11
- package/src/components/fragment.ws.ts +0 -12
- package/src/components/heading.stories.tsx +0 -16
- package/src/components/heading.tsx +0 -20
- package/src/components/heading.ws.tsx +0 -44
- package/src/components/html-embed.stories.tsx +0 -16
- package/src/components/html-embed.tsx +0 -96
- package/src/components/html-embed.ws.ts +0 -24
- package/src/components/image.stories.tsx +0 -15
- package/src/components/image.tsx +0 -80
- package/src/components/image.ws.tsx +0 -54
- package/src/components/index.ts +0 -143
- package/src/components/input.stories.tsx +0 -14
- package/src/components/input.tsx +0 -13
- package/src/components/input.ws.tsx +0 -40
- package/src/components/italic.stories.tsx +0 -16
- package/src/components/italic.tsx +0 -10
- package/src/components/italic.ws.tsx +0 -32
- package/src/components/label.tsx +0 -10
- package/src/components/label.ws.tsx +0 -48
- package/src/components/link-block.stories.tsx +0 -13
- package/src/components/link-block.tsx +0 -9
- package/src/components/link-block.ws.tsx +0 -38
- package/src/components/link.stories.tsx +0 -16
- package/src/components/link.tsx +0 -41
- package/src/components/link.ws.tsx +0 -64
- package/src/components/list-item.stories.tsx +0 -16
- package/src/components/list-item.tsx +0 -18
- package/src/components/list-item.ws.tsx +0 -36
- package/src/components/list.stories.tsx +0 -17
- package/src/components/list.tsx +0 -26
- package/src/components/list.ws.tsx +0 -58
- package/src/components/paragraph.stories.tsx +0 -16
- package/src/components/paragraph.tsx +0 -10
- package/src/components/paragraph.ws.tsx +0 -35
- package/src/components/radio-button-field.tsx +0 -10
- package/src/components/radio-button-field.ws.tsx +0 -47
- package/src/components/radio-button.tsx +0 -13
- package/src/components/radio-button.ws.tsx +0 -43
- package/src/components/rich-text-link.stories.tsx +0 -16
- package/src/components/rich-text-link.tsx +0 -8
- package/src/components/rich-text-link.ws.tsx +0 -19
- package/src/components/separator.stories.tsx +0 -14
- package/src/components/separator.tsx +0 -18
- package/src/components/separator.ws.tsx +0 -56
- package/src/components/slot.stories.tsx +0 -16
- package/src/components/slot.tsx +0 -17
- package/src/components/slot.ws.ts +0 -15
- package/src/components/span.stories.tsx +0 -16
- package/src/components/span.tsx +0 -10
- package/src/components/span.ws.tsx +0 -26
- package/src/components/subscript.stories.tsx +0 -16
- package/src/components/subscript.tsx +0 -10
- package/src/components/subscript.ws.tsx +0 -26
- package/src/components/success-message.tsx +0 -10
- package/src/components/success-message.ws.tsx +0 -24
- package/src/components/superscript.stories.tsx +0 -16
- package/src/components/superscript.tsx +0 -10
- package/src/components/superscript.ws.tsx +0 -26
- package/src/components/text-block.stories.tsx +0 -16
- package/src/components/text-block.tsx +0 -21
- package/src/components/text-block.ws.tsx +0 -42
- package/src/components/textarea.tsx +0 -13
- package/src/components/textarea.ws.tsx +0 -44
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { BoldIcon } from "@webstudio-is/icons/svg";
|
|
2
|
-
import {
|
|
3
|
-
defaultStates,
|
|
4
|
-
type PresetStyle,
|
|
5
|
-
type WsComponentMeta,
|
|
6
|
-
type WsComponentPropsMeta,
|
|
7
|
-
} from "./component-meta";
|
|
8
|
-
import { props } from "./__generated__/bold.props";
|
|
9
|
-
import { b } from "../css/normalize";
|
|
10
|
-
import type { defaultTag } from "./bold";
|
|
11
|
-
|
|
12
|
-
const presetStyle = {
|
|
13
|
-
b,
|
|
14
|
-
} satisfies PresetStyle<typeof defaultTag>;
|
|
15
|
-
|
|
16
|
-
export const meta: WsComponentMeta = {
|
|
17
|
-
type: "rich-text-child",
|
|
18
|
-
label: "Bold Text",
|
|
19
|
-
icon: BoldIcon,
|
|
20
|
-
states: defaultStates,
|
|
21
|
-
presetStyle,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const propsMeta: WsComponentPropsMeta = {
|
|
25
|
-
props,
|
|
26
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
2
|
-
import { Box as BoxPrimitive } from "./box";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Components/Box",
|
|
6
|
-
component: BoxPrimitive,
|
|
7
|
-
} as ComponentMeta<typeof BoxPrimitive>;
|
|
8
|
-
|
|
9
|
-
const Template: ComponentStory<typeof BoxPrimitive> = (args) => (
|
|
10
|
-
<BoxPrimitive
|
|
11
|
-
{...args}
|
|
12
|
-
style={{ minHeight: 20, outline: "1px solid black" }}
|
|
13
|
-
/>
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export const Box = Template.bind({});
|
|
17
|
-
Box.args = {};
|
package/src/components/box.tsx
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createElement,
|
|
3
|
-
forwardRef,
|
|
4
|
-
type ElementRef,
|
|
5
|
-
type ComponentProps,
|
|
6
|
-
} from "react";
|
|
7
|
-
|
|
8
|
-
const defaultTag = "div";
|
|
9
|
-
|
|
10
|
-
// We don't want to enable all tags because Box is usually a container and we have specific components for many tags.
|
|
11
|
-
type Props = ComponentProps<typeof defaultTag> & {
|
|
12
|
-
tag?:
|
|
13
|
-
| "div"
|
|
14
|
-
| "header"
|
|
15
|
-
| "footer"
|
|
16
|
-
| "nav"
|
|
17
|
-
| "main"
|
|
18
|
-
| "section"
|
|
19
|
-
| "article"
|
|
20
|
-
| "aside"
|
|
21
|
-
| "address"
|
|
22
|
-
| "figure";
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const Box = forwardRef<ElementRef<typeof defaultTag>, Props>(
|
|
26
|
-
({ tag = defaultTag, ...props }, ref) => {
|
|
27
|
-
return createElement(tag, { ...props, ref });
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
Box.displayName = "Box";
|
package/src/components/box.ws.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { BoxIcon } from "@webstudio-is/icons/svg";
|
|
2
|
-
import {
|
|
3
|
-
defaultStates,
|
|
4
|
-
type PresetStyle,
|
|
5
|
-
type WsComponentMeta,
|
|
6
|
-
type WsComponentPropsMeta,
|
|
7
|
-
} from "./component-meta";
|
|
8
|
-
import { props } from "./__generated__/box.props";
|
|
9
|
-
import type { Box } from "./box";
|
|
10
|
-
import type { ComponentProps } from "react";
|
|
11
|
-
import {
|
|
12
|
-
div,
|
|
13
|
-
address,
|
|
14
|
-
article,
|
|
15
|
-
aside,
|
|
16
|
-
figure,
|
|
17
|
-
footer,
|
|
18
|
-
header,
|
|
19
|
-
main,
|
|
20
|
-
nav,
|
|
21
|
-
section,
|
|
22
|
-
} from "../css/normalize";
|
|
23
|
-
|
|
24
|
-
type BoxTags = NonNullable<ComponentProps<typeof Box>["tag"]>;
|
|
25
|
-
|
|
26
|
-
const presetStyle = {
|
|
27
|
-
div,
|
|
28
|
-
address,
|
|
29
|
-
article,
|
|
30
|
-
aside,
|
|
31
|
-
figure,
|
|
32
|
-
footer,
|
|
33
|
-
header,
|
|
34
|
-
main,
|
|
35
|
-
nav,
|
|
36
|
-
section,
|
|
37
|
-
} satisfies PresetStyle<BoxTags>;
|
|
38
|
-
|
|
39
|
-
export const meta: WsComponentMeta = {
|
|
40
|
-
category: "general",
|
|
41
|
-
type: "container",
|
|
42
|
-
label: "Box",
|
|
43
|
-
icon: BoxIcon,
|
|
44
|
-
states: defaultStates,
|
|
45
|
-
presetStyle,
|
|
46
|
-
order: 0,
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export const propsMeta: WsComponentPropsMeta = {
|
|
50
|
-
props,
|
|
51
|
-
initialProps: ["tag"],
|
|
52
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
2
|
-
import { Button as ButtonPrimitive } from "./button";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Components/Button",
|
|
6
|
-
component: ButtonPrimitive,
|
|
7
|
-
} as ComponentMeta<typeof ButtonPrimitive>;
|
|
8
|
-
|
|
9
|
-
const Template: ComponentStory<typeof ButtonPrimitive> = (args) => (
|
|
10
|
-
<ButtonPrimitive {...args} />
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
export const Button = Template.bind({});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ElementRef, type ComponentProps } from "react";
|
|
2
|
-
|
|
3
|
-
export const defaultTag = "button";
|
|
4
|
-
|
|
5
|
-
type ButtonProps = ComponentProps<typeof defaultTag> & { innerText?: string };
|
|
6
|
-
|
|
7
|
-
export const Button = forwardRef<ElementRef<typeof defaultTag>, ButtonProps>(
|
|
8
|
-
(
|
|
9
|
-
{
|
|
10
|
-
type = "submit",
|
|
11
|
-
innerText = "Edit Inner Text in Properties",
|
|
12
|
-
children,
|
|
13
|
-
...props
|
|
14
|
-
},
|
|
15
|
-
ref
|
|
16
|
-
) => (
|
|
17
|
-
<button type={type} {...props} ref={ref}>
|
|
18
|
-
{children ? children : innerText}
|
|
19
|
-
</button>
|
|
20
|
-
)
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
Button.displayName = "Button";
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ButtonElementIcon } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { button } from "../css/normalize";
|
|
3
|
-
import {
|
|
4
|
-
defaultStates,
|
|
5
|
-
type PresetStyle,
|
|
6
|
-
type WsComponentMeta,
|
|
7
|
-
type WsComponentPropsMeta,
|
|
8
|
-
} from "./component-meta";
|
|
9
|
-
import { props } from "./__generated__/button.props";
|
|
10
|
-
import type { defaultTag } from "./button";
|
|
11
|
-
|
|
12
|
-
const presetStyle = {
|
|
13
|
-
button,
|
|
14
|
-
} satisfies PresetStyle<typeof defaultTag>;
|
|
15
|
-
|
|
16
|
-
export const meta: WsComponentMeta = {
|
|
17
|
-
category: "forms",
|
|
18
|
-
type: "container",
|
|
19
|
-
invalidAncestors: ["Button"],
|
|
20
|
-
label: "Button",
|
|
21
|
-
icon: ButtonElementIcon,
|
|
22
|
-
presetStyle,
|
|
23
|
-
states: [
|
|
24
|
-
...defaultStates,
|
|
25
|
-
{ selector: ":disabled", label: "Disabled" },
|
|
26
|
-
{ selector: ":enabled", label: "Enabled" },
|
|
27
|
-
],
|
|
28
|
-
order: 1,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const propsMeta: WsComponentPropsMeta = {
|
|
32
|
-
props,
|
|
33
|
-
initialProps: ["type", "innerText", "aria-label"],
|
|
34
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ElementRef, type ComponentProps } from "react";
|
|
2
|
-
|
|
3
|
-
export const defaultTag = "label";
|
|
4
|
-
|
|
5
|
-
export const CheckboxField = forwardRef<
|
|
6
|
-
ElementRef<typeof defaultTag>,
|
|
7
|
-
Omit<ComponentProps<typeof defaultTag>, "htmlFor">
|
|
8
|
-
>((props, ref) => <label {...props} ref={ref} />);
|
|
9
|
-
|
|
10
|
-
CheckboxField.displayName = "CheckboxField";
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { CheckboxCheckedIcon } from "@webstudio-is/icons/svg";
|
|
2
|
-
import {
|
|
3
|
-
type WsComponentMeta,
|
|
4
|
-
type WsComponentPropsMeta,
|
|
5
|
-
type PresetStyle,
|
|
6
|
-
defaultStates,
|
|
7
|
-
} from "./component-meta";
|
|
8
|
-
import { props } from "./__generated__/checkbox-field.props";
|
|
9
|
-
import type { defaultTag } from "./checkbox-field";
|
|
10
|
-
import { label } from "../css/normalize";
|
|
11
|
-
|
|
12
|
-
const presetStyle = {
|
|
13
|
-
label: [
|
|
14
|
-
...label,
|
|
15
|
-
{ property: "display", value: { type: "keyword", value: "flex" } },
|
|
16
|
-
],
|
|
17
|
-
} satisfies PresetStyle<typeof defaultTag>;
|
|
18
|
-
|
|
19
|
-
export const meta: WsComponentMeta = {
|
|
20
|
-
category: "forms",
|
|
21
|
-
type: "container",
|
|
22
|
-
label: "Checkbox",
|
|
23
|
-
icon: CheckboxCheckedIcon,
|
|
24
|
-
states: defaultStates,
|
|
25
|
-
presetStyle,
|
|
26
|
-
template: [
|
|
27
|
-
{
|
|
28
|
-
type: "instance",
|
|
29
|
-
component: "CheckboxField",
|
|
30
|
-
children: [
|
|
31
|
-
{ type: "instance", component: "Checkbox", children: [] },
|
|
32
|
-
{
|
|
33
|
-
type: "instance",
|
|
34
|
-
component: "TextBlock",
|
|
35
|
-
label: "Checkbox Label",
|
|
36
|
-
props: [],
|
|
37
|
-
children: [{ type: "text", value: "Checkbox" }],
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const propsMeta: WsComponentPropsMeta = {
|
|
45
|
-
props,
|
|
46
|
-
initialProps: [],
|
|
47
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ElementRef, type ComponentProps } from "react";
|
|
2
|
-
|
|
3
|
-
export const defaultTag = "input";
|
|
4
|
-
|
|
5
|
-
export const Checkbox = forwardRef<
|
|
6
|
-
ElementRef<typeof defaultTag>,
|
|
7
|
-
Omit<ComponentProps<typeof defaultTag>, "type">
|
|
8
|
-
// Make sure children are not passed down to an input, because this will result in error.
|
|
9
|
-
>(({ children: _children, ...props }, ref) => (
|
|
10
|
-
<input {...props} type="checkbox" ref={ref} />
|
|
11
|
-
));
|
|
12
|
-
|
|
13
|
-
Checkbox.displayName = "Checkbox";
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { CheckboxCheckedIcon } from "@webstudio-is/icons/svg";
|
|
2
|
-
import {
|
|
3
|
-
type WsComponentMeta,
|
|
4
|
-
type WsComponentPropsMeta,
|
|
5
|
-
type PresetStyle,
|
|
6
|
-
defaultStates,
|
|
7
|
-
} from "./component-meta";
|
|
8
|
-
import type { defaultTag } from "./checkbox";
|
|
9
|
-
import { input } from "../css/normalize";
|
|
10
|
-
import { props } from "./__generated__/checkbox.props";
|
|
11
|
-
|
|
12
|
-
const presetStyle = {
|
|
13
|
-
input: [
|
|
14
|
-
...input,
|
|
15
|
-
{
|
|
16
|
-
property: "marginRight",
|
|
17
|
-
value: { type: "unit", unit: "em", value: 0.5 },
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
} satisfies PresetStyle<typeof defaultTag>;
|
|
21
|
-
|
|
22
|
-
export const meta: WsComponentMeta = {
|
|
23
|
-
type: "control",
|
|
24
|
-
label: "Checkbox Input",
|
|
25
|
-
icon: CheckboxCheckedIcon,
|
|
26
|
-
presetStyle,
|
|
27
|
-
order: 6,
|
|
28
|
-
states: [
|
|
29
|
-
...defaultStates,
|
|
30
|
-
{ selector: ":checked", label: "Checked" },
|
|
31
|
-
{ selector: ":required", label: "Required" },
|
|
32
|
-
{ selector: ":optional", label: "Optional" },
|
|
33
|
-
{ selector: ":disabled", label: "Disabled" },
|
|
34
|
-
{ selector: ":enabled", label: "Enabled" },
|
|
35
|
-
{ selector: ":read-only", label: "Read Only" },
|
|
36
|
-
{ selector: ":read-write", label: "Read Write" },
|
|
37
|
-
],
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const propsMeta: WsComponentPropsMeta = {
|
|
41
|
-
props,
|
|
42
|
-
initialProps: ["name"],
|
|
43
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
2
|
-
import { CodeText as CodeTextPrimitive } from "./code-text";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Components/CodeText",
|
|
6
|
-
component: CodeTextPrimitive,
|
|
7
|
-
} as ComponentMeta<typeof CodeTextPrimitive>;
|
|
8
|
-
|
|
9
|
-
const Template: ComponentStory<typeof CodeTextPrimitive> = (args) => (
|
|
10
|
-
<CodeTextPrimitive {...args} />
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
export const CodeText = Template.bind({});
|
|
14
|
-
CodeText.args = {
|
|
15
|
-
children: "alert('Hello World!')",
|
|
16
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
forwardRef,
|
|
3
|
-
createElement,
|
|
4
|
-
type ElementRef,
|
|
5
|
-
type ComponentProps,
|
|
6
|
-
} from "react";
|
|
7
|
-
import { cssVars } from "@webstudio-is/css-vars";
|
|
8
|
-
|
|
9
|
-
export const defaultTag = "code";
|
|
10
|
-
|
|
11
|
-
export const displayVarNamespace = cssVars.unique("code-display");
|
|
12
|
-
|
|
13
|
-
const blockStyle = {
|
|
14
|
-
[cssVars.define(displayVarNamespace, true)]: "block",
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
type Props = Omit<ComponentProps<typeof defaultTag>, "inline"> & {
|
|
18
|
-
inline?: boolean;
|
|
19
|
-
meta?: string;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const CodeText = forwardRef<ElementRef<typeof defaultTag>, Props>(
|
|
23
|
-
({ inline = false, ...props }, ref) => {
|
|
24
|
-
// @todo in the future we should expose the inline prop a an attribute
|
|
25
|
-
// and define the display style in `presetStyle` in meta.
|
|
26
|
-
const style = inline ? undefined : blockStyle;
|
|
27
|
-
return createElement(defaultTag, { ...props, style, ref });
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
CodeText.displayName = "CodeText";
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { CodeTextIcon } from "@webstudio-is/icons/svg";
|
|
2
|
-
import {
|
|
3
|
-
defaultStates,
|
|
4
|
-
type PresetStyle,
|
|
5
|
-
type WsComponentMeta,
|
|
6
|
-
type WsComponentPropsMeta,
|
|
7
|
-
} from "./component-meta";
|
|
8
|
-
import { type defaultTag, displayVarNamespace } from "./code-text";
|
|
9
|
-
import { props } from "./__generated__/code-text.props";
|
|
10
|
-
import { code } from "../css/normalize";
|
|
11
|
-
|
|
12
|
-
const presetStyle = {
|
|
13
|
-
code: [
|
|
14
|
-
...code,
|
|
15
|
-
{
|
|
16
|
-
property: "display",
|
|
17
|
-
value: {
|
|
18
|
-
type: "var",
|
|
19
|
-
value: displayVarNamespace,
|
|
20
|
-
fallbacks: [{ type: "keyword", value: "inline-block" }],
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
property: "paddingLeft",
|
|
25
|
-
value: { type: "unit", value: 0.2, unit: "em" },
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
property: "paddingRight",
|
|
29
|
-
value: { type: "unit", value: 0.2, unit: "em" },
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
property: "backgroundColor",
|
|
33
|
-
value: { type: "rgb", r: 238, g: 238, b: 238, alpha: 1 },
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
} satisfies PresetStyle<typeof defaultTag>;
|
|
37
|
-
|
|
38
|
-
export const meta: WsComponentMeta = {
|
|
39
|
-
category: "general",
|
|
40
|
-
type: "rich-text",
|
|
41
|
-
label: "Code Text",
|
|
42
|
-
icon: CodeTextIcon,
|
|
43
|
-
states: defaultStates,
|
|
44
|
-
presetStyle,
|
|
45
|
-
template: [
|
|
46
|
-
{
|
|
47
|
-
type: "instance",
|
|
48
|
-
component: "CodeText",
|
|
49
|
-
children: [{ type: "text", value: "Code you can edit" }],
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
order: 8,
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const propsMeta: WsComponentPropsMeta = {
|
|
56
|
-
props,
|
|
57
|
-
initialProps: ["inline", "lang", "meta"],
|
|
58
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file should contain all the components that we use in the builder/production app
|
|
3
|
-
*
|
|
4
|
-
* The application imports only the components it uses and uses
|
|
5
|
-
* getComponent = createGetComponent({ Box, BlaBla })to pass them to RootInstance
|
|
6
|
-
* see example /packages/sdk-size-test/app/routes/$.tsx
|
|
7
|
-
*/
|
|
8
|
-
export { Slot } from "./slot";
|
|
9
|
-
export { Fragment } from "./fragment";
|
|
10
|
-
export { HtmlEmbed } from "./html-embed";
|
|
11
|
-
export { Body } from "./body";
|
|
12
|
-
export { Box } from "./box";
|
|
13
|
-
export { TextBlock } from "./text-block";
|
|
14
|
-
export { Heading } from "./heading";
|
|
15
|
-
export { Paragraph } from "./paragraph";
|
|
16
|
-
export { Link } from "./link";
|
|
17
|
-
export { LinkBlock } from "./link-block";
|
|
18
|
-
export { RichTextLink } from "./rich-text-link";
|
|
19
|
-
export { Span } from "./span";
|
|
20
|
-
export { Bold } from "./bold";
|
|
21
|
-
export { Italic } from "./italic";
|
|
22
|
-
export { Superscript } from "./superscript";
|
|
23
|
-
export { Subscript } from "./subscript";
|
|
24
|
-
export { Button } from "./button";
|
|
25
|
-
export { Input } from "./input";
|
|
26
|
-
export { Form } from "./form";
|
|
27
|
-
export { Image } from "./image";
|
|
28
|
-
export { Blockquote } from "./blockquote";
|
|
29
|
-
export { List } from "./list";
|
|
30
|
-
export { ListItem } from "./list-item";
|
|
31
|
-
export { Separator } from "./separator";
|
|
32
|
-
export { CodeText } from "./code-text";
|
|
33
|
-
export { Label } from "./label";
|
|
34
|
-
export { SuccessMessage } from "./success-message";
|
|
35
|
-
export { ErrorMessage } from "./error-message";
|
|
36
|
-
export { Textarea } from "./textarea";
|
|
37
|
-
export { RadioButtonField } from "./radio-button-field";
|
|
38
|
-
export { RadioButton } from "./radio-button";
|
|
39
|
-
export { CheckboxField } from "./checkbox-field";
|
|
40
|
-
export { Checkbox } from "./checkbox";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ElementRef, type ComponentProps } from "react";
|
|
2
|
-
|
|
3
|
-
export const defaultTag = "div";
|
|
4
|
-
|
|
5
|
-
export const ErrorMessage = forwardRef<
|
|
6
|
-
ElementRef<typeof defaultTag>,
|
|
7
|
-
ComponentProps<typeof defaultTag>
|
|
8
|
-
>((props, ref) => <div {...props} ref={ref} />);
|
|
9
|
-
|
|
10
|
-
ErrorMessage.displayName = "ErrorMessage";
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { BoxIcon } from "@webstudio-is/icons/svg";
|
|
2
|
-
import type {
|
|
3
|
-
WsComponentMeta,
|
|
4
|
-
WsComponentPropsMeta,
|
|
5
|
-
PresetStyle,
|
|
6
|
-
} from "./component-meta";
|
|
7
|
-
import { props } from "./__generated__/error-message.props";
|
|
8
|
-
import { div } from "../css/normalize";
|
|
9
|
-
|
|
10
|
-
const presetStyle = {
|
|
11
|
-
div,
|
|
12
|
-
} satisfies PresetStyle<"div">;
|
|
13
|
-
|
|
14
|
-
export const meta: WsComponentMeta = {
|
|
15
|
-
type: "container",
|
|
16
|
-
label: "Error Message",
|
|
17
|
-
icon: BoxIcon,
|
|
18
|
-
presetStyle,
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const propsMeta: WsComponentPropsMeta = {
|
|
22
|
-
props,
|
|
23
|
-
initialProps: [],
|
|
24
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
2
|
-
import { Form as FormPrimitive } from "./form";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Components/Form",
|
|
6
|
-
component: FormPrimitive,
|
|
7
|
-
} as ComponentMeta<typeof FormPrimitive>;
|
|
8
|
-
|
|
9
|
-
const Template: ComponentStory<typeof FormPrimitive> = (args) => (
|
|
10
|
-
<FormPrimitive {...args} />
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
export const Form = Template.bind({});
|
|
14
|
-
Form.args = {};
|
package/src/components/form.tsx
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ElementRef, type ComponentProps } from "react";
|
|
2
|
-
|
|
3
|
-
export const defaultTag = "form";
|
|
4
|
-
|
|
5
|
-
export const Form = forwardRef<
|
|
6
|
-
ElementRef<typeof defaultTag>,
|
|
7
|
-
ComponentProps<typeof defaultTag>
|
|
8
|
-
>(({ children, ...props }, ref) => (
|
|
9
|
-
<form {...props} ref={ref}>
|
|
10
|
-
{children}
|
|
11
|
-
</form>
|
|
12
|
-
));
|
|
13
|
-
|
|
14
|
-
Form.displayName = "Form";
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { FormIcon } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { form } from "../css/normalize";
|
|
3
|
-
import {
|
|
4
|
-
defaultStates,
|
|
5
|
-
type PresetStyle,
|
|
6
|
-
type WsComponentMeta,
|
|
7
|
-
type WsComponentPropsMeta,
|
|
8
|
-
} from "./component-meta";
|
|
9
|
-
import type { defaultTag } from "./form";
|
|
10
|
-
import { props } from "./__generated__/form.props";
|
|
11
|
-
|
|
12
|
-
const presetStyle = {
|
|
13
|
-
form: [
|
|
14
|
-
...form,
|
|
15
|
-
{ property: "minHeight", value: { type: "unit", unit: "px", value: 20 } },
|
|
16
|
-
],
|
|
17
|
-
} satisfies PresetStyle<typeof defaultTag>;
|
|
18
|
-
|
|
19
|
-
export const meta: WsComponentMeta = {
|
|
20
|
-
category: "forms",
|
|
21
|
-
type: "container",
|
|
22
|
-
label: "Form",
|
|
23
|
-
icon: FormIcon,
|
|
24
|
-
states: defaultStates,
|
|
25
|
-
presetStyle,
|
|
26
|
-
order: 0,
|
|
27
|
-
template: [
|
|
28
|
-
{
|
|
29
|
-
type: "instance",
|
|
30
|
-
component: "Form",
|
|
31
|
-
children: [
|
|
32
|
-
{
|
|
33
|
-
type: "instance",
|
|
34
|
-
component: "Label",
|
|
35
|
-
children: [{ type: "text", value: "Name" }],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
type: "instance",
|
|
39
|
-
component: "Input",
|
|
40
|
-
props: [{ type: "string", name: "name", value: "name" }],
|
|
41
|
-
children: [],
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
type: "instance",
|
|
45
|
-
component: "Label",
|
|
46
|
-
children: [{ type: "text", value: "Email" }],
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
type: "instance",
|
|
50
|
-
component: "Input",
|
|
51
|
-
props: [{ type: "string", name: "name", value: "email" }],
|
|
52
|
-
children: [],
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
type: "instance",
|
|
56
|
-
component: "Button",
|
|
57
|
-
children: [{ type: "text", value: "Submit" }],
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export const propsMeta: WsComponentPropsMeta = {
|
|
65
|
-
props,
|
|
66
|
-
initialProps: [],
|
|
67
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ElementRef, type ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
type Props = {
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export const Fragment = forwardRef<ElementRef<"div">, Props>((props, ref) => {
|
|
8
|
-
return <div {...props} ref={ref} style={{ display: "contents" }} />;
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
Fragment.displayName = "Fragment";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { WsComponentMeta, WsComponentPropsMeta } from "./component-meta";
|
|
2
|
-
|
|
3
|
-
export const meta: WsComponentMeta = {
|
|
4
|
-
type: "container",
|
|
5
|
-
label: "Fragment",
|
|
6
|
-
icon: "",
|
|
7
|
-
stylable: false,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const propsMeta: WsComponentPropsMeta = {
|
|
11
|
-
props: {},
|
|
12
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
2
|
-
import { Heading as HeadingPrimitive } from "./heading";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Components/Heading",
|
|
6
|
-
component: HeadingPrimitive,
|
|
7
|
-
} as ComponentMeta<typeof HeadingPrimitive>;
|
|
8
|
-
|
|
9
|
-
const Template: ComponentStory<typeof HeadingPrimitive> = (args) => (
|
|
10
|
-
<HeadingPrimitive {...args} />
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
export const Heading = Template.bind({});
|
|
14
|
-
Heading.args = {
|
|
15
|
-
children: "Heading",
|
|
16
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
forwardRef,
|
|
3
|
-
createElement,
|
|
4
|
-
type ElementRef,
|
|
5
|
-
type ComponentProps,
|
|
6
|
-
} from "react";
|
|
7
|
-
|
|
8
|
-
const defaultTag = "h1";
|
|
9
|
-
|
|
10
|
-
type Props = ComponentProps<typeof defaultTag> & {
|
|
11
|
-
tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const Heading = forwardRef<ElementRef<typeof defaultTag>, Props>(
|
|
15
|
-
({ tag = defaultTag, ...props }, ref) => {
|
|
16
|
-
return createElement(tag, { ...props, ref });
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
Heading.displayName = "Heading";
|