@plitzi/sdk-elements 0.38.23 → 0.39.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/CHANGELOG.md +180 -1
- package/dist/Element/RootElement.d.ts +1 -1
- package/dist/Element/RootElement.mjs +62 -61
- package/dist/Element/RowAnchor.d.ts +15 -0
- package/dist/Element/RowAnchor.mjs +8 -0
- package/dist/Element/helpers/elementConstants.mjs +12 -0
- package/dist/Element/hocs/withElement.d.ts +1 -1
- package/dist/Element/hocs/withElement.mjs +96 -88
- package/dist/Element/hooks/useEditableContent.d.ts +11 -0
- package/dist/Element/hooks/useEditableContent.mjs +11 -10
- package/dist/Element/hooks/useElement.mjs +1 -1
- package/dist/Element/hooks/useElementDataSource.mjs +11 -10
- package/dist/Element/hooks/useFocusInteractions.d.ts +12 -0
- package/dist/Element/hooks/useFocusInteractions.mjs +9 -0
- package/dist/Element/hooks/useInternalClassName.mjs +22 -21
- package/dist/Element/hooks/useRootElementInteractions.mjs +48 -42
- package/dist/Element/hooks/useScrollInteractions.d.ts +1 -1
- package/dist/Element/hooks/useScrollInteractions.mjs +61 -30
- package/dist/dataSource/PluginSource.d.ts +22 -0
- package/dist/dataSource/PluginSource.mjs +27 -0
- package/dist/dataSource/index.d.ts +2 -0
- package/dist/dataSource/index.mjs +5 -4
- package/dist/elements/advanced/BlockHtml/BlockHtml.d.ts +1 -1
- package/dist/elements/advanced/BlockHtml/index.d.ts +1 -1
- package/dist/elements/advanced/BlockJsx/BlockJsx.d.ts +1 -1
- package/dist/elements/advanced/BlockJsx/index.d.ts +1 -1
- package/dist/elements/advanced/Custom/Custom.d.ts +1 -1
- package/dist/elements/advanced/Custom/index.d.ts +1 -1
- package/dist/elements/advanced/NodeHtml/NodeHtml.d.ts +1 -1
- package/dist/elements/advanced/NodeHtml/declaration.d.ts +3 -3
- package/dist/elements/advanced/NodeHtml/index.d.ts +4 -4
- package/dist/elements/advanced/Reference/Reference.d.ts +2 -2
- package/dist/elements/advanced/Reference/Reference.mjs +1 -1
- package/dist/elements/advanced/Reference/index.d.ts +1 -1
- package/dist/elements/basic/Button/Button.d.ts +7 -2
- package/dist/elements/basic/Button/Button.mjs +27 -25
- package/dist/elements/basic/Button/Settings.mjs +1 -1
- package/dist/elements/basic/Button/declaration.d.ts +8 -1
- package/dist/elements/basic/Button/declaration.mjs +3 -0
- package/dist/elements/basic/Button/index.d.ts +9 -2
- package/dist/elements/basic/Dropdown/Dropdown.d.ts +9 -2
- package/dist/elements/basic/Dropdown/Dropdown.mjs +93 -74
- package/dist/elements/basic/Dropdown/DropdownPopup/DropdownPopup.d.ts +1 -1
- package/dist/elements/basic/Dropdown/DropdownPopup/index.d.ts +1 -1
- package/dist/elements/basic/Dropdown/declaration.d.ts +31 -0
- package/dist/elements/basic/Dropdown/declaration.mjs +38 -6
- package/dist/elements/basic/Dropdown/index.d.ts +33 -2
- package/dist/elements/basic/Dropdown/useDropdown.d.ts +2 -0
- package/dist/elements/basic/Heading/Heading.d.ts +1 -1
- package/dist/elements/basic/Heading/Heading.mjs +3 -2
- package/dist/elements/basic/Heading/declaration.d.ts +2 -0
- package/dist/elements/basic/Heading/declaration.mjs +2 -0
- package/dist/elements/basic/Heading/index.d.ts +3 -1
- package/dist/elements/basic/Link/Link.d.ts +1 -1
- package/dist/elements/basic/Link/Link.mjs +46 -45
- package/dist/elements/basic/Link/declaration.d.ts +1 -0
- package/dist/elements/basic/Link/declaration.mjs +5 -0
- package/dist/elements/basic/Link/index.d.ts +2 -1
- package/dist/elements/basic/Markdown/Markdown.d.ts +1 -1
- package/dist/elements/basic/Markdown/declaration.d.ts +2 -0
- package/dist/elements/basic/Markdown/declaration.mjs +2 -0
- package/dist/elements/basic/Markdown/index.d.ts +3 -1
- package/dist/elements/basic/Paragraph/Paragraph.d.ts +1 -1
- package/dist/elements/basic/Paragraph/Paragraph.mjs +3 -2
- package/dist/elements/basic/Paragraph/Settings.mjs +1 -1
- package/dist/elements/basic/Paragraph/declaration.d.ts +2 -0
- package/dist/elements/basic/Paragraph/declaration.mjs +2 -0
- package/dist/elements/basic/Paragraph/index.d.ts +3 -1
- package/dist/elements/basic/RichText/RichText.d.ts +1 -1
- package/dist/elements/basic/RichText/declaration.d.ts +1 -0
- package/dist/elements/basic/RichText/declaration.mjs +1 -0
- package/dist/elements/basic/RichText/index.d.ts +2 -1
- package/dist/elements/basic/Text/Settings.mjs +1 -1
- package/dist/elements/basic/Text/Text.d.ts +1 -1
- package/dist/elements/basic/Text/Text.mjs +3 -2
- package/dist/elements/basic/Text/declaration.d.ts +2 -0
- package/dist/elements/basic/Text/declaration.mjs +2 -0
- package/dist/elements/basic/Text/index.d.ts +3 -1
- package/dist/elements/basic/ThemeToggle/ThemeToggle.d.ts +2 -2
- package/dist/elements/basic/ThemeToggle/declaration.d.ts +1 -0
- package/dist/elements/basic/ThemeToggle/declaration.mjs +5 -0
- package/dist/elements/basic/ThemeToggle/index.d.ts +2 -1
- package/dist/elements/declarations/index.d.ts +322 -12
- package/dist/elements/declarations/index.mjs +46 -44
- package/dist/elements/form/Form/Form.d.ts +8 -2
- package/dist/elements/form/Form/Form.mjs +102 -79
- package/dist/elements/form/Form/declaration.d.ts +21 -3
- package/dist/elements/form/Form/declaration.mjs +28 -11
- package/dist/elements/form/Form/index.d.ts +17 -2
- package/dist/elements/form/FormControl/FormControl.d.ts +8 -2
- package/dist/elements/form/FormControl/FormControl.mjs +71 -66
- package/dist/elements/form/FormControl/Settings.d.ts +6 -1
- package/dist/elements/form/FormControl/Settings.mjs +130 -98
- package/dist/elements/form/FormControl/declaration.d.ts +7 -0
- package/dist/elements/form/FormControl/declaration.mjs +21 -1
- package/dist/elements/form/FormControl/helpers/useBlurValidation.d.ts +12 -0
- package/dist/elements/form/FormControl/helpers/useBlurValidation.mjs +20 -0
- package/dist/elements/form/FormControl/helpers/validateField.d.ts +8 -0
- package/dist/elements/form/FormControl/helpers/validateField.mjs +8 -2
- package/dist/elements/form/FormControl/hocs/withFieldValue.d.ts +4 -0
- package/dist/elements/form/FormControl/hocs/withFieldValue.mjs +49 -41
- package/dist/elements/form/FormControl/index.d.ts +8 -1
- package/dist/elements/form/FormControl/inputs/Checkbox.mjs +2 -2
- package/dist/elements/form/FormControl/inputs/Input.d.ts +5 -1
- package/dist/elements/form/FormControl/inputs/Input.mjs +42 -38
- package/dist/elements/form/FormControl/inputs/Select.d.ts +5 -1
- package/dist/elements/form/FormControl/inputs/Select.mjs +33 -28
- package/dist/elements/form/FormControl/inputs/Textarea.mjs +27 -26
- package/dist/elements/form/FormControl/inputs/useFocusWhenShown.d.ts +1 -1
- package/dist/elements/index.d.ts +3 -1
- package/dist/elements/index.mjs +32 -30
- package/dist/elements/internal/LayoutContainer/LayoutContainer.d.ts +1 -1
- package/dist/elements/internal/LayoutContainer/LayoutContainer.mjs +30 -30
- package/dist/elements/internal/LayoutContainer/index.d.ts +1 -1
- package/dist/elements/internal/LayoutContainer/mask.d.ts +13 -0
- package/dist/elements/internal/LayoutContainer/mask.mjs +16 -1
- package/dist/elements/internal/Loading/Loading.d.ts +1 -1
- package/dist/elements/internal/Loading/index.d.ts +1 -1
- package/dist/elements/internal/NotFound/NotFound.d.ts +1 -1
- package/dist/elements/internal/NotFound/index.d.ts +1 -1
- package/dist/elements/internal/Page/Page.d.ts +17 -3
- package/dist/elements/internal/Page/Page.mjs +32 -25
- package/dist/elements/internal/Page/PageHead.d.ts +11 -4
- package/dist/elements/internal/Page/PageHead.mjs +41 -19
- package/dist/elements/internal/Page/PageWithheld.d.ts +3 -2
- package/dist/elements/internal/Page/PageWithheld.mjs +41 -18
- package/dist/elements/internal/Page/Settings.d.ts +5 -1
- package/dist/elements/internal/Page/Settings.mjs +160 -121
- package/dist/elements/internal/Page/SharePreview.d.ts +13 -0
- package/dist/elements/internal/Page/SharePreview.mjs +53 -0
- package/dist/elements/internal/Page/declaration.d.ts +9 -1
- package/dist/elements/internal/Page/declaration.mjs +11 -4
- package/dist/elements/internal/Page/index.d.ts +9 -2
- package/dist/elements/media/Chart/Chart.d.ts +33 -0
- package/dist/elements/media/Chart/Chart.mjs +195 -0
- package/dist/elements/media/Chart/Settings.d.ts +6 -0
- package/dist/elements/media/Chart/Settings.mjs +92 -0
- package/dist/elements/media/Chart/chartGeometry.d.ts +37 -0
- package/dist/elements/media/Chart/chartGeometry.mjs +47 -0
- package/dist/elements/media/Chart/declaration.d.ts +144 -0
- package/dist/elements/media/Chart/declaration.mjs +107 -0
- package/dist/elements/media/Chart/index.d.ts +145 -0
- package/dist/elements/media/Chart/index.mjs +6 -0
- package/dist/elements/media/Embed/Embed.d.ts +1 -1
- package/dist/elements/media/Embed/Embed.mjs +25 -21
- package/dist/elements/media/Embed/declaration.d.ts +1 -0
- package/dist/elements/media/Embed/declaration.mjs +1 -0
- package/dist/elements/media/Embed/index.d.ts +2 -1
- package/dist/elements/media/FontAwesome/FontAwesome.d.ts +1 -1
- package/dist/elements/media/FontAwesome/index.d.ts +1 -1
- package/dist/elements/media/Image/Image.d.ts +1 -1
- package/dist/elements/media/Image/Image.mjs +35 -34
- package/dist/elements/media/Image/declaration.d.ts +2 -1
- package/dist/elements/media/Image/declaration.mjs +1 -0
- package/dist/elements/media/Image/index.d.ts +3 -2
- package/dist/elements/media/Svg/Svg.d.ts +1 -1
- package/dist/elements/media/Svg/declaration.d.ts +1 -0
- package/dist/elements/media/Svg/declaration.mjs +1 -0
- package/dist/elements/media/Svg/index.d.ts +2 -1
- package/dist/elements/media/Video/Video.d.ts +1 -1
- package/dist/elements/media/Video/declaration.d.ts +1 -0
- package/dist/elements/media/Video/declaration.mjs +1 -0
- package/dist/elements/media/Video/index.d.ts +2 -1
- package/dist/elements/provider/ApiContainer/ApiContainer.d.ts +1 -1
- package/dist/elements/provider/ApiContainer/ApiContainer.mjs +215 -185
- package/dist/elements/provider/ApiContainer/declaration.d.ts +9 -0
- package/dist/elements/provider/ApiContainer/declaration.mjs +10 -1
- package/dist/elements/provider/ApiContainer/hooks/useInputRefresh.d.ts +4 -4
- package/dist/elements/provider/ApiContainer/hooks/useProviderPagination.d.ts +2 -1
- package/dist/elements/provider/ApiContainer/index.d.ts +10 -1
- package/dist/elements/provider/Channel/Channel.d.ts +1 -1
- package/dist/elements/provider/Channel/declaration.d.ts +9 -0
- package/dist/elements/provider/Channel/declaration.mjs +11 -2
- package/dist/elements/provider/Channel/index.d.ts +10 -1
- package/dist/elements/settings.mjs +42 -40
- package/dist/elements/structure/Carousel/Carousel.d.ts +1 -1
- package/dist/elements/structure/Carousel/Carousel.mjs +147 -130
- package/dist/elements/structure/Carousel/CarouselContext.d.ts +3 -3
- package/dist/elements/structure/Carousel/CarouselTrack/CarouselTrack.d.ts +1 -1
- package/dist/elements/structure/Carousel/CarouselTrack/components/ScrollTrack/ScrollTrack.d.ts +6 -2
- package/dist/elements/structure/Carousel/CarouselTrack/components/ScrollTrack/ScrollTrack.mjs +32 -20
- package/dist/elements/structure/Carousel/CarouselTrack/index.d.ts +1 -1
- package/dist/elements/structure/Carousel/carouselIndex.d.ts +17 -0
- package/dist/elements/structure/Carousel/carouselIndex.mjs +17 -5
- package/dist/elements/structure/Carousel/declaration.d.ts +49 -2
- package/dist/elements/structure/Carousel/declaration.mjs +26 -4
- package/dist/elements/structure/Carousel/index.d.ts +51 -4
- package/dist/elements/structure/Container/Container.d.ts +5 -3
- package/dist/elements/structure/Container/Container.mjs +6 -5
- package/dist/elements/structure/Container/Settings.d.ts +4 -2
- package/dist/elements/structure/Container/Settings.mjs +19 -5
- package/dist/elements/structure/Container/declaration.d.ts +3 -2
- package/dist/elements/structure/Container/declaration.mjs +3 -1
- package/dist/elements/structure/Container/index.d.ts +4 -3
- package/dist/elements/structure/DialogContainer/DialogContainer.d.ts +1 -1
- package/dist/elements/structure/DialogContainer/declaration.d.ts +1 -0
- package/dist/elements/structure/DialogContainer/declaration.mjs +5 -0
- package/dist/elements/structure/DialogContainer/index.d.ts +2 -1
- package/dist/elements/structure/List/List.d.ts +1 -1
- package/dist/elements/structure/List/ListItem/ListItem.d.ts +1 -1
- package/dist/elements/structure/List/ListItem/index.d.ts +1 -1
- package/dist/elements/structure/List/declaration.d.ts +5 -0
- package/dist/elements/structure/List/declaration.mjs +5 -0
- package/dist/elements/structure/List/index.d.ts +7 -2
- package/dist/elements/structure/List/modes/ListControlled/ListControlled.mjs +1 -0
- package/dist/elements/structure/List/modes/ListControlled/ListControlledItem.d.ts +3 -1
- package/dist/elements/structure/List/modes/ListControlled/ListControlledItem.mjs +33 -25
- package/dist/elements/structure/ModalContainer/ModalContainer.d.ts +1 -1
- package/dist/elements/structure/ModalContainer/declaration.d.ts +2 -0
- package/dist/elements/structure/ModalContainer/declaration.mjs +2 -0
- package/dist/elements/structure/ModalContainer/index.d.ts +3 -1
- package/dist/elements/structure/Pagination/Pagination.d.ts +1 -1
- package/dist/elements/structure/Pagination/declaration.d.ts +1 -0
- package/dist/elements/structure/Pagination/declaration.mjs +5 -0
- package/dist/elements/structure/Pagination/index.d.ts +2 -1
- package/dist/elements/structure/TabContainer/TabContainer.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerBody/TabContainerBody.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerBody/index.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerHeader/TabContainerHeader.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerHeader/index.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerItem/TabContainerItem.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerItem/declaration.d.ts +6 -0
- package/dist/elements/structure/TabContainer/TabContainerItem/declaration.mjs +6 -0
- package/dist/elements/structure/TabContainer/TabContainerItem/index.d.ts +7 -1
- package/dist/elements/structure/TabContainer/index.d.ts +10 -4
- package/dist/index.d.ts +216 -51
- package/dist/index.mjs +39 -37
- package/package.json +8 -8
- package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.d.ts +0 -16
- package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.mjs +0 -4
|
@@ -2,12 +2,43 @@ import { elementDeclaration as e, valuesOf as t } from "@plitzi/sdk-shared/autho
|
|
|
2
2
|
//#region src/elements/basic/Dropdown/declaration.ts
|
|
3
3
|
var n = e()({
|
|
4
4
|
type: "dropdown",
|
|
5
|
-
attributeValues: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
attributeValues: {
|
|
6
|
+
popupPlacement: t()([
|
|
7
|
+
"left",
|
|
8
|
+
"right",
|
|
9
|
+
"top",
|
|
10
|
+
"bottom"
|
|
11
|
+
]),
|
|
12
|
+
popupWidth: t()(["content", "trigger"])
|
|
13
|
+
},
|
|
14
|
+
callbacks: {
|
|
15
|
+
openDropdown: {
|
|
16
|
+
action: "openDropdown",
|
|
17
|
+
title: "Open Dropdown",
|
|
18
|
+
type: "callback",
|
|
19
|
+
params: {},
|
|
20
|
+
preview: {}
|
|
21
|
+
},
|
|
22
|
+
closeDropdown: {
|
|
23
|
+
action: "closeDropdown",
|
|
24
|
+
title: "Close Dropdown",
|
|
25
|
+
type: "callback",
|
|
26
|
+
params: {},
|
|
27
|
+
preview: {}
|
|
28
|
+
},
|
|
29
|
+
toggleDropdown: {
|
|
30
|
+
action: "toggleDropdown",
|
|
31
|
+
title: "Toggle Dropdown",
|
|
32
|
+
type: "callback",
|
|
33
|
+
params: {},
|
|
34
|
+
preview: {}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
marks: {
|
|
38
|
+
"aria-expanded": "on its trigger while the popup is open — what a class’s `expanded` state lights",
|
|
39
|
+
".popup-container--no-visible": "on its dropdownPopup while closed",
|
|
40
|
+
"the popup": "drawn at the space’s root, `position: fixed` where the dropdown places it — a class on the popup sets its look, never its position (top, left, position, inset, transform); `popupWidth: \"trigger\"` makes it as wide as the trigger"
|
|
41
|
+
},
|
|
11
42
|
content: {
|
|
12
43
|
attributes: {
|
|
13
44
|
popupPlacement: "bottom",
|
|
@@ -17,6 +48,7 @@ var n = e()({
|
|
|
17
48
|
closeOnClickPopup: !0,
|
|
18
49
|
containerTopOffset: 5,
|
|
19
50
|
containerLeftOffset: 5,
|
|
51
|
+
popupWidth: "content",
|
|
20
52
|
disabled: !1
|
|
21
53
|
},
|
|
22
54
|
definition: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const Dropdown: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./Dropdown').DropdownProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./Dropdown').DropdownProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
plugins: {
|
|
6
6
|
dropdownPopup: {
|
|
7
|
-
(props: import('../../..').WithElementProps<import('./DropdownPopup/DropdownPopup').DropdownPopupProps>): import('react').JSX.Element;
|
|
7
|
+
(props: import('../../..').WithElementProps<import('./DropdownPopup/DropdownPopup').DropdownPopupProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
8
8
|
displayName: string;
|
|
9
9
|
} & {
|
|
10
10
|
readonly type: "dropdownPopup";
|
|
@@ -61,6 +61,35 @@ declare const Dropdown: {
|
|
|
61
61
|
type: "dropdown";
|
|
62
62
|
attributeValues: {
|
|
63
63
|
readonly popupPlacement: readonly string[];
|
|
64
|
+
readonly popupWidth: readonly string[];
|
|
65
|
+
};
|
|
66
|
+
callbacks: {
|
|
67
|
+
readonly openDropdown: {
|
|
68
|
+
readonly action: "openDropdown";
|
|
69
|
+
readonly title: "Open Dropdown";
|
|
70
|
+
readonly type: "callback";
|
|
71
|
+
readonly params: {};
|
|
72
|
+
readonly preview: {};
|
|
73
|
+
};
|
|
74
|
+
readonly closeDropdown: {
|
|
75
|
+
readonly action: "closeDropdown";
|
|
76
|
+
readonly title: "Close Dropdown";
|
|
77
|
+
readonly type: "callback";
|
|
78
|
+
readonly params: {};
|
|
79
|
+
readonly preview: {};
|
|
80
|
+
};
|
|
81
|
+
readonly toggleDropdown: {
|
|
82
|
+
readonly action: "toggleDropdown";
|
|
83
|
+
readonly title: "Toggle Dropdown";
|
|
84
|
+
readonly type: "callback";
|
|
85
|
+
readonly params: {};
|
|
86
|
+
readonly preview: {};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
marks: {
|
|
90
|
+
readonly 'aria-expanded': "on its trigger while the popup is open — what a class’s `expanded` state lights";
|
|
91
|
+
readonly '.popup-container--no-visible': "on its dropdownPopup while closed";
|
|
92
|
+
readonly 'the popup': "drawn at the space’s root, `position: fixed` where the dropdown places it — a class on the popup sets its look, never its position (top, left, position, inset, transform); `popupWidth: \"trigger\"` makes it as wide as the trigger";
|
|
64
93
|
};
|
|
65
94
|
content: {
|
|
66
95
|
readonly attributes: {
|
|
@@ -71,6 +100,7 @@ declare const Dropdown: {
|
|
|
71
100
|
readonly closeOnClickPopup: true;
|
|
72
101
|
readonly containerTopOffset: 5;
|
|
73
102
|
readonly containerLeftOffset: 5;
|
|
103
|
+
readonly popupWidth: "content";
|
|
74
104
|
readonly disabled: false;
|
|
75
105
|
};
|
|
76
106
|
readonly definition: {
|
|
@@ -117,6 +147,7 @@ declare const Dropdown: {
|
|
|
117
147
|
closeOnClickBackground?: boolean | undefined;
|
|
118
148
|
containerTopOffset?: number | undefined;
|
|
119
149
|
containerLeftOffset?: number | undefined;
|
|
150
|
+
popupWidth?: "content" | "trigger" | undefined;
|
|
120
151
|
}>;
|
|
121
152
|
};
|
|
122
153
|
export default Dropdown;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Dispatch, RefObject, SetStateAction } from 'react';
|
|
2
|
+
/** Where the popup is drawn — and, asked to be as wide as its trigger, its least width. */
|
|
2
3
|
export type FloatingPosition = {
|
|
3
4
|
top: number;
|
|
4
5
|
left: number;
|
|
6
|
+
minWidth?: number;
|
|
5
7
|
};
|
|
6
8
|
export type UseDropdownProps = {
|
|
7
9
|
ref?: RefObject<HTMLDivElement | null>;
|
|
@@ -7,7 +7,7 @@ export type HeadingProps = {
|
|
|
7
7
|
};
|
|
8
8
|
declare const Heading: ({ ref, className, content, subType }: HeadingProps) => import('react').JSX.Element;
|
|
9
9
|
declare const _default: {
|
|
10
|
-
(props: import('../../..').WithElementProps<HeadingProps>): import('react').JSX.Element;
|
|
10
|
+
(props: import('../../..').WithElementProps<HeadingProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
export default _default;
|
|
@@ -5,12 +5,13 @@ import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
|
5
5
|
import a from "clsx";
|
|
6
6
|
import o from "@plitzi/plitzi-ui/ContentEditable";
|
|
7
7
|
//#region src/elements/basic/Heading/Heading.tsx
|
|
8
|
-
var s = ({ ref: e, className: s = "", content: c
|
|
9
|
-
let { previewMode: u, text: d, handleChange: f } = n(c);
|
|
8
|
+
var s = ({ ref: e, className: s = "", content: c, subType: l = "h1" }) => {
|
|
9
|
+
let { previewMode: u, text: d, handleChange: f, emptyMark: p } = n(c);
|
|
10
10
|
return /* @__PURE__ */ i(t, {
|
|
11
11
|
ref: e,
|
|
12
12
|
tag: u ? l : "div",
|
|
13
13
|
className: a("plitzi-component__heading", { [`plitzi-component__heading-${l}`]: l }, s),
|
|
14
|
+
...p,
|
|
14
15
|
children: [u && d, !u && /* @__PURE__ */ r(o, {
|
|
15
16
|
value: d,
|
|
16
17
|
onChange: f,
|
|
@@ -4,10 +4,12 @@ import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
|
4
4
|
export type HeadingAttributes = AuthorableAttributes<HeadingProps>;
|
|
5
5
|
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
6
6
|
readonly type: "heading";
|
|
7
|
+
readonly contentAttributes: readonly ["content"];
|
|
7
8
|
readonly attributeValues: {
|
|
8
9
|
readonly subType: readonly string[];
|
|
9
10
|
};
|
|
10
11
|
readonly content: {
|
|
12
|
+
readonly placeholders: readonly ["content"];
|
|
11
13
|
readonly attributes: {
|
|
12
14
|
readonly content: "Heading";
|
|
13
15
|
readonly subType: "h1";
|
|
@@ -2,6 +2,7 @@ import { elementDeclaration as e, valuesOf as t } from "@plitzi/sdk-shared/autho
|
|
|
2
2
|
//#region src/elements/basic/Heading/declaration.ts
|
|
3
3
|
var n = e()({
|
|
4
4
|
type: "heading",
|
|
5
|
+
contentAttributes: ["content"],
|
|
5
6
|
attributeValues: { subType: t()([
|
|
6
7
|
"h1",
|
|
7
8
|
"h2",
|
|
@@ -11,6 +12,7 @@ var n = e()({
|
|
|
11
12
|
"h6"
|
|
12
13
|
]) },
|
|
13
14
|
content: {
|
|
15
|
+
placeholders: ["content"],
|
|
14
16
|
attributes: {
|
|
15
17
|
content: "Heading",
|
|
16
18
|
subType: "h1"
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
declare const Heading: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./Heading').HeadingProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./Heading').HeadingProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "heading";
|
|
6
|
+
readonly contentAttributes: readonly ["content"];
|
|
6
7
|
readonly attributeValues: {
|
|
7
8
|
readonly subType: readonly string[];
|
|
8
9
|
};
|
|
9
10
|
readonly content: {
|
|
11
|
+
readonly placeholders: readonly ["content"];
|
|
10
12
|
readonly attributes: {
|
|
11
13
|
readonly content: "Heading";
|
|
12
14
|
readonly subType: "h1";
|
|
@@ -41,7 +41,7 @@ export type LinkProps = {
|
|
|
41
41
|
};
|
|
42
42
|
declare const Link: ({ ref, children, className, href, target, mode, hash, label, content, contentPlacement, icon, iconPlacement, current }: LinkProps) => import('react').JSX.Element;
|
|
43
43
|
declare const _default: {
|
|
44
|
-
(props: import('../../..').WithElementProps<LinkProps>): import('react').JSX.Element;
|
|
44
|
+
(props: import('../../..').WithElementProps<LinkProps>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
45
45
|
displayName: string;
|
|
46
46
|
};
|
|
47
47
|
export default _default;
|
|
@@ -11,80 +11,81 @@ import { jsx as l } from "react/jsx-runtime";
|
|
|
11
11
|
import u from "clsx";
|
|
12
12
|
import { getPageFullPath as d } from "@plitzi/sdk-navigation";
|
|
13
13
|
//#region src/elements/basic/Link/Link.tsx
|
|
14
|
-
var f = ({ ref: e, children:
|
|
15
|
-
let { style:
|
|
14
|
+
var f = /^[a-z][a-z0-9+.-]*:/i, p = ({ ref: e, children: p, className: m = "", href: h = "#", target: g = "self", mode: _ = "page", hash: v = "", label: y = "", content: b = "", contentPlacement: x = "after", icon: S = "", iconPlacement: C = "before", current: w = "page" }) => {
|
|
15
|
+
let { style: T, definition: { styleSelectors: E } } = t(), { settings: { previewMode: D } } = o(), [[O, k, A, j, M, N]] = s([
|
|
16
16
|
"pageDefinitions",
|
|
17
17
|
"schema.pageFolders",
|
|
18
18
|
"navigation.routeParams",
|
|
19
19
|
"navigation.queryParams",
|
|
20
20
|
"navigation.navigate",
|
|
21
21
|
"navigation.href"
|
|
22
|
-
]),
|
|
23
|
-
if (
|
|
24
|
-
if (
|
|
25
|
-
let e = `/${
|
|
22
|
+
]), P = _ === "external" || f.test(h), F = a(() => {
|
|
23
|
+
if (P) return h;
|
|
24
|
+
if (_ === "internal") {
|
|
25
|
+
let e = `/${h}`.replaceAll(/[/]+/gim, "/");
|
|
26
26
|
try {
|
|
27
27
|
let t = c(e, {
|
|
28
|
-
...
|
|
29
|
-
...
|
|
28
|
+
...j,
|
|
29
|
+
...A
|
|
30
30
|
}, !0);
|
|
31
31
|
return typeof t == "string" ? t : e;
|
|
32
32
|
} catch {}
|
|
33
33
|
return e;
|
|
34
34
|
}
|
|
35
|
-
return d(
|
|
35
|
+
return d(O, k, h, !0);
|
|
36
36
|
}, [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
P,
|
|
38
|
+
_,
|
|
39
|
+
h,
|
|
40
40
|
O,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
k,
|
|
42
|
+
j,
|
|
43
|
+
A
|
|
44
|
+
]), I = !P && v ? `${F}#${v}` : F, L = P ? void 0 : i(F, N, w), R = (e) => {
|
|
45
|
+
if (!D) return;
|
|
45
46
|
e.stopPropagation();
|
|
46
|
-
let t =
|
|
47
|
-
|
|
48
|
-
},
|
|
47
|
+
let t = g !== "self" || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0;
|
|
48
|
+
!P && !t && (e.preventDefault(), M(I));
|
|
49
|
+
}, z = a(() => {
|
|
49
50
|
let t = {
|
|
50
51
|
ref: e,
|
|
51
|
-
style:
|
|
52
|
-
target: `_${
|
|
53
|
-
...
|
|
54
|
-
"aria-label":
|
|
55
|
-
"aria-current":
|
|
56
|
-
className: u("plitzi-component__link",
|
|
52
|
+
style: T,
|
|
53
|
+
target: `_${g}`,
|
|
54
|
+
...g === "blank" ? { rel: "noopener noreferrer" } : {},
|
|
55
|
+
"aria-label": y || void 0,
|
|
56
|
+
"aria-current": L,
|
|
57
|
+
className: u("plitzi-component__link", m)
|
|
57
58
|
};
|
|
58
|
-
return
|
|
59
|
+
return D ? {
|
|
59
60
|
...t,
|
|
60
|
-
href:
|
|
61
|
+
href: I
|
|
61
62
|
} : {
|
|
62
63
|
...t,
|
|
63
|
-
"href-disabled":
|
|
64
|
+
"href-disabled": I
|
|
64
65
|
};
|
|
65
66
|
}, [
|
|
66
67
|
e,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
T,
|
|
69
|
+
g,
|
|
70
|
+
y,
|
|
71
|
+
L,
|
|
72
|
+
m,
|
|
73
|
+
D,
|
|
74
|
+
I
|
|
74
75
|
]);
|
|
75
76
|
return /* @__PURE__ */ l(n, {
|
|
76
77
|
tag: "a",
|
|
77
|
-
...
|
|
78
|
-
onClick:
|
|
78
|
+
...z,
|
|
79
|
+
onClick: R,
|
|
79
80
|
children: /* @__PURE__ */ l(r, {
|
|
80
|
-
content:
|
|
81
|
-
icon:
|
|
82
|
-
iconPlacement:
|
|
83
|
-
iconClassName:
|
|
84
|
-
contentPlacement:
|
|
85
|
-
children:
|
|
81
|
+
content: b,
|
|
82
|
+
icon: S,
|
|
83
|
+
iconPlacement: C,
|
|
84
|
+
iconClassName: E.icon,
|
|
85
|
+
contentPlacement: x,
|
|
86
|
+
children: p
|
|
86
87
|
})
|
|
87
88
|
});
|
|
88
|
-
},
|
|
89
|
+
}, m = e(p);
|
|
89
90
|
//#endregion
|
|
90
|
-
export {
|
|
91
|
+
export { p as Link, m as default };
|
|
@@ -4,6 +4,7 @@ import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
|
4
4
|
export type LinkAttributes = AuthorableAttributes<LinkProps>;
|
|
5
5
|
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
6
6
|
readonly type: "link";
|
|
7
|
+
readonly contentAttributes: readonly ["content", "href", "label"];
|
|
7
8
|
readonly attributeValues: {
|
|
8
9
|
readonly mode: readonly string[];
|
|
9
10
|
readonly target: readonly string[];
|
|
@@ -2,6 +2,11 @@ import { elementDeclaration as e, valuesOf as t } from "@plitzi/sdk-shared/autho
|
|
|
2
2
|
//#region src/elements/basic/Link/declaration.ts
|
|
3
3
|
var n = e()({
|
|
4
4
|
type: "link",
|
|
5
|
+
contentAttributes: [
|
|
6
|
+
"content",
|
|
7
|
+
"href",
|
|
8
|
+
"label"
|
|
9
|
+
],
|
|
5
10
|
attributeValues: {
|
|
6
11
|
mode: t()([
|
|
7
12
|
"page",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
declare const Link: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./Link').LinkProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./Link').LinkProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "link";
|
|
6
|
+
readonly contentAttributes: readonly ["content", "href", "label"];
|
|
6
7
|
readonly attributeValues: {
|
|
7
8
|
readonly mode: readonly string[];
|
|
8
9
|
readonly target: readonly string[];
|
|
@@ -11,7 +11,7 @@ export type MarkdownProps = {
|
|
|
11
11
|
};
|
|
12
12
|
declare const Markdown: ({ ref, content, className, headingLinks }: MarkdownProps) => import('react').JSX.Element;
|
|
13
13
|
declare const _default: {
|
|
14
|
-
(props: import('../../..').WithElementProps<MarkdownProps>): import('react').JSX.Element;
|
|
14
|
+
(props: import('../../..').WithElementProps<MarkdownProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
15
15
|
displayName: string;
|
|
16
16
|
};
|
|
17
17
|
export default _default;
|
|
@@ -4,7 +4,9 @@ import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
|
4
4
|
export type MarkdownAttributes = AuthorableAttributes<MarkdownProps>;
|
|
5
5
|
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
6
6
|
readonly type: "markdown";
|
|
7
|
+
readonly contentAttributes: readonly ["content"];
|
|
7
8
|
readonly content: {
|
|
9
|
+
readonly placeholders: readonly ["content"];
|
|
8
10
|
readonly attributes: {
|
|
9
11
|
readonly content: "Markdown";
|
|
10
12
|
readonly headingLinks: true;
|
|
@@ -2,7 +2,9 @@ import { elementDeclaration as e } from "@plitzi/sdk-shared/authoring";
|
|
|
2
2
|
//#region src/elements/basic/Markdown/declaration.ts
|
|
3
3
|
var t = e()({
|
|
4
4
|
type: "markdown",
|
|
5
|
+
contentAttributes: ["content"],
|
|
5
6
|
content: {
|
|
7
|
+
placeholders: ["content"],
|
|
6
8
|
attributes: {
|
|
7
9
|
content: "Markdown",
|
|
8
10
|
headingLinks: !0
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
declare const Markdown: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./Markdown').MarkdownProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./Markdown').MarkdownProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "markdown";
|
|
6
|
+
readonly contentAttributes: readonly ["content"];
|
|
6
7
|
readonly content: {
|
|
8
|
+
readonly placeholders: readonly ["content"];
|
|
7
9
|
readonly attributes: {
|
|
8
10
|
readonly content: "Markdown";
|
|
9
11
|
readonly headingLinks: true;
|
|
@@ -6,7 +6,7 @@ export type ParagraphProps = {
|
|
|
6
6
|
};
|
|
7
7
|
declare const Paragraph: ({ ref, content, className }: ParagraphProps) => import('react').JSX.Element;
|
|
8
8
|
declare const _default: {
|
|
9
|
-
(props: import('../../..').WithElementProps<ParagraphProps>): import('react').JSX.Element;
|
|
9
|
+
(props: import('../../..').WithElementProps<ParagraphProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
export default _default;
|
|
@@ -5,12 +5,13 @@ import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
|
5
5
|
import a from "clsx";
|
|
6
6
|
import o from "@plitzi/plitzi-ui/ContentEditable";
|
|
7
7
|
//#region src/elements/basic/Paragraph/Paragraph.tsx
|
|
8
|
-
var s = ({ ref: e, content: s
|
|
9
|
-
let { previewMode: l, text: u, handleChange: d } = n(s);
|
|
8
|
+
var s = ({ ref: e, content: s, className: c = "" }) => {
|
|
9
|
+
let { previewMode: l, text: u, handleChange: d, emptyMark: f } = n(s);
|
|
10
10
|
return /* @__PURE__ */ i(t, {
|
|
11
11
|
ref: e,
|
|
12
12
|
tag: l ? "p" : "div",
|
|
13
13
|
className: a("plitzi-component__paragraph", c),
|
|
14
|
+
...f,
|
|
14
15
|
children: [l && u, !l && /* @__PURE__ */ r(o, {
|
|
15
16
|
className: "",
|
|
16
17
|
value: u,
|
|
@@ -2,7 +2,7 @@ import { useCallback as e } from "react";
|
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import n from "@plitzi/plitzi-ui/TextArea";
|
|
4
4
|
//#region src/elements/basic/Paragraph/Settings.tsx
|
|
5
|
-
var r = ({ content: r = "
|
|
5
|
+
var r = ({ content: r = "", onUpdate: i }) => {
|
|
6
6
|
let a = e((e) => i?.("content", e), [i]);
|
|
7
7
|
return /* @__PURE__ */ t("div", {
|
|
8
8
|
className: "flex h-full flex-col gap-4 py-2",
|
|
@@ -4,7 +4,9 @@ import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
|
4
4
|
export type ParagraphAttributes = AuthorableAttributes<ParagraphProps>;
|
|
5
5
|
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
6
6
|
readonly type: "paragraph";
|
|
7
|
+
readonly contentAttributes: readonly ["content"];
|
|
7
8
|
readonly content: {
|
|
9
|
+
readonly placeholders: readonly ["content"];
|
|
8
10
|
readonly attributes: {
|
|
9
11
|
readonly content: "Paragraph";
|
|
10
12
|
};
|
|
@@ -2,7 +2,9 @@ import { elementDeclaration as e } from "@plitzi/sdk-shared/authoring";
|
|
|
2
2
|
//#region src/elements/basic/Paragraph/declaration.ts
|
|
3
3
|
var t = e()({
|
|
4
4
|
type: "paragraph",
|
|
5
|
+
contentAttributes: ["content"],
|
|
5
6
|
content: {
|
|
7
|
+
placeholders: ["content"],
|
|
6
8
|
attributes: { content: "Paragraph" },
|
|
7
9
|
definition: {
|
|
8
10
|
label: "Paragraph",
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
declare const Paragraph: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./Paragraph').ParagraphProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./Paragraph').ParagraphProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "paragraph";
|
|
6
|
+
readonly contentAttributes: readonly ["content"];
|
|
6
7
|
readonly content: {
|
|
8
|
+
readonly placeholders: readonly ["content"];
|
|
7
9
|
readonly attributes: {
|
|
8
10
|
readonly content: "Paragraph";
|
|
9
11
|
};
|
|
@@ -13,7 +13,7 @@ export type RichTextProps = {
|
|
|
13
13
|
};
|
|
14
14
|
declare const RichText: ({ ref, className, content, format, mediaBaseUrl }: RichTextProps) => import('react').JSX.Element;
|
|
15
15
|
declare const _default: {
|
|
16
|
-
(props: import('../../..').WithElementProps<RichTextProps>): import('react').JSX.Element;
|
|
16
|
+
(props: import('../../..').WithElementProps<RichTextProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
export default _default;
|
|
@@ -4,6 +4,7 @@ import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
|
4
4
|
export type RichTextAttributes = AuthorableAttributes<RichTextProps>;
|
|
5
5
|
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
6
6
|
readonly type: "richText";
|
|
7
|
+
readonly contentAttributes: readonly ["content"];
|
|
7
8
|
readonly attributeValues: {
|
|
8
9
|
readonly format: readonly string[];
|
|
9
10
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
declare const RichText: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./RichText').RichTextProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./RichText').RichTextProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "richText";
|
|
6
|
+
readonly contentAttributes: readonly ["content"];
|
|
6
7
|
readonly attributeValues: {
|
|
7
8
|
readonly format: readonly string[];
|
|
8
9
|
};
|
|
@@ -3,7 +3,7 @@ import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
|
3
3
|
import r from "@plitzi/plitzi-ui/Checkbox";
|
|
4
4
|
import i from "@plitzi/plitzi-ui/TextArea";
|
|
5
5
|
//#region src/elements/basic/Text/Settings.tsx
|
|
6
|
-
var a = ({ content: a = "
|
|
6
|
+
var a = ({ content: a = "", decorative: o = !1, onUpdate: s }) => {
|
|
7
7
|
let c = e((e) => s?.("content", e), [s]), l = e((e) => s?.("decorative", e.target.checked), [s]);
|
|
8
8
|
return /* @__PURE__ */ n("div", {
|
|
9
9
|
className: "flex h-full flex-col gap-4 py-2",
|
|
@@ -13,7 +13,7 @@ export type TextProps = {
|
|
|
13
13
|
};
|
|
14
14
|
declare const Text: ({ ref, content, className, title, decorative }: TextProps) => import('react').JSX.Element;
|
|
15
15
|
declare const _default: {
|
|
16
|
-
(props: import('../../..').WithElementProps<TextProps>): import('react').JSX.Element;
|
|
16
|
+
(props: import('../../..').WithElementProps<TextProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
export default _default;
|
|
@@ -5,13 +5,14 @@ import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
|
5
5
|
import a from "clsx";
|
|
6
6
|
import o from "@plitzi/plitzi-ui/ContentEditable";
|
|
7
7
|
//#region src/elements/basic/Text/Text.tsx
|
|
8
|
-
var s = ({ ref: e, content: s
|
|
9
|
-
let { previewMode: d, text: f, handleChange: p } = n(s);
|
|
8
|
+
var s = ({ ref: e, content: s, className: c = "", title: l = "", decorative: u = !1 }) => {
|
|
9
|
+
let { previewMode: d, text: f, handleChange: p, emptyMark: m } = n(s);
|
|
10
10
|
return /* @__PURE__ */ i(t, {
|
|
11
11
|
ref: e,
|
|
12
12
|
className: a("plitzi-component__text", c),
|
|
13
13
|
title: l || void 0,
|
|
14
14
|
...u ? { "aria-hidden": !0 } : {},
|
|
15
|
+
...m,
|
|
15
16
|
children: [d && f, !d && /* @__PURE__ */ r(o, {
|
|
16
17
|
className: "focus-visible:outline-hidden",
|
|
17
18
|
value: f,
|
|
@@ -4,7 +4,9 @@ import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
|
4
4
|
export type TextAttributes = AuthorableAttributes<TextProps>;
|
|
5
5
|
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
6
6
|
readonly type: "text";
|
|
7
|
+
readonly contentAttributes: readonly ["content"];
|
|
7
8
|
readonly content: {
|
|
9
|
+
readonly placeholders: readonly ["content"];
|
|
8
10
|
readonly attributes: {
|
|
9
11
|
readonly content: "Text";
|
|
10
12
|
};
|
|
@@ -2,7 +2,9 @@ import { elementDeclaration as e } from "@plitzi/sdk-shared/authoring";
|
|
|
2
2
|
//#region src/elements/basic/Text/declaration.ts
|
|
3
3
|
var t = e()({
|
|
4
4
|
type: "text",
|
|
5
|
+
contentAttributes: ["content"],
|
|
5
6
|
content: {
|
|
7
|
+
placeholders: ["content"],
|
|
6
8
|
attributes: { content: "Text" },
|
|
7
9
|
definition: {
|
|
8
10
|
label: "Text",
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
declare const Text: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./Text').TextProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./Text').TextProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "text";
|
|
6
|
+
readonly contentAttributes: readonly ["content"];
|
|
6
7
|
readonly content: {
|
|
8
|
+
readonly placeholders: readonly ["content"];
|
|
7
9
|
readonly attributes: {
|
|
8
10
|
readonly content: "Text";
|
|
9
11
|
};
|