@vertigis/react-ui 9.2.2 → 9.3.2

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.
@@ -0,0 +1,39 @@
1
+ import { FC } from "react";
2
+ import { BoxProps } from "../Box";
3
+ /**
4
+ * Properties for the `Markdown` component.
5
+ */
6
+ export interface MarkdownProps extends BoxProps {
7
+ /**
8
+ * The markdown text to render.
9
+ */
10
+ markdown: string;
11
+ /**
12
+ * A caller-supplied sanitization function to ensure that the resulting HTML
13
+ * is safe to insert into the DOM. Required.
14
+ */
15
+ sanitize: (unsafeHtml: string) => string;
16
+ /**
17
+ * If specified, produces HTML that is valid for contexts where only inline
18
+ * content is allowed (e.g. inside `<h1>`>` or `<span>` tags). HTML tags for
19
+ * block-level elements will be removed, but any text content will be
20
+ * preserved.
21
+ */
22
+ inline?: boolean;
23
+ /**
24
+ * If true, any HTML in the markdown will be escaped rather than passed
25
+ * through directly to the output as normal (since Markdown is a superset of
26
+ * HTML). This is useful in situations where you wish to only support pure
27
+ * Markdown syntax without also supporting HTML syntax. The default is
28
+ * `false`.
29
+ *
30
+ * IMPORTANT: The resulting HTML still needs to be sanitized whether or not
31
+ * this option is set.
32
+ */
33
+ escapeHtml?: boolean;
34
+ }
35
+ /**
36
+ * A component that renders markdown as HTML.
37
+ */
38
+ declare const Markdown: FC<MarkdownProps>;
39
+ export default Markdown;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import Box from "../Box";
4
+ import { markdownToHtml } from "../utils/markdown";
5
+ /**
6
+ * A component that renders markdown as HTML.
7
+ */
8
+ const Markdown = ({ markdown, inline, escapeHtml, sanitize, className, ...otherProps }) => {
9
+ return (_jsx(Box, Object.assign({ component: inline ? "span" : "div", className: clsx("GcxMarkdown", className), dangerouslySetInnerHTML: {
10
+ __html: sanitize(markdownToHtml(markdown, { inline, escapeHtml })),
11
+ } }, otherProps), void 0));
12
+ };
13
+ export default Markdown;
@@ -0,0 +1,2 @@
1
+ export * from "./Markdown";
2
+ export { default } from "./Markdown";
@@ -0,0 +1,2 @@
1
+ export * from "./Markdown";
2
+ export { default } from "./Markdown";
@@ -0,0 +1,11 @@
1
+ import { FC } from "react";
2
+ import { ListItemSecondaryActionProps } from "../ListItemSecondaryAction";
3
+ /**
4
+ * For use within a MenuList (or other list that implements arrow key
5
+ * navigation). The standard ListItemSecondaryAction will break keyboard
6
+ * navigation in this type of list.
7
+ *
8
+ * @param props The component properties.
9
+ */
10
+ declare const MenuItemSecondaryAction: FC<ListItemSecondaryActionProps>;
11
+ export default MenuItemSecondaryAction;
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useRef } from "react";
3
+ import GcxListItemSecondaryAction from "../ListItemSecondaryAction";
4
+ import { styled } from "../styles";
5
+ const StyledListItemSecondaryAction = styled(GcxListItemSecondaryAction)({
6
+ display: "flex",
7
+ flexShrink: 0,
8
+ });
9
+ /**
10
+ * For use within a MenuList (or other list that implements arrow key
11
+ * navigation). The standard ListItemSecondaryAction will break keyboard
12
+ * navigation in this type of list.
13
+ *
14
+ * @param props The component properties.
15
+ */
16
+ const MenuItemSecondaryAction = (props) => {
17
+ const ref = useRef(null);
18
+ const { className, ...otherProps } = props;
19
+ const onKeyDown = (event) => {
20
+ var _a, _b;
21
+ const { key } = event;
22
+ if (key === "ArrowUp" || key === "ArrowDown" || key === "Home" || key === "End") {
23
+ // Switch focus to the parent list item, then let the key event
24
+ // propagate to get the normal behavior of pressing these keys.
25
+ (_b = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.focus();
26
+ }
27
+ else if (key !== "Escape") {
28
+ // Prevent propagation to the primary action.
29
+ event.stopPropagation();
30
+ }
31
+ };
32
+ return (_jsx(StyledListItemSecondaryAction, Object.assign({ className: className, onClick: (event) => {
33
+ event.stopPropagation();
34
+ }, onKeyDown: onKeyDown, onMouseDown: (event) => {
35
+ // This will stop child ripples from propagating.
36
+ event.stopPropagation();
37
+ }, ref: ref }, otherProps), void 0));
38
+ };
39
+ export default MenuItemSecondaryAction;
@@ -0,0 +1,2 @@
1
+ export { default } from "./MenuItemSecondaryAction";
2
+ export * from "./MenuItemSecondaryAction";
@@ -0,0 +1,2 @@
1
+ export { default } from "./MenuItemSecondaryAction";
2
+ export * from "./MenuItemSecondaryAction";
package/Tabs/Tabs.d.ts CHANGED
@@ -34,5 +34,5 @@ export declare type TabsProps = Omit<MUITabsProps, "classes"> & {
34
34
  */
35
35
  classes?: Partial<TabsClasses>;
36
36
  };
37
- declare const Tabs: import("react").ForwardRefExoticComponent<Pick<TabsProps, "id" | "dir" | "form" | "slot" | "style" | "title" | "type" | "resource" | "results" | "role" | "key" | "value" | "classes" | "color" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "variant" | "orientation" | "centered" | "scrollButtons" | "allowScrollButtonsMobile" | "indicatorColor" | "ScrollButtonComponent" | "selectionFollowsFocus" | "TabIndicatorProps" | "TabScrollButtonProps" | "textColor" | "visibleScrollbar"> & import("react").RefAttributes<HTMLButtonElement>>;
37
+ declare const Tabs: import("react").ForwardRefExoticComponent<Pick<TabsProps, "id" | "dir" | "form" | "slot" | "style" | "title" | "type" | "resource" | "results" | "role" | "key" | "value" | "classes" | "color" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "variant" | "orientation" | "centered" | "scrollButtons" | "allowScrollButtonsMobile" | "indicatorColor" | "ScrollButtonComponent" | "selectionFollowsFocus" | "TabIndicatorProps" | "TabScrollButtonProps" | "textColor" | "visibleScrollbar"> & import("react").RefAttributes<HTMLButtonElement>>;
38
38
  export default Tabs;
@@ -1,3 +1,3 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import createSvgIcon from './utils/createSvgIcon';
3
- export default createSvgIcon(_jsxs("g", { children: [_jsx("path", { d: "M12.073 24.75a.75.75 0 0 1-.675-.422L6.206 13.644l-.064-.065a8.45 8.45 0 0 1-2.47-5.93c0-4.71 3.69-8.399 8.4-8.399 2.296 0 4.416.885 5.971 2.493 1.547 1.6 2.356 3.759 2.28 6.082 0 1.252-.219 2.412-.647 3.425H21a.75.75 0 0 1 .75.75v1a.73.73 0 0 1-.043.25H24a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-.75.75h-.25V24a.75.75 0 0 1-.75.75h-7a.75.75 0 0 1-.75-.75v-4.905l-2.5 5.228a.75.75 0 0 1-.675.427h-.002zm0-20.25c-1.682 0-3 1.318-3 3s1.318 3 3 3 3-1.318 3-3-1.318-3-3-3z" }, void 0), _jsx("path", { fill: "#FFF", d: "M12.073 0c4.2 0 7.65 3.3 7.5 7.8 0 1.136-.185 2.223-.607 3.2H18a1 1 0 0 0-1 1v1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1v.879L12.073 24l-5.1-10.5-.15-.3-.15-.15c-1.35-1.35-2.25-3.3-2.25-5.4 0-4.35 3.45-7.65 7.65-7.65m0 11.25c2.1 0 3.75-1.65 3.75-3.75s-1.65-3.75-3.75-3.75-3.75 1.65-3.75 3.75 1.65 3.75 3.75 3.75M21 12v1h-3v-1h3m3 2v2h-1v8h-7v-8h-1v-2h9m-3 9h1v-7h-1v7m-2 0h1v-7h-1v7m-2 0h1v-7h-1v7M12.073-1.5c-5.131 0-9.15 4.02-9.15 9.15 0 2.386.971 4.731 2.667 6.438l.04.083 5.093 10.484a1.5 1.5 0 0 0 2.703-.008l1.074-2.246V24a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5v-6.585a1.5 1.5 0 0 0 1-1.415v-2a1.5 1.5 0 0 0-1.5-1.5h-1.5V12a1.5 1.5 0 0 0-1.5-1.5h-.273c.23-.835.346-1.739.346-2.7.083-2.478-.801-4.832-2.49-6.579-1.698-1.755-4.01-2.721-6.51-2.721zm0 11.25c-1.262 0-2.25-.988-2.25-2.25s.988-2.25 2.25-2.25 2.25.988 2.25 2.25-.989 2.25-2.25 2.25z" }, void 0)] }, void 0), 'FeatureDelete');
3
+ export default createSvgIcon(_jsx("g", { children: _jsx("path", { d: "M24 14h-9v2h1v8h7v-8h1v-2zm-6 9h-1v-7h1v7zm2 0h-1v-7h1v7zm2 0h-1v-7h1v7zm-4-11h3v1h-3v-1zm-3 1h2v-1c0-.6.4-1 1-1h1c.4-1 .6-2.1.6-3.2.1-4.5-3.3-7.8-7.5-7.8S4.4 3.3 4.4 7.6c0 2.1.9 4 2.3 5.4l.1.1L12.1 24l2.9-6.1V17c-.6 0-1-.4-1-1v-2c0-.6.4-1 1-1zm-2.9-1.7c-2.1 0-3.8-1.6-3.8-3.8s1.6-3.8 3.8-3.8 3.8 1.6 3.8 3.8-1.7 3.8-3.8 3.8z" }, void 0) }, void 0), 'FeatureDelete');
@@ -0,0 +1,4 @@
1
+ declare const _default: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
2
+ muiName: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import createSvgIcon from './utils/createSvgIcon';
3
+ export default createSvgIcon(_jsx("g", { children: _jsx("path", { d: "M24 14.4V9.6l-2.426-.485a9.865 9.865 0 0 0-.765-1.851l1.372-2.054-3.391-3.391-2.057 1.372a9.932 9.932 0 0 0-1.851-.765L14.4 0H9.6l-.483 2.426a9.951 9.951 0 0 0-1.85.765L5.21 1.819 1.819 5.21l1.372 2.057a9.865 9.865 0 0 0-.765 1.851L0 9.6v4.8l2.426.485a9.865 9.865 0 0 0 .765 1.851L1.819 18.79l3.391 3.391 2.057-1.372a9.951 9.951 0 0 0 1.85.765L9.6 24h4.8l.484-2.426a9.932 9.932 0 0 0 1.851-.765l2.057 1.372 3.391-3.391-1.372-2.057a9.865 9.865 0 0 0 .765-1.851zM12 21a9 9 0 1 1 9-9 9.026 9.026 0 0 1-9 9zm0-17a8 8 0 1 0 8 8 8 8 0 0 0-8-8zM9.005 5.754a9.187 9.187 0 0 0-1.526 3.579H5.6a6.953 6.953 0 0 1 3.405-3.579zM5.067 12a6.912 6.912 0 0 1 .193-1.6H7.3a13.381 13.381 0 0 0 0 3.2H5.26a6.912 6.912 0 0 1-.193-1.6zm.533 2.667h1.879a9.187 9.187 0 0 0 1.526 3.579A6.953 6.953 0 0 1 5.6 14.667zm5.867 4.179c-1.207-.356-2.378-1.888-2.906-4.179h2.906zm0-5.246H8.37a12.479 12.479 0 0 1 0-3.2h3.1zm0-4.267H8.561c.528-2.291 1.7-3.823 2.906-4.179zm1.066-4.179c1.207.356 2.378 1.888 2.906 4.179h-2.906zm0 5.246h3.1a12.479 12.479 0 0 1 0 3.2h-3.1zm0 8.446v-4.179h2.906c-.528 2.291-1.699 3.823-2.906 4.179zm2.462-.6a9.187 9.187 0 0 0 1.526-3.579H18.4a6.953 6.953 0 0 1-3.4 3.579zM18.933 12a6.912 6.912 0 0 1-.193 1.6H16.7a13.381 13.381 0 0 0 0-3.2h2.035a6.912 6.912 0 0 1 .198 1.6zm-2.412-2.667A9.194 9.194 0 0 0 15 5.759a6.96 6.96 0 0 1 3.4 3.574z" }, void 0) }, void 0), 'ServiceGlobal');
package/icons/SignOut.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import createSvgIcon from './utils/createSvgIcon';
3
- export default createSvgIcon(_jsx("g", { children: _jsx("path", { d: "M8.3 14.2c.9 1.2 2.2 1.9 3.7 2.1 1.5-.2 2.8-.9 3.7-2.1.8.4 1.8.9 2.7 1.5 1.6-3 2.5-6.4 2.6-9.8-3.2-.3-6.3-1.5-9-3.3-2.6 1.9-5.7 3-8.9 3.3.1 3.4 1 6.7 2.6 9.8.8-.6 1.8-1.1 2.6-1.5zm3-8.4c.5-.1 1-.1 1.5 0 2.4.6 2.6 1.9 2.6 4.3s-2.2 4.3-3.3 4.3-3.4-2-3.4-4.4.1-3.7 2.6-4.2zm.7-4.5c2.9 2.2 6.4 3.5 10 3.7-.3 8.9-4.1 15.8-10 18-5.9-2.2-9.7-9.1-10-18 3.6-.2 7.1-1.4 10-3.7M12 0C9 2.6 5 4.1 1 4c0 11 5 18 11 20 6-2 11-9 11-20-4 .1-8-1.4-11-4z" }, void 0) }, void 0), 'SignOut');
3
+ export default createSvgIcon(_jsx("g", { children: _jsx("path", { d: "M16 20v4H0V0h16v4h-2V2H2v20h12v-2h2zm1.636-14.364l-1.4142 1.4142L20.1716 11H7v2h13.1715l-3.9497 3.9497 1.4142 1.4142L24 12l-6.364-6.364z" }, void 0) }, void 0), 'SignOut');
package/icons/Star.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import createSvgIcon from './utils/createSvgIcon';
3
- export default createSvgIcon(_jsx("g", { children: _jsx("path", { d: "M12 1l3.7 7.5L24 9.7l-6 5.8 1.4 8.3-7.4-3.9-7.4 3.9L6 15.6 0 9.7l8.3-1.2L12 1z" }, void 0) }, void 0), 'Star');
3
+ export default createSvgIcon(_jsx("g", { children: _jsx("path", { d: "M13.0011.6443l3.1016 6.5868 6.9509 1.0529c.9073.1374 1.2679 1.3071.6088 1.9746l-5.0168 5.0808 1.1769 7.3103c.1519.9435-.7939 1.6607-1.6019 1.2145l-6.2087-3.4281-6.2037 3.4254c-.8089.4466-1.7555-.2726-1.6016-1.2168l1.1716-7.1894-5.0473-5.2c-.6505-.6702-.2874-1.831.6155-1.9677l6.9748-1.0565L11.0228.6443c.4045-.8591 1.5738-.8591 1.9783 0z" }, void 0) }, void 0), 'Star');
@@ -0,0 +1,4 @@
1
+ declare const _default: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
2
+ muiName: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import createSvgIcon from './utils/createSvgIcon';
3
+ export default createSvgIcon(_jsx("g", { children: _jsx("path", { d: "M23.0536 8.284l-6.9509-1.0529L13.0011.6443c-.4045-.8591-1.5739-.8591-1.9784 0L7.9212 7.231.9464 8.2875c-.903.1368-1.2661 1.2976-.6155 1.9677l5.0474 5.2-1.1716 7.1894c-.1539.9444.7927 1.6635 1.6016 1.2168l6.2037-3.4254 6.2086 3.4282c.808.4462 1.7538-.271 1.602-1.2145l-1.1769-7.3103 5.0168-5.0808c.659-.6676.2984-1.8372-.6089-1.9746zm-6.5543 6.3208l1.051 6.5282-5.5384-3.058-5.5294 3.053 1.042-6.3944-4.5135-4.65 6.2405-.9453 2.7605-5.8625 2.7605 5.8625 6.1974.9387-4.4706 4.5278z" }, void 0) }, void 0), 'StarOutline');
package/icons/index.d.ts CHANGED
@@ -526,6 +526,7 @@ export { default as Server } from './Server';
526
526
  export { default as ServiceFeature } from './ServiceFeature';
527
527
  export { default as ServiceGeocode } from './ServiceGeocode';
528
528
  export { default as ServiceGeometry } from './ServiceGeometry';
529
+ export { default as ServiceGlobal } from './ServiceGlobal';
529
530
  export { default as ServiceGp } from './ServiceGp';
530
531
  export { default as ServiceMap } from './ServiceMap';
531
532
  export { default as ServiceNetwork } from './ServiceNetwork';
@@ -574,6 +575,7 @@ export { default as Stack } from './Stack';
574
575
  export { default as Star } from './Star';
575
576
  export { default as StarAdd } from './StarAdd';
576
577
  export { default as StarCheck } from './StarCheck';
578
+ export { default as StarOutline } from './StarOutline';
577
579
  export { default as StationLocator } from './StationLocator';
578
580
  export { default as Stop } from './Stop';
579
581
  export { default as StreetEdit } from './StreetEdit';
package/icons/index.js CHANGED
@@ -526,6 +526,7 @@ export { default as Server } from './Server';
526
526
  export { default as ServiceFeature } from './ServiceFeature';
527
527
  export { default as ServiceGeocode } from './ServiceGeocode';
528
528
  export { default as ServiceGeometry } from './ServiceGeometry';
529
+ export { default as ServiceGlobal } from './ServiceGlobal';
529
530
  export { default as ServiceGp } from './ServiceGp';
530
531
  export { default as ServiceMap } from './ServiceMap';
531
532
  export { default as ServiceNetwork } from './ServiceNetwork';
@@ -574,6 +575,7 @@ export { default as Stack } from './Stack';
574
575
  export { default as Star } from './Star';
575
576
  export { default as StarAdd } from './StarAdd';
576
577
  export { default as StarCheck } from './StarCheck';
578
+ export { default as StarOutline } from './StarOutline';
577
579
  export { default as StationLocator } from './StationLocator';
578
580
  export { default as Stop } from './Stop';
579
581
  export { default as StreetEdit } from './StreetEdit';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertigis/react-ui",
3
- "version": "9.2.2",
3
+ "version": "9.3.2",
4
4
  "description": "Utilities and React components used in VertiGIS applications.",
5
5
  "keywords": [
6
6
  "vertigis",
@@ -15,20 +15,22 @@
15
15
  "sideEffects": false,
16
16
  "scripts": {},
17
17
  "dependencies": {
18
- "@emotion/cache": "^11.5.0",
19
- "@emotion/react": "^11.5.0",
20
- "@emotion/styled": "^11.3.0",
21
- "@mui/icons-material": "5.2.5",
22
- "@mui/material": "5.2.8",
18
+ "@emotion/cache": "^11.7.1",
19
+ "@emotion/react": "^11.8.2",
20
+ "@emotion/styled": "^11.8.1",
21
+ "@mui/icons-material": "5.5.1",
22
+ "@mui/material": "5.5.2",
23
23
  "clsx": "^1.1.1",
24
24
  "lodash": "^4.17.21",
25
+ "marked": "^4.0.12",
25
26
  "tslib": "^2.1.0"
26
27
  },
27
28
  "devDependencies": {
28
- "@geocortex/icons": "5.0.404",
29
+ "@geocortex/icons": "5.0.419",
29
30
  "@testing-library/react": "^12.1.2",
30
31
  "@testing-library/user-event": "^13.5.0",
31
32
  "@types/lodash": "^4.14.168",
33
+ "@types/marked": "^4.0.2",
32
34
  "@types/react": "^17.0.34",
33
35
  "@types/react-dom": "^17.0.11",
34
36
  "react": "^17.0.2",
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Options for the markdownToHtml() function.
3
+ */
4
+ export interface MarkdownToHtmlOptions {
5
+ /**
6
+ * If specified, produces HTML that is valid to place within an HTML element
7
+ * that only supports inline content (called "phrasing content" in the HTML5
8
+ * spec). Example elements that only support phrasing content are <span> and
9
+ * <h2>. In this mode, any block-level elements resulting from the Markdown
10
+ * conversion will be stripped. The default is `false`.
11
+ */
12
+ inline?: boolean;
13
+ /**
14
+ * If true, any HTML in the markdown will be escaped rather than passed
15
+ * through directly to the output (since Markdown is a superset of HTML).
16
+ * This is useful in situations where you wish to only support pure Markdown
17
+ * syntax without also supporting HTML syntax. The default is `false`.
18
+ *
19
+ * IMPORTANT: The resulting HTML still needs to be sanitized whether or not
20
+ * this option is set.
21
+ */
22
+ escapeHtml?: boolean;
23
+ }
24
+ /**
25
+ * Converts markdown text into HTML.
26
+ *
27
+ * NOTE: The resulting HTML is NOT sanitized by this function. It is the
28
+ * caller's responsibility to sanitize the resulting HTML prior to inserting it
29
+ * into the DOM. You must do this even if `escapeHtml` is set to true.
30
+ *
31
+ * @param markdown The markdown text to convert.
32
+ * @param options Options that affect how the text is converted.
33
+ */
34
+ export declare function markdownToHtml(markdown: string | undefined, options?: MarkdownToHtmlOptions): string;
@@ -0,0 +1,44 @@
1
+ import escapeHtml from "lodash/escape";
2
+ import { marked } from "marked";
3
+ /**
4
+ * A custom marked renderer that escapes HTML in the original markdown.
5
+ */
6
+ class EscapeHtmlRenderer extends marked.Renderer {
7
+ html(html) {
8
+ return escapeHtml(html);
9
+ }
10
+ }
11
+ EscapeHtmlRenderer.instance = new EscapeHtmlRenderer();
12
+ /**
13
+ * Converts markdown text into HTML.
14
+ *
15
+ * NOTE: The resulting HTML is NOT sanitized by this function. It is the
16
+ * caller's responsibility to sanitize the resulting HTML prior to inserting it
17
+ * into the DOM. You must do this even if `escapeHtml` is set to true.
18
+ *
19
+ * @param markdown The markdown text to convert.
20
+ * @param options Options that affect how the text is converted.
21
+ */
22
+ export function markdownToHtml(markdown, options) {
23
+ if (!markdown) {
24
+ return "";
25
+ }
26
+ const { inline, escapeHtml } = { inline: false, escapeHtml: false, ...options };
27
+ const markedOptions = {
28
+ ...(escapeHtml && {
29
+ renderer: EscapeHtmlRenderer.instance,
30
+ }),
31
+ };
32
+ const html = marked(markdown, markedOptions);
33
+ return inline ? stripBlockElements(html) : html;
34
+ }
35
+ /**
36
+ * Strips all HTML elements that are not suitable for placing within an inline
37
+ * HTML element.
38
+ *
39
+ * @param html The HTML to process.
40
+ */
41
+ function stripBlockElements(html) {
42
+ // Derived from here: https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
43
+ return html.replace(/(?:<(\/?))(?!(?:\/|a|abbr|area|audio|b|bdi|bdo|br|button|canvas|cite|code|data|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|label|link|map|mark|math|meta|meter|noscript|object|output|picture|progress|q|ruby|s|samp|script|select|slot|small|span|strong|sub|sup|svg|template|textarea|time|u|var|video|wbr)\b)[^>]*>/gi, (match, s1) => (s1 === "/" ? " " : ""));
44
+ }