@guardian/stand 0.0.59 → 0.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/HtmlPreviewLoader.cjs +7 -0
- package/dist/HtmlPreviewLoader.d.cts +4 -0
- package/dist/HtmlPreviewLoader.d.ts +4 -0
- package/dist/HtmlPreviewLoader.js +4 -0
- package/dist/components/AlertBanner/AlertBanner.d.cts +1 -12
- package/dist/components/AlertBanner/AlertBanner.d.ts +1 -12
- package/dist/components/AlertBanner/styles.d.cts +1 -1
- package/dist/components/AlertBanner/styles.d.ts +1 -1
- package/dist/components/AlertBanner/types.d.cts +2 -1
- package/dist/components/AlertBanner/types.d.ts +2 -1
- package/dist/components/Avatar/Avatar.d.cts +1 -11
- package/dist/components/Avatar/Avatar.d.ts +1 -11
- package/dist/components/Avatar/styles.d.cts +1 -1
- package/dist/components/Avatar/styles.d.ts +1 -1
- package/dist/components/Avatar/types.d.cts +1 -2
- package/dist/components/Avatar/types.d.ts +1 -2
- package/dist/components/AvatarButton/AvatarButton.d.cts +0 -1
- package/dist/components/AvatarButton/AvatarButton.d.ts +0 -1
- package/dist/components/AvatarButton/styles.d.cts +0 -1
- package/dist/components/AvatarButton/styles.d.ts +0 -1
- package/dist/components/AvatarButton/types.d.cts +0 -1
- package/dist/components/AvatarButton/types.d.ts +0 -1
- package/dist/components/AvatarLink/AvatarLink.d.cts +0 -1
- package/dist/components/AvatarLink/AvatarLink.d.ts +0 -1
- package/dist/components/AvatarLink/styles.d.cts +0 -1
- package/dist/components/AvatarLink/styles.d.ts +0 -1
- package/dist/components/AvatarLink/types.d.cts +0 -1
- package/dist/components/AvatarLink/types.d.ts +0 -1
- package/dist/components/Button/Button.d.cts +1 -9
- package/dist/components/Button/Button.d.ts +1 -9
- package/dist/components/Button/styles.cjs +6 -6
- package/dist/components/Button/styles.d.cts +1 -1
- package/dist/components/Button/styles.d.ts +1 -1
- package/dist/components/Button/styles.js +6 -6
- package/dist/components/Button/types.d.cts +0 -1
- package/dist/components/Button/types.d.ts +0 -1
- package/dist/components/ButtonGroup/ButtonGroup.cjs +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.cts +1 -7
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +1 -7
- package/dist/components/ButtonGroup/styles.d.cts +0 -1
- package/dist/components/ButtonGroup/styles.d.ts +0 -1
- package/dist/components/ButtonGroup/types.d.cts +0 -1
- package/dist/components/ButtonGroup/types.d.ts +0 -1
- package/dist/components/Byline/Byline.d.cts +20 -22
- package/dist/components/Byline/Byline.d.ts +20 -22
- package/dist/components/Byline/lib.cjs +2 -0
- package/dist/components/Byline/lib.d.cts +3 -0
- package/dist/components/Byline/lib.d.ts +2 -0
- package/dist/components/Byline/lib.js +1 -1
- package/dist/components/Byline/theme.d.cts +0 -1
- package/dist/components/Byline/theme.d.ts +0 -1
- package/dist/components/Checkbox/Checkbox.d.cts +1 -9
- package/dist/components/Checkbox/Checkbox.d.ts +1 -9
- package/dist/components/Checkbox/CheckboxGroup.cjs +1 -1
- package/dist/components/Checkbox/CheckboxGroup.d.cts +1 -6
- package/dist/components/Checkbox/CheckboxGroup.d.ts +1 -6
- package/dist/components/Checkbox/styles.cjs +2 -2
- package/dist/components/Checkbox/styles.d.cts +1 -1
- package/dist/components/Checkbox/styles.d.ts +1 -1
- package/dist/components/Checkbox/styles.js +2 -2
- package/dist/components/Checkbox/types.d.cts +0 -1
- package/dist/components/Checkbox/types.d.ts +0 -1
- package/dist/components/DatePicker/DatePicker.d.cts +1 -8
- package/dist/components/DatePicker/DatePicker.d.ts +1 -8
- package/dist/components/DatePicker/styles.d.cts +0 -1
- package/dist/components/DatePicker/styles.d.ts +0 -1
- package/dist/components/DatePicker/types.d.cts +1 -1
- package/dist/components/DatePicker/types.d.ts +1 -1
- package/dist/components/Favicon/Favicon.d.cts +0 -1
- package/dist/components/Favicon/Favicon.d.ts +0 -1
- package/dist/components/Favicon/styles.d.cts +0 -1
- package/dist/components/Favicon/styles.d.ts +0 -1
- package/dist/components/Favicon/types.d.cts +0 -1
- package/dist/components/Favicon/types.d.ts +0 -1
- package/dist/components/Form/styles.cjs +6 -6
- package/dist/components/Form/styles.d.cts +1 -1
- package/dist/components/Form/styles.d.ts +1 -1
- package/dist/components/Form/styles.js +6 -6
- package/dist/components/Form/types.d.cts +0 -1
- package/dist/components/Form/types.d.ts +0 -1
- package/dist/components/Grid/Grid.d.cts +2 -16
- package/dist/components/Grid/Grid.d.ts +2 -16
- package/dist/components/Grid/styles.d.cts +1 -1
- package/dist/components/Grid/styles.d.ts +1 -1
- package/dist/components/Grid/types.d.cts +1 -2
- package/dist/components/Grid/types.d.ts +1 -2
- package/dist/components/HtmlPreviewLoader/HtmlPreview.cjs +99 -0
- package/dist/components/HtmlPreviewLoader/HtmlPreview.d.cts +5 -0
- package/dist/components/HtmlPreviewLoader/HtmlPreview.d.ts +5 -0
- package/dist/components/HtmlPreviewLoader/HtmlPreview.js +99 -0
- package/dist/components/HtmlPreviewLoader/HtmlPreviewLoader.cjs +27 -0
- package/dist/components/HtmlPreviewLoader/HtmlPreviewLoader.d.cts +5 -0
- package/dist/components/HtmlPreviewLoader/HtmlPreviewLoader.d.ts +5 -0
- package/dist/components/HtmlPreviewLoader/HtmlPreviewLoader.js +27 -0
- package/dist/components/HtmlPreviewLoader/styles.cjs +96 -0
- package/dist/components/HtmlPreviewLoader/styles.d.cts +7 -0
- package/dist/components/HtmlPreviewLoader/styles.d.ts +7 -0
- package/dist/components/HtmlPreviewLoader/styles.js +87 -0
- package/dist/components/HtmlPreviewLoader/types.d.cts +27 -0
- package/dist/components/HtmlPreviewLoader/types.d.ts +27 -0
- package/dist/components/Icon/Icon.d.cts +1 -11
- package/dist/components/Icon/Icon.d.ts +1 -11
- package/dist/components/Icon/Styles.d.cts +1 -0
- package/dist/components/Icon/Styles.d.ts +1 -0
- package/dist/components/Icon/types.d.cts +1 -2
- package/dist/components/Icon/types.d.ts +1 -2
- package/dist/components/IconButton/IconButton.d.cts +1 -10
- package/dist/components/IconButton/IconButton.d.ts +1 -10
- package/dist/components/IconButton/styles.d.cts +1 -0
- package/dist/components/IconButton/styles.d.ts +1 -0
- package/dist/components/IconButton/types.d.cts +0 -1
- package/dist/components/IconButton/types.d.ts +0 -1
- package/dist/components/IconLinkButton/IconLinkButton.d.cts +1 -10
- package/dist/components/IconLinkButton/IconLinkButton.d.ts +1 -10
- package/dist/components/IconLinkButton/styles.d.cts +1 -0
- package/dist/components/IconLinkButton/styles.d.ts +1 -0
- package/dist/components/IconLinkButton/types.d.cts +0 -1
- package/dist/components/IconLinkButton/types.d.ts +0 -1
- package/dist/components/InlineMessage/InlineMessage.d.cts +1 -12
- package/dist/components/InlineMessage/InlineMessage.d.ts +1 -12
- package/dist/components/InlineMessage/styles.d.cts +1 -1
- package/dist/components/InlineMessage/styles.d.ts +1 -1
- package/dist/components/InlineMessage/types.d.cts +0 -1
- package/dist/components/InlineMessage/types.d.ts +0 -1
- package/dist/components/IntendedAudienceSignifier/IntendedAudienceSignifier.d.cts +1 -9
- package/dist/components/IntendedAudienceSignifier/IntendedAudienceSignifier.d.ts +1 -9
- package/dist/components/IntendedAudienceSignifier/styles.d.cts +0 -1
- package/dist/components/IntendedAudienceSignifier/styles.d.ts +0 -1
- package/dist/components/IntendedAudienceSignifier/types.d.cts +0 -1
- package/dist/components/IntendedAudienceSignifier/types.d.ts +0 -1
- package/dist/components/IntendedAudienceSignifier/utils.d.cts +1 -2
- package/dist/components/IntendedAudienceSignifier/utils.d.ts +1 -2
- package/dist/components/Layout/Layout.d.cts +0 -1
- package/dist/components/Layout/Layout.d.ts +0 -1
- package/dist/components/Layout/styles.cjs +24 -24
- package/dist/components/Layout/styles.d.cts +1 -1
- package/dist/components/Layout/styles.d.ts +1 -1
- package/dist/components/Layout/styles.js +24 -24
- package/dist/components/Layout/types.d.cts +0 -1
- package/dist/components/Layout/types.d.ts +0 -1
- package/dist/components/Link/Link.d.cts +1 -9
- package/dist/components/Link/Link.d.ts +1 -9
- package/dist/components/Link/styles.d.cts +0 -1
- package/dist/components/Link/styles.d.ts +0 -1
- package/dist/components/Link/types.d.cts +0 -1
- package/dist/components/Link/types.d.ts +0 -1
- package/dist/components/LinkButton/LinkButton.d.cts +1 -9
- package/dist/components/LinkButton/LinkButton.d.ts +1 -9
- package/dist/components/LinkButton/Styles.d.cts +1 -0
- package/dist/components/LinkButton/Styles.d.ts +1 -0
- package/dist/components/LinkButton/types.d.cts +0 -1
- package/dist/components/LinkButton/types.d.ts +0 -1
- package/dist/components/Menu/Menu.cjs +1 -1
- package/dist/components/Menu/Menu.d.cts +5 -36
- package/dist/components/Menu/Menu.d.ts +5 -36
- package/dist/components/Menu/styles.d.cts +1 -1
- package/dist/components/Menu/styles.d.ts +1 -1
- package/dist/components/Menu/types.d.cts +0 -1
- package/dist/components/Menu/types.d.ts +0 -1
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.d.cts +1 -7
- package/dist/components/Modal/Modal.d.ts +1 -7
- package/dist/components/Modal/styles.d.cts +0 -1
- package/dist/components/Modal/styles.d.ts +0 -1
- package/dist/components/Modal/types.d.cts +0 -1
- package/dist/components/Modal/types.d.ts +0 -1
- package/dist/components/RadioGroup/RadioGroup.cjs +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.cts +2 -16
- package/dist/components/RadioGroup/RadioGroup.d.ts +2 -16
- package/dist/components/RadioGroup/styles.cjs +2 -2
- package/dist/components/RadioGroup/styles.d.cts +1 -1
- package/dist/components/RadioGroup/styles.d.ts +1 -1
- package/dist/components/RadioGroup/styles.js +2 -2
- package/dist/components/RadioGroup/types.d.cts +0 -1
- package/dist/components/RadioGroup/types.d.ts +0 -1
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.d.cts +2 -15
- package/dist/components/Select/Select.d.ts +2 -15
- package/dist/components/Select/styles.d.cts +0 -1
- package/dist/components/Select/styles.d.ts +0 -1
- package/dist/components/Select/types.d.cts +0 -1
- package/dist/components/Select/types.d.ts +0 -1
- package/dist/components/Tabs/Tabs.cjs +1 -1
- package/dist/components/Tabs/Tabs.d.cts +0 -1
- package/dist/components/Tabs/Tabs.d.ts +0 -1
- package/dist/components/Tabs/styles.cjs +34 -34
- package/dist/components/Tabs/styles.d.cts +1 -1
- package/dist/components/Tabs/styles.d.ts +1 -1
- package/dist/components/Tabs/styles.js +34 -34
- package/dist/components/Tabs/types.d.cts +0 -1
- package/dist/components/Tabs/types.d.ts +0 -1
- package/dist/components/TagPicker/Autocomplete.d.cts +3 -19
- package/dist/components/TagPicker/Autocomplete.d.ts +3 -19
- package/dist/components/TagPicker/TagPicker.d.cts +39 -54
- package/dist/components/TagPicker/TagPicker.d.ts +39 -54
- package/dist/components/TagPicker/types.d.cts +1 -1
- package/dist/components/TagPicker/types.d.ts +1 -1
- package/dist/components/TagTable/TagTable.d.cts +2 -23
- package/dist/components/TagTable/TagTable.d.ts +2 -23
- package/dist/components/TextArea/TextArea.d.cts +1 -8
- package/dist/components/TextArea/TextArea.d.ts +1 -8
- package/dist/components/TextArea/styles.cjs +2 -2
- package/dist/components/TextArea/styles.d.cts +1 -1
- package/dist/components/TextArea/styles.d.ts +1 -1
- package/dist/components/TextArea/styles.js +2 -2
- package/dist/components/TextArea/types.d.cts +0 -1
- package/dist/components/TextArea/types.d.ts +0 -1
- package/dist/components/TextInput/TextInput.d.cts +1 -8
- package/dist/components/TextInput/TextInput.d.ts +1 -8
- package/dist/components/TextInput/styles.cjs +2 -2
- package/dist/components/TextInput/styles.d.cts +1 -1
- package/dist/components/TextInput/styles.d.ts +1 -1
- package/dist/components/TextInput/styles.js +2 -2
- package/dist/components/TextInput/types.d.cts +0 -1
- package/dist/components/TextInput/types.d.ts +0 -1
- package/dist/components/TopBar/TopBar.cjs +1 -1
- package/dist/components/TopBar/TopBar.d.cts +3 -17
- package/dist/components/TopBar/TopBar.d.ts +3 -17
- package/dist/components/TopBar/TopBarItem/TopBarItem.d.cts +1 -11
- package/dist/components/TopBar/TopBarItem/TopBarItem.d.ts +1 -11
- package/dist/components/TopBar/TopBarItem/styles.cjs +7 -7
- package/dist/components/TopBar/TopBarItem/styles.d.cts +1 -1
- package/dist/components/TopBar/TopBarItem/styles.d.ts +1 -1
- package/dist/components/TopBar/TopBarItem/styles.js +7 -7
- package/dist/components/TopBar/TopBarItem/types.d.cts +0 -1
- package/dist/components/TopBar/TopBarItem/types.d.ts +0 -1
- package/dist/components/TopBar/TopBarNavigation/TopBarNavigation.d.cts +1 -17
- package/dist/components/TopBar/TopBarNavigation/TopBarNavigation.d.ts +1 -17
- package/dist/components/TopBar/TopBarNavigation/styles.cjs +30 -30
- package/dist/components/TopBar/TopBarNavigation/styles.d.cts +1 -1
- package/dist/components/TopBar/TopBarNavigation/styles.d.ts +1 -1
- package/dist/components/TopBar/TopBarNavigation/styles.js +30 -30
- package/dist/components/TopBar/TopBarNavigation/types.d.cts +0 -1
- package/dist/components/TopBar/TopBarNavigation/types.d.ts +0 -1
- package/dist/components/TopBar/TopBarToolName/TopBarToolName.d.cts +1 -6
- package/dist/components/TopBar/TopBarToolName/TopBarToolName.d.ts +1 -6
- package/dist/components/TopBar/TopBarToolName/styles.d.cts +1 -1
- package/dist/components/TopBar/TopBarToolName/styles.d.ts +1 -1
- package/dist/components/TopBar/TopBarToolName/types.d.cts +0 -1
- package/dist/components/TopBar/TopBarToolName/types.d.ts +0 -1
- package/dist/components/TopBar/styles.cjs +10 -10
- package/dist/components/TopBar/styles.d.cts +0 -1
- package/dist/components/TopBar/styles.d.ts +0 -1
- package/dist/components/TopBar/styles.js +10 -10
- package/dist/components/TopBar/types.d.cts +0 -1
- package/dist/components/TopBar/types.d.ts +0 -1
- package/dist/components/Typography/Typography.d.cts +1 -9
- package/dist/components/Typography/Typography.d.ts +1 -9
- package/dist/components/Typography/styles.d.cts +1 -1
- package/dist/components/Typography/styles.d.ts +1 -1
- package/dist/components/Typography/types.d.cts +0 -1
- package/dist/components/Typography/types.d.ts +0 -1
- package/dist/components/UserMenu/UserMenu.d.cts +2 -12
- package/dist/components/UserMenu/UserMenu.d.ts +2 -12
- package/dist/components/UserMenu/model.d.cts +0 -1
- package/dist/components/UserMenu/model.d.ts +0 -1
- package/dist/styleD/build/css/base/sizing.css +2 -0
- package/dist/styleD/build/css/component/htmlPreviewLoader.css +22 -0
- package/dist/styleD/build/css/component/icon.css +1 -0
- package/dist/styleD/build/css/component/previewFrame.css +10 -0
- package/dist/styleD/build/css/semantic/sizing.css +1 -0
- package/dist/styleD/build/typescript/base/sizing.cjs +2 -0
- package/dist/styleD/build/typescript/base/sizing.d.cts +2 -0
- package/dist/styleD/build/typescript/base/sizing.d.ts +2 -0
- package/dist/styleD/build/typescript/base/sizing.js +2 -0
- package/dist/styleD/build/typescript/component/htmlPreviewLoader.cjs +30 -0
- package/dist/styleD/build/typescript/component/htmlPreviewLoader.d.cts +33 -0
- package/dist/styleD/build/typescript/component/htmlPreviewLoader.d.ts +33 -0
- package/dist/styleD/build/typescript/component/htmlPreviewLoader.js +30 -0
- package/dist/styleD/build/typescript/component/icon.cjs +1 -0
- package/dist/styleD/build/typescript/component/icon.d.cts +3 -0
- package/dist/styleD/build/typescript/component/icon.d.ts +3 -0
- package/dist/styleD/build/typescript/component/icon.js +1 -0
- package/dist/styleD/build/typescript/semantic/sizing.cjs +1 -0
- package/dist/styleD/build/typescript/semantic/sizing.d.cts +1 -0
- package/dist/styleD/build/typescript/semantic/sizing.d.ts +1 -0
- package/dist/styleD/build/typescript/semantic/sizing.js +1 -0
- package/dist/styleD/utils/semantic/mq.d.cts +0 -1
- package/dist/styleD/utils/semantic/mq.d.ts +0 -1
- package/dist/styleD/utils/semantic/typography.d.cts +0 -1
- package/dist/styleD/utils/semantic/typography.d.ts +0 -1
- package/dist/util/types.d.cts +2 -3
- package/dist/util/types.d.ts +2 -3
- package/package.json +31 -18
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { mergeDeep } from "../../util/mergeDeep.js";
|
|
2
|
+
import { Icon } from "../Icon/Icon.js";
|
|
3
|
+
import { AlertBanner } from "../AlertBanner/AlertBanner.js";
|
|
4
|
+
import { Button } from "../Button/Button.js";
|
|
5
|
+
import { Typography } from "../Typography/Typography.js";
|
|
6
|
+
import { Radio, RadioGroup } from "../RadioGroup/RadioGroup.js";
|
|
7
|
+
import { alertBannerContentsStyle, centeredStyle, defaultHtmlPreviewLoaderTheme, headerStyles, htmlPreviewLoaderStyles, iframeStyle, loadingIconStyle, previewFrameStyle, reloadButtonStyle, spinAnimationStyle } from "./styles.js";
|
|
8
|
+
import { useState } from "react";
|
|
9
|
+
import { css } from "@emotion/react";
|
|
10
|
+
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
11
|
+
//#region src/components/HtmlPreviewLoader/HtmlPreview.tsx
|
|
12
|
+
const defaultWidthOptions = [
|
|
13
|
+
320,
|
|
14
|
+
375,
|
|
15
|
+
425,
|
|
16
|
+
650
|
|
17
|
+
];
|
|
18
|
+
const HtmlPreview = ({ html, isLoading = false, errorMessage, attemptLoad, minHeight = 600, title, widthOptions = defaultWidthOptions, defaultWidth = 425, frameBackground = "white", allowReloading = false, cssOverrides, theme }) => {
|
|
19
|
+
const mergedTheme = mergeDeep(defaultHtmlPreviewLoaderTheme, theme ?? {});
|
|
20
|
+
const [frameWidth, setFrameWidth] = useState(defaultWidth);
|
|
21
|
+
const showReloadButton = allowReloading && !errorMessage && !isLoading && !!attemptLoad;
|
|
22
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
23
|
+
css: [htmlPreviewLoaderStyles(mergedTheme), cssOverrides],
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ jsxs("header", {
|
|
26
|
+
css: headerStyles(),
|
|
27
|
+
children: [typeof title === "string" ? /* @__PURE__ */ jsx(Typography, {
|
|
28
|
+
variant: "titleMd",
|
|
29
|
+
children: title
|
|
30
|
+
}) : title, widthOptions.length > 0 && /* @__PURE__ */ jsx(RadioGroup, {
|
|
31
|
+
size: "sm",
|
|
32
|
+
label: "width",
|
|
33
|
+
orientation: "horizontal",
|
|
34
|
+
formInputContainerTheme: { shared: { container: {
|
|
35
|
+
width: "unset",
|
|
36
|
+
flexDirection: "row"
|
|
37
|
+
} } },
|
|
38
|
+
cssOverrides: css({ alignItems: "center" }),
|
|
39
|
+
value: String(frameWidth),
|
|
40
|
+
onChange: (value) => setFrameWidth(Number(value)),
|
|
41
|
+
children: widthOptions.map((width, index) => /* @__PURE__ */ jsxs(Radio, {
|
|
42
|
+
value: String(width),
|
|
43
|
+
children: [width, "px"]
|
|
44
|
+
}, index))
|
|
45
|
+
})]
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ jsxs("div", {
|
|
48
|
+
css: [previewFrameStyle(mergedTheme), { minHeight }],
|
|
49
|
+
children: [html && /* @__PURE__ */ jsx("iframe", {
|
|
50
|
+
sandbox: "",
|
|
51
|
+
style: {
|
|
52
|
+
minWidth: frameWidth,
|
|
53
|
+
maxWidth: frameWidth,
|
|
54
|
+
background: frameBackground
|
|
55
|
+
},
|
|
56
|
+
css: iframeStyle(isLoading || !!errorMessage),
|
|
57
|
+
title: "preview",
|
|
58
|
+
srcDoc: html
|
|
59
|
+
}), showReloadButton && /* @__PURE__ */ jsx("div", {
|
|
60
|
+
css: reloadButtonStyle(mergedTheme),
|
|
61
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
62
|
+
icon: "refresh",
|
|
63
|
+
size: "md",
|
|
64
|
+
variant: "primary",
|
|
65
|
+
onPress: attemptLoad,
|
|
66
|
+
children: "reload"
|
|
67
|
+
})
|
|
68
|
+
})]
|
|
69
|
+
}),
|
|
70
|
+
isLoading && /* @__PURE__ */ jsx("div", {
|
|
71
|
+
css: centeredStyle(),
|
|
72
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
73
|
+
css: loadingIconStyle(mergedTheme),
|
|
74
|
+
symbol: "progress_activity",
|
|
75
|
+
cssOverrides: spinAnimationStyle()
|
|
76
|
+
})
|
|
77
|
+
}),
|
|
78
|
+
errorMessage && /* @__PURE__ */ jsx("div", {
|
|
79
|
+
css: centeredStyle(),
|
|
80
|
+
children: /* @__PURE__ */ jsx(AlertBanner, {
|
|
81
|
+
showIcon: true,
|
|
82
|
+
level: "error",
|
|
83
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
84
|
+
css: alertBannerContentsStyle(),
|
|
85
|
+
children: [errorMessage, attemptLoad && /* @__PURE__ */ jsx(Button, {
|
|
86
|
+
icon: "refresh",
|
|
87
|
+
size: "sm",
|
|
88
|
+
variant: "secondary",
|
|
89
|
+
onPress: attemptLoad,
|
|
90
|
+
children: "retry"
|
|
91
|
+
})]
|
|
92
|
+
})
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
//#endregion
|
|
99
|
+
export { HtmlPreview };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const require_HtmlPreview = require("./HtmlPreview.cjs");
|
|
2
|
+
let react = require("react");
|
|
3
|
+
let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
|
|
4
|
+
//#region src/components/HtmlPreviewLoader/HtmlPreviewLoader.tsx
|
|
5
|
+
const HtmlPreviewLoader = (props) => {
|
|
6
|
+
const { fetchHtml, ...rest } = props;
|
|
7
|
+
const [html, setHtml] = (0, react.useState)();
|
|
8
|
+
const [error, setError] = (0, react.useState)();
|
|
9
|
+
const [isLoading, setIsLoading] = (0, react.useState)(true);
|
|
10
|
+
const attemptLoad = (0, react.useCallback)(() => {
|
|
11
|
+
setIsLoading(true);
|
|
12
|
+
setError(void 0);
|
|
13
|
+
fetchHtml().then(setHtml).catch(setError).finally(() => setIsLoading(false));
|
|
14
|
+
}, [fetchHtml]);
|
|
15
|
+
(0, react.useEffect)(() => {
|
|
16
|
+
attemptLoad();
|
|
17
|
+
}, [attemptLoad]);
|
|
18
|
+
return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_HtmlPreview.HtmlPreview, {
|
|
19
|
+
html,
|
|
20
|
+
isLoading,
|
|
21
|
+
errorMessage: error ? "failed to load" : void 0,
|
|
22
|
+
attemptLoad,
|
|
23
|
+
...rest
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
exports.HtmlPreviewLoader = HtmlPreviewLoader;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HtmlPreviewLoaderProps } from "./types.cjs";
|
|
2
|
+
//#region src/components/HtmlPreviewLoader/HtmlPreviewLoader.d.ts
|
|
3
|
+
declare const HtmlPreviewLoader: (props: HtmlPreviewLoaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { HtmlPreviewLoader };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HtmlPreviewLoaderProps } from "./types.js";
|
|
2
|
+
//#region src/components/HtmlPreviewLoader/HtmlPreviewLoader.d.ts
|
|
3
|
+
declare const HtmlPreviewLoader: (props: HtmlPreviewLoaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { HtmlPreviewLoader };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HtmlPreview } from "./HtmlPreview.js";
|
|
2
|
+
import { useCallback, useEffect, useState } from "react";
|
|
3
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
4
|
+
//#region src/components/HtmlPreviewLoader/HtmlPreviewLoader.tsx
|
|
5
|
+
const HtmlPreviewLoader = (props) => {
|
|
6
|
+
const { fetchHtml, ...rest } = props;
|
|
7
|
+
const [html, setHtml] = useState();
|
|
8
|
+
const [error, setError] = useState();
|
|
9
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
10
|
+
const attemptLoad = useCallback(() => {
|
|
11
|
+
setIsLoading(true);
|
|
12
|
+
setError(void 0);
|
|
13
|
+
fetchHtml().then(setHtml).catch(setError).finally(() => setIsLoading(false));
|
|
14
|
+
}, [fetchHtml]);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
attemptLoad();
|
|
17
|
+
}, [attemptLoad]);
|
|
18
|
+
return /* @__PURE__ */ jsx(HtmlPreview, {
|
|
19
|
+
html,
|
|
20
|
+
isLoading,
|
|
21
|
+
errorMessage: error ? "failed to load" : void 0,
|
|
22
|
+
attemptLoad,
|
|
23
|
+
...rest
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { HtmlPreviewLoader };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
const require_htmlPreviewLoader = require("../../styleD/build/typescript/component/htmlPreviewLoader.cjs");
|
|
2
|
+
let _emotion_react = require("@emotion/react");
|
|
3
|
+
//#region src/components/HtmlPreviewLoader/styles.ts
|
|
4
|
+
const defaultHtmlPreviewLoaderTheme = require_htmlPreviewLoader.componentHtmlPreviewLoader;
|
|
5
|
+
const htmlPreviewLoaderStyles = (theme) => {
|
|
6
|
+
return _emotion_react.css`
|
|
7
|
+
background-color: ${theme.shared.color.background};
|
|
8
|
+
color: ${theme.shared.color.text};
|
|
9
|
+
padding-top: ${theme.paddingTop};
|
|
10
|
+
padding-bottom: ${theme.paddingBottom};
|
|
11
|
+
padding-left: ${theme.paddingLeft};
|
|
12
|
+
padding-right: ${theme.paddingRight};
|
|
13
|
+
position: relative;
|
|
14
|
+
`;
|
|
15
|
+
};
|
|
16
|
+
const headerStyles = () => {
|
|
17
|
+
return _emotion_react.css`
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
flex-wrap: wrap;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
`;
|
|
23
|
+
};
|
|
24
|
+
const previewFrameStyle = ({ previewFrame }) => {
|
|
25
|
+
return _emotion_react.css`
|
|
26
|
+
border-color: ${previewFrame.borderColor};
|
|
27
|
+
border-style: ${previewFrame.borderStyle};
|
|
28
|
+
border-width: ${previewFrame.borderWidth};
|
|
29
|
+
background-color: ${previewFrame.backgroundColor};
|
|
30
|
+
padding-top: ${previewFrame.paddingTop};
|
|
31
|
+
padding-bottom: ${previewFrame.paddingBottom};
|
|
32
|
+
padding-left: ${previewFrame.paddingLeft};
|
|
33
|
+
padding-right: ${previewFrame.paddingRight};
|
|
34
|
+
width: 100%;
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
position: relative;
|
|
38
|
+
`;
|
|
39
|
+
};
|
|
40
|
+
const iframeStyle = (isNotLoaded) => {
|
|
41
|
+
return _emotion_react.css`
|
|
42
|
+
border: none;
|
|
43
|
+
transition: 'filter 0.25s';
|
|
44
|
+
${isNotLoaded ? `
|
|
45
|
+
filter: blur(3px);
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
` : ""}
|
|
48
|
+
`;
|
|
49
|
+
};
|
|
50
|
+
const reloadButtonStyle = ({ previewFrame }) => {
|
|
51
|
+
return _emotion_react.css`
|
|
52
|
+
position: absolute;
|
|
53
|
+
bottom: ${previewFrame.paddingBottom};
|
|
54
|
+
right: ${previewFrame.paddingRight};
|
|
55
|
+
`;
|
|
56
|
+
};
|
|
57
|
+
const loadingIconStyle = ({ loadingIcon }) => {
|
|
58
|
+
return _emotion_react.css`
|
|
59
|
+
font-size: ${loadingIcon.size};
|
|
60
|
+
color: ${loadingIcon.color};
|
|
61
|
+
`;
|
|
62
|
+
};
|
|
63
|
+
const spinAnimationStyle = () => {
|
|
64
|
+
return _emotion_react.css`
|
|
65
|
+
animation: ${(0, _emotion_react.keyframes)({
|
|
66
|
+
from: { transform: "rotate(0deg)" },
|
|
67
|
+
to: { transform: "rotate(360deg)" }
|
|
68
|
+
})} 1s linear infinite;
|
|
69
|
+
`;
|
|
70
|
+
};
|
|
71
|
+
const centeredStyle = () => {
|
|
72
|
+
return _emotion_react.css`
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 50%;
|
|
75
|
+
left: 50%;
|
|
76
|
+
transform: translateX(-50%) translateY(-50%);
|
|
77
|
+
`;
|
|
78
|
+
};
|
|
79
|
+
const alertBannerContentsStyle = () => {
|
|
80
|
+
return _emotion_react.css`
|
|
81
|
+
display: flex;
|
|
82
|
+
gap: 10;
|
|
83
|
+
align-items: center;
|
|
84
|
+
`;
|
|
85
|
+
};
|
|
86
|
+
//#endregion
|
|
87
|
+
exports.alertBannerContentsStyle = alertBannerContentsStyle;
|
|
88
|
+
exports.centeredStyle = centeredStyle;
|
|
89
|
+
exports.defaultHtmlPreviewLoaderTheme = defaultHtmlPreviewLoaderTheme;
|
|
90
|
+
exports.headerStyles = headerStyles;
|
|
91
|
+
exports.htmlPreviewLoaderStyles = htmlPreviewLoaderStyles;
|
|
92
|
+
exports.iframeStyle = iframeStyle;
|
|
93
|
+
exports.loadingIconStyle = loadingIconStyle;
|
|
94
|
+
exports.previewFrameStyle = previewFrameStyle;
|
|
95
|
+
exports.reloadButtonStyle = reloadButtonStyle;
|
|
96
|
+
exports.spinAnimationStyle = spinAnimationStyle;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Prettify } from "../../util/types.cjs";
|
|
2
|
+
import { ComponentHtmlPreviewLoader } from "../../styleD/build/typescript/component/htmlPreviewLoader.cjs";
|
|
3
|
+
import { SerializedStyles } from "@emotion/react";
|
|
4
|
+
//#region src/components/HtmlPreviewLoader/styles.d.ts
|
|
5
|
+
type HtmlPreviewLoaderTheme = Prettify<ComponentHtmlPreviewLoader>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { HtmlPreviewLoaderTheme };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Prettify } from "../../util/types.js";
|
|
2
|
+
import { ComponentHtmlPreviewLoader } from "../../styleD/build/typescript/component/htmlPreviewLoader.js";
|
|
3
|
+
import { SerializedStyles } from "@emotion/react";
|
|
4
|
+
//#region src/components/HtmlPreviewLoader/styles.d.ts
|
|
5
|
+
type HtmlPreviewLoaderTheme = Prettify<ComponentHtmlPreviewLoader>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { HtmlPreviewLoaderTheme };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { componentHtmlPreviewLoader } from "../../styleD/build/typescript/component/htmlPreviewLoader.js";
|
|
2
|
+
import { css, keyframes } from "@emotion/react";
|
|
3
|
+
//#region src/components/HtmlPreviewLoader/styles.ts
|
|
4
|
+
const defaultHtmlPreviewLoaderTheme = componentHtmlPreviewLoader;
|
|
5
|
+
const htmlPreviewLoaderStyles = (theme) => {
|
|
6
|
+
return css`
|
|
7
|
+
background-color: ${theme.shared.color.background};
|
|
8
|
+
color: ${theme.shared.color.text};
|
|
9
|
+
padding-top: ${theme.paddingTop};
|
|
10
|
+
padding-bottom: ${theme.paddingBottom};
|
|
11
|
+
padding-left: ${theme.paddingLeft};
|
|
12
|
+
padding-right: ${theme.paddingRight};
|
|
13
|
+
position: relative;
|
|
14
|
+
`;
|
|
15
|
+
};
|
|
16
|
+
const headerStyles = () => {
|
|
17
|
+
return css`
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
flex-wrap: wrap;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
`;
|
|
23
|
+
};
|
|
24
|
+
const previewFrameStyle = ({ previewFrame }) => {
|
|
25
|
+
return css`
|
|
26
|
+
border-color: ${previewFrame.borderColor};
|
|
27
|
+
border-style: ${previewFrame.borderStyle};
|
|
28
|
+
border-width: ${previewFrame.borderWidth};
|
|
29
|
+
background-color: ${previewFrame.backgroundColor};
|
|
30
|
+
padding-top: ${previewFrame.paddingTop};
|
|
31
|
+
padding-bottom: ${previewFrame.paddingBottom};
|
|
32
|
+
padding-left: ${previewFrame.paddingLeft};
|
|
33
|
+
padding-right: ${previewFrame.paddingRight};
|
|
34
|
+
width: 100%;
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
position: relative;
|
|
38
|
+
`;
|
|
39
|
+
};
|
|
40
|
+
const iframeStyle = (isNotLoaded) => {
|
|
41
|
+
return css`
|
|
42
|
+
border: none;
|
|
43
|
+
transition: 'filter 0.25s';
|
|
44
|
+
${isNotLoaded ? `
|
|
45
|
+
filter: blur(3px);
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
` : ""}
|
|
48
|
+
`;
|
|
49
|
+
};
|
|
50
|
+
const reloadButtonStyle = ({ previewFrame }) => {
|
|
51
|
+
return css`
|
|
52
|
+
position: absolute;
|
|
53
|
+
bottom: ${previewFrame.paddingBottom};
|
|
54
|
+
right: ${previewFrame.paddingRight};
|
|
55
|
+
`;
|
|
56
|
+
};
|
|
57
|
+
const loadingIconStyle = ({ loadingIcon }) => {
|
|
58
|
+
return css`
|
|
59
|
+
font-size: ${loadingIcon.size};
|
|
60
|
+
color: ${loadingIcon.color};
|
|
61
|
+
`;
|
|
62
|
+
};
|
|
63
|
+
const spinAnimationStyle = () => {
|
|
64
|
+
return css`
|
|
65
|
+
animation: ${keyframes({
|
|
66
|
+
from: { transform: "rotate(0deg)" },
|
|
67
|
+
to: { transform: "rotate(360deg)" }
|
|
68
|
+
})} 1s linear infinite;
|
|
69
|
+
`;
|
|
70
|
+
};
|
|
71
|
+
const centeredStyle = () => {
|
|
72
|
+
return css`
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 50%;
|
|
75
|
+
left: 50%;
|
|
76
|
+
transform: translateX(-50%) translateY(-50%);
|
|
77
|
+
`;
|
|
78
|
+
};
|
|
79
|
+
const alertBannerContentsStyle = () => {
|
|
80
|
+
return css`
|
|
81
|
+
display: flex;
|
|
82
|
+
gap: 10;
|
|
83
|
+
align-items: center;
|
|
84
|
+
`;
|
|
85
|
+
};
|
|
86
|
+
//#endregion
|
|
87
|
+
export { alertBannerContentsStyle, centeredStyle, defaultHtmlPreviewLoaderTheme, headerStyles, htmlPreviewLoaderStyles, iframeStyle, loadingIconStyle, previewFrameStyle, reloadButtonStyle, spinAnimationStyle };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DefaultProps } from "../../util/types.cjs";
|
|
2
|
+
import { HtmlPreviewLoaderTheme } from "./styles.cjs";
|
|
3
|
+
import { CSSProperties, ReactNode } from "react";
|
|
4
|
+
//#region src/components/HtmlPreviewLoader/types.d.ts
|
|
5
|
+
type CommonProps = {
|
|
6
|
+
minHeight?: number;
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
widthOptions?: number[];
|
|
9
|
+
defaultWidth?: number;
|
|
10
|
+
frameBackground?: CSSProperties['background'];
|
|
11
|
+
allowReloading?: boolean;
|
|
12
|
+
};
|
|
13
|
+
type HtmlPreviewLoaderProps = DefaultProps<HtmlPreviewLoaderTheme> & CommonProps & {
|
|
14
|
+
fetchHtml: {
|
|
15
|
+
(): Promise<string>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type HtmlPreviewProps = DefaultProps<HtmlPreviewLoaderTheme> & CommonProps & {
|
|
19
|
+
html?: string;
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
errorMessage?: string;
|
|
22
|
+
attemptLoad?: {
|
|
23
|
+
(): void;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { HtmlPreviewLoaderProps, HtmlPreviewProps };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DefaultProps } from "../../util/types.js";
|
|
2
|
+
import { HtmlPreviewLoaderTheme } from "./styles.js";
|
|
3
|
+
import { CSSProperties, ReactNode } from "react";
|
|
4
|
+
//#region src/components/HtmlPreviewLoader/types.d.ts
|
|
5
|
+
type CommonProps = {
|
|
6
|
+
minHeight?: number;
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
widthOptions?: number[];
|
|
9
|
+
defaultWidth?: number;
|
|
10
|
+
frameBackground?: CSSProperties['background'];
|
|
11
|
+
allowReloading?: boolean;
|
|
12
|
+
};
|
|
13
|
+
type HtmlPreviewLoaderProps = DefaultProps<HtmlPreviewLoaderTheme> & CommonProps & {
|
|
14
|
+
fetchHtml: {
|
|
15
|
+
(): Promise<string>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type HtmlPreviewProps = DefaultProps<HtmlPreviewLoaderTheme> & CommonProps & {
|
|
19
|
+
html?: string;
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
errorMessage?: string;
|
|
22
|
+
attemptLoad?: {
|
|
23
|
+
(): void;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { HtmlPreviewLoaderProps, HtmlPreviewProps };
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { IconProps } from "./types.cjs";
|
|
2
|
-
|
|
3
2
|
//#region src/components/Icon/Icon.d.ts
|
|
4
|
-
declare function Icon({
|
|
5
|
-
children,
|
|
6
|
-
size,
|
|
7
|
-
fill,
|
|
8
|
-
alt,
|
|
9
|
-
symbol,
|
|
10
|
-
theme,
|
|
11
|
-
cssOverrides,
|
|
12
|
-
className
|
|
13
|
-
}: IconProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function Icon({ children, size, fill, alt, symbol, theme, cssOverrides, className }: IconProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
4
|
//#endregion
|
|
15
5
|
export { Icon };
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { IconProps } from "./types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/components/Icon/Icon.d.ts
|
|
4
|
-
declare function Icon({
|
|
5
|
-
children,
|
|
6
|
-
size,
|
|
7
|
-
fill,
|
|
8
|
-
alt,
|
|
9
|
-
symbol,
|
|
10
|
-
theme,
|
|
11
|
-
cssOverrides,
|
|
12
|
-
className
|
|
13
|
-
}: IconProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function Icon({ children, size, fill, alt, symbol, theme, cssOverrides, className }: IconProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
4
|
//#endregion
|
|
15
5
|
export { Icon };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DeepPartial, Prettify } from "../../util/types.cjs";
|
|
2
2
|
import { ComponentIcon } from "../../styleD/build/typescript/component/icon.cjs";
|
|
3
|
+
import "./types.cjs";
|
|
3
4
|
//#region src/components/Icon/Styles.d.ts
|
|
4
5
|
type IconTheme = Prettify<ComponentIcon>;
|
|
5
6
|
type PartialIconTheme = Prettify<DeepPartial<IconTheme>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DeepPartial, Prettify } from "../../util/types.js";
|
|
2
2
|
import { ComponentIcon } from "../../styleD/build/typescript/component/icon.js";
|
|
3
|
+
import "./types.js";
|
|
3
4
|
//#region src/components/Icon/Styles.d.ts
|
|
4
5
|
type IconTheme = Prettify<ComponentIcon>;
|
|
5
6
|
type PartialIconTheme = Prettify<DeepPartial<IconTheme>>;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { MaterialSymbol } from "../../fonts/materialSymbolsTypes.cjs";
|
|
3
3
|
import { DefaultPropsWithChildren } from "../../util/types.cjs";
|
|
4
4
|
import { IconTheme } from "./Styles.cjs";
|
|
5
|
-
|
|
6
5
|
//#region src/components/Icon/types.d.ts
|
|
7
6
|
interface IconProps extends DefaultPropsWithChildren<IconTheme, undefined, MaterialSymbol | Exclude<React.ReactNode, string>> {
|
|
8
7
|
/**
|
|
@@ -28,4 +27,4 @@ interface IconProps extends DefaultPropsWithChildren<IconTheme, undefined, Mater
|
|
|
28
27
|
symbol?: MaterialSymbol;
|
|
29
28
|
}
|
|
30
29
|
//#endregion
|
|
31
|
-
export { IconProps };
|
|
30
|
+
export { IconProps, type MaterialSymbol };
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { MaterialSymbol } from "../../fonts/materialSymbolsTypes.js";
|
|
3
3
|
import { DefaultPropsWithChildren } from "../../util/types.js";
|
|
4
4
|
import { IconTheme } from "./Styles.js";
|
|
5
|
-
|
|
6
5
|
//#region src/components/Icon/types.d.ts
|
|
7
6
|
interface IconProps extends DefaultPropsWithChildren<IconTheme, undefined, MaterialSymbol | Exclude<React.ReactNode, string>> {
|
|
8
7
|
/**
|
|
@@ -28,4 +27,4 @@ interface IconProps extends DefaultPropsWithChildren<IconTheme, undefined, Mater
|
|
|
28
27
|
symbol?: MaterialSymbol;
|
|
29
28
|
}
|
|
30
29
|
//#endregion
|
|
31
|
-
export { IconProps };
|
|
30
|
+
export { IconProps, type MaterialSymbol };
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { IconButtonProps } from "./types.cjs";
|
|
2
|
-
|
|
3
2
|
//#region src/components/IconButton/IconButton.d.ts
|
|
4
|
-
declare function IconButton({
|
|
5
|
-
variant,
|
|
6
|
-
size,
|
|
7
|
-
symbol,
|
|
8
|
-
ariaLabel,
|
|
9
|
-
theme,
|
|
10
|
-
cssOverrides,
|
|
11
|
-
...props
|
|
12
|
-
}: IconButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function IconButton({ variant, size, symbol, ariaLabel, theme, cssOverrides, ...props }: IconButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
4
|
//#endregion
|
|
14
5
|
export { IconButton };
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { IconButtonProps } from "./types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/components/IconButton/IconButton.d.ts
|
|
4
|
-
declare function IconButton({
|
|
5
|
-
variant,
|
|
6
|
-
size,
|
|
7
|
-
symbol,
|
|
8
|
-
ariaLabel,
|
|
9
|
-
theme,
|
|
10
|
-
cssOverrides,
|
|
11
|
-
...props
|
|
12
|
-
}: IconButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function IconButton({ variant, size, symbol, ariaLabel, theme, cssOverrides, ...props }: IconButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
4
|
//#endregion
|
|
14
5
|
export { IconButton };
|
|
@@ -3,7 +3,6 @@ import { DefaultPropsWithChildren } from "../../util/types.cjs";
|
|
|
3
3
|
import { IconProps } from "../Icon/types.cjs";
|
|
4
4
|
import { IconButtonTheme } from "./styles.cjs";
|
|
5
5
|
import { ButtonProps } from "react-aria-components";
|
|
6
|
-
|
|
7
6
|
//#region src/components/IconButton/types.d.ts
|
|
8
7
|
interface IconButtonProps extends DefaultPropsWithChildren<IconButtonTheme, ButtonProps['className'], IconProps['children']>, Omit<ButtonProps, 'children'> {
|
|
9
8
|
/**
|
|
@@ -3,7 +3,6 @@ import { DefaultPropsWithChildren } from "../../util/types.js";
|
|
|
3
3
|
import { IconProps } from "../Icon/types.js";
|
|
4
4
|
import { IconButtonTheme } from "./styles.js";
|
|
5
5
|
import { ButtonProps } from "react-aria-components";
|
|
6
|
-
|
|
7
6
|
//#region src/components/IconButton/types.d.ts
|
|
8
7
|
interface IconButtonProps extends DefaultPropsWithChildren<IconButtonTheme, ButtonProps['className'], IconProps['children']>, Omit<ButtonProps, 'children'> {
|
|
9
8
|
/**
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { IconLinkButtonProps } from "./types.cjs";
|
|
2
|
-
|
|
3
2
|
//#region src/components/IconLinkButton/IconLinkButton.d.ts
|
|
4
|
-
declare function IconLinkButton({
|
|
5
|
-
variant,
|
|
6
|
-
size,
|
|
7
|
-
symbol,
|
|
8
|
-
ariaLabel,
|
|
9
|
-
theme,
|
|
10
|
-
cssOverrides,
|
|
11
|
-
...props
|
|
12
|
-
}: IconLinkButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function IconLinkButton({ variant, size, symbol, ariaLabel, theme, cssOverrides, ...props }: IconLinkButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
4
|
//#endregion
|
|
14
5
|
export { IconLinkButton };
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { IconLinkButtonProps } from "./types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/components/IconLinkButton/IconLinkButton.d.ts
|
|
4
|
-
declare function IconLinkButton({
|
|
5
|
-
variant,
|
|
6
|
-
size,
|
|
7
|
-
symbol,
|
|
8
|
-
ariaLabel,
|
|
9
|
-
theme,
|
|
10
|
-
cssOverrides,
|
|
11
|
-
...props
|
|
12
|
-
}: IconLinkButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function IconLinkButton({ variant, size, symbol, ariaLabel, theme, cssOverrides, ...props }: IconLinkButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
4
|
//#endregion
|
|
14
5
|
export { IconLinkButton };
|
|
@@ -3,7 +3,6 @@ import { DefaultPropsWithChildren } from "../../util/types.cjs";
|
|
|
3
3
|
import { IconProps } from "../Icon/types.cjs";
|
|
4
4
|
import { IconLinkButtonTheme } from "./styles.cjs";
|
|
5
5
|
import { LinkProps } from "react-aria-components";
|
|
6
|
-
|
|
7
6
|
//#region src/components/IconLinkButton/types.d.ts
|
|
8
7
|
interface IconLinkButtonProps extends DefaultPropsWithChildren<IconLinkButtonTheme, LinkProps['className'], IconProps['children']>, Omit<LinkProps, 'children'> {
|
|
9
8
|
/**
|
|
@@ -3,7 +3,6 @@ import { DefaultPropsWithChildren } from "../../util/types.js";
|
|
|
3
3
|
import { IconProps } from "../Icon/types.js";
|
|
4
4
|
import { IconLinkButtonTheme } from "./styles.js";
|
|
5
5
|
import { LinkProps } from "react-aria-components";
|
|
6
|
-
|
|
7
6
|
//#region src/components/IconLinkButton/types.d.ts
|
|
8
7
|
interface IconLinkButtonProps extends DefaultPropsWithChildren<IconLinkButtonTheme, LinkProps['className'], IconProps['children']>, Omit<LinkProps, 'children'> {
|
|
9
8
|
/**
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import { InlineMessageProps } from "./types.cjs";
|
|
2
|
-
|
|
3
2
|
//#region src/components/InlineMessage/InlineMessage.d.ts
|
|
4
|
-
declare function InlineMessage({
|
|
5
|
-
children,
|
|
6
|
-
level,
|
|
7
|
-
hideIcon,
|
|
8
|
-
icon,
|
|
9
|
-
theme,
|
|
10
|
-
cssOverrides,
|
|
11
|
-
className,
|
|
12
|
-
slot,
|
|
13
|
-
...props
|
|
14
|
-
}: InlineMessageProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function InlineMessage({ children, level, hideIcon, icon, theme, cssOverrides, className, slot, ...props }: InlineMessageProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
4
|
//#endregion
|
|
16
5
|
export { InlineMessage };
|