@plitzi/sdk-elements 0.38.24 → 0.39.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +170 -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 +399 -13
- package/dist/elements/declarations/index.mjs +48 -44
- package/dist/elements/form/Form/Form.d.ts +10 -3
- 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 +14 -10
- package/dist/elements/form/FormControl/FormControl.mjs +114 -104
- package/dist/elements/form/FormControl/Settings.d.ts +9 -2
- package/dist/elements/form/FormControl/Settings.mjs +132 -159
- package/dist/elements/form/FormControl/declaration.d.ts +52 -1
- package/dist/elements/form/FormControl/declaration.mjs +27 -20
- 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 +6 -1
- package/dist/elements/form/FormControl/hocs/withFieldValue.mjs +52 -41
- package/dist/elements/form/FormControl/index.d.ts +53 -2
- package/dist/elements/form/FormControl/inputs/Checkbox.mjs +2 -2
- package/dist/elements/form/FormControl/inputs/FileInput.d.ts +21 -0
- package/dist/elements/form/FormControl/inputs/FileInput.mjs +29 -0
- 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/form/FormControl/subTypes.d.ts +17 -0
- package/dist/elements/form/FormControl/subTypes.mjs +58 -0
- package/dist/elements/index.d.ts +5 -1
- package/dist/elements/index.mjs +34 -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 +44 -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/FocusGroup/FocusGroup.d.ts +24 -0
- package/dist/elements/structure/FocusGroup/FocusGroup.mjs +27 -0
- package/dist/elements/structure/FocusGroup/Settings.d.ts +8 -0
- package/dist/elements/structure/FocusGroup/Settings.mjs +39 -0
- package/dist/elements/structure/FocusGroup/arrowFocus.d.ts +12 -0
- package/dist/elements/structure/FocusGroup/arrowFocus.mjs +30 -0
- package/dist/elements/structure/FocusGroup/declaration.d.ts +36 -0
- package/dist/elements/structure/FocusGroup/declaration.mjs +28 -0
- package/dist/elements/structure/FocusGroup/index.d.ts +37 -0
- package/dist/elements/structure/FocusGroup/index.mjs +6 -0
- 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 +297 -52
- package/dist/index.mjs +41 -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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const NodeHtml: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./NodeHtml').NodeHtmlProps<"span">>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./NodeHtml').NodeHtmlProps<"span">>): 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: "nodeHtml";
|
|
@@ -43,9 +43,11 @@ declare const NodeHtml: {
|
|
|
43
43
|
content?: string | undefined | undefined;
|
|
44
44
|
style?: import('react').CSSProperties | undefined;
|
|
45
45
|
color?: string | undefined | undefined;
|
|
46
|
-
slot?: string | undefined | undefined;
|
|
47
46
|
title?: string | undefined | undefined;
|
|
47
|
+
property?: string | undefined | undefined;
|
|
48
|
+
slot?: string | undefined | undefined;
|
|
48
49
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
50
|
+
dir?: string | undefined | undefined;
|
|
49
51
|
hidden?: boolean | undefined | undefined;
|
|
50
52
|
onScroll?: import('react').UIEventHandler<"span"> | undefined;
|
|
51
53
|
onLoad?: import('react').ReactEventHandler<"span"> | undefined;
|
|
@@ -284,7 +286,6 @@ declare const NodeHtml: {
|
|
|
284
286
|
autoFocus?: boolean | undefined | undefined;
|
|
285
287
|
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
286
288
|
contextMenu?: string | undefined | undefined;
|
|
287
|
-
dir?: string | undefined | undefined;
|
|
288
289
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
289
290
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
290
291
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
@@ -294,7 +295,6 @@ declare const NodeHtml: {
|
|
|
294
295
|
datatype?: string | undefined | undefined;
|
|
295
296
|
inlist?: any;
|
|
296
297
|
prefix?: string | undefined | undefined;
|
|
297
|
-
property?: string | undefined | undefined;
|
|
298
298
|
rel?: string | undefined | undefined;
|
|
299
299
|
resource?: string | undefined | undefined;
|
|
300
300
|
rev?: string | undefined | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
2
|
export type ReferenceProps = {
|
|
3
3
|
ref: RefObject<HTMLElement>;
|
|
4
4
|
className: string;
|
|
@@ -9,7 +9,7 @@ export type ReferenceProps = {
|
|
|
9
9
|
};
|
|
10
10
|
declare const Reference: ({ ref, className, referenceType, referenceId }: ReferenceProps) => import('react').JSX.Element;
|
|
11
11
|
declare const _default: {
|
|
12
|
-
(props: import('../../..').WithElementProps<ReferenceProps>): import('react').JSX.Element;
|
|
12
|
+
(props: import('../../..').WithElementProps<ReferenceProps>): 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;
|
|
13
13
|
displayName: string;
|
|
14
14
|
};
|
|
15
15
|
export default _default;
|
|
@@ -42,7 +42,7 @@ var v = (e, t) => Object.fromEntries(Object.entries(e.props ?? {}).map(([e, n])
|
|
|
42
42
|
let i = k[r];
|
|
43
43
|
return (typeof i == "string" ? i : e[0]) === n;
|
|
44
44
|
});
|
|
45
|
-
t[n] = /* @__PURE__ */ m(b, {
|
|
45
|
+
t[n] = r.length === 0 ? null : /* @__PURE__ */ m(b, {
|
|
46
46
|
instance: S,
|
|
47
47
|
instanceId: _,
|
|
48
48
|
items: r,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const Reference: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./Reference').ReferenceProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./Reference').ReferenceProps>): 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: "reference";
|
|
@@ -29,6 +29,11 @@ export type ButtonProps = {
|
|
|
29
29
|
* reader can go from one to the other. Authoring takes the element's id and gives that element the anchor.
|
|
30
30
|
*/
|
|
31
31
|
controls?: string;
|
|
32
|
+
/**
|
|
33
|
+
* `controls` names an element drawn in the same list's row as the button — each row's own (authoring says so, as it
|
|
34
|
+
* resolves `controls`): `aria-controls` is then that row's, as the element's anchor is drawn with the row's name.
|
|
35
|
+
*/
|
|
36
|
+
controlsInRow?: boolean;
|
|
32
37
|
/**
|
|
33
38
|
* What the button does, in words — shown as a tooltip on hover, and the button's accessible name when it has no text
|
|
34
39
|
* of its own. An icon-only button without one is announced as nothing at all.
|
|
@@ -45,9 +50,9 @@ export type ButtonProps = {
|
|
|
45
50
|
*/
|
|
46
51
|
label?: string;
|
|
47
52
|
};
|
|
48
|
-
declare const Button: ({ ref, className, children, contentPlacement, content, icon, iconPlacement, subType, disabled, ariaExpanded, ariaPressed, controls, title, label }: ButtonProps) => import('react').JSX.Element;
|
|
53
|
+
declare const Button: ({ ref, className, children, contentPlacement, content, icon, iconPlacement, subType, disabled, ariaExpanded, ariaPressed, controls, controlsInRow, title, label }: ButtonProps) => import('react').JSX.Element;
|
|
49
54
|
declare const _default: {
|
|
50
|
-
(props: import('../../..').WithElementProps<ButtonProps>): import('react').JSX.Element;
|
|
55
|
+
(props: import('../../..').WithElementProps<ButtonProps>): 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;
|
|
51
56
|
displayName: string;
|
|
52
57
|
};
|
|
53
58
|
export default _default;
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import e from "../../../Element/hocs/withElement.mjs";
|
|
2
2
|
import t from "../../../Element/hooks/useElement.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
3
|
+
import { RowAnchorContext as n, anchorInRows as r } from "../../../Element/RowAnchor.mjs";
|
|
4
|
+
import { RootElement as i } from "../../../Element/RootElement.mjs";
|
|
5
|
+
import a from "../../../Element/ElementWords.mjs";
|
|
6
|
+
import { use as o } from "react";
|
|
7
|
+
import { usePlitzi as s } from "@plitzi/sdk-shared/hooks";
|
|
8
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
9
|
+
import l from "clsx";
|
|
8
10
|
//#region src/elements/basic/Button/Button.tsx
|
|
9
|
-
var
|
|
10
|
-
let { settings: { previewMode:
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
var u = ({ ref: e, className: u = "", children: d, contentPlacement: f = "after", content: p, icon: m = "", iconPlacement: h = "before", subType: g = "button", disabled: _ = !1, ariaExpanded: v, ariaPressed: y, controls: b, controlsInRow: x = !1, title: S, label: C }) => {
|
|
12
|
+
let w = o(n), { settings: { previewMode: T } } = s(), { definition: { styleSelectors: E } } = t(), D = p ?? "";
|
|
13
|
+
return /* @__PURE__ */ c(i, {
|
|
12
14
|
ref: e,
|
|
13
15
|
tag: "button",
|
|
14
|
-
type:
|
|
15
|
-
className:
|
|
16
|
-
disabled:
|
|
17
|
-
title:
|
|
18
|
-
"aria-label":
|
|
19
|
-
"aria-expanded":
|
|
20
|
-
"aria-pressed":
|
|
21
|
-
"aria-controls":
|
|
22
|
-
children: /* @__PURE__ */ a
|
|
23
|
-
content:
|
|
24
|
-
icon:
|
|
25
|
-
iconPlacement:
|
|
26
|
-
iconClassName:
|
|
27
|
-
contentPlacement:
|
|
28
|
-
children:
|
|
16
|
+
type: T ? g : "button",
|
|
17
|
+
className: l("plitzi-component__button", u, { "container--empty--skip": !T && !d && (D || m) }),
|
|
18
|
+
disabled: _,
|
|
19
|
+
title: S || void 0,
|
|
20
|
+
"aria-label": C || void 0,
|
|
21
|
+
"aria-expanded": v,
|
|
22
|
+
"aria-pressed": y,
|
|
23
|
+
"aria-controls": (b && x ? r(b, w) : b) || void 0,
|
|
24
|
+
children: /* @__PURE__ */ c(a, {
|
|
25
|
+
content: D,
|
|
26
|
+
icon: m,
|
|
27
|
+
iconPlacement: h,
|
|
28
|
+
iconClassName: E.icon,
|
|
29
|
+
contentPlacement: f,
|
|
30
|
+
children: d
|
|
29
31
|
})
|
|
30
32
|
});
|
|
31
|
-
},
|
|
33
|
+
}, d = e(u);
|
|
32
34
|
//#endregion
|
|
33
|
-
export {
|
|
35
|
+
export { u as Button, d as default };
|
|
@@ -5,7 +5,7 @@ import i from "@plitzi/plitzi-ui/Checkbox";
|
|
|
5
5
|
import a from "@plitzi/plitzi-ui/Input";
|
|
6
6
|
import o from "@plitzi/plitzi-ui/Select";
|
|
7
7
|
//#region src/elements/basic/Button/Settings.tsx
|
|
8
|
-
var s = ({ content: s = "
|
|
8
|
+
var s = ({ content: s = "", contentPlacement: c = "after", icon: l = "", iconPlacement: u = "before", subType: d = "button", disabled: f = !1, title: p = "", label: m = "", onUpdate: h }) => {
|
|
9
9
|
let g = t((e) => h?.("content", e), [h]), _ = t((e) => h?.("contentPlacement", e), [h]), v = t((e) => h?.("subType", e), [h]), y = t((e) => h?.("title", e), [h]), b = t((e) => h?.("label", e), [h]), x = t((e) => h?.("disabled", e.target.checked), [h]);
|
|
10
10
|
return /* @__PURE__ */ r("div", {
|
|
11
11
|
className: "flex h-full flex-col gap-4 py-2",
|
|
@@ -4,12 +4,14 @@ import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
|
4
4
|
export type ButtonAttributes = AuthorableAttributes<ButtonProps>;
|
|
5
5
|
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
6
6
|
readonly type: "button";
|
|
7
|
+
readonly contentAttributes: readonly ["content"];
|
|
7
8
|
readonly attributeValues: {
|
|
8
9
|
readonly subType: readonly string[];
|
|
9
10
|
readonly contentPlacement: readonly string[];
|
|
10
11
|
readonly iconPlacement: readonly string[];
|
|
11
12
|
};
|
|
12
13
|
readonly content: {
|
|
14
|
+
readonly placeholders: readonly ["content"];
|
|
13
15
|
readonly attributes: {
|
|
14
16
|
readonly contentPlacement: "after";
|
|
15
17
|
readonly content: "Button";
|
|
@@ -39,6 +41,7 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
39
41
|
'padding-right': string;
|
|
40
42
|
'padding-bottom': string;
|
|
41
43
|
cursor: string;
|
|
44
|
+
'font-family': string;
|
|
42
45
|
'font-size': string;
|
|
43
46
|
'line-height': string;
|
|
44
47
|
'border-top-left-radius': string;
|
|
@@ -60,6 +63,7 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
60
63
|
'padding-right': string;
|
|
61
64
|
'padding-bottom': string;
|
|
62
65
|
cursor: string;
|
|
66
|
+
'font-family': string;
|
|
63
67
|
'font-size': string;
|
|
64
68
|
'line-height': string;
|
|
65
69
|
'border-top-left-radius': string;
|
|
@@ -81,6 +85,7 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
81
85
|
'padding-right': string;
|
|
82
86
|
'padding-bottom': string;
|
|
83
87
|
cursor: string;
|
|
88
|
+
'font-family': string;
|
|
84
89
|
'font-size': string;
|
|
85
90
|
'line-height': string;
|
|
86
91
|
'border-top-left-radius': string;
|
|
@@ -102,6 +107,7 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
102
107
|
'padding-right': string;
|
|
103
108
|
'padding-bottom': string;
|
|
104
109
|
cursor: string;
|
|
110
|
+
'font-family': string;
|
|
105
111
|
'font-size': string;
|
|
106
112
|
'line-height': string;
|
|
107
113
|
'border-top-left-radius': string;
|
|
@@ -117,8 +123,8 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
117
123
|
};
|
|
118
124
|
}, Partial<{
|
|
119
125
|
content?: string | undefined;
|
|
120
|
-
label?: string | undefined;
|
|
121
126
|
title?: string | undefined;
|
|
127
|
+
label?: string | undefined;
|
|
122
128
|
disabled?: boolean | undefined;
|
|
123
129
|
controls?: string | undefined;
|
|
124
130
|
icon?: string | undefined;
|
|
@@ -127,5 +133,6 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
127
133
|
contentPlacement?: "before" | "after" | undefined;
|
|
128
134
|
ariaExpanded?: boolean | undefined;
|
|
129
135
|
ariaPressed?: boolean | undefined;
|
|
136
|
+
controlsInRow?: boolean | undefined;
|
|
130
137
|
}>>;
|
|
131
138
|
export default declaration;
|
|
@@ -6,6 +6,7 @@ var n = {
|
|
|
6
6
|
"padding-right": "12px",
|
|
7
7
|
"padding-bottom": "6px",
|
|
8
8
|
cursor: "pointer",
|
|
9
|
+
"font-family": "inherit",
|
|
9
10
|
"font-size": "16px",
|
|
10
11
|
"line-height": "1.5",
|
|
11
12
|
"border-top-left-radius": "4px",
|
|
@@ -14,6 +15,7 @@ var n = {
|
|
|
14
15
|
"border-bottom-right-radius": "4px"
|
|
15
16
|
}, r = e()({
|
|
16
17
|
type: "button",
|
|
18
|
+
contentAttributes: ["content"],
|
|
17
19
|
attributeValues: {
|
|
18
20
|
subType: t()([
|
|
19
21
|
"button",
|
|
@@ -24,6 +26,7 @@ var n = {
|
|
|
24
26
|
iconPlacement: t()(["before", "after"])
|
|
25
27
|
},
|
|
26
28
|
content: {
|
|
29
|
+
placeholders: ["content"],
|
|
27
30
|
attributes: {
|
|
28
31
|
contentPlacement: "after",
|
|
29
32
|
content: "Button",
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
declare const Button: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./Button').ButtonProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./Button').ButtonProps>): 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: "button";
|
|
6
|
+
readonly contentAttributes: readonly ["content"];
|
|
6
7
|
readonly attributeValues: {
|
|
7
8
|
readonly subType: readonly string[];
|
|
8
9
|
readonly contentPlacement: readonly string[];
|
|
9
10
|
readonly iconPlacement: readonly string[];
|
|
10
11
|
};
|
|
11
12
|
readonly content: {
|
|
13
|
+
readonly placeholders: readonly ["content"];
|
|
12
14
|
readonly attributes: {
|
|
13
15
|
readonly contentPlacement: "after";
|
|
14
16
|
readonly content: "Button";
|
|
@@ -38,6 +40,7 @@ declare const Button: {
|
|
|
38
40
|
'padding-right': string;
|
|
39
41
|
'padding-bottom': string;
|
|
40
42
|
cursor: string;
|
|
43
|
+
'font-family': string;
|
|
41
44
|
'font-size': string;
|
|
42
45
|
'line-height': string;
|
|
43
46
|
'border-top-left-radius': string;
|
|
@@ -59,6 +62,7 @@ declare const Button: {
|
|
|
59
62
|
'padding-right': string;
|
|
60
63
|
'padding-bottom': string;
|
|
61
64
|
cursor: string;
|
|
65
|
+
'font-family': string;
|
|
62
66
|
'font-size': string;
|
|
63
67
|
'line-height': string;
|
|
64
68
|
'border-top-left-radius': string;
|
|
@@ -80,6 +84,7 @@ declare const Button: {
|
|
|
80
84
|
'padding-right': string;
|
|
81
85
|
'padding-bottom': string;
|
|
82
86
|
cursor: string;
|
|
87
|
+
'font-family': string;
|
|
83
88
|
'font-size': string;
|
|
84
89
|
'line-height': string;
|
|
85
90
|
'border-top-left-radius': string;
|
|
@@ -101,6 +106,7 @@ declare const Button: {
|
|
|
101
106
|
'padding-right': string;
|
|
102
107
|
'padding-bottom': string;
|
|
103
108
|
cursor: string;
|
|
109
|
+
'font-family': string;
|
|
104
110
|
'font-size': string;
|
|
105
111
|
'line-height': string;
|
|
106
112
|
'border-top-left-radius': string;
|
|
@@ -118,8 +124,8 @@ declare const Button: {
|
|
|
118
124
|
content: import('@plitzi/sdk-shared/authoring').ElementContentDefaults;
|
|
119
125
|
} & import('@plitzi/sdk-shared/authoring').ElementAttributesBrand<Partial<{
|
|
120
126
|
content?: string | undefined;
|
|
121
|
-
label?: string | undefined;
|
|
122
127
|
title?: string | undefined;
|
|
128
|
+
label?: string | undefined;
|
|
123
129
|
disabled?: boolean | undefined;
|
|
124
130
|
controls?: string | undefined;
|
|
125
131
|
icon?: string | undefined;
|
|
@@ -128,5 +134,6 @@ declare const Button: {
|
|
|
128
134
|
contentPlacement?: "before" | "after" | undefined;
|
|
129
135
|
ariaExpanded?: boolean | undefined;
|
|
130
136
|
ariaPressed?: boolean | undefined;
|
|
137
|
+
controlsInRow?: boolean | undefined;
|
|
131
138
|
}>>;
|
|
132
139
|
export default Button;
|
|
@@ -10,11 +10,18 @@ export type DropdownProps = {
|
|
|
10
10
|
closeOnClickPopup?: boolean;
|
|
11
11
|
containerTopOffset?: number;
|
|
12
12
|
containerLeftOffset?: number;
|
|
13
|
+
/**
|
|
14
|
+
* How wide the popup is: as its content (`content`), or at least as wide as its trigger (`trigger`) — a select's list.
|
|
15
|
+
* A width in % on the popup's class reads the window's, as it is drawn at the space's root (a run's people picker).
|
|
16
|
+
*/
|
|
17
|
+
popupWidth?: 'content' | 'trigger';
|
|
13
18
|
disabled?: boolean;
|
|
14
19
|
};
|
|
15
|
-
|
|
20
|
+
/** Its state with the popup open or closed, the rest kept: what every way of opening and closing it writes. */
|
|
21
|
+
export declare const withOpen: (open: boolean) => <S extends Record<string, unknown>>(state: S) => S;
|
|
22
|
+
declare const Dropdown: ({ ref: refProp, children, className, popupPlacement, openPopup, backgroundDisabled, closeOnClickBackground, closeOnClickPopup, containerTopOffset, containerLeftOffset, popupWidth, disabled }: DropdownProps) => import('react').JSX.Element;
|
|
16
23
|
declare const _default: {
|
|
17
|
-
(props: import('../../..').WithElementProps<DropdownProps>): import('react').JSX.Element;
|
|
24
|
+
(props: import('../../..').WithElementProps<DropdownProps>): 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;
|
|
18
25
|
displayName: string;
|
|
19
26
|
};
|
|
20
27
|
export default _default;
|
|
@@ -1,81 +1,100 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "../../../Element/
|
|
3
|
-
import
|
|
4
|
-
import r from "
|
|
5
|
-
import i from "./
|
|
6
|
-
import a from "./
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import h from "
|
|
12
|
-
import
|
|
1
|
+
import e from "./declaration.mjs";
|
|
2
|
+
import t from "../../../Element/hocs/withElement.mjs";
|
|
3
|
+
import n from "../../../Element/hooks/useElement.mjs";
|
|
4
|
+
import { RootElement as r } from "../../../Element/RootElement.mjs";
|
|
5
|
+
import i from "./DropdownContext.mjs";
|
|
6
|
+
import a from "./useDropdown.mjs";
|
|
7
|
+
import o from "./useDropdownTrigger.mjs";
|
|
8
|
+
import { useCallback as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
9
|
+
import { usePlitzi as f } from "@plitzi/sdk-shared/hooks";
|
|
10
|
+
import { spaceRootOf as p } from "@plitzi/sdk-shared/helpers";
|
|
11
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
12
|
+
import g from "clsx";
|
|
13
|
+
import { createPortal as _ } from "react-dom";
|
|
13
14
|
//#region src/elements/basic/Dropdown/Dropdown.tsx
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}, [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
15
|
+
var v = (e) => (t) => ({
|
|
16
|
+
...t,
|
|
17
|
+
openPopup: e
|
|
18
|
+
}), y = ({ ref: t, children: y, className: b = "", popupPlacement: x = "bottom", openPopup: S = !1, backgroundDisabled: C = !1, closeOnClickBackground: w = !0, closeOnClickPopup: T = !0, containerTopOffset: E = 5, containerLeftOffset: D = 5, popupWidth: O = "content", disabled: k = !1 }) => {
|
|
19
|
+
let { setElementState: A, definition: { styleSelectors: j } } = n(), { settings: { previewMode: M }, utils: { getWindow: N } } = f(), P = u(null), F = t ?? P, I = u(null), L = u(null), R = l(() => N(), [N]), z = s((e) => {
|
|
20
|
+
w && (e.stopPropagation(), e.preventDefault(), A(v(!1)));
|
|
21
|
+
}, [w, A]), B = s((e) => {
|
|
22
|
+
A(v(e));
|
|
23
|
+
}, [A]), [, , V, H, U, W] = a({
|
|
24
|
+
ref: F,
|
|
25
|
+
popupRef: I,
|
|
26
|
+
open: S,
|
|
27
|
+
disabled: !M || k,
|
|
28
|
+
closeOnClickPopup: T,
|
|
29
|
+
closeOnClickOutside: w && !C,
|
|
30
|
+
placement: x,
|
|
31
|
+
offsetX: D,
|
|
32
|
+
offsetY: E,
|
|
33
|
+
myWindow: R,
|
|
34
|
+
onChange: B
|
|
35
|
+
}), G = l(() => W && O === "trigger" && U ? {
|
|
36
|
+
...W,
|
|
37
|
+
minWidth: U.width
|
|
38
|
+
} : W, [
|
|
39
|
+
W,
|
|
40
|
+
O,
|
|
41
|
+
U
|
|
42
|
+
]), K = l(() => ({
|
|
43
|
+
openDropdown: {
|
|
44
|
+
...e.callbacks.openDropdown,
|
|
45
|
+
callback: () => B(!0)
|
|
46
|
+
},
|
|
47
|
+
closeDropdown: {
|
|
48
|
+
...e.callbacks.closeDropdown,
|
|
49
|
+
callback: () => B(!1)
|
|
50
|
+
},
|
|
51
|
+
toggleDropdown: {
|
|
52
|
+
...e.callbacks.toggleDropdown,
|
|
53
|
+
callback: () => B(!S)
|
|
54
|
+
}
|
|
55
|
+
}), [B, S]), [q, J] = d(null);
|
|
56
|
+
c(() => {
|
|
57
|
+
S && M && !q && J(p(F.current));
|
|
40
58
|
}, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
59
|
+
S,
|
|
60
|
+
M,
|
|
61
|
+
q,
|
|
62
|
+
F
|
|
45
63
|
]);
|
|
46
|
-
let
|
|
47
|
-
rootRef:
|
|
48
|
-
popupRef:
|
|
49
|
-
open:
|
|
50
|
-
positioned: !!
|
|
51
|
-
enabled: !!
|
|
52
|
-
}),
|
|
53
|
-
|
|
54
|
-
}, [
|
|
55
|
-
popupRef:
|
|
56
|
-
openPopup:
|
|
57
|
-
parameters:
|
|
58
|
-
onClick:
|
|
59
|
-
layer:
|
|
64
|
+
let Y = M ? q : null, X = o({
|
|
65
|
+
rootRef: F,
|
|
66
|
+
popupRef: I,
|
|
67
|
+
open: S,
|
|
68
|
+
positioned: !!G,
|
|
69
|
+
enabled: !!M && !k
|
|
70
|
+
}), Z = s((e) => {
|
|
71
|
+
X(e), V(e);
|
|
72
|
+
}, [X, V]), Q = l(() => ({
|
|
73
|
+
popupRef: I,
|
|
74
|
+
openPopup: S,
|
|
75
|
+
parameters: G,
|
|
76
|
+
onClick: H,
|
|
77
|
+
layer: Y
|
|
60
78
|
}), [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
]),
|
|
66
|
-
ref:
|
|
67
|
-
className:
|
|
68
|
-
onClick:
|
|
79
|
+
H,
|
|
80
|
+
S,
|
|
81
|
+
G,
|
|
82
|
+
Y
|
|
83
|
+
]), $ = S && C && M && /* @__PURE__ */ m("div", {
|
|
84
|
+
ref: L,
|
|
85
|
+
className: g("plitzi-component__dropdown__background-container", j.backgroundContainer),
|
|
86
|
+
onClick: z
|
|
69
87
|
});
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
ref:
|
|
72
|
-
className:
|
|
73
|
-
onClick:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
88
|
+
return /* @__PURE__ */ h(r, {
|
|
89
|
+
ref: F,
|
|
90
|
+
className: g("plitzi-component__dropdown", b, { "container--empty--skip": !M && !y }),
|
|
91
|
+
onClick: Z,
|
|
92
|
+
interactionCallbacks: K,
|
|
93
|
+
children: [/* @__PURE__ */ m(i, {
|
|
94
|
+
value: Q,
|
|
95
|
+
children: y
|
|
96
|
+
}), $ && Y ? _($, Y) : $]
|
|
78
97
|
});
|
|
79
|
-
},
|
|
98
|
+
}, b = t(y);
|
|
80
99
|
//#endregion
|
|
81
|
-
export {
|
|
100
|
+
export { y as Dropdown, b as default, v as withOpen };
|
|
@@ -6,7 +6,7 @@ export type DropdownPopupProps = {
|
|
|
6
6
|
};
|
|
7
7
|
declare const DropdownPopup: ({ ref, className, children }: DropdownPopupProps) => import('react').JSX.Element;
|
|
8
8
|
declare const _default: {
|
|
9
|
-
(props: import('../../../..').WithElementProps<DropdownPopupProps>): import('react').JSX.Element;
|
|
9
|
+
(props: import('../../../..').WithElementProps<DropdownPopupProps>): 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;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const DropdownPopup: {
|
|
2
|
-
(props: import('../../../..').WithElementProps<import('./DropdownPopup').DropdownPopupProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../../..').WithElementProps<import('./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;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "dropdownPopup";
|
|
@@ -6,6 +6,35 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
6
6
|
readonly type: "dropdown";
|
|
7
7
|
readonly attributeValues: {
|
|
8
8
|
readonly popupPlacement: readonly string[];
|
|
9
|
+
readonly popupWidth: readonly string[];
|
|
10
|
+
};
|
|
11
|
+
readonly callbacks: {
|
|
12
|
+
readonly openDropdown: {
|
|
13
|
+
readonly action: "openDropdown";
|
|
14
|
+
readonly title: "Open Dropdown";
|
|
15
|
+
readonly type: "callback";
|
|
16
|
+
readonly params: {};
|
|
17
|
+
readonly preview: {};
|
|
18
|
+
};
|
|
19
|
+
readonly closeDropdown: {
|
|
20
|
+
readonly action: "closeDropdown";
|
|
21
|
+
readonly title: "Close Dropdown";
|
|
22
|
+
readonly type: "callback";
|
|
23
|
+
readonly params: {};
|
|
24
|
+
readonly preview: {};
|
|
25
|
+
};
|
|
26
|
+
readonly toggleDropdown: {
|
|
27
|
+
readonly action: "toggleDropdown";
|
|
28
|
+
readonly title: "Toggle Dropdown";
|
|
29
|
+
readonly type: "callback";
|
|
30
|
+
readonly params: {};
|
|
31
|
+
readonly preview: {};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly marks: {
|
|
35
|
+
readonly 'aria-expanded': "on its trigger while the popup is open — what a class’s `expanded` state lights";
|
|
36
|
+
readonly '.popup-container--no-visible': "on its dropdownPopup while closed";
|
|
37
|
+
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";
|
|
9
38
|
};
|
|
10
39
|
readonly content: {
|
|
11
40
|
readonly attributes: {
|
|
@@ -16,6 +45,7 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
16
45
|
readonly closeOnClickPopup: true;
|
|
17
46
|
readonly containerTopOffset: 5;
|
|
18
47
|
readonly containerLeftOffset: 5;
|
|
48
|
+
readonly popupWidth: "content";
|
|
19
49
|
readonly disabled: false;
|
|
20
50
|
};
|
|
21
51
|
readonly definition: {
|
|
@@ -62,5 +92,6 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
62
92
|
closeOnClickBackground?: boolean | undefined;
|
|
63
93
|
containerTopOffset?: number | undefined;
|
|
64
94
|
containerLeftOffset?: number | undefined;
|
|
95
|
+
popupWidth?: "content" | "trigger" | undefined;
|
|
65
96
|
}>>;
|
|
66
97
|
export default declaration;
|